@codespar/sdk 0.12.0 → 0.13.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/__tests__/api-client.test.js +10 -2
- package/dist/__tests__/api-client.test.js.map +1 -1
- package/dist/generated/openapi.d.ts +1102 -164
- package/dist/generated/openapi.d.ts.map +1 -1
- package/dist/generated/operations.d.ts +30 -0
- package/dist/generated/operations.d.ts.map +1 -1
- package/dist/generated/operations.js +6 -0
- package/dist/generated/operations.js.map +1 -1
- package/package.json +1 -1
|
@@ -2759,7 +2759,7 @@ export interface paths {
|
|
|
2759
2759
|
*
|
|
2760
2760
|
* `tool_input` IS NOT THE CALL. It is what the lane that raised the hold recorded, and two things happen to it on the way in. A hold raised on the session execute path carries `{}`, because that path hands the policy engine no tool input at all and the engine stores an empty object when it gets none. A hold raised on the proxy path carries `{ server, method, endpoint, body, params, headers }`, with the `authorization` and `cookie` request headers removed before the row is written. So an empty object here means 'this lane records nothing', not 'the agent sent nothing'.
|
|
2761
2761
|
*
|
|
2762
|
-
* `tool_name` HAS NO SINGLE FORMAT, because four lanes write it. The proxy path writes `<server>:<method>:<endpoint>` with the leading slash dropped and the remaining slashes turned into colons (`asaas`, `POST`, `/payments/create` becomes `asaas:post:payments:create`). The session execute path writes the caller's own `tool` string verbatim, which is any non-empty string that caller chose. The over-cap settlement lane writes `codespar_pay`. The operator account-status lane writes `admin:account_status_set`. Match on it only knowing which lane you are reading.
|
|
2762
|
+
* `tool_name` HAS NO SINGLE FORMAT, because four lanes write it. The proxy path writes `<server>:<method>:<endpoint>` with the leading slash dropped and the remaining slashes turned into colons (`asaas`, `POST`, `/payments/create` becomes `asaas:post:payments:create`). The session execute path writes the caller's own `tool` string verbatim, which is any non-empty string that caller chose. The over-cap settlement lane writes `codespar_pay`. The operator account-status lane writes `admin:account_status_set` and the operator withdrawal-resolution lane `admin:withdrawal_resolve`. Match on it only knowing which lane you are reading.
|
|
2763
2763
|
*
|
|
2764
2764
|
* `expires_at` is the end of the hold, not a display hint: once it passes, the row stops being decidable and the expiry sweep moves it to `expired`.
|
|
2765
2765
|
*
|
|
@@ -3907,7 +3907,7 @@ export interface paths {
|
|
|
3907
3907
|
* Which rate-card lanes are measured and charged for this org
|
|
3908
3908
|
* @description The public rate card has four lanes, told apart by the direction of the money: MOVIMENTAR (money leaving under a mandate, 10 bps), FATURAR (money being born in the receiver's account, 1%), GOVERNAR (account governance, per governed account) and OPERAR (non-monetary outcomes). A published price is not the same thing as a measured one, and this answer keeps the two apart per lane so a client never shows a figure the platform is not computing.
|
|
3909
3909
|
*
|
|
3910
|
-
* `computed` says whether this build measures the lane from the organization's own ledger; `charging` says whether the organization is actually invoiced for it; `latest` is the last computed period and is only ever non-null on a computed lane (its shape is the one `GET /v1/fees/movimentar`
|
|
3910
|
+
* `computed` says whether this build measures the lane from the organization's own ledger; `charging` says whether the organization is actually invoiced for it; `latest` is the last computed period and is only ever non-null on a computed lane (its shape is the one the lane's own read returns: `GET /v1/fees/movimentar`, `GET /v1/fees/governar`). Today MOVIMENTAR and GOVERNAR are the computed lanes; FATURAR and OPERAR are not measured and always answer `latest: null`. `charging` is each lane's own switch: an organization can be charged for one lane and not the other. `period` is the current calendar month in Sao Paulo time.
|
|
3911
3911
|
*
|
|
3912
3912
|
* Scope: `fees:read`.
|
|
3913
3913
|
*/
|
|
@@ -3951,36 +3951,16 @@ export interface paths {
|
|
|
3951
3951
|
faturar: {
|
|
3952
3952
|
computed: boolean;
|
|
3953
3953
|
charging: boolean;
|
|
3954
|
-
latest:
|
|
3955
|
-
period: string;
|
|
3956
|
-
consumerCount: number;
|
|
3957
|
-
movedMinor: number;
|
|
3958
|
-
freeTierAppliedMinor: number;
|
|
3959
|
-
billableMinor: number;
|
|
3960
|
-
refundCreditMinor: number;
|
|
3961
|
-
refundedCount: number;
|
|
3962
|
-
feeMinor: number;
|
|
3963
|
-
/** @enum {string} */
|
|
3964
|
-
rateTier: "self_serve" | "commit_8bps" | "commit_6bps";
|
|
3965
|
-
/** Format: date-time */
|
|
3966
|
-
computedAt: string;
|
|
3967
|
-
invoiced: boolean;
|
|
3968
|
-
} | null;
|
|
3954
|
+
latest: null;
|
|
3969
3955
|
};
|
|
3970
3956
|
governar: {
|
|
3971
3957
|
computed: boolean;
|
|
3972
3958
|
charging: boolean;
|
|
3973
3959
|
latest: {
|
|
3974
3960
|
period: string;
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
freeTierAppliedMinor: number;
|
|
3978
|
-
billableMinor: number;
|
|
3979
|
-
refundCreditMinor: number;
|
|
3980
|
-
refundedCount: number;
|
|
3961
|
+
governedAccountsCount: number;
|
|
3962
|
+
consumerIdsSha256: string;
|
|
3981
3963
|
feeMinor: number;
|
|
3982
|
-
/** @enum {string} */
|
|
3983
|
-
rateTier: "self_serve" | "commit_8bps" | "commit_6bps";
|
|
3984
3964
|
/** Format: date-time */
|
|
3985
3965
|
computedAt: string;
|
|
3986
3966
|
invoiced: boolean;
|
|
@@ -3989,21 +3969,7 @@ export interface paths {
|
|
|
3989
3969
|
operar: {
|
|
3990
3970
|
computed: boolean;
|
|
3991
3971
|
charging: boolean;
|
|
3992
|
-
latest:
|
|
3993
|
-
period: string;
|
|
3994
|
-
consumerCount: number;
|
|
3995
|
-
movedMinor: number;
|
|
3996
|
-
freeTierAppliedMinor: number;
|
|
3997
|
-
billableMinor: number;
|
|
3998
|
-
refundCreditMinor: number;
|
|
3999
|
-
refundedCount: number;
|
|
4000
|
-
feeMinor: number;
|
|
4001
|
-
/** @enum {string} */
|
|
4002
|
-
rateTier: "self_serve" | "commit_8bps" | "commit_6bps";
|
|
4003
|
-
/** Format: date-time */
|
|
4004
|
-
computedAt: string;
|
|
4005
|
-
invoiced: boolean;
|
|
4006
|
-
} | null;
|
|
3972
|
+
latest: null;
|
|
4007
3973
|
};
|
|
4008
3974
|
};
|
|
4009
3975
|
};
|
|
@@ -4078,6 +4044,61 @@ export interface paths {
|
|
|
4078
4044
|
patch?: never;
|
|
4079
4045
|
trace?: never;
|
|
4080
4046
|
};
|
|
4047
|
+
"/v1/fees/governar": {
|
|
4048
|
+
parameters: {
|
|
4049
|
+
query?: never;
|
|
4050
|
+
header?: never;
|
|
4051
|
+
path?: never;
|
|
4052
|
+
cookie?: never;
|
|
4053
|
+
};
|
|
4054
|
+
/**
|
|
4055
|
+
* The org's latest GOVERNAR-lane fee period (rate card v1)
|
|
4056
|
+
* @description What the calling credential's organization owes CodeSpar for the most recently computed calendar month (Sao Paulo time) under the GOVERNAR lane of the public rate card (Account governance): R$4,90 per governed account active in the month. A governed account active in the month is a holder that had a consumer mandate active at some instant of the month AND at least one outcome settled under one of their mandates in the month (a debit in the wallet ledger, or a receipt sealed). A holder with mandates and no settled outcome in the month costs nothing; a holder with three mandates is one account; the population resets every month.
|
|
4057
|
+
*
|
|
4058
|
+
* This lane prices the ACCOUNT, not the outcome. The same debit that pays 10 bps under MOVIMENTAR is what shows the account was alive in the month; it is not priced twice, because the two lines price two different things.
|
|
4059
|
+
*
|
|
4060
|
+
* HOW TO READ THE NUMBERS. `governedAccountsCount` is how many holders were counted; `feeMinor` is that count times R$4,90, in centavos; `consumerIdsSha256` is the SHA-256 (hex) of the counted consumer ids sorted and joined by a newline, so a client can verify its own list of accounts against the figure; the ids themselves stay on the platform's row for audit. `invoiced` says whether the period has been invoiced; a period is invoiced at most once.
|
|
4061
|
+
*
|
|
4062
|
+
* `null` (200) when no period has been computed for the organization yet. The period is computed by the platform, not on this read; `computedAt` says when.
|
|
4063
|
+
*
|
|
4064
|
+
* Scope: `fees:read`.
|
|
4065
|
+
*/
|
|
4066
|
+
get: {
|
|
4067
|
+
parameters: {
|
|
4068
|
+
query?: never;
|
|
4069
|
+
header?: never;
|
|
4070
|
+
path?: never;
|
|
4071
|
+
cookie?: never;
|
|
4072
|
+
};
|
|
4073
|
+
requestBody?: never;
|
|
4074
|
+
responses: {
|
|
4075
|
+
/** @description OK */
|
|
4076
|
+
200: {
|
|
4077
|
+
headers: {
|
|
4078
|
+
[name: string]: unknown;
|
|
4079
|
+
};
|
|
4080
|
+
content: {
|
|
4081
|
+
"application/json": {
|
|
4082
|
+
period: string;
|
|
4083
|
+
governedAccountsCount: number;
|
|
4084
|
+
consumerIdsSha256: string;
|
|
4085
|
+
feeMinor: number;
|
|
4086
|
+
/** Format: date-time */
|
|
4087
|
+
computedAt: string;
|
|
4088
|
+
invoiced: boolean;
|
|
4089
|
+
} | null;
|
|
4090
|
+
};
|
|
4091
|
+
};
|
|
4092
|
+
};
|
|
4093
|
+
};
|
|
4094
|
+
put?: never;
|
|
4095
|
+
post?: never;
|
|
4096
|
+
delete?: never;
|
|
4097
|
+
options?: never;
|
|
4098
|
+
head?: never;
|
|
4099
|
+
patch?: never;
|
|
4100
|
+
trace?: never;
|
|
4101
|
+
};
|
|
4081
4102
|
"/v1/cart/meli/connect/start": {
|
|
4082
4103
|
parameters: {
|
|
4083
4104
|
query?: never;
|
|
@@ -4502,6 +4523,7 @@ export interface paths {
|
|
|
4502
4523
|
};
|
|
4503
4524
|
/**
|
|
4504
4525
|
* Read the credential form a provider needs, without reading any credential
|
|
4526
|
+
* @deprecated
|
|
4505
4527
|
* @description What to ask an operator for before connecting this provider, and where the request will go once connected. It NEVER returns a stored secret: the vault is write-only from this side, and `fields` describes inputs to collect, not values that exist.
|
|
4506
4528
|
*
|
|
4507
4529
|
* AN EMPTY `fields` DOES NOT MEAN NOTHING TO DO, and four auth types produce one. `oauth` collects nothing here because the browser leg starts at `POST /v1/connections/start` instead. `none` needs no credential. And `jwt_ecdsa` and `cdp` reach no field-building branch at all, so they come back empty while still needing operator-issued material: read that pair as unsupported by this form rather than as ready to connect. The other five all return at least one field, `cert` included.
|
|
@@ -4664,6 +4686,7 @@ export interface paths {
|
|
|
4664
4686
|
put?: never;
|
|
4665
4687
|
/**
|
|
4666
4688
|
* Ask the provider whether this project's stored credential still works
|
|
4689
|
+
* @deprecated
|
|
4667
4690
|
* @description Issues ONE safe read against the provider using the credential this project has stored for it, and reports what came back. POST because it leaves the process and spends a provider call, not because it changes anything here: no state of yours is altered by it. It takes NO REQUEST BODY, and anything sent is ignored.
|
|
4668
4691
|
*
|
|
4669
4692
|
* WHICH READ depends on the provider. A handful ship a bespoke recipe, and those are the ones that can return an `account` summary. Everything else re-runs the provider's declared functional probe, the same authenticated read used to confirm a sandbox works when it is first set up; that path returns no `account`. A provider with neither answers 501.
|
|
@@ -4778,6 +4801,24 @@ export interface paths {
|
|
|
4778
4801
|
};
|
|
4779
4802
|
};
|
|
4780
4803
|
};
|
|
4804
|
+
/** @description `test_venue_unavailable`. The project is in `environment="test"` and this provider cannot be exercised there: its catalog entry classifies `test_venue` as `none` (the provider runs no test environment, so a call would land on production with a real effect) or `unclassified` (nobody has established what it does in test). Not a verdict on the credential and not retryable — the identical request from a `live` project reaches the provider (ent#722). */
|
|
4805
|
+
422: {
|
|
4806
|
+
headers: {
|
|
4807
|
+
[name: string]: unknown;
|
|
4808
|
+
};
|
|
4809
|
+
content: {
|
|
4810
|
+
"application/json": {
|
|
4811
|
+
/** @enum {boolean} */
|
|
4812
|
+
ok: false;
|
|
4813
|
+
/** @description The provider id from the path. */
|
|
4814
|
+
provider: string;
|
|
4815
|
+
/** @enum {string} */
|
|
4816
|
+
error: "test_venue_unavailable";
|
|
4817
|
+
/** @description A CodeSpar-authored sentence naming the catalog file and the field to declare. Never provider text — no round trip was made. */
|
|
4818
|
+
detail: string;
|
|
4819
|
+
};
|
|
4820
|
+
};
|
|
4821
|
+
};
|
|
4781
4822
|
/** @description `not_connected`. There is nothing to verify: either no active connection exists for this project and provider, or one exists and its stored credential did not resolve to a value. Connect the provider, or reconnect it. */
|
|
4782
4823
|
424: {
|
|
4783
4824
|
headers: {
|
|
@@ -5967,8 +6008,8 @@ export interface paths {
|
|
|
5967
6008
|
ok: false;
|
|
5968
6009
|
provider: string;
|
|
5969
6010
|
/** @enum {string} */
|
|
5970
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing";
|
|
5971
|
-
/** @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. */
|
|
6011
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
6012
|
+
/** @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. */
|
|
5972
6013
|
detail?: string;
|
|
5973
6014
|
/** @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. */
|
|
5974
6015
|
status?: number;
|
|
@@ -6000,8 +6041,8 @@ export interface paths {
|
|
|
6000
6041
|
ok: false;
|
|
6001
6042
|
provider: string;
|
|
6002
6043
|
/** @enum {string} */
|
|
6003
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing";
|
|
6004
|
-
/** @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. */
|
|
6044
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
6045
|
+
/** @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. */
|
|
6005
6046
|
detail?: string;
|
|
6006
6047
|
/** @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. */
|
|
6007
6048
|
status?: number;
|
|
@@ -6028,8 +6069,8 @@ export interface paths {
|
|
|
6028
6069
|
ok: false;
|
|
6029
6070
|
provider: string;
|
|
6030
6071
|
/** @enum {string} */
|
|
6031
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing";
|
|
6032
|
-
/** @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. */
|
|
6072
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
6073
|
+
/** @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. */
|
|
6033
6074
|
detail?: string;
|
|
6034
6075
|
/** @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. */
|
|
6035
6076
|
status?: number;
|
|
@@ -6056,8 +6097,8 @@ export interface paths {
|
|
|
6056
6097
|
ok: false;
|
|
6057
6098
|
provider: string;
|
|
6058
6099
|
/** @enum {string} */
|
|
6059
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing";
|
|
6060
|
-
/** @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. */
|
|
6100
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
6101
|
+
/** @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. */
|
|
6061
6102
|
detail?: string;
|
|
6062
6103
|
/** @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. */
|
|
6063
6104
|
status?: number;
|
|
@@ -6084,8 +6125,8 @@ export interface paths {
|
|
|
6084
6125
|
ok: false;
|
|
6085
6126
|
provider: string;
|
|
6086
6127
|
/** @enum {string} */
|
|
6087
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing";
|
|
6088
|
-
/** @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. */
|
|
6128
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
6129
|
+
/** @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. */
|
|
6089
6130
|
detail?: string;
|
|
6090
6131
|
/** @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. */
|
|
6091
6132
|
status?: number;
|
|
@@ -6112,8 +6153,8 @@ export interface paths {
|
|
|
6112
6153
|
ok: false;
|
|
6113
6154
|
provider: string;
|
|
6114
6155
|
/** @enum {string} */
|
|
6115
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing";
|
|
6116
|
-
/** @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. */
|
|
6156
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
6157
|
+
/** @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. */
|
|
6117
6158
|
detail?: string;
|
|
6118
6159
|
/** @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. */
|
|
6119
6160
|
status?: number;
|
|
@@ -6140,8 +6181,8 @@ export interface paths {
|
|
|
6140
6181
|
ok: false;
|
|
6141
6182
|
provider: string;
|
|
6142
6183
|
/** @enum {string} */
|
|
6143
|
-
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing";
|
|
6144
|
-
/** @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. */
|
|
6184
|
+
error: "server_unknown" | "verify_unsupported" | "not_connected" | "provider_rejected" | "provider_unreachable" | "redirect_not_followed" | "endpoint_missing" | "test_venue_unavailable";
|
|
6185
|
+
/** @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. */
|
|
6145
6186
|
detail?: string;
|
|
6146
6187
|
/** @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. */
|
|
6147
6188
|
status?: number;
|
|
@@ -6875,6 +6916,23 @@ export interface paths {
|
|
|
6875
6916
|
};
|
|
6876
6917
|
};
|
|
6877
6918
|
};
|
|
6919
|
+
/** @description The project is in `environment="test"` and this provider has no test venue, so the flow is refused BEFORE a state token is minted — a refused start leaves no half-begun link behind. Sending a test project to the provider's LIVE consent screen would have it authorise a real account and vault a real token under a project that is not supposed to hold one (ent#722). Not retryable; the same call from a `live` project succeeds. */
|
|
6920
|
+
422: {
|
|
6921
|
+
headers: {
|
|
6922
|
+
[name: string]: unknown;
|
|
6923
|
+
};
|
|
6924
|
+
content: {
|
|
6925
|
+
"application/json": {
|
|
6926
|
+
/** @enum {string} */
|
|
6927
|
+
error: "test_venue_unavailable";
|
|
6928
|
+
server_id: string;
|
|
6929
|
+
/** @enum {string} */
|
|
6930
|
+
environment: "live" | "test";
|
|
6931
|
+
/** @description Names the catalog file and the field to declare. */
|
|
6932
|
+
detail: string;
|
|
6933
|
+
};
|
|
6934
|
+
};
|
|
6935
|
+
};
|
|
6878
6936
|
/** @description The platform's OAuth client credential is not seeded for this provider. A configuration defect on our side. */
|
|
6879
6937
|
500: {
|
|
6880
6938
|
headers: {
|
|
@@ -7968,6 +8026,7 @@ export interface paths {
|
|
|
7968
8026
|
};
|
|
7969
8027
|
/**
|
|
7970
8028
|
* Browse the audit chain (alias path)
|
|
8029
|
+
* @deprecated
|
|
7971
8030
|
* @description A read-only page of the caller's own tamper-evident chain, newest first.
|
|
7972
8031
|
*
|
|
7973
8032
|
* THIS IS AN ALIAS OF `GET /v1/audit-events`, NOT A SECOND RESOURCE. One handler serves both paths, so the query, the body and every refusal are identical and there is nothing to choose between them. It is described separately only because a generated client sees two operations; pick one spelling and stay on it. Note that the OTHER audit operations — the chain's health report, its incidents, its configuration — have no twin under this prefix and live only under `/v1/audit-events`.
|
|
@@ -8525,8 +8584,12 @@ export interface paths {
|
|
|
8525
8584
|
counterparty_id: string;
|
|
8526
8585
|
/** @enum {string} */
|
|
8527
8586
|
kind: "quote" | "negotiation" | "order" | "invoice" | "payment" | "shipment" | "message" | "other";
|
|
8528
|
-
/** @description Minor units.
|
|
8587
|
+
/** @description Minor units (cents). The row is STORED in the currency's native unit, BRL centavos and USDC 10^-6 (ent#1203), and rendered here in cents rounded away from zero, so a USDC row of 0.001 reads as 1 and never as 0. `amount_native` carries the exact figure. Null unless `currency` is also set. */
|
|
8529
8588
|
amount_minor: number | null;
|
|
8589
|
+
/** @description The stored figure, exact, in the currency's NATIVE unit as a decimal string: BRL centavos, USDC 10^-6. This is the unit the wallet ledger holds, so it joins to `wallet_ledger.amount_minor` without conversion. Null when `amount_minor` is. */
|
|
8590
|
+
amount_native: string | null;
|
|
8591
|
+
/** @description The same figure in major units as a decimal string (`"0.001"`, `"19.99"`), for display. */
|
|
8592
|
+
amount: string | null;
|
|
8530
8593
|
currency: string | null;
|
|
8531
8594
|
/** Format: date-time */
|
|
8532
8595
|
occurred_at: string;
|
|
@@ -8590,7 +8653,7 @@ export interface paths {
|
|
|
8590
8653
|
counterparty_id: string;
|
|
8591
8654
|
/** @enum {string} */
|
|
8592
8655
|
kind: "quote" | "negotiation" | "order" | "invoice" | "payment" | "shipment" | "message" | "other";
|
|
8593
|
-
/** @description Minor units. Set it together with `currency` or omit both. */
|
|
8656
|
+
/** @description Minor units (cents). Stored in the currency's native unit (USDC x10^4, BRL as is), so this field cannot carry a sub-cent USDC figure. Set it together with `currency` or omit both. */
|
|
8594
8657
|
amount_minor?: number;
|
|
8595
8658
|
currency?: string;
|
|
8596
8659
|
/**
|
|
@@ -8628,8 +8691,12 @@ export interface paths {
|
|
|
8628
8691
|
counterparty_id: string;
|
|
8629
8692
|
/** @enum {string} */
|
|
8630
8693
|
kind: "quote" | "negotiation" | "order" | "invoice" | "payment" | "shipment" | "message" | "other";
|
|
8631
|
-
/** @description Minor units.
|
|
8694
|
+
/** @description Minor units (cents). The row is STORED in the currency's native unit, BRL centavos and USDC 10^-6 (ent#1203), and rendered here in cents rounded away from zero, so a USDC row of 0.001 reads as 1 and never as 0. `amount_native` carries the exact figure. Null unless `currency` is also set. */
|
|
8632
8695
|
amount_minor: number | null;
|
|
8696
|
+
/** @description The stored figure, exact, in the currency's NATIVE unit as a decimal string: BRL centavos, USDC 10^-6. This is the unit the wallet ledger holds, so it joins to `wallet_ledger.amount_minor` without conversion. Null when `amount_minor` is. */
|
|
8697
|
+
amount_native: string | null;
|
|
8698
|
+
/** @description The same figure in major units as a decimal string (`"0.001"`, `"19.99"`), for display. */
|
|
8699
|
+
amount: string | null;
|
|
8633
8700
|
currency: string | null;
|
|
8634
8701
|
/** Format: date-time */
|
|
8635
8702
|
occurred_at: string;
|
|
@@ -8657,8 +8724,12 @@ export interface paths {
|
|
|
8657
8724
|
counterparty_id: string;
|
|
8658
8725
|
/** @enum {string} */
|
|
8659
8726
|
kind: "quote" | "negotiation" | "order" | "invoice" | "payment" | "shipment" | "message" | "other";
|
|
8660
|
-
/** @description Minor units.
|
|
8727
|
+
/** @description Minor units (cents). The row is STORED in the currency's native unit, BRL centavos and USDC 10^-6 (ent#1203), and rendered here in cents rounded away from zero, so a USDC row of 0.001 reads as 1 and never as 0. `amount_native` carries the exact figure. Null unless `currency` is also set. */
|
|
8661
8728
|
amount_minor: number | null;
|
|
8729
|
+
/** @description The stored figure, exact, in the currency's NATIVE unit as a decimal string: BRL centavos, USDC 10^-6. This is the unit the wallet ledger holds, so it joins to `wallet_ledger.amount_minor` without conversion. Null when `amount_minor` is. */
|
|
8730
|
+
amount_native: string | null;
|
|
8731
|
+
/** @description The same figure in major units as a decimal string (`"0.001"`, `"19.99"`), for display. */
|
|
8732
|
+
amount: string | null;
|
|
8662
8733
|
currency: string | null;
|
|
8663
8734
|
/** Format: date-time */
|
|
8664
8735
|
occurred_at: string;
|
|
@@ -9223,7 +9294,7 @@ export interface paths {
|
|
|
9223
9294
|
interaction_count: number;
|
|
9224
9295
|
/** @description Of those, the ones with `kind: payment`. */
|
|
9225
9296
|
payment_count: number;
|
|
9226
|
-
/** @description Sum
|
|
9297
|
+
/** @description Sum over the window's PAYMENT interactions only, ACROSS CURRENCIES, in cents: each row is converted from its currency's native unit before the sum and the total is rounded up once. Read `currencies` before reading this as an amount. */
|
|
9227
9298
|
total_payment_minor: number;
|
|
9228
9299
|
/** @description Distinct non null currencies over the window's interactions of EVERY kind, not only the payments the total is built from. It is therefore an UPPER BOUND on the currencies inside `total_payment_minor` and never a smaller set: an invoice priced in USD puts USD here while the total stays pure BRL. One entry (or none) does bound the total to a single currency; two or more do not prove it mixes. */
|
|
9229
9300
|
currencies: string[];
|
|
@@ -9411,7 +9482,7 @@ export interface paths {
|
|
|
9411
9482
|
/** @enum {string} */
|
|
9412
9483
|
kind: "supplier" | "customer" | "agent_peer";
|
|
9413
9484
|
payment_count: number;
|
|
9414
|
-
/** @description Sum
|
|
9485
|
+
/** @description Sum over the window's payment interactions, ACROSS CURRENCIES, in cents: each row converted from its currency's native unit before the sum, the total rounded up once. */
|
|
9415
9486
|
total_payment_minor: number;
|
|
9416
9487
|
/** @description The most frequent currency over ALL of this counterparty's payment interactions, ignoring `since` and `until`, so it can name a currency the window itself never saw. */
|
|
9417
9488
|
dominant_currency: string | null;
|
|
@@ -10210,6 +10281,23 @@ export interface paths {
|
|
|
10210
10281
|
};
|
|
10211
10282
|
};
|
|
10212
10283
|
};
|
|
10284
|
+
/** @description The project is in `environment="test"` and this provider has no test venue, so the flow is refused BEFORE a state token is minted — a refused start leaves no half-begun link behind. Sending a test project to the provider's LIVE consent screen would have it authorise a real account and vault a real token under a project that is not supposed to hold one (ent#722). Not retryable; the same call from a `live` project succeeds. */
|
|
10285
|
+
422: {
|
|
10286
|
+
headers: {
|
|
10287
|
+
[name: string]: unknown;
|
|
10288
|
+
};
|
|
10289
|
+
content: {
|
|
10290
|
+
"application/json": {
|
|
10291
|
+
/** @enum {string} */
|
|
10292
|
+
error: "test_venue_unavailable";
|
|
10293
|
+
server_id: string;
|
|
10294
|
+
/** @enum {string} */
|
|
10295
|
+
environment: "live" | "test";
|
|
10296
|
+
/** @description Names the catalog file and the field to declare. */
|
|
10297
|
+
detail: string;
|
|
10298
|
+
};
|
|
10299
|
+
};
|
|
10300
|
+
};
|
|
10213
10301
|
/** @description The platform's OAuth client credential is not seeded for this provider. A configuration defect on our side. */
|
|
10214
10302
|
500: {
|
|
10215
10303
|
headers: {
|
|
@@ -10255,45 +10343,715 @@ export interface paths {
|
|
|
10255
10343
|
path: {
|
|
10256
10344
|
run_id: string;
|
|
10257
10345
|
};
|
|
10258
|
-
cookie?: never;
|
|
10259
|
-
};
|
|
10260
|
-
requestBody?: never;
|
|
10261
|
-
responses: {
|
|
10262
|
-
/** @description OK */
|
|
10263
|
-
200: {
|
|
10346
|
+
cookie?: never;
|
|
10347
|
+
};
|
|
10348
|
+
requestBody?: never;
|
|
10349
|
+
responses: {
|
|
10350
|
+
/** @description OK */
|
|
10351
|
+
200: {
|
|
10352
|
+
headers: {
|
|
10353
|
+
[name: string]: unknown;
|
|
10354
|
+
};
|
|
10355
|
+
content: {
|
|
10356
|
+
"application/json": {
|
|
10357
|
+
/** @enum {string} */
|
|
10358
|
+
status: "running" | "needs_verification" | "provisioned" | "failed";
|
|
10359
|
+
/** @description Present while the run waits on the customer. Fallback copy when the modal has none of its own. */
|
|
10360
|
+
prompt?: string;
|
|
10361
|
+
/** @description Resolved from the provider's public descriptor. Present only while `status` is `needs_verification`. */
|
|
10362
|
+
verification?: {
|
|
10363
|
+
/**
|
|
10364
|
+
* @description `code` means the provider mailed a one-time code to type; `link` means it mailed an activation link to click.
|
|
10365
|
+
* @enum {string}
|
|
10366
|
+
*/
|
|
10367
|
+
mechanism: "code" | "link";
|
|
10368
|
+
resend?: boolean;
|
|
10369
|
+
};
|
|
10370
|
+
/** @description Result of the post-provision reachability probe, when one ran. */
|
|
10371
|
+
probe_result?: unknown;
|
|
10372
|
+
/** @description The `ca_` id of the connection the run produced. Present once the run reaches `provisioned`. */
|
|
10373
|
+
connection_id?: string;
|
|
10374
|
+
/**
|
|
10375
|
+
* @description Why the run failed. A stored value outside this vocabulary is reported as absent rather than passed through, so a failed run can render as its status alone.
|
|
10376
|
+
* @enum {string}
|
|
10377
|
+
*/
|
|
10378
|
+
code?: "flow_failed" | "capacity" | "no_credential_captured" | "probe_failed" | "drive_deadline_exceeded" | "provider_account_not_registered" | "drive_stalled" | "resume_inputs_unavailable";
|
|
10379
|
+
failed_step_id?: string;
|
|
10380
|
+
};
|
|
10381
|
+
};
|
|
10382
|
+
};
|
|
10383
|
+
/** @description No run with that id inside the caller's org and project. */
|
|
10384
|
+
404: {
|
|
10385
|
+
headers: {
|
|
10386
|
+
[name: string]: unknown;
|
|
10387
|
+
};
|
|
10388
|
+
content: {
|
|
10389
|
+
"application/json": {
|
|
10390
|
+
error: {
|
|
10391
|
+
/** @enum {string} */
|
|
10392
|
+
code: "not_found";
|
|
10393
|
+
message: string;
|
|
10394
|
+
};
|
|
10395
|
+
};
|
|
10396
|
+
};
|
|
10397
|
+
};
|
|
10398
|
+
/** @description The paused run expired before it was resumed. */
|
|
10399
|
+
410: {
|
|
10400
|
+
headers: {
|
|
10401
|
+
[name: string]: unknown;
|
|
10402
|
+
};
|
|
10403
|
+
content: {
|
|
10404
|
+
"application/json": {
|
|
10405
|
+
error: {
|
|
10406
|
+
/** @enum {string} */
|
|
10407
|
+
code: "run_stale";
|
|
10408
|
+
message: string;
|
|
10409
|
+
details?: {
|
|
10410
|
+
[key: string]: unknown;
|
|
10411
|
+
};
|
|
10412
|
+
};
|
|
10413
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
10414
|
+
request_id: string | null;
|
|
10415
|
+
};
|
|
10416
|
+
};
|
|
10417
|
+
};
|
|
10418
|
+
};
|
|
10419
|
+
};
|
|
10420
|
+
put?: never;
|
|
10421
|
+
post?: never;
|
|
10422
|
+
delete?: never;
|
|
10423
|
+
options?: never;
|
|
10424
|
+
head?: never;
|
|
10425
|
+
patch?: never;
|
|
10426
|
+
trace?: never;
|
|
10427
|
+
};
|
|
10428
|
+
"/v1/connections/subaccount/{id}/revoke": {
|
|
10429
|
+
parameters: {
|
|
10430
|
+
query?: never;
|
|
10431
|
+
header?: never;
|
|
10432
|
+
path?: never;
|
|
10433
|
+
cookie?: never;
|
|
10434
|
+
};
|
|
10435
|
+
get?: never;
|
|
10436
|
+
put?: never;
|
|
10437
|
+
/**
|
|
10438
|
+
* Revoke a provisioned subaccount and try to delete it upstream
|
|
10439
|
+
* @description The revoke for accounts this platform minted on the customer's behalf. It is not `POST /v1/connections/{id}/revoke`: the generic purge targets the ref keyed on the server id, which is the wrong ref for a per-account subaccount credential, and it touches neither the provisioning record nor the account at the provider.
|
|
10440
|
+
*
|
|
10441
|
+
* Local teardown first, atomically: the connection projection flips, the provisioning record flips, and the correct per-account vault ref is purged. A failure in that phase changes nothing and answers 503, so a retry is safe. Only then is a delete attempted at the provider.
|
|
10442
|
+
*
|
|
10443
|
+
* READ `upstream` BEFORE TREATING THIS AS FINISHED. `deleted` means the account is gone at the provider. `not_applicable` means the lane has no delete to make. `delete_failed` and `orphaned` mean the credential is destroyed on our side but an account may still exist upstream, and closing it is a manual step. All four come back with 200, because the local teardown did succeed.
|
|
10444
|
+
*
|
|
10445
|
+
* `{id}` is a connection id for the customer path, matched only inside the caller's own org and project. It is a provisioning record id for the operator-internal path, which additionally requires service auth. A customer credential can never reach an operator-internal record: it misses the connection lookup and gets 404, never a 403 that would confirm the id exists. A repeated revoke returns `already: true` and changes nothing.
|
|
10446
|
+
*/
|
|
10447
|
+
post: {
|
|
10448
|
+
parameters: {
|
|
10449
|
+
query?: never;
|
|
10450
|
+
header?: never;
|
|
10451
|
+
path: {
|
|
10452
|
+
/** @description A `ca_` connection id, or a `pr_` provisioning record id on the operator-internal path. */
|
|
10453
|
+
id: string;
|
|
10454
|
+
};
|
|
10455
|
+
cookie?: never;
|
|
10456
|
+
};
|
|
10457
|
+
requestBody?: never;
|
|
10458
|
+
responses: {
|
|
10459
|
+
/** @description OK */
|
|
10460
|
+
200: {
|
|
10461
|
+
headers: {
|
|
10462
|
+
[name: string]: unknown;
|
|
10463
|
+
};
|
|
10464
|
+
content: {
|
|
10465
|
+
"application/json": {
|
|
10466
|
+
/** @enum {string} */
|
|
10467
|
+
status: "revoked";
|
|
10468
|
+
record_id: string;
|
|
10469
|
+
/** @description The connection projection's id, or the provisioning record's id when there is no projection. */
|
|
10470
|
+
connection_id: string;
|
|
10471
|
+
/**
|
|
10472
|
+
* @description What happened at the provider. `delete_failed` and `orphaned` mean an account may still exist there; the local credential is gone either way.
|
|
10473
|
+
* @enum {string}
|
|
10474
|
+
*/
|
|
10475
|
+
upstream: "deleted" | "delete_failed" | "not_applicable" | "orphaned";
|
|
10476
|
+
/**
|
|
10477
|
+
* @description Present when the subaccount was already revoked. Nothing changed.
|
|
10478
|
+
* @enum {boolean}
|
|
10479
|
+
*/
|
|
10480
|
+
already?: true;
|
|
10481
|
+
};
|
|
10482
|
+
};
|
|
10483
|
+
};
|
|
10484
|
+
/** @description This is a write, so it carries a role floor: a service-auth caller must send `x-codespar-user` and hold admin or above. */
|
|
10485
|
+
403: {
|
|
10486
|
+
headers: {
|
|
10487
|
+
[name: string]: unknown;
|
|
10488
|
+
};
|
|
10489
|
+
content: {
|
|
10490
|
+
"application/json": {
|
|
10491
|
+
error: {
|
|
10492
|
+
/** @enum {string} */
|
|
10493
|
+
code: "insufficient_role";
|
|
10494
|
+
message: string;
|
|
10495
|
+
details?: {
|
|
10496
|
+
[key: string]: unknown;
|
|
10497
|
+
};
|
|
10498
|
+
};
|
|
10499
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
10500
|
+
request_id: string | null;
|
|
10501
|
+
};
|
|
10502
|
+
};
|
|
10503
|
+
};
|
|
10504
|
+
/** @description No connection or operator-internal record with that id is reachable by this caller. */
|
|
10505
|
+
404: {
|
|
10506
|
+
headers: {
|
|
10507
|
+
[name: string]: unknown;
|
|
10508
|
+
};
|
|
10509
|
+
content: {
|
|
10510
|
+
"application/json": {
|
|
10511
|
+
error: {
|
|
10512
|
+
/** @enum {string} */
|
|
10513
|
+
code: "not_found";
|
|
10514
|
+
message: string;
|
|
10515
|
+
};
|
|
10516
|
+
};
|
|
10517
|
+
};
|
|
10518
|
+
};
|
|
10519
|
+
/** @description The revoke threw unexpectedly. */
|
|
10520
|
+
500: {
|
|
10521
|
+
headers: {
|
|
10522
|
+
[name: string]: unknown;
|
|
10523
|
+
};
|
|
10524
|
+
content: {
|
|
10525
|
+
"application/json": {
|
|
10526
|
+
error: {
|
|
10527
|
+
/** @enum {string} */
|
|
10528
|
+
code: "revoke_failed";
|
|
10529
|
+
message: string;
|
|
10530
|
+
details?: {
|
|
10531
|
+
[key: string]: unknown;
|
|
10532
|
+
};
|
|
10533
|
+
};
|
|
10534
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
10535
|
+
request_id: string | null;
|
|
10536
|
+
};
|
|
10537
|
+
};
|
|
10538
|
+
};
|
|
10539
|
+
/** @description The internal phase failed and left nothing changed. Retry. */
|
|
10540
|
+
503: {
|
|
10541
|
+
headers: {
|
|
10542
|
+
[name: string]: unknown;
|
|
10543
|
+
};
|
|
10544
|
+
content: {
|
|
10545
|
+
"application/json": {
|
|
10546
|
+
error: {
|
|
10547
|
+
/** @enum {string} */
|
|
10548
|
+
code: "revoke_failed";
|
|
10549
|
+
message: string;
|
|
10550
|
+
details?: {
|
|
10551
|
+
[key: string]: unknown;
|
|
10552
|
+
};
|
|
10553
|
+
};
|
|
10554
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
10555
|
+
request_id: string | null;
|
|
10556
|
+
};
|
|
10557
|
+
};
|
|
10558
|
+
};
|
|
10559
|
+
};
|
|
10560
|
+
};
|
|
10561
|
+
delete?: never;
|
|
10562
|
+
options?: never;
|
|
10563
|
+
head?: never;
|
|
10564
|
+
patch?: never;
|
|
10565
|
+
trace?: never;
|
|
10566
|
+
};
|
|
10567
|
+
"/v1/connections/subaccount/{id}/status": {
|
|
10568
|
+
parameters: {
|
|
10569
|
+
query?: never;
|
|
10570
|
+
header?: never;
|
|
10571
|
+
path?: never;
|
|
10572
|
+
cookie?: never;
|
|
10573
|
+
};
|
|
10574
|
+
/**
|
|
10575
|
+
* Read whether a provisioned subaccount can transact yet
|
|
10576
|
+
* @description Read-only, with one live call to the provider. It writes nothing and changes no state.
|
|
10577
|
+
*
|
|
10578
|
+
* `charges_enabled` is what the provider says right now, not a cached flag, which is why a provider that is unreachable answers 502 rather than a stale `false`. The one exception is a revoked record: it short-circuits to `status: "revoked"` and `charges_enabled: false` without calling the provider at all, since there is nothing left to poll. A confirmed account that never reached an upstream account ref reports not-yet-chargeable for the same reason.
|
|
10579
|
+
*
|
|
10580
|
+
* `capabilities` carries the provider's per-capability activation states when it reports them, and is absent when it does not. An account can be provisioned and still not chargeable; gate any money movement on `charges_enabled`, not on the existence of the connection.
|
|
10581
|
+
*
|
|
10582
|
+
* Same dual-id resolution and same cross-tenant 404 as the revoke beside it, minus its admin floor: a read does not need one.
|
|
10583
|
+
*/
|
|
10584
|
+
get: {
|
|
10585
|
+
parameters: {
|
|
10586
|
+
query?: never;
|
|
10587
|
+
header?: never;
|
|
10588
|
+
path: {
|
|
10589
|
+
/** @description A `ca_` connection id, or a `pr_` provisioning record id on the operator-internal path. */
|
|
10590
|
+
id: string;
|
|
10591
|
+
};
|
|
10592
|
+
cookie?: never;
|
|
10593
|
+
};
|
|
10594
|
+
requestBody?: never;
|
|
10595
|
+
responses: {
|
|
10596
|
+
/** @description OK */
|
|
10597
|
+
200: {
|
|
10598
|
+
headers: {
|
|
10599
|
+
[name: string]: unknown;
|
|
10600
|
+
};
|
|
10601
|
+
content: {
|
|
10602
|
+
"application/json": {
|
|
10603
|
+
/** @enum {string} */
|
|
10604
|
+
status: "provisioned" | "revoked";
|
|
10605
|
+
charges_enabled: boolean;
|
|
10606
|
+
/** @description Per-capability activation states as the provider reports them, for example `card_payments: "active"`. */
|
|
10607
|
+
capabilities?: {
|
|
10608
|
+
[key: string]: string;
|
|
10609
|
+
};
|
|
10610
|
+
/** @description The upstream account identifier. Empty string when the record never reached one. */
|
|
10611
|
+
account_ref: string;
|
|
10612
|
+
};
|
|
10613
|
+
};
|
|
10614
|
+
};
|
|
10615
|
+
/** @description No connection or operator-internal record with that id is reachable by this caller. */
|
|
10616
|
+
404: {
|
|
10617
|
+
headers: {
|
|
10618
|
+
[name: string]: unknown;
|
|
10619
|
+
};
|
|
10620
|
+
content: {
|
|
10621
|
+
"application/json": {
|
|
10622
|
+
error: {
|
|
10623
|
+
/** @enum {string} */
|
|
10624
|
+
code: "not_found";
|
|
10625
|
+
message: string;
|
|
10626
|
+
};
|
|
10627
|
+
};
|
|
10628
|
+
};
|
|
10629
|
+
};
|
|
10630
|
+
/** @description The status read threw unexpectedly. */
|
|
10631
|
+
500: {
|
|
10632
|
+
headers: {
|
|
10633
|
+
[name: string]: unknown;
|
|
10634
|
+
};
|
|
10635
|
+
content: {
|
|
10636
|
+
"application/json": {
|
|
10637
|
+
error: {
|
|
10638
|
+
/** @enum {string} */
|
|
10639
|
+
code: "status_failed";
|
|
10640
|
+
message: string;
|
|
10641
|
+
details?: {
|
|
10642
|
+
[key: string]: unknown;
|
|
10643
|
+
};
|
|
10644
|
+
};
|
|
10645
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
10646
|
+
request_id: string | null;
|
|
10647
|
+
};
|
|
10648
|
+
};
|
|
10649
|
+
};
|
|
10650
|
+
/** @description The provider read did not produce a status. Usually the live call failed or timed out, and a retry is the right response. TWO OF THE CASES BEHIND THIS CODE ARE NOT TRANSIENT and retrying never clears them: the provider has no subaccount descriptor in this deployment, and no platform account credential is registered for it. Both are configuration defects on our side; `error.message` distinguishes them from a provider outage. */
|
|
10651
|
+
502: {
|
|
10652
|
+
headers: {
|
|
10653
|
+
[name: string]: unknown;
|
|
10654
|
+
};
|
|
10655
|
+
content: {
|
|
10656
|
+
"application/json": {
|
|
10657
|
+
error: {
|
|
10658
|
+
/** @enum {string} */
|
|
10659
|
+
code: "status_failed";
|
|
10660
|
+
message: string;
|
|
10661
|
+
details?: {
|
|
10662
|
+
[key: string]: unknown;
|
|
10663
|
+
};
|
|
10664
|
+
};
|
|
10665
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
10666
|
+
request_id: string | null;
|
|
10667
|
+
};
|
|
10668
|
+
};
|
|
10669
|
+
};
|
|
10670
|
+
};
|
|
10671
|
+
};
|
|
10672
|
+
put?: never;
|
|
10673
|
+
post?: never;
|
|
10674
|
+
delete?: never;
|
|
10675
|
+
options?: never;
|
|
10676
|
+
head?: never;
|
|
10677
|
+
patch?: never;
|
|
10678
|
+
trace?: never;
|
|
10679
|
+
};
|
|
10680
|
+
"/v1/consents": {
|
|
10681
|
+
parameters: {
|
|
10682
|
+
query?: never;
|
|
10683
|
+
header?: never;
|
|
10684
|
+
path?: never;
|
|
10685
|
+
cookie?: never;
|
|
10686
|
+
};
|
|
10687
|
+
get?: never;
|
|
10688
|
+
put?: never;
|
|
10689
|
+
/**
|
|
10690
|
+
* Start a hosted consent
|
|
10691
|
+
* @description Starts a hosted consent for a consumer mandate. The partner's backend calls this with its API key and gets a one-shot token carrying the intent the consumer is about to authorize (purpose, total and per-transaction caps, currency, mandate TTL and the merchant, withdrawal and DDA allowlists that will be signed into the mandate). The partner composes the URL of the hosted consent page from the token and hands it to the consumer.
|
|
10692
|
+
*
|
|
10693
|
+
* The consumer signs on the hosted page. The mandate is created server-side when the consumer submits there: the consumer's secret is provisioned, the mandate is signed with it, the funding source and the consent record are written and the token is consumed, in one transaction. The API key never signs, and the page's own calls are not operations of this document: nothing a partner can call with a key produces a signed mandate.
|
|
10694
|
+
*
|
|
10695
|
+
* `intent.merchant_allowlist` defaults to `["*"]`, an explicit wildcard bounded by the caps, purpose and expiry; pass concrete Pix keys to narrow it. `intent.withdrawal_allowlist` and `intent.dda_allowlist` are deliberately NOT defaulted: absent means the mandate authorizes no cash-out and no DDA registration, which is a different thing from a wildcard, and `"*"` is refused in both. `callback_url`, when given, is returned to the hosted page at submit time so the partner's backend can receive the signed mandate.
|
|
10696
|
+
*
|
|
10697
|
+
* The token is stamped with the credential's project, and that stamp is what scopes the funding source the consumer's submission later creates.
|
|
10698
|
+
*
|
|
10699
|
+
* Requires the `consents:write` scope.
|
|
10700
|
+
*/
|
|
10701
|
+
post: {
|
|
10702
|
+
parameters: {
|
|
10703
|
+
query?: never;
|
|
10704
|
+
header?: never;
|
|
10705
|
+
path?: never;
|
|
10706
|
+
cookie?: never;
|
|
10707
|
+
};
|
|
10708
|
+
requestBody?: {
|
|
10709
|
+
content: {
|
|
10710
|
+
"application/json": {
|
|
10711
|
+
agent_id: string;
|
|
10712
|
+
/** Format: email */
|
|
10713
|
+
consumer_email_hint?: string;
|
|
10714
|
+
intent: {
|
|
10715
|
+
purpose: string;
|
|
10716
|
+
cap_minor: number;
|
|
10717
|
+
per_tx_cap_minor: number;
|
|
10718
|
+
/** @enum {string} */
|
|
10719
|
+
currency: "BRL" | "USD" | "MXN" | "COP" | "ARS" | "USDC" | "BRLA";
|
|
10720
|
+
mandate_ttl_seconds: number;
|
|
10721
|
+
/**
|
|
10722
|
+
* @default [
|
|
10723
|
+
* "*"
|
|
10724
|
+
* ]
|
|
10725
|
+
*/
|
|
10726
|
+
merchant_allowlist?: string[];
|
|
10727
|
+
/**
|
|
10728
|
+
* @default pix-key
|
|
10729
|
+
* @enum {string}
|
|
10730
|
+
*/
|
|
10731
|
+
merchant_pin_kind?: "pix-key" | "merchant-id" | "mcc";
|
|
10732
|
+
withdrawal_allowlist?: string[];
|
|
10733
|
+
dda_allowlist?: string[];
|
|
10734
|
+
slots?: {
|
|
10735
|
+
/** @enum {string} */
|
|
10736
|
+
currency: "BRL" | "USD" | "MXN" | "COP" | "ARS" | "USDC" | "BRLA";
|
|
10737
|
+
rail: string;
|
|
10738
|
+
cap_minor: number;
|
|
10739
|
+
per_tx_cap_minor: number;
|
|
10740
|
+
}[];
|
|
10741
|
+
display_name?: string;
|
|
10742
|
+
intent_note?: string;
|
|
10743
|
+
shipping?: {
|
|
10744
|
+
[key: string]: unknown;
|
|
10745
|
+
};
|
|
10746
|
+
};
|
|
10747
|
+
/** Format: uri */
|
|
10748
|
+
callback_url?: string;
|
|
10749
|
+
};
|
|
10750
|
+
};
|
|
10751
|
+
};
|
|
10752
|
+
responses: {
|
|
10753
|
+
/** @description Created. The consent is pending until the consumer signs on the hosted page or the token expires. */
|
|
10754
|
+
201: {
|
|
10755
|
+
headers: {
|
|
10756
|
+
[name: string]: unknown;
|
|
10757
|
+
};
|
|
10758
|
+
content: {
|
|
10759
|
+
"application/json": {
|
|
10760
|
+
/** @description One-shot, `ctk_`-prefixed, unguessable. Put it in the URL of the hosted consent page and hand that URL to the consumer. It is consumed by the consumer's submission and cannot be replayed. */
|
|
10761
|
+
token: string;
|
|
10762
|
+
/** @description ISO 8601. The token expires 24 hours after this call; a consumer opening the link after that sees an expired consent and nothing is created. This is the TOKEN's TTL, not the mandate's: the mandate's own TTL is `intent.mandate_ttl_seconds`, counted from the moment the consumer signs. */
|
|
10763
|
+
expires_at: string;
|
|
10764
|
+
};
|
|
10765
|
+
};
|
|
10766
|
+
};
|
|
10767
|
+
/** @description The body did not match the schema. `details.issues` carries the Zod issues; the refusals with their own message are a `"*"` entry in `intent.withdrawal_allowlist` and a `intent.dda_allowlist` entry that is not a CPF (11 digits) or a CNPJ (14 digits). */
|
|
10768
|
+
400: {
|
|
10769
|
+
headers: {
|
|
10770
|
+
[name: string]: unknown;
|
|
10771
|
+
};
|
|
10772
|
+
content: {
|
|
10773
|
+
"application/json": {
|
|
10774
|
+
error: {
|
|
10775
|
+
/** @enum {string} */
|
|
10776
|
+
code: "invalid_body";
|
|
10777
|
+
message: string;
|
|
10778
|
+
details?: {
|
|
10779
|
+
[key: string]: unknown;
|
|
10780
|
+
};
|
|
10781
|
+
};
|
|
10782
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
10783
|
+
request_id: string | null;
|
|
10784
|
+
};
|
|
10785
|
+
};
|
|
10786
|
+
};
|
|
10787
|
+
};
|
|
10788
|
+
};
|
|
10789
|
+
delete?: never;
|
|
10790
|
+
options?: never;
|
|
10791
|
+
head?: never;
|
|
10792
|
+
patch?: never;
|
|
10793
|
+
trace?: never;
|
|
10794
|
+
};
|
|
10795
|
+
"/v1/consents/init": {
|
|
10796
|
+
parameters: {
|
|
10797
|
+
query?: never;
|
|
10798
|
+
header?: never;
|
|
10799
|
+
path?: never;
|
|
10800
|
+
cookie?: never;
|
|
10801
|
+
};
|
|
10802
|
+
get?: never;
|
|
10803
|
+
put?: never;
|
|
10804
|
+
/**
|
|
10805
|
+
* Start a hosted consent
|
|
10806
|
+
* @deprecated
|
|
10807
|
+
* @description DEPRECATED alias of `POST /v1/consents` (ent#979), kept for two releases. Same handler, same required scope, same request and same responses; switch the path and nothing else changes. The canonical path is described in this document too.
|
|
10808
|
+
*
|
|
10809
|
+
* Starts a hosted consent for a consumer mandate. The partner's backend calls this with its API key and gets a one-shot token carrying the intent the consumer is about to authorize (purpose, total and per-transaction caps, currency, mandate TTL and the merchant, withdrawal and DDA allowlists that will be signed into the mandate). The partner composes the URL of the hosted consent page from the token and hands it to the consumer.
|
|
10810
|
+
*
|
|
10811
|
+
* The consumer signs on the hosted page. The mandate is created server-side when the consumer submits there: the consumer's secret is provisioned, the mandate is signed with it, the funding source and the consent record are written and the token is consumed, in one transaction. The API key never signs, and the page's own calls are not operations of this document: nothing a partner can call with a key produces a signed mandate.
|
|
10812
|
+
*
|
|
10813
|
+
* `intent.merchant_allowlist` defaults to `["*"]`, an explicit wildcard bounded by the caps, purpose and expiry; pass concrete Pix keys to narrow it. `intent.withdrawal_allowlist` and `intent.dda_allowlist` are deliberately NOT defaulted: absent means the mandate authorizes no cash-out and no DDA registration, which is a different thing from a wildcard, and `"*"` is refused in both. `callback_url`, when given, is returned to the hosted page at submit time so the partner's backend can receive the signed mandate.
|
|
10814
|
+
*
|
|
10815
|
+
* The token is stamped with the credential's project, and that stamp is what scopes the funding source the consumer's submission later creates.
|
|
10816
|
+
*
|
|
10817
|
+
* Requires the `consents:write` scope.
|
|
10818
|
+
*/
|
|
10819
|
+
post: {
|
|
10820
|
+
parameters: {
|
|
10821
|
+
query?: never;
|
|
10822
|
+
header?: never;
|
|
10823
|
+
path?: never;
|
|
10824
|
+
cookie?: never;
|
|
10825
|
+
};
|
|
10826
|
+
requestBody?: {
|
|
10827
|
+
content: {
|
|
10828
|
+
"application/json": {
|
|
10829
|
+
agent_id: string;
|
|
10830
|
+
/** Format: email */
|
|
10831
|
+
consumer_email_hint?: string;
|
|
10832
|
+
intent: {
|
|
10833
|
+
purpose: string;
|
|
10834
|
+
cap_minor: number;
|
|
10835
|
+
per_tx_cap_minor: number;
|
|
10836
|
+
/** @enum {string} */
|
|
10837
|
+
currency: "BRL" | "USD" | "MXN" | "COP" | "ARS" | "USDC" | "BRLA";
|
|
10838
|
+
mandate_ttl_seconds: number;
|
|
10839
|
+
/**
|
|
10840
|
+
* @default [
|
|
10841
|
+
* "*"
|
|
10842
|
+
* ]
|
|
10843
|
+
*/
|
|
10844
|
+
merchant_allowlist?: string[];
|
|
10845
|
+
/**
|
|
10846
|
+
* @default pix-key
|
|
10847
|
+
* @enum {string}
|
|
10848
|
+
*/
|
|
10849
|
+
merchant_pin_kind?: "pix-key" | "merchant-id" | "mcc";
|
|
10850
|
+
withdrawal_allowlist?: string[];
|
|
10851
|
+
dda_allowlist?: string[];
|
|
10852
|
+
slots?: {
|
|
10853
|
+
/** @enum {string} */
|
|
10854
|
+
currency: "BRL" | "USD" | "MXN" | "COP" | "ARS" | "USDC" | "BRLA";
|
|
10855
|
+
rail: string;
|
|
10856
|
+
cap_minor: number;
|
|
10857
|
+
per_tx_cap_minor: number;
|
|
10858
|
+
}[];
|
|
10859
|
+
display_name?: string;
|
|
10860
|
+
intent_note?: string;
|
|
10861
|
+
shipping?: {
|
|
10862
|
+
[key: string]: unknown;
|
|
10863
|
+
};
|
|
10864
|
+
};
|
|
10865
|
+
/** Format: uri */
|
|
10866
|
+
callback_url?: string;
|
|
10867
|
+
};
|
|
10868
|
+
};
|
|
10869
|
+
};
|
|
10870
|
+
responses: {
|
|
10871
|
+
/** @description Created. The consent is pending until the consumer signs on the hosted page or the token expires. */
|
|
10872
|
+
201: {
|
|
10873
|
+
headers: {
|
|
10874
|
+
[name: string]: unknown;
|
|
10875
|
+
};
|
|
10876
|
+
content: {
|
|
10877
|
+
"application/json": {
|
|
10878
|
+
/** @description One-shot, `ctk_`-prefixed, unguessable. Put it in the URL of the hosted consent page and hand that URL to the consumer. It is consumed by the consumer's submission and cannot be replayed. */
|
|
10879
|
+
token: string;
|
|
10880
|
+
/** @description ISO 8601. The token expires 24 hours after this call; a consumer opening the link after that sees an expired consent and nothing is created. This is the TOKEN's TTL, not the mandate's: the mandate's own TTL is `intent.mandate_ttl_seconds`, counted from the moment the consumer signs. */
|
|
10881
|
+
expires_at: string;
|
|
10882
|
+
};
|
|
10883
|
+
};
|
|
10884
|
+
};
|
|
10885
|
+
/** @description The body did not match the schema. `details.issues` carries the Zod issues; the refusals with their own message are a `"*"` entry in `intent.withdrawal_allowlist` and a `intent.dda_allowlist` entry that is not a CPF (11 digits) or a CNPJ (14 digits). */
|
|
10886
|
+
400: {
|
|
10887
|
+
headers: {
|
|
10888
|
+
[name: string]: unknown;
|
|
10889
|
+
};
|
|
10890
|
+
content: {
|
|
10891
|
+
"application/json": {
|
|
10892
|
+
error: {
|
|
10893
|
+
/** @enum {string} */
|
|
10894
|
+
code: "invalid_body";
|
|
10895
|
+
message: string;
|
|
10896
|
+
details?: {
|
|
10897
|
+
[key: string]: unknown;
|
|
10898
|
+
};
|
|
10899
|
+
};
|
|
10900
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
10901
|
+
request_id: string | null;
|
|
10902
|
+
};
|
|
10903
|
+
};
|
|
10904
|
+
};
|
|
10905
|
+
};
|
|
10906
|
+
};
|
|
10907
|
+
delete?: never;
|
|
10908
|
+
options?: never;
|
|
10909
|
+
head?: never;
|
|
10910
|
+
patch?: never;
|
|
10911
|
+
trace?: never;
|
|
10912
|
+
};
|
|
10913
|
+
"/v1/consumers/mandates/{id}/spend": {
|
|
10914
|
+
parameters: {
|
|
10915
|
+
query?: never;
|
|
10916
|
+
header?: never;
|
|
10917
|
+
path?: never;
|
|
10918
|
+
cookie?: never;
|
|
10919
|
+
};
|
|
10920
|
+
get?: never;
|
|
10921
|
+
put?: never;
|
|
10922
|
+
/**
|
|
10923
|
+
* Gastar sob um mandato já projetado
|
|
10924
|
+
* @description Executa uma saída de dinheiro sob um mandato que já está projetado nesta organização, identificado por id. É o caminho que o meta-tool `codespar_pay` usa por dentro, então o comportamento aqui é o mesmo que um agente obtém — esta rota existe para quem não usa o SDK chegar ao mesmo lugar.
|
|
10925
|
+
*
|
|
10926
|
+
* Com `ted` presente, a perna do provedor é uma transferência bancária de verdade, debitada da sub-conta do próprio consumidor. Sem `ted`, `payee` é uma chave Pix ou um copia-e-cola.
|
|
10927
|
+
*
|
|
10928
|
+
* **TED tem três exigências que as outras formas de pagamento não têm, e as três vinculam ANTES de qualquer passo de dinheiro:**
|
|
10929
|
+
*
|
|
10930
|
+
* 1. `attempt_id` é OBRIGATÓRIO. Uma TED não tem copia-e-cola nem nonce de onde derivar correlação, e duas TEDs sob o mesmo mandato nunca podem colidir num id derivado.
|
|
10931
|
+
* 2. `payee` tem que ser IGUAL à string canônica do destino, `ted:<ispb>:<agência>:<conta>`, só alfanuméricos e em maiúsculas. A comparação normaliza apenas espaços em branco, então uma entrada com ponto ou hífen NÃO casa. Esta regra existe para o pin da lista assinada e o fio nomearem o MESMO destino: sem ela, um recebedor aprovado serviria de fachada para outra conta bancária.
|
|
10932
|
+
* 3. O destino tem que estar na `withdrawal_allowlist` ASSINADA do mandato. Um curinga `"*"` de lista de comerciante NUNCA autoriza saída de dinheiro, nem no caminho legado.
|
|
10933
|
+
*
|
|
10934
|
+
* O teto cumulativo é conferido e CONSUMIDO sob trava de advisory lock, e a reserva na carteira é tomada dentro da mesma trava. A trava é liberada antes da chamada ao provedor, então uma chamada lenta não serializa as outras.
|
|
10935
|
+
*
|
|
10936
|
+
* **Não existe rota de leitura do desfecho.** Um `attempt_id` que respondeu `psp_dispatch_uncertain` não tem endpoint para consultar depois. Guarde o `attempt_id` e reapresente-o: o ciclo é idempotente por ele e responde o estado em que aquela tentativa parou, em vez de disparar uma segunda. NÃO reinicie a mesma intenção com um `attempt_id` novo — é assim que se paga duas vezes.
|
|
10937
|
+
*/
|
|
10938
|
+
post: {
|
|
10939
|
+
parameters: {
|
|
10940
|
+
query?: never;
|
|
10941
|
+
header?: never;
|
|
10942
|
+
path: {
|
|
10943
|
+
/** @description Id do mandato. */
|
|
10944
|
+
id: string;
|
|
10945
|
+
};
|
|
10946
|
+
cookie?: never;
|
|
10947
|
+
};
|
|
10948
|
+
requestBody?: {
|
|
10949
|
+
content: {
|
|
10950
|
+
"application/json": {
|
|
10951
|
+
/** @description Valor em centavos. */
|
|
10952
|
+
amount_minor: number;
|
|
10953
|
+
/** @description Chave Pix, copia-e-cola, ou — para TED — a string canônica do destino. O limite de 1024 acomoda um copia-e-cola. */
|
|
10954
|
+
payee: string;
|
|
10955
|
+
agent_id?: string;
|
|
10956
|
+
/** @description Obrigatório quando `ted` está presente. Reapresente-o em toda retentativa. */
|
|
10957
|
+
attempt_id?: string;
|
|
10958
|
+
ted?: components["schemas"]["TedDestination"];
|
|
10959
|
+
quote?: components["schemas"]["SpendQuote"];
|
|
10960
|
+
};
|
|
10961
|
+
};
|
|
10962
|
+
};
|
|
10963
|
+
responses: {
|
|
10964
|
+
/** @description OK */
|
|
10965
|
+
200: {
|
|
10966
|
+
headers: {
|
|
10967
|
+
[name: string]: unknown;
|
|
10968
|
+
};
|
|
10969
|
+
content: {
|
|
10970
|
+
"application/json": components["schemas"]["SpendOutcome"];
|
|
10971
|
+
};
|
|
10972
|
+
};
|
|
10973
|
+
/** @description O corpo não casou com o schema. */
|
|
10974
|
+
400: {
|
|
10975
|
+
headers: {
|
|
10976
|
+
[name: string]: unknown;
|
|
10977
|
+
};
|
|
10978
|
+
content: {
|
|
10979
|
+
"application/json": {
|
|
10980
|
+
error: {
|
|
10981
|
+
/** @enum {string} */
|
|
10982
|
+
code: "invalid_body";
|
|
10983
|
+
message: string;
|
|
10984
|
+
details?: {
|
|
10985
|
+
[key: string]: unknown;
|
|
10986
|
+
};
|
|
10987
|
+
};
|
|
10988
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
10989
|
+
request_id: string | null;
|
|
10990
|
+
};
|
|
10991
|
+
};
|
|
10992
|
+
};
|
|
10993
|
+
/** @description O destino não está na lista de saque assinada do mandato. Nada foi enviado ao provedor. A resposta traz o próximo passo de consentimento. */
|
|
10994
|
+
403: {
|
|
10995
|
+
headers: {
|
|
10996
|
+
[name: string]: unknown;
|
|
10997
|
+
};
|
|
10998
|
+
content: {
|
|
10999
|
+
"application/json": {
|
|
11000
|
+
error: {
|
|
11001
|
+
/** @enum {string} */
|
|
11002
|
+
code: "withdrawal_pin";
|
|
11003
|
+
message: string;
|
|
11004
|
+
details?: {
|
|
11005
|
+
[key: string]: unknown;
|
|
11006
|
+
};
|
|
11007
|
+
};
|
|
11008
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11009
|
+
request_id: string | null;
|
|
11010
|
+
};
|
|
11011
|
+
};
|
|
11012
|
+
};
|
|
11013
|
+
/** @description Não existe mandato com esse id nesta organização. */
|
|
11014
|
+
404: {
|
|
11015
|
+
headers: {
|
|
11016
|
+
[name: string]: unknown;
|
|
11017
|
+
};
|
|
11018
|
+
content: {
|
|
11019
|
+
"application/json": {
|
|
11020
|
+
error: {
|
|
11021
|
+
/** @enum {string} */
|
|
11022
|
+
code: "mandate_not_found";
|
|
11023
|
+
message: string;
|
|
11024
|
+
details?: {
|
|
11025
|
+
[key: string]: unknown;
|
|
11026
|
+
};
|
|
11027
|
+
};
|
|
11028
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11029
|
+
request_id: string | null;
|
|
11030
|
+
};
|
|
11031
|
+
};
|
|
11032
|
+
};
|
|
11033
|
+
/** @description O estado local impede. `psp_attempt_in_flight`: a mesma tentativa está em voo. `psp_attempt_uncertain`: uma tentativa anterior ficou com desfecho desconhecido e esta intenção está PINADA nela — reapresente o mesmo `attempt_id`, nunca um novo. `psp_attempt_conflict`: a tentativa anterior já foi compensada. */
|
|
11034
|
+
409: {
|
|
10264
11035
|
headers: {
|
|
10265
11036
|
[name: string]: unknown;
|
|
10266
11037
|
};
|
|
10267
11038
|
content: {
|
|
10268
11039
|
"application/json": {
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
* @description `code` means the provider mailed a one-time code to type; `link` means it mailed an activation link to click.
|
|
10277
|
-
* @enum {string}
|
|
10278
|
-
*/
|
|
10279
|
-
mechanism: "code" | "link";
|
|
10280
|
-
resend?: boolean;
|
|
11040
|
+
error: {
|
|
11041
|
+
/** @enum {string} */
|
|
11042
|
+
code: "psp_attempt_in_flight" | "psp_attempt_uncertain" | "psp_attempt_conflict";
|
|
11043
|
+
message: string;
|
|
11044
|
+
details?: {
|
|
11045
|
+
[key: string]: unknown;
|
|
11046
|
+
};
|
|
10281
11047
|
};
|
|
10282
|
-
/** @description
|
|
10283
|
-
|
|
10284
|
-
/** @description The `ca_` id of the connection the run produced. Present once the run reaches `provisioned`. */
|
|
10285
|
-
connection_id?: string;
|
|
10286
|
-
/**
|
|
10287
|
-
* @description Why the run failed. A stored value outside this vocabulary is reported as absent rather than passed through, so a failed run can render as its status alone.
|
|
10288
|
-
* @enum {string}
|
|
10289
|
-
*/
|
|
10290
|
-
code?: "flow_failed" | "capacity" | "no_credential_captured" | "probe_failed" | "drive_deadline_exceeded" | "provider_account_not_registered" | "drive_stalled" | "resume_inputs_unavailable";
|
|
10291
|
-
failed_step_id?: string;
|
|
11048
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11049
|
+
request_id: string | null;
|
|
10292
11050
|
};
|
|
10293
11051
|
};
|
|
10294
11052
|
};
|
|
10295
|
-
/** @description
|
|
10296
|
-
|
|
11053
|
+
/** @description O mandato recusa. `mandate_verify`: assinatura, agente, propósito ou recebedor não conferem. `mandate_projection_mismatch`: a assinatura apresentada difere da armazenada, ou o mandato não está ativo. `no_funding_source`: o consumidor não tem fonte de recursos que sirva a este rail — para TED, exige conta bancária registrada. */
|
|
11054
|
+
422: {
|
|
10297
11055
|
headers: {
|
|
10298
11056
|
[name: string]: unknown;
|
|
10299
11057
|
};
|
|
@@ -10301,14 +11059,19 @@ export interface paths {
|
|
|
10301
11059
|
"application/json": {
|
|
10302
11060
|
error: {
|
|
10303
11061
|
/** @enum {string} */
|
|
10304
|
-
code: "
|
|
11062
|
+
code: "mandate_verify" | "mandate_projection_mismatch" | "no_funding_source";
|
|
10305
11063
|
message: string;
|
|
11064
|
+
details?: {
|
|
11065
|
+
[key: string]: unknown;
|
|
11066
|
+
};
|
|
10306
11067
|
};
|
|
11068
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11069
|
+
request_id: string | null;
|
|
10307
11070
|
};
|
|
10308
11071
|
};
|
|
10309
11072
|
};
|
|
10310
|
-
/** @description
|
|
10311
|
-
|
|
11073
|
+
/** @description O verificador respondeu sem resolver o teto cumulativo, então a recheca sob trava não teria limite com que comparar. Recusa deliberada: nada é debitado. */
|
|
11074
|
+
500: {
|
|
10312
11075
|
headers: {
|
|
10313
11076
|
[name: string]: unknown;
|
|
10314
11077
|
};
|
|
@@ -10316,7 +11079,27 @@ export interface paths {
|
|
|
10316
11079
|
"application/json": {
|
|
10317
11080
|
error: {
|
|
10318
11081
|
/** @enum {string} */
|
|
10319
|
-
code: "
|
|
11082
|
+
code: "mandate_cap_unresolved";
|
|
11083
|
+
message: string;
|
|
11084
|
+
details?: {
|
|
11085
|
+
[key: string]: unknown;
|
|
11086
|
+
};
|
|
11087
|
+
};
|
|
11088
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11089
|
+
request_id: string | null;
|
|
11090
|
+
};
|
|
11091
|
+
};
|
|
11092
|
+
};
|
|
11093
|
+
/** @description O provedor recusou ou não respondeu. `psp_dispatch_failed`: recusa conhecida, nada saiu. `psp_dispatch_uncertain`: NÃO se sabe se saiu — a reserva permanece e a tentativa fica pinada. */
|
|
11094
|
+
502: {
|
|
11095
|
+
headers: {
|
|
11096
|
+
[name: string]: unknown;
|
|
11097
|
+
};
|
|
11098
|
+
content: {
|
|
11099
|
+
"application/json": {
|
|
11100
|
+
error: {
|
|
11101
|
+
/** @enum {string} */
|
|
11102
|
+
code: "psp_dispatch_failed" | "psp_dispatch_uncertain";
|
|
10320
11103
|
message: string;
|
|
10321
11104
|
details?: {
|
|
10322
11105
|
[key: string]: unknown;
|
|
@@ -10329,15 +11112,13 @@ export interface paths {
|
|
|
10329
11112
|
};
|
|
10330
11113
|
};
|
|
10331
11114
|
};
|
|
10332
|
-
put?: never;
|
|
10333
|
-
post?: never;
|
|
10334
11115
|
delete?: never;
|
|
10335
11116
|
options?: never;
|
|
10336
11117
|
head?: never;
|
|
10337
11118
|
patch?: never;
|
|
10338
11119
|
trace?: never;
|
|
10339
11120
|
};
|
|
10340
|
-
"/v1/
|
|
11121
|
+
"/v1/consumer-payments/execute": {
|
|
10341
11122
|
parameters: {
|
|
10342
11123
|
query?: never;
|
|
10343
11124
|
header?: never;
|
|
@@ -10347,53 +11128,74 @@ export interface paths {
|
|
|
10347
11128
|
get?: never;
|
|
10348
11129
|
put?: never;
|
|
10349
11130
|
/**
|
|
10350
|
-
*
|
|
10351
|
-
* @description
|
|
11131
|
+
* Gastar apresentando o mandato assinado
|
|
11132
|
+
* @description O mesmo ciclo da rota por id, para quem carrega o envelope assinado em vez de um mandato já projetado. Use esta quando o mandato vem do consumidor no momento da chamada; use a `/consumers/mandates/{id}/spend` quando ele já está registrado aqui.
|
|
10352
11133
|
*
|
|
10353
|
-
*
|
|
11134
|
+
* `signature` é o HMAC de 64 caracteres hexadecimais sobre o mandato canônico. O `agent_id` do corpo é conferido contra o ASSINADO: a atribuição do gasto pertence ao mandato, não a quem chama.
|
|
10354
11135
|
*
|
|
10355
|
-
*
|
|
11136
|
+
* **TED tem três exigências que as outras formas de pagamento não têm, e as três vinculam ANTES de qualquer passo de dinheiro:**
|
|
10356
11137
|
*
|
|
10357
|
-
* `
|
|
11138
|
+
* 1. `attempt_id` é OBRIGATÓRIO. Uma TED não tem copia-e-cola nem nonce de onde derivar correlação, e duas TEDs sob o mesmo mandato nunca podem colidir num id derivado.
|
|
11139
|
+
* 2. `payee` tem que ser IGUAL à string canônica do destino, `ted:<ispb>:<agência>:<conta>`, só alfanuméricos e em maiúsculas. A comparação normaliza apenas espaços em branco, então uma entrada com ponto ou hífen NÃO casa. Esta regra existe para o pin da lista assinada e o fio nomearem o MESMO destino: sem ela, um recebedor aprovado serviria de fachada para outra conta bancária.
|
|
11140
|
+
* 3. O destino tem que estar na `withdrawal_allowlist` ASSINADA do mandato. Um curinga `"*"` de lista de comerciante NUNCA autoriza saída de dinheiro, nem no caminho legado.
|
|
11141
|
+
*
|
|
11142
|
+
* **Não existe rota de leitura do desfecho.** Um `attempt_id` que respondeu `psp_dispatch_uncertain` não tem endpoint para consultar depois. Guarde o `attempt_id` e reapresente-o: o ciclo é idempotente por ele e responde o estado em que aquela tentativa parou, em vez de disparar uma segunda. NÃO reinicie a mesma intenção com um `attempt_id` novo — é assim que se paga duas vezes.
|
|
10358
11143
|
*/
|
|
10359
11144
|
post: {
|
|
10360
11145
|
parameters: {
|
|
10361
11146
|
query?: never;
|
|
10362
11147
|
header?: never;
|
|
10363
|
-
path
|
|
10364
|
-
/** @description A `ca_` connection id, or a `pr_` provisioning record id on the operator-internal path. */
|
|
10365
|
-
id: string;
|
|
10366
|
-
};
|
|
11148
|
+
path?: never;
|
|
10367
11149
|
cookie?: never;
|
|
10368
11150
|
};
|
|
10369
|
-
requestBody?:
|
|
11151
|
+
requestBody?: {
|
|
11152
|
+
content: {
|
|
11153
|
+
"application/json": {
|
|
11154
|
+
/** @description O mandato canônico, na forma em que foi assinado. */
|
|
11155
|
+
mandate?: unknown;
|
|
11156
|
+
/** @description HMAC em hexadecimal, 64 caracteres. */
|
|
11157
|
+
signature: string;
|
|
11158
|
+
amount_minor: number;
|
|
11159
|
+
purpose: string;
|
|
11160
|
+
agent_id: string;
|
|
11161
|
+
payee: string;
|
|
11162
|
+
attempt_id?: string;
|
|
11163
|
+
ted?: components["schemas"]["TedDestination"];
|
|
11164
|
+
quote?: components["schemas"]["SpendQuote"];
|
|
11165
|
+
};
|
|
11166
|
+
};
|
|
11167
|
+
};
|
|
10370
11168
|
responses: {
|
|
10371
11169
|
/** @description OK */
|
|
10372
11170
|
200: {
|
|
11171
|
+
headers: {
|
|
11172
|
+
[name: string]: unknown;
|
|
11173
|
+
};
|
|
11174
|
+
content: {
|
|
11175
|
+
"application/json": components["schemas"]["SpendOutcome"];
|
|
11176
|
+
};
|
|
11177
|
+
};
|
|
11178
|
+
/** @description O corpo não casou com o schema. */
|
|
11179
|
+
400: {
|
|
10373
11180
|
headers: {
|
|
10374
11181
|
[name: string]: unknown;
|
|
10375
11182
|
};
|
|
10376
11183
|
content: {
|
|
10377
11184
|
"application/json": {
|
|
10378
|
-
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
/**
|
|
10389
|
-
* @description Present when the subaccount was already revoked. Nothing changed.
|
|
10390
|
-
* @enum {boolean}
|
|
10391
|
-
*/
|
|
10392
|
-
already?: true;
|
|
11185
|
+
error: {
|
|
11186
|
+
/** @enum {string} */
|
|
11187
|
+
code: "invalid_body";
|
|
11188
|
+
message: string;
|
|
11189
|
+
details?: {
|
|
11190
|
+
[key: string]: unknown;
|
|
11191
|
+
};
|
|
11192
|
+
};
|
|
11193
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11194
|
+
request_id: string | null;
|
|
10393
11195
|
};
|
|
10394
11196
|
};
|
|
10395
11197
|
};
|
|
10396
|
-
/** @description
|
|
11198
|
+
/** @description O destino não está na lista de saque assinada. Nada foi enviado ao provedor. */
|
|
10397
11199
|
403: {
|
|
10398
11200
|
headers: {
|
|
10399
11201
|
[name: string]: unknown;
|
|
@@ -10402,7 +11204,7 @@ export interface paths {
|
|
|
10402
11204
|
"application/json": {
|
|
10403
11205
|
error: {
|
|
10404
11206
|
/** @enum {string} */
|
|
10405
|
-
code: "
|
|
11207
|
+
code: "withdrawal_pin";
|
|
10406
11208
|
message: string;
|
|
10407
11209
|
details?: {
|
|
10408
11210
|
[key: string]: unknown;
|
|
@@ -10413,8 +11215,8 @@ export interface paths {
|
|
|
10413
11215
|
};
|
|
10414
11216
|
};
|
|
10415
11217
|
};
|
|
10416
|
-
/** @description
|
|
10417
|
-
|
|
11218
|
+
/** @description O estado local impede — mesmas três condições da rota por id. */
|
|
11219
|
+
409: {
|
|
10418
11220
|
headers: {
|
|
10419
11221
|
[name: string]: unknown;
|
|
10420
11222
|
};
|
|
@@ -10422,13 +11224,38 @@ export interface paths {
|
|
|
10422
11224
|
"application/json": {
|
|
10423
11225
|
error: {
|
|
10424
11226
|
/** @enum {string} */
|
|
10425
|
-
code: "
|
|
11227
|
+
code: "psp_attempt_in_flight" | "psp_attempt_uncertain" | "psp_attempt_conflict";
|
|
10426
11228
|
message: string;
|
|
11229
|
+
details?: {
|
|
11230
|
+
[key: string]: unknown;
|
|
11231
|
+
};
|
|
10427
11232
|
};
|
|
11233
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11234
|
+
request_id: string | null;
|
|
10428
11235
|
};
|
|
10429
11236
|
};
|
|
10430
11237
|
};
|
|
10431
|
-
/** @description
|
|
11238
|
+
/** @description O mandato recusa, ou o consumidor não tem fonte de recursos para este rail. */
|
|
11239
|
+
422: {
|
|
11240
|
+
headers: {
|
|
11241
|
+
[name: string]: unknown;
|
|
11242
|
+
};
|
|
11243
|
+
content: {
|
|
11244
|
+
"application/json": {
|
|
11245
|
+
error: {
|
|
11246
|
+
/** @enum {string} */
|
|
11247
|
+
code: "mandate_verify" | "mandate_projection_mismatch" | "no_funding_source";
|
|
11248
|
+
message: string;
|
|
11249
|
+
details?: {
|
|
11250
|
+
[key: string]: unknown;
|
|
11251
|
+
};
|
|
11252
|
+
};
|
|
11253
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11254
|
+
request_id: string | null;
|
|
11255
|
+
};
|
|
11256
|
+
};
|
|
11257
|
+
};
|
|
11258
|
+
/** @description O teto cumulativo não foi resolvido pelo verificador. Nada é debitado. */
|
|
10432
11259
|
500: {
|
|
10433
11260
|
headers: {
|
|
10434
11261
|
[name: string]: unknown;
|
|
@@ -10437,7 +11264,7 @@ export interface paths {
|
|
|
10437
11264
|
"application/json": {
|
|
10438
11265
|
error: {
|
|
10439
11266
|
/** @enum {string} */
|
|
10440
|
-
code: "
|
|
11267
|
+
code: "mandate_cap_unresolved";
|
|
10441
11268
|
message: string;
|
|
10442
11269
|
details?: {
|
|
10443
11270
|
[key: string]: unknown;
|
|
@@ -10448,8 +11275,8 @@ export interface paths {
|
|
|
10448
11275
|
};
|
|
10449
11276
|
};
|
|
10450
11277
|
};
|
|
10451
|
-
/** @description
|
|
10452
|
-
|
|
11278
|
+
/** @description O provedor recusou, ou o desfecho é desconhecido. */
|
|
11279
|
+
502: {
|
|
10453
11280
|
headers: {
|
|
10454
11281
|
[name: string]: unknown;
|
|
10455
11282
|
};
|
|
@@ -10457,7 +11284,7 @@ export interface paths {
|
|
|
10457
11284
|
"application/json": {
|
|
10458
11285
|
error: {
|
|
10459
11286
|
/** @enum {string} */
|
|
10460
|
-
code: "
|
|
11287
|
+
code: "psp_dispatch_failed" | "psp_dispatch_uncertain";
|
|
10461
11288
|
message: string;
|
|
10462
11289
|
details?: {
|
|
10463
11290
|
[key: string]: unknown;
|
|
@@ -10476,56 +11303,77 @@ export interface paths {
|
|
|
10476
11303
|
patch?: never;
|
|
10477
11304
|
trace?: never;
|
|
10478
11305
|
};
|
|
10479
|
-
"/v1/
|
|
11306
|
+
"/v1/consumer-payments/execute-stream": {
|
|
10480
11307
|
parameters: {
|
|
10481
11308
|
query?: never;
|
|
10482
11309
|
header?: never;
|
|
10483
11310
|
path?: never;
|
|
10484
11311
|
cookie?: never;
|
|
10485
11312
|
};
|
|
11313
|
+
get?: never;
|
|
11314
|
+
put?: never;
|
|
10486
11315
|
/**
|
|
10487
|
-
*
|
|
10488
|
-
* @description
|
|
10489
|
-
*
|
|
10490
|
-
* `charges_enabled` is what the provider says right now, not a cached flag, which is why a provider that is unreachable answers 502 rather than a stale `false`. The one exception is a revoked record: it short-circuits to `status: "revoked"` and `charges_enabled: false` without calling the provider at all, since there is nothing left to poll. A confirmed account that never reached an upstream account ref reports not-yet-chargeable for the same reason.
|
|
11316
|
+
* Gastar apresentando o mandato, com os passos em streaming
|
|
11317
|
+
* @description Mesmo corpo e mesmos gates da `/v1/consumer-payments/execute`. A diferença é só o transporte da resposta: os passos do ciclo (verificação do mandato, roteamento da fonte, reserva, débito no provedor, selo do recibo) chegam como eventos `text/event-stream` à medida que acontecem, em vez de um único JSON no fim.
|
|
10491
11318
|
*
|
|
10492
|
-
*
|
|
11319
|
+
* O desfecho é o mesmo objeto da rota irmã, no último evento. Um cliente que não precisa acompanhar o progresso deve usar a `/execute`: streaming não torna a liquidação mais rápida, só a torna observável enquanto corre.
|
|
10493
11320
|
*
|
|
10494
|
-
*
|
|
11321
|
+
* **Não existe rota de leitura do desfecho.** Um `attempt_id` que respondeu `psp_dispatch_uncertain` não tem endpoint para consultar depois. Guarde o `attempt_id` e reapresente-o: o ciclo é idempotente por ele e responde o estado em que aquela tentativa parou, em vez de disparar uma segunda. NÃO reinicie a mesma intenção com um `attempt_id` novo — é assim que se paga duas vezes.
|
|
10495
11322
|
*/
|
|
10496
|
-
|
|
11323
|
+
post: {
|
|
10497
11324
|
parameters: {
|
|
10498
11325
|
query?: never;
|
|
10499
11326
|
header?: never;
|
|
10500
|
-
path
|
|
10501
|
-
/** @description A `ca_` connection id, or a `pr_` provisioning record id on the operator-internal path. */
|
|
10502
|
-
id: string;
|
|
10503
|
-
};
|
|
11327
|
+
path?: never;
|
|
10504
11328
|
cookie?: never;
|
|
10505
11329
|
};
|
|
10506
|
-
requestBody?:
|
|
11330
|
+
requestBody?: {
|
|
11331
|
+
content: {
|
|
11332
|
+
"application/json": {
|
|
11333
|
+
mandate?: unknown;
|
|
11334
|
+
signature: string;
|
|
11335
|
+
amount_minor: number;
|
|
11336
|
+
purpose: string;
|
|
11337
|
+
agent_id: string;
|
|
11338
|
+
payee: string;
|
|
11339
|
+
attempt_id?: string;
|
|
11340
|
+
ted?: components["schemas"]["TedDestination"];
|
|
11341
|
+
quote?: components["schemas"]["SpendQuote"];
|
|
11342
|
+
};
|
|
11343
|
+
};
|
|
11344
|
+
};
|
|
10507
11345
|
responses: {
|
|
10508
|
-
/** @description
|
|
11346
|
+
/** @description Fluxo de eventos. Cada evento é um passo do ciclo; o último carrega o mesmo objeto de desfecho que a `/execute` devolve. */
|
|
10509
11347
|
200: {
|
|
11348
|
+
headers: {
|
|
11349
|
+
[name: string]: unknown;
|
|
11350
|
+
};
|
|
11351
|
+
content: {
|
|
11352
|
+
"text/event-stream": string;
|
|
11353
|
+
};
|
|
11354
|
+
};
|
|
11355
|
+
/** @description O corpo não casou com o schema. */
|
|
11356
|
+
400: {
|
|
10510
11357
|
headers: {
|
|
10511
11358
|
[name: string]: unknown;
|
|
10512
11359
|
};
|
|
10513
11360
|
content: {
|
|
10514
11361
|
"application/json": {
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
11362
|
+
error: {
|
|
11363
|
+
/** @enum {string} */
|
|
11364
|
+
code: "invalid_body";
|
|
11365
|
+
message: string;
|
|
11366
|
+
details?: {
|
|
11367
|
+
[key: string]: unknown;
|
|
11368
|
+
};
|
|
10521
11369
|
};
|
|
10522
|
-
/** @description
|
|
10523
|
-
|
|
11370
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11371
|
+
request_id: string | null;
|
|
10524
11372
|
};
|
|
10525
11373
|
};
|
|
10526
11374
|
};
|
|
10527
|
-
/** @description
|
|
10528
|
-
|
|
11375
|
+
/** @description O destino não está na lista de saque assinada. */
|
|
11376
|
+
403: {
|
|
10529
11377
|
headers: {
|
|
10530
11378
|
[name: string]: unknown;
|
|
10531
11379
|
};
|
|
@@ -10533,14 +11381,19 @@ export interface paths {
|
|
|
10533
11381
|
"application/json": {
|
|
10534
11382
|
error: {
|
|
10535
11383
|
/** @enum {string} */
|
|
10536
|
-
code: "
|
|
11384
|
+
code: "withdrawal_pin";
|
|
10537
11385
|
message: string;
|
|
11386
|
+
details?: {
|
|
11387
|
+
[key: string]: unknown;
|
|
11388
|
+
};
|
|
10538
11389
|
};
|
|
11390
|
+
/** @description Echoes the `X-Request-Id` header when the request carried one. */
|
|
11391
|
+
request_id: string | null;
|
|
10539
11392
|
};
|
|
10540
11393
|
};
|
|
10541
11394
|
};
|
|
10542
|
-
/** @description
|
|
10543
|
-
|
|
11395
|
+
/** @description O mandato recusa, ou não há fonte de recursos para este rail. */
|
|
11396
|
+
422: {
|
|
10544
11397
|
headers: {
|
|
10545
11398
|
[name: string]: unknown;
|
|
10546
11399
|
};
|
|
@@ -10548,7 +11401,7 @@ export interface paths {
|
|
|
10548
11401
|
"application/json": {
|
|
10549
11402
|
error: {
|
|
10550
11403
|
/** @enum {string} */
|
|
10551
|
-
code: "
|
|
11404
|
+
code: "mandate_verify" | "mandate_projection_mismatch" | "no_funding_source";
|
|
10552
11405
|
message: string;
|
|
10553
11406
|
details?: {
|
|
10554
11407
|
[key: string]: unknown;
|
|
@@ -10559,7 +11412,7 @@ export interface paths {
|
|
|
10559
11412
|
};
|
|
10560
11413
|
};
|
|
10561
11414
|
};
|
|
10562
|
-
/** @description
|
|
11415
|
+
/** @description O provedor recusou, ou o desfecho é desconhecido. */
|
|
10563
11416
|
502: {
|
|
10564
11417
|
headers: {
|
|
10565
11418
|
[name: string]: unknown;
|
|
@@ -10568,7 +11421,7 @@ export interface paths {
|
|
|
10568
11421
|
"application/json": {
|
|
10569
11422
|
error: {
|
|
10570
11423
|
/** @enum {string} */
|
|
10571
|
-
code: "
|
|
11424
|
+
code: "psp_dispatch_failed" | "psp_dispatch_uncertain";
|
|
10572
11425
|
message: string;
|
|
10573
11426
|
details?: {
|
|
10574
11427
|
[key: string]: unknown;
|
|
@@ -10581,8 +11434,6 @@ export interface paths {
|
|
|
10581
11434
|
};
|
|
10582
11435
|
};
|
|
10583
11436
|
};
|
|
10584
|
-
put?: never;
|
|
10585
|
-
post?: never;
|
|
10586
11437
|
delete?: never;
|
|
10587
11438
|
options?: never;
|
|
10588
11439
|
head?: never;
|
|
@@ -19685,6 +20536,23 @@ export interface paths {
|
|
|
19685
20536
|
};
|
|
19686
20537
|
};
|
|
19687
20538
|
};
|
|
20539
|
+
/** @description Unprocessable — the project is in `environment="test"` and this server cannot be exercised there. `reason` is the provider's `test_venue` classification: `none` means the provider runs no test environment at all, so the call would land on production with a real effect (a Z-API WhatsApp message goes to a real number); `unclassified` means nobody has established what it does in test. Answered whether or not `PROXY_REQUIRE_CONNECTION` is set, because it is about the environment and not about a missing connection, and not retryable — the same call from a `live` project reaches the provider (ent#722). */
|
|
20540
|
+
422: {
|
|
20541
|
+
headers: {
|
|
20542
|
+
[name: string]: unknown;
|
|
20543
|
+
};
|
|
20544
|
+
content: {
|
|
20545
|
+
"application/json": {
|
|
20546
|
+
/** @enum {string} */
|
|
20547
|
+
error: "test_venue_unavailable";
|
|
20548
|
+
/** @enum {string} */
|
|
20549
|
+
reason: "none" | "unclassified" | "separate_host";
|
|
20550
|
+
server: string;
|
|
20551
|
+
/** @description Names the catalog file and the field to declare. */
|
|
20552
|
+
message: string;
|
|
20553
|
+
};
|
|
20554
|
+
};
|
|
20555
|
+
};
|
|
19688
20556
|
/** @description Failed Dependency — no usable credential for this server. `reason` is the resolver's own outcome. */
|
|
19689
20557
|
424: {
|
|
19690
20558
|
headers: {
|
|
@@ -21992,6 +22860,76 @@ export interface components {
|
|
|
21992
22860
|
*/
|
|
21993
22861
|
engine_status: "none" | "available" | "quarantined";
|
|
21994
22862
|
};
|
|
22863
|
+
SpendOutcome: {
|
|
22864
|
+
/** @enum {string} */
|
|
22865
|
+
status: "completed";
|
|
22866
|
+
requestId: string;
|
|
22867
|
+
mandate: {
|
|
22868
|
+
consumer_id: string;
|
|
22869
|
+
purpose: string;
|
|
22870
|
+
currency: string;
|
|
22871
|
+
};
|
|
22872
|
+
payment: {
|
|
22873
|
+
transactionId: string;
|
|
22874
|
+
/** @description O endToEndId do Pix quando o rail produz um. Null para rails que não têm, TED incluída. */
|
|
22875
|
+
endToEndId: string | null;
|
|
22876
|
+
amountMinor: number;
|
|
22877
|
+
rail: string;
|
|
22878
|
+
provider: string;
|
|
22879
|
+
/** @description False quando o adaptador é mock ou stub de staging. True quando dinheiro real saiu. */
|
|
22880
|
+
moneyMoved: boolean;
|
|
22881
|
+
adapter: string;
|
|
22882
|
+
};
|
|
22883
|
+
wallet: {
|
|
22884
|
+
walletId: string;
|
|
22885
|
+
holdEntryId: string;
|
|
22886
|
+
fundEntryId: string | null;
|
|
22887
|
+
debitEntryId: string | null;
|
|
22888
|
+
};
|
|
22889
|
+
/** @description O Control Record selado. Null quando não havia segredo do consumidor para assiná-lo. */
|
|
22890
|
+
receipt: {
|
|
22891
|
+
id: string;
|
|
22892
|
+
/** @enum {string} */
|
|
22893
|
+
state: "paid" | "exception" | "delivered";
|
|
22894
|
+
chain: string;
|
|
22895
|
+
exceptions: unknown[];
|
|
22896
|
+
} | null;
|
|
22897
|
+
/** @description Os passos do ciclo, em ordem, com carimbo de tempo e desfecho. */
|
|
22898
|
+
audit: unknown[];
|
|
22899
|
+
};
|
|
22900
|
+
TedDestination: {
|
|
22901
|
+
/** @description ISPB da instituição de destino, só dígitos. */
|
|
22902
|
+
bank: string;
|
|
22903
|
+
/** @description Agência, sem dígito verificador separado. */
|
|
22904
|
+
branch: string;
|
|
22905
|
+
/** @description Conta, incluindo o dígito. */
|
|
22906
|
+
account: string;
|
|
22907
|
+
/** @description CPF ou CNPJ do titular do destino. */
|
|
22908
|
+
tax_id: string;
|
|
22909
|
+
/** @description Nome do titular do destino. */
|
|
22910
|
+
name: string;
|
|
22911
|
+
/**
|
|
22912
|
+
* @description Corrente, investimento, pagamento ou poupança. Enum do produto de TED, DIFERENTE do enum de conta do Pix (CACC|SLRY|SVGS|TRAN) — são endpoints e produtos distintos no provedor.
|
|
22913
|
+
* @enum {string}
|
|
22914
|
+
*/
|
|
22915
|
+
account_type?: "CC" | "CI" | "PG" | "PP";
|
|
22916
|
+
/**
|
|
22917
|
+
* @description Pessoa física ou jurídica.
|
|
22918
|
+
* @enum {string}
|
|
22919
|
+
*/
|
|
22920
|
+
person_type?: "F" | "J";
|
|
22921
|
+
/** @description Código de finalidade do parceiro bancário. Default `1` (transferência genérica). */
|
|
22922
|
+
client_finality?: string;
|
|
22923
|
+
};
|
|
22924
|
+
/** @description A oferta que o agente aprovou. Quando presente, é assinada dentro do recibo, e no fechamento o preço e o recebedor são comparados com o que de fato liquidou. Divergência é REGISTRADA no recibo; ela não aborta a liquidação. */
|
|
22925
|
+
SpendQuote: {
|
|
22926
|
+
seller: string;
|
|
22927
|
+
resource: string;
|
|
22928
|
+
price_minor: number;
|
|
22929
|
+
payee: string;
|
|
22930
|
+
session_id?: string;
|
|
22931
|
+
at?: string;
|
|
22932
|
+
};
|
|
21995
22933
|
};
|
|
21996
22934
|
responses: never;
|
|
21997
22935
|
parameters: never;
|