@superclerk/sdk 0.1.1 → 0.2.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.
- package/CHANGELOG.md +26 -0
- package/api.md +32 -4
- package/core/client.js +11 -0
- package/generated/client.d.ts +3 -1
- package/generated/client.js +3 -1
- package/generated/resources.d.ts +134 -16
- package/generated/resources.js +203 -18
- package/generated/tools.d.ts +3977 -210
- package/generated/types.d.ts +1042 -101
- package/generated/version.d.ts +1 -1
- package/generated/version.js +1 -1
- package/generated/webhooks.d.ts +2 -2
- package/lib/chats.d.ts +79 -0
- package/lib/chats.js +122 -0
- package/package.json +2 -2
package/generated/types.d.ts
CHANGED
|
@@ -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,367 @@ 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
|
+
}
|
|
267
|
+
/** The page of the app the person had open, which the agent reads with the message. */
|
|
268
|
+
export type ChatContext = {
|
|
269
|
+
kind: "website";
|
|
270
|
+
label: string;
|
|
271
|
+
id: string;
|
|
272
|
+
editor: {
|
|
273
|
+
revision: number;
|
|
274
|
+
pathname?: string;
|
|
275
|
+
viewport?: {
|
|
276
|
+
width: number;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
} | {
|
|
280
|
+
kind: "workflow";
|
|
281
|
+
label: string;
|
|
282
|
+
id: string;
|
|
283
|
+
};
|
|
284
|
+
export interface ChatAssistantMessage {
|
|
285
|
+
id: string;
|
|
286
|
+
chatID: string;
|
|
287
|
+
createdAt: string;
|
|
288
|
+
deletedAt: string | null;
|
|
289
|
+
/** The message's ID in the app it came in or went out through. */
|
|
290
|
+
providerMessageID: string | null;
|
|
291
|
+
role: "assistant";
|
|
292
|
+
completedAt: string | null;
|
|
293
|
+
/** The message the agent answered: the newest one sent before it started. */
|
|
294
|
+
inReplyTo: string | null;
|
|
295
|
+
error: ChatError | null;
|
|
296
|
+
/** The model tokens the message took so far, cached and reasoning tokens included. */
|
|
297
|
+
usage: {
|
|
298
|
+
inputTokens: number;
|
|
299
|
+
outputTokens: number;
|
|
300
|
+
} | null;
|
|
301
|
+
/** Why the model stopped, such as stop, length or tool-calls. */
|
|
302
|
+
finish: string | null;
|
|
303
|
+
/** Who wrote it when the agent didn't: a teammate, a workflow run, or Superclerk. */
|
|
304
|
+
authoredBy: {
|
|
305
|
+
kind: "operator";
|
|
306
|
+
memberID: string;
|
|
307
|
+
} | {
|
|
308
|
+
kind: "workflow";
|
|
309
|
+
workflowRunID: string;
|
|
310
|
+
} | {
|
|
311
|
+
kind: "automated";
|
|
312
|
+
} | null;
|
|
313
|
+
}
|
|
314
|
+
export type ChatPart = ChatTextPart | ChatReasoningPart | ChatToolPart | ChatFilePart | ChatAgentPart | ChatSubtaskPart | ChatCompactionPart;
|
|
315
|
+
export interface ChatTextPart {
|
|
316
|
+
type: "text";
|
|
317
|
+
id: string;
|
|
318
|
+
chatID: string;
|
|
319
|
+
messageID: string;
|
|
320
|
+
text: string;
|
|
321
|
+
/** Written by Superclerk rather than the person or the agent. */
|
|
322
|
+
synthetic: boolean;
|
|
323
|
+
startedAt: string | null;
|
|
324
|
+
endedAt: string | null;
|
|
325
|
+
/** What the provider said about this text. */
|
|
326
|
+
metadata: {
|
|
327
|
+
[key: string]: unknown;
|
|
328
|
+
} | null;
|
|
329
|
+
}
|
|
330
|
+
export interface ChatReasoningPart {
|
|
331
|
+
type: "reasoning";
|
|
332
|
+
id: string;
|
|
333
|
+
chatID: string;
|
|
334
|
+
messageID: string;
|
|
335
|
+
text: string;
|
|
336
|
+
startedAt: string;
|
|
337
|
+
endedAt: string | null;
|
|
338
|
+
}
|
|
339
|
+
export interface ChatToolPart {
|
|
340
|
+
type: "tool";
|
|
341
|
+
id: string;
|
|
342
|
+
chatID: string;
|
|
343
|
+
messageID: string;
|
|
344
|
+
callID: string;
|
|
345
|
+
tool: string;
|
|
346
|
+
state: ChatToolState;
|
|
347
|
+
}
|
|
348
|
+
export type ChatToolState = {
|
|
349
|
+
status: "pending";
|
|
350
|
+
input: {
|
|
351
|
+
[key: string]: unknown;
|
|
352
|
+
};
|
|
353
|
+
} | {
|
|
354
|
+
status: "running";
|
|
355
|
+
input: {
|
|
356
|
+
[key: string]: unknown;
|
|
357
|
+
};
|
|
358
|
+
title: string | null;
|
|
359
|
+
metadata: {
|
|
360
|
+
[key: string]: unknown;
|
|
361
|
+
} | null;
|
|
362
|
+
startedAt: string;
|
|
363
|
+
} | {
|
|
364
|
+
status: "approval_required";
|
|
365
|
+
input: {
|
|
366
|
+
[key: string]: unknown;
|
|
367
|
+
};
|
|
368
|
+
reason: string;
|
|
369
|
+
title: string | null;
|
|
370
|
+
/** The change in words, for a call whose input is only IDs. */
|
|
371
|
+
fields: Array<{
|
|
372
|
+
label: string;
|
|
373
|
+
value: string;
|
|
374
|
+
}> | null;
|
|
375
|
+
metadata: {
|
|
376
|
+
[key: string]: unknown;
|
|
377
|
+
} | null;
|
|
378
|
+
startedAt: string;
|
|
379
|
+
} | {
|
|
380
|
+
status: "completed";
|
|
381
|
+
input: {
|
|
382
|
+
[key: string]: unknown;
|
|
383
|
+
};
|
|
384
|
+
output: string;
|
|
385
|
+
title: string;
|
|
386
|
+
/** What the tool reported, in its own words. */
|
|
387
|
+
metadata: {
|
|
388
|
+
[key: string]: unknown;
|
|
389
|
+
};
|
|
390
|
+
startedAt: string;
|
|
391
|
+
endedAt: string;
|
|
392
|
+
/** When the output left the agent's context to save room. */
|
|
393
|
+
compactedAt: string | null;
|
|
394
|
+
attachments: Array<ChatFilePart>;
|
|
395
|
+
} | {
|
|
396
|
+
status: "error";
|
|
397
|
+
input: {
|
|
398
|
+
[key: string]: unknown;
|
|
399
|
+
};
|
|
400
|
+
error: string;
|
|
401
|
+
metadata: {
|
|
402
|
+
[key: string]: unknown;
|
|
403
|
+
} | null;
|
|
404
|
+
startedAt: string;
|
|
405
|
+
endedAt: string;
|
|
406
|
+
};
|
|
407
|
+
export interface ChatFilePart {
|
|
408
|
+
type: "file";
|
|
409
|
+
id: string;
|
|
410
|
+
chatID: string;
|
|
411
|
+
messageID: string;
|
|
412
|
+
mime: string;
|
|
413
|
+
filename: string | null;
|
|
414
|
+
/** Where the file reads from; null for a file the chat stores, which fileID names. */
|
|
415
|
+
url: string | null;
|
|
416
|
+
/** The chat's stored file, read with chats.files.get; null when url holds it. */
|
|
417
|
+
fileID: string | null;
|
|
418
|
+
}
|
|
419
|
+
export interface ChatAgentPart {
|
|
420
|
+
type: "agent";
|
|
421
|
+
id: string;
|
|
422
|
+
chatID: string;
|
|
423
|
+
messageID: string;
|
|
424
|
+
name: string;
|
|
425
|
+
}
|
|
426
|
+
export interface ChatSubtaskPart {
|
|
427
|
+
type: "subtask";
|
|
428
|
+
id: string;
|
|
429
|
+
chatID: string;
|
|
430
|
+
messageID: string;
|
|
431
|
+
prompt: string;
|
|
432
|
+
description: string;
|
|
433
|
+
agent: string;
|
|
434
|
+
}
|
|
435
|
+
/** Where the agent summarized the chat so far to make room. */
|
|
436
|
+
export interface ChatCompactionPart {
|
|
437
|
+
type: "compaction";
|
|
438
|
+
id: string;
|
|
439
|
+
chatID: string;
|
|
440
|
+
messageID: string;
|
|
441
|
+
auto: boolean;
|
|
442
|
+
}
|
|
443
|
+
export type ChatStreamEvent = {
|
|
444
|
+
event: "chat";
|
|
445
|
+
data: Chat;
|
|
446
|
+
} | {
|
|
447
|
+
event: "messages";
|
|
448
|
+
data: {
|
|
449
|
+
messages: Array<ChatMessage>;
|
|
450
|
+
};
|
|
451
|
+
} | {
|
|
452
|
+
event: "message";
|
|
453
|
+
data: ChatMessageInfo;
|
|
454
|
+
} | {
|
|
455
|
+
event: "part";
|
|
456
|
+
data: ChatPart;
|
|
457
|
+
} | {
|
|
458
|
+
event: "delta";
|
|
459
|
+
data: {
|
|
460
|
+
messageID: string;
|
|
461
|
+
partID: string;
|
|
462
|
+
text: string;
|
|
463
|
+
};
|
|
464
|
+
} | {
|
|
465
|
+
event: "removed";
|
|
466
|
+
data: {
|
|
467
|
+
messageID: string;
|
|
468
|
+
partID: string | null;
|
|
469
|
+
};
|
|
470
|
+
} | {
|
|
471
|
+
event: "deleted";
|
|
472
|
+
data: {
|
|
473
|
+
chatID: string;
|
|
474
|
+
};
|
|
475
|
+
} | {
|
|
476
|
+
event: "error";
|
|
477
|
+
data: ChatError;
|
|
478
|
+
};
|
|
479
|
+
export type QuestionAnswer = Array<string>;
|
|
480
|
+
export interface ChatFile {
|
|
481
|
+
id: string;
|
|
482
|
+
chatID: string;
|
|
483
|
+
filename: string;
|
|
484
|
+
mime: string;
|
|
485
|
+
sizeBytes: number;
|
|
486
|
+
/** Where the file reads from until expiresAt. */
|
|
487
|
+
url: string;
|
|
488
|
+
expiresAt: string;
|
|
489
|
+
}
|
|
129
490
|
export interface Conversation {
|
|
130
491
|
id: string;
|
|
131
492
|
/** The account the conversation came in on. */
|
|
@@ -454,6 +815,8 @@ export interface InboxAI {
|
|
|
454
815
|
id: string;
|
|
455
816
|
name: string;
|
|
456
817
|
paused: boolean;
|
|
818
|
+
/** inbox: set up here, and changed only here. builder: built in Automations, and changed there. */
|
|
819
|
+
managedBy: "builder" | "inbox";
|
|
457
820
|
} | null;
|
|
458
821
|
/** Turned off in the agent's Channels page while its workflow keeps it, which answers again once on. */
|
|
459
822
|
turnedOff: boolean;
|
|
@@ -484,7 +847,7 @@ export interface InboxSettings {
|
|
|
484
847
|
agent: {
|
|
485
848
|
kind: "own";
|
|
486
849
|
instructions: string;
|
|
487
|
-
/** The model it runs on; null
|
|
850
|
+
/** The model it runs on; null runs on the workflow default model. */
|
|
488
851
|
model: string | null;
|
|
489
852
|
/** The connected accounts it may act through while it talks, such as a calendar. */
|
|
490
853
|
connections: Array<{
|
|
@@ -540,9 +903,9 @@ export interface InboxAccountSettings {
|
|
|
540
903
|
/** The account's workflow, which these settings change. */
|
|
541
904
|
workflowID: string;
|
|
542
905
|
revision: number;
|
|
543
|
-
/**
|
|
544
|
-
locked: "
|
|
545
|
-
/** Null where the
|
|
906
|
+
/** builder: the account's AI was built in Automations, so it changes there. Null where it changes here. */
|
|
907
|
+
locked: "builder" | null;
|
|
908
|
+
/** Null where the AI was built in Automations. */
|
|
546
909
|
settings: InboxSettings | null;
|
|
547
910
|
/** Later steps read what it finds out, so only the workflow builder changes records. */
|
|
548
911
|
recordsLocked: boolean;
|
|
@@ -560,6 +923,51 @@ export interface InboxAgentUpdate {
|
|
|
560
923
|
reason: string | null;
|
|
561
924
|
}>;
|
|
562
925
|
}
|
|
926
|
+
export interface Agent {
|
|
927
|
+
id: string;
|
|
928
|
+
name: string;
|
|
929
|
+
description?: string;
|
|
930
|
+
/** primary answers chats and the Inbox; subagent works only on tasks another agent gives it; all does both. A Run Agent step runs any. */
|
|
931
|
+
mode: "subagent" | "primary" | "all";
|
|
932
|
+
/** The revision a Run Agent step runs: the one active when its workflow is published. */
|
|
933
|
+
revision: {
|
|
934
|
+
kind: "active_at_publish";
|
|
935
|
+
};
|
|
936
|
+
/** Goes up by one each time its settings change. */
|
|
937
|
+
version: number;
|
|
938
|
+
/** Comes with every workspace, so it can't be deleted or published. */
|
|
939
|
+
native: boolean;
|
|
940
|
+
/** Whether it is the workspace's own agent, which every workspace has. */
|
|
941
|
+
default: boolean;
|
|
942
|
+
/** The built-in specialist it is. */
|
|
943
|
+
specialist?: "workflow" | "agent" | "website" | "social" | "content" | "ads" | "research" | "analytics";
|
|
944
|
+
imageURL?: string;
|
|
945
|
+
/** What it is told to do, on every turn. */
|
|
946
|
+
instructions?: string;
|
|
947
|
+
/** The model it runs on, as provider/model. */
|
|
948
|
+
model: string;
|
|
949
|
+
/** The model's reasoning variant, where the model has them. */
|
|
950
|
+
variant?: string;
|
|
951
|
+
/** The built-in tools it may call. A connected account's come with it. */
|
|
952
|
+
tools: Array<string>;
|
|
953
|
+
/** Whether it works on its own computer, with a shell, files and a browser. */
|
|
954
|
+
computer: boolean;
|
|
955
|
+
/** What in the workspace it may change: build (agents and skills), connect (accounts and their permissions), operate (schedules, triggers, workflows, receptionists and social posts). */
|
|
956
|
+
managementGroups: Array<"build" | "connect" | "operate">;
|
|
957
|
+
/** What it remembers between chats, in Markdown. */
|
|
958
|
+
memoryMd: string;
|
|
959
|
+
/** The most steps it takes in one turn. */
|
|
960
|
+
steps?: number;
|
|
961
|
+
temperature?: number;
|
|
962
|
+
topP?: number;
|
|
963
|
+
topK?: number;
|
|
964
|
+
maxOutputTokens?: number;
|
|
965
|
+
reasoningBudgetTokens?: number;
|
|
966
|
+
disableParallelToolUse?: boolean;
|
|
967
|
+
}
|
|
968
|
+
export interface AgentList {
|
|
969
|
+
agents: Array<Agent>;
|
|
970
|
+
}
|
|
563
971
|
export type WorkflowValueV4 = {
|
|
564
972
|
kind: "literal";
|
|
565
973
|
value: WorkflowJsonV4;
|
|
@@ -884,7 +1292,7 @@ export interface WorkflowCatalogResponse {
|
|
|
884
1292
|
conversationOwnAgentsActive: true;
|
|
885
1293
|
conversationChannels: Array<{
|
|
886
1294
|
appID: string;
|
|
887
|
-
channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger";
|
|
1295
|
+
channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger" | "telegram.business";
|
|
888
1296
|
title: string;
|
|
889
1297
|
incomingStart: boolean;
|
|
890
1298
|
accountScoped: boolean;
|
|
@@ -953,6 +1361,17 @@ export interface WorkflowCatalogResponse {
|
|
|
953
1361
|
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
954
1362
|
};
|
|
955
1363
|
};
|
|
1364
|
+
} | {
|
|
1365
|
+
kind: "telegram";
|
|
1366
|
+
remindersAuthorized: boolean;
|
|
1367
|
+
sendingHours?: {
|
|
1368
|
+
timeZone: WorkflowValueV4;
|
|
1369
|
+
window: {
|
|
1370
|
+
startMinute: number;
|
|
1371
|
+
endMinute: number;
|
|
1372
|
+
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
1373
|
+
};
|
|
1374
|
+
};
|
|
956
1375
|
};
|
|
957
1376
|
maxDurationMs: number;
|
|
958
1377
|
}>;
|
|
@@ -1447,68 +1866,390 @@ export type WorkflowValue = {
|
|
|
1447
1866
|
kind: "node";
|
|
1448
1867
|
nodeID: string;
|
|
1449
1868
|
} | {
|
|
1450
|
-
kind: "node_error";
|
|
1451
|
-
nodeID: string;
|
|
1869
|
+
kind: "node_error";
|
|
1870
|
+
nodeID: string;
|
|
1871
|
+
} | {
|
|
1872
|
+
kind: "iteration";
|
|
1873
|
+
field: "item" | "index";
|
|
1874
|
+
};
|
|
1875
|
+
path: Array<string | number>;
|
|
1876
|
+
}>;
|
|
1877
|
+
} | {
|
|
1878
|
+
kind: "coalesce";
|
|
1879
|
+
values: Array<WorkflowValue>;
|
|
1880
|
+
} | {
|
|
1881
|
+
kind: "conditional";
|
|
1882
|
+
predicate: WorkflowPredicate;
|
|
1883
|
+
whenTrue: WorkflowValue;
|
|
1884
|
+
whenFalse: WorkflowValue;
|
|
1885
|
+
} | {
|
|
1886
|
+
kind: "predicate";
|
|
1887
|
+
predicate: WorkflowPredicate;
|
|
1888
|
+
} | {
|
|
1889
|
+
kind: "math";
|
|
1890
|
+
operator: "add" | "subtract" | "multiply" | "divide" | "remainder";
|
|
1891
|
+
left: WorkflowValue;
|
|
1892
|
+
right: WorkflowValue;
|
|
1893
|
+
} | {
|
|
1894
|
+
kind: "text";
|
|
1895
|
+
operator: "trim" | "lowercase" | "uppercase";
|
|
1896
|
+
value: WorkflowValue;
|
|
1897
|
+
} | {
|
|
1898
|
+
kind: "add_duration";
|
|
1899
|
+
timestamp: WorkflowValue;
|
|
1900
|
+
amount: WorkflowValue;
|
|
1901
|
+
unit: "milliseconds" | "seconds" | "minutes" | "hours" | "days";
|
|
1902
|
+
} | {
|
|
1903
|
+
kind: "map";
|
|
1904
|
+
items: WorkflowValue;
|
|
1905
|
+
value: WorkflowValue;
|
|
1906
|
+
} | {
|
|
1907
|
+
kind: "filter";
|
|
1908
|
+
items: WorkflowValue;
|
|
1909
|
+
predicate: WorkflowPredicate;
|
|
1910
|
+
};
|
|
1911
|
+
export type WorkflowPredicate = {
|
|
1912
|
+
kind: "compare";
|
|
1913
|
+
operator: "equals" | "not_equals" | "greater_than" | "greater_than_or_equal" | "less_than" | "less_than_or_equal" | "contains" | "starts_with" | "ends_with" | "in";
|
|
1914
|
+
left: WorkflowValue;
|
|
1915
|
+
right: WorkflowValue;
|
|
1916
|
+
} | {
|
|
1917
|
+
kind: "exists";
|
|
1918
|
+
value: WorkflowValue;
|
|
1919
|
+
} | {
|
|
1920
|
+
kind: "all";
|
|
1921
|
+
predicates: Array<WorkflowPredicate>;
|
|
1922
|
+
} | {
|
|
1923
|
+
kind: "any";
|
|
1924
|
+
predicates: Array<WorkflowPredicate>;
|
|
1925
|
+
} | {
|
|
1926
|
+
kind: "not";
|
|
1927
|
+
predicate: WorkflowPredicate;
|
|
1928
|
+
};
|
|
1929
|
+
export interface WorkflowDefinitionV13 {
|
|
1930
|
+
definitionVersion: 13;
|
|
1931
|
+
interface: {
|
|
1932
|
+
interfaceVersion: 2;
|
|
1933
|
+
input: {
|
|
1934
|
+
kind: "none";
|
|
1935
|
+
} | {
|
|
1936
|
+
kind: "fields";
|
|
1937
|
+
schema: WorkflowContractJson;
|
|
1938
|
+
};
|
|
1939
|
+
result: {
|
|
1940
|
+
kind: "none";
|
|
1941
|
+
} | {
|
|
1942
|
+
kind: "text";
|
|
1943
|
+
} | {
|
|
1944
|
+
kind: "fields";
|
|
1945
|
+
schema: WorkflowContractJson;
|
|
1946
|
+
};
|
|
1947
|
+
};
|
|
1948
|
+
resources: Array<{
|
|
1949
|
+
id: string;
|
|
1950
|
+
appID: string;
|
|
1951
|
+
}>;
|
|
1952
|
+
trigger: {
|
|
1953
|
+
id: string;
|
|
1954
|
+
kind: "incoming_message";
|
|
1955
|
+
channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox";
|
|
1956
|
+
resourceIDs: Array<string>;
|
|
1957
|
+
} | {
|
|
1958
|
+
id: string;
|
|
1959
|
+
kind: "manual";
|
|
1960
|
+
} | {
|
|
1961
|
+
id: string;
|
|
1962
|
+
kind: "integration";
|
|
1963
|
+
appID: string;
|
|
1964
|
+
triggerID: string;
|
|
1965
|
+
triggerVersion: number;
|
|
1966
|
+
schemaVersion: number;
|
|
1967
|
+
resourceID: string | null;
|
|
1968
|
+
config: {
|
|
1969
|
+
[key: string]: WorkflowJson;
|
|
1970
|
+
};
|
|
1971
|
+
ingestConfig: {
|
|
1972
|
+
[key: string]: WorkflowJson;
|
|
1973
|
+
};
|
|
1974
|
+
};
|
|
1975
|
+
graph: {
|
|
1976
|
+
nodes: Array<{
|
|
1977
|
+
id: string;
|
|
1978
|
+
label: string;
|
|
1979
|
+
kind: "action";
|
|
1980
|
+
appID: string;
|
|
1981
|
+
actionID: string;
|
|
1982
|
+
actionVersion: number;
|
|
1983
|
+
resourceID: string | null;
|
|
1984
|
+
input: WorkflowValue;
|
|
1985
|
+
output: {
|
|
1986
|
+
kind: "action";
|
|
1987
|
+
} | {
|
|
1988
|
+
kind: "selected_fields";
|
|
1989
|
+
fields: Array<{
|
|
1990
|
+
name: string;
|
|
1991
|
+
pointer: string;
|
|
1992
|
+
type: "string" | "number" | "integer" | "boolean" | "object" | "array";
|
|
1993
|
+
missing: "fail" | "null";
|
|
1994
|
+
}>;
|
|
1995
|
+
};
|
|
1996
|
+
attemptTimeoutMs: number;
|
|
1997
|
+
totalTimeoutMs: number;
|
|
1998
|
+
} | {
|
|
1999
|
+
id: string;
|
|
2000
|
+
label: string;
|
|
2001
|
+
kind: "transform";
|
|
2002
|
+
output: WorkflowValue;
|
|
2003
|
+
} | {
|
|
2004
|
+
id: string;
|
|
2005
|
+
label: string;
|
|
2006
|
+
kind: "branch";
|
|
2007
|
+
cases: Array<{
|
|
2008
|
+
id: string;
|
|
2009
|
+
label: string;
|
|
2010
|
+
port: string;
|
|
2011
|
+
predicate: WorkflowPredicate;
|
|
2012
|
+
}>;
|
|
2013
|
+
defaultPort: string;
|
|
2014
|
+
} | {
|
|
2015
|
+
id: string;
|
|
2016
|
+
label: string;
|
|
2017
|
+
kind: "delay";
|
|
2018
|
+
until: {
|
|
2019
|
+
kind: "duration";
|
|
2020
|
+
milliseconds: number;
|
|
2021
|
+
} | {
|
|
2022
|
+
kind: "timestamp";
|
|
2023
|
+
value: WorkflowValue;
|
|
2024
|
+
};
|
|
2025
|
+
} | {
|
|
2026
|
+
id: string;
|
|
2027
|
+
label: string;
|
|
2028
|
+
kind: "wait_for_signal";
|
|
2029
|
+
timeoutMs: number | null;
|
|
2030
|
+
} | {
|
|
2031
|
+
id: string;
|
|
2032
|
+
label: string;
|
|
2033
|
+
kind: "wait_for_event";
|
|
2034
|
+
sourceActionNodeID: string;
|
|
2035
|
+
eventID: string;
|
|
2036
|
+
timeoutMs: number;
|
|
2037
|
+
} | {
|
|
2038
|
+
id: string;
|
|
2039
|
+
label: string;
|
|
2040
|
+
kind: "human_task";
|
|
2041
|
+
title: WorkflowValue;
|
|
2042
|
+
instructions: WorkflowValue;
|
|
2043
|
+
response: {
|
|
2044
|
+
kind: "approval";
|
|
2045
|
+
} | {
|
|
2046
|
+
kind: "form";
|
|
2047
|
+
fields: Array<{
|
|
2048
|
+
key: string;
|
|
2049
|
+
label: string;
|
|
2050
|
+
description: string | null;
|
|
2051
|
+
type: "text" | "long_text" | "number" | "boolean" | "choice" | "date";
|
|
2052
|
+
required: boolean;
|
|
2053
|
+
options?: Array<string>;
|
|
2054
|
+
}>;
|
|
2055
|
+
};
|
|
2056
|
+
timeoutMs: number | null;
|
|
2057
|
+
} | {
|
|
2058
|
+
id: string;
|
|
2059
|
+
label: string;
|
|
2060
|
+
kind: "run_agent";
|
|
2061
|
+
agent: {
|
|
2062
|
+
kind: "workspace";
|
|
2063
|
+
agentID: string;
|
|
2064
|
+
revision: {
|
|
2065
|
+
kind: "active_at_publish";
|
|
2066
|
+
} | {
|
|
2067
|
+
kind: "exact";
|
|
2068
|
+
revision: number;
|
|
2069
|
+
};
|
|
2070
|
+
actionAccess: "agent_default" | "full";
|
|
2071
|
+
} | {
|
|
2072
|
+
kind: "workflow";
|
|
2073
|
+
instructions: string;
|
|
2074
|
+
model: {
|
|
2075
|
+
kind: "default";
|
|
2076
|
+
} | {
|
|
2077
|
+
kind: "exact";
|
|
2078
|
+
modelID: string;
|
|
2079
|
+
};
|
|
2080
|
+
settings: {
|
|
2081
|
+
variant?: string;
|
|
2082
|
+
steps?: number;
|
|
2083
|
+
temperature?: number;
|
|
2084
|
+
topP?: number;
|
|
2085
|
+
topK?: number;
|
|
2086
|
+
maxOutputTokens?: number;
|
|
2087
|
+
reasoningBudgetTokens?: number;
|
|
2088
|
+
disableParallelToolUse?: boolean;
|
|
2089
|
+
};
|
|
2090
|
+
computer: boolean;
|
|
2091
|
+
tools: Array<string>;
|
|
2092
|
+
skillIDs: Array<string>;
|
|
2093
|
+
integrations: Array<{
|
|
2094
|
+
resourceID: string;
|
|
2095
|
+
tools: {
|
|
2096
|
+
kind: "all";
|
|
2097
|
+
} | {
|
|
2098
|
+
kind: "selected";
|
|
2099
|
+
toolIDs: Array<string>;
|
|
2100
|
+
};
|
|
2101
|
+
}>;
|
|
2102
|
+
actionAccess: "agent_default" | "full";
|
|
2103
|
+
};
|
|
2104
|
+
prompt: WorkflowValue;
|
|
2105
|
+
output: {
|
|
2106
|
+
kind: "text";
|
|
2107
|
+
} | {
|
|
2108
|
+
kind: "fields";
|
|
2109
|
+
schema: WorkflowContractJson;
|
|
2110
|
+
};
|
|
2111
|
+
timeoutMs: number;
|
|
2112
|
+
} | {
|
|
2113
|
+
id: string;
|
|
2114
|
+
label: string;
|
|
2115
|
+
kind: "conversation_goal";
|
|
2116
|
+
target: {
|
|
2117
|
+
kind: "existing";
|
|
2118
|
+
conversation: WorkflowValueV4;
|
|
2119
|
+
} | {
|
|
2120
|
+
kind: "sms";
|
|
2121
|
+
channelID: string;
|
|
2122
|
+
recipient: WorkflowValueV4;
|
|
2123
|
+
} | {
|
|
2124
|
+
kind: "whatsapp";
|
|
2125
|
+
channelID: string;
|
|
2126
|
+
recipientUserID: WorkflowValueV4;
|
|
2127
|
+
} | {
|
|
2128
|
+
kind: "instagram";
|
|
2129
|
+
channelID: string;
|
|
2130
|
+
conversationID: WorkflowValueV4;
|
|
2131
|
+
} | {
|
|
2132
|
+
kind: "gmail";
|
|
2133
|
+
channelID: string;
|
|
2134
|
+
recipient: WorkflowValueV4;
|
|
2135
|
+
subject: WorkflowValueV4;
|
|
2136
|
+
};
|
|
2137
|
+
initiation: {
|
|
2138
|
+
kind: "inbound";
|
|
2139
|
+
entry: WorkflowValueV4;
|
|
2140
|
+
} | {
|
|
2141
|
+
kind: "proactive";
|
|
2142
|
+
opening: WorkflowValueV4;
|
|
2143
|
+
} | {
|
|
2144
|
+
kind: "whatsapp_template";
|
|
2145
|
+
template: WorkflowValueV4;
|
|
2146
|
+
optInConfirmed: boolean;
|
|
2147
|
+
};
|
|
2148
|
+
agentID: string;
|
|
2149
|
+
instructions: WorkflowValueV4;
|
|
2150
|
+
context: WorkflowValueV4;
|
|
2151
|
+
resultSchema: {
|
|
2152
|
+
$schema: "https://json-schema.org/draft/2020-12/schema";
|
|
2153
|
+
type: "object";
|
|
2154
|
+
[key: string]: unknown;
|
|
2155
|
+
};
|
|
2156
|
+
replyTimeoutMs: number;
|
|
2157
|
+
maxDurationMs: number;
|
|
2158
|
+
maxRemindersTotal: number;
|
|
2159
|
+
businessDeadlineAt: WorkflowValueV4 | null;
|
|
2160
|
+
reminders: Array<{
|
|
2161
|
+
afterMs: number;
|
|
2162
|
+
text: WorkflowValueV4;
|
|
2163
|
+
}>;
|
|
2164
|
+
sendPolicy: {
|
|
2165
|
+
kind: "sms";
|
|
2166
|
+
consentPurpose: WorkflowValueV4;
|
|
2167
|
+
recipientTimeZone: WorkflowValueV4;
|
|
2168
|
+
sendingWindow: {
|
|
2169
|
+
startMinute: number;
|
|
2170
|
+
endMinute: number;
|
|
2171
|
+
};
|
|
2172
|
+
remindersAuthorized: boolean;
|
|
2173
|
+
} | {
|
|
2174
|
+
kind: "whatsapp";
|
|
2175
|
+
remindersAuthorized: boolean;
|
|
2176
|
+
} | {
|
|
2177
|
+
kind: "instagram";
|
|
2178
|
+
remindersAuthorized: boolean;
|
|
2179
|
+
} | {
|
|
2180
|
+
kind: "gmail";
|
|
2181
|
+
remindersAuthorized: boolean;
|
|
2182
|
+
};
|
|
2183
|
+
revision: {
|
|
2184
|
+
kind: "active_at_publish";
|
|
2185
|
+
} | {
|
|
2186
|
+
kind: "exact";
|
|
2187
|
+
revision: number;
|
|
2188
|
+
};
|
|
2189
|
+
} | {
|
|
2190
|
+
id: string;
|
|
2191
|
+
label: string;
|
|
2192
|
+
kind: "voice_call";
|
|
2193
|
+
receptionistID: string;
|
|
2194
|
+
to: WorkflowValue;
|
|
2195
|
+
dynamicVariables: WorkflowValue;
|
|
2196
|
+
} | {
|
|
2197
|
+
id: string;
|
|
2198
|
+
label: string;
|
|
2199
|
+
kind: "child_workflow";
|
|
2200
|
+
workflowID: string;
|
|
2201
|
+
version: {
|
|
2202
|
+
kind: "active_at_publish";
|
|
2203
|
+
} | {
|
|
2204
|
+
kind: "exact";
|
|
2205
|
+
workflowVersionID: string;
|
|
2206
|
+
};
|
|
2207
|
+
input: WorkflowValue;
|
|
2208
|
+
} | {
|
|
2209
|
+
id: string;
|
|
2210
|
+
label: string;
|
|
2211
|
+
kind: "for_each";
|
|
2212
|
+
items: WorkflowValue;
|
|
2213
|
+
workflowID: string;
|
|
2214
|
+
version: {
|
|
2215
|
+
kind: "active_at_publish";
|
|
2216
|
+
} | {
|
|
2217
|
+
kind: "exact";
|
|
2218
|
+
workflowVersionID: string;
|
|
2219
|
+
};
|
|
2220
|
+
input: WorkflowValue;
|
|
2221
|
+
maxConcurrency: number;
|
|
2222
|
+
failurePolicy: "fail_fast" | "collect";
|
|
2223
|
+
} | {
|
|
2224
|
+
id: string;
|
|
2225
|
+
label: string;
|
|
2226
|
+
kind: "wait_for_all";
|
|
2227
|
+
} | {
|
|
2228
|
+
id: string;
|
|
2229
|
+
label: string;
|
|
2230
|
+
kind: "rejoin";
|
|
1452
2231
|
} | {
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
}
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
} | {
|
|
1475
|
-
kind: "text";
|
|
1476
|
-
operator: "trim" | "lowercase" | "uppercase";
|
|
1477
|
-
value: WorkflowValue;
|
|
1478
|
-
} | {
|
|
1479
|
-
kind: "add_duration";
|
|
1480
|
-
timestamp: WorkflowValue;
|
|
1481
|
-
amount: WorkflowValue;
|
|
1482
|
-
unit: "milliseconds" | "seconds" | "minutes" | "hours" | "days";
|
|
1483
|
-
} | {
|
|
1484
|
-
kind: "map";
|
|
1485
|
-
items: WorkflowValue;
|
|
1486
|
-
value: WorkflowValue;
|
|
1487
|
-
} | {
|
|
1488
|
-
kind: "filter";
|
|
1489
|
-
items: WorkflowValue;
|
|
1490
|
-
predicate: WorkflowPredicate;
|
|
1491
|
-
};
|
|
1492
|
-
export type WorkflowPredicate = {
|
|
1493
|
-
kind: "compare";
|
|
1494
|
-
operator: "equals" | "not_equals" | "greater_than" | "greater_than_or_equal" | "less_than" | "less_than_or_equal" | "contains" | "starts_with" | "ends_with" | "in";
|
|
1495
|
-
left: WorkflowValue;
|
|
1496
|
-
right: WorkflowValue;
|
|
1497
|
-
} | {
|
|
1498
|
-
kind: "exists";
|
|
1499
|
-
value: WorkflowValue;
|
|
1500
|
-
} | {
|
|
1501
|
-
kind: "all";
|
|
1502
|
-
predicates: Array<WorkflowPredicate>;
|
|
1503
|
-
} | {
|
|
1504
|
-
kind: "any";
|
|
1505
|
-
predicates: Array<WorkflowPredicate>;
|
|
1506
|
-
} | {
|
|
1507
|
-
kind: "not";
|
|
1508
|
-
predicate: WorkflowPredicate;
|
|
1509
|
-
};
|
|
1510
|
-
export interface WorkflowDefinitionV13 {
|
|
1511
|
-
definitionVersion: 13;
|
|
2232
|
+
id: string;
|
|
2233
|
+
label: string;
|
|
2234
|
+
kind: "finish";
|
|
2235
|
+
completion: {
|
|
2236
|
+
kind: "succeeded";
|
|
2237
|
+
result: WorkflowValue | null;
|
|
2238
|
+
} | {
|
|
2239
|
+
kind: "failed";
|
|
2240
|
+
message: WorkflowValue;
|
|
2241
|
+
};
|
|
2242
|
+
}>;
|
|
2243
|
+
transitions: Array<{
|
|
2244
|
+
id: string;
|
|
2245
|
+
sourceNodeID: string;
|
|
2246
|
+
sourcePort: string;
|
|
2247
|
+
targetNodeID: string;
|
|
2248
|
+
}>;
|
|
2249
|
+
};
|
|
2250
|
+
}
|
|
2251
|
+
export interface WorkflowDefinitionV14 {
|
|
2252
|
+
definitionVersion: 14;
|
|
1512
2253
|
interface: {
|
|
1513
2254
|
interfaceVersion: 2;
|
|
1514
2255
|
input: {
|
|
@@ -1726,7 +2467,6 @@ export interface WorkflowDefinitionV13 {
|
|
|
1726
2467
|
template: WorkflowValueV4;
|
|
1727
2468
|
optInConfirmed: boolean;
|
|
1728
2469
|
};
|
|
1729
|
-
agentID: string;
|
|
1730
2470
|
instructions: WorkflowValueV4;
|
|
1731
2471
|
context: WorkflowValueV4;
|
|
1732
2472
|
resultSchema: {
|
|
@@ -1761,11 +2501,43 @@ export interface WorkflowDefinitionV13 {
|
|
|
1761
2501
|
kind: "gmail";
|
|
1762
2502
|
remindersAuthorized: boolean;
|
|
1763
2503
|
};
|
|
1764
|
-
|
|
1765
|
-
kind: "
|
|
2504
|
+
agent: {
|
|
2505
|
+
kind: "workspace";
|
|
2506
|
+
agentID: string;
|
|
2507
|
+
revision: {
|
|
2508
|
+
kind: "active_at_publish";
|
|
2509
|
+
} | {
|
|
2510
|
+
kind: "exact";
|
|
2511
|
+
revision: number;
|
|
2512
|
+
};
|
|
1766
2513
|
} | {
|
|
1767
|
-
kind: "
|
|
1768
|
-
|
|
2514
|
+
kind: "workflow";
|
|
2515
|
+
instructions: string;
|
|
2516
|
+
model: {
|
|
2517
|
+
kind: "default";
|
|
2518
|
+
} | {
|
|
2519
|
+
kind: "exact";
|
|
2520
|
+
modelID: string;
|
|
2521
|
+
};
|
|
2522
|
+
settings: {
|
|
2523
|
+
variant?: string;
|
|
2524
|
+
steps?: number;
|
|
2525
|
+
temperature?: number;
|
|
2526
|
+
topP?: number;
|
|
2527
|
+
topK?: number;
|
|
2528
|
+
maxOutputTokens?: number;
|
|
2529
|
+
reasoningBudgetTokens?: number;
|
|
2530
|
+
disableParallelToolUse?: boolean;
|
|
2531
|
+
};
|
|
2532
|
+
integrations: Array<{
|
|
2533
|
+
resourceID: string;
|
|
2534
|
+
tools: {
|
|
2535
|
+
kind: "all";
|
|
2536
|
+
} | {
|
|
2537
|
+
kind: "selected";
|
|
2538
|
+
toolIDs: Array<string>;
|
|
2539
|
+
};
|
|
2540
|
+
}>;
|
|
1769
2541
|
};
|
|
1770
2542
|
} | {
|
|
1771
2543
|
id: string;
|
|
@@ -1829,8 +2601,8 @@ export interface WorkflowDefinitionV13 {
|
|
|
1829
2601
|
}>;
|
|
1830
2602
|
};
|
|
1831
2603
|
}
|
|
1832
|
-
export interface
|
|
1833
|
-
definitionVersion:
|
|
2604
|
+
export interface WorkflowDefinitionV15 {
|
|
2605
|
+
definitionVersion: 15;
|
|
1834
2606
|
interface: {
|
|
1835
2607
|
interfaceVersion: 2;
|
|
1836
2608
|
input: {
|
|
@@ -1855,7 +2627,7 @@ export interface WorkflowDefinitionV14 {
|
|
|
1855
2627
|
trigger: {
|
|
1856
2628
|
id: string;
|
|
1857
2629
|
kind: "incoming_message";
|
|
1858
|
-
channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox";
|
|
2630
|
+
channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat";
|
|
1859
2631
|
resourceIDs: Array<string>;
|
|
1860
2632
|
} | {
|
|
1861
2633
|
id: string;
|
|
@@ -2081,6 +2853,9 @@ export interface WorkflowDefinitionV14 {
|
|
|
2081
2853
|
} | {
|
|
2082
2854
|
kind: "gmail";
|
|
2083
2855
|
remindersAuthorized: boolean;
|
|
2856
|
+
} | {
|
|
2857
|
+
kind: "website";
|
|
2858
|
+
remindersAuthorized: boolean;
|
|
2084
2859
|
};
|
|
2085
2860
|
agent: {
|
|
2086
2861
|
kind: "workspace";
|
|
@@ -2182,8 +2957,8 @@ export interface WorkflowDefinitionV14 {
|
|
|
2182
2957
|
}>;
|
|
2183
2958
|
};
|
|
2184
2959
|
}
|
|
2185
|
-
export interface
|
|
2186
|
-
definitionVersion:
|
|
2960
|
+
export interface WorkflowDefinitionV16 {
|
|
2961
|
+
definitionVersion: 16;
|
|
2187
2962
|
interface: {
|
|
2188
2963
|
interfaceVersion: 2;
|
|
2189
2964
|
input: {
|
|
@@ -2208,7 +2983,7 @@ export interface WorkflowDefinitionV15 {
|
|
|
2208
2983
|
trigger: {
|
|
2209
2984
|
id: string;
|
|
2210
2985
|
kind: "incoming_message";
|
|
2211
|
-
channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat";
|
|
2986
|
+
channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger";
|
|
2212
2987
|
resourceIDs: Array<string>;
|
|
2213
2988
|
} | {
|
|
2214
2989
|
id: string;
|
|
@@ -2437,6 +3212,9 @@ export interface WorkflowDefinitionV15 {
|
|
|
2437
3212
|
} | {
|
|
2438
3213
|
kind: "website";
|
|
2439
3214
|
remindersAuthorized: boolean;
|
|
3215
|
+
} | {
|
|
3216
|
+
kind: "messenger";
|
|
3217
|
+
remindersAuthorized: boolean;
|
|
2440
3218
|
};
|
|
2441
3219
|
agent: {
|
|
2442
3220
|
kind: "workspace";
|
|
@@ -2538,8 +3316,8 @@ export interface WorkflowDefinitionV15 {
|
|
|
2538
3316
|
}>;
|
|
2539
3317
|
};
|
|
2540
3318
|
}
|
|
2541
|
-
export interface
|
|
2542
|
-
definitionVersion:
|
|
3319
|
+
export interface WorkflowDefinitionV17 {
|
|
3320
|
+
definitionVersion: 17;
|
|
2543
3321
|
interface: {
|
|
2544
3322
|
interfaceVersion: 2;
|
|
2545
3323
|
input: {
|
|
@@ -2779,23 +3557,64 @@ export interface WorkflowDefinitionV16 {
|
|
|
2779
3557
|
sendingWindow: {
|
|
2780
3558
|
startMinute: number;
|
|
2781
3559
|
endMinute: number;
|
|
3560
|
+
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
2782
3561
|
};
|
|
2783
3562
|
remindersAuthorized: boolean;
|
|
2784
3563
|
} | {
|
|
2785
3564
|
kind: "whatsapp";
|
|
2786
3565
|
remindersAuthorized: boolean;
|
|
3566
|
+
sendingHours?: {
|
|
3567
|
+
timeZone: WorkflowValueV4;
|
|
3568
|
+
window: {
|
|
3569
|
+
startMinute: number;
|
|
3570
|
+
endMinute: number;
|
|
3571
|
+
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
3572
|
+
};
|
|
3573
|
+
};
|
|
2787
3574
|
} | {
|
|
2788
3575
|
kind: "instagram";
|
|
2789
3576
|
remindersAuthorized: boolean;
|
|
3577
|
+
sendingHours?: {
|
|
3578
|
+
timeZone: WorkflowValueV4;
|
|
3579
|
+
window: {
|
|
3580
|
+
startMinute: number;
|
|
3581
|
+
endMinute: number;
|
|
3582
|
+
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
3583
|
+
};
|
|
3584
|
+
};
|
|
2790
3585
|
} | {
|
|
2791
3586
|
kind: "gmail";
|
|
2792
3587
|
remindersAuthorized: boolean;
|
|
3588
|
+
sendingHours?: {
|
|
3589
|
+
timeZone: WorkflowValueV4;
|
|
3590
|
+
window: {
|
|
3591
|
+
startMinute: number;
|
|
3592
|
+
endMinute: number;
|
|
3593
|
+
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
3594
|
+
};
|
|
3595
|
+
};
|
|
2793
3596
|
} | {
|
|
2794
3597
|
kind: "website";
|
|
2795
3598
|
remindersAuthorized: boolean;
|
|
3599
|
+
sendingHours?: {
|
|
3600
|
+
timeZone: WorkflowValueV4;
|
|
3601
|
+
window: {
|
|
3602
|
+
startMinute: number;
|
|
3603
|
+
endMinute: number;
|
|
3604
|
+
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
3605
|
+
};
|
|
3606
|
+
};
|
|
2796
3607
|
} | {
|
|
2797
3608
|
kind: "messenger";
|
|
2798
3609
|
remindersAuthorized: boolean;
|
|
3610
|
+
sendingHours?: {
|
|
3611
|
+
timeZone: WorkflowValueV4;
|
|
3612
|
+
window: {
|
|
3613
|
+
startMinute: number;
|
|
3614
|
+
endMinute: number;
|
|
3615
|
+
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
3616
|
+
};
|
|
3617
|
+
};
|
|
2799
3618
|
};
|
|
2800
3619
|
agent: {
|
|
2801
3620
|
kind: "workspace";
|
|
@@ -2898,7 +3717,7 @@ export interface WorkflowDefinitionV16 {
|
|
|
2898
3717
|
};
|
|
2899
3718
|
}
|
|
2900
3719
|
export interface WorkflowDefinition {
|
|
2901
|
-
definitionVersion:
|
|
3720
|
+
definitionVersion: 18;
|
|
2902
3721
|
interface: {
|
|
2903
3722
|
interfaceVersion: 2;
|
|
2904
3723
|
input: {
|
|
@@ -2923,7 +3742,7 @@ export interface WorkflowDefinition {
|
|
|
2923
3742
|
trigger: {
|
|
2924
3743
|
id: string;
|
|
2925
3744
|
kind: "incoming_message";
|
|
2926
|
-
channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger";
|
|
3745
|
+
channelKind: "whatsapp.messages" | "phone.number" | "instagram.dm" | "gmail.mailbox" | "website.chat" | "facebook-page.messenger" | "telegram.business";
|
|
2927
3746
|
resourceIDs: Array<string>;
|
|
2928
3747
|
} | {
|
|
2929
3748
|
id: string;
|
|
@@ -3196,6 +4015,17 @@ export interface WorkflowDefinition {
|
|
|
3196
4015
|
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
3197
4016
|
};
|
|
3198
4017
|
};
|
|
4018
|
+
} | {
|
|
4019
|
+
kind: "telegram";
|
|
4020
|
+
remindersAuthorized: boolean;
|
|
4021
|
+
sendingHours?: {
|
|
4022
|
+
timeZone: WorkflowValueV4;
|
|
4023
|
+
window: {
|
|
4024
|
+
startMinute: number;
|
|
4025
|
+
endMinute: number;
|
|
4026
|
+
days?: Array<"MON" | "TUE" | "WED" | "THU" | "FRI" | "SAT" | "SUN">;
|
|
4027
|
+
};
|
|
4028
|
+
};
|
|
3199
4029
|
};
|
|
3200
4030
|
agent: {
|
|
3201
4031
|
kind: "workspace";
|
|
@@ -3311,16 +4141,6 @@ export interface WorkflowLayout {
|
|
|
3311
4141
|
zoom: number;
|
|
3312
4142
|
};
|
|
3313
4143
|
}
|
|
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
4144
|
export type WorkflowFailureAlertDestination = {
|
|
3325
4145
|
id: string;
|
|
3326
4146
|
installationID: string;
|
|
@@ -4030,7 +4850,7 @@ export type WorkflowDraftDefinitionResponse = WorkflowDefinitionV5 | WorkflowDef
|
|
|
4030
4850
|
targetNodeID: string;
|
|
4031
4851
|
}>;
|
|
4032
4852
|
};
|
|
4033
|
-
} | WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinition;
|
|
4853
|
+
} | WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinitionV17 | WorkflowDefinition;
|
|
4034
4854
|
export interface WorkflowDefinitionV5 {
|
|
4035
4855
|
definitionVersion: 5;
|
|
4036
4856
|
interface: WorkflowInterfaceV1;
|
|
@@ -4904,7 +5724,7 @@ export type WorkflowVersionSnapshot = {
|
|
|
4904
5724
|
sourceRevision: number;
|
|
4905
5725
|
releaseNote: string | null;
|
|
4906
5726
|
createdAt: number;
|
|
4907
|
-
definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinition;
|
|
5727
|
+
definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinitionV17 | WorkflowDefinition;
|
|
4908
5728
|
layout: WorkflowLayout;
|
|
4909
5729
|
bindings: Array<{
|
|
4910
5730
|
resourceID: string;
|
|
@@ -4924,7 +5744,7 @@ export type WorkflowVersionSnapshot = {
|
|
|
4924
5744
|
sourceRevision: number;
|
|
4925
5745
|
releaseNote: string | null;
|
|
4926
5746
|
createdAt: number;
|
|
4927
|
-
definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinition;
|
|
5747
|
+
definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinitionV17 | WorkflowDefinition;
|
|
4928
5748
|
layout: WorkflowLayout;
|
|
4929
5749
|
bindings: Array<{
|
|
4930
5750
|
resourceID: string;
|
|
@@ -5080,6 +5900,30 @@ export interface TaskCompletedEvent {
|
|
|
5080
5900
|
contactID: string;
|
|
5081
5901
|
};
|
|
5082
5902
|
}
|
|
5903
|
+
/** The agent waits on an approval or a question in a chat an API key started. */
|
|
5904
|
+
export interface ChatWaitingEvent {
|
|
5905
|
+
id: string;
|
|
5906
|
+
type: "chat.waiting";
|
|
5907
|
+
createdAt: string;
|
|
5908
|
+
data: {
|
|
5909
|
+
chatID: string;
|
|
5910
|
+
agentID: string;
|
|
5911
|
+
};
|
|
5912
|
+
}
|
|
5913
|
+
/** The agent stopped working on a chat an API key started: it answered, failed or was stopped. */
|
|
5914
|
+
export interface ChatIdleEvent {
|
|
5915
|
+
id: string;
|
|
5916
|
+
type: "chat.idle";
|
|
5917
|
+
createdAt: string;
|
|
5918
|
+
data: {
|
|
5919
|
+
chatID: string;
|
|
5920
|
+
agentID: string;
|
|
5921
|
+
/** Why the latest answer ended without one. */
|
|
5922
|
+
error: {
|
|
5923
|
+
code: string;
|
|
5924
|
+
} | null;
|
|
5925
|
+
};
|
|
5926
|
+
}
|
|
5083
5927
|
export type ConnectLinksCreateParams = {
|
|
5084
5928
|
/** The app to connect, from GET /v1/apps?connectable=true. */
|
|
5085
5929
|
appID?: string;
|
|
@@ -5102,7 +5946,7 @@ export type WebhooksListResponse = {
|
|
|
5102
5946
|
};
|
|
5103
5947
|
export type WebhooksCreateParams = {
|
|
5104
5948
|
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">;
|
|
5949
|
+
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
5950
|
};
|
|
5107
5951
|
export interface WebhooksDeliveriesListParams {
|
|
5108
5952
|
limit?: number;
|
|
@@ -5741,6 +6585,8 @@ export type SocialPostsCreateParams = {
|
|
|
5741
6585
|
platformSpecificData: {
|
|
5742
6586
|
format: "post" | "reel" | "story";
|
|
5743
6587
|
thumbOffsetMs?: number;
|
|
6588
|
+
/** 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. */
|
|
6589
|
+
trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
|
|
5744
6590
|
};
|
|
5745
6591
|
} | {
|
|
5746
6592
|
accountId: string;
|
|
@@ -5963,6 +6809,8 @@ export type SocialPostsCreateParams = {
|
|
|
5963
6809
|
platformSpecificData: {
|
|
5964
6810
|
format: "post" | "reel" | "story";
|
|
5965
6811
|
thumbOffsetMs?: number;
|
|
6812
|
+
/** 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. */
|
|
6813
|
+
trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
|
|
5966
6814
|
};
|
|
5967
6815
|
} | {
|
|
5968
6816
|
accountId: string;
|
|
@@ -6184,6 +7032,8 @@ export type SocialPostsCreateParams = {
|
|
|
6184
7032
|
platformSpecificData: {
|
|
6185
7033
|
format: "post" | "reel" | "story";
|
|
6186
7034
|
thumbOffsetMs?: number;
|
|
7035
|
+
/** 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. */
|
|
7036
|
+
trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
|
|
6187
7037
|
};
|
|
6188
7038
|
} | {
|
|
6189
7039
|
accountId: string;
|
|
@@ -6536,6 +7386,8 @@ export type SocialPostsUpdateParams = {
|
|
|
6536
7386
|
platformSpecificData: {
|
|
6537
7387
|
format: "post" | "reel" | "story";
|
|
6538
7388
|
thumbOffsetMs?: number;
|
|
7389
|
+
/** 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. */
|
|
7390
|
+
trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
|
|
6539
7391
|
};
|
|
6540
7392
|
} | {
|
|
6541
7393
|
accountId: string;
|
|
@@ -6757,6 +7609,8 @@ export type SocialPostsUpdateParams = {
|
|
|
6757
7609
|
platformSpecificData: {
|
|
6758
7610
|
format: "post" | "reel" | "story";
|
|
6759
7611
|
thumbOffsetMs?: number;
|
|
7612
|
+
/** 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. */
|
|
7613
|
+
trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
|
|
6760
7614
|
};
|
|
6761
7615
|
} | {
|
|
6762
7616
|
accountId: string;
|
|
@@ -6980,6 +7834,8 @@ export type SocialPostsUpdateParams = {
|
|
|
6980
7834
|
platformSpecificData: {
|
|
6981
7835
|
format: "post" | "reel" | "story";
|
|
6982
7836
|
thumbOffsetMs?: number;
|
|
7837
|
+
/** 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. */
|
|
7838
|
+
trialGraduation?: "MANUAL" | "SS_PERFORMANCE";
|
|
6983
7839
|
};
|
|
6984
7840
|
} | {
|
|
6985
7841
|
accountId: string;
|
|
@@ -7392,6 +8248,79 @@ export type SocialPostsCancelResponse = {
|
|
|
7392
8248
|
updatedAt: number;
|
|
7393
8249
|
}>;
|
|
7394
8250
|
};
|
|
8251
|
+
export interface ChatsListParams {
|
|
8252
|
+
limit?: number;
|
|
8253
|
+
cursor?: string;
|
|
8254
|
+
agentID?: string;
|
|
8255
|
+
/** Chats whose title holds this, in any letter case. */
|
|
8256
|
+
search?: string;
|
|
8257
|
+
/** pinned puts pinned chats first. */
|
|
8258
|
+
sort?: "updated" | "pinned";
|
|
8259
|
+
/** Only chats with a message. */
|
|
8260
|
+
hasMessages?: "true";
|
|
8261
|
+
}
|
|
8262
|
+
export type ChatsListResponse = {
|
|
8263
|
+
items: Array<Chat>;
|
|
8264
|
+
nextCursor: string | null;
|
|
8265
|
+
};
|
|
8266
|
+
export type ChatsCreateParams = {
|
|
8267
|
+
agentID: string;
|
|
8268
|
+
title?: string;
|
|
8269
|
+
/** Your own keys and values, such as the customer or ticket the chat is for. */
|
|
8270
|
+
metadata?: {
|
|
8271
|
+
[key: string]: string;
|
|
8272
|
+
};
|
|
8273
|
+
/** Start with full access: the agent runs its tools without asking. */
|
|
8274
|
+
access?: "full";
|
|
8275
|
+
};
|
|
8276
|
+
export interface ChatsMessagesListParams {
|
|
8277
|
+
limit?: number;
|
|
8278
|
+
cursor?: string;
|
|
8279
|
+
}
|
|
8280
|
+
export type ChatsMessagesListResponse = {
|
|
8281
|
+
items: Array<ChatMessage>;
|
|
8282
|
+
nextCursor: string | null;
|
|
8283
|
+
};
|
|
8284
|
+
export type ChatsMessagesCreateParams = {
|
|
8285
|
+
/** What the person sends: text, a file the chat stores, or an agent they mention. */
|
|
8286
|
+
parts: Array<{
|
|
8287
|
+
type: "text";
|
|
8288
|
+
text: string;
|
|
8289
|
+
} | {
|
|
8290
|
+
type: "file";
|
|
8291
|
+
fileID: string;
|
|
8292
|
+
} | {
|
|
8293
|
+
type: "agent";
|
|
8294
|
+
name: string;
|
|
8295
|
+
}>;
|
|
8296
|
+
context?: ChatContext;
|
|
8297
|
+
};
|
|
8298
|
+
export interface ChatsMessagesGetParams {
|
|
8299
|
+
chatID: string;
|
|
8300
|
+
}
|
|
8301
|
+
export interface ChatsEventsParams {
|
|
8302
|
+
/** Resume after this event's id. */
|
|
8303
|
+
after?: number;
|
|
8304
|
+
}
|
|
8305
|
+
export type ChatsApprovalsDecideParams = {
|
|
8306
|
+
chatID: string;
|
|
8307
|
+
} & {
|
|
8308
|
+
decision: "approve" | "deny";
|
|
8309
|
+
planDigest?: string;
|
|
8310
|
+
};
|
|
8311
|
+
export type ChatsQuestionsAnswerParams = {
|
|
8312
|
+
chatID: string;
|
|
8313
|
+
} & {
|
|
8314
|
+
/** User answers in question order (each answer contains one or more selected values) */
|
|
8315
|
+
answers: Array<QuestionAnswer>;
|
|
8316
|
+
};
|
|
8317
|
+
export interface ChatsQuestionsDismissParams {
|
|
8318
|
+
chatID: string;
|
|
8319
|
+
}
|
|
8320
|
+
export interface ChatsFilesGetParams {
|
|
8321
|
+
chatID: string;
|
|
8322
|
+
disposition?: "inline" | "attachment";
|
|
8323
|
+
}
|
|
7395
8324
|
export interface ConversationsListParams {
|
|
7396
8325
|
limit?: number;
|
|
7397
8326
|
cursor?: string;
|
|
@@ -7926,7 +8855,7 @@ export type WorkflowsTemplatesInstantiateParams = {
|
|
|
7926
8855
|
};
|
|
7927
8856
|
export type WorkflowsTemplatesInstantiateResponse = {
|
|
7928
8857
|
draft: {
|
|
7929
|
-
definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinition;
|
|
8858
|
+
definition: WorkflowDefinitionV11 | WorkflowDefinitionV13 | WorkflowDefinitionV14 | WorkflowDefinitionV15 | WorkflowDefinitionV16 | WorkflowDefinitionV17 | WorkflowDefinition;
|
|
7930
8859
|
layout: WorkflowLayout;
|
|
7931
8860
|
bindings: Array<{
|
|
7932
8861
|
resourceID: string;
|
|
@@ -8077,7 +9006,7 @@ export type WorkflowsListResponse = {
|
|
|
8077
9006
|
export type WorkflowsCreateParams = {
|
|
8078
9007
|
name: string;
|
|
8079
9008
|
initialDraft?: {
|
|
8080
|
-
definition: WorkflowDefinition | WorkflowDefinitionV16 | WorkflowDefinitionV15 | WorkflowDefinitionV14 | WorkflowDefinitionV13 | WorkflowDefinitionV11;
|
|
9009
|
+
definition: WorkflowDefinition | WorkflowDefinitionV17 | WorkflowDefinitionV16 | WorkflowDefinitionV15 | WorkflowDefinitionV14 | WorkflowDefinitionV13 | WorkflowDefinitionV11;
|
|
8081
9010
|
layout: WorkflowLayout;
|
|
8082
9011
|
bindings: Array<{
|
|
8083
9012
|
resourceID: string;
|
|
@@ -8113,6 +9042,8 @@ export type WorkflowsCreateResponse = {
|
|
|
8113
9042
|
createdAt: number;
|
|
8114
9043
|
updatedAt: number;
|
|
8115
9044
|
accounts: Array<WorkflowAccount>;
|
|
9045
|
+
/** 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. */
|
|
9046
|
+
managedBy: "builder" | "inbox";
|
|
8116
9047
|
};
|
|
8117
9048
|
export type WorkflowsBatchGetParams = {
|
|
8118
9049
|
workflowIDs: Array<string>;
|
|
@@ -8156,6 +9087,8 @@ export type WorkflowsGetResponse = {
|
|
|
8156
9087
|
createdAt: number;
|
|
8157
9088
|
updatedAt: number;
|
|
8158
9089
|
accounts: Array<WorkflowAccount>;
|
|
9090
|
+
/** 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. */
|
|
9091
|
+
managedBy: "builder" | "inbox";
|
|
8159
9092
|
};
|
|
8160
9093
|
export type WorkflowsDraftUpdateParams = {
|
|
8161
9094
|
layout: WorkflowLayout;
|
|
@@ -8166,7 +9099,7 @@ export type WorkflowsDraftUpdateParams = {
|
|
|
8166
9099
|
}>;
|
|
8167
9100
|
expectedRevision: number;
|
|
8168
9101
|
name: string;
|
|
8169
|
-
definition: WorkflowDefinition | WorkflowDefinitionV16 | WorkflowDefinitionV15 | WorkflowDefinitionV14 | WorkflowDefinitionV13 | WorkflowDefinitionV11 | {
|
|
9102
|
+
definition: WorkflowDefinition | WorkflowDefinitionV17 | WorkflowDefinitionV16 | WorkflowDefinitionV15 | WorkflowDefinitionV14 | WorkflowDefinitionV13 | WorkflowDefinitionV11 | {
|
|
8170
9103
|
definitionVersion: 10;
|
|
8171
9104
|
interface: {
|
|
8172
9105
|
interfaceVersion: 2;
|
|
@@ -8681,6 +9614,8 @@ export type WorkflowsDraftUpdateResponse = {
|
|
|
8681
9614
|
createdAt: number;
|
|
8682
9615
|
updatedAt: number;
|
|
8683
9616
|
accounts: Array<WorkflowAccount>;
|
|
9617
|
+
/** 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. */
|
|
9618
|
+
managedBy: "builder" | "inbox";
|
|
8684
9619
|
};
|
|
8685
9620
|
export type WorkflowsWebhookGetResponse = WorkflowWebhookSetup | null;
|
|
8686
9621
|
export type WorkflowsValidateResponse = {
|
|
@@ -8818,6 +9753,8 @@ export type WorkflowsArchiveResponse = {
|
|
|
8818
9753
|
createdAt: number;
|
|
8819
9754
|
updatedAt: number;
|
|
8820
9755
|
accounts: Array<WorkflowAccount>;
|
|
9756
|
+
/** 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. */
|
|
9757
|
+
managedBy: "builder" | "inbox";
|
|
8821
9758
|
};
|
|
8822
9759
|
export type WorkflowsPauseResponse = {
|
|
8823
9760
|
definition: WorkflowDraftDefinitionResponse;
|
|
@@ -8846,6 +9783,8 @@ export type WorkflowsPauseResponse = {
|
|
|
8846
9783
|
createdAt: number;
|
|
8847
9784
|
updatedAt: number;
|
|
8848
9785
|
accounts: Array<WorkflowAccount>;
|
|
9786
|
+
/** 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. */
|
|
9787
|
+
managedBy: "builder" | "inbox";
|
|
8849
9788
|
};
|
|
8850
9789
|
export type WorkflowsResumeResponse = {
|
|
8851
9790
|
definition: WorkflowDraftDefinitionResponse;
|
|
@@ -8874,4 +9813,6 @@ export type WorkflowsResumeResponse = {
|
|
|
8874
9813
|
createdAt: number;
|
|
8875
9814
|
updatedAt: number;
|
|
8876
9815
|
accounts: Array<WorkflowAccount>;
|
|
9816
|
+
/** 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. */
|
|
9817
|
+
managedBy: "builder" | "inbox";
|
|
8877
9818
|
};
|