@macro-inc/sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +177 -0
- package/dist/chunk-5HAKQN23.js +1263 -0
- package/dist/chunk-77EI4LSQ.js +2492 -0
- package/dist/chunk-CTKR64MY.js +1436 -0
- package/dist/chunk-JXIQT5TH.js +1467 -0
- package/dist/chunk-P4DTO6VD.js +830 -0
- package/dist/chunk-PAAFJYGO.js +967 -0
- package/dist/chunk-QNUS5BC5.js +913 -0
- package/dist/chunk-SGAHIERJ.js +1235 -0
- package/dist/chunk-V45LUJDI.js +838 -0
- package/dist/chunk-YRUXFEZM.js +1044 -0
- package/dist/generated/agent-harness/client/client.gen.d.ts +2 -0
- package/dist/generated/agent-harness/client/index.d.ts +10 -0
- package/dist/generated/agent-harness/client/types.gen.d.ts +120 -0
- package/dist/generated/agent-harness/client/utils.gen.d.ts +37 -0
- package/dist/generated/agent-harness/client.gen.d.ts +12 -0
- package/dist/generated/agent-harness/core/auth.gen.d.ts +25 -0
- package/dist/generated/agent-harness/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/agent-harness/core/params.gen.d.ts +43 -0
- package/dist/generated/agent-harness/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/agent-harness/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/agent-harness/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/agent-harness/core/types.gen.d.ts +83 -0
- package/dist/generated/agent-harness/core/utils.gen.d.ts +19 -0
- package/dist/generated/agent-harness/index.d.ts +2 -0
- package/dist/generated/agent-harness/index.js +6 -0
- package/dist/generated/agent-harness/sdk.gen.d.ts +84 -0
- package/dist/generated/agent-harness/types.gen.d.ts +539 -0
- package/dist/generated/auth/client/client.gen.d.ts +2 -0
- package/dist/generated/auth/client/index.d.ts +10 -0
- package/dist/generated/auth/client/types.gen.d.ts +120 -0
- package/dist/generated/auth/client/utils.gen.d.ts +37 -0
- package/dist/generated/auth/client.gen.d.ts +12 -0
- package/dist/generated/auth/core/auth.gen.d.ts +25 -0
- package/dist/generated/auth/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/auth/core/params.gen.d.ts +43 -0
- package/dist/generated/auth/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/auth/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/auth/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/auth/core/types.gen.d.ts +83 -0
- package/dist/generated/auth/core/utils.gen.d.ts +19 -0
- package/dist/generated/auth/index.d.ts +2 -0
- package/dist/generated/auth/index.js +6 -0
- package/dist/generated/auth/sdk.gen.d.ts +383 -0
- package/dist/generated/auth/types.gen.d.ts +2175 -0
- package/dist/generated/cognition/client/client.gen.d.ts +2 -0
- package/dist/generated/cognition/client/index.d.ts +10 -0
- package/dist/generated/cognition/client/types.gen.d.ts +120 -0
- package/dist/generated/cognition/client/utils.gen.d.ts +37 -0
- package/dist/generated/cognition/client.gen.d.ts +12 -0
- package/dist/generated/cognition/core/auth.gen.d.ts +25 -0
- package/dist/generated/cognition/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/cognition/core/params.gen.d.ts +43 -0
- package/dist/generated/cognition/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/cognition/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/cognition/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/cognition/core/types.gen.d.ts +83 -0
- package/dist/generated/cognition/core/utils.gen.d.ts +19 -0
- package/dist/generated/cognition/index.d.ts +2 -0
- package/dist/generated/cognition/index.js +6 -0
- package/dist/generated/cognition/sdk.gen.d.ts +224 -0
- package/dist/generated/cognition/types.gen.d.ts +2484 -0
- package/dist/generated/connection/client/client.gen.d.ts +2 -0
- package/dist/generated/connection/client/index.d.ts +10 -0
- package/dist/generated/connection/client/types.gen.d.ts +120 -0
- package/dist/generated/connection/client/utils.gen.d.ts +37 -0
- package/dist/generated/connection/client.gen.d.ts +12 -0
- package/dist/generated/connection/core/auth.gen.d.ts +25 -0
- package/dist/generated/connection/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/connection/core/params.gen.d.ts +43 -0
- package/dist/generated/connection/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/connection/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/connection/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/connection/core/types.gen.d.ts +83 -0
- package/dist/generated/connection/core/utils.gen.d.ts +19 -0
- package/dist/generated/connection/index.d.ts +2 -0
- package/dist/generated/connection/index.js +839 -0
- package/dist/generated/connection/sdk.gen.d.ts +38 -0
- package/dist/generated/connection/types.gen.d.ts +235 -0
- package/dist/generated/contacts/client/client.gen.d.ts +2 -0
- package/dist/generated/contacts/client/index.d.ts +10 -0
- package/dist/generated/contacts/client/types.gen.d.ts +120 -0
- package/dist/generated/contacts/client/utils.gen.d.ts +37 -0
- package/dist/generated/contacts/client.gen.d.ts +12 -0
- package/dist/generated/contacts/core/auth.gen.d.ts +25 -0
- package/dist/generated/contacts/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/contacts/core/params.gen.d.ts +43 -0
- package/dist/generated/contacts/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/contacts/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/contacts/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/contacts/core/types.gen.d.ts +83 -0
- package/dist/generated/contacts/core/utils.gen.d.ts +19 -0
- package/dist/generated/contacts/index.d.ts +2 -0
- package/dist/generated/contacts/index.js +6 -0
- package/dist/generated/contacts/sdk.gen.d.ts +43 -0
- package/dist/generated/contacts/types.gen.d.ts +52 -0
- package/dist/generated/email/client/client.gen.d.ts +2 -0
- package/dist/generated/email/client/index.d.ts +10 -0
- package/dist/generated/email/client/types.gen.d.ts +120 -0
- package/dist/generated/email/client/utils.gen.d.ts +37 -0
- package/dist/generated/email/client.gen.d.ts +12 -0
- package/dist/generated/email/core/auth.gen.d.ts +25 -0
- package/dist/generated/email/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/email/core/params.gen.d.ts +43 -0
- package/dist/generated/email/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/email/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/email/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/email/core/types.gen.d.ts +83 -0
- package/dist/generated/email/core/utils.gen.d.ts +19 -0
- package/dist/generated/email/index.d.ts +2 -0
- package/dist/generated/email/index.js +6 -0
- package/dist/generated/email/sdk.gen.d.ts +254 -0
- package/dist/generated/email/types.gen.d.ts +2614 -0
- package/dist/generated/notification/client/client.gen.d.ts +2 -0
- package/dist/generated/notification/client/index.d.ts +10 -0
- package/dist/generated/notification/client/types.gen.d.ts +120 -0
- package/dist/generated/notification/client/utils.gen.d.ts +37 -0
- package/dist/generated/notification/client.gen.d.ts +12 -0
- package/dist/generated/notification/core/auth.gen.d.ts +25 -0
- package/dist/generated/notification/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/notification/core/params.gen.d.ts +43 -0
- package/dist/generated/notification/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/notification/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/notification/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/notification/core/types.gen.d.ts +83 -0
- package/dist/generated/notification/core/utils.gen.d.ts +19 -0
- package/dist/generated/notification/index.d.ts +2 -0
- package/dist/generated/notification/index.js +6 -0
- package/dist/generated/notification/sdk.gen.d.ts +118 -0
- package/dist/generated/notification/types.gen.d.ts +1352 -0
- package/dist/generated/properties/client/client.gen.d.ts +2 -0
- package/dist/generated/properties/client/index.d.ts +10 -0
- package/dist/generated/properties/client/types.gen.d.ts +120 -0
- package/dist/generated/properties/client/utils.gen.d.ts +37 -0
- package/dist/generated/properties/client.gen.d.ts +12 -0
- package/dist/generated/properties/core/auth.gen.d.ts +25 -0
- package/dist/generated/properties/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/properties/core/params.gen.d.ts +43 -0
- package/dist/generated/properties/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/properties/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/properties/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/properties/core/types.gen.d.ts +83 -0
- package/dist/generated/properties/core/utils.gen.d.ts +19 -0
- package/dist/generated/properties/index.d.ts +2 -0
- package/dist/generated/properties/index.js +6 -0
- package/dist/generated/properties/sdk.gen.d.ts +158 -0
- package/dist/generated/properties/types.gen.d.ts +1288 -0
- package/dist/generated/scheduled-action/client/client.gen.d.ts +2 -0
- package/dist/generated/scheduled-action/client/index.d.ts +10 -0
- package/dist/generated/scheduled-action/client/types.gen.d.ts +120 -0
- package/dist/generated/scheduled-action/client/utils.gen.d.ts +37 -0
- package/dist/generated/scheduled-action/client.gen.d.ts +12 -0
- package/dist/generated/scheduled-action/core/auth.gen.d.ts +25 -0
- package/dist/generated/scheduled-action/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/scheduled-action/core/params.gen.d.ts +43 -0
- package/dist/generated/scheduled-action/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/scheduled-action/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/scheduled-action/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/scheduled-action/core/types.gen.d.ts +83 -0
- package/dist/generated/scheduled-action/core/utils.gen.d.ts +19 -0
- package/dist/generated/scheduled-action/index.d.ts +2 -0
- package/dist/generated/scheduled-action/index.js +845 -0
- package/dist/generated/scheduled-action/sdk.gen.d.ts +42 -0
- package/dist/generated/scheduled-action/types.gen.d.ts +241 -0
- package/dist/generated/search/client/client.gen.d.ts +2 -0
- package/dist/generated/search/client/index.d.ts +10 -0
- package/dist/generated/search/client/types.gen.d.ts +120 -0
- package/dist/generated/search/client/utils.gen.d.ts +37 -0
- package/dist/generated/search/client.gen.d.ts +12 -0
- package/dist/generated/search/core/auth.gen.d.ts +25 -0
- package/dist/generated/search/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/search/core/params.gen.d.ts +43 -0
- package/dist/generated/search/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/search/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/search/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/search/core/types.gen.d.ts +83 -0
- package/dist/generated/search/core/utils.gen.d.ts +19 -0
- package/dist/generated/search/index.d.ts +2 -0
- package/dist/generated/search/index.js +6 -0
- package/dist/generated/search/sdk.gen.d.ts +44 -0
- package/dist/generated/search/types.gen.d.ts +2194 -0
- package/dist/generated/static-files/client/client.gen.d.ts +2 -0
- package/dist/generated/static-files/client/index.d.ts +10 -0
- package/dist/generated/static-files/client/types.gen.d.ts +120 -0
- package/dist/generated/static-files/client/utils.gen.d.ts +37 -0
- package/dist/generated/static-files/client.gen.d.ts +12 -0
- package/dist/generated/static-files/core/auth.gen.d.ts +25 -0
- package/dist/generated/static-files/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/static-files/core/params.gen.d.ts +43 -0
- package/dist/generated/static-files/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/static-files/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/static-files/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/static-files/core/types.gen.d.ts +83 -0
- package/dist/generated/static-files/core/utils.gen.d.ts +19 -0
- package/dist/generated/static-files/index.d.ts +2 -0
- package/dist/generated/static-files/index.js +842 -0
- package/dist/generated/static-files/sdk.gen.d.ts +43 -0
- package/dist/generated/static-files/types.gen.d.ts +214 -0
- package/dist/generated/storage/client/client.gen.d.ts +2 -0
- package/dist/generated/storage/client/index.d.ts +10 -0
- package/dist/generated/storage/client/types.gen.d.ts +120 -0
- package/dist/generated/storage/client/utils.gen.d.ts +37 -0
- package/dist/generated/storage/client.gen.d.ts +12 -0
- package/dist/generated/storage/core/auth.gen.d.ts +25 -0
- package/dist/generated/storage/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/storage/core/params.gen.d.ts +43 -0
- package/dist/generated/storage/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/storage/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/storage/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/storage/core/types.gen.d.ts +83 -0
- package/dist/generated/storage/core/utils.gen.d.ts +19 -0
- package/dist/generated/storage/index.d.ts +2 -0
- package/dist/generated/storage/index.js +6 -0
- package/dist/generated/storage/sdk.gen.d.ts +858 -0
- package/dist/generated/storage/types.gen.d.ts +12105 -0
- package/dist/generated/unfurl/client/client.gen.d.ts +2 -0
- package/dist/generated/unfurl/client/index.d.ts +10 -0
- package/dist/generated/unfurl/client/types.gen.d.ts +120 -0
- package/dist/generated/unfurl/client/utils.gen.d.ts +37 -0
- package/dist/generated/unfurl/client.gen.d.ts +12 -0
- package/dist/generated/unfurl/core/auth.gen.d.ts +25 -0
- package/dist/generated/unfurl/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/unfurl/core/params.gen.d.ts +43 -0
- package/dist/generated/unfurl/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/unfurl/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/unfurl/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/unfurl/core/types.gen.d.ts +83 -0
- package/dist/generated/unfurl/core/utils.gen.d.ts +19 -0
- package/dist/generated/unfurl/index.d.ts +2 -0
- package/dist/generated/unfurl/index.js +835 -0
- package/dist/generated/unfurl/sdk.gen.d.ts +47 -0
- package/dist/generated/unfurl/types.gen.d.ts +125 -0
- package/dist/src/config.d.ts +51 -0
- package/dist/src/entities/agent-sessions/agent-session.d.ts +45 -0
- package/dist/src/entities/agent-sessions/namespace.d.ts +18 -0
- package/dist/src/entities/bots/namespace.d.ts +25 -0
- package/dist/src/entities/calls/call-record.d.ts +55 -0
- package/dist/src/entities/calls/namespace.d.ts +9 -0
- package/dist/src/entities/channels/channel.d.ts +88 -0
- package/dist/src/entities/channels/message.d.ts +64 -0
- package/dist/src/entities/channels/namespace.d.ts +30 -0
- package/dist/src/entities/channels/post.d.ts +20 -0
- package/dist/src/entities/channels/thread.d.ts +30 -0
- package/dist/src/entities/chats/chat.d.ts +55 -0
- package/dist/src/entities/chats/namespace.d.ts +14 -0
- package/dist/src/entities/crm/comment.d.ts +43 -0
- package/dist/src/entities/crm/company.d.ts +70 -0
- package/dist/src/entities/crm/contact.d.ts +48 -0
- package/dist/src/entities/crm/namespace.d.ts +22 -0
- package/dist/src/entities/documents/comment.d.ts +41 -0
- package/dist/src/entities/documents/document.d.ts +130 -0
- package/dist/src/entities/documents/namespace.d.ts +43 -0
- package/dist/src/entities/documents/system-skill.d.ts +16 -0
- package/dist/src/entities/email/attachment.d.ts +36 -0
- package/dist/src/entities/email/label.d.ts +31 -0
- package/dist/src/entities/email/link.d.ts +29 -0
- package/dist/src/entities/email/message.d.ts +58 -0
- package/dist/src/entities/email/namespace.d.ts +49 -0
- package/dist/src/entities/email/thread.d.ts +88 -0
- package/dist/src/entities/entity.d.ts +101 -0
- package/dist/src/entities/favorites/namespace.d.ts +19 -0
- package/dist/src/entities/foreign/foreign-entity.d.ts +30 -0
- package/dist/src/entities/foreign/namespace.d.ts +7 -0
- package/dist/src/entities/notifications/namespace.d.ts +29 -0
- package/dist/src/entities/notifications/notification.d.ts +50 -0
- package/dist/src/entities/pins/namespace.d.ts +19 -0
- package/dist/src/entities/projects/namespace.d.ts +13 -0
- package/dist/src/entities/projects/project.d.ts +42 -0
- package/dist/src/entities/properties/namespace.d.ts +47 -0
- package/dist/src/entities/properties/property-definition.d.ts +45 -0
- package/dist/src/entities/properties/property-option.d.ts +32 -0
- package/dist/src/entities/search.d.ts +23 -0
- package/dist/src/entities/tasks/namespace.d.ts +21 -0
- package/dist/src/entities/tasks/task.d.ts +34 -0
- package/dist/src/entities/teams/namespace.d.ts +12 -0
- package/dist/src/entities/teams/team.d.ts +40 -0
- package/dist/src/entities/users/namespace.d.ts +10 -0
- package/dist/src/entities/users/user.d.ts +43 -0
- package/dist/src/entities/webhooks/namespace.d.ts +31 -0
- package/dist/src/entities/webhooks/webhook.d.ts +88 -0
- package/dist/src/events/hydrate/channel.d.ts +85 -0
- package/dist/src/events/hydrate/document.d.ts +54 -0
- package/dist/src/events/receiver.d.ts +51 -0
- package/dist/src/events/types.d.ts +40 -0
- package/dist/src/events/verify.d.ts +13 -0
- package/dist/src/local-portmap.d.ts +8 -0
- package/dist/src/macro.d.ts +62 -0
- package/dist/src/macro.js +4215 -0
- package/dist/src/mentions.d.ts +37 -0
- package/dist/src/raw.d.ts +12 -0
- package/dist/src/utils/client.d.ts +53 -0
- package/dist/src/utils/index.d.ts +4 -0
- package/dist/src/utils/lazy.d.ts +18 -0
- package/dist/src/utils/pagination.d.ts +7 -0
- package/dist/src/utils/unwrap.d.ts +23 -0
- package/package.json +49 -0
|
@@ -0,0 +1,2484 @@
|
|
|
1
|
+
export type ClientOptions = {
|
|
2
|
+
baseUrl: `${string}://${string}` | (string & {});
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Ordered from least to most access top -> bottom
|
|
6
|
+
*/
|
|
7
|
+
export type AccessLevel = 'view' | 'comment' | 'edit' | 'owner';
|
|
8
|
+
/**
|
|
9
|
+
* Request body for adding a new MCP server.
|
|
10
|
+
*/
|
|
11
|
+
export type AddServerRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* Human-readable name for the server.
|
|
14
|
+
*/
|
|
15
|
+
server_name: string;
|
|
16
|
+
/**
|
|
17
|
+
* The MCP server's streamable HTTP URL.
|
|
18
|
+
*/
|
|
19
|
+
url: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Everything we use AI for. The wire / DB form of each variant is its
|
|
23
|
+
* `snake_case` name.
|
|
24
|
+
*/
|
|
25
|
+
export type AiFeature = 'chat' | 'memory' | 'automation' | 'dynamic_completions_api' | 'chat_rename' | 'call_summary' | 'channel_bot' | 'ai_projection' | 'ai_editing' | 'import' | 'agent_session';
|
|
26
|
+
/**
|
|
27
|
+
* A structured part within an assistant message.
|
|
28
|
+
*
|
|
29
|
+
* When the model responds with tool calls the full turn is persisted as a
|
|
30
|
+
* flat sequence of these parts. [`crate::convert::to_rig_messages`]
|
|
31
|
+
* reconstructs the turn boundaries that providers expect.
|
|
32
|
+
*/
|
|
33
|
+
export type AssistantMessagePart = {
|
|
34
|
+
/**
|
|
35
|
+
* The text content.
|
|
36
|
+
*/
|
|
37
|
+
text: string;
|
|
38
|
+
type: 'text';
|
|
39
|
+
} | {
|
|
40
|
+
/**
|
|
41
|
+
* Provider-assigned call id.
|
|
42
|
+
*/
|
|
43
|
+
id: string;
|
|
44
|
+
/**
|
|
45
|
+
* Tool arguments as JSON.
|
|
46
|
+
*/
|
|
47
|
+
json: unknown;
|
|
48
|
+
/**
|
|
49
|
+
* Tool name.
|
|
50
|
+
*/
|
|
51
|
+
name: string;
|
|
52
|
+
type: 'toolCall';
|
|
53
|
+
} | {
|
|
54
|
+
/**
|
|
55
|
+
* Optional human-readable name.
|
|
56
|
+
*/
|
|
57
|
+
display_name?: string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Provider-assigned call id.
|
|
60
|
+
*/
|
|
61
|
+
id: string;
|
|
62
|
+
/**
|
|
63
|
+
* Tool arguments as JSON.
|
|
64
|
+
*/
|
|
65
|
+
json: unknown;
|
|
66
|
+
/**
|
|
67
|
+
* Tool name.
|
|
68
|
+
*/
|
|
69
|
+
name: string;
|
|
70
|
+
/**
|
|
71
|
+
* MCP service identifier.
|
|
72
|
+
*/
|
|
73
|
+
service: string;
|
|
74
|
+
type: 'mcpToolCall';
|
|
75
|
+
} | {
|
|
76
|
+
/**
|
|
77
|
+
* Corresponding call id.
|
|
78
|
+
*/
|
|
79
|
+
id: string;
|
|
80
|
+
/**
|
|
81
|
+
* Response payload.
|
|
82
|
+
*/
|
|
83
|
+
json: unknown;
|
|
84
|
+
/**
|
|
85
|
+
* Tool name.
|
|
86
|
+
*/
|
|
87
|
+
name: string;
|
|
88
|
+
type: 'toolCallResponseJson';
|
|
89
|
+
} | {
|
|
90
|
+
/**
|
|
91
|
+
* Human-readable error description.
|
|
92
|
+
*/
|
|
93
|
+
description: string;
|
|
94
|
+
/**
|
|
95
|
+
* Corresponding call id.
|
|
96
|
+
*/
|
|
97
|
+
id: string;
|
|
98
|
+
/**
|
|
99
|
+
* Tool name.
|
|
100
|
+
*/
|
|
101
|
+
name: string;
|
|
102
|
+
type: 'toolCallErr';
|
|
103
|
+
} | {
|
|
104
|
+
/**
|
|
105
|
+
* The thinking text content.
|
|
106
|
+
*/
|
|
107
|
+
thinking: string;
|
|
108
|
+
type: 'thinking';
|
|
109
|
+
};
|
|
110
|
+
export type AttachmentMetadata = {
|
|
111
|
+
/**
|
|
112
|
+
* Name of the document
|
|
113
|
+
*/
|
|
114
|
+
document_name: string;
|
|
115
|
+
/**
|
|
116
|
+
* Type of the document ['pdf' | 'docx' | 'md']
|
|
117
|
+
*/
|
|
118
|
+
document_type: FileType;
|
|
119
|
+
type: 'document';
|
|
120
|
+
} | {
|
|
121
|
+
project_name: string;
|
|
122
|
+
type: 'project';
|
|
123
|
+
} | {
|
|
124
|
+
/**
|
|
125
|
+
* jpg | png | etc
|
|
126
|
+
*/
|
|
127
|
+
image_extension: FileType;
|
|
128
|
+
/**
|
|
129
|
+
* image name
|
|
130
|
+
*/
|
|
131
|
+
image_name: string;
|
|
132
|
+
type: 'image';
|
|
133
|
+
} | {
|
|
134
|
+
channel_name: string;
|
|
135
|
+
channel_type: ChannelType;
|
|
136
|
+
type: 'channel';
|
|
137
|
+
} | {
|
|
138
|
+
email_subject: string;
|
|
139
|
+
type: 'email';
|
|
140
|
+
};
|
|
141
|
+
export type AttachmentType = 'document' | 'image' | 'channel' | 'email' | 'project' | 'skill';
|
|
142
|
+
/**
|
|
143
|
+
* Request body for executing a pending tool call.
|
|
144
|
+
*/
|
|
145
|
+
export type CallToolRequest = {
|
|
146
|
+
/**
|
|
147
|
+
* Optional updated arguments. Uses original args if omitted.
|
|
148
|
+
*/
|
|
149
|
+
args?: unknown;
|
|
150
|
+
/**
|
|
151
|
+
* The message ID containing the tool call.
|
|
152
|
+
*/
|
|
153
|
+
messageId: string;
|
|
154
|
+
/**
|
|
155
|
+
* The tool call ID to execute.
|
|
156
|
+
*/
|
|
157
|
+
toolCallId: string;
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* Response body for a successful tool call.
|
|
161
|
+
*/
|
|
162
|
+
export type CallToolResponse = {
|
|
163
|
+
/**
|
|
164
|
+
* The tool execution result.
|
|
165
|
+
*/
|
|
166
|
+
result: unknown;
|
|
167
|
+
};
|
|
168
|
+
/**
|
|
169
|
+
* The channel share permission
|
|
170
|
+
*/
|
|
171
|
+
export type ChannelSharePermission = {
|
|
172
|
+
/**
|
|
173
|
+
* The access level for the channel
|
|
174
|
+
*/
|
|
175
|
+
access_level: AccessLevel;
|
|
176
|
+
/**
|
|
177
|
+
* The channel id
|
|
178
|
+
*/
|
|
179
|
+
channel_id: string;
|
|
180
|
+
};
|
|
181
|
+
export type ChannelType = 'public' | 'private' | 'direct_message' | 'team';
|
|
182
|
+
export type Chat = {
|
|
183
|
+
/**
|
|
184
|
+
* The time the chat was created
|
|
185
|
+
*/
|
|
186
|
+
createdAt?: string | null;
|
|
187
|
+
/**
|
|
188
|
+
* The time the chat was deleted
|
|
189
|
+
*/
|
|
190
|
+
deletedAt?: string | null;
|
|
191
|
+
/**
|
|
192
|
+
* The chat uuid
|
|
193
|
+
*/
|
|
194
|
+
id: string;
|
|
195
|
+
isPersistent: boolean;
|
|
196
|
+
/**
|
|
197
|
+
* The model used to generate the chat
|
|
198
|
+
*/
|
|
199
|
+
model?: string | null;
|
|
200
|
+
/**
|
|
201
|
+
* The name of the chat
|
|
202
|
+
*/
|
|
203
|
+
name: string;
|
|
204
|
+
/**
|
|
205
|
+
* The project id of the chat
|
|
206
|
+
*/
|
|
207
|
+
projectId?: string | null;
|
|
208
|
+
tokenCount?: number | null;
|
|
209
|
+
/**
|
|
210
|
+
* The time the chat was last updated
|
|
211
|
+
*/
|
|
212
|
+
updatedAt?: string | null;
|
|
213
|
+
/**
|
|
214
|
+
* Who the chat belongs to
|
|
215
|
+
*/
|
|
216
|
+
userId: string;
|
|
217
|
+
};
|
|
218
|
+
export type ChatAttachment = {
|
|
219
|
+
/**
|
|
220
|
+
* The id of the attachment
|
|
221
|
+
* either a `document_id` or `project_id` or `chat_id`
|
|
222
|
+
*/
|
|
223
|
+
attachment_id: string;
|
|
224
|
+
/**
|
|
225
|
+
* The type of attachment
|
|
226
|
+
*/
|
|
227
|
+
attachment_type: AttachmentType;
|
|
228
|
+
/**
|
|
229
|
+
* The id of the chat if the attachment is a chat
|
|
230
|
+
*/
|
|
231
|
+
chat_id?: string | null;
|
|
232
|
+
/**
|
|
233
|
+
* db attachment id - unused
|
|
234
|
+
*/
|
|
235
|
+
id: string;
|
|
236
|
+
/**
|
|
237
|
+
* The id of the message if the attachment is a message
|
|
238
|
+
*/
|
|
239
|
+
message_id?: string | null;
|
|
240
|
+
};
|
|
241
|
+
export type ChatHistory = {
|
|
242
|
+
conversation: Array<ConversationRecord>;
|
|
243
|
+
};
|
|
244
|
+
export type ChatHistoryBatchMessagesRequest = {
|
|
245
|
+
message_ids: Array<string>;
|
|
246
|
+
};
|
|
247
|
+
export type ChatMessage = {
|
|
248
|
+
/**
|
|
249
|
+
* Message content
|
|
250
|
+
*/
|
|
251
|
+
content: ChatMessageContent;
|
|
252
|
+
/**
|
|
253
|
+
* The chat message id
|
|
254
|
+
*/
|
|
255
|
+
id: string;
|
|
256
|
+
/**
|
|
257
|
+
* the model used to generate the message
|
|
258
|
+
*/
|
|
259
|
+
model?: string | null;
|
|
260
|
+
/**
|
|
261
|
+
* Whether the chat is from the user or system
|
|
262
|
+
*/
|
|
263
|
+
role: Role;
|
|
264
|
+
};
|
|
265
|
+
/**
|
|
266
|
+
* The content of a [`ChatMessage`].
|
|
267
|
+
*
|
|
268
|
+
* For user and system messages the content is plain [`Text`](Self::Text).
|
|
269
|
+
* For assistant messages it may additionally be a sequence of
|
|
270
|
+
* [`AssistantMessagePart`]s that encode tool-call round trips.
|
|
271
|
+
*/
|
|
272
|
+
export type ChatMessageContent = string | Array<AssistantMessagePart>;
|
|
273
|
+
/**
|
|
274
|
+
* Error response for chat message endpoints
|
|
275
|
+
*/
|
|
276
|
+
export type ChatMessageError = {
|
|
277
|
+
error: string;
|
|
278
|
+
stream_id?: string | null;
|
|
279
|
+
};
|
|
280
|
+
export type ChatMessageWithAttachments = {
|
|
281
|
+
/**
|
|
282
|
+
* The ids of the attachments used to generate the message
|
|
283
|
+
*/
|
|
284
|
+
attachments: Array<Entity>;
|
|
285
|
+
/**
|
|
286
|
+
* Message content
|
|
287
|
+
*/
|
|
288
|
+
content: ChatMessageContent;
|
|
289
|
+
/**
|
|
290
|
+
* The chat message id
|
|
291
|
+
*/
|
|
292
|
+
id: string;
|
|
293
|
+
/**
|
|
294
|
+
* Whether the chat is from the user or system
|
|
295
|
+
*/
|
|
296
|
+
role: Role;
|
|
297
|
+
};
|
|
298
|
+
export type ChatPreview = (ChatPreviewData & {
|
|
299
|
+
type: 'access';
|
|
300
|
+
}) | (WithChatId & {
|
|
301
|
+
type: 'no_access';
|
|
302
|
+
}) | (WithChatId & {
|
|
303
|
+
type: 'does_not_exist';
|
|
304
|
+
});
|
|
305
|
+
export type ChatPreviewData = {
|
|
306
|
+
chat_id: string;
|
|
307
|
+
chat_name: string;
|
|
308
|
+
owner: string;
|
|
309
|
+
updated_at?: string | null;
|
|
310
|
+
};
|
|
311
|
+
/**
|
|
312
|
+
* The full chat response, matching the DCS API response shape.
|
|
313
|
+
*/
|
|
314
|
+
export type ChatResponse = {
|
|
315
|
+
/**
|
|
316
|
+
* The time the chat was created.
|
|
317
|
+
*/
|
|
318
|
+
createdAt?: string | null;
|
|
319
|
+
/**
|
|
320
|
+
* The chat uuid.
|
|
321
|
+
*/
|
|
322
|
+
id: string;
|
|
323
|
+
/**
|
|
324
|
+
* The messages in the chat.
|
|
325
|
+
*/
|
|
326
|
+
messages: Array<ChatMessageWithAttachments>;
|
|
327
|
+
/**
|
|
328
|
+
* The model used to generate the chat (`provider/model` id).
|
|
329
|
+
*/
|
|
330
|
+
model?: string | null;
|
|
331
|
+
/**
|
|
332
|
+
* The name of the chat.
|
|
333
|
+
*/
|
|
334
|
+
name: string;
|
|
335
|
+
/**
|
|
336
|
+
* The project id the chat belongs to.
|
|
337
|
+
*/
|
|
338
|
+
projectId?: string | null;
|
|
339
|
+
/**
|
|
340
|
+
* The time the chat was last updated.
|
|
341
|
+
*/
|
|
342
|
+
updatedAt?: string | null;
|
|
343
|
+
/**
|
|
344
|
+
* Who the chat belongs to.
|
|
345
|
+
*/
|
|
346
|
+
userId: string;
|
|
347
|
+
};
|
|
348
|
+
export type ChatStream = (StreamError & {
|
|
349
|
+
type: 'error';
|
|
350
|
+
}) | {
|
|
351
|
+
attachments: Array<Entity>;
|
|
352
|
+
chat_id: string;
|
|
353
|
+
content: string;
|
|
354
|
+
message_id: string;
|
|
355
|
+
stream_id: string;
|
|
356
|
+
type: 'chat_user_message';
|
|
357
|
+
} | {
|
|
358
|
+
chat_id: string;
|
|
359
|
+
content: AssistantMessagePart;
|
|
360
|
+
message_id: string;
|
|
361
|
+
stream_id: string;
|
|
362
|
+
type: 'chat_message_response';
|
|
363
|
+
} | {
|
|
364
|
+
stream_id: string;
|
|
365
|
+
type: 'stream_end';
|
|
366
|
+
};
|
|
367
|
+
/**
|
|
368
|
+
* Body for completing onboarding.
|
|
369
|
+
*/
|
|
370
|
+
export type CompleteOnboardingRequest = {
|
|
371
|
+
/**
|
|
372
|
+
* Whether the user skipped rather than finished.
|
|
373
|
+
*/
|
|
374
|
+
skipped?: boolean;
|
|
375
|
+
};
|
|
376
|
+
/**
|
|
377
|
+
* A recorded completion: who, what feature, optional entity, and the cost.
|
|
378
|
+
*/
|
|
379
|
+
export type CompletionUsage = {
|
|
380
|
+
/**
|
|
381
|
+
* Token usage and cost.
|
|
382
|
+
*/
|
|
383
|
+
cost: Usage;
|
|
384
|
+
/**
|
|
385
|
+
* The entity the completion related to, if any.
|
|
386
|
+
*/
|
|
387
|
+
entity?: string | null;
|
|
388
|
+
/**
|
|
389
|
+
* The feature that performed the completion.
|
|
390
|
+
*/
|
|
391
|
+
feature: AiFeature;
|
|
392
|
+
/**
|
|
393
|
+
* The user the completion was performed for (the [system user](SYSTEM_USER_ID)
|
|
394
|
+
* for background work).
|
|
395
|
+
*/
|
|
396
|
+
user: MacroUserIdStr;
|
|
397
|
+
};
|
|
398
|
+
/**
|
|
399
|
+
* One of the user's MCP server connections, as the setup page sees it.
|
|
400
|
+
*/
|
|
401
|
+
export type ConnectedServer = {
|
|
402
|
+
/**
|
|
403
|
+
* Whether the user has completed OAuth against it.
|
|
404
|
+
*/
|
|
405
|
+
authenticated: boolean;
|
|
406
|
+
/**
|
|
407
|
+
* The server's display name.
|
|
408
|
+
*/
|
|
409
|
+
name: string;
|
|
410
|
+
/**
|
|
411
|
+
* The server URL.
|
|
412
|
+
*/
|
|
413
|
+
url: string;
|
|
414
|
+
};
|
|
415
|
+
export type ConversationRecord = {
|
|
416
|
+
chat_id: string;
|
|
417
|
+
messages: Array<MessageWithAttachments>;
|
|
418
|
+
title: string;
|
|
419
|
+
};
|
|
420
|
+
/**
|
|
421
|
+
* Request body for creating a chat.
|
|
422
|
+
*/
|
|
423
|
+
export type CreateChatRequest = {
|
|
424
|
+
/**
|
|
425
|
+
* Optional name for the chat.
|
|
426
|
+
*/
|
|
427
|
+
name?: string | null;
|
|
428
|
+
/**
|
|
429
|
+
* Optional project to associate the chat with.
|
|
430
|
+
*/
|
|
431
|
+
projectId?: string | null;
|
|
432
|
+
};
|
|
433
|
+
export type DocumentCognitionServiceApiVersion = 'v1' | 'v2';
|
|
434
|
+
export type DocumentReference = UserPdfRect & {
|
|
435
|
+
kind: 'pdf';
|
|
436
|
+
};
|
|
437
|
+
export type DocumentTextPart = {
|
|
438
|
+
document_id: string;
|
|
439
|
+
id: string;
|
|
440
|
+
reference: DocumentReference;
|
|
441
|
+
};
|
|
442
|
+
/**
|
|
443
|
+
* Schema definition for dynamic structured completions.
|
|
444
|
+
*/
|
|
445
|
+
export type DynamicSchema = {
|
|
446
|
+
/**
|
|
447
|
+
* Optional description of what the schema represents.
|
|
448
|
+
*/
|
|
449
|
+
description?: string | null;
|
|
450
|
+
/**
|
|
451
|
+
* Name of the schema.
|
|
452
|
+
*/
|
|
453
|
+
name: string;
|
|
454
|
+
/**
|
|
455
|
+
* The JSON schema to validate against.
|
|
456
|
+
*/
|
|
457
|
+
schema: unknown;
|
|
458
|
+
};
|
|
459
|
+
/**
|
|
460
|
+
* The Entity describes the minimum amount of information required to describe a unique thing in Macro
|
|
461
|
+
* This contains the type of the entity [EntityType] and the string id of that entity
|
|
462
|
+
*/
|
|
463
|
+
export type Entity = {
|
|
464
|
+
/**
|
|
465
|
+
* The id of that entity
|
|
466
|
+
*/
|
|
467
|
+
entity_id: string;
|
|
468
|
+
/**
|
|
469
|
+
* The type of entity we are describing
|
|
470
|
+
*/
|
|
471
|
+
entity_type: EntityType;
|
|
472
|
+
};
|
|
473
|
+
/**
|
|
474
|
+
* The type of an entity in Macro
|
|
475
|
+
*/
|
|
476
|
+
export type EntityType = 'user' | 'chat' | 'channel' | 'channel_message' | 'document' | 'project' | 'email_thread' | 'calendar_event' | 'team' | 'call' | 'foreign_entity' | 'static_file' | 'crm_company' | 'crm_contact' | 'reminder' | 'skill' | 'agent_session';
|
|
477
|
+
/**
|
|
478
|
+
* Error response body.
|
|
479
|
+
*/
|
|
480
|
+
export type ErrorBody = {
|
|
481
|
+
/**
|
|
482
|
+
* Human-readable error description.
|
|
483
|
+
*/
|
|
484
|
+
error: string;
|
|
485
|
+
};
|
|
486
|
+
/**
|
|
487
|
+
* A plain old json error response for use with axum.
|
|
488
|
+
* yup, thats it.
|
|
489
|
+
*/
|
|
490
|
+
export type ErrorResponse = {
|
|
491
|
+
/**
|
|
492
|
+
* Message to explain failure
|
|
493
|
+
*/
|
|
494
|
+
message: string;
|
|
495
|
+
};
|
|
496
|
+
/**
|
|
497
|
+
* How long a projection remains active without being requested.
|
|
498
|
+
*/
|
|
499
|
+
export type Expiry = 'day' | 'week' | 'month';
|
|
500
|
+
/**
|
|
501
|
+
* Usage for a single feature, with its rolled-up dollar total.
|
|
502
|
+
*/
|
|
503
|
+
export type FeatureUsage = {
|
|
504
|
+
/**
|
|
505
|
+
* The individual completions recorded for this feature.
|
|
506
|
+
*/
|
|
507
|
+
entries: Array<CompletionUsage>;
|
|
508
|
+
/**
|
|
509
|
+
* The feature.
|
|
510
|
+
*/
|
|
511
|
+
feature: AiFeature;
|
|
512
|
+
/**
|
|
513
|
+
* Total cost across `entries` (USD).
|
|
514
|
+
*/
|
|
515
|
+
total: number;
|
|
516
|
+
};
|
|
517
|
+
/**
|
|
518
|
+
* Generates a FileType enum and associated ContentType enum with their implementations.
|
|
519
|
+
*
|
|
520
|
+
* This macro takes a list of tuples in the format:
|
|
521
|
+
* (Variant, "extension", "mime_type", CONTENT_TYPE_VARIANT)
|
|
522
|
+
*
|
|
523
|
+
* For each tuple it generates:
|
|
524
|
+
* - A variant in the FileType enum
|
|
525
|
+
* - A variant in the ContentType enum
|
|
526
|
+
* - Implementations for:
|
|
527
|
+
* - FileType::to_str() - Converts FileType to extension string
|
|
528
|
+
* - FileType::from_str() - Converts extension string to FileType
|
|
529
|
+
* - From<FileType> for ContentType - Maps FileType to ContentType
|
|
530
|
+
* - ContentType::mime_type() - Gets MIME type for ContentType
|
|
531
|
+
*
|
|
532
|
+
*/
|
|
533
|
+
export type FileType = 'docx' | 'pdf' | 'md' | 'canvas' | 'coffee' | 'cson' | 'iced' | 'c' | 'i' | 'cpp' | 'cppm' | 'cc' | 'ccm' | 'cxx' | 'cxxm' | 'cplusplus' | 'cplusplusm' | 'hpp' | 'hh' | 'hxx' | 'hplusplus' | 'h' | 'ii' | 'ino' | 'inl' | 'ipp' | 'ixx' | 'tpp' | 'txx' | 'hppin' | 'hin' | 'cu' | 'cuh' | 'cs' | 'csx' | 'cake' | 'css' | 'dart' | 'diff' | 'patch' | 'rej' | 'dockerfile' | 'containerfile' | 'go' | 'handlebars' | 'hbs' | 'hjs' | 'hlsl' | 'hlsli' | 'fx' | 'fxh' | 'vsh' | 'psh' | 'cginc' | 'compute' | 'html' | 'htm' | 'shtml' | 'xhtml' | 'xht' | 'mdoc' | 'jsp' | 'asp' | 'aspx' | 'jshtm' | 'volt' | 'ejs' | 'rhtml' | 'ini' | 'conf' | 'properties' | 'cfg' | 'directory' | 'gitattributes' | 'gitconfig' | 'gitmodules' | 'editorconfig' | 'repo' | 'java' | 'jav' | 'jsx' | 'js' | 'es6' | 'mjs' | 'cjs' | 'pac' | 'json' | 'bowerrc' | 'jscsrc' | 'webmanifest' | 'jsmap' | 'cssmap' | 'tsmap' | 'har' | 'jslintrc' | 'jsonld' | 'geojson' | 'ipynb' | 'vuerc' | 'jsonc' | 'eslintrc' | 'eslintrcjson' | 'jsfmtrc' | 'jshintrc' | 'swcrc' | 'hintrc' | 'babelrc' | 'jsonl' | 'ndjson' | 'codesnippets' | 'jl' | 'jmd' | 'sty' | 'cls' | 'bbx' | 'cbx' | 'tex' | 'ltx' | 'ctx' | 'bib' | 'less' | 'log' | 'lua' | 'mak' | 'mk' | 'mkd' | 'mdwn' | 'mdown' | 'markdown' | 'markdn' | 'mdtxt' | 'mdtext' | 'workbook' | 'm' | 'mm' | 'pl' | 'pm' | 'pod' | 't' | 'psgi' | 'raku' | 'rakumod' | 'rakutest' | 'rakudoc' | 'nqp' | 'p6' | 'pl6' | 'pm6' | 'php' | 'php4' | 'php5' | 'phtml' | 'ctp' | 'ps1' | 'psm1' | 'psd1' | 'pssc' | 'psrc' | 'py' | 'rpy' | 'pyw' | 'cpy' | 'gyp' | 'gypi' | 'pyi' | 'ipy' | 'pyt' | 'r' | 'rhistory' | 'rprofile' | 'rt' | 'cshtml' | 'razor' | 'rb' | 'rbx' | 'rjs' | 'gemspec' | 'rake' | 'ru' | 'erb' | 'podspec' | 'rbi' | 'rs' | 'scss' | 'sass' | 'shader' | 'sh' | 'bash' | 'bashrc' | 'bashaliases' | 'bashprofile' | 'bashlogin' | 'ebuild' | 'eclass' | 'profile' | 'bashlogout' | 'xprofile' | 'xsession' | 'xsessionrc' | 'zsh' | 'zshrc' | 'zprofile' | 'zlogin' | 'zlogout' | 'zshenv' | 'zshtheme' | 'fish' | 'ksh' | 'csh' | 'cshrc' | 'tcshrc' | 'yashrc' | 'yashprofile' | 'sql' | 'dsql' | 'swift' | 'ts' | 'cts' | 'mts' | 'tsx' | 'tsbuildinfo' | 'xml' | 'xsd' | 'ascx' | 'atom' | 'axml' | 'axaml' | 'bpmn' | 'cpt' | 'csl' | 'csproj' | 'csprojuser' | 'dita' | 'ditamap' | 'dtd' | 'ent' | 'mod' | 'dtml' | 'fsproj' | 'fxml' | 'iml' | 'isml' | 'jmx' | 'launch' | 'menu' | 'mxml' | 'nuspec' | 'opml' | 'owl' | 'proj' | 'props' | 'pt' | 'publishsettings' | 'pubxml' | 'pubxmluser' | 'rbxlx' | 'rbxmx' | 'rdf' | 'rng' | 'rss' | 'shproj' | 'storyboard' | 'targets' | 'tld' | 'tmx' | 'vbproj' | 'vbprojuser' | 'vcxproj' | 'vcxprojfilters' | 'wsdl' | 'wxi' | 'wxl' | 'wxs' | 'xaml' | 'xbl' | 'xib' | 'xlf' | 'xliff' | 'xpdl' | 'xul' | 'xoml' | 'xsl' | 'xslt' | 'yaml' | 'yml' | 'eyaml' | 'eyml' | 'cff' | 'yamltmlanguage' | 'yamltmpreferences' | 'yamltmtheme' | 'winget' | 'txt' | 'csv' | 'tsv' | 'jpeg' | 'jpg' | 'png' | 'gif' | 'svg' | 'webp' | 'avif' | 'bmp' | 'ico' | 'tiff' | 'tif' | 'heic' | 'heif' | 'tar' | 'targz' | 'tgz' | 'gz' | 'bz2' | 'tarbz2' | 'tbz2' | 'z' | 'tarz' | 'lz' | 'tarlz' | 'xz' | 'tarxz' | 'txz' | 'lzma' | 'tarlzma' | 'rar' | 'sevenz' | 'zst' | 'tarzst' | 'tzst' | 'zip' | 'exe' | 'msi' | 'dll' | 'bat' | 'cmd' | 'com' | 'appimage' | 'app' | 'bin' | 'deb' | 'rpm' | 'apk' | 'dmg' | 'pkg' | 'crx' | 'xpi' | 'mp3' | 'wav' | 'ogg' | 'flac' | 'aac' | 'm4a' | 'wma' | 'mid' | 'midi' | 'mp4' | 'mkv' | 'webm' | 'avi' | 'mov' | 'wmv' | 'mpg' | 'mpeg' | 'm4v' | 'flv' | 'f4v' | 'threegp' | 'ttf' | 'otf' | 'woff' | 'woff2' | 'eot' | 'rtf' | 'odt' | 'ods' | 'odp' | 'odg' | 'odf' | 'epub' | 'mobi' | 'azw' | 'azw3' | 'djvu' | 'xls' | 'ppt' | 'pptx' | 'xlsx' | 'db' | 'sqlite' | 'sqlite3' | 'mdb' | 'accdb' | 'dbf' | 'plist' | 'toml' | 'env' | 'dot' | 'gv' | 'torrent' | 'ics' | 'vcf' | 'ai' | 'eps' | 'ps' | 'dxf' | 'dwg' | 'stl' | 'obj' | 'fbx' | 'blend' | 'dae' | 'threeds' | 'gltf' | 'glb' | 'vhd' | 'vhdx' | 'vmdk' | 'ova' | 'ovf' | 'iso' | 'img' | 'swf';
|
|
534
|
+
export type GenericErrorResponse = {
|
|
535
|
+
/**
|
|
536
|
+
* Indicates if an error occurred
|
|
537
|
+
*/
|
|
538
|
+
error: boolean;
|
|
539
|
+
/**
|
|
540
|
+
* Message to explain failure
|
|
541
|
+
*/
|
|
542
|
+
message: string;
|
|
543
|
+
};
|
|
544
|
+
export type GetBatchPreviewRequest = {
|
|
545
|
+
chat_ids: Array<string>;
|
|
546
|
+
};
|
|
547
|
+
export type GetBatchPreviewResponse = {
|
|
548
|
+
previews: Array<ChatPreview>;
|
|
549
|
+
};
|
|
550
|
+
/**
|
|
551
|
+
* Response body for get chat permissions.
|
|
552
|
+
*/
|
|
553
|
+
export type GetChatPermissionsResponse = {
|
|
554
|
+
/**
|
|
555
|
+
* The share permissions for the chat.
|
|
556
|
+
*/
|
|
557
|
+
permissions: SharePermissionV2;
|
|
558
|
+
};
|
|
559
|
+
/**
|
|
560
|
+
* Wrapper response for get_chat, matching the DCS API response shape.
|
|
561
|
+
*/
|
|
562
|
+
export type GetChatResponse = {
|
|
563
|
+
/**
|
|
564
|
+
* The full chat data.
|
|
565
|
+
*/
|
|
566
|
+
chat: ChatResponse;
|
|
567
|
+
/**
|
|
568
|
+
* The requesting user's access level on this chat.
|
|
569
|
+
*/
|
|
570
|
+
userAccessLevel: AccessLevel;
|
|
571
|
+
};
|
|
572
|
+
export type GetChatsForAttachmentResponse = {
|
|
573
|
+
all_chats: Array<Chat>;
|
|
574
|
+
recent_chat?: null | Chat;
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* HTTP request payload for sending a chat message.
|
|
578
|
+
* Unlike the WebSocket payload, this does not include stream_id as it's generated server-side.
|
|
579
|
+
*/
|
|
580
|
+
export type HttpSendChatMessageRequest = {
|
|
581
|
+
/**
|
|
582
|
+
* Additional system instructions appended to the base system prompt
|
|
583
|
+
*/
|
|
584
|
+
additional_instructions?: string | null;
|
|
585
|
+
/**
|
|
586
|
+
* Attachments for the message
|
|
587
|
+
*/
|
|
588
|
+
attachments?: Array<Entity> | null;
|
|
589
|
+
/**
|
|
590
|
+
* Id of the chat the message belongs to (optional - if not provided, a new chat is created)
|
|
591
|
+
*/
|
|
592
|
+
chat_id?: string | null;
|
|
593
|
+
/**
|
|
594
|
+
* The content of the message
|
|
595
|
+
*/
|
|
596
|
+
content: string;
|
|
597
|
+
/**
|
|
598
|
+
* The model to respond with (`provider/model` id)
|
|
599
|
+
*/
|
|
600
|
+
model: string;
|
|
601
|
+
/**
|
|
602
|
+
* Which toolset to use. Defaults to `all`
|
|
603
|
+
*/
|
|
604
|
+
toolset?: ToolSet;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* One row of the import ledger.
|
|
608
|
+
*/
|
|
609
|
+
export type ImportEntity = {
|
|
610
|
+
/**
|
|
611
|
+
* When the row was first staged.
|
|
612
|
+
*/
|
|
613
|
+
created_at: string;
|
|
614
|
+
/**
|
|
615
|
+
* The Macro entity it became, once imported.
|
|
616
|
+
*/
|
|
617
|
+
entity_id?: string | null;
|
|
618
|
+
/**
|
|
619
|
+
* The Macro entity type (`task` | `md` | `channel`), once imported.
|
|
620
|
+
*/
|
|
621
|
+
entity_type?: string | null;
|
|
622
|
+
/**
|
|
623
|
+
* Stable id in the source system (see
|
|
624
|
+
* [`ImportSource::normalize_foreign_id`]).
|
|
625
|
+
*/
|
|
626
|
+
foreign_id: string;
|
|
627
|
+
/**
|
|
628
|
+
* Ledger row id.
|
|
629
|
+
*/
|
|
630
|
+
id: string;
|
|
631
|
+
/**
|
|
632
|
+
* Where it was first staged from.
|
|
633
|
+
*/
|
|
634
|
+
initiator: Initiator;
|
|
635
|
+
/**
|
|
636
|
+
* Failure detail from the last import attempt, when one failed.
|
|
637
|
+
*/
|
|
638
|
+
last_error?: string | null;
|
|
639
|
+
/**
|
|
640
|
+
* Per-source metadata (shape depends on `source`; see
|
|
641
|
+
* [`LinearIssueMeta`], [`NotionDocMeta`], [`SlackChannelMeta`]).
|
|
642
|
+
*/
|
|
643
|
+
metadata: unknown;
|
|
644
|
+
/**
|
|
645
|
+
* The external system the item comes from.
|
|
646
|
+
*/
|
|
647
|
+
source: ImportSource;
|
|
648
|
+
/**
|
|
649
|
+
* Where the row is in its lifecycle.
|
|
650
|
+
*/
|
|
651
|
+
status: ImportStatus;
|
|
652
|
+
/**
|
|
653
|
+
* The team the created entity was shared with, when it was.
|
|
654
|
+
*/
|
|
655
|
+
team_id?: string | null;
|
|
656
|
+
/**
|
|
657
|
+
* When the row last changed.
|
|
658
|
+
*/
|
|
659
|
+
updated_at: string;
|
|
660
|
+
/**
|
|
661
|
+
* The user who staged/imported it. Team-imported rows from teammates
|
|
662
|
+
* are visible with their owner's id, so clients can say "created by a
|
|
663
|
+
* teammate".
|
|
664
|
+
*/
|
|
665
|
+
user_id: string;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* Gather-run state for one user × source.
|
|
669
|
+
*/
|
|
670
|
+
export type ImportRun = {
|
|
671
|
+
/**
|
|
672
|
+
* Whether this run should import its onboarding-staged candidates as
|
|
673
|
+
* soon as gathering finishes.
|
|
674
|
+
*/
|
|
675
|
+
auto_import: boolean;
|
|
676
|
+
/**
|
|
677
|
+
* Gather or automatic-import failure detail, when the run failed.
|
|
678
|
+
*/
|
|
679
|
+
error?: string | null;
|
|
680
|
+
/**
|
|
681
|
+
* The source this run gathered from.
|
|
682
|
+
*/
|
|
683
|
+
source: ImportSource;
|
|
684
|
+
/**
|
|
685
|
+
* Where the run is in its lifecycle.
|
|
686
|
+
*/
|
|
687
|
+
status: RunStatus;
|
|
688
|
+
/**
|
|
689
|
+
* When the run state last changed.
|
|
690
|
+
*/
|
|
691
|
+
updated_at: string;
|
|
692
|
+
};
|
|
693
|
+
/**
|
|
694
|
+
* External systems items can be imported from.
|
|
695
|
+
*/
|
|
696
|
+
export type ImportSource = 'linear' | 'notion' | 'slack';
|
|
697
|
+
/**
|
|
698
|
+
* The full import aggregate for a user: gather runs plus visible ledger
|
|
699
|
+
* rows (their own, and teammates' team-imported rows).
|
|
700
|
+
*/
|
|
701
|
+
export type ImportState = {
|
|
702
|
+
/**
|
|
703
|
+
* Visible import entities, newest first.
|
|
704
|
+
*/
|
|
705
|
+
entities: Array<ImportEntity>;
|
|
706
|
+
/**
|
|
707
|
+
* Gather runs, one per source that ever gathered.
|
|
708
|
+
*/
|
|
709
|
+
runs: Array<ImportRun>;
|
|
710
|
+
};
|
|
711
|
+
/**
|
|
712
|
+
* Lifecycle of one import entity.
|
|
713
|
+
*/
|
|
714
|
+
export type ImportStatus = 'staged' | 'importing' | 'imported' | 'discarded';
|
|
715
|
+
/**
|
|
716
|
+
* Where an import entity was first staged from. Provenance only — never a
|
|
717
|
+
* visibility filter.
|
|
718
|
+
*/
|
|
719
|
+
export type Initiator = 'onboarding' | 'chat';
|
|
720
|
+
export type JwtPayload = {
|
|
721
|
+
token: string;
|
|
722
|
+
};
|
|
723
|
+
/**
|
|
724
|
+
* Metadata for one staged Linear issue.
|
|
725
|
+
*/
|
|
726
|
+
export type LinearIssueMeta = {
|
|
727
|
+
/**
|
|
728
|
+
* Assignee display name as Linear reports it.
|
|
729
|
+
*/
|
|
730
|
+
assignee?: string | null;
|
|
731
|
+
/**
|
|
732
|
+
* Assignee email, when Linear exposes it.
|
|
733
|
+
*/
|
|
734
|
+
assignee_email?: string | null;
|
|
735
|
+
/**
|
|
736
|
+
* Short markdown description.
|
|
737
|
+
*/
|
|
738
|
+
description?: string | null;
|
|
739
|
+
/**
|
|
740
|
+
* Due date as an ISO date (`YYYY-MM-DD`), when set.
|
|
741
|
+
*/
|
|
742
|
+
due_date?: string | null;
|
|
743
|
+
/**
|
|
744
|
+
* Linear's human identifier (e.g. `ENG-142`).
|
|
745
|
+
*/
|
|
746
|
+
identifier?: string | null;
|
|
747
|
+
/**
|
|
748
|
+
* Priority label (e.g. `Urgent`).
|
|
749
|
+
*/
|
|
750
|
+
priority?: string | null;
|
|
751
|
+
/**
|
|
752
|
+
* Workflow status name (e.g. `In Progress`).
|
|
753
|
+
*/
|
|
754
|
+
status?: string | null;
|
|
755
|
+
/**
|
|
756
|
+
* Issue title.
|
|
757
|
+
*/
|
|
758
|
+
title: string;
|
|
759
|
+
/**
|
|
760
|
+
* Deep link back to the issue in Linear.
|
|
761
|
+
*/
|
|
762
|
+
url?: string | null;
|
|
763
|
+
};
|
|
764
|
+
/**
|
|
765
|
+
* Defines who can access an item through its share link.
|
|
766
|
+
*/
|
|
767
|
+
export type LinkShare = 'PUBLIC' | 'TEAM';
|
|
768
|
+
export type MacroUserIdStr = string;
|
|
769
|
+
export type MemoryErrorBody = {
|
|
770
|
+
/**
|
|
771
|
+
* Error description.
|
|
772
|
+
*/
|
|
773
|
+
error: string;
|
|
774
|
+
};
|
|
775
|
+
/**
|
|
776
|
+
* The user's latest memory.
|
|
777
|
+
*/
|
|
778
|
+
export type MemoryResponse = {
|
|
779
|
+
/**
|
|
780
|
+
* The generated memory text.
|
|
781
|
+
*/
|
|
782
|
+
memory: string;
|
|
783
|
+
};
|
|
784
|
+
export type MessageWithAttachments = {
|
|
785
|
+
attachmentIds: Array<string>;
|
|
786
|
+
content: string;
|
|
787
|
+
date: string;
|
|
788
|
+
};
|
|
789
|
+
export type NewAttachment = {
|
|
790
|
+
attachment_id: string;
|
|
791
|
+
attachment_type: AttachmentType;
|
|
792
|
+
};
|
|
793
|
+
export type NewChatMessage = {
|
|
794
|
+
/**
|
|
795
|
+
* The ids of the attachments used to generate the message
|
|
796
|
+
*/
|
|
797
|
+
attachments?: Array<NewAttachment> | null;
|
|
798
|
+
/**
|
|
799
|
+
* Content of the message
|
|
800
|
+
*/
|
|
801
|
+
content: ChatMessageContent;
|
|
802
|
+
createdAt: string;
|
|
803
|
+
/**
|
|
804
|
+
* Optional pre-generated ID. If None, the database generates one.
|
|
805
|
+
*/
|
|
806
|
+
id?: string | null;
|
|
807
|
+
/**
|
|
808
|
+
* The model used to generate the chat (provider api id)
|
|
809
|
+
*/
|
|
810
|
+
model: string;
|
|
811
|
+
/**
|
|
812
|
+
* Whether the chat is from the user or system
|
|
813
|
+
*/
|
|
814
|
+
role: Role;
|
|
815
|
+
updatedAt: string;
|
|
816
|
+
};
|
|
817
|
+
export type NewMessageAttachment = {
|
|
818
|
+
attachmentId: string;
|
|
819
|
+
attachmentType: AttachmentType;
|
|
820
|
+
messageId: string;
|
|
821
|
+
};
|
|
822
|
+
/**
|
|
823
|
+
* Metadata for one staged Notion page. Deliberately has NO content field:
|
|
824
|
+
* page bodies are fetched at import time, for accepted pages only.
|
|
825
|
+
*/
|
|
826
|
+
export type NotionDocMeta = {
|
|
827
|
+
/**
|
|
828
|
+
* One-line summary of what the page contains.
|
|
829
|
+
*/
|
|
830
|
+
summary?: string | null;
|
|
831
|
+
/**
|
|
832
|
+
* Page title.
|
|
833
|
+
*/
|
|
834
|
+
title: string;
|
|
835
|
+
/**
|
|
836
|
+
* Deep link back to the page in Notion.
|
|
837
|
+
*/
|
|
838
|
+
url?: string | null;
|
|
839
|
+
};
|
|
840
|
+
/**
|
|
841
|
+
* One user's onboarding row.
|
|
842
|
+
*/
|
|
843
|
+
export type OnboardingRow = {
|
|
844
|
+
/**
|
|
845
|
+
* When the flow completed, if it has.
|
|
846
|
+
*/
|
|
847
|
+
completed_at?: string | null;
|
|
848
|
+
/**
|
|
849
|
+
* Whether the user skipped rather than finished.
|
|
850
|
+
*/
|
|
851
|
+
skipped: boolean;
|
|
852
|
+
/**
|
|
853
|
+
* When the flow was first touched.
|
|
854
|
+
*/
|
|
855
|
+
started_at: string;
|
|
856
|
+
/**
|
|
857
|
+
* Where the flow is in its lifecycle.
|
|
858
|
+
*/
|
|
859
|
+
status: OnboardingStatus;
|
|
860
|
+
};
|
|
861
|
+
/**
|
|
862
|
+
* The onboarding aggregate served to the setup page. Import runs and
|
|
863
|
+
* staged entities are served separately by `GET /import/state`.
|
|
864
|
+
*/
|
|
865
|
+
export type OnboardingState = {
|
|
866
|
+
/**
|
|
867
|
+
* The user's MCP server connections.
|
|
868
|
+
*/
|
|
869
|
+
connected_servers: Array<ConnectedServer>;
|
|
870
|
+
/**
|
|
871
|
+
* The user's onboarding row.
|
|
872
|
+
*/
|
|
873
|
+
row: OnboardingRow;
|
|
874
|
+
/**
|
|
875
|
+
* The account email's domain when it can back a domain team — i.e. it
|
|
876
|
+
* is not a generic consumer provider — `None` otherwise. Judged with
|
|
877
|
+
* the same list the teams service uses for domain auto-join and
|
|
878
|
+
* claiming, so the client never suggests a domain team the server
|
|
879
|
+
* would refuse.
|
|
880
|
+
*/
|
|
881
|
+
suggested_team_domain?: string | null;
|
|
882
|
+
};
|
|
883
|
+
/**
|
|
884
|
+
* Lifecycle of the onboarding flow itself.
|
|
885
|
+
*/
|
|
886
|
+
export type OnboardingStatus = 'active' | 'completed';
|
|
887
|
+
/**
|
|
888
|
+
* Request body for patching a chat.
|
|
889
|
+
*/
|
|
890
|
+
export type PatchChatRequest = {
|
|
891
|
+
/**
|
|
892
|
+
* New name for the chat.
|
|
893
|
+
*/
|
|
894
|
+
name?: string | null;
|
|
895
|
+
/**
|
|
896
|
+
* New project ID for the chat. Empty string clears the project.
|
|
897
|
+
*/
|
|
898
|
+
projectId?: string | null;
|
|
899
|
+
sharePermission?: null | UpdateSharePermissionRequestV2;
|
|
900
|
+
};
|
|
901
|
+
/**
|
|
902
|
+
* One connectable app in the catalog.
|
|
903
|
+
*/
|
|
904
|
+
export type PipedreamCatalogEntryResponse = {
|
|
905
|
+
/**
|
|
906
|
+
* Pipedream app name slug — pass this to the connect flow.
|
|
907
|
+
*/
|
|
908
|
+
app_slug: string;
|
|
909
|
+
/**
|
|
910
|
+
* One-line description of the app.
|
|
911
|
+
*/
|
|
912
|
+
description?: string | null;
|
|
913
|
+
/**
|
|
914
|
+
* Human-readable name to display.
|
|
915
|
+
*/
|
|
916
|
+
display_name: string;
|
|
917
|
+
/**
|
|
918
|
+
* URL of the app's icon, when available.
|
|
919
|
+
*/
|
|
920
|
+
icon_url?: string | null;
|
|
921
|
+
};
|
|
922
|
+
/**
|
|
923
|
+
* A page of the connector catalog.
|
|
924
|
+
*/
|
|
925
|
+
export type PipedreamCatalogResponse = {
|
|
926
|
+
/**
|
|
927
|
+
* Cursor for the next page. Absent on the last page.
|
|
928
|
+
*/
|
|
929
|
+
next_cursor?: string | null;
|
|
930
|
+
/**
|
|
931
|
+
* Catalog entries in display order (most popular first).
|
|
932
|
+
*/
|
|
933
|
+
servers: Array<PipedreamCatalogEntryResponse>;
|
|
934
|
+
};
|
|
935
|
+
/**
|
|
936
|
+
* Request body for completing a Pipedream connect flow.
|
|
937
|
+
*/
|
|
938
|
+
export type PipedreamCompleteRequest = {
|
|
939
|
+
/**
|
|
940
|
+
* The connected-account ID reported by the Connect UI on success.
|
|
941
|
+
*/
|
|
942
|
+
account_id: string;
|
|
943
|
+
/**
|
|
944
|
+
* Optional display name for the connector. Defaults to the app's name
|
|
945
|
+
* for new connections; existing connections keep their name.
|
|
946
|
+
*/
|
|
947
|
+
server_name?: string | null;
|
|
948
|
+
};
|
|
949
|
+
/**
|
|
950
|
+
* A connected MCP app as returned by the API.
|
|
951
|
+
*/
|
|
952
|
+
export type PipedreamConnectionResponse = {
|
|
953
|
+
/**
|
|
954
|
+
* Pipedream app name slug, e.g. `linear`.
|
|
955
|
+
*/
|
|
956
|
+
app_slug: string;
|
|
957
|
+
/**
|
|
958
|
+
* Whether the connector is enabled for tool use.
|
|
959
|
+
*/
|
|
960
|
+
enabled: boolean;
|
|
961
|
+
/**
|
|
962
|
+
* Human-readable display name.
|
|
963
|
+
*/
|
|
964
|
+
server_name: string;
|
|
965
|
+
};
|
|
966
|
+
/**
|
|
967
|
+
* Response from creating a Pipedream Connect token.
|
|
968
|
+
*/
|
|
969
|
+
export type PipedreamTokenResponse = {
|
|
970
|
+
/**
|
|
971
|
+
* Shareable link that opens the same connect flow in a browser tab.
|
|
972
|
+
*/
|
|
973
|
+
connect_link_url: string;
|
|
974
|
+
/**
|
|
975
|
+
* RFC 3339 expiry of the token.
|
|
976
|
+
*/
|
|
977
|
+
expires_at: string;
|
|
978
|
+
/**
|
|
979
|
+
* Short-lived token to open the Pipedream Connect UI with.
|
|
980
|
+
*/
|
|
981
|
+
token: string;
|
|
982
|
+
};
|
|
983
|
+
/**
|
|
984
|
+
* Request body for updating a connected app.
|
|
985
|
+
*/
|
|
986
|
+
export type PipedreamUpdateRequest = {
|
|
987
|
+
/**
|
|
988
|
+
* The app slug to update.
|
|
989
|
+
*/
|
|
990
|
+
app_slug: string;
|
|
991
|
+
/**
|
|
992
|
+
* Enable or disable the connector.
|
|
993
|
+
*/
|
|
994
|
+
enabled?: boolean | null;
|
|
995
|
+
/**
|
|
996
|
+
* New display name for the connector.
|
|
997
|
+
*/
|
|
998
|
+
server_name?: string | null;
|
|
999
|
+
};
|
|
1000
|
+
/**
|
|
1001
|
+
* Resolved price for one completion.
|
|
1002
|
+
*/
|
|
1003
|
+
export type Price = {
|
|
1004
|
+
/**
|
|
1005
|
+
* Price per million input tokens (USD).
|
|
1006
|
+
*/
|
|
1007
|
+
price_per_million_in: number;
|
|
1008
|
+
/**
|
|
1009
|
+
* Price per million output tokens (USD).
|
|
1010
|
+
*/
|
|
1011
|
+
price_per_million_out: number;
|
|
1012
|
+
/**
|
|
1013
|
+
* Total cost of the completion (USD).
|
|
1014
|
+
*/
|
|
1015
|
+
total: number;
|
|
1016
|
+
};
|
|
1017
|
+
/**
|
|
1018
|
+
* The current state of a user's projection instance.
|
|
1019
|
+
*/
|
|
1020
|
+
export type ProjectionStateResponse = {
|
|
1021
|
+
/**
|
|
1022
|
+
* The cached result, if any. JSON-encoded when the projection defines an
|
|
1023
|
+
* `output_schema`.
|
|
1024
|
+
*/
|
|
1025
|
+
data?: string | null;
|
|
1026
|
+
/**
|
|
1027
|
+
* The most recent materialization error, if any.
|
|
1028
|
+
*/
|
|
1029
|
+
error?: string | null;
|
|
1030
|
+
/**
|
|
1031
|
+
* When the result was generated.
|
|
1032
|
+
*/
|
|
1033
|
+
generated_at?: string | null;
|
|
1034
|
+
/**
|
|
1035
|
+
* The projection id.
|
|
1036
|
+
*/
|
|
1037
|
+
id: string;
|
|
1038
|
+
/**
|
|
1039
|
+
* When the result becomes stale.
|
|
1040
|
+
*/
|
|
1041
|
+
stale_at?: string | null;
|
|
1042
|
+
/**
|
|
1043
|
+
* The materialization status.
|
|
1044
|
+
*/
|
|
1045
|
+
status: ProjectionStatus;
|
|
1046
|
+
};
|
|
1047
|
+
/**
|
|
1048
|
+
* The materialization status of a user's projection instance.
|
|
1049
|
+
*/
|
|
1050
|
+
export type ProjectionStatus = 'loading' | 'cold' | 'ready' | 'refreshing' | 'error';
|
|
1051
|
+
/**
|
|
1052
|
+
* How frequently an active projection is regenerated.
|
|
1053
|
+
*/
|
|
1054
|
+
export type RefreshCadence = 'high' | 'medium' | 'low';
|
|
1055
|
+
/**
|
|
1056
|
+
* Request body for rejecting a pending tool call.
|
|
1057
|
+
*/
|
|
1058
|
+
export type RejectToolCallRequest = {
|
|
1059
|
+
/**
|
|
1060
|
+
* The message ID containing the tool call.
|
|
1061
|
+
*/
|
|
1062
|
+
messageId: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* The tool call ID to reject.
|
|
1065
|
+
*/
|
|
1066
|
+
toolCallId: string;
|
|
1067
|
+
};
|
|
1068
|
+
/**
|
|
1069
|
+
* The role of a message participant.
|
|
1070
|
+
*/
|
|
1071
|
+
export type Role = 'user' | 'assistant' | 'system';
|
|
1072
|
+
/**
|
|
1073
|
+
* Outcome of accepting/declining staged rows via `POST /import/run`.
|
|
1074
|
+
*/
|
|
1075
|
+
export type RunImportOutcome = {
|
|
1076
|
+
/**
|
|
1077
|
+
* How many rows were discarded.
|
|
1078
|
+
*/
|
|
1079
|
+
discarded: number;
|
|
1080
|
+
/**
|
|
1081
|
+
* How many rows flipped to `importing` (jobs are now copying them in).
|
|
1082
|
+
*/
|
|
1083
|
+
importing: number;
|
|
1084
|
+
};
|
|
1085
|
+
/**
|
|
1086
|
+
* Body for accepting/declining staged imports.
|
|
1087
|
+
*/
|
|
1088
|
+
export type RunImportRequest = {
|
|
1089
|
+
/**
|
|
1090
|
+
* Staged rows to discard.
|
|
1091
|
+
*/
|
|
1092
|
+
discard_ids?: Array<string>;
|
|
1093
|
+
/**
|
|
1094
|
+
* Staged rows to import.
|
|
1095
|
+
*/
|
|
1096
|
+
import_ids?: Array<string>;
|
|
1097
|
+
};
|
|
1098
|
+
/**
|
|
1099
|
+
* Lifecycle of a gather run (one per user × source).
|
|
1100
|
+
*/
|
|
1101
|
+
export type RunStatus = 'running' | 'ready' | 'importing' | 'completed' | 'failed' | 'dismissed';
|
|
1102
|
+
export type SendChatMessagePayload = JwtPayload & {
|
|
1103
|
+
/**
|
|
1104
|
+
* Additional system instructions appended to the base system prompt
|
|
1105
|
+
*/
|
|
1106
|
+
additional_instructions?: string | null;
|
|
1107
|
+
/**
|
|
1108
|
+
* Use citation prompt
|
|
1109
|
+
*/
|
|
1110
|
+
attachments?: Array<Entity> | null;
|
|
1111
|
+
/**
|
|
1112
|
+
* Id of the chat the message belongs to
|
|
1113
|
+
*/
|
|
1114
|
+
chat_id: string;
|
|
1115
|
+
/**
|
|
1116
|
+
* The content of the message
|
|
1117
|
+
*/
|
|
1118
|
+
content: string;
|
|
1119
|
+
/**
|
|
1120
|
+
* the chat model to respond with (`provider/model` id)
|
|
1121
|
+
*/
|
|
1122
|
+
model: string;
|
|
1123
|
+
/**
|
|
1124
|
+
* Stream ID for tracking the response
|
|
1125
|
+
*/
|
|
1126
|
+
stream_id: string;
|
|
1127
|
+
/**
|
|
1128
|
+
* Which toolset to use. Defaults to `all`
|
|
1129
|
+
*/
|
|
1130
|
+
toolset?: ToolSet;
|
|
1131
|
+
};
|
|
1132
|
+
/**
|
|
1133
|
+
* Response for initiating a chat message stream
|
|
1134
|
+
*/
|
|
1135
|
+
export type SendChatMessageResponse = {
|
|
1136
|
+
/**
|
|
1137
|
+
* The chat ID (may differ from request if a new chat was created)
|
|
1138
|
+
*/
|
|
1139
|
+
chat_id: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* The message ID for the AI response
|
|
1142
|
+
*/
|
|
1143
|
+
message_id: string;
|
|
1144
|
+
/**
|
|
1145
|
+
* The stream ID that will receive the response chunks (same as message_id)
|
|
1146
|
+
*/
|
|
1147
|
+
stream_id: string;
|
|
1148
|
+
};
|
|
1149
|
+
/**
|
|
1150
|
+
* An MCP server record as returned by the API.
|
|
1151
|
+
*/
|
|
1152
|
+
export type ServerResponse = {
|
|
1153
|
+
/**
|
|
1154
|
+
* Whether the server has valid stored credentials.
|
|
1155
|
+
*/
|
|
1156
|
+
authenticated: boolean;
|
|
1157
|
+
/**
|
|
1158
|
+
* Whether the server is enabled for tool use.
|
|
1159
|
+
*/
|
|
1160
|
+
enabled: boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* Human-readable server name.
|
|
1163
|
+
*/
|
|
1164
|
+
server_name: string;
|
|
1165
|
+
/**
|
|
1166
|
+
* The MCP server URL.
|
|
1167
|
+
*/
|
|
1168
|
+
url: string;
|
|
1169
|
+
};
|
|
1170
|
+
/**
|
|
1171
|
+
* Request body for [`set_pricing_handler`].
|
|
1172
|
+
*/
|
|
1173
|
+
export type SetPricingRequest = {
|
|
1174
|
+
/**
|
|
1175
|
+
* The model api id to (re)price.
|
|
1176
|
+
*/
|
|
1177
|
+
model: string;
|
|
1178
|
+
/**
|
|
1179
|
+
* New price per million input tokens (USD).
|
|
1180
|
+
*/
|
|
1181
|
+
price_per_mil_in: number;
|
|
1182
|
+
/**
|
|
1183
|
+
* New price per million output tokens (USD).
|
|
1184
|
+
*/
|
|
1185
|
+
price_per_mil_out: number;
|
|
1186
|
+
};
|
|
1187
|
+
export type SharePermissionV2 = {
|
|
1188
|
+
/**
|
|
1189
|
+
* The channel share permissions for the item
|
|
1190
|
+
*/
|
|
1191
|
+
channelSharePermissions?: Array<ChannelSharePermission> | null;
|
|
1192
|
+
/**
|
|
1193
|
+
* The share permission id
|
|
1194
|
+
*/
|
|
1195
|
+
id: string;
|
|
1196
|
+
linkShare?: null | LinkShare;
|
|
1197
|
+
linkShareAccessLevel?: null | AccessLevel;
|
|
1198
|
+
/**
|
|
1199
|
+
* The owner of the item
|
|
1200
|
+
*/
|
|
1201
|
+
owner: string;
|
|
1202
|
+
};
|
|
1203
|
+
/**
|
|
1204
|
+
* Metadata for one staged Slack channel.
|
|
1205
|
+
*/
|
|
1206
|
+
export type SlackChannelMeta = {
|
|
1207
|
+
/**
|
|
1208
|
+
* Slack's channel id (e.g. `C0123456789`), stable across renames.
|
|
1209
|
+
*/
|
|
1210
|
+
channel_id?: string | null;
|
|
1211
|
+
/**
|
|
1212
|
+
* Channel name without the leading `#`.
|
|
1213
|
+
*/
|
|
1214
|
+
name: string;
|
|
1215
|
+
/**
|
|
1216
|
+
* The channel's most relevant members, when discoverable.
|
|
1217
|
+
*/
|
|
1218
|
+
participants?: Array<SlackParticipant>;
|
|
1219
|
+
/**
|
|
1220
|
+
* The channel's purpose/topic, when set.
|
|
1221
|
+
*/
|
|
1222
|
+
purpose?: string | null;
|
|
1223
|
+
};
|
|
1224
|
+
/**
|
|
1225
|
+
* A person active in a staged Slack channel.
|
|
1226
|
+
*/
|
|
1227
|
+
export type SlackParticipant = {
|
|
1228
|
+
/**
|
|
1229
|
+
* Email, when the workspace exposes it.
|
|
1230
|
+
*/
|
|
1231
|
+
email?: string | null;
|
|
1232
|
+
/**
|
|
1233
|
+
* Display name or Slack handle.
|
|
1234
|
+
*/
|
|
1235
|
+
name: string;
|
|
1236
|
+
};
|
|
1237
|
+
/**
|
|
1238
|
+
* Request body for starting an OAuth authorization flow.
|
|
1239
|
+
*/
|
|
1240
|
+
export type StartAuthRequest = {
|
|
1241
|
+
/**
|
|
1242
|
+
* Human-readable name for the server.
|
|
1243
|
+
*/
|
|
1244
|
+
server_name: string;
|
|
1245
|
+
/**
|
|
1246
|
+
* The MCP server URL to authorize against.
|
|
1247
|
+
*/
|
|
1248
|
+
server_url: string;
|
|
1249
|
+
};
|
|
1250
|
+
/**
|
|
1251
|
+
* Response from starting an OAuth authorization flow.
|
|
1252
|
+
*/
|
|
1253
|
+
export type StartAuthResponse = {
|
|
1254
|
+
/**
|
|
1255
|
+
* The OAuth authorization URL to redirect the user to.
|
|
1256
|
+
*/
|
|
1257
|
+
authorization_url: string;
|
|
1258
|
+
};
|
|
1259
|
+
/**
|
|
1260
|
+
* Error response for the stop endpoint.
|
|
1261
|
+
*/
|
|
1262
|
+
export type StopChatStreamError = {
|
|
1263
|
+
/**
|
|
1264
|
+
* Human-readable error message.
|
|
1265
|
+
*/
|
|
1266
|
+
error: string;
|
|
1267
|
+
};
|
|
1268
|
+
/**
|
|
1269
|
+
* Request body for stopping an in-flight chat stream.
|
|
1270
|
+
*/
|
|
1271
|
+
export type StopChatStreamRequest = {
|
|
1272
|
+
/**
|
|
1273
|
+
* The chat the stream belongs to. Used to verify the caller has
|
|
1274
|
+
* permission to stop the stream.
|
|
1275
|
+
*/
|
|
1276
|
+
chat_id: string;
|
|
1277
|
+
/**
|
|
1278
|
+
* The stream/message ID to stop.
|
|
1279
|
+
*/
|
|
1280
|
+
stream_id: string;
|
|
1281
|
+
};
|
|
1282
|
+
/**
|
|
1283
|
+
* Response from a stop request.
|
|
1284
|
+
*/
|
|
1285
|
+
export type StopChatStreamResponse = {
|
|
1286
|
+
/**
|
|
1287
|
+
* `true` if a matching in-flight stream was found and cancellation was
|
|
1288
|
+
* triggered, `false` if the stream had already finished or was unknown.
|
|
1289
|
+
*/
|
|
1290
|
+
stopped: boolean;
|
|
1291
|
+
};
|
|
1292
|
+
export type StreamError = {
|
|
1293
|
+
model: string;
|
|
1294
|
+
stream_error: 'provider_error';
|
|
1295
|
+
stream_id: string;
|
|
1296
|
+
} | {
|
|
1297
|
+
stream_error: 'model_context_overflow';
|
|
1298
|
+
stream_id: string;
|
|
1299
|
+
} | {
|
|
1300
|
+
stream_error: 'internal_error';
|
|
1301
|
+
stream_id: string;
|
|
1302
|
+
};
|
|
1303
|
+
export type StringIdResponse = {
|
|
1304
|
+
id: string;
|
|
1305
|
+
};
|
|
1306
|
+
export type StructuredCompletionError = {
|
|
1307
|
+
error: string;
|
|
1308
|
+
};
|
|
1309
|
+
export type StructuredCompletionRequest = {
|
|
1310
|
+
additional_instructions?: string | null;
|
|
1311
|
+
model: string;
|
|
1312
|
+
output_schema: DynamicSchema;
|
|
1313
|
+
prompt: string;
|
|
1314
|
+
toolset?: ToolSet;
|
|
1315
|
+
};
|
|
1316
|
+
export type StructuredCompletionResponse = {
|
|
1317
|
+
result: unknown;
|
|
1318
|
+
};
|
|
1319
|
+
/**
|
|
1320
|
+
* The kind of entity a projection is materialized for.
|
|
1321
|
+
*/
|
|
1322
|
+
export type TargetType = 'user' | 'team';
|
|
1323
|
+
export type ToolSet = {
|
|
1324
|
+
type: 'all';
|
|
1325
|
+
} | {
|
|
1326
|
+
type: 'none';
|
|
1327
|
+
};
|
|
1328
|
+
export type UpdateChannelSharePermission = {
|
|
1329
|
+
accessLevel?: null | AccessLevel;
|
|
1330
|
+
/**
|
|
1331
|
+
* The channel id
|
|
1332
|
+
*/
|
|
1333
|
+
channelId: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* The type of operation to be performed on the chanel share permission
|
|
1336
|
+
* You can add, remove or replace and existing permission
|
|
1337
|
+
*/
|
|
1338
|
+
operation: UpdateOperation;
|
|
1339
|
+
};
|
|
1340
|
+
export type UpdateOperation = 'add' | 'remove' | 'replace';
|
|
1341
|
+
/**
|
|
1342
|
+
* Request body for updating an MCP server.
|
|
1343
|
+
*/
|
|
1344
|
+
export type UpdateServerRequest = {
|
|
1345
|
+
/**
|
|
1346
|
+
* Enable or disable the server.
|
|
1347
|
+
*/
|
|
1348
|
+
enabled?: boolean | null;
|
|
1349
|
+
/**
|
|
1350
|
+
* New name for the server.
|
|
1351
|
+
*/
|
|
1352
|
+
server_name?: string | null;
|
|
1353
|
+
/**
|
|
1354
|
+
* The server URL to update.
|
|
1355
|
+
*/
|
|
1356
|
+
url: string;
|
|
1357
|
+
};
|
|
1358
|
+
export type UpdateSharePermissionRequestV2 = {
|
|
1359
|
+
/**
|
|
1360
|
+
* Any channel share permissions to be created/updated/removed
|
|
1361
|
+
*/
|
|
1362
|
+
channelSharePermissions?: Array<UpdateChannelSharePermission> | null;
|
|
1363
|
+
linkShare?: null | LinkShare;
|
|
1364
|
+
linkShareAccessLevel?: null | AccessLevel;
|
|
1365
|
+
};
|
|
1366
|
+
/**
|
|
1367
|
+
* Request body for updating a tool call's arguments.
|
|
1368
|
+
*/
|
|
1369
|
+
export type UpdateToolCallRequest = {
|
|
1370
|
+
/**
|
|
1371
|
+
* The new arguments for the tool call.
|
|
1372
|
+
*/
|
|
1373
|
+
args: unknown;
|
|
1374
|
+
/**
|
|
1375
|
+
* The message ID containing the tool call.
|
|
1376
|
+
*/
|
|
1377
|
+
messageId: string;
|
|
1378
|
+
/**
|
|
1379
|
+
* The tool call ID to update.
|
|
1380
|
+
*/
|
|
1381
|
+
toolCallId: string;
|
|
1382
|
+
};
|
|
1383
|
+
/**
|
|
1384
|
+
* Request body for updating a tool response.
|
|
1385
|
+
*/
|
|
1386
|
+
export type UpdateToolResponseRequest = {
|
|
1387
|
+
/**
|
|
1388
|
+
* The message ID containing the tool response.
|
|
1389
|
+
*/
|
|
1390
|
+
messageId: string;
|
|
1391
|
+
/**
|
|
1392
|
+
* The new user tool response.
|
|
1393
|
+
*/
|
|
1394
|
+
response: UserToolResponseValue;
|
|
1395
|
+
/**
|
|
1396
|
+
* The tool call ID whose response should be updated.
|
|
1397
|
+
*/
|
|
1398
|
+
toolCallId: string;
|
|
1399
|
+
};
|
|
1400
|
+
/**
|
|
1401
|
+
* Request body for getting or creating an ai projection. The concrete target
|
|
1402
|
+
* id is resolved from the authenticated user, so only the target type is sent.
|
|
1403
|
+
*/
|
|
1404
|
+
export type UpsertProjectionRequest = {
|
|
1405
|
+
/**
|
|
1406
|
+
* When `true` and generation is needed (cold instance or `regenerate`),
|
|
1407
|
+
* the server generates inline and responds with the finished result
|
|
1408
|
+
* instead of returning immediately and pushing an update through the
|
|
1409
|
+
* connection gateway.
|
|
1410
|
+
*/
|
|
1411
|
+
await?: boolean;
|
|
1412
|
+
/**
|
|
1413
|
+
* How long the projection remains active without being requested.
|
|
1414
|
+
*/
|
|
1415
|
+
expiry: Expiry;
|
|
1416
|
+
/**
|
|
1417
|
+
* The frontend-defined projection id (e.g. `notification_important_widget`).
|
|
1418
|
+
*/
|
|
1419
|
+
id: string;
|
|
1420
|
+
/**
|
|
1421
|
+
* Optional `provider/model` id used for generation (e.g.
|
|
1422
|
+
* `cerebras/llama-3.3-70b`). The default model is used when absent.
|
|
1423
|
+
*/
|
|
1424
|
+
model?: string | null;
|
|
1425
|
+
/**
|
|
1426
|
+
* Optional JSON schema the generated result must conform to. When set,
|
|
1427
|
+
* `data` holds the JSON serialization of a conforming value. Enforcement
|
|
1428
|
+
* is prompted (non-strict), so it works across providers.
|
|
1429
|
+
*/
|
|
1430
|
+
output_schema?: {
|
|
1431
|
+
[key: string]: unknown;
|
|
1432
|
+
} | null;
|
|
1433
|
+
/**
|
|
1434
|
+
* The prompt used to materialize the projection.
|
|
1435
|
+
*/
|
|
1436
|
+
prompt: string;
|
|
1437
|
+
/**
|
|
1438
|
+
* How frequently the projection should be regenerated.
|
|
1439
|
+
*/
|
|
1440
|
+
refresh_cadence: RefreshCadence;
|
|
1441
|
+
/**
|
|
1442
|
+
* When `true`, regenerate even if a cached result exists.
|
|
1443
|
+
*/
|
|
1444
|
+
regenerate?: boolean;
|
|
1445
|
+
/**
|
|
1446
|
+
* Whether the projection is materialized for the requesting user or their team.
|
|
1447
|
+
*/
|
|
1448
|
+
target_type: TargetType;
|
|
1449
|
+
};
|
|
1450
|
+
/**
|
|
1451
|
+
* The token usage and resolved cost of a single completion.
|
|
1452
|
+
*/
|
|
1453
|
+
export type Usage = {
|
|
1454
|
+
/**
|
|
1455
|
+
* When the completion was recorded.
|
|
1456
|
+
*/
|
|
1457
|
+
created_at: string;
|
|
1458
|
+
/**
|
|
1459
|
+
* Tokens consumed by the input.
|
|
1460
|
+
*/
|
|
1461
|
+
input_tokens: number;
|
|
1462
|
+
/**
|
|
1463
|
+
* The model api id (e.g. `claude-opus-4-8`).
|
|
1464
|
+
*/
|
|
1465
|
+
model: string;
|
|
1466
|
+
/**
|
|
1467
|
+
* Tokens generated in the output.
|
|
1468
|
+
*/
|
|
1469
|
+
output_tokens: number;
|
|
1470
|
+
price?: null | Price;
|
|
1471
|
+
};
|
|
1472
|
+
/**
|
|
1473
|
+
* Request body for [`get_usage_handler`].
|
|
1474
|
+
*/
|
|
1475
|
+
export type UsageRequest = {
|
|
1476
|
+
/**
|
|
1477
|
+
* If empty, include all features.
|
|
1478
|
+
*/
|
|
1479
|
+
features?: Array<AiFeature>;
|
|
1480
|
+
/**
|
|
1481
|
+
* Inclusive lower bound on `created_at`.
|
|
1482
|
+
*/
|
|
1483
|
+
from?: string | null;
|
|
1484
|
+
/**
|
|
1485
|
+
* If empty, include all users.
|
|
1486
|
+
*/
|
|
1487
|
+
include_users?: Array<string>;
|
|
1488
|
+
/**
|
|
1489
|
+
* Exclusive upper bound on `created_at`.
|
|
1490
|
+
*/
|
|
1491
|
+
until?: string | null;
|
|
1492
|
+
};
|
|
1493
|
+
/**
|
|
1494
|
+
* The result of a usage query: per-feature breakdown plus a grand total.
|
|
1495
|
+
*/
|
|
1496
|
+
export type UsageSummary = {
|
|
1497
|
+
/**
|
|
1498
|
+
* Per-feature usage.
|
|
1499
|
+
*/
|
|
1500
|
+
entries: Array<FeatureUsage>;
|
|
1501
|
+
/**
|
|
1502
|
+
* Grand total cost across all features (USD).
|
|
1503
|
+
*/
|
|
1504
|
+
total: number;
|
|
1505
|
+
};
|
|
1506
|
+
/**
|
|
1507
|
+
* UserPdfRect is in UserSpace
|
|
1508
|
+
* (0,0) top left
|
|
1509
|
+
* percent page units
|
|
1510
|
+
* 1-based page index
|
|
1511
|
+
*/
|
|
1512
|
+
export type UserPdfRect = {
|
|
1513
|
+
height: number;
|
|
1514
|
+
left: number;
|
|
1515
|
+
page_index: number;
|
|
1516
|
+
top: number;
|
|
1517
|
+
width: number;
|
|
1518
|
+
};
|
|
1519
|
+
/**
|
|
1520
|
+
* User tools are pending until a user executes them
|
|
1521
|
+
*/
|
|
1522
|
+
export type UserToolResponseValue = 'PendingUserExecution' | 'Rejected' | {
|
|
1523
|
+
UserAction: unknown;
|
|
1524
|
+
};
|
|
1525
|
+
/**
|
|
1526
|
+
* A web citation associated with a chat message.
|
|
1527
|
+
*/
|
|
1528
|
+
export type WebCitation = {
|
|
1529
|
+
/**
|
|
1530
|
+
* A description of the cited page.
|
|
1531
|
+
*/
|
|
1532
|
+
description?: string | null;
|
|
1533
|
+
/**
|
|
1534
|
+
* The URL of the page's favicon.
|
|
1535
|
+
*/
|
|
1536
|
+
favicon_url?: string | null;
|
|
1537
|
+
/**
|
|
1538
|
+
* The URL of the page's image.
|
|
1539
|
+
*/
|
|
1540
|
+
image_url?: string | null;
|
|
1541
|
+
/**
|
|
1542
|
+
* The title of the cited page.
|
|
1543
|
+
*/
|
|
1544
|
+
title: string;
|
|
1545
|
+
/**
|
|
1546
|
+
* The URL of the citation.
|
|
1547
|
+
*/
|
|
1548
|
+
url: string;
|
|
1549
|
+
};
|
|
1550
|
+
export type WithChatId = {
|
|
1551
|
+
chat_id: string;
|
|
1552
|
+
};
|
|
1553
|
+
export type SetPricingHandlerData = {
|
|
1554
|
+
body: SetPricingRequest;
|
|
1555
|
+
path?: never;
|
|
1556
|
+
query?: never;
|
|
1557
|
+
url: '/ai-cost/pricing';
|
|
1558
|
+
};
|
|
1559
|
+
export type SetPricingHandlerErrors = {
|
|
1560
|
+
/**
|
|
1561
|
+
* Admin access required
|
|
1562
|
+
*/
|
|
1563
|
+
403: ErrorBody;
|
|
1564
|
+
/**
|
|
1565
|
+
* Internal server error
|
|
1566
|
+
*/
|
|
1567
|
+
500: ErrorBody;
|
|
1568
|
+
};
|
|
1569
|
+
export type SetPricingHandlerError = SetPricingHandlerErrors[keyof SetPricingHandlerErrors];
|
|
1570
|
+
export type SetPricingHandlerResponses = {
|
|
1571
|
+
/**
|
|
1572
|
+
* Pricing updated
|
|
1573
|
+
*/
|
|
1574
|
+
200: unknown;
|
|
1575
|
+
};
|
|
1576
|
+
export type GetUsageHandlerData = {
|
|
1577
|
+
body: UsageRequest;
|
|
1578
|
+
path?: never;
|
|
1579
|
+
query?: never;
|
|
1580
|
+
url: '/ai-cost/usage';
|
|
1581
|
+
};
|
|
1582
|
+
export type GetUsageHandlerErrors = {
|
|
1583
|
+
/**
|
|
1584
|
+
* Invalid request
|
|
1585
|
+
*/
|
|
1586
|
+
400: ErrorBody;
|
|
1587
|
+
/**
|
|
1588
|
+
* Admin access required
|
|
1589
|
+
*/
|
|
1590
|
+
403: ErrorBody;
|
|
1591
|
+
/**
|
|
1592
|
+
* Internal server error
|
|
1593
|
+
*/
|
|
1594
|
+
500: ErrorBody;
|
|
1595
|
+
};
|
|
1596
|
+
export type GetUsageHandlerError = GetUsageHandlerErrors[keyof GetUsageHandlerErrors];
|
|
1597
|
+
export type GetUsageHandlerResponses = {
|
|
1598
|
+
/**
|
|
1599
|
+
* Usage summary
|
|
1600
|
+
*/
|
|
1601
|
+
200: UsageSummary;
|
|
1602
|
+
};
|
|
1603
|
+
export type GetUsageHandlerResponse = GetUsageHandlerResponses[keyof GetUsageHandlerResponses];
|
|
1604
|
+
export type UpsertAiProjectionData = {
|
|
1605
|
+
body: UpsertProjectionRequest;
|
|
1606
|
+
path?: never;
|
|
1607
|
+
query?: never;
|
|
1608
|
+
url: '/ai-projections';
|
|
1609
|
+
};
|
|
1610
|
+
export type UpsertAiProjectionErrors = {
|
|
1611
|
+
400: ErrorResponse;
|
|
1612
|
+
403: ErrorResponse;
|
|
1613
|
+
500: ErrorResponse;
|
|
1614
|
+
};
|
|
1615
|
+
export type UpsertAiProjectionError = UpsertAiProjectionErrors[keyof UpsertAiProjectionErrors];
|
|
1616
|
+
export type UpsertAiProjectionResponses = {
|
|
1617
|
+
200: ProjectionStateResponse;
|
|
1618
|
+
};
|
|
1619
|
+
export type UpsertAiProjectionResponse = UpsertAiProjectionResponses[keyof UpsertAiProjectionResponses];
|
|
1620
|
+
export type GetChatsForAttachmentHandlerData = {
|
|
1621
|
+
body?: never;
|
|
1622
|
+
path: {
|
|
1623
|
+
/**
|
|
1624
|
+
* id of the attachment
|
|
1625
|
+
*/
|
|
1626
|
+
attachment_id: string;
|
|
1627
|
+
};
|
|
1628
|
+
query?: never;
|
|
1629
|
+
url: '/attachments/{attachment_id}/chats';
|
|
1630
|
+
};
|
|
1631
|
+
export type GetChatsForAttachmentHandlerErrors = {
|
|
1632
|
+
401: string;
|
|
1633
|
+
404: string;
|
|
1634
|
+
500: string;
|
|
1635
|
+
};
|
|
1636
|
+
export type GetChatsForAttachmentHandlerError = GetChatsForAttachmentHandlerErrors[keyof GetChatsForAttachmentHandlerErrors];
|
|
1637
|
+
export type GetChatsForAttachmentHandlerResponses = {
|
|
1638
|
+
200: GetChatsForAttachmentResponse;
|
|
1639
|
+
};
|
|
1640
|
+
export type GetChatsForAttachmentHandlerResponse = GetChatsForAttachmentHandlerResponses[keyof GetChatsForAttachmentHandlerResponses];
|
|
1641
|
+
export type DeleteChatData = {
|
|
1642
|
+
body?: never;
|
|
1643
|
+
path: {
|
|
1644
|
+
/**
|
|
1645
|
+
* ID of the chat
|
|
1646
|
+
*/
|
|
1647
|
+
chat_id: string;
|
|
1648
|
+
};
|
|
1649
|
+
query?: never;
|
|
1650
|
+
url: '/chat/{chat_id}';
|
|
1651
|
+
};
|
|
1652
|
+
export type DeleteChatErrors = {
|
|
1653
|
+
401: string;
|
|
1654
|
+
500: string;
|
|
1655
|
+
};
|
|
1656
|
+
export type DeleteChatError = DeleteChatErrors[keyof DeleteChatErrors];
|
|
1657
|
+
export type DeleteChatResponses = {
|
|
1658
|
+
200: unknown;
|
|
1659
|
+
};
|
|
1660
|
+
export type PatchChatData = {
|
|
1661
|
+
body: PatchChatRequest;
|
|
1662
|
+
path: {
|
|
1663
|
+
/**
|
|
1664
|
+
* ID of the chat
|
|
1665
|
+
*/
|
|
1666
|
+
chat_id: string;
|
|
1667
|
+
};
|
|
1668
|
+
query?: never;
|
|
1669
|
+
url: '/chat/{chat_id}';
|
|
1670
|
+
};
|
|
1671
|
+
export type PatchChatErrors = {
|
|
1672
|
+
401: string;
|
|
1673
|
+
500: string;
|
|
1674
|
+
};
|
|
1675
|
+
export type PatchChatError = PatchChatErrors[keyof PatchChatErrors];
|
|
1676
|
+
export type PatchChatResponses = {
|
|
1677
|
+
200: unknown;
|
|
1678
|
+
};
|
|
1679
|
+
export type PermanentlyDeleteChatData = {
|
|
1680
|
+
body?: never;
|
|
1681
|
+
path: {
|
|
1682
|
+
/**
|
|
1683
|
+
* ID of the chat
|
|
1684
|
+
*/
|
|
1685
|
+
chat_id: string;
|
|
1686
|
+
};
|
|
1687
|
+
query?: never;
|
|
1688
|
+
url: '/chat/{chat_id}/permanent';
|
|
1689
|
+
};
|
|
1690
|
+
export type PermanentlyDeleteChatErrors = {
|
|
1691
|
+
401: string;
|
|
1692
|
+
500: string;
|
|
1693
|
+
};
|
|
1694
|
+
export type PermanentlyDeleteChatError = PermanentlyDeleteChatErrors[keyof PermanentlyDeleteChatErrors];
|
|
1695
|
+
export type PermanentlyDeleteChatResponses = {
|
|
1696
|
+
200: unknown;
|
|
1697
|
+
};
|
|
1698
|
+
export type CreateChatData = {
|
|
1699
|
+
body: CreateChatRequest;
|
|
1700
|
+
path?: never;
|
|
1701
|
+
query?: never;
|
|
1702
|
+
url: '/chats';
|
|
1703
|
+
};
|
|
1704
|
+
export type CreateChatErrors = {
|
|
1705
|
+
401: string;
|
|
1706
|
+
500: string;
|
|
1707
|
+
};
|
|
1708
|
+
export type CreateChatError = CreateChatErrors[keyof CreateChatErrors];
|
|
1709
|
+
export type CreateChatResponses = {
|
|
1710
|
+
200: StringIdResponse;
|
|
1711
|
+
};
|
|
1712
|
+
export type CreateChatResponse = CreateChatResponses[keyof CreateChatResponses];
|
|
1713
|
+
export type GetChatHistoryHandlerData = {
|
|
1714
|
+
body?: never;
|
|
1715
|
+
path: {
|
|
1716
|
+
/**
|
|
1717
|
+
* Chat ID to retrieve history for
|
|
1718
|
+
*/
|
|
1719
|
+
chat_id: string;
|
|
1720
|
+
};
|
|
1721
|
+
query?: never;
|
|
1722
|
+
url: '/chats/history/{chat_id}';
|
|
1723
|
+
};
|
|
1724
|
+
export type GetChatHistoryHandlerErrors = {
|
|
1725
|
+
/**
|
|
1726
|
+
* Chat not found
|
|
1727
|
+
*/
|
|
1728
|
+
404: string;
|
|
1729
|
+
/**
|
|
1730
|
+
* Internal server error
|
|
1731
|
+
*/
|
|
1732
|
+
500: string;
|
|
1733
|
+
};
|
|
1734
|
+
export type GetChatHistoryHandlerError = GetChatHistoryHandlerErrors[keyof GetChatHistoryHandlerErrors];
|
|
1735
|
+
export type GetChatHistoryHandlerResponses = {
|
|
1736
|
+
200: ChatHistory;
|
|
1737
|
+
};
|
|
1738
|
+
export type GetChatHistoryHandlerResponse = GetChatHistoryHandlerResponses[keyof GetChatHistoryHandlerResponses];
|
|
1739
|
+
export type GetChatHistoryBatchMessagesHandlerData = {
|
|
1740
|
+
body: ChatHistoryBatchMessagesRequest;
|
|
1741
|
+
path?: never;
|
|
1742
|
+
query?: never;
|
|
1743
|
+
url: '/chats/history_batch_messages';
|
|
1744
|
+
};
|
|
1745
|
+
export type GetChatHistoryBatchMessagesHandlerErrors = {
|
|
1746
|
+
/**
|
|
1747
|
+
* Access denied to chat
|
|
1748
|
+
*/
|
|
1749
|
+
403: string;
|
|
1750
|
+
/**
|
|
1751
|
+
* Messages not found
|
|
1752
|
+
*/
|
|
1753
|
+
404: string;
|
|
1754
|
+
/**
|
|
1755
|
+
* Internal server error
|
|
1756
|
+
*/
|
|
1757
|
+
500: string;
|
|
1758
|
+
};
|
|
1759
|
+
export type GetChatHistoryBatchMessagesHandlerError = GetChatHistoryBatchMessagesHandlerErrors[keyof GetChatHistoryBatchMessagesHandlerErrors];
|
|
1760
|
+
export type GetChatHistoryBatchMessagesHandlerResponses = {
|
|
1761
|
+
200: ChatHistory;
|
|
1762
|
+
};
|
|
1763
|
+
export type GetChatHistoryBatchMessagesHandlerResponse = GetChatHistoryBatchMessagesHandlerResponses[keyof GetChatHistoryBatchMessagesHandlerResponses];
|
|
1764
|
+
export type GetChatData = {
|
|
1765
|
+
body?: never;
|
|
1766
|
+
path: {
|
|
1767
|
+
/**
|
|
1768
|
+
* ID of the chat
|
|
1769
|
+
*/
|
|
1770
|
+
chat_id: string;
|
|
1771
|
+
};
|
|
1772
|
+
query?: never;
|
|
1773
|
+
url: '/chats/{chat_id}';
|
|
1774
|
+
};
|
|
1775
|
+
export type GetChatErrors = {
|
|
1776
|
+
401: string;
|
|
1777
|
+
404: string;
|
|
1778
|
+
500: string;
|
|
1779
|
+
};
|
|
1780
|
+
export type GetChatError = GetChatErrors[keyof GetChatErrors];
|
|
1781
|
+
export type GetChatResponses = {
|
|
1782
|
+
200: GetChatResponse;
|
|
1783
|
+
};
|
|
1784
|
+
export type GetChatResponse2 = GetChatResponses[keyof GetChatResponses];
|
|
1785
|
+
export type CopyChatData = {
|
|
1786
|
+
body?: never;
|
|
1787
|
+
path: {
|
|
1788
|
+
/**
|
|
1789
|
+
* ID of the chat to copy
|
|
1790
|
+
*/
|
|
1791
|
+
chat_id: string;
|
|
1792
|
+
};
|
|
1793
|
+
query?: never;
|
|
1794
|
+
url: '/chats/{chat_id}/copy';
|
|
1795
|
+
};
|
|
1796
|
+
export type CopyChatErrors = {
|
|
1797
|
+
401: string;
|
|
1798
|
+
404: string;
|
|
1799
|
+
500: string;
|
|
1800
|
+
};
|
|
1801
|
+
export type CopyChatError = CopyChatErrors[keyof CopyChatErrors];
|
|
1802
|
+
export type CopyChatResponses = {
|
|
1803
|
+
200: StringIdResponse;
|
|
1804
|
+
};
|
|
1805
|
+
export type CopyChatResponse = CopyChatResponses[keyof CopyChatResponses];
|
|
1806
|
+
export type GetChatPermissionsData = {
|
|
1807
|
+
body?: never;
|
|
1808
|
+
path: {
|
|
1809
|
+
/**
|
|
1810
|
+
* ID of the chat
|
|
1811
|
+
*/
|
|
1812
|
+
chat_id: string;
|
|
1813
|
+
};
|
|
1814
|
+
query?: never;
|
|
1815
|
+
url: '/chats/{chat_id}/permissions';
|
|
1816
|
+
};
|
|
1817
|
+
export type GetChatPermissionsErrors = {
|
|
1818
|
+
401: string;
|
|
1819
|
+
500: string;
|
|
1820
|
+
};
|
|
1821
|
+
export type GetChatPermissionsError = GetChatPermissionsErrors[keyof GetChatPermissionsErrors];
|
|
1822
|
+
export type GetChatPermissionsResponses = {
|
|
1823
|
+
200: GetChatPermissionsResponse;
|
|
1824
|
+
};
|
|
1825
|
+
export type GetChatPermissionsResponse2 = GetChatPermissionsResponses[keyof GetChatPermissionsResponses];
|
|
1826
|
+
export type RevertDeleteChatData = {
|
|
1827
|
+
body?: never;
|
|
1828
|
+
path: {
|
|
1829
|
+
/**
|
|
1830
|
+
* ID of the chat to restore
|
|
1831
|
+
*/
|
|
1832
|
+
chat_id: string;
|
|
1833
|
+
};
|
|
1834
|
+
query?: never;
|
|
1835
|
+
url: '/chats/{chat_id}/revert_delete';
|
|
1836
|
+
};
|
|
1837
|
+
export type RevertDeleteChatErrors = {
|
|
1838
|
+
401: string;
|
|
1839
|
+
500: string;
|
|
1840
|
+
};
|
|
1841
|
+
export type RevertDeleteChatError = RevertDeleteChatErrors[keyof RevertDeleteChatErrors];
|
|
1842
|
+
export type RevertDeleteChatResponses = {
|
|
1843
|
+
200: unknown;
|
|
1844
|
+
};
|
|
1845
|
+
export type CallToolData = {
|
|
1846
|
+
body: CallToolRequest;
|
|
1847
|
+
path: {
|
|
1848
|
+
/**
|
|
1849
|
+
* ID of the chat
|
|
1850
|
+
*/
|
|
1851
|
+
chat_id: string;
|
|
1852
|
+
};
|
|
1853
|
+
query?: never;
|
|
1854
|
+
url: '/chats/{chat_id}/tool/call';
|
|
1855
|
+
};
|
|
1856
|
+
export type CallToolErrors = {
|
|
1857
|
+
/**
|
|
1858
|
+
* Validation or execution failed
|
|
1859
|
+
*/
|
|
1860
|
+
400: string;
|
|
1861
|
+
/**
|
|
1862
|
+
* Tool call not found
|
|
1863
|
+
*/
|
|
1864
|
+
404: string;
|
|
1865
|
+
500: string;
|
|
1866
|
+
};
|
|
1867
|
+
export type CallToolError = CallToolErrors[keyof CallToolErrors];
|
|
1868
|
+
export type CallToolResponses = {
|
|
1869
|
+
/**
|
|
1870
|
+
* Tool executed successfully
|
|
1871
|
+
*/
|
|
1872
|
+
200: CallToolResponse;
|
|
1873
|
+
};
|
|
1874
|
+
export type CallToolResponse2 = CallToolResponses[keyof CallToolResponses];
|
|
1875
|
+
export type RejectToolCallData = {
|
|
1876
|
+
body: RejectToolCallRequest;
|
|
1877
|
+
path: {
|
|
1878
|
+
/**
|
|
1879
|
+
* ID of the chat
|
|
1880
|
+
*/
|
|
1881
|
+
chat_id: string;
|
|
1882
|
+
};
|
|
1883
|
+
query?: never;
|
|
1884
|
+
url: '/chats/{chat_id}/tool/reject';
|
|
1885
|
+
};
|
|
1886
|
+
export type RejectToolCallErrors = {
|
|
1887
|
+
/**
|
|
1888
|
+
* Tool call not found
|
|
1889
|
+
*/
|
|
1890
|
+
404: string;
|
|
1891
|
+
500: string;
|
|
1892
|
+
};
|
|
1893
|
+
export type RejectToolCallError = RejectToolCallErrors[keyof RejectToolCallErrors];
|
|
1894
|
+
export type RejectToolCallResponses = {
|
|
1895
|
+
/**
|
|
1896
|
+
* Tool call rejected
|
|
1897
|
+
*/
|
|
1898
|
+
200: unknown;
|
|
1899
|
+
};
|
|
1900
|
+
export type UpdateToolResponseData = {
|
|
1901
|
+
body: UpdateToolResponseRequest;
|
|
1902
|
+
path: {
|
|
1903
|
+
/**
|
|
1904
|
+
* ID of the chat
|
|
1905
|
+
*/
|
|
1906
|
+
chat_id: string;
|
|
1907
|
+
};
|
|
1908
|
+
query?: never;
|
|
1909
|
+
url: '/chats/{chat_id}/tool/response/update';
|
|
1910
|
+
};
|
|
1911
|
+
export type UpdateToolResponseErrors = {
|
|
1912
|
+
/**
|
|
1913
|
+
* Tool call not found
|
|
1914
|
+
*/
|
|
1915
|
+
404: string;
|
|
1916
|
+
500: string;
|
|
1917
|
+
};
|
|
1918
|
+
export type UpdateToolResponseError = UpdateToolResponseErrors[keyof UpdateToolResponseErrors];
|
|
1919
|
+
export type UpdateToolResponseResponses = {
|
|
1920
|
+
/**
|
|
1921
|
+
* Tool response updated
|
|
1922
|
+
*/
|
|
1923
|
+
200: unknown;
|
|
1924
|
+
};
|
|
1925
|
+
export type UpdateToolCallData = {
|
|
1926
|
+
body: UpdateToolCallRequest;
|
|
1927
|
+
path: {
|
|
1928
|
+
/**
|
|
1929
|
+
* ID of the chat
|
|
1930
|
+
*/
|
|
1931
|
+
chat_id: string;
|
|
1932
|
+
};
|
|
1933
|
+
query?: never;
|
|
1934
|
+
url: '/chats/{chat_id}/tool/update';
|
|
1935
|
+
};
|
|
1936
|
+
export type UpdateToolCallErrors = {
|
|
1937
|
+
/**
|
|
1938
|
+
* Validation failed
|
|
1939
|
+
*/
|
|
1940
|
+
400: string;
|
|
1941
|
+
/**
|
|
1942
|
+
* Tool call not found
|
|
1943
|
+
*/
|
|
1944
|
+
404: string;
|
|
1945
|
+
500: string;
|
|
1946
|
+
};
|
|
1947
|
+
export type UpdateToolCallError = UpdateToolCallErrors[keyof UpdateToolCallErrors];
|
|
1948
|
+
export type UpdateToolCallResponses = {
|
|
1949
|
+
/**
|
|
1950
|
+
* Tool call args updated
|
|
1951
|
+
*/
|
|
1952
|
+
200: unknown;
|
|
1953
|
+
};
|
|
1954
|
+
export type GetCitationHandlerData = {
|
|
1955
|
+
body?: never;
|
|
1956
|
+
path: {
|
|
1957
|
+
/**
|
|
1958
|
+
* id of the citation
|
|
1959
|
+
*/
|
|
1960
|
+
id: string;
|
|
1961
|
+
};
|
|
1962
|
+
query?: never;
|
|
1963
|
+
url: '/citations/{id}';
|
|
1964
|
+
};
|
|
1965
|
+
export type GetCitationHandlerErrors = {
|
|
1966
|
+
404: string;
|
|
1967
|
+
500: string;
|
|
1968
|
+
};
|
|
1969
|
+
export type GetCitationHandlerError = GetCitationHandlerErrors[keyof GetCitationHandlerErrors];
|
|
1970
|
+
export type GetCitationHandlerResponses = {
|
|
1971
|
+
200: DocumentTextPart;
|
|
1972
|
+
};
|
|
1973
|
+
export type GetCitationHandlerResponse = GetCitationHandlerResponses[keyof GetCitationHandlerResponses];
|
|
1974
|
+
export type HealthHandlerData = {
|
|
1975
|
+
body?: never;
|
|
1976
|
+
path?: never;
|
|
1977
|
+
query?: never;
|
|
1978
|
+
url: '/health';
|
|
1979
|
+
};
|
|
1980
|
+
export type HealthHandlerResponses = {
|
|
1981
|
+
/**
|
|
1982
|
+
* health
|
|
1983
|
+
*/
|
|
1984
|
+
200: string;
|
|
1985
|
+
};
|
|
1986
|
+
export type HealthHandlerResponse = HealthHandlerResponses[keyof HealthHandlerResponses];
|
|
1987
|
+
export type RunImportHandlerData = {
|
|
1988
|
+
body: RunImportRequest;
|
|
1989
|
+
path?: never;
|
|
1990
|
+
query?: never;
|
|
1991
|
+
url: '/import/run';
|
|
1992
|
+
};
|
|
1993
|
+
export type RunImportHandlerErrors = {
|
|
1994
|
+
/**
|
|
1995
|
+
* Internal server error
|
|
1996
|
+
*/
|
|
1997
|
+
500: unknown;
|
|
1998
|
+
};
|
|
1999
|
+
export type RunImportHandlerResponses = {
|
|
2000
|
+
/**
|
|
2001
|
+
* Import run outcome
|
|
2002
|
+
*/
|
|
2003
|
+
200: RunImportOutcome;
|
|
2004
|
+
};
|
|
2005
|
+
export type RunImportHandlerResponse = RunImportHandlerResponses[keyof RunImportHandlerResponses];
|
|
2006
|
+
export type DismissRunHandlerData = {
|
|
2007
|
+
body?: never;
|
|
2008
|
+
path: {
|
|
2009
|
+
/**
|
|
2010
|
+
* Import source
|
|
2011
|
+
*/
|
|
2012
|
+
source: string;
|
|
2013
|
+
};
|
|
2014
|
+
query?: never;
|
|
2015
|
+
url: '/import/runs/{source}/dismiss';
|
|
2016
|
+
};
|
|
2017
|
+
export type DismissRunHandlerErrors = {
|
|
2018
|
+
/**
|
|
2019
|
+
* Unknown import source
|
|
2020
|
+
*/
|
|
2021
|
+
400: unknown;
|
|
2022
|
+
/**
|
|
2023
|
+
* Internal server error
|
|
2024
|
+
*/
|
|
2025
|
+
500: unknown;
|
|
2026
|
+
};
|
|
2027
|
+
export type DismissRunHandlerResponses = {
|
|
2028
|
+
/**
|
|
2029
|
+
* Dismissed
|
|
2030
|
+
*/
|
|
2031
|
+
204: void;
|
|
2032
|
+
};
|
|
2033
|
+
export type DismissRunHandlerResponse = DismissRunHandlerResponses[keyof DismissRunHandlerResponses];
|
|
2034
|
+
export type RetryGatherHandlerData = {
|
|
2035
|
+
body?: never;
|
|
2036
|
+
path: {
|
|
2037
|
+
/**
|
|
2038
|
+
* Import source
|
|
2039
|
+
*/
|
|
2040
|
+
source: string;
|
|
2041
|
+
};
|
|
2042
|
+
query?: never;
|
|
2043
|
+
url: '/import/runs/{source}/retry';
|
|
2044
|
+
};
|
|
2045
|
+
export type RetryGatherHandlerErrors = {
|
|
2046
|
+
/**
|
|
2047
|
+
* Unknown import source
|
|
2048
|
+
*/
|
|
2049
|
+
400: unknown;
|
|
2050
|
+
/**
|
|
2051
|
+
* Internal server error
|
|
2052
|
+
*/
|
|
2053
|
+
500: unknown;
|
|
2054
|
+
};
|
|
2055
|
+
export type RetryGatherHandlerResponses = {
|
|
2056
|
+
/**
|
|
2057
|
+
* Retry accepted (idempotent)
|
|
2058
|
+
*/
|
|
2059
|
+
204: void;
|
|
2060
|
+
};
|
|
2061
|
+
export type RetryGatherHandlerResponse = RetryGatherHandlerResponses[keyof RetryGatherHandlerResponses];
|
|
2062
|
+
export type GetStateHandlerData = {
|
|
2063
|
+
body?: never;
|
|
2064
|
+
path?: never;
|
|
2065
|
+
query?: never;
|
|
2066
|
+
url: '/import/state';
|
|
2067
|
+
};
|
|
2068
|
+
export type GetStateHandlerErrors = {
|
|
2069
|
+
/**
|
|
2070
|
+
* Internal server error
|
|
2071
|
+
*/
|
|
2072
|
+
500: unknown;
|
|
2073
|
+
};
|
|
2074
|
+
export type GetStateHandlerResponses = {
|
|
2075
|
+
/**
|
|
2076
|
+
* Current import state
|
|
2077
|
+
*/
|
|
2078
|
+
200: ImportState;
|
|
2079
|
+
};
|
|
2080
|
+
export type GetStateHandlerResponse = GetStateHandlerResponses[keyof GetStateHandlerResponses];
|
|
2081
|
+
export type DeleteMcpServerData = {
|
|
2082
|
+
body?: never;
|
|
2083
|
+
path?: never;
|
|
2084
|
+
query: {
|
|
2085
|
+
/**
|
|
2086
|
+
* The server URL to delete.
|
|
2087
|
+
*/
|
|
2088
|
+
url: string;
|
|
2089
|
+
};
|
|
2090
|
+
url: '/mcp/servers';
|
|
2091
|
+
};
|
|
2092
|
+
export type DeleteMcpServerErrors = {
|
|
2093
|
+
401: string;
|
|
2094
|
+
500: ErrorResponse;
|
|
2095
|
+
};
|
|
2096
|
+
export type DeleteMcpServerError = DeleteMcpServerErrors[keyof DeleteMcpServerErrors];
|
|
2097
|
+
export type DeleteMcpServerResponses = {
|
|
2098
|
+
204: void;
|
|
2099
|
+
};
|
|
2100
|
+
export type DeleteMcpServerResponse = DeleteMcpServerResponses[keyof DeleteMcpServerResponses];
|
|
2101
|
+
export type ListMcpServersData = {
|
|
2102
|
+
body?: never;
|
|
2103
|
+
path?: never;
|
|
2104
|
+
query?: never;
|
|
2105
|
+
url: '/mcp/servers';
|
|
2106
|
+
};
|
|
2107
|
+
export type ListMcpServersErrors = {
|
|
2108
|
+
401: string;
|
|
2109
|
+
500: ErrorResponse;
|
|
2110
|
+
};
|
|
2111
|
+
export type ListMcpServersError = ListMcpServersErrors[keyof ListMcpServersErrors];
|
|
2112
|
+
export type ListMcpServersResponses = {
|
|
2113
|
+
200: Array<ServerResponse>;
|
|
2114
|
+
};
|
|
2115
|
+
export type ListMcpServersResponse = ListMcpServersResponses[keyof ListMcpServersResponses];
|
|
2116
|
+
export type AddMcpServerData = {
|
|
2117
|
+
body: AddServerRequest;
|
|
2118
|
+
path?: never;
|
|
2119
|
+
query?: never;
|
|
2120
|
+
url: '/mcp/servers';
|
|
2121
|
+
};
|
|
2122
|
+
export type AddMcpServerErrors = {
|
|
2123
|
+
401: string;
|
|
2124
|
+
500: ErrorResponse;
|
|
2125
|
+
};
|
|
2126
|
+
export type AddMcpServerError = AddMcpServerErrors[keyof AddMcpServerErrors];
|
|
2127
|
+
export type AddMcpServerResponses = {
|
|
2128
|
+
201: ServerResponse;
|
|
2129
|
+
};
|
|
2130
|
+
export type AddMcpServerResponse = AddMcpServerResponses[keyof AddMcpServerResponses];
|
|
2131
|
+
export type UpdateMcpServerData = {
|
|
2132
|
+
body: UpdateServerRequest;
|
|
2133
|
+
path?: never;
|
|
2134
|
+
query?: never;
|
|
2135
|
+
url: '/mcp/servers';
|
|
2136
|
+
};
|
|
2137
|
+
export type UpdateMcpServerErrors = {
|
|
2138
|
+
401: string;
|
|
2139
|
+
404: ErrorResponse;
|
|
2140
|
+
500: ErrorResponse;
|
|
2141
|
+
};
|
|
2142
|
+
export type UpdateMcpServerError = UpdateMcpServerErrors[keyof UpdateMcpServerErrors];
|
|
2143
|
+
export type UpdateMcpServerResponses = {
|
|
2144
|
+
200: ServerResponse;
|
|
2145
|
+
};
|
|
2146
|
+
export type UpdateMcpServerResponse = UpdateMcpServerResponses[keyof UpdateMcpServerResponses];
|
|
2147
|
+
export type McpAuthCallbackData = {
|
|
2148
|
+
body?: never;
|
|
2149
|
+
path?: never;
|
|
2150
|
+
query?: {
|
|
2151
|
+
/**
|
|
2152
|
+
* Authorization code from the OAuth provider. Present on success.
|
|
2153
|
+
*/
|
|
2154
|
+
code?: string;
|
|
2155
|
+
/**
|
|
2156
|
+
* CSRF state parameter.
|
|
2157
|
+
*/
|
|
2158
|
+
state?: string;
|
|
2159
|
+
/**
|
|
2160
|
+
* OAuth error code from the provider, e.g. `access_denied`. Present on failure.
|
|
2161
|
+
*/
|
|
2162
|
+
error?: string;
|
|
2163
|
+
/**
|
|
2164
|
+
* Human-readable error description from the provider.
|
|
2165
|
+
*/
|
|
2166
|
+
error_description?: string;
|
|
2167
|
+
};
|
|
2168
|
+
url: '/mcp/servers/auth/callback';
|
|
2169
|
+
};
|
|
2170
|
+
export type McpAuthCallbackErrors = {
|
|
2171
|
+
/**
|
|
2172
|
+
* Provider rejected authorization, or the callback was malformed
|
|
2173
|
+
*/
|
|
2174
|
+
400: ErrorResponse;
|
|
2175
|
+
500: ErrorResponse;
|
|
2176
|
+
};
|
|
2177
|
+
export type McpAuthCallbackError = McpAuthCallbackErrors[keyof McpAuthCallbackErrors];
|
|
2178
|
+
export type McpAuthCallbackResponses = {
|
|
2179
|
+
/**
|
|
2180
|
+
* OAuth flow completed successfully
|
|
2181
|
+
*/
|
|
2182
|
+
200: unknown;
|
|
2183
|
+
};
|
|
2184
|
+
export type McpOauthClientMetadataData = {
|
|
2185
|
+
body?: never;
|
|
2186
|
+
path?: never;
|
|
2187
|
+
query?: never;
|
|
2188
|
+
url: '/mcp/servers/auth/client-metadata';
|
|
2189
|
+
};
|
|
2190
|
+
export type McpOauthClientMetadataResponses = {
|
|
2191
|
+
/**
|
|
2192
|
+
* Macro OAuth client metadata document
|
|
2193
|
+
*/
|
|
2194
|
+
200: unknown;
|
|
2195
|
+
};
|
|
2196
|
+
export type StartMcpAuthData = {
|
|
2197
|
+
body: StartAuthRequest;
|
|
2198
|
+
path?: never;
|
|
2199
|
+
query?: never;
|
|
2200
|
+
url: '/mcp/servers/auth/start';
|
|
2201
|
+
};
|
|
2202
|
+
export type StartMcpAuthErrors = {
|
|
2203
|
+
401: string;
|
|
2204
|
+
500: ErrorResponse;
|
|
2205
|
+
};
|
|
2206
|
+
export type StartMcpAuthError = StartMcpAuthErrors[keyof StartMcpAuthErrors];
|
|
2207
|
+
export type StartMcpAuthResponses = {
|
|
2208
|
+
200: StartAuthResponse;
|
|
2209
|
+
};
|
|
2210
|
+
export type StartMcpAuthResponse = StartMcpAuthResponses[keyof StartMcpAuthResponses];
|
|
2211
|
+
export type GetMemoryHandlerData = {
|
|
2212
|
+
body?: never;
|
|
2213
|
+
path?: never;
|
|
2214
|
+
query?: never;
|
|
2215
|
+
url: '/memory';
|
|
2216
|
+
};
|
|
2217
|
+
export type GetMemoryHandlerErrors = {
|
|
2218
|
+
/**
|
|
2219
|
+
* No memory exists for this user yet (generation triggered)
|
|
2220
|
+
*/
|
|
2221
|
+
404: unknown;
|
|
2222
|
+
/**
|
|
2223
|
+
* Internal server error
|
|
2224
|
+
*/
|
|
2225
|
+
500: MemoryErrorBody;
|
|
2226
|
+
};
|
|
2227
|
+
export type GetMemoryHandlerError = GetMemoryHandlerErrors[keyof GetMemoryHandlerErrors];
|
|
2228
|
+
export type GetMemoryHandlerResponses = {
|
|
2229
|
+
/**
|
|
2230
|
+
* Latest memory for the user
|
|
2231
|
+
*/
|
|
2232
|
+
200: MemoryResponse;
|
|
2233
|
+
};
|
|
2234
|
+
export type GetMemoryHandlerResponse = GetMemoryHandlerResponses[keyof GetMemoryHandlerResponses];
|
|
2235
|
+
export type GetStateHandler2Data = {
|
|
2236
|
+
body?: never;
|
|
2237
|
+
path?: never;
|
|
2238
|
+
query?: never;
|
|
2239
|
+
url: '/onboarding';
|
|
2240
|
+
};
|
|
2241
|
+
export type GetStateHandler2Errors = {
|
|
2242
|
+
/**
|
|
2243
|
+
* Internal server error
|
|
2244
|
+
*/
|
|
2245
|
+
500: unknown;
|
|
2246
|
+
};
|
|
2247
|
+
export type GetStateHandler2Responses = {
|
|
2248
|
+
/**
|
|
2249
|
+
* Current onboarding state
|
|
2250
|
+
*/
|
|
2251
|
+
200: OnboardingState;
|
|
2252
|
+
};
|
|
2253
|
+
export type GetStateHandler2Response = GetStateHandler2Responses[keyof GetStateHandler2Responses];
|
|
2254
|
+
export type CompleteHandlerData = {
|
|
2255
|
+
body: CompleteOnboardingRequest;
|
|
2256
|
+
path?: never;
|
|
2257
|
+
query?: never;
|
|
2258
|
+
url: '/onboarding/complete';
|
|
2259
|
+
};
|
|
2260
|
+
export type CompleteHandlerErrors = {
|
|
2261
|
+
/**
|
|
2262
|
+
* Internal server error
|
|
2263
|
+
*/
|
|
2264
|
+
500: unknown;
|
|
2265
|
+
};
|
|
2266
|
+
export type CompleteHandlerResponses = {
|
|
2267
|
+
/**
|
|
2268
|
+
* Completed onboarding row
|
|
2269
|
+
*/
|
|
2270
|
+
200: OnboardingRow;
|
|
2271
|
+
};
|
|
2272
|
+
export type CompleteHandlerResponse = CompleteHandlerResponses[keyof CompleteHandlerResponses];
|
|
2273
|
+
export type BrowsePipedreamMcpCatalogData = {
|
|
2274
|
+
body?: never;
|
|
2275
|
+
path?: never;
|
|
2276
|
+
query?: {
|
|
2277
|
+
/**
|
|
2278
|
+
* Search query to filter apps by name. Omit to browse.
|
|
2279
|
+
*/
|
|
2280
|
+
search?: string;
|
|
2281
|
+
/**
|
|
2282
|
+
* Opaque pagination cursor from a previous response.
|
|
2283
|
+
*/
|
|
2284
|
+
cursor?: string;
|
|
2285
|
+
/**
|
|
2286
|
+
* Page size (default 20, max 50).
|
|
2287
|
+
*/
|
|
2288
|
+
limit?: number;
|
|
2289
|
+
};
|
|
2290
|
+
url: '/pipedream/mcp/catalog';
|
|
2291
|
+
};
|
|
2292
|
+
export type BrowsePipedreamMcpCatalogErrors = {
|
|
2293
|
+
401: string;
|
|
2294
|
+
500: ErrorResponse;
|
|
2295
|
+
501: ErrorResponse;
|
|
2296
|
+
};
|
|
2297
|
+
export type BrowsePipedreamMcpCatalogError = BrowsePipedreamMcpCatalogErrors[keyof BrowsePipedreamMcpCatalogErrors];
|
|
2298
|
+
export type BrowsePipedreamMcpCatalogResponses = {
|
|
2299
|
+
200: PipedreamCatalogResponse;
|
|
2300
|
+
};
|
|
2301
|
+
export type BrowsePipedreamMcpCatalogResponse = BrowsePipedreamMcpCatalogResponses[keyof BrowsePipedreamMcpCatalogResponses];
|
|
2302
|
+
export type CompletePipedreamMcpConnectionData = {
|
|
2303
|
+
body: PipedreamCompleteRequest;
|
|
2304
|
+
path?: never;
|
|
2305
|
+
query?: never;
|
|
2306
|
+
url: '/pipedream/mcp/complete';
|
|
2307
|
+
};
|
|
2308
|
+
export type CompletePipedreamMcpConnectionErrors = {
|
|
2309
|
+
401: string;
|
|
2310
|
+
404: ErrorResponse;
|
|
2311
|
+
500: ErrorResponse;
|
|
2312
|
+
501: ErrorResponse;
|
|
2313
|
+
};
|
|
2314
|
+
export type CompletePipedreamMcpConnectionError = CompletePipedreamMcpConnectionErrors[keyof CompletePipedreamMcpConnectionErrors];
|
|
2315
|
+
export type CompletePipedreamMcpConnectionResponses = {
|
|
2316
|
+
200: PipedreamConnectionResponse;
|
|
2317
|
+
};
|
|
2318
|
+
export type CompletePipedreamMcpConnectionResponse = CompletePipedreamMcpConnectionResponses[keyof CompletePipedreamMcpConnectionResponses];
|
|
2319
|
+
export type DeletePipedreamMcpConnectionData = {
|
|
2320
|
+
body?: never;
|
|
2321
|
+
path?: never;
|
|
2322
|
+
query: {
|
|
2323
|
+
/**
|
|
2324
|
+
* The app slug to disconnect.
|
|
2325
|
+
*/
|
|
2326
|
+
app_slug: string;
|
|
2327
|
+
};
|
|
2328
|
+
url: '/pipedream/mcp/connections';
|
|
2329
|
+
};
|
|
2330
|
+
export type DeletePipedreamMcpConnectionErrors = {
|
|
2331
|
+
401: string;
|
|
2332
|
+
500: ErrorResponse;
|
|
2333
|
+
};
|
|
2334
|
+
export type DeletePipedreamMcpConnectionError = DeletePipedreamMcpConnectionErrors[keyof DeletePipedreamMcpConnectionErrors];
|
|
2335
|
+
export type DeletePipedreamMcpConnectionResponses = {
|
|
2336
|
+
204: void;
|
|
2337
|
+
};
|
|
2338
|
+
export type DeletePipedreamMcpConnectionResponse = DeletePipedreamMcpConnectionResponses[keyof DeletePipedreamMcpConnectionResponses];
|
|
2339
|
+
export type ListPipedreamMcpConnectionsData = {
|
|
2340
|
+
body?: never;
|
|
2341
|
+
path?: never;
|
|
2342
|
+
query?: never;
|
|
2343
|
+
url: '/pipedream/mcp/connections';
|
|
2344
|
+
};
|
|
2345
|
+
export type ListPipedreamMcpConnectionsErrors = {
|
|
2346
|
+
401: string;
|
|
2347
|
+
500: ErrorResponse;
|
|
2348
|
+
};
|
|
2349
|
+
export type ListPipedreamMcpConnectionsError = ListPipedreamMcpConnectionsErrors[keyof ListPipedreamMcpConnectionsErrors];
|
|
2350
|
+
export type ListPipedreamMcpConnectionsResponses = {
|
|
2351
|
+
200: Array<PipedreamConnectionResponse>;
|
|
2352
|
+
};
|
|
2353
|
+
export type ListPipedreamMcpConnectionsResponse = ListPipedreamMcpConnectionsResponses[keyof ListPipedreamMcpConnectionsResponses];
|
|
2354
|
+
export type UpdatePipedreamMcpConnectionData = {
|
|
2355
|
+
body: PipedreamUpdateRequest;
|
|
2356
|
+
path?: never;
|
|
2357
|
+
query?: never;
|
|
2358
|
+
url: '/pipedream/mcp/connections';
|
|
2359
|
+
};
|
|
2360
|
+
export type UpdatePipedreamMcpConnectionErrors = {
|
|
2361
|
+
401: string;
|
|
2362
|
+
404: ErrorResponse;
|
|
2363
|
+
500: ErrorResponse;
|
|
2364
|
+
};
|
|
2365
|
+
export type UpdatePipedreamMcpConnectionError = UpdatePipedreamMcpConnectionErrors[keyof UpdatePipedreamMcpConnectionErrors];
|
|
2366
|
+
export type UpdatePipedreamMcpConnectionResponses = {
|
|
2367
|
+
200: PipedreamConnectionResponse;
|
|
2368
|
+
};
|
|
2369
|
+
export type UpdatePipedreamMcpConnectionResponse = UpdatePipedreamMcpConnectionResponses[keyof UpdatePipedreamMcpConnectionResponses];
|
|
2370
|
+
export type CreatePipedreamMcpTokenData = {
|
|
2371
|
+
body?: never;
|
|
2372
|
+
path?: never;
|
|
2373
|
+
query?: never;
|
|
2374
|
+
url: '/pipedream/mcp/token';
|
|
2375
|
+
};
|
|
2376
|
+
export type CreatePipedreamMcpTokenErrors = {
|
|
2377
|
+
401: string;
|
|
2378
|
+
500: ErrorResponse;
|
|
2379
|
+
501: ErrorResponse;
|
|
2380
|
+
};
|
|
2381
|
+
export type CreatePipedreamMcpTokenError = CreatePipedreamMcpTokenErrors[keyof CreatePipedreamMcpTokenErrors];
|
|
2382
|
+
export type CreatePipedreamMcpTokenResponses = {
|
|
2383
|
+
200: PipedreamTokenResponse;
|
|
2384
|
+
};
|
|
2385
|
+
export type CreatePipedreamMcpTokenResponse = CreatePipedreamMcpTokenResponses[keyof CreatePipedreamMcpTokenResponses];
|
|
2386
|
+
export type GetBatchPreviewData = {
|
|
2387
|
+
body: GetBatchPreviewRequest;
|
|
2388
|
+
path?: never;
|
|
2389
|
+
query?: never;
|
|
2390
|
+
url: '/preview';
|
|
2391
|
+
};
|
|
2392
|
+
export type GetBatchPreviewErrors = {
|
|
2393
|
+
401: string;
|
|
2394
|
+
500: string;
|
|
2395
|
+
};
|
|
2396
|
+
export type GetBatchPreviewError = GetBatchPreviewErrors[keyof GetBatchPreviewErrors];
|
|
2397
|
+
export type GetBatchPreviewResponses = {
|
|
2398
|
+
200: GetBatchPreviewResponse;
|
|
2399
|
+
};
|
|
2400
|
+
export type GetBatchPreviewResponse2 = GetBatchPreviewResponses[keyof GetBatchPreviewResponses];
|
|
2401
|
+
export type SendChatMessageData = {
|
|
2402
|
+
body: HttpSendChatMessageRequest;
|
|
2403
|
+
path?: never;
|
|
2404
|
+
query?: never;
|
|
2405
|
+
url: '/stream/chat/message';
|
|
2406
|
+
};
|
|
2407
|
+
export type SendChatMessageErrors = {
|
|
2408
|
+
/**
|
|
2409
|
+
* Bad request
|
|
2410
|
+
*/
|
|
2411
|
+
400: ChatMessageError;
|
|
2412
|
+
/**
|
|
2413
|
+
* Unauthorized
|
|
2414
|
+
*/
|
|
2415
|
+
401: unknown;
|
|
2416
|
+
/**
|
|
2417
|
+
* Payment required — user lacks access to the requested model
|
|
2418
|
+
*/
|
|
2419
|
+
402: unknown;
|
|
2420
|
+
/**
|
|
2421
|
+
* Forbidden
|
|
2422
|
+
*/
|
|
2423
|
+
403: unknown;
|
|
2424
|
+
};
|
|
2425
|
+
export type SendChatMessageError = SendChatMessageErrors[keyof SendChatMessageErrors];
|
|
2426
|
+
export type SendChatMessageResponses = {
|
|
2427
|
+
/**
|
|
2428
|
+
* Stream initiated successfully
|
|
2429
|
+
*/
|
|
2430
|
+
200: SendChatMessageResponse;
|
|
2431
|
+
};
|
|
2432
|
+
export type SendChatMessageResponse2 = SendChatMessageResponses[keyof SendChatMessageResponses];
|
|
2433
|
+
export type StopChatStreamData = {
|
|
2434
|
+
body: StopChatStreamRequest;
|
|
2435
|
+
path?: never;
|
|
2436
|
+
query?: never;
|
|
2437
|
+
url: '/stream/chat/message/stop';
|
|
2438
|
+
};
|
|
2439
|
+
export type StopChatStreamErrors = {
|
|
2440
|
+
/**
|
|
2441
|
+
* Forbidden
|
|
2442
|
+
*/
|
|
2443
|
+
403: StopChatStreamError;
|
|
2444
|
+
};
|
|
2445
|
+
export type StopChatStreamError2 = StopChatStreamErrors[keyof StopChatStreamErrors];
|
|
2446
|
+
export type StopChatStreamResponses = {
|
|
2447
|
+
/**
|
|
2448
|
+
* Stop signal sent (or stream already finished)
|
|
2449
|
+
*/
|
|
2450
|
+
200: StopChatStreamResponse;
|
|
2451
|
+
};
|
|
2452
|
+
export type StopChatStreamResponse2 = StopChatStreamResponses[keyof StopChatStreamResponses];
|
|
2453
|
+
export type StructuredCompletionData = {
|
|
2454
|
+
body: StructuredCompletionRequest;
|
|
2455
|
+
path?: never;
|
|
2456
|
+
query?: never;
|
|
2457
|
+
url: '/structured-completion';
|
|
2458
|
+
};
|
|
2459
|
+
export type StructuredCompletionErrors = {
|
|
2460
|
+
/**
|
|
2461
|
+
* Bad request
|
|
2462
|
+
*/
|
|
2463
|
+
400: StructuredCompletionError;
|
|
2464
|
+
/**
|
|
2465
|
+
* Unauthorized
|
|
2466
|
+
*/
|
|
2467
|
+
401: unknown;
|
|
2468
|
+
/**
|
|
2469
|
+
* Payment required
|
|
2470
|
+
*/
|
|
2471
|
+
402: unknown;
|
|
2472
|
+
/**
|
|
2473
|
+
* Internal error
|
|
2474
|
+
*/
|
|
2475
|
+
500: StructuredCompletionError;
|
|
2476
|
+
};
|
|
2477
|
+
export type StructuredCompletionError2 = StructuredCompletionErrors[keyof StructuredCompletionErrors];
|
|
2478
|
+
export type StructuredCompletionResponses = {
|
|
2479
|
+
/**
|
|
2480
|
+
* Structured completion result
|
|
2481
|
+
*/
|
|
2482
|
+
200: StructuredCompletionResponse;
|
|
2483
|
+
};
|
|
2484
|
+
export type StructuredCompletionResponse2 = StructuredCompletionResponses[keyof StructuredCompletionResponses];
|