@blazingagents/sdk 0.41.0 → 0.42.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/client.d.ts +0 -2
- package/dist/client.js +0 -3
- package/dist/contracts/api.d.ts +1 -2
- package/dist/contracts/api.js +1 -2
- package/dist/contracts/entities/chat-connections.d.ts +0 -153
- package/dist/contracts/entities/chat-connections.js +1 -63
- package/dist/contracts/entities/mcp-connections.d.ts +0 -3
- package/dist/contracts/entities/mcp-connections.js +0 -3
- package/dist/contracts/entities/merchant.d.ts +0 -34
- package/dist/contracts/entities/merchant.js +0 -16
- package/dist/contracts/entities/session-inputs.d.ts +0 -8
- package/dist/contracts/entities/session-inputs.js +0 -2
- package/dist/contracts/entities/sessions.d.ts +1 -1
- package/dist/contracts/entities/spending-limits.d.ts +0 -5
- package/dist/contracts/entities/spending-limits.js +1 -3
- package/dist/contracts/ids.d.ts +0 -1
- package/dist/contracts/ids.js +0 -1
- package/dist/contracts/index.d.ts +4 -4
- package/dist/contracts/index.js +4 -4
- package/dist/index.d.ts +1 -2
- package/dist/resources/agents.d.ts +1 -1
- package/dist/resources/chat-connections.d.ts +1 -30
- package/dist/resources/chat-connections.js +1 -12
- package/dist/resources/merchant-usage-events.d.ts +3 -12
- package/dist/resources/merchant-usage-events.js +1 -4
- package/dist/resources/sessions.d.ts +2 -2
- package/dist/resources/workspaces.d.ts +1 -2
- package/dist/resources/workspaces.js +5 -3
- package/package.json +1 -1
- package/dist/resources/chat-deliveries.d.ts +0 -30
- package/dist/resources/chat-deliveries.js +0 -23
package/dist/client.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type AgentsResource } from "./resources/agents.ts";
|
|
2
2
|
import { type ArtifactsResource } from "./resources/artifacts.ts";
|
|
3
3
|
import { type ChatConnectionsResource } from "./resources/chat-connections.ts";
|
|
4
|
-
import { type ChatDeliveriesResource } from "./resources/chat-deliveries.ts";
|
|
5
4
|
import { type McpConnectionsResource } from "./resources/mcp-connections.ts";
|
|
6
5
|
import { type MemoriesResource } from "./resources/memories.ts";
|
|
7
6
|
import { type MerchantBindingsResource } from "./resources/merchant-bindings.ts";
|
|
@@ -18,7 +17,6 @@ import type { AgentClient, BlazingAgentsOptions, BlazingAgentsRequestOptions, Ch
|
|
|
18
17
|
export declare class BlazingAgents {
|
|
19
18
|
#private;
|
|
20
19
|
readonly chatConnections: ChatConnectionsResource;
|
|
21
|
-
readonly chatDeliveries: ChatDeliveriesResource;
|
|
22
20
|
readonly agents: AgentsResource;
|
|
23
21
|
readonly sessions: SessionsResource;
|
|
24
22
|
readonly providers: ProvidersResource;
|
package/dist/client.js
CHANGED
|
@@ -4,7 +4,6 @@ import { chat, completion, continueChat, objectGeneration, } from "./generation.
|
|
|
4
4
|
import { createAgentsResource, createUserAgentsResource, } from "./resources/agents.js";
|
|
5
5
|
import { createArtifactsResource, } from "./resources/artifacts.js";
|
|
6
6
|
import { createChatConnectionsResource, } from "./resources/chat-connections.js";
|
|
7
|
-
import { createChatDeliveriesResource, } from "./resources/chat-deliveries.js";
|
|
8
7
|
import { createMcpConnectionsResource, } from "./resources/mcp-connections.js";
|
|
9
8
|
import { createMemoriesResource, } from "./resources/memories.js";
|
|
10
9
|
import { createMerchantBindingsResource, } from "./resources/merchant-bindings.js";
|
|
@@ -61,7 +60,6 @@ function createUserClient(config) {
|
|
|
61
60
|
export class BlazingAgents {
|
|
62
61
|
#config;
|
|
63
62
|
chatConnections;
|
|
64
|
-
chatDeliveries;
|
|
65
63
|
agents;
|
|
66
64
|
sessions;
|
|
67
65
|
providers;
|
|
@@ -91,7 +89,6 @@ export class BlazingAgents {
|
|
|
91
89
|
onResponse: options.onResponse,
|
|
92
90
|
};
|
|
93
91
|
this.chatConnections = createChatConnectionsResource(this.#config);
|
|
94
|
-
this.chatDeliveries = createChatDeliveriesResource(this.#config);
|
|
95
92
|
this.agents = createAgentsResource(this.#config);
|
|
96
93
|
this.sessions = createSessionsResource(this.#config);
|
|
97
94
|
this.providers = createProvidersResource(this.#config);
|
package/dist/contracts/api.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import type { BlazingAgentsErrorCode } from "../types.ts";
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const apiErrorCodeSchema: z.ZodEnum<{
|
|
10
10
|
admin_agent_managed: "admin_agent_managed";
|
|
11
|
+
agent_busy: "agent_busy";
|
|
11
12
|
agent_disabled: "agent_disabled";
|
|
12
13
|
agent_mcp_connection_not_found: "agent_mcp_connection_not_found";
|
|
13
14
|
agent_mcp_connections_invalid: "agent_mcp_connections_invalid";
|
|
@@ -15,7 +16,6 @@ export declare const apiErrorCodeSchema: z.ZodEnum<{
|
|
|
15
16
|
artifact_session_cap_reached: "artifact_session_cap_reached";
|
|
16
17
|
chat_webhook_conflict: "chat_webhook_conflict";
|
|
17
18
|
chat_webhook_registration_failed: "chat_webhook_registration_failed";
|
|
18
|
-
checkout_evidence_mismatch: "checkout_evidence_mismatch";
|
|
19
19
|
forbidden: "forbidden";
|
|
20
20
|
function_call_conflict: "function_call_conflict";
|
|
21
21
|
idempotency_conflict: "idempotency_conflict";
|
|
@@ -35,7 +35,6 @@ export declare const apiErrorCodeSchema: z.ZodEnum<{
|
|
|
35
35
|
merchant_account_mismatch: "merchant_account_mismatch";
|
|
36
36
|
merchant_balance_required: "merchant_balance_required";
|
|
37
37
|
merchant_binding_not_found: "merchant_binding_not_found";
|
|
38
|
-
merchant_binding_required: "merchant_binding_required";
|
|
39
38
|
merchant_connection_in_use: "merchant_connection_in_use";
|
|
40
39
|
merchant_connection_not_found: "merchant_connection_not_found";
|
|
41
40
|
merchant_credential_invalid: "merchant_credential_invalid";
|
package/dist/contracts/api.js
CHANGED
|
@@ -24,10 +24,10 @@ export const apiErrorCodeSchema = z.enum([
|
|
|
24
24
|
"rate_limited",
|
|
25
25
|
"internal",
|
|
26
26
|
"service_unavailable",
|
|
27
|
-
"checkout_evidence_mismatch",
|
|
28
27
|
"subscription_already_paid",
|
|
29
28
|
"subscription_not_cancelled",
|
|
30
29
|
"agent_disabled",
|
|
30
|
+
"agent_busy",
|
|
31
31
|
"admin_agent_managed",
|
|
32
32
|
"agent_mcp_connection_not_found",
|
|
33
33
|
"agent_mcp_connections_invalid",
|
|
@@ -80,7 +80,6 @@ export const apiErrorCodeSchema = z.enum([
|
|
|
80
80
|
"merchant_provider_unavailable",
|
|
81
81
|
"merchant_customer_not_found",
|
|
82
82
|
"merchant_binding_not_found",
|
|
83
|
-
"merchant_binding_required",
|
|
84
83
|
"merchant_account_mismatch",
|
|
85
84
|
"merchant_event_not_found",
|
|
86
85
|
"merchant_event_state_conflict",
|
|
@@ -185,156 +185,3 @@ export declare const chatConnectionsResponseSchema: z.ZodObject<{
|
|
|
185
185
|
}, z.core.$strip>;
|
|
186
186
|
export type ChatConnectionsResponse = z.output<typeof chatConnectionsResponseSchema>;
|
|
187
187
|
export type RotateChatConnectionBody = z.input<typeof rotateChatConnectionBodySchema>;
|
|
188
|
-
export declare const chatDeliveryStatusSchema: z.ZodEnum<{
|
|
189
|
-
ambiguous: "ambiguous";
|
|
190
|
-
confirmed: "confirmed";
|
|
191
|
-
failed: "failed";
|
|
192
|
-
pending: "pending";
|
|
193
|
-
}>;
|
|
194
|
-
export type ChatDeliveryStatus = z.infer<typeof chatDeliveryStatusSchema>;
|
|
195
|
-
export declare const chatDeliveryListStatusSchema: z.ZodEnum<{
|
|
196
|
-
ambiguous: "ambiguous";
|
|
197
|
-
failed: "failed";
|
|
198
|
-
}>;
|
|
199
|
-
export type ChatDeliveryListStatus = z.infer<typeof chatDeliveryListStatusSchema>;
|
|
200
|
-
export declare const chatDeliverySchema: z.ZodObject<{
|
|
201
|
-
id: z.ZodString;
|
|
202
|
-
kind: z.ZodEnum<{
|
|
203
|
-
card: "card";
|
|
204
|
-
reply: "reply";
|
|
205
|
-
}>;
|
|
206
|
-
status: z.ZodEnum<{
|
|
207
|
-
ambiguous: "ambiguous";
|
|
208
|
-
confirmed: "confirmed";
|
|
209
|
-
failed: "failed";
|
|
210
|
-
pending: "pending";
|
|
211
|
-
}>;
|
|
212
|
-
attempt: z.ZodNumber;
|
|
213
|
-
credentialVersion: z.ZodNumber;
|
|
214
|
-
representation: z.ZodString;
|
|
215
|
-
diagnostic: z.ZodNullable<z.ZodString>;
|
|
216
|
-
receipts: z.ZodUnknown;
|
|
217
|
-
sessionId: z.ZodString;
|
|
218
|
-
messageId: z.ZodNullable<z.ZodString>;
|
|
219
|
-
approvalId: z.ZodNullable<z.ZodString>;
|
|
220
|
-
threadId: z.ZodString;
|
|
221
|
-
createdAt: z.ZodString;
|
|
222
|
-
updatedAt: z.ZodString;
|
|
223
|
-
}, z.core.$strip>;
|
|
224
|
-
export type ChatDelivery = z.infer<typeof chatDeliverySchema>;
|
|
225
|
-
export declare const tenantChatDeliverySchema: z.ZodObject<{
|
|
226
|
-
id: z.ZodString;
|
|
227
|
-
kind: z.ZodEnum<{
|
|
228
|
-
card: "card";
|
|
229
|
-
reply: "reply";
|
|
230
|
-
}>;
|
|
231
|
-
status: z.ZodEnum<{
|
|
232
|
-
ambiguous: "ambiguous";
|
|
233
|
-
confirmed: "confirmed";
|
|
234
|
-
failed: "failed";
|
|
235
|
-
pending: "pending";
|
|
236
|
-
}>;
|
|
237
|
-
attempt: z.ZodNumber;
|
|
238
|
-
credentialVersion: z.ZodNumber;
|
|
239
|
-
representation: z.ZodString;
|
|
240
|
-
diagnostic: z.ZodNullable<z.ZodString>;
|
|
241
|
-
receipts: z.ZodUnknown;
|
|
242
|
-
sessionId: z.ZodString;
|
|
243
|
-
messageId: z.ZodNullable<z.ZodString>;
|
|
244
|
-
approvalId: z.ZodNullable<z.ZodString>;
|
|
245
|
-
threadId: z.ZodString;
|
|
246
|
-
createdAt: z.ZodString;
|
|
247
|
-
updatedAt: z.ZodString;
|
|
248
|
-
connectionId: z.ZodString;
|
|
249
|
-
agentId: z.ZodString;
|
|
250
|
-
platform: z.ZodEnum<{
|
|
251
|
-
slack: "slack";
|
|
252
|
-
telegram: "telegram";
|
|
253
|
-
}>;
|
|
254
|
-
}, z.core.$strict>;
|
|
255
|
-
export type TenantChatDelivery = z.infer<typeof tenantChatDeliverySchema>;
|
|
256
|
-
export declare const chatDeliveriesResponseSchema: z.ZodObject<{
|
|
257
|
-
data: z.ZodArray<z.ZodObject<{
|
|
258
|
-
id: z.ZodString;
|
|
259
|
-
kind: z.ZodEnum<{
|
|
260
|
-
card: "card";
|
|
261
|
-
reply: "reply";
|
|
262
|
-
}>;
|
|
263
|
-
status: z.ZodEnum<{
|
|
264
|
-
ambiguous: "ambiguous";
|
|
265
|
-
confirmed: "confirmed";
|
|
266
|
-
failed: "failed";
|
|
267
|
-
pending: "pending";
|
|
268
|
-
}>;
|
|
269
|
-
attempt: z.ZodNumber;
|
|
270
|
-
credentialVersion: z.ZodNumber;
|
|
271
|
-
representation: z.ZodString;
|
|
272
|
-
diagnostic: z.ZodNullable<z.ZodString>;
|
|
273
|
-
receipts: z.ZodUnknown;
|
|
274
|
-
sessionId: z.ZodString;
|
|
275
|
-
messageId: z.ZodNullable<z.ZodString>;
|
|
276
|
-
approvalId: z.ZodNullable<z.ZodString>;
|
|
277
|
-
threadId: z.ZodString;
|
|
278
|
-
createdAt: z.ZodString;
|
|
279
|
-
updatedAt: z.ZodString;
|
|
280
|
-
connectionId: z.ZodString;
|
|
281
|
-
agentId: z.ZodString;
|
|
282
|
-
platform: z.ZodEnum<{
|
|
283
|
-
slack: "slack";
|
|
284
|
-
telegram: "telegram";
|
|
285
|
-
}>;
|
|
286
|
-
}, z.core.$strict>>;
|
|
287
|
-
nextCursor: z.ZodNullable<z.ZodString>;
|
|
288
|
-
}, z.core.$strip>;
|
|
289
|
-
export type ChatDeliveriesResponse = z.infer<typeof chatDeliveriesResponseSchema>;
|
|
290
|
-
export declare const chatDeliveryListSchema: z.ZodObject<{
|
|
291
|
-
data: z.ZodArray<z.ZodObject<{
|
|
292
|
-
id: z.ZodString;
|
|
293
|
-
kind: z.ZodEnum<{
|
|
294
|
-
card: "card";
|
|
295
|
-
reply: "reply";
|
|
296
|
-
}>;
|
|
297
|
-
status: z.ZodEnum<{
|
|
298
|
-
ambiguous: "ambiguous";
|
|
299
|
-
confirmed: "confirmed";
|
|
300
|
-
failed: "failed";
|
|
301
|
-
pending: "pending";
|
|
302
|
-
}>;
|
|
303
|
-
attempt: z.ZodNumber;
|
|
304
|
-
credentialVersion: z.ZodNumber;
|
|
305
|
-
representation: z.ZodString;
|
|
306
|
-
diagnostic: z.ZodNullable<z.ZodString>;
|
|
307
|
-
receipts: z.ZodUnknown;
|
|
308
|
-
sessionId: z.ZodString;
|
|
309
|
-
messageId: z.ZodNullable<z.ZodString>;
|
|
310
|
-
approvalId: z.ZodNullable<z.ZodString>;
|
|
311
|
-
threadId: z.ZodString;
|
|
312
|
-
createdAt: z.ZodString;
|
|
313
|
-
updatedAt: z.ZodString;
|
|
314
|
-
}, z.core.$strip>>;
|
|
315
|
-
nextCursor: z.ZodNullable<z.ZodString>;
|
|
316
|
-
}, z.core.$strip>;
|
|
317
|
-
export type ChatDeliveryList = z.infer<typeof chatDeliveryListSchema>;
|
|
318
|
-
export declare const repairChatDeliveryBodySchema: z.ZodObject<{
|
|
319
|
-
expectedAttempt: z.ZodNumber;
|
|
320
|
-
previousSenderStopped: z.ZodLiteral<true>;
|
|
321
|
-
acceptDuplicateRisk: z.ZodLiteral<true>;
|
|
322
|
-
}, z.core.$strict>;
|
|
323
|
-
export type RepairChatDeliveryBody = z.input<typeof repairChatDeliveryBodySchema>;
|
|
324
|
-
export declare const chatDeliveryResultSchema: z.ZodObject<{
|
|
325
|
-
id: z.ZodString;
|
|
326
|
-
sessionId: z.ZodString;
|
|
327
|
-
threadId: z.ZodString;
|
|
328
|
-
connectionId: z.ZodString;
|
|
329
|
-
kind: z.ZodEnum<{
|
|
330
|
-
card: "card";
|
|
331
|
-
reply: "reply";
|
|
332
|
-
}>;
|
|
333
|
-
status: z.ZodEnum<{
|
|
334
|
-
ambiguous: "ambiguous";
|
|
335
|
-
confirmed: "confirmed";
|
|
336
|
-
failed: "failed";
|
|
337
|
-
}>;
|
|
338
|
-
attempt: z.ZodNumber;
|
|
339
|
-
}, z.core.$strip>;
|
|
340
|
-
export type ChatDeliveryResult = z.infer<typeof chatDeliveryResultSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { agentIdSchema, chatConnectionIdSchema,
|
|
2
|
+
import { agentIdSchema, chatConnectionIdSchema, tenantIdSchema, } from "../ids.js";
|
|
3
3
|
const slackBotToken = z
|
|
4
4
|
.string()
|
|
5
5
|
.min(8)
|
|
@@ -165,65 +165,3 @@ export const chatConnectionSchema = z
|
|
|
165
165
|
export const chatConnectionsResponseSchema = z
|
|
166
166
|
.object({ chatConnections: chatConnectionSchema.array() })
|
|
167
167
|
.strip();
|
|
168
|
-
export const chatDeliveryStatusSchema = z.enum([
|
|
169
|
-
"pending",
|
|
170
|
-
"confirmed",
|
|
171
|
-
"failed",
|
|
172
|
-
"ambiguous",
|
|
173
|
-
]);
|
|
174
|
-
export const chatDeliveryListStatusSchema = z.enum(["failed", "ambiguous"]);
|
|
175
|
-
export const chatDeliverySchema = z
|
|
176
|
-
.object({
|
|
177
|
-
id: chatDeliveryIdSchema,
|
|
178
|
-
kind: z.enum(["reply", "card"]),
|
|
179
|
-
status: z.enum(["pending", "confirmed", "failed", "ambiguous"]),
|
|
180
|
-
attempt: z.number().int().nonnegative(),
|
|
181
|
-
credentialVersion: z.number().int().nonnegative(),
|
|
182
|
-
representation: z.string(),
|
|
183
|
-
diagnostic: z.string().nullable(),
|
|
184
|
-
receipts: z.unknown(),
|
|
185
|
-
sessionId: z.string(),
|
|
186
|
-
messageId: z.string().nullable(),
|
|
187
|
-
approvalId: z.string().nullable(),
|
|
188
|
-
threadId: z.string(),
|
|
189
|
-
createdAt: z.string(),
|
|
190
|
-
updatedAt: z.string(),
|
|
191
|
-
})
|
|
192
|
-
.strip();
|
|
193
|
-
export const tenantChatDeliverySchema = chatDeliverySchema
|
|
194
|
-
.extend({
|
|
195
|
-
connectionId: chatConnectionIdSchema,
|
|
196
|
-
agentId: agentIdSchema,
|
|
197
|
-
platform: z.enum(["slack", "telegram"]),
|
|
198
|
-
})
|
|
199
|
-
.strict();
|
|
200
|
-
export const chatDeliveriesResponseSchema = z
|
|
201
|
-
.object({
|
|
202
|
-
data: z.array(tenantChatDeliverySchema),
|
|
203
|
-
nextCursor: z.string().nullable(),
|
|
204
|
-
})
|
|
205
|
-
.strip();
|
|
206
|
-
export const chatDeliveryListSchema = z
|
|
207
|
-
.object({
|
|
208
|
-
data: z.array(chatDeliverySchema),
|
|
209
|
-
nextCursor: z.string().nullable(),
|
|
210
|
-
})
|
|
211
|
-
.strip();
|
|
212
|
-
export const repairChatDeliveryBodySchema = z
|
|
213
|
-
.object({
|
|
214
|
-
expectedAttempt: z.number().int().min(0).max(99),
|
|
215
|
-
previousSenderStopped: z.literal(true),
|
|
216
|
-
acceptDuplicateRisk: z.literal(true),
|
|
217
|
-
})
|
|
218
|
-
.strict();
|
|
219
|
-
export const chatDeliveryResultSchema = z
|
|
220
|
-
.object({
|
|
221
|
-
id: chatDeliveryIdSchema,
|
|
222
|
-
sessionId: z.string(),
|
|
223
|
-
threadId: z.string(),
|
|
224
|
-
connectionId: chatConnectionIdSchema,
|
|
225
|
-
kind: z.enum(["reply", "card"]),
|
|
226
|
-
status: z.enum(["confirmed", "failed", "ambiguous"]),
|
|
227
|
-
attempt: z.number().int().nonnegative(),
|
|
228
|
-
})
|
|
229
|
-
.strip();
|
|
@@ -145,9 +145,6 @@ export declare const reconnectMcpConnectionBodySchema: z.ZodDiscriminatedUnion<[
|
|
|
145
145
|
export declare const mcpOauthAuthorizationLaunchResponseSchema: z.ZodObject<{
|
|
146
146
|
authorizationUrl: z.ZodString;
|
|
147
147
|
}, z.core.$strip>;
|
|
148
|
-
export declare const approveMcpOauthAuthorizationBodySchema: z.ZodObject<{
|
|
149
|
-
setupToken: z.ZodString;
|
|
150
|
-
}, z.core.$strict>;
|
|
151
148
|
export declare const mcpConnectionLiveDetailsSchema: z.ZodObject<{
|
|
152
149
|
server: z.ZodObject<{
|
|
153
150
|
name: z.ZodString;
|
|
@@ -241,9 +241,6 @@ export const mcpOauthAuthorizationLaunchResponseSchema = z
|
|
|
241
241
|
}),
|
|
242
242
|
})
|
|
243
243
|
.strip();
|
|
244
|
-
export const approveMcpOauthAuthorizationBodySchema = z
|
|
245
|
-
.object({ setupToken: z.string().regex(OPAQUE_MCP_OAUTH_TOKEN_PATTERN) })
|
|
246
|
-
.strict();
|
|
247
244
|
export const mcpConnectionLiveDetailsSchema = z
|
|
248
245
|
.object({
|
|
249
246
|
server: z
|
|
@@ -12,10 +12,6 @@ export declare const merchantEnvironmentSchema: z.ZodEnum<{
|
|
|
12
12
|
live: "live";
|
|
13
13
|
sandbox: "sandbox";
|
|
14
14
|
}>;
|
|
15
|
-
export declare const merchantConnectionStatusSchema: z.ZodEnum<{
|
|
16
|
-
active: "active";
|
|
17
|
-
disconnected: "disconnected";
|
|
18
|
-
}>;
|
|
19
15
|
export declare const merchantGuardSchema: z.ZodObject<{
|
|
20
16
|
enabled: z.ZodBoolean;
|
|
21
17
|
productIds: z.ZodArray<z.ZodString>;
|
|
@@ -32,10 +28,6 @@ export declare const merchantConnectionSchema: z.ZodObject<{
|
|
|
32
28
|
live: "live";
|
|
33
29
|
sandbox: "sandbox";
|
|
34
30
|
}>;
|
|
35
|
-
status: z.ZodEnum<{
|
|
36
|
-
active: "active";
|
|
37
|
-
disconnected: "disconnected";
|
|
38
|
-
}>;
|
|
39
31
|
merchantAccountId: z.ZodString;
|
|
40
32
|
keyFragment: z.ZodString;
|
|
41
33
|
guard: z.ZodObject<{
|
|
@@ -59,10 +51,6 @@ export declare const merchantConnectionResponseSchema: z.ZodObject<{
|
|
|
59
51
|
live: "live";
|
|
60
52
|
sandbox: "sandbox";
|
|
61
53
|
}>;
|
|
62
|
-
status: z.ZodEnum<{
|
|
63
|
-
active: "active";
|
|
64
|
-
disconnected: "disconnected";
|
|
65
|
-
}>;
|
|
66
54
|
merchantAccountId: z.ZodString;
|
|
67
55
|
keyFragment: z.ZodString;
|
|
68
56
|
guard: z.ZodObject<{
|
|
@@ -95,10 +83,6 @@ export declare const createMerchantConnectionBodySchema: z.ZodObject<{
|
|
|
95
83
|
export type CreateMerchantConnectionBody = z.infer<typeof createMerchantConnectionBodySchema>;
|
|
96
84
|
export declare const updateMerchantConnectionBodySchema: z.ZodObject<{
|
|
97
85
|
credential: z.ZodOptional<z.ZodString>;
|
|
98
|
-
status: z.ZodOptional<z.ZodEnum<{
|
|
99
|
-
active: "active";
|
|
100
|
-
disconnected: "disconnected";
|
|
101
|
-
}>>;
|
|
102
86
|
guard: z.ZodOptional<z.ZodObject<{
|
|
103
87
|
enabled: z.ZodBoolean;
|
|
104
88
|
productIds: z.ZodArray<z.ZodString>;
|
|
@@ -143,8 +127,6 @@ export declare const merchantUsageEventStatusSchema: z.ZodEnum<{
|
|
|
143
127
|
failed: "failed";
|
|
144
128
|
incomplete: "incomplete";
|
|
145
129
|
pending: "pending";
|
|
146
|
-
uncertain: "uncertain";
|
|
147
|
-
unmapped: "unmapped";
|
|
148
130
|
}>;
|
|
149
131
|
export type MerchantUsageEventStatus = z.infer<typeof merchantUsageEventStatusSchema>;
|
|
150
132
|
export declare const merchantWorkflowIssueSchema: z.ZodEnum<{
|
|
@@ -153,7 +135,6 @@ export declare const merchantWorkflowIssueSchema: z.ZodEnum<{
|
|
|
153
135
|
recovery_exhausted: "recovery_exhausted";
|
|
154
136
|
}>;
|
|
155
137
|
export declare const merchantUsageEventNextActionSchema: z.ZodEnum<{
|
|
156
|
-
bind_and_release: "bind_and_release";
|
|
157
138
|
discard: "discard";
|
|
158
139
|
investigate: "investigate";
|
|
159
140
|
none: "none";
|
|
@@ -198,8 +179,6 @@ export declare const merchantUsageEventSchema: z.ZodObject<{
|
|
|
198
179
|
failed: "failed";
|
|
199
180
|
incomplete: "incomplete";
|
|
200
181
|
pending: "pending";
|
|
201
|
-
uncertain: "uncertain";
|
|
202
|
-
unmapped: "unmapped";
|
|
203
182
|
}>;
|
|
204
183
|
payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
205
184
|
attemptCount: z.ZodNumber;
|
|
@@ -213,7 +192,6 @@ export declare const merchantUsageEventSchema: z.ZodObject<{
|
|
|
213
192
|
recovery_exhausted: "recovery_exhausted";
|
|
214
193
|
}>>;
|
|
215
194
|
nextAction: z.ZodEnum<{
|
|
216
|
-
bind_and_release: "bind_and_release";
|
|
217
195
|
discard: "discard";
|
|
218
196
|
investigate: "investigate";
|
|
219
197
|
none: "none";
|
|
@@ -261,8 +239,6 @@ export declare const merchantUsageEventResponseSchema: z.ZodObject<{
|
|
|
261
239
|
failed: "failed";
|
|
262
240
|
incomplete: "incomplete";
|
|
263
241
|
pending: "pending";
|
|
264
|
-
uncertain: "uncertain";
|
|
265
|
-
unmapped: "unmapped";
|
|
266
242
|
}>;
|
|
267
243
|
payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
268
244
|
attemptCount: z.ZodNumber;
|
|
@@ -276,7 +252,6 @@ export declare const merchantUsageEventResponseSchema: z.ZodObject<{
|
|
|
276
252
|
recovery_exhausted: "recovery_exhausted";
|
|
277
253
|
}>>;
|
|
278
254
|
nextAction: z.ZodEnum<{
|
|
279
|
-
bind_and_release: "bind_and_release";
|
|
280
255
|
discard: "discard";
|
|
281
256
|
investigate: "investigate";
|
|
282
257
|
none: "none";
|
|
@@ -325,8 +300,6 @@ export declare const merchantUsageEventsResponseSchema: z.ZodObject<{
|
|
|
325
300
|
failed: "failed";
|
|
326
301
|
incomplete: "incomplete";
|
|
327
302
|
pending: "pending";
|
|
328
|
-
uncertain: "uncertain";
|
|
329
|
-
unmapped: "unmapped";
|
|
330
303
|
}>;
|
|
331
304
|
payload: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
332
305
|
attemptCount: z.ZodNumber;
|
|
@@ -340,7 +313,6 @@ export declare const merchantUsageEventsResponseSchema: z.ZodObject<{
|
|
|
340
313
|
recovery_exhausted: "recovery_exhausted";
|
|
341
314
|
}>>;
|
|
342
315
|
nextAction: z.ZodEnum<{
|
|
343
|
-
bind_and_release: "bind_and_release";
|
|
344
316
|
discard: "discard";
|
|
345
317
|
investigate: "investigate";
|
|
346
318
|
none: "none";
|
|
@@ -359,9 +331,7 @@ export type MerchantUsageEventsResponse = z.infer<typeof merchantUsageEventsResp
|
|
|
359
331
|
export declare const merchantUsageSummaryCountsSchema: z.ZodObject<{
|
|
360
332
|
pending: z.ZodNumber;
|
|
361
333
|
accepted: z.ZodNumber;
|
|
362
|
-
uncertain: z.ZodNumber;
|
|
363
334
|
failed: z.ZodNumber;
|
|
364
|
-
unmapped: z.ZodNumber;
|
|
365
335
|
incomplete: z.ZodNumber;
|
|
366
336
|
expired: z.ZodNumber;
|
|
367
337
|
discarded: z.ZodNumber;
|
|
@@ -376,9 +346,7 @@ export declare const merchantUsageSummarySchema: z.ZodObject<{
|
|
|
376
346
|
counts: z.ZodObject<{
|
|
377
347
|
pending: z.ZodNumber;
|
|
378
348
|
accepted: z.ZodNumber;
|
|
379
|
-
uncertain: z.ZodNumber;
|
|
380
349
|
failed: z.ZodNumber;
|
|
381
|
-
unmapped: z.ZodNumber;
|
|
382
350
|
incomplete: z.ZodNumber;
|
|
383
351
|
expired: z.ZodNumber;
|
|
384
352
|
discarded: z.ZodNumber;
|
|
@@ -401,9 +369,7 @@ export declare const merchantUsageSummaryResponseSchema: z.ZodObject<{
|
|
|
401
369
|
counts: z.ZodObject<{
|
|
402
370
|
pending: z.ZodNumber;
|
|
403
371
|
accepted: z.ZodNumber;
|
|
404
|
-
uncertain: z.ZodNumber;
|
|
405
372
|
failed: z.ZodNumber;
|
|
406
|
-
unmapped: z.ZodNumber;
|
|
407
373
|
incomplete: z.ZodNumber;
|
|
408
374
|
expired: z.ZodNumber;
|
|
409
375
|
discarded: z.ZodNumber;
|
|
@@ -10,10 +10,6 @@ import { providerTypeSchema } from "./providers.js";
|
|
|
10
10
|
*/
|
|
11
11
|
export const merchantProviderSchema = z.enum(["polar", "dodo"]);
|
|
12
12
|
export const merchantEnvironmentSchema = z.enum(["sandbox", "live"]);
|
|
13
|
-
export const merchantConnectionStatusSchema = z.enum([
|
|
14
|
-
"active",
|
|
15
|
-
"disconnected",
|
|
16
|
-
]);
|
|
17
13
|
export const merchantGuardSchema = z
|
|
18
14
|
.object({
|
|
19
15
|
enabled: z.boolean(),
|
|
@@ -34,7 +30,6 @@ export const merchantConnectionSchema = z
|
|
|
34
30
|
id: merchantConnectionIdSchema,
|
|
35
31
|
provider: merchantProviderSchema,
|
|
36
32
|
environment: merchantEnvironmentSchema,
|
|
37
|
-
status: merchantConnectionStatusSchema,
|
|
38
33
|
merchantAccountId: z.string().min(1),
|
|
39
34
|
keyFragment: providerKeyFragmentSchema,
|
|
40
35
|
guard: merchantGuardSchema,
|
|
@@ -66,9 +61,6 @@ export const updateMerchantConnectionBodySchema = z
|
|
|
66
61
|
.min(1)
|
|
67
62
|
.optional()
|
|
68
63
|
.describe("A replacement credential. It must belong to the same merchant account as the current one."),
|
|
69
|
-
status: merchantConnectionStatusSchema
|
|
70
|
-
.optional()
|
|
71
|
-
.describe("`active` sends usage events to your provider. While `disconnected`, deliveries fail and can be retried after you set it back to `active`, and turns are refused if the guard is on."),
|
|
72
64
|
guard: merchantGuardSchema
|
|
73
65
|
.optional()
|
|
74
66
|
.describe("The complete guard configuration, replacing the current one."),
|
|
@@ -103,8 +95,6 @@ export const merchantUsageEventStatusSchema = z.enum([
|
|
|
103
95
|
"pending",
|
|
104
96
|
"accepted",
|
|
105
97
|
"failed",
|
|
106
|
-
"uncertain",
|
|
107
|
-
"unmapped",
|
|
108
98
|
"incomplete",
|
|
109
99
|
"discarded",
|
|
110
100
|
"expired",
|
|
@@ -118,7 +108,6 @@ export const merchantUsageEventNextActionSchema = z.enum([
|
|
|
118
108
|
"none",
|
|
119
109
|
"wait",
|
|
120
110
|
"retry",
|
|
121
|
-
"bind_and_release",
|
|
122
111
|
"investigate",
|
|
123
112
|
"discard",
|
|
124
113
|
]);
|
|
@@ -169,9 +158,7 @@ export const merchantUsageSummaryCountsSchema = z
|
|
|
169
158
|
.object({
|
|
170
159
|
pending: z.number().int().nonnegative(),
|
|
171
160
|
accepted: z.number().int().nonnegative(),
|
|
172
|
-
uncertain: z.number().int().nonnegative(),
|
|
173
161
|
failed: z.number().int().nonnegative(),
|
|
174
|
-
unmapped: z.number().int().nonnegative(),
|
|
175
162
|
incomplete: z.number().int().nonnegative(),
|
|
176
163
|
expired: z.number().int().nonnegative(),
|
|
177
164
|
discarded: z.number().int().nonnegative(),
|
|
@@ -219,10 +206,7 @@ export function merchantUsageEventNextAction(event) {
|
|
|
219
206
|
case "pending":
|
|
220
207
|
return event.workflowIssue === null ? "wait" : "retry";
|
|
221
208
|
case "failed":
|
|
222
|
-
case "uncertain":
|
|
223
209
|
return "retry";
|
|
224
|
-
case "unmapped":
|
|
225
|
-
return "bind_and_release";
|
|
226
210
|
case "incomplete":
|
|
227
211
|
return "investigate";
|
|
228
212
|
case "expired":
|
|
@@ -2,9 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const sessionInputStateSchema: z.ZodEnum<{
|
|
3
3
|
accepted: "accepted";
|
|
4
4
|
committed: "committed";
|
|
5
|
-
delivered: "delivered";
|
|
6
5
|
not_placed: "not_placed";
|
|
7
|
-
uncertain: "uncertain";
|
|
8
6
|
}>;
|
|
9
7
|
export declare const sessionInputRequestIdSchema: z.ZodString;
|
|
10
8
|
export declare const sessionInputSchema: z.ZodObject<{
|
|
@@ -21,9 +19,7 @@ export declare const sessionInputSchema: z.ZodObject<{
|
|
|
21
19
|
state: z.ZodEnum<{
|
|
22
20
|
accepted: "accepted";
|
|
23
21
|
committed: "committed";
|
|
24
|
-
delivered: "delivered";
|
|
25
22
|
not_placed: "not_placed";
|
|
26
|
-
uncertain: "uncertain";
|
|
27
23
|
}>;
|
|
28
24
|
turnId: z.ZodString;
|
|
29
25
|
createdAt: z.ZodISODateTime;
|
|
@@ -59,9 +55,7 @@ export declare const sessionInputResponseSchema: z.ZodObject<{
|
|
|
59
55
|
state: z.ZodEnum<{
|
|
60
56
|
accepted: "accepted";
|
|
61
57
|
committed: "committed";
|
|
62
|
-
delivered: "delivered";
|
|
63
58
|
not_placed: "not_placed";
|
|
64
|
-
uncertain: "uncertain";
|
|
65
59
|
}>;
|
|
66
60
|
turnId: z.ZodString;
|
|
67
61
|
createdAt: z.ZodISODateTime;
|
|
@@ -98,9 +92,7 @@ export declare const sessionInputsResponseSchema: z.ZodObject<{
|
|
|
98
92
|
state: z.ZodEnum<{
|
|
99
93
|
accepted: "accepted";
|
|
100
94
|
committed: "committed";
|
|
101
|
-
delivered: "delivered";
|
|
102
95
|
not_placed: "not_placed";
|
|
103
|
-
uncertain: "uncertain";
|
|
104
96
|
}>;
|
|
105
97
|
turnId: z.ZodString;
|
|
106
98
|
createdAt: z.ZodISODateTime;
|
|
@@ -3,10 +3,8 @@ import { turnIdSchema } from "../ids.js";
|
|
|
3
3
|
import { sessionMessageSchema } from "./sessions.js";
|
|
4
4
|
export const sessionInputStateSchema = z.enum([
|
|
5
5
|
"accepted",
|
|
6
|
-
"delivered",
|
|
7
6
|
"committed",
|
|
8
7
|
"not_placed",
|
|
9
|
-
"uncertain",
|
|
10
8
|
]);
|
|
11
9
|
export const sessionInputRequestIdSchema = z
|
|
12
10
|
.string()
|
|
@@ -368,7 +368,7 @@ export declare const turnStreamErrorEventSchema: z.ZodObject<{
|
|
|
368
368
|
type: z.ZodLiteral<"data-ba-error">;
|
|
369
369
|
transient: z.ZodLiteral<true>;
|
|
370
370
|
data: z.ZodObject<{
|
|
371
|
-
code: z.ZodCustom<"admin_agent_managed" | "agent_disabled" | "agent_mcp_connection_not_found" | "agent_mcp_connections_invalid" | "api_key_limit_reached" | "artifact_session_cap_reached" | "chat_webhook_conflict" | "chat_webhook_registration_failed" | "
|
|
371
|
+
code: z.ZodCustom<"admin_agent_managed" | "agent_busy" | "agent_disabled" | "agent_mcp_connection_not_found" | "agent_mcp_connections_invalid" | "api_key_limit_reached" | "artifact_session_cap_reached" | "chat_webhook_conflict" | "chat_webhook_registration_failed" | "forbidden" | "function_call_conflict" | "idempotency_conflict" | "input_idempotency_conflict" | "insufficient_scope" | "internal" | "invalid_cursor" | "invalid_request" | "mcp_connection_authentication_failed" | "mcp_connection_discovery_failed" | "mcp_connection_in_use" | "mcp_connection_invalid" | "mcp_connection_limit_reached" | "mcp_connection_name_conflict" | "mcp_connection_stale_credential_version" | "mcp_connection_unreachable" | "merchant_account_mismatch" | "merchant_balance_required" | "merchant_binding_not_found" | "merchant_connection_in_use" | "merchant_connection_not_found" | "merchant_credential_invalid" | "merchant_customer_not_found" | "merchant_customer_unmapped" | "merchant_eligibility_unavailable" | "merchant_event_not_found" | "merchant_event_state_conflict" | "merchant_provider_unavailable" | "merchant_subscription_required" | "message_id_conflict" | "message_not_found" | "model_discovery_unsupported" | "model_not_found" | "model_spending_limit_exceeded" | "model_validation_unavailable" | "not_found" | "prompt_variable_missing" | "prompt_variable_unknown" | "provider_historical_use" | "provider_in_use" | "provider_limit_reached" | "provider_name_conflict" | "provider_not_found" | "provider_required" | "quota_exceeded" | "rate_limited" | "service_unavailable" | "session_busy" | "session_fork_deleted" | "session_fork_unavailable" | "session_turn_unresponsive" | "session_version_mismatch" | "skill_invalid_archive" | "skill_invalid_markdown" | "skill_limit_reached" | "skill_name_conflict" | "skill_not_found" | "skill_too_many_files" | "skill_uncompressed_too_large" | "steer_not_available" | "subscription_already_paid" | "subscription_not_cancelled" | "subscription_required" | "task_active_run_exists" | "tenant_deleting" | "tenant_deletion_in_progress" | "tenant_deletion_not_ready" | "tenant_not_deleting" | "tool_approval_continuation_settled" | "tool_approval_decision_conflict" | "turn_interrupted" | "unauthorized" | "usage_credit_required" | "validation_failed" | "workspace_busy" | "workspace_in_use" | "workspace_not_found" | (string & {}), "admin_agent_managed" | "agent_busy" | "agent_disabled" | "agent_mcp_connection_not_found" | "agent_mcp_connections_invalid" | "api_key_limit_reached" | "artifact_session_cap_reached" | "chat_webhook_conflict" | "chat_webhook_registration_failed" | "forbidden" | "function_call_conflict" | "idempotency_conflict" | "input_idempotency_conflict" | "insufficient_scope" | "internal" | "invalid_cursor" | "invalid_request" | "mcp_connection_authentication_failed" | "mcp_connection_discovery_failed" | "mcp_connection_in_use" | "mcp_connection_invalid" | "mcp_connection_limit_reached" | "mcp_connection_name_conflict" | "mcp_connection_stale_credential_version" | "mcp_connection_unreachable" | "merchant_account_mismatch" | "merchant_balance_required" | "merchant_binding_not_found" | "merchant_connection_in_use" | "merchant_connection_not_found" | "merchant_credential_invalid" | "merchant_customer_not_found" | "merchant_customer_unmapped" | "merchant_eligibility_unavailable" | "merchant_event_not_found" | "merchant_event_state_conflict" | "merchant_provider_unavailable" | "merchant_subscription_required" | "message_id_conflict" | "message_not_found" | "model_discovery_unsupported" | "model_not_found" | "model_spending_limit_exceeded" | "model_validation_unavailable" | "not_found" | "prompt_variable_missing" | "prompt_variable_unknown" | "provider_historical_use" | "provider_in_use" | "provider_limit_reached" | "provider_name_conflict" | "provider_not_found" | "provider_required" | "quota_exceeded" | "rate_limited" | "service_unavailable" | "session_busy" | "session_fork_deleted" | "session_fork_unavailable" | "session_turn_unresponsive" | "session_version_mismatch" | "skill_invalid_archive" | "skill_invalid_markdown" | "skill_limit_reached" | "skill_name_conflict" | "skill_not_found" | "skill_too_many_files" | "skill_uncompressed_too_large" | "steer_not_available" | "subscription_already_paid" | "subscription_not_cancelled" | "subscription_required" | "task_active_run_exists" | "tenant_deleting" | "tenant_deletion_in_progress" | "tenant_deletion_not_ready" | "tenant_not_deleting" | "tool_approval_continuation_settled" | "tool_approval_decision_conflict" | "turn_interrupted" | "unauthorized" | "usage_credit_required" | "validation_failed" | "workspace_busy" | "workspace_in_use" | "workspace_not_found" | (string & {})>;
|
|
372
372
|
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
373
373
|
message: z.ZodString;
|
|
374
374
|
}, z.core.$strict>;
|
|
@@ -31,7 +31,6 @@ export declare const spendingLimitPeriodSchema: z.ZodObject<{
|
|
|
31
31
|
startsAt: z.ZodISODateTime;
|
|
32
32
|
endsAt: z.ZodISODateTime;
|
|
33
33
|
spentUsd: z.ZodNumber;
|
|
34
|
-
reservedUsd: z.ZodNumber;
|
|
35
34
|
availableUsd: z.ZodNumber;
|
|
36
35
|
}, z.core.$strict>;
|
|
37
36
|
export declare const spendingLimitResponseSchema: z.ZodObject<{
|
|
@@ -49,7 +48,6 @@ export declare const spendingLimitResponseSchema: z.ZodObject<{
|
|
|
49
48
|
startsAt: z.ZodISODateTime;
|
|
50
49
|
endsAt: z.ZodISODateTime;
|
|
51
50
|
spentUsd: z.ZodNumber;
|
|
52
|
-
reservedUsd: z.ZodNumber;
|
|
53
51
|
availableUsd: z.ZodNumber;
|
|
54
52
|
}, z.core.$strict>>;
|
|
55
53
|
nextResetAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -62,12 +60,9 @@ export declare const spendingLimitStopDetailsSchema: z.ZodObject<{
|
|
|
62
60
|
}>;
|
|
63
61
|
reason: z.ZodEnum<{
|
|
64
62
|
exhausted: "exhausted";
|
|
65
|
-
reserved: "reserved";
|
|
66
|
-
unknown_usage: "unknown_usage";
|
|
67
63
|
unpriced: "unpriced";
|
|
68
64
|
}>;
|
|
69
65
|
spentUsd: z.ZodNumber;
|
|
70
|
-
reservedUsd: z.ZodNumber;
|
|
71
66
|
availableUsd: z.ZodNumber;
|
|
72
67
|
nextResetAt: z.ZodNullable<z.ZodISODateTime>;
|
|
73
68
|
}, z.core.$strict>;
|
|
@@ -25,7 +25,6 @@ export const spendingLimitPeriodSchema = z
|
|
|
25
25
|
startsAt: z.iso.datetime({ offset: true }),
|
|
26
26
|
endsAt: z.iso.datetime({ offset: true }),
|
|
27
27
|
spentUsd: z.number().nonnegative(),
|
|
28
|
-
reservedUsd: z.number().nonnegative(),
|
|
29
28
|
availableUsd: z.number().nonnegative(),
|
|
30
29
|
})
|
|
31
30
|
.strict();
|
|
@@ -40,9 +39,8 @@ export const spendingLimitResponseSchema = z
|
|
|
40
39
|
export const spendingLimitStopDetailsSchema = z
|
|
41
40
|
.object({
|
|
42
41
|
scope: z.enum(["agent", "tenant", "both"]),
|
|
43
|
-
reason: z.enum(["exhausted", "
|
|
42
|
+
reason: z.enum(["exhausted", "unpriced"]),
|
|
44
43
|
spentUsd: z.number().nonnegative(),
|
|
45
|
-
reservedUsd: z.number().nonnegative(),
|
|
46
44
|
availableUsd: z.number().nonnegative(),
|
|
47
45
|
nextResetAt: z.iso.datetime({ offset: true }).nullable(),
|
|
48
46
|
})
|
package/dist/contracts/ids.d.ts
CHANGED
|
@@ -23,4 +23,3 @@ export declare const skillIdSchema: z.ZodString;
|
|
|
23
23
|
export declare const apiKeyTokenSchema: z.ZodString;
|
|
24
24
|
export declare const providerKeyFragmentSchema: z.ZodString;
|
|
25
25
|
export declare const chatConnectionIdSchema: z.ZodString;
|
|
26
|
-
export declare const chatDeliveryIdSchema: z.ZodString;
|
package/dist/contracts/ids.js
CHANGED
|
@@ -32,4 +32,3 @@ export const apiKeyTokenSchema = z
|
|
|
32
32
|
// Provider key fragment — last 4 chars of the secret, display-only.
|
|
33
33
|
export const providerKeyFragmentSchema = z.string().min(1).max(4);
|
|
34
34
|
export const chatConnectionIdSchema = z.string().regex(/^cc_[0-9A-Za-z]{16}$/);
|
|
35
|
-
export const chatDeliveryIdSchema = z.string().regex(/^cd_[0-9A-Za-z]{16}$/);
|
|
@@ -10,12 +10,12 @@ export { artifactDownloadUrlResponseSchema, artifactFilenameSchema, artifactList
|
|
|
10
10
|
export { attributionCreateInputSchema, metadataSchema, userIdSchema, } from "./entities/attribution.ts";
|
|
11
11
|
export type { ChatFunctionCallEvent, ChatFunctionDefinition, ChatFunctionDefinitions, ChatFunctionOutcome, ClaimChatFunctionBody, PromptVariables, ResolveChatFunctionBody, UsageSummary, } from "./entities/chat.ts";
|
|
12
12
|
export { blazingAgentsChatMessageMetadataSchema, chatFunctionCallEventSchema, chatFunctionDefinitionSchema, chatFunctionDefinitionsSchema, chatFunctionOutcomeSchema, chatModeSchema, chatRequestBodySchema, chatTriggerSchema, claimChatFunctionBodySchema, claimChatFunctionResponseSchema, generationRequestBodySchema, jsonSchemaShapeSchema, MAX_CHAT_FUNCTION_DEFINITIONS_BYTES, MAX_CHAT_FUNCTION_PAYLOAD_BYTES, MAX_CHAT_FUNCTIONS, promptVariablesSchema, resolveChatFunctionBodySchema, resolveChatFunctionResponseSchema, usageSummarySchema, } from "./entities/chat.ts";
|
|
13
|
-
export { chatConfigurationSchema, chatConnectionSchema, chatConnectionsResponseSchema, chatCredentialsSchema,
|
|
13
|
+
export { chatConfigurationSchema, chatConnectionSchema, chatConnectionsResponseSchema, chatCredentialsSchema, chatHealthCheckSchema, chatHealthSchema, chatIdentitySchema, createChatConnectionBodySchema, rotateChatConnectionBodySchema, updateChatConnectionBodySchema, } from "./entities/chat-connections.ts";
|
|
14
14
|
export type { McpConnectionLiveDetails, McpConnectionTestErrorCode, } from "./entities/mcp-connections.ts";
|
|
15
|
-
export {
|
|
15
|
+
export { createMcpConnectionBodySchema, forwardedMetadataKeysSchema, mcpAttachmentResponseSchema, mcpAttachmentsResponseSchema, mcpConnectionAuthTypeSchema, mcpConnectionLiveDetailsSchema, mcpConnectionReconnectResultSchema, mcpConnectionResponseSchema, mcpConnectionStatusSchema, mcpConnectionsResponseSchema, mcpConnectionTestErrorCodeSchema, mcpConnectionTestResponseSchema, mcpOauthAuthorizationLaunchResponseSchema, reconnectMcpConnectionBodySchema, updateMcpAttachmentBodySchema, updateMcpConnectionBodySchema, } from "./entities/mcp-connections.ts";
|
|
16
16
|
export type { CreateMemoryBody, Memory, UpdateMemoryBody, } from "./entities/memories.ts";
|
|
17
17
|
export { createMemoryBodySchema, memoriesListResponseSchema, memoryResponseSchema, memorySchema, memoryTextSchema, updateMemoryBodySchema, } from "./entities/memories.ts";
|
|
18
|
-
export { createMerchantConnectionBodySchema, merchantBindingResponseSchema, merchantBindingsResponseSchema, merchantConnectionResponseSchema, merchantConnectionSchema,
|
|
18
|
+
export { createMerchantConnectionBodySchema, merchantBindingResponseSchema, merchantBindingsResponseSchema, merchantConnectionResponseSchema, merchantConnectionSchema, merchantCustomerBindingSchema, merchantEnvironmentSchema, merchantGuardSchema, merchantProviderSchema, merchantUsageEventNextAction, merchantUsageEventNextActionSchema, merchantUsageEventResponseSchema, merchantUsageEventSchema, merchantUsageEventStatusSchema, merchantUsageEventsResponseSchema, merchantUsageSummaryQuerySchema, merchantUsageSummaryResponseSchema, merchantUsageSummarySchema, merchantWorkflowIssueSchema, updateMerchantConnectionBodySchema, upsertMerchantBindingBodySchema, } from "./entities/merchant.ts";
|
|
19
19
|
export { createPromptBodySchema, parsePromptVariables, promptResponseSchema, promptsListQuerySchema, promptsResponseSchema, promptTemplateSchema, renderPromptTemplate, updatePromptBodySchema, } from "./entities/prompts.ts";
|
|
20
20
|
export { createProviderBodySchema, providerListItemSchema, providerModelsResponseSchema, providerResponseSchema, providersResponseSchema, providerTypeSchema, thinkingLevelsResponseSchema, updateProviderBodySchema, } from "./entities/providers.ts";
|
|
21
21
|
export type { ChatSteerConsumedEvent, SessionActivity, SessionInput, SessionInputResponse, SessionInputState, SessionInputsQuery, SessionInputsResponse, StopSessionBody, StopSessionResponse, SubmitSessionInputBody, } from "./entities/session-inputs.ts";
|
|
@@ -33,4 +33,4 @@ export type { SessionUsageQuery, SessionUsageResponse, UsageBucket, UsageOvervie
|
|
|
33
33
|
export { sessionUsageQuerySchema, sessionUsageResponseSchema, usageOverviewQuerySchema, usageOverviewResponseSchema, usageResponseSchema, } from "./entities/usage.ts";
|
|
34
34
|
export type { WorkspaceTier } from "./entities/workspaces.ts";
|
|
35
35
|
export { createWorkspaceBodySchema, updateWorkspaceBodySchema, workspaceNetworkPolicySchema, workspaceSchema, workspacesListResponseSchema, workspaceTierSchema, } from "./entities/workspaces.ts";
|
|
36
|
-
export { agentIdSchema, apiKeyTokenSchema,
|
|
36
|
+
export { agentIdSchema, apiKeyTokenSchema, functionCallIdSchema, isAdminAgentId, merchantUsageEventIdSchema, promptIdSchema, sessionIdSchema, } from "./ids.ts";
|
package/dist/contracts/index.js
CHANGED
|
@@ -7,10 +7,10 @@ export { agentConfigSchema, agentInstructionsSchema, agentModelIdSchema, agentRe
|
|
|
7
7
|
export { artifactDownloadUrlResponseSchema, artifactFilenameSchema, artifactListItemSchema, artifactsListResponseSchema, } from "./entities/artifacts.js";
|
|
8
8
|
export { attributionCreateInputSchema, metadataSchema, userIdSchema, } from "./entities/attribution.js";
|
|
9
9
|
export { blazingAgentsChatMessageMetadataSchema, chatFunctionCallEventSchema, chatFunctionDefinitionSchema, chatFunctionDefinitionsSchema, chatFunctionOutcomeSchema, chatModeSchema, chatRequestBodySchema, chatTriggerSchema, claimChatFunctionBodySchema, claimChatFunctionResponseSchema, generationRequestBodySchema, jsonSchemaShapeSchema, MAX_CHAT_FUNCTION_DEFINITIONS_BYTES, MAX_CHAT_FUNCTION_PAYLOAD_BYTES, MAX_CHAT_FUNCTIONS, promptVariablesSchema, resolveChatFunctionBodySchema, resolveChatFunctionResponseSchema, usageSummarySchema, } from "./entities/chat.js";
|
|
10
|
-
export { chatConfigurationSchema, chatConnectionSchema, chatConnectionsResponseSchema, chatCredentialsSchema,
|
|
11
|
-
export {
|
|
10
|
+
export { chatConfigurationSchema, chatConnectionSchema, chatConnectionsResponseSchema, chatCredentialsSchema, chatHealthCheckSchema, chatHealthSchema, chatIdentitySchema, createChatConnectionBodySchema, rotateChatConnectionBodySchema, updateChatConnectionBodySchema, } from "./entities/chat-connections.js";
|
|
11
|
+
export { createMcpConnectionBodySchema, forwardedMetadataKeysSchema, mcpAttachmentResponseSchema, mcpAttachmentsResponseSchema, mcpConnectionAuthTypeSchema, mcpConnectionLiveDetailsSchema, mcpConnectionReconnectResultSchema, mcpConnectionResponseSchema, mcpConnectionStatusSchema, mcpConnectionsResponseSchema, mcpConnectionTestErrorCodeSchema, mcpConnectionTestResponseSchema, mcpOauthAuthorizationLaunchResponseSchema, reconnectMcpConnectionBodySchema, updateMcpAttachmentBodySchema, updateMcpConnectionBodySchema, } from "./entities/mcp-connections.js";
|
|
12
12
|
export { createMemoryBodySchema, memoriesListResponseSchema, memoryResponseSchema, memorySchema, memoryTextSchema, updateMemoryBodySchema, } from "./entities/memories.js";
|
|
13
|
-
export { createMerchantConnectionBodySchema, merchantBindingResponseSchema, merchantBindingsResponseSchema, merchantConnectionResponseSchema, merchantConnectionSchema,
|
|
13
|
+
export { createMerchantConnectionBodySchema, merchantBindingResponseSchema, merchantBindingsResponseSchema, merchantConnectionResponseSchema, merchantConnectionSchema, merchantCustomerBindingSchema, merchantEnvironmentSchema, merchantGuardSchema, merchantProviderSchema, merchantUsageEventNextAction, merchantUsageEventNextActionSchema, merchantUsageEventResponseSchema, merchantUsageEventSchema, merchantUsageEventStatusSchema, merchantUsageEventsResponseSchema, merchantUsageSummaryQuerySchema, merchantUsageSummaryResponseSchema, merchantUsageSummarySchema, merchantWorkflowIssueSchema, updateMerchantConnectionBodySchema, upsertMerchantBindingBodySchema, } from "./entities/merchant.js";
|
|
14
14
|
export { createPromptBodySchema, parsePromptVariables, promptResponseSchema, promptsListQuerySchema, promptsResponseSchema, promptTemplateSchema, renderPromptTemplate, updatePromptBodySchema, } from "./entities/prompts.js";
|
|
15
15
|
export { createProviderBodySchema, providerListItemSchema, providerModelsResponseSchema, providerResponseSchema, providersResponseSchema, providerTypeSchema, thinkingLevelsResponseSchema, updateProviderBodySchema, } from "./entities/providers.js";
|
|
16
16
|
export { chatSteerConsumedEventSchema, sessionActivitySchema, sessionInputRequestIdSchema, sessionInputResponseSchema, sessionInputSchema, sessionInputStateSchema, sessionInputsQuerySchema, sessionInputsResponseSchema, stopSessionBodySchema, stopSessionResponseSchema, submitSessionInputBodySchema, } from "./entities/session-inputs.js";
|
|
@@ -21,4 +21,4 @@ export { createTaskBodySchema, createTaskResponseSchema, createTaskRunBodySchema
|
|
|
21
21
|
export { quotaSchema, tenantDeletionSchema, tenantSettingsResponseSchema, updateTenantSettingsBodySchema, } from "./entities/tenants.js";
|
|
22
22
|
export { sessionUsageQuerySchema, sessionUsageResponseSchema, usageOverviewQuerySchema, usageOverviewResponseSchema, usageResponseSchema, } from "./entities/usage.js";
|
|
23
23
|
export { createWorkspaceBodySchema, updateWorkspaceBodySchema, workspaceNetworkPolicySchema, workspaceSchema, workspacesListResponseSchema, workspaceTierSchema, } from "./entities/workspaces.js";
|
|
24
|
-
export { agentIdSchema, apiKeyTokenSchema,
|
|
24
|
+
export { agentIdSchema, apiKeyTokenSchema, functionCallIdSchema, isAdminAgentId, merchantUsageEventIdSchema, promptIdSchema, sessionIdSchema, } from "./ids.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { AGENT_TOOL_FILE_ACCESS_TAGS, AGENT_TOOL_GROUPS, AGENT_TOOL_TAGS, AGENT_
|
|
|
11
11
|
export type { Agent, AgentConfig, AgentResponse, AgentsListQuery, AgentsResponse, CreateAgentBody, UpdateAgentBody, } from "./contracts/entities/agents.ts";
|
|
12
12
|
export { agentConfigSchema } from "./contracts/entities/agents.ts";
|
|
13
13
|
export type { ArtifactDownloadUrlResponse, ArtifactListItem, ArtifactsListResponse, } from "./contracts/entities/artifacts.ts";
|
|
14
|
-
export type { ChatConfiguration, ChatConnection, ChatConnectionsResponse, ChatCredentials,
|
|
14
|
+
export type { ChatConfiguration, ChatConnection, ChatConnectionsResponse, ChatCredentials, ChatHealth, ChatIdentity, CreateChatConnectionBody, RotateChatConnectionBody, UpdateChatConnectionBody, } from "./contracts/entities/chat-connections.ts";
|
|
15
15
|
export type { CreateMcpConnectionBody, McpAttachmentResponse, McpAttachmentsResponse, McpConnectionAuthType, McpConnectionReconnectResult, McpConnectionResponse, McpConnectionStatus, McpConnectionTestResponse, ReconnectMcpConnectionBody, UpdateMcpAttachmentBody, UpdateMcpConnectionBody, } from "./contracts/entities/mcp-connections.ts";
|
|
16
16
|
export type { CreateMerchantConnectionBody, MerchantBindingResponse, MerchantBindingsResponse, MerchantConnection, MerchantConnectionResponse, MerchantCustomerBinding, MerchantGuard, MerchantProviderKind, MerchantUsageEvent, MerchantUsageEventResponse, MerchantUsageEventStatus, MerchantUsageEventsResponse, MerchantUsageSummary, MerchantUsageSummaryResponse, UpdateMerchantConnectionBody, UpsertMerchantBindingBody, } from "./contracts/entities/merchant.ts";
|
|
17
17
|
export type { CreatePromptBody, PromptResponse, PromptsListQuery, PromptsResponse, UpdatePromptBody, } from "./contracts/entities/prompts.ts";
|
|
@@ -31,7 +31,6 @@ export { createChatRelay, createCompletionRelay, type RelayContext, type Session
|
|
|
31
31
|
export type { AgentsListOptions, AgentsResource, UserAgentsResource, } from "./resources/agents.ts";
|
|
32
32
|
export type { ArtifactsResource } from "./resources/artifacts.ts";
|
|
33
33
|
export type { ChatConnectionsResource } from "./resources/chat-connections.ts";
|
|
34
|
-
export type { ChatDeliveriesListOptions, ChatDeliveriesResource, } from "./resources/chat-deliveries.ts";
|
|
35
34
|
export type { McpConnectionsResource } from "./resources/mcp-connections.ts";
|
|
36
35
|
export type { MemoriesListOptions, MemoriesResource, } from "./resources/memories.ts";
|
|
37
36
|
export type { MerchantBindingsListOptions, MerchantBindingsResource, } from "./resources/merchant-bindings.ts";
|
|
@@ -16,7 +16,7 @@ export interface AgentsResource {
|
|
|
16
16
|
* Deletes the Agent while preserving its attached Workspace.
|
|
17
17
|
* @param input - `agentId`; optional abortSignal; includeArtifacts controls Artifact deletion.
|
|
18
18
|
* @returns Resolves when the operation completes.
|
|
19
|
-
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
19
|
+
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response; `agent_busy` (409) while the Agent has a live Turn or a queued or running Task run.
|
|
20
20
|
*/
|
|
21
21
|
delete(input: {
|
|
22
22
|
agentId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ChatConnection, type ChatConnectionsResponse, type
|
|
1
|
+
import { type ChatConnection, type ChatConnectionsResponse, type CreateChatConnectionBody, type RotateChatConnectionBody, type UpdateChatConnectionBody } from "../contracts/entities/chat-connections.ts";
|
|
2
2
|
import type { HttpConfig, ResourceRequestOptions } from "../types.ts";
|
|
3
3
|
export interface ChatConnectionsResource {
|
|
4
4
|
/**
|
|
@@ -60,35 +60,6 @@ export interface ChatConnectionsResource {
|
|
|
60
60
|
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
61
61
|
*/
|
|
62
62
|
list(input?: ResourceRequestOptions): Promise<ChatConnectionsResponse>;
|
|
63
|
-
/**
|
|
64
|
-
* Lists one page of the replies and approval cards the Chat Connection has
|
|
65
|
-
* sent or tried to send, newest first, in every status. Pass `nextCursor`
|
|
66
|
-
* as `cursor` to fetch older records.
|
|
67
|
-
* @param input - `chatConnectionId`; optional `cursor`, `limit` (1 to 100, default 100), and abortSignal.
|
|
68
|
-
* @returns The page of chat deliveries.
|
|
69
|
-
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
70
|
-
*/
|
|
71
|
-
listDeliveries(input: {
|
|
72
|
-
chatConnectionId: string;
|
|
73
|
-
cursor?: string;
|
|
74
|
-
limit?: number;
|
|
75
|
-
} & ResourceRequestOptions): Promise<ChatDeliveryList>;
|
|
76
|
-
/**
|
|
77
|
-
* Sends a stuck reply or approval card again, without running a turn or
|
|
78
|
-
* tool. Use it when the previous send stopped before its outcome was known.
|
|
79
|
-
* Pass the delivery's current `attempt` as `expectedAttempt`; the repair is
|
|
80
|
-
* refused if it has changed. `previousSenderStopped` and
|
|
81
|
-
* `acceptDuplicateRisk` must be `true`: the message can appear twice. The
|
|
82
|
-
* connection must be enabled. Check `status` in the result, because a
|
|
83
|
-
* successful request does not by itself mean the message was delivered.
|
|
84
|
-
* @param input - `chatConnectionId`, `deliveryId`, the repair confirmations, and optional abortSignal.
|
|
85
|
-
* @returns The delivery outcome.
|
|
86
|
-
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
87
|
-
*/
|
|
88
|
-
repairDelivery(input: RepairChatDeliveryBody & {
|
|
89
|
-
chatConnectionId: string;
|
|
90
|
-
deliveryId: string;
|
|
91
|
-
} & ResourceRequestOptions): Promise<ChatDeliveryResult>;
|
|
92
63
|
/**
|
|
93
64
|
* Replaces the Chat Connection credentials.
|
|
94
65
|
* @param input - `chatConnectionId`; fields to change; optional abortSignal.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { chatConnectionSchema, chatConnectionsResponseSchema,
|
|
1
|
+
import { chatConnectionSchema, chatConnectionsResponseSchema, } from "../contracts/entities/chat-connections.js";
|
|
2
2
|
import { apiPath, requestJson } from "../http.js";
|
|
3
3
|
/**
|
|
4
4
|
* Builds the Chat Connections operations using the shared HTTP configuration.
|
|
@@ -40,17 +40,6 @@ export function createChatConnectionsResource(config) {
|
|
|
40
40
|
async checkHealth({ chatConnectionId, abortSignal }) {
|
|
41
41
|
return await requestJson(config, apiPath `/v1/chat-connections/${chatConnectionId}/health`, { credentialBearing: true, signal: abortSignal, method: "POST" }, chatConnectionSchema);
|
|
42
42
|
},
|
|
43
|
-
async listDeliveries({ chatConnectionId, abortSignal, ...query }) {
|
|
44
|
-
return await requestJson(config, apiPath `/v1/chat-connections/${chatConnectionId}/deliveries`, { credentialBearing: true, signal: abortSignal, query }, chatDeliveryListSchema);
|
|
45
|
-
},
|
|
46
|
-
async repairDelivery({ chatConnectionId, deliveryId, abortSignal, ...body }) {
|
|
47
|
-
return await requestJson(config, apiPath `/v1/chat-connections/${chatConnectionId}/deliveries/${deliveryId}/repair`, {
|
|
48
|
-
credentialBearing: true,
|
|
49
|
-
signal: abortSignal,
|
|
50
|
-
method: "POST",
|
|
51
|
-
json: body,
|
|
52
|
-
}, chatDeliveryResultSchema);
|
|
53
|
-
},
|
|
54
43
|
async enable({ chatConnectionId, abortSignal }) {
|
|
55
44
|
return await requestJson(config, apiPath `/v1/chat-connections/${chatConnectionId}/enable`, { credentialBearing: true, signal: abortSignal, method: "POST" }, chatConnectionSchema);
|
|
56
45
|
},
|
|
@@ -7,7 +7,7 @@ export interface MerchantUsageEventsListOptions extends ResourceRequestOptions {
|
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* `client.merchantUsageEvents` — the immutable delivery ledger behind
|
|
10
|
-
* `/v1/merchant-usage-events`. `retry
|
|
10
|
+
* `/v1/merchant-usage-events`. `retry` and `discard` are the
|
|
11
11
|
* operator actions on unresolved events.
|
|
12
12
|
*/
|
|
13
13
|
export interface MerchantUsageEventsResource {
|
|
@@ -37,16 +37,7 @@ export interface MerchantUsageEventsResource {
|
|
|
37
37
|
*/
|
|
38
38
|
list(input?: MerchantUsageEventsListOptions): Promise<MerchantUsageEventsResponse>;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
41
|
-
* @param input - `eventId`; optional abortSignal.
|
|
42
|
-
* @returns The merchant usage event response.
|
|
43
|
-
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
44
|
-
*/
|
|
45
|
-
release(input: {
|
|
46
|
-
eventId: string;
|
|
47
|
-
} & ResourceRequestOptions): Promise<MerchantUsageEventResponse>;
|
|
48
|
-
/**
|
|
49
|
-
* Retries delivery of the merchant usage event.
|
|
40
|
+
* Sends a `failed` event, or a `pending` event whose automatic delivery gave up, to the provider again. Retrying is safe: the provider drops duplicates by the event ID.
|
|
50
41
|
* @param input - `eventId`; optional abortSignal.
|
|
51
42
|
* @returns The merchant usage event response.
|
|
52
43
|
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
@@ -67,7 +58,7 @@ export interface MerchantUsageEventsResource {
|
|
|
67
58
|
/**
|
|
68
59
|
* `client.merchantUsageEvents` — the immutable usage-event ledger over
|
|
69
60
|
* `/v1/merchant-usage-events`, plus the delivery-health `summary` aggregate
|
|
70
|
-
* and the per-event operator actions `retry
|
|
61
|
+
* and the per-event operator actions `retry` and `discard`.
|
|
71
62
|
* @param config - Shared authentication and transport configuration.
|
|
72
63
|
* @returns The configured resource client.
|
|
73
64
|
*/
|
|
@@ -3,7 +3,7 @@ import { apiPath, requestJson } from "../http.js";
|
|
|
3
3
|
/**
|
|
4
4
|
* `client.merchantUsageEvents` — the immutable usage-event ledger over
|
|
5
5
|
* `/v1/merchant-usage-events`, plus the delivery-health `summary` aggregate
|
|
6
|
-
* and the per-event operator actions `retry
|
|
6
|
+
* and the per-event operator actions `retry` and `discard`.
|
|
7
7
|
* @param config - Shared authentication and transport configuration.
|
|
8
8
|
* @returns The configured resource client.
|
|
9
9
|
*/
|
|
@@ -21,9 +21,6 @@ export function createMerchantUsageEventsResource(config) {
|
|
|
21
21
|
async retry({ eventId, abortSignal }) {
|
|
22
22
|
return await requestJson(config, apiPath `/v1/merchant-usage-events/${eventId}/retry`, { method: "POST", signal: abortSignal }, merchantUsageEventResponseSchema);
|
|
23
23
|
},
|
|
24
|
-
async release({ eventId, abortSignal }) {
|
|
25
|
-
return await requestJson(config, apiPath `/v1/merchant-usage-events/${eventId}/release`, { method: "POST", signal: abortSignal }, merchantUsageEventResponseSchema);
|
|
26
|
-
},
|
|
27
24
|
async discard({ eventId, abortSignal }) {
|
|
28
25
|
return await requestJson(config, apiPath `/v1/merchant-usage-events/${eventId}/discard`, { method: "POST", signal: abortSignal }, merchantUsageEventResponseSchema);
|
|
29
26
|
},
|
|
@@ -31,7 +31,7 @@ export interface SessionsResource {
|
|
|
31
31
|
deleteArtifacts: boolean;
|
|
32
32
|
} & ResourceRequestOptions): Promise<void>;
|
|
33
33
|
/**
|
|
34
|
-
* Retry
|
|
34
|
+
* Retry a lost acknowledgement with the same explicit idempotencyKey.
|
|
35
35
|
* @param input - `agentId`, `sessionId`, `messageId`; optional abortSignal.
|
|
36
36
|
* @returns The session response.
|
|
37
37
|
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
@@ -101,7 +101,7 @@ export interface SessionsResource {
|
|
|
101
101
|
sessionId: string;
|
|
102
102
|
} & StopSessionBody & ResourceRequestOptions): Promise<StopSessionResponse>;
|
|
103
103
|
/**
|
|
104
|
-
* Retry
|
|
104
|
+
* Retry a lost acknowledgement with the same requestId and payload.
|
|
105
105
|
* @param input - `agentId`, `sessionId`; fields to change; optional abortSignal.
|
|
106
106
|
* @returns The session input response.
|
|
107
107
|
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
@@ -11,12 +11,11 @@ export interface WorkspacesResource {
|
|
|
11
11
|
/**
|
|
12
12
|
* Deletes the Workspace.
|
|
13
13
|
* @param input - `workspaceId`; optional abortSignal.
|
|
14
|
-
* @returns "pending" while deletion is underway, otherwise "completed".
|
|
15
14
|
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
16
15
|
*/
|
|
17
16
|
delete(input: {
|
|
18
17
|
workspaceId: string;
|
|
19
|
-
} & ResourceRequestOptions): Promise<
|
|
18
|
+
} & ResourceRequestOptions): Promise<void>;
|
|
20
19
|
/**
|
|
21
20
|
* Retrieves the Workspace.
|
|
22
21
|
* @param input - `workspaceId`; optional abortSignal.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { workspaceSchema, workspacesListResponseSchema, } from "../contracts/entities/workspaces.js";
|
|
2
|
-
import { apiPath, requestJson
|
|
2
|
+
import { apiPath, requestJson } from "../http.js";
|
|
3
3
|
/**
|
|
4
4
|
* Builds the Workspaces operations using the shared HTTP configuration.
|
|
5
5
|
* @param config - Shared authentication and transport configuration.
|
|
@@ -15,8 +15,10 @@ export function createWorkspacesResource(config) {
|
|
|
15
15
|
}, workspaceSchema);
|
|
16
16
|
},
|
|
17
17
|
async delete({ workspaceId, abortSignal }) {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
await requestJson(config, apiPath `/v1/workspaces/${workspaceId}`, {
|
|
19
|
+
method: "DELETE",
|
|
20
|
+
signal: abortSignal,
|
|
21
|
+
});
|
|
20
22
|
},
|
|
21
23
|
async get({ workspaceId, abortSignal }) {
|
|
22
24
|
return await requestJson(config, apiPath `/v1/workspaces/${workspaceId}`, { signal: abortSignal }, workspaceSchema);
|
package/package.json
CHANGED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { type ChatDeliveriesResponse, type ChatDeliveryListStatus } from "../contracts/entities/chat-connections.ts";
|
|
2
|
-
import type { HttpConfig, ResourceRequestOptions } from "../types.ts";
|
|
3
|
-
export interface ChatDeliveriesListOptions extends ResourceRequestOptions {
|
|
4
|
-
cursor?: string;
|
|
5
|
-
limit?: number;
|
|
6
|
-
/** ISO 8601 date-time; inclusive lower bound on `createdAt`. */
|
|
7
|
-
since?: string;
|
|
8
|
-
/** `failed` and/or `ambiguous`; omitted means both. */
|
|
9
|
-
status?: readonly ChatDeliveryListStatus[];
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* `client.chatDeliveries` — the Tenant's deliveries across all Chat
|
|
13
|
-
* Connections behind `GET /v1/chat-deliveries`, newest first.
|
|
14
|
-
*/
|
|
15
|
-
export interface ChatDeliveriesResource {
|
|
16
|
-
/**
|
|
17
|
-
* Lists one page of Chat delivery records.
|
|
18
|
-
* @param input - filters and pagination options.
|
|
19
|
-
* @returns The chat deliveries response.
|
|
20
|
-
* @throws BlazingAgentsError - If the request fails, is aborted, or returns an invalid response.
|
|
21
|
-
*/
|
|
22
|
-
list(input?: ChatDeliveriesListOptions): Promise<ChatDeliveriesResponse>;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* `client.chatDeliveries` — `GET /v1/chat-deliveries`, the Tenant-wide
|
|
26
|
-
* delivery feed across all Chat Connections, newest first.
|
|
27
|
-
* @param config - Shared authentication and transport configuration.
|
|
28
|
-
* @returns The configured resource client.
|
|
29
|
-
*/
|
|
30
|
-
export declare function createChatDeliveriesResource(config: HttpConfig): ChatDeliveriesResource;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { chatDeliveriesResponseSchema, } from "../contracts/entities/chat-connections.js";
|
|
2
|
-
import { requestJson } from "../http.js";
|
|
3
|
-
/**
|
|
4
|
-
* `client.chatDeliveries` — `GET /v1/chat-deliveries`, the Tenant-wide
|
|
5
|
-
* delivery feed across all Chat Connections, newest first.
|
|
6
|
-
* @param config - Shared authentication and transport configuration.
|
|
7
|
-
* @returns The configured resource client.
|
|
8
|
-
*/
|
|
9
|
-
export function createChatDeliveriesResource(config) {
|
|
10
|
-
return {
|
|
11
|
-
async list({ abortSignal, status, ...query } = {}) {
|
|
12
|
-
return await requestJson(config, "/v1/chat-deliveries", {
|
|
13
|
-
query: {
|
|
14
|
-
...query,
|
|
15
|
-
// Multi-value filters serialize as one comma-separated parameter.
|
|
16
|
-
status: status?.length ? status.join(",") : undefined,
|
|
17
|
-
},
|
|
18
|
-
credentialBearing: true,
|
|
19
|
-
signal: abortSignal,
|
|
20
|
-
}, chatDeliveriesResponseSchema);
|
|
21
|
-
},
|
|
22
|
-
};
|
|
23
|
-
}
|