@andco/protocol 0.0.15 → 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 (61) hide show
  1. package/dist/authorization-preparation.d.ts +1 -1
  2. package/dist/errors.d.ts +1 -1
  3. package/dist/errors.js +1 -1
  4. package/dist/intent-input.d.ts +67 -54
  5. package/dist/intent-input.d.ts.map +1 -1
  6. package/dist/intent-input.js +39 -23
  7. package/dist/intent-status.d.ts +5 -6
  8. package/dist/intent-status.d.ts.map +1 -1
  9. package/dist/intent-status.js +12 -7
  10. package/dist/miniapp-manifest.d.ts +2 -2
  11. package/dist/miniapp-manifest.js +1 -1
  12. package/dist/native-intent.d.ts +12 -12
  13. package/dist/native-intent.d.ts.map +1 -1
  14. package/dist/native-intent.js +7 -4
  15. package/dist/rar/account-matchers.d.ts +10 -10
  16. package/dist/rar/account-matchers.js +2 -2
  17. package/dist/rar/bank.d.ts +284 -12
  18. package/dist/rar/bank.d.ts.map +1 -1
  19. package/dist/rar/bank.js +42 -4
  20. package/dist/rar/catalog.d.ts +130 -5
  21. package/dist/rar/catalog.d.ts.map +1 -1
  22. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  23. package/dist/rar/json-schemas.generated.js +372 -4
  24. package/dist/rar/money.d.ts +1 -1
  25. package/dist/rar/money.js +1 -1
  26. package/dist/rar/subject-data.d.ts +1 -1
  27. package/dist/rar/subject-data.js +1 -1
  28. package/dist/rest/accounts.d.ts +3 -3
  29. package/dist/rest/accounts.js +1 -1
  30. package/dist/rest/catalog.d.ts +3 -3
  31. package/dist/rest/catalog.js +2 -2
  32. package/dist/rest/contract.d.ts +561 -302
  33. package/dist/rest/contract.d.ts.map +1 -1
  34. package/dist/rest/contract.js +6 -2
  35. package/dist/rest/identity.d.ts +22 -22
  36. package/dist/rest/identity.d.ts.map +1 -1
  37. package/dist/rest/identity.js +4 -4
  38. package/dist/rest/intents.d.ts +301 -142
  39. package/dist/rest/intents.d.ts.map +1 -1
  40. package/dist/rest/intents.js +66 -52
  41. package/dist/rest/signatures.d.ts +19 -5
  42. package/dist/rest/signatures.d.ts.map +1 -1
  43. package/dist/rest/signatures.js +47 -5
  44. package/dist/rest/transfers.d.ts +738 -362
  45. package/dist/rest/transfers.d.ts.map +1 -1
  46. package/dist/rest/transfers.js +71 -44
  47. package/dist/signing.d.ts +6 -2
  48. package/dist/signing.d.ts.map +1 -1
  49. package/dist/signing.js +2 -1
  50. package/dist/transfer.d.ts +101 -65
  51. package/dist/transfer.d.ts.map +1 -1
  52. package/dist/transfer.js +69 -43
  53. package/dist/transport/financial-events.d.ts +64 -13
  54. package/dist/transport/financial-events.d.ts.map +1 -1
  55. package/dist/transport/financial-events.js +34 -0
  56. package/dist/transport/generated/oauth-api.d.ts +352 -88
  57. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  58. package/dist/transport/intents.d.ts +6 -6
  59. package/dist/transport/intents.d.ts.map +1 -1
  60. package/dist/transport/rest.d.ts +4 -4
  61. package/package.json +1 -1
@@ -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 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. 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 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 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;
@@ -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 `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 transfer is not an Intent: it is uploaded to `POST /transfers` as a `SignedTransferEnvelope` (ADR 0093), and transfer claims signed here are refused. A signed 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 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;
@@ -191,22 +191,24 @@ export interface paths {
191
191
  cookie?: never;
192
192
  };
193
193
  /**
194
- * List the Transfers uploaded under the same exact OAuth Grant
195
- * @description For now it only finds one Transfer by the `jti` of the Signed Instruction that uploaded it, and `jti` is required (`400 invalid_request` when it is missing or is not a UUID); a listing without it can come later in the same shape. The answer is a collection of zero or one Transfer, with the reach of `GET /transfers/{transfer_id}`: only a Transfer uploaded under the same OAuth Grant and the same client, never another's. For any other `jti`, or one that another Grant or client uploaded, the collection is empty, 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.
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
196
  */
197
197
  get: operations["listTransfers"];
198
198
  put?: never;
199
199
  /**
200
- * Upload a signed transfer
201
- * @description Uploads one Transfer as a Signed Instruction (ADR 0093, ADR 0092): 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, because the same object travels to the core. 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.
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
202
  *
203
- * 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`, `disallowed_algorithm` or `invalid_signature`. The claims must be `SignedTransferClaims` (`invalid_claims` with `issues`) 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 upload `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`). `approved: true` needs `bank_transfer` `approve` within its maximum: `403 insufficient_authorization` otherwise, never a transfer that waits silently.
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.
204
206
  *
205
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`.
206
208
  *
207
- * Where AndCo's core verifies signatures, every key must also be registered in the core, for any signed transfer (`unsynced_key`).
209
+ * A key that AndCo does not accept yet for signed transfers answers `unsynced_key`.
208
210
  *
209
- * 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`): an approved one is released at once with nobody present and answers `processing.confirmed` 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` where AndCo does not verify signatures, and nothing is created; where it does, an approved one is sent to the core at once with nobody present: no web AndPass and no SMS code, because the core verifies the signature itself. The fraud engine still evaluates it. It answers `processing.confirmed` (or `succeeded`) once the core accepts it, `failed.fraud_rejected` when the engine refuses it, `failed.bank_challenge_required` when the engine asks for a challenge (nobody answers it: send the same transfer as an Intent a person confirms), and `failed.<code>` when the core refuses the signature (`unknown_key`, `revoked_key`, `invalid_signature`, `expired_signed_instruction`, `sender_mismatch`) or the request (`bank_refused`). On either rail, a key that signed it and is revoked or expired when the Transfer executes fails it with `failed.revoked_key` or `failed.expired_key`, even if the key was valid at upload, and nothing is sent; so does a key the core no longer holds, with `failed.unknown_key`, for one that leaves its holder. While the core's answer is not known it stays `requires_action`: read it later, 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 fraud 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. An unapproved Transfer waits, `requires_action`, for `POST /intents/{intent_id}/approve` with its `id`, or for a member of an Organization who may approve its transfers, and is sent the same way once approved.
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.
210
212
  */
211
213
  post: operations["createTransfer"];
212
214
  delete?: never;
@@ -224,7 +226,7 @@ export interface paths {
224
226
  };
225
227
  /**
226
228
  * List the banks a transfer can be sent to
227
- * @description The banks of Core's catalog, 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 Core does not know 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.
228
230
  */
229
231
  get: operations["getBankCatalog"];
230
232
  put?: never;
@@ -299,7 +301,10 @@ export interface paths {
299
301
  path?: never;
300
302
  cookie?: never;
301
303
  };
302
- /** Read one Transfer uploaded under the same exact OAuth Grant */
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
+ */
303
308
  get: operations["getTransfer"];
304
309
  put?: never;
305
310
  post?: never;
@@ -366,6 +371,26 @@ export interface paths {
366
371
  patch?: never;
367
372
  trace?: never;
368
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
+ };
369
394
  "/organizations/{organization_id}/identities": {
370
395
  parameters: {
371
396
  query?: never;
@@ -517,7 +542,7 @@ export interface paths {
517
542
  put?: never;
518
543
  /**
519
544
  * Reject an Intent with a Grant holding the family's reject action
520
- * @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.
521
546
  */
522
547
  post: operations["rejectIntent"];
523
548
  delete?: never;
@@ -569,6 +594,10 @@ export interface components {
569
594
  /** @constant */
570
595
  type: "account_closure";
571
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;
572
601
  /** @description Whether a Signed Instruction created this Intent rather than a plain request. */
573
602
  signed: boolean;
574
603
  account: components["schemas"]["IntentAccount"];
@@ -603,7 +632,7 @@ export interface components {
603
632
  expires_in?: never;
604
633
  expires_at: string;
605
634
  };
606
- /** @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. */
607
636
  AccountOpeningIntent: {
608
637
  /** Format: uuid */
609
638
  id: string;
@@ -626,6 +655,10 @@ export interface components {
626
655
  /** @constant */
627
656
  type: "account_opening";
628
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;
629
662
  /** @description Whether a Signed Instruction created this Intent rather than a plain request. */
630
663
  signed: boolean;
631
664
  account: {
@@ -747,11 +780,11 @@ export interface components {
747
780
  type: string | null;
748
781
  /** @description Null while the balance projection does not know the account yet. */
749
782
  currency: string | null;
750
- /** @description The ledger 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 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. */
751
784
  balance: string | null;
752
785
  };
753
786
  BankCatalogEntry: {
754
- /** @description The bank's four-digit code in Core's catalog: the `bank_code` of a Receptor. */
787
+ /** @description The bank's four-digit code: the `bank_code` of a Receptor. */
755
788
  id: string;
756
789
  /** @description The bank's name as the bank lists it. */
757
790
  name: string;
@@ -840,7 +873,7 @@ export interface components {
840
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.
841
874
  * @enum {string}
842
875
  */
843
- 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";
844
877
  attribution_version: number;
845
878
  closure: {
846
879
  /** Format: date-time */
@@ -985,10 +1018,10 @@ export interface components {
985
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. */
986
1019
  GrantHolder: components["schemas"]["ProfileGrantHolder"] | components["schemas"]["OrganizationGrantHolder"];
987
1020
  GrantSubject: components["schemas"]["ProfileGrantSubject"] | components["schemas"]["ApplicationGrantSubject"];
988
- /** @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. */
989
1022
  IdentityValidation: {
990
1023
  /**
991
- * @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.
992
1025
  * @enum {string}
993
1026
  */
994
1027
  validated_by: "andco_core";
@@ -998,23 +1031,23 @@ export interface components {
998
1031
  evidence: ("document" | "liveness" | "face_comparison")[];
999
1032
  /**
1000
1033
  * Format: uuid
1001
- * @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.
1002
1035
  */
1003
1036
  verification_id: string;
1004
1037
  };
1005
1038
  Intent: components["schemas"]["DepositIntent"] | components["schemas"]["TransferIntent"] | components["schemas"]["AccountOpeningIntent"] | components["schemas"]["AccountClosureIntent"];
1006
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. */
1007
1040
  IntentAccount: components["schemas"]["IntentAccountKey"] | components["schemas"]["IntentAccountId"];
1008
- /** @description A Receptor at a Chilean bank, in Core's vocabulary (`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. */
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. */
1009
1042
  IntentAccountExternal: {
1010
1043
  /** @constant */
1011
1044
  type: "external";
1012
1045
  /** @constant */
1013
1046
  country: "CL";
1014
- /** @description The bank's four-digit code in Core's catalog. Andco is `0739`. */
1047
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1015
1048
  bank_code: string;
1016
1049
  /**
1017
- * @description Core's account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1050
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1018
1051
  * @enum {string}
1019
1052
  */
1020
1053
  account_type: "10" | "20" | "40";
@@ -1051,7 +1084,7 @@ export interface components {
1051
1084
  editable?: boolean;
1052
1085
  };
1053
1086
  IntentCancellation: {
1054
- reason: string;
1087
+ reason?: string;
1055
1088
  };
1056
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. */
1057
1090
  IntentNote: {
@@ -1064,17 +1097,17 @@ export interface components {
1064
1097
  editable?: boolean;
1065
1098
  };
1066
1099
  IntentRejection: {
1067
- reason: string;
1100
+ reason?: string;
1068
1101
  };
1069
1102
  /**
1070
- * @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.
1071
1104
  *
1072
- * 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 AndPass or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when AndCo 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 AndCo 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 AndCo 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). A signed Transfer that leaves its holder (`POST /transfers`, ADR 0092) is never confirmed by a person: it also fails with `failed.bank_challenge_required` (the bank's fraud engine asked for a challenge nobody answers for a signature; send the same transfer as an Intent a person confirms) or with the core's refusal of its signature, in the words the upload uses: `failed.unknown_key` (the core holds no such key), `failed.revoked_key`, `failed.invalid_signature`, `failed.expired_signed_instruction` (its `exp` passed before the core executed it) and `failed.sender_mismatch`. A signed Transfer on either rail also fails, before anything is sent, when a key that signed it is no longer usable as it executes, even if it was at upload: `failed.revoked_key`, `failed.expired_key`, or `failed.unknown_key` (no Project of the holder has it any more, or, for one that leaves its holder, the core no longer holds it). In `failed.fraud_rejected`, `failed.bank_refused`, `failed.own_account_transfer_not_implemented`, `failed.bank_challenge_required`, `failed.expired_key` and the core's refusals of a signature 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`.
1073
1106
  *
1074
- * `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.
1075
1108
  * @enum {string}
1076
1109
  */
1077
- 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_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "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";
1078
1111
  Organization: {
1079
1112
  id: string;
1080
1113
  name: string;
@@ -1311,7 +1344,7 @@ export interface components {
1311
1344
  [key: string]: unknown;
1312
1345
  };
1313
1346
  };
1314
- /** @description The claims of a signed transfer (`typ` `transfer.v1+jwt`): Core's `POST /api/transfer` body (with its 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`. */
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`. */
1315
1348
  SignedTransferClaims: {
1316
1349
  /** @description The signing Project's `client_id`. */
1317
1350
  iss: string;
@@ -1319,12 +1352,12 @@ export interface components {
1319
1352
  aud: "https://api.andco.com";
1320
1353
  /**
1321
1354
  * Format: uuid
1322
- * @description Names the Transfer: Core's `Idempotency-Key`. The same `jti` with other content is a conflict.
1355
+ * @description A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.
1323
1356
  */
1324
1357
  jti: string;
1325
- /** @description Unix seconds after which the core refuses to execute the transfer. */
1358
+ /** @description Unix seconds after which the transfer is refused. */
1326
1359
  exp: number;
1327
- /** @description `true` orders the transfer sent to the core as soon as it is uploaded, which needs `bank_transfer` `approve` in the Grant. */
1360
+ /** @description `true` orders the transfer sent as soon as it is submitted, which needs `bank_transfer` `approve` in the Grant. */
1328
1361
  approved: boolean;
1329
1362
  sender: components["schemas"]["TransferSender"];
1330
1363
  receiver: components["schemas"]["TransferReceiver"];
@@ -1339,7 +1372,7 @@ export interface components {
1339
1372
  SignedTransferEnvelope: {
1340
1373
  /** @description The base64url of the JSON claims (`SignedTransferClaims`). */
1341
1374
  payload: string;
1342
- /** @description At least one signature over the same payload; the core verifies every one. */
1375
+ /** @description At least one signature over the same payload; every one is verified. */
1343
1376
  signatures: {
1344
1377
  /** @description The base64url of the JSON protected header (`SignedTransferHeader`). */
1345
1378
  protected: string;
@@ -1364,7 +1397,7 @@ export interface components {
1364
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. */
1365
1398
  confirmed: number | null;
1366
1399
  };
1367
- /** @description A Transfer uploaded as a Signed Instruction (ADR 0093), in Core's vocabulary: `sender`, `receiver` (with the amount, an integer in the minor unit of the currency) and `comment` exactly as signed. `status` is where it stands; `core_status` the core's own word, for the record. */
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. */
1368
1401
  Transfer: {
1369
1402
  /** @constant */
1370
1403
  object: "transfer";
@@ -1373,36 +1406,81 @@ export interface components {
1373
1406
  * @description The Transfer's own id: what `GET /transfers/{transfer_id}` reads.
1374
1407
  */
1375
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;
1376
1412
  /**
1377
- * Format: uuid
1378
- * @description The `jti` of the Signed Instruction that uploaded it. Sending the same instruction again answers this same Transfer.
1379
- */
1380
- jti: string;
1381
- /**
1382
- * @description Where the Transfer stands, in the words an Intent uses (`IntentStatus`): decide on the base, never on the whole value. A signed transfer that is not approved is `requires_action` until a Grant with `bank_transfer` `approve` or a person approves it. A transfer between two accounts of the same holder is `processing.confirmed` from its release until AndCo answers for good, then `succeeded` or `failed.<code>`.
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.
1383
1414
  * @enum {string}
1384
1415
  */
1385
- status: "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_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "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";
1386
- /** @description The core bancario's own word for its transfer (`requested`, `confirmed`, `rejected_insufficient_funds`, …), for the record. Null while AndCo has not read one. Never branch on it: a word the core adds later appears here as it is, and `status` is what to decide on. */
1387
- core_status: string | null;
1388
- /** @description The signed `approved`: whether the instruction ordered the transfer sent as soon as it was uploaded. */
1389
- approved: boolean;
1390
- sender: components["schemas"]["TransferSender"];
1391
- receiver: components["schemas"]["TransferReceiver"];
1392
- /** @description The signed comment, when there is one. */
1393
- comment?: string;
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;
1419
+ /** @constant */
1420
+ currency: "CLP";
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;
1394
1469
  /**
1395
1470
  * Format: date-time
1396
- * @description When the Transfer was uploaded.
1471
+ * @description When the Transfer came to exist.
1397
1472
  */
1398
1473
  created_at: string;
1399
- /**
1400
- * Format: date-time
1401
- * @description The Transfer's deadline: the signature's `exp`. A transfer still waiting for its approval at this instant expires.
1402
- */
1403
- expires_at: string;
1404
1474
  };
1405
- /** @description A connection of Transfers uploaded under the same exact OAuth Grant. `GET /transfers?jti=` answers zero edges or one, and an edge's `cursor` is null: AndCo names no position inside it. A listing without `jti` can arrive later in this same shape, so read `edges` and never assume one. */
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. */
1406
1484
  TransferPage: {
1407
1485
  edges: {
1408
1486
  cursor: string | null;
@@ -1410,11 +1488,36 @@ export interface components {
1410
1488
  }[];
1411
1489
  pageInfo: components["schemas"]["PageInfo"];
1412
1490
  };
1413
- /** @description The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647 (int4, as Core stores it). `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`. */
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;
1497
+ /**
1498
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1499
+ * @enum {string}
1500
+ */
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`. */
1414
1517
  TransferAmountProposal: {
1415
1518
  /** @constant */
1416
1519
  currency: "CLP";
1417
- /** @description An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`. */
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`. */
1418
1521
  value: number;
1419
1522
  /**
1420
1523
  * @description Defaults to false when omitted.
@@ -1422,7 +1525,7 @@ export interface components {
1422
1525
  */
1423
1526
  editable?: boolean;
1424
1527
  };
1425
- /** @description The comment a transfer asks for, as Core's `comment`: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation. */
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. */
1426
1529
  TransferCommentProposal: {
1427
1530
  /** @description Trimmed comment. An empty one is allowed. */
1428
1531
  value: string;
@@ -1432,7 +1535,7 @@ export interface components {
1432
1535
  */
1433
1536
  editable?: boolean;
1434
1537
  };
1435
- /** @description Authoritative Project-facing state of a transfer, in Core's vocabulary (ADR 0093). `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, `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. */
1436
1539
  TransferIntent: {
1437
1540
  /** Format: uuid */
1438
1541
  id: string;
@@ -1454,6 +1557,8 @@ export interface components {
1454
1557
  /** @constant */
1455
1558
  type: "transfer";
1456
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;
1457
1562
  /** @description Whether a Signed Instruction created this Intent rather than a plain request. */
1458
1563
  signed: boolean;
1459
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. */
@@ -1470,12 +1575,12 @@ export interface components {
1470
1575
  amount: "0";
1471
1576
  };
1472
1577
  /**
1473
- * @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 AndCo asks the person to authorize it at `authorization_url` with their web AndPass and an SMS code; the Intent becomes `processing.confirmed` only when AndCo accepts it. A transfer created with `receiver: 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.
1474
1579
  * @enum {string}
1475
1580
  */
1476
- interaction_reason?: "bank_verification_required" | "source_account_required";
1581
+ interaction_reason?: "source_account_required";
1477
1582
  };
1478
- /** @description The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in Core's vocabulary (ADR 0093): `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 Core's vocabulary (`IntentAccountExternal`). A signed transfer is not an Intent: it is uploaded to `POST /transfers` as a `SignedTransferEnvelope`. */
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`. */
1479
1584
  TransferIntentCreate: {
1480
1585
  /** @default {} */
1481
1586
  metadata?: {
@@ -1519,7 +1624,7 @@ export interface components {
1519
1624
  expires_in?: never;
1520
1625
  expires_at: string | null;
1521
1626
  };
1522
- /** @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 Core's vocabulary. */
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. */
1523
1628
  TransferIntentReceiver: components["schemas"]["IntentAccountKey"] | components["schemas"]["IntentAccountId"] | components["schemas"]["IntentAccountExternal"];
1524
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. */
1525
1630
  TransferIntentReceiverProposal: {
@@ -1546,10 +1651,10 @@ export interface components {
1546
1651
  type: "external";
1547
1652
  /** @constant */
1548
1653
  country: "CL";
1549
- /** @description The bank's four-digit code in Core's catalog. Andco is `0739`. */
1654
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1550
1655
  bank_code: string;
1551
1656
  /**
1552
- * @description Core's account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1657
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1553
1658
  * @enum {string}
1554
1659
  */
1555
1660
  account_type: "10" | "20" | "40";
@@ -1566,60 +1671,60 @@ export interface components {
1566
1671
  */
1567
1672
  editable?: false;
1568
1673
  };
1569
- /** @description The Receptor, as Core's `receiver`: 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. */
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. */
1570
1675
  TransferReceiver: {
1571
1676
  /** @constant */
1572
1677
  country: "CL";
1573
- /** @description The bank's four-digit code in Core's catalog. Andco is `0739`. */
1678
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1574
1679
  bank_code: string;
1575
1680
  /**
1576
- * @description Core's account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1681
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1577
1682
  * @enum {string}
1578
1683
  */
1579
1684
  account_type: "10" | "20" | "40";
1580
1685
  /** @description The account number, as its bank writes it. */
1581
1686
  account_number: string;
1582
- /** @description The holder's name. Core stores it as it arrives and never compares it. */
1687
+ /** @description The holder's name, kept as it arrives and never compared. */
1583
1688
  name: string;
1584
1689
  /** @constant */
1585
1690
  national_kind_id: "RUT";
1586
- /** @description The holder's RUT. Core compares it as a normalized RUT. */
1691
+ /** @description The holder's RUT, compared as a normalized RUT. */
1587
1692
  national_id: string;
1588
- /** @description An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`. */
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`. */
1589
1694
  amount: number;
1590
1695
  /** @constant */
1591
1696
  currency: "CLP";
1592
1697
  /**
1593
1698
  * Format: email
1594
- * @description Where Core notifies the Receptor.
1699
+ * @description Where the Receptor is notified.
1595
1700
  */
1596
1701
  email?: string;
1597
1702
  };
1598
- /** @description The Remitente, as Core's `sender`: the account the money leaves and its holder. `country` and `national_kind_id` are always declared. Core checks the country, the bank (`0739`), the account's own type and the holder's RUT; it stores `name` as it arrives. */
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. */
1599
1704
  TransferSender: {
1600
1705
  /** @constant */
1601
1706
  country: "CL";
1602
- /** @description The bank's four-digit code in Core's catalog. Andco is `0739`. */
1707
+ /** @description The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`. */
1603
1708
  bank_code: string;
1604
1709
  /**
1605
- * @description Core's account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1710
+ * @description The account type code: `"10"` savings, `"20"` checking, `"40"` debit (cuenta vista).
1606
1711
  * @enum {string}
1607
1712
  */
1608
1713
  account_type: "10" | "20" | "40";
1609
1714
  /** @description The account number, as its bank writes it. */
1610
1715
  account_number: string;
1611
- /** @description The holder's name. Core stores it as it arrives and never compares it. */
1716
+ /** @description The holder's name, kept as it arrives and never compared. */
1612
1717
  name: string;
1613
1718
  /** @constant */
1614
1719
  national_kind_id: "RUT";
1615
- /** @description The holder's RUT. Core compares it as a normalized RUT. */
1720
+ /** @description The holder's RUT, compared as a normalized RUT. */
1616
1721
  national_id: string;
1617
1722
  };
1618
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. */
1619
1724
  TransferSettlement: {
1620
1725
  /** @constant */
1621
1726
  currency: "CLP";
1622
- /** @description An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`. */
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`. */
1623
1728
  value: number;
1624
1729
  /** Format: date-time */
1625
1730
  at: string;
@@ -1637,6 +1742,7 @@ export interface components {
1637
1742
  ProfileId: string;
1638
1743
  AddressId: string;
1639
1744
  IntentId: string;
1745
+ BankAccountId: string;
1640
1746
  };
1641
1747
  requestBodies: never;
1642
1748
  headers: never;
@@ -3844,6 +3950,7 @@ export interface operations {
3844
3950
  content: {
3845
3951
  "application/json": components["schemas"]["DepositIntentCreate"] | components["schemas"]["TransferIntentCreate"] | components["schemas"]["AccountOpeningIntentCreate"] | components["schemas"]["AccountClosureIntentCreate"];
3846
3952
  "application/jwt": string;
3953
+ "application/jose+json": components["schemas"]["SignedTransferEnvelope"];
3847
3954
  };
3848
3955
  };
3849
3956
  responses: {
@@ -3856,7 +3963,7 @@ export interface operations {
3856
3963
  "application/json": components["schemas"]["Intent"];
3857
3964
  };
3858
3965
  };
3859
- /** @description `invalid_request`, `idempotency_key_not_allowed`, `invalid_signed_instruction` */
3966
+ /** @description `invalid_request`, `idempotency_key_not_allowed`, `approved_use_transfers`, `invalid_signed_instruction` */
3860
3967
  400: {
3861
3968
  headers: {
3862
3969
  [name: string]: unknown;
@@ -3884,6 +3991,13 @@ export interface operations {
3884
3991
  message?: string;
3885
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. */
3886
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;
3887
4001
  } | {
3888
4002
  /** @constant */
3889
4003
  error: "invalid_signed_instruction";
@@ -4392,7 +4506,7 @@ export interface operations {
4392
4506
  };
4393
4507
  requestBody?: never;
4394
4508
  responses: {
4395
- /** @description The Transfers found: zero or one, as the Project that uploaded them reads them */
4509
+ /** @description The Transfers found: zero or one */
4396
4510
  200: {
4397
4511
  headers: {
4398
4512
  [name: string]: unknown;
@@ -4520,7 +4634,7 @@ export interface operations {
4520
4634
  };
4521
4635
  };
4522
4636
  responses: {
4523
- /** @description The Transfer uploaded, or the same one from a repeated instruction */
4637
+ /** @description The Transfer submitted, or the same one from a repeated instruction */
4524
4638
  201: {
4525
4639
  headers: {
4526
4640
  [name: string]: unknown;
@@ -4529,7 +4643,7 @@ export interface operations {
4529
4643
  "application/json": components["schemas"]["Transfer"];
4530
4644
  };
4531
4645
  };
4532
- /** @description `invalid_request`, `idempotency_key_not_allowed`, `invalid_signed_instruction` */
4646
+ /** @description `invalid_request`, `idempotency_key_not_allowed`, `approval_required_use_intents`, `invalid_signed_instruction` */
4533
4647
  400: {
4534
4648
  headers: {
4535
4649
  [name: string]: unknown;
@@ -4557,6 +4671,13 @@ export interface operations {
4557
4671
  message?: string;
4558
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. */
4559
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;
4560
4681
  } | {
4561
4682
  /** @constant */
4562
4683
  error: "invalid_signed_instruction";
@@ -5380,7 +5501,7 @@ export interface operations {
5380
5501
  };
5381
5502
  requestBody?: never;
5382
5503
  responses: {
5383
- /** @description The Transfer, as the Project that uploaded it reads it */
5504
+ /** @description The Transfer */
5384
5505
  200: {
5385
5506
  headers: {
5386
5507
  [name: string]: unknown;
@@ -5789,7 +5910,7 @@ export interface operations {
5789
5910
  };
5790
5911
  header?: never;
5791
5912
  path: {
5792
- bank_account_id: string;
5913
+ bank_account_id: components["parameters"]["BankAccountId"];
5793
5914
  };
5794
5915
  cookie?: never;
5795
5916
  };
@@ -5970,6 +6091,149 @@ export interface operations {
5970
6091
  };
5971
6092
  };
5972
6093
  };
6094
+ listAccountTransfers: {
6095
+ parameters: {
6096
+ query?: {
6097
+ after?: components["parameters"]["After"];
6098
+ first?: components["parameters"]["First"];
6099
+ };
6100
+ header?: never;
6101
+ path: {
6102
+ bank_account_id: components["parameters"]["BankAccountId"];
6103
+ };
6104
+ cookie?: never;
6105
+ };
6106
+ requestBody?: never;
6107
+ responses: {
6108
+ /** @description A page of Transfers, newest first */
6109
+ 200: {
6110
+ headers: {
6111
+ [name: string]: unknown;
6112
+ };
6113
+ content: {
6114
+ "application/json": components["schemas"]["TransferListPage"];
6115
+ };
6116
+ };
6117
+ /** @description `invalid_request`, `invalid_cursor` */
6118
+ 400: {
6119
+ headers: {
6120
+ [name: string]: unknown;
6121
+ };
6122
+ content: {
6123
+ "application/json": {
6124
+ /** @constant */
6125
+ error: "invalid_request";
6126
+ issues: {
6127
+ /** @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. */
6128
+ type: string;
6129
+ /** @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. */
6130
+ path: string[];
6131
+ /** @description What the check required, when it has a value: the maximum of `max_length`, for instance. */
6132
+ requirement?: unknown;
6133
+ }[];
6134
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
6135
+ message?: string;
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. */
6137
+ hint?: string;
6138
+ } | {
6139
+ /** @constant */
6140
+ error: "invalid_cursor";
6141
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
6142
+ message?: string;
6143
+ /** @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. */
6144
+ hint?: string;
6145
+ };
6146
+ };
6147
+ };
6148
+ /** @description `invalid_token` */
6149
+ 401: {
6150
+ headers: {
6151
+ [name: string]: unknown;
6152
+ };
6153
+ content: {
6154
+ "application/json": {
6155
+ /** @constant */
6156
+ error: "invalid_token";
6157
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
6158
+ message?: string;
6159
+ /** @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. */
6160
+ hint?: string;
6161
+ };
6162
+ };
6163
+ };
6164
+ /** @description `invalid_origin` */
6165
+ 403: {
6166
+ headers: {
6167
+ [name: string]: unknown;
6168
+ };
6169
+ content: {
6170
+ "application/json": {
6171
+ /** @constant */
6172
+ error: "invalid_origin";
6173
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
6174
+ message?: string;
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. */
6176
+ hint?: string;
6177
+ };
6178
+ };
6179
+ };
6180
+ /** @description `not_found`, `unsupported_version` */
6181
+ 404: {
6182
+ headers: {
6183
+ [name: string]: unknown;
6184
+ };
6185
+ content: {
6186
+ "application/json": {
6187
+ /** @constant */
6188
+ error: "not_found";
6189
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
6190
+ message?: string;
6191
+ /** @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. */
6192
+ hint?: string;
6193
+ } | {
6194
+ /** @constant */
6195
+ error: "unsupported_version";
6196
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
6197
+ message?: string;
6198
+ /** @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. */
6199
+ hint?: string;
6200
+ };
6201
+ };
6202
+ };
6203
+ /** @description `server_error` */
6204
+ 500: {
6205
+ headers: {
6206
+ [name: string]: unknown;
6207
+ };
6208
+ content: {
6209
+ "application/json": {
6210
+ /** @constant */
6211
+ error: "server_error";
6212
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
6213
+ message?: string;
6214
+ /** @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. */
6215
+ hint?: string;
6216
+ };
6217
+ };
6218
+ };
6219
+ /** @description `temporarily_unavailable` */
6220
+ 503: {
6221
+ headers: {
6222
+ [name: string]: unknown;
6223
+ };
6224
+ content: {
6225
+ "application/json": {
6226
+ /** @constant */
6227
+ error: "temporarily_unavailable";
6228
+ /** @description An English sentence for the developer reading a log. Never branch on it and never show it to a person. */
6229
+ message?: string;
6230
+ /** @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. */
6231
+ hint?: string;
6232
+ };
6233
+ };
6234
+ };
6235
+ };
6236
+ };
5973
6237
  listOrganizationIdentities: {
5974
6238
  parameters: {
5975
6239
  query?: {