@codespar/sdk 0.16.7 → 0.16.9
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/generated/openapi.d.ts +304 -39
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/generated/operations.d.ts +12 -0
- package/dist/generated/operations.d.ts.map +1 -1
- package/dist/generated/operations.js +2 -0
- package/dist/generated/operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -835,7 +835,7 @@ export interface paths {
|
|
|
835
835
|
put?: never;
|
|
836
836
|
/**
|
|
837
837
|
* Open a session
|
|
838
|
-
* @description A session is the unit an agent's tool calls, policy evaluations and audit entries hang off. `servers` names the connected MCP servers it may reach (
|
|
838
|
+
* @description A session is the unit an agent's tool calls, policy evaluations and audit entries hang off. `servers` names the connected MCP servers it may reach (0–20), and every id must be one `GET /v1/servers` returns for this project — an id that is not gets 400 `unknown_servers` with the offenders listed, which is a different body from the schema `invalid_body` above it.
|
|
839
839
|
*
|
|
840
840
|
* `mocks` and `chaos` are accepted only on a project whose environment is `test`: a live-environment project gets 403 mocks_not_permitted, a payload over 64 KiB gets 413, and a malformed one gets 400 with RFC 6901 pointers pointing at the offending field.
|
|
841
841
|
*/
|
|
@@ -851,6 +851,8 @@ export interface paths {
|
|
|
851
851
|
"application/json": {
|
|
852
852
|
servers: string[];
|
|
853
853
|
user_id?: string;
|
|
854
|
+
/** @description The registered agent this session acts as (its handle). Approvals raised in the session are attributed to it. Must name an active agent of this org, or the request answers 422. */
|
|
855
|
+
agent_id?: string;
|
|
854
856
|
mocks?: {
|
|
855
857
|
[key: string]: unknown;
|
|
856
858
|
};
|
|
@@ -1452,7 +1454,7 @@ export interface paths {
|
|
|
1452
1454
|
content: {
|
|
1453
1455
|
"application/json": {
|
|
1454
1456
|
name: string;
|
|
1455
|
-
/** @description The event type to subscribe to. Matching is EXACT string equality — there is no prefix and no wildcard, so `commerce.payment.succeeded` does not receive `commerce.payment.received`. A name outside the list below is accepted and recorded (`trigger.event_unknown`) rather than refused, so you can subscribe ahead of a release; until something emits it the subscription simply never fires. What this build emits: approval.decided, approval.pending, commerce.account_launch_in.received, commerce.account_launch_out.received, commerce.account_status.changed, commerce.cashout.confirmed, commerce.charge.cancelled, commerce.charge.created, commerce.charge.expired, commerce.charge.expiry_notified, commerce.charge.paid, commerce.charge.payment_notified, commerce.dict_claim.cancelled, commerce.dict_claim.completed, commerce.dict_claim.confirmed, commerce.dict_claim.opened, commerce.dict_claim.waiting, commerce.internal_transfer_in.received, commerce.internal_transfer_out.received, commerce.mandate.granted, commerce.mandate.paused, commerce.mandate.resumed, commerce.mandate.revoked, commerce.onboarding.backgroundcheck_approved, commerce.onboarding.backgroundcheck_pending, commerce.onboarding.backgroundcheck_rejected, commerce.onboarding.documentscopy_approved, commerce.onboarding.documentscopy_pending, commerce.onboarding.documentscopy_processing, commerce.onboarding.documentscopy_rejected, commerce.onboarding.proposal_approved, commerce.onboarding.proposal_processing_documentscopy, commerce.onboarding.proposal_rejected, commerce.payment.failed, commerce.payment.pending, commerce.payment.received, commerce.payment.refunded, commerce.payment.succeeded, commerce.payment.updated, commerce.pix_out.failed, commerce.pix_out.succeeded, commerce.pix_out.unconfirmed, commerce.pix_reversal_in.received, commerce.pix_reversal_out.received, commerce.rinne.observed, commerce.spend.failed, commerce.spend.settled, commerce.ted_in.succeeded, dda.boleto.registered, dda.subscription.activated, dda.subscription.failed, proxy_call.failed, proxy_call.succeeded, session.closed, system.health.degraded, system.health.recovered, tool_call.failed, tool_call.succeeded, trigger.paused_automatically, trigger.test_fire, user.signed_up. */
|
|
1457
|
+
/** @description The event type to subscribe to. Matching is EXACT string equality — there is no prefix and no wildcard, so `commerce.payment.succeeded` does not receive `commerce.payment.received`. A name outside the list below is accepted and recorded (`trigger.event_unknown`) rather than refused, so you can subscribe ahead of a release; until something emits it the subscription simply never fires. What this build emits: approval.decided, approval.pending, commerce.account_launch_in.received, commerce.account_launch_out.received, commerce.account_status.changed, commerce.cashout.confirmed, commerce.charge.cancelled, commerce.charge.created, commerce.charge.expired, commerce.charge.expiry_notified, commerce.charge.paid, commerce.charge.payment_notified, commerce.dict_claim.cancelled, commerce.dict_claim.completed, commerce.dict_claim.confirmed, commerce.dict_claim.opened, commerce.dict_claim.waiting, commerce.internal_transfer_in.received, commerce.internal_transfer_out.received, commerce.mandate.granted, commerce.mandate.paused, commerce.mandate.resumed, commerce.mandate.revoked, commerce.onboarding.backgroundcheck_approved, commerce.onboarding.backgroundcheck_pending, commerce.onboarding.backgroundcheck_rejected, commerce.onboarding.documentscopy_approved, commerce.onboarding.documentscopy_pending, commerce.onboarding.documentscopy_processing, commerce.onboarding.documentscopy_rejected, commerce.onboarding.proposal_approved, commerce.onboarding.proposal_processing_documentscopy, commerce.onboarding.proposal_rejected, commerce.organization.paused, commerce.organization.resumed, commerce.payment.failed, commerce.payment.pending, commerce.payment.received, commerce.payment.refunded, commerce.payment.succeeded, commerce.payment.updated, commerce.pix_out.failed, commerce.pix_out.succeeded, commerce.pix_out.unconfirmed, commerce.pix_reversal_in.received, commerce.pix_reversal_out.received, commerce.rinne.observed, commerce.spend.failed, commerce.spend.settled, commerce.ted_in.succeeded, dda.boleto.registered, dda.subscription.activated, dda.subscription.failed, proxy_call.failed, proxy_call.succeeded, session.closed, system.health.degraded, system.health.recovered, tool_call.failed, tool_call.succeeded, trigger.paused_automatically, trigger.test_fire, user.signed_up. */
|
|
1456
1458
|
event: string;
|
|
1457
1459
|
server_id?: string;
|
|
1458
1460
|
/** Format: uri */
|
|
@@ -1570,7 +1572,7 @@ export interface paths {
|
|
|
1570
1572
|
content: {
|
|
1571
1573
|
"application/json": {
|
|
1572
1574
|
name: string;
|
|
1573
|
-
/** @description The event type to subscribe to. Matching is EXACT string equality — there is no prefix and no wildcard, so `commerce.payment.succeeded` does not receive `commerce.payment.received`. A name outside the list below is accepted and recorded (`trigger.event_unknown`) rather than refused, so you can subscribe ahead of a release; until something emits it the subscription simply never fires. What this build emits: approval.decided, approval.pending, commerce.account_launch_in.received, commerce.account_launch_out.received, commerce.account_status.changed, commerce.cashout.confirmed, commerce.charge.cancelled, commerce.charge.created, commerce.charge.expired, commerce.charge.expiry_notified, commerce.charge.paid, commerce.charge.payment_notified, commerce.dict_claim.cancelled, commerce.dict_claim.completed, commerce.dict_claim.confirmed, commerce.dict_claim.opened, commerce.dict_claim.waiting, commerce.internal_transfer_in.received, commerce.internal_transfer_out.received, commerce.mandate.granted, commerce.mandate.paused, commerce.mandate.resumed, commerce.mandate.revoked, commerce.onboarding.backgroundcheck_approved, commerce.onboarding.backgroundcheck_pending, commerce.onboarding.backgroundcheck_rejected, commerce.onboarding.documentscopy_approved, commerce.onboarding.documentscopy_pending, commerce.onboarding.documentscopy_processing, commerce.onboarding.documentscopy_rejected, commerce.onboarding.proposal_approved, commerce.onboarding.proposal_processing_documentscopy, commerce.onboarding.proposal_rejected, commerce.payment.failed, commerce.payment.pending, commerce.payment.received, commerce.payment.refunded, commerce.payment.succeeded, commerce.payment.updated, commerce.pix_out.failed, commerce.pix_out.succeeded, commerce.pix_out.unconfirmed, commerce.pix_reversal_in.received, commerce.pix_reversal_out.received, commerce.rinne.observed, commerce.spend.failed, commerce.spend.settled, commerce.ted_in.succeeded, dda.boleto.registered, dda.subscription.activated, dda.subscription.failed, proxy_call.failed, proxy_call.succeeded, session.closed, system.health.degraded, system.health.recovered, tool_call.failed, tool_call.succeeded, trigger.paused_automatically, trigger.test_fire, user.signed_up. */
|
|
1575
|
+
/** @description The event type to subscribe to. Matching is EXACT string equality — there is no prefix and no wildcard, so `commerce.payment.succeeded` does not receive `commerce.payment.received`. A name outside the list below is accepted and recorded (`trigger.event_unknown`) rather than refused, so you can subscribe ahead of a release; until something emits it the subscription simply never fires. What this build emits: approval.decided, approval.pending, commerce.account_launch_in.received, commerce.account_launch_out.received, commerce.account_status.changed, commerce.cashout.confirmed, commerce.charge.cancelled, commerce.charge.created, commerce.charge.expired, commerce.charge.expiry_notified, commerce.charge.paid, commerce.charge.payment_notified, commerce.dict_claim.cancelled, commerce.dict_claim.completed, commerce.dict_claim.confirmed, commerce.dict_claim.opened, commerce.dict_claim.waiting, commerce.internal_transfer_in.received, commerce.internal_transfer_out.received, commerce.mandate.granted, commerce.mandate.paused, commerce.mandate.resumed, commerce.mandate.revoked, commerce.onboarding.backgroundcheck_approved, commerce.onboarding.backgroundcheck_pending, commerce.onboarding.backgroundcheck_rejected, commerce.onboarding.documentscopy_approved, commerce.onboarding.documentscopy_pending, commerce.onboarding.documentscopy_processing, commerce.onboarding.documentscopy_rejected, commerce.onboarding.proposal_approved, commerce.onboarding.proposal_processing_documentscopy, commerce.onboarding.proposal_rejected, commerce.organization.paused, commerce.organization.resumed, commerce.payment.failed, commerce.payment.pending, commerce.payment.received, commerce.payment.refunded, commerce.payment.succeeded, commerce.payment.updated, commerce.pix_out.failed, commerce.pix_out.succeeded, commerce.pix_out.unconfirmed, commerce.pix_reversal_in.received, commerce.pix_reversal_out.received, commerce.rinne.observed, commerce.spend.failed, commerce.spend.settled, commerce.ted_in.succeeded, dda.boleto.registered, dda.subscription.activated, dda.subscription.failed, proxy_call.failed, proxy_call.succeeded, session.closed, system.health.degraded, system.health.recovered, tool_call.failed, tool_call.succeeded, trigger.paused_automatically, trigger.test_fire, user.signed_up. */
|
|
1574
1576
|
event: string;
|
|
1575
1577
|
server_id?: string;
|
|
1576
1578
|
/** Format: uri */
|
|
@@ -2791,9 +2793,9 @@ export interface paths {
|
|
|
2791
2793
|
*
|
|
2792
2794
|
* `revoked` is not `retired`. Retired is a graceful exit; revoked is authority withdrawn, possibly adversarial. Both are reachable states and this verb writes the second one.
|
|
2793
2795
|
*
|
|
2794
|
-
* WHAT IT STOPS: the agent can no longer be paid as an `agent:<id>` payee,
|
|
2796
|
+
* WHAT IT STOPS: the agent can no longer be paid as an `agent:<id>` payee, can no longer mint a new KYA-bearing mandate, and can no longer spend under consumer mandates bound to its key: every consumer lane, card included, refuses them. The mandates themselves are not revoked -- the consumer signed them -- they stop clearing the spend-time check.
|
|
2795
2797
|
*
|
|
2796
|
-
* WHAT IT DOES NOT STOP: spending under mandates
|
|
2798
|
+
* WHAT IT DOES NOT STOP: spending under consumer mandates not bound to a key (issued before that binding existed, or while the agent was unregistered), because they name no key a revocation could reach. The deployment can refuse those for every agent (CONSUMER_MANDATE_AGENT_ENFORCE); otherwise, revoke those mandates.
|
|
2797
2799
|
*
|
|
2798
2800
|
* A `{did}` belonging to another org returns 404, not 403: 403 would confirm that the identity exists, which is what a caller sweeping DIDs is asking.
|
|
2799
2801
|
*/
|
|
@@ -9331,7 +9333,7 @@ export interface paths {
|
|
|
9331
9333
|
ok: false;
|
|
9332
9334
|
provider: string;
|
|
9333
9335
|
/** @enum {string} */
|
|
9334
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9336
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "connection_expired" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9335
9337
|
/** @description Whose sentence this is depends on the code, and the difference matters. On `provider_rejected` and `provider_unreachable` it is up to 256 characters of the PROVIDER's own response body, or the transport error. On the others it is text we wrote, naming what is missing on our side. It is absent on `redirect_not_followed`, and on the `server_unknown` and `endpoint_missing` refusals that carry nothing but the code. On `test_venue_unavailable` it names the catalog file and the field to declare, and it is the one refusal here that is about the project's ENVIRONMENT rather than its connection: the identical request from a `live` project reaches the provider. */
|
|
9336
9338
|
detail?: string;
|
|
9337
9339
|
/** @description The provider's HTTP status, present only when a round trip completed: on `provider_rejected`, `redirect_not_followed`, and the `provider_unreachable` that came from a response rather than from a transport failure. Its ABSENCE on a 502 is the signal that nothing was reached at all. */
|
|
@@ -9345,6 +9347,8 @@ export interface paths {
|
|
|
9345
9347
|
alternative?: string;
|
|
9346
9348
|
/** @description Added only for a `cert` rail in the test environment, where the connect cannot be completed at all rather than merely being unfinished. */
|
|
9347
9349
|
caveat?: string;
|
|
9350
|
+
/** @description Present on `connection_expired` only: the ISO instant the connection's OAuth access token expired. */
|
|
9351
|
+
expires_at?: string;
|
|
9348
9352
|
};
|
|
9349
9353
|
};
|
|
9350
9354
|
};
|
|
@@ -9364,7 +9368,7 @@ export interface paths {
|
|
|
9364
9368
|
ok: false;
|
|
9365
9369
|
provider: string;
|
|
9366
9370
|
/** @enum {string} */
|
|
9367
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9371
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "connection_expired" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9368
9372
|
/** @description Whose sentence this is depends on the code, and the difference matters. On `provider_rejected` and `provider_unreachable` it is up to 256 characters of the PROVIDER's own response body, or the transport error. On the others it is text we wrote, naming what is missing on our side. It is absent on `redirect_not_followed`, and on the `server_unknown` and `endpoint_missing` refusals that carry nothing but the code. On `test_venue_unavailable` it names the catalog file and the field to declare, and it is the one refusal here that is about the project's ENVIRONMENT rather than its connection: the identical request from a `live` project reaches the provider. */
|
|
9369
9373
|
detail?: string;
|
|
9370
9374
|
/** @description The provider's HTTP status, present only when a round trip completed: on `provider_rejected`, `redirect_not_followed`, and the `provider_unreachable` that came from a response rather than from a transport failure. Its ABSENCE on a 502 is the signal that nothing was reached at all. */
|
|
@@ -9378,6 +9382,8 @@ export interface paths {
|
|
|
9378
9382
|
alternative?: string;
|
|
9379
9383
|
/** @description Added only for a `cert` rail in the test environment, where the connect cannot be completed at all rather than merely being unfinished. */
|
|
9380
9384
|
caveat?: string;
|
|
9385
|
+
/** @description Present on `connection_expired` only: the ISO instant the connection's OAuth access token expired. */
|
|
9386
|
+
expires_at?: string;
|
|
9381
9387
|
};
|
|
9382
9388
|
};
|
|
9383
9389
|
};
|
|
@@ -9392,7 +9398,7 @@ export interface paths {
|
|
|
9392
9398
|
ok: false;
|
|
9393
9399
|
provider: string;
|
|
9394
9400
|
/** @enum {string} */
|
|
9395
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9401
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "connection_expired" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9396
9402
|
/** @description Whose sentence this is depends on the code, and the difference matters. On `provider_rejected` and `provider_unreachable` it is up to 256 characters of the PROVIDER's own response body, or the transport error. On the others it is text we wrote, naming what is missing on our side. It is absent on `redirect_not_followed`, and on the `server_unknown` and `endpoint_missing` refusals that carry nothing but the code. On `test_venue_unavailable` it names the catalog file and the field to declare, and it is the one refusal here that is about the project's ENVIRONMENT rather than its connection: the identical request from a `live` project reaches the provider. */
|
|
9397
9403
|
detail?: string;
|
|
9398
9404
|
/** @description The provider's HTTP status, present only when a round trip completed: on `provider_rejected`, `redirect_not_followed`, and the `provider_unreachable` that came from a response rather than from a transport failure. Its ABSENCE on a 502 is the signal that nothing was reached at all. */
|
|
@@ -9406,10 +9412,12 @@ export interface paths {
|
|
|
9406
9412
|
alternative?: string;
|
|
9407
9413
|
/** @description Added only for a `cert` rail in the test environment, where the connect cannot be completed at all rather than merely being unfinished. */
|
|
9408
9414
|
caveat?: string;
|
|
9415
|
+
/** @description Present on `connection_expired` only: the ISO instant the connection's OAuth access token expired. */
|
|
9416
|
+
expires_at?: string;
|
|
9409
9417
|
};
|
|
9410
9418
|
};
|
|
9411
9419
|
};
|
|
9412
|
-
/** @description `not_connected`. There is no usable credential to test: no active connection for this project and provider, or the vault returned nothing for the reference it holds. This body carries the extra `hint` / `alternative` steer. */
|
|
9420
|
+
/** @description `not_connected`. There is no usable credential to test: no active connection for this project and provider, or the vault returned nothing for the reference it holds. This body carries the extra `hint` / `alternative` steer. Or `connection_expired`: the project has an authorization-code OAuth connection whose access token passed its expiry, and nothing refreshes it, so the fix is to reconnect. That body carries `expires_at` and no sandbox steer. */
|
|
9413
9421
|
424: {
|
|
9414
9422
|
headers: {
|
|
9415
9423
|
[name: string]: unknown;
|
|
@@ -9420,7 +9428,7 @@ export interface paths {
|
|
|
9420
9428
|
ok: false;
|
|
9421
9429
|
provider: string;
|
|
9422
9430
|
/** @enum {string} */
|
|
9423
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9431
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "connection_expired" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9424
9432
|
/** @description Whose sentence this is depends on the code, and the difference matters. On `provider_rejected` and `provider_unreachable` it is up to 256 characters of the PROVIDER's own response body, or the transport error. On the others it is text we wrote, naming what is missing on our side. It is absent on `redirect_not_followed`, and on the `server_unknown` and `endpoint_missing` refusals that carry nothing but the code. On `test_venue_unavailable` it names the catalog file and the field to declare, and it is the one refusal here that is about the project's ENVIRONMENT rather than its connection: the identical request from a `live` project reaches the provider. */
|
|
9425
9433
|
detail?: string;
|
|
9426
9434
|
/** @description The provider's HTTP status, present only when a round trip completed: on `provider_rejected`, `redirect_not_followed`, and the `provider_unreachable` that came from a response rather than from a transport failure. Its ABSENCE on a 502 is the signal that nothing was reached at all. */
|
|
@@ -9434,6 +9442,8 @@ export interface paths {
|
|
|
9434
9442
|
alternative?: string;
|
|
9435
9443
|
/** @description Added only for a `cert` rail in the test environment, where the connect cannot be completed at all rather than merely being unfinished. */
|
|
9436
9444
|
caveat?: string;
|
|
9445
|
+
/** @description Present on `connection_expired` only: the ISO instant the connection's OAuth access token expired. */
|
|
9446
|
+
expires_at?: string;
|
|
9437
9447
|
};
|
|
9438
9448
|
};
|
|
9439
9449
|
};
|
|
@@ -9448,7 +9458,7 @@ export interface paths {
|
|
|
9448
9458
|
ok: false;
|
|
9449
9459
|
provider: string;
|
|
9450
9460
|
/** @enum {string} */
|
|
9451
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9461
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "connection_expired" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9452
9462
|
/** @description Whose sentence this is depends on the code, and the difference matters. On `provider_rejected` and `provider_unreachable` it is up to 256 characters of the PROVIDER's own response body, or the transport error. On the others it is text we wrote, naming what is missing on our side. It is absent on `redirect_not_followed`, and on the `server_unknown` and `endpoint_missing` refusals that carry nothing but the code. On `test_venue_unavailable` it names the catalog file and the field to declare, and it is the one refusal here that is about the project's ENVIRONMENT rather than its connection: the identical request from a `live` project reaches the provider. */
|
|
9453
9463
|
detail?: string;
|
|
9454
9464
|
/** @description The provider's HTTP status, present only when a round trip completed: on `provider_rejected`, `redirect_not_followed`, and the `provider_unreachable` that came from a response rather than from a transport failure. Its ABSENCE on a 502 is the signal that nothing was reached at all. */
|
|
@@ -9462,6 +9472,8 @@ export interface paths {
|
|
|
9462
9472
|
alternative?: string;
|
|
9463
9473
|
/** @description Added only for a `cert` rail in the test environment, where the connect cannot be completed at all rather than merely being unfinished. */
|
|
9464
9474
|
caveat?: string;
|
|
9475
|
+
/** @description Present on `connection_expired` only: the ISO instant the connection's OAuth access token expired. */
|
|
9476
|
+
expires_at?: string;
|
|
9465
9477
|
};
|
|
9466
9478
|
};
|
|
9467
9479
|
};
|
|
@@ -9476,7 +9488,7 @@ export interface paths {
|
|
|
9476
9488
|
ok: false;
|
|
9477
9489
|
provider: string;
|
|
9478
9490
|
/** @enum {string} */
|
|
9479
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9491
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "connection_expired" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9480
9492
|
/** @description Whose sentence this is depends on the code, and the difference matters. On `provider_rejected` and `provider_unreachable` it is up to 256 characters of the PROVIDER's own response body, or the transport error. On the others it is text we wrote, naming what is missing on our side. It is absent on `redirect_not_followed`, and on the `server_unknown` and `endpoint_missing` refusals that carry nothing but the code. On `test_venue_unavailable` it names the catalog file and the field to declare, and it is the one refusal here that is about the project's ENVIRONMENT rather than its connection: the identical request from a `live` project reaches the provider. */
|
|
9481
9493
|
detail?: string;
|
|
9482
9494
|
/** @description The provider's HTTP status, present only when a round trip completed: on `provider_rejected`, `redirect_not_followed`, and the `provider_unreachable` that came from a response rather than from a transport failure. Its ABSENCE on a 502 is the signal that nothing was reached at all. */
|
|
@@ -9490,6 +9502,8 @@ export interface paths {
|
|
|
9490
9502
|
alternative?: string;
|
|
9491
9503
|
/** @description Added only for a `cert` rail in the test environment, where the connect cannot be completed at all rather than merely being unfinished. */
|
|
9492
9504
|
caveat?: string;
|
|
9505
|
+
/** @description Present on `connection_expired` only: the ISO instant the connection's OAuth access token expired. */
|
|
9506
|
+
expires_at?: string;
|
|
9493
9507
|
};
|
|
9494
9508
|
};
|
|
9495
9509
|
};
|
|
@@ -9504,7 +9518,7 @@ export interface paths {
|
|
|
9504
9518
|
ok: false;
|
|
9505
9519
|
provider: string;
|
|
9506
9520
|
/** @enum {string} */
|
|
9507
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9521
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "connection_expired" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
9508
9522
|
/** @description Whose sentence this is depends on the code, and the difference matters. On `provider_rejected` and `provider_unreachable` it is up to 256 characters of the PROVIDER's own response body, or the transport error. On the others it is text we wrote, naming what is missing on our side. It is absent on `redirect_not_followed`, and on the `server_unknown` and `endpoint_missing` refusals that carry nothing but the code. On `test_venue_unavailable` it names the catalog file and the field to declare, and it is the one refusal here that is about the project's ENVIRONMENT rather than its connection: the identical request from a `live` project reaches the provider. */
|
|
9509
9523
|
detail?: string;
|
|
9510
9524
|
/** @description The provider's HTTP status, present only when a round trip completed: on `provider_rejected`, `redirect_not_followed`, and the `provider_unreachable` that came from a response rather than from a transport failure. Its ABSENCE on a 502 is the signal that nothing was reached at all. */
|
|
@@ -9518,6 +9532,8 @@ export interface paths {
|
|
|
9518
9532
|
alternative?: string;
|
|
9519
9533
|
/** @description Added only for a `cert` rail in the test environment, where the connect cannot be completed at all rather than merely being unfinished. */
|
|
9520
9534
|
caveat?: string;
|
|
9535
|
+
/** @description Present on `connection_expired` only: the ISO instant the connection's OAuth access token expired. */
|
|
9536
|
+
expires_at?: string;
|
|
9521
9537
|
};
|
|
9522
9538
|
};
|
|
9523
9539
|
};
|
|
@@ -9724,7 +9740,7 @@ export interface paths {
|
|
|
9724
9740
|
* Read graded dependency health, as this credential's tenant sees it
|
|
9725
9741
|
* @description Six dependency checks and the schema version, graded into one `status`. The checks run in parallel behind a three-second budget each; one that throws or times out is reported in its own failed shape with `message` carrying the reason, and the response still carries the other five. So the operation is expected back in under four seconds however badly the database is behaving.
|
|
9726
9742
|
*
|
|
9727
|
-
* GRADE ON `status`, AND READ THE RULE BEFORE WRITING THE ALERT, because the rule is narrower than "anything off nominal". `down` means `db.ok` or `vault.ok` is false. `degraded` means one of exactly four things: `embeddings.status` is `empty`, `fx_rates.status` is anything other than `
|
|
9743
|
+
* GRADE ON `status`, AND READ THE RULE BEFORE WRITING THE ALERT, because the rule is narrower than "anything off nominal". `down` means `db.ok` or `vault.ok` is false. `degraded` means one of exactly four things: `embeddings.status` is `empty`, `fx_rates.status` is anything other than `usable`, `telemetry.status` is `stale`, or `connections.status` is `none`. Everything else grades `healthy`.
|
|
9728
9744
|
*
|
|
9729
9745
|
* THREE NON-NOMINAL VALUES DO NOT MOVE THE GRADE, and an alert that wants them has to read the field rather than the grade: `embeddings.status` `low` (fewer than half the tool rows carry an embedding), `connections.status` `partial` (one or two connections rather than three or more), and `telemetry.status` `idle` (a quiet hour that still had traffic inside the day). All three come back `healthy` at the top level, on purpose — none of them stops a call from being served.
|
|
9730
9746
|
*
|
|
@@ -9751,7 +9767,7 @@ export interface paths {
|
|
|
9751
9767
|
content: {
|
|
9752
9768
|
"application/json": {
|
|
9753
9769
|
/**
|
|
9754
|
-
* @description `down` iff the database or the vault check failed. `degraded` iff embeddings are empty, FX is not
|
|
9770
|
+
* @description `down` iff the database or the vault check failed. `degraded` iff embeddings are empty, the FX rate is not usable, telemetry is stale, or the tenant has no connection. `healthy` otherwise — which includes embeddings `low`, connections `partial` and telemetry `idle`.
|
|
9755
9771
|
* @enum {string}
|
|
9756
9772
|
*/
|
|
9757
9773
|
status: "healthy" | "degraded" | "down";
|
|
@@ -9787,16 +9803,16 @@ export interface paths {
|
|
|
9787
9803
|
fx_rates: {
|
|
9788
9804
|
/**
|
|
9789
9805
|
* Format: date-time
|
|
9790
|
-
* @description
|
|
9806
|
+
* @description The market timestamp BCB stamped on the newest USD/BRL PTAX close we hold — NOT the time our fetcher last ran. BCB publishes Mon-Fri, so on a Monday this is routinely Friday. Null when no rate has ever been stored, and null when the check itself failed.
|
|
9791
9807
|
*/
|
|
9792
9808
|
last_fetched_at: string | null;
|
|
9793
|
-
/** @description Age of that
|
|
9809
|
+
/** @description Age of that close in hours, to one decimal. */
|
|
9794
9810
|
hours_old: number | null;
|
|
9795
9811
|
/**
|
|
9796
|
-
* @description `
|
|
9812
|
+
* @description Whether the router will normalize on this rate, derived from `hours_old`: `usable` inside 72 hours, `stale` past it — which is the age at which the router stops normalizing across currencies. `missing` when there is no row, or when the check failed. Anything other than `usable` grades the response `degraded`. The value deliberately says nothing about recency: a `usable` rate can be three days old over a weekend, and nothing here reports whether the fetcher ran.
|
|
9797
9813
|
* @enum {string}
|
|
9798
9814
|
*/
|
|
9799
|
-
status: "
|
|
9815
|
+
status: "usable" | "stale" | "missing";
|
|
9800
9816
|
/** @description Present only when the check failed or timed out. */
|
|
9801
9817
|
message?: string;
|
|
9802
9818
|
};
|
|
@@ -9893,6 +9909,12 @@ export interface paths {
|
|
|
9893
9909
|
name: string;
|
|
9894
9910
|
/** Format: date-time */
|
|
9895
9911
|
created_at: string;
|
|
9912
|
+
/** @description Set while the organization's kill switch is pressed and every agent money door refuses `org_paused` (ent#1648); null otherwise. The full state, and pressing or releasing it, is `/v1/orgs/{orgId}/pause`. */
|
|
9913
|
+
spend_pause: {
|
|
9914
|
+
/** Format: date-time */
|
|
9915
|
+
paused_at: string | null;
|
|
9916
|
+
reason: string | null;
|
|
9917
|
+
} | null;
|
|
9896
9918
|
};
|
|
9897
9919
|
};
|
|
9898
9920
|
};
|
|
@@ -12972,7 +12994,10 @@ export interface paths {
|
|
|
12972
12994
|
server_id: string;
|
|
12973
12995
|
/** @description Mirrors the catalog's `auth_type` at connect time: api_key, path_secret, cert, hmac_signed, jwt_ecdsa, two_header, oauth, cdp or none. Left open because the column is plain text. */
|
|
12974
12996
|
auth_type: string;
|
|
12975
|
-
/**
|
|
12997
|
+
/**
|
|
12998
|
+
* @description `expired` includes an OAuth connection whose access token passed `expires_at`: nothing refreshes it yet, calls through it answer `connection_expired`, and the fix is to reconnect. `?status=` filters on this same value.
|
|
12999
|
+
* @enum {string}
|
|
13000
|
+
*/
|
|
12976
13001
|
status: "pending" | "connected" | "revoked" | "expired";
|
|
12977
13002
|
display_name: string | null;
|
|
12978
13003
|
/** @description Provider metadata the OAuth callback wrote (scope, refresh ref) or the provisioning projection wrote (account_id). Always present; null for a key registered through POST /v1/connections, which never sets it. */
|
|
@@ -13065,7 +13090,10 @@ export interface paths {
|
|
|
13065
13090
|
server_id: string;
|
|
13066
13091
|
/** @description Mirrors the catalog's `auth_type` at connect time: api_key, path_secret, cert, hmac_signed, jwt_ecdsa, two_header, oauth, cdp or none. Left open because the column is plain text. */
|
|
13067
13092
|
auth_type: string;
|
|
13068
|
-
/**
|
|
13093
|
+
/**
|
|
13094
|
+
* @description `expired` includes an OAuth connection whose access token passed `expires_at`: nothing refreshes it yet, calls through it answer `connection_expired`, and the fix is to reconnect. `?status=` filters on this same value.
|
|
13095
|
+
* @enum {string}
|
|
13096
|
+
*/
|
|
13069
13097
|
status: "pending" | "connected" | "revoked" | "expired";
|
|
13070
13098
|
display_name: string | null;
|
|
13071
13099
|
/** @description Provider metadata the OAuth callback wrote (scope, refresh ref) or the provisioning projection wrote (account_id). Always present; null for a key registered through POST /v1/connections, which never sets it. */
|
|
@@ -13105,7 +13133,10 @@ export interface paths {
|
|
|
13105
13133
|
server_id: string;
|
|
13106
13134
|
/** @description Mirrors the catalog's `auth_type` at connect time: api_key, path_secret, cert, hmac_signed, jwt_ecdsa, two_header, oauth, cdp or none. Left open because the column is plain text. */
|
|
13107
13135
|
auth_type: string;
|
|
13108
|
-
/**
|
|
13136
|
+
/**
|
|
13137
|
+
* @description `expired` includes an OAuth connection whose access token passed `expires_at`: nothing refreshes it yet, calls through it answer `connection_expired`, and the fix is to reconnect. `?status=` filters on this same value.
|
|
13138
|
+
* @enum {string}
|
|
13139
|
+
*/
|
|
13109
13140
|
status: "pending" | "connected" | "revoked" | "expired";
|
|
13110
13141
|
display_name: string | null;
|
|
13111
13142
|
/** @description Provider metadata the OAuth callback wrote (scope, refresh ref) or the provisioning projection wrote (account_id). Always present; null for a key registered through POST /v1/connections, which never sets it. */
|
|
@@ -13292,7 +13323,10 @@ export interface paths {
|
|
|
13292
13323
|
server_id: string;
|
|
13293
13324
|
/** @description Mirrors the catalog's `auth_type` at connect time: api_key, path_secret, cert, hmac_signed, jwt_ecdsa, two_header, oauth, cdp or none. Left open because the column is plain text. */
|
|
13294
13325
|
auth_type: string;
|
|
13295
|
-
/**
|
|
13326
|
+
/**
|
|
13327
|
+
* @description `expired` includes an OAuth connection whose access token passed `expires_at`: nothing refreshes it yet, calls through it answer `connection_expired`, and the fix is to reconnect. `?status=` filters on this same value.
|
|
13328
|
+
* @enum {string}
|
|
13329
|
+
*/
|
|
13296
13330
|
status: "pending" | "connected" | "revoked" | "expired";
|
|
13297
13331
|
display_name: string | null;
|
|
13298
13332
|
/** @description Provider metadata the OAuth callback wrote (scope, refresh ref) or the provisioning projection wrote (account_id). Always present; null for a key registered through POST /v1/connections, which never sets it. */
|
|
@@ -13411,7 +13445,10 @@ export interface paths {
|
|
|
13411
13445
|
server_id: string;
|
|
13412
13446
|
/** @description Mirrors the catalog's `auth_type` at connect time: api_key, path_secret, cert, hmac_signed, jwt_ecdsa, two_header, oauth, cdp or none. Left open because the column is plain text. */
|
|
13413
13447
|
auth_type: string;
|
|
13414
|
-
/**
|
|
13448
|
+
/**
|
|
13449
|
+
* @description `expired` includes an OAuth connection whose access token passed `expires_at`: nothing refreshes it yet, calls through it answer `connection_expired`, and the fix is to reconnect. `?status=` filters on this same value.
|
|
13450
|
+
* @enum {string}
|
|
13451
|
+
*/
|
|
13415
13452
|
status: "pending" | "connected" | "revoked" | "expired";
|
|
13416
13453
|
display_name: string | null;
|
|
13417
13454
|
/** @description Provider metadata the OAuth callback wrote (scope, refresh ref) or the provisioning projection wrote (account_id). Always present; null for a key registered through POST /v1/connections, which never sets it. */
|
|
@@ -13555,7 +13592,10 @@ export interface paths {
|
|
|
13555
13592
|
server_id: string;
|
|
13556
13593
|
/** @description Mirrors the catalog's `auth_type` at connect time: api_key, path_secret, cert, hmac_signed, jwt_ecdsa, two_header, oauth, cdp or none. Left open because the column is plain text. */
|
|
13557
13594
|
auth_type: string;
|
|
13558
|
-
/**
|
|
13595
|
+
/**
|
|
13596
|
+
* @description `expired` includes an OAuth connection whose access token passed `expires_at`: nothing refreshes it yet, calls through it answer `connection_expired`, and the fix is to reconnect. `?status=` filters on this same value.
|
|
13597
|
+
* @enum {string}
|
|
13598
|
+
*/
|
|
13559
13599
|
status: "pending" | "connected" | "revoked" | "expired";
|
|
13560
13600
|
display_name: string | null;
|
|
13561
13601
|
/** @description Provider metadata the OAuth callback wrote (scope, refresh ref) or the provisioning projection wrote (account_id). Always present; null for a key registered through POST /v1/connections, which never sets it. */
|
|
@@ -14825,6 +14865,8 @@ export interface paths {
|
|
|
14825
14865
|
* The cumulative cap is checked and CONSUMED under an advisory lock, and the wallet hold is taken inside that same lock. The lock is released before the provider call, so a slow provider does not serialize everyone else.
|
|
14826
14866
|
*
|
|
14827
14867
|
* **There is no read route for the outcome.** An `attempt_id` that answered `psp_dispatch_uncertain` has no endpoint to ask about afterwards. Keep the `attempt_id` and present it again: the lifecycle is idempotent on it and answers the state that attempt stopped in, instead of firing a second one. Do NOT restart the same intent under a fresh `attempt_id`. That is how a payment gets made twice. A retry of an attempt that already holds money is not evaluated against the organization's policy rules again, so a budget or a rate limit cannot refuse the retry that finds out what happened.
|
|
14868
|
+
*
|
|
14869
|
+
* **A settled attempt answers its recorded response.** Presenting the `attempt_id` of an attempt that already settled, with the same amount, payee, mandate, rail and quote, returns the ORIGINAL 200 body verbatim (same `transactionId`, same receipt) with `idempotent_replay: true`, and nothing is dispatched, held, sealed or published. This holds on every rail and in test mode alike, and while the organization is paused, since the answer moves no money. Presenting it with any of those parameters changed is `attempt_id_conflict`. Idempotency is opt-in: a request without an `attempt_id` is its own payment and is never replayed, so two spends under one mandate are two payments. Send an `attempt_id` to make a retry safe.
|
|
14828
14870
|
*/
|
|
14829
14871
|
post: {
|
|
14830
14872
|
parameters: {
|
|
@@ -14922,7 +14964,7 @@ export interface paths {
|
|
|
14922
14964
|
};
|
|
14923
14965
|
};
|
|
14924
14966
|
};
|
|
14925
|
-
/** @description Local state refuses. `psp_attempt_in_flight`: the same attempt is already in flight. `psp_attempt_uncertain`: an earlier attempt ended with an unknown outcome and this intent is PINNED to it, so present the same `attempt_id` again, never a new one. `psp_attempt_conflict`: the earlier attempt was already compensated. */
|
|
14967
|
+
/** @description Local state refuses. `psp_attempt_in_flight`: the same attempt is already in flight; retry the SAME `attempt_id` once it has answered, never a new one. `psp_attempt_uncertain`: an earlier attempt ended with an unknown outcome and this intent is PINNED to it, so present the same `attempt_id` again, never a new one. `psp_attempt_conflict`: the earlier attempt was already compensated. `attempt_id_conflict`: this `attempt_id` was already used for a different payment (`mismatched_fields` names what differs); nothing was held or sent. `attempt_id_unavailable`: another project of this organization holds this `attempt_id`; use a new one. */
|
|
14926
14968
|
409: {
|
|
14927
14969
|
headers: {
|
|
14928
14970
|
[name: string]: unknown;
|
|
@@ -14931,7 +14973,7 @@ export interface paths {
|
|
|
14931
14973
|
"application/json": {
|
|
14932
14974
|
error: {
|
|
14933
14975
|
/** @enum {string} */
|
|
14934
|
-
code: "psp_attempt_in_flight" | "psp_attempt_uncertain" | "psp_attempt_conflict";
|
|
14976
|
+
code: "psp_attempt_in_flight" | "psp_attempt_uncertain" | "psp_attempt_conflict" | "attempt_id_conflict" | "attempt_id_unavailable";
|
|
14935
14977
|
message: string;
|
|
14936
14978
|
details?: {
|
|
14937
14979
|
[key: string]: unknown;
|
|
@@ -15052,6 +15094,8 @@ export interface paths {
|
|
|
15052
15094
|
* 3. The destination must be NAMED in a signed list of the mandate, and a merchant-list wildcard `"*"` NEVER authorizes money out. Which list is accepted is mid-rollout, so read this one carefully: the target rule is `withdrawal_allowlist` alone, and while the rollout flag is off a destination named explicitly in the signed `merchant_allowlist` is ALSO accepted, with the stricter rule's refusal recorded rather than applied. Tolerance never widens what passes: a wildcard is refused on both paths, and a destination in neither list is refused with its own code. Build against `withdrawal_allowlist`: it is the list that keeps working when the flag turns on.
|
|
15053
15095
|
*
|
|
15054
15096
|
* **There is no read route for the outcome.** An `attempt_id` that answered `psp_dispatch_uncertain` has no endpoint to ask about afterwards. Keep the `attempt_id` and present it again: the lifecycle is idempotent on it and answers the state that attempt stopped in, instead of firing a second one. Do NOT restart the same intent under a fresh `attempt_id`. That is how a payment gets made twice. A retry of an attempt that already holds money is not evaluated against the organization's policy rules again, so a budget or a rate limit cannot refuse the retry that finds out what happened.
|
|
15097
|
+
*
|
|
15098
|
+
* **A settled attempt answers its recorded response.** Presenting the `attempt_id` of an attempt that already settled, with the same amount, payee, mandate, rail and quote, returns the ORIGINAL 200 body verbatim (same `transactionId`, same receipt) with `idempotent_replay: true`, and nothing is dispatched, held, sealed or published. This holds on every rail and in test mode alike, and while the organization is paused, since the answer moves no money. Presenting it with any of those parameters changed is `attempt_id_conflict`. Idempotency is opt-in: a request without an `attempt_id` is its own payment and is never replayed, so two spends under one mandate are two payments. Send an `attempt_id` to make a retry safe.
|
|
15055
15099
|
*/
|
|
15056
15100
|
post: {
|
|
15057
15101
|
parameters: {
|
|
@@ -15128,7 +15172,7 @@ export interface paths {
|
|
|
15128
15172
|
};
|
|
15129
15173
|
};
|
|
15130
15174
|
};
|
|
15131
|
-
/** @description Local state refuses, on the same
|
|
15175
|
+
/** @description Local state refuses, on the same five conditions as the by-id route. */
|
|
15132
15176
|
409: {
|
|
15133
15177
|
headers: {
|
|
15134
15178
|
[name: string]: unknown;
|
|
@@ -15137,7 +15181,7 @@ export interface paths {
|
|
|
15137
15181
|
"application/json": {
|
|
15138
15182
|
error: {
|
|
15139
15183
|
/** @enum {string} */
|
|
15140
|
-
code: "psp_attempt_in_flight" | "psp_attempt_uncertain" | "psp_attempt_conflict";
|
|
15184
|
+
code: "psp_attempt_in_flight" | "psp_attempt_uncertain" | "psp_attempt_conflict" | "attempt_id_conflict" | "attempt_id_unavailable";
|
|
15141
15185
|
message: string;
|
|
15142
15186
|
details?: {
|
|
15143
15187
|
[key: string]: unknown;
|
|
@@ -15232,6 +15276,8 @@ export interface paths {
|
|
|
15232
15276
|
* The outcome is the same object the sibling route returns, carried on the last event. A client that does not need to follow progress should use `/execute`: streaming does not make settlement faster, it makes it observable while it runs.
|
|
15233
15277
|
*
|
|
15234
15278
|
* **There is no read route for the outcome.** An `attempt_id` that answered `psp_dispatch_uncertain` has no endpoint to ask about afterwards. Keep the `attempt_id` and present it again: the lifecycle is idempotent on it and answers the state that attempt stopped in, instead of firing a second one. Do NOT restart the same intent under a fresh `attempt_id`. That is how a payment gets made twice. A retry of an attempt that already holds money is not evaluated against the organization's policy rules again, so a budget or a rate limit cannot refuse the retry that finds out what happened.
|
|
15279
|
+
*
|
|
15280
|
+
* **A settled attempt answers its recorded response.** Presenting the `attempt_id` of an attempt that already settled, with the same amount, payee, mandate, rail and quote, returns the ORIGINAL 200 body verbatim (same `transactionId`, same receipt) with `idempotent_replay: true`, and nothing is dispatched, held, sealed or published. This holds on every rail and in test mode alike, and while the organization is paused, since the answer moves no money. Presenting it with any of those parameters changed is `attempt_id_conflict`. Idempotency is opt-in: a request without an `attempt_id` is its own payment and is never replayed, so two spends under one mandate are two payments. Send an `attempt_id` to make a retry safe.
|
|
15235
15281
|
*/
|
|
15236
15282
|
post: {
|
|
15237
15283
|
parameters: {
|
|
@@ -20430,7 +20476,7 @@ export interface paths {
|
|
|
20430
20476
|
};
|
|
20431
20477
|
/**
|
|
20432
20478
|
* Read one consumer allowance
|
|
20433
|
-
* @description The same 14-field projection the listing returns, by id, from the same table and under the same organization predicate.
|
|
20479
|
+
* @description The same 14-field projection the listing returns, by id, from the same table and under the same organization predicate, plus `org_paused` / `org_paused_at`: whether the organization's kill switch is pressed (ent#1648).
|
|
20434
20480
|
*
|
|
20435
20481
|
* This path has NO alias. Its four siblings are registered twice each, under `/v1/mandates/...` and `/v1/consumers/mandates/...`; this one is registered once, because point reads of an allowance did not exist before it and there was no older spelling to keep alive.
|
|
20436
20482
|
*/
|
|
@@ -20481,6 +20527,13 @@ export interface paths {
|
|
|
20481
20527
|
expires_at: string;
|
|
20482
20528
|
/** Format: date-time */
|
|
20483
20529
|
created_at: string;
|
|
20530
|
+
/** @description True while the organization has paused ALL agent spend (the kill switch, ent#1648). `status` is still this allowance's own stored state: a pause changes no mandate. While this is true every spend under this allowance is refused `org_paused`, so a caller that checks before executing should treat it as "do not execute" whatever `status` says. */
|
|
20531
|
+
org_paused: boolean;
|
|
20532
|
+
/**
|
|
20533
|
+
* Format: date-time
|
|
20534
|
+
* @description When the organization paused. Null when `org_paused` is false.
|
|
20535
|
+
*/
|
|
20536
|
+
org_paused_at: string | null;
|
|
20484
20537
|
};
|
|
20485
20538
|
};
|
|
20486
20539
|
};
|
|
@@ -20995,7 +21048,11 @@ export interface paths {
|
|
|
20995
21048
|
};
|
|
20996
21049
|
};
|
|
20997
21050
|
};
|
|
20998
|
-
/**
|
|
21051
|
+
/**
|
|
21052
|
+
* @description `illegal_transition`: the consent's current status does not permit authorisation. `details.from` and `details.to` carry the pair.
|
|
21053
|
+
*
|
|
21054
|
+
* `consent_expired`: the consent is `pending` and its validity window (`details.expires_at`) has elapsed. TERMINAL: the grant can no longer be authorised. The status stays `pending` on the row and is read as expired by this route, so it still occupies this project's one open consent for the consumer at this bank: revoke it, then initiate a new consent. Another project is not blocked by it.
|
|
21055
|
+
*/
|
|
20999
21056
|
409: {
|
|
21000
21057
|
headers: {
|
|
21001
21058
|
[name: string]: unknown;
|
|
@@ -21004,7 +21061,7 @@ export interface paths {
|
|
|
21004
21061
|
"application/json": {
|
|
21005
21062
|
error: {
|
|
21006
21063
|
/** @enum {string} */
|
|
21007
|
-
code: "illegal_transition";
|
|
21064
|
+
code: "illegal_transition" | "consent_expired";
|
|
21008
21065
|
message: string;
|
|
21009
21066
|
details?: {
|
|
21010
21067
|
[key: string]: unknown;
|
|
@@ -21161,7 +21218,13 @@ export interface paths {
|
|
|
21161
21218
|
};
|
|
21162
21219
|
};
|
|
21163
21220
|
};
|
|
21164
|
-
/**
|
|
21221
|
+
/**
|
|
21222
|
+
* @description `consent_not_authorised`: the consent is not in `authorised`. `details.status` carries what it is.
|
|
21223
|
+
*
|
|
21224
|
+
* `consent_expired`: the consent's validity window (`details.expires_at`) has elapsed. The consent is moved to `expired` by this same call and nothing is fetched. TERMINAL: initiate a new consent.
|
|
21225
|
+
*
|
|
21226
|
+
* `consent_token_expired`: the consent is still valid but its access token (`details.token_expires_at`) has expired. NOT terminal: the consent stays `authorised`, because the grant is alive at the bank and the token is renewable. Nothing was fetched; do not initiate a new consent.
|
|
21227
|
+
*/
|
|
21165
21228
|
409: {
|
|
21166
21229
|
headers: {
|
|
21167
21230
|
[name: string]: unknown;
|
|
@@ -21170,7 +21233,7 @@ export interface paths {
|
|
|
21170
21233
|
"application/json": {
|
|
21171
21234
|
error: {
|
|
21172
21235
|
/** @enum {string} */
|
|
21173
|
-
code: "consent_not_authorised";
|
|
21236
|
+
code: "consent_not_authorised" | "consent_expired" | "consent_token_expired";
|
|
21174
21237
|
message: string;
|
|
21175
21238
|
details?: {
|
|
21176
21239
|
[key: string]: unknown;
|
|
@@ -22137,7 +22200,11 @@ export interface paths {
|
|
|
22137
22200
|
};
|
|
22138
22201
|
};
|
|
22139
22202
|
};
|
|
22140
|
-
/**
|
|
22203
|
+
/**
|
|
22204
|
+
* @description `illegal_transition`: the consent's current status does not permit authorisation. `details.from` and `details.to` carry the pair.
|
|
22205
|
+
*
|
|
22206
|
+
* `consent_expired`: the consent is `pending` and its validity window (`details.expires_at`) has elapsed. TERMINAL: the grant can no longer be authorised. The status stays `pending` on the row and is read as expired by this route, so it still occupies this project's one open consent for the consumer at this bank: revoke it, then initiate a new consent. Another project is not blocked by it.
|
|
22207
|
+
*/
|
|
22141
22208
|
409: {
|
|
22142
22209
|
headers: {
|
|
22143
22210
|
[name: string]: unknown;
|
|
@@ -22146,7 +22213,7 @@ export interface paths {
|
|
|
22146
22213
|
"application/json": {
|
|
22147
22214
|
error: {
|
|
22148
22215
|
/** @enum {string} */
|
|
22149
|
-
code: "illegal_transition";
|
|
22216
|
+
code: "illegal_transition" | "consent_expired";
|
|
22150
22217
|
message: string;
|
|
22151
22218
|
details?: {
|
|
22152
22219
|
[key: string]: unknown;
|
|
@@ -22298,7 +22365,13 @@ export interface paths {
|
|
|
22298
22365
|
};
|
|
22299
22366
|
};
|
|
22300
22367
|
};
|
|
22301
|
-
/**
|
|
22368
|
+
/**
|
|
22369
|
+
* @description `consent_not_authorised`: the consent is not in `authorised`. `details.status` carries what it is.
|
|
22370
|
+
*
|
|
22371
|
+
* `consent_expired`: the consent's validity window (`details.expires_at`) has elapsed. The consent is moved to `expired` by this same call and nothing is fetched. TERMINAL: initiate a new consent.
|
|
22372
|
+
*
|
|
22373
|
+
* `consent_token_expired`: the consent is still valid but its access token (`details.token_expires_at`) has expired. NOT terminal: the consent stays `authorised`, because the grant is alive at the bank and the token is renewable. Nothing was fetched; do not initiate a new consent.
|
|
22374
|
+
*/
|
|
22302
22375
|
409: {
|
|
22303
22376
|
headers: {
|
|
22304
22377
|
[name: string]: unknown;
|
|
@@ -22307,7 +22380,7 @@ export interface paths {
|
|
|
22307
22380
|
"application/json": {
|
|
22308
22381
|
error: {
|
|
22309
22382
|
/** @enum {string} */
|
|
22310
|
-
code: "consent_not_authorised";
|
|
22383
|
+
code: "consent_not_authorised" | "consent_expired" | "consent_token_expired";
|
|
22311
22384
|
message: string;
|
|
22312
22385
|
details?: {
|
|
22313
22386
|
[key: string]: unknown;
|
|
@@ -25236,7 +25309,7 @@ export interface paths {
|
|
|
25236
25309
|
* Issue an org-side mandate (off by default, see the 501)
|
|
25237
25310
|
* @description OFF BY DEFAULT, AND THE FIRST THING THIS ROUTE DOES IS CHECK THAT. Unless the deployment has explicitly enabled org-side issuance, every call is 501 `not_implemented` before any row is written. On a default deployment that 501 is the expected answer, not an outage.
|
|
25238
25311
|
*
|
|
25239
|
-
*
|
|
25312
|
+
* The 501 is about offering issuance, not about enforcement: `POST /v1/wallets/{id}/execute` charges a mandate before the payment is attempted, decrements `remaining_amount` under a guard that refuses an over-cap spend, and writes the consumption row this document returns from `GET /v1/orgs/{orgId}/mandates/{id}`. So a mandate issued here is enforceable; whether it can be issued at all is the deployment's flag.
|
|
25240
25313
|
*
|
|
25241
25314
|
* When enabled, issuance is gated by the org's policy rules for `codespar:mandate:issue`, evaluated before any write. The three non-allowed outcomes are distinct on purpose: 403 `policy_denied` is a rule refusing, 413 `payload_too_large` is an input too big to evaluate, and 503 `policy_engine_error` means the engine could NOT evaluate. The 503 is infrastructure and is retriable; the 403 is not.
|
|
25242
25315
|
*
|
|
@@ -25640,6 +25713,194 @@ export interface paths {
|
|
|
25640
25713
|
patch?: never;
|
|
25641
25714
|
trace?: never;
|
|
25642
25715
|
};
|
|
25716
|
+
"/v1/orgs/{orgId}/pause": {
|
|
25717
|
+
parameters: {
|
|
25718
|
+
query?: never;
|
|
25719
|
+
header?: never;
|
|
25720
|
+
path?: never;
|
|
25721
|
+
cookie?: never;
|
|
25722
|
+
};
|
|
25723
|
+
/**
|
|
25724
|
+
* Read the organization kill switch
|
|
25725
|
+
* @description Whether the organization has paused ALL agent spend. While `paused` is true every agent money door of the organization refuses with `org_paused` (403): consumer payments and spends under a mandate, payment links, consumer withdrawals and transfers, card authorizations, the money-moving meta-tool actions, the org programmable wallet, an inbound Pix devolution, and raw tools the deny-list classifies as a fund transfer. Reads, inbound charges, mandate revoke/pause and x402-in keep running. `GET /v1/mandates/{id}` carries the same flag as `org_paused`.
|
|
25726
|
+
*/
|
|
25727
|
+
get: {
|
|
25728
|
+
parameters: {
|
|
25729
|
+
query?: never;
|
|
25730
|
+
header?: never;
|
|
25731
|
+
path: {
|
|
25732
|
+
orgId: string;
|
|
25733
|
+
};
|
|
25734
|
+
cookie?: never;
|
|
25735
|
+
};
|
|
25736
|
+
requestBody?: never;
|
|
25737
|
+
responses: {
|
|
25738
|
+
/** @description OK */
|
|
25739
|
+
200: {
|
|
25740
|
+
headers: {
|
|
25741
|
+
[name: string]: unknown;
|
|
25742
|
+
};
|
|
25743
|
+
content: {
|
|
25744
|
+
"application/json": {
|
|
25745
|
+
org_id: string;
|
|
25746
|
+
paused: boolean;
|
|
25747
|
+
/** Format: date-time */
|
|
25748
|
+
paused_at: string | null;
|
|
25749
|
+
/** @description Why it was paused; null when not paused. */
|
|
25750
|
+
reason: string | null;
|
|
25751
|
+
/** @description The admin's user id, or `key:<id>` for a bearer key. Null when not paused. */
|
|
25752
|
+
paused_by: string | null;
|
|
25753
|
+
/** @enum {string|null} */
|
|
25754
|
+
paused_by_source: "bearer_key" | "user_token_verified" | "header_asserted" | null;
|
|
25755
|
+
/**
|
|
25756
|
+
* Format: date-time
|
|
25757
|
+
* @description The last resume, kept after a new pause.
|
|
25758
|
+
*/
|
|
25759
|
+
resumed_at: string | null;
|
|
25760
|
+
/** @description Increases by one on every pause and every resume. */
|
|
25761
|
+
generation: number;
|
|
25762
|
+
};
|
|
25763
|
+
};
|
|
25764
|
+
};
|
|
25765
|
+
/** @description The `{orgId}` in the path is not the authenticated org. */
|
|
25766
|
+
404: {
|
|
25767
|
+
headers: {
|
|
25768
|
+
[name: string]: unknown;
|
|
25769
|
+
};
|
|
25770
|
+
content: {
|
|
25771
|
+
"application/json": {
|
|
25772
|
+
error: {
|
|
25773
|
+
/** @enum {string} */
|
|
25774
|
+
code: "not_found";
|
|
25775
|
+
message: string;
|
|
25776
|
+
details?: {
|
|
25777
|
+
[key: string]: unknown;
|
|
25778
|
+
};
|
|
25779
|
+
};
|
|
25780
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
25781
|
+
request_id: string | null;
|
|
25782
|
+
};
|
|
25783
|
+
};
|
|
25784
|
+
};
|
|
25785
|
+
};
|
|
25786
|
+
};
|
|
25787
|
+
put?: never;
|
|
25788
|
+
/**
|
|
25789
|
+
* Pause all agent spend of the organization (kill switch)
|
|
25790
|
+
* @description Stops every agent money door of the organization, test and live projects alike, until a person resumes it. Once this call answers, no new reservation is taken: a spend that already reserved its funds finishes, like an in-flight hold on a frozen wallet.
|
|
25791
|
+
*
|
|
25792
|
+
* A bearer key needs the `organizations:pause` scope; the dashboard path needs an admin. Idempotent: pausing a paused organization answers `changed: false` and keeps the original pause. Resuming is NOT an API-key operation: it is done from the dashboard by a verified admin. Publishes `commerce.organization.paused` to every project of the organization and appends `org_spend_paused` to its audit chain.
|
|
25793
|
+
*
|
|
25794
|
+
* Card authorizations are refused at the issuer that waits for our answer (Pomelo). Bridge decides before we hear of it: freeze those cards at the issuer as well.
|
|
25795
|
+
*/
|
|
25796
|
+
post: {
|
|
25797
|
+
parameters: {
|
|
25798
|
+
query?: never;
|
|
25799
|
+
header?: never;
|
|
25800
|
+
path: {
|
|
25801
|
+
orgId: string;
|
|
25802
|
+
};
|
|
25803
|
+
cookie?: never;
|
|
25804
|
+
};
|
|
25805
|
+
requestBody?: {
|
|
25806
|
+
content: {
|
|
25807
|
+
"application/json": {
|
|
25808
|
+
reason?: string;
|
|
25809
|
+
};
|
|
25810
|
+
};
|
|
25811
|
+
};
|
|
25812
|
+
responses: {
|
|
25813
|
+
/** @description OK */
|
|
25814
|
+
200: {
|
|
25815
|
+
headers: {
|
|
25816
|
+
[name: string]: unknown;
|
|
25817
|
+
};
|
|
25818
|
+
content: {
|
|
25819
|
+
"application/json": {
|
|
25820
|
+
/** @description False when the organization was already in the requested state. */
|
|
25821
|
+
changed: boolean;
|
|
25822
|
+
pause: {
|
|
25823
|
+
org_id: string;
|
|
25824
|
+
paused: boolean;
|
|
25825
|
+
/** Format: date-time */
|
|
25826
|
+
paused_at: string | null;
|
|
25827
|
+
/** @description Why it was paused; null when not paused. */
|
|
25828
|
+
reason: string | null;
|
|
25829
|
+
/** @description The admin's user id, or `key:<id>` for a bearer key. Null when not paused. */
|
|
25830
|
+
paused_by: string | null;
|
|
25831
|
+
/** @enum {string|null} */
|
|
25832
|
+
paused_by_source: "bearer_key" | "user_token_verified" | "header_asserted" | null;
|
|
25833
|
+
/**
|
|
25834
|
+
* Format: date-time
|
|
25835
|
+
* @description The last resume, kept after a new pause.
|
|
25836
|
+
*/
|
|
25837
|
+
resumed_at: string | null;
|
|
25838
|
+
/** @description Increases by one on every pause and every resume. */
|
|
25839
|
+
generation: number;
|
|
25840
|
+
};
|
|
25841
|
+
};
|
|
25842
|
+
};
|
|
25843
|
+
};
|
|
25844
|
+
/** @description The body did not parse. */
|
|
25845
|
+
400: {
|
|
25846
|
+
headers: {
|
|
25847
|
+
[name: string]: unknown;
|
|
25848
|
+
};
|
|
25849
|
+
content: {
|
|
25850
|
+
"application/json": {
|
|
25851
|
+
error: {
|
|
25852
|
+
/** @enum {string} */
|
|
25853
|
+
code: "invalid_body";
|
|
25854
|
+
message: string;
|
|
25855
|
+
details?: {
|
|
25856
|
+
[key: string]: unknown;
|
|
25857
|
+
};
|
|
25858
|
+
};
|
|
25859
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
25860
|
+
request_id: string | null;
|
|
25861
|
+
};
|
|
25862
|
+
};
|
|
25863
|
+
};
|
|
25864
|
+
/** @description The dashboard path named no admin, or a token that did not verify. Bare `{ error, remediation }` body. */
|
|
25865
|
+
403: {
|
|
25866
|
+
headers: {
|
|
25867
|
+
[name: string]: unknown;
|
|
25868
|
+
};
|
|
25869
|
+
content: {
|
|
25870
|
+
"application/json": {
|
|
25871
|
+
error: string;
|
|
25872
|
+
remediation?: string;
|
|
25873
|
+
};
|
|
25874
|
+
};
|
|
25875
|
+
};
|
|
25876
|
+
/** @description The `{orgId}` in the path is not the authenticated org. */
|
|
25877
|
+
404: {
|
|
25878
|
+
headers: {
|
|
25879
|
+
[name: string]: unknown;
|
|
25880
|
+
};
|
|
25881
|
+
content: {
|
|
25882
|
+
"application/json": {
|
|
25883
|
+
error: {
|
|
25884
|
+
/** @enum {string} */
|
|
25885
|
+
code: "not_found";
|
|
25886
|
+
message: string;
|
|
25887
|
+
details?: {
|
|
25888
|
+
[key: string]: unknown;
|
|
25889
|
+
};
|
|
25890
|
+
};
|
|
25891
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
25892
|
+
request_id: string | null;
|
|
25893
|
+
};
|
|
25894
|
+
};
|
|
25895
|
+
};
|
|
25896
|
+
};
|
|
25897
|
+
};
|
|
25898
|
+
delete?: never;
|
|
25899
|
+
options?: never;
|
|
25900
|
+
head?: never;
|
|
25901
|
+
patch?: never;
|
|
25902
|
+
trace?: never;
|
|
25903
|
+
};
|
|
25643
25904
|
"/v1/paywalls": {
|
|
25644
25905
|
parameters: {
|
|
25645
25906
|
query?: never;
|
|
@@ -36377,6 +36638,10 @@ export interface components {
|
|
|
36377
36638
|
} | null;
|
|
36378
36639
|
/** @description The lifecycle steps, in order, each with a timestamp and an outcome. */
|
|
36379
36640
|
audit: unknown[];
|
|
36641
|
+
/** @description The attempt this payment settled under: the `attempt_id` sent, or the fresh one minted when none was. Presenting it again reads this outcome instead of paying again. */
|
|
36642
|
+
attempt_id: string;
|
|
36643
|
+
/** @description True when this `attempt_id` had already settled and this is its recorded outcome, answered again: every other field is the ORIGINAL response, verbatim, and nothing was sent, held, sealed or published by this call. False on the call that settled it. */
|
|
36644
|
+
idempotent_replay: boolean;
|
|
36380
36645
|
};
|
|
36381
36646
|
/** @description The destination of a TED, the Brazilian same-day bank wire. Present this object on a spend to send a wire instead of a Pix: its presence is what switches the rail, and what makes the three TED requirements on those operations bind. Money leaves the consumer's own sub-account, never a pooled one. */
|
|
36382
36647
|
TedDestination: {
|