Skip to content

daptin/daptin-js-client

 
 

Repository files navigation

Daptin Client for JavaScript and TypeScript

NPM Node.js CI

Daptin Client for Node/JS/TS ecosystem which extends over the basic JSON API calls and allows you to execute Action APIs, handle user auth, and perform efficient file uploads with S3 presigned URL support for direct browser-to-S3 transfers.

πŸš€ New: S3 Presigned URL Support

The client now supports direct S3 uploads using presigned URLs, dramatically improving upload performance by bypassing your server:

  • βœ… Direct browser-to-S3 uploads with presigned URLs
  • βœ… Automatic multipart uploads for large files
  • βœ… Real-time progress tracking with callbacks
  • βœ… Multiple file uploads with batch processing
  • βœ… Video streaming uploads with chunked transfers (MP4, WebM)
  • βœ… Live recording and streaming from webcam/microphone
  • βœ… Automatic method selection (presigned URL or streaming)
// Simple file upload with S3 presigned URLs
await client.assetManager.uploadFile(
    'user_profile', 'user-123', 'avatar', 
    file, file.name,
    {
        onProgress: (progress) => {
            console.log(`Upload: ${progress.percent.toFixed(1)}%`);
        }
    }
);

πŸ“– Complete S3 Upload Guide
πŸŽ₯ Video Streaming Upload Guide

Checkout starter kit here: https://github.com/daptin/vue_typescript_starter_kit

Install

NPM

npm install daptin-client --save

Yarn

yarn add daptin-client

Usage

import {DaptinClient} from 'daptin-client'

const daptinClient = new DaptinClient("http://localhost:6336", false);
daptinClient.worldManager.loadModels().then(function () {
  daptinClient.jsonApi.findAll("todo").then(function(res: any){
    console.log("all todos", res.data)
  })
})

Publish

npm adduser
npm publish

About

Daptin Client for Node/JS/TS ecosystem

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 79.3%
  • JavaScript 20.7%