@blazingagents/sdk 0.2.2 → 0.4.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.
package/dist/types.d.ts CHANGED
@@ -7,7 +7,7 @@ import type { CreateMcpConnectionBody, McpAttachmentResponse, McpAttachmentsResp
7
7
  import type { CreateMemoryBody, MemoriesListResponse, MemoryResponse, UpdateMemoryBody } from "./contracts/entities/memories.ts";
8
8
  import type { CreatePromptBody, PromptResponse, PromptsResponse, UpdatePromptBody } from "./contracts/entities/prompts.ts";
9
9
  import type { CreateProviderBody, DeleteProviderOptions, ProviderModelsResponse, ProviderResponse, ProvidersResponse, ThinkingLevelsResponse, UpdateProviderBody } from "./contracts/entities/providers.ts";
10
- import type { DecideToolApprovalBody, SessionMessagesResponse, SessionsListResponse, ToolApprovalDecisionResponse, ToolApprovalsResponse } from "./contracts/entities/sessions.ts";
10
+ import type { DecideToolApprovalBody, LatestSessionsListResponse, SessionMessagesResponse, SessionsListResponse, ToolApprovalDecisionResponse, ToolApprovalsResponse } from "./contracts/entities/sessions.ts";
11
11
  import type { CreateSkillBody, SkillArchiveType, SkillCopyResults, SkillDetail, SkillsListResponse } from "./contracts/entities/skills.ts";
12
12
  import type { CreateTaskBody, CreateTaskResponse, CreateTaskRunBody, CreateTaskRunResponse, TaskResponse, TaskRunMessagesResponse, TaskRunResponse, TaskRunsListResponse, TasksListResponse, UpdateTaskBody } from "./contracts/entities/tasks.ts";
13
13
  import type { TenantSettingsResponse, UpdateTenantSettingsBody } from "./contracts/entities/tenants.ts";
@@ -99,19 +99,19 @@ interface ExistingSessionInput {
99
99
  }
100
100
  type ChatSessionInput = NewSessionInput | ExistingSessionInput;
101
101
  interface ChatMessageContentInput extends AttributionInput, CorrelatedRequestInput {
102
+ abortSignal?: AbortSignal;
102
103
  agentId: string;
103
104
  message: UIMessage;
104
105
  messageId?: string;
105
106
  promptId?: never;
106
- signal?: AbortSignal;
107
107
  variables?: never;
108
108
  }
109
109
  interface ChatPromptContentInput extends AttributionInput, CorrelatedRequestInput {
110
+ abortSignal?: AbortSignal;
110
111
  agentId: string;
111
112
  message?: never;
112
113
  messageId?: string;
113
114
  promptId: string;
114
- signal?: AbortSignal;
115
115
  variables?: Record<string, string>;
116
116
  }
117
117
  export type ChatMessageInput = ChatMessageContentInput & ChatSessionInput;
@@ -140,19 +140,19 @@ interface StatelessGenerationInput extends AttributionInput, CorrelatedRequestIn
140
140
  version?: number;
141
141
  }
142
142
  export interface CompletionPromptInput extends StatelessGenerationInput {
143
+ abortSignal?: AbortSignal;
143
144
  agentId: string;
144
145
  prompt: string;
145
146
  promptId?: never;
146
147
  schema?: never;
147
- signal?: AbortSignal;
148
148
  variables?: never;
149
149
  }
150
150
  export interface CompletionPromptIdInput extends StatelessGenerationInput {
151
+ abortSignal?: AbortSignal;
151
152
  agentId: string;
152
153
  prompt?: never;
153
154
  promptId: string;
154
155
  schema?: never;
155
- signal?: AbortSignal;
156
156
  variables?: Record<string, string>;
157
157
  }
158
158
  export type CompletionInput = CompletionPromptInput | CompletionPromptIdInput;
@@ -163,19 +163,19 @@ export interface CompletionResult {
163
163
  toResponse: () => Response;
164
164
  }
165
165
  export interface ObjectPromptInput extends StatelessGenerationInput {
166
+ abortSignal?: AbortSignal;
166
167
  agentId: string;
167
168
  prompt: string;
168
169
  promptId?: never;
169
170
  schema: Record<string, unknown>;
170
- signal?: AbortSignal;
171
171
  variables?: never;
172
172
  }
173
173
  export interface ObjectPromptIdInput extends StatelessGenerationInput {
174
+ abortSignal?: AbortSignal;
174
175
  agentId: string;
175
176
  prompt?: never;
176
177
  promptId: string;
177
178
  schema: Record<string, unknown>;
178
- signal?: AbortSignal;
179
179
  variables?: Record<string, string>;
180
180
  }
181
181
  export type ObjectInput = ObjectPromptInput | ObjectPromptIdInput;
@@ -185,130 +185,235 @@ export interface ObjectResult {
185
185
  requestId?: string;
186
186
  toResponse: () => Response;
187
187
  }
188
- export type ResourceReadOptions = Pick<RequestOptions, "signal">;
188
+ export interface ResourceRequestOptions {
189
+ abortSignal?: AbortSignal;
190
+ }
189
191
  export interface AgentsResource {
190
192
  /** Omitting `workspaceId` attaches a default Workspace with a lazy runtime. */
191
- create(body: CreateAgentBody): Promise<Agent>;
193
+ create(input: CreateAgentBody & ResourceRequestOptions): Promise<Agent>;
192
194
  /** Deletes the Agent while preserving its attached Workspace. */
193
- delete(agentId: string, includeArtifacts: boolean): Promise<void>;
194
- disable(agentId: string): Promise<Agent>;
195
- enable(agentId: string): Promise<Agent>;
196
- get(agentId: string, options?: ResourceReadOptions): Promise<Agent>;
197
- getVersion(agentId: string, version: number, options?: ResourceReadOptions): Promise<AgentVersion>;
198
- list(options?: AgentsListOptions): Promise<AgentsResponse>;
199
- listMcpAttachments(agentId: string, options?: ResourceReadOptions): Promise<McpAttachmentsResponse>;
200
- listVersions(agentId: string, options?: AgentVersionsListOptions): Promise<AgentVersionsResponse>;
201
- removeAvatar(agentId: string): Promise<Agent>;
202
- /**
203
- * Copies an immutable Version's configuration into the Agent through the
204
- * ordinary update path, creating a new latest Version without rewriting history.
205
- */
206
- restoreVersion(agentId: string, version: number): Promise<Agent>;
195
+ delete(input: {
196
+ agentId: string;
197
+ includeArtifacts: boolean;
198
+ } & ResourceRequestOptions): Promise<void>;
199
+ disable(input: {
200
+ agentId: string;
201
+ } & ResourceRequestOptions): Promise<Agent>;
202
+ enable(input: {
203
+ agentId: string;
204
+ } & ResourceRequestOptions): Promise<Agent>;
205
+ get(input: {
206
+ agentId: string;
207
+ } & ResourceRequestOptions): Promise<Agent>;
208
+ getVersion(input: {
209
+ agentId: string;
210
+ version: number;
211
+ } & ResourceRequestOptions): Promise<AgentVersion>;
212
+ list(input?: AgentsListOptions): Promise<AgentsResponse>;
213
+ listMcpAttachments(input: {
214
+ agentId: string;
215
+ } & ResourceRequestOptions): Promise<McpAttachmentsResponse>;
216
+ listVersions(input: {
217
+ agentId: string;
218
+ } & AgentVersionsListOptions): Promise<AgentVersionsResponse>;
219
+ removeAvatar(input: {
220
+ agentId: string;
221
+ } & ResourceRequestOptions): Promise<Agent>;
222
+ /** Copies an immutable Version into the Agent, creating a new latest Version. */
223
+ restoreVersion(input: {
224
+ agentId: string;
225
+ version: number;
226
+ } & ResourceRequestOptions): Promise<Agent>;
207
227
  /** A concrete `workspaceId` switches the Agent; detachment is unsupported. */
208
- update(agentId: string, body: UpdateAgentBody): Promise<Agent>;
209
- updateMcpAttachment(agentId: string, mcpConnectionId: string, body: UpdateMcpAttachmentBody): Promise<McpAttachmentResponse>;
210
- uploadAvatar(agentId: string, file: File): Promise<Agent>;
228
+ update(input: UpdateAgentBody & {
229
+ agentId: string;
230
+ } & ResourceRequestOptions): Promise<Agent>;
231
+ updateMcpAttachment(input: UpdateMcpAttachmentBody & {
232
+ agentId: string;
233
+ mcpConnectionId: string;
234
+ } & ResourceRequestOptions): Promise<McpAttachmentResponse>;
235
+ uploadAvatar(input: {
236
+ agentId: string;
237
+ file: File;
238
+ } & ResourceRequestOptions): Promise<Agent>;
211
239
  }
212
240
  export interface AgentClient {
213
241
  readonly skills: AgentSkillsResource;
214
242
  }
215
- export interface AgentsListOptions extends ResourceReadOptions {
243
+ export interface AgentsListOptions extends ResourceRequestOptions {
216
244
  userId?: string;
217
245
  workspaceId?: string;
218
246
  }
219
247
  export interface WorkspacesResource {
220
- create(body?: CreateWorkspaceBody): Promise<Workspace>;
248
+ create(input?: CreateWorkspaceBody & ResourceRequestOptions): Promise<Workspace>;
221
249
  delete(input: {
222
250
  workspaceId: string;
223
- }): Promise<"completed" | "pending">;
251
+ } & ResourceRequestOptions): Promise<"completed" | "pending">;
224
252
  get(input: {
225
253
  workspaceId: string;
226
- }, options?: ResourceReadOptions): Promise<Workspace>;
227
- list(options?: WorkspacesListOptions): Promise<WorkspacesListResponse>;
254
+ } & ResourceRequestOptions): Promise<Workspace>;
255
+ list(input?: WorkspacesListOptions): Promise<WorkspacesListResponse>;
228
256
  update(input: UpdateWorkspaceBody & {
229
257
  workspaceId: string;
230
- }): Promise<Workspace>;
258
+ } & ResourceRequestOptions): Promise<Workspace>;
231
259
  }
232
- export interface WorkspacesListOptions extends ResourceReadOptions {
260
+ export interface WorkspacesListOptions extends ResourceRequestOptions {
233
261
  cursor?: string;
234
262
  limit?: number;
235
263
  userId?: string;
236
264
  }
237
- export interface AgentVersionsListOptions extends ResourceReadOptions {
265
+ export interface AgentVersionsListOptions extends ResourceRequestOptions {
238
266
  cursor?: string;
239
267
  limit?: number;
240
268
  }
241
- export interface ArtifactsListOptions extends ResourceReadOptions {
269
+ export interface ArtifactsListOptions extends ResourceRequestOptions {
242
270
  agentId?: string;
243
271
  cursor?: string;
244
272
  sessionId?: string;
245
273
  }
246
274
  export interface ArtifactsResource {
247
- createDownloadUrl(artifactId: string): Promise<ArtifactDownloadUrlResponse>;
248
- delete(artifactId: string): Promise<void>;
249
- get(artifactId: string, options?: ResourceReadOptions): Promise<ArtifactListItem>;
250
- list(options?: ArtifactsListOptions): Promise<ArtifactsListResponse>;
275
+ createDownloadUrl(input: {
276
+ artifactId: string;
277
+ } & ResourceRequestOptions): Promise<ArtifactDownloadUrlResponse>;
278
+ delete(input: {
279
+ artifactId: string;
280
+ } & ResourceRequestOptions): Promise<void>;
281
+ get(input: {
282
+ artifactId: string;
283
+ } & ResourceRequestOptions): Promise<ArtifactListItem>;
284
+ list(input?: ArtifactsListOptions): Promise<ArtifactsListResponse>;
251
285
  }
252
286
  export interface MemoriesResource {
253
- create(agentId: string, body: CreateMemoryBody): Promise<MemoryResponse>;
254
- delete(agentId: string, memoryId: string): Promise<void>;
255
- get(agentId: string, memoryId: string, options?: ResourceReadOptions): Promise<MemoryResponse>;
256
- list(agentId: string, options?: MemoriesListOptions): Promise<MemoriesListResponse>;
257
- update(agentId: string, memoryId: string, body: UpdateMemoryBody): Promise<MemoryResponse>;
258
- }
259
- export interface MemoriesListOptions extends ResourceReadOptions {
287
+ create(input: CreateMemoryBody & {
288
+ agentId: string;
289
+ } & ResourceRequestOptions): Promise<MemoryResponse>;
290
+ delete(input: {
291
+ agentId: string;
292
+ memoryId: string;
293
+ } & ResourceRequestOptions): Promise<void>;
294
+ get(input: {
295
+ agentId: string;
296
+ memoryId: string;
297
+ } & ResourceRequestOptions): Promise<MemoryResponse>;
298
+ list(input: {
299
+ agentId: string;
300
+ } & MemoriesListOptions): Promise<MemoriesListResponse>;
301
+ update(input: UpdateMemoryBody & {
302
+ agentId: string;
303
+ memoryId: string;
304
+ } & ResourceRequestOptions): Promise<MemoryResponse>;
305
+ }
306
+ export interface MemoriesListOptions extends ResourceRequestOptions {
260
307
  cursor?: string;
261
308
  limit?: number;
262
309
  search?: string;
263
310
  userId?: string;
264
311
  }
265
312
  export interface PromptsResource {
266
- create(body: CreatePromptBody): Promise<PromptResponse>;
267
- delete(promptId: string): Promise<void>;
268
- get(promptId: string, options?: ResourceReadOptions): Promise<PromptResponse>;
269
- list(userId?: string, options?: ResourceReadOptions): Promise<PromptsResponse>;
270
- update(promptId: string, body: UpdatePromptBody): Promise<PromptResponse>;
313
+ create(input: CreatePromptBody & ResourceRequestOptions): Promise<PromptResponse>;
314
+ delete(input: {
315
+ promptId: string;
316
+ } & ResourceRequestOptions): Promise<void>;
317
+ get(input: {
318
+ promptId: string;
319
+ } & ResourceRequestOptions): Promise<PromptResponse>;
320
+ list(input?: {
321
+ userId?: string;
322
+ } & ResourceRequestOptions): Promise<PromptsResponse>;
323
+ update(input: UpdatePromptBody & {
324
+ promptId: string;
325
+ } & ResourceRequestOptions): Promise<PromptResponse>;
271
326
  }
272
327
  export interface ProvidersResource {
273
- create(body: CreateProviderBody): Promise<ProviderResponse>;
274
- delete(id: string, options?: DeleteProviderOptions): Promise<void>;
275
- get(id: string, options?: ResourceReadOptions): Promise<ProviderResponse>;
276
- getThinkingLevels(id: string, model: string, options?: ResourceReadOptions): Promise<ThinkingLevelsResponse>;
277
- list(options?: ResourceReadOptions): Promise<ProvidersResponse>;
278
- listModels(id: string, options?: ResourceReadOptions): Promise<ProviderModelsResponse>;
279
- update(id: string, body: UpdateProviderBody): Promise<ProviderResponse>;
328
+ create(input: CreateProviderBody & ResourceRequestOptions): Promise<ProviderResponse>;
329
+ delete(input: DeleteProviderOptions & {
330
+ providerId: string;
331
+ } & ResourceRequestOptions): Promise<void>;
332
+ get(input: {
333
+ providerId: string;
334
+ } & ResourceRequestOptions): Promise<ProviderResponse>;
335
+ getThinkingLevels(input: {
336
+ providerId: string;
337
+ model: string;
338
+ } & ResourceRequestOptions): Promise<ThinkingLevelsResponse>;
339
+ list(input?: ResourceRequestOptions): Promise<ProvidersResponse>;
340
+ listModels(input: {
341
+ providerId: string;
342
+ } & ResourceRequestOptions): Promise<ProviderModelsResponse>;
343
+ update(input: UpdateProviderBody & {
344
+ providerId: string;
345
+ } & ResourceRequestOptions): Promise<ProviderResponse>;
280
346
  }
281
347
  export interface McpConnectionsResource {
282
- connect(id: string): Promise<McpConnectionOauthConnectResponse>;
283
- create(body: CreateMcpConnectionBody): Promise<McpConnectionResponse>;
284
- delete(id: string): Promise<void>;
285
- get(id: string, options?: ResourceReadOptions): Promise<McpConnectionResponse>;
286
- list(options?: ResourceReadOptions): Promise<McpConnectionsResponse>;
287
- reconnect(id: string, body: ReconnectMcpConnectionBody): Promise<McpConnectionReconnectResult>;
288
- test(id: string): Promise<McpConnectionTestResponse>;
289
- update(id: string, body: UpdateMcpConnectionBody): Promise<McpConnectionResponse>;
290
- }
291
- export interface SessionsListOptions extends ResourceReadOptions {
348
+ connect(input: {
349
+ mcpConnectionId: string;
350
+ } & ResourceRequestOptions): Promise<McpConnectionOauthConnectResponse>;
351
+ create(input: CreateMcpConnectionBody & ResourceRequestOptions): Promise<McpConnectionResponse>;
352
+ delete(input: {
353
+ mcpConnectionId: string;
354
+ } & ResourceRequestOptions): Promise<void>;
355
+ get(input: {
356
+ mcpConnectionId: string;
357
+ } & ResourceRequestOptions): Promise<McpConnectionResponse>;
358
+ list(input?: ResourceRequestOptions): Promise<McpConnectionsResponse>;
359
+ reconnect(input: ReconnectMcpConnectionBody & {
360
+ mcpConnectionId: string;
361
+ } & ResourceRequestOptions): Promise<McpConnectionReconnectResult>;
362
+ test(input: {
363
+ mcpConnectionId: string;
364
+ } & ResourceRequestOptions): Promise<McpConnectionTestResponse>;
365
+ update(input: UpdateMcpConnectionBody & {
366
+ mcpConnectionId: string;
367
+ } & ResourceRequestOptions): Promise<McpConnectionResponse>;
368
+ }
369
+ export interface SessionsListOptions extends ResourceRequestOptions {
292
370
  cursor?: string;
293
371
  limit?: number;
294
372
  userId?: string;
295
373
  }
296
- export interface SessionMessagesOptions extends ResourceReadOptions {
374
+ export interface LatestSessionsListOptions extends ResourceRequestOptions {
375
+ cursor?: string;
376
+ limit?: number;
377
+ userId?: string;
378
+ }
379
+ export interface SessionMessagesOptions extends ResourceRequestOptions {
297
380
  after?: string;
298
381
  cursor?: string;
299
382
  limit?: number;
300
383
  }
301
384
  export interface SessionsResource {
302
- decideToolApproval(agentId: string, sessionId: string, approvalId: string, decision: DecideToolApprovalBody, options?: {
303
- signal?: AbortSignal;
304
- }): Promise<ToolApprovalDecisionResponse>;
305
- delete(agentId: string, sessionId: string, deleteArtifacts: boolean): Promise<void>;
306
- joinToolApprovalContinuation(agentId: string, sessionId: string, continuationId: string, options?: {
307
- signal?: AbortSignal;
308
- }): Promise<TerminalStreamResult>;
309
- list(agentId: string, options?: SessionsListOptions): Promise<SessionsListResponse>;
310
- messages(agentId: string, sessionId: string, options?: SessionMessagesOptions): Promise<SessionMessagesResponse>;
311
- toolApprovals(agentId: string, sessionId: string, options?: ResourceReadOptions): Promise<ToolApprovalsResponse>;
385
+ decideToolApproval(input: DecideToolApprovalBody & {
386
+ agentId: string;
387
+ sessionId: string;
388
+ approvalId: string;
389
+ } & ResourceRequestOptions): Promise<ToolApprovalDecisionResponse>;
390
+ delete(input: {
391
+ agentId: string;
392
+ sessionId: string;
393
+ deleteArtifacts: boolean;
394
+ } & ResourceRequestOptions): Promise<void>;
395
+ joinToolApprovalContinuation(input: {
396
+ agentId: string;
397
+ sessionId: string;
398
+ continuationId: string;
399
+ } & ResourceRequestOptions): Promise<TerminalStreamResult>;
400
+ list(input: {
401
+ agentId: string;
402
+ } & SessionsListOptions): Promise<SessionsListResponse>;
403
+ /**
404
+ * `GET /v1/sessions/latest` — each Agent's most recently updated Session
405
+ * across the Tenant, one item per Agent, newest first. `userId` narrows
406
+ * the candidate Sessions to one end user's before picking the latest.
407
+ */
408
+ listLatest(input?: LatestSessionsListOptions): Promise<LatestSessionsListResponse>;
409
+ messages(input: {
410
+ agentId: string;
411
+ sessionId: string;
412
+ } & SessionMessagesOptions): Promise<SessionMessagesResponse>;
413
+ toolApprovals(input: {
414
+ agentId: string;
415
+ sessionId: string;
416
+ } & ResourceRequestOptions): Promise<ToolApprovalsResponse>;
312
417
  }
313
418
  export interface AgentSkillsResource {
314
419
  copy(input: {
@@ -316,72 +421,93 @@ export interface AgentSkillsResource {
316
421
  to: {
317
422
  agentIds: string[];
318
423
  };
319
- }): Promise<SkillCopyResults>;
320
- create(input: CreateSkillBody): Promise<SkillDetail>;
424
+ } & ResourceRequestOptions): Promise<SkillCopyResults>;
425
+ create(input: CreateSkillBody & ResourceRequestOptions): Promise<SkillDetail>;
321
426
  delete(input: {
322
427
  skillId: string;
323
- }): Promise<void>;
428
+ } & ResourceRequestOptions): Promise<void>;
324
429
  deleteFile(input: {
325
430
  path: string;
326
431
  skillId: string;
327
- }): Promise<SkillDetail>;
432
+ } & ResourceRequestOptions): Promise<SkillDetail>;
328
433
  get(input: {
329
434
  skillId: string;
330
- }, options?: ResourceReadOptions): Promise<SkillDetail>;
435
+ } & ResourceRequestOptions): Promise<SkillDetail>;
331
436
  getFile(input: {
332
437
  path: string;
333
438
  skillId: string;
334
- }, options?: ResourceReadOptions): Promise<Uint8Array>;
335
- list(options?: SkillsListOptions): Promise<SkillsListResponse>;
439
+ } & ResourceRequestOptions): Promise<Uint8Array>;
440
+ list(input?: SkillsListOptions): Promise<SkillsListResponse>;
336
441
  putFile(input: {
337
442
  content: Blob | string | Uint8Array;
338
443
  path: string;
339
444
  skillId: string;
340
- }): Promise<SkillDetail>;
445
+ } & ResourceRequestOptions): Promise<SkillDetail>;
341
446
  upload(input: {
342
447
  source: {
343
448
  file: Blob | Uint8Array;
344
449
  type: SkillArchiveType;
345
450
  };
346
- }): Promise<SkillDetail>;
451
+ } & ResourceRequestOptions): Promise<SkillDetail>;
347
452
  }
348
- export interface SkillsListOptions extends ResourceReadOptions {
453
+ export interface SkillsListOptions extends ResourceRequestOptions {
349
454
  cursor?: string;
350
455
  limit?: number;
351
456
  }
352
- export interface TasksListOptions extends ResourceReadOptions {
457
+ export interface TasksListOptions extends ResourceRequestOptions {
353
458
  agentId?: string;
354
459
  cursor?: string;
355
460
  limit?: number;
356
461
  userId?: string;
357
462
  }
358
- export interface TaskRunsListOptions extends ResourceReadOptions {
463
+ export interface TaskRunsListOptions extends ResourceRequestOptions {
359
464
  cursor?: string;
360
465
  limit?: number;
361
466
  }
362
- export interface TaskRunMessagesOptions extends ResourceReadOptions {
467
+ export interface TaskRunMessagesOptions extends ResourceRequestOptions {
363
468
  after?: string;
364
469
  cursor?: string;
365
470
  limit?: number;
366
471
  }
367
472
  export interface TasksResource {
368
- cancelRun(taskId: string, runId: string): Promise<void>;
369
- create(body: CreateTaskBody): Promise<CreateTaskResponse>;
370
- createRun(taskId: string, body?: CreateTaskRunBody): Promise<CreateTaskRunResponse>;
371
- delete(taskId: string): Promise<void>;
372
- get(taskId: string, options?: ResourceReadOptions): Promise<TaskResponse>;
373
- getRun(taskId: string, runId: string, options?: ResourceReadOptions): Promise<TaskRunResponse>;
374
- list(options?: TasksListOptions): Promise<TasksListResponse>;
375
- listRuns(taskId: string, options?: TaskRunsListOptions): Promise<TaskRunsListResponse>;
376
- runMessages(taskId: string, runId: string, options?: TaskRunMessagesOptions): Promise<TaskRunMessagesResponse>;
377
- update(taskId: string, body: UpdateTaskBody): Promise<TaskResponse>;
473
+ cancelRun(input: {
474
+ taskId: string;
475
+ runId: string;
476
+ } & ResourceRequestOptions): Promise<void>;
477
+ create(input: CreateTaskBody & ResourceRequestOptions): Promise<CreateTaskResponse>;
478
+ createRun(input: CreateTaskRunBody & {
479
+ taskId: string;
480
+ } & ResourceRequestOptions): Promise<CreateTaskRunResponse>;
481
+ delete(input: {
482
+ taskId: string;
483
+ } & ResourceRequestOptions): Promise<void>;
484
+ get(input: {
485
+ taskId: string;
486
+ } & ResourceRequestOptions): Promise<TaskResponse>;
487
+ getRun(input: {
488
+ taskId: string;
489
+ runId: string;
490
+ } & ResourceRequestOptions): Promise<TaskRunResponse>;
491
+ list(input?: TasksListOptions): Promise<TasksListResponse>;
492
+ listRuns(input: {
493
+ taskId: string;
494
+ } & TaskRunsListOptions): Promise<TaskRunsListResponse>;
495
+ runMessages(input: {
496
+ taskId: string;
497
+ runId: string;
498
+ } & TaskRunMessagesOptions): Promise<TaskRunMessagesResponse>;
499
+ update(input: UpdateTaskBody & {
500
+ taskId: string;
501
+ } & ResourceRequestOptions): Promise<TaskResponse>;
378
502
  }
379
503
  export interface TenantResource {
380
- get(options?: ResourceReadOptions): Promise<TenantSettingsResponse>;
381
- patch(body: UpdateTenantSettingsBody): Promise<TenantSettingsResponse>;
504
+ get(input?: ResourceRequestOptions): Promise<TenantSettingsResponse>;
505
+ patch(input: UpdateTenantSettingsBody & ResourceRequestOptions): Promise<TenantSettingsResponse>;
382
506
  }
383
507
  export interface UsageResource {
384
- get(query?: Partial<UsageQuery> & ResourceReadOptions): Promise<UsageResponse>;
385
- getForAgent(agentId: string, query?: Partial<UsageQuery> & ResourceReadOptions): Promise<UsageResponse>;
508
+ get(input?: Partial<UsageQuery> & ResourceRequestOptions): Promise<UsageResponse>;
509
+ getForAgent(input: Partial<UsageQuery> & {
510
+ agentId: string;
511
+ } & ResourceRequestOptions): Promise<UsageResponse>;
386
512
  }
387
513
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blazingagents/sdk",
3
- "version": "0.2.2",
3
+ "version": "0.4.0",
4
4
  "description": "TypeScript SDK for the Blazing Agents API",
5
5
  "homepage": "https://docs.blazingagents.com",
6
6
  "bugs": {