From b1a25abc73b0dc77bce2cce2dd919ed8bc5b7b7c Mon Sep 17 00:00:00 2001 From: Tat Dat Duong Date: Tue, 18 Mar 2025 21:22:40 +0100 Subject: [PATCH] Add command --- libs/sdk-js/src/client.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/sdk-js/src/client.ts b/libs/sdk-js/src/client.ts index ede19852f..7efc2e423 100644 --- a/libs/sdk-js/src/client.ts +++ b/libs/sdk-js/src/client.ts @@ -30,6 +30,7 @@ import type { StreamEvent, CronsCreatePayload, OnConflictBehavior, + Command, } from "./types.js"; import { mergeSignals } from "./utils/signals.js"; import { getEnvironmentVariable } from "./utils/env.js"; @@ -642,7 +643,7 @@ export class ThreadsClient< * Create a new thread from a batch states. */ async bulkUpdateState( - supersteps: Array<{ updates: Array<{ values: unknown; asNode: string }> }>, + supersteps: Array<{ updates: Array<{ values: unknown; command?: Command; asNode: string }> }>, options?: { graphId?: string; threadId?: string; @@ -656,6 +657,7 @@ export class ThreadsClient< supersteps: supersteps.map((s) => ({ updates: s.updates.map((u) => ({ values: u.values, + command: u.command, as_node: u.asNode, })), })),