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