@blazingagents/sdk 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/README.md +17 -1
  2. package/dist/approvals.d.ts +4 -12
  3. package/dist/approvals.js +12 -13
  4. package/dist/chat-transport.d.ts +18 -1
  5. package/dist/chat-transport.js +16 -0
  6. package/dist/client.d.ts +28 -5
  7. package/dist/client.js +39 -7
  8. package/dist/contracts/api.d.ts +40 -6
  9. package/dist/contracts/api.js +30 -2
  10. package/dist/contracts/entities/agent-tools.d.ts +5 -2
  11. package/dist/contracts/entities/agent-tools.js +5 -2
  12. package/dist/contracts/entities/agents.d.ts +4 -0
  13. package/dist/contracts/entities/agents.js +9 -0
  14. package/dist/contracts/entities/chat.d.ts +11 -10
  15. package/dist/contracts/entities/chat.js +11 -7
  16. package/dist/contracts/entities/mcp-connections.d.ts +3 -1
  17. package/dist/contracts/entities/mcp-connections.js +3 -1
  18. package/dist/contracts/entities/prompts.d.ts +13 -0
  19. package/dist/contracts/entities/prompts.js +13 -0
  20. package/dist/contracts/entities/session-inputs.d.ts +29 -87
  21. package/dist/contracts/entities/session-inputs.js +21 -19
  22. package/dist/contracts/entities/sessions.d.ts +27 -17
  23. package/dist/contracts/entities/sessions.js +23 -8
  24. package/dist/contracts/entities/skills.d.ts +3 -0
  25. package/dist/contracts/entities/skills.js +3 -0
  26. package/dist/contracts/entities/tasks.d.ts +1 -0
  27. package/dist/contracts/entities/usage.d.ts +4 -1
  28. package/dist/contracts/entities/usage.js +7 -1
  29. package/dist/contracts/entities/workspaces.d.ts +17 -6
  30. package/dist/contracts/entities/workspaces.js +3 -7
  31. package/dist/contracts/ids.d.ts +31 -0
  32. package/dist/contracts/ids.js +34 -0
  33. package/dist/contracts/index.d.ts +7 -6
  34. package/dist/contracts/index.js +4 -4
  35. package/dist/contracts/utils.d.ts +10 -0
  36. package/dist/contracts/utils.js +10 -0
  37. package/dist/direct-chat-transport.d.ts +30 -3
  38. package/dist/direct-chat-transport.js +40 -35
  39. package/dist/errors.d.ts +9 -0
  40. package/dist/errors.js +9 -0
  41. package/dist/functions.d.ts +35 -2
  42. package/dist/functions.js +60 -4
  43. package/dist/generation.d.ts +34 -2
  44. package/dist/generation.js +97 -19
  45. package/dist/http.d.ts +26 -0
  46. package/dist/http.js +43 -0
  47. package/dist/index.d.ts +4 -4
  48. package/dist/relay.d.ts +26 -3
  49. package/dist/relay.js +25 -10
  50. package/dist/resources/agents.d.ts +5 -0
  51. package/dist/resources/agents.js +38 -0
  52. package/dist/resources/artifacts.d.ts +2 -0
  53. package/dist/resources/artifacts.js +14 -0
  54. package/dist/resources/chat-connections.d.ts +5 -0
  55. package/dist/resources/chat-connections.js +32 -0
  56. package/dist/resources/chat-deliveries.d.ts +2 -0
  57. package/dist/resources/chat-deliveries.js +5 -0
  58. package/dist/resources/mcp-connections.d.ts +5 -0
  59. package/dist/resources/mcp-connections.js +26 -0
  60. package/dist/resources/memories.d.ts +2 -0
  61. package/dist/resources/memories.js +17 -0
  62. package/dist/resources/merchant-bindings.d.ts +2 -0
  63. package/dist/resources/merchant-bindings.js +11 -0
  64. package/dist/resources/merchant-connection.d.ts +2 -0
  65. package/dist/resources/merchant-connection.js +14 -0
  66. package/dist/resources/merchant-usage-events.d.ts +2 -0
  67. package/dist/resources/merchant-usage-events.js +20 -0
  68. package/dist/resources/prompts.d.ts +5 -0
  69. package/dist/resources/prompts.js +20 -0
  70. package/dist/resources/providers.d.ts +2 -0
  71. package/dist/resources/providers.js +23 -0
  72. package/dist/resources/sessions.d.ts +2 -0
  73. package/dist/resources/sessions.js +42 -39
  74. package/dist/resources/skills.d.ts +5 -0
  75. package/dist/resources/skills.js +35 -0
  76. package/dist/resources/tasks.d.ts +2 -0
  77. package/dist/resources/tasks.js +32 -0
  78. package/dist/resources/tenant.d.ts +2 -0
  79. package/dist/resources/tenant.js +8 -0
  80. package/dist/resources/usage.d.ts +2 -0
  81. package/dist/resources/usage.js +14 -0
  82. package/dist/resources/workspaces.d.ts +5 -0
  83. package/dist/resources/workspaces.js +20 -0
  84. package/dist/types.d.ts +691 -48
  85. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -9,8 +9,8 @@ import type { CreateMemoryBody, MemoriesListResponse, MemoryResponse, UpdateMemo
9
9
  import type { CreateMerchantConnectionBody, MerchantBindingResponse, MerchantBindingsResponse, MerchantConnectionResponse, MerchantUsageEventResponse, MerchantUsageEventStatus, MerchantUsageEventsResponse, MerchantUsageSummaryResponse, UpdateMerchantConnectionBody, UpsertMerchantBindingBody } from "./contracts/entities/merchant.ts";
10
10
  import type { CreatePromptBody, PromptResponse, PromptsResponse, UpdatePromptBody } from "./contracts/entities/prompts.ts";
11
11
  import type { CreateProviderBody, DeleteProviderOptions, ProviderModelsResponse, ProviderResponse, ProvidersResponse, ThinkingLevelsResponse, UpdateProviderBody } from "./contracts/entities/providers.ts";
12
- import type { ResumeSessionInputsResponse, SessionInputResponse, SessionInputsQuery, SessionInputsResponse, StopSessionBody, StopSessionResponse, SubmitSessionInputBody } from "./contracts/entities/session-inputs.ts";
13
- import type { DecideToolApprovalBody, LatestSessionsListResponse, SessionMessagesResponse, SessionResponse, SessionsListResponse, ToolApprovalDecisionResponse, ToolApprovalsResponse } from "./contracts/entities/sessions.ts";
12
+ import type { SessionInputResponse, SessionInputsQuery, SessionInputsResponse, StopSessionBody, StopSessionResponse, SubmitSessionInputBody } from "./contracts/entities/session-inputs.ts";
13
+ import type { LatestSessionsListResponse, SessionMessagesResponse, SessionResponse, SessionsListResponse, ToolApprovalDecision, ToolApprovalsResponse } from "./contracts/entities/sessions.ts";
14
14
  import type { CreateSkillBody, SkillArchiveType, SkillCopyResults, SkillDetail, SkillsListResponse } from "./contracts/entities/skills.ts";
15
15
  import type { CreateTaskBody, CreateTaskResponse, CreateTaskRunBody, CreateTaskRunResponse, TaskResponse, TaskRunMessagesResponse, TaskRunResponse, TaskRunsListResponse, TasksListResponse, UpdateTaskBody } from "./contracts/entities/tasks.ts";
16
16
  import type { TenantSettingsResponse, UpdateTenantSettingsBody } from "./contracts/entities/tenants.ts";
@@ -61,20 +61,50 @@ export interface BlazingAgentsRequestOptions {
61
61
  clientRequestId: string;
62
62
  }
63
63
  export interface UserClient {
64
+ /**
65
+ * Returns the Skill operations for the selected Agent.
66
+ * @param input - `agentId`.
67
+ * @returns The selected Agent Skill client.
68
+ */
64
69
  agent(input: {
65
70
  agentId: string;
66
71
  }): AgentClient;
67
72
  readonly agents: AgentsResource;
68
73
  readonly artifacts: ArtifactsResource;
74
+ /**
75
+ * Creates or resumes a Session and returns its SSE stream and Session ID.
76
+ * @param input - Agent, message or stored Prompt, and optional existing Session.
77
+ * @returns The Session ID promise and single-owner SSE accessors.
78
+ */
69
79
  chat(input: ChatInput): Promise<ChatResult>;
80
+ /**
81
+ * Starts stateless text generation with independent final, incremental, and response outputs.
82
+ * @param input - Agent and literal prompt or stored Prompt reference.
83
+ * @returns Independent text stream, final text promise, and response relay.
84
+ */
70
85
  completion(input: CompletionInput): Promise<CompletionResult>;
86
+ /**
87
+ * Submits a complete Tool approval round and streams its continuation.
88
+ * @param input - Agent, Session, and decisions for the complete approval round.
89
+ * @returns The Session ID promise and continuation SSE accessors.
90
+ */
91
+ continueChat(input: ContinueChatInput): Promise<ChatResult>;
71
92
  readonly memories: MemoriesResource;
93
+ /**
94
+ * Starts stateless JSON generation with partial objects and a final parsed value.
95
+ * @param input - Agent, prompt source, and JSON output schema.
96
+ * @returns Partial JSON objects, a final JSON promise, and a text response relay.
97
+ */
72
98
  object(input: ObjectInput): Promise<ObjectResult>;
73
99
  readonly prompts: PromptsResource;
74
- resumeChat(input: ResumeChatInput): Promise<ChatResult>;
75
100
  readonly sessions: SessionsResource;
76
101
  readonly tasks: TasksResource;
77
102
  readonly usage: Pick<UsageResource, "get" | "sessions">;
103
+ /**
104
+ * Creates a client view with the supplied request correlation ID.
105
+ * @param options - Caller-owned request correlation ID for subsequent calls.
106
+ * @returns A new client carrying the supplied correlation ID.
107
+ */
78
108
  withOptions(options: BlazingAgentsRequestOptions): UserClient;
79
109
  readonly workspaces: WorkspacesResource;
80
110
  }
@@ -117,6 +147,7 @@ interface ChatMessageContentInput extends AttributionInput, CorrelatedRequestInp
117
147
  functions?: ChatFunctions;
118
148
  message: UIMessage;
119
149
  messageId?: string;
150
+ messages?: never;
120
151
  promptId?: never;
121
152
  variables?: never;
122
153
  }
@@ -127,19 +158,23 @@ interface ChatPromptContentInput extends AttributionInput, CorrelatedRequestInpu
127
158
  functions?: ChatFunctions;
128
159
  message?: never;
129
160
  messageId?: string;
161
+ messages?: never;
130
162
  promptId: string;
131
163
  variables?: Record<string, string>;
132
164
  }
133
165
  export type ChatMessageInput = ChatMessageContentInput & ChatSessionInput;
134
166
  export type ChatPromptInput = ChatPromptContentInput & ChatSessionInput;
135
- export type ChatInput = ChatMessageInput | ChatPromptInput;
136
- /** Reattaches handlers to a Session's tool-approval continuation. */
137
- export interface ResumeChatInput extends CorrelatedRequestInput {
167
+ export type ChatMessagesInput = Omit<ChatMessageContentInput, "message" | "messages"> & {
168
+ message?: never;
169
+ messages: UIMessage[];
170
+ } & ChatSessionInput;
171
+ export type ChatInput = ChatMessageInput | ChatMessagesInput | ChatPromptInput;
172
+ /** Records the complete approval round and streams the continuation. */
173
+ export interface ContinueChatInput extends CorrelatedRequestInput {
138
174
  abortSignal?: AbortSignal;
139
175
  agentId: string;
140
- /** The decided continuation; omitted, the Session's queued or running one is resumed. */
141
- continuationId?: string;
142
- functions: ChatFunctions;
176
+ decisions: ToolApprovalDecision[];
177
+ functions?: ChatFunctions;
143
178
  sessionId: string;
144
179
  }
145
180
  export interface ChatResult {
@@ -151,14 +186,32 @@ export interface ChatResult {
151
186
  * resume.
152
187
  */
153
188
  sessionId: Promise<string>;
189
+ /**
190
+ * Claims the response relay once and returns its HTTP response.
191
+ * @returns The response relay.
192
+ * @throws BlazingAgentsError - If the response body has already been claimed.
193
+ */
154
194
  toResponse: () => Response;
155
- /** Claims the SSE bytes once, without constructing a Response. Shares ownership with toResponse(). */
195
+ /**
196
+ * Claims the SSE bytes once, without constructing a Response. Shares ownership with toResponse().
197
+ * @returns The SSE byte stream.
198
+ * @throws BlazingAgentsError - If the response body has already been claimed.
199
+ */
156
200
  toStream: () => ReadableStream<Uint8Array>;
157
201
  }
158
202
  export interface TerminalStreamResult {
159
203
  requestId?: string;
204
+ /**
205
+ * Claims the response relay once and returns its HTTP response.
206
+ * @returns The response relay.
207
+ * @throws BlazingAgentsError - If the response body has already been claimed.
208
+ */
160
209
  toResponse: () => Response;
161
- /** Claims the SSE bytes once, without constructing a Response. Shares ownership with toResponse(). */
210
+ /**
211
+ * Claims the SSE bytes once, without constructing a Response. Shares ownership with toResponse().
212
+ * @returns The SSE byte stream.
213
+ * @throws BlazingAgentsError - If the response body has already been claimed.
214
+ */
162
215
  toStream: () => ReadableStream<Uint8Array>;
163
216
  }
164
217
  type StatelessGenerationInput = AttributionInput & CorrelatedRequestInput;
@@ -183,6 +236,11 @@ export interface CompletionResult {
183
236
  requestId?: string;
184
237
  text: Promise<string>;
185
238
  textStream: AsyncIterable<string>;
239
+ /**
240
+ * Claims the response relay once and returns its HTTP response.
241
+ * @returns The response relay.
242
+ * @throws BlazingAgentsError - If the response body has already been claimed.
243
+ */
186
244
  toResponse: () => Response;
187
245
  }
188
246
  export interface ObjectPromptInput extends StatelessGenerationInput {
@@ -206,43 +264,111 @@ export interface ObjectResult {
206
264
  object: Promise<unknown>;
207
265
  partialObjectStream: AsyncIterable<unknown>;
208
266
  requestId?: string;
267
+ /**
268
+ * Claims the response relay once and returns its HTTP response.
269
+ * @returns The response relay.
270
+ * @throws BlazingAgentsError - If the response body has already been claimed.
271
+ */
209
272
  toResponse: () => Response;
210
273
  }
211
274
  export interface ResourceRequestOptions {
212
275
  abortSignal?: AbortSignal;
213
276
  }
214
277
  export interface AgentsResource {
215
- /** Omitting `workspaceId` attaches a default Workspace with a lazy runtime. */
278
+ /**
279
+ * Creates the Agent. Omitting `workspaceId` creates a Core Workspace by default. `workspaceTier` selects its immutable tier and conflicts with `workspaceId`.
280
+ * @param input - creation fields; optional abortSignal.
281
+ * @returns The agent.
282
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
283
+ */
216
284
  create(input: CreateAgentBody & ResourceRequestOptions): Promise<Agent>;
217
- /** Deletes the Agent while preserving its attached Workspace. */
285
+ /**
286
+ * Deletes the Agent while preserving its attached Workspace.
287
+ * @param input - `agentId`; optional abortSignal; includeArtifacts controls Artifact deletion.
288
+ * @returns Resolves when the operation completes.
289
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
290
+ */
218
291
  delete(input: {
219
292
  agentId: string;
220
293
  includeArtifacts: boolean;
221
294
  } & ResourceRequestOptions): Promise<void>;
295
+ /**
296
+ * Disables the Agent.
297
+ * @param input - `agentId`; optional abortSignal.
298
+ * @returns The agent.
299
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
300
+ */
222
301
  disable(input: {
223
302
  agentId: string;
224
303
  } & ResourceRequestOptions): Promise<Agent>;
304
+ /**
305
+ * Enables the Agent.
306
+ * @param input - `agentId`; optional abortSignal.
307
+ * @returns The agent.
308
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
309
+ */
225
310
  enable(input: {
226
311
  agentId: string;
227
312
  } & ResourceRequestOptions): Promise<Agent>;
313
+ /**
314
+ * Retrieves the Agent.
315
+ * @param input - `agentId`; optional abortSignal.
316
+ * @returns The agent.
317
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
318
+ */
228
319
  get(input: {
229
320
  agentId: string;
230
321
  } & ResourceRequestOptions): Promise<Agent>;
322
+ /**
323
+ * Lists available Agent records.
324
+ * @param input - filters and pagination options.
325
+ * @returns Matching Agents. This response has no pagination cursor.
326
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
327
+ */
231
328
  list(input?: AgentsListOptions): Promise<AgentsResponse>;
329
+ /**
330
+ * Lists the Agent MCP attachments.
331
+ * @param input - `agentId`; optional abortSignal.
332
+ * @returns The mcp attachments response.
333
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
334
+ */
232
335
  listMcpAttachments(input: {
233
336
  agentId: string;
234
337
  } & ResourceRequestOptions): Promise<McpAttachmentsResponse>;
338
+ /**
339
+ * Removes the Agent avatar.
340
+ * @param input - `agentId`; optional abortSignal.
341
+ * @returns The agent.
342
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
343
+ */
235
344
  removeAvatar(input: {
236
345
  agentId: string;
237
346
  } & ResourceRequestOptions): Promise<Agent>;
238
- /** A concrete `workspaceId` switches the Agent; detachment is unsupported. */
347
+ /**
348
+ * Updates the Agent. A concrete `workspaceId` switches the Agent; detachment is unsupported.
349
+ * @param input - `agentId`; fields to change; optional abortSignal.
350
+ * @returns The agent.
351
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
352
+ */
239
353
  update(input: UpdateAgentBody & {
240
354
  agentId: string;
241
355
  } & ResourceRequestOptions): Promise<Agent>;
356
+ /**
357
+ * Updates one Agent MCP attachment.
358
+ * @param input - `agentId`, `mcpConnectionId`; fields to change; optional abortSignal.
359
+ * @returns The mcp attachment response.
360
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
361
+ */
242
362
  updateMcpAttachment(input: UpdateMcpAttachmentBody & {
243
363
  agentId: string;
244
364
  mcpConnectionId: string;
245
365
  } & ResourceRequestOptions): Promise<McpAttachmentResponse>;
366
+ /**
367
+ * Uploads an Agent avatar as multipart form data.
368
+ * @param input - Target `agentId`, image `file`, and optional abortSignal.
369
+ * @returns The agent.
370
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
371
+ */
246
372
  uploadAvatar(input: {
247
373
  agentId: string;
248
374
  file: File;
@@ -258,14 +384,44 @@ export interface AgentsListOptions extends ResourceRequestOptions {
258
384
  workspaceId?: string;
259
385
  }
260
386
  export interface WorkspacesResource {
387
+ /**
388
+ * Creates the Workspace.
389
+ * @param input - creation fields; optional abortSignal.
390
+ * @returns The workspace.
391
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
392
+ */
261
393
  create(input?: CreateWorkspaceBody & ResourceRequestOptions): Promise<Workspace>;
394
+ /**
395
+ * Deletes the Workspace.
396
+ * @param input - `workspaceId`; optional abortSignal.
397
+ * @returns "pending" while deletion is underway, otherwise "completed".
398
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
399
+ */
262
400
  delete(input: {
263
401
  workspaceId: string;
264
402
  } & ResourceRequestOptions): Promise<"completed" | "pending">;
403
+ /**
404
+ * Retrieves the Workspace.
405
+ * @param input - `workspaceId`; optional abortSignal.
406
+ * @returns The workspace.
407
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
408
+ */
265
409
  get(input: {
266
410
  workspaceId: string;
267
411
  } & ResourceRequestOptions): Promise<Workspace>;
412
+ /**
413
+ * Lists one page of Workspace records.
414
+ * @param input - filters and pagination options.
415
+ * @returns The workspaces list response.
416
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
417
+ */
268
418
  list(input?: WorkspacesListOptions): Promise<WorkspacesListResponse>;
419
+ /**
420
+ * Updates the Workspace.
421
+ * @param input - `workspaceId`; fields to change; optional abortSignal.
422
+ * @returns The workspace.
423
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
424
+ */
269
425
  update(input: UpdateWorkspaceBody & {
270
426
  workspaceId: string;
271
427
  } & ResourceRequestOptions): Promise<Workspace>;
@@ -281,32 +437,85 @@ export interface ArtifactsListOptions extends ResourceRequestOptions {
281
437
  sessionId?: string;
282
438
  }
283
439
  export interface ArtifactsResource {
440
+ /**
441
+ * Creates a temporary Artifact download URL.
442
+ * @param input - `artifactId`; optional abortSignal.
443
+ * @returns The artifact download url response.
444
+ */
284
445
  createDownloadUrl(input: {
285
446
  artifactId: string;
286
447
  } & ResourceRequestOptions): Promise<ArtifactDownloadUrlResponse>;
448
+ /**
449
+ * Deletes the Artifact.
450
+ * @param input - `artifactId`; optional abortSignal.
451
+ * @returns Resolves when the operation completes.
452
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
453
+ */
287
454
  delete(input: {
288
455
  artifactId: string;
289
456
  } & ResourceRequestOptions): Promise<void>;
457
+ /**
458
+ * Retrieves the Artifact.
459
+ * @param input - `artifactId`; optional abortSignal.
460
+ * @returns The artifact list item.
461
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
462
+ */
290
463
  get(input: {
291
464
  artifactId: string;
292
465
  } & ResourceRequestOptions): Promise<ArtifactListItem>;
466
+ /**
467
+ * Lists one page of Artifact records.
468
+ * @param input - filters and pagination options.
469
+ * @returns The artifacts list response.
470
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
471
+ */
293
472
  list(input?: ArtifactsListOptions): Promise<ArtifactsListResponse>;
294
473
  }
295
474
  export interface MemoriesResource {
475
+ /**
476
+ * Creates the Memory.
477
+ * @param input - `agentId`; creation fields; optional abortSignal.
478
+ * @returns The memory response.
479
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
480
+ */
296
481
  create(input: CreateMemoryBody & {
297
482
  agentId: string;
298
483
  } & ResourceRequestOptions): Promise<MemoryResponse>;
484
+ /**
485
+ * Deletes the Memory.
486
+ * @param input - `agentId`, `memoryId`; optional abortSignal.
487
+ * @returns Resolves when the operation completes.
488
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
489
+ */
299
490
  delete(input: {
300
491
  agentId: string;
301
492
  memoryId: string;
302
493
  } & ResourceRequestOptions): Promise<void>;
494
+ /**
495
+ * Retrieves the Memory.
496
+ * @param input - `agentId`, `memoryId`; optional abortSignal.
497
+ * @returns The memory response.
498
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
499
+ */
303
500
  get(input: {
304
501
  agentId: string;
305
502
  memoryId: string;
306
503
  } & ResourceRequestOptions): Promise<MemoryResponse>;
504
+ /**
505
+ * Lists one page of Memory records.
506
+ * @param input - `agentId`; filters and pagination options.
507
+ * @returns The memories list response.
508
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
509
+ */
307
510
  list(input: {
308
511
  agentId: string;
309
512
  } & MemoriesListOptions): Promise<MemoriesListResponse>;
513
+ /**
514
+ * Updates the Memory.
515
+ * @param input - `agentId`, `memoryId`; fields to change; optional abortSignal.
516
+ * @returns The memory response.
517
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
518
+ */
310
519
  update(input: UpdateMemoryBody & {
311
520
  agentId: string;
312
521
  memoryId: string;
@@ -319,61 +528,181 @@ export interface MemoriesListOptions extends ResourceRequestOptions {
319
528
  userId?: string;
320
529
  }
321
530
  export interface PromptsResource {
531
+ /**
532
+ * Creates the Prompt.
533
+ * @param input - creation fields; optional abortSignal.
534
+ * @returns The prompt response.
535
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
536
+ */
322
537
  create(input: CreatePromptBody & ResourceRequestOptions): Promise<PromptResponse>;
538
+ /**
539
+ * Deletes the Prompt.
540
+ * @param input - `promptId`; optional abortSignal.
541
+ * @returns Resolves when the operation completes.
542
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
543
+ */
323
544
  delete(input: {
324
545
  promptId: string;
325
546
  } & ResourceRequestOptions): Promise<void>;
547
+ /**
548
+ * Retrieves the Prompt.
549
+ * @param input - `promptId`; optional abortSignal.
550
+ * @returns The prompt response.
551
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
552
+ */
326
553
  get(input: {
327
554
  promptId: string;
328
555
  } & ResourceRequestOptions): Promise<PromptResponse>;
556
+ /**
557
+ * Lists one page of Prompt records.
558
+ * @param input - `userId`, `agentId`; filters and pagination options; optional abortSignal.
559
+ * @returns The prompts response.
560
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
561
+ */
329
562
  list(input?: {
330
563
  userId?: string;
331
564
  agentId?: string;
332
565
  cursor?: string;
333
566
  limit?: number;
334
567
  } & ResourceRequestOptions): Promise<PromptsResponse>;
568
+ /**
569
+ * Updates the Prompt.
570
+ * @param input - `promptId`; fields to change; optional abortSignal.
571
+ * @returns The prompt response.
572
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
573
+ */
335
574
  update(input: UpdatePromptBody & {
336
575
  promptId: string;
337
576
  } & ResourceRequestOptions): Promise<PromptResponse>;
338
577
  }
339
578
  export interface ProvidersResource {
579
+ /**
580
+ * Creates the Provider.
581
+ * @param input - creation fields; optional abortSignal.
582
+ * @returns The provider response.
583
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
584
+ */
340
585
  create(input: CreateProviderBody & ResourceRequestOptions): Promise<ProviderResponse>;
586
+ /**
587
+ * Deletes the Provider.
588
+ * @param input - `providerId`; optional abortSignal.
589
+ * @returns Resolves when the operation completes.
590
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
591
+ */
341
592
  delete(input: DeleteProviderOptions & {
342
593
  providerId: string;
343
594
  } & ResourceRequestOptions): Promise<void>;
595
+ /**
596
+ * Retrieves the Provider.
597
+ * @param input - `providerId`; optional abortSignal.
598
+ * @returns The provider response.
599
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
600
+ */
344
601
  get(input: {
345
602
  providerId: string;
346
603
  } & ResourceRequestOptions): Promise<ProviderResponse>;
604
+ /**
605
+ * Retrieves supported thinking levels for a Provider model.
606
+ * @param input - `providerId`, provider-specific `model` name, and optional abortSignal.
607
+ * @returns The thinking levels response.
608
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
609
+ */
347
610
  getThinkingLevels(input: {
348
611
  providerId: string;
349
612
  model: string;
350
613
  } & ResourceRequestOptions): Promise<ThinkingLevelsResponse>;
614
+ /**
615
+ * Lists available Provider records.
616
+ * @param input - optional abortSignal.
617
+ * @returns The providers response.
618
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
619
+ */
351
620
  list(input?: ResourceRequestOptions): Promise<ProvidersResponse>;
621
+ /**
622
+ * Lists models exposed by the Provider.
623
+ * @param input - `providerId`; optional abortSignal.
624
+ * @returns The provider models response.
625
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
626
+ */
352
627
  listModels(input: {
353
628
  providerId: string;
354
629
  } & ResourceRequestOptions): Promise<ProviderModelsResponse>;
630
+ /**
631
+ * Updates the Provider.
632
+ * @param input - `providerId`; fields to change; optional abortSignal.
633
+ * @returns The provider response.
634
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
635
+ */
355
636
  update(input: UpdateProviderBody & {
356
637
  providerId: string;
357
638
  } & ResourceRequestOptions): Promise<ProviderResponse>;
358
639
  }
359
640
  export interface McpConnectionsResource {
641
+ /**
642
+ * Starts OAuth authorization for the MCP Connection.
643
+ * @param input - `mcpConnectionId`; optional abortSignal.
644
+ * @returns The mcp connection oauth connect response.
645
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
646
+ */
360
647
  connect(input: {
361
648
  mcpConnectionId: string;
362
649
  } & ResourceRequestOptions): Promise<McpConnectionOauthConnectResponse>;
650
+ /**
651
+ * Creates the MCP Connection.
652
+ * @param input - creation fields; optional abortSignal.
653
+ * @returns The mcp connection response.
654
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
655
+ */
363
656
  create(input: CreateMcpConnectionBody & ResourceRequestOptions): Promise<McpConnectionResponse>;
657
+ /**
658
+ * Deletes the MCP Connection.
659
+ * @param input - `mcpConnectionId`; optional abortSignal.
660
+ * @returns Resolves when the operation completes.
661
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
662
+ */
364
663
  delete(input: {
365
664
  mcpConnectionId: string;
366
665
  } & ResourceRequestOptions): Promise<void>;
666
+ /**
667
+ * Retrieves the MCP Connection.
668
+ * @param input - `mcpConnectionId`; optional abortSignal.
669
+ * @returns The mcp connection response.
670
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
671
+ */
367
672
  get(input: {
368
673
  mcpConnectionId: string;
369
674
  } & ResourceRequestOptions): Promise<McpConnectionResponse>;
675
+ /**
676
+ * Lists available MCP Connection records.
677
+ * @param input - optional abortSignal.
678
+ * @returns The mcp connections response.
679
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
680
+ */
370
681
  list(input?: ResourceRequestOptions): Promise<McpConnectionsResponse>;
682
+ /**
683
+ * Reconnects the MCP Connection.
684
+ * @param input - `mcpConnectionId`; fields to change; optional abortSignal.
685
+ * @returns The mcp connection reconnect result.
686
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
687
+ */
371
688
  reconnect(input: ReconnectMcpConnectionBody & {
372
689
  mcpConnectionId: string;
373
690
  } & ResourceRequestOptions): Promise<McpConnectionReconnectResult>;
691
+ /**
692
+ * Tests the MCP Connection.
693
+ * @param input - `mcpConnectionId`; optional abortSignal.
694
+ * @returns The mcp connection test response.
695
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
696
+ */
374
697
  test(input: {
375
698
  mcpConnectionId: string;
376
699
  } & ResourceRequestOptions): Promise<McpConnectionTestResponse>;
700
+ /**
701
+ * Updates the MCP Connection.
702
+ * @param input - `mcpConnectionId`; fields to change; optional abortSignal.
703
+ * @returns The mcp connection response.
704
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
705
+ */
377
706
  update(input: UpdateMcpConnectionBody & {
378
707
  mcpConnectionId: string;
379
708
  } & ResourceRequestOptions): Promise<McpConnectionResponse>;
@@ -395,35 +724,55 @@ export interface SessionMessagesOptions extends ResourceRequestOptions {
395
724
  limit?: number;
396
725
  }
397
726
  export interface SessionsResource {
398
- decideToolApproval(input: DecideToolApprovalBody & {
399
- agentId: string;
400
- sessionId: string;
401
- approvalId: string;
402
- } & ResourceRequestOptions): Promise<ToolApprovalDecisionResponse>;
727
+ /**
728
+ * Deletes the Session.
729
+ * @param input - `agentId`, `sessionId`; optional abortSignal; deleteArtifacts controls Artifact deletion.
730
+ * @returns Resolves when the operation completes.
731
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
732
+ */
403
733
  delete(input: {
404
734
  agentId: string;
405
735
  sessionId: string;
406
736
  deleteArtifacts: boolean;
407
737
  } & ResourceRequestOptions): Promise<void>;
408
- deleteInput(input: {
738
+ /**
739
+ * Retry an uncertain acknowledgement with the same explicit idempotencyKey.
740
+ * @param input - `agentId`, `sessionId`, `messageId`; optional abortSignal.
741
+ * @returns The session response.
742
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
743
+ */
744
+ fork(input: {
409
745
  agentId: string;
410
746
  sessionId: string;
411
- requestId: string;
412
- } & ResourceRequestOptions): Promise<SessionInputResponse>;
747
+ messageId: string;
748
+ idempotencyKey: string;
749
+ } & ResourceRequestOptions): Promise<SessionResponse>;
750
+ /**
751
+ * Retrieves the Session.
752
+ * @param input - `agentId`, `sessionId`; optional abortSignal.
753
+ * @returns The session response.
754
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
755
+ */
413
756
  get(input: {
414
757
  agentId: string;
415
758
  sessionId: string;
416
759
  } & ResourceRequestOptions): Promise<SessionResponse>;
417
- /** Poll from the first page for state changes; cursor only paginates receipts. */
760
+ /**
761
+ * Poll from the first page for state changes; cursor only paginates receipts.
762
+ * @param input - `agentId`, `sessionId`; query filters; optional abortSignal.
763
+ * @returns The session inputs response.
764
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
765
+ */
418
766
  inputs(input: {
419
767
  agentId: string;
420
768
  sessionId: string;
421
769
  } & SessionInputsQuery & ResourceRequestOptions): Promise<SessionInputsResponse>;
422
- joinToolApprovalContinuation(input: {
423
- agentId: string;
424
- sessionId: string;
425
- continuationId: string;
426
- } & ResourceRequestOptions): Promise<TerminalStreamResult>;
770
+ /**
771
+ * Lists one page of Session records.
772
+ * @param input - `agentId`; filters and pagination options.
773
+ * @returns The sessions list response.
774
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
775
+ */
427
776
  list(input: {
428
777
  agentId: string;
429
778
  } & SessionsListOptions): Promise<SessionsListResponse>;
@@ -431,72 +780,135 @@ export interface SessionsResource {
431
780
  * `GET /v1/sessions/latest` — the Tenant's most recently updated Sessions,
432
781
  * newest first. Set `byAgent` to return at most one Session per Agent.
433
782
  * `userId` narrows the candidate Sessions to one end user's.
783
+ * @param input - filters and pagination options.
784
+ * @returns The latest sessions list response.
785
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
434
786
  */
435
787
  listLatest(input?: LatestSessionsListOptions): Promise<LatestSessionsListResponse>;
788
+ /**
789
+ * Lists one page of Session messages.
790
+ * @param input - `agentId`, `sessionId`.
791
+ * @returns The session messages response.
792
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
793
+ */
436
794
  messages(input: {
437
795
  agentId: string;
438
796
  sessionId: string;
439
797
  } & SessionMessagesOptions): Promise<SessionMessagesResponse>;
440
- promoteInput(input: {
441
- agentId: string;
442
- sessionId: string;
443
- requestId: string;
444
- } & ResourceRequestOptions): Promise<SessionInputResponse>;
445
- /** Resume accepted inputs after a pause. Uncertain inputs are never replayed. */
446
- resumeInputs(input: {
447
- agentId: string;
448
- sessionId: string;
449
- } & ResourceRequestOptions): Promise<ResumeSessionInputsResponse>;
450
- /** Runs the pending batch and streams its output without resubmitting messages. */
451
- runInputs(input: {
452
- agentId: string;
453
- sessionId: string;
454
- functions?: ChatFunctions;
455
- } & ResourceRequestOptions): Promise<TerminalStreamResult>;
456
- /** Wait for settlement of the named Turn. A queued Turn may already be running. */
798
+ /**
799
+ * Records cancellation for the named Turn without waiting for settlement.
800
+ * @param input - `agentId`, `sessionId`; fields to change; optional abortSignal.
801
+ * @returns The stop session response.
802
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
803
+ */
457
804
  stop(input: {
458
805
  agentId: string;
459
806
  sessionId: string;
460
807
  } & StopSessionBody & ResourceRequestOptions): Promise<StopSessionResponse>;
461
- /** Retry an uncertain acknowledgement with the same requestId and payload. */
808
+ /**
809
+ * Retry an uncertain acknowledgement with the same requestId and payload.
810
+ * @param input - `agentId`, `sessionId`; fields to change; optional abortSignal.
811
+ * @returns The session input response.
812
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
813
+ */
462
814
  submitInput(input: Omit<SubmitSessionInputBody, "message"> & {
463
815
  agentId: string;
464
816
  sessionId: string;
465
817
  message: UIMessage;
466
818
  } & ResourceRequestOptions): Promise<SessionInputResponse>;
819
+ /**
820
+ * Retrieves the pending Tool approval round.
821
+ * @param input - `agentId`, `sessionId`; optional abortSignal.
822
+ * @returns The tool approvals response.
823
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
824
+ */
467
825
  toolApprovals(input: {
468
826
  agentId: string;
469
827
  sessionId: string;
470
828
  } & ResourceRequestOptions): Promise<ToolApprovalsResponse>;
471
829
  }
472
830
  export interface AgentSkillsResource {
831
+ /**
832
+ * Copies the Skill to the selected Agents.
833
+ * @param input - Source `skillId`, destination `to.agentIds`, and optional abortSignal.
834
+ * @returns The skill copy results.
835
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
836
+ */
473
837
  copy(input: {
474
838
  skillId: string;
475
839
  to: {
476
840
  agentIds: string[];
477
841
  };
478
842
  } & ResourceRequestOptions): Promise<SkillCopyResults>;
843
+ /**
844
+ * Creates the Skill.
845
+ * @param input - creation fields; optional abortSignal.
846
+ * @returns The skill detail.
847
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
848
+ */
479
849
  create(input: CreateSkillBody & ResourceRequestOptions): Promise<SkillDetail>;
850
+ /**
851
+ * Deletes the Skill.
852
+ * @param input - `skillId`; optional abortSignal.
853
+ * @returns Resolves when the operation completes.
854
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
855
+ */
480
856
  delete(input: {
481
857
  skillId: string;
482
858
  } & ResourceRequestOptions): Promise<void>;
859
+ /**
860
+ * Deletes a Skill file.
861
+ * @param input - `skillId`, relative file `path`, and optional abortSignal.
862
+ * @returns The skill detail.
863
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
864
+ */
483
865
  deleteFile(input: {
484
866
  path: string;
485
867
  skillId: string;
486
868
  } & ResourceRequestOptions): Promise<SkillDetail>;
869
+ /**
870
+ * Retrieves the Skill.
871
+ * @param input - `skillId`; optional abortSignal.
872
+ * @returns The skill detail.
873
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
874
+ */
487
875
  get(input: {
488
876
  skillId: string;
489
877
  } & ResourceRequestOptions): Promise<SkillDetail>;
878
+ /**
879
+ * Reads Skill file bytes.
880
+ * @param input - `skillId`, relative file `path`, and optional abortSignal.
881
+ * @returns The requested file bytes.
882
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
883
+ */
490
884
  getFile(input: {
491
885
  path: string;
492
886
  skillId: string;
493
887
  } & ResourceRequestOptions): Promise<Uint8Array>;
888
+ /**
889
+ * Lists one page of Skill records.
890
+ * @param input - filters and pagination options.
891
+ * @returns The skills list response.
892
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
893
+ */
494
894
  list(input?: SkillsListOptions): Promise<SkillsListResponse>;
895
+ /**
896
+ * Replaces a Skill file with the supplied content.
897
+ * @param input - `skillId`, relative `path`, replacement `content`, and optional abortSignal.
898
+ * @returns The skill detail.
899
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
900
+ */
495
901
  putFile(input: {
496
902
  content: Blob | string | Uint8Array;
497
903
  path: string;
498
904
  skillId: string;
499
905
  } & ResourceRequestOptions): Promise<SkillDetail>;
906
+ /**
907
+ * Uploads a Skill archive as multipart form data.
908
+ * @param input - Archive bytes in `source.file`, archive format in `source.type`, and optional abortSignal.
909
+ * @returns The skill detail.
910
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
911
+ */
500
912
  upload(input: {
501
913
  source: {
502
914
  file: Blob | Uint8Array;
@@ -524,47 +936,141 @@ export interface TaskRunMessagesOptions extends ResourceRequestOptions {
524
936
  limit?: number;
525
937
  }
526
938
  export interface TasksResource {
939
+ /**
940
+ * Requests cancellation of a Task run.
941
+ * @param input - `taskId`, `runId`; optional abortSignal.
942
+ * @returns Resolves when the operation completes.
943
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
944
+ */
527
945
  cancelRun(input: {
528
946
  taskId: string;
529
947
  runId: string;
530
948
  } & ResourceRequestOptions): Promise<void>;
949
+ /**
950
+ * Creates the Task.
951
+ * @param input - creation fields; optional abortSignal.
952
+ * @returns The create task response.
953
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
954
+ */
531
955
  create(input: CreateTaskBody & ResourceRequestOptions): Promise<CreateTaskResponse>;
956
+ /**
957
+ * Creates a Task run.
958
+ * @param input - `taskId`; creation fields; optional abortSignal.
959
+ * @returns The create task run response.
960
+ */
532
961
  createRun(input: CreateTaskRunBody & {
533
962
  taskId: string;
534
963
  } & ResourceRequestOptions): Promise<CreateTaskRunResponse>;
964
+ /**
965
+ * Deletes the Task.
966
+ * @param input - `taskId`; optional abortSignal.
967
+ * @returns Resolves when the operation completes.
968
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
969
+ */
535
970
  delete(input: {
536
971
  taskId: string;
537
972
  } & ResourceRequestOptions): Promise<void>;
973
+ /**
974
+ * Retrieves the Task.
975
+ * @param input - `taskId`; optional abortSignal.
976
+ * @returns The task response.
977
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
978
+ */
538
979
  get(input: {
539
980
  taskId: string;
540
981
  } & ResourceRequestOptions): Promise<TaskResponse>;
982
+ /**
983
+ * Retrieves a Task run.
984
+ * @param input - `taskId`, `runId`; optional abortSignal.
985
+ * @returns The task run response.
986
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
987
+ */
541
988
  getRun(input: {
542
989
  taskId: string;
543
990
  runId: string;
544
991
  } & ResourceRequestOptions): Promise<TaskRunResponse>;
992
+ /**
993
+ * Lists one page of Task records.
994
+ * @param input - filters and pagination options.
995
+ * @returns The tasks list response.
996
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
997
+ */
545
998
  list(input?: TasksListOptions): Promise<TasksListResponse>;
999
+ /**
1000
+ * Lists one page of Task runs.
1001
+ * @param input - `taskId`; filters and pagination options.
1002
+ * @returns The task runs list response.
1003
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1004
+ */
546
1005
  listRuns(input: {
547
1006
  taskId: string;
548
1007
  } & TaskRunsListOptions): Promise<TaskRunsListResponse>;
1008
+ /**
1009
+ * Lists one page of Task run messages.
1010
+ * @param input - `taskId`, `runId`.
1011
+ * @returns The task run messages response.
1012
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1013
+ */
549
1014
  runMessages(input: {
550
1015
  taskId: string;
551
1016
  runId: string;
552
1017
  } & TaskRunMessagesOptions): Promise<TaskRunMessagesResponse>;
1018
+ /**
1019
+ * Updates the Task.
1020
+ * @param input - `taskId`; fields to change; optional abortSignal.
1021
+ * @returns The task response.
1022
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1023
+ */
553
1024
  update(input: UpdateTaskBody & {
554
1025
  taskId: string;
555
1026
  } & ResourceRequestOptions): Promise<TaskResponse>;
556
1027
  }
557
1028
  export interface TenantResource {
1029
+ /**
1030
+ * Retrieves Tenant settings.
1031
+ * @param input - optional abortSignal.
1032
+ * @returns The tenant settings response.
1033
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1034
+ */
558
1035
  get(input?: ResourceRequestOptions): Promise<TenantSettingsResponse>;
1036
+ /**
1037
+ * Updates Tenant settings.
1038
+ * @param input - fields to change; optional abortSignal.
1039
+ * @returns The tenant settings response.
1040
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1041
+ */
559
1042
  patch(input: UpdateTenantSettingsBody & ResourceRequestOptions): Promise<TenantSettingsResponse>;
560
1043
  }
561
1044
  export interface UsageResource {
1045
+ /**
1046
+ * Retrieves usage totals.
1047
+ * @param input - query filters; optional abortSignal.
1048
+ * @returns The usage response.
1049
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1050
+ */
562
1051
  get(input?: Partial<UsageQuery> & ResourceRequestOptions): Promise<UsageResponse>;
1052
+ /**
1053
+ * Retrieves usage for one Agent.
1054
+ * @param input - `agentId`; query filters; optional abortSignal.
1055
+ * @returns The usage response.
1056
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1057
+ */
563
1058
  getForAgent(input: Partial<UsageQuery> & {
564
1059
  agentId: string;
565
1060
  } & ResourceRequestOptions): Promise<UsageResponse>;
566
- /** Returns totals, daily usage, and bounded Agent, user, and model rankings. */
1061
+ /**
1062
+ * Returns totals, daily usage, and bounded Agent, user, and model rankings.
1063
+ * @param input - query filters; optional abortSignal.
1064
+ * @returns The usage overview response.
1065
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1066
+ */
567
1067
  overview(input?: Partial<UsageOverviewQuery> & ResourceRequestOptions): Promise<UsageOverviewResponse>;
1068
+ /**
1069
+ * Retrieves usage grouped by Session.
1070
+ * @param input - query filters; optional abortSignal.
1071
+ * @returns The session usage response.
1072
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1073
+ */
568
1074
  sessions(input: SessionUsageQuery & ResourceRequestOptions): Promise<SessionUsageResponse>;
569
1075
  }
570
1076
  /**
@@ -573,10 +1079,33 @@ export interface UsageResource {
573
1079
  * `keyFragment`.
574
1080
  */
575
1081
  export interface MerchantConnectionResource {
1082
+ /**
1083
+ * Creates the merchant connection.
1084
+ * @param input - creation fields; optional abortSignal.
1085
+ * @returns The merchant connection response.
1086
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1087
+ */
576
1088
  create(input: CreateMerchantConnectionBody & ResourceRequestOptions): Promise<MerchantConnectionResponse>;
1089
+ /**
1090
+ * Retrieves the merchant connection.
1091
+ * @param input - optional abortSignal.
1092
+ * @returns The merchant connection response.
1093
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1094
+ */
577
1095
  get(input?: ResourceRequestOptions): Promise<MerchantConnectionResponse>;
578
- /** Retires the connection; deliveries stop (`DELETE` → 204). */
1096
+ /**
1097
+ * Retires the merchant connection and stops deliveries.
1098
+ * @param input - optional abortSignal.
1099
+ * @returns Resolves when the operation completes.
1100
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1101
+ */
579
1102
  retire(input?: ResourceRequestOptions): Promise<void>;
1103
+ /**
1104
+ * Updates the merchant connection.
1105
+ * @param input - fields to change; optional abortSignal.
1106
+ * @returns The merchant connection response.
1107
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1108
+ */
580
1109
  update(input: UpdateMerchantConnectionBody & ResourceRequestOptions): Promise<MerchantConnectionResponse>;
581
1110
  }
582
1111
  export interface MerchantBindingsListOptions extends ResourceRequestOptions {
@@ -590,10 +1119,28 @@ export interface MerchantBindingsListOptions extends ResourceRequestOptions {
590
1119
  * the provider.
591
1120
  */
592
1121
  export interface MerchantBindingsResource {
1122
+ /**
1123
+ * Deletes the end-user merchant binding.
1124
+ * @param input - `userId`; optional abortSignal.
1125
+ * @returns Resolves when the operation completes.
1126
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1127
+ */
593
1128
  delete(input: {
594
1129
  userId: string;
595
1130
  } & ResourceRequestOptions): Promise<void>;
1131
+ /**
1132
+ * Lists one page of end-user merchant binding records.
1133
+ * @param input - filters and pagination options.
1134
+ * @returns The merchant bindings response.
1135
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1136
+ */
596
1137
  list(input?: MerchantBindingsListOptions): Promise<MerchantBindingsResponse>;
1138
+ /**
1139
+ * Validates and saves the end-user merchant binding.
1140
+ * @param input - `userId`; fields to change; optional abortSignal.
1141
+ * @returns The merchant binding response.
1142
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1143
+ */
597
1144
  put(input: UpsertMerchantBindingBody & {
598
1145
  userId: string;
599
1146
  } & ResourceRequestOptions): Promise<MerchantBindingResponse>;
@@ -609,44 +1156,134 @@ export interface MerchantUsageEventsListOptions extends ResourceRequestOptions {
609
1156
  * operator actions on unresolved events.
610
1157
  */
611
1158
  export interface MerchantUsageEventsResource {
1159
+ /**
1160
+ * Discards the merchant usage event.
1161
+ * @param input - `eventId`; optional abortSignal.
1162
+ * @returns The merchant usage event response.
1163
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1164
+ */
612
1165
  discard(input: {
613
1166
  eventId: string;
614
1167
  } & ResourceRequestOptions): Promise<MerchantUsageEventResponse>;
1168
+ /**
1169
+ * Retrieves the merchant usage event.
1170
+ * @param input - `eventId`; optional abortSignal.
1171
+ * @returns The merchant usage event response.
1172
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1173
+ */
615
1174
  get(input: {
616
1175
  eventId: string;
617
1176
  } & ResourceRequestOptions): Promise<MerchantUsageEventResponse>;
1177
+ /**
1178
+ * Lists one page of merchant usage event records.
1179
+ * @param input - filters and pagination options.
1180
+ * @returns The merchant usage events response.
1181
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1182
+ */
618
1183
  list(input?: MerchantUsageEventsListOptions): Promise<MerchantUsageEventsResponse>;
1184
+ /**
1185
+ * Releases the merchant usage event.
1186
+ * @param input - `eventId`; optional abortSignal.
1187
+ * @returns The merchant usage event response.
1188
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1189
+ */
619
1190
  release(input: {
620
1191
  eventId: string;
621
1192
  } & ResourceRequestOptions): Promise<MerchantUsageEventResponse>;
1193
+ /**
1194
+ * Retries delivery of the merchant usage event.
1195
+ * @param input - `eventId`; optional abortSignal.
1196
+ * @returns The merchant usage event response.
1197
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1198
+ */
622
1199
  retry(input: {
623
1200
  eventId: string;
624
1201
  } & ResourceRequestOptions): Promise<MerchantUsageEventResponse>;
1202
+ /**
1203
+ * Retrieves merchant usage delivery totals for the selected day range.
1204
+ * @param input - Lookback window in `days` and optional abortSignal.
1205
+ * @returns The merchant usage summary response.
1206
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1207
+ */
625
1208
  summary(input?: {
626
1209
  days?: number;
627
1210
  } & ResourceRequestOptions): Promise<MerchantUsageSummaryResponse>;
628
1211
  }
629
1212
  export interface ChatConnectionsResource {
1213
+ /**
1214
+ * Checks the Chat Connection health.
1215
+ * @param input - `chatConnectionId`; optional abortSignal.
1216
+ * @returns The chat connection.
1217
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1218
+ */
630
1219
  checkHealth(input: {
631
1220
  chatConnectionId: string;
632
1221
  } & ResourceRequestOptions): Promise<ChatConnection>;
1222
+ /**
1223
+ * Creates the Chat Connection.
1224
+ * @param input - creation fields; optional abortSignal.
1225
+ * @returns The chat connection.
1226
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1227
+ */
633
1228
  create(input: CreateChatConnectionBody & ResourceRequestOptions): Promise<ChatConnection>;
1229
+ /**
1230
+ * Deletes the Chat Connection.
1231
+ * @param input - `chatConnectionId`; optional abortSignal.
1232
+ * @returns Resolves when the operation completes.
1233
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1234
+ */
634
1235
  delete(input: {
635
1236
  chatConnectionId: string;
636
1237
  } & ResourceRequestOptions): Promise<void>;
1238
+ /**
1239
+ * Disables the Chat Connection.
1240
+ * @param input - `chatConnectionId`; optional abortSignal.
1241
+ * @returns The chat connection.
1242
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1243
+ */
637
1244
  disable(input: {
638
1245
  chatConnectionId: string;
639
1246
  } & ResourceRequestOptions): Promise<ChatConnection>;
1247
+ /**
1248
+ * Enables the Chat Connection.
1249
+ * @param input - `chatConnectionId`; optional abortSignal.
1250
+ * @returns The chat connection.
1251
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1252
+ */
640
1253
  enable(input: {
641
1254
  chatConnectionId: string;
642
1255
  } & ResourceRequestOptions): Promise<ChatConnection>;
1256
+ /**
1257
+ * Retrieves the Chat Connection.
1258
+ * @param input - `chatConnectionId`; optional abortSignal.
1259
+ * @returns The chat connection.
1260
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1261
+ */
643
1262
  get(input: {
644
1263
  chatConnectionId: string;
645
1264
  } & ResourceRequestOptions): Promise<ChatConnection>;
1265
+ /**
1266
+ * Lists available Chat Connection records.
1267
+ * @param input - optional abortSignal.
1268
+ * @returns The chat connections response.
1269
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1270
+ */
646
1271
  list(input?: ResourceRequestOptions): Promise<ChatConnectionsResponse>;
1272
+ /**
1273
+ * Replaces the Chat Connection credentials.
1274
+ * @param input - `chatConnectionId`; fields to change; optional abortSignal.
1275
+ * @returns The chat connection.
1276
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1277
+ */
647
1278
  rotateCredentials(input: RotateChatConnectionBody & {
648
1279
  chatConnectionId: string;
649
1280
  } & ResourceRequestOptions): Promise<ChatConnection>;
1281
+ /**
1282
+ * Updates the Chat Connection.
1283
+ * @param input - `chatConnectionId`; fields to change; optional abortSignal.
1284
+ * @returns The chat connection.
1285
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1286
+ */
650
1287
  update(input: UpdateChatConnectionBody & {
651
1288
  chatConnectionId: string;
652
1289
  } & ResourceRequestOptions): Promise<ChatConnection>;
@@ -664,6 +1301,12 @@ export interface ChatDeliveriesListOptions extends ResourceRequestOptions {
664
1301
  * Connections behind `GET /v1/chat-deliveries`, newest first.
665
1302
  */
666
1303
  export interface ChatDeliveriesResource {
1304
+ /**
1305
+ * Lists one page of Chat delivery records.
1306
+ * @param input - filters and pagination options.
1307
+ * @returns The chat deliveries response.
1308
+ * @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
1309
+ */
667
1310
  list(input?: ChatDeliveriesListOptions): Promise<ChatDeliveriesResponse>;
668
1311
  }
669
1312
  export {};