@superclerk/sdk 0.1.1 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -76,7 +76,7 @@ export interface ConnectLink {
76
76
  export interface WebhookCreated {
77
77
  id: string;
78
78
  url: string;
79
- eventTypes: Array<"connect_link.succeeded" | "connect_link.failed" | "connection.updated" | "connection.removed" | "tool_run.completed" | "tool_run.failed" | "conversation.message.received" | "conversation.handed_off" | "contact.created" | "contact.merged" | "opportunity.stage_changed" | "task.completed">;
79
+ eventTypes: Array<"connect_link.succeeded" | "connect_link.failed" | "connection.updated" | "connection.removed" | "tool_run.completed" | "tool_run.failed" | "conversation.message.received" | "conversation.handed_off" | "contact.created" | "contact.merged" | "opportunity.stage_changed" | "task.completed" | "chat.waiting" | "chat.idle">;
80
80
  createdAt: string;
81
81
  disabledAt: string | null;
82
82
  secret: string;
@@ -84,7 +84,7 @@ export interface WebhookCreated {
84
84
  export interface Webhook {
85
85
  id: string;
86
86
  url: string;
87
- eventTypes: Array<"connect_link.succeeded" | "connect_link.failed" | "connection.updated" | "connection.removed" | "tool_run.completed" | "tool_run.failed" | "conversation.message.received" | "conversation.handed_off" | "contact.created" | "contact.merged" | "opportunity.stage_changed" | "task.completed">;
87
+ eventTypes: Array<"connect_link.succeeded" | "connect_link.failed" | "connection.updated" | "connection.removed" | "tool_run.completed" | "tool_run.failed" | "conversation.message.received" | "conversation.handed_off" | "contact.created" | "contact.merged" | "opportunity.stage_changed" | "task.completed" | "chat.waiting" | "chat.idle">;
88
88
  createdAt: string;
89
89
  disabledAt: string | null;
90
90
  }
@@ -92,7 +92,7 @@ export interface WebhookDelivery {
92
92
  id: string;
93
93
  event: {
94
94
  id: string;
95
- type: "connect_link.succeeded" | "connect_link.failed" | "connection.updated" | "connection.removed" | "tool_run.completed" | "tool_run.failed" | "conversation.message.received" | "conversation.handed_off" | "contact.created" | "contact.merged" | "opportunity.stage_changed" | "task.completed";
95
+ type: "connect_link.succeeded" | "connect_link.failed" | "connection.updated" | "connection.removed" | "tool_run.completed" | "tool_run.failed" | "conversation.message.received" | "conversation.handed_off" | "contact.created" | "contact.merged" | "opportunity.stage_changed" | "task.completed" | "chat.waiting" | "chat.idle";
96
96
  createdAt: string;
97
97
  };
98
98
  createdAt: string;
@@ -126,6 +126,378 @@ export interface TikTokCreatorSettings {
126
126
  uploadAuthorized: boolean;
127
127
  creatorAvatarURL: string;
128
128
  }
129
+ export interface Chat {
130
+ id: string;
131
+ agentID: string;
132
+ title: string;
133
+ /** The chat that gave this one to a subagent. */
134
+ parentChatID: string | null;
135
+ /** The app the chat came in through; null for one started in Superclerk. */
136
+ appID: string | null;
137
+ /** Whether only its member reads it, or the workspace too. */
138
+ accessScope: "member" | "workspace";
139
+ /** running while the agent works; waiting while it needs an answer in pending; idle otherwise. */
140
+ status: "running" | "waiting" | "idle";
141
+ /** While the model's provider fails, the try the agent makes next, as the server running the turn sees it. */
142
+ retry: {
143
+ attempt: number;
144
+ message: string;
145
+ nextAt: string;
146
+ } | null;
147
+ /** What the agent waits on. */
148
+ pending: Array<ChatApproval | ChatQuestion | ChatConnectionRequest | ChatSubagent | ChatSubagentWait>;
149
+ /** Why the agent's latest message ended without an answer. */
150
+ error: ChatError | null;
151
+ /** What the key started the chat with; null for a chat started in the app. */
152
+ metadata: {
153
+ [key: string]: string;
154
+ } | null;
155
+ createdAt: string;
156
+ updatedAt: string;
157
+ pinnedAt: string | null;
158
+ archivedAt: string | null;
159
+ }
160
+ export interface ChatApproval {
161
+ type: "approval";
162
+ /** Decide it with chats.approvals.decide. */
163
+ id: string;
164
+ tool: string;
165
+ title: string | null;
166
+ reason: string;
167
+ /** What the tool would run with. */
168
+ input: {
169
+ [key: string]: unknown;
170
+ };
171
+ /** A script's write plan, approved as a whole: send this digest with the decision. */
172
+ planDigest: string | null;
173
+ expiresAt: string;
174
+ }
175
+ export interface ChatQuestion {
176
+ type: "question";
177
+ /** Answer it with chats.questions.answer, one answer per question. */
178
+ id: string;
179
+ questions: Array<{
180
+ question: string;
181
+ header: string;
182
+ options: Array<{
183
+ label: string;
184
+ description: string;
185
+ }>;
186
+ /** Whether an answer may hold several options. */
187
+ multiple: boolean;
188
+ /** Whether an answer may be the person's own words. */
189
+ custom: boolean;
190
+ }>;
191
+ call: {
192
+ messageID: string;
193
+ /** The tool call, as its tool part's callID names it. */
194
+ callID: string;
195
+ } | null;
196
+ }
197
+ export interface ChatConnectionRequest {
198
+ type: "connection";
199
+ /** Answer it with chats.questions.answer and [[connectionID]] once the app is connected, or dismiss it. */
200
+ id: string;
201
+ appID: string;
202
+ reason: string;
203
+ /** The MCP server the agent named: a hosted one, or a URL it suggests for the person to check. */
204
+ mcpServer: {
205
+ source: "catalog";
206
+ id: string;
207
+ } | {
208
+ source: "custom";
209
+ url: string;
210
+ } | null;
211
+ call: {
212
+ messageID: string;
213
+ /** The tool call, as its tool part's callID names it. */
214
+ callID: string;
215
+ } | null;
216
+ }
217
+ /** A task the agent gave a subagent; its outcome comes back to the chat as a message. */
218
+ export interface ChatSubagent {
219
+ type: "subagent";
220
+ id: string;
221
+ /** The chat the subagent works in. */
222
+ subagentChatID: string;
223
+ agent: string;
224
+ description: string;
225
+ /** Whether the agent went on while the subagent works. */
226
+ background: boolean;
227
+ /** The tool call that asked. */
228
+ call: {
229
+ messageID: string;
230
+ /** The tool call, as its tool part's callID names it. */
231
+ callID: string;
232
+ };
233
+ }
234
+ /** The agent waits for its subagents; a message from the person ends the wait. */
235
+ export interface ChatSubagentWait {
236
+ type: "subagent_wait";
237
+ id: string;
238
+ /** The tool call that asked. */
239
+ call: {
240
+ messageID: string;
241
+ /** The tool call, as its tool part's callID names it. */
242
+ callID: string;
243
+ };
244
+ }
245
+ export interface ChatError {
246
+ /** stopped, context_too_long, output_too_long, provider_auth, provider_error, structured_output, failed, or the billing code that refused it, such as billing_credit_exhausted. */
247
+ code: string;
248
+ message: string;
249
+ }
250
+ export interface ChatMessage {
251
+ info: ChatMessageInfo;
252
+ parts: Array<ChatPart>;
253
+ }
254
+ export type ChatMessageInfo = ChatUserMessage | ChatAssistantMessage;
255
+ export interface ChatUserMessage {
256
+ id: string;
257
+ chatID: string;
258
+ createdAt: string;
259
+ deletedAt: string | null;
260
+ /** The message's ID in the app it came in or went out through. */
261
+ providerMessageID: string | null;
262
+ role: "user";
263
+ /** Written by Superclerk rather than the person. */
264
+ synthetic: boolean;
265
+ context: ChatContext | null;
266
+ /** A call filed in a phone line's thread as the caller's message: what happened, and which call's transcript and recording it belongs to. Null for anything else. */
267
+ phone: PhoneEvent | null;
268
+ }
269
+ /** The page of the app the person had open, which the agent reads with the message. */
270
+ export type ChatContext = {
271
+ kind: "website";
272
+ label: string;
273
+ id: string;
274
+ editor: {
275
+ revision: number;
276
+ pathname?: string;
277
+ viewport?: {
278
+ width: number;
279
+ };
280
+ };
281
+ } | {
282
+ kind: "workflow";
283
+ label: string;
284
+ id: string;
285
+ };
286
+ export type PhoneEvent = {
287
+ kind: "call" | "call_text";
288
+ callChatID: string;
289
+ } | {
290
+ kind: "missed_call" | "voicemail";
291
+ callChatID: null;
292
+ };
293
+ export interface ChatAssistantMessage {
294
+ id: string;
295
+ chatID: string;
296
+ createdAt: string;
297
+ deletedAt: string | null;
298
+ /** The message's ID in the app it came in or went out through. */
299
+ providerMessageID: string | null;
300
+ role: "assistant";
301
+ completedAt: string | null;
302
+ /** The message the agent answered: the newest one sent before it started. */
303
+ inReplyTo: string | null;
304
+ error: ChatError | null;
305
+ /** The model tokens the message took so far, cached and reasoning tokens included. */
306
+ usage: {
307
+ inputTokens: number;
308
+ outputTokens: number;
309
+ } | null;
310
+ /** Why the model stopped, such as stop, length or tool-calls. */
311
+ finish: string | null;
312
+ /** Who wrote it when the agent didn't: a teammate, a workflow run, or Superclerk. */
313
+ authoredBy: {
314
+ kind: "operator";
315
+ memberID: string;
316
+ } | {
317
+ kind: "workflow";
318
+ workflowRunID: string;
319
+ } | {
320
+ kind: "automated";
321
+ } | null;
322
+ }
323
+ export type ChatPart = ChatTextPart | ChatReasoningPart | ChatToolPart | ChatFilePart | ChatAgentPart | ChatSubtaskPart | ChatCompactionPart;
324
+ export interface ChatTextPart {
325
+ type: "text";
326
+ id: string;
327
+ chatID: string;
328
+ messageID: string;
329
+ text: string;
330
+ /** Written by Superclerk rather than the person or the agent. */
331
+ synthetic: boolean;
332
+ startedAt: string | null;
333
+ endedAt: string | null;
334
+ /** What the provider said about this text. */
335
+ metadata: {
336
+ [key: string]: unknown;
337
+ } | null;
338
+ /** What the agent suggests sending next, shown as buttons. */
339
+ nextSteps: Array<string> | null;
340
+ }
341
+ export interface ChatReasoningPart {
342
+ type: "reasoning";
343
+ id: string;
344
+ chatID: string;
345
+ messageID: string;
346
+ text: string;
347
+ startedAt: string;
348
+ endedAt: string | null;
349
+ }
350
+ export interface ChatToolPart {
351
+ type: "tool";
352
+ id: string;
353
+ chatID: string;
354
+ messageID: string;
355
+ callID: string;
356
+ tool: string;
357
+ state: ChatToolState;
358
+ }
359
+ export type ChatToolState = {
360
+ status: "pending";
361
+ input: {
362
+ [key: string]: unknown;
363
+ };
364
+ } | {
365
+ status: "running";
366
+ input: {
367
+ [key: string]: unknown;
368
+ };
369
+ title: string | null;
370
+ metadata: {
371
+ [key: string]: unknown;
372
+ } | null;
373
+ startedAt: string;
374
+ } | {
375
+ status: "approval_required";
376
+ input: {
377
+ [key: string]: unknown;
378
+ };
379
+ reason: string;
380
+ title: string | null;
381
+ /** The change in words, for a call whose input is only IDs. */
382
+ fields: Array<{
383
+ label: string;
384
+ value: string;
385
+ }> | null;
386
+ metadata: {
387
+ [key: string]: unknown;
388
+ } | null;
389
+ startedAt: string;
390
+ } | {
391
+ status: "completed";
392
+ input: {
393
+ [key: string]: unknown;
394
+ };
395
+ output: string;
396
+ title: string;
397
+ /** What the tool reported, in its own words. */
398
+ metadata: {
399
+ [key: string]: unknown;
400
+ };
401
+ startedAt: string;
402
+ endedAt: string;
403
+ /** When the output left the agent's context to save room. */
404
+ compactedAt: string | null;
405
+ attachments: Array<ChatFilePart>;
406
+ } | {
407
+ status: "error";
408
+ input: {
409
+ [key: string]: unknown;
410
+ };
411
+ error: string;
412
+ metadata: {
413
+ [key: string]: unknown;
414
+ } | null;
415
+ startedAt: string;
416
+ endedAt: string;
417
+ };
418
+ export interface ChatFilePart {
419
+ type: "file";
420
+ id: string;
421
+ chatID: string;
422
+ messageID: string;
423
+ mime: string;
424
+ filename: string | null;
425
+ /** Where the file reads from; null for a file the chat stores, which fileID names. */
426
+ url: string | null;
427
+ /** The chat's stored file, read with chats.files.get; null when url holds it. */
428
+ fileID: string | null;
429
+ }
430
+ export interface ChatAgentPart {
431
+ type: "agent";
432
+ id: string;
433
+ chatID: string;
434
+ messageID: string;
435
+ name: string;
436
+ }
437
+ export interface ChatSubtaskPart {
438
+ type: "subtask";
439
+ id: string;
440
+ chatID: string;
441
+ messageID: string;
442
+ prompt: string;
443
+ description: string;
444
+ agent: string;
445
+ }
446
+ /** Where the agent summarized the chat so far to make room. */
447
+ export interface ChatCompactionPart {
448
+ type: "compaction";
449
+ id: string;
450
+ chatID: string;
451
+ messageID: string;
452
+ auto: boolean;
453
+ }
454
+ export type ChatStreamEvent = {
455
+ event: "chat";
456
+ data: Chat;
457
+ } | {
458
+ event: "messages";
459
+ data: {
460
+ messages: Array<ChatMessage>;
461
+ };
462
+ } | {
463
+ event: "message";
464
+ data: ChatMessageInfo;
465
+ } | {
466
+ event: "part";
467
+ data: ChatPart;
468
+ } | {
469
+ event: "delta";
470
+ data: {
471
+ messageID: string;
472
+ partID: string;
473
+ text: string;
474
+ };
475
+ } | {
476
+ event: "removed";
477
+ data: {
478
+ messageID: string;
479
+ partID: string | null;
480
+ };
481
+ } | {
482
+ event: "deleted";
483
+ data: {
484
+ chatID: string;
485
+ };
486
+ } | {
487
+ event: "error";
488
+ data: ChatError;
489
+ };
490
+ export type QuestionAnswer = Array<string>;
491
+ export interface ChatFile {
492
+ id: string;
493
+ chatID: string;
494
+ filename: string;
495
+ mime: string;
496
+ sizeBytes: number;
497
+ /** Where the file reads from until expiresAt. */
498
+ url: string;
499
+ expiresAt: string;
500
+ }
129
501
  export interface Conversation {
130
502
  id: string;
131
503
  /** The account the conversation came in on. */
@@ -140,6 +512,8 @@ export interface Conversation {
140
512
  status: "open" | "waiting" | "resolved";
141
513
  snoozedUntil: string | null;
142
514
  needsReply: boolean;
515
+ /** A person has something to do here: act on why it was handed to them, or answer a customer no AI will. The Inbox's Needs you view lists exactly these. */
516
+ needsYou: boolean;
143
517
  responder: ConversationResponder;
144
518
  /** The AI that answers this conversation. */
145
519
  agent: {
@@ -162,7 +536,7 @@ export type ConversationResponder = {
162
536
  } | {
163
537
  kind: "handed_off";
164
538
  reason: string;
165
- /** When the AI answers again; null until someone hands it back. */
539
+ /** Always null: a handed-off conversation stays with a person until someone hands it back. */
166
540
  until: string | null;
167
541
  } | {
168
542
  kind: "team";
@@ -454,8 +828,10 @@ export interface InboxAI {
454
828
  id: string;
455
829
  name: string;
456
830
  paused: boolean;
831
+ /** inbox: set up here, and changed only here. builder: built in Automations, and changed there. */
832
+ managedBy: "builder" | "inbox";
457
833
  } | null;
458
- /** Turned off in the agent's Channels page while its workflow keeps it, which answers again once on. */
834
+ /** Turned off for its agent while its workflow keeps it, which answers again once turned on for everyone. */
459
835
  turnedOff: boolean;
460
836
  /** everyone, or only testers who sent testerCode. */
461
837
  audience: "testers" | "everyone";
@@ -483,8 +859,10 @@ export interface InboxTemplate {
483
859
  export interface InboxSettings {
484
860
  agent: {
485
861
  kind: "own";
862
+ /** What it's called, by the team in the Inbox and by customers, whom it introduces itself to by this name. */
863
+ name: string;
486
864
  instructions: string;
487
- /** The model it runs on; null follows the workspace's default model. */
865
+ /** The model it runs on; null runs on the workflow default model. */
488
866
  model: string | null;
489
867
  /** The connected accounts it may act through while it talks, such as a calendar. */
490
868
  connections: Array<{
@@ -540,9 +918,9 @@ export interface InboxAccountSettings {
540
918
  /** The account's workflow, which these settings change. */
541
919
  workflowID: string;
542
920
  revision: number;
543
- /** Why only the workflow builder can change them now: unpublished_changes waiting there, or builder for a conversation made into something the Inbox doesn't edit. Null while the Inbox can. */
544
- locked: "unpublished_changes" | "builder" | null;
545
- /** Null where the builder made the conversation into something else. */
921
+ /** builder: the account's AI was built in Automations, so it changes there. Null where it changes here. */
922
+ locked: "builder" | null;
923
+ /** Null where the AI was built in Automations. */
546
924
  settings: InboxSettings | null;
547
925
  /** Later steps read what it finds out, so only the workflow builder changes records. */
548
926
  recordsLocked: boolean;
@@ -560,6 +938,51 @@ export interface InboxAgentUpdate {
560
938
  reason: string | null;
561
939
  }>;
562
940
  }
941
+ export interface Agent {
942
+ id: string;
943
+ name: string;
944
+ description?: string;
945
+ /** primary answers chats and the Inbox; subagent works only on tasks another agent gives it; all does both. A Run Agent step runs any. */
946
+ mode: "subagent" | "primary" | "all";
947
+ /** The revision a Run Agent step runs: the one active when its workflow is published. */
948
+ revision: {
949
+ kind: "active_at_publish";
950
+ };
951
+ /** Goes up by one each time its settings change. */
952
+ version: number;
953
+ /** Comes with every workspace, so it can't be deleted or published. */
954
+ native: boolean;
955
+ /** Whether it is the workspace's own agent, which every workspace has. */
956
+ default: boolean;
957
+ /** The built-in specialist it is. */
958
+ specialist?: "workflow" | "agent" | "website" | "social" | "content" | "ads" | "research" | "analytics";
959
+ imageURL?: string;
960
+ /** What it is told to do, on every turn. */
961
+ instructions?: string;
962
+ /** The model it runs on, as provider/model. */
963
+ model: string;
964
+ /** The model's reasoning variant, where the model has them. */
965
+ variant?: string;
966
+ /** The built-in tools it may call. A connected account's come with it. */
967
+ tools: Array<string>;
968
+ /** Whether it works on its own computer, with a shell, files and a browser. */
969
+ computer: boolean;
970
+ /** What in the workspace it may change: build (agents and skills), connect (accounts and their permissions), operate (schedules, triggers, workflows, receptionists and social posts). */
971
+ managementGroups: Array<"build" | "connect" | "operate">;
972
+ /** What it remembers between chats, in Markdown. */
973
+ memoryMd: string;
974
+ /** The most steps it takes in one turn. */
975
+ steps?: number;
976
+ temperature?: number;
977
+ topP?: number;
978
+ topK?: number;
979
+ maxOutputTokens?: number;
980
+ reasoningBudgetTokens?: number;
981
+ disableParallelToolUse?: boolean;
982
+ }
983
+ export interface AgentList {
984
+ agents: Array<Agent>;
985
+ }
563
986
  export type WorkflowValueV4 = {
564
987
  kind: "literal";
565
988
  value: WorkflowJsonV4;
@@ -884,7 +1307,7 @@ export interface WorkflowCatalogResponse {
884
1307
  conversationOwnAgentsActive: true;
885
1308
  conversationChannels: Array<{
886
1309
  appID: string;
887
- channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger";
1310
+ channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger" | "telegram.business";
888
1311
  title: string;
889
1312
  incomingStart: boolean;
890
1313
  accountScoped: boolean;
@@ -953,6 +1376,17 @@ export interface WorkflowCatalogResponse {
953
1376
  days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
954
1377
  };
955
1378
  };
1379
+ } | {
1380
+ kind: "telegram";
1381
+ remindersAuthorized: boolean;
1382
+ sendingHours?: {
1383
+ timeZone: WorkflowValueV4;
1384
+ window: {
1385
+ startMinute: number;
1386
+ endMinute: number;
1387
+ days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
1388
+ };
1389
+ };
956
1390
  };
957
1391
  maxDurationMs: number;
958
1392
  }>;
@@ -1726,7 +2160,328 @@ export interface WorkflowDefinitionV13 {
1726
2160
  template: WorkflowValueV4;
1727
2161
  optInConfirmed: boolean;
1728
2162
  };
1729
- agentID: string;
2163
+ agentID: string;
2164
+ instructions: WorkflowValueV4;
2165
+ context: WorkflowValueV4;
2166
+ resultSchema: {
2167
+ $schema: "https://json-schema.org/draft/2020-12/schema";
2168
+ type: "object";
2169
+ [key: string]: unknown;
2170
+ };
2171
+ replyTimeoutMs: number;
2172
+ maxDurationMs: number;
2173
+ maxRemindersTotal: number;
2174
+ businessDeadlineAt: WorkflowValueV4 | null;
2175
+ reminders: Array<{
2176
+ afterMs: number;
2177
+ text: WorkflowValueV4;
2178
+ }>;
2179
+ sendPolicy: {
2180
+ kind: "sms";
2181
+ consentPurpose: WorkflowValueV4;
2182
+ recipientTimeZone: WorkflowValueV4;
2183
+ sendingWindow: {
2184
+ startMinute: number;
2185
+ endMinute: number;
2186
+ };
2187
+ remindersAuthorized: boolean;
2188
+ } | {
2189
+ kind: "whatsapp";
2190
+ remindersAuthorized: boolean;
2191
+ } | {
2192
+ kind: "instagram";
2193
+ remindersAuthorized: boolean;
2194
+ } | {
2195
+ kind: "gmail";
2196
+ remindersAuthorized: boolean;
2197
+ };
2198
+ revision: {
2199
+ kind: "active_at_publish";
2200
+ } | {
2201
+ kind: "exact";
2202
+ revision: number;
2203
+ };
2204
+ } | {
2205
+ id: string;
2206
+ label: string;
2207
+ kind: "voice_call";
2208
+ receptionistID: string;
2209
+ to: WorkflowValue;
2210
+ dynamicVariables: WorkflowValue;
2211
+ } | {
2212
+ id: string;
2213
+ label: string;
2214
+ kind: "child_workflow";
2215
+ workflowID: string;
2216
+ version: {
2217
+ kind: "active_at_publish";
2218
+ } | {
2219
+ kind: "exact";
2220
+ workflowVersionID: string;
2221
+ };
2222
+ input: WorkflowValue;
2223
+ } | {
2224
+ id: string;
2225
+ label: string;
2226
+ kind: "for_each";
2227
+ items: WorkflowValue;
2228
+ workflowID: string;
2229
+ version: {
2230
+ kind: "active_at_publish";
2231
+ } | {
2232
+ kind: "exact";
2233
+ workflowVersionID: string;
2234
+ };
2235
+ input: WorkflowValue;
2236
+ maxConcurrency: number;
2237
+ failurePolicy: "fail_fast" | "collect";
2238
+ } | {
2239
+ id: string;
2240
+ label: string;
2241
+ kind: "wait_for_all";
2242
+ } | {
2243
+ id: string;
2244
+ label: string;
2245
+ kind: "rejoin";
2246
+ } | {
2247
+ id: string;
2248
+ label: string;
2249
+ kind: "finish";
2250
+ completion: {
2251
+ kind: "succeeded";
2252
+ result: WorkflowValue | null;
2253
+ } | {
2254
+ kind: "failed";
2255
+ message: WorkflowValue;
2256
+ };
2257
+ }>;
2258
+ transitions: Array<{
2259
+ id: string;
2260
+ sourceNodeID: string;
2261
+ sourcePort: string;
2262
+ targetNodeID: string;
2263
+ }>;
2264
+ };
2265
+ }
2266
+ export interface WorkflowDefinitionV14 {
2267
+ definitionVersion: 14;
2268
+ interface: {
2269
+ interfaceVersion: 2;
2270
+ input: {
2271
+ kind: "none";
2272
+ } | {
2273
+ kind: "fields";
2274
+ schema: WorkflowContractJson;
2275
+ };
2276
+ result: {
2277
+ kind: "none";
2278
+ } | {
2279
+ kind: "text";
2280
+ } | {
2281
+ kind: "fields";
2282
+ schema: WorkflowContractJson;
2283
+ };
2284
+ };
2285
+ resources: Array<{
2286
+ id: string;
2287
+ appID: string;
2288
+ }>;
2289
+ trigger: {
2290
+ id: string;
2291
+ kind: "incoming_message";
2292
+ channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox";
2293
+ resourceIDs: Array<string>;
2294
+ } | {
2295
+ id: string;
2296
+ kind: "manual";
2297
+ } | {
2298
+ id: string;
2299
+ kind: "integration";
2300
+ appID: string;
2301
+ triggerID: string;
2302
+ triggerVersion: number;
2303
+ schemaVersion: number;
2304
+ resourceID: string | null;
2305
+ config: {
2306
+ [key: string]: WorkflowJson;
2307
+ };
2308
+ ingestConfig: {
2309
+ [key: string]: WorkflowJson;
2310
+ };
2311
+ };
2312
+ graph: {
2313
+ nodes: Array<{
2314
+ id: string;
2315
+ label: string;
2316
+ kind: "action";
2317
+ appID: string;
2318
+ actionID: string;
2319
+ actionVersion: number;
2320
+ resourceID: string | null;
2321
+ input: WorkflowValue;
2322
+ output: {
2323
+ kind: "action";
2324
+ } | {
2325
+ kind: "selected_fields";
2326
+ fields: Array<{
2327
+ name: string;
2328
+ pointer: string;
2329
+ type: "string" | "number" | "integer" | "boolean" | "object" | "array";
2330
+ missing: "fail" | "null";
2331
+ }>;
2332
+ };
2333
+ attemptTimeoutMs: number;
2334
+ totalTimeoutMs: number;
2335
+ } | {
2336
+ id: string;
2337
+ label: string;
2338
+ kind: "transform";
2339
+ output: WorkflowValue;
2340
+ } | {
2341
+ id: string;
2342
+ label: string;
2343
+ kind: "branch";
2344
+ cases: Array<{
2345
+ id: string;
2346
+ label: string;
2347
+ port: string;
2348
+ predicate: WorkflowPredicate;
2349
+ }>;
2350
+ defaultPort: string;
2351
+ } | {
2352
+ id: string;
2353
+ label: string;
2354
+ kind: "delay";
2355
+ until: {
2356
+ kind: "duration";
2357
+ milliseconds: number;
2358
+ } | {
2359
+ kind: "timestamp";
2360
+ value: WorkflowValue;
2361
+ };
2362
+ } | {
2363
+ id: string;
2364
+ label: string;
2365
+ kind: "wait_for_signal";
2366
+ timeoutMs: number | null;
2367
+ } | {
2368
+ id: string;
2369
+ label: string;
2370
+ kind: "wait_for_event";
2371
+ sourceActionNodeID: string;
2372
+ eventID: string;
2373
+ timeoutMs: number;
2374
+ } | {
2375
+ id: string;
2376
+ label: string;
2377
+ kind: "human_task";
2378
+ title: WorkflowValue;
2379
+ instructions: WorkflowValue;
2380
+ response: {
2381
+ kind: "approval";
2382
+ } | {
2383
+ kind: "form";
2384
+ fields: Array<{
2385
+ key: string;
2386
+ label: string;
2387
+ description: string | null;
2388
+ type: "text" | "long_text" | "number" | "boolean" | "choice" | "date";
2389
+ required: boolean;
2390
+ options?: Array<string>;
2391
+ }>;
2392
+ };
2393
+ timeoutMs: number | null;
2394
+ } | {
2395
+ id: string;
2396
+ label: string;
2397
+ kind: "run_agent";
2398
+ agent: {
2399
+ kind: "workspace";
2400
+ agentID: string;
2401
+ revision: {
2402
+ kind: "active_at_publish";
2403
+ } | {
2404
+ kind: "exact";
2405
+ revision: number;
2406
+ };
2407
+ actionAccess: "agent_default" | "full";
2408
+ } | {
2409
+ kind: "workflow";
2410
+ instructions: string;
2411
+ model: {
2412
+ kind: "default";
2413
+ } | {
2414
+ kind: "exact";
2415
+ modelID: string;
2416
+ };
2417
+ settings: {
2418
+ variant?: string;
2419
+ steps?: number;
2420
+ temperature?: number;
2421
+ topP?: number;
2422
+ topK?: number;
2423
+ maxOutputTokens?: number;
2424
+ reasoningBudgetTokens?: number;
2425
+ disableParallelToolUse?: boolean;
2426
+ };
2427
+ computer: boolean;
2428
+ tools: Array<string>;
2429
+ skillIDs: Array<string>;
2430
+ integrations: Array<{
2431
+ resourceID: string;
2432
+ tools: {
2433
+ kind: "all";
2434
+ } | {
2435
+ kind: "selected";
2436
+ toolIDs: Array<string>;
2437
+ };
2438
+ }>;
2439
+ actionAccess: "agent_default" | "full";
2440
+ };
2441
+ prompt: WorkflowValue;
2442
+ output: {
2443
+ kind: "text";
2444
+ } | {
2445
+ kind: "fields";
2446
+ schema: WorkflowContractJson;
2447
+ };
2448
+ timeoutMs: number;
2449
+ } | {
2450
+ id: string;
2451
+ label: string;
2452
+ kind: "conversation_goal";
2453
+ target: {
2454
+ kind: "existing";
2455
+ conversation: WorkflowValueV4;
2456
+ } | {
2457
+ kind: "sms";
2458
+ channelID: string;
2459
+ recipient: WorkflowValueV4;
2460
+ } | {
2461
+ kind: "whatsapp";
2462
+ channelID: string;
2463
+ recipientUserID: WorkflowValueV4;
2464
+ } | {
2465
+ kind: "instagram";
2466
+ channelID: string;
2467
+ conversationID: WorkflowValueV4;
2468
+ } | {
2469
+ kind: "gmail";
2470
+ channelID: string;
2471
+ recipient: WorkflowValueV4;
2472
+ subject: WorkflowValueV4;
2473
+ };
2474
+ initiation: {
2475
+ kind: "inbound";
2476
+ entry: WorkflowValueV4;
2477
+ } | {
2478
+ kind: "proactive";
2479
+ opening: WorkflowValueV4;
2480
+ } | {
2481
+ kind: "whatsapp_template";
2482
+ template: WorkflowValueV4;
2483
+ optInConfirmed: boolean;
2484
+ };
1730
2485
  instructions: WorkflowValueV4;
1731
2486
  context: WorkflowValueV4;
1732
2487
  resultSchema: {
@@ -1761,11 +2516,43 @@ export interface WorkflowDefinitionV13 {
1761
2516
  kind: "gmail";
1762
2517
  remindersAuthorized: boolean;
1763
2518
  };
1764
- revision: {
1765
- kind: "active_at_publish";
2519
+ agent: {
2520
+ kind: "workspace";
2521
+ agentID: string;
2522
+ revision: {
2523
+ kind: "active_at_publish";
2524
+ } | {
2525
+ kind: "exact";
2526
+ revision: number;
2527
+ };
1766
2528
  } | {
1767
- kind: "exact";
1768
- revision: number;
2529
+ kind: "workflow";
2530
+ instructions: string;
2531
+ model: {
2532
+ kind: "default";
2533
+ } | {
2534
+ kind: "exact";
2535
+ modelID: string;
2536
+ };
2537
+ settings: {
2538
+ variant?: string;
2539
+ steps?: number;
2540
+ temperature?: number;
2541
+ topP?: number;
2542
+ topK?: number;
2543
+ maxOutputTokens?: number;
2544
+ reasoningBudgetTokens?: number;
2545
+ disableParallelToolUse?: boolean;
2546
+ };
2547
+ integrations: Array<{
2548
+ resourceID: string;
2549
+ tools: {
2550
+ kind: "all";
2551
+ } | {
2552
+ kind: "selected";
2553
+ toolIDs: Array<string>;
2554
+ };
2555
+ }>;
1769
2556
  };
1770
2557
  } | {
1771
2558
  id: string;
@@ -1829,8 +2616,8 @@ export interface WorkflowDefinitionV13 {
1829
2616
  }>;
1830
2617
  };
1831
2618
  }
1832
- export interface WorkflowDefinitionV14 {
1833
- definitionVersion: 14;
2619
+ export interface WorkflowDefinitionV15 {
2620
+ definitionVersion: 15;
1834
2621
  interface: {
1835
2622
  interfaceVersion: 2;
1836
2623
  input: {
@@ -1855,7 +2642,7 @@ export interface WorkflowDefinitionV14 {
1855
2642
  trigger: {
1856
2643
  id: string;
1857
2644
  kind: "incoming_message";
1858
- channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox";
2645
+ channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat";
1859
2646
  resourceIDs: Array<string>;
1860
2647
  } | {
1861
2648
  id: string;
@@ -2081,6 +2868,9 @@ export interface WorkflowDefinitionV14 {
2081
2868
  } | {
2082
2869
  kind: "gmail";
2083
2870
  remindersAuthorized: boolean;
2871
+ } | {
2872
+ kind: "website";
2873
+ remindersAuthorized: boolean;
2084
2874
  };
2085
2875
  agent: {
2086
2876
  kind: "workspace";
@@ -2182,8 +2972,8 @@ export interface WorkflowDefinitionV14 {
2182
2972
  }>;
2183
2973
  };
2184
2974
  }
2185
- export interface WorkflowDefinitionV15 {
2186
- definitionVersion: 15;
2975
+ export interface WorkflowDefinitionV16 {
2976
+ definitionVersion: 16;
2187
2977
  interface: {
2188
2978
  interfaceVersion: 2;
2189
2979
  input: {
@@ -2208,7 +2998,7 @@ export interface WorkflowDefinitionV15 {
2208
2998
  trigger: {
2209
2999
  id: string;
2210
3000
  kind: "incoming_message";
2211
- channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat";
3001
+ channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger";
2212
3002
  resourceIDs: Array<string>;
2213
3003
  } | {
2214
3004
  id: string;
@@ -2437,6 +3227,9 @@ export interface WorkflowDefinitionV15 {
2437
3227
  } | {
2438
3228
  kind: "website";
2439
3229
  remindersAuthorized: boolean;
3230
+ } | {
3231
+ kind: "messenger";
3232
+ remindersAuthorized: boolean;
2440
3233
  };
2441
3234
  agent: {
2442
3235
  kind: "workspace";
@@ -2538,8 +3331,8 @@ export interface WorkflowDefinitionV15 {
2538
3331
  }>;
2539
3332
  };
2540
3333
  }
2541
- export interface WorkflowDefinitionV16 {
2542
- definitionVersion: 16;
3334
+ export interface WorkflowDefinitionV17 {
3335
+ definitionVersion: 17;
2543
3336
  interface: {
2544
3337
  interfaceVersion: 2;
2545
3338
  input: {
@@ -2779,23 +3572,64 @@ export interface WorkflowDefinitionV16 {
2779
3572
  sendingWindow: {
2780
3573
  startMinute: number;
2781
3574
  endMinute: number;
3575
+ days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
2782
3576
  };
2783
3577
  remindersAuthorized: boolean;
2784
3578
  } | {
2785
3579
  kind: "whatsapp";
2786
3580
  remindersAuthorized: boolean;
3581
+ sendingHours?: {
3582
+ timeZone: WorkflowValueV4;
3583
+ window: {
3584
+ startMinute: number;
3585
+ endMinute: number;
3586
+ days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
3587
+ };
3588
+ };
2787
3589
  } | {
2788
3590
  kind: "instagram";
2789
3591
  remindersAuthorized: boolean;
3592
+ sendingHours?: {
3593
+ timeZone: WorkflowValueV4;
3594
+ window: {
3595
+ startMinute: number;
3596
+ endMinute: number;
3597
+ days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
3598
+ };
3599
+ };
2790
3600
  } | {
2791
3601
  kind: "gmail";
2792
3602
  remindersAuthorized: boolean;
3603
+ sendingHours?: {
3604
+ timeZone: WorkflowValueV4;
3605
+ window: {
3606
+ startMinute: number;
3607
+ endMinute: number;
3608
+ days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
3609
+ };
3610
+ };
2793
3611
  } | {
2794
3612
  kind: "website";
2795
3613
  remindersAuthorized: boolean;
3614
+ sendingHours?: {
3615
+ timeZone: WorkflowValueV4;
3616
+ window: {
3617
+ startMinute: number;
3618
+ endMinute: number;
3619
+ days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
3620
+ };
3621
+ };
2796
3622
  } | {
2797
3623
  kind: "messenger";
2798
3624
  remindersAuthorized: boolean;
3625
+ sendingHours?: {
3626
+ timeZone: WorkflowValueV4;
3627
+ window: {
3628
+ startMinute: number;
3629
+ endMinute: number;
3630
+ days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
3631
+ };
3632
+ };
2799
3633
  };
2800
3634
  agent: {
2801
3635
  kind: "workspace";
@@ -2898,7 +3732,7 @@ export interface WorkflowDefinitionV16 {
2898
3732
  };
2899
3733
  }
2900
3734
  export interface WorkflowDefinition {
2901
- definitionVersion: 17;
3735
+ definitionVersion: 18;
2902
3736
  interface: {
2903
3737
  interfaceVersion: 2;
2904
3738
  input: {
@@ -2923,7 +3757,7 @@ export interface WorkflowDefinition {
2923
3757
  trigger: {
2924
3758
  id: string;
2925
3759
  kind: "incoming_message";
2926
- channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger";
3760
+ channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger" | "telegram.business";
2927
3761
  resourceIDs: Array<string>;
2928
3762
  } | {
2929
3763
  id: string;
@@ -3196,6 +4030,17 @@ export interface WorkflowDefinition {
3196
4030
  days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
3197
4031
  };
3198
4032
  };
4033
+ } | {
4034
+ kind: "telegram";
4035
+ remindersAuthorized: boolean;
4036
+ sendingHours?: {
4037
+ timeZone: WorkflowValueV4;
4038
+ window: {
4039
+ startMinute: number;
4040
+ endMinute: number;
4041
+ days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
4042
+ };
4043
+ };
3199
4044
  };
3200
4045
  agent: {
3201
4046
  kind: "workspace";
@@ -3311,16 +4156,6 @@ export interface WorkflowLayout {
3311
4156
  zoom: number;
3312
4157
  };
3313
4158
  }
3314
- export interface WorkflowAgentsResponse {
3315
- agents: Array<{
3316
- id: string;
3317
- name: string;
3318
- description?: string;
3319
- revision: {
3320
- kind: "active_at_publish";
3321
- };
3322
- }>;
3323
- }
3324
4159
  export type WorkflowFailureAlertDestination = {
3325
4160
  id: string;
3326
4161
  installationID: string;
@@ -4030,7 +4865,7 @@ export type WorkflowDraftDefinitionResponse = WorkflowDefinitionV5 | WorkflowDef
4030
4865
  targetNodeID: string;
4031
4866
  }>;
4032
4867
  };
4033
- } | WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinition;
4868
+ } | WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinitionV17 | WorkflowDefinition;
4034
4869
  export interface WorkflowDefinitionV5 {
4035
4870
  definitionVersion: 5;
4036
4871
  interface: WorkflowInterfaceV1;
@@ -4816,7 +5651,7 @@ export interface WorkflowAccount {
4816
5651
  /** Which of the connection's accounts it is, where each is an inbox of its own, such as a Facebook Page. */
4817
5652
  providerAccountID: string | null;
4818
5653
  label: string;
4819
- /** The account is turned off under Channels in the Superclerk app, which the API can't change yet; the workflow resumes there when it is on. */
5654
+ /** The account is turned off for its agent in the Superclerk app's Inbox, which the API can't change yet; the workflow resumes there once it is turned on for everyone. */
4820
5655
  turnedOff: boolean;
4821
5656
  }
4822
5657
  export type WorkflowWebhookSetup = {
@@ -4904,7 +5739,7 @@ export type WorkflowVersionSnapshot = {
4904
5739
  sourceRevision: number;
4905
5740
  releaseNote: string | null;
4906
5741
  createdAt: number;
4907
- definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinition;
5742
+ definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinitionV17 | WorkflowDefinition;
4908
5743
  layout: WorkflowLayout;
4909
5744
  bindings: Array<{
4910
5745
  resourceID: string;
@@ -4924,7 +5759,7 @@ export type WorkflowVersionSnapshot = {
4924
5759
  sourceRevision: number;
4925
5760
  releaseNote: string | null;
4926
5761
  createdAt: number;
4927
- definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinition;
5762
+ definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinitionV17 | WorkflowDefinition;
4928
5763
  layout: WorkflowLayout;
4929
5764
  bindings: Array<{
4930
5765
  resourceID: string;
@@ -5080,6 +5915,30 @@ export interface TaskCompletedEvent {
5080
5915
  contactID: string;
5081
5916
  };
5082
5917
  }
5918
+ /** The agent waits on an approval or a question in a chat an API key started. */
5919
+ export interface ChatWaitingEvent {
5920
+ id: string;
5921
+ type: "chat.waiting";
5922
+ createdAt: string;
5923
+ data: {
5924
+ chatID: string;
5925
+ agentID: string;
5926
+ };
5927
+ }
5928
+ /** The agent stopped working on a chat an API key started: it answered, failed or was stopped. */
5929
+ export interface ChatIdleEvent {
5930
+ id: string;
5931
+ type: "chat.idle";
5932
+ createdAt: string;
5933
+ data: {
5934
+ chatID: string;
5935
+ agentID: string;
5936
+ /** Why the latest answer ended without one. */
5937
+ error: {
5938
+ code: string;
5939
+ } | null;
5940
+ };
5941
+ }
5083
5942
  export type ConnectLinksCreateParams = {
5084
5943
  /** The app to connect, from GET /v1/apps?connectable=true. */
5085
5944
  appID?: string;
@@ -5102,7 +5961,7 @@ export type WebhooksListResponse = {
5102
5961
  };
5103
5962
  export type WebhooksCreateParams = {
5104
5963
  url: string;
5105
- eventTypes: Array<"connect_link.succeeded" | "connect_link.failed" | "connection.updated" | "connection.removed" | "tool_run.completed" | "tool_run.failed" | "conversation.message.received" | "conversation.handed_off" | "contact.created" | "contact.merged" | "opportunity.stage_changed" | "task.completed">;
5964
+ eventTypes: Array<"connect_link.succeeded" | "connect_link.failed" | "connection.updated" | "connection.removed" | "tool_run.completed" | "tool_run.failed" | "conversation.message.received" | "conversation.handed_off" | "contact.created" | "contact.merged" | "opportunity.stage_changed" | "task.completed" | "chat.waiting" | "chat.idle">;
5106
5965
  };
5107
5966
  export interface WebhooksDeliveriesListParams {
5108
5967
  limit?: number;
@@ -5168,7 +6027,7 @@ export type WorkspacesCreateParams = {
5168
6027
  name: string;
5169
6028
  /** Where the client's invoices and payment links go, and its admin's invitation from the Superclerk app. */
5170
6029
  billingEmail: string;
5171
- /** The plan the client pays, its own, in micros (1 USD = 1,000,000, whole cents): priceMicros every 30 days, includedMicros of usage, and topupPriceBps for extra usage. Superclerk's fee is a $49 base plus any includedMicros past $15, and 10% of the rest of the price; what is left must cover Whop's highest card fees, so priceMicros is at least $54.62 while includedMicros is $15 or less, and topupPriceBps at least 12041 (20.41% over cost). Optional: without one, the client has no plan until you set one in Partner → Clients. */
6030
+ /** The plan the client pays, its own, in micros (1 USD = 1,000,000, whole cents): priceMicros every 30 days, includedMicros of usage, and topupPriceBps for extra usage. Superclerk's fee is a $49 base plus any includedMicros past $15, and 10% of the rest of the price; what is left must cover Whop's highest card fees, so priceMicros is at least $54.62 while includedMicros is $15 or less. A topupPriceBps of 10000 sells extra usage at cost. Optional: without one, the client has no plan until you set one in Partner → Clients. */
5172
6031
  plan?: {
5173
6032
  name: string;
5174
6033
  icon: "circle" | "triangle" | "square" | "hexagon" | "star" | "sparkle" | "leaf" | "paper-plane" | "rocket" | "crown" | "diamond" | "heart";
@@ -5456,7 +6315,7 @@ export interface ConnectionsProxyDeleteParams {
5456
6315
  export type SocialAccountsListResponse = {
5457
6316
  accounts: Array<{
5458
6317
  id: string;
5459
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6318
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
5460
6319
  nativeId: string;
5461
6320
  /** The connection, as the Connections API names it; null until a new connection finishes setting up. */
5462
6321
  connectionID: string | null;
@@ -5553,7 +6412,7 @@ export type SocialAccountsTiktokVideosResponse = {
5553
6412
  };
5554
6413
  export type SocialAccountsDisconnectResponse = {
5555
6414
  id: string;
5556
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6415
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
5557
6416
  nativeId: string;
5558
6417
  /** The connection, as the Connections API names it; null until a new connection finishes setting up. */
5559
6418
  connectionID: string | null;
@@ -5686,7 +6545,7 @@ export type SocialPostsListResponse = {
5686
6545
  cancelledAt: number | null;
5687
6546
  platforms: Array<{
5688
6547
  id: string;
5689
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6548
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
5690
6549
  accountId: string;
5691
6550
  accountLabel: string;
5692
6551
  customContent: string | null;
@@ -5731,6 +6590,20 @@ export type SocialPostsCreateParams = {
5731
6590
  altText?: string;
5732
6591
  }>;
5733
6592
  platforms: Array<{
6593
+ accountId: string;
6594
+ customContent?: string;
6595
+ mediaItems?: Array<{
6596
+ assetId: string;
6597
+ altText?: string;
6598
+ }>;
6599
+ platform: "x";
6600
+ platformSpecificData: {
6601
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
6602
+ community?: string;
6603
+ isAiGenerated?: boolean;
6604
+ paidPartnership?: boolean;
6605
+ };
6606
+ } | {
5734
6607
  accountId: string;
5735
6608
  customContent?: string;
5736
6609
  mediaItems?: Array<{
@@ -5740,7 +6613,10 @@ export type SocialPostsCreateParams = {
5740
6613
  platform: "instagram";
5741
6614
  platformSpecificData: {
5742
6615
  format: "post" | "reel" | "story";
6616
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
5743
6617
  thumbOffsetMs?: number;
6618
+ /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
6619
+ trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
5744
6620
  };
5745
6621
  } | {
5746
6622
  accountId: string;
@@ -5812,6 +6688,8 @@ export type SocialPostsCreateParams = {
5812
6688
  format: "video";
5813
6689
  allowDuet: boolean;
5814
6690
  allowStitch: boolean;
6691
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
6692
+ videoCoverTimestampMs?: number;
5815
6693
  } | {
5816
6694
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
5817
6695
  creatorInfoFingerprint: string;
@@ -5953,6 +6831,20 @@ export type SocialPostsCreateParams = {
5953
6831
  altText?: string;
5954
6832
  }>;
5955
6833
  platforms: Array<{
6834
+ accountId: string;
6835
+ customContent?: string;
6836
+ mediaItems?: Array<{
6837
+ assetId: string;
6838
+ altText?: string;
6839
+ }>;
6840
+ platform: "x";
6841
+ platformSpecificData: {
6842
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
6843
+ community?: string;
6844
+ isAiGenerated?: boolean;
6845
+ paidPartnership?: boolean;
6846
+ };
6847
+ } | {
5956
6848
  accountId: string;
5957
6849
  customContent?: string;
5958
6850
  mediaItems?: Array<{
@@ -5962,7 +6854,10 @@ export type SocialPostsCreateParams = {
5962
6854
  platform: "instagram";
5963
6855
  platformSpecificData: {
5964
6856
  format: "post" | "reel" | "story";
6857
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
5965
6858
  thumbOffsetMs?: number;
6859
+ /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
6860
+ trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
5966
6861
  };
5967
6862
  } | {
5968
6863
  accountId: string;
@@ -6034,6 +6929,8 @@ export type SocialPostsCreateParams = {
6034
6929
  format: "video";
6035
6930
  allowDuet: boolean;
6036
6931
  allowStitch: boolean;
6932
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
6933
+ videoCoverTimestampMs?: number;
6037
6934
  } | {
6038
6935
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
6039
6936
  creatorInfoFingerprint: string;
@@ -6174,6 +7071,20 @@ export type SocialPostsCreateParams = {
6174
7071
  altText?: string;
6175
7072
  }>;
6176
7073
  platforms: Array<{
7074
+ accountId: string;
7075
+ customContent?: string;
7076
+ mediaItems?: Array<{
7077
+ assetId: string;
7078
+ altText?: string;
7079
+ }>;
7080
+ platform: "x";
7081
+ platformSpecificData: {
7082
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
7083
+ community?: string;
7084
+ isAiGenerated?: boolean;
7085
+ paidPartnership?: boolean;
7086
+ };
7087
+ } | {
6177
7088
  accountId: string;
6178
7089
  customContent?: string;
6179
7090
  mediaItems?: Array<{
@@ -6183,7 +7094,10 @@ export type SocialPostsCreateParams = {
6183
7094
  platform: "instagram";
6184
7095
  platformSpecificData: {
6185
7096
  format: "post" | "reel" | "story";
7097
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
6186
7098
  thumbOffsetMs?: number;
7099
+ /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
7100
+ trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
6187
7101
  };
6188
7102
  } | {
6189
7103
  accountId: string;
@@ -6255,6 +7169,8 @@ export type SocialPostsCreateParams = {
6255
7169
  format: "video";
6256
7170
  allowDuet: boolean;
6257
7171
  allowStitch: boolean;
7172
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
7173
+ videoCoverTimestampMs?: number;
6258
7174
  } | {
6259
7175
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
6260
7176
  creatorInfoFingerprint: string;
@@ -6418,7 +7334,7 @@ export type SocialPostsCreateResponse = {
6418
7334
  cancelledAt: number | null;
6419
7335
  platforms: Array<{
6420
7336
  id: string;
6421
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
7337
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6422
7338
  accountId: string;
6423
7339
  accountLabel: string;
6424
7340
  customContent: string | null;
@@ -6483,7 +7399,7 @@ export type SocialPostsGetResponse = {
6483
7399
  cancelledAt: number | null;
6484
7400
  platforms: Array<{
6485
7401
  id: string;
6486
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
7402
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
6487
7403
  accountId: string;
6488
7404
  accountLabel: string;
6489
7405
  customContent: string | null;
@@ -6526,6 +7442,20 @@ export type SocialPostsUpdateParams = {
6526
7442
  altText?: string;
6527
7443
  }>;
6528
7444
  platforms: Array<{
7445
+ accountId: string;
7446
+ customContent?: string;
7447
+ mediaItems?: Array<{
7448
+ assetId: string;
7449
+ altText?: string;
7450
+ }>;
7451
+ platform: "x";
7452
+ platformSpecificData: {
7453
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
7454
+ community?: string;
7455
+ isAiGenerated?: boolean;
7456
+ paidPartnership?: boolean;
7457
+ };
7458
+ } | {
6529
7459
  accountId: string;
6530
7460
  customContent?: string;
6531
7461
  mediaItems?: Array<{
@@ -6535,7 +7465,10 @@ export type SocialPostsUpdateParams = {
6535
7465
  platform: "instagram";
6536
7466
  platformSpecificData: {
6537
7467
  format: "post" | "reel" | "story";
7468
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
6538
7469
  thumbOffsetMs?: number;
7470
+ /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
7471
+ trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
6539
7472
  };
6540
7473
  } | {
6541
7474
  accountId: string;
@@ -6607,6 +7540,8 @@ export type SocialPostsUpdateParams = {
6607
7540
  format: "video";
6608
7541
  allowDuet: boolean;
6609
7542
  allowStitch: boolean;
7543
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
7544
+ videoCoverTimestampMs?: number;
6610
7545
  } | {
6611
7546
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
6612
7547
  creatorInfoFingerprint: string;
@@ -6747,6 +7682,20 @@ export type SocialPostsUpdateParams = {
6747
7682
  altText?: string;
6748
7683
  }>;
6749
7684
  platforms: Array<{
7685
+ accountId: string;
7686
+ customContent?: string;
7687
+ mediaItems?: Array<{
7688
+ assetId: string;
7689
+ altText?: string;
7690
+ }>;
7691
+ platform: "x";
7692
+ platformSpecificData: {
7693
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
7694
+ community?: string;
7695
+ isAiGenerated?: boolean;
7696
+ paidPartnership?: boolean;
7697
+ };
7698
+ } | {
6750
7699
  accountId: string;
6751
7700
  customContent?: string;
6752
7701
  mediaItems?: Array<{
@@ -6756,7 +7705,10 @@ export type SocialPostsUpdateParams = {
6756
7705
  platform: "instagram";
6757
7706
  platformSpecificData: {
6758
7707
  format: "post" | "reel" | "story";
7708
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
6759
7709
  thumbOffsetMs?: number;
7710
+ /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
7711
+ trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
6760
7712
  };
6761
7713
  } | {
6762
7714
  accountId: string;
@@ -6828,6 +7780,8 @@ export type SocialPostsUpdateParams = {
6828
7780
  format: "video";
6829
7781
  allowDuet: boolean;
6830
7782
  allowStitch: boolean;
7783
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
7784
+ videoCoverTimestampMs?: number;
6831
7785
  } | {
6832
7786
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
6833
7787
  creatorInfoFingerprint: string;
@@ -6970,6 +7924,20 @@ export type SocialPostsUpdateParams = {
6970
7924
  altText?: string;
6971
7925
  }>;
6972
7926
  platforms: Array<{
7927
+ accountId: string;
7928
+ customContent?: string;
7929
+ mediaItems?: Array<{
7930
+ assetId: string;
7931
+ altText?: string;
7932
+ }>;
7933
+ platform: "x";
7934
+ platformSpecificData: {
7935
+ replySettings?: "following" | "mentionedUsers" | "subscribers" | "verified";
7936
+ community?: string;
7937
+ isAiGenerated?: boolean;
7938
+ paidPartnership?: boolean;
7939
+ };
7940
+ } | {
6973
7941
  accountId: string;
6974
7942
  customContent?: string;
6975
7943
  mediaItems?: Array<{
@@ -6979,7 +7947,10 @@ export type SocialPostsUpdateParams = {
6979
7947
  platform: "instagram";
6980
7948
  platformSpecificData: {
6981
7949
  format: "post" | "reel" | "story";
7950
+ /** The video frame to use as its cover, in milliseconds. A Reel can take a public JPEG cover instead, after its video in this platform's own mediaItems. */
6982
7951
  thumbOffsetMs?: number;
7952
+ /** Publish as a trial reel, shown to non-followers first. MANUAL: the account shares it with followers in Instagram. SS_PERFORMANCE: Instagram shares it with followers if it performs well. Omit for a normal Reel. */
7953
+ trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
6983
7954
  };
6984
7955
  } | {
6985
7956
  accountId: string;
@@ -7051,6 +8022,8 @@ export type SocialPostsUpdateParams = {
7051
8022
  format: "video";
7052
8023
  allowDuet: boolean;
7053
8024
  allowStitch: boolean;
8025
+ /** The video frame to use as its cover, in milliseconds. TikTok uses the first frame without it. */
8026
+ videoCoverTimestampMs?: number;
7054
8027
  } | {
7055
8028
  /** Exact creatorInfoFingerprint from the latest creator info: the TikTok account's settings from account discovery, or tiktok_get_creator_info. */
7056
8029
  creatorInfoFingerprint: string;
@@ -7215,7 +8188,7 @@ export type SocialPostsUpdateResponse = {
7215
8188
  cancelledAt: number | null;
7216
8189
  platforms: Array<{
7217
8190
  id: string;
7218
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
8191
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
7219
8192
  accountId: string;
7220
8193
  accountLabel: string;
7221
8194
  customContent: string | null;
@@ -7288,7 +8261,7 @@ export type SocialPostsRescheduleResponse = {
7288
8261
  cancelledAt: number | null;
7289
8262
  platforms: Array<{
7290
8263
  id: string;
7291
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
8264
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
7292
8265
  accountId: string;
7293
8266
  accountLabel: string;
7294
8267
  customContent: string | null;
@@ -7356,7 +8329,7 @@ export type SocialPostsCancelResponse = {
7356
8329
  cancelledAt: number | null;
7357
8330
  platforms: Array<{
7358
8331
  id: string;
7359
- platform: "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
8332
+ platform: "x" | "instagram" | "facebook" | "linkedin" | "threads" | "tiktok" | "youtube" | "googlebusiness";
7360
8333
  accountId: string;
7361
8334
  accountLabel: string;
7362
8335
  customContent: string | null;
@@ -7392,6 +8365,79 @@ export type SocialPostsCancelResponse = {
7392
8365
  updatedAt: number;
7393
8366
  }>;
7394
8367
  };
8368
+ export interface ChatsListParams {
8369
+ limit?: number;
8370
+ cursor?: string;
8371
+ agentID?: string;
8372
+ /** Chats whose title holds this, in any letter case. */
8373
+ search?: string;
8374
+ /** pinned puts pinned chats first. */
8375
+ sort?: "updated" | "pinned";
8376
+ /** Only chats with a message. */
8377
+ hasMessages?: "true";
8378
+ }
8379
+ export type ChatsListResponse = {
8380
+ items: Array<Chat>;
8381
+ nextCursor: string | null;
8382
+ };
8383
+ export type ChatsCreateParams = {
8384
+ agentID: string;
8385
+ title?: string;
8386
+ /** Your own keys and values, such as the customer or ticket the chat is for. */
8387
+ metadata?: {
8388
+ [key: string]: string;
8389
+ };
8390
+ /** Start with full access: the agent runs its tools without asking. */
8391
+ access?: "full";
8392
+ };
8393
+ export interface ChatsMessagesListParams {
8394
+ limit?: number;
8395
+ cursor?: string;
8396
+ }
8397
+ export type ChatsMessagesListResponse = {
8398
+ items: Array<ChatMessage>;
8399
+ nextCursor: string | null;
8400
+ };
8401
+ export type ChatsMessagesCreateParams = {
8402
+ /** What the person sends: text, a file the chat stores, or an agent they mention. */
8403
+ parts: Array<{
8404
+ type: "text";
8405
+ text: string;
8406
+ } | {
8407
+ type: "file";
8408
+ fileID: string;
8409
+ } | {
8410
+ type: "agent";
8411
+ name: string;
8412
+ }>;
8413
+ context?: ChatContext;
8414
+ };
8415
+ export interface ChatsMessagesGetParams {
8416
+ chatID: string;
8417
+ }
8418
+ export interface ChatsEventsParams {
8419
+ /** Resume after this event's id. */
8420
+ after?: number;
8421
+ }
8422
+ export type ChatsApprovalsDecideParams = {
8423
+ chatID: string;
8424
+ } & {
8425
+ decision: "approve" | "deny";
8426
+ planDigest?: string;
8427
+ };
8428
+ export type ChatsQuestionsAnswerParams = {
8429
+ chatID: string;
8430
+ } & {
8431
+ /** User answers in question order (each answer contains one or more selected values) */
8432
+ answers: Array<QuestionAnswer>;
8433
+ };
8434
+ export interface ChatsQuestionsDismissParams {
8435
+ chatID: string;
8436
+ }
8437
+ export interface ChatsFilesGetParams {
8438
+ chatID: string;
8439
+ disposition?: "inline" | "attachment";
8440
+ }
7395
8441
  export interface ConversationsListParams {
7396
8442
  limit?: number;
7397
8443
  cursor?: string;
@@ -7926,7 +8972,7 @@ export type WorkflowsTemplatesInstantiateParams = {
7926
8972
  };
7927
8973
  export type WorkflowsTemplatesInstantiateResponse = {
7928
8974
  draft: {
7929
- definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinition;
8975
+ definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinitionV17 | WorkflowDefinition;
7930
8976
  layout: WorkflowLayout;
7931
8977
  bindings: Array<{
7932
8978
  resourceID: string;
@@ -8077,7 +9123,7 @@ export type WorkflowsListResponse = {
8077
9123
  export type WorkflowsCreateParams = {
8078
9124
  name: string;
8079
9125
  initialDraft?: {
8080
- definition: WorkflowDefinition | WorkflowDefinitionV16 | WorkflowDefinitionV15 | WorkflowDefinitionV14 | WorkflowDefinitionV13 | WorkflowDefinitionV11;
9126
+ definition: WorkflowDefinition | WorkflowDefinitionV17 | WorkflowDefinitionV16 | WorkflowDefinitionV15 | WorkflowDefinitionV14 | WorkflowDefinitionV13 | WorkflowDefinitionV11;
8081
9127
  layout: WorkflowLayout;
8082
9128
  bindings: Array<{
8083
9129
  resourceID: string;
@@ -8113,6 +9159,8 @@ export type WorkflowsCreateResponse = {
8113
9159
  createdAt: number;
8114
9160
  updatedAt: number;
8115
9161
  accounts: Array<WorkflowAccount>;
9162
+ /** builder: changed in the builder and through this API. inbox: an account's AI, set up in the Inbox and changed only there (/v1/inbox/accounts); this API reads it but refuses its changes. */
9163
+ managedBy: "builder" | "inbox";
8116
9164
  };
8117
9165
  export type WorkflowsBatchGetParams = {
8118
9166
  workflowIDs: Array<string>;
@@ -8156,6 +9204,8 @@ export type WorkflowsGetResponse = {
8156
9204
  createdAt: number;
8157
9205
  updatedAt: number;
8158
9206
  accounts: Array<WorkflowAccount>;
9207
+ /** builder: changed in the builder and through this API. inbox: an account's AI, set up in the Inbox and changed only there (/v1/inbox/accounts); this API reads it but refuses its changes. */
9208
+ managedBy: "builder" | "inbox";
8159
9209
  };
8160
9210
  export type WorkflowsDraftUpdateParams = {
8161
9211
  layout: WorkflowLayout;
@@ -8166,7 +9216,7 @@ export type WorkflowsDraftUpdateParams = {
8166
9216
  }>;
8167
9217
  expectedRevision: number;
8168
9218
  name: string;
8169
- definition: WorkflowDefinition | WorkflowDefinitionV16 | WorkflowDefinitionV15 | WorkflowDefinitionV14 | WorkflowDefinitionV13 | WorkflowDefinitionV11 | {
9219
+ definition: WorkflowDefinition | WorkflowDefinitionV17 | WorkflowDefinitionV16 | WorkflowDefinitionV15 | WorkflowDefinitionV14 | WorkflowDefinitionV13 | WorkflowDefinitionV11 | {
8170
9220
  definitionVersion: 10;
8171
9221
  interface: {
8172
9222
  interfaceVersion: 2;
@@ -8681,6 +9731,8 @@ export type WorkflowsDraftUpdateResponse = {
8681
9731
  createdAt: number;
8682
9732
  updatedAt: number;
8683
9733
  accounts: Array<WorkflowAccount>;
9734
+ /** builder: changed in the builder and through this API. inbox: an account's AI, set up in the Inbox and changed only there (/v1/inbox/accounts); this API reads it but refuses its changes. */
9735
+ managedBy: "builder" | "inbox";
8684
9736
  };
8685
9737
  export type WorkflowsWebhookGetResponse = WorkflowWebhookSetup | null;
8686
9738
  export type WorkflowsValidateResponse = {
@@ -8818,6 +9870,8 @@ export type WorkflowsArchiveResponse = {
8818
9870
  createdAt: number;
8819
9871
  updatedAt: number;
8820
9872
  accounts: Array<WorkflowAccount>;
9873
+ /** builder: changed in the builder and through this API. inbox: an account's AI, set up in the Inbox and changed only there (/v1/inbox/accounts); this API reads it but refuses its changes. */
9874
+ managedBy: "builder" | "inbox";
8821
9875
  };
8822
9876
  export type WorkflowsPauseResponse = {
8823
9877
  definition: WorkflowDraftDefinitionResponse;
@@ -8846,6 +9900,8 @@ export type WorkflowsPauseResponse = {
8846
9900
  createdAt: number;
8847
9901
  updatedAt: number;
8848
9902
  accounts: Array<WorkflowAccount>;
9903
+ /** builder: changed in the builder and through this API. inbox: an account's AI, set up in the Inbox and changed only there (/v1/inbox/accounts); this API reads it but refuses its changes. */
9904
+ managedBy: "builder" | "inbox";
8849
9905
  };
8850
9906
  export type WorkflowsResumeResponse = {
8851
9907
  definition: WorkflowDraftDefinitionResponse;
@@ -8874,4 +9930,6 @@ export type WorkflowsResumeResponse = {
8874
9930
  createdAt: number;
8875
9931
  updatedAt: number;
8876
9932
  accounts: Array<WorkflowAccount>;
9933
+ /** builder: changed in the builder and through this API. inbox: an account's AI, set up in the Inbox and changed only there (/v1/inbox/accounts); this API reads it but refuses its changes. */
9934
+ managedBy: "builder" | "inbox";
8877
9935
  };