From d87c0d4d53aa67ac05f578e3fd420dbde433f51e Mon Sep 17 00:00:00 2001 From: bracesproul Date: Mon, 18 Nov 2024 16:25:51 -0800 Subject: [PATCH 1/2] fix(sdk-js): Expose Command interface --- libs/sdk-js/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/sdk-js/src/index.ts b/libs/sdk-js/src/index.ts index 6fc283605..f86406100 100644 --- a/libs/sdk-js/src/index.ts +++ b/libs/sdk-js/src/index.ts @@ -17,4 +17,4 @@ export type { Checkpoint, } from "./schema.js"; -export type { OnConflictBehavior } from "./types.js"; +export type { OnConflictBehavior, Command } from "./types.js"; From f00c0515e7b1febf69e36a24bfad5dcc02e0b819 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Mon, 18 Nov 2024 16:32:32 -0800 Subject: [PATCH 2/2] add jsdoc --- libs/sdk-js/src/types.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libs/sdk-js/src/types.ts b/libs/sdk-js/src/types.ts index 24f44d1f7..0073c5962 100644 --- a/libs/sdk-js/src/types.ts +++ b/libs/sdk-js/src/types.ts @@ -29,10 +29,19 @@ export interface Send { } export interface Command { + /** + * An object to update the thread state with. + */ update?: Record; + /** + * The value to return from an `interrupt` function call. + */ resume?: unknown; + /** + * A single, or array of `Send` commands to trigger nodes. + */ send?: Send | Send[]; }