@andco/protocol 0.0.14 → 0.1.0-ti.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/README.md +2 -2
  2. package/dist/api-errors.d.ts +9 -9
  3. package/dist/api-errors.js +9 -9
  4. package/dist/authorization-preparation.d.ts +1 -1
  5. package/dist/authorization-preparation.js +2 -2
  6. package/dist/authorization.d.ts +1 -1
  7. package/dist/authorization.js +1 -1
  8. package/dist/consent.d.ts +2 -2
  9. package/dist/consent.js +2 -2
  10. package/dist/errors.d.ts +10 -10
  11. package/dist/errors.js +10 -10
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/intent-input.d.ts +452 -880
  16. package/dist/intent-input.d.ts.map +1 -1
  17. package/dist/intent-input.js +164 -127
  18. package/dist/intent-status.d.ts +5 -6
  19. package/dist/intent-status.d.ts.map +1 -1
  20. package/dist/intent-status.js +12 -7
  21. package/dist/miniapp-manifest.d.ts +3 -3
  22. package/dist/miniapp-manifest.js +1 -1
  23. package/dist/native-intent.d.ts +82 -68
  24. package/dist/native-intent.d.ts.map +1 -1
  25. package/dist/native-intent.js +137 -84
  26. package/dist/native.d.ts +1 -1
  27. package/dist/rar/account-matchers.d.ts +35 -30
  28. package/dist/rar/account-matchers.d.ts.map +1 -1
  29. package/dist/rar/account-matchers.js +27 -21
  30. package/dist/rar/bank.d.ts +357 -85
  31. package/dist/rar/bank.d.ts.map +1 -1
  32. package/dist/rar/bank.js +43 -5
  33. package/dist/rar/catalog.d.ts +174 -49
  34. package/dist/rar/catalog.d.ts.map +1 -1
  35. package/dist/rar/catalog.js +6 -6
  36. package/dist/rar/detail.d.ts +1 -1
  37. package/dist/rar/detail.js +1 -1
  38. package/dist/rar/json-schemas.generated.d.ts +1 -1
  39. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  40. package/dist/rar/json-schemas.generated.js +393 -21
  41. package/dist/rar/money.d.ts +1 -1
  42. package/dist/rar/money.js +1 -1
  43. package/dist/rar/subject-data.d.ts +1 -1
  44. package/dist/rar/subject-data.js +1 -1
  45. package/dist/rar/subject.d.ts +1 -1
  46. package/dist/rar/subject.js +1 -1
  47. package/dist/rest/accounts.d.ts +28 -28
  48. package/dist/rest/accounts.d.ts.map +1 -1
  49. package/dist/rest/accounts.js +22 -22
  50. package/dist/rest/api-error.d.ts +1 -1
  51. package/dist/rest/api-error.js +1 -1
  52. package/dist/rest/catalog.d.ts +3 -3
  53. package/dist/rest/catalog.js +2 -2
  54. package/dist/rest/common.d.ts +3 -3
  55. package/dist/rest/common.js +3 -3
  56. package/dist/rest/contract.d.ts +1183 -547
  57. package/dist/rest/contract.d.ts.map +1 -1
  58. package/dist/rest/contract.js +21 -5
  59. package/dist/rest/events.d.ts +1 -1
  60. package/dist/rest/events.d.ts.map +1 -1
  61. package/dist/rest/events.js +2 -2
  62. package/dist/rest/identity.d.ts +22 -22
  63. package/dist/rest/identity.d.ts.map +1 -1
  64. package/dist/rest/identity.js +5 -5
  65. package/dist/rest/index.d.ts +1 -0
  66. package/dist/rest/index.d.ts.map +1 -1
  67. package/dist/rest/index.js +1 -0
  68. package/dist/rest/intents.d.ts +973 -743
  69. package/dist/rest/intents.d.ts.map +1 -1
  70. package/dist/rest/intents.js +112 -89
  71. package/dist/rest/signatures.d.ts +25 -5
  72. package/dist/rest/signatures.d.ts.map +1 -1
  73. package/dist/rest/signatures.js +52 -0
  74. package/dist/rest/transfers.d.ts +988 -0
  75. package/dist/rest/transfers.d.ts.map +1 -0
  76. package/dist/rest/transfers.js +142 -0
  77. package/dist/scopes.d.ts +1 -1
  78. package/dist/signing.d.ts +17 -3
  79. package/dist/signing.d.ts.map +1 -1
  80. package/dist/signing.js +8 -1
  81. package/dist/transfer.d.ts +399 -0
  82. package/dist/transfer.d.ts.map +1 -0
  83. package/dist/transfer.js +313 -0
  84. package/dist/transport/financial-events.d.ts +82 -27
  85. package/dist/transport/financial-events.d.ts.map +1 -1
  86. package/dist/transport/financial-events.js +34 -0
  87. package/dist/transport/generated/oauth-api.d.ts +1420 -333
  88. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  89. package/dist/transport/intents.d.ts +29 -13
  90. package/dist/transport/intents.d.ts.map +1 -1
  91. package/dist/transport/intents.js +1 -1
  92. package/dist/transport/rest.d.ts +5 -5
  93. package/dist/urls.d.ts +2 -2
  94. package/dist/urls.js +3 -3
  95. package/dist/userinfo.d.ts +2 -2
  96. package/dist/userinfo.js +2 -2
  97. package/dist/webhooks.d.ts +16 -16
  98. package/dist/webhooks.js +14 -14
  99. package/dist/window-features.d.ts +2 -2
  100. package/dist/window-features.js +2 -2
  101. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"intents.d.ts","sourceRoot":"","sources":["../../src/rest/intents.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAY7B,OAAO,EAEL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EAER,eAAe,EACf,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EACnB,MAAM,aAAa,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBrB;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,eAAe,CAAC,6BAS7D;gBACa,OAAO,CAAC,EAAE,MAAM;CAG7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;;GAIG;AACH,qBAAa,wBAAyB,SAAQ,eAAe,CAAC,6BAqB7D;gBACa,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,EAAE,MAAM;CAGrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;GAGG;AACH,qBAAa,wBAAyB,SAAQ,eAAe,CAAC,6BAI7D;gBACa,OAAO,CAAC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4cA6BR,CAAC;AAElB,sDAAsD;AACtD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0aA4BR,CAAC;AAElB,0EAA0E;AAC1E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8PAuBA,CAAC"}
@@ -1,13 +1,14 @@
1
1
  import { oc } from "@orpc/contract";
2
2
  import * as v from "valibot";
3
- import { IntentAccountSchema, IntentCancellationSchema, IntentCreateSchema, IntentNoteSchema, IntentRejectionSchema, TransferDestinationProposalSchema, } from "../intent-input.js";
3
+ import { IntentAccountSchema, IntentCancellationSchema, IntentCreateSchema, IntentNoteSchema, IntentRejectionSchema, TransferCommentProposalSchema, TransferIntentReceiverProposalSchema, } from "../intent-input.js";
4
4
  import { AccountKeySchema } from "../rar/account-matchers.js";
5
5
  import { MoneySchema } from "../rar/money.js";
6
+ import { PesosSchema, SignedTransferEnvelopeSchema } from "../transfer.js";
6
7
  import { AndcoAPIError, errors } from "./api-error.js";
7
8
  import { ApiIssue, InsufficientAuthorization, InvalidIdentifier, InvalidOrigin, InvalidRequest, InvalidToken, NotFound, PageQuery, PayloadTooLarge, ServerError, TemporarilyUnavailable, UnsupportedMediaType, UnsupportedVersion, } from "./common.js";
8
9
  import { FinancialEventPage } from "./events.js";
9
10
  import { http } from "./http.js";
10
- import { SignedInstructionRejectionReason, servedAsSignedInstruction, signedInstructionBody } from "./signatures.js";
11
+ import { SignedInstructionRejectionReason, servedAsSignedInstructionOrTransfer, signedInstructionBody, } from "./signatures.js";
11
12
  const uuid = /* @__PURE__ */ v.pipe(v.string(), v.uuid());
12
13
  const dateTime = /* @__PURE__ */ v.pipe(v.string(), v.isoTimestamp());
13
14
  const url = /* @__PURE__ */ v.pipe(v.string(), v.url());
@@ -25,6 +26,26 @@ export class IdempotencyKeyNotAllowed extends /* @__PURE__ */ AndcoAPIError.defi
25
26
  super({}, message);
26
27
  }
27
28
  }
29
+ /**
30
+ * A signed transfer with `approved: false` arrived at `POST /transfers`. That door takes a transfer
31
+ * its own signature approved. A signed transfer that waits for a decision is an Intent: send it to
32
+ * `POST /intents`. Nothing was recorded.
33
+ */
34
+ export class ApprovalRequiredUseIntents extends /* @__PURE__ */ AndcoAPIError.define("approval_required_use_intents", 400, v.pipe(v.object({}), v.description("`POST /transfers` takes only a signed transfer with `approved: true`. Send one with `approved: false` to `POST /intents`."))) {
35
+ constructor(message) {
36
+ super({}, message);
37
+ }
38
+ }
39
+ /**
40
+ * A signed transfer with `approved: true` arrived at `POST /intents`. Its signature is the approval,
41
+ * so no decision is left to wait for: send it to `POST /transfers`. A signed account opening or
42
+ * closure with `approved: true` stays accepted here. Nothing was recorded.
43
+ */
44
+ export class ApprovedUseTransfers extends /* @__PURE__ */ AndcoAPIError.define("approved_use_transfers", 400, v.pipe(v.object({}), v.description("`POST /intents` takes a signed transfer only with `approved: false`. Send one with `approved: true` to `POST /transfers`."))) {
45
+ constructor(message) {
46
+ super({}, message);
47
+ }
48
+ }
28
49
  /**
29
50
  * The Signed Instruction sent to create an Intent was refused: it did not verify (`reason` names the
30
51
  * one cause), or its verified claims are not an Intent (`invalid_claims`, with `issues`). An expired
@@ -34,8 +55,8 @@ export class InvalidSignedInstruction extends /* @__PURE__ */ AndcoAPIError.defi
34
55
  reason: v.pipe(v.picklist([
35
56
  ...SignedInstructionRejectionReason.options.filter((reason) => reason !== "expired_assertion"),
36
57
  "invalid_claims",
37
- ]), v.description("The one cause: what did not verify, or `invalid_claims` when the verified claims are not an Intent.")),
38
- issues: v.pipe(v.optional(v.array(ApiIssue)), v.description("On `invalid_claims`, what failed in the claims, as `invalid_request` names it.")),
58
+ ]), v.description("The one cause: what did not verify, or `invalid_claims` when the verified claims are not what the operation takes (an Intent on `POST /intents`, a transfer on `POST /transfers`).")),
59
+ issues: v.pipe(v.optional(v.array(ApiIssue)), v.description("On `invalid_claims`, what failed in the claims; on `malformed_assertion` of a signed transfer, what failed in its envelope. As `invalid_request` names it.")),
39
60
  }), v.description("The Signed Instruction did not verify, or its verified claims are not an Intent."))) {
40
61
  constructor(data, message) {
41
62
  super(data, message);
@@ -67,15 +88,14 @@ export class IdempotencyConflict extends /* @__PURE__ */ AndcoAPIError.define("i
67
88
  }
68
89
  }
69
90
  /**
70
- * Only a person can let this Intent go on. `reason` says why: `bank_verification_required` (the bank
71
- * asks them to confirm the transfer with their web PIN and an SMS code) and `source_account_required`
91
+ * Only a person can let this Intent go on. `reason` says why: `bank_verification_required` (AndCo * asks them to confirm the transfer with their web AndPass and an SMS code) and `source_account_required`
72
92
  * (they still pick the source account) come with `authorization_url`, where they do it; on the release
73
93
  * of an Intent that moves with nobody present, `bank_connection_pin_required`,
74
94
  * `bank_connection_reconnect_required` and `bank_representative_replacement_required` come with
75
95
  * `interaction_url`. Nothing was approved, frozen or moved, and the same request succeeds once the
76
96
  * person has acted.
77
97
  *
78
- * The same code on a read of the bank is {@link BankConnectionInteractionRequired}, with `code`.
98
+ * The same code on a read of AndCo is {@link BankConnectionInteractionRequired}, with `code`.
79
99
  */
80
100
  export class IntentInteractionRequired extends /* @__PURE__ */ AndcoAPIError.define("interaction_required", 409, v.pipe(v.object({
81
101
  intent_id: refusedIntent,
@@ -87,7 +107,7 @@ export class IntentInteractionRequired extends /* @__PURE__ */ AndcoAPIError.def
87
107
  "bank_representative_replacement_required",
88
108
  ])), v.description("Why only a person can go on.")),
89
109
  authorization_url: v.pipe(v.optional(url), v.description("Where the person completes the Intent, for `bank_verification_required` and `source_account_required`.")),
90
- interaction_url: v.pipe(v.optional(url), v.description("Where in Platform the person brings their bank connection back, for the `bank_*` reasons.")),
110
+ interaction_url: v.pipe(v.optional(url), v.description("Where in Platform the person brings their AndCo account connection back, for the `bank_*` reasons.")),
91
111
  }), v.description("Only a person can let this Intent go on; nothing was approved, frozen or moved."))) {
92
112
  constructor(data, message) {
93
113
  super(data, message);
@@ -117,20 +137,20 @@ export class AccountKeyTaken extends /* @__PURE__ */ AndcoAPIError.define("accou
117
137
  super(data, message, hint);
118
138
  }
119
139
  }
120
- /** The Organization already holds as many bank accounts as its contract allows. */
140
+ /** The Organization already holds as many digital accounts as its contract allows. */
121
141
  export class BankAccountQuotaExceeded extends /* @__PURE__ */ AndcoAPIError.define("bank_account_quota_exceeded", 409, v.pipe(v.object({
122
142
  intent_id: refusedIntent,
123
- used: v.pipe(v.optional(v.pipe(v.number(), v.integer(), v.minValue(0))), v.description("How many bank accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal.")),
124
- quota: v.pipe(v.optional(v.pipe(v.number(), v.integer(), v.minValue(0))), v.description("How many bank accounts the Organization may hold. Absent when it could not be read after the refusal.")),
125
- }), v.description("The Organization holds every bank account its quota allows; nothing was opened."))) {
143
+ used: v.pipe(v.optional(v.pipe(v.number(), v.integer(), v.minValue(0))), v.description("How many digital accounts the Organization holds, closed ones included. Absent when they could not be read after the refusal.")),
144
+ quota: v.pipe(v.optional(v.pipe(v.number(), v.integer(), v.minValue(0))), v.description("How many digital accounts the Organization may hold. Absent when it could not be read after the refusal.")),
145
+ }), v.description("The Organization holds every digital account its quota allows; nothing was opened."))) {
126
146
  constructor(data, message, hint) {
127
147
  super(data, message, hint);
128
148
  }
129
149
  }
130
150
  /**
131
151
  * The base of an error that refuses what an Intent asks (`422`): the request is valid, but the Grant or
132
- * the bank does not let it go on. On a release, `intent_id` names the Intent, which is `failed` with
133
- * the same word when the bank answered.
152
+ * AndCo does not let it go on. On a release, `intent_id` names the Intent, which stays `approved`; the
153
+ * Transfer it names, or the opening, reads `failed` with the same word when AndCo answered.
134
154
  */
135
155
  /* @__NO_SIDE_EFFECTS__ */
136
156
  function intentRefusal(error, description) {
@@ -167,43 +187,43 @@ export class DepositDestinationAmbiguous extends /* @__PURE__ */ intentRefusal("
167
187
  export class TransferAmountRequired extends /* @__PURE__ */ intentRefusal("transfer_amount_required", "The person still sets the transfer's amount.") {
168
188
  }
169
189
  /** The destination of this transfer is the person's to complete, and a credential has none to offer. */
170
- export class TransferDestinationRequired extends /* @__PURE__ */ intentRefusal("transfer_destination_required", "The person still completes the transfer's destination.") {
190
+ export class TransferDestinationRequired extends /* @__PURE__ */ intentRefusal("transfer_destination_required", "The person still completes the transfer's receiver.") {
171
191
  }
172
192
  /** An Organization that never completed its business identity cannot be named to another bank. */
173
193
  export class TransferSenderIdentityUnavailable extends /* @__PURE__ */ intentRefusal("transfer_sender_identity_unavailable", "The sender's identity cannot be named to the receiving bank.") {
174
194
  }
175
- /** The destination's bank is not one Andco transfers to. */
195
+ /** The destination's bank is not one AndCo transfers to. */
176
196
  export class UnsupportedBank extends /* @__PURE__ */ intentRefusal("unsupported_bank", "The destination's bank is not supported.") {
177
197
  }
178
- /** The subject has no bank connection to a company; nothing was asked of the bank. */
179
- export class BankConnectionUnavailable extends /* @__PURE__ */ intentRefusal("bank_connection_unavailable", "The subject has no bank connection to a company.") {
198
+ /** The subject has no AndCo account connection to a company; nothing was asked of the bank. */
199
+ export class BankConnectionUnavailable extends /* @__PURE__ */ intentRefusal("bank_connection_unavailable", "The subject has no AndCo account connection to a company.") {
180
200
  }
181
- /** The bank opened no account number for the opening. */
182
- export class BankAccountNumberMissing extends /* @__PURE__ */ intentRefusal("bank_account_number_missing", "The bank answered the opening without an account number.") {
201
+ /** AndCo opened no account number for the opening. */
202
+ export class BankAccountNumberMissing extends /* @__PURE__ */ intentRefusal("bank_account_number_missing", "AndCo answered the opening without an account number.") {
183
203
  }
184
- /** The bank does not let that person open accounts for that company. */
185
- export class BankAuthorizationDenied extends /* @__PURE__ */ intentRefusal("bank_authorization_denied", "The bank does not let that person open accounts for that company.") {
204
+ /** AndCo does not let that person open accounts for that company. */
205
+ export class BankAuthorizationDenied extends /* @__PURE__ */ intentRefusal("bank_authorization_denied", "AndCo does not let that person open accounts for that company.") {
186
206
  }
187
- /** The bank knows the holder without an account to open another one from. */
188
- export class BankHolderWithoutAccount extends /* @__PURE__ */ intentRefusal("bank_holder_without_account", "The holder has no account at the bank.") {
207
+ /** AndCo knows the holder without an account to open another one from. */
208
+ export class BankHolderWithoutAccount extends /* @__PURE__ */ intentRefusal("bank_holder_without_account", "The holder has no account at AndCo.") {
189
209
  }
190
- /** The bank's own ceiling of accounts for the holder is reached. */
191
- export class BankAccountLimitReached extends /* @__PURE__ */ intentRefusal("bank_account_limit_reached", "The holder reached the bank's ceiling of accounts.") {
210
+ /** AndCo's own ceiling of accounts for the holder is reached. */
211
+ export class BankAccountLimitReached extends /* @__PURE__ */ intentRefusal("bank_account_limit_reached", "The holder reached AndCo's ceiling of accounts.") {
192
212
  }
193
- /** The bank or its ledger refused the request before accepting it; no money moved. */
194
- export class BankRefused extends /* @__PURE__ */ intentRefusal("bank_refused", "The bank refused the request.") {
213
+ /** AndCo refused the request before accepting it; no money moved. */
214
+ export class BankRefused extends /* @__PURE__ */ intentRefusal("bank_refused", "AndCo refused the request.") {
195
215
  }
196
216
  /** The source account does not hold enough money for this movement. */
197
217
  export class InsufficientFunds extends /* @__PURE__ */ intentRefusal("insufficient_funds", "The source account does not hold enough money.") {
198
218
  }
199
- /** The ledger refused an entry and nothing stays moved. */
200
- export class BankRejected extends /* @__PURE__ */ intentRefusal("bank_rejected", "The bank rejected the movement; nothing stays moved.") {
219
+ /** AndCo rejected the movement and nothing stays moved. */
220
+ export class BankRejected extends /* @__PURE__ */ intentRefusal("bank_rejected", "AndCo rejected the movement; nothing stays moved.") {
201
221
  }
202
222
  /**
203
- * The bank stopped half way or gave no usable answer for a day: money may have left the source account
204
- * without reaching the destination, and the bank must review it. Never retry it under a new Intent.
223
+ * AndCo stopped half way or gave no usable answer for a day: money may have left the source account
224
+ * without reaching the destination, and AndCo must review it. Never retry it under a new Intent.
205
225
  */
206
- export class BankReviewRequired extends /* @__PURE__ */ intentRefusal("bank_review_required", "The bank must review the movement; money may have left the source account.") {
226
+ export class BankReviewRequired extends /* @__PURE__ */ intentRefusal("bank_review_required", "AndCo must review the movement; money may have left the source account.") {
207
227
  }
208
228
  /**
209
229
  * The requested case is not available, and `code` says which. Not a client error: do not retry. At
@@ -215,12 +235,13 @@ export class NotImplemented extends /* @__PURE__ */ AndcoAPIError.define("not_im
215
235
  "account_closure_not_implemented",
216
236
  "account_opening_not_implemented",
217
237
  "own_account_transfer_not_implemented",
238
+ "signed_outgoing_transfer_not_implemented",
218
239
  "external_transfer_execution_not_implemented",
219
240
  "multiple_destinations_not_implemented",
220
241
  "split_payments_not_implemented",
221
242
  "multiple_instructions_not_implemented",
222
243
  "intent_type_not_decidable",
223
- ])), v.description("Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where the bank does not serve them, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.")),
244
+ ])), v.description("Which case is unavailable: closing an account (postponed with no date), opening an additional account or a transfer between two accounts of the same holder where AndCo does not serve them, a signed transfer that leaves its holder where AndCo does not verify signatures yet, and the payment shapes not built yet. Absent for a case this version of the contract does not name yet.")),
224
245
  intent_id: refusedIntent,
225
246
  }), v.description("The requested case is unavailable, and `code` says which when the contract names it."))) {
226
247
  constructor(data, message, hint) {
@@ -229,52 +250,33 @@ export class NotImplemented extends /* @__PURE__ */ AndcoAPIError.define("not_im
229
250
  }
230
251
  // -- Intents ------------------------------------------------------------------------------------
231
252
  /**
232
- * `<base>[.<detail>]`: where an Intent stands. Decide on the base with `INTENT_STATUS_BASE` and
253
+ * `<base>[.<detail>]`: where an Intent stands in its decision. An Intent ends at its decision: it has
254
+ * no `processing`, `succeeded` or `failed` status. Decide on the base with `INTENT_STATUS_BASE` and
233
255
  * `IS_INTENT_TERMINAL_STATUS`, never on the whole value.
234
256
  */
235
257
  export const IntentStatus = /* @__PURE__ */ v.pipe(v.picklist([
236
258
  "requires_action",
237
- "processing.confirmed",
238
- "processing.settling",
239
- "processing.reversing",
240
- "processing.reconciling",
241
- "processing.opening",
242
- "processing.closing",
243
- "succeeded",
244
- "failed",
245
- "failed.insufficient_funds",
246
- "failed.fraud_rejected",
247
- "failed.bank_refused",
248
- "failed.bank_rejected",
249
- "failed.bank_review_required",
250
- "failed.own_account_transfer_not_implemented",
251
- "failed.bank_authorization_denied",
252
- "failed.bank_holder_without_account",
253
- "failed.bank_account_limit_reached",
254
- "failed.account_opening_not_implemented",
255
- "failed.bank_core_unavailable",
256
- "failed.bank_account_save_failed",
257
- "failed.bank_connection_unavailable",
258
- "failed.bank_account_quota_exceeded",
259
- "failed.account_key_taken",
260
- "failed.bank_account_not_found",
261
- "failed.bank_account_balance_not_zero",
259
+ "approved",
260
+ "rejected",
262
261
  "cancelled",
263
262
  "cancelled.grant_revoked",
264
263
  "cancelled.grant_expired",
265
- "rejected",
264
+ "cancelled.migration",
266
265
  "expired",
267
- ]), v.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.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`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."));
268
- /** What every answered Intent carries, whatever its type. */
269
- const answeredIntent = {
266
+ "completed",
267
+ "closed",
268
+ ]), v.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.\n\nAn 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`.\n\nThe 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."));
269
+ /** What every answered Intent carries, whatever its type, but its note or comment. */
270
+ const answeredIntentBase = {
270
271
  id: uuid,
271
272
  resource_server: url,
272
- note: /* @__PURE__ */ v.optional(IntentNoteSchema),
273
273
  metadata: /* @__PURE__ */ v.record(v.string(), v.unknown()),
274
274
  server_time: dateTime,
275
275
  created_at: dateTime,
276
276
  authorization_url: url,
277
277
  };
278
+ /** What a deposit or an account Intent carries: the base and its note. A transfer has a `comment`. */
279
+ const answeredIntent = { ...answeredIntentBase, note: /* @__PURE__ */ v.optional(IntentNoteSchema) };
278
280
  /** A deadline that may be absent (`null`: the Intent never expires), and the lifetime left of it. */
279
281
  const openEndedDeadline = {
280
282
  expires_at: /* @__PURE__ */ v.pipe(v.nullable(dateTime), v.description("The deadline to approve and execute the Intent. `null`: the Intent never expires.")),
@@ -283,7 +285,7 @@ const openEndedDeadline = {
283
285
  const noFee = /* @__PURE__ */ v.strictObject({ currency: v.literal("CLP"), amount: v.literal("0") });
284
286
  /** Whether a Signed Instruction created the Intent. */
285
287
  const signed = /* @__PURE__ */ v.pipe(v.boolean(), v.description("Whether a Signed Instruction created this Intent rather than a plain request."));
286
- /** The Andco account a deposit lands on, with what a payer at another bank types to pay into it. */
288
+ /** The AndCo account a deposit lands on, with what a payer at another bank types to pay into it. */
287
289
  export const DepositDestination = /* @__PURE__ */ v.pipe(v.strictObject({
288
290
  type: v.literal("account"),
289
291
  id: uuid,
@@ -291,7 +293,7 @@ export const DepositDestination = /* @__PURE__ */ v.pipe(v.strictObject({
291
293
  account_type: v.picklist(["checking", "debit", "savings"]),
292
294
  holder_id: v.pipe(v.nullable(v.string()), v.description("Null when the holder has no identity document on file.")),
293
295
  holder_name: v.string(),
294
- }), v.description('The Andco account a deposit lands on: the `{ type: "account", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder\'s RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.'));
296
+ }), v.description('The AndCo account a deposit lands on: the `{ type: "account", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder\'s RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.'));
295
297
  /** What a deposit has collected so far, and what it still waits for. */
296
298
  export const DepositProgress = /* @__PURE__ */ v.strictObject({ credited: pesos, remaining: v.nullable(pesos) });
297
299
  /** The amount a deposit asks for, as it is answered. */
@@ -310,8 +312,8 @@ export const DepositTransaction = /* @__PURE__ */ v.strictObject({
310
312
  note: v.nullable(v.string()),
311
313
  outcome: v.picklist(["credited", "reversed"]),
312
314
  receipt_time_source: v.picklist(["bank_timestamp", "unknown"]),
313
- sender_name: v.pipe(v.nullable(boundedText(256)), v.description("Name of the account holder that sent the money, exactly as the bank reported it.")),
314
- sender_national_id: v.pipe(v.nullable(boundedText(64)), v.description("National id (RUT) of the sender, as the bank reported it.")),
315
+ sender_name: v.pipe(v.nullable(boundedText(256)), v.description("Name of the account holder that sent the money, exactly as AndCo reported it.")),
316
+ sender_national_id: v.pipe(v.nullable(boundedText(64)), v.description("National id (RUT) of the sender, as AndCo reported it.")),
315
317
  sender_bank_name: v.pipe(v.nullable(boundedText(256)), v.description("Display name of the sender's bank.")),
316
318
  sender_account_type: v.nullable(v.picklist(["checking", "debit", "savings"])),
317
319
  sender_account_number: v.nullable(boundedText(64)),
@@ -333,7 +335,6 @@ export const DepositIntent = /* @__PURE__ */ v.object({
333
335
  "cancelled",
334
336
  "cancelled.grant_revoked",
335
337
  "cancelled.grant_expired",
336
- "failed",
337
338
  ]), v.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.")),
338
339
  attribution_version: v.pipe(v.number(), v.integer(), v.minValue(0)),
339
340
  closure: v.nullable(depositClosure),
@@ -350,32 +351,52 @@ export const DepositIntent = /* @__PURE__ */ v.object({
350
351
  /** The amount a transfer orders, as it is answered. */
351
352
  export const TransferAmount = /* @__PURE__ */ v.pipe(v.strictObject({
352
353
  currency: v.literal("CLP"),
353
- value: v.pipe(MoneySchema, v.description("Immutable amount from the creation request.")),
354
+ value: v.pipe(PesosSchema, v.description("Immutable amount from the creation request, in the minor unit of the currency.")),
354
355
  editable: v.boolean(),
355
- confirmed: v.pipe(v.nullable(v.string()), v.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.")),
356
- }), v.description("The amount a transfer orders, as it is answered. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that."));
356
+ confirmed: v.pipe(v.nullable(PesosSchema), v.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.")),
357
+ }), v.description("The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that."));
357
358
  /** The money a transfer actually moved and when it settled. */
358
- export const TransferSettlement = /* @__PURE__ */ v.pipe(v.strictObject({ currency: v.literal("CLP"), value: MoneySchema, at: dateTime }), v.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."));
359
+ export const TransferSettlement = /* @__PURE__ */ v.pipe(v.strictObject({ currency: v.literal("CLP"), value: PesosSchema, at: dateTime }), v.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."));
359
360
  /** Authoritative Project-facing state of a transfer. */
360
361
  export const TransferIntent = /* @__PURE__ */ v.pipe(v.object({
361
- ...answeredIntent,
362
+ ...answeredIntentBase,
362
363
  ...openEndedDeadline,
363
364
  type: v.literal("transfer"),
364
365
  status: IntentStatus,
366
+ transfer_id: v.pipe(v.nullable(uuid), v.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.")),
365
367
  signed,
366
- source: v.pipe(v.nullable(IntentAccountSchema), v.description("Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.")),
367
- destination: v.pipe(v.nullable(TransferDestinationProposalSchema), v.description("Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.")),
368
+ sender: v.pipe(v.nullable(IntentAccountSchema), v.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.")),
369
+ receiver: v.pipe(v.nullable(TransferIntentReceiverProposalSchema), v.description("The Receptor. Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.")),
370
+ comment: v.optional(TransferCommentProposalSchema),
368
371
  amount: TransferAmount,
369
372
  settled: v.nullable(TransferSettlement),
370
373
  fee: noFee,
371
- interaction_reason: v.pipe(v.optional(v.picklist(["bank_verification_required", "source_account_required"])), v.description("Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.")),
372
- }), v.description("Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount."));
374
+ interaction_reason: v.pipe(v.optional(v.picklist(["source_account_required"])), v.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.")),
375
+ }), v.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."));
376
+ /**
377
+ * The outcome of an approved account opening or closure, beside the Intent's own `approved`.
378
+ * It is null while the Intent waits for its decision.
379
+ */
380
+ /* @__NO_SIDE_EFFECTS__ */
381
+ function accountOutcomeStatus(operation) {
382
+ return v.pipe(v.nullable(v.picklist(["processing", "succeeded", "failed"])), v.description(`The outcome of the account ${operation} 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.`));
383
+ }
384
+ /** The word that says why an account opening or closure failed. */
385
+ /* @__NO_SIDE_EFFECTS__ */
386
+ function accountOutcomeDetail(operation) {
387
+ const words = operation === "opening"
388
+ ? "`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`"
389
+ : "`bank_account_not_found` and `bank_account_balance_not_zero`";
390
+ return v.pipe(v.nullable(v.string()), v.description(`Why the ${operation} failed, null when it did not: ${words}. The vocabulary is open: a word added later appears here as it is, so decide on the status.`));
391
+ }
373
392
  /** Authoritative Project-facing state of an account opening. */
374
393
  export const AccountOpeningIntent = /* @__PURE__ */ v.pipe(v.object({
375
394
  ...answeredIntent,
376
395
  ...openEndedDeadline,
377
396
  type: v.literal("account_opening"),
378
397
  status: IntentStatus,
398
+ account_opening_status: accountOutcomeStatus("opening"),
399
+ account_opening_status_detail: accountOutcomeDetail("opening"),
379
400
  signed,
380
401
  account: v.strictObject({
381
402
  accountKey: AccountKeySchema,
@@ -383,12 +404,14 @@ export const AccountOpeningIntent = /* @__PURE__ */ v.pipe(v.object({
383
404
  upsert: v.boolean(),
384
405
  bank_account_id: v.nullable(uuid),
385
406
  }),
386
- }), v.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."));
407
+ }), v.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."));
387
408
  /** Authoritative Project-facing state of an account closure. */
388
409
  export const AccountClosureIntent = /* @__PURE__ */ v.pipe(v.object({
389
410
  ...answeredIntent,
390
411
  type: v.literal("account_closure"),
391
412
  status: IntentStatus,
413
+ account_closure_status: accountOutcomeStatus("closure"),
414
+ account_closure_status_detail: accountOutcomeDetail("closure"),
392
415
  signed,
393
416
  account: IntentAccountSchema,
394
417
  resolved_account_id: v.pipe(v.nullable(uuid), v.description("The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.")),
@@ -434,26 +457,26 @@ export const createIntent = /* @__PURE__ */ oc
434
457
  method: "POST",
435
458
  path: "/intents",
436
459
  summary: "Create an intent under the exact OAuth Grant",
437
- description: "The same creation has two representations, and the content type picks between them. An `application/json` body is an Intent born waiting for an Approval. An `application/jwt` body is one Signed Instruction, sent as a compact JWS whose verified payload is `SignedTransferIntentClaims`, `SignedAccountOpeningIntentClaims` or `SignedAccountClosureIntentClaims`, and every value the operation uses comes from those claims and none from the envelope carrying them. A string body sent as anything but `application/jwt` answers `415 unsupported_media_type`. A Signed Instruction that does not verify answers `400 invalid_signed_instruction` with its `reason`, and one whose `exp` passed `401 expired_signed_instruction`. A signed Intent is born approved when the signing client's Grant holds the family's `approve` action (`bank_transfer` or `bank_account`); otherwise it waits, like a proposal, for the person on the hosted screen or for `POST /intents/{intent_id}/approve` by a Grant that holds it. Opening and closing an account fail synchronously with `403 account_key_out_of_grant` when the account_key is outside the Grant's `accounts` patterns and with `409 account_key_taken` when the account_key names an account of the subject (always for a closed one; otherwise unless `upsert`). The new account's number arrives in the `account_opening.succeeded` event as `account: { id, accountKey, number, name }`. Once the request is valid and authorized (a malformed body is still `400 invalid_request` and a Grant without the permission still `403 insufficient_authorization`), an opening and a transfer between two accounts of the same holder work where the bank serves them: the answer is `201` with the Intent `requires_action` and its `authorization_url`, or, for a Signed Instruction whose signer also holds the family's `approve`, the Intent as it is after its release. Where the deployment's bank does not serve one, the same request answers `501 not_implemented` with `code: account_opening_not_implemented` or `code: own_account_transfer_not_implemented`; a closure always answers `501 not_implemented` with `code: account_closure_not_implemented`. Nothing is created in those cases. A subject without a bank connection to a company cannot open an account: `422 bank_connection_unavailable` with the `intent_id`. A released Signed Instruction answers the refusals of `POST /intents/{intent_id}/approve`.",
460
+ 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`.",
438
461
  successStatus: 201,
439
462
  successDescription: "Intent created or returned from an idempotent retry",
440
463
  inputStructure: "detailed",
441
- spec: (operation) => servedAsSignedInstruction(withCanonicalHeaderNames(operation)),
464
+ spec: (operation) => servedAsSignedInstructionOrTransfer(withCanonicalHeaderNames(operation)),
442
465
  }))
443
- .errors(errors(InvalidRequest, IdempotencyKeyNotAllowed, InvalidSignedInstruction, InvalidToken, ExpiredSignedInstruction, InvalidOrigin, InsufficientAuthorization, AccountKeyOutOfGrant, NotFound, UnsupportedVersion, ServerError, IdempotencyConflict, IntentInteractionRequired, AccountKeyTaken, BankAccountQuotaExceeded, InvalidIntentState, IntentExpired, PayloadTooLarge, UnsupportedMediaType, DepositAmountOutOfBounds, DepositDestinationAmbiguous, ...releaseRefusals, NotImplemented, TemporarilyUnavailable))
466
+ .errors(errors(InvalidRequest, IdempotencyKeyNotAllowed, ApprovedUseTransfers, InvalidSignedInstruction, InvalidToken, ExpiredSignedInstruction, InvalidOrigin, InsufficientAuthorization, AccountKeyOutOfGrant, NotFound, UnsupportedVersion, ServerError, IdempotencyConflict, IntentInteractionRequired, AccountKeyTaken, BankAccountQuotaExceeded, InvalidIntentState, IntentExpired, PayloadTooLarge, UnsupportedMediaType, DepositAmountOutOfBounds, DepositDestinationAmbiguous, ...releaseRefusals, NotImplemented, TemporarilyUnavailable))
444
467
  .input(v.object({
445
468
  headers: v.object({
446
- "idempotency-key": v.pipe(v.optional(v.pipe(v.string(), v.regex(/^[A-Za-z0-9._:-]{1,128}$/))), v.description("Required with `application/json`, and refused with `application/jwt`, which answers `400 idempotency_key_not_allowed` when it arrives beside a signature: the idempotency key of a Signed Instruction is its own `jti`, and two candidates for one key is exactly the ambiguity that gets read the wrong way round. OpenAPI cannot make a header conditional on the media type, so it is published as optional rather than demanding what the server refuses.")),
469
+ "idempotency-key": v.pipe(v.optional(v.pipe(v.string(), v.regex(/^[A-Za-z0-9._:-]{1,128}$/))), v.description("Required with `application/json`, and refused with `application/jwt` and `application/jose+json`, which answer `400 idempotency_key_not_allowed` when it arrives beside a signature: the idempotency key of a Signed Instruction is its own `jti`, and two candidates for one key is exactly the ambiguity that gets read the wrong way round. OpenAPI cannot make a header conditional on the media type, so it is published as optional rather than demanding what the server refuses.")),
447
470
  }),
448
471
  body: v.union([
449
472
  IntentCreateSchema,
450
473
  signedInstructionBody("One Signed Instruction as a compact JWS, signed by a Signing Key this OAuth Client registered. The body is the serialized token, not a JSON object: what the claim schemas describe is its decoded payload.", {
451
474
  oneOf: [
452
- { $ref: "#/components/schemas/SignedTransferIntentClaims" },
453
475
  { $ref: "#/components/schemas/SignedAccountOpeningIntentClaims" },
454
476
  { $ref: "#/components/schemas/SignedAccountClosureIntentClaims" },
455
477
  ],
456
478
  }),
479
+ SignedTransferEnvelopeSchema,
457
480
  ]),
458
481
  }))
459
482
  .output(Intent);
@@ -474,7 +497,7 @@ export const closeDeposit = /* @__PURE__ */ oc
474
497
  method: "POST",
475
498
  path: "/intents/{intent_id}/close",
476
499
  summary: "Close this application's no-target deposit collection with an explicit close Grant action",
477
- description: "Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel accepted bank commands, or grant account transaction access.",
500
+ description: "Idempotent. Preserves existing terminal outcomes. Does not move funds, cancel commands AndCo already accepted, or grant account transaction access.",
478
501
  successDescription: "Current terminal state and historical manual closure, if any",
479
502
  }))
480
503
  .errors(errors(InvalidIdentifier, InvalidToken, InvalidOrigin, InsufficientAuthorization, NotFound, UnsupportedVersion, ServerError, InvalidIntentState, TemporarilyUnavailable))
@@ -486,7 +509,7 @@ export const approveIntent = /* @__PURE__ */ oc
486
509
  method: "POST",
487
510
  path: "/intents/{intent_id}/approve",
488
511
  summary: "Approve an Intent with a Grant holding the family's approve action",
489
- description: "Approval by a credential, without a person: the Grant behind the token must hold `approve` on the family that releases this Intent type (`bank_transfer` for a transfer) for the same subject, and within that detail's `transactions.maximum`. Above it the call answers `422 amount_out_of_grant` and the Intent stays pending for another approver. A transfer only a person can release answers `409 interaction_required` with `authorization_url` and `reason`, before any approval is recorded and before the bank is called: `bank_verification_required` for a transfer that leaves its holder's own accounts (to another bank or to another Andco customer), which the bank moves only after that person confirms it with their web PIN and a code the bank sends to their phone, and also for a transfer created with `destination: null` that nobody has completed yet; and `source_account_required` when the person still picks the source. Accepted is not moved: wait for `transfer.succeeded` or `transfer.failed`.\n\nTwo 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.\n\nRefusals of such a release: `409 interaction_required` with `intent_id`, `reason` and `interaction_url`, where `reason` is `bank_connection_pin_required`, `bank_connection_reconnect_required` or `bank_representative_replacement_required`; the bank asks no challenge, but the web session that acts for the holder needs its person back (or the Organization must connect another bank representative), nothing was opened, frozen or moved, the Intent is untouched and the same request succeeds once the person has acted at `interaction_url`. Also `409 bank_account_quota_exceeded` (with `used` and `quota`), `409 account_key_taken` (with `reason`), `409 intent_expired`, `409 invalid_intent_state` and `403 insufficient_authorization`. `422` with `intent_id` and `error` one of `bank_connection_unavailable` (the subject has no bank connection to a company), `bank_authorization_denied` (the bank does not let that person open accounts for that company), `bank_holder_without_account`, `bank_account_limit_reached`, `bank_refused`, `insufficient_funds`, `bank_rejected` or `bank_review_required`; the Intent is `failed` with the same detail (see `IntentStatus`). `503 temporarily_unavailable` means the bank could not be asked: asking again for the same Intent is safe and answers the same result, because the Intent's id is the bank's idempotency key. Where the bank does not serve the capability, `501 not_implemented` with `account_opening_not_implemented` or `own_account_transfer_not_implemented` and the `intent_id`; the Intent stays as it was. Safe to retry.",
512
+ 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`.\n\nTwo 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.\n\nRefusals 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.",
490
513
  successDescription: "The Intent after its approval",
491
514
  }))
492
515
  .errors(errors(InvalidRequest, InvalidIdentifier, InvalidToken, InvalidOrigin, InsufficientAuthorization, NotFound, UnsupportedVersion, ServerError, IntentInteractionRequired, AccountKeyTaken, BankAccountQuotaExceeded, InvalidIntentState, IntentExpired, TransferAmountRequired, TransferDestinationRequired, ...releaseRefusals, NotImplemented, TemporarilyUnavailable))
@@ -498,7 +521,7 @@ export const rejectIntent = /* @__PURE__ */ oc
498
521
  method: "POST",
499
522
  path: "/intents/{intent_id}/reject",
500
523
  summary: "Reject an Intent with a Grant holding the family's reject action",
501
- 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.",
524
+ 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.",
502
525
  successDescription: "Rejected Intent",
503
526
  inputStructure: "detailed",
504
527
  }))
@@ -511,7 +534,7 @@ export const cancelIntent = /* @__PURE__ */ oc
511
534
  method: "POST",
512
535
  path: "/intents/{intent_id}/cancel",
513
536
  summary: "Withdraw an Intent the calling client created",
514
- 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.",
537
+ 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.",
515
538
  successDescription: "Cancelled Intent",
516
539
  inputStructure: "detailed",
517
540
  }))