@blazingagents/sdk 0.40.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 +9 -3
- package/dist/contracts/api.js +9 -3
- 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 +4 -12
- 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/entities/tasks.d.ts +12 -186
- package/dist/contracts/entities/tasks.js +2 -2
- 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
|
@@ -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
|
})
|
|
@@ -379,94 +379,7 @@ export declare const taskRunResponseSchema: z.ZodObject<{
|
|
|
379
379
|
succeeded: "succeeded";
|
|
380
380
|
}>;
|
|
381
381
|
error: z.ZodNullable<z.ZodString>;
|
|
382
|
-
errorCode: z.ZodNullable<z.
|
|
383
|
-
admin_agent_managed: "admin_agent_managed";
|
|
384
|
-
agent_disabled: "agent_disabled";
|
|
385
|
-
agent_mcp_connection_not_found: "agent_mcp_connection_not_found";
|
|
386
|
-
agent_mcp_connections_invalid: "agent_mcp_connections_invalid";
|
|
387
|
-
api_key_limit_reached: "api_key_limit_reached";
|
|
388
|
-
artifact_session_cap_reached: "artifact_session_cap_reached";
|
|
389
|
-
chat_webhook_conflict: "chat_webhook_conflict";
|
|
390
|
-
chat_webhook_registration_failed: "chat_webhook_registration_failed";
|
|
391
|
-
checkout_evidence_mismatch: "checkout_evidence_mismatch";
|
|
392
|
-
forbidden: "forbidden";
|
|
393
|
-
function_call_conflict: "function_call_conflict";
|
|
394
|
-
idempotency_conflict: "idempotency_conflict";
|
|
395
|
-
input_idempotency_conflict: "input_idempotency_conflict";
|
|
396
|
-
insufficient_scope: "insufficient_scope";
|
|
397
|
-
internal: "internal";
|
|
398
|
-
invalid_cursor: "invalid_cursor";
|
|
399
|
-
invalid_request: "invalid_request";
|
|
400
|
-
mcp_connection_authentication_failed: "mcp_connection_authentication_failed";
|
|
401
|
-
mcp_connection_discovery_failed: "mcp_connection_discovery_failed";
|
|
402
|
-
mcp_connection_in_use: "mcp_connection_in_use";
|
|
403
|
-
mcp_connection_invalid: "mcp_connection_invalid";
|
|
404
|
-
mcp_connection_limit_reached: "mcp_connection_limit_reached";
|
|
405
|
-
mcp_connection_name_conflict: "mcp_connection_name_conflict";
|
|
406
|
-
mcp_connection_stale_credential_version: "mcp_connection_stale_credential_version";
|
|
407
|
-
mcp_connection_unreachable: "mcp_connection_unreachable";
|
|
408
|
-
merchant_account_mismatch: "merchant_account_mismatch";
|
|
409
|
-
merchant_balance_required: "merchant_balance_required";
|
|
410
|
-
merchant_binding_not_found: "merchant_binding_not_found";
|
|
411
|
-
merchant_binding_required: "merchant_binding_required";
|
|
412
|
-
merchant_connection_in_use: "merchant_connection_in_use";
|
|
413
|
-
merchant_connection_not_found: "merchant_connection_not_found";
|
|
414
|
-
merchant_credential_invalid: "merchant_credential_invalid";
|
|
415
|
-
merchant_customer_not_found: "merchant_customer_not_found";
|
|
416
|
-
merchant_customer_unmapped: "merchant_customer_unmapped";
|
|
417
|
-
merchant_eligibility_unavailable: "merchant_eligibility_unavailable";
|
|
418
|
-
merchant_event_not_found: "merchant_event_not_found";
|
|
419
|
-
merchant_event_state_conflict: "merchant_event_state_conflict";
|
|
420
|
-
merchant_provider_unavailable: "merchant_provider_unavailable";
|
|
421
|
-
merchant_subscription_required: "merchant_subscription_required";
|
|
422
|
-
message_id_conflict: "message_id_conflict";
|
|
423
|
-
message_not_found: "message_not_found";
|
|
424
|
-
model_discovery_unsupported: "model_discovery_unsupported";
|
|
425
|
-
model_not_found: "model_not_found";
|
|
426
|
-
model_spending_limit_exceeded: "model_spending_limit_exceeded";
|
|
427
|
-
model_validation_unavailable: "model_validation_unavailable";
|
|
428
|
-
not_found: "not_found";
|
|
429
|
-
prompt_variable_missing: "prompt_variable_missing";
|
|
430
|
-
prompt_variable_unknown: "prompt_variable_unknown";
|
|
431
|
-
provider_historical_use: "provider_historical_use";
|
|
432
|
-
provider_in_use: "provider_in_use";
|
|
433
|
-
provider_limit_reached: "provider_limit_reached";
|
|
434
|
-
provider_name_conflict: "provider_name_conflict";
|
|
435
|
-
provider_not_found: "provider_not_found";
|
|
436
|
-
provider_required: "provider_required";
|
|
437
|
-
quota_exceeded: "quota_exceeded";
|
|
438
|
-
rate_limited: "rate_limited";
|
|
439
|
-
service_unavailable: "service_unavailable";
|
|
440
|
-
session_busy: "session_busy";
|
|
441
|
-
session_fork_deleted: "session_fork_deleted";
|
|
442
|
-
session_fork_unavailable: "session_fork_unavailable";
|
|
443
|
-
session_turn_unresponsive: "session_turn_unresponsive";
|
|
444
|
-
session_version_mismatch: "session_version_mismatch";
|
|
445
|
-
skill_invalid_archive: "skill_invalid_archive";
|
|
446
|
-
skill_invalid_markdown: "skill_invalid_markdown";
|
|
447
|
-
skill_limit_reached: "skill_limit_reached";
|
|
448
|
-
skill_name_conflict: "skill_name_conflict";
|
|
449
|
-
skill_not_found: "skill_not_found";
|
|
450
|
-
skill_too_many_files: "skill_too_many_files";
|
|
451
|
-
skill_uncompressed_too_large: "skill_uncompressed_too_large";
|
|
452
|
-
steer_not_available: "steer_not_available";
|
|
453
|
-
subscription_already_paid: "subscription_already_paid";
|
|
454
|
-
subscription_not_cancelled: "subscription_not_cancelled";
|
|
455
|
-
subscription_required: "subscription_required";
|
|
456
|
-
task_active_run_exists: "task_active_run_exists";
|
|
457
|
-
tenant_deleting: "tenant_deleting";
|
|
458
|
-
tenant_deletion_in_progress: "tenant_deletion_in_progress";
|
|
459
|
-
tenant_deletion_not_ready: "tenant_deletion_not_ready";
|
|
460
|
-
tenant_not_deleting: "tenant_not_deleting";
|
|
461
|
-
tool_approval_continuation_settled: "tool_approval_continuation_settled";
|
|
462
|
-
tool_approval_decision_conflict: "tool_approval_decision_conflict";
|
|
463
|
-
unauthorized: "unauthorized";
|
|
464
|
-
usage_credit_required: "usage_credit_required";
|
|
465
|
-
validation_failed: "validation_failed";
|
|
466
|
-
workspace_busy: "workspace_busy";
|
|
467
|
-
workspace_in_use: "workspace_in_use";
|
|
468
|
-
workspace_not_found: "workspace_not_found";
|
|
469
|
-
}>>;
|
|
382
|
+
errorCode: z.ZodNullable<z.ZodType<import("../../types.ts").BlazingAgentsErrorCode, unknown, z.core.$ZodTypeInternals<import("../../types.ts").BlazingAgentsErrorCode, unknown>>>;
|
|
470
383
|
userId: z.ZodString;
|
|
471
384
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
472
385
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -601,94 +514,7 @@ export declare const taskRunsListResponseSchema: z.ZodObject<{
|
|
|
601
514
|
succeeded: "succeeded";
|
|
602
515
|
}>;
|
|
603
516
|
error: z.ZodNullable<z.ZodString>;
|
|
604
|
-
errorCode: z.ZodNullable<z.
|
|
605
|
-
admin_agent_managed: "admin_agent_managed";
|
|
606
|
-
agent_disabled: "agent_disabled";
|
|
607
|
-
agent_mcp_connection_not_found: "agent_mcp_connection_not_found";
|
|
608
|
-
agent_mcp_connections_invalid: "agent_mcp_connections_invalid";
|
|
609
|
-
api_key_limit_reached: "api_key_limit_reached";
|
|
610
|
-
artifact_session_cap_reached: "artifact_session_cap_reached";
|
|
611
|
-
chat_webhook_conflict: "chat_webhook_conflict";
|
|
612
|
-
chat_webhook_registration_failed: "chat_webhook_registration_failed";
|
|
613
|
-
checkout_evidence_mismatch: "checkout_evidence_mismatch";
|
|
614
|
-
forbidden: "forbidden";
|
|
615
|
-
function_call_conflict: "function_call_conflict";
|
|
616
|
-
idempotency_conflict: "idempotency_conflict";
|
|
617
|
-
input_idempotency_conflict: "input_idempotency_conflict";
|
|
618
|
-
insufficient_scope: "insufficient_scope";
|
|
619
|
-
internal: "internal";
|
|
620
|
-
invalid_cursor: "invalid_cursor";
|
|
621
|
-
invalid_request: "invalid_request";
|
|
622
|
-
mcp_connection_authentication_failed: "mcp_connection_authentication_failed";
|
|
623
|
-
mcp_connection_discovery_failed: "mcp_connection_discovery_failed";
|
|
624
|
-
mcp_connection_in_use: "mcp_connection_in_use";
|
|
625
|
-
mcp_connection_invalid: "mcp_connection_invalid";
|
|
626
|
-
mcp_connection_limit_reached: "mcp_connection_limit_reached";
|
|
627
|
-
mcp_connection_name_conflict: "mcp_connection_name_conflict";
|
|
628
|
-
mcp_connection_stale_credential_version: "mcp_connection_stale_credential_version";
|
|
629
|
-
mcp_connection_unreachable: "mcp_connection_unreachable";
|
|
630
|
-
merchant_account_mismatch: "merchant_account_mismatch";
|
|
631
|
-
merchant_balance_required: "merchant_balance_required";
|
|
632
|
-
merchant_binding_not_found: "merchant_binding_not_found";
|
|
633
|
-
merchant_binding_required: "merchant_binding_required";
|
|
634
|
-
merchant_connection_in_use: "merchant_connection_in_use";
|
|
635
|
-
merchant_connection_not_found: "merchant_connection_not_found";
|
|
636
|
-
merchant_credential_invalid: "merchant_credential_invalid";
|
|
637
|
-
merchant_customer_not_found: "merchant_customer_not_found";
|
|
638
|
-
merchant_customer_unmapped: "merchant_customer_unmapped";
|
|
639
|
-
merchant_eligibility_unavailable: "merchant_eligibility_unavailable";
|
|
640
|
-
merchant_event_not_found: "merchant_event_not_found";
|
|
641
|
-
merchant_event_state_conflict: "merchant_event_state_conflict";
|
|
642
|
-
merchant_provider_unavailable: "merchant_provider_unavailable";
|
|
643
|
-
merchant_subscription_required: "merchant_subscription_required";
|
|
644
|
-
message_id_conflict: "message_id_conflict";
|
|
645
|
-
message_not_found: "message_not_found";
|
|
646
|
-
model_discovery_unsupported: "model_discovery_unsupported";
|
|
647
|
-
model_not_found: "model_not_found";
|
|
648
|
-
model_spending_limit_exceeded: "model_spending_limit_exceeded";
|
|
649
|
-
model_validation_unavailable: "model_validation_unavailable";
|
|
650
|
-
not_found: "not_found";
|
|
651
|
-
prompt_variable_missing: "prompt_variable_missing";
|
|
652
|
-
prompt_variable_unknown: "prompt_variable_unknown";
|
|
653
|
-
provider_historical_use: "provider_historical_use";
|
|
654
|
-
provider_in_use: "provider_in_use";
|
|
655
|
-
provider_limit_reached: "provider_limit_reached";
|
|
656
|
-
provider_name_conflict: "provider_name_conflict";
|
|
657
|
-
provider_not_found: "provider_not_found";
|
|
658
|
-
provider_required: "provider_required";
|
|
659
|
-
quota_exceeded: "quota_exceeded";
|
|
660
|
-
rate_limited: "rate_limited";
|
|
661
|
-
service_unavailable: "service_unavailable";
|
|
662
|
-
session_busy: "session_busy";
|
|
663
|
-
session_fork_deleted: "session_fork_deleted";
|
|
664
|
-
session_fork_unavailable: "session_fork_unavailable";
|
|
665
|
-
session_turn_unresponsive: "session_turn_unresponsive";
|
|
666
|
-
session_version_mismatch: "session_version_mismatch";
|
|
667
|
-
skill_invalid_archive: "skill_invalid_archive";
|
|
668
|
-
skill_invalid_markdown: "skill_invalid_markdown";
|
|
669
|
-
skill_limit_reached: "skill_limit_reached";
|
|
670
|
-
skill_name_conflict: "skill_name_conflict";
|
|
671
|
-
skill_not_found: "skill_not_found";
|
|
672
|
-
skill_too_many_files: "skill_too_many_files";
|
|
673
|
-
skill_uncompressed_too_large: "skill_uncompressed_too_large";
|
|
674
|
-
steer_not_available: "steer_not_available";
|
|
675
|
-
subscription_already_paid: "subscription_already_paid";
|
|
676
|
-
subscription_not_cancelled: "subscription_not_cancelled";
|
|
677
|
-
subscription_required: "subscription_required";
|
|
678
|
-
task_active_run_exists: "task_active_run_exists";
|
|
679
|
-
tenant_deleting: "tenant_deleting";
|
|
680
|
-
tenant_deletion_in_progress: "tenant_deletion_in_progress";
|
|
681
|
-
tenant_deletion_not_ready: "tenant_deletion_not_ready";
|
|
682
|
-
tenant_not_deleting: "tenant_not_deleting";
|
|
683
|
-
tool_approval_continuation_settled: "tool_approval_continuation_settled";
|
|
684
|
-
tool_approval_decision_conflict: "tool_approval_decision_conflict";
|
|
685
|
-
unauthorized: "unauthorized";
|
|
686
|
-
usage_credit_required: "usage_credit_required";
|
|
687
|
-
validation_failed: "validation_failed";
|
|
688
|
-
workspace_busy: "workspace_busy";
|
|
689
|
-
workspace_in_use: "workspace_in_use";
|
|
690
|
-
workspace_not_found: "workspace_not_found";
|
|
691
|
-
}>>;
|
|
517
|
+
errorCode: z.ZodNullable<z.ZodType<import("../../types.ts").BlazingAgentsErrorCode, unknown, z.core.$ZodTypeInternals<import("../../types.ts").BlazingAgentsErrorCode, unknown>>>;
|
|
692
518
|
userId: z.ZodString;
|
|
693
519
|
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
694
520
|
startedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
@@ -745,6 +571,16 @@ export declare const createTaskRunResponseSchema: z.ZodObject<{
|
|
|
745
571
|
* `error`, and `finishedAt`, so one poll loop can follow the run.
|
|
746
572
|
*/
|
|
747
573
|
export declare const taskRunMessagesResponseSchema: z.ZodObject<{
|
|
574
|
+
error: z.ZodNullable<z.ZodString>;
|
|
575
|
+
finishedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
576
|
+
status: z.ZodEnum<{
|
|
577
|
+
blocked: "blocked";
|
|
578
|
+
canceled: "canceled";
|
|
579
|
+
failed: "failed";
|
|
580
|
+
queued: "queued";
|
|
581
|
+
running: "running";
|
|
582
|
+
succeeded: "succeeded";
|
|
583
|
+
}>;
|
|
748
584
|
data: z.ZodArray<z.ZodObject<{
|
|
749
585
|
id: z.ZodString;
|
|
750
586
|
role: z.ZodEnum<{
|
|
@@ -760,16 +596,6 @@ export declare const taskRunMessagesResponseSchema: z.ZodObject<{
|
|
|
760
596
|
}, z.core.$loose>>;
|
|
761
597
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
762
598
|
latestCursor: z.ZodNullable<z.ZodString>;
|
|
763
|
-
error: z.ZodNullable<z.ZodString>;
|
|
764
|
-
finishedAt: z.ZodNullable<z.ZodISODateTime>;
|
|
765
|
-
status: z.ZodEnum<{
|
|
766
|
-
blocked: "blocked";
|
|
767
|
-
canceled: "canceled";
|
|
768
|
-
failed: "failed";
|
|
769
|
-
queued: "queued";
|
|
770
|
-
running: "running";
|
|
771
|
-
succeeded: "succeeded";
|
|
772
|
-
}>;
|
|
773
599
|
}, z.core.$strip>;
|
|
774
600
|
export type TaskListItem = z.infer<typeof taskListItemSchema>;
|
|
775
601
|
export type TaskRunStatus = z.infer<typeof taskRunStatusSchema>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Cron } from "croner";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import {
|
|
3
|
+
import { paginatedResponseSchema, receivedApiErrorCodeSchema } from "../api.js";
|
|
4
4
|
import { agentIdSchema, sessionIdSchema, taskIdSchema, taskRunIdSchema, tenantIdSchema, turnIdSchema, } from "../ids.js";
|
|
5
5
|
import { MAX_TASK_NAME_LENGTH, MAX_TASK_PROMPT_LENGTH, MIN_TASK_INTERVAL_MS, } from "../limitations.js";
|
|
6
6
|
import { atLeastOneFieldMessage, hasObjectKeys } from "../utils.js";
|
|
@@ -242,7 +242,7 @@ export const taskRunResponseSchema = z
|
|
|
242
242
|
turnId: turnIdSchema.nullable(),
|
|
243
243
|
status: taskRunStatusSchema,
|
|
244
244
|
error: z.string().nullable(),
|
|
245
|
-
errorCode:
|
|
245
|
+
errorCode: receivedApiErrorCodeSchema
|
|
246
246
|
.nullable()
|
|
247
247
|
.describe("Machine-readable reason a run ended `blocked` or `failed`: one of the API error codes, such as `usage_credit_required`, `quota_exceeded` or `provider_required`. `null` for every other run, and for a failure without a code; `error` carries the message."),
|
|
248
248
|
userId: userIdSchema,
|
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);
|