@oaiz/sdk 0.0.0-stage → 0.1.4128

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.
@@ -0,0 +1,2669 @@
1
+ /** Why OAIZ refused a request, or why no answer arrived. `code` names the reason in a stable form, such as `auth-signed-out`. */
2
+ interface OaizError {
3
+ message: string;
4
+ code: string;
5
+ hints: string[];
6
+ }
7
+ /** Every builder resolves to this; it never throws. `status` is 0 when no answer arrived. */
8
+ type OaizResponse<T> = {
9
+ data: T;
10
+ error: null;
11
+ count: number | null;
12
+ status: number;
13
+ } | {
14
+ data: null;
15
+ error: OaizError;
16
+ count: null;
17
+ status: number;
18
+ };
19
+ /** A member's session with an app. */
20
+ interface OaizSession {
21
+ /** The app access token every request of the client sends as its Bearer credential. */
22
+ accessToken: string;
23
+ /** When the access token expires, in milliseconds since the Unix epoch. */
24
+ expiresAt: number;
25
+ /** The scope the member approved, space separated. */
26
+ scope: string;
27
+ }
28
+ /** The member a session signs in, as OAIZ releases them to the app. */
29
+ interface OaizUser {
30
+ /** The member's identifier (`sub`). */
31
+ id: string;
32
+ /** The member's email address. */
33
+ email?: string;
34
+ /** Whether OAIZ has confirmed that the member owns `email`. */
35
+ emailVerified?: boolean;
36
+ /** The member's full name. */
37
+ name?: string;
38
+ }
39
+ /** Every auth method resolves to this or to `{ error }`; none throws. */
40
+ type OaizAuthResponse<T> = {
41
+ data: T;
42
+ error: null;
43
+ } | {
44
+ data: null;
45
+ error: OaizError;
46
+ };
47
+ /** Signs a member in to the app with OAIZ from the browser, keeps the session fresh and signs out. */
48
+ interface OaizAuth {
49
+ /** Sends the browser to OAIZ to approve the sign-in; the page loads again at the same address, signed in. */
50
+ signIn(): Promise<{
51
+ error: OaizError | null;
52
+ }>;
53
+ /**
54
+ * The current session, renewed first when its access token expires within a minute; `data` is null
55
+ * when no member is signed in. `error` reports a sign-in this page came back from that failed; a
56
+ * session from before it stays in use for requests.
57
+ */
58
+ getSession(): Promise<OaizAuthResponse<OaizSession | null>>;
59
+ /** The signed-in member. */
60
+ getUser(): Promise<OaizAuthResponse<OaizUser>>;
61
+ /** Ends the session at OAIZ and forgets it in this browser, whatever OAIZ answers. */
62
+ signOut(): Promise<{
63
+ error: OaizError | null;
64
+ }>;
65
+ }
66
+ interface DtoAccessReductionAffectedWorkflow {
67
+ canPause: boolean;
68
+ jobCount: number;
69
+ name: string;
70
+ reason: DtoAccessReductionReason;
71
+ status: DtoStatus;
72
+ workflowUuid: string;
73
+ }
74
+ interface DtoAccessReductionImpact {
75
+ accessRevision: number;
76
+ fingerprint: string;
77
+ incompleteProtection: boolean;
78
+ workflows: DtoAccessReductionAffectedWorkflow[];
79
+ }
80
+ declare const DtoAccessReductionReason: {
81
+ readonly MayUseResource: "may_use_resource";
82
+ readonly UsesResource: "uses_resource";
83
+ };
84
+ type DtoAccessReductionReason = (typeof DtoAccessReductionReason)[keyof typeof DtoAccessReductionReason];
85
+ interface DtoActionOutput {
86
+ config: Record<string, unknown> | null;
87
+ outputEventConfig?: DtoOutputEventConfig;
88
+ type: DtoActionType;
89
+ }
90
+ interface DtoActionExecutionLLMCall {
91
+ cachedInputTokens?: number;
92
+ createdAt: string;
93
+ inputTokens: number;
94
+ latencyMs: number;
95
+ model: string;
96
+ outputTokens: number;
97
+ provider: string;
98
+ requestId?: string;
99
+ sequence: number;
100
+ thinkingTokens?: number;
101
+ }
102
+ interface DtoActionExecutionLog {
103
+ artifacts?: DtoFileReference[];
104
+ awaitEventDetails?: DtoAwaitEventDetails;
105
+ completedAt?: string;
106
+ executionDurationMs?: number;
107
+ initiationOrigin?: DtoExecutionInitiationOrigin;
108
+ jobName?: string;
109
+ jobSnapshot?: DtoJob;
110
+ jobUuid: string;
111
+ jobVersionId?: string;
112
+ llmCalls?: DtoActionExecutionLLMCall[];
113
+ logs: DtoActionLogOutput[] | null;
114
+ organisationUuid: string;
115
+ publishedEventUuids?: string[];
116
+ publishedEvents?: DtoEventMinimalMetadata[];
117
+ sourceExecutionUuid?: string;
118
+ status: DtoExecutionStatus;
119
+ testRunUuid?: string;
120
+ toolCalls?: DtoActionExecutionToolCall[];
121
+ triggeredAt?: string;
122
+ triggeringEventUuid?: string;
123
+ updatedAt?: string;
124
+ uuid: string;
125
+ workflowTraceId?: string;
126
+ workflowUuid?: string;
127
+ workflowVersionId?: string;
128
+ }
129
+ interface DtoActionExecutionLogMetadata {
130
+ artifactCount: number;
131
+ completedAt?: string;
132
+ executionDurationMs?: number;
133
+ initiationOrigin?: DtoExecutionInitiationOrigin;
134
+ jobName: string;
135
+ jobUuid: string;
136
+ organisationUuid: string;
137
+ publishedEvents: DtoEventMinimalMetadata[] | null;
138
+ sourceExecutionUuid?: string;
139
+ status: DtoExecutionStatus;
140
+ testRunUuid?: string;
141
+ totalCost?: string | null;
142
+ totalCostCurrency?: string;
143
+ triggeredAt: string | null;
144
+ triggeringEvent: DtoEventMinimalMetadata | null;
145
+ updatedAt: string | null;
146
+ uuid: string;
147
+ workflowTraceId?: string;
148
+ workflowVersionId?: string;
149
+ workflows: DtoWorkflowMinimalMetadata[] | null;
150
+ }
151
+ interface DtoActionExecutionRunJobSummary {
152
+ emittedOutput: boolean;
153
+ jobUuid: string;
154
+ status: DtoExecutionStatus;
155
+ }
156
+ interface DtoActionExecutionRunSummary {
157
+ completedAt?: string;
158
+ completedSteps: number;
159
+ durationMs?: number;
160
+ emittedOutput: boolean;
161
+ executionUuids: string[] | null;
162
+ jobs: DtoActionExecutionRunJobSummary[] | null;
163
+ organisationUuid: string;
164
+ sourceExecutionUuid?: string;
165
+ startedAt?: string;
166
+ status: DtoExecutionStatus;
167
+ stoppedAtJobName?: string;
168
+ stoppedAtJobUuid?: string;
169
+ totalSteps: number;
170
+ workflowTraceId: string;
171
+ }
172
+ interface DtoActionExecutionToolCall {
173
+ createdAt: string;
174
+ errorCode?: string;
175
+ latencyMs: number;
176
+ provider: string;
177
+ requestId?: string;
178
+ requestSize: number;
179
+ responseSize: number;
180
+ sequence: number;
181
+ success: boolean;
182
+ toolName: string;
183
+ toolType: string;
184
+ unitType?: string;
185
+ units?: number;
186
+ }
187
+ interface DtoActionLogOutput {
188
+ actionExecutionLogUuid?: string;
189
+ actionType?: string;
190
+ cachedInputTokens?: number;
191
+ completedAt?: string;
192
+ correlationId?: string;
193
+ errorCode?: string;
194
+ inputTokens?: number;
195
+ integrationName?: string;
196
+ kind?: string;
197
+ latencyMs?: number;
198
+ logLevel?: string;
199
+ message: string;
200
+ model?: string;
201
+ operationId?: string;
202
+ outputTokens?: number;
203
+ payloadContentType?: string;
204
+ payloadJson?: unknown;
205
+ payloadTruncated?: boolean;
206
+ phase?: string;
207
+ provider?: string;
208
+ requestId?: string;
209
+ requestSize?: number;
210
+ responseSize?: number;
211
+ sequence?: number;
212
+ source?: string;
213
+ startedAt?: string;
214
+ status?: string;
215
+ thinkingTokens?: number;
216
+ time: string;
217
+ toolName?: string;
218
+ toolType?: string;
219
+ unitType?: string;
220
+ units?: number;
221
+ uuid?: string;
222
+ }
223
+ declare const DtoActionType: {
224
+ readonly Agent: "agent";
225
+ readonly Airtable: "airtable";
226
+ readonly Attio: "attio";
227
+ readonly AwaitEvent: "await-event";
228
+ readonly BatchScrape: "batch-scrape";
229
+ readonly Callback: "callback";
230
+ readonly Code: "code";
231
+ readonly Crawl: "crawl";
232
+ readonly CreateKnowledgeDocument: "create-knowledge-document";
233
+ readonly Crisp: "crisp";
234
+ readonly Cursor: "cursor";
235
+ readonly Custom: "custom";
236
+ readonly Decision: "decision";
237
+ readonly DeepResearch: "deep-research";
238
+ readonly Delay: "delay";
239
+ readonly FirecrawlAgent: "firecrawl-agent";
240
+ readonly Github: "github";
241
+ readonly Gmail: "gmail";
242
+ readonly GoogleAnalytics: "google-analytics";
243
+ readonly GoogleCalendar: "google-calendar";
244
+ readonly GoogleDrive: "google-drive";
245
+ readonly GoogleSearchConsole: "google-search-console";
246
+ readonly Grafana: "grafana";
247
+ readonly HumanApproval: "human-approval";
248
+ readonly ImageGeneration: "image-generation";
249
+ readonly Klang: "klang";
250
+ readonly Linear: "linear";
251
+ readonly Linkedin: "linkedin";
252
+ readonly LlmCall: "llm-call";
253
+ readonly Mailgun: "mailgun";
254
+ readonly MicrosoftCalendar: "microsoft-calendar";
255
+ readonly MicrosoftOnedrive: "microsoft-onedrive";
256
+ readonly MicrosoftOutlook: "microsoft-outlook";
257
+ readonly Miro: "miro";
258
+ readonly Monday: "monday";
259
+ readonly Notion: "notion";
260
+ readonly Omnivery: "omnivery";
261
+ readonly Pleo: "pleo";
262
+ readonly Posthog: "posthog";
263
+ readonly QueryDatabase: "query-database";
264
+ readonly Schedule: "schedule";
265
+ readonly Sentry: "sentry";
266
+ readonly Slack: "slack";
267
+ readonly Supabase: "supabase";
268
+ readonly Todoist: "todoist";
269
+ readonly Toggl: "toggl";
270
+ readonly UpdateKnowledgeDocument: "update-knowledge-document";
271
+ readonly Webhook: "webhook";
272
+ readonly Whatsapp: "whatsapp";
273
+ readonly WriteToDatabase: "write-to-database";
274
+ };
275
+ type DtoActionType = (typeof DtoActionType)[keyof typeof DtoActionType];
276
+ interface DtoAppChatApprovalRequest {
277
+ approved: boolean;
278
+ integrationTools?: DtoAppChatIntegrationTool[] | null;
279
+ model?: DtoLLM | null;
280
+ nativeTools?: DtoAppChatNativeTool[] | null;
281
+ providerKeyUuid?: string | null;
282
+ systemPrompt: string;
283
+ }
284
+ interface DtoAppChatIntegrationTool {
285
+ actionType: string;
286
+ integrationUuid: string;
287
+ requireApproval?: boolean | null;
288
+ }
289
+ interface DtoAppChatMessageRequest {
290
+ clientMessageId: string;
291
+ content: string;
292
+ integrationTools?: DtoAppChatIntegrationTool[] | null;
293
+ model?: DtoLLM | null;
294
+ nativeTools?: DtoAppChatNativeTool[] | null;
295
+ providerKeyUuid?: string | null;
296
+ sessionId?: string | null;
297
+ systemPrompt: string;
298
+ type?: DtoAppChatMessageType | null;
299
+ voiceDelegationId?: string | null;
300
+ }
301
+ declare const DtoAppChatMessageType: {
302
+ readonly VoiceDelegation: "voice_delegation";
303
+ };
304
+ type DtoAppChatMessageType = (typeof DtoAppChatMessageType)[keyof typeof DtoAppChatMessageType];
305
+ interface DtoAppChatNativeTool {
306
+ name: DtoTools;
307
+ requireApproval?: boolean | null;
308
+ }
309
+ interface DtoAppChatPendingApproval {
310
+ args?: Record<string, unknown>;
311
+ displayName?: string;
312
+ toolCallId: string;
313
+ toolName: string;
314
+ }
315
+ interface DtoAppChatSessionDetail {
316
+ chatType: DtoChatType;
317
+ createdAt: string;
318
+ hasActiveTurn: boolean;
319
+ id: string;
320
+ lastMessageAt?: string;
321
+ messageCount: number;
322
+ messages: DtoChatTimelineMessage[] | null;
323
+ pendingApproval?: DtoAppChatPendingApproval;
324
+ status: number;
325
+ title: string;
326
+ workflowUuid?: string;
327
+ }
328
+ interface DtoAppEditArtifact {
329
+ appId: string;
330
+ appName: string;
331
+ branchId: string;
332
+ branchTitle: string;
333
+ changedOutsideTools?: string[];
334
+ changedPaths?: string[];
335
+ conflict?: boolean;
336
+ createdApp?: boolean;
337
+ createdDraft?: boolean;
338
+ dependencyChanged?: boolean;
339
+ parentVersionId?: string;
340
+ versionId?: string;
341
+ versionNumber?: number;
342
+ }
343
+ interface DtoAppLiveVoiceSessionInput {
344
+ instructions?: string | null;
345
+ offerSdp: string;
346
+ sessionId?: string | null;
347
+ }
348
+ interface DtoAppLiveVoiceSessionOutput {
349
+ answerSdp: string;
350
+ expiresAt: string;
351
+ liveSessionId: string;
352
+ sessionId: string;
353
+ }
354
+ interface DtoAppVoiceLineInput {
355
+ content: string;
356
+ speaker: "user" | "assistant";
357
+ }
358
+ declare const DtoAwaitEventDeadlineBehavior: {
359
+ readonly ContinueExpired: "continueExpired";
360
+ readonly Fail: "fail";
361
+ };
362
+ type DtoAwaitEventDeadlineBehavior = (typeof DtoAwaitEventDeadlineBehavior)[keyof typeof DtoAwaitEventDeadlineBehavior];
363
+ interface DtoAwaitEventDetails {
364
+ awaitedEvents: DtoAwaitEventDetailsAwaitedEvent[] | null;
365
+ deadlineAt?: string;
366
+ deadlineBehavior?: DtoAwaitEventDeadlineBehavior;
367
+ expired: boolean;
368
+ resolutionReason?: string;
369
+ resolvedAt?: string;
370
+ resolvingEvent?: DtoEventMinimalMetadata;
371
+ startedAt: string;
372
+ status: string;
373
+ uuid: string;
374
+ }
375
+ interface DtoAwaitEventDetailsAwaitedEvent {
376
+ eventTypeIdentifier: string;
377
+ matcher: Record<string, unknown> | null;
378
+ }
379
+ interface DtoCallStorageDatabaseFunctionInput {
380
+ args?: Record<string, unknown> | null;
381
+ name: string;
382
+ }
383
+ interface DtoChatMessageContextRefs {
384
+ actionExecutionLogUuids?: string[];
385
+ appUuids?: string[];
386
+ databaseUuids?: string[];
387
+ eventUuids?: string[];
388
+ goalUuids?: string[];
389
+ jobUuids?: string[];
390
+ knowledgeUuids?: string[];
391
+ workflowUuids?: string[];
392
+ }
393
+ interface DtoChatSessionListOutput {
394
+ hasMore: boolean;
395
+ items: DtoChatSessionMetadata[];
396
+ nextCursor: string | null;
397
+ }
398
+ interface DtoChatSessionMetadata {
399
+ chatType: DtoChatType;
400
+ createdAt: string;
401
+ id: string;
402
+ lastMessageAt?: string;
403
+ messageCount: number;
404
+ status: number;
405
+ title: string;
406
+ workflowUuid?: string;
407
+ }
408
+ interface DtoChatTimelineArtifact {
409
+ appEdit?: DtoAppEditArtifact;
410
+ artifactType: string;
411
+ autoApplied?: boolean;
412
+ files?: DtoFileReference[];
413
+ goal?: DtoSavedGoalResponse;
414
+ id?: string;
415
+ initiateIntegration?: DtoInitiateIntegrationRequest;
416
+ jobConfig?: DtoJobBaseOutput;
417
+ jobConfigFull?: DtoJob;
418
+ knowledge?: DtoGeneratedKnowledgeArtifact;
419
+ knowledgeEdit?: DtoEditedKnowledgeArtifact;
420
+ navigateUser?: boolean;
421
+ plan?: DtoPlanArtifactOutput;
422
+ savedEntityUuid?: string;
423
+ testResult?: DtoTestRunResult;
424
+ toolAccessRequest?: DtoToolAccessRequest;
425
+ toolCallResult?: DtoToolCallResult;
426
+ workflow?: DtoWorkflowArtifact;
427
+ workflowDraft?: DtoWorkflowDraft;
428
+ }
429
+ interface DtoChatTimelineContextCompaction {
430
+ active?: boolean | null;
431
+ }
432
+ interface DtoChatTimelineErrorPayload {
433
+ code?: string | null;
434
+ message?: string | null;
435
+ }
436
+ interface DtoChatTimelineEvent {
437
+ chatType?: DtoChatType | null;
438
+ contextCompaction?: DtoChatTimelineContextCompaction | null;
439
+ delta?: DtoChatTimelineMessageDelta | null;
440
+ error?: DtoChatTimelineErrorPayload | null;
441
+ message?: DtoChatTimelineMessage | null;
442
+ sessionId?: string | null;
443
+ testRunProgress?: DtoTestRunProgressEvent | null;
444
+ toolApprovalInfo?: DtoToolApprovalRequest | null;
445
+ toolProgress?: DtoChatTimelineToolProgress | null;
446
+ type?: DtoChatTimelineEventType | null;
447
+ userActionReceipt?: DtoUserActionReceipt | null;
448
+ voiceDelegationResult?: DtoVoiceDelegationResultPayload | null;
449
+ voiceTranscript?: DtoVoiceTranscriptPayload | null;
450
+ }
451
+ declare const DtoChatTimelineEventType: {
452
+ readonly ContextCompaction: "context.compaction";
453
+ readonly Error: "error";
454
+ readonly GenerationCancelled: "generation.cancelled";
455
+ readonly GenerationFinished: "generation.finished";
456
+ readonly GenerationStarted: "generation.started";
457
+ readonly MessageCreated: "message.created";
458
+ readonly MessageDelta: "message.delta";
459
+ readonly MessageUpdated: "message.updated";
460
+ readonly SessionCreated: "session.created";
461
+ readonly TestRunProgress: "testRun.progress";
462
+ readonly TokenRefreshRequired: "token.refreshRequired";
463
+ readonly ToolApprovalRequired: "tool.approvalRequired";
464
+ readonly ToolProgress: "tool.progress";
465
+ readonly UserActionReceipt: "userAction.receipt";
466
+ readonly VoiceDelegationResult: "voice.delegationResult";
467
+ readonly VoiceTranscript: "voice.transcript";
468
+ };
469
+ type DtoChatTimelineEventType = (typeof DtoChatTimelineEventType)[keyof typeof DtoChatTimelineEventType];
470
+ interface DtoChatTimelineMessage {
471
+ agentType?: string;
472
+ artifacts?: DtoChatTimelineArtifact[];
473
+ clientMessageId?: string;
474
+ content: string;
475
+ contextRefs?: DtoChatMessageContextRefs;
476
+ createdAt: string;
477
+ files?: DtoFileReference[];
478
+ id: string;
479
+ latencyMs?: number;
480
+ messageType?: DtoMessageType;
481
+ parentSubAgentId?: string;
482
+ role: DtoMessageRole;
483
+ savedJobWorkflowUuid?: string;
484
+ subAgentId?: string;
485
+ threadUuid?: string;
486
+ uiSnapshot?: DtoChatViewSnapshot;
487
+ workflowBranchId?: string;
488
+ workflowBranchTitle?: string;
489
+ workflowEditChanges?: DtoWorkflowEditChange[];
490
+ workflowVersion?: number;
491
+ }
492
+ interface DtoChatTimelineMessageDelta {
493
+ content?: string | null;
494
+ isFinal?: boolean | null;
495
+ latencyMs?: number | null;
496
+ messageId?: string | null;
497
+ seq?: number | null;
498
+ subAgentId?: string | null;
499
+ targetType?: string | null;
500
+ threadUuid?: string | null;
501
+ }
502
+ interface DtoChatTimelineToolProgress {
503
+ frameIndex?: number | null;
504
+ isFinal?: boolean | null;
505
+ messageId?: string | null;
506
+ previewBase64?: string | null;
507
+ previewContentType?: string | null;
508
+ progress?: number | null;
509
+ subAgentId?: string | null;
510
+ threadUuid?: string | null;
511
+ toolName?: string | null;
512
+ }
513
+ declare const DtoChatType: {
514
+ readonly App: "app";
515
+ readonly Default: "default";
516
+ readonly Onboarding: "onboarding";
517
+ readonly Plan: "plan";
518
+ };
519
+ type DtoChatType = (typeof DtoChatType)[keyof typeof DtoChatType];
520
+ interface DtoChatViewApp {
521
+ appId: string;
522
+ branchId?: string;
523
+ previewPath?: string;
524
+ }
525
+ interface DtoChatViewJob {
526
+ jobId: string;
527
+ label: DtoChatViewLabel;
528
+ versionId?: string;
529
+ }
530
+ interface DtoChatViewJobBuilder {
531
+ branch?: DtoChatViewLabel;
532
+ branchId?: string;
533
+ editorMode: DtoChatViewJobEditorMode;
534
+ jobId?: string;
535
+ label?: DtoChatViewLabel;
536
+ mode: DtoChatViewJobBuilderMode;
537
+ openSections?: DtoChatViewJobSection[];
538
+ versionId?: string;
539
+ }
540
+ declare const DtoChatViewJobBuilderMode: {
541
+ readonly Create: "create";
542
+ readonly Edit: "edit";
543
+ readonly View: "view";
544
+ };
545
+ type DtoChatViewJobBuilderMode = (typeof DtoChatViewJobBuilderMode)[keyof typeof DtoChatViewJobBuilderMode];
546
+ declare const DtoChatViewJobEditorMode: {
547
+ readonly Advanced: "advanced";
548
+ readonly Overview: "overview";
549
+ };
550
+ type DtoChatViewJobEditorMode = (typeof DtoChatViewJobEditorMode)[keyof typeof DtoChatViewJobEditorMode];
551
+ declare const DtoChatViewJobSection: {
552
+ readonly Action: "action";
553
+ readonly General: "general";
554
+ readonly OutputEvent: "outputEvent";
555
+ readonly Trigger: "trigger";
556
+ };
557
+ type DtoChatViewJobSection = (typeof DtoChatViewJobSection)[keyof typeof DtoChatViewJobSection];
558
+ interface DtoChatViewKnowledge {
559
+ branch?: DtoChatViewLabel;
560
+ branchId?: string;
561
+ documentId: string;
562
+ label: DtoChatViewLabel;
563
+ versionId?: string;
564
+ }
565
+ interface DtoChatViewLabel {
566
+ name?: string;
567
+ resolution: DtoChatViewResolution;
568
+ }
569
+ declare const DtoChatViewResolution: {
570
+ readonly Resolved: "resolved";
571
+ readonly Unavailable: "unavailable";
572
+ };
573
+ type DtoChatViewResolution = (typeof DtoChatViewResolution)[keyof typeof DtoChatViewResolution];
574
+ interface DtoChatViewSnapshot {
575
+ app?: DtoChatViewApp;
576
+ highlightedJob?: DtoChatViewJob;
577
+ jobBuilder?: DtoChatViewJobBuilder;
578
+ knowledge?: DtoChatViewKnowledge;
579
+ routeKey?: string;
580
+ selectedJob?: DtoChatViewJob;
581
+ testPanel?: DtoChatViewTestPanel;
582
+ viewType: DtoChatViewType;
583
+ workflow?: DtoChatViewWorkflow;
584
+ }
585
+ interface DtoChatViewTestPanel {
586
+ job?: DtoChatViewLabel;
587
+ jobId?: string;
588
+ kind: DtoChatViewTestPanelKind;
589
+ }
590
+ declare const DtoChatViewTestPanelKind: {
591
+ readonly Current: "current";
592
+ readonly History: "history";
593
+ readonly Stored: "stored";
594
+ };
595
+ type DtoChatViewTestPanelKind = (typeof DtoChatViewTestPanelKind)[keyof typeof DtoChatViewTestPanelKind];
596
+ declare const DtoChatViewType: {
597
+ readonly AppCanvas: "appCanvas";
598
+ readonly Chat: "chat";
599
+ readonly JobEditor: "jobEditor";
600
+ readonly Knowledge: "knowledge";
601
+ readonly Other: "other";
602
+ readonly WorkflowCanvas: "workflowCanvas";
603
+ readonly WorkflowGoals: "workflowGoals";
604
+ readonly WorkflowLogs: "workflowLogs";
605
+ };
606
+ type DtoChatViewType = (typeof DtoChatViewType)[keyof typeof DtoChatViewType];
607
+ interface DtoChatViewWorkflow {
608
+ branch?: DtoChatViewLabel;
609
+ branchId?: string;
610
+ label: DtoChatViewLabel;
611
+ versionId?: string;
612
+ workflowId: string;
613
+ }
614
+ interface DtoCommandMessageWithUUID {
615
+ message: string;
616
+ uuid: string;
617
+ }
618
+ interface DtoCondition {
619
+ expectedValue: string;
620
+ expectedValueType: DtoExpectedValueType;
621
+ field: string;
622
+ type: DtoConditionType;
623
+ }
624
+ declare const DtoConditionType: {
625
+ readonly ContainsStatic: "containsStatic";
626
+ readonly EndsWithStatic: "endsWithStatic";
627
+ readonly EqualStatic: "equalStatic";
628
+ readonly GreaterThanStatic: "greaterThanStatic";
629
+ readonly LessThanStatic: "lessThanStatic";
630
+ readonly NotContainsStatic: "notContainsStatic";
631
+ readonly NotEndsWithStatic: "notEndsWithStatic";
632
+ readonly NotEqualStatic: "notEqualStatic";
633
+ readonly NotStartsWithStatic: "notStartsWithStatic";
634
+ readonly StartsWithStatic: "startsWithStatic";
635
+ };
636
+ type DtoConditionType = (typeof DtoConditionType)[keyof typeof DtoConditionType];
637
+ interface DtoCreateEmbeddingsRequest {
638
+ dimensions?: number | null;
639
+ input: string[];
640
+ model: DtoEmbeddingModel;
641
+ }
642
+ interface DtoCreateEmbeddingsResponse {
643
+ data: DtoEmbeddingDTO[];
644
+ dimensions: number;
645
+ model: DtoEmbeddingModel;
646
+ usage: DtoEmbeddingsUsageDTO;
647
+ }
648
+ interface DtoCreateLLMCallRequest {
649
+ input: string;
650
+ model: DtoLLM;
651
+ providerKeyUuid?: string | null;
652
+ system?: string | null;
653
+ }
654
+ interface DtoCreateLLMCallResponse {
655
+ model: DtoLLM;
656
+ text: string;
657
+ usage: DtoLLMCallUsageDTO;
658
+ }
659
+ interface DtoDeleteStorageDatabaseRowsInput {
660
+ count?: DtoStorageRowCount | null;
661
+ filters: DtoStorageRowFilter[];
662
+ select?: string | null;
663
+ single?: boolean | null;
664
+ table: string;
665
+ }
666
+ interface DtoEditedKnowledgeArtifact {
667
+ body: DtoKnowledgeVersionBodyOutput | null;
668
+ mediaRefs?: DtoKnowledgeImageReferenceInputOutput[];
669
+ originalBranchId: string;
670
+ originalKnowledgeId: string;
671
+ originalVersionId: string;
672
+ title: string;
673
+ }
674
+ interface DtoEmbeddingDTO {
675
+ embedding: number[];
676
+ index: number;
677
+ }
678
+ declare const DtoEmbeddingModel: {
679
+ readonly TextEmbedding3Large: "text-embedding-3-large";
680
+ readonly TextEmbedding3Small: "text-embedding-3-small";
681
+ };
682
+ type DtoEmbeddingModel = (typeof DtoEmbeddingModel)[keyof typeof DtoEmbeddingModel];
683
+ interface DtoEmbeddingsUsageDTO {
684
+ inputTokens: number;
685
+ }
686
+ interface DtoEventInputInput {
687
+ eventType: DtoEventTypeInput | null;
688
+ files?: DtoFileReferenceInput[] | null;
689
+ integrationUuid?: string | null;
690
+ namespaceId?: string | null;
691
+ properties?: Record<string, unknown> | null;
692
+ timestamp?: string | null;
693
+ uniqueKey?: string | null;
694
+ userAggregationId?: string | null;
695
+ userIdentifier?: string | null;
696
+ }
697
+ interface DtoEventInputOutput {
698
+ eventType: DtoEventTypeInput;
699
+ files?: DtoFileReferenceInput[];
700
+ integrationUuid?: string;
701
+ namespaceId?: string;
702
+ properties?: Record<string, unknown> | null;
703
+ timestamp?: string;
704
+ uniqueKey?: string;
705
+ userAggregationId?: string;
706
+ userIdentifier?: string;
707
+ }
708
+ interface DtoEventMinimalMetadata {
709
+ identifier: string;
710
+ uuid: string;
711
+ }
712
+ interface DtoEventTypeInput {
713
+ name: string;
714
+ provider: string;
715
+ }
716
+ interface DtoExecuteProgressEvent {
717
+ actionExecutionLogUuid?: string;
718
+ actionLog?: DtoActionLogOutput;
719
+ executionLog?: DtoActionExecutionLog;
720
+ jobUuid?: string;
721
+ message?: string;
722
+ occurredAt?: string;
723
+ pendingChildJobUuids?: string[];
724
+ publishedEvents?: DtoEventMinimalMetadata[];
725
+ rootJobUuid: string;
726
+ sequence?: number;
727
+ slug?: string;
728
+ status?: DtoExecutionStatus;
729
+ terminalReason?: DtoExecuteStreamTerminalReason;
730
+ triggered?: boolean;
731
+ type: DtoExecuteProgressEventType;
732
+ workflowTraceId?: string;
733
+ }
734
+ declare const DtoExecuteProgressEventType: {
735
+ readonly ActionLog: "action_log";
736
+ readonly ExecutionSnapshot: "execution_snapshot";
737
+ readonly RootStart: "root_start";
738
+ readonly Terminal: "terminal";
739
+ readonly Waiting: "waiting";
740
+ };
741
+ type DtoExecuteProgressEventType = (typeof DtoExecuteProgressEventType)[keyof typeof DtoExecuteProgressEventType];
742
+ declare const DtoExecuteStreamTerminalReason: {
743
+ readonly AwaitingApproval: "awaiting-approval";
744
+ readonly AwaitingDelay: "awaiting-delay";
745
+ readonly Cancelled: "cancelled";
746
+ readonly Failure: "failure";
747
+ readonly RootStartFailure: "root-start-failure";
748
+ readonly Success: "success";
749
+ };
750
+ type DtoExecuteStreamTerminalReason = (typeof DtoExecuteStreamTerminalReason)[keyof typeof DtoExecuteStreamTerminalReason];
751
+ declare const DtoExecutionInitiationOrigin: {
752
+ readonly Manual: "manual";
753
+ readonly Test: "test";
754
+ readonly Triggered: "triggered";
755
+ };
756
+ type DtoExecutionInitiationOrigin = (typeof DtoExecutionInitiationOrigin)[keyof typeof DtoExecutionInitiationOrigin];
757
+ declare const DtoExecutionStatus: {
758
+ readonly AwaitingApproval: "awaiting-approval";
759
+ readonly AwaitingDelay: "awaiting-delay";
760
+ readonly AwaitingEvent: "awaiting-event";
761
+ readonly BudgetExceeded: "budget-exceeded";
762
+ readonly Executing: "executing";
763
+ readonly Failure: "failure";
764
+ readonly NotExecuted: "not-executed";
765
+ readonly Rejected: "rejected";
766
+ readonly Success: "success";
767
+ readonly Timeout: "timeout";
768
+ };
769
+ type DtoExecutionStatus = (typeof DtoExecutionStatus)[keyof typeof DtoExecutionStatus];
770
+ declare const DtoExpectedValueType: {
771
+ readonly Bool: "bool";
772
+ readonly Float64: "float64";
773
+ readonly Int: "int";
774
+ readonly String: "string";
775
+ readonly Time: "time";
776
+ };
777
+ type DtoExpectedValueType = (typeof DtoExpectedValueType)[keyof typeof DtoExpectedValueType];
778
+ interface DtoFileReference {
779
+ contentType: string;
780
+ fileId: string;
781
+ filename: string;
782
+ size: number;
783
+ }
784
+ interface DtoFileReferenceInput {
785
+ fileId: string;
786
+ }
787
+ interface DtoGeneratedKnowledgeArtifact {
788
+ body: DtoKnowledgeVersionBodyOutput | null;
789
+ folderId?: string;
790
+ mediaRefs?: DtoKnowledgeImageReferenceInputOutput[];
791
+ title: string;
792
+ }
793
+ interface DtoGeneratorOutput {
794
+ eventTypeName: string | null;
795
+ eventTypeProvider: string | null;
796
+ integrationUuid?: string;
797
+ }
798
+ interface DtoGetNativeToolsOutput {
799
+ items: DtoToolMetadata[];
800
+ }
801
+ interface DtoGoalMeasurementCorrelatedSideOutput {
802
+ eventType: string;
803
+ filters?: DtoGoalMeasurementFilterOutput[];
804
+ joinKey: string;
805
+ }
806
+ interface DtoGoalMeasurementDefinitionOutput {
807
+ kind: DtoGoalMeasurementDefinitionKind;
808
+ metric: DtoGoalMeasurementMetricOutput;
809
+ rollingWindow: DtoGoalRollingWindow;
810
+ schemaVersion: number;
811
+ timeBucket: DtoGoalTimeBucket;
812
+ }
813
+ declare const DtoGoalMeasurementDefinitionKind: {
814
+ readonly GoalMeasurementDefinition: "GoalMeasurementDefinition";
815
+ };
816
+ type DtoGoalMeasurementDefinitionKind = (typeof DtoGoalMeasurementDefinitionKind)[keyof typeof DtoGoalMeasurementDefinitionKind];
817
+ interface DtoGoalMeasurementElapsedAggregateOutput {
818
+ op: DtoGoalMeasurementElapsedAggregateOperator;
819
+ percentile?: number;
820
+ }
821
+ declare const DtoGoalMeasurementElapsedAggregateOperator: {
822
+ readonly Avg: "avg";
823
+ readonly Max: "max";
824
+ readonly Min: "min";
825
+ readonly Percentile: "percentile";
826
+ };
827
+ type DtoGoalMeasurementElapsedAggregateOperator = (typeof DtoGoalMeasurementElapsedAggregateOperator)[keyof typeof DtoGoalMeasurementElapsedAggregateOperator];
828
+ interface DtoGoalMeasurementFilterOutput {
829
+ field: string;
830
+ op: DtoGoalMeasurementFilterOperator;
831
+ values?: DtoGoalMeasurementFilterValueOutput[];
832
+ }
833
+ declare const DtoGoalMeasurementFilterOperator: {
834
+ readonly Eq: "eq";
835
+ readonly Exists: "exists";
836
+ readonly In: "in";
837
+ readonly NotExists: "not_exists";
838
+ };
839
+ type DtoGoalMeasurementFilterOperator = (typeof DtoGoalMeasurementFilterOperator)[keyof typeof DtoGoalMeasurementFilterOperator];
840
+ interface DtoGoalMeasurementFilterValueOutput {
841
+ bool?: boolean;
842
+ isNull?: boolean;
843
+ number?: number;
844
+ string?: string;
845
+ }
846
+ interface DtoGoalMeasurementMetricOutput {
847
+ aggregate?: DtoGoalMeasurementElapsedAggregateOutput;
848
+ denominator?: DtoGoalMeasurementPopulationOutput;
849
+ eventType?: string;
850
+ filters?: DtoGoalMeasurementFilterOutput[];
851
+ from?: DtoGoalMeasurementCorrelatedSideOutput;
852
+ kind: DtoGoalMeasurementMetricKind;
853
+ numerator?: DtoGoalMeasurementPopulationOutput;
854
+ to?: DtoGoalMeasurementCorrelatedSideOutput;
855
+ }
856
+ declare const DtoGoalMeasurementMetricKind: {
857
+ readonly CorrelatedEventCount: "correlatedEventCount";
858
+ readonly ElapsedTime: "elapsedTime";
859
+ readonly EventCount: "eventCount";
860
+ readonly EventRatio: "eventRatio";
861
+ };
862
+ type DtoGoalMeasurementMetricKind = (typeof DtoGoalMeasurementMetricKind)[keyof typeof DtoGoalMeasurementMetricKind];
863
+ interface DtoGoalMeasurementPopulationOutput {
864
+ eventType: string;
865
+ filters?: DtoGoalMeasurementFilterOutput[];
866
+ }
867
+ interface DtoGoalRollingWindow {
868
+ count: number;
869
+ unit: DtoGoalRollingWindowUnit;
870
+ }
871
+ declare const DtoGoalRollingWindowUnit: {
872
+ readonly Day: "day";
873
+ readonly Month: "month";
874
+ readonly Week: "week";
875
+ readonly Year: "year";
876
+ };
877
+ type DtoGoalRollingWindowUnit = (typeof DtoGoalRollingWindowUnit)[keyof typeof DtoGoalRollingWindowUnit];
878
+ declare const DtoGoalTimeBucket: {
879
+ readonly Day: "day";
880
+ readonly Month: "month";
881
+ readonly Week: "week";
882
+ readonly Year: "year";
883
+ };
884
+ type DtoGoalTimeBucket = (typeof DtoGoalTimeBucket)[keyof typeof DtoGoalTimeBucket];
885
+ interface DtoInitiateIntegrationProviderMetadata {
886
+ description: string;
887
+ displayName: string;
888
+ logoDarkUrl?: string;
889
+ logoUrl: string;
890
+ }
891
+ interface DtoInitiateIntegrationRequest {
892
+ failureReason?: string;
893
+ integrationUuid?: string;
894
+ isAppInstall: boolean;
895
+ name: string;
896
+ originatingPlanArtifactId?: string;
897
+ prompt: string;
898
+ provider: string;
899
+ providerMetadata: DtoInitiateIntegrationProviderMetadata;
900
+ provisionSchema?: DtoProvisionSchema;
901
+ status?: DtoInitiateIntegrationStatus;
902
+ supportsOauth: boolean;
903
+ toolCallId: string;
904
+ }
905
+ declare const DtoInitiateIntegrationStatus: {
906
+ readonly Cancelled: "cancelled";
907
+ readonly Connected: "connected";
908
+ readonly Declined: "declined";
909
+ readonly Failed: "failed";
910
+ readonly Pending: "pending";
911
+ };
912
+ type DtoInitiateIntegrationStatus = (typeof DtoInitiateIntegrationStatus)[keyof typeof DtoInitiateIntegrationStatus];
913
+ interface DtoInsertStorageDatabaseRowsInput {
914
+ count?: DtoStorageRowCount | null;
915
+ defaultToNull?: boolean | null;
916
+ rows: Record<string, unknown>[];
917
+ select?: string | null;
918
+ single?: boolean | null;
919
+ table: string;
920
+ }
921
+ interface DtoIntegrationGrantNamespace {
922
+ key: string;
923
+ level: DtoIntegrationNamespaceLevel;
924
+ }
925
+ declare const DtoIntegrationNamespaceLevel: {
926
+ readonly Edit: "edit";
927
+ readonly View: "view";
928
+ };
929
+ type DtoIntegrationNamespaceLevel = (typeof DtoIntegrationNamespaceLevel)[keyof typeof DtoIntegrationNamespaceLevel];
930
+ declare const DtoIntegrationNamespaceScope: {
931
+ readonly All: "all";
932
+ readonly Selected: "selected";
933
+ readonly Source: "source";
934
+ };
935
+ type DtoIntegrationNamespaceScope = (typeof DtoIntegrationNamespaceScope)[keyof typeof DtoIntegrationNamespaceScope];
936
+ interface DtoIntegrationToolDTO {
937
+ actionType: string;
938
+ integrationUuid: string;
939
+ }
940
+ declare const DtoIntegrationToolScope: {
941
+ readonly All: "all";
942
+ readonly Selected: "selected";
943
+ };
944
+ type DtoIntegrationToolScope = (typeof DtoIntegrationToolScope)[keyof typeof DtoIntegrationToolScope];
945
+ interface DtoJob {
946
+ action: DtoActionOutput;
947
+ description: string;
948
+ generator?: DtoGeneratorOutput;
949
+ jobAccountAccess?: DtoSavedJobAccountAccess[];
950
+ knowledgeContext?: DtoKnowledgeContextDTOOutput;
951
+ name: string;
952
+ notifyOnFailure?: boolean;
953
+ status: DtoStatus;
954
+ timeout: number;
955
+ toolAccess?: DtoJobToolAccessOutput;
956
+ trigger?: DtoTriggerOutput;
957
+ uuid: string;
958
+ versionId?: string;
959
+ }
960
+ declare const DtoJobAccountAccessLevel: {
961
+ readonly Edit: "edit";
962
+ readonly View: "view";
963
+ };
964
+ type DtoJobAccountAccessLevel = (typeof DtoJobAccountAccessLevel)[keyof typeof DtoJobAccountAccessLevel];
965
+ declare const DtoJobAccountAccessNeedReason: {
966
+ readonly RiskyCombination: "risky-combination";
967
+ };
968
+ type DtoJobAccountAccessNeedReason = (typeof DtoJobAccountAccessNeedReason)[keyof typeof DtoJobAccountAccessNeedReason];
969
+ interface DtoJobBaseOutput {
970
+ action: DtoActionOutput;
971
+ description: string;
972
+ generator?: DtoGeneratorOutput;
973
+ knowledgeContext?: DtoKnowledgeContextDTOOutput;
974
+ name: string;
975
+ notifyOnFailure?: boolean;
976
+ status: DtoStatus;
977
+ timeout: number;
978
+ toolAccess?: DtoJobToolAccessOutput;
979
+ trigger?: DtoTriggerOutput;
980
+ }
981
+ interface DtoJobDraft {
982
+ actionType?: string;
983
+ description: string;
984
+ generatorEventIdentifier: string;
985
+ jobGenerationPrompt: string;
986
+ jobId: string;
987
+ name: string;
988
+ outputEventIdentifier?: string;
989
+ requiredInputProperties?: string[];
990
+ subAction?: string;
991
+ }
992
+ interface DtoJobExecuteRequest {
993
+ actionExecutionUuid?: string | null;
994
+ branchId?: string | null;
995
+ event?: DtoEventInputInput | null;
996
+ executeIntegrationCommand?: boolean | null;
997
+ executeIntegrationQuery?: boolean | null;
998
+ publishEvents?: boolean | null;
999
+ sourceEventUuid?: string | null;
1000
+ sourceExecutionUuid?: string | null;
1001
+ }
1002
+ interface DtoJobToolAccessOutput {
1003
+ approvedIntegrationTools?: DtoIntegrationToolDTO[];
1004
+ approvedNativeTools?: DtoTools[];
1005
+ databases: DtoJobToolAccessPartOutput;
1006
+ documents: DtoJobToolAccessPartOutput;
1007
+ events?: DtoJobToolAccessEventsOutput;
1008
+ excludedIntegrationTools?: DtoIntegrationToolDTO[];
1009
+ }
1010
+ interface DtoJobToolAccessEventSource {
1011
+ kind: DtoJobToolAccessEventSourceKind;
1012
+ sourceUuid: string;
1013
+ }
1014
+ declare const DtoJobToolAccessEventSourceKind: {
1015
+ readonly Connection: "connection";
1016
+ readonly Database: "database";
1017
+ readonly EventType: "eventType";
1018
+ readonly Workflow: "workflow";
1019
+ };
1020
+ type DtoJobToolAccessEventSourceKind = (typeof DtoJobToolAccessEventSourceKind)[keyof typeof DtoJobToolAccessEventSourceKind];
1021
+ interface DtoJobToolAccessEventsOutput {
1022
+ scope: DtoJobToolAccessScope;
1023
+ sources: DtoJobToolAccessEventSource[] | null;
1024
+ }
1025
+ interface DtoJobToolAccessPartOutput {
1026
+ resources: DtoJobToolAccessResource[] | null;
1027
+ scope: DtoJobToolAccessScope;
1028
+ }
1029
+ interface DtoJobToolAccessResource {
1030
+ level: DtoJobAccountAccessLevel;
1031
+ resourceUuid: string;
1032
+ }
1033
+ declare const DtoJobToolAccessScope: {
1034
+ readonly Any: "any";
1035
+ readonly Selected: "selected";
1036
+ };
1037
+ type DtoJobToolAccessScope = (typeof DtoJobToolAccessScope)[keyof typeof DtoJobToolAccessScope];
1038
+ interface DtoKnowledgeContextDTOOutput {
1039
+ inheritFromWorkflow: boolean;
1040
+ knowledgeRefs: DtoKnowledgeReferenceDTO[] | null;
1041
+ }
1042
+ interface DtoKnowledgeImageReferenceInputOutput {
1043
+ altText?: string;
1044
+ caption?: string;
1045
+ fileId: string;
1046
+ }
1047
+ interface DtoKnowledgeReferenceDTO {
1048
+ knowledgeUuid: string;
1049
+ }
1050
+ interface DtoKnowledgeVersionBodyOutput {
1051
+ blocks: Record<string, unknown>[] | null;
1052
+ }
1053
+ declare const DtoLLM: {
1054
+ readonly AnthropicClaudeFable5: "anthropic/claude-fable-5";
1055
+ readonly AnthropicClaudeFable51: "anthropic/claude-fable-5-1";
1056
+ readonly AnthropicClaudeFable52: "anthropic/claude-fable-5-2";
1057
+ readonly AnthropicClaudeHaiku45: "anthropic/claude-haiku-4-5";
1058
+ readonly AnthropicClaudeHaiku55: "anthropic/claude-haiku-5-5";
1059
+ readonly AnthropicClaudeOpus45: "anthropic/claude-opus-4-5";
1060
+ readonly AnthropicClaudeOpus46: "anthropic/claude-opus-4-6";
1061
+ readonly AnthropicClaudeOpus47: "anthropic/claude-opus-4-7";
1062
+ readonly AnthropicClaudeOpus48: "anthropic/claude-opus-4-8";
1063
+ readonly AnthropicClaudeOpus5: "anthropic/claude-opus-5";
1064
+ readonly AnthropicClaudeOpus55: "anthropic/claude-opus-5-5";
1065
+ readonly AnthropicClaudeSonnet46: "anthropic/claude-sonnet-4-6";
1066
+ readonly AnthropicClaudeSonnet55: "anthropic/claude-sonnet-5-5";
1067
+ readonly BergetGemma431b: "berget/gemma-4-31b";
1068
+ readonly BergetGlm53Flash: "berget/glm-5.3-flash";
1069
+ readonly BergetKimiK31Pro: "berget/kimi-k3.1-pro";
1070
+ readonly CerebrasGemma431b: "cerebras/gemma-4-31b";
1071
+ readonly CerebrasGptOss120b: "cerebras/gpt-oss-120b";
1072
+ readonly CerebrasQwen3827b: "cerebras/qwen-3.8-27b";
1073
+ readonly GoogleGemini30Flash: "google/gemini-3.0-flash";
1074
+ readonly GoogleGemini31FlashLite: "google/gemini-3.1-flash-lite";
1075
+ readonly GoogleGemini31Pro: "google/gemini-3.1-pro";
1076
+ readonly GoogleGemini35Flash: "google/gemini-3.5-flash";
1077
+ readonly GoogleGemini35FlashLite: "google/gemini-3.5-flash-lite";
1078
+ readonly GoogleGemini38Flash: "google/gemini-3.8-flash";
1079
+ readonly GoogleGemini4Argon: "google/gemini-4-argon";
1080
+ readonly GoogleGemini4Carbon: "google/gemini-4-carbon";
1081
+ readonly GroqGptOss120b: "groq/gpt-oss-120b";
1082
+ readonly GroqGptOss20b: "groq/gpt-oss-20b";
1083
+ readonly MistralMistralLarge4: "mistral/mistral-large-4";
1084
+ readonly OpenaiGpt41: "openai/gpt-4.1";
1085
+ readonly OpenaiGpt41Mini: "openai/gpt-4.1-mini";
1086
+ readonly OpenaiGpt4o: "openai/gpt-4o";
1087
+ readonly OpenaiGpt4oMini: "openai/gpt-4o-mini";
1088
+ readonly OpenaiGpt51: "openai/gpt-5.1";
1089
+ readonly OpenaiGpt52: "openai/gpt-5.2";
1090
+ readonly OpenaiGpt54: "openai/gpt-5.4";
1091
+ readonly OpenaiGpt54Mini: "openai/gpt-5.4-mini";
1092
+ readonly OpenaiGpt54Nano: "openai/gpt-5.4-nano";
1093
+ readonly OpenaiGpt55: "openai/gpt-5.5";
1094
+ readonly OpenaiGpt56Luna: "openai/gpt-5.6-luna";
1095
+ readonly OpenaiGpt56Sol: "openai/gpt-5.6-sol";
1096
+ readonly OpenaiGpt56Terra: "openai/gpt-5.6-terra";
1097
+ readonly OpenaiGpt6Astra: "openai/gpt-6-astra";
1098
+ readonly OpenaiGpt6Luna: "openai/gpt-6-luna";
1099
+ readonly OpenaiGpt6Sol: "openai/gpt-6-sol";
1100
+ readonly OpenaiGpt61Sol: "openai/gpt-6.1-sol";
1101
+ readonly OpenaiGpt61Terra: "openai/gpt-6.1-terra";
1102
+ readonly OpenrouterDeepseekV32: "openrouter/deepseek-v3.2";
1103
+ readonly OpenrouterDeepseekV4Flash: "openrouter/deepseek-v4-flash";
1104
+ readonly OpenrouterDeepseekV4Pro: "openrouter/deepseek-v4-pro";
1105
+ readonly OpenrouterDeepseekV41Flash1017: "openrouter/deepseek-v4.1-flash-1017";
1106
+ readonly OpenrouterGlm5: "openrouter/glm-5";
1107
+ readonly OpenrouterGlm52: "openrouter/glm-5.2";
1108
+ readonly OpenrouterGlm53: "openrouter/glm-5.3";
1109
+ readonly OpenrouterGlm53Flash: "openrouter/glm-5.3-flash";
1110
+ readonly OpenrouterKimiK25: "openrouter/kimi-k2.5";
1111
+ readonly OpenrouterKimiK26: "openrouter/kimi-k2.6";
1112
+ readonly OpenrouterKimiK27Code: "openrouter/kimi-k2.7-code";
1113
+ readonly OpenrouterKimiK3: "openrouter/kimi-k3";
1114
+ readonly OpenrouterMinimaxM3: "openrouter/minimax-m3";
1115
+ readonly OpenrouterMuseSpark13: "openrouter/muse-spark-1.3";
1116
+ readonly OpenrouterMuseWonder: "openrouter/muse-wonder";
1117
+ readonly XaiGrok420NonReasoning: "xai/grok-4.20-non-reasoning";
1118
+ readonly XaiGrok420Reasoning: "xai/grok-4.20-reasoning";
1119
+ readonly XaiGrok43: "xai/grok-4.3";
1120
+ readonly XaiGrok45: "xai/grok-4.5";
1121
+ readonly XaiGrok46: "xai/grok-4.6";
1122
+ readonly XaiGrok47: "xai/grok-4.7";
1123
+ };
1124
+ type DtoLLM = (typeof DtoLLM)[keyof typeof DtoLLM];
1125
+ interface DtoLLMCallUsageDTO {
1126
+ inputTokens: number;
1127
+ outputTokens: number;
1128
+ }
1129
+ declare const DtoMessageRole: {
1130
+ readonly Ai: "ai";
1131
+ readonly System: "system";
1132
+ readonly User: "user";
1133
+ };
1134
+ type DtoMessageRole = (typeof DtoMessageRole)[keyof typeof DtoMessageRole];
1135
+ declare const DtoMessageType: {
1136
+ readonly AiResponse: "ai_response";
1137
+ readonly Error: "error";
1138
+ readonly GenerationCancelled: "generation_cancelled";
1139
+ readonly GenerationFinished: "generation_finished";
1140
+ readonly GenerationStarted: "generation_started";
1141
+ readonly InitiateIntegration: "initiate_integration";
1142
+ readonly Progress: "progress";
1143
+ readonly SessionCreated: "session_created";
1144
+ readonly SubAgentFinished: "sub_agent_finished";
1145
+ readonly SubAgentStarted: "sub_agent_started";
1146
+ readonly SystemTrigger: "system_trigger";
1147
+ readonly Thinking: "thinking";
1148
+ readonly ToolAccessRequest: "tool_access_request";
1149
+ readonly ToolApprovalRequired: "tool_approval_required";
1150
+ readonly ToolFinished: "tool_finished";
1151
+ readonly ToolStarted: "tool_started";
1152
+ readonly UserAction: "user_action";
1153
+ readonly UserInput: "user_input";
1154
+ readonly VoiceAssistant: "voice_assistant";
1155
+ readonly VoiceUser: "voice_user";
1156
+ };
1157
+ type DtoMessageType = (typeof DtoMessageType)[keyof typeof DtoMessageType];
1158
+ interface DtoOperationOutput {
1159
+ conditions?: DtoCondition[];
1160
+ operations?: DtoOperationOutput[];
1161
+ type: "and" | "or";
1162
+ }
1163
+ interface DtoOutputEventConfig {
1164
+ eventTypeIdentifier: string;
1165
+ properties?: Record<string, unknown> | null;
1166
+ }
1167
+ interface DtoPeopleAndTeamsChangePreview {
1168
+ personName?: string | null;
1169
+ teamName?: string | null;
1170
+ }
1171
+ interface DtoPlanArtifactOutput {
1172
+ allowedExecutionTools?: DtoRequestToolAccessToolInput[];
1173
+ artifactId?: string;
1174
+ currentTodoId?: string;
1175
+ executionRunId?: string;
1176
+ executionStatus?: DtoPlanExecutionStatus;
1177
+ markdown: string;
1178
+ title: string;
1179
+ todos?: DtoPlanTodoOutput[];
1180
+ toolAccessRequests?: DtoRequestToolAccessToolInput[];
1181
+ updatedAt: string;
1182
+ }
1183
+ declare const DtoPlanExecutionStatus: {
1184
+ readonly Abandoned: "abandoned";
1185
+ readonly Completed: "completed";
1186
+ readonly Failed: "failed";
1187
+ readonly Pending: "pending";
1188
+ readonly Running: "running";
1189
+ readonly WaitingForUser: "waiting_for_user";
1190
+ };
1191
+ type DtoPlanExecutionStatus = (typeof DtoPlanExecutionStatus)[keyof typeof DtoPlanExecutionStatus];
1192
+ interface DtoPlanTodoOutput {
1193
+ artifactRefs?: string[];
1194
+ description?: string;
1195
+ error?: string;
1196
+ executionStatus?: DtoPlanTodoExecutionStatus;
1197
+ id: string;
1198
+ output?: string;
1199
+ status: DtoPlanTodoStatus;
1200
+ text: string;
1201
+ }
1202
+ declare const DtoPlanTodoExecutionStatus: {
1203
+ readonly Completed: "completed";
1204
+ readonly Failed: "failed";
1205
+ readonly Pending: "pending";
1206
+ readonly Running: "running";
1207
+ readonly WaitingForUser: "waiting_for_user";
1208
+ };
1209
+ type DtoPlanTodoExecutionStatus = (typeof DtoPlanTodoExecutionStatus)[keyof typeof DtoPlanTodoExecutionStatus];
1210
+ declare const DtoPlanTodoStatus: {
1211
+ readonly Blocked: "blocked";
1212
+ readonly Done: "done";
1213
+ readonly InProgress: "in_progress";
1214
+ readonly Pending: "pending";
1215
+ };
1216
+ type DtoPlanTodoStatus = (typeof DtoPlanTodoStatus)[keyof typeof DtoPlanTodoStatus];
1217
+ interface DtoProvisionField {
1218
+ description?: string;
1219
+ id: string;
1220
+ label: string;
1221
+ permissions?: string[];
1222
+ placeholder?: string;
1223
+ required: boolean;
1224
+ sensitive: boolean;
1225
+ type: string;
1226
+ validation?: DtoProvisionFieldValidation;
1227
+ }
1228
+ interface DtoProvisionFieldValidation {
1229
+ message?: string;
1230
+ pattern?: string;
1231
+ }
1232
+ interface DtoProvisionSchema {
1233
+ fields: DtoProvisionField[] | null;
1234
+ }
1235
+ interface DtoPublishEventTypeDTO {
1236
+ name?: string;
1237
+ provider: string;
1238
+ }
1239
+ interface DtoRequestToolAccessToolInput {
1240
+ reason: string;
1241
+ toolKey: string;
1242
+ toolType: DtoRequestToolAccessToolType;
1243
+ }
1244
+ declare const DtoRequestToolAccessToolType: {
1245
+ readonly Integration: "integration";
1246
+ readonly Native: "native";
1247
+ };
1248
+ type DtoRequestToolAccessToolType = (typeof DtoRequestToolAccessToolType)[keyof typeof DtoRequestToolAccessToolType];
1249
+ declare const DtoResourceAccessChangeCapability: {
1250
+ readonly Edit: "edit";
1251
+ readonly Owner: "owner";
1252
+ readonly Remove: "remove";
1253
+ readonly View: "view";
1254
+ };
1255
+ type DtoResourceAccessChangeCapability = (typeof DtoResourceAccessChangeCapability)[keyof typeof DtoResourceAccessChangeCapability];
1256
+ interface DtoResourceAccessChangePreview {
1257
+ changes?: DtoResourceAccessChangePreviewChange[] | null;
1258
+ items: DtoResourceAccessChangePreviewItem[];
1259
+ nativeToolChanges?: DtoResourceAccessNativeToolPreview[] | null;
1260
+ }
1261
+ interface DtoResourceAccessChangePreviewChange {
1262
+ capability?: DtoResourceAccessChangeCapability | null;
1263
+ currentCapability?: string | null;
1264
+ currentIntegrationScope?: DtoResourceAccessIntegrationScope | null;
1265
+ currentNamespaceScope?: DtoIntegrationNamespaceScope | null;
1266
+ currentNamespaces?: DtoIntegrationGrantNamespace[] | null;
1267
+ impact?: DtoAccessReductionImpact | null;
1268
+ impactError?: DtoResourceAccessItemError | null;
1269
+ itemId: string;
1270
+ itemKind: DtoResourceAccessItemKind;
1271
+ namespaceScope?: DtoIntegrationNamespaceScope | null;
1272
+ namespaces?: DtoIntegrationGrantNamespace[] | null;
1273
+ proposedIntegrationScope?: DtoResourceAccessIntegrationScope | null;
1274
+ subjectId: string;
1275
+ subjectKind: DtoResourceAccessChangeSubjectKind;
1276
+ subjectName?: string | null;
1277
+ }
1278
+ interface DtoResourceAccessChangePreviewItem {
1279
+ effectiveCapability?: string | null;
1280
+ error?: DtoResourceAccessItemError | null;
1281
+ id: string;
1282
+ kind: DtoResourceAccessItemKind;
1283
+ name?: string | null;
1284
+ }
1285
+ declare const DtoResourceAccessChangeSubjectKind: {
1286
+ readonly App: "app";
1287
+ readonly OrganisationAdministrators: "organisation_administrators";
1288
+ readonly OrganisationAudience: "organisation_audience";
1289
+ readonly Team: "team";
1290
+ readonly User: "user";
1291
+ };
1292
+ type DtoResourceAccessChangeSubjectKind = (typeof DtoResourceAccessChangeSubjectKind)[keyof typeof DtoResourceAccessChangeSubjectKind];
1293
+ interface DtoResourceAccessIntegrationScope {
1294
+ actionTypes?: string[] | null;
1295
+ namespaceScope?: DtoIntegrationNamespaceScope | null;
1296
+ namespaces?: DtoIntegrationGrantNamespace[] | null;
1297
+ toolScope?: DtoIntegrationToolScope | null;
1298
+ }
1299
+ interface DtoResourceAccessItemError {
1300
+ message?: string | null;
1301
+ slug?: string | null;
1302
+ }
1303
+ declare const DtoResourceAccessItemKind: {
1304
+ readonly App: "app";
1305
+ readonly Database: "database";
1306
+ readonly EventType: "eventType";
1307
+ readonly Folder: "folder";
1308
+ readonly Integration: "integration";
1309
+ readonly Knowledge: "knowledge";
1310
+ readonly Workflow: "workflow";
1311
+ };
1312
+ type DtoResourceAccessItemKind = (typeof DtoResourceAccessItemKind)[keyof typeof DtoResourceAccessItemKind];
1313
+ interface DtoResourceAccessNativeToolPreview {
1314
+ appId?: string | null;
1315
+ appName?: string | null;
1316
+ currentTools?: string[] | null;
1317
+ effectiveCapability?: string | null;
1318
+ error?: DtoResourceAccessItemError | null;
1319
+ tools?: string[] | null;
1320
+ }
1321
+ interface DtoSavedGoalResponse {
1322
+ analyticsQuery: DtoGoalMeasurementDefinitionOutput;
1323
+ createdAt: string;
1324
+ description: string;
1325
+ name: string;
1326
+ targetDirection?: DtoTargetDirection;
1327
+ targetValue?: number;
1328
+ updatedAt: string;
1329
+ uuid: string;
1330
+ workflowIds?: string[];
1331
+ }
1332
+ interface DtoSavedJobAccountAccess {
1333
+ accountUuid: string;
1334
+ blockedNeeds: boolean;
1335
+ branchId?: string;
1336
+ jobName: string;
1337
+ jobUuid: string;
1338
+ needsAccess: boolean;
1339
+ reasons?: DtoJobAccountAccessNeedReason[];
1340
+ workflowUuid: string;
1341
+ }
1342
+ interface DtoSelectStorageDatabaseRowsInput {
1343
+ count?: DtoStorageRowCount | null;
1344
+ filters?: DtoStorageRowFilter[] | null;
1345
+ limit?: number | null;
1346
+ offset?: number | null;
1347
+ order?: DtoStorageRowOrder[] | null;
1348
+ select?: string | null;
1349
+ single?: boolean | null;
1350
+ table: string;
1351
+ }
1352
+ declare const DtoStatus: {
1353
+ readonly AiDraft: "AI-Draft";
1354
+ readonly Draft: "Draft";
1355
+ readonly Live: "Live";
1356
+ readonly Paused: "Paused";
1357
+ };
1358
+ type DtoStatus = (typeof DtoStatus)[keyof typeof DtoStatus];
1359
+ interface DtoStorageDatabaseFunctionResult {
1360
+ data: unknown;
1361
+ }
1362
+ interface DtoStorageDatabaseRows {
1363
+ count?: number;
1364
+ rows: Record<string, unknown>[] | null;
1365
+ }
1366
+ declare const DtoStorageRowCount: {
1367
+ readonly Exact: "exact";
1368
+ };
1369
+ type DtoStorageRowCount = (typeof DtoStorageRowCount)[keyof typeof DtoStorageRowCount];
1370
+ interface DtoStorageRowFilter {
1371
+ and?: DtoStorageRowFilter[] | null;
1372
+ column?: string | null;
1373
+ not?: boolean | null;
1374
+ operator?: DtoStorageRowFilterOperator | null;
1375
+ or?: DtoStorageRowFilter[] | null;
1376
+ value?: string | null;
1377
+ values?: string[] | null;
1378
+ }
1379
+ declare const DtoStorageRowFilterOperator: {
1380
+ readonly Eq: "eq";
1381
+ readonly Gt: "gt";
1382
+ readonly Gte: "gte";
1383
+ readonly Ilike: "ilike";
1384
+ readonly In: "in";
1385
+ readonly Is: "is";
1386
+ readonly Like: "like";
1387
+ readonly Lt: "lt";
1388
+ readonly Lte: "lte";
1389
+ readonly Neq: "neq";
1390
+ };
1391
+ type DtoStorageRowFilterOperator = (typeof DtoStorageRowFilterOperator)[keyof typeof DtoStorageRowFilterOperator];
1392
+ interface DtoStorageRowOrder {
1393
+ ascending?: boolean | null;
1394
+ column: string;
1395
+ nullsFirst?: boolean | null;
1396
+ }
1397
+ interface DtoStorageToolDTO {
1398
+ databaseUuid: string;
1399
+ tool: DtoTools;
1400
+ }
1401
+ declare const DtoTargetDirection: {
1402
+ readonly Gte: "gte";
1403
+ readonly Lte: "lte";
1404
+ };
1405
+ type DtoTargetDirection = (typeof DtoTargetDirection)[keyof typeof DtoTargetDirection];
1406
+ interface DtoTestRunFlags {
1407
+ executeIntegrationCommand: boolean;
1408
+ executeIntegrationQuery: boolean;
1409
+ publishEvents: boolean;
1410
+ }
1411
+ interface DtoTestRunJobResult {
1412
+ actionExecutionLog?: DtoActionExecutionLog;
1413
+ actionExecutionUuid?: string;
1414
+ completedAt: string;
1415
+ error?: string;
1416
+ inputEvent?: DtoEventInputOutput;
1417
+ jobName: string;
1418
+ jobSnapshot?: DtoJob;
1419
+ jobUuid: string;
1420
+ jobVersionId?: string;
1421
+ outputEvent?: DtoEventInputOutput;
1422
+ startedAt: string;
1423
+ status: DtoTestRunStatus;
1424
+ triggered: boolean;
1425
+ workflowVersionId?: string;
1426
+ }
1427
+ declare const DtoTestRunKind: {
1428
+ readonly Job: "job";
1429
+ readonly Workflow: "workflow";
1430
+ };
1431
+ type DtoTestRunKind = (typeof DtoTestRunKind)[keyof typeof DtoTestRunKind];
1432
+ interface DtoTestRunProgressEvent {
1433
+ actionExecutionLogUuid?: string;
1434
+ actionLog?: DtoActionLogOutput;
1435
+ branchId?: string;
1436
+ inputEvent?: DtoEventInputOutput;
1437
+ jobName?: string;
1438
+ jobResult?: DtoTestRunJobResult;
1439
+ jobUuid?: string;
1440
+ message?: string;
1441
+ result?: DtoTestRunResult;
1442
+ slug?: string;
1443
+ testRunUuid?: string;
1444
+ type: DtoTestRunProgressEventType;
1445
+ workflowUuid?: string;
1446
+ }
1447
+ declare const DtoTestRunProgressEventType: {
1448
+ readonly ActionLog: "action_log";
1449
+ readonly Error: "error";
1450
+ readonly Finished: "finished";
1451
+ readonly JobFinished: "job_finished";
1452
+ readonly JobStarted: "job_started";
1453
+ };
1454
+ type DtoTestRunProgressEventType = (typeof DtoTestRunProgressEventType)[keyof typeof DtoTestRunProgressEventType];
1455
+ interface DtoTestRunResult {
1456
+ branchId?: string;
1457
+ completedAt: string;
1458
+ error?: string;
1459
+ executions?: DtoActionExecutionLog[];
1460
+ flags: DtoTestRunFlags;
1461
+ inputEvent?: DtoEventInputOutput;
1462
+ jobs: DtoTestRunJobResult[] | null;
1463
+ kind: DtoTestRunKind;
1464
+ overallStatus: DtoTestRunStatus;
1465
+ sourceEventUuid?: string;
1466
+ startedAt: string;
1467
+ state?: DtoTestRunState;
1468
+ summary: string;
1469
+ targetUuid?: string;
1470
+ testRunUuid?: string;
1471
+ workflowName?: string;
1472
+ workflowSnapshot?: DtoWorkflow;
1473
+ workflowUuid?: string;
1474
+ workflowVersionId?: string;
1475
+ }
1476
+ declare const DtoTestRunState: {
1477
+ readonly Cancelled: "cancelled";
1478
+ readonly Completed: "completed";
1479
+ readonly Running: "running";
1480
+ };
1481
+ type DtoTestRunState = (typeof DtoTestRunState)[keyof typeof DtoTestRunState];
1482
+ declare const DtoTestRunStatus: {
1483
+ readonly Errored: "errored";
1484
+ readonly Failed: "failed";
1485
+ readonly Passed: "passed";
1486
+ };
1487
+ type DtoTestRunStatus = (typeof DtoTestRunStatus)[keyof typeof DtoTestRunStatus];
1488
+ interface DtoToolAccessRequest {
1489
+ actionType?: string;
1490
+ approvalGroup?: string;
1491
+ displayName: string;
1492
+ integrationUuid?: string;
1493
+ provider?: string;
1494
+ reason: string;
1495
+ status?: DtoToolAccessRequestStatus;
1496
+ toolCallId: string;
1497
+ toolKey: string;
1498
+ toolType: string;
1499
+ }
1500
+ declare const DtoToolAccessRequestStatus: {
1501
+ readonly Cancelled: "cancelled";
1502
+ readonly Denied: "denied";
1503
+ readonly Failed: "failed";
1504
+ readonly Granted: "granted";
1505
+ readonly Pending: "pending";
1506
+ };
1507
+ type DtoToolAccessRequestStatus = (typeof DtoToolAccessRequestStatus)[keyof typeof DtoToolAccessRequestStatus];
1508
+ interface DtoToolAnnotations {
1509
+ destructive: boolean;
1510
+ idempotent: boolean;
1511
+ openWorld: boolean;
1512
+ readOnly: boolean;
1513
+ }
1514
+ declare const DtoToolApprovalMode: {
1515
+ readonly AutoAccept: "auto_accept";
1516
+ readonly RequireApproval: "require_approval";
1517
+ readonly RequireApprovalAutoAccept: "require_approval_auto_accept";
1518
+ };
1519
+ type DtoToolApprovalMode = (typeof DtoToolApprovalMode)[keyof typeof DtoToolApprovalMode];
1520
+ interface DtoToolApprovalPreview {
1521
+ peopleAndTeamsChange?: DtoPeopleAndTeamsChangePreview | null;
1522
+ resourceAccessChange?: DtoResourceAccessChangePreview | null;
1523
+ }
1524
+ interface DtoToolApprovalRequest {
1525
+ approvalGroup?: string | null;
1526
+ approvalMode?: DtoToolApprovalMode | null;
1527
+ args?: Record<string, unknown> | null;
1528
+ displayName?: string | null;
1529
+ preview?: DtoToolApprovalPreview | null;
1530
+ timeoutMs?: number | null;
1531
+ toolCallId?: string | null;
1532
+ toolName?: string | null;
1533
+ viewingBranchId?: string | null;
1534
+ }
1535
+ interface DtoToolCallResult {
1536
+ args?: Record<string, unknown>;
1537
+ displayName?: string;
1538
+ error?: string;
1539
+ integrationName?: string;
1540
+ integrationUuid?: string;
1541
+ provider?: string;
1542
+ result?: Record<string, unknown>;
1543
+ success: boolean;
1544
+ toolCallId: string;
1545
+ toolName: string;
1546
+ }
1547
+ interface DtoToolMetadata {
1548
+ actionLabel?: string;
1549
+ actionType: string;
1550
+ annotations: DtoToolAnnotations;
1551
+ category: string;
1552
+ description: string;
1553
+ inputSchema: Record<string, unknown> | null;
1554
+ instanceName?: string;
1555
+ integrationUuid?: string;
1556
+ name: string;
1557
+ outputSchema?: Record<string, unknown>;
1558
+ provider: string;
1559
+ }
1560
+ interface DtoToolRunRequest {
1561
+ arguments: Record<string, unknown>;
1562
+ executeIntegrationCommand: boolean;
1563
+ executeIntegrationQuery: boolean;
1564
+ }
1565
+ interface DtoToolRunResult {
1566
+ fileArtifacts?: DtoFileReference[];
1567
+ kind: DtoWorkflowToolKind;
1568
+ result: Record<string, unknown> | null;
1569
+ selector: string;
1570
+ usage?: DtoToolUsageMetrics;
1571
+ }
1572
+ interface DtoToolUsageMetrics {
1573
+ errorCode?: string;
1574
+ latencyMs: number;
1575
+ provider: string;
1576
+ requestId?: string;
1577
+ requestSize: number;
1578
+ responseSize: number;
1579
+ success: boolean;
1580
+ toolName: string;
1581
+ toolType: string;
1582
+ unitType?: string;
1583
+ units?: number;
1584
+ }
1585
+ declare const DtoTools: {
1586
+ readonly AnalyticsQuery: "analytics_query";
1587
+ readonly AppCreate: "app_create";
1588
+ readonly CodeExecute: "code_execute";
1589
+ readonly CompareWorkflowVersions: "compare_workflow_versions";
1590
+ readonly CreatePlan: "create_plan";
1591
+ readonly Decide: "decide";
1592
+ readonly DemoEvent: "demo_event";
1593
+ readonly EditPlan: "edit_plan";
1594
+ readonly EventCreate: "event_create";
1595
+ readonly EventFieldsList: "event_fields_list";
1596
+ readonly EventGet: "event_get";
1597
+ readonly EventSearch: "event_search";
1598
+ readonly EventTypesList: "event_types_list";
1599
+ readonly ExecutePlan: "execute_plan";
1600
+ readonly ExecutionLogGet: "execution_log_get";
1601
+ readonly ExecutionLogSearch: "execution_log_search";
1602
+ readonly FileSupportTicket: "file_support_ticket";
1603
+ readonly FirecrawlAgent: "firecrawl_agent";
1604
+ readonly FirecrawlBatchScrape: "firecrawl_batch_scrape";
1605
+ readonly FirecrawlCrawl: "firecrawl_crawl";
1606
+ readonly FirecrawlCrawlParamsPreview: "firecrawl_crawl_params_preview";
1607
+ readonly FirecrawlMap: "firecrawl_map";
1608
+ readonly FirecrawlParse: "firecrawl_parse";
1609
+ readonly FirecrawlResearchRead: "firecrawl_research_read";
1610
+ readonly FirecrawlResearchRelated: "firecrawl_research_related";
1611
+ readonly FirecrawlResearchSearch: "firecrawl_research_search";
1612
+ readonly FirecrawlScrape: "firecrawl_scrape";
1613
+ readonly FirecrawlSearch: "firecrawl_search";
1614
+ readonly GenerateDocument: "generate_document";
1615
+ readonly GenerateImage: "generate_image";
1616
+ readonly GeoAudit: "geo_audit";
1617
+ readonly GoogleMapsBrandInsights: "google_maps_brand_insights";
1618
+ readonly GoogleMapsNearby: "google_maps_nearby";
1619
+ readonly GoogleMapsPlaceDetails: "google_maps_place_details";
1620
+ readonly GoogleMapsPlacesCollect: "google_maps_places_collect";
1621
+ readonly GoogleMapsSearch: "google_maps_search";
1622
+ readonly InitiateIntegration: "initiate_integration";
1623
+ readonly KnowledgeCreate: "knowledge_create";
1624
+ readonly KnowledgeGet: "knowledge_get";
1625
+ readonly KnowledgeSearch: "knowledge_search";
1626
+ readonly KnowledgeUpdate: "knowledge_update";
1627
+ readonly LibrarySearch: "library_search";
1628
+ readonly PeopleAndTeamsChange: "people_and_teams_change";
1629
+ readonly PeopleAndTeamsGet: "people_and_teams_get";
1630
+ readonly RequestToolAccess: "request_tool_access";
1631
+ readonly ResourceAccessChange: "resource_access_change";
1632
+ readonly ResourceAccessGet: "resource_access_get";
1633
+ readonly SetWorkflowStatus: "set_workflow_status";
1634
+ readonly ShareSubjectSearch: "share_subject_search";
1635
+ readonly StorageDatabaseCreate: "storage_database_create";
1636
+ readonly StorageDatabaseList: "storage_database_list";
1637
+ readonly StorageExecute: "storage_execute";
1638
+ readonly StorageMigrationApply: "storage_migration_apply";
1639
+ readonly StorageQuery: "storage_query";
1640
+ readonly StorageSchemaInspect: "storage_schema_inspect";
1641
+ readonly StructuredQuestion: "structured_question";
1642
+ readonly SwitchMode: "switch_mode";
1643
+ };
1644
+ type DtoTools = (typeof DtoTools)[keyof typeof DtoTools];
1645
+ interface DtoTriggerOutput {
1646
+ operations: DtoOperationOutput[] | null;
1647
+ }
1648
+ interface DtoUpdateStorageDatabaseRowsInput {
1649
+ count?: DtoStorageRowCount | null;
1650
+ filters: DtoStorageRowFilter[];
1651
+ select?: string | null;
1652
+ single?: boolean | null;
1653
+ table: string;
1654
+ values: Record<string, unknown>;
1655
+ }
1656
+ interface DtoUpsertStorageDatabaseRowsInput {
1657
+ count?: DtoStorageRowCount | null;
1658
+ defaultToNull?: boolean | null;
1659
+ ignoreDuplicates?: boolean | null;
1660
+ onConflict?: string[] | null;
1661
+ rows: Record<string, unknown>[];
1662
+ select?: string | null;
1663
+ single?: boolean | null;
1664
+ table: string;
1665
+ }
1666
+ interface DtoUserActionReceipt {
1667
+ clientMessageId?: string | null;
1668
+ code?: string | null;
1669
+ messageId?: string | null;
1670
+ sessionId?: string | null;
1671
+ status?: DtoUserActionReceiptStatus | null;
1672
+ }
1673
+ declare const DtoUserActionReceiptStatus: {
1674
+ readonly Failed: "failed";
1675
+ readonly Recorded: "recorded";
1676
+ readonly Rejected: "rejected";
1677
+ };
1678
+ type DtoUserActionReceiptStatus = (typeof DtoUserActionReceiptStatus)[keyof typeof DtoUserActionReceiptStatus];
1679
+ interface DtoVoiceDelegationResultPayload {
1680
+ context?: string | null;
1681
+ delegationId?: string | null;
1682
+ needsScreen?: boolean | null;
1683
+ speech?: string | null;
1684
+ }
1685
+ interface DtoVoiceTranscriptPayload {
1686
+ isFinal?: boolean | null;
1687
+ text?: string | null;
1688
+ }
1689
+ interface DtoWorkflow {
1690
+ createdAt: string;
1691
+ description: string;
1692
+ edges: DtoWorkflowEdge[] | null;
1693
+ effectiveCapability?: DtoWorkflowCapability;
1694
+ jobAccountAccess?: DtoSavedJobAccountAccess[];
1695
+ jobs: DtoJob[] | null;
1696
+ name: string;
1697
+ notifyOnFailure: boolean;
1698
+ slug?: string;
1699
+ status: DtoStatus;
1700
+ updatedAt: string;
1701
+ uuid: string;
1702
+ versionId?: string;
1703
+ }
1704
+ interface DtoWorkflowArtifact {
1705
+ description: string;
1706
+ fixPropertyFlowInWorkflow?: boolean;
1707
+ jobCount?: number;
1708
+ jobs?: DtoJobBaseOutput[];
1709
+ name: string;
1710
+ notifyOnFailure?: boolean;
1711
+ status?: DtoStatus;
1712
+ workflowUuid?: string;
1713
+ }
1714
+ declare const DtoWorkflowCapability: {
1715
+ readonly Edit: "edit";
1716
+ readonly Owner: "owner";
1717
+ readonly View: "view";
1718
+ };
1719
+ type DtoWorkflowCapability = (typeof DtoWorkflowCapability)[keyof typeof DtoWorkflowCapability];
1720
+ interface DtoWorkflowDraft {
1721
+ description: string;
1722
+ jobs: DtoJobDraft[] | null;
1723
+ name: string;
1724
+ }
1725
+ interface DtoWorkflowEdge {
1726
+ id: string;
1727
+ sourceJobUuid: string;
1728
+ targetJobUuid: string;
1729
+ }
1730
+ interface DtoWorkflowEditChange {
1731
+ after?: Record<string, unknown>;
1732
+ before?: Record<string, unknown>;
1733
+ changedFields?: string[];
1734
+ jobName: string;
1735
+ jobUuid: string;
1736
+ operation: string;
1737
+ }
1738
+ interface DtoWorkflowMinimalMetadata {
1739
+ deleted?: boolean;
1740
+ name: string;
1741
+ uuid: string;
1742
+ }
1743
+ interface DtoWorkflowToolConfigSnippet {
1744
+ allowedIntegrations?: DtoWorkflowToolIntegrationRef[];
1745
+ allowedTools?: string[];
1746
+ integrationTools?: DtoIntegrationToolDTO[];
1747
+ publishEventTypes?: DtoPublishEventTypeDTO[];
1748
+ storageTools?: DtoStorageToolDTO[];
1749
+ tools?: DtoTools[];
1750
+ }
1751
+ interface DtoWorkflowToolDiagnostic {
1752
+ actionLabel: string;
1753
+ actionType: string;
1754
+ description: string;
1755
+ kind: DtoWorkflowToolDiagnosticKind;
1756
+ name: string;
1757
+ reason: string;
1758
+ selector: string;
1759
+ }
1760
+ declare const DtoWorkflowToolDiagnosticKind: {
1761
+ readonly InvalidProvider: "invalid-provider";
1762
+ readonly KeyCollision: "key-collision";
1763
+ readonly ProviderUnavailable: "provider-unavailable";
1764
+ readonly SchemaUnavailable: "schema-unavailable";
1765
+ };
1766
+ type DtoWorkflowToolDiagnosticKind = (typeof DtoWorkflowToolDiagnosticKind)[keyof typeof DtoWorkflowToolDiagnosticKind];
1767
+ interface DtoWorkflowToolIntegrationDiagnostic {
1768
+ diagnostics: DtoWorkflowToolProviderDiagnostic[] | null;
1769
+ instanceName: string;
1770
+ integrationUuid: string;
1771
+ provider: string;
1772
+ tools: DtoWorkflowToolDiagnostic[] | null;
1773
+ }
1774
+ interface DtoWorkflowToolIntegrationRef {
1775
+ actionTypes?: string[];
1776
+ integrationName?: string;
1777
+ integrationUuid: string;
1778
+ provider?: string;
1779
+ }
1780
+ declare const DtoWorkflowToolJob: {
1781
+ readonly Agent: "agent";
1782
+ readonly Code: "code";
1783
+ };
1784
+ type DtoWorkflowToolJob = (typeof DtoWorkflowToolJob)[keyof typeof DtoWorkflowToolJob];
1785
+ declare const DtoWorkflowToolKind: {
1786
+ readonly Integration: "integration";
1787
+ readonly Native: "native";
1788
+ };
1789
+ type DtoWorkflowToolKind = (typeof DtoWorkflowToolKind)[keyof typeof DtoWorkflowToolKind];
1790
+ interface DtoWorkflowToolList {
1791
+ integrationDiagnostics: DtoWorkflowToolIntegrationDiagnostic[] | null;
1792
+ items: DtoWorkflowToolSummary[];
1793
+ job: DtoWorkflowToolJob;
1794
+ }
1795
+ interface DtoWorkflowToolProviderDiagnostic {
1796
+ kind: DtoWorkflowToolDiagnosticKind;
1797
+ reason: string;
1798
+ }
1799
+ interface DtoWorkflowToolSummary {
1800
+ actionLabel?: string;
1801
+ actionType?: string;
1802
+ configSnippet: DtoWorkflowToolConfigSnippet;
1803
+ description: string;
1804
+ instanceName?: string;
1805
+ integrationUuid?: string;
1806
+ kind: DtoWorkflowToolKind;
1807
+ name: string;
1808
+ provider?: string;
1809
+ selector: string;
1810
+ }
1811
+ interface QueryListActionExecutionLogsOutput {
1812
+ hasMore: boolean;
1813
+ items: DtoActionExecutionLogMetadata[];
1814
+ nextCursor: string | null;
1815
+ runSummaries: DtoActionExecutionRunSummary[] | null;
1816
+ }
1817
+ type ListActionExecutionLogsParams = {
1818
+ cursor?: string;
1819
+ endTime?: string;
1820
+ excludeTestRuns?: boolean;
1821
+ includeRunSummaries?: boolean;
1822
+ jobUuid?: string;
1823
+ pageSize?: number;
1824
+ startTime?: string;
1825
+ statuses?: ("awaiting-approval" | "awaiting-delay" | "awaiting-event" | "budget-exceeded" | "executing" | "failure" | "not-executed" | "rejected" | "success" | "timeout")[];
1826
+ testRunUuid?: string;
1827
+ triggeringEventUuid?: string;
1828
+ updatedAfter?: string;
1829
+ workflowUuid?: string;
1830
+ workflowVersionId?: string;
1831
+ };
1832
+ type ListAppChatSessionsParams = {
1833
+ cursor?: string;
1834
+ pageSize?: number;
1835
+ };
1836
+ /** What a voice turn runs with; the turn gets no other tools. */
1837
+ type OaizVoiceTurn = Pick<OaizChatMessage, "systemPrompt" | "nativeTools" | "integrationTools" | "model" | "providerKeyUuid">;
1838
+ /** Where a voice turn's request came from: the microphone, or the member's keyboard during the call. */
1839
+ type OaizVoiceTurnSource = "spoken" | "typed";
1840
+ /** How a voice conversation runs its turns. */
1841
+ interface OaizVoiceOptions {
1842
+ /**
1843
+ * Read for each turn, so tools stay per message. The voice model hears the room and a named
1844
+ * write tool runs at once on what it heard, so name only what a spoken request may run. A typed
1845
+ * request comes from the member's keyboard, so it can name the chat's tools.
1846
+ */
1847
+ turn: (source: OaizVoiceTurnSource) => OaizVoiceTurn;
1848
+ /** What the app is, at most 2,000 characters. It adds to OAIZ's voice prompt and replaces nothing in it. */
1849
+ instructions?: string;
1850
+ /** Receives the member's message and every chat event of each voice turn. */
1851
+ onEvent?: (event: DtoChatTimelineEvent) => void;
1852
+ }
1853
+ /** Where a voice conversation starts. */
1854
+ interface OaizVoiceStart {
1855
+ /** The chat to continue; omit it to start one. */
1856
+ sessionId?: string;
1857
+ /** The recent chat, told to the voice model once the call is up. */
1858
+ recentContext?: string;
1859
+ }
1860
+ /** The chat a started conversation joined. */
1861
+ interface OaizVoiceStarted {
1862
+ /** Null when `stop` ended the conversation before OAIZ named a new chat. */
1863
+ sessionId: string | null;
1864
+ }
1865
+ type OaizVoiceState = "idle" | "connecting" | "live" | "closing";
1866
+ interface OaizVoiceSnapshot {
1867
+ state: OaizVoiceState;
1868
+ /** What the voice model is saying right now. The member's speech is not written here. */
1869
+ assistantSpeech: string;
1870
+ /**
1871
+ * Analyser on the remote playback stream. An orb reads its loudness from this, not from the
1872
+ * transcript, because transcript deltas arrive before the audio does.
1873
+ */
1874
+ outputAnalyser: AnalyserNode | null;
1875
+ muted: boolean;
1876
+ /** Why the conversation did not start, why it ended, or why its last turn failed. */
1877
+ error: OaizError | null;
1878
+ /** The chat this conversation joined, while it runs. */
1879
+ sessionId: string | null;
1880
+ /** A voice turn runs or waits. A turn can outlive the call that started it. */
1881
+ turnRunning: boolean;
1882
+ }
1883
+ /**
1884
+ * One voice conversation with the app's agent as the signed-in member. The browser holds the
1885
+ * microphone and the WebRTC connection to the voice model; OAIZ opens and ends the call and runs
1886
+ * each delegation as a chat turn. No method throws. Create it with `client.chat.voice`.
1887
+ */
1888
+ export declare class OaizVoice {
1889
+ private readonly client;
1890
+ private readonly open;
1891
+ private readonly app;
1892
+ private readonly auth;
1893
+ private readonly url;
1894
+ private readonly options;
1895
+ private snapshot;
1896
+ private readonly listeners;
1897
+ private peer;
1898
+ private channel;
1899
+ private stream;
1900
+ private audio;
1901
+ private audioContext;
1902
+ private outputSource;
1903
+ private liveSessionId;
1904
+ /** The chat the call is billed against and whose history the spoken lines join. */
1905
+ private chatSessionId;
1906
+ private closedResolve;
1907
+ private removeSignOutHook;
1908
+ /** Set when the call ends while `connect` is in flight, so `connect` releases what it allocated. */
1909
+ private startAborted;
1910
+ private starting;
1911
+ private stopping;
1912
+ private eventSeq;
1913
+ /** The member's words since the voice model's last real reply. The delegation event carries no task text. */
1914
+ private pendingUserSpeech;
1915
+ /** What the voice model has said since the member's last word. */
1916
+ private pendingAssistantSpeech;
1917
+ /** The recent chat, told to the voice model once the call is up. */
1918
+ private seedContext;
1919
+ /** Each turn is one POST and OAIZ runs parallel POSTs in parallel, so turns wait here in order. */
1920
+ private turns;
1921
+ private runningTurn;
1922
+ /** The spoken lines on their way to OAIZ, one at a time, in spoken order. */
1923
+ private lines;
1924
+ /** Calls `listener` on each change of the snapshot, and answers the function that removes it. */
1925
+ subscribe: (listener: () => void) => (() => void);
1926
+ /** The conversation now. It is the same object until something changes. */
1927
+ getSnapshot: () => OaizVoiceSnapshot;
1928
+ /**
1929
+ * Opens the call: asks for the microphone, then connects through OAIZ. A refusal answers one
1930
+ * failure with its `error.code` and leaves the conversation idle; `stop` while this runs releases what
1931
+ * it allocated and answers with no error.
1932
+ */
1933
+ start(options?: OaizVoiceStart): Promise<OaizResponse<OaizVoiceStarted>>;
1934
+ /**
1935
+ * Sends a message the member typed during the call. It runs after any turn in progress, and its
1936
+ * answer is also spoken. The chat events arrive at `onEvent`.
1937
+ */
1938
+ send(content: string): {
1939
+ error: OaizError | null;
1940
+ };
1941
+ /** Closes the running turn's stream, which stops the turn. The next turn in line then runs. */
1942
+ stopTurn: () => void;
1943
+ /** Closes the running turn's stream and drops the turns waiting behind it. */
1944
+ stopAllTurns: () => void;
1945
+ toggleMute: () => void;
1946
+ /**
1947
+ * Ends the call and settles when OAIZ has released it. Turns in progress keep running into the
1948
+ * chat, and their events keep arriving at `onEvent`.
1949
+ */
1950
+ stop: () => Promise<void>;
1951
+ private connect;
1952
+ private openPeerConnection;
1953
+ private handleProviderEvent;
1954
+ /**
1955
+ * A delegation turns the member's words since the last real reply into the chat turn, verbatim.
1956
+ * Nothing else travels in the message: the spoken lines before it are already history. A holding
1957
+ * phrase spoken before the delegation stays pending and is recorded at the next boundary.
1958
+ */
1959
+ private dispatchDelegation;
1960
+ private enqueueTurn;
1961
+ private runTurns;
1962
+ private runTurn;
1963
+ /** The voice model waits for a result, so a turn that sends none still answers it. */
1964
+ private finishWithoutResult;
1965
+ /** Hands a tool step to the voice model as silent context while its turn runs. */
1966
+ private noteToolStep;
1967
+ /** The plain written answer goes first, so the voice model holds it for follow-up questions by the time it speaks. */
1968
+ private speakResult;
1969
+ /**
1970
+ * The assistant finished a line and the member is speaking again. The line is recorded whatever
1971
+ * its length. A real reply also closes the member's utterance and records it; a backchannel leaves
1972
+ * the member's words growing, so the next request is not cut into fragments.
1973
+ */
1974
+ private closeAssistantLine;
1975
+ /** Records whatever is still pending, in spoken order. */
1976
+ private flushPendingLines;
1977
+ /**
1978
+ * Records one spoken line as history for the chat's later turns. Each line waits for the one
1979
+ * before it, so a slow request does not reorder them.
1980
+ */
1981
+ private recordLine;
1982
+ private postLine;
1983
+ /** The SDK renews its token before each call, so a 401 means the session is revoked. */
1984
+ private endForRefusedToken;
1985
+ private closeProviderSession;
1986
+ /**
1987
+ * Releases the provider session and every local resource. The spoken lines go first, because
1988
+ * OAIZ refuses a line after the release.
1989
+ */
1990
+ private release;
1991
+ private readonly releaseForSignOut;
1992
+ /**
1993
+ * The page may never run again, also when the browser keeps it in its cache. This ends the turns,
1994
+ * as a closed page does, and sends the release first, because renewal is a network call that page
1995
+ * leave can end. Lines still pending are dropped.
1996
+ */
1997
+ private readonly leavePage;
1998
+ /** A raw request, because the generated client has no keepalive option. */
1999
+ private releaseOnLeave;
2000
+ private closeMedia;
2001
+ private teardown;
2002
+ private publish;
2003
+ private refuse;
2004
+ private nextEventId;
2005
+ private appendEvent;
2006
+ private appendThinking;
2007
+ private appendCommentary;
2008
+ private applyMute;
2009
+ /**
2010
+ * Taps the remote playback stream with an AnalyserNode. One AudioContext lives for the whole call,
2011
+ * so an orb can remount without opening a new context. Answers null where Web Audio is unavailable.
2012
+ */
2013
+ private attachOutputAnalyser;
2014
+ }
2015
+ /** One member message to the app's agent. */
2016
+ interface OaizChatMessage {
2017
+ /** The member's message. */
2018
+ content: string;
2019
+ /** The app's whole system prompt for this turn; OAIZ adds none and does not store it. */
2020
+ systemPrompt: string;
2021
+ /**
2022
+ * The built-in OAIZ tools this turn may call, each named once; it gets no others. A tool with
2023
+ * `requireApproval` does not run until the member approves the call: the turn ends with
2024
+ * `tool.approvalRequired`. Every other tool runs at once.
2025
+ */
2026
+ nativeTools?: DtoAppChatNativeTool[];
2027
+ /**
2028
+ * The actions on integrations shared with the app that this turn may call, each named once, with
2029
+ * `requireApproval` as for `nativeTools`; it gets no others.
2030
+ */
2031
+ integrationTools?: DtoAppChatIntegrationTool[];
2032
+ /** The chat to continue; omit it to start one. `session.created` carries a new chat's id. */
2033
+ sessionId?: string;
2034
+ /** Deduplicates a resent message within its chat; a new UUID when omitted. */
2035
+ clientMessageId?: string;
2036
+ /** The model the turn runs on; the organisation's default chat model when omitted. */
2037
+ model?: DtoLLM;
2038
+ /** The organisation's own provider key `model` runs on. */
2039
+ providerKeyUuid?: string;
2040
+ }
2041
+ /**
2042
+ * A decision on the tool call a paused turn waits on. It carries the same turn settings as the
2043
+ * message that started the turn; OAIZ stores none of them.
2044
+ */
2045
+ interface OaizChatDecision extends Omit<OaizChatMessage, "content" | "sessionId" | "clientMessageId"> {
2046
+ /** The chat whose turn waits on the call. */
2047
+ sessionId: string;
2048
+ /** The call to decide: `toolApprovalInfo.toolCallId` of `tool.approvalRequired`, or `pendingApproval.toolCallId` of `sessions.get`. */
2049
+ toolCallId: string;
2050
+ }
2051
+ /** Options of a chat message stream. */
2052
+ interface OaizChatSendOptions {
2053
+ /** Closes the stream, which stops the turn; the parts it already saved stay in the chat. */
2054
+ signal?: AbortSignal;
2055
+ }
2056
+ /** The tools a message may name in this app. */
2057
+ interface OaizChatTools {
2058
+ /** The built-in OAIZ tools this app's chat accepts, by `name`. */
2059
+ nativeTools: DtoToolMetadata[];
2060
+ /** The integration actions shared with the app, by `integrationUuid` and `actionType`. */
2061
+ integrationTools: DtoWorkflowToolSummary[];
2062
+ }
2063
+ /** Lists and reads the signed-in member's chats in this app. */
2064
+ export declare class OaizChatSessions {
2065
+ private readonly client;
2066
+ private readonly app;
2067
+ /** Lists one page of chats, newest first. Never throws. */
2068
+ list(params?: ListAppChatSessionsParams): Promise<OaizResponse<DtoChatSessionListOutput>>;
2069
+ /**
2070
+ * Reads one chat with its saved messages, and `pendingApproval` while a tool call of the chat
2071
+ * waits for a decision. Never throws.
2072
+ */
2073
+ get(sessionId: string): Promise<OaizResponse<DtoAppChatSessionDetail>>;
2074
+ }
2075
+ /** Chats with an OAIZ agent as the signed-in member of this app. */
2076
+ export declare class OaizChat {
2077
+ private readonly client;
2078
+ private readonly open;
2079
+ private readonly app;
2080
+ private readonly auth;
2081
+ private readonly url;
2082
+ /** The signed-in member's chats in this app. */
2083
+ readonly sessions: OaizChatSessions;
2084
+ /**
2085
+ * Sends one message and yields the turn's chat events until `generation.finished`. A refused
2086
+ * message yields one failure with its `error.code`; a turn that fails after it started yields an
2087
+ * `error` event before `generation.finished`. Stopping early closes the stream and stops the turn.
2088
+ * When the turn reaches a tool with `requireApproval`, it ends with `tool.approvalRequired`, whose
2089
+ * `toolApprovalInfo.toolCallId` names the call, then `generation.finished`; `approve` or
2090
+ * `decline` continues it. A message to a chat whose call waits for a decision is refused with
2091
+ * 409 `app-chat-tool-approval-pending`.
2092
+ */
2093
+ send(message: OaizChatMessage, options?: OaizChatSendOptions): AsyncIterable<OaizResponse<DtoChatTimelineEvent>>;
2094
+ /**
2095
+ * Runs the tool call a paused turn waits on and yields the continued turn's chat events until
2096
+ * `generation.finished`, like `send`. The turn may pause again on another `requireApproval`
2097
+ * call. A call that is not waiting for a decision, including one already decided, yields one
2098
+ * failure with 409 `app-chat-tool-call-not-pending`; a decision that loses a race with another
2099
+ * yields an `error` event with that code before `generation.finished`.
2100
+ */
2101
+ approve(decision: OaizChatDecision, options?: OaizChatSendOptions): AsyncIterable<OaizResponse<DtoChatTimelineEvent>>;
2102
+ /**
2103
+ * Declines the tool call a paused turn waits on: the call does not run, the model is told the
2104
+ * member declined it, and the continued turn streams as in `approve`.
2105
+ */
2106
+ decline(decision: OaizChatDecision, options?: OaizChatSendOptions): AsyncIterable<OaizResponse<DtoChatTimelineEvent>>;
2107
+ /**
2108
+ * A voice conversation with the app's agent. Create one per chat view: `start` opens the call,
2109
+ * and each thing the member asks for runs as one chat turn with the tools of `turn`.
2110
+ */
2111
+ voice(options: OaizVoiceOptions): OaizVoice;
2112
+ /** Lists the tools a message may name: the built-in OAIZ tools the app's chat may use and the integration actions shared with the app. Never throws. */
2113
+ tools(): Promise<OaizResponse<OaizChatTools>>;
2114
+ private decide;
2115
+ private stream;
2116
+ }
2117
+ /** The vectors of one embeddings call. */
2118
+ interface OaizEmbeddingsResult {
2119
+ /** The model that produced the vectors; store it beside each vector. */
2120
+ model: DtoEmbeddingModel;
2121
+ /** The length of every vector. */
2122
+ dimensions: number;
2123
+ /** One vector per input, in input order. `JSON.stringify(vector)` is a pgvector literal. */
2124
+ embeddings: number[][];
2125
+ /** The input tokens the provider counted. */
2126
+ inputTokens: number;
2127
+ }
2128
+ /** Turns texts into vectors with this client's credential. */
2129
+ export declare class OaizEmbeddings {
2130
+ private readonly client;
2131
+ /**
2132
+ * Turns each input text into one vector on `model`. Vectors from different models, or from one
2133
+ * model at different dimensions, are not comparable. The call runs on the account the organisation's
2134
+ * admin chooses for embeddings in AI feature settings: OAIZ or an organisation OpenAI key. Never throws.
2135
+ */
2136
+ create(request: DtoCreateEmbeddingsRequest): Promise<OaizResponse<OaizEmbeddingsResult>>;
2137
+ }
2138
+ /** Publishes events with this client's credential. */
2139
+ export declare class OaizEvents {
2140
+ private readonly client;
2141
+ /** Publishes one event with this client's credential: with `app`, as the signed-in member. Never throws. */
2142
+ publish(event: DtoEventInputInput): Promise<OaizResponse<DtoCommandMessageWithUUID>>;
2143
+ }
2144
+ /** The answer of one model call. */
2145
+ interface OaizLLMCallResult {
2146
+ /** The model's answer. */
2147
+ text: string;
2148
+ /** The model that answered. */
2149
+ model: DtoLLM;
2150
+ /** The input and output tokens the provider counted. */
2151
+ usage: DtoLLMCallUsageDTO;
2152
+ }
2153
+ /** Calls models with this client's credential. */
2154
+ export declare class OaizLLM {
2155
+ private readonly client;
2156
+ /**
2157
+ * Asks `model` for one answer to `input`, under the optional `system` instruction. The call runs
2158
+ * as the credential's member, within the organisation's budget, on a model the organisation
2159
+ * permits in both chat and workflows. Waits up to five minutes for the answer. Never throws.
2160
+ */
2161
+ call(request: DtoCreateLLMCallRequest): Promise<OaizResponse<OaizLLMCallResult>>;
2162
+ }
2163
+ /** One foreign key a table holds, as `oaiz db types` writes it. */
2164
+ type GenericRelationship = {
2165
+ foreignKeyName: string;
2166
+ columns: string[];
2167
+ isOneToOne: boolean;
2168
+ referencedRelation: string;
2169
+ referencedColumns: string[];
2170
+ };
2171
+ /** One table: the row it reads, what an insert and an update take, and its foreign keys. */
2172
+ type GenericTable = {
2173
+ Row: Record<string, unknown>;
2174
+ Insert: Record<string, unknown>;
2175
+ Update: Record<string, unknown>;
2176
+ Relationships: GenericRelationship[];
2177
+ };
2178
+ /** One view: the row it reads. A view takes no writes and holds no foreign keys. */
2179
+ type GenericView = {
2180
+ Row: Record<string, unknown>;
2181
+ };
2182
+ /** One function: the arguments it takes by name and what it returns. */
2183
+ type GenericFunction = {
2184
+ Args: Record<string, unknown>;
2185
+ Returns: unknown;
2186
+ };
2187
+ /** The `Database` type `oaiz db types` writes. */
2188
+ type GenericDatabase = {
2189
+ data: {
2190
+ Tables: Record<string, GenericTable>;
2191
+ Views?: Record<string, GenericView>;
2192
+ Functions?: Record<string, GenericFunction>;
2193
+ };
2194
+ };
2195
+ /** The operators `not` takes. */
2196
+ type FilterOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "like" | "ilike" | "in" | "is";
2197
+ /**
2198
+ * What a request answers as `data`: nothing, one row, or a list of rows. `single` is a write
2199
+ * that answers nothing until `.select()` names columns, and then one row.
2200
+ */
2201
+ type ResultShape = "none" | "single" | "one" | "rows";
2202
+ type ResultData<Selected, Shape extends ResultShape> = Shape extends "none" | "single" ? null : Shape extends "one" ? Selected : Selected[];
2203
+ /** The shape after `.single()`. */
2204
+ type SingleShape<Shape extends ResultShape> = Shape extends "none" | "single" ? "single" : "one";
2205
+ /** The shape after `.select()`. */
2206
+ type SelectedShape<Shape extends ResultShape> = Shape extends "single" | "one" ? "one" : "rows";
2207
+ type IsAny<T> = 0 extends 1 & T ? true : false;
2208
+ type UntypedRow = Record<string, any>;
2209
+ type Tables<Database extends GenericDatabase> = Database["data"]["Tables"];
2210
+ type Views<Database extends GenericDatabase> = Database["data"] extends {
2211
+ Views: infer V extends Record<string, GenericView>;
2212
+ } ? V : {};
2213
+ type Functions<Database extends GenericDatabase> = Database["data"] extends {
2214
+ Functions: infer F extends Record<string, GenericFunction>;
2215
+ } ? F : {};
2216
+ /** Table names a write accepts; any string without a `Database` type. */
2217
+ type TableName<Database extends GenericDatabase> = IsAny<Database> extends true ? string : keyof Tables<Database> & string;
2218
+ /** Table and view names a read accepts; any string without a `Database` type. */
2219
+ type RelationName<Database extends GenericDatabase> = IsAny<Database> extends true ? string : (keyof Tables<Database> | keyof Views<Database>) & string;
2220
+ type TableOf<Database extends GenericDatabase, Name extends string> = Name extends keyof Tables<Database> ? Tables<Database>[Name] : never;
2221
+ type ViewRow<View> = View extends {
2222
+ Row: infer Row extends Record<string, unknown>;
2223
+ } ? Row : never;
2224
+ /** A table, or a view read as a table that holds no foreign keys. */
2225
+ type RelationOf<Database extends GenericDatabase, Name extends string> = Name extends keyof Tables<Database> ? Tables<Database>[Name] : Name extends keyof Views<Database> ? {
2226
+ Row: ViewRow<Views<Database>[Name]>;
2227
+ Relationships: [];
2228
+ } : never;
2229
+ type RowOf<Database extends GenericDatabase, Name extends string> = IsAny<Database> extends true ? UntypedRow : RelationOf<Database, Name>["Row"];
2230
+ type InsertOf<Database extends GenericDatabase, Name extends string> = IsAny<Database> extends true ? UntypedRow : TableOf<Database, Name>["Insert"];
2231
+ type UpdateOf<Database extends GenericDatabase, Name extends string> = IsAny<Database> extends true ? UntypedRow : TableOf<Database, Name>["Update"];
2232
+ /** The names of the functions a database holds; any string without a `Database` type. */
2233
+ type FunctionName<Database extends GenericDatabase> = IsAny<Database> extends true ? string : keyof Functions<Database> & string;
2234
+ /** The named arguments a function takes. */
2235
+ type FunctionArgs<Database extends GenericDatabase, Name extends string> = IsAny<Database> extends true ? UntypedRow : Name extends keyof Functions<Database> ? Functions<Database>[Name] extends {
2236
+ Args: infer Args;
2237
+ } ? Args : never : never;
2238
+ /** What a function returns: a value, a row, a list of either, or null for void. */
2239
+ type FunctionReturns<Database extends GenericDatabase, Name extends string> = IsAny<Database> extends true ? any : Name extends keyof Functions<Database> ? Functions<Database>[Name] extends {
2240
+ Returns: infer Returns;
2241
+ } ? Returns : never : never;
2242
+ /** The arguments `rpc` takes after the name: optional when every argument has a default. */
2243
+ type RpcArgs<Database extends GenericDatabase, Name extends string> = {} extends FunctionArgs<Database, Name> ? [args?: FunctionArgs<Database, Name>] : [args: FunctionArgs<Database, Name>];
2244
+ /**
2245
+ * The value a comparison takes for a column. The OAIZ server binds it as text for Postgres to read as the
2246
+ * column type, so a Postgres array column takes its array literal, such as `{a,b}`; a `Json`
2247
+ * column takes objects and arrays, which the client sends as JSON text.
2248
+ */
2249
+ type FilterValue<T> = IsAny<T> extends true ? any : [NonNullable<T>] extends [readonly unknown[]] ? string : NonNullable<T>;
2250
+ /** Column names `order` takes: the table's own columns. */
2251
+ type OrderColumn<Database extends GenericDatabase, Name extends string> = keyof RowOf<Database, Name> & string;
2252
+ type Prettify<T> = { [K in keyof T]: T[K]; } & {};
2253
+ type ParseError<Message extends string> = {
2254
+ error: Message;
2255
+ };
2256
+ type StarNode = {
2257
+ kind: "star";
2258
+ };
2259
+ type ColumnNode<Name extends string, Key extends string> = {
2260
+ kind: "column";
2261
+ name: Name;
2262
+ key: Key;
2263
+ };
2264
+ type EmbedNode<Name extends string, Key extends string, Hint extends string | null, Inner extends boolean, Items extends SelectNode[]> = {
2265
+ kind: "embed";
2266
+ name: Name;
2267
+ key: Key;
2268
+ hint: Hint;
2269
+ inner: Inner;
2270
+ items: Items;
2271
+ };
2272
+ type AggregateName = "avg" | "count" | "max" | "min" | "sum";
2273
+ /** Column is null for a count of rows. Key is the alias, or the function's name. */
2274
+ type AggregateNode<Function extends AggregateName, Column extends string | null, Key extends string> = {
2275
+ kind: "aggregate";
2276
+ function: Function;
2277
+ column: Column;
2278
+ key: Key;
2279
+ };
2280
+ type SelectNode = StarNode | ColumnNode<string, string> | AggregateNode<AggregateName, string | null, string> | EmbedNode<string, string, string | null, boolean, any[]>;
2281
+ type Whitespace = " " | "\n" | "\r" | "\t";
2282
+ type Compact<S extends string, Acc extends string = "", Quoted extends boolean = false> = S extends `${infer C}${infer Rest}` ? [Quoted, C] extends [true, "\\"] ? Rest extends `${infer Escaped}${infer After}` ? Compact<After, `${Acc}${C}${Escaped}`, true> : `${Acc}${C}` : C extends '"' ? Compact<Rest, `${Acc}${C}`, Quoted extends true ? false : true> : Quoted extends false ? C extends Whitespace ? Compact<Rest, Acc, false> : Compact<Rest, `${Acc}${C}`, false> : Compact<Rest, `${Acc}${C}`, true> : Acc;
2283
+ type CompactSelect<S extends string> = S extends `${string}${Whitespace}${string}` ? Compact<S> : S;
2284
+ type Delimiter = "," | "(" | ")" | "!" | ":" | '"';
2285
+ type ReadPlain<S extends string, Acc extends string = ""> = S extends `${infer C}${infer Rest}` ? C extends Delimiter ? [Acc, S] : ReadPlain<Rest, `${Acc}${C}`> : [Acc, ""];
2286
+ type ReadQuoted<S extends string, Acc extends string = ""> = S extends `\\${infer C}${infer Rest}` ? ReadQuoted<Rest, `${Acc}${C}`> : S extends `"${infer Rest}` ? [Acc, Rest] : S extends `${infer C}${infer Rest}` ? ReadQuoted<Rest, `${Acc}${C}`> : ParseError<"the select has a quoted name without its closing quote">;
2287
+ /** A double-quoted name with backslash escapes, or plain text up to the next delimiter. */
2288
+ type ReadName<S extends string> = S extends `"${infer Rest}` ? ReadQuoted<Rest> : ReadPlain<S> extends [infer Name extends string, infer Rest extends string] ? Name extends "" ? ParseError<`the select expects a name at "${S}"`> : Name extends `${string}->${string}` ? ParseError<"JSON paths are not supported"> : Name extends `${infer Column}.${infer After}` ? Column extends "" ? ParseError<`the select expects a name at "${S}"`> : [Column, `.${After}${Rest}`] : [Name, Rest] : never;
2289
+ type AtItemEnd<S extends string> = S extends "" | `,${string}` | `)${string}` ? true : false;
2290
+ type ParseItem<S extends string> = S extends `...${string}` ? ParseError<"spreading an embedded table is not supported"> : S extends `*${infer Rest}` ? AtItemEnd<Rest> extends true ? [StarNode, Rest] : ParseError<`the select expects ',' or ')' after '*' at "${Rest}"`> : ReadName<S> extends (infer First) ? First extends [infer Name extends string, infer Rest extends string] ? Rest extends `::${string}` ? ParseError<"casts are not supported"> : Rest extends `:${infer AfterAlias}` ? ReadName<AfterAlias> extends (infer Second) ? Second extends [infer Target extends string, infer Tail extends string] ? ParseNamed<Target, Name, Tail, AfterAlias extends `"${string}` ? true : false> : Second : never : ParseNamed<Name, null, Rest, S extends `"${string}` ? true : false> : First : never;
2291
+ /**
2292
+ * Reads what follows a name: `.function()` or an unquoted `count()` make an aggregate, and Key is
2293
+ * its alias. A quoted `"count"()` is an embed, as on the OAIZ server.
2294
+ */
2295
+ type ParseNamed<Name extends string, Key extends string | null, S extends string, Quoted extends boolean> = S extends `.${infer After}` ? ParseAggregate<Name, Key, After> : [Name, Quoted] extends ["count", false] ? S extends `()${string}` ? ParseAggregate<null, Key, `count${S}`> : ParseTail<Name, Key extends string ? Key : Name, S> : ParseTail<Name, Key extends string ? Key : Name, S>;
2296
+ type ParseAggregate<Column extends string | null, Key extends string | null, S extends string> = S extends `${infer Function extends AggregateName}()${infer Rest}` ? Rest extends `::${string}` ? ParseError<"casts are not supported"> : AtItemEnd<Rest> extends true ? [AggregateNode<Function, Column, Key extends string ? Key : Function>, Rest] : ParseError<`the select expects ',' or ')' after "${Function}()" at "${Rest}"`> : ParseError<"only the aggregates avg(), count(), max(), min() and sum() are supported">;
2297
+ /** Reads `[!hint][!inner|!left](…)` after a name, or ends a column. The first hint and join win. */
2298
+ type ParseTail<Name extends string, Key extends string, S extends string, Hint extends string | null = null, Join extends "inner" | "left" | null = null, Bang extends boolean = false> = S extends `!${infer AfterBang}` ? ReadName<AfterBang> extends (infer Parameter) ? Parameter extends [infer Value extends string, infer Rest extends string] ? Value extends "inner" | "left" ? ParseTail<Name, Key, Rest, Hint, Join extends null ? Value : Join, true> : ParseTail<Name, Key, Rest, Hint extends null ? Value : Hint, Join, true> : Parameter : never : S extends `(${infer Body}` ? ParseEmbedBody<Name, Key, Hint, Join extends "inner" ? true : false, Body> : Bang extends true ? ParseError<`the embed "${Name}" expects '(' at "${S}"`> : AtItemEnd<S> extends true ? [ColumnNode<Name, Key>, S] : ParseError<`the select expects ',' or ')' after "${Name}" at "${S}"`>;
2299
+ type ParseEmbedBody<Name extends string, Key extends string, Hint extends string | null, Inner extends boolean, S extends string> = S extends `)${infer Rest}` ? [EmbedNode<Name, Key, Hint, Inner, []>, Rest] : ParseList<S> extends (infer Parsed) ? Parsed extends [infer Items extends SelectNode[], infer Rest extends string] ? Rest extends `)${infer After}` ? [EmbedNode<Name, Key, Hint, Inner, Items>, After] : ParseError<`the embed "${Name}" expects ')' at "${Rest}"`> : Parsed : never;
2300
+ type ParseList<S extends string, Items extends SelectNode[] = []> = ParseItem<S> extends (infer Parsed) ? Parsed extends [infer Item extends SelectNode, infer Rest extends string] ? Rest extends `,${infer Next}` ? ParseList<Next, [...Items, Item]> : [[...Items, Item], Rest] : Parsed : never;
2301
+ /** Whether an embed sits below `MaxTableEmbedDepth` (3) other embeds, which the OAIZ server refuses. */
2302
+ type TooDeep<Items extends SelectNode[], Enclosing extends unknown[] = []> = Items extends [infer Head extends SelectNode, ...infer Tail extends SelectNode[]] ? Head extends EmbedNode<string, string, string | null, boolean, infer Nested extends SelectNode[]> ? Enclosing["length"] extends 3 ? true : TooDeep<Nested, [...Enclosing, unknown]> extends true ? true : TooDeep<Tail, Enclosing> : TooDeep<Tail, Enclosing> : false;
2303
+ type ParseSelect<S extends string> = S extends "" ? [StarNode] : ParseList<S> extends (infer Parsed) ? Parsed extends [infer Items extends SelectNode[], infer Rest extends string] ? Rest extends "" ? TooDeep<Items> extends true ? ParseError<"embeds nest deeper than 3 levels"> : Items : ParseError<`the select has an unexpected "${Rest}"`> : Parsed : never;
2304
+ type Relationship = {
2305
+ direction: "forward" | "reverse";
2306
+ table: string;
2307
+ constraint: string;
2308
+ oneToOne: boolean;
2309
+ columns: string[];
2310
+ foreignColumns: string[];
2311
+ };
2312
+ /** Foreign keys the origin holds. */
2313
+ type ForwardRelationships<Database extends GenericDatabase, Origin extends string> = RelationOf<Database, Origin>["Relationships"][number] extends (infer R) ? R extends GenericRelationship ? {
2314
+ direction: "forward";
2315
+ table: R["referencedRelation"];
2316
+ constraint: R["foreignKeyName"];
2317
+ oneToOne: R["isOneToOne"];
2318
+ columns: R["columns"];
2319
+ foreignColumns: R["referencedColumns"];
2320
+ } : never : never;
2321
+ /** Foreign keys other tables hold onto the origin. */
2322
+ type ReverseRelationships<Database extends GenericDatabase, Origin extends string> = { [Holder in keyof Tables<Database> & string]: Tables<Database>[Holder]["Relationships"][number] extends (infer R) ? R extends GenericRelationship & {
2323
+ referencedRelation: Origin;
2324
+ } ? {
2325
+ direction: "reverse";
2326
+ table: Holder;
2327
+ constraint: R["foreignKeyName"];
2328
+ oneToOne: R["isOneToOne"];
2329
+ columns: R["referencedColumns"];
2330
+ foreignColumns: R["columns"];
2331
+ } : never : never; }[keyof Tables<Database> & string];
2332
+ type Same<A, B> = [A] extends [B] ? ([B] extends [A] ? true : false) : false;
2333
+ type SingleColumn<Columns, Name extends string> = Columns extends [infer Only] ? Same<Only, Name> : false;
2334
+ type Matches<R extends Relationship, Origin extends string, Target extends string, Hint extends string | null> = Same<R["table"], Origin> extends true ? MatchesSelf<R, Target, Hint> : Hint extends string ? Same<R["table"], Target> extends true ? true extends Same<R["constraint"], Hint> | SingleColumn<R["columns"], Hint> | SingleColumn<R["foreignColumns"], Hint> ? true : false : false : true extends Same<R["table"], Target> | Same<R["constraint"], Target> | SingleColumn<R["columns"], Target> ? true : false;
2335
+ /** A self reference: the table name reaches the children, the column name the parent. */
2336
+ type MatchesSelf<R extends Relationship, Target extends string, Hint extends string | null> = Hint extends string ? [Same<R["table"], Target>, R["direction"], R["oneToOne"]] extends [true, "reverse", false] ? SingleColumn<R["foreignColumns"], Hint> : false : [Same<R["table"], Target>, R["direction"], R["oneToOne"]] extends [true, "reverse", false] ? true : [R["direction"], R["oneToOne"]] extends ["forward", false] ? SingleColumn<R["columns"], Target> : false;
2337
+ type IsUnion<T, U = T> = T extends unknown ? ([U] extends [T] ? false : true) : false;
2338
+ type ResolveRelationship<Database extends GenericDatabase, Origin extends string, Target extends string, Hint extends string | null> = (ForwardRelationships<Database, Origin> | ReverseRelationships<Database, Origin>) extends (infer All) ? (All extends Relationship ? (Matches<All, Origin, Target, Hint> extends true ? All : never) : never) extends (infer Found) ? [Found] extends [never] ? ParseError<`no foreign key relates the tables "${Origin}" and "${Target}"`> : IsUnion<Found> extends true ? ParseError<`more than one foreign key relates the tables "${Origin}" and "${Target}"; name one with a hint`> : Found : never : never;
2339
+ type Selection = {
2340
+ row: object;
2341
+ filters: object;
2342
+ };
2343
+ /** One select level, refused when two of its items read into one key, which the OAIZ server answers once. */
2344
+ type EvalLevel<Database extends GenericDatabase, Table extends string, Items extends SelectNode[]> = DuplicateKey<Items, keyof RowOf<Database, Table> & string, StarNode extends Items[number] ? true : false> extends (infer Clash extends string) ? [Clash] extends [never] ? EvalItems<Database, Table, Items> : ParseError<`the select reads more than one value into "${Clash}"`> : never;
2345
+ /** The key an item reads into; an embed without columns reads none. */
2346
+ type OutputKey<Item extends SelectNode> = Item extends ColumnNode<string, infer Key> ? Key : Item extends AggregateNode<AggregateName, string | null, infer Key> ? Key : Item extends EmbedNode<string, infer Key, string | null, boolean, infer Items> ? Items extends [] ? never : Key : never;
2347
+ /** The key an item shares with `*`, unless it reads that same column again. */
2348
+ type StarClash<Item extends SelectNode, Columns extends string> = Item extends ColumnNode<infer Name, infer Key> ? Same<Name, Key> extends true ? never : Key & Columns : OutputKey<Item> & Columns;
2349
+ type DuplicateKey<Items extends SelectNode[], Columns extends string, Star extends boolean, Seen extends string = never> = Items extends [infer Head extends SelectNode, ...infer Tail extends SelectNode[]] ? ((OutputKey<Head> & Seen) | (Star extends true ? StarClash<Head, Columns> : never)) extends (infer Clash) ? [Clash] extends [never] ? DuplicateKey<Tail, Columns, Star, Seen | OutputKey<Head>> : Clash : never : never;
2350
+ type EvalItems<Database extends GenericDatabase, Table extends string, Items extends SelectNode[], Row = {}, Filters = {}> = Items extends [infer Head extends SelectNode, ...infer Tail extends SelectNode[]] ? EvalItem<Database, Table, Head> extends (infer Evaluated) ? Evaluated extends {
2351
+ row: infer R;
2352
+ filters: infer F;
2353
+ } ? EvalItems<Database, Table, Tail, Row & R, Filters & F> : Evaluated : never : {
2354
+ row: Prettify<Row>;
2355
+ filters: Filters;
2356
+ };
2357
+ type EvalItem<Database extends GenericDatabase, Table extends string, Item extends SelectNode> = Item extends StarNode ? {
2358
+ row: RowOf<Database, Table>;
2359
+ filters: {};
2360
+ } : Item extends ColumnNode<infer Name, infer Key> ? Name extends keyof RowOf<Database, Table> ? {
2361
+ row: { [K in Key]: RowOf<Database, Table>[Name]; };
2362
+ filters: {};
2363
+ } : ParseError<`the table "${Table}" has no column "${Name}"`> : Item extends AggregateNode<infer Function, infer Column, infer Key> ? EvalAggregate<RowOf<Database, Table>, Table, Function, Column, Key> : Item extends EmbedNode<infer Name, infer Key, infer Hint, infer Inner, infer Items> ? ResolveRelationship<Database, Table, Name, Hint> extends (infer Found) ? Found extends Relationship ? EvalEmbed<Database, Found, Name, Key, Inner, Items> : Found : never : never;
2364
+ /**
2365
+ * A count is a number. A sum or average of no rows is null, as is a minimum or maximum. PostgreSQL
2366
+ * has no minimum or maximum of a boolean or JSON value.
2367
+ */
2368
+ type EvalAggregate<Row, Table extends string, Function extends AggregateName, Column extends string | null, Key extends string> = Column extends string ? Column extends keyof Row ? Function extends "count" ? {
2369
+ row: { [K in Key]: number; };
2370
+ filters: {};
2371
+ } : Function extends "min" | "max" ? [NonNullable<Row[Column]>] extends [boolean] ? ParseError<`${Function}() cannot read the boolean column "${Column}"`> : [Extract<NonNullable<Row[Column]>, Record<string, unknown>>] extends [never] ? {
2372
+ row: { [K in Key]: Row[Column] | null; };
2373
+ filters: {};
2374
+ } : ParseError<`${Function}() cannot read the JSON column "${Column}"`> : [NonNullable<Row[Column]>] extends [number] ? {
2375
+ row: { [K in Key]: number | null; };
2376
+ filters: {};
2377
+ } : ParseError<`${Function}() reads a number column, and "${Column}" is not one`> : ParseError<`the table "${Table}" has no column "${Column}"`> : {
2378
+ row: { [K in Key]: number; };
2379
+ filters: {};
2380
+ };
2381
+ type HasAggregate<Items extends SelectNode[]> = [Extract<Items[number], AggregateNode<AggregateName, string | null, string>>] extends [never] ? false : true;
2382
+ type HasEmbed<Items extends SelectNode[]> = [Extract<Items[number], EmbedNode<string, string, string | null, boolean, any[]>>] extends [never] ? false : true;
2383
+ type EvalEmbed<Database extends GenericDatabase, R extends Relationship, Name extends string, Key extends string, Inner extends boolean, Items extends SelectNode[]> = HasAggregate<Items> extends true ? ParseError<"an embed cannot read an aggregate"> : (Items extends [] ? {
2384
+ row: {};
2385
+ filters: {};
2386
+ } : EvalLevel<Database, R["table"], Items>) extends (infer Nested) ? Nested extends Selection ? {
2387
+ row: Items extends [] ? {} : { [K in Key]: EmbedValue<R, Inner, Nested["row"]>; };
2388
+ filters: EmbedFilters<RowOf<Database, R["table"]>, Nested["filters"], Key | Name>;
2389
+ } : Nested : never;
2390
+ /**
2391
+ * A to-one embed is one row, or null without `!inner`: a NOT NULL foreign key does not make it
2392
+ * non-null, because the OAIZ server joins it with the row-level policies and embedded filters of the request.
2393
+ * A to-many embed is a list.
2394
+ */
2395
+ type EmbedValue<R extends Relationship, Inner extends boolean, T> = R["direction"] extends "forward" ? Inner extends true ? T : T | null : R["oneToOne"] extends true ? Inner extends true ? T : T | null : T[];
2396
+ /** Filter columns an embed adds: `embed.column` by its key or relation name, and its nested embeds' columns. */
2397
+ type EmbedFilters<Row, Nested, Prefix extends string> = { [C in keyof Row & string as `${Prefix}.${C}`]: Row[C]; } & { [P in keyof Nested & string as `${Prefix}.${P}`]: Nested[P]; };
2398
+ type Evaluate<Database extends GenericDatabase, Table extends string, Query extends string> = ParseSelect<CompactSelect<Query>> extends (infer Items) ? Items extends SelectNode[] ? HasAggregate<Items> extends true ? StarNode extends Items[number] ? ParseError<"an aggregate cannot be read beside * or an embed"> : HasEmbed<Items> extends true ? ParseError<"an aggregate cannot be read beside * or an embed"> : EvalLevel<Database, Table, Items> : EvalLevel<Database, Table, Items> : Items : never;
2399
+ /** The select argument type: the query when it reads, otherwise an error message. */
2400
+ type SelectQuery<Database extends GenericDatabase, Table extends string, Query extends string> = IsAny<Database> extends true ? Query : Evaluate<Database, Table, Query> extends ParseError<infer Message> ? Message : Query;
2401
+ /** The select argument type of a write, which cannot return an aggregate. */
2402
+ type WriteSelectQuery<Database extends GenericDatabase, Table extends string, Query extends string> = IsAny<Database> extends true ? Query : ParseSelect<CompactSelect<Query>> extends (infer Items extends SelectNode[]) ? HasAggregate<Items> extends true ? "a write cannot return an aggregate" : SelectQuery<Database, Table, Query> : SelectQuery<Database, Table, Query>;
2403
+ /** Columns `.order()` takes after this select: an aggregated select orders only by its groups. */
2404
+ type SelectOrder<Database extends GenericDatabase, Table extends string, Query extends string> = IsAny<Database> extends true ? string : ParseSelect<CompactSelect<Query>> extends (infer Items extends SelectNode[]) ? HasAggregate<Items> extends true ? GroupColumn<Items[number]> & OrderColumn<Database, Table> : OrderColumn<Database, Table> : OrderColumn<Database, Table>;
2405
+ type GroupColumn<Item> = Item extends ColumnNode<infer Name, string> ? Name : never;
2406
+ /** One row of what a select string reads. */
2407
+ type SelectRow<Database extends GenericDatabase, Table extends string, Query extends string> = IsAny<Database> extends true ? any : Evaluate<Database, Table, Query> extends {
2408
+ row: infer Row;
2409
+ } ? Row : never;
2410
+ /** Columns a filter takes after this select: the table's own and those of its embeds. */
2411
+ type SelectFilters<Database extends GenericDatabase, Table extends string, Query extends string> = IsAny<Database> extends true ? UntypedRow : Evaluate<Database, Table, Query> extends {
2412
+ filters: infer Filters;
2413
+ } ? Prettify<RowOf<Database, Table> & Filters> : RowOf<Database, Table>;
2414
+ interface CountOption {
2415
+ /** `"exact"` also answers, as `count`, the number of rows the request matches or changes. */
2416
+ count?: DtoStorageRowCount;
2417
+ }
2418
+ /** Options of `select`. */
2419
+ interface OaizSelectOptions extends CountOption {}
2420
+ /** Options of `insert`. */
2421
+ interface OaizInsertOptions extends CountOption {
2422
+ /**
2423
+ * A row that leaves out a column another row of the same call gives stores null in it. False
2424
+ * stores the column's default instead. Defaults to true.
2425
+ */
2426
+ defaultToNull?: boolean;
2427
+ }
2428
+ /** Options of `upsert`. */
2429
+ interface OaizUpsertOptions extends OaizInsertOptions {
2430
+ /** The columns of the unique key that match a row, separated by commas. Defaults to the primary key. */
2431
+ onConflict?: string;
2432
+ /** Keeps a row that already exists as it is, instead of changing it. */
2433
+ ignoreDuplicates?: boolean;
2434
+ }
2435
+ /** Options of `update`. */
2436
+ interface OaizUpdateOptions extends CountOption {}
2437
+ /** Options of `delete`. */
2438
+ interface OaizDeleteOptions extends CountOption {}
2439
+ /** Options of `order`. */
2440
+ interface OaizOrderOptions {
2441
+ /** Sorts from low to high. Defaults to true. */
2442
+ ascending?: boolean;
2443
+ /** Puts nulls first. By default nulls come last from low to high, and first from high to low. */
2444
+ nullsFirst?: boolean;
2445
+ }
2446
+ /** A delete's arguments: none or its options on a table, and none that type-check on a view. */
2447
+ type DeleteArgs<Database extends GenericDatabase, Table extends string> = Table extends TableName<Database> ? [options?: OaizDeleteOptions] : [view: never];
2448
+ /** Starts a request on one table or view of one database. A view only reads. */
2449
+ export declare class OaizQueryBuilder<Database extends GenericDatabase = any, Table extends string = string> {
2450
+ private readonly client;
2451
+ private readonly database;
2452
+ private readonly table;
2453
+ /**
2454
+ * Reads rows with these columns, `*` for all of them. A related table is named with its
2455
+ * columns, as `companies(name)`.
2456
+ */
2457
+ select<Query extends string = "*">(columns?: SelectQuery<Database, Table, Query>, options?: OaizSelectOptions): OaizFilterBuilder<Database, Table, SelectFilters<Database, Table, Query>, SelectRow<Database, Table, Query>, "rows", SelectOrder<Database, Table, Query>>;
2458
+ /** Inserts one row or a list of rows. Add `.select()` to answer the inserted rows. */
2459
+ insert(values: InsertOf<Database, Table> | InsertOf<Database, Table>[], options?: OaizInsertOptions): OaizWriteBuilder<Database, Table>;
2460
+ /**
2461
+ * Inserts one row or a list of rows, and changes the existing row instead where a row matches
2462
+ * one on the primary key or `onConflict`. Add `.select()` to answer the written rows.
2463
+ */
2464
+ upsert(values: InsertOf<Database, Table> | InsertOf<Database, Table>[], options?: OaizUpsertOptions): OaizWriteBuilder<Database, Table>;
2465
+ /** Changes these columns of the rows the filters match. It needs at least one filter. */
2466
+ update(values: UpdateOf<Database, Table>, options?: OaizUpdateOptions): OaizFilteredWriteBuilder<Database, Table>;
2467
+ /** Removes the rows the filters match. It needs at least one filter. */
2468
+ delete(...args: DeleteArgs<Database, Table>): OaizFilteredWriteBuilder<Database, Table>;
2469
+ private builder;
2470
+ }
2471
+ /** Filters on the columns in `Filterable`; each adds one condition and answers the same builder. */
2472
+ interface OaizFilters<Filterable extends Record<string, unknown>> {
2473
+ /** Only the rows whose `column` equals `value`. */
2474
+ eq<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2475
+ /** Only the rows whose `column` does not equal `value`. */
2476
+ neq<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2477
+ /** Only the rows whose `column` is greater than `value`. */
2478
+ gt<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2479
+ /** Only the rows whose `column` is greater than or equal to `value`. */
2480
+ gte<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2481
+ /** Only the rows whose `column` is less than `value`. */
2482
+ lt<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2483
+ /** Only the rows whose `column` is less than or equal to `value`. */
2484
+ lte<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2485
+ /** Only the rows whose `column` matches `pattern`, in which `%` or `*` stands for any text. */
2486
+ like(column: keyof Filterable & string, pattern: string): this;
2487
+ /** As `like`, ignoring upper and lower case. */
2488
+ ilike(column: keyof Filterable & string, pattern: string): this;
2489
+ /** Only the rows whose `column` equals one of `values`. */
2490
+ in<Column extends keyof Filterable & string>(column: Column, values: readonly FilterValue<Filterable[Column]>[]): this;
2491
+ /** Only the rows whose `column` is `value`: null, true or false. */
2492
+ is(column: keyof Filterable & string, value: null | boolean): this;
2493
+ /** Negates one condition; an `in` value is written as `(a,b)`. */
2494
+ not(column: keyof Filterable & string, operator: FilterOperator, value: unknown): this;
2495
+ /** Adds one group that matches when any member does, from a string such as `a.eq.1,b.is.null`. */
2496
+ or(filters: string): this;
2497
+ }
2498
+ /**
2499
+ * An insert or upsert. The OAIZ server's request for it carries no filters, order or range, so the builder
2500
+ * offers none; it answers no rows until `.select()`.
2501
+ */
2502
+ interface OaizWriteBuilder<Database extends GenericDatabase = any, Table extends string = string, Selected = RowOf<Database, Table>, Shape extends ResultShape = "none"> extends PromiseLike<OaizResponse<ResultData<Selected, Shape>>> {
2503
+ /** Requires exactly one written row and answers that row once `.select()` names columns. */
2504
+ single(): OaizWriteBuilder<Database, Table, Selected, SingleShape<Shape>>;
2505
+ /** Answers the written rows with these columns. */
2506
+ select<Query extends string = "*">(columns?: WriteSelectQuery<Database, Table, Query>): OaizWriteBuilder<Database, Table, SelectRow<Database, Table, Query>, SelectedShape<Shape>>;
2507
+ }
2508
+ /**
2509
+ * An update or delete. It filters on the table's own columns; the OAIZ server's request for it carries no
2510
+ * order or range, so the builder offers none. It answers no rows until `.select()`.
2511
+ */
2512
+ interface OaizFilteredWriteBuilder<Database extends GenericDatabase = any, Table extends string = string, Selected = RowOf<Database, Table>, Shape extends ResultShape = "none"> extends OaizFilters<RowOf<Database, Table>>, PromiseLike<OaizResponse<ResultData<Selected, Shape>>> {
2513
+ /** Requires exactly one written row and answers that row once `.select()` names columns. */
2514
+ single(): OaizFilteredWriteBuilder<Database, Table, Selected, SingleShape<Shape>>;
2515
+ /** Answers the written rows with these columns. */
2516
+ select<Query extends string = "*">(columns?: WriteSelectQuery<Database, Table, Query>): OaizFilteredWriteBuilder<Database, Table, SelectRow<Database, Table, Query>, SelectedShape<Shape>>;
2517
+ }
2518
+ /**
2519
+ * Narrows and shapes one request. Every `await` sends the request once and resolves to an
2520
+ * `OaizResponse`; nothing is sent before that. Filters and transforms add to this builder;
2521
+ * `single` and `select` change the result type, so they answer a copy and leave this one as is.
2522
+ */
2523
+ export declare class OaizFilterBuilder<Database extends GenericDatabase = any, Table extends string = string, Filterable extends Record<string, unknown> = Record<string, any>, Selected = any, Shape extends ResultShape = "rows", Ordered extends string = OrderColumn<Database, Table>> implements OaizFilters<Filterable>, PromiseLike<OaizResponse<ResultData<Selected, Shape>>> {
2524
+ private readonly client;
2525
+ private readonly database;
2526
+ private readonly request;
2527
+ private readonly filters;
2528
+ private readonly orderTerms;
2529
+ private limitValue?;
2530
+ private offsetValue?;
2531
+ private singleValue;
2532
+ private invalid?;
2533
+ eq<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2534
+ neq<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2535
+ gt<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2536
+ gte<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2537
+ lt<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2538
+ lte<Column extends keyof Filterable & string>(column: Column, value: FilterValue<Filterable[Column]>): this;
2539
+ like(column: keyof Filterable & string, pattern: string): this;
2540
+ ilike(column: keyof Filterable & string, pattern: string): this;
2541
+ in<Column extends keyof Filterable & string>(column: Column, values: readonly FilterValue<Filterable[Column]>[]): this;
2542
+ is(column: keyof Filterable & string, value: null | boolean): this;
2543
+ /** Negates one condition; an `in` value is written as `(a,b)`. */
2544
+ not(column: keyof Filterable & string, operator: FilterOperator, value: unknown): this;
2545
+ /** Adds one group that matches when any member does, from a string such as `a.eq.1,b.is.null`. */
2546
+ or(filters: string): this;
2547
+ /** Sorts the rows by `column`; each call adds one column to sort by after the earlier ones. */
2548
+ order(column: Ordered, options?: OaizOrderOptions): this;
2549
+ /** At most `count` rows, a whole number from 0. */
2550
+ limit(count: number): this;
2551
+ /** Rows `from` to `to`, both counted from 0 and included, so `to` is at least `from`. */
2552
+ range(from: number, to: number): this;
2553
+ /** Requires exactly one row and answers that row instead of a list. */
2554
+ single(): OaizFilterBuilder<Database, Table, Filterable, Selected, SingleShape<Shape>, Ordered>;
2555
+ /** Answers the written rows with these columns; a write without it answers `data: null`. */
2556
+ select<Query extends string = "*">(columns?: WriteSelectQuery<Database, Table, Query>): OaizFilterBuilder<Database, Table, Filterable, SelectRow<Database, Table, Query>, SelectedShape<Shape>, Ordered>;
2557
+ private copy;
2558
+ then<TResult1 = OaizResponse<ResultData<Selected, Shape>>, TResult2 = never>(onfulfilled?: ((value: OaizResponse<ResultData<Selected, Shape>>) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): PromiseLike<TResult1 | TResult2>;
2559
+ private compare;
2560
+ private parse;
2561
+ /** Keeps the first reason the request cannot be sent; `execute` answers it without sending. */
2562
+ private refuse;
2563
+ /** Why the OAIZ server's request for this action cannot carry what the builder holds, if it cannot. */
2564
+ private unsendable;
2565
+ private execute;
2566
+ private send;
2567
+ }
2568
+ /** Options of a run stream. */
2569
+ interface OaizRunStreamOptions {
2570
+ /** Ends the stream; the run goes on. */
2571
+ signal?: AbortSignal;
2572
+ }
2573
+ /** Where `follow` starts. */
2574
+ interface OaizRunFollowOptions extends OaizRunStreamOptions {
2575
+ /** The `after` of the last frame you read; omit it to read from the start. */
2576
+ after?: string;
2577
+ /** The `publishEvents` the run was started with, when you follow without `after`. Defaults to true. */
2578
+ publishEvents?: boolean;
2579
+ }
2580
+ /** One progress frame of a run. Save `after`: `follow` resumes after it. */
2581
+ interface OaizRunProgress {
2582
+ event: DtoExecuteProgressEvent;
2583
+ after?: string;
2584
+ }
2585
+ /** Starts, follows and reads workflow runs: with `app`, only of workflows shared with the app. */
2586
+ export declare class OaizRuns {
2587
+ private readonly client;
2588
+ private readonly open;
2589
+ /**
2590
+ * Starts the job with the ID `jobUuid` and yields its progress until the run ends or waits. The
2591
+ * first frame is `root_start` with the run's `actionExecutionLogUuid`. Set `actionExecutionUuid`
2592
+ * to a UUIDv7 you keep, to follow the run again if the stream breaks before that frame.
2593
+ */
2594
+ start(jobUuid: string, request: DtoJobExecuteRequest, options?: OaizRunStreamOptions): AsyncIterable<OaizResponse<OaizRunProgress>>;
2595
+ /** Follows a run until it ends or waits. Following never starts the run again. */
2596
+ follow(actionExecutionUuid: string, options?: OaizRunFollowOptions): AsyncIterable<OaizResponse<OaizRunProgress>>;
2597
+ /** Reads one run with its logs and results. Never throws. */
2598
+ get(actionExecutionUuid: string): Promise<OaizResponse<DtoActionExecutionLog>>;
2599
+ /** Lists one page of runs; `triggeringEventUuid` finds the runs a published event started. Never throws. */
2600
+ list(params?: ListActionExecutionLogsParams): Promise<OaizResponse<QueryListActionExecutionLogsOutput>>;
2601
+ private stream;
2602
+ }
2603
+ /** Runs tools with this client's credential. */
2604
+ export declare class OaizTools {
2605
+ private readonly client;
2606
+ /** Runs a built-in OAIZ tool by name, or an integration action as `<integration id>:<action>`. Never throws. */
2607
+ run(selector: string, request: DtoToolRunRequest): Promise<OaizResponse<DtoToolRunResult>>;
2608
+ }
2609
+ interface OaizClientBaseOptions {
2610
+ /** The OAIZ API base URL. */
2611
+ url: string;
2612
+ /** The id of the database `from` reads and writes and `rpc` calls. */
2613
+ database: string;
2614
+ }
2615
+ /** A client that sends one credential. */
2616
+ interface OaizKeyClientOptions extends OaizClientBaseOptions {
2617
+ /** An API key, a member access token or an app access token. */
2618
+ key: string;
2619
+ app?: never;
2620
+ }
2621
+ /** A client of an app that signs its member in from the browser. */
2622
+ interface OaizAppClientOptions extends OaizClientBaseOptions {
2623
+ /** The app's ID, which `oaiz view create` prints when it creates the app. */
2624
+ app: string;
2625
+ key?: never;
2626
+ }
2627
+ type OaizClientOptions = OaizKeyClientOptions | OaizAppClientOptions;
2628
+ /** Reads and writes the tables, reads the views and calls the functions of one OAIZ database. */
2629
+ export declare class OaizClient<Database extends GenericDatabase = any> {
2630
+ private readonly databaseId;
2631
+ /** Publishes events with this client's credential. */
2632
+ readonly events: OaizEvents;
2633
+ /** Runs tools with this client's credential. */
2634
+ readonly tools: OaizTools;
2635
+ /** Turns texts into vectors with this client's credential. */
2636
+ readonly embeddings: OaizEmbeddings;
2637
+ /** Calls models with this client's credential. */
2638
+ readonly llm: OaizLLM;
2639
+ /** Starts, follows and reads workflow runs with this client's credential. */
2640
+ readonly runs: OaizRuns;
2641
+ /** Starts a request on a table or a view of this client's database. A view only reads. */
2642
+ from<Table extends RelationName<Database>>(table: Table): OaizQueryBuilder<Database, Table>;
2643
+ /**
2644
+ * Calls a function of this client's database by name, with its arguments by name. An argument
2645
+ * with a default may be left out. A function that can change rows needs edit access, and one
2646
+ * that reads only runs read-only. Resolves to what the function returned: a value, a row as an
2647
+ * object, an array for a set, or null for void.
2648
+ */
2649
+ rpc<Name extends FunctionName<Database>>(name: Name, ...[args]: RpcArgs<Database, Name>): Promise<OaizResponse<FunctionReturns<Database, Name>>>;
2650
+ /** The same client on another database, with the same key. */
2651
+ database(id: string): OaizClient<Database>;
2652
+ }
2653
+ /** A database client of an app; every request sends the signed-in member's app access token. */
2654
+ export declare class OaizAppClient<Database extends GenericDatabase = any> extends OaizClient<Database> {
2655
+ /** Signs the member in, keeps the session fresh and signs out. */
2656
+ readonly auth: OaizAuth;
2657
+ /** Chats with an OAIZ agent as the signed-in member. */
2658
+ readonly chat: OaizChat;
2659
+ /** The same client on another database, with the same session. */
2660
+ database(id: string): OaizAppClient<Database>;
2661
+ }
2662
+ /**
2663
+ * A client for one database; pass the `Database` type `oaiz db types` writes to type its tables.
2664
+ * With `app` it also signs the app's member in: creating it in a browser completes a sign-in the
2665
+ * page came back from.
2666
+ */
2667
+ export declare function createClient<Database extends GenericDatabase = any>(options: OaizAppClientOptions): OaizAppClient<Database>;
2668
+ export declare function createClient<Database extends GenericDatabase = any>(options: OaizKeyClientOptions): OaizClient<Database>;
2669
+ export type { DtoAccessReductionAffectedWorkflow, DtoAccessReductionImpact, DtoAccessReductionReason, DtoActionExecutionLLMCall, DtoActionExecutionLog, DtoActionExecutionLogMetadata, DtoActionExecutionRunJobSummary, DtoActionExecutionRunSummary, DtoActionExecutionToolCall, DtoActionLogOutput, DtoActionOutput, DtoActionType, DtoAppChatApprovalRequest, DtoAppChatIntegrationTool, DtoAppChatMessageRequest, DtoAppChatMessageType, DtoAppChatNativeTool, DtoAppChatPendingApproval, DtoAppChatSessionDetail, DtoAppEditArtifact, DtoAppLiveVoiceSessionInput, DtoAppLiveVoiceSessionOutput, DtoAppVoiceLineInput, DtoAwaitEventDeadlineBehavior, DtoAwaitEventDetails, DtoAwaitEventDetailsAwaitedEvent, DtoCallStorageDatabaseFunctionInput, DtoChatMessageContextRefs, DtoChatSessionListOutput, DtoChatSessionMetadata, DtoChatTimelineArtifact, DtoChatTimelineContextCompaction, DtoChatTimelineErrorPayload, DtoChatTimelineEvent, DtoChatTimelineEventType, DtoChatTimelineMessage, DtoChatTimelineMessageDelta, DtoChatTimelineToolProgress, DtoChatType, DtoChatViewApp, DtoChatViewJob, DtoChatViewJobBuilder, DtoChatViewJobBuilderMode, DtoChatViewJobEditorMode, DtoChatViewJobSection, DtoChatViewKnowledge, DtoChatViewLabel, DtoChatViewResolution, DtoChatViewSnapshot, DtoChatViewTestPanel, DtoChatViewTestPanelKind, DtoChatViewType, DtoChatViewWorkflow, DtoCommandMessageWithUUID, DtoCondition, DtoConditionType, DtoCreateEmbeddingsRequest, DtoCreateEmbeddingsResponse, DtoCreateLLMCallRequest, DtoCreateLLMCallResponse, DtoDeleteStorageDatabaseRowsInput, DtoEditedKnowledgeArtifact, DtoEmbeddingDTO, DtoEmbeddingModel, DtoEmbeddingsUsageDTO, DtoEventInputInput, DtoEventInputOutput, DtoEventMinimalMetadata, DtoEventTypeInput, DtoExecuteProgressEvent, DtoExecuteProgressEventType, DtoExecuteStreamTerminalReason, DtoExecutionInitiationOrigin, DtoExecutionStatus, DtoExpectedValueType, DtoFileReference, DtoFileReferenceInput, DtoGeneratedKnowledgeArtifact, DtoGeneratorOutput, DtoGetNativeToolsOutput, DtoGoalMeasurementCorrelatedSideOutput, DtoGoalMeasurementDefinitionKind, DtoGoalMeasurementDefinitionOutput, DtoGoalMeasurementElapsedAggregateOperator, DtoGoalMeasurementElapsedAggregateOutput, DtoGoalMeasurementFilterOperator, DtoGoalMeasurementFilterOutput, DtoGoalMeasurementFilterValueOutput, DtoGoalMeasurementMetricKind, DtoGoalMeasurementMetricOutput, DtoGoalMeasurementPopulationOutput, DtoGoalRollingWindow, DtoGoalRollingWindowUnit, DtoGoalTimeBucket, DtoInitiateIntegrationProviderMetadata, DtoInitiateIntegrationRequest, DtoInitiateIntegrationStatus, DtoInsertStorageDatabaseRowsInput, DtoIntegrationGrantNamespace, DtoIntegrationNamespaceLevel, DtoIntegrationNamespaceScope, DtoIntegrationToolDTO, DtoIntegrationToolScope, DtoJob, DtoJobAccountAccessLevel, DtoJobAccountAccessNeedReason, DtoJobBaseOutput, DtoJobDraft, DtoJobExecuteRequest, DtoJobToolAccessEventSource, DtoJobToolAccessEventSourceKind, DtoJobToolAccessEventsOutput, DtoJobToolAccessOutput, DtoJobToolAccessPartOutput, DtoJobToolAccessResource, DtoJobToolAccessScope, DtoKnowledgeContextDTOOutput, DtoKnowledgeImageReferenceInputOutput, DtoKnowledgeReferenceDTO, DtoKnowledgeVersionBodyOutput, DtoLLM, DtoLLMCallUsageDTO, DtoMessageRole, DtoMessageType, DtoOperationOutput, DtoOutputEventConfig, DtoPeopleAndTeamsChangePreview, DtoPlanArtifactOutput, DtoPlanExecutionStatus, DtoPlanTodoExecutionStatus, DtoPlanTodoOutput, DtoPlanTodoStatus, DtoProvisionField, DtoProvisionFieldValidation, DtoProvisionSchema, DtoPublishEventTypeDTO, DtoRequestToolAccessToolInput, DtoRequestToolAccessToolType, DtoResourceAccessChangeCapability, DtoResourceAccessChangePreview, DtoResourceAccessChangePreviewChange, DtoResourceAccessChangePreviewItem, DtoResourceAccessChangeSubjectKind, DtoResourceAccessIntegrationScope, DtoResourceAccessItemError, DtoResourceAccessItemKind, DtoResourceAccessNativeToolPreview, DtoSavedGoalResponse, DtoSavedJobAccountAccess, DtoSelectStorageDatabaseRowsInput, DtoStatus, DtoStorageDatabaseFunctionResult, DtoStorageDatabaseRows, DtoStorageRowCount, DtoStorageRowFilter, DtoStorageRowFilterOperator, DtoStorageRowOrder, DtoStorageToolDTO, DtoTargetDirection, DtoTestRunFlags, DtoTestRunJobResult, DtoTestRunKind, DtoTestRunProgressEvent, DtoTestRunProgressEventType, DtoTestRunResult, DtoTestRunState, DtoTestRunStatus, DtoToolAccessRequest, DtoToolAccessRequestStatus, DtoToolAnnotations, DtoToolApprovalMode, DtoToolApprovalPreview, DtoToolApprovalRequest, DtoToolCallResult, DtoToolMetadata, DtoToolRunRequest, DtoToolRunResult, DtoToolUsageMetrics, DtoTools, DtoTriggerOutput, DtoUpdateStorageDatabaseRowsInput, DtoUpsertStorageDatabaseRowsInput, DtoUserActionReceipt, DtoUserActionReceiptStatus, DtoVoiceDelegationResultPayload, DtoVoiceTranscriptPayload, DtoWorkflow, DtoWorkflowArtifact, DtoWorkflowCapability, DtoWorkflowDraft, DtoWorkflowEdge, DtoWorkflowEditChange, DtoWorkflowMinimalMetadata, DtoWorkflowToolConfigSnippet, DtoWorkflowToolDiagnostic, DtoWorkflowToolDiagnosticKind, DtoWorkflowToolIntegrationDiagnostic, DtoWorkflowToolIntegrationRef, DtoWorkflowToolJob, DtoWorkflowToolKind, DtoWorkflowToolList, DtoWorkflowToolProviderDiagnostic, DtoWorkflowToolSummary, FilterOperator, FunctionArgs, FunctionName, FunctionReturns, GenericDatabase, GenericFunction, GenericRelationship, GenericTable, GenericView, OaizAppClientOptions, OaizAuth, OaizAuthResponse, OaizChatDecision, OaizChatMessage, OaizChatSendOptions, OaizChatTools, OaizClientOptions, OaizDeleteOptions, OaizEmbeddingsResult, OaizError, OaizFilteredWriteBuilder, OaizFilters, OaizInsertOptions, OaizKeyClientOptions, OaizLLMCallResult, OaizOrderOptions, OaizResponse, OaizRunFollowOptions, OaizRunProgress, OaizRunStreamOptions, OaizSelectOptions, OaizSession, OaizUpdateOptions, OaizUpsertOptions, OaizUser, OaizVoiceOptions, OaizVoiceSnapshot, OaizVoiceStart, OaizVoiceStarted, OaizVoiceState, OaizVoiceTurn, OaizVoiceTurnSource, OaizWriteBuilder, QueryListActionExecutionLogsOutput, RpcArgs };