@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
@@ -3,6 +3,7 @@ import { TransferConfirmationSchema, transferConfirmationIssues } from "./intent
3
3
  import { INTENT_STATUS_BASE, IS_INTENT_TERMINAL_STATUS } from "./intent-status.js";
4
4
  import { duplicateIssues, issuesAt, parseWithRules } from "./issues.js";
5
5
  import { MONEY_PATTERN, MoneyOrZeroSchema } from "./rar/money.js";
6
+ import { PesosSchema } from "./transfer.js";
6
7
  import { SafeURL } from "./urls.js";
7
8
  const text = /* @__PURE__ */ v.string();
8
9
  // Every amount Platform presents here, credited totals and pending targets included, may
@@ -16,28 +17,33 @@ const money = MoneyOrZeroSchema;
16
17
  // through the protocol, instead of a second regex written by hand.
17
18
  const transmittedAmount = /* @__PURE__ */ v.pipe(text, v.regex(new RegExp(MONEY_PATTERN)));
18
19
  const uuid = /* @__PURE__ */ v.pipe(text, v.uuid());
20
+ /** The kind of an AndCo account a payer pays into, in words: a deposit's vocabulary. */
19
21
  const accountType = /* @__PURE__ */ v.picklist(["checking", "debit", "savings"]);
20
- /** One Andco account, by Account Key or by identifier, in the matcher vocabulary of a request. */
22
+ /** One AndCo account, by Account Key or by identifier, in the matcher vocabulary of a request. */
21
23
  const accountKeyAccount = /* @__PURE__ */ v.object({ type: v.literal("account_key"), accountKey: text });
22
24
  const idAccount = /* @__PURE__ */ v.object({ type: v.literal("account"), id: uuid });
23
25
  /**
24
- * An account at another bank, with every field the `external` matcher can fix. It is also what a
25
- * person writes on the screen when the Intent left where the money lands to her (see
26
- * {@link AndCoNativeIntentDestination}), so a transfer's answered destination and the command that
26
+ * A Receptor at a bank, in the transfer vocabulary of the API, with every field the `external` matcher can fix. It is
27
+ * also what a person writes on the screen when the Intent left where the money lands to her (see
28
+ * {@link AndCoNativeIntentReceiver}), so a transfer's answered receiver and the command that
27
29
  * completes it share one shape.
28
30
  */
29
31
  const externalAccount = /* @__PURE__ */ v.object({
30
32
  type: v.literal("external"),
31
- bank_id: text,
32
- account_type: accountType,
33
- account_id: text,
34
- holder_id: text,
35
- holder_name: text,
33
+ country: v.literal("CL"),
34
+ bank_code: text,
35
+ account_type: v.picklist(["10", "20", "40"]),
36
+ account_number: text,
37
+ name: text,
38
+ national_kind_id: v.literal("RUT"),
39
+ national_id: text,
36
40
  });
37
41
  const base = {
38
42
  id: uuid,
39
43
  status: v.picklist([
40
44
  "requires_action",
45
+ // The decision word of an Intent that a person or a credential approved: an Intent ends there.
46
+ "approved",
41
47
  "processing.confirmed",
42
48
  "processing.settling",
43
49
  "processing.reversing",
@@ -49,14 +55,24 @@ const base = {
49
55
  "closed",
50
56
  "failed",
51
57
  "failed.insufficient_funds",
52
- // A transfer that went through the bank says why it failed. A refusal before the bank accepts a
58
+ // A transfer that went through AndCo says why it failed. A refusal before AndCo accepts a
53
59
  // transfer fails it straight from `requires_action`; an abandoned challenge never fails it.
54
60
  "failed.fraud_rejected",
55
61
  "failed.bank_refused",
56
62
  "failed.bank_rejected",
57
- // A transfer between own accounts the bank stopped half way, and the ways an opening can fail.
63
+ // A transfer between own accounts AndCo stopped half way, and the ways an opening can fail.
58
64
  "failed.bank_review_required",
59
65
  "failed.own_account_transfer_not_implemented",
66
+ // A signed Transfer that leaves its holder: a challenge was needed, or its signature was
67
+ // refused. A signed Transfer on either rail: a key that signed it was revoked or
68
+ // expired before it executed. No money moved.
69
+ "failed.bank_challenge_required",
70
+ "failed.unknown_key",
71
+ "failed.revoked_key",
72
+ "failed.expired_key",
73
+ "failed.invalid_signature",
74
+ "failed.expired_signed_instruction",
75
+ "failed.sender_mismatch",
60
76
  "failed.bank_authorization_denied",
61
77
  "failed.bank_holder_without_account",
62
78
  "failed.bank_account_limit_reached",
@@ -66,30 +82,36 @@ const base = {
66
82
  "failed.bank_connection_unavailable",
67
83
  "failed.bank_account_quota_exceeded",
68
84
  "failed.account_key_taken",
69
- // Closures, which the bank does not serve today.
85
+ // Closures, which AndCo does not serve today.
70
86
  "failed.bank_account_not_found",
71
87
  "failed.bank_account_balance_not_zero",
72
88
  "cancelled",
73
89
  "cancelled.grant_revoked",
74
90
  "cancelled.grant_expired",
91
+ "cancelled.migration",
75
92
  "rejected",
76
93
  "expired",
77
94
  ]),
78
- amount: v.object({ currency: v.literal("CLP"), value: money, editable: v.boolean() }),
79
95
  fee: v.object({ currency: v.literal("CLP"), amount: money }),
80
- note: v.optional(v.object({ value: text, editable: v.boolean() })),
81
96
  expires_at: v.nullable(text),
82
97
  server_time: text,
83
98
  can_confirm: v.boolean(),
84
99
  project: v.object({ id: uuid, name: text }),
85
100
  };
86
- /** Authenticated Host presentation; bank commands and account ownership remain on Platform. */
101
+ /** Authenticated Host presentation; commands to AndCo and account ownership remain on Platform. */
87
102
  export const AndCoNativeIntentPreparationSchema = /* @__PURE__ */ v.object({
88
103
  intent: v.variant("type", [
89
104
  v.object({
90
105
  ...base,
91
106
  type: v.literal("deposit"),
92
- amount: v.nullable(v.object({ ...base.amount.entries, confirmed: v.nullable(money), frozen_at: v.nullable(text) })),
107
+ amount: v.nullable(v.object({
108
+ currency: v.literal("CLP"),
109
+ value: money,
110
+ editable: v.boolean(),
111
+ confirmed: v.nullable(money),
112
+ frozen_at: v.nullable(text),
113
+ })),
114
+ note: v.optional(v.object({ value: text, editable: v.boolean() })),
93
115
  destination: v.object({
94
116
  type: v.literal("account"),
95
117
  id: uuid,
@@ -116,29 +138,36 @@ export const AndCoNativeIntentPreparationSchema = /* @__PURE__ */ v.object({
116
138
  currency: v.literal("CLP"),
117
139
  })),
118
140
  }),
119
- // Money leaving an account towards a destination. `amount.value` is the proposal, `amount.confirmed`
120
- // what the person confirmed (null until then) and `settled` what it moved, null until it succeeded:
121
- // a Host that reconciles reads `settled`.
141
+ // Money leaving the sender's account towards a receiver, in the transfer vocabulary of the API: whole
142
+ // pesos as integers. `amount.value` is the proposal, `amount.confirmed` what the person confirmed
143
+ // (null until then) and `settled` what it moved, null until it succeeded: a Host that reconciles
144
+ // reads `settled`.
122
145
  v.object({
123
146
  ...base,
124
147
  type: v.literal("transfer"),
125
- amount: v.object({ ...base.amount.entries, confirmed: v.nullable(money) }),
126
- settled: v.nullable(v.object({ currency: v.literal("CLP"), value: money, at: text })),
148
+ amount: v.object({
149
+ currency: v.literal("CLP"),
150
+ value: PesosSchema,
151
+ editable: v.boolean(),
152
+ confirmed: v.nullable(PesosSchema),
153
+ }),
154
+ comment: v.optional(v.object({ value: text, editable: v.boolean() })),
155
+ settled: v.nullable(v.object({ currency: v.literal("CLP"), value: PesosSchema, at: text })),
127
156
  signed: v.boolean(),
128
157
  // Why only a person can release the Intent while it is `requires_action`. A Host that reads
129
158
  // `bank_verification_required` cannot complete the transfer itself: the native protocol has no
130
- // command for the bank's challenge (web PIN and SMS code), so it sends the person to the hosted
159
+ // command for AndCo's challenge (web AndPass and SMS code), so it sends the person to the hosted
131
160
  // page, and `confirm_transfer` answers `409` with `error.code` `interaction_required` in that case.
132
161
  interaction_reason: v.optional(v.picklist(["bank_verification_required", "source_account_required"])),
133
162
  // Null while the person has yet to write where the money lands, when the Intent was created with
134
- // `destination: null`; afterwards the account she wrote. Whatever it names is locked: a person
135
- // completes a destination, never redirects one.
136
- destination: v.nullable(v.variant("type", [
163
+ // `receiver: null`; afterwards the account she wrote. Whatever it names is locked: a person
164
+ // completes a receiver, never redirects one.
165
+ receiver: v.nullable(v.variant("type", [
137
166
  v.object({ ...accountKeyAccount.entries, editable: v.literal(false) }),
138
167
  v.object({ ...idAccount.entries, editable: v.literal(false) }),
139
168
  v.object({ ...externalAccount.entries, editable: v.literal(false) }),
140
169
  ])),
141
- source: v.nullable(v.variant("type", [accountKeyAccount, idAccount])),
170
+ sender: v.nullable(v.variant("type", [accountKeyAccount, idAccount])),
142
171
  }),
143
172
  ]),
144
173
  sources: v.array(v.object({ id: uuid, number: text, name: v.nullable(text) })),
@@ -181,14 +210,14 @@ export const AndCoNativeIntentCommandSchema = /* @__PURE__ */ v.variant("action"
181
210
  // One command confirms money movement, whichever of the two forms carries it: what the person
182
211
  // decides -- which account it leaves from, how much, where it lands and under what reference -- is
183
212
  // the same question in both. Its members are the confirmation schema's own, so a value that is not
184
- // editable has no separate shape here to be injected through. `destination` is sent only for an
185
- // Intent that left it to the screen (`destination: null`).
213
+ // editable has no separate shape here to be injected through. `receiver` is sent only for an
214
+ // Intent that left it to the screen (`receiver: null`).
186
215
  v.strictObject({
187
216
  action: v.literal("confirm_transfer"),
188
- sourceAccountId: TransferConfirmationSchema.entries.source_account_id,
217
+ senderAccountId: TransferConfirmationSchema.entries.sender_account_id,
189
218
  amount: TransferConfirmationSchema.entries.amount,
190
- destination: TransferConfirmationSchema.entries.destination,
191
- note: TransferConfirmationSchema.entries.note,
219
+ receiver: TransferConfirmationSchema.entries.receiver,
220
+ comment: TransferConfirmationSchema.entries.comment,
192
221
  }),
193
222
  v.strictObject({ action: v.literal("close_deposit") }),
194
223
  v.strictObject({
@@ -204,8 +233,8 @@ export const AndCoNativeIntentCommandSchema = /* @__PURE__ */ v.variant("action"
204
233
  }),
205
234
  ]);
206
235
  /**
207
- * The rules of a command that its shape does not say: a confirmed transfer's note is at most
208
- * `NOTE_MAX_LENGTH` code points (`note_too_long`) and its destination's holder name at most
236
+ * The rules of a command that its shape does not say: a confirmed transfer's comment is at most
237
+ * 60 bytes of UTF-8 (`comment_too_long`) and its receiver's holder name at most
209
238
  * `HOLDER_NAME_MAX_LENGTH` (`holder_name_too_long`), and `assign_deposit_credits` selects each
210
239
  * movement once (`duplicate_movement`, at the repeated entry).
211
240
  *
@@ -256,7 +285,7 @@ export function ANDCO_NATIVE_INTENT_ID(value, bankOrigin) {
256
285
  export function ANDCO_NATIVE_INTENT_PRESENTATION(value, bankOrigin, miniappOrigin) {
257
286
  const id = ANDCO_NATIVE_INTENT_ID(value, bankOrigin);
258
287
  if (!id)
259
- throw new Error("La URL no corresponde a una operación de Andco.");
288
+ throw new Error("La URL no corresponde a una operación de AndCo.");
260
289
  const url = new URL(value);
261
290
  const returnUri = new SafeURL(url.searchParams.get("return_uri") ?? "");
262
291
  const errorReturnUri = new SafeURL(url.searchParams.get("error_return_uri") ?? "");
@@ -435,49 +464,59 @@ export function ANDCO_NATIVE_INTENT_VIEW(data, now = Date.now(), observedAt = no
435
464
  (intent.status === "processing.confirmed" && data.retryable)),
436
465
  };
437
466
  }
438
- const BLANK_DESTINATION = {
439
- bank_id: "",
467
+ const BLANK_RECEIVER = {
468
+ country: "CL",
469
+ bank_code: "",
440
470
  account_type: "",
441
- account_id: "",
442
- holder_id: "",
443
- holder_name: "",
471
+ account_number: "",
472
+ name: "",
473
+ national_kind_id: "RUT",
474
+ national_id: "",
444
475
  };
445
476
  /**
446
- * Whether the person still writes where the money lands: a transfer created with `destination: null`
447
- * answers `destination: null` until she confirms, and then the account she wrote.
477
+ * Whether the person still writes where the money lands: a transfer created with `receiver: null`
478
+ * answers `receiver: null` until she confirms, and then the account she wrote.
448
479
  */
449
- function destinationIsOpen(intent) {
450
- return intent.type === "transfer" && intent.destination === null;
480
+ function receiverIsOpen(intent) {
481
+ return intent.type === "transfer" && intent.receiver === null;
451
482
  }
452
483
  /** Restores accepted command values; otherwise defaults only an unambiguous source. */
453
484
  export function ANDCO_NATIVE_INTENT_FORM(data, retry) {
454
485
  const intent = data.intent;
455
486
  if (retry?.action === "fund_deposit")
456
- return { source: retry.sourceAccountId, amount: String(retry.amount), note: retry.note ?? "", destination: null };
487
+ return { source: retry.sourceAccountId, amount: String(retry.amount), note: retry.note ?? "", receiver: null };
457
488
  const transferRetry = retry?.action === "confirm_transfer" ? retry : undefined;
458
- const retried = transferRetry?.destination;
489
+ const retried = transferRetry?.receiver;
490
+ let amount;
491
+ let note;
492
+ if (intent.type === "deposit") {
493
+ amount = data.funding?.pendingAmount ?? intent.progress.remaining ?? "";
494
+ note = intent.note?.value;
495
+ }
496
+ else {
497
+ amount = String(transferRetry?.amount ?? intent.amount.confirmed ?? intent.amount.value);
498
+ note = intent.comment?.value;
499
+ }
459
500
  return {
460
- source: transferRetry?.sourceAccountId ??
501
+ source: transferRetry?.senderAccountId ??
461
502
  data.funding?.pendingSourceId ??
462
- (intent.type !== "deposit" && intent.source?.type === "account"
463
- ? intent.source.id
503
+ (intent.type !== "deposit" && intent.sender?.type === "account"
504
+ ? intent.sender.id
464
505
  : data.sources.length === 1
465
506
  ? data.sources[0]?.id
466
507
  : undefined) ??
467
508
  "",
468
- amount: transferRetry?.amount ??
469
- data.funding?.pendingAmount ??
470
- (intent.type === "deposit"
471
- ? (intent.progress.remaining ?? "")
472
- : (intent.amount.confirmed ?? intent.amount.value)),
473
- note: transferRetry?.note ?? data.funding?.pendingNote ?? data.confirmedNote ?? intent.note?.value ?? "",
474
- destination: destinationIsOpen(intent)
509
+ amount,
510
+ note: transferRetry?.comment ?? data.funding?.pendingNote ?? data.confirmedNote ?? note ?? "",
511
+ receiver: receiverIsOpen(intent)
475
512
  ? {
476
- bank_id: retried?.bank_id ?? BLANK_DESTINATION.bank_id,
477
- account_type: retried?.account_type ?? BLANK_DESTINATION.account_type,
478
- account_id: retried?.account_id ?? BLANK_DESTINATION.account_id,
479
- holder_id: retried?.holder_id ?? BLANK_DESTINATION.holder_id,
480
- holder_name: retried?.holder_name ?? BLANK_DESTINATION.holder_name,
513
+ country: BLANK_RECEIVER.country,
514
+ bank_code: retried?.bank_code ?? BLANK_RECEIVER.bank_code,
515
+ account_type: retried?.account_type ?? BLANK_RECEIVER.account_type,
516
+ account_number: retried?.account_number ?? BLANK_RECEIVER.account_number,
517
+ name: retried?.name ?? BLANK_RECEIVER.name,
518
+ national_kind_id: BLANK_RECEIVER.national_kind_id,
519
+ national_id: retried?.national_id ?? BLANK_RECEIVER.national_id,
481
520
  }
482
521
  : null,
483
522
  };
@@ -485,40 +524,54 @@ export function ANDCO_NATIVE_INTENT_FORM(data, retry) {
485
524
  /** Builds an explicit command without resending frozen or non-editable values of a money movement. */
486
525
  export function ANDCO_NATIVE_INTENT_COMMAND(data, form) {
487
526
  const intent = data.intent;
488
- const frozen = INTENT_STATUS_BASE(intent.status) === "processing";
489
- // Editability is read from the Intent the server sent and never from the form, so a screen that
490
- // holds an edited value cannot turn a frozen amount, destination or note into a confirmed one.
491
- const destination = form.destination;
492
- return v.parse(AndCoNativeIntentCommandSchema, intent.type === "deposit"
493
- ? {
527
+ if (intent.type === "deposit") {
528
+ return v.parse(AndCoNativeIntentCommandSchema, {
494
529
  action: "fund_deposit",
495
530
  sourceAccountId: form.source,
496
531
  amount: data.funding?.pendingAmount ?? intent.progress.remaining ?? form.amount,
497
532
  note: form.note,
498
- }
499
- : {
500
- action: "confirm_transfer",
501
- sourceAccountId: form.source || undefined,
502
- note: !frozen && intent.note?.editable ? form.note : undefined,
503
- amount: !frozen && intent.amount.editable ? form.amount : undefined,
504
- destination: !frozen && destinationIsOpen(intent) && destination
505
- ? {
506
- type: "external",
507
- bank_id: destination.bank_id,
508
- account_type: destination.account_type,
509
- account_id: destination.account_id,
510
- holder_id: destination.holder_id,
511
- holder_name: destination.holder_name,
512
- }
513
- : undefined,
514
533
  });
534
+ }
535
+ // Editability is read from the Intent the server sent and never from the form, so a screen that
536
+ // holds an edited value cannot turn a frozen amount, receiver or comment into a confirmed one.
537
+ const frozen = INTENT_STATUS_BASE(intent.status) === "processing";
538
+ const receiver = form.receiver;
539
+ let amount;
540
+ if (frozen || !intent.amount.editable) {
541
+ amount = undefined;
542
+ }
543
+ else if (/^\d+$/.test(form.amount)) {
544
+ amount = Number(form.amount);
545
+ }
546
+ else {
547
+ // Not an integer in the minor unit of the currency: the command refuses it, and the form is not valid.
548
+ amount = Number.NaN;
549
+ }
550
+ return v.parse(AndCoNativeIntentCommandSchema, {
551
+ action: "confirm_transfer",
552
+ senderAccountId: form.source || undefined,
553
+ comment: !frozen && intent.comment?.editable ? form.note : undefined,
554
+ amount,
555
+ receiver: !frozen && receiverIsOpen(intent) && receiver
556
+ ? {
557
+ type: "external",
558
+ country: receiver.country,
559
+ bank_code: receiver.bank_code,
560
+ account_type: receiver.account_type,
561
+ account_number: receiver.account_number,
562
+ name: receiver.name,
563
+ national_kind_id: receiver.national_kind_id,
564
+ national_id: receiver.national_id,
565
+ }
566
+ : undefined,
567
+ });
515
568
  }
516
569
  /** Validates the proposed command while preserving an already accepted deposit's frozen amount. */
517
570
  export function ANDCO_NATIVE_INTENT_FORM_VALID(data, form) {
518
571
  if (data.intent.type !== "deposit" && data.sourceEditable && !form.source)
519
572
  return false;
520
- // A destination the Intent left to the person has to be written whole before there is a command.
521
- if (destinationIsOpen(data.intent) && !form.destination)
573
+ // A receiver the Intent left to the person has to be written whole before there is a command.
574
+ if (receiverIsOpen(data.intent) && !form.receiver)
522
575
  return false;
523
576
  try {
524
577
  const command = ANDCO_NATIVE_INTENT_COMMAND(data, form);
package/dist/native.d.ts CHANGED
@@ -40,7 +40,7 @@ export declare const AndCoNativeAuthorizationResultSchema: v.VariantSchema<"stat
40
40
  readonly protocol: v.LiteralSchema<"andco:sdk", undefined>;
41
41
  readonly version: v.LiteralSchema<2, undefined>;
42
42
  }, undefined>], undefined>;
43
- /** Authorization request relayed from a Miniapp main frame to an Andco native Host. */
43
+ /** Authorization request relayed from a Miniapp main frame to an AndCo native Host. */
44
44
  export type AndCoNativeAuthorizationRequest = v.InferOutput<typeof AndCoNativeAuthorizationRequestSchema>;
45
45
  /** Popup authorization request relayed from a mounted Miniapp to its native Host. */
46
46
  export type AndCoNativeOpenPopupRequest = v.InferOutput<typeof AndCoNativeOpenPopupRequestSchema>;
@@ -1,7 +1,7 @@
1
1
  import * as v from "valibot";
2
2
  import { type Issue } from "../issues.js";
3
3
  /**
4
- * Syntax of an Account Key: the name that identifies one Cuenta Vista among the accounts of its
4
+ * Syntax of an Account Key: the name that identifies one cuenta digital among the accounts of its
5
5
  * Subject, unique per Subject regardless of which Project opened it.
6
6
  */
7
7
  export declare const ACCOUNT_KEY_SYNTAX = "^[a-z][a-z0-9_-]{0,63}$";
@@ -26,8 +26,11 @@ export declare const AccountKeySchema: v.SchemaWithPipe<readonly [v.StringSchema
26
26
  export declare const AccountKeyPatternSchema: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
27
27
  /** Upper bound of every matcher list. */
28
28
  export declare const ACCOUNT_MATCHER_LIST_CEILING = 100;
29
- /** The fields an `external` matcher may fix, each narrowing the accounts it admits. */
30
- export declare const ACCOUNT_EXTERNAL_FIELDS: readonly ["bank_id", "account_type", "account_id", "holder_id", "holder_name"];
29
+ /**
30
+ * The fields an `external` matcher may fix, each narrowing the accounts it admits. They are the
31
+ * Receptor's own fields in the transfer vocabulary of the API (`receiver`), so a Receptor is compared field by field.
32
+ */
33
+ export declare const ACCOUNT_EXTERNAL_FIELDS: readonly ["bank_code", "account_type", "account_number", "national_id", "name"];
31
34
  /**
32
35
  * How many accounts the person picks at consent for an `editable` matcher of a list she narrows:
33
36
  * `"multiple"` (the default) lets her keep several, `"single"` asks for exactly one, which the
@@ -72,7 +75,7 @@ export declare const ManagedAccountKeyMatcherSchema: v.StrictObjectSchema<{
72
75
  }, undefined>;
73
76
  export type ManagedAccountKey = v.InferInput<typeof ManagedAccountKeyMatcherSchema>;
74
77
  /**
75
- * One exact Andco account. As a source or in `accounts` it must be an account of the Subject; the
78
+ * One exact AndCo account. As a source or in `accounts` it must be an account of the Subject; the
76
79
  * gate checks ownership, since the schema cannot.
77
80
  */
78
81
  export declare const AccountInternalMatcherSchema: v.StrictObjectSchema<{
@@ -89,33 +92,35 @@ export declare const AnyOwnMatcherSchema: v.StrictObjectSchema<{
89
92
  readonly selection: v.NullishSchema<v.PicklistSchema<readonly ["single", "multiple"], undefined>, undefined>;
90
93
  }, undefined>;
91
94
  export type AnyOwn = v.InferInput<typeof AnyOwnMatcherSchema>;
92
- /** Every Andco account, of any Subject. Only a destination. */
95
+ /** Every AndCo account, of any Subject. Only a destination. */
93
96
  export declare const AnyLocalMatcherSchema: v.StrictObjectSchema<{
94
97
  readonly type: v.LiteralSchema<"any", undefined>;
95
98
  readonly limit: v.LiteralSchema<"local", undefined>;
96
99
  readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
97
100
  }, undefined>;
98
101
  export type AnyLocal = v.InferInput<typeof AnyLocalMatcherSchema>;
99
- /** Every account, at Andco or at another bank. Only a destination, and never `editable`. */
102
+ /** Every account, at AndCo or at another bank. Only a destination, and never `editable`. */
100
103
  export declare const AnyAllMatcherSchema: v.StrictObjectSchema<{
101
104
  readonly type: v.LiteralSchema<"any", undefined>;
102
105
  readonly limit: v.LiteralSchema<"all", undefined>;
103
106
  }, undefined>;
104
107
  export type AnyAll = v.InferInput<typeof AnyAllMatcherSchema>;
105
108
  /**
106
- * Accounts at other banks, narrowed by every field it fixes. `{ type: "external" }` alone admits
107
- * every account outside Andco. Only a destination.
109
+ * Accounts at other banks, narrowed by every field it fixes, in the Receptor's vocabulary: the
110
+ * four-digit `bank_code`, its `account_type` code (`"10"`, `"20"`, `"40"`), the `account_number`, and
111
+ * the holder's `national_id` (RUT) and `name`. `{ type: "external" }` alone admits every account
112
+ * outside AndCo. Only a destination.
108
113
  *
109
114
  * @example
110
- * const payroll: AccountExternal = { type: "external", bank_id: "banco_de_chile", account_id: "00123456" };
115
+ * const payroll: AccountExternal = { type: "external", bank_code: "0001", account_number: "00123456" };
111
116
  */
112
117
  export declare const AccountExternalMatcherSchema: v.StrictObjectSchema<{
113
118
  readonly type: v.LiteralSchema<"external", undefined>;
114
- readonly bank_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
115
- readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
116
- readonly account_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
117
- readonly holder_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
118
- readonly holder_name: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
119
+ readonly bank_code: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>, undefined>;
120
+ readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
121
+ readonly account_number: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
122
+ readonly national_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
123
+ readonly name: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
119
124
  readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
120
125
  }, undefined>;
121
126
  export type AccountExternal = v.InferInput<typeof AccountExternalMatcherSchema>;
@@ -163,11 +168,11 @@ export declare const DestinationAccountMatcherSchema: v.UnionSchema<[v.StrictObj
163
168
  readonly limit: v.LiteralSchema<"all", undefined>;
164
169
  }, undefined>, v.StrictObjectSchema<{
165
170
  readonly type: v.LiteralSchema<"external", undefined>;
166
- readonly bank_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
167
- readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
168
- readonly account_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
169
- readonly holder_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
170
- readonly holder_name: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
171
+ readonly bank_code: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>, undefined>;
172
+ readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
173
+ readonly account_number: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
174
+ readonly national_id: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
175
+ readonly name: v.NullishSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
171
176
  readonly editable: v.NullishSchema<v.BooleanSchema<undefined>, undefined>;
172
177
  }, undefined>], undefined>;
173
178
  export type DestinationAccountMatcher = v.InferInput<typeof DestinationAccountMatcherSchema>;
@@ -199,11 +204,11 @@ export declare const GrantedAnyAllSchema: v.StrictObjectSchema<{
199
204
  /** {@link AccountExternalMatcherSchema} as granted: absent fields are unrestricted, never `null`. */
200
205
  export declare const GrantedAccountExternalSchema: v.StrictObjectSchema<{
201
206
  readonly type: v.LiteralSchema<"external", undefined>;
202
- readonly bank_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
203
- readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
204
- readonly account_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
205
- readonly holder_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
206
- readonly holder_name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
207
+ readonly bank_code: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>, undefined>;
208
+ readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
209
+ readonly account_number: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
210
+ readonly national_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
211
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
207
212
  }, undefined>;
208
213
  export type GrantedAccountKey = v.InferOutput<typeof GrantedAccountKeySchema>;
209
214
  export type GrantedAccountInternal = v.InferOutput<typeof GrantedAccountInternalSchema>;
@@ -241,11 +246,11 @@ export declare const GrantedDestinationAccountMatcherSchema: v.UnionSchema<[v.St
241
246
  readonly limit: v.LiteralSchema<"all", undefined>;
242
247
  }, undefined>, v.StrictObjectSchema<{
243
248
  readonly type: v.LiteralSchema<"external", undefined>;
244
- readonly bank_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
245
- readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
246
- readonly account_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
247
- readonly holder_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
248
- readonly holder_name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
249
+ readonly bank_code: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>, undefined>;
250
+ readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>, undefined>;
251
+ readonly account_number: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
252
+ readonly national_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
253
+ readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>, v.RegexAction<string, undefined>]>, undefined>;
249
254
  }, undefined>], undefined>;
250
255
  export type GrantedDestinationAccountMatcher = v.InferOutput<typeof GrantedDestinationAccountMatcherSchema>;
251
256
  /**
@@ -353,7 +358,7 @@ export declare function accountMatcherKind(matcher: DestinationAccountMatcher):
353
358
  * - `external` is contained by `any(all)`, and by an `external` whose every fixed field `inner`
354
359
  * fixes to the same value. Nothing else contains it, and it contains nothing but such an
355
360
  * `external`.
356
- * - `any(local)` contains every Andco matcher: `any(local)`, `any(own)`, `accountKey` and `account`.
361
+ * - `any(local)` contains every AndCo matcher: `any(local)`, `any(own)`, `accountKey` and `account`.
357
362
  * - `any(own)` contains `any(own)` and `accountKey` (an accountKey names an account of the Subject by
358
363
  * construction), and an `account` only when `facts.ownAccounts` says it is the Subject's.
359
364
  * - `accountKey:q` contains `accountKey:p` per {@link accountKeyPatternContains}, and an `account` only when
@@ -1 +1 @@
1
- {"version":3,"file":"account-matchers.d.ts","sourceRoot":"","sources":["../../src/rar/account-matchers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAmB,KAAK,KAAK,EAAE,MAAM,cAAc,CAAC;AAE3D;;;GAGG;AACH,eAAO,MAAM,kBAAkB,4BAA4B,CAAC;AAE5D;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,0BAA0B,wCAAwC,CAAC;AAEhF,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,0FA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