@relaymessenger/mcp 0.1.3-staging.7 → 0.1.3-staging.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1015 @@
1
+ export const DOCS_SOURCE = {
2
+ "contract": "8bdc20c1877a3afbd5da24132a343cf14bf531dd2edf1f4fa42dca7823ae096e",
3
+ "client": "6f18530df9c8709e9f0fd937a32ffc5c56f43a7b8d368068d93b72f3bac403b7",
4
+ "types": "db9bd68e005ac81ecfbf5e4de9f1fc7549ab4da34a135040d7d15b83957eae23"
5
+ };
6
+ export const METHOD_DOCS = [
7
+ {
8
+ "method": "client.agents.delete",
9
+ "signature": "client.agents.delete(handle: string, options?: RequestOptions): Promise<void>",
10
+ "parameters": [
11
+ "handle: string",
12
+ "options?: RequestOptions"
13
+ ],
14
+ "httpMethod": "DELETE",
15
+ "path": "/v1/agents/{handle}",
16
+ "operationId": "deleteAgent",
17
+ "summary": "Delete an agent",
18
+ "description": "Delete the developer-managed `.dev` agent authenticated by the supplied\nAgent Token. The Handle must match that agent. Organization-managed\nagents remain managed through Relay Console.\n\nThe Contact is archived and its tokens are revoked. Existing conversation\nhistory is retained. Finish acknowledging pending WebSocket events before\ndeletion; a pending event returns 409 rather than a fabricated acknowledgement.\nAfter deletion, the revoked token can no longer authenticate another request.",
19
+ "definitions": [
20
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}"
21
+ ],
22
+ "requestBody": null,
23
+ "executable": true,
24
+ "optionsIndex": 1
25
+ },
26
+ {
27
+ "method": "client.attachments.create",
28
+ "signature": "client.attachments.create(body: AttachmentCreateParams, options?: RequestOptions): Promise<AttachmentCreateResponse>",
29
+ "parameters": [
30
+ "body: AttachmentCreateParams",
31
+ "options?: RequestOptions"
32
+ ],
33
+ "httpMethod": "POST",
34
+ "path": "/v1/attachments",
35
+ "operationId": "requestUpload",
36
+ "summary": "Pre-upload a file",
37
+ "description": "Create an Attachment upload allocation.",
38
+ "definitions": [
39
+ "export interface AttachmentCreateParams {\n filename: string;\n content_type: SupportedContentType;\n size_bytes: number;\n duration_ms?: number | null;\n width?: number | null;\n height?: number | null;\n}",
40
+ "export type SupportedContentType =\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/gif\"\n | \"image/heic\"\n | \"image/heif\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/webp\"\n | \"image/x-icon\"\n | \"video/mp4\"\n | \"video/quicktime\"\n | \"video/mpeg\"\n | \"video/mpeg2\"\n | \"video/x-m4v\"\n | \"video/x-msvideo\"\n | \"video/3gpp\"\n | \"audio/mpeg\"\n | \"audio/mp3\"\n | \"audio/x-m4a\"\n | \"audio/mp4\"\n | \"audio/x-caf\"\n | \"audio/x-wav\"\n | \"audio/x-aiff\"\n | \"audio/aiff\"\n | \"audio/aac\"\n | \"audio/midi\"\n | \"audio/amr\"\n | \"application/pdf\"\n | \"application/vnd.apple.pkpass\"\n | \"text/plain\"\n | \"text/markdown\"\n | \"text/vcard\"\n | \"text/rtf\"\n | \"text/csv\"\n | \"text/html\"\n | \"text/calendar\"\n | \"application/msword\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.ms-excel\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.ms-powerpoint\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\"\n | \"application/x-iwork-pages-sffpages\"\n | \"application/x-iwork-numbers-sffnumbers\"\n | \"application/x-iwork-keynote-sffkey\"\n | \"application/epub+zip\"\n | \"text/xml\"\n | \"application/json\"\n | \"application/zip\"\n | \"application/x-gzip\"\n | (string & {});",
41
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
42
+ "export interface AttachmentCreateResponse {\n attachment_id: UUID;\n upload_url: string;\n download_url: string;\n http_method: \"PUT\";\n expires_at: string;\n required_headers: Record<string, string>;\n}",
43
+ "export type UUID = string;"
44
+ ],
45
+ "requestBody": {
46
+ "required": true,
47
+ "content": {
48
+ "application/json": {
49
+ "schema": {
50
+ "$ref": "#/components/schemas/RequestUploadRequest"
51
+ }
52
+ }
53
+ }
54
+ },
55
+ "executable": true,
56
+ "optionsIndex": 1
57
+ },
58
+ {
59
+ "method": "client.attachments.delete",
60
+ "signature": "client.attachments.delete(attachmentID: string, options?: RequestOptions): Promise<void>",
61
+ "parameters": [
62
+ "attachmentID: string",
63
+ "options?: RequestOptions"
64
+ ],
65
+ "httpMethod": "DELETE",
66
+ "path": "/v1/attachments/{attachmentId}",
67
+ "operationId": "deleteAttachment",
68
+ "summary": "Delete an attachment",
69
+ "description": "Delete an unreferenced Attachment owned by the caller.",
70
+ "definitions": [
71
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}"
72
+ ],
73
+ "requestBody": null,
74
+ "executable": true,
75
+ "optionsIndex": 1
76
+ },
77
+ {
78
+ "method": "client.attachments.retrieve",
79
+ "signature": "client.attachments.retrieve(attachmentID: string, options?: RequestOptions): Promise<Attachment>",
80
+ "parameters": [
81
+ "attachmentID: string",
82
+ "options?: RequestOptions"
83
+ ],
84
+ "httpMethod": "GET",
85
+ "path": "/v1/attachments/{attachmentId}",
86
+ "operationId": "getAttachment",
87
+ "summary": "Get attachment metadata",
88
+ "description": "Retrieve Attachment metadata and a download URL.",
89
+ "definitions": [
90
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
91
+ "export interface Attachment {\n id: UUID;\n filename: string;\n content_type: SupportedContentType;\n size_bytes: number;\n status: \"pending\" | \"complete\" | \"failed\";\n download_url?: string;\n created_at: string;\n duration_ms?: number | null;\n width?: number | null;\n height?: number | null;\n}",
92
+ "export type UUID = string;",
93
+ "export type SupportedContentType =\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/gif\"\n | \"image/heic\"\n | \"image/heif\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/webp\"\n | \"image/x-icon\"\n | \"video/mp4\"\n | \"video/quicktime\"\n | \"video/mpeg\"\n | \"video/mpeg2\"\n | \"video/x-m4v\"\n | \"video/x-msvideo\"\n | \"video/3gpp\"\n | \"audio/mpeg\"\n | \"audio/mp3\"\n | \"audio/x-m4a\"\n | \"audio/mp4\"\n | \"audio/x-caf\"\n | \"audio/x-wav\"\n | \"audio/x-aiff\"\n | \"audio/aiff\"\n | \"audio/aac\"\n | \"audio/midi\"\n | \"audio/amr\"\n | \"application/pdf\"\n | \"application/vnd.apple.pkpass\"\n | \"text/plain\"\n | \"text/markdown\"\n | \"text/vcard\"\n | \"text/rtf\"\n | \"text/csv\"\n | \"text/html\"\n | \"text/calendar\"\n | \"application/msword\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.ms-excel\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.ms-powerpoint\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\"\n | \"application/x-iwork-pages-sffpages\"\n | \"application/x-iwork-numbers-sffnumbers\"\n | \"application/x-iwork-keynote-sffkey\"\n | \"application/epub+zip\"\n | \"text/xml\"\n | \"application/json\"\n | \"application/zip\"\n | \"application/x-gzip\"\n | (string & {});"
94
+ ],
95
+ "requestBody": null,
96
+ "executable": true,
97
+ "optionsIndex": 1
98
+ },
99
+ {
100
+ "method": "client.blockedHandles.block",
101
+ "signature": "client.blockedHandles.block(body: BlockHandleParams, options?: RequestOptions): Promise<BlockHandleResponse>",
102
+ "parameters": [
103
+ "body: BlockHandleParams",
104
+ "options?: RequestOptions"
105
+ ],
106
+ "httpMethod": "POST",
107
+ "path": "/v1/blocked_handles",
108
+ "operationId": "blockHandle",
109
+ "summary": "Block a handle",
110
+ "description": "Block a registered Relay Handle.\n\nIn a direct Chat, a block in either direction stops delivery. The\nMessage is accepted and stored for the sender with `delivery_status`\n`sent`, and is never delivered to the other party.\n\nIn a group Chat, blocking is one way. Messages the blocked Handle sends\nare not delivered to the authenticated Contact, but the blocked Handle\nstill receives the authenticated Contact's Messages, and every other\nmember receives as normal.\n\nA Message that is not delivered leaves no trace for that recipient: no\nwebhook, no WebSocket event, no Chat activity, and no history. No error\nis raised for the sender, neither party is notified, and the sender's\n`message.delivered` fires when at least one recipient was delivered.\n\nBlocking does not delete existing Chats or history. It only stops new\ntraffic.\n\nChat membership is where a block is refused out loud: adding a Handle\nthat has blocked, or is blocked by, the Chat's user is rejected with\n`403` (error code `2026`).\n\n`reason` is a free-text note returned on the list endpoint. Nothing is\nsent to the blocked Handle, so blocking is silent from their side.",
111
+ "definitions": [
112
+ "export interface BlockHandleParams {\n handle: string;\n reason?: string;\n}",
113
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
114
+ "export interface BlockHandleResponse {\n blocked_handle: BlockedHandle;\n}",
115
+ "export interface BlockedHandle {\n handle: string;\n /** Optional note recorded when the handle was blocked. */\n reason?: string | null;\n blocked_at: string;\n}"
116
+ ],
117
+ "requestBody": {
118
+ "required": true,
119
+ "content": {
120
+ "application/json": {
121
+ "schema": {
122
+ "$ref": "#/components/schemas/BlockHandleRequest"
123
+ }
124
+ }
125
+ }
126
+ },
127
+ "executable": true,
128
+ "optionsIndex": 1
129
+ },
130
+ {
131
+ "method": "client.blockedHandles.list",
132
+ "signature": "client.blockedHandles.list(options?: RequestOptions): Promise<BlockedHandleListResponse>",
133
+ "parameters": [
134
+ "options?: RequestOptions"
135
+ ],
136
+ "httpMethod": "GET",
137
+ "path": "/v1/blocked_handles",
138
+ "operationId": "listBlockedHandles",
139
+ "summary": "List blocked handles",
140
+ "description": "List Handles blocked by the authenticated Contact, newest first, each\nwith its `reason` and `blocked_at`.",
141
+ "definitions": [
142
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
143
+ "export interface BlockedHandleListResponse {\n blocked_handles: BlockedHandle[];\n}",
144
+ "export interface BlockedHandle {\n handle: string;\n /** Optional note recorded when the handle was blocked. */\n reason?: string | null;\n blocked_at: string;\n}"
145
+ ],
146
+ "requestBody": null,
147
+ "executable": true,
148
+ "optionsIndex": 0
149
+ },
150
+ {
151
+ "method": "client.blockedHandles.unblock",
152
+ "signature": "client.blockedHandles.unblock(body: UnblockHandleParams, options?: RequestOptions): Promise<void>",
153
+ "parameters": [
154
+ "body: UnblockHandleParams",
155
+ "options?: RequestOptions"
156
+ ],
157
+ "httpMethod": "DELETE",
158
+ "path": "/v1/blocked_handles",
159
+ "operationId": "unblockHandle",
160
+ "summary": "Unblock a handle",
161
+ "description": "Remove a Handle from the authenticated Contact's block list. Traffic\nflows again from the next Message on: Messages dropped while the block\nwas on are never replayed and never appear in history.",
162
+ "definitions": [
163
+ "export interface UnblockHandleParams {\n handle: string;\n}",
164
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}"
165
+ ],
166
+ "requestBody": {
167
+ "required": true,
168
+ "content": {
169
+ "application/json": {
170
+ "schema": {
171
+ "$ref": "#/components/schemas/UnblockHandleRequest"
172
+ }
173
+ }
174
+ }
175
+ },
176
+ "executable": true,
177
+ "optionsIndex": 1
178
+ },
179
+ {
180
+ "method": "client.chats.create",
181
+ "signature": "client.chats.create(body: ChatCreateParams, options?: RequestOptions): Promise<ChatCreateResponse>",
182
+ "parameters": [
183
+ "body: ChatCreateParams",
184
+ "options?: RequestOptions"
185
+ ],
186
+ "httpMethod": "POST",
187
+ "path": "/v1/chats",
188
+ "operationId": "createChat",
189
+ "summary": "Create a new chat",
190
+ "description": "Create a direct or group Chat with its first Message.",
191
+ "definitions": [
192
+ "export interface ChatCreateParams {\n from: string;\n to: string[];\n message: MessageContent;\n}",
193
+ "export interface MessageContent {\n parts: MessagePart[];\n reply_to?: ReplyTo;\n idempotency_key?: string;\n /**\n * Send the Message with no banner and no sound on the recipient's device.\n * The Message still arrives, still counts as unread, and still moves the\n * Chat to the top of the list. Defaults to `false`.\n */\n silent?: boolean;\n}",
194
+ "export type MessagePart = TextPart | MediaPart | LinkPart;",
195
+ "export interface ReplyTo {\n message_id: UUID;\n part_index?: number;\n}",
196
+ "export interface Message {\n id: UUID;\n chat_id: UUID;\n from?: string | null;\n from_handle?: ChatHandle | null;\n parts?: MessagePartResponse[] | null;\n reply_to?: ReplyTo | null;\n is_system_message: boolean;\n system_event?: SystemEvent | null;\n is_from_me: boolean;\n delivery_status: DeliveryStatus;\n created_at: string;\n updated_at: string;\n sent_at?: string | null;\n delivered_at?: string | null;\n read_at?: string | null;\n /** When the Message was last edited, or null if it was never edited. */\n edited_at?: string | null;\n /**\n * When the sender unsent the Message, or null. An unsent Message keeps its\n * place in the transcript and carries no parts.\n */\n unsent_at?: string | null;\n /**\n * Whether the sender sent this Message silently, so the recipient's device\n * showed no banner and played no sound.\n */\n silent?: boolean;\n deliveries?: MessageDelivery[];\n}",
197
+ "export interface Chat {\n id: UUID;\n display_name: string | null;\n group_chat_icon?: string | null;\n handles: ChatHandle[];\n is_group: boolean;\n /**\n * The caller's side of a message request on this Chat: `pending` while a\n * sender with no Contact edge to the caller wrote to them and they have not\n * answered, `accepted` or `deleted` once they have. Absent when the caller\n * was never asked; an agent never is.\n */\n created_at: string;\n updated_at: string;\n}",
198
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
199
+ "export interface ChatCreateResponse {\n chat: Pick<\n Chat,\n \"id\" | \"display_name\" | \"is_group\" | \"handles\"\n > & { message: SentMessage };\n}",
200
+ "export interface SentMessage {\n id: UUID;\n parts: Array<TextPartResponse | MediaPartResponse | LinkPartResponse>;\n created_at: string;\n sent_at: string | null;\n delivered_at?: string | null;\n delivery_status: DeliveryStatus;\n from_handle?: ChatHandle | null;\n reply_to?: ReplyTo | null;\n /**\n * Whether the sender sent this Message silently, so the recipient's device\n * showed no banner and played no sound.\n */\n silent?: boolean;\n is_system_message: false;\n}",
201
+ "export type UUID = string;",
202
+ "export interface TextPartResponse extends TextPart {\n mentions?: Array<{\n id: string;\n handle: string;\n is_me: boolean;\n range: [number, number];\n }> | null;\n /** @deprecated Use mentions instead. */\n mention?: string | null;\n /** @deprecated Use mentions instead. */\n mention_range?: [number, number] | null;\n reactions: Reaction[] | null;\n}",
203
+ "export interface MediaPartResponse {\n type: \"media\";\n id: UUID;\n url: string;\n filename: string;\n mime_type: string;\n size_bytes: number;\n duration_ms?: number | null;\n width?: number | null;\n height?: number | null;\n reactions: Reaction[] | null;\n}",
204
+ "export interface LinkPartResponse extends LinkPart {\n reactions: Reaction[] | null;\n}",
205
+ "export type DeliveryStatus =\n | \"sent\"\n | \"delivered\"\n | \"read\";",
206
+ "export type ChatHandle = UserChatHandle | AgentChatHandle;"
207
+ ],
208
+ "requestBody": {
209
+ "required": true,
210
+ "content": {
211
+ "application/json": {
212
+ "schema": {
213
+ "$ref": "#/components/schemas/CreateChatRequest"
214
+ }
215
+ }
216
+ }
217
+ },
218
+ "executable": true,
219
+ "optionsIndex": 1
220
+ },
221
+ {
222
+ "method": "client.chats.leaveChat",
223
+ "signature": "client.chats.leaveChat(chatID: string, options?: RequestOptions): Promise<AcceptedResponse>",
224
+ "parameters": [
225
+ "chatID: string",
226
+ "options?: RequestOptions"
227
+ ],
228
+ "httpMethod": "POST",
229
+ "path": "/v1/chats/{chatId}/leave",
230
+ "operationId": "leaveChat",
231
+ "summary": "Leave a group chat",
232
+ "description": "The authenticated agent leaves a group Chat under the existing membership rules. The user participant remains.",
233
+ "definitions": [
234
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
235
+ "export interface AcceptedResponse {\n status?: string;\n message?: string;\n trace_id?: string;\n}"
236
+ ],
237
+ "requestBody": null,
238
+ "executable": true,
239
+ "optionsIndex": 1
240
+ },
241
+ {
242
+ "method": "client.chats.listChats",
243
+ "signature": "client.chats.listChats(query: ChatListChatsParams = {}, options?: RequestOptions): Promise<ChatsPage<Chat>>",
244
+ "parameters": [
245
+ "query: ChatListChatsParams = {}",
246
+ "options?: RequestOptions"
247
+ ],
248
+ "httpMethod": "GET",
249
+ "path": "/v1/chats",
250
+ "operationId": "listChats",
251
+ "summary": "List all chats",
252
+ "description": "List Chats visible to the authenticated Contact.",
253
+ "definitions": [
254
+ "export interface ChatListChatsParams {\n cursor?: string;\n limit?: number;\n}",
255
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
256
+ "export interface Chat {\n id: UUID;\n display_name: string | null;\n group_chat_icon?: string | null;\n handles: ChatHandle[];\n is_group: boolean;\n /**\n * The caller's side of a message request on this Chat: `pending` while a\n * sender with no Contact edge to the caller wrote to them and they have not\n * answered, `accepted` or `deleted` once they have. Absent when the caller\n * was never asked; an agent never is.\n */\n created_at: string;\n updated_at: string;\n}",
257
+ "export type UUID = string;",
258
+ "export type ChatHandle = UserChatHandle | AgentChatHandle;",
259
+ "export interface UserChatHandle extends ChatHandleBase {\n kind: \"user\";\n}",
260
+ "export interface AgentChatHandle extends ChatHandleBase {\n kind: \"agent\";\n}"
261
+ ],
262
+ "requestBody": null,
263
+ "executable": true,
264
+ "optionsIndex": 1
265
+ },
266
+ {
267
+ "method": "client.chats.markAsRead",
268
+ "signature": "client.chats.markAsRead(chatID: string, options?: RequestOptions): Promise<void>",
269
+ "parameters": [
270
+ "chatID: string",
271
+ "options?: RequestOptions"
272
+ ],
273
+ "httpMethod": "POST",
274
+ "path": "/v1/chats/{chatId}/read",
275
+ "operationId": "markChatAsRead",
276
+ "summary": "Mark chat as read",
277
+ "description": "Explicitly mark visible Messages in a Chat as Read. Webhook responses and WebSocket acknowledgements do not mark Messages Read.",
278
+ "definitions": [
279
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}"
280
+ ],
281
+ "requestBody": null,
282
+ "executable": true,
283
+ "optionsIndex": 1
284
+ },
285
+ {
286
+ "method": "client.chats.messages.list",
287
+ "signature": "client.chats.messages.list(chatID: string, query: MessageListParams = {}, options?: RequestOptions): Promise<MessagesPage<Message>>",
288
+ "parameters": [
289
+ "chatID: string",
290
+ "query: MessageListParams = {}",
291
+ "options?: RequestOptions"
292
+ ],
293
+ "httpMethod": "GET",
294
+ "path": "/v1/chats/{chatId}/messages",
295
+ "operationId": "getMessages",
296
+ "summary": "Get messages from a chat",
297
+ "description": "List visible Messages and group-history events in a Chat.\n\nThe default order is oldest first. Pass `order=desc` to open on the\nnewest Messages and page toward older ones: each `next_cursor`\ncontinues in the same direction it was minted for, so a cursor from a\n`desc` list is only valid with `order=desc`.",
298
+ "definitions": [
299
+ "export interface MessageListParams {\n cursor?: string;\n limit?: number;\n /**\n * `asc` (default) lists oldest first; `desc` opens on the newest Messages\n * and pages toward older ones. A cursor is only valid with the order it\n * was returned for.\n */\n order?: \"asc\" | \"desc\";\n}",
300
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
301
+ "export interface Message {\n id: UUID;\n chat_id: UUID;\n from?: string | null;\n from_handle?: ChatHandle | null;\n parts?: MessagePartResponse[] | null;\n reply_to?: ReplyTo | null;\n is_system_message: boolean;\n system_event?: SystemEvent | null;\n is_from_me: boolean;\n delivery_status: DeliveryStatus;\n created_at: string;\n updated_at: string;\n sent_at?: string | null;\n delivered_at?: string | null;\n read_at?: string | null;\n /** When the Message was last edited, or null if it was never edited. */\n edited_at?: string | null;\n /**\n * When the sender unsent the Message, or null. An unsent Message keeps its\n * place in the transcript and carries no parts.\n */\n unsent_at?: string | null;\n /**\n * Whether the sender sent this Message silently, so the recipient's device\n * showed no banner and played no sound.\n */\n silent?: boolean;\n deliveries?: MessageDelivery[];\n}",
302
+ "export type UUID = string;",
303
+ "export type ChatHandle = UserChatHandle | AgentChatHandle;",
304
+ "export interface UserChatHandle extends ChatHandleBase {\n kind: \"user\";\n}",
305
+ "export interface AgentChatHandle extends ChatHandleBase {\n kind: \"agent\";\n}",
306
+ "export type MessagePartResponse =\n | TextPartResponse\n | MediaPartResponse\n | LinkPartResponse\n | SystemPartResponse;",
307
+ "export interface TextPartResponse extends TextPart {\n mentions?: Array<{\n id: string;\n handle: string;\n is_me: boolean;\n range: [number, number];\n }> | null;\n /** @deprecated Use mentions instead. */\n mention?: string | null;\n /** @deprecated Use mentions instead. */\n mention_range?: [number, number] | null;\n reactions: Reaction[] | null;\n}",
308
+ "export interface MediaPartResponse {\n type: \"media\";\n id: UUID;\n url: string;\n filename: string;\n mime_type: string;\n size_bytes: number;\n duration_ms?: number | null;\n width?: number | null;\n height?: number | null;\n reactions: Reaction[] | null;\n}",
309
+ "export interface LinkPartResponse extends LinkPart {\n reactions: Reaction[] | null;\n}",
310
+ "export interface SystemPartResponse {\n type: \"system\";\n value: string;\n reactions: null;\n}",
311
+ "export interface ReplyTo {\n message_id: UUID;\n part_index?: number;\n}",
312
+ "export interface SystemEvent {\n type: SystemEventType;\n actor: SystemEventParty;\n subject: SystemEventParty | null;\n value: string | null;\n icon_attachment_id: UUID | null;\n contact_card: ContactCardItem | null;\n}",
313
+ "export type SystemEventType =\n | \"chat_created\"\n | \"participant_added\"\n | \"participant_removed\"\n | \"group_name_updated\"\n | \"group_icon_updated\"\n | \"contact_card_shared\";",
314
+ "export interface SystemEventParty {\n id: UUID;\n handle: string;\n kind: \"user\" | \"agent\";\n}",
315
+ "export interface ContactCardItem {\n handle: string;\n first_name: string;\n last_name: string | null;\n image_url: string | null;\n is_active: boolean;\n kind: \"user\" | \"agent\";\n}",
316
+ "export type DeliveryStatus =\n | \"sent\"\n | \"delivered\"\n | \"read\";",
317
+ "export interface MessageDelivery {\n contact: ChatHandle;\n delivered_at: string | null;\n read_at: string | null;\n}"
318
+ ],
319
+ "requestBody": null,
320
+ "executable": true,
321
+ "optionsIndex": 2
322
+ },
323
+ {
324
+ "method": "client.chats.messages.send",
325
+ "signature": "client.chats.messages.send(chatID: string, body: MessageSendParams, options?: RequestOptions): Promise<MessageSendResponse>",
326
+ "parameters": [
327
+ "chatID: string",
328
+ "body: MessageSendParams",
329
+ "options?: RequestOptions"
330
+ ],
331
+ "httpMethod": "POST",
332
+ "path": "/v1/chats/{chatId}/messages",
333
+ "operationId": "sendMessageToChat",
334
+ "summary": "Send a message to an existing chat",
335
+ "description": "Send a Message to an existing Chat.\n\nBlocking is silent on this path. The Message is accepted and stored for\nthe sender with `delivery_status` `sent`, no error is raised, and\nneither party is notified.\n\nIn a direct Chat, a block in either direction stops delivery: the\nMessage is stored for the sender and never delivered to the other\nparty.\n\nIn a group Chat, blocking is one way. A Message from a sender the\nrecipient has blocked is not delivered to that recipient, while a\nmember the sender has blocked still receives the sender's Messages.\nEvery other member receives the Message as normal.\n\nA Message that is not delivered leaves no trace for that recipient: no\nwebhook, no WebSocket event, no Chat activity, and no history, and it\nis never replayed after an unblock. The sender's `message.delivered`\nfires when at least one recipient was delivered.",
336
+ "definitions": [
337
+ "export interface MessageSendParams {\n message: MessageContent;\n}",
338
+ "export interface MessageContent {\n parts: MessagePart[];\n reply_to?: ReplyTo;\n idempotency_key?: string;\n /**\n * Send the Message with no banner and no sound on the recipient's device.\n * The Message still arrives, still counts as unread, and still moves the\n * Chat to the top of the list. Defaults to `false`.\n */\n silent?: boolean;\n}",
339
+ "export type MessagePart = TextPart | MediaPart | LinkPart;",
340
+ "export interface ReplyTo {\n message_id: UUID;\n part_index?: number;\n}",
341
+ "export interface Message {\n id: UUID;\n chat_id: UUID;\n from?: string | null;\n from_handle?: ChatHandle | null;\n parts?: MessagePartResponse[] | null;\n reply_to?: ReplyTo | null;\n is_system_message: boolean;\n system_event?: SystemEvent | null;\n is_from_me: boolean;\n delivery_status: DeliveryStatus;\n created_at: string;\n updated_at: string;\n sent_at?: string | null;\n delivered_at?: string | null;\n read_at?: string | null;\n /** When the Message was last edited, or null if it was never edited. */\n edited_at?: string | null;\n /**\n * When the sender unsent the Message, or null. An unsent Message keeps its\n * place in the transcript and carries no parts.\n */\n unsent_at?: string | null;\n /**\n * Whether the sender sent this Message silently, so the recipient's device\n * showed no banner and played no sound.\n */\n silent?: boolean;\n deliveries?: MessageDelivery[];\n}",
342
+ "export interface Chat {\n id: UUID;\n display_name: string | null;\n group_chat_icon?: string | null;\n handles: ChatHandle[];\n is_group: boolean;\n /**\n * The caller's side of a message request on this Chat: `pending` while a\n * sender with no Contact edge to the caller wrote to them and they have not\n * answered, `accepted` or `deleted` once they have. Absent when the caller\n * was never asked; an agent never is.\n */\n created_at: string;\n updated_at: string;\n}",
343
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
344
+ "export interface MessageSendResponse {\n chat_id: UUID;\n message: SentMessage;\n}",
345
+ "export type UUID = string;",
346
+ "export interface SentMessage {\n id: UUID;\n parts: Array<TextPartResponse | MediaPartResponse | LinkPartResponse>;\n created_at: string;\n sent_at: string | null;\n delivered_at?: string | null;\n delivery_status: DeliveryStatus;\n from_handle?: ChatHandle | null;\n reply_to?: ReplyTo | null;\n /**\n * Whether the sender sent this Message silently, so the recipient's device\n * showed no banner and played no sound.\n */\n silent?: boolean;\n is_system_message: false;\n}",
347
+ "export interface TextPartResponse extends TextPart {\n mentions?: Array<{\n id: string;\n handle: string;\n is_me: boolean;\n range: [number, number];\n }> | null;\n /** @deprecated Use mentions instead. */\n mention?: string | null;\n /** @deprecated Use mentions instead. */\n mention_range?: [number, number] | null;\n reactions: Reaction[] | null;\n}",
348
+ "export interface MediaPartResponse {\n type: \"media\";\n id: UUID;\n url: string;\n filename: string;\n mime_type: string;\n size_bytes: number;\n duration_ms?: number | null;\n width?: number | null;\n height?: number | null;\n reactions: Reaction[] | null;\n}",
349
+ "export interface LinkPartResponse extends LinkPart {\n reactions: Reaction[] | null;\n}",
350
+ "export type DeliveryStatus =\n | \"sent\"\n | \"delivered\"\n | \"read\";",
351
+ "export type ChatHandle = UserChatHandle | AgentChatHandle;"
352
+ ],
353
+ "requestBody": {
354
+ "required": true,
355
+ "content": {
356
+ "application/json": {
357
+ "schema": {
358
+ "$ref": "#/components/schemas/SendMessageToChatRequest"
359
+ }
360
+ }
361
+ }
362
+ },
363
+ "executable": true,
364
+ "optionsIndex": 2
365
+ },
366
+ {
367
+ "method": "client.chats.participants.add",
368
+ "signature": "client.chats.participants.add(chatID: string, body: ParticipantAddParams, options?: RequestOptions): Promise<AcceptedResponse>",
369
+ "parameters": [
370
+ "chatID: string",
371
+ "body: ParticipantAddParams",
372
+ "options?: RequestOptions"
373
+ ],
374
+ "httpMethod": "POST",
375
+ "path": "/v1/chats/{chatId}/participants",
376
+ "operationId": "addParticipant",
377
+ "summary": "Add a participant to a chat",
378
+ "description": "Add an agent to a group Chat. In a Chat containing a user, the target agent must not be blocked by, or have blocked, that user. User membership is established at creation. By default, the added agent can read history from its new membership onward. Set hide_history to false to also share earlier retained history.",
379
+ "definitions": [
380
+ "export interface ParticipantAddParams {\n handle: string;\n /** Hide history before the new membership. Omission uses the server default: true. */\n hide_history?: boolean;\n}",
381
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
382
+ "export interface AcceptedResponse {\n status?: string;\n message?: string;\n trace_id?: string;\n}"
383
+ ],
384
+ "requestBody": {
385
+ "required": true,
386
+ "content": {
387
+ "application/json": {
388
+ "schema": {
389
+ "$ref": "#/components/schemas/AddParticipantRequest"
390
+ }
391
+ }
392
+ }
393
+ },
394
+ "executable": true,
395
+ "optionsIndex": 2
396
+ },
397
+ {
398
+ "method": "client.chats.participants.remove",
399
+ "signature": "client.chats.participants.remove(chatID: string, body: ParticipantRemoveParams, options?: RequestOptions): Promise<AcceptedResponse>",
400
+ "parameters": [
401
+ "chatID: string",
402
+ "body: ParticipantRemoveParams",
403
+ "options?: RequestOptions"
404
+ ],
405
+ "httpMethod": "DELETE",
406
+ "path": "/v1/chats/{chatId}/participants",
407
+ "operationId": "removeParticipant",
408
+ "summary": "Remove a participant from a chat",
409
+ "description": "Remove an agent from a group Chat. Any active member may remove one. The user participant cannot be removed.",
410
+ "definitions": [
411
+ "export interface ParticipantRemoveParams {\n handle: string;\n}",
412
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
413
+ "export interface AcceptedResponse {\n status?: string;\n message?: string;\n trace_id?: string;\n}"
414
+ ],
415
+ "requestBody": {
416
+ "required": true,
417
+ "content": {
418
+ "application/json": {
419
+ "schema": {
420
+ "$ref": "#/components/schemas/RemoveParticipantRequest"
421
+ }
422
+ }
423
+ }
424
+ },
425
+ "executable": true,
426
+ "optionsIndex": 2
427
+ },
428
+ {
429
+ "method": "client.chats.retrieve",
430
+ "signature": "client.chats.retrieve(chatID: string, options?: RequestOptions): Promise<Chat>",
431
+ "parameters": [
432
+ "chatID: string",
433
+ "options?: RequestOptions"
434
+ ],
435
+ "httpMethod": "GET",
436
+ "path": "/v1/chats/{chatId}",
437
+ "operationId": "getChat",
438
+ "summary": "Get a chat by ID",
439
+ "description": "Retrieve one visible Chat.",
440
+ "definitions": [
441
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
442
+ "export interface Chat {\n id: UUID;\n display_name: string | null;\n group_chat_icon?: string | null;\n handles: ChatHandle[];\n is_group: boolean;\n /**\n * The caller's side of a message request on this Chat: `pending` while a\n * sender with no Contact edge to the caller wrote to them and they have not\n * answered, `accepted` or `deleted` once they have. Absent when the caller\n * was never asked; an agent never is.\n */\n created_at: string;\n updated_at: string;\n}",
443
+ "export type UUID = string;",
444
+ "export type ChatHandle = UserChatHandle | AgentChatHandle;",
445
+ "export interface UserChatHandle extends ChatHandleBase {\n kind: \"user\";\n}",
446
+ "export interface AgentChatHandle extends ChatHandleBase {\n kind: \"agent\";\n}"
447
+ ],
448
+ "requestBody": null,
449
+ "executable": true,
450
+ "optionsIndex": 1
451
+ },
452
+ {
453
+ "method": "client.chats.sendVoicememo",
454
+ "signature": "client.chats.sendVoicememo(chatID: string, body: ChatSendVoicememoParams, options?: RequestOptions): Promise<ChatSendVoicememoResponse>",
455
+ "parameters": [
456
+ "chatID: string",
457
+ "body: ChatSendVoicememoParams",
458
+ "options?: RequestOptions"
459
+ ],
460
+ "httpMethod": "POST",
461
+ "path": "/v1/chats/{chatId}/voicememo",
462
+ "operationId": "sendVoiceMemoToChat",
463
+ "summary": "Send a voice memo to a chat",
464
+ "description": "Send an uploaded audio Attachment as a voice memo.",
465
+ "definitions": [
466
+ "export type ChatSendVoicememoParams =\n | { attachment_id: UUID; voice_memo_url?: never }\n | { voice_memo_url: string; attachment_id?: never };",
467
+ "export type UUID = string;",
468
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
469
+ "export interface ChatSendVoicememoResponse {\n voice_memo: {\n id: UUID;\n from: string;\n to: string[];\n status: string;\n voice_memo: VoiceMemoAttachment;\n created_at: string;\n chat: {\n id: UUID;\n handles: ChatHandle[];\n is_group: boolean;\n };\n };\n}",
470
+ "export interface VoiceMemoAttachment {\n id: UUID;\n url: string;\n filename: string;\n mime_type: string;\n size_bytes: number;\n duration_ms?: number | null;\n /** Pixel width when known. Width and height are supplied together. */\n width?: number | null;\n /** Pixel height when known. Width and height are supplied together. */\n height?: number | null;\n}",
471
+ "export type ChatHandle = UserChatHandle | AgentChatHandle;",
472
+ "export interface UserChatHandle extends ChatHandleBase {\n kind: \"user\";\n}",
473
+ "export interface AgentChatHandle extends ChatHandleBase {\n kind: \"agent\";\n}"
474
+ ],
475
+ "requestBody": {
476
+ "required": true,
477
+ "content": {
478
+ "application/json": {
479
+ "schema": {
480
+ "$ref": "#/components/schemas/SendVoiceMemoToChatRequest"
481
+ }
482
+ }
483
+ }
484
+ },
485
+ "executable": true,
486
+ "optionsIndex": 2
487
+ },
488
+ {
489
+ "method": "client.chats.shareContactCard",
490
+ "signature": "client.chats.shareContactCard(chatID: string, options?: RequestOptions): Promise<void>",
491
+ "parameters": [
492
+ "chatID: string",
493
+ "options?: RequestOptions"
494
+ ],
495
+ "httpMethod": "POST",
496
+ "path": "/v1/chats/{chatId}/share_contact_card",
497
+ "operationId": "shareContactWithChat",
498
+ "summary": "Share your contact card with a chat",
499
+ "description": "Share the authenticated agent's configured Contact Card into an existing Chat. Each successful call shares the card once.",
500
+ "definitions": [
501
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}"
502
+ ],
503
+ "requestBody": null,
504
+ "executable": true,
505
+ "optionsIndex": 1
506
+ },
507
+ {
508
+ "method": "client.chats.startTyping",
509
+ "signature": "client.chats.startTyping(chatID: string, options?: RequestOptions): Promise<void>",
510
+ "parameters": [
511
+ "chatID: string",
512
+ "options?: RequestOptions"
513
+ ],
514
+ "httpMethod": "POST",
515
+ "path": "/v1/chats/{chatId}/typing",
516
+ "operationId": "startTyping",
517
+ "summary": "Start typing indicator",
518
+ "description": "Start or refresh the authenticated Contact's typing indicator.",
519
+ "definitions": [
520
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}"
521
+ ],
522
+ "requestBody": null,
523
+ "executable": true,
524
+ "optionsIndex": 1
525
+ },
526
+ {
527
+ "method": "client.chats.stopTyping",
528
+ "signature": "client.chats.stopTyping(chatID: string, options?: RequestOptions): Promise<void>",
529
+ "parameters": [
530
+ "chatID: string",
531
+ "options?: RequestOptions"
532
+ ],
533
+ "httpMethod": "DELETE",
534
+ "path": "/v1/chats/{chatId}/typing",
535
+ "operationId": "stopTyping",
536
+ "summary": "Stop typing indicator",
537
+ "description": "Stop the authenticated Contact's typing indicator.",
538
+ "definitions": [
539
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}"
540
+ ],
541
+ "requestBody": null,
542
+ "executable": true,
543
+ "optionsIndex": 1
544
+ },
545
+ {
546
+ "method": "client.chats.update",
547
+ "signature": "client.chats.update(chatID: string, body: ChatUpdateParams, options?: RequestOptions): Promise<ChatUpdateResponse>",
548
+ "parameters": [
549
+ "chatID: string",
550
+ "body: ChatUpdateParams",
551
+ "options?: RequestOptions"
552
+ ],
553
+ "httpMethod": "PUT",
554
+ "path": "/v1/chats/{chatId}",
555
+ "operationId": "updateChat",
556
+ "summary": "Update a chat",
557
+ "description": "Update a group Chat name or photo.",
558
+ "definitions": [
559
+ "export interface ChatUpdateParams {\n display_name?: string;\n /**\n * Group photo for the chat, in either of two forms. A completed image\n * Attachment ID uses an image you already uploaded. Any publicly reachable\n * HTTPS image address also works: Relay downloads it and serves a permanent\n * copy of its own, so the address you supply does not have to stay up. Send\n * null to clear the photo.\n */\n group_chat_icon?: string | null;\n}",
560
+ "export interface Attachment {\n id: UUID;\n filename: string;\n content_type: SupportedContentType;\n size_bytes: number;\n status: \"pending\" | \"complete\" | \"failed\";\n download_url?: string;\n created_at: string;\n duration_ms?: number | null;\n width?: number | null;\n height?: number | null;\n}",
561
+ "export type UUID = string;",
562
+ "export type SupportedContentType =\n | \"image/jpeg\"\n | \"image/png\"\n | \"image/gif\"\n | \"image/heic\"\n | \"image/heif\"\n | \"image/tiff\"\n | \"image/bmp\"\n | \"image/webp\"\n | \"image/x-icon\"\n | \"video/mp4\"\n | \"video/quicktime\"\n | \"video/mpeg\"\n | \"video/mpeg2\"\n | \"video/x-m4v\"\n | \"video/x-msvideo\"\n | \"video/3gpp\"\n | \"audio/mpeg\"\n | \"audio/mp3\"\n | \"audio/x-m4a\"\n | \"audio/mp4\"\n | \"audio/x-caf\"\n | \"audio/x-wav\"\n | \"audio/x-aiff\"\n | \"audio/aiff\"\n | \"audio/aac\"\n | \"audio/midi\"\n | \"audio/amr\"\n | \"application/pdf\"\n | \"application/vnd.apple.pkpass\"\n | \"text/plain\"\n | \"text/markdown\"\n | \"text/vcard\"\n | \"text/rtf\"\n | \"text/csv\"\n | \"text/html\"\n | \"text/calendar\"\n | \"application/msword\"\n | \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n | \"application/vnd.ms-excel\"\n | \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n | \"application/vnd.ms-powerpoint\"\n | \"application/vnd.openxmlformats-officedocument.presentationml.presentation\"\n | \"application/x-iwork-pages-sffpages\"\n | \"application/x-iwork-numbers-sffnumbers\"\n | \"application/x-iwork-keynote-sffkey\"\n | \"application/epub+zip\"\n | \"text/xml\"\n | \"application/json\"\n | \"application/zip\"\n | \"application/x-gzip\"\n | (string & {});",
563
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
564
+ "export interface ChatUpdateResponse {\n status?: string;\n chat_id?: UUID;\n}"
565
+ ],
566
+ "requestBody": {
567
+ "required": true,
568
+ "content": {
569
+ "application/json": {
570
+ "schema": {
571
+ "$ref": "#/components/schemas/UpdateChatRequest"
572
+ }
573
+ }
574
+ }
575
+ },
576
+ "executable": true,
577
+ "optionsIndex": 2
578
+ },
579
+ {
580
+ "method": "client.contactCard.create",
581
+ "signature": "client.contactCard.create(body: ContactCardCreateParams, options?: RequestOptions): Promise<ContactCardItem>",
582
+ "parameters": [
583
+ "body: ContactCardCreateParams",
584
+ "options?: RequestOptions"
585
+ ],
586
+ "httpMethod": "POST",
587
+ "path": "/v1/contact_card",
588
+ "operationId": "setupContactCard",
589
+ "summary": "Setup contact card",
590
+ "description": "Activate the authenticated agent's Contact Card.",
591
+ "definitions": [
592
+ "export interface ContactCardCreateParams {\n handle: string;\n first_name: string;\n last_name?: string;\n image_url?: string;\n /** Caller-owned completed image upload; mutually exclusive with image_url. */\n attachment_id?: UUID;\n /** Existing redraw metadata; requires image_url or attachment_id. */\n image_recipe?: AgentImageRecipe;\n}",
593
+ "export type UUID = string;",
594
+ "export type AgentImageRecipe = AgentMonogramImageRecipe | AgentEmojiImageRecipe | AgentPhotoImageRecipe;",
595
+ "export interface AgentMonogramImageRecipe {\n recipe: { monogram: { initials: string }; emoji?: never; image?: never };\n background: AgentImageBackground;\n}",
596
+ "export interface AgentEmojiImageRecipe {\n recipe: { emoji: { emoji: string }; monogram?: never; image?: never };\n background: AgentImageBackground;\n}",
597
+ "export interface AgentPhotoImageRecipe {\n recipe: { image: Record<string, never>; monogram?: never; emoji?: never };\n background?: never;\n}",
598
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
599
+ "export interface ContactCardItem {\n handle: string;\n first_name: string;\n last_name: string | null;\n image_url: string | null;\n is_active: boolean;\n kind: \"user\" | \"agent\";\n}"
600
+ ],
601
+ "requestBody": {
602
+ "required": true,
603
+ "content": {
604
+ "application/json": {
605
+ "schema": {
606
+ "$ref": "#/components/schemas/SetContactCardRequest"
607
+ }
608
+ }
609
+ }
610
+ },
611
+ "executable": true,
612
+ "optionsIndex": 1
613
+ },
614
+ {
615
+ "method": "client.contactCard.retrieve",
616
+ "signature": "client.contactCard.retrieve(query: ContactCardRetrieveParams = {}, options?: RequestOptions): Promise<ContactCardRetrieveResponse>",
617
+ "parameters": [
618
+ "query: ContactCardRetrieveParams = {}",
619
+ "options?: RequestOptions"
620
+ ],
621
+ "httpMethod": "GET",
622
+ "path": "/v1/contact_card",
623
+ "operationId": "getContactCard",
624
+ "summary": "Get contact cards",
625
+ "description": "Retrieve the authenticated agent's Contact Card.",
626
+ "definitions": [
627
+ "export interface ContactCardRetrieveParams {\n handle?: string;\n}",
628
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
629
+ "export interface ContactCardRetrieveResponse {\n contact_cards: ContactCardItem[];\n}",
630
+ "export interface ContactCardItem {\n handle: string;\n first_name: string;\n last_name: string | null;\n image_url: string | null;\n is_active: boolean;\n kind: \"user\" | \"agent\";\n}"
631
+ ],
632
+ "requestBody": null,
633
+ "executable": true,
634
+ "optionsIndex": 1
635
+ },
636
+ {
637
+ "method": "client.contactCard.update",
638
+ "signature": "client.contactCard.update(params: ContactCardUpdateParams, options?: RequestOptions): Promise<ContactCardItem>",
639
+ "parameters": [
640
+ "params: ContactCardUpdateParams",
641
+ "options?: RequestOptions"
642
+ ],
643
+ "httpMethod": "PATCH",
644
+ "path": "/v1/contact_card",
645
+ "operationId": "updateContactCard",
646
+ "summary": "Update contact card",
647
+ "description": "Update the authenticated agent's Contact Card.",
648
+ "definitions": [
649
+ "export interface ContactCardUpdateParams {\n /** Server contract 3097dda: trimmed about text, 1 to 60 characters. */\n about?: string;\n handle: string;\n first_name?: string;\n last_name?: string | null;\n image_url?: string | null;\n /** Caller-owned completed image upload; mutually exclusive with image_url, including null. */\n attachment_id?: UUID;\n /** Existing redraw metadata; requires an image URL or completed upload. */\n image_recipe?: AgentImageRecipe;\n}",
650
+ "export type UUID = string;",
651
+ "export type AgentImageRecipe = AgentMonogramImageRecipe | AgentEmojiImageRecipe | AgentPhotoImageRecipe;",
652
+ "export interface AgentMonogramImageRecipe {\n recipe: { monogram: { initials: string }; emoji?: never; image?: never };\n background: AgentImageBackground;\n}",
653
+ "export interface AgentEmojiImageRecipe {\n recipe: { emoji: { emoji: string }; monogram?: never; image?: never };\n background: AgentImageBackground;\n}",
654
+ "export interface AgentPhotoImageRecipe {\n recipe: { image: Record<string, never>; monogram?: never; emoji?: never };\n background?: never;\n}",
655
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
656
+ "export interface ContactCardItem {\n handle: string;\n first_name: string;\n last_name: string | null;\n image_url: string | null;\n is_active: boolean;\n kind: \"user\" | \"agent\";\n}"
657
+ ],
658
+ "requestBody": {
659
+ "required": true,
660
+ "content": {
661
+ "application/json": {
662
+ "schema": {
663
+ "$ref": "#/components/schemas/UpdateContactCardRequest"
664
+ }
665
+ }
666
+ }
667
+ },
668
+ "executable": true,
669
+ "optionsIndex": 1
670
+ },
671
+ {
672
+ "method": "client.messages.addReaction",
673
+ "signature": "client.messages.addReaction(messageID: string, body: MessageAddReactionParams, options?: RequestOptions): Promise<MessageAddReactionResponse>",
674
+ "parameters": [
675
+ "messageID: string",
676
+ "body: MessageAddReactionParams",
677
+ "options?: RequestOptions"
678
+ ],
679
+ "httpMethod": "POST",
680
+ "path": "/v1/messages/{messageId}/reactions",
681
+ "operationId": "sendReaction",
682
+ "summary": "Add or remove a reaction to a message",
683
+ "description": "Add or remove a reaction on one Message part.",
684
+ "definitions": [
685
+ "export interface MessageAddReactionParams {\n operation: \"add\" | \"remove\";\n type: ReactionType;\n custom_emoji?: string;\n part_index?: number;\n}",
686
+ "export type ReactionType =\n | \"love\"\n | \"like\"\n | \"dislike\"\n | \"laugh\"\n | \"emphasize\"\n | \"question\"\n | \"custom\";",
687
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
688
+ "export type MessageAddReactionResponse = AcceptedResponse;",
689
+ "export interface AcceptedResponse {\n status?: string;\n message?: string;\n trace_id?: string;\n}"
690
+ ],
691
+ "requestBody": {
692
+ "required": true,
693
+ "content": {
694
+ "application/json": {
695
+ "schema": {
696
+ "$ref": "#/components/schemas/SendReactionRequest"
697
+ }
698
+ }
699
+ }
700
+ },
701
+ "executable": true,
702
+ "optionsIndex": 2
703
+ },
704
+ {
705
+ "method": "client.messages.create",
706
+ "signature": "client.messages.create(params: MessageCreateParams, options?: RequestOptions): Promise<MessageCreateResponse>",
707
+ "parameters": [
708
+ "params: MessageCreateParams",
709
+ "options?: RequestOptions"
710
+ ],
711
+ "httpMethod": "POST",
712
+ "path": "/v1/messages",
713
+ "operationId": "sendMessage",
714
+ "summary": "Resolve a Chat and send a Message",
715
+ "description": "Resolve or create a Chat, then send a Message.\n\nBlocking is silent on this path. The Message is accepted and stored for\nthe sender with `delivery_status` `sent`, no error is raised, and\nneither party is notified.\n\nIn a direct Chat, a block in either direction stops delivery: the\nMessage is stored for the sender and never delivered to the other\nparty.\n\nIn a group Chat, blocking is one way. A Message from a sender the\nrecipient has blocked is not delivered to that recipient, while a\nmember the sender has blocked still receives the sender's Messages.\nEvery other member receives the Message as normal.\n\nA Message that is not delivered leaves no trace for that recipient: no\nwebhook, no WebSocket event, no Chat activity, and no history, and it\nis never replayed after an unblock. The sender's `message.delivered`\nfires when at least one recipient was delivered.",
716
+ "definitions": [
717
+ "export interface MessageCreateParams {\n to: string[];\n message: MessageContent;\n \"Idempotency-Key\"?: string;\n}",
718
+ "export interface MessageContent {\n parts: MessagePart[];\n reply_to?: ReplyTo;\n idempotency_key?: string;\n /**\n * Send the Message with no banner and no sound on the recipient's device.\n * The Message still arrives, still counts as unread, and still moves the\n * Chat to the top of the list. Defaults to `false`.\n */\n silent?: boolean;\n}",
719
+ "export type MessagePart = TextPart | MediaPart | LinkPart;",
720
+ "export interface ReplyTo {\n message_id: UUID;\n part_index?: number;\n}",
721
+ "export interface Message {\n id: UUID;\n chat_id: UUID;\n from?: string | null;\n from_handle?: ChatHandle | null;\n parts?: MessagePartResponse[] | null;\n reply_to?: ReplyTo | null;\n is_system_message: boolean;\n system_event?: SystemEvent | null;\n is_from_me: boolean;\n delivery_status: DeliveryStatus;\n created_at: string;\n updated_at: string;\n sent_at?: string | null;\n delivered_at?: string | null;\n read_at?: string | null;\n /** When the Message was last edited, or null if it was never edited. */\n edited_at?: string | null;\n /**\n * When the sender unsent the Message, or null. An unsent Message keeps its\n * place in the transcript and carries no parts.\n */\n unsent_at?: string | null;\n /**\n * Whether the sender sent this Message silently, so the recipient's device\n * showed no banner and played no sound.\n */\n silent?: boolean;\n deliveries?: MessageDelivery[];\n}",
722
+ "export interface Chat {\n id: UUID;\n display_name: string | null;\n group_chat_icon?: string | null;\n handles: ChatHandle[];\n is_group: boolean;\n /**\n * The caller's side of a message request on this Chat: `pending` while a\n * sender with no Contact edge to the caller wrote to them and they have not\n * answered, `accepted` or `deleted` once they have. Absent when the caller\n * was never asked; an agent never is.\n */\n created_at: string;\n updated_at: string;\n}",
723
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
724
+ "export interface MessageCreateResponse {\n from: string;\n chat_id: UUID;\n created_new_chat: boolean;\n is_group: boolean;\n handles: ChatHandle[];\n message: SentMessage;\n}",
725
+ "export type UUID = string;",
726
+ "export type ChatHandle = UserChatHandle | AgentChatHandle;",
727
+ "export interface UserChatHandle extends ChatHandleBase {\n kind: \"user\";\n}",
728
+ "export interface AgentChatHandle extends ChatHandleBase {\n kind: \"agent\";\n}",
729
+ "export interface SentMessage {\n id: UUID;\n parts: Array<TextPartResponse | MediaPartResponse | LinkPartResponse>;\n created_at: string;\n sent_at: string | null;\n delivered_at?: string | null;\n delivery_status: DeliveryStatus;\n from_handle?: ChatHandle | null;\n reply_to?: ReplyTo | null;\n /**\n * Whether the sender sent this Message silently, so the recipient's device\n * showed no banner and played no sound.\n */\n silent?: boolean;\n is_system_message: false;\n}",
730
+ "export interface TextPartResponse extends TextPart {\n mentions?: Array<{\n id: string;\n handle: string;\n is_me: boolean;\n range: [number, number];\n }> | null;\n /** @deprecated Use mentions instead. */\n mention?: string | null;\n /** @deprecated Use mentions instead. */\n mention_range?: [number, number] | null;\n reactions: Reaction[] | null;\n}",
731
+ "export interface MediaPartResponse {\n type: \"media\";\n id: UUID;\n url: string;\n filename: string;\n mime_type: string;\n size_bytes: number;\n duration_ms?: number | null;\n width?: number | null;\n height?: number | null;\n reactions: Reaction[] | null;\n}",
732
+ "export interface LinkPartResponse extends LinkPart {\n reactions: Reaction[] | null;\n}",
733
+ "export type DeliveryStatus =\n | \"sent\"\n | \"delivered\"\n | \"read\";"
734
+ ],
735
+ "requestBody": {
736
+ "required": true,
737
+ "content": {
738
+ "application/json": {
739
+ "schema": {
740
+ "$ref": "#/components/schemas/SendMessageRequest"
741
+ }
742
+ }
743
+ }
744
+ },
745
+ "executable": true,
746
+ "optionsIndex": 1
747
+ },
748
+ {
749
+ "method": "client.messages.listMessagesThread",
750
+ "signature": "client.messages.listMessagesThread(messageID: string, query: MessageThreadParams = {}, options?: RequestOptions): Promise<MessagesPage<Message>>",
751
+ "parameters": [
752
+ "messageID: string",
753
+ "query: MessageThreadParams = {}",
754
+ "options?: RequestOptions"
755
+ ],
756
+ "httpMethod": "GET",
757
+ "path": "/v1/messages/{messageId}/thread",
758
+ "operationId": "getMessageThread",
759
+ "summary": "Get all messages in a thread",
760
+ "description": "List a Message and its replies.",
761
+ "definitions": [
762
+ "export type MessageThreadParams = MessageListParams;",
763
+ "export interface MessageListParams {\n cursor?: string;\n limit?: number;\n /**\n * `asc` (default) lists oldest first; `desc` opens on the newest Messages\n * and pages toward older ones. A cursor is only valid with the order it\n * was returned for.\n */\n order?: \"asc\" | \"desc\";\n}",
764
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
765
+ "export interface Message {\n id: UUID;\n chat_id: UUID;\n from?: string | null;\n from_handle?: ChatHandle | null;\n parts?: MessagePartResponse[] | null;\n reply_to?: ReplyTo | null;\n is_system_message: boolean;\n system_event?: SystemEvent | null;\n is_from_me: boolean;\n delivery_status: DeliveryStatus;\n created_at: string;\n updated_at: string;\n sent_at?: string | null;\n delivered_at?: string | null;\n read_at?: string | null;\n /** When the Message was last edited, or null if it was never edited. */\n edited_at?: string | null;\n /**\n * When the sender unsent the Message, or null. An unsent Message keeps its\n * place in the transcript and carries no parts.\n */\n unsent_at?: string | null;\n /**\n * Whether the sender sent this Message silently, so the recipient's device\n * showed no banner and played no sound.\n */\n silent?: boolean;\n deliveries?: MessageDelivery[];\n}",
766
+ "export type UUID = string;",
767
+ "export type ChatHandle = UserChatHandle | AgentChatHandle;",
768
+ "export interface UserChatHandle extends ChatHandleBase {\n kind: \"user\";\n}",
769
+ "export interface AgentChatHandle extends ChatHandleBase {\n kind: \"agent\";\n}",
770
+ "export type MessagePartResponse =\n | TextPartResponse\n | MediaPartResponse\n | LinkPartResponse\n | SystemPartResponse;",
771
+ "export interface TextPartResponse extends TextPart {\n mentions?: Array<{\n id: string;\n handle: string;\n is_me: boolean;\n range: [number, number];\n }> | null;\n /** @deprecated Use mentions instead. */\n mention?: string | null;\n /** @deprecated Use mentions instead. */\n mention_range?: [number, number] | null;\n reactions: Reaction[] | null;\n}",
772
+ "export interface MediaPartResponse {\n type: \"media\";\n id: UUID;\n url: string;\n filename: string;\n mime_type: string;\n size_bytes: number;\n duration_ms?: number | null;\n width?: number | null;\n height?: number | null;\n reactions: Reaction[] | null;\n}",
773
+ "export interface LinkPartResponse extends LinkPart {\n reactions: Reaction[] | null;\n}",
774
+ "export interface SystemPartResponse {\n type: \"system\";\n value: string;\n reactions: null;\n}",
775
+ "export interface ReplyTo {\n message_id: UUID;\n part_index?: number;\n}",
776
+ "export interface SystemEvent {\n type: SystemEventType;\n actor: SystemEventParty;\n subject: SystemEventParty | null;\n value: string | null;\n icon_attachment_id: UUID | null;\n contact_card: ContactCardItem | null;\n}",
777
+ "export type SystemEventType =\n | \"chat_created\"\n | \"participant_added\"\n | \"participant_removed\"\n | \"group_name_updated\"\n | \"group_icon_updated\"\n | \"contact_card_shared\";",
778
+ "export interface SystemEventParty {\n id: UUID;\n handle: string;\n kind: \"user\" | \"agent\";\n}",
779
+ "export interface ContactCardItem {\n handle: string;\n first_name: string;\n last_name: string | null;\n image_url: string | null;\n is_active: boolean;\n kind: \"user\" | \"agent\";\n}",
780
+ "export type DeliveryStatus =\n | \"sent\"\n | \"delivered\"\n | \"read\";",
781
+ "export interface MessageDelivery {\n contact: ChatHandle;\n delivered_at: string | null;\n read_at: string | null;\n}"
782
+ ],
783
+ "requestBody": null,
784
+ "executable": true,
785
+ "optionsIndex": 2
786
+ },
787
+ {
788
+ "method": "client.messages.retrieve",
789
+ "signature": "client.messages.retrieve(messageID: string, options?: RequestOptions): Promise<Message>",
790
+ "parameters": [
791
+ "messageID: string",
792
+ "options?: RequestOptions"
793
+ ],
794
+ "httpMethod": "GET",
795
+ "path": "/v1/messages/{messageId}",
796
+ "operationId": "getMessage",
797
+ "summary": "Get a message by ID",
798
+ "description": "Retrieve one visible Message.",
799
+ "definitions": [
800
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
801
+ "export interface Message {\n id: UUID;\n chat_id: UUID;\n from?: string | null;\n from_handle?: ChatHandle | null;\n parts?: MessagePartResponse[] | null;\n reply_to?: ReplyTo | null;\n is_system_message: boolean;\n system_event?: SystemEvent | null;\n is_from_me: boolean;\n delivery_status: DeliveryStatus;\n created_at: string;\n updated_at: string;\n sent_at?: string | null;\n delivered_at?: string | null;\n read_at?: string | null;\n /** When the Message was last edited, or null if it was never edited. */\n edited_at?: string | null;\n /**\n * When the sender unsent the Message, or null. An unsent Message keeps its\n * place in the transcript and carries no parts.\n */\n unsent_at?: string | null;\n /**\n * Whether the sender sent this Message silently, so the recipient's device\n * showed no banner and played no sound.\n */\n silent?: boolean;\n deliveries?: MessageDelivery[];\n}",
802
+ "export type UUID = string;",
803
+ "export type ChatHandle = UserChatHandle | AgentChatHandle;",
804
+ "export interface UserChatHandle extends ChatHandleBase {\n kind: \"user\";\n}",
805
+ "export interface AgentChatHandle extends ChatHandleBase {\n kind: \"agent\";\n}",
806
+ "export type MessagePartResponse =\n | TextPartResponse\n | MediaPartResponse\n | LinkPartResponse\n | SystemPartResponse;",
807
+ "export interface TextPartResponse extends TextPart {\n mentions?: Array<{\n id: string;\n handle: string;\n is_me: boolean;\n range: [number, number];\n }> | null;\n /** @deprecated Use mentions instead. */\n mention?: string | null;\n /** @deprecated Use mentions instead. */\n mention_range?: [number, number] | null;\n reactions: Reaction[] | null;\n}",
808
+ "export interface MediaPartResponse {\n type: \"media\";\n id: UUID;\n url: string;\n filename: string;\n mime_type: string;\n size_bytes: number;\n duration_ms?: number | null;\n width?: number | null;\n height?: number | null;\n reactions: Reaction[] | null;\n}",
809
+ "export interface LinkPartResponse extends LinkPart {\n reactions: Reaction[] | null;\n}",
810
+ "export interface SystemPartResponse {\n type: \"system\";\n value: string;\n reactions: null;\n}",
811
+ "export interface ReplyTo {\n message_id: UUID;\n part_index?: number;\n}",
812
+ "export interface SystemEvent {\n type: SystemEventType;\n actor: SystemEventParty;\n subject: SystemEventParty | null;\n value: string | null;\n icon_attachment_id: UUID | null;\n contact_card: ContactCardItem | null;\n}",
813
+ "export type SystemEventType =\n | \"chat_created\"\n | \"participant_added\"\n | \"participant_removed\"\n | \"group_name_updated\"\n | \"group_icon_updated\"\n | \"contact_card_shared\";",
814
+ "export interface SystemEventParty {\n id: UUID;\n handle: string;\n kind: \"user\" | \"agent\";\n}",
815
+ "export interface ContactCardItem {\n handle: string;\n first_name: string;\n last_name: string | null;\n image_url: string | null;\n is_active: boolean;\n kind: \"user\" | \"agent\";\n}",
816
+ "export type DeliveryStatus =\n | \"sent\"\n | \"delivered\"\n | \"read\";",
817
+ "export interface MessageDelivery {\n contact: ChatHandle;\n delivered_at: string | null;\n read_at: string | null;\n}"
818
+ ],
819
+ "requestBody": null,
820
+ "executable": true,
821
+ "optionsIndex": 1
822
+ },
823
+ {
824
+ "method": "client.webhookEvents.list",
825
+ "signature": "client.webhookEvents.list(options?: RequestOptions): Promise<WebhookEventListResponse>",
826
+ "parameters": [
827
+ "options?: RequestOptions"
828
+ ],
829
+ "httpMethod": "GET",
830
+ "path": "/v1/webhook-events",
831
+ "operationId": "listWebhookEvents",
832
+ "summary": "List available webhook event types",
833
+ "description": "List event names available to agent backends.",
834
+ "definitions": [
835
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
836
+ "export interface WebhookEventListResponse {\n events: WebhookEventType[];\n doc_url: string;\n}",
837
+ "export type WebhookEventType = (typeof RELAY_WEBHOOK_EVENT_TYPES)[number];"
838
+ ],
839
+ "requestBody": null,
840
+ "executable": true,
841
+ "optionsIndex": 0
842
+ },
843
+ {
844
+ "method": "client.webhookSubscriptions.create",
845
+ "signature": "client.webhookSubscriptions.create(body: WebhookSubscriptionCreateParams, options?: RequestOptions): Promise<WebhookSubscriptionCreateResponse>",
846
+ "parameters": [
847
+ "body: WebhookSubscriptionCreateParams",
848
+ "options?: RequestOptions"
849
+ ],
850
+ "httpMethod": "POST",
851
+ "path": "/v1/webhook-subscriptions",
852
+ "operationId": "createWebhookSubscription",
853
+ "summary": "Create a new webhook subscription",
854
+ "description": "Create a signed webhook subscription.",
855
+ "definitions": [
856
+ "export interface WebhookSubscriptionCreateParams {\n target_url: string;\n subscribed_events: WebhookEventType[];\n}",
857
+ "export type WebhookEventType = (typeof RELAY_WEBHOOK_EVENT_TYPES)[number];",
858
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
859
+ "export interface WebhookSubscriptionCreateResponse\n extends WebhookSubscription {\n signing_secret: string;\n}",
860
+ "export interface WebhookSubscription {\n id: UUID;\n target_url: string;\n subscribed_events: WebhookEventType[];\n is_active: boolean;\n created_at: string;\n updated_at: string;\n}",
861
+ "export type UUID = string;"
862
+ ],
863
+ "requestBody": {
864
+ "required": true,
865
+ "content": {
866
+ "application/json": {
867
+ "schema": {
868
+ "$ref": "#/components/schemas/CreateWebhookSubscriptionRequest"
869
+ }
870
+ }
871
+ }
872
+ },
873
+ "executable": true,
874
+ "optionsIndex": 1
875
+ },
876
+ {
877
+ "method": "client.webhookSubscriptions.delete",
878
+ "signature": "client.webhookSubscriptions.delete(subscriptionID: string, options?: RequestOptions): Promise<void>",
879
+ "parameters": [
880
+ "subscriptionID: string",
881
+ "options?: RequestOptions"
882
+ ],
883
+ "httpMethod": "DELETE",
884
+ "path": "/v1/webhook-subscriptions/{subscriptionId}",
885
+ "operationId": "deleteWebhookSubscription",
886
+ "summary": "Delete a webhook subscription",
887
+ "description": "Delete a webhook subscription.",
888
+ "definitions": [
889
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}"
890
+ ],
891
+ "requestBody": null,
892
+ "executable": true,
893
+ "optionsIndex": 1
894
+ },
895
+ {
896
+ "method": "client.webhookSubscriptions.list",
897
+ "signature": "client.webhookSubscriptions.list(options?: RequestOptions): Promise<WebhookSubscriptionListResponse>",
898
+ "parameters": [
899
+ "options?: RequestOptions"
900
+ ],
901
+ "httpMethod": "GET",
902
+ "path": "/v1/webhook-subscriptions",
903
+ "operationId": "listWebhookSubscriptions",
904
+ "summary": "List all webhook subscriptions",
905
+ "description": "List webhook subscriptions for the authenticated agent.",
906
+ "definitions": [
907
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
908
+ "export interface WebhookSubscriptionListResponse {\n subscriptions: WebhookSubscription[];\n}",
909
+ "export interface WebhookSubscription {\n id: UUID;\n target_url: string;\n subscribed_events: WebhookEventType[];\n is_active: boolean;\n created_at: string;\n updated_at: string;\n}",
910
+ "export type UUID = string;",
911
+ "export type WebhookEventType = (typeof RELAY_WEBHOOK_EVENT_TYPES)[number];"
912
+ ],
913
+ "requestBody": null,
914
+ "executable": true,
915
+ "optionsIndex": 0
916
+ },
917
+ {
918
+ "method": "client.webhookSubscriptions.retrieve",
919
+ "signature": "client.webhookSubscriptions.retrieve(subscriptionID: string, options?: RequestOptions): Promise<WebhookSubscription>",
920
+ "parameters": [
921
+ "subscriptionID: string",
922
+ "options?: RequestOptions"
923
+ ],
924
+ "httpMethod": "GET",
925
+ "path": "/v1/webhook-subscriptions/{subscriptionId}",
926
+ "operationId": "getWebhookSubscription",
927
+ "summary": "Get a webhook subscription by ID",
928
+ "description": "Retrieve one webhook subscription.",
929
+ "definitions": [
930
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
931
+ "export interface WebhookSubscription {\n id: UUID;\n target_url: string;\n subscribed_events: WebhookEventType[];\n is_active: boolean;\n created_at: string;\n updated_at: string;\n}",
932
+ "export type UUID = string;",
933
+ "export type WebhookEventType = (typeof RELAY_WEBHOOK_EVENT_TYPES)[number];"
934
+ ],
935
+ "requestBody": null,
936
+ "executable": true,
937
+ "optionsIndex": 1
938
+ },
939
+ {
940
+ "method": "client.webhookSubscriptions.update",
941
+ "signature": "client.webhookSubscriptions.update(subscriptionID: string, body: WebhookSubscriptionUpdateParams, options?: RequestOptions): Promise<WebhookSubscription>",
942
+ "parameters": [
943
+ "subscriptionID: string",
944
+ "body: WebhookSubscriptionUpdateParams",
945
+ "options?: RequestOptions"
946
+ ],
947
+ "httpMethod": "PUT",
948
+ "path": "/v1/webhook-subscriptions/{subscriptionId}",
949
+ "operationId": "updateWebhookSubscription",
950
+ "summary": "Update a webhook subscription",
951
+ "description": "Replace a webhook subscription's settings.",
952
+ "definitions": [
953
+ "export interface WebhookSubscriptionUpdateParams {\n target_url?: string;\n subscribed_events?: WebhookEventType[];\n is_active?: boolean;\n}",
954
+ "export type WebhookEventType = (typeof RELAY_WEBHOOK_EVENT_TYPES)[number];",
955
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
956
+ "export interface WebhookSubscription {\n id: UUID;\n target_url: string;\n subscribed_events: WebhookEventType[];\n is_active: boolean;\n created_at: string;\n updated_at: string;\n}",
957
+ "export type UUID = string;"
958
+ ],
959
+ "requestBody": {
960
+ "required": true,
961
+ "content": {
962
+ "application/json": {
963
+ "schema": {
964
+ "$ref": "#/components/schemas/UpdateWebhookSubscriptionRequest"
965
+ }
966
+ }
967
+ }
968
+ },
969
+ "executable": true,
970
+ "optionsIndex": 2
971
+ },
972
+ {
973
+ "method": "Relay.createAgent",
974
+ "signature": "Relay.createAgent(body: AgentCreateParams = {}, options: AgentCreateOptions = {}): Promise<AgentCreateResponse>",
975
+ "parameters": [
976
+ "body: AgentCreateParams = {}",
977
+ "options: AgentCreateOptions = {}"
978
+ ],
979
+ "httpMethod": "POST",
980
+ "path": "/v1/agents",
981
+ "operationId": "createAgent",
982
+ "summary": "Create an agent",
983
+ "description": "Create a developer-managed agent with an optional chosen `.dev` Handle,\ndisplay name, and image. Omitted Handle and display name use an adjective\nand bird: the Handle uses the bird's taxonomy ID, while the display name\nuses its readable name. A color can resolve a generated-name collision.\nAn explicitly chosen Handle is never silently replaced: an occupied\nHandle returns 409. Omitted image uses a handle-deterministic monogram recipe and its rendered PNG.\n\nSave the returned Agent Token securely before connecting the\nexisting agent code. This request creates a messaging identity; it does\nnot start a model or run agent code.\n\nThis bootstrap request does not require a bearer token. It is limited\nto 10 creations per caller address per day. On 429, respect Retry-After.\nEach successful request creates a new identity and returns its token\nonce. Do not automatically retry an uncertain creation response.",
984
+ "definitions": [
985
+ "export type AgentCreateParams = AgentCreateProfileParams & (\n | { image_url?: string; image_recipe?: never }\n | { image_url: string; image_recipe: AgentImageRecipe }\n);",
986
+ "export interface AgentCreateProfileParams {\n /** Server contract 3097dda: trimmed about text, 1 to 60 characters. */\n about?: string;\n token_name?: string;\n /** Full lowercase developer handle, including .dev. */\n handle?: string;\n /** Display name; the server trims surrounding whitespace. */\n first_name?: string;\n}",
987
+ "export type AgentImageRecipe = AgentMonogramImageRecipe | AgentEmojiImageRecipe | AgentPhotoImageRecipe;",
988
+ "export interface AgentMonogramImageRecipe {\n recipe: { monogram: { initials: string }; emoji?: never; image?: never };\n background: AgentImageBackground;\n}",
989
+ "export interface AgentEmojiImageRecipe {\n recipe: { emoji: { emoji: string }; monogram?: never; image?: never };\n background: AgentImageBackground;\n}",
990
+ "export interface AgentPhotoImageRecipe {\n recipe: { image: Record<string, never>; monogram?: never; emoji?: never };\n background?: never;\n}",
991
+ "export type AgentCreateOptions = Omit<RelayOptions, \"apiKey\" | \"webhookSecret\"> & RequestOptions;",
992
+ "export interface RelayOptions {\n apiKey: string;\n baseURL?: string;\n webhookSecret?: string | null;\n maxRetries?: number;\n timeout?: number;\n retryBaseDelayMs?: number;\n fetch?: FetchLike;\n}",
993
+ "type FetchLike = (\n input: string | URL | Request,\n init?: RequestInit,\n) => Promise<Response>;",
994
+ "export interface RequestOptions {\n signal?: AbortSignal;\n timeout?: number;\n maxRetries?: number;\n headers?: HeadersInit;\n}",
995
+ "export interface AgentCreateResponse {\n agent: ContactCardItem;\n secret: string;\n share_url: string;\n}",
996
+ "export interface ContactCardItem {\n handle: string;\n first_name: string;\n last_name: string | null;\n image_url: string | null;\n is_active: boolean;\n kind: \"user\" | \"agent\";\n}"
997
+ ],
998
+ "requestBody": {
999
+ "required": true,
1000
+ "content": {
1001
+ "application/json": {
1002
+ "schema": {
1003
+ "$ref": "#/components/schemas/CreateAgentRequest"
1004
+ },
1005
+ "example": {
1006
+ "token_name": "Relay CLI"
1007
+ }
1008
+ }
1009
+ }
1010
+ },
1011
+ "executable": false,
1012
+ "optionsIndex": -1
1013
+ }
1014
+ ];
1015
+ //# sourceMappingURL=generated-docs.js.map