Generate SDK

Generate the TypeScript client based on your suga.yaml:
suga.yaml
buckets:
  image:
    access:
      app:
        - read
        - write
suga generate --ts --ts-out ./suga
For all available options, see the suga generate command documentation.

Import

typescript import {SugaClient} from './suga/client';

Usage

// Initialize client
const client = new SugaClient();

// Access your resources (names from your suga.yaml)
await client.image.write("file.txt", Buffer.from("data"));
const content = await client.image.read("file.txt");

Available Resources