@andco/protocol 0.0.14 → 0.1.0-ti.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.
Files changed (101) hide show
  1. package/README.md +2 -2
  2. package/dist/api-errors.d.ts +9 -9
  3. package/dist/api-errors.js +9 -9
  4. package/dist/authorization-preparation.d.ts +1 -1
  5. package/dist/authorization-preparation.js +2 -2
  6. package/dist/authorization.d.ts +1 -1
  7. package/dist/authorization.js +1 -1
  8. package/dist/consent.d.ts +2 -2
  9. package/dist/consent.js +2 -2
  10. package/dist/errors.d.ts +10 -10
  11. package/dist/errors.js +10 -10
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/intent-input.d.ts +452 -880
  16. package/dist/intent-input.d.ts.map +1 -1
  17. package/dist/intent-input.js +164 -127
  18. package/dist/intent-status.d.ts +5 -6
  19. package/dist/intent-status.d.ts.map +1 -1
  20. package/dist/intent-status.js +12 -7
  21. package/dist/miniapp-manifest.d.ts +3 -3
  22. package/dist/miniapp-manifest.js +1 -1
  23. package/dist/native-intent.d.ts +82 -68
  24. package/dist/native-intent.d.ts.map +1 -1
  25. package/dist/native-intent.js +137 -84
  26. package/dist/native.d.ts +1 -1
  27. package/dist/rar/account-matchers.d.ts +35 -30
  28. package/dist/rar/account-matchers.d.ts.map +1 -1
  29. package/dist/rar/account-matchers.js +27 -21
  30. package/dist/rar/bank.d.ts +357 -85
  31. package/dist/rar/bank.d.ts.map +1 -1
  32. package/dist/rar/bank.js +43 -5
  33. package/dist/rar/catalog.d.ts +174 -49
  34. package/dist/rar/catalog.d.ts.map +1 -1
  35. package/dist/rar/catalog.js +6 -6
  36. package/dist/rar/detail.d.ts +1 -1
  37. package/dist/rar/detail.js +1 -1
  38. package/dist/rar/json-schemas.generated.d.ts +1 -1
  39. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  40. package/dist/rar/json-schemas.generated.js +393 -21
  41. package/dist/rar/money.d.ts +1 -1
  42. package/dist/rar/money.js +1 -1
  43. package/dist/rar/subject-data.d.ts +1 -1
  44. package/dist/rar/subject-data.js +1 -1
  45. package/dist/rar/subject.d.ts +1 -1
  46. package/dist/rar/subject.js +1 -1
  47. package/dist/rest/accounts.d.ts +28 -28
  48. package/dist/rest/accounts.d.ts.map +1 -1
  49. package/dist/rest/accounts.js +22 -22
  50. package/dist/rest/api-error.d.ts +1 -1
  51. package/dist/rest/api-error.js +1 -1
  52. package/dist/rest/catalog.d.ts +3 -3
  53. package/dist/rest/catalog.js +2 -2
  54. package/dist/rest/common.d.ts +3 -3
  55. package/dist/rest/common.js +3 -3
  56. package/dist/rest/contract.d.ts +1183 -547
  57. package/dist/rest/contract.d.ts.map +1 -1
  58. package/dist/rest/contract.js +21 -5
  59. package/dist/rest/events.d.ts +1 -1
  60. package/dist/rest/events.d.ts.map +1 -1
  61. package/dist/rest/events.js +2 -2
  62. package/dist/rest/identity.d.ts +22 -22
  63. package/dist/rest/identity.d.ts.map +1 -1
  64. package/dist/rest/identity.js +5 -5
  65. package/dist/rest/index.d.ts +1 -0
  66. package/dist/rest/index.d.ts.map +1 -1
  67. package/dist/rest/index.js +1 -0
  68. package/dist/rest/intents.d.ts +973 -743
  69. package/dist/rest/intents.d.ts.map +1 -1
  70. package/dist/rest/intents.js +112 -89
  71. package/dist/rest/signatures.d.ts +25 -5
  72. package/dist/rest/signatures.d.ts.map +1 -1
  73. package/dist/rest/signatures.js +52 -0
  74. package/dist/rest/transfers.d.ts +988 -0
  75. package/dist/rest/transfers.d.ts.map +1 -0
  76. package/dist/rest/transfers.js +142 -0
  77. package/dist/scopes.d.ts +1 -1
  78. package/dist/signing.d.ts +17 -3
  79. package/dist/signing.d.ts.map +1 -1
  80. package/dist/signing.js +8 -1
  81. package/dist/transfer.d.ts +399 -0
  82. package/dist/transfer.d.ts.map +1 -0
  83. package/dist/transfer.js +313 -0
  84. package/dist/transport/financial-events.d.ts +82 -27
  85. package/dist/transport/financial-events.d.ts.map +1 -1
  86. package/dist/transport/financial-events.js +34 -0
  87. package/dist/transport/generated/oauth-api.d.ts +1420 -333
  88. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  89. package/dist/transport/intents.d.ts +29 -13
  90. package/dist/transport/intents.d.ts.map +1 -1
  91. package/dist/transport/intents.js +1 -1
  92. package/dist/transport/rest.d.ts +5 -5
  93. package/dist/urls.d.ts +2 -2
  94. package/dist/urls.js +3 -3
  95. package/dist/userinfo.d.ts +2 -2
  96. package/dist/userinfo.js +2 -2
  97. package/dist/webhooks.d.ts +16 -16
  98. package/dist/webhooks.js +14 -14
  99. package/dist/window-features.d.ts +2 -2
  100. package/dist/window-features.js +2 -2
  101. package/package.json +2 -2
@@ -110,11 +110,11 @@ export interface paths {
110
110
  put?: never;
111
111
  /**
112
112
  * Approve an Intent with a Grant holding the family's approve action
113
- * @description Approval by a credential, without a person: the Grant behind the token must hold `approve` on the family that releases this Intent type (`bank_transfer` for a transfer) for the same subject, and within that detail's `transactions.maximum`. Above it the call answers `422 amount_out_of_grant` and the Intent stays pending for another approver. A transfer only a person can release answers `409 interaction_required` with `authorization_url` and `reason`, before any approval is recorded and before the bank is called: `bank_verification_required` for a transfer that leaves its holder's own accounts (to another bank or to another Andco customer), which the bank moves only after that person confirms it with their web PIN and a code the bank sends to their phone, and also for a transfer created with `destination: null` that nobody has completed yet; and `source_account_required` when the person still picks the source. Accepted is not moved: wait for `transfer.succeeded` or `transfer.failed`.
113
+ * @description Approval by a credential, without a person: the Grant behind the token must hold `approve` on the family that releases this Intent type (`bank_transfer` for a transfer) for the same subject, and within that detail's `transactions.maximum`. Above it the call answers `422 amount_out_of_grant` and the Intent stays pending for another approver. A transfer only a person can release answers `409 interaction_required` with `authorization_url` and `reason`, before any approval is recorded and before the bank is called: `bank_verification_required` for a transfer that leaves its holder's own accounts (to another bank or to another AndCo customer), which the bank moves only after that person confirms it with their web AndPass and a code the bank sends to their phone, and also for a transfer created with `receiver: null` that nobody has completed yet; and `source_account_required` when the person still picks the source. The approval ends the Intent: the answer is the Intent `approved`, and an approved transfer Intent names its Transfer in `transfer_id`. Approved is not moved: read the Transfer, or wait for `transfer.succeeded` or `transfer.failed`.
114
114
  *
115
- * Two kinds of Intent are released with nobody present. Opening an additional account by Account Key needs `bank_account` `approve`; the answer is the Intent, and the account number never comes back in it: it arrives in the `account_opening.succeeded` event. A transfer between two accounts of the same holder needs `bank_transfer` `approve`; the bank asks no fraud engine and no challenge because the money does not leave the holder, and the answer is the Intent `succeeded`, or `processing.confirmed` (which for this rail begins at release, while for a transfer that leaves its holder it begins when the bank accepts it) when the bank has not answered for good yet, in which case nothing else is needed from the caller: the server asks the bank again under the same key on a bounded schedule and the outcome arrives as `transfer.succeeded` or `transfer.failed`. "Same holder" is decided by the bank: two accounts of one Organization (or of one person's business) qualify, while an account of a person and an account of a Company they represent do not, and that transfer is an ordinary one that leaves its holder.
115
+ * Two kinds of Intent are released with nobody present. Opening an additional account by Account Key needs `bank_account` `approve`; the answer is the Intent `approved`, with its outcome in `account_opening_status`, and the account number never comes back in it: it arrives in the `account_opening.succeeded` event. A transfer between two accounts of the same holder needs `bank_transfer` `approve`; the bank asks no proof because the money does not leave the holder, and the answer is the Intent `approved` with its `transfer_id`. The Transfer it names is released at once: it reads `succeeded`, or `processing` when the bank has not answered for good yet, in which case nothing else is needed from the caller: the server asks the bank again under the same key on a bounded schedule and the outcome arrives as `transfer.succeeded` or `transfer.failed`. "Same holder" is decided by the bank: two accounts of one Organization (or of one person's business) qualify, while an account of a person and an account of a Company they represent do not, and that transfer is an ordinary one that leaves its holder.
116
116
  *
117
- * Refusals of such a release: `409 interaction_required` with `intent_id`, `reason` and `interaction_url`, where `reason` is `bank_connection_pin_required`, `bank_connection_reconnect_required` or `bank_representative_replacement_required`; the bank asks no challenge, but the web session that acts for the holder needs its person back (or the Organization must connect another bank representative), nothing was opened, frozen or moved, the Intent is untouched and the same request succeeds once the person has acted at `interaction_url`. Also `409 bank_account_quota_exceeded` (with `used` and `quota`), `409 account_key_taken` (with `reason`), `409 intent_expired`, `409 invalid_intent_state` and `403 insufficient_authorization`. `422` with `intent_id` and `error` one of `bank_connection_unavailable` (the subject has no bank connection to a company), `bank_authorization_denied` (the bank does not let that person open accounts for that company), `bank_holder_without_account`, `bank_account_limit_reached`, `bank_refused`, `insufficient_funds`, `bank_rejected` or `bank_review_required`; the Intent is `failed` with the same detail (see `IntentStatus`). `503 temporarily_unavailable` means the bank could not be asked: asking again for the same Intent is safe and answers the same result, because the Intent's id is the bank's idempotency key. Where the bank does not serve the capability, `501 not_implemented` with `account_opening_not_implemented` or `own_account_transfer_not_implemented` and the `intent_id`; the Intent stays as it was. Safe to retry.
117
+ * Refusals of such a release: `409 interaction_required` with `intent_id`, `reason` and `interaction_url`, where `reason` is `bank_connection_pin_required`, `bank_connection_reconnect_required` or `bank_representative_replacement_required`; the bank asks no proof, but the web session that acts for the holder needs its person back (or the Organization must connect another account representative), nothing was opened, frozen or moved, the Intent is untouched and the same request succeeds once the person has acted at `interaction_url`. Also `409 bank_account_quota_exceeded` (with `used` and `quota`), `409 account_key_taken` (with `reason`), `409 intent_expired`, `409 invalid_intent_state` and `403 insufficient_authorization`. `422` with `intent_id` and `error` one of `bank_connection_unavailable` (the subject has no bank connection to a company), `bank_authorization_denied` (the bank does not let that person open accounts for that company), `bank_holder_without_account`, `bank_account_limit_reached`, `bank_refused`, `insufficient_funds`, `bank_rejected` or `bank_review_required`; the Intent stays `approved`, and the Transfer it names, or the opening, reads `failed` with the same detail (see `IntentStatus`). `503 temporarily_unavailable` means the bank could not be asked: asking again for the same Intent is safe and answers the same result, because the bank is asked under the same idempotency-key. Where the bank does not serve the capability, `501 not_implemented` with `account_opening_not_implemented` or `own_account_transfer_not_implemented` and the `intent_id`; the Intent stays as it was. Safe to retry.
118
118
  */
119
119
  post: operations["approveIntent"];
120
120
  delete?: never;
@@ -134,7 +134,7 @@ export interface paths {
134
134
  put?: never;
135
135
  /**
136
136
  * Withdraw an Intent the calling client created
137
- * @description A Cancellation is the creator withdrawing its own request: only the client and Grant that created the Intent may cancel it. An approver declining it uses `reject`, and the audit keeps the two apart. Records why: an Intent that vanished without a reason is an unexplained gap. Answers `409 intent_expired` when the Intent's deadline to be approved and executed has already passed.
137
+ * @description A Cancellation is the creator withdrawing its own request: only the client and Grant that created the Intent may cancel it. An approver declining it uses `reject`, and the audit keeps the two apart. The `reason` is optional: when given it has 1 to 280 characters, and it is recorded with the Cancellation. Answers `409 intent_expired` when the Intent's deadline to be approved and executed has already passed.
138
138
  */
139
139
  post: operations["cancelIntent"];
140
140
  delete?: never;
@@ -154,7 +154,7 @@ export interface paths {
154
154
  put?: never;
155
155
  /**
156
156
  * Close this application's no-target deposit collection with an explicit close Grant action
157
- * @description Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel accepted bank commands, or grant account transaction access.
157
+ * @description Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel commands AndCo already accepted, or grant account transaction access.
158
158
  */
159
159
  post: operations["closeDeposit"];
160
160
  delete?: never;
@@ -174,7 +174,7 @@ export interface paths {
174
174
  put?: never;
175
175
  /**
176
176
  * Create an intent under the exact OAuth Grant
177
- * @description The same creation has two representations, and the content type picks between them. An `application/json` body is an Intent born waiting for an Approval. An `application/jwt` body is one Signed Instruction, sent as a compact JWS whose verified payload is `SignedTransferIntentClaims`, `SignedAccountOpeningIntentClaims` or `SignedAccountClosureIntentClaims`, and every value the operation uses comes from those claims and none from the envelope carrying them. A string body sent as anything but `application/jwt` answers `415 unsupported_media_type`. A Signed Instruction that does not verify answers `400 invalid_signed_instruction` with its `reason`, and one whose `exp` passed `401 expired_signed_instruction`. A signed Intent is born approved when the signing client's Grant holds the family's `approve` action (`bank_transfer` or `bank_account`); otherwise it waits, like a proposal, for the person on the hosted screen or for `POST /intents/{intent_id}/approve` by a Grant that holds it. Opening and closing an account fail synchronously with `403 account_key_out_of_grant` when the account_key is outside the Grant's `accounts` patterns and with `409 account_key_taken` when the account_key names an account of the subject (always for a closed one; otherwise unless `upsert`). The new account's number arrives in the `account_opening.succeeded` event as `account: { id, accountKey, number, name }`. Once the request is valid and authorized (a malformed body is still `400 invalid_request` and a Grant without the permission still `403 insufficient_authorization`), an opening and a transfer between two accounts of the same holder work where the bank serves them: the answer is `201` with the Intent `requires_action` and its `authorization_url`, or, for a Signed Instruction whose signer also holds the family's `approve`, the Intent as it is after its release. Where the deployment's bank does not serve one, the same request answers `501 not_implemented` with `code: account_opening_not_implemented` or `code: own_account_transfer_not_implemented`; a closure always answers `501 not_implemented` with `code: account_closure_not_implemented`. Nothing is created in those cases. A subject without a bank connection to a company cannot open an account: `422 bank_connection_unavailable` with the `intent_id`. A released Signed Instruction answers the refusals of `POST /intents/{intent_id}/approve`.
177
+ * @description The same creation has three representations, and the content type picks between them. An `application/json` body is an Intent born waiting for an Approval. An `application/jwt` body is one Signed Instruction, sent as a compact JWS whose verified payload is `SignedAccountOpeningIntentClaims` or `SignedAccountClosureIntentClaims`, and every value the operation uses comes from those claims and none from the envelope carrying them. An `application/jose+json` body is a signed transfer with `approved: false`: a `SignedTransferEnvelope`, a JWS in the General JSON Serialization, whose payload is `SignedTransferClaims`. It creates a transfer Intent that waits for a decision and answers a TransferIntent with `transfer_id` null. It is verified as `POST /transfers` verifies a signed transfer, with the same rules for the `jti` (a UUID in lowercase, and the only idempotency-key), `exp`, the keys, the `sender` and the `receiver`; the `unusable_key` reason means that the key is registered, but AndCo could not load it to check this signature, so its person registers a new key and revokes this one, then you sign again. A repeat of the same envelope answers the same Intent, and another body under the same `jti` answers `409 idempotency_conflict`. A signed transfer with `approved: true` answers `400 approved_use_transfers` and nothing is recorded: its signature is the approval, so send it to `POST /transfers`. A signed account opening or closure with `approved: true` stays accepted here and is born approved. A string body sent as anything but `application/jwt` answers `415 unsupported_media_type`. A Signed Instruction that does not verify answers `400 invalid_signed_instruction` with its `reason`, and one whose `exp` passed `401 expired_signed_instruction`. A signed account Intent is born approved when the signing client's Grant holds the family's `approve` action (`bank_account`); otherwise it waits, like a proposal, for the person on the hosted screen or for `POST /intents/{intent_id}/approve` by a Grant that holds it. Opening and closing an account fail synchronously with `403 account_key_out_of_grant` when the account_key is outside the Grant's `accounts` patterns and with `409 account_key_taken` when the account_key names an account of the subject (always for a closed one; otherwise unless `upsert`). The new account's number arrives in the `account_opening.succeeded` event as `account: { id, accountKey, number, name }`. Once the request is valid and authorized (a malformed body is still `400 invalid_request` and a Grant without the permission still `403 insufficient_authorization`), an opening and a transfer between two accounts of the same holder work where the bank serves them: the answer is `201` with the Intent `requires_action` and its `authorization_url`, or, for a signed account Intent whose signer also holds the family's `approve`, the Intent born `approved`. Where the deployment's bank does not serve one, the same request answers `501 not_implemented` with `code: account_opening_not_implemented` or `code: own_account_transfer_not_implemented`; a closure always answers `501 not_implemented` with `code: account_closure_not_implemented`. Nothing is created in those cases. A subject without a bank connection to a company cannot open an account: `422 bank_connection_unavailable` with the `intent_id`. A signed account Intent born approved answers the refusals of `POST /intents/{intent_id}/approve`.
178
178
  */
179
179
  post: operations["createIntent"];
180
180
  delete?: never;
@@ -183,6 +183,40 @@ export interface paths {
183
183
  patch?: never;
184
184
  trace?: never;
185
185
  };
186
+ "/transfers": {
187
+ parameters: {
188
+ query?: never;
189
+ header?: never;
190
+ path?: never;
191
+ cookie?: never;
192
+ };
193
+ /**
194
+ * Find a Transfer by the jti of its signed instruction
195
+ * @description It finds one Transfer by the `jti` of the signed transfer with `approved: true` that submitted it, and `jti` is required (`400 invalid_request` when it is missing or is not a UUID in lowercase). The answer is a collection of zero or one Transfer, with the reach of `GET /transfers/{transfer_id}`. A `jti` belongs to the client and the Grant's subject, across the client's Grants: a `jti` that another client or another subject used finds nothing, and so does the `jti` of a signed Intent, which stays on the Intent. The collection is empty in those cases, so no answer tells them apart. It finds a Transfer whose `exp` has passed, which is its purpose: after a lost answer to `POST /transfers`, read by `jti` before signing again. To list the Transfers of an account, use `GET /accounts/{bank_account_id}/transfers`.
196
+ */
197
+ get: operations["listTransfers"];
198
+ put?: never;
199
+ /**
200
+ * Submit a signed transfer
201
+ * @description Submits one Transfer as a Signed Instruction: a `SignedTransferEnvelope`, a JWS in the General JSON Serialization sent as `application/jose+json`, whose payload is `SignedTransferClaims`. Every value the operation uses comes from the verified claims; the envelope is kept unchanged. Any other `Content-Type` answers `415 unsupported_media_type`, and an `Idempotency-Key` header `400 idempotency_key_not_allowed`: the `jti` is the idempotency-key.
202
+ *
203
+ * The signature is the approval: the claims must have `approved: true`, and the Transfer exists as soon as it is submitted, with no decision to wait for. A signed transfer with `approved: false` answers `400 approval_required_use_intents` and nothing is stored: send it to `POST /intents`, which creates an Intent that waits for a decision.
204
+ *
205
+ * Before anything is stored: the token's Grant must hold `bank_transfer` `create` (`403 insufficient_authorization`). The envelope must have its shape and at least one signature, each with a protected header of `typ` `transfer.v1+jwt` (`400 invalid_signed_instruction` with `reason` `malformed_assertion` and its `issues`, or `missing_signature`). Every signature must verify, each with a key registered under a Project of the holder, the Grant's subject: `unknown_key` (a `kid` that is no key of the holder's Projects, a key of another holder included), `revoked_key`, `expired_key`, `unusable_key`, `disallowed_algorithm` or `invalid_signature`. `unusable_key` means that the key is registered, but AndCo could not load it to check this signature: its person registers a new key and revokes this one, then you sign again. The claims must be `SignedTransferClaims` (`invalid_claims` with `issues`; the `jti` must be a UUID in lowercase) and `iss` the presenting client (`wrong_issuer`); an `exp` that passed answers `401 expired_signed_instruction`, and the `exp` of a new `jti` less than 15 minutes after the submission `400 invalid_signed_instruction` with `reason` `expiration_too_soon` (nothing is stored), so sign with an `exp` at least 15 minutes ahead (`bank-sdk` signs 30 minutes ahead). The floor applies only to a new `jti`: the same instruction sent again (same `jti`, same content) is never refused for it, however little of its `exp` is left, and answers or releases the same Transfer as before. That is how a stored Transfer is released after `409 interaction_required` or `503 temporarily_unavailable`. A client that lost the answer can also read the Transfer with `GET /transfers?jti=`, which finds it even after its `exp`. The `sender` must be an AndCo account of the holder that the Grant's `sources` cover (`422 invalid_source`, found by its `account_number`) and must match it (`422 sender_mismatch`; `422 transfer_sender_identity_unavailable` while AndCo knows no RUT for the holder). The Grant's `destinations` must cover the `receiver` (`422 invalid_destination`) and its limits the amount (`422 amount_out_of_grant`). The signed transfer needs `bank_transfer` `approve` within its maximum: `403 insufficient_authorization` otherwise, never a transfer that waits silently.
206
+ *
207
+ * The same `jti` with the same claims answers the same Transfer and never moves money twice; the same `jti` with any other content, `exp` included, answers `409 idempotency_conflict`. To sign again with a new `exp`, use a new `jti`.
208
+ *
209
+ * A key that AndCo does not accept yet for signed transfers answers `unsynced_key`.
210
+ *
211
+ * A transfer between two accounts of the same holder works where AndCo serves that rail (otherwise `501 not_implemented` with `code: own_account_transfer_not_implemented`): it is released at once with nobody present and answers `processing` or `succeeded`, or the release's refusals of `POST /intents/{intent_id}/approve` (`409 interaction_required` with `bank_connection_*` when the web session that acts for the holder needs its person; sending the same instruction again once they acted releases it). A transfer that leaves its holder answers `501 not_implemented` with `code: signed_outgoing_transfer_not_implemented` while AndCo does not serve that rail, and nothing is created; otherwise it is sent at once with nobody present: no web AndPass and no SMS code, because the signature itself authorizes it. It is still screened. It answers `processing` once AndCo accepts it, and later `succeeded`; it answers `failed` with its `status_detail` when the screening refuses it (`fraud_rejected`), when the signature is refused (`unknown_key`, `revoked_key`, `invalid_signature`, `expired_signed_instruction`, `sender_mismatch`) or when the bank refuses the request (`bank_refused`). A signature that needs a proof only a person can give fails too: send the same transfer as an Intent that a person confirms. On either rail, a key that signed it and is revoked or expired when the Transfer executes fails it with `expired_key` or `revoked_key`, even if the key was valid at submission, and nothing is sent; so does a key AndCo no longer holds, with `unknown_key`, for one that leaves its holder. While no final answer is known it reads `processing`: read it later with `GET /transfers/{transfer_id}`, or send the same envelope again, which never moves money twice. `503 temporarily_unavailable` means it was stored and not sent, because the sender account already had two transfer evaluations in the last minute (the `message` says until when): send the same envelope again after that. `409 interaction_required` with `bank_connection_*` means the web session that acts for the holder needs its person, and nothing was created.
212
+ */
213
+ post: operations["createTransfer"];
214
+ delete?: never;
215
+ options?: never;
216
+ head?: never;
217
+ patch?: never;
218
+ trace?: never;
219
+ };
186
220
  "/catalog/banks": {
187
221
  parameters: {
188
222
  query?: never;
@@ -192,7 +226,7 @@ export interface paths {
192
226
  };
193
227
  /**
194
228
  * List the banks a transfer can be sent to
195
- * @description The `bank_id` values that a `bank_transfer` destination of type `external` accepts, each with the bank's name, so an integrator never guesses a slug. The list and the check a transfer goes through are the same function: an `id` here is a `bank_id` the transfer resolves to that bank, and a `bank_id` that resolves to none fails with `unsupported_bank` when the transfer is executed. Granted by a `bank_transfer` authorization detail with `create`. The bank's catalog is read on behalf of the subject, through the web session of one of the accounts that detail reaches, so a subject without any answers `409 interaction_required` like any other read of the bank. It is one bounded list, answered whole as a single page: `pageInfo.hasNextPage` is false, no edge carries a cursor and the pagination parameters do not apply. Returns edges and camelCase pageInfo.
229
+ * @description The banks a transfer can be sent to, each with its four-digit code and its name: the `bank_code` values a Receptor (a `bank_transfer` destination of type `external`) names, so an integrator never guesses one. `@andco/protocol` also exports the known codes as `CHILEAN_BANK_CODES`, which no validation reads; a code the catalog does not know fails with `unsupported_bank` when the transfer is executed. Granted by a `bank_transfer` authorization detail with `create`. It is read on behalf of the subject through one of the accounts that detail reaches, so a subject without any answers `409 interaction_required`. It is one bounded list, answered whole as a single page: `pageInfo.hasNextPage` is false, no edge carries a cursor and the pagination parameters do not apply. Returns edges and camelCase pageInfo.
196
230
  */
197
231
  get: operations["getBankCatalog"];
198
232
  put?: never;
@@ -260,6 +294,26 @@ export interface paths {
260
294
  patch?: never;
261
295
  trace?: never;
262
296
  };
297
+ "/transfers/{transfer_id}": {
298
+ parameters: {
299
+ query?: never;
300
+ header?: never;
301
+ path?: never;
302
+ cookie?: never;
303
+ };
304
+ /**
305
+ * Read one Transfer
306
+ * @description A client reads the Transfers that it created for the same subject, under any of its active Grants that holds `bank_transfer` `create`, `approve` or `reject`. A Grant with `bank_transfer` `read` also reads the Transfers of any origin whose sender account it covers. Any other Transfer answers `404`, as if it did not exist.
307
+ */
308
+ get: operations["getTransfer"];
309
+ put?: never;
310
+ post?: never;
311
+ delete?: never;
312
+ options?: never;
313
+ head?: never;
314
+ patch?: never;
315
+ trace?: never;
316
+ };
263
317
  "/userinfo": {
264
318
  parameters: {
265
319
  query?: never;
@@ -285,7 +339,7 @@ export interface paths {
285
339
  cookie?: never;
286
340
  };
287
341
  /**
288
- * List personal bank accounts and balances
342
+ * List personal digital accounts and balances
289
343
  * @description Paginated by cursor, in publication order. `?accountKey=` switches from walking the collection to addressing one account by the identifier its holder chose: an exact match, not a search, and `after`/`first` are ignored alongside it. Returns edges and camelCase pageInfo. Cursor and offset argument families cannot be mixed.
290
344
  */
291
345
  get: operations["listAccounts"];
@@ -306,7 +360,7 @@ export interface paths {
306
360
  };
307
361
  /**
308
362
  * List one account's transactions
309
- * @description Answers the transactions the account's statement presentation reads, so an integrator sees exactly what a person would see, newest first, one page at a time: feed `pageInfo.endCursor` back as `?after=` while `pageInfo.hasNextPage`. Granted by a `bank_transaction` authorization detail with `read` whose `accounts` reach this account. The account is named by its identifier or by its Account Key, whichever the integrator knows: a segment shaped like a UUID is an identifier, any other is an Account Key of the Grant's subject. The permission is the same for both and the key is resolved on this request: an account the Grant does not reach, by identifier or by key, and a key that names no account of the subject answer `404`, as if it did not exist, whether or not the account exists. The page is read from the bank on behalf of the subject, and the bank's read model walks forward only: `pageInfo.endCursor` is the bank's own cursor for the next page, handed over untouched, and `after` accepts nothing else (`invalid_cursor` otherwise). There is no cursor per transaction, no backward walk and no offset: `before`, `last`, `offset` and `limit` answer `invalid_request`. Returns edges and camelCase pageInfo.
363
+ * @description Answers the transactions the account's statement presentation reads, so an integrator sees exactly what a person would see, newest first, one page at a time: feed `pageInfo.endCursor` back as `?after=` while `pageInfo.hasNextPage`. Granted by a `bank_transaction` authorization detail with `read` whose `accounts` reach this account. The account is named by its identifier or by its Account Key, whichever the integrator knows: a segment shaped like a UUID is an identifier, any other is an Account Key of the Grant's subject. The permission is the same for both and the key is resolved on this request: an account the Grant does not reach, by identifier or by key, and a key that names no account of the subject answer `404`, as if it did not exist, whether or not the account exists. The page is read from AndCo on behalf of the subject, and its read model walks forward only: `pageInfo.endCursor` is AndCo's own cursor for the next page, handed over untouched, and `after` accepts nothing else (`invalid_cursor` otherwise). There is no cursor per transaction, no backward walk and no offset: `before`, `last`, `offset` and `limit` answer `invalid_request`. Returns edges and camelCase pageInfo.
310
364
  */
311
365
  get: operations["listAccountTransactions"];
312
366
  put?: never;
@@ -317,6 +371,26 @@ export interface paths {
317
371
  patch?: never;
318
372
  trace?: never;
319
373
  };
374
+ "/accounts/{bank_account_id}/transfers": {
375
+ parameters: {
376
+ query?: never;
377
+ header?: never;
378
+ path?: never;
379
+ cookie?: never;
380
+ };
381
+ /**
382
+ * List the Transfers that leave one account
383
+ * @description The Transfers whose sender is this account, newest first, one page at a time: feed `pageInfo.endCursor` back as `?after=` while `pageInfo.hasNextPage`. The account is named by its identifier or by its Account Key, whichever the integrator knows: a segment shaped like a UUID is an identifier, any other is an Account Key of the Grant's subject. An account the Grant does not reach, by identifier or by key, and a key that names no account of the subject answer `404`, as if it did not exist. With a `bank_transfer` `read` detail whose `accounts` reach the account, the page holds every Transfer that leaves it, in any status (failed and cancelled included) and of any origin: another Project, the AndCo web app or the issuer's own channels. Without `read`, the page holds only the Transfers that this client created for the same subject, under any of its active Grants that holds `bank_transfer` `create`, `approve` or `reject`, in any status. The route never answers `403` for a narrower Grant: it answers a smaller page, which can be empty. It holds no Intent and no draft: the Intents stay under `/intents`. Money that arrives in the account is not a Transfer of it: it shows as a credit Movement. Each edge has its own cursor, which stays stable when new Transfers arrive. `before`, `last`, `offset` and `limit` answer `invalid_request`.
384
+ */
385
+ get: operations["listAccountTransfers"];
386
+ put?: never;
387
+ post?: never;
388
+ delete?: never;
389
+ options?: never;
390
+ head?: never;
391
+ patch?: never;
392
+ trace?: never;
393
+ };
320
394
  "/organizations/{organization_id}/identities": {
321
395
  parameters: {
322
396
  query?: never;
@@ -346,7 +420,7 @@ export interface paths {
346
420
  };
347
421
  /**
348
422
  * List a Profile's identities
349
- * @description Granted by an `identity` authorization detail with `read` whose subject is this Profile. A subject that is not the Grant's answers `404`, as one that does not exist. Returns edges and camelCase pageInfo. Cursor and offset argument families cannot be mixed. When the Grant's detail asked for the Validación de identidad (`validation` with `required` true), each identity also carries `validation`; without it the field is absent, not `null`.
423
+ * @description Granted by an `identity` authorization detail with `read` whose subject is this Profile. A subject that is not the Grant's answers `404`, as one that does not exist. Returns edges and camelCase pageInfo. Cursor and offset argument families cannot be mixed. When the Grant's detail asked for the Verificación de identidad (`validation` with `required` true), each identity also carries `validation`; without it the field is absent, not `null`.
350
424
  */
351
425
  get: operations["listProfileIdentities"];
352
426
  put?: never;
@@ -405,7 +479,7 @@ export interface paths {
405
479
  cookie?: never;
406
480
  };
407
481
  /**
408
- * Replay bank facts with account transaction read permission
482
+ * Replay account facts with account transaction read permission
409
483
  * @description Returns edges and camelCase pageInfo. Cursor and offset argument families cannot be mixed.
410
484
  */
411
485
  get: operations["readAccountEvents"];
@@ -468,7 +542,7 @@ export interface paths {
468
542
  put?: never;
469
543
  /**
470
544
  * Reject an Intent with a Grant holding the family's reject action
471
- * @description An approver declining an Intent, recorded as a Rejection and kept apart from a Cancellation (the creator withdrawing it). The Grant behind the token must hold `reject` on the family that releases this Intent type for the same subject; no maximum applies to a rejection. Answers `409 intent_expired` when the Intent's deadline has passed.
545
+ * @description An approver declining an Intent, recorded as a Rejection and kept apart from a Cancellation (the creator withdrawing it). The Grant behind the token must hold `reject` on the family that releases this Intent type for the same subject; no maximum applies to a rejection. The `reason` is optional: when given it has 1 to 280 characters, and it is recorded with the Rejection. Answers `409 intent_expired` when the Intent's deadline has passed.
472
546
  */
473
547
  post: operations["rejectIntent"];
474
548
  delete?: never;
@@ -507,7 +581,6 @@ export interface components {
507
581
  id: string;
508
582
  /** Format: uri */
509
583
  resource_server: string;
510
- note?: components["schemas"]["IntentNote"];
511
584
  metadata: {
512
585
  [key: string]: unknown;
513
586
  };
@@ -517,9 +590,14 @@ export interface components {
517
590
  created_at: string;
518
591
  /** Format: uri */
519
592
  authorization_url: string;
593
+ note?: components["schemas"]["IntentNote"];
520
594
  /** @constant */
521
595
  type: "account_closure";
522
596
  status: components["schemas"]["IntentStatus"];
597
+ /** @description The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent. */
598
+ account_closure_status: ("processing" | "succeeded" | "failed") | null;
599
+ /** @description Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status. */
600
+ account_closure_status_detail: string | null;
523
601
  /** @description Whether a Signed Instruction created this Intent rather than a plain request. */
524
602
  signed: boolean;
525
603
  account: components["schemas"]["IntentAccount"];
@@ -530,7 +608,7 @@ export interface components {
530
608
  /** @description Remaining actionable lifetime at server_time; zero for finite terminal Intents. */
531
609
  expires_in_seconds: number;
532
610
  };
533
- /** @description The `application/json` half of closing a Cuenta Vista: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything with banking consequence happens through an Intent. It carries no amount, no source and no destination -- only a reference to the account it closes. */
611
+ /** @description The `application/json` half of closing a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything that changes an account happens through an Intent. It carries no amount, no source and no destination -- only a reference to the account it closes. */
534
612
  AccountClosureIntentCreate: {
535
613
  note?: components["schemas"]["IntentNote"];
536
614
  /** @default {} */
@@ -554,13 +632,12 @@ export interface components {
554
632
  expires_in?: never;
555
633
  expires_at: string;
556
634
  };
557
- /** @description Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until the core assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response. */
635
+ /** @description Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response. */
558
636
  AccountOpeningIntent: {
559
637
  /** Format: uuid */
560
638
  id: string;
561
639
  /** Format: uri */
562
640
  resource_server: string;
563
- note?: components["schemas"]["IntentNote"];
564
641
  metadata: {
565
642
  [key: string]: unknown;
566
643
  };
@@ -570,6 +647,7 @@ export interface components {
570
647
  created_at: string;
571
648
  /** Format: uri */
572
649
  authorization_url: string;
650
+ note?: components["schemas"]["IntentNote"];
573
651
  /** @description The deadline to approve and execute the Intent. `null`: the Intent never expires. */
574
652
  expires_at: string | null;
575
653
  /** @description Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires. */
@@ -577,6 +655,10 @@ export interface components {
577
655
  /** @constant */
578
656
  type: "account_opening";
579
657
  status: components["schemas"]["IntentStatus"];
658
+ /** @description The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent. */
659
+ account_opening_status: ("processing" | "succeeded" | "failed") | null;
660
+ /** @description Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status. */
661
+ account_opening_status_detail: string | null;
580
662
  /** @description Whether a Signed Instruction created this Intent rather than a plain request. */
581
663
  signed: boolean;
582
664
  account: {
@@ -586,7 +668,7 @@ export interface components {
586
668
  bank_account_id: string | null;
587
669
  };
588
670
  };
589
- /** @description The `application/json` half of opening a Cuenta Vista: an Intent born waiting for an Approval. `/accounts` has no `POST` because everything with banking consequence happens through an Intent, and an opening carries no amount, no source and no destination -- only the name the account will answer to. Opening is asynchronous: the answer is the Intent and its status, and the Número de Cuenta arrives on the account's event stream. */
671
+ /** @description The `application/json` half of opening a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `POST` because everything that changes an account happens through an Intent, and an opening carries no amount, no source and no destination -- only the name the account will answer to. Opening is asynchronous: the answer is the Intent and its status, and the Número de Cuenta arrives on the account's event stream. */
590
672
  AccountOpeningIntentCreate: {
591
673
  note?: components["schemas"]["IntentNote"];
592
674
  /** @default {} */
@@ -698,11 +780,11 @@ export interface components {
698
780
  type: string | null;
699
781
  /** @description Null while the balance projection does not know the account yet. */
700
782
  currency: string | null;
701
- /** @description The ledger balance the bank maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds the bank has on hold are not subtracted from it. Null while the balance projection does not know the account yet, for example right after it is opened, and null when the Grant lacks `read_balance`; a listing never fails for it and never makes up a zero. */
783
+ /** @description The balance AndCo maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds on hold are not subtracted from it. Null while AndCo does not know the account's balance yet, for example right after it is opened, and null when the Grant lacks `read_balance`; a listing never fails for it and never makes up a zero. */
702
784
  balance: string | null;
703
785
  };
704
786
  BankCatalogEntry: {
705
- /** @description The `bank_id` of a destination of type `external`. */
787
+ /** @description The bank's four-digit code: the `bank_code` of a Receptor. */
706
788
  id: string;
707
789
  /** @description The bank's name as the bank lists it. */
708
790
  name: string;
@@ -720,23 +802,23 @@ export interface components {
720
802
  id: string;
721
803
  transactionId: string | null;
722
804
  description: string;
723
- /** @description Issued by the external bank and republished exactly as the bank sent it, with none of the digit-count bound of an Andco-defined amount. What tells an inflow from an outflow is `movement_type`, not a sign: the bank sends the amount as a positive figure. */
805
+ /** @description Issued by AndCo and republished exactly as AndCo sent it, with none of the digit-count bound of an AndCo-defined amount. What tells an inflow from an outflow is `movement_type`, not a sign: AndCo sends the amount as a positive figure. */
724
806
  amount: string;
725
807
  /**
726
- * @description The kind of movement, under the bank's own field name and in its own words. `deposit` and `interest` bring money into this account and raise its balance; `withdrawal` takes money out and lowers it. `amount` is always positive, so `movement_type` is what tells an inflow from an outflow.
808
+ * @description The kind of movement, under AndCo's own field name and in its own words. `deposit` and `interest` bring money into this account and raise its balance; `withdrawal` takes money out and lowers it. `amount` is always positive, so `movement_type` is what tells an inflow from an outflow.
727
809
  * @enum {string}
728
810
  */
729
811
  movement_type: "deposit" | "interest" | "withdrawal";
730
812
  origin: string | null;
731
813
  /** Format: date-time */
732
814
  date: string;
733
- /** @description Same provenance as `amount`: issued by the external bank and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away. */
815
+ /** @description Same provenance as `amount`: issued by AndCo and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away. */
734
816
  runningBalance: string | null;
735
817
  paymentType: string | null;
736
818
  reversed: boolean;
737
819
  note: string | null;
738
820
  };
739
- /** @description A connection read live from the bank, which issues one cursor per page and walks forward only. `pageInfo.endCursor` is that cursor and is null on the last page; `pageInfo.startCursor` is always null and `pageInfo.hasPreviousPage` always false. An edge's `cursor` is null: the bank names no position inside a page, so a walk resumes from the end of a page, never from one transaction. */
821
+ /** @description A connection read live from AndCo, which issues one cursor per page and walks forward only. `pageInfo.endCursor` is that cursor and is null on the last page; `pageInfo.startCursor` is always null and `pageInfo.hasPreviousPage` always false. An edge's `cursor` is null: AndCo names no position inside a page, so a walk resumes from the end of a page, never from one transaction. */
740
822
  BankTransactionPage: {
741
823
  edges: {
742
824
  cursor: string | null;
@@ -757,7 +839,7 @@ export interface components {
757
839
  total: string;
758
840
  } | null;
759
841
  };
760
- /** @description The Andco account a deposit lands on: the `{ type: "account", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money. */
842
+ /** @description The AndCo account a deposit lands on: the `{ type: "account", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money. */
761
843
  DepositDestination: {
762
844
  /** @constant */
763
845
  type: "account";
@@ -775,7 +857,6 @@ export interface components {
775
857
  id: string;
776
858
  /** Format: uri */
777
859
  resource_server: string;
778
- note?: components["schemas"]["IntentNote"];
779
860
  metadata: {
780
861
  [key: string]: unknown;
781
862
  };
@@ -785,13 +866,14 @@ export interface components {
785
866
  created_at: string;
786
867
  /** Format: uri */
787
868
  authorization_url: string;
869
+ note?: components["schemas"]["IntentNote"];
788
870
  /** @constant */
789
871
  type: "deposit";
790
872
  /**
791
873
  * @description `<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.
792
874
  * @enum {string}
793
875
  */
794
- status: "requires_action" | "completed" | "closed" | "expired" | "cancelled" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "failed";
876
+ status: "requires_action" | "completed" | "closed" | "expired" | "cancelled" | "cancelled.grant_revoked" | "cancelled.grant_expired";
795
877
  attribution_version: number;
796
878
  closure: {
797
879
  /** Format: date-time */
@@ -877,9 +959,9 @@ export interface components {
877
959
  outcome: "credited" | "reversed";
878
960
  /** @enum {string} */
879
961
  receipt_time_source: "bank_timestamp" | "unknown";
880
- /** @description Name of the account holder that sent the money, exactly as the bank reported it. */
962
+ /** @description Name of the account holder that sent the money, exactly as AndCo reported it. */
881
963
  sender_name: string | null;
882
- /** @description National id (RUT) of the sender, as the bank reported it. */
964
+ /** @description National id (RUT) of the sender, as AndCo reported it. */
883
965
  sender_national_id: string | null;
884
966
  /** @description Display name of the sender's bank. */
885
967
  sender_bank_name: string | null;
@@ -936,10 +1018,10 @@ export interface components {
936
1018
  /** @description Whose resources the Grant reaches: the Profile, or the Organization (Company) the person consented for. It is the only place this response names an Organization outside `authorizationDetails`, because for an Organization the `subject` is the application. It carries the identifier and no identity data; the RUT and the legal name are read from the identities of the Organization. */
937
1019
  GrantHolder: components["schemas"]["ProfileGrantHolder"] | components["schemas"]["OrganizationGrantHolder"];
938
1020
  GrantSubject: components["schemas"]["ProfileGrantSubject"] | components["schemas"]["ApplicationGrantSubject"];
939
- /** @description What Andco Core checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts. */
1021
+ /** @description What AndCo checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts. */
940
1022
  IdentityValidation: {
941
1023
  /**
942
- * @description Who validated the identity. `andco_core` is Andco Core, on its hosted page.
1024
+ * @description Who validated the identity. `andco_core` is AndCo's own check, on its hosted page.
943
1025
  * @enum {string}
944
1026
  */
945
1027
  validated_by: "andco_core";
@@ -949,33 +1031,42 @@ export interface components {
949
1031
  evidence: ("document" | "liveness" | "face_comparison")[];
950
1032
  /**
951
1033
  * Format: uuid
952
- * @description Andco Core's identifier of the validation. Keep it as the reference to the validation.
1034
+ * @description AndCo's identifier of the validation. Keep it as the reference to the validation.
953
1035
  */
954
1036
  verification_id: string;
955
1037
  };
956
1038
  Intent: components["schemas"]["DepositIntent"] | components["schemas"]["TransferIntent"] | components["schemas"]["AccountOpeningIntent"] | components["schemas"]["AccountClosureIntent"];
957
- /** @description One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: "account_key", accountKey }`) or by identifier (`{ type: "account", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution. */
1039
+ /** @description One AndCo account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: "account_key", accountKey }`) or by identifier (`{ type: "account", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution. */
958
1040
  IntentAccount: components["schemas"]["IntentAccountKey"] | components["schemas"]["IntentAccountId"];
959
- /** @description One account at another Chilean bank, with every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account. */
1041
+ /** @description A Receptor at a Chilean bank, in the transfer vocabulary of the API (`receiver` without the amount): the four-digit `bank_code` (AndCo is `0739`), the `account_type` code (`"10"` savings, `"20"` checking, `"40"` debit), the `account_number`, and the holder's `name` and RUT. `country` and `national_kind_id` are always declared. It carries every field a `bank_transfer` `external` matcher can fix, so the Grant's destinations are asked about exactly this account. */
960
1042
  IntentAccountExternal: {
961
1043
  /** @constant */
962
1044
  type: "external";
963
- bank_id: string;
964
- /** @enum {string} */
965
- account_type: "checking" | "debit" | "savings";
966
- account_id: string;
967
- holder_id: string;
1045
+ /** @constant */
1046
+ country: "CL";
1047
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1048
+ bank_code: string;
1049
+ /**
1050
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1051
+ * @enum {string}
1052
+ */
1053
+ account_type: "10" | "20" | "40";
1054
+ account_number: string;
968
1055
  /** @description The holder's name, at most 256 code points (`holder_name_too_long`). */
969
- holder_name: string;
1056
+ name: string;
1057
+ /** @constant */
1058
+ national_kind_id: "RUT";
1059
+ /** @description The holder's RUT. */
1060
+ national_id: string;
970
1061
  };
971
- /** @description One Andco account, named by its identifier. */
1062
+ /** @description One AndCo account, named by its identifier. */
972
1063
  IntentAccountId: {
973
1064
  /** @constant */
974
1065
  type: "account";
975
1066
  /** Format: uuid */
976
1067
  id: string;
977
1068
  };
978
- /** @description One Andco account of the Grant's subject, named by its Account Key. */
1069
+ /** @description One AndCo account of the Grant's subject, named by its Account Key. */
979
1070
  IntentAccountKey: {
980
1071
  /** @constant */
981
1072
  type: "account_key";
@@ -993,11 +1084,11 @@ export interface components {
993
1084
  editable?: boolean;
994
1085
  };
995
1086
  IntentCancellation: {
996
- reason: string;
1087
+ reason?: string;
997
1088
  };
998
- /** @description The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation. */
1089
+ /** @description The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation. */
999
1090
  IntentNote: {
1000
- /** @description Trimmed bank reference. An empty reference is allowed. */
1091
+ /** @description Trimmed comment. An empty reference is allowed. */
1001
1092
  value: string;
1002
1093
  /**
1003
1094
  * @description Defaults to false when omitted.
@@ -1006,17 +1097,17 @@ export interface components {
1006
1097
  editable?: boolean;
1007
1098
  };
1008
1099
  IntentRejection: {
1009
- reason: string;
1100
+ reason?: string;
1010
1101
  };
1011
1102
  /**
1012
- * @description `<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.
1103
+ * @description `<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.
1013
1104
  *
1014
- * Where an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.
1105
+ * An Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.
1015
1106
  *
1016
- * `failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.
1107
+ * The outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.
1017
1108
  * @enum {string}
1018
1109
  */
1019
- IntentStatus: "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "succeeded" | "failed" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "rejected" | "expired";
1110
+ IntentStatus: "requires_action" | "approved" | "rejected" | "cancelled" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration" | "expired" | "completed" | "closed";
1020
1111
  Organization: {
1021
1112
  id: string;
1022
1113
  name: string;
@@ -1237,7 +1328,7 @@ export interface components {
1237
1328
  expires_in?: never;
1238
1329
  expires_at: string | null;
1239
1330
  };
1240
- /** @description The amount a Signed Instruction orders: the same `{ currency, value }` as a request, with nothing left for a person to change. */
1331
+ /** @description An amount with nothing left for a person to change: the same `{ currency, value }` as a request, without `editable`. */
1241
1332
  SignedAmount: {
1242
1333
  /** @constant */
1243
1334
  currency: "CLP";
@@ -1253,118 +1344,203 @@ export interface components {
1253
1344
  [key: string]: unknown;
1254
1345
  };
1255
1346
  };
1256
- /** @description The verified claims of a Signed Instruction, sent to the same endpoint as `application/jwt`. Nothing here is optional that the transfer needs and nothing here is editable: an instruction that does not say where the money comes from or where it goes is not signable, so `source` and `destination` are required (and neither may be `null`: there is no screen on this path to complete it) and the amount carries no `editable`. `note` is a plain reference for the same reason -- there is no screen on this path, so there is nobody to propose it to. When a signature is present, every value the transfer uses comes from these claims and none from the envelope carrying them. `exp` bounds how long the instruction may be submitted; `expires_in` or `expires_at` bounds how long the Intent may be approved and executed. They are different deadlines. */
1257
- SignedTransferIntentClaims: {
1258
- iss: string;
1259
- /** @constant */
1260
- aud: "https://api.andco.com";
1261
- /** @description The idempotency key, inside the signature, reused verbatim when retrying. */
1262
- jti: string;
1263
- exp: number;
1264
- iat?: number;
1265
- nbf?: number;
1266
- /** @default {} */
1267
- metadata?: {
1268
- [key: string]: unknown;
1269
- };
1270
- /** @constant */
1271
- type: "transfer";
1272
- source: components["schemas"]["IntentAccount"];
1273
- destination: components["schemas"]["TransferDestination"];
1274
- amount: components["schemas"]["SignedAmount"];
1275
- /** @description A plain bank reference; a Signed Instruction proposes nothing. */
1276
- note?: string;
1277
- expires_in: string;
1278
- expires_at?: never;
1279
- } | {
1347
+ /** @description The claims of a signed transfer (`typ` `transfer.v1+jwt`): `sender`, `receiver` and `comment` (with an optional `metadata`) plus `iss`, `aud`, `jti`, `exp` and `approved`. Strict: an unknown claim, country or document is refused, nothing names an Account Key or an AndCo account id, and the only deadline is `exp`. */
1348
+ SignedTransferClaims: {
1349
+ /** @description The signing Project's `client_id`. */
1280
1350
  iss: string;
1281
1351
  /** @constant */
1282
1352
  aud: "https://api.andco.com";
1283
- /** @description The idempotency key, inside the signature, reused verbatim when retrying. */
1353
+ /**
1354
+ * Format: uuid
1355
+ * @description A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.
1356
+ */
1284
1357
  jti: string;
1358
+ /** @description Unix seconds after which the transfer is refused. */
1285
1359
  exp: number;
1286
- iat?: number;
1287
- nbf?: number;
1288
- /** @default {} */
1360
+ /** @description `true` orders the transfer sent as soon as it is submitted, which needs `bank_transfer` `approve` in the Grant. */
1361
+ approved: boolean;
1362
+ sender: components["schemas"]["TransferSender"];
1363
+ receiver: components["schemas"]["TransferReceiver"];
1364
+ /** @description What both sides read next to the movement. */
1365
+ comment?: string;
1366
+ /** @description The signer's own data, signed and kept as it arrives. Nothing reads it to decide anything. */
1289
1367
  metadata?: {
1290
1368
  [key: string]: unknown;
1291
1369
  };
1370
+ };
1371
+ /** @description A signed transfer: a JWS in the General JSON Serialization (RFC 7515 §7.2.1), with one `payload` and at least one signature, each with a protected header of `typ` `transfer.v1+jwt`. Sent as `application/jose+json`. */
1372
+ SignedTransferEnvelope: {
1373
+ /** @description The base64url of the JSON claims (`SignedTransferClaims`). */
1374
+ payload: string;
1375
+ /** @description At least one signature over the same payload; every one is verified. */
1376
+ signatures: {
1377
+ /** @description The base64url of the JSON protected header (`SignedTransferHeader`). */
1378
+ protected: string;
1379
+ signature: string;
1380
+ }[];
1381
+ };
1382
+ /** @description The protected header of one signature, decoded: `alg` (`ES256` or `RS256`), the `kid` of a registered Signing Key Pair, and `typ` `transfer.v1+jwt`. */
1383
+ SignedTransferHeader: {
1384
+ /** @enum {string} */
1385
+ alg: "ES256" | "RS256";
1386
+ kid: string;
1292
1387
  /** @constant */
1293
- type: "transfer";
1294
- source: components["schemas"]["IntentAccount"];
1295
- destination: components["schemas"]["TransferDestination"];
1296
- amount: components["schemas"]["SignedAmount"];
1297
- /** @description A plain bank reference; a Signed Instruction proposes nothing. */
1298
- note?: string;
1299
- expires_in?: never;
1300
- expires_at: string | null;
1388
+ typ: "transfer.v1+jwt";
1301
1389
  };
1302
- /** @description The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that. */
1390
+ /** @description The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that. */
1303
1391
  TransferAmount: {
1304
1392
  /** @constant */
1305
1393
  currency: "CLP";
1306
- /** @description Immutable amount from the creation request. */
1307
- value: string;
1394
+ /** @description Immutable amount from the creation request, in the minor unit of the currency. */
1395
+ value: number;
1308
1396
  editable: boolean;
1309
1397
  /** @description The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them. */
1310
- confirmed: string | null;
1398
+ confirmed: number | null;
1311
1399
  };
1312
- /** @description The amount a transfer proposes. `editable: true` lets the person who confirms set the amount on Andco's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the available balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`. */
1313
- TransferAmountProposal: {
1400
+ /** @description A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent. */
1401
+ Transfer: {
1402
+ /** @constant */
1403
+ object: "transfer";
1404
+ /**
1405
+ * Format: uuid
1406
+ * @description The Transfer's own id: what `GET /transfers/{transfer_id}` reads.
1407
+ */
1408
+ id: string;
1409
+ status: components["schemas"]["TransferStatus"];
1410
+ /** @description The word that says why, null when the status has none: `bank_refused` for a `failed` Transfer the bank refused for sure, `expired` for a `cancelled` one whose deadline passed, `grant_revoked` or `grant_expired` for one whose Grant ended. The vocabulary is open: a detail added later appears here as it is, so decide on `status`. */
1411
+ status_detail: string | null;
1412
+ /**
1413
+ * @description Who made it: `oauth`, a Project through the API; `platform`, a person in the AndCo web app; `emisor`, a person in the issuer's own channels, for example its mobile app.
1414
+ * @enum {string}
1415
+ */
1416
+ origin: "oauth" | "platform" | "emisor";
1417
+ /** @description An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. */
1418
+ amount: number;
1314
1419
  /** @constant */
1315
1420
  currency: "CLP";
1316
- value: string;
1421
+ /** @description The Remitente: the account the money leaves and its holder. */
1422
+ sender: {
1423
+ /** @description The country of the account, for example `CL`. */
1424
+ country: string;
1425
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1426
+ bank_code: string;
1427
+ /**
1428
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1429
+ * @enum {string}
1430
+ */
1431
+ account_type: "10" | "20" | "40";
1432
+ /** @description The account number, as its bank writes it. */
1433
+ account_number: string;
1434
+ /** @description The holder's name, or null when it is not known. */
1435
+ name: string | null;
1436
+ /** @description The kind of the holder's document, for example `RUT`, or null when it is not known. */
1437
+ national_kind_id: string | null;
1438
+ /** @description The holder's document number, or null when it is not known. */
1439
+ national_id: string | null;
1440
+ };
1441
+ /** @description The Receptor: the account the money lands on and its holder. */
1442
+ receiver: {
1443
+ /** @description The country of the account, for example `CL`. */
1444
+ country: string;
1445
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1446
+ bank_code: string;
1447
+ /**
1448
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1449
+ * @enum {string}
1450
+ */
1451
+ account_type: "10" | "20" | "40";
1452
+ /** @description The account number, as its bank writes it. */
1453
+ account_number: string;
1454
+ /** @description The holder's name, or null when it is not known. */
1455
+ name: string | null;
1456
+ /** @description The kind of the holder's document, for example `RUT`, or null when it is not known. */
1457
+ national_kind_id: string | null;
1458
+ /** @description The holder's document number, or null when it is not known. */
1459
+ national_id: string | null;
1460
+ };
1461
+ /** @description The Nota de operación, at most 60 bytes of UTF-8, or null when there is none. */
1462
+ comment: string | null;
1463
+ /** @description The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer with `approved: true` (its signature approved it, so there was no request). */
1464
+ intent_id: string | null;
1465
+ /** @description The `jti` of the signed transfer with `approved: true` that submitted it, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent. `GET /transfers?jti=` finds only a Transfer that has one. */
1466
+ jti: string | null;
1467
+ /** @description The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id. */
1468
+ transaction_id: string | null;
1317
1469
  /**
1318
- * @description Defaults to false when omitted.
1319
- * @default false
1470
+ * Format: date-time
1471
+ * @description When the Transfer came to exist.
1320
1472
  */
1321
- editable?: boolean;
1473
+ created_at: string;
1322
1474
  };
1323
- /** @description Where a signed transfer's money lands, in the `bank_transfer` matcher vocabulary: an Andco account by AccountKey or identifier, or an account at another Chilean bank. */
1324
- TransferDestination: components["schemas"]["IntentAccountKey"] | components["schemas"]["IntentAccountId"] | components["schemas"]["IntentAccountExternal"];
1325
- /** @description Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms. */
1326
- TransferDestinationProposal: {
1327
- /** @constant */
1328
- type: "account_key";
1329
- accountKey: string;
1475
+ /** @description A connection of Transfers, newest first, walked forward with `after` and `first`. Each edge has its own opaque `cursor`, which encodes the order key (creation time and id), so a walk never skips or repeats a Transfer when new ones arrive. `pageInfo.endCursor` is the cursor of the last edge, and `hasNextPage` is false when no Transfer follows, also on a page of exactly `first` items. */
1476
+ TransferListPage: {
1477
+ edges: {
1478
+ cursor: string;
1479
+ node: components["schemas"]["Transfer"];
1480
+ }[];
1481
+ pageInfo: components["schemas"]["PageInfo"];
1482
+ };
1483
+ /** @description A connection of the Transfers that `GET /transfers?jti=` found: zero edges or one, and an edge's `cursor` is null, because AndCo names no position inside it. The list of an account has its own page, `TransferListPage`, with a cursor on each edge. */
1484
+ TransferPage: {
1485
+ edges: {
1486
+ cursor: string | null;
1487
+ node: components["schemas"]["Transfer"];
1488
+ }[];
1489
+ pageInfo: components["schemas"]["PageInfo"];
1490
+ };
1491
+ /** @description One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer. */
1492
+ TransferParty: {
1493
+ /** @description The country of the account, for example `CL`. */
1494
+ country: string;
1495
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1496
+ bank_code: string;
1330
1497
  /**
1331
- * @default false
1332
- * @constant
1498
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1499
+ * @enum {string}
1333
1500
  */
1334
- editable?: false;
1335
- } | {
1501
+ account_type: "10" | "20" | "40";
1502
+ /** @description The account number, as its bank writes it. */
1503
+ account_number: string;
1504
+ /** @description The holder's name, or null when it is not known. */
1505
+ name: string | null;
1506
+ /** @description The kind of the holder's document, for example `RUT`, or null when it is not known. */
1507
+ national_kind_id: string | null;
1508
+ /** @description The holder's document number, or null when it is not known. */
1509
+ national_id: string | null;
1510
+ };
1511
+ /**
1512
+ * @description Where the Transfer stands: `requires_action` while the person still owes the bank a step, `processing` while the bank holds it and has not answered for good, then `succeeded`, `failed` or `cancelled`, which are final. `status_detail` says why. There is no `rejected` Transfer: a rejection ends an Intent, and a rejected Intent has no Transfer.
1513
+ * @enum {string}
1514
+ */
1515
+ TransferStatus: "requires_action" | "processing" | "succeeded" | "failed" | "cancelled";
1516
+ /** @description The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`. */
1517
+ TransferAmountProposal: {
1336
1518
  /** @constant */
1337
- type: "account";
1338
- /** Format: uuid */
1339
- id: string;
1519
+ currency: "CLP";
1520
+ /** @description An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`. */
1521
+ value: number;
1340
1522
  /**
1523
+ * @description Defaults to false when omitted.
1341
1524
  * @default false
1342
- * @constant
1343
1525
  */
1344
- editable?: false;
1345
- } | {
1346
- /** @constant */
1347
- type: "external";
1348
- bank_id: string;
1349
- /** @enum {string} */
1350
- account_type: "checking" | "debit" | "savings";
1351
- account_id: string;
1352
- holder_id: string;
1353
- /** @description The holder's name, at most 256 code points (`holder_name_too_long`). */
1354
- holder_name: string;
1526
+ editable?: boolean;
1527
+ };
1528
+ /** @description The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation. */
1529
+ TransferCommentProposal: {
1530
+ /** @description Trimmed comment. An empty one is allowed. */
1531
+ value: string;
1355
1532
  /**
1533
+ * @description Defaults to false when omitted.
1356
1534
  * @default false
1357
- * @constant
1358
1535
  */
1359
- editable?: false;
1536
+ editable?: boolean;
1360
1537
  };
1361
- /** @description Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount. */
1538
+ /** @description Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount. */
1362
1539
  TransferIntent: {
1363
1540
  /** Format: uuid */
1364
1541
  id: string;
1365
1542
  /** Format: uri */
1366
1543
  resource_server: string;
1367
- note?: components["schemas"]["IntentNote"];
1368
1544
  metadata: {
1369
1545
  [key: string]: unknown;
1370
1546
  };
@@ -1381,12 +1557,15 @@ export interface components {
1381
1557
  /** @constant */
1382
1558
  type: "transfer";
1383
1559
  status: components["schemas"]["IntentStatus"];
1560
+ /** @description The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then. */
1561
+ transfer_id: string | null;
1384
1562
  /** @description Whether a Signed Instruction created this Intent rather than a plain request. */
1385
1563
  signed: boolean;
1386
- /** @description Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution. */
1387
- source: components["schemas"]["IntentAccount"] | null;
1388
- /** @description Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked. */
1389
- destination: components["schemas"]["TransferDestinationProposal"] | null;
1564
+ /** @description The Remitente. Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution. */
1565
+ sender: components["schemas"]["IntentAccount"] | null;
1566
+ /** @description The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked. */
1567
+ receiver: components["schemas"]["TransferIntentReceiverProposal"] | null;
1568
+ comment?: components["schemas"]["TransferCommentProposal"];
1390
1569
  amount: components["schemas"]["TransferAmount"];
1391
1570
  settled: components["schemas"]["TransferSettlement"] | null;
1392
1571
  fee: {
@@ -1396,14 +1575,13 @@ export interface components {
1396
1575
  amount: "0";
1397
1576
  };
1398
1577
  /**
1399
- * @description Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.
1578
+ * @description Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.
1400
1579
  * @enum {string}
1401
1580
  */
1402
- interaction_reason?: "bank_verification_required" | "source_account_required";
1581
+ interaction_reason?: "source_account_required";
1403
1582
  };
1404
- /** @description The `application/json` half of creating a transfer: an Intent born waiting for an Approval. A null `source` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `destination` is the screen too: the person completes where the money goes (the bank, the type and number of the account, and its holder's RUT and name), and the server checks what she wrote against the Grant's `destinations` when she confirms, refusing one outside them with `invalid_destination`. Both default to null when omitted. A destination the request names is locked on the screen (`editable: true` is an `invalid_request`), and the amount is too unless `amount.editable` is true, in which case the person sets it. The `application/jwt` half is `SignedTransferIntentClaims`, and the two are separate schemas rather than one with optional fields on purpose: when signed and unsigned members share an object, something eventually reads the wrong ones. */
1583
+ /** @description The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in the transfer vocabulary of the API: `sender`, `receiver`, an integer `amount.value` and a `comment` of at most 60 bytes. A null `sender` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `receiver` is the screen too: the person completes where the money goes (the bank, the type and number of the account, and its holder's RUT and name), and the server checks what she wrote against the Grant's `destinations` when she confirms, refusing one outside them with `invalid_destination`. Both default to null when omitted. A Receptor the request names is locked on the screen (`editable: true` is an `invalid_request`), and the amount is too unless `amount.editable` is true, in which case the person sets it. A Receptor at a bank is named in the transfer vocabulary of the API (`IntentAccountExternal`). A signed transfer is not an Intent: it is submitted to `POST /transfers` as a `SignedTransferEnvelope`. */
1405
1584
  TransferIntentCreate: {
1406
- note?: components["schemas"]["IntentNote"];
1407
1585
  /** @default {} */
1408
1586
  metadata?: {
1409
1587
  [key: string]: unknown;
@@ -1412,19 +1590,19 @@ export interface components {
1412
1590
  type: "transfer";
1413
1591
  amount: components["schemas"]["TransferAmountProposal"];
1414
1592
  /**
1415
- * @description The Andco account the money leaves. Null leaves that choice to a person on a screen.
1593
+ * @description The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.
1416
1594
  * @default null
1417
1595
  */
1418
- source?: components["schemas"]["IntentAccount"] | null;
1596
+ sender?: components["schemas"]["IntentAccount"] | null;
1419
1597
  /**
1420
- * @description Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.
1598
+ * @description The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.
1421
1599
  * @default null
1422
1600
  */
1423
- destination?: components["schemas"]["TransferDestinationProposal"] | null;
1601
+ receiver?: components["schemas"]["TransferIntentReceiverProposal"] | null;
1602
+ comment?: components["schemas"]["TransferCommentProposal"];
1424
1603
  expires_in: string;
1425
1604
  expires_at?: never;
1426
1605
  } | {
1427
- note?: components["schemas"]["IntentNote"];
1428
1606
  /** @default {} */
1429
1607
  metadata?: {
1430
1608
  [key: string]: unknown;
@@ -1433,23 +1611,121 @@ export interface components {
1433
1611
  type: "transfer";
1434
1612
  amount: components["schemas"]["TransferAmountProposal"];
1435
1613
  /**
1436
- * @description The Andco account the money leaves. Null leaves that choice to a person on a screen.
1614
+ * @description The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.
1437
1615
  * @default null
1438
1616
  */
1439
- source?: components["schemas"]["IntentAccount"] | null;
1617
+ sender?: components["schemas"]["IntentAccount"] | null;
1440
1618
  /**
1441
- * @description Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.
1619
+ * @description The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.
1442
1620
  * @default null
1443
1621
  */
1444
- destination?: components["schemas"]["TransferDestinationProposal"] | null;
1622
+ receiver?: components["schemas"]["TransferIntentReceiverProposal"] | null;
1623
+ comment?: components["schemas"]["TransferCommentProposal"];
1445
1624
  expires_in?: never;
1446
1625
  expires_at: string | null;
1447
1626
  };
1627
+ /** @description The Receptor of a transfer, in the `bank_transfer` matcher vocabulary: an AndCo account by AccountKey or identifier, or a Receptor at a Chilean bank in the transfer vocabulary of the API. */
1628
+ TransferIntentReceiver: components["schemas"]["IntentAccountKey"] | components["schemas"]["IntentAccountId"] | components["schemas"]["IntentAccountExternal"];
1629
+ /** @description The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms. */
1630
+ TransferIntentReceiverProposal: {
1631
+ /** @constant */
1632
+ type: "account_key";
1633
+ accountKey: string;
1634
+ /**
1635
+ * @default false
1636
+ * @constant
1637
+ */
1638
+ editable?: false;
1639
+ } | {
1640
+ /** @constant */
1641
+ type: "account";
1642
+ /** Format: uuid */
1643
+ id: string;
1644
+ /**
1645
+ * @default false
1646
+ * @constant
1647
+ */
1648
+ editable?: false;
1649
+ } | {
1650
+ /** @constant */
1651
+ type: "external";
1652
+ /** @constant */
1653
+ country: "CL";
1654
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1655
+ bank_code: string;
1656
+ /**
1657
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1658
+ * @enum {string}
1659
+ */
1660
+ account_type: "10" | "20" | "40";
1661
+ account_number: string;
1662
+ /** @description The holder's name, at most 256 code points (`holder_name_too_long`). */
1663
+ name: string;
1664
+ /** @constant */
1665
+ national_kind_id: "RUT";
1666
+ /** @description The holder's RUT. */
1667
+ national_id: string;
1668
+ /**
1669
+ * @default false
1670
+ * @constant
1671
+ */
1672
+ editable?: false;
1673
+ };
1674
+ /** @description The Receptor: the account the money lands on, its holder, and the amount, an integer in the minor unit of the currency. `country` and `national_kind_id` are always declared. */
1675
+ TransferReceiver: {
1676
+ /** @constant */
1677
+ country: "CL";
1678
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1679
+ bank_code: string;
1680
+ /**
1681
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1682
+ * @enum {string}
1683
+ */
1684
+ account_type: "10" | "20" | "40";
1685
+ /** @description The account number, as its bank writes it. */
1686
+ account_number: string;
1687
+ /** @description The holder's name, kept as it arrives and never compared. */
1688
+ name: string;
1689
+ /** @constant */
1690
+ national_kind_id: "RUT";
1691
+ /** @description The holder's RUT, compared as a normalized RUT. */
1692
+ national_id: string;
1693
+ /** @description An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`. */
1694
+ amount: number;
1695
+ /** @constant */
1696
+ currency: "CLP";
1697
+ /**
1698
+ * Format: email
1699
+ * @description Where the Receptor is notified.
1700
+ */
1701
+ email?: string;
1702
+ };
1703
+ /** @description The Remitente: the account the money leaves and its holder. `country` and `national_kind_id` are always declared. The country, the bank (`0739`), the account's own type and the holder's RUT are checked; `name` is kept as it arrives. */
1704
+ TransferSender: {
1705
+ /** @constant */
1706
+ country: "CL";
1707
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1708
+ bank_code: string;
1709
+ /**
1710
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1711
+ * @enum {string}
1712
+ */
1713
+ account_type: "10" | "20" | "40";
1714
+ /** @description The account number, as its bank writes it. */
1715
+ account_number: string;
1716
+ /** @description The holder's name, kept as it arrives and never compared. */
1717
+ name: string;
1718
+ /** @constant */
1719
+ national_kind_id: "RUT";
1720
+ /** @description The holder's RUT, compared as a normalized RUT. */
1721
+ national_id: string;
1722
+ };
1448
1723
  /** @description The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires. */
1449
1724
  TransferSettlement: {
1450
1725
  /** @constant */
1451
1726
  currency: "CLP";
1452
- value: string;
1727
+ /** @description An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`. */
1728
+ value: number;
1453
1729
  /** Format: date-time */
1454
1730
  at: string;
1455
1731
  };
@@ -1466,6 +1742,7 @@ export interface components {
1466
1742
  ProfileId: string;
1467
1743
  AddressId: string;
1468
1744
  IntentId: string;
1745
+ BankAccountId: string;
1469
1746
  };
1470
1747
  requestBodies: never;
1471
1748
  headers: never;
@@ -2974,7 +3251,7 @@ export interface operations {
2974
3251
  authorization_url?: string;
2975
3252
  /**
2976
3253
  * Format: uri
2977
- * @description Where in Platform the person brings their bank connection back, for the `bank_*` reasons.
3254
+ * @description Where in Platform the person brings their AndCo account connection back, for the `bank_*` reasons.
2978
3255
  */
2979
3256
  interaction_url?: string;
2980
3257
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
@@ -3006,9 +3283,9 @@ export interface operations {
3006
3283
  * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
3007
3284
  */
3008
3285
  intent_id?: string;
3009
- /** @description How many bank accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal. */
3286
+ /** @description How many digital accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal. */
3010
3287
  used?: number;
3011
- /** @description How many bank accounts the Organization may hold. Absent when it could not be read after the refusal. */
3288
+ /** @description How many digital accounts the Organization may hold. Absent when it could not be read after the refusal. */
3012
3289
  quota?: number;
3013
3290
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
3014
3291
  message?: string;
@@ -3268,10 +3545,10 @@ export interface operations {
3268
3545
  /** @constant */
3269
3546
  error: "not_implemented";
3270
3547
  /**
3271
- * @description Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where the bank does not serve them, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.
3548
+ * @description Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where AndCo does not serve them, a signed transfer that leaves its holder where AndCo does not verify signatures yet, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.
3272
3549
  * @enum {string}
3273
3550
  */
3274
- code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "external_transfer_execution_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "intent_type_not_decidable";
3551
+ code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "signed_outgoing_transfer_not_implemented" | "external_transfer_execution_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "intent_type_not_decidable";
3275
3552
  /**
3276
3553
  * Format: uuid
3277
3554
  * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
@@ -3673,6 +3950,7 @@ export interface operations {
3673
3950
  content: {
3674
3951
  "application/json": components["schemas"]["DepositIntentCreate"] | components["schemas"]["TransferIntentCreate"] | components["schemas"]["AccountOpeningIntentCreate"] | components["schemas"]["AccountClosureIntentCreate"];
3675
3952
  "application/jwt": string;
3953
+ "application/jose+json": components["schemas"]["SignedTransferEnvelope"];
3676
3954
  };
3677
3955
  };
3678
3956
  responses: {
@@ -3685,7 +3963,7 @@ export interface operations {
3685
3963
  "application/json": components["schemas"]["Intent"];
3686
3964
  };
3687
3965
  };
3688
- /** @description `invalid_request`, `idempotency_key_not_allowed`, `invalid_signed_instruction` */
3966
+ /** @description `invalid_request`, `idempotency_key_not_allowed`, `approved_use_transfers`, `invalid_signed_instruction` */
3689
3967
  400: {
3690
3968
  headers: {
3691
3969
  [name: string]: unknown;
@@ -3713,15 +3991,22 @@ export interface operations {
3713
3991
  message?: string;
3714
3992
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
3715
3993
  hint?: string;
3994
+ } | {
3995
+ /** @constant */
3996
+ error: "approved_use_transfers";
3997
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
3998
+ message?: string;
3999
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4000
+ hint?: string;
3716
4001
  } | {
3717
4002
  /** @constant */
3718
4003
  error: "invalid_signed_instruction";
3719
4004
  /**
3720
- * @description The one cause: what did not verify, or `invalid_claims` when the verified claims are not an Intent.
4005
+ * @description The one cause: what did not verify, or `invalid_claims` when the verified claims are not what the operation takes (an Intent on `POST /intents`, a transfer on `POST /transfers`).
3721
4006
  * @enum {string}
3722
4007
  */
3723
- reason: "malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
3724
- /** @description On `invalid_claims`, what failed in the claims, as `invalid_request` names it. */
4008
+ reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
4009
+ /** @description On `invalid_claims`, what failed in the claims; on `malformed_assertion` of a signed transfer, what failed in its envelope. As `invalid_request` names it. */
3725
4010
  issues?: {
3726
4011
  /** @description What failed, as a stable code: a schema check such as `max_length`, `regex` or `uuid`, or the code of a rule such as `note_too_long`. Map it to your own words. */
3727
4012
  type: string;
@@ -3850,7 +4135,7 @@ export interface operations {
3850
4135
  authorization_url?: string;
3851
4136
  /**
3852
4137
  * Format: uri
3853
- * @description Where in Platform the person brings their bank connection back, for the `bank_*` reasons.
4138
+ * @description Where in Platform the person brings their AndCo account connection back, for the `bank_*` reasons.
3854
4139
  */
3855
4140
  interaction_url?: string;
3856
4141
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
@@ -3882,9 +4167,9 @@ export interface operations {
3882
4167
  * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
3883
4168
  */
3884
4169
  intent_id?: string;
3885
- /** @description How many bank accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal. */
4170
+ /** @description How many digital accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal. */
3886
4171
  used?: number;
3887
- /** @description How many bank accounts the Organization may hold. Absent when it could not be read after the refusal. */
4172
+ /** @description How many digital accounts the Organization may hold. Absent when it could not be read after the refusal. */
3888
4173
  quota?: number;
3889
4174
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
3890
4175
  message?: string;
@@ -4176,10 +4461,10 @@ export interface operations {
4176
4461
  /** @constant */
4177
4462
  error: "not_implemented";
4178
4463
  /**
4179
- * @description Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where the bank does not serve them, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.
4464
+ * @description Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where AndCo does not serve them, a signed transfer that leaves its holder where AndCo does not verify signatures yet, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.
4180
4465
  * @enum {string}
4181
4466
  */
4182
- code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "external_transfer_execution_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "intent_type_not_decidable";
4467
+ code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "signed_outgoing_transfer_not_implemented" | "external_transfer_execution_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "intent_type_not_decidable";
4183
4468
  /**
4184
4469
  * Format: uuid
4185
4470
  * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
@@ -4210,33 +4495,43 @@ export interface operations {
4210
4495
  };
4211
4496
  };
4212
4497
  };
4213
- getBankCatalog: {
4498
+ listTransfers: {
4214
4499
  parameters: {
4215
- query?: never;
4500
+ query: {
4501
+ jti: string;
4502
+ };
4216
4503
  header?: never;
4217
4504
  path?: never;
4218
4505
  cookie?: never;
4219
4506
  };
4220
4507
  requestBody?: never;
4221
4508
  responses: {
4222
- /** @description The banks a transfer can be sent to, ordered as the bank lists them */
4509
+ /** @description The Transfers found: zero or one */
4223
4510
  200: {
4224
4511
  headers: {
4225
4512
  [name: string]: unknown;
4226
4513
  };
4227
4514
  content: {
4228
- "application/json": components["schemas"]["BankCatalogPage"];
4515
+ "application/json": components["schemas"]["TransferPage"];
4229
4516
  };
4230
4517
  };
4231
- /** @description `invalid_token` */
4232
- 401: {
4518
+ /** @description `invalid_request` */
4519
+ 400: {
4233
4520
  headers: {
4234
4521
  [name: string]: unknown;
4235
4522
  };
4236
4523
  content: {
4237
4524
  "application/json": {
4238
4525
  /** @constant */
4239
- error: "invalid_token";
4526
+ error: "invalid_request";
4527
+ issues: {
4528
+ /** @description What failed, as a stable code: a schema check such as `max_length`, `regex` or `uuid`, or the code of a rule such as `note_too_long`. Map it to your own words. */
4529
+ type: string;
4530
+ /** @description Where it failed, as the keys from the root of the part of the request it belongs to; empty for the part as a whole. */
4531
+ path: string[];
4532
+ /** @description What the check required, when it has a value: the maximum of `max_length`, for instance. */
4533
+ requirement?: unknown;
4534
+ }[];
4240
4535
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4241
4536
  message?: string;
4242
4537
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
@@ -4244,24 +4539,210 @@ export interface operations {
4244
4539
  };
4245
4540
  };
4246
4541
  };
4247
- /** @description `invalid_origin`, `insufficient_authorization` */
4248
- 403: {
4542
+ /** @description `invalid_token` */
4543
+ 401: {
4249
4544
  headers: {
4250
4545
  [name: string]: unknown;
4251
4546
  };
4252
4547
  content: {
4253
4548
  "application/json": {
4254
4549
  /** @constant */
4255
- error: "invalid_origin";
4550
+ error: "invalid_token";
4256
4551
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4257
4552
  message?: string;
4258
4553
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4259
4554
  hint?: string;
4260
- } | {
4261
- /** @constant */
4262
- error: "insufficient_authorization";
4263
- /** @description The authorization detail type the Grant has to cover for this operation. */
4264
- required_type?: string;
4555
+ };
4556
+ };
4557
+ };
4558
+ /** @description `invalid_origin` */
4559
+ 403: {
4560
+ headers: {
4561
+ [name: string]: unknown;
4562
+ };
4563
+ content: {
4564
+ "application/json": {
4565
+ /** @constant */
4566
+ error: "invalid_origin";
4567
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4568
+ message?: string;
4569
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4570
+ hint?: string;
4571
+ };
4572
+ };
4573
+ };
4574
+ /** @description `unsupported_version` */
4575
+ 404: {
4576
+ headers: {
4577
+ [name: string]: unknown;
4578
+ };
4579
+ content: {
4580
+ "application/json": {
4581
+ /** @constant */
4582
+ error: "unsupported_version";
4583
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4584
+ message?: string;
4585
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4586
+ hint?: string;
4587
+ };
4588
+ };
4589
+ };
4590
+ /** @description `server_error` */
4591
+ 500: {
4592
+ headers: {
4593
+ [name: string]: unknown;
4594
+ };
4595
+ content: {
4596
+ "application/json": {
4597
+ /** @constant */
4598
+ error: "server_error";
4599
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4600
+ message?: string;
4601
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4602
+ hint?: string;
4603
+ };
4604
+ };
4605
+ };
4606
+ /** @description `temporarily_unavailable` */
4607
+ 503: {
4608
+ headers: {
4609
+ [name: string]: unknown;
4610
+ };
4611
+ content: {
4612
+ "application/json": {
4613
+ /** @constant */
4614
+ error: "temporarily_unavailable";
4615
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4616
+ message?: string;
4617
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4618
+ hint?: string;
4619
+ };
4620
+ };
4621
+ };
4622
+ };
4623
+ };
4624
+ createTransfer: {
4625
+ parameters: {
4626
+ query?: never;
4627
+ header?: never;
4628
+ path?: never;
4629
+ cookie?: never;
4630
+ };
4631
+ requestBody: {
4632
+ content: {
4633
+ "application/jose+json": components["schemas"]["SignedTransferEnvelope"];
4634
+ };
4635
+ };
4636
+ responses: {
4637
+ /** @description The Transfer submitted, or the same one from a repeated instruction */
4638
+ 201: {
4639
+ headers: {
4640
+ [name: string]: unknown;
4641
+ };
4642
+ content: {
4643
+ "application/json": components["schemas"]["Transfer"];
4644
+ };
4645
+ };
4646
+ /** @description `invalid_request`, `idempotency_key_not_allowed`, `approval_required_use_intents`, `invalid_signed_instruction` */
4647
+ 400: {
4648
+ headers: {
4649
+ [name: string]: unknown;
4650
+ };
4651
+ content: {
4652
+ "application/json": {
4653
+ /** @constant */
4654
+ error: "invalid_request";
4655
+ issues: {
4656
+ /** @description What failed, as a stable code: a schema check such as `max_length`, `regex` or `uuid`, or the code of a rule such as `note_too_long`. Map it to your own words. */
4657
+ type: string;
4658
+ /** @description Where it failed, as the keys from the root of the part of the request it belongs to; empty for the part as a whole. */
4659
+ path: string[];
4660
+ /** @description What the check required, when it has a value: the maximum of `max_length`, for instance. */
4661
+ requirement?: unknown;
4662
+ }[];
4663
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4664
+ message?: string;
4665
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4666
+ hint?: string;
4667
+ } | {
4668
+ /** @constant */
4669
+ error: "idempotency_key_not_allowed";
4670
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4671
+ message?: string;
4672
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4673
+ hint?: string;
4674
+ } | {
4675
+ /** @constant */
4676
+ error: "approval_required_use_intents";
4677
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4678
+ message?: string;
4679
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4680
+ hint?: string;
4681
+ } | {
4682
+ /** @constant */
4683
+ error: "invalid_signed_instruction";
4684
+ /**
4685
+ * @description The one cause: what did not verify, or `invalid_claims` when the verified claims are not what the operation takes (an Intent on `POST /intents`, a transfer on `POST /transfers`).
4686
+ * @enum {string}
4687
+ */
4688
+ reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed" | "invalid_claims";
4689
+ /** @description On `invalid_claims`, what failed in the claims; on `malformed_assertion` of a signed transfer, what failed in its envelope. As `invalid_request` names it. */
4690
+ issues?: {
4691
+ /** @description What failed, as a stable code: a schema check such as `max_length`, `regex` or `uuid`, or the code of a rule such as `note_too_long`. Map it to your own words. */
4692
+ type: string;
4693
+ /** @description Where it failed, as the keys from the root of the part of the request it belongs to; empty for the part as a whole. */
4694
+ path: string[];
4695
+ /** @description What the check required, when it has a value: the maximum of `max_length`, for instance. */
4696
+ requirement?: unknown;
4697
+ }[];
4698
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4699
+ message?: string;
4700
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4701
+ hint?: string;
4702
+ };
4703
+ };
4704
+ };
4705
+ /** @description `invalid_token`, `expired_signed_instruction` */
4706
+ 401: {
4707
+ headers: {
4708
+ [name: string]: unknown;
4709
+ };
4710
+ content: {
4711
+ "application/json": {
4712
+ /** @constant */
4713
+ error: "invalid_token";
4714
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4715
+ message?: string;
4716
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4717
+ hint?: string;
4718
+ } | {
4719
+ /** @constant */
4720
+ error: "expired_signed_instruction";
4721
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4722
+ message?: string;
4723
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4724
+ hint?: string;
4725
+ };
4726
+ };
4727
+ };
4728
+ /** @description `invalid_origin`, `insufficient_authorization` */
4729
+ 403: {
4730
+ headers: {
4731
+ [name: string]: unknown;
4732
+ };
4733
+ content: {
4734
+ "application/json": {
4735
+ /** @constant */
4736
+ error: "invalid_origin";
4737
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4738
+ message?: string;
4739
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4740
+ hint?: string;
4741
+ } | {
4742
+ /** @constant */
4743
+ error: "insufficient_authorization";
4744
+ /** @description The authorization detail type the Grant has to cover for this operation. */
4745
+ required_type?: string;
4265
4746
  /** @description The action the authorization detail has to name for this operation. */
4266
4747
  required_action?: string;
4267
4748
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
@@ -4271,15 +4752,687 @@ export interface operations {
4271
4752
  };
4272
4753
  };
4273
4754
  };
4274
- /** @description `unsupported_version` */
4275
- 404: {
4755
+ /** @description `unsupported_version` */
4756
+ 404: {
4757
+ headers: {
4758
+ [name: string]: unknown;
4759
+ };
4760
+ content: {
4761
+ "application/json": {
4762
+ /** @constant */
4763
+ error: "unsupported_version";
4764
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4765
+ message?: string;
4766
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4767
+ hint?: string;
4768
+ };
4769
+ };
4770
+ };
4771
+ /** @description `idempotency_conflict`, `interaction_required` */
4772
+ 409: {
4773
+ headers: {
4774
+ [name: string]: unknown;
4775
+ };
4776
+ content: {
4777
+ "application/json": {
4778
+ /** @constant */
4779
+ error: "idempotency_conflict";
4780
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4781
+ message?: string;
4782
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4783
+ hint?: string;
4784
+ } | {
4785
+ /** @constant */
4786
+ error: "interaction_required";
4787
+ /**
4788
+ * Format: uuid
4789
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4790
+ */
4791
+ intent_id?: string;
4792
+ /**
4793
+ * @description Why only a person can go on.
4794
+ * @enum {string}
4795
+ */
4796
+ reason?: "bank_verification_required" | "source_account_required" | "bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required";
4797
+ /**
4798
+ * Format: uri
4799
+ * @description Where the person completes the Intent, for `bank_verification_required` and `source_account_required`.
4800
+ */
4801
+ authorization_url?: string;
4802
+ /**
4803
+ * Format: uri
4804
+ * @description Where in Platform the person brings their AndCo account connection back, for the `bank_*` reasons.
4805
+ */
4806
+ interaction_url?: string;
4807
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4808
+ message?: string;
4809
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4810
+ hint?: string;
4811
+ };
4812
+ };
4813
+ };
4814
+ /** @description `payload_too_large` */
4815
+ 413: {
4816
+ headers: {
4817
+ [name: string]: unknown;
4818
+ };
4819
+ content: {
4820
+ "application/json": {
4821
+ /** @constant */
4822
+ error: "payload_too_large";
4823
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4824
+ message?: string;
4825
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4826
+ hint?: string;
4827
+ };
4828
+ };
4829
+ };
4830
+ /** @description `unsupported_media_type` */
4831
+ 415: {
4832
+ headers: {
4833
+ [name: string]: unknown;
4834
+ };
4835
+ content: {
4836
+ "application/json": {
4837
+ /** @constant */
4838
+ error: "unsupported_media_type";
4839
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4840
+ message?: string;
4841
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4842
+ hint?: string;
4843
+ };
4844
+ };
4845
+ };
4846
+ /** @description `sender_mismatch`, `transfer_sender_identity_unavailable`, `amount_out_of_grant`, `invalid_source`, `invalid_destination`, `bank_connection_unavailable`, `bank_refused`, `insufficient_funds`, `bank_rejected`, `bank_review_required` */
4847
+ 422: {
4848
+ headers: {
4849
+ [name: string]: unknown;
4850
+ };
4851
+ content: {
4852
+ "application/json": {
4853
+ /** @constant */
4854
+ error: "sender_mismatch";
4855
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4856
+ message?: string;
4857
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4858
+ hint?: string;
4859
+ } | {
4860
+ /** @constant */
4861
+ error: "transfer_sender_identity_unavailable";
4862
+ /**
4863
+ * Format: uuid
4864
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4865
+ */
4866
+ intent_id?: string;
4867
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4868
+ message?: string;
4869
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4870
+ hint?: string;
4871
+ } | {
4872
+ /** @constant */
4873
+ error: "amount_out_of_grant";
4874
+ /**
4875
+ * Format: uuid
4876
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4877
+ */
4878
+ intent_id?: string;
4879
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4880
+ message?: string;
4881
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4882
+ hint?: string;
4883
+ } | {
4884
+ /** @constant */
4885
+ error: "invalid_source";
4886
+ /**
4887
+ * Format: uuid
4888
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4889
+ */
4890
+ intent_id?: string;
4891
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4892
+ message?: string;
4893
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4894
+ hint?: string;
4895
+ } | {
4896
+ /** @constant */
4897
+ error: "invalid_destination";
4898
+ /**
4899
+ * Format: uuid
4900
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4901
+ */
4902
+ intent_id?: string;
4903
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4904
+ message?: string;
4905
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4906
+ hint?: string;
4907
+ } | {
4908
+ /** @constant */
4909
+ error: "bank_connection_unavailable";
4910
+ /**
4911
+ * Format: uuid
4912
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4913
+ */
4914
+ intent_id?: string;
4915
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4916
+ message?: string;
4917
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4918
+ hint?: string;
4919
+ } | {
4920
+ /** @constant */
4921
+ error: "bank_refused";
4922
+ /**
4923
+ * Format: uuid
4924
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4925
+ */
4926
+ intent_id?: string;
4927
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4928
+ message?: string;
4929
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4930
+ hint?: string;
4931
+ } | {
4932
+ /** @constant */
4933
+ error: "insufficient_funds";
4934
+ /**
4935
+ * Format: uuid
4936
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4937
+ */
4938
+ intent_id?: string;
4939
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4940
+ message?: string;
4941
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4942
+ hint?: string;
4943
+ } | {
4944
+ /** @constant */
4945
+ error: "bank_rejected";
4946
+ /**
4947
+ * Format: uuid
4948
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4949
+ */
4950
+ intent_id?: string;
4951
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4952
+ message?: string;
4953
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4954
+ hint?: string;
4955
+ } | {
4956
+ /** @constant */
4957
+ error: "bank_review_required";
4958
+ /**
4959
+ * Format: uuid
4960
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
4961
+ */
4962
+ intent_id?: string;
4963
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4964
+ message?: string;
4965
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4966
+ hint?: string;
4967
+ };
4968
+ };
4969
+ };
4970
+ /** @description `server_error` */
4971
+ 500: {
4972
+ headers: {
4973
+ [name: string]: unknown;
4974
+ };
4975
+ content: {
4976
+ "application/json": {
4977
+ /** @constant */
4978
+ error: "server_error";
4979
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4980
+ message?: string;
4981
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4982
+ hint?: string;
4983
+ };
4984
+ };
4985
+ };
4986
+ /** @description `not_implemented` */
4987
+ 501: {
4988
+ headers: {
4989
+ [name: string]: unknown;
4990
+ };
4991
+ content: {
4992
+ "application/json": {
4993
+ /** @constant */
4994
+ error: "not_implemented";
4995
+ /**
4996
+ * @description Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where AndCo does not serve them, a signed transfer that leaves its holder where AndCo does not verify signatures yet, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.
4997
+ * @enum {string}
4998
+ */
4999
+ code?: "account_closure_not_implemented" | "account_opening_not_implemented" | "own_account_transfer_not_implemented" | "signed_outgoing_transfer_not_implemented" | "external_transfer_execution_not_implemented" | "multiple_destinations_not_implemented" | "split_payments_not_implemented" | "multiple_instructions_not_implemented" | "intent_type_not_decidable";
5000
+ /**
5001
+ * Format: uuid
5002
+ * @description The Intent the refusal is about, when it was refused at its release rather than at its creation.
5003
+ */
5004
+ intent_id?: string;
5005
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5006
+ message?: string;
5007
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5008
+ hint?: string;
5009
+ };
5010
+ };
5011
+ };
5012
+ /** @description `temporarily_unavailable` */
5013
+ 503: {
5014
+ headers: {
5015
+ [name: string]: unknown;
5016
+ };
5017
+ content: {
5018
+ "application/json": {
5019
+ /** @constant */
5020
+ error: "temporarily_unavailable";
5021
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5022
+ message?: string;
5023
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5024
+ hint?: string;
5025
+ };
5026
+ };
5027
+ };
5028
+ };
5029
+ };
5030
+ getBankCatalog: {
5031
+ parameters: {
5032
+ query?: never;
5033
+ header?: never;
5034
+ path?: never;
5035
+ cookie?: never;
5036
+ };
5037
+ requestBody?: never;
5038
+ responses: {
5039
+ /** @description The banks a transfer can be sent to, ordered as the bank lists them */
5040
+ 200: {
5041
+ headers: {
5042
+ [name: string]: unknown;
5043
+ };
5044
+ content: {
5045
+ "application/json": components["schemas"]["BankCatalogPage"];
5046
+ };
5047
+ };
5048
+ /** @description `invalid_token` */
5049
+ 401: {
5050
+ headers: {
5051
+ [name: string]: unknown;
5052
+ };
5053
+ content: {
5054
+ "application/json": {
5055
+ /** @constant */
5056
+ error: "invalid_token";
5057
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5058
+ message?: string;
5059
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5060
+ hint?: string;
5061
+ };
5062
+ };
5063
+ };
5064
+ /** @description `invalid_origin`, `insufficient_authorization` */
5065
+ 403: {
5066
+ headers: {
5067
+ [name: string]: unknown;
5068
+ };
5069
+ content: {
5070
+ "application/json": {
5071
+ /** @constant */
5072
+ error: "invalid_origin";
5073
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5074
+ message?: string;
5075
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5076
+ hint?: string;
5077
+ } | {
5078
+ /** @constant */
5079
+ error: "insufficient_authorization";
5080
+ /** @description The authorization detail type the Grant has to cover for this operation. */
5081
+ required_type?: string;
5082
+ /** @description The action the authorization detail has to name for this operation. */
5083
+ required_action?: string;
5084
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5085
+ message?: string;
5086
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5087
+ hint?: string;
5088
+ };
5089
+ };
5090
+ };
5091
+ /** @description `unsupported_version` */
5092
+ 404: {
5093
+ headers: {
5094
+ [name: string]: unknown;
5095
+ };
5096
+ content: {
5097
+ "application/json": {
5098
+ /** @constant */
5099
+ error: "unsupported_version";
5100
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5101
+ message?: string;
5102
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5103
+ hint?: string;
5104
+ };
5105
+ };
5106
+ };
5107
+ /** @description `interaction_required` */
5108
+ 409: {
5109
+ headers: {
5110
+ [name: string]: unknown;
5111
+ };
5112
+ content: {
5113
+ "application/json": {
5114
+ /** @constant */
5115
+ error: "interaction_required";
5116
+ /**
5117
+ * @description What the person has to do: type the web AndPass (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another account representative (`bank_representative_replacement_required`).
5118
+ * @enum {string}
5119
+ */
5120
+ code: "bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required";
5121
+ /**
5122
+ * Format: uri
5123
+ * @description Where in Platform the person does what `code` names.
5124
+ */
5125
+ interaction_url?: string;
5126
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5127
+ message?: string;
5128
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5129
+ hint?: string;
5130
+ };
5131
+ };
5132
+ };
5133
+ /** @description `server_error` */
5134
+ 500: {
5135
+ headers: {
5136
+ [name: string]: unknown;
5137
+ };
5138
+ content: {
5139
+ "application/json": {
5140
+ /** @constant */
5141
+ error: "server_error";
5142
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5143
+ message?: string;
5144
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5145
+ hint?: string;
5146
+ };
5147
+ };
5148
+ };
5149
+ /** @description `temporarily_unavailable` */
5150
+ 503: {
5151
+ headers: {
5152
+ [name: string]: unknown;
5153
+ };
5154
+ content: {
5155
+ "application/json": {
5156
+ /** @constant */
5157
+ error: "temporarily_unavailable";
5158
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5159
+ message?: string;
5160
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5161
+ hint?: string;
5162
+ };
5163
+ };
5164
+ };
5165
+ };
5166
+ };
5167
+ getIntent: {
5168
+ parameters: {
5169
+ query?: never;
5170
+ header?: never;
5171
+ path: {
5172
+ intent_id: components["parameters"]["IntentId"];
5173
+ };
5174
+ cookie?: never;
5175
+ };
5176
+ requestBody?: never;
5177
+ responses: {
5178
+ /** @description The intent, as the Project that created it reads it */
5179
+ 200: {
5180
+ headers: {
5181
+ [name: string]: unknown;
5182
+ };
5183
+ content: {
5184
+ "application/json": components["schemas"]["Intent"];
5185
+ };
5186
+ };
5187
+ /** @description `invalid_identifier` */
5188
+ 400: {
5189
+ headers: {
5190
+ [name: string]: unknown;
5191
+ };
5192
+ content: {
5193
+ "application/json": {
5194
+ /** @constant */
5195
+ error: "invalid_identifier";
5196
+ /** @description The path parameter that is not well formed. */
5197
+ parameter: string;
5198
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5199
+ message?: string;
5200
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5201
+ hint?: string;
5202
+ };
5203
+ };
5204
+ };
5205
+ /** @description `invalid_token` */
5206
+ 401: {
5207
+ headers: {
5208
+ [name: string]: unknown;
5209
+ };
5210
+ content: {
5211
+ "application/json": {
5212
+ /** @constant */
5213
+ error: "invalid_token";
5214
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5215
+ message?: string;
5216
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5217
+ hint?: string;
5218
+ };
5219
+ };
5220
+ };
5221
+ /** @description `invalid_origin` */
5222
+ 403: {
5223
+ headers: {
5224
+ [name: string]: unknown;
5225
+ };
5226
+ content: {
5227
+ "application/json": {
5228
+ /** @constant */
5229
+ error: "invalid_origin";
5230
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5231
+ message?: string;
5232
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5233
+ hint?: string;
5234
+ };
5235
+ };
5236
+ };
5237
+ /** @description `not_found`, `unsupported_version` */
5238
+ 404: {
5239
+ headers: {
5240
+ [name: string]: unknown;
5241
+ };
5242
+ content: {
5243
+ "application/json": {
5244
+ /** @constant */
5245
+ error: "not_found";
5246
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5247
+ message?: string;
5248
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5249
+ hint?: string;
5250
+ } | {
5251
+ /** @constant */
5252
+ error: "unsupported_version";
5253
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5254
+ message?: string;
5255
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5256
+ hint?: string;
5257
+ };
5258
+ };
5259
+ };
5260
+ /** @description `server_error` */
5261
+ 500: {
5262
+ headers: {
5263
+ [name: string]: unknown;
5264
+ };
5265
+ content: {
5266
+ "application/json": {
5267
+ /** @constant */
5268
+ error: "server_error";
5269
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5270
+ message?: string;
5271
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5272
+ hint?: string;
5273
+ };
5274
+ };
5275
+ };
5276
+ /** @description `temporarily_unavailable` */
5277
+ 503: {
5278
+ headers: {
5279
+ [name: string]: unknown;
5280
+ };
5281
+ content: {
5282
+ "application/json": {
5283
+ /** @constant */
5284
+ error: "temporarily_unavailable";
5285
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5286
+ message?: string;
5287
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5288
+ hint?: string;
5289
+ };
5290
+ };
5291
+ };
5292
+ };
5293
+ };
5294
+ getGrantAuthorization: {
5295
+ parameters: {
5296
+ query?: never;
5297
+ header?: never;
5298
+ path?: never;
5299
+ cookie?: never;
5300
+ };
5301
+ requestBody?: never;
5302
+ responses: {
5303
+ /** @description Active Grant context for a Resource Server */
5304
+ 200: {
5305
+ headers: {
5306
+ [name: string]: unknown;
5307
+ };
5308
+ content: {
5309
+ "application/json": components["schemas"]["GrantAuthorization"];
5310
+ };
5311
+ };
5312
+ /** @description `invalid_token` */
5313
+ 401: {
5314
+ headers: {
5315
+ [name: string]: unknown;
5316
+ };
5317
+ content: {
5318
+ "application/json": {
5319
+ /** @constant */
5320
+ error: "invalid_token";
5321
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5322
+ message?: string;
5323
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5324
+ hint?: string;
5325
+ };
5326
+ };
5327
+ };
5328
+ /** @description `invalid_origin` */
5329
+ 403: {
5330
+ headers: {
5331
+ [name: string]: unknown;
5332
+ };
5333
+ content: {
5334
+ "application/json": {
5335
+ /** @constant */
5336
+ error: "invalid_origin";
5337
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5338
+ message?: string;
5339
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5340
+ hint?: string;
5341
+ };
5342
+ };
5343
+ };
5344
+ /** @description `unsupported_version` */
5345
+ 404: {
5346
+ headers: {
5347
+ [name: string]: unknown;
5348
+ };
5349
+ content: {
5350
+ "application/json": {
5351
+ /** @constant */
5352
+ error: "unsupported_version";
5353
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5354
+ message?: string;
5355
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5356
+ hint?: string;
5357
+ };
5358
+ };
5359
+ };
5360
+ /** @description `server_error` */
5361
+ 500: {
5362
+ headers: {
5363
+ [name: string]: unknown;
5364
+ };
5365
+ content: {
5366
+ "application/json": {
5367
+ /** @constant */
5368
+ error: "server_error";
5369
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5370
+ message?: string;
5371
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5372
+ hint?: string;
5373
+ };
5374
+ };
5375
+ };
5376
+ /** @description `temporarily_unavailable` */
5377
+ 503: {
5378
+ headers: {
5379
+ [name: string]: unknown;
5380
+ };
5381
+ content: {
5382
+ "application/json": {
5383
+ /** @constant */
5384
+ error: "temporarily_unavailable";
5385
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5386
+ message?: string;
5387
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5388
+ hint?: string;
5389
+ };
5390
+ };
5391
+ };
5392
+ };
5393
+ };
5394
+ getPermissionCatalog: {
5395
+ parameters: {
5396
+ query?: {
5397
+ after?: components["parameters"]["After"];
5398
+ first?: number;
5399
+ before?: components["parameters"]["Before"];
5400
+ last?: number;
5401
+ offset?: components["parameters"]["Offset"];
5402
+ limit?: number;
5403
+ };
5404
+ header?: never;
5405
+ path?: never;
5406
+ cookie?: never;
5407
+ };
5408
+ requestBody?: never;
5409
+ responses: {
5410
+ /** @description One page of the public Permission Catalog */
5411
+ 200: {
5412
+ headers: {
5413
+ [name: string]: unknown;
5414
+ };
5415
+ content: {
5416
+ "application/json": components["schemas"]["PermissionCatalogPage"];
5417
+ };
5418
+ };
5419
+ /** @description `invalid_request` */
5420
+ 400: {
4276
5421
  headers: {
4277
5422
  [name: string]: unknown;
4278
5423
  };
4279
5424
  content: {
4280
5425
  "application/json": {
4281
5426
  /** @constant */
4282
- error: "unsupported_version";
5427
+ error: "invalid_request";
5428
+ issues: {
5429
+ /** @description What failed, as a stable code: a schema check such as `max_length`, `regex` or `uuid`, or the code of a rule such as `note_too_long`. Map it to your own words. */
5430
+ type: string;
5431
+ /** @description Where it failed, as the keys from the root of the part of the request it belongs to; empty for the part as a whole. */
5432
+ path: string[];
5433
+ /** @description What the check required, when it has a value: the maximum of `max_length`, for instance. */
5434
+ requirement?: unknown;
5435
+ }[];
4283
5436
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4284
5437
  message?: string;
4285
5438
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
@@ -4287,25 +5440,15 @@ export interface operations {
4287
5440
  };
4288
5441
  };
4289
5442
  };
4290
- /** @description `interaction_required` */
4291
- 409: {
5443
+ /** @description `unsupported_version` */
5444
+ 404: {
4292
5445
  headers: {
4293
5446
  [name: string]: unknown;
4294
5447
  };
4295
5448
  content: {
4296
5449
  "application/json": {
4297
5450
  /** @constant */
4298
- error: "interaction_required";
4299
- /**
4300
- * @description What the person has to do: type the web PIN (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another bank representative (`bank_representative_replacement_required`).
4301
- * @enum {string}
4302
- */
4303
- code: "bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required";
4304
- /**
4305
- * Format: uri
4306
- * @description Where in Platform the person does what `code` names.
4307
- */
4308
- interaction_url?: string;
5451
+ error: "unsupported_version";
4309
5452
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4310
5453
  message?: string;
4311
5454
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
@@ -4347,24 +5490,24 @@ export interface operations {
4347
5490
  };
4348
5491
  };
4349
5492
  };
4350
- getIntent: {
5493
+ getTransfer: {
4351
5494
  parameters: {
4352
5495
  query?: never;
4353
5496
  header?: never;
4354
5497
  path: {
4355
- intent_id: components["parameters"]["IntentId"];
5498
+ transfer_id: string;
4356
5499
  };
4357
5500
  cookie?: never;
4358
5501
  };
4359
5502
  requestBody?: never;
4360
5503
  responses: {
4361
- /** @description The intent, as the Project that created it reads it */
5504
+ /** @description The Transfer */
4362
5505
  200: {
4363
5506
  headers: {
4364
5507
  [name: string]: unknown;
4365
5508
  };
4366
5509
  content: {
4367
- "application/json": components["schemas"]["Intent"];
5510
+ "application/json": components["schemas"]["Transfer"];
4368
5511
  };
4369
5512
  };
4370
5513
  /** @description `invalid_identifier` */
@@ -4474,7 +5617,7 @@ export interface operations {
4474
5617
  };
4475
5618
  };
4476
5619
  };
4477
- getGrantAuthorization: {
5620
+ getUserInfo: {
4478
5621
  parameters: {
4479
5622
  query?: never;
4480
5623
  header?: never;
@@ -4483,13 +5626,13 @@ export interface operations {
4483
5626
  };
4484
5627
  requestBody?: never;
4485
5628
  responses: {
4486
- /** @description Active Grant context for a Resource Server */
5629
+ /** @description Scope-filtered OpenID-style claims */
4487
5630
  200: {
4488
5631
  headers: {
4489
5632
  [name: string]: unknown;
4490
5633
  };
4491
5634
  content: {
4492
- "application/json": components["schemas"]["GrantAuthorization"];
5635
+ "application/json": components["schemas"]["UserInfo"];
4493
5636
  };
4494
5637
  };
4495
5638
  /** @description `invalid_token` */
@@ -4508,13 +5651,22 @@ export interface operations {
4508
5651
  };
4509
5652
  };
4510
5653
  };
4511
- /** @description `invalid_origin` */
5654
+ /** @description `insufficient_scope`, `invalid_origin` */
4512
5655
  403: {
4513
5656
  headers: {
4514
5657
  [name: string]: unknown;
4515
5658
  };
4516
5659
  content: {
4517
5660
  "application/json": {
5661
+ /** @constant */
5662
+ error: "insufficient_scope";
5663
+ /** @description The scope the operation requires. */
5664
+ required_scope: string;
5665
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5666
+ message?: string;
5667
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5668
+ hint?: string;
5669
+ } | {
4518
5670
  /** @constant */
4519
5671
  error: "invalid_origin";
4520
5672
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
@@ -4574,15 +5726,16 @@ export interface operations {
4574
5726
  };
4575
5727
  };
4576
5728
  };
4577
- getPermissionCatalog: {
5729
+ listAccounts: {
4578
5730
  parameters: {
4579
5731
  query?: {
5732
+ accountKey?: string;
4580
5733
  after?: components["parameters"]["After"];
4581
- first?: number;
5734
+ first?: components["parameters"]["First"];
4582
5735
  before?: components["parameters"]["Before"];
4583
- last?: number;
5736
+ last?: components["parameters"]["Last"];
4584
5737
  offset?: components["parameters"]["Offset"];
4585
- limit?: number;
5738
+ limit?: components["parameters"]["Limit"];
4586
5739
  };
4587
5740
  header?: never;
4588
5741
  path?: never;
@@ -4590,16 +5743,16 @@ export interface operations {
4590
5743
  };
4591
5744
  requestBody?: never;
4592
5745
  responses: {
4593
- /** @description One page of the public Permission Catalog */
5746
+ /** @description Active digital accounts granted by bank_accounts:read */
4594
5747
  200: {
4595
5748
  headers: {
4596
5749
  [name: string]: unknown;
4597
5750
  };
4598
5751
  content: {
4599
- "application/json": components["schemas"]["PermissionCatalogPage"];
5752
+ "application/json": components["schemas"]["AccountPage"];
4600
5753
  };
4601
5754
  };
4602
- /** @description `invalid_request` */
5755
+ /** @description `invalid_request`, `invalid_accounts_cursor` */
4603
5756
  400: {
4604
5757
  headers: {
4605
5758
  [name: string]: unknown;
@@ -4620,18 +5773,9 @@ export interface operations {
4620
5773
  message?: string;
4621
5774
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4622
5775
  hint?: string;
4623
- };
4624
- };
4625
- };
4626
- /** @description `unsupported_version` */
4627
- 404: {
4628
- headers: {
4629
- [name: string]: unknown;
4630
- };
4631
- content: {
4632
- "application/json": {
5776
+ } | {
4633
5777
  /** @constant */
4634
- error: "unsupported_version";
5778
+ error: "invalid_accounts_cursor";
4635
5779
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4636
5780
  message?: string;
4637
5781
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
@@ -4639,15 +5783,15 @@ export interface operations {
4639
5783
  };
4640
5784
  };
4641
5785
  };
4642
- /** @description `server_error` */
4643
- 500: {
5786
+ /** @description `invalid_token` */
5787
+ 401: {
4644
5788
  headers: {
4645
5789
  [name: string]: unknown;
4646
5790
  };
4647
5791
  content: {
4648
5792
  "application/json": {
4649
5793
  /** @constant */
4650
- error: "server_error";
5794
+ error: "invalid_token";
4651
5795
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4652
5796
  message?: string;
4653
5797
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
@@ -4655,51 +5799,26 @@ export interface operations {
4655
5799
  };
4656
5800
  };
4657
5801
  };
4658
- /** @description `temporarily_unavailable` */
4659
- 503: {
5802
+ /** @description `invalid_origin`, `insufficient_authorization` */
5803
+ 403: {
4660
5804
  headers: {
4661
5805
  [name: string]: unknown;
4662
5806
  };
4663
5807
  content: {
4664
5808
  "application/json": {
4665
5809
  /** @constant */
4666
- error: "temporarily_unavailable";
5810
+ error: "invalid_origin";
4667
5811
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4668
5812
  message?: string;
4669
5813
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4670
5814
  hint?: string;
4671
- };
4672
- };
4673
- };
4674
- };
4675
- };
4676
- getUserInfo: {
4677
- parameters: {
4678
- query?: never;
4679
- header?: never;
4680
- path?: never;
4681
- cookie?: never;
4682
- };
4683
- requestBody?: never;
4684
- responses: {
4685
- /** @description Scope-filtered OpenID-style claims */
4686
- 200: {
4687
- headers: {
4688
- [name: string]: unknown;
4689
- };
4690
- content: {
4691
- "application/json": components["schemas"]["UserInfo"];
4692
- };
4693
- };
4694
- /** @description `invalid_token` */
4695
- 401: {
4696
- headers: {
4697
- [name: string]: unknown;
4698
- };
4699
- content: {
4700
- "application/json": {
5815
+ } | {
4701
5816
  /** @constant */
4702
- error: "invalid_token";
5817
+ error: "insufficient_authorization";
5818
+ /** @description The authorization detail type the Grant has to cover for this operation. */
5819
+ required_type?: string;
5820
+ /** @description The action the authorization detail has to name for this operation. */
5821
+ required_action?: string;
4703
5822
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4704
5823
  message?: string;
4705
5824
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
@@ -4707,24 +5826,15 @@ export interface operations {
4707
5826
  };
4708
5827
  };
4709
5828
  };
4710
- /** @description `insufficient_scope`, `invalid_origin` */
4711
- 403: {
5829
+ /** @description `unsupported_version` */
5830
+ 404: {
4712
5831
  headers: {
4713
5832
  [name: string]: unknown;
4714
5833
  };
4715
5834
  content: {
4716
5835
  "application/json": {
4717
5836
  /** @constant */
4718
- error: "insufficient_scope";
4719
- /** @description The scope the operation requires. */
4720
- required_scope: string;
4721
- /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4722
- message?: string;
4723
- /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
4724
- hint?: string;
4725
- } | {
4726
- /** @constant */
4727
- error: "invalid_origin";
5837
+ error: "unsupported_version";
4728
5838
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4729
5839
  message?: string;
4730
5840
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
@@ -4732,15 +5842,25 @@ export interface operations {
4732
5842
  };
4733
5843
  };
4734
5844
  };
4735
- /** @description `unsupported_version` */
4736
- 404: {
5845
+ /** @description `interaction_required` */
5846
+ 409: {
4737
5847
  headers: {
4738
5848
  [name: string]: unknown;
4739
5849
  };
4740
5850
  content: {
4741
5851
  "application/json": {
4742
5852
  /** @constant */
4743
- error: "unsupported_version";
5853
+ error: "interaction_required";
5854
+ /**
5855
+ * @description What the person has to do: type the web AndPass (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another account representative (`bank_representative_replacement_required`).
5856
+ * @enum {string}
5857
+ */
5858
+ code: "bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required";
5859
+ /**
5860
+ * Format: uri
5861
+ * @description Where in Platform the person does what `code` names.
5862
+ */
5863
+ interaction_url?: string;
4744
5864
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4745
5865
  message?: string;
4746
5866
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
@@ -4782,33 +5902,30 @@ export interface operations {
4782
5902
  };
4783
5903
  };
4784
5904
  };
4785
- listAccounts: {
5905
+ listAccountTransactions: {
4786
5906
  parameters: {
4787
5907
  query?: {
4788
- accountKey?: string;
4789
5908
  after?: components["parameters"]["After"];
4790
5909
  first?: components["parameters"]["First"];
4791
- before?: components["parameters"]["Before"];
4792
- last?: components["parameters"]["Last"];
4793
- offset?: components["parameters"]["Offset"];
4794
- limit?: components["parameters"]["Limit"];
4795
5910
  };
4796
5911
  header?: never;
4797
- path?: never;
5912
+ path: {
5913
+ bank_account_id: components["parameters"]["BankAccountId"];
5914
+ };
4798
5915
  cookie?: never;
4799
5916
  };
4800
5917
  requestBody?: never;
4801
5918
  responses: {
4802
- /** @description Active bank accounts granted by bank_accounts:read */
5919
+ /** @description Authorized cursor page of account transactions, newest first */
4803
5920
  200: {
4804
5921
  headers: {
4805
5922
  [name: string]: unknown;
4806
5923
  };
4807
5924
  content: {
4808
- "application/json": components["schemas"]["AccountPage"];
5925
+ "application/json": components["schemas"]["BankTransactionPage"];
4809
5926
  };
4810
5927
  };
4811
- /** @description `invalid_request`, `invalid_accounts_cursor` */
5928
+ /** @description `invalid_request`, `invalid_identifier`, `invalid_cursor` */
4812
5929
  400: {
4813
5930
  headers: {
4814
5931
  [name: string]: unknown;
@@ -4831,7 +5948,16 @@ export interface operations {
4831
5948
  hint?: string;
4832
5949
  } | {
4833
5950
  /** @constant */
4834
- error: "invalid_accounts_cursor";
5951
+ error: "invalid_identifier";
5952
+ /** @description The path parameter that is not well formed. */
5953
+ parameter: string;
5954
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5955
+ message?: string;
5956
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5957
+ hint?: string;
5958
+ } | {
5959
+ /** @constant */
5960
+ error: "invalid_cursor";
4835
5961
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
4836
5962
  message?: string;
4837
5963
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
@@ -4882,13 +6008,20 @@ export interface operations {
4882
6008
  };
4883
6009
  };
4884
6010
  };
4885
- /** @description `unsupported_version` */
6011
+ /** @description `not_found`, `unsupported_version` */
4886
6012
  404: {
4887
6013
  headers: {
4888
6014
  [name: string]: unknown;
4889
6015
  };
4890
6016
  content: {
4891
6017
  "application/json": {
6018
+ /** @constant */
6019
+ error: "not_found";
6020
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
6021
+ message?: string;
6022
+ /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
6023
+ hint?: string;
6024
+ } | {
4892
6025
  /** @constant */
4893
6026
  error: "unsupported_version";
4894
6027
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
@@ -4908,7 +6041,7 @@ export interface operations {
4908
6041
  /** @constant */
4909
6042
  error: "interaction_required";
4910
6043
  /**
4911
- * @description What the person has to do: type the web PIN (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another bank representative (`bank_representative_replacement_required`).
6044
+ * @description What the person has to do: type the web AndPass (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another account representative (`bank_representative_replacement_required`).
4912
6045
  * @enum {string}
4913
6046
  */
4914
6047
  code: "bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required";
@@ -4958,7 +6091,7 @@ export interface operations {
4958
6091
  };
4959
6092
  };
4960
6093
  };
4961
- listAccountTransactions: {
6094
+ listAccountTransfers: {
4962
6095
  parameters: {
4963
6096
  query?: {
4964
6097
  after?: components["parameters"]["After"];
@@ -4966,22 +6099,22 @@ export interface operations {
4966
6099
  };
4967
6100
  header?: never;
4968
6101
  path: {
4969
- bank_account_id: string;
6102
+ bank_account_id: components["parameters"]["BankAccountId"];
4970
6103
  };
4971
6104
  cookie?: never;
4972
6105
  };
4973
6106
  requestBody?: never;
4974
6107
  responses: {
4975
- /** @description Authorized cursor page of account transactions, newest first */
6108
+ /** @description A page of Transfers, newest first */
4976
6109
  200: {
4977
6110
  headers: {
4978
6111
  [name: string]: unknown;
4979
6112
  };
4980
6113
  content: {
4981
- "application/json": components["schemas"]["BankTransactionPage"];
6114
+ "application/json": components["schemas"]["TransferListPage"];
4982
6115
  };
4983
6116
  };
4984
- /** @description `invalid_request`, `invalid_identifier`, `invalid_cursor` */
6117
+ /** @description `invalid_request`, `invalid_cursor` */
4985
6118
  400: {
4986
6119
  headers: {
4987
6120
  [name: string]: unknown;
@@ -5002,15 +6135,6 @@ export interface operations {
5002
6135
  message?: string;
5003
6136
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5004
6137
  hint?: string;
5005
- } | {
5006
- /** @constant */
5007
- error: "invalid_identifier";
5008
- /** @description The path parameter that is not well formed. */
5009
- parameter: string;
5010
- /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5011
- message?: string;
5012
- /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5013
- hint?: string;
5014
6138
  } | {
5015
6139
  /** @constant */
5016
6140
  error: "invalid_cursor";
@@ -5037,7 +6161,7 @@ export interface operations {
5037
6161
  };
5038
6162
  };
5039
6163
  };
5040
- /** @description `invalid_origin`, `insufficient_authorization` */
6164
+ /** @description `invalid_origin` */
5041
6165
  403: {
5042
6166
  headers: {
5043
6167
  [name: string]: unknown;
@@ -5050,17 +6174,6 @@ export interface operations {
5050
6174
  message?: string;
5051
6175
  /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5052
6176
  hint?: string;
5053
- } | {
5054
- /** @constant */
5055
- error: "insufficient_authorization";
5056
- /** @description The authorization detail type the Grant has to cover for this operation. */
5057
- required_type?: string;
5058
- /** @description The action the authorization detail has to name for this operation. */
5059
- required_action?: string;
5060
- /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5061
- message?: string;
5062
- /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5063
- hint?: string;
5064
6177
  };
5065
6178
  };
5066
6179
  };
@@ -5087,32 +6200,6 @@ export interface operations {
5087
6200
  };
5088
6201
  };
5089
6202
  };
5090
- /** @description `interaction_required` */
5091
- 409: {
5092
- headers: {
5093
- [name: string]: unknown;
5094
- };
5095
- content: {
5096
- "application/json": {
5097
- /** @constant */
5098
- error: "interaction_required";
5099
- /**
5100
- * @description What the person has to do: type the web PIN (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another bank representative (`bank_representative_replacement_required`).
5101
- * @enum {string}
5102
- */
5103
- code: "bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required";
5104
- /**
5105
- * Format: uri
5106
- * @description Where in Platform the person does what `code` names.
5107
- */
5108
- interaction_url?: string;
5109
- /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
5110
- message?: string;
5111
- /** @description When present, an English sentence suggesting to the developer what to do about the error. Never branch on it and never show it to a person. */
5112
- hint?: string;
5113
- };
5114
- };
5115
- };
5116
6203
  /** @description `server_error` */
5117
6204
  500: {
5118
6205
  headers: {
@@ -6543,7 +7630,7 @@ export interface operations {
6543
7630
  * @description The one cause, never a generic failure.
6544
7631
  * @enum {string}
6545
7632
  */
6546
- reason: "malformed_assertion" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "unusable_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed";
7633
+ reason: "malformed_assertion" | "missing_signature" | "missing_key_id" | "disallowed_algorithm" | "unknown_key" | "revoked_key" | "expired_key" | "unusable_key" | "unsynced_key" | "invalid_signature" | "expired_assertion" | "premature_assertion" | "missing_expiration" | "expiration_too_soon" | "missing_instruction_id" | "missing_claim" | "wrong_audience" | "wrong_issuer" | "verification_failed";
6547
7634
  /** @description The `kid` the assertion declared, when one could be read from it. */
6548
7635
  key_id: string | null;
6549
7636
  /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */