@njxqlus/jean-claude-bun-dam-sdk
v1.0.5
Published
TypeScript SDK for the Jean-Claude Bun-Dam media asset service.
Readme
@njxqlus/jean-claude-bun-dam-sdk
One-file TypeScript SDK for the Jean-Claude Bun-DAM media asset service.
Configuration
Set JEAN_CLAUDE_BUN_DAM_SERVER_URL to your service base URL, for example http://localhost:3000.
You can also pass baseUrl directly when creating the client.
Usage
import { createClient } from "@njxqlus/jean-claude-bun-dam-sdk";
const client = createClient();
const asset = await client.createAsset({
file: new File(["hello"], "hello.txt", { type: "text/plain" }),
metadata: { project: "alpha" },
});
const temporary = await client.createAsset({
file: new File(["draft"], "draft.txt", { type: "text/plain" }),
metadata: { project: "alpha" },
temporary: true,
ttlSeconds: 3600,
});
const finalized = await client.finalizeAsset(temporary.id);
const list = await client.listAssets({ kind: "document" });
const original = await client.getAssetFile(asset.id);Commands
bun install
bun run check
bun run build