New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@ckbox/sdk-node

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ckbox/sdk-node

CKBox SDK

latest
npmnpm
Version
2.11.1
Version published
Weekly downloads
5
-50%
Maintainers
1
Weekly downloads
 
Created
Source

CKBox NodeJS SDK

A lightweight JavaScript SDK for interacting with the CKBox API. This package provides easy integration between NodeJS application and CKBox services.

Installation

# Using npm
npm install @ckbox/sdk-node

# Using yarn
yarn add @ckbox/sdk-node

# Using pnpm
pnpm add @ckbox/sdk-node

Getting Started

To use the CKBox SDK, you'll need to obtain API credentials from your Customer Portal dashboard:

Initialize CKBox instance

import { CKBox } from '@ckbox/sdk-node';

// Configure CKBox
const config = {
  accessKey: 'your-access-key',
  environmentId: 'your-environment-id',
  workspaceId: 'your-workspace-id', // Optional
  userId: 'user-id', // Optional
  userName: 'User Name', // Optional
  role: 'user' // Optional, defaults to 'user'
};

// Initialize the CKBox wrapper
const { uploader, assets } = new CKBox(config);

Uploading Files

// Upload a file from a path
const uploadedFile = await uploader.uploadFile('/path/to/image.jpg', {
  categoryId: 'category-id', // Optional
  folderId: 'folder-id', // Optional
  onProgress: (progress) => {
    console.log(`Upload progress: ${progress.progress}%`);
  }
});

// Upload a buffer
const buffer = Buffer.from('file content');
const uploadedBuffer = await uploader.uploadBuffer(buffer, 'filename.txt', {
  categoryId: 'category-id'
});

// Upload a stream
const fileStream = fs.createReadStream('/path/to/file.pdf');
const uploadedStream = await uploader.uploadStream(fileStream, 'file.pdf', fileSize, {
  folderId: 'folder-id'
});

Managing Assets

// Get a specific asset by ID
const asset = await assets.getAsset('asset-id');

// List assets with pagination
const assetsList = await assets.getAssets({
  offset: 0,
  limit: 50,
  sortBy: 'uploadedAt',
  order: 'desc',
  categoryId: 'category-id' // Optional filter
});

Features

  • Simple and intuitive API for interacting with CKBox service
  • Secure authentication using JWT tokens
  • File upload functionality with progress tracking
  • Asset management (fetching and listing assets)
  • Comprehensive error handling
  • TypeScript support with full type definitions
  • Lightweight with minimal dependencies

API Reference

CKBoxConfig

Configuration object for CKBox SDK:

PropertyTypeRequiredDescription
accessKeystringYesThe access key available in the Customer Portal dashboard
environmentIdstringYesThe environment ID for CKBox instance
workspaceIdstringNoThe workspace ID for the user
role'user' | 'admin' | 'superadmin'NoThe role of the user (defaults to 'user')
userIdstringNoThe user ID for the user
userNamestringNoThe user name for the user
serviceOriginstringNoBase URL for the CKBox service (defaults to 'https://api.ckbox.io')

Documentation

For more detailed information and examples, please refer to the CKBox documentation.

License

Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved. CKBox is licensed under a commercial license and is protected by copyright law. For more details about available licensing options please contact us at sales@cksource.com.

Trademarks CKBox is a trademark of CKSource Holding sp. z o.o. All other brand and product names are trademarks, registered trademarks or service marks of their respective holders.

Keywords

file manager

FAQs

Package last updated on 31 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts