@mondaydotcomorg/mcode-sdk
v0.1.1
Published
HTTP client for the Monday Code SDK API server (Lambda extension on localhost:9922)
Maintainers
Keywords
Readme
@mondaydotcomorg/mcode-sdk
TypeScript client for the SDK API server bundled with Monday Code app Lambdas (HTTP on http://127.0.0.1:9922).
Install
npm install @mondaydotcomorg/mcode-sdk(When published; in this monorepo use "@mondaydotcomorg/mcode-sdk": "file:../packages/sdk" or copy into sdk-vendor via scripts/package-sdk-test-app.sh.)
Usage
import { SecureStorage, ObjectStorage, Queue, EnvironmentVariables } from "@mondaydotcomorg/mcode-sdk";
const secure = new SecureStorage();
await secure.set("my-key", { foo: 1 });
const v = await secure.get<{ foo: number }>("my-key");
const files = new ObjectStorage();
await files.upload("notes.txt", Buffer.from("hello"), { contentType: "text/plain" });
const queue = new Queue();
await queue.publish({ type: "job", id: "123" });
const env = new EnvironmentVariables();
const all = await env.getAll();Override base URL (e.g. local testing): MCODE_SDK_API_URL.
Build
npm run buildEmits CommonJS (dist/cjs), ESM (dist/esm), and declarations (dist/types).
