@andco/protocol 0.0.14 → 0.0.15

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 (90) 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.js +2 -2
  5. package/dist/authorization.d.ts +1 -1
  6. package/dist/authorization.js +1 -1
  7. package/dist/consent.d.ts +2 -2
  8. package/dist/consent.js +2 -2
  9. package/dist/errors.d.ts +9 -9
  10. package/dist/errors.js +9 -9
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/intent-input.d.ts +431 -872
  15. package/dist/intent-input.d.ts.map +1 -1
  16. package/dist/intent-input.js +142 -121
  17. package/dist/miniapp-manifest.d.ts +1 -1
  18. package/dist/native-intent.d.ts +82 -68
  19. package/dist/native-intent.d.ts.map +1 -1
  20. package/dist/native-intent.js +134 -84
  21. package/dist/native.d.ts +1 -1
  22. package/dist/rar/account-matchers.d.ts +35 -30
  23. package/dist/rar/account-matchers.d.ts.map +1 -1
  24. package/dist/rar/account-matchers.js +27 -21
  25. package/dist/rar/bank.d.ts +81 -81
  26. package/dist/rar/bank.js +1 -1
  27. package/dist/rar/catalog.d.ts +48 -48
  28. package/dist/rar/catalog.js +6 -6
  29. package/dist/rar/detail.d.ts +1 -1
  30. package/dist/rar/detail.js +1 -1
  31. package/dist/rar/json-schemas.generated.d.ts +1 -1
  32. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  33. package/dist/rar/json-schemas.generated.js +25 -21
  34. package/dist/rar/subject-data.d.ts +1 -1
  35. package/dist/rar/subject-data.js +1 -1
  36. package/dist/rar/subject.d.ts +1 -1
  37. package/dist/rar/subject.js +1 -1
  38. package/dist/rest/accounts.d.ts +28 -28
  39. package/dist/rest/accounts.d.ts.map +1 -1
  40. package/dist/rest/accounts.js +22 -22
  41. package/dist/rest/api-error.d.ts +1 -1
  42. package/dist/rest/api-error.js +1 -1
  43. package/dist/rest/catalog.d.ts +3 -3
  44. package/dist/rest/catalog.js +2 -2
  45. package/dist/rest/common.d.ts +3 -3
  46. package/dist/rest/common.js +3 -3
  47. package/dist/rest/contract.d.ts +905 -528
  48. package/dist/rest/contract.d.ts.map +1 -1
  49. package/dist/rest/contract.js +17 -5
  50. package/dist/rest/events.d.ts +1 -1
  51. package/dist/rest/events.d.ts.map +1 -1
  52. package/dist/rest/events.js +2 -2
  53. package/dist/rest/identity.d.ts +22 -22
  54. package/dist/rest/identity.js +5 -5
  55. package/dist/rest/index.d.ts +1 -0
  56. package/dist/rest/index.d.ts.map +1 -1
  57. package/dist/rest/index.js +1 -0
  58. package/dist/rest/intents.d.ts +787 -716
  59. package/dist/rest/intents.d.ts.map +1 -1
  60. package/dist/rest/intents.js +62 -53
  61. package/dist/rest/signatures.d.ts +11 -5
  62. package/dist/rest/signatures.d.ts.map +1 -1
  63. package/dist/rest/signatures.js +10 -0
  64. package/dist/rest/transfers.d.ts +612 -0
  65. package/dist/rest/transfers.d.ts.map +1 -0
  66. package/dist/rest/transfers.js +115 -0
  67. package/dist/scopes.d.ts +1 -1
  68. package/dist/signing.d.ts +12 -2
  69. package/dist/signing.d.ts.map +1 -1
  70. package/dist/signing.js +6 -0
  71. package/dist/transfer.d.ts +363 -0
  72. package/dist/transfer.d.ts.map +1 -0
  73. package/dist/transfer.js +287 -0
  74. package/dist/transport/financial-events.d.ts +21 -17
  75. package/dist/transport/financial-events.d.ts.map +1 -1
  76. package/dist/transport/generated/oauth-api.d.ts +1017 -194
  77. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  78. package/dist/transport/intents.d.ts +28 -12
  79. package/dist/transport/intents.d.ts.map +1 -1
  80. package/dist/transport/intents.js +1 -1
  81. package/dist/transport/rest.d.ts +4 -4
  82. package/dist/urls.d.ts +2 -2
  83. package/dist/urls.js +3 -3
  84. package/dist/userinfo.d.ts +2 -2
  85. package/dist/userinfo.js +2 -2
  86. package/dist/webhooks.d.ts +16 -16
  87. package/dist/webhooks.js +14 -14
  88. package/dist/window-features.d.ts +2 -2
  89. package/dist/window-features.js +2 -2
  90. 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,23 +17,26 @@ 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 Core's vocabulary, 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,
@@ -49,14 +53,24 @@ const base = {
49
53
  "closed",
50
54
  "failed",
51
55
  "failed.insufficient_funds",
52
- // A transfer that went through the bank says why it failed. A refusal before the bank accepts a
56
+ // A transfer that went through AndCo says why it failed. A refusal before AndCo accepts a
53
57
  // transfer fails it straight from `requires_action`; an abandoned challenge never fails it.
54
58
  "failed.fraud_rejected",
55
59
  "failed.bank_refused",
56
60
  "failed.bank_rejected",
57
- // A transfer between own accounts the bank stopped half way, and the ways an opening can fail.
61
+ // A transfer between own accounts AndCo stopped half way, and the ways an opening can fail.
58
62
  "failed.bank_review_required",
59
63
  "failed.own_account_transfer_not_implemented",
64
+ // A signed Transfer that leaves its holder: the fraud engine asked for a challenge, or the core
65
+ // refused its signature. A signed Transfer on either rail: a key that signed it was revoked or
66
+ // expired before it executed. No money moved.
67
+ "failed.bank_challenge_required",
68
+ "failed.unknown_key",
69
+ "failed.revoked_key",
70
+ "failed.expired_key",
71
+ "failed.invalid_signature",
72
+ "failed.expired_signed_instruction",
73
+ "failed.sender_mismatch",
60
74
  "failed.bank_authorization_denied",
61
75
  "failed.bank_holder_without_account",
62
76
  "failed.bank_account_limit_reached",
@@ -66,7 +80,7 @@ const base = {
66
80
  "failed.bank_connection_unavailable",
67
81
  "failed.bank_account_quota_exceeded",
68
82
  "failed.account_key_taken",
69
- // Closures, which the bank does not serve today.
83
+ // Closures, which AndCo does not serve today.
70
84
  "failed.bank_account_not_found",
71
85
  "failed.bank_account_balance_not_zero",
72
86
  "cancelled",
@@ -75,21 +89,26 @@ const base = {
75
89
  "rejected",
76
90
  "expired",
77
91
  ]),
78
- amount: v.object({ currency: v.literal("CLP"), value: money, editable: v.boolean() }),
79
92
  fee: v.object({ currency: v.literal("CLP"), amount: money }),
80
- note: v.optional(v.object({ value: text, editable: v.boolean() })),
81
93
  expires_at: v.nullable(text),
82
94
  server_time: text,
83
95
  can_confirm: v.boolean(),
84
96
  project: v.object({ id: uuid, name: text }),
85
97
  };
86
- /** Authenticated Host presentation; bank commands and account ownership remain on Platform. */
98
+ /** Authenticated Host presentation; commands to AndCo and account ownership remain on Platform. */
87
99
  export const AndCoNativeIntentPreparationSchema = /* @__PURE__ */ v.object({
88
100
  intent: v.variant("type", [
89
101
  v.object({
90
102
  ...base,
91
103
  type: v.literal("deposit"),
92
- amount: v.nullable(v.object({ ...base.amount.entries, confirmed: v.nullable(money), frozen_at: v.nullable(text) })),
104
+ amount: v.nullable(v.object({
105
+ currency: v.literal("CLP"),
106
+ value: money,
107
+ editable: v.boolean(),
108
+ confirmed: v.nullable(money),
109
+ frozen_at: v.nullable(text),
110
+ })),
111
+ note: v.optional(v.object({ value: text, editable: v.boolean() })),
93
112
  destination: v.object({
94
113
  type: v.literal("account"),
95
114
  id: uuid,
@@ -116,29 +135,36 @@ export const AndCoNativeIntentPreparationSchema = /* @__PURE__ */ v.object({
116
135
  currency: v.literal("CLP"),
117
136
  })),
118
137
  }),
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`.
138
+ // Money leaving the sender's account towards a receiver, in Core's vocabulary (ADR 0093): whole
139
+ // pesos as integers. `amount.value` is the proposal, `amount.confirmed` what the person confirmed
140
+ // (null until then) and `settled` what it moved, null until it succeeded: a Host that reconciles
141
+ // reads `settled`.
122
142
  v.object({
123
143
  ...base,
124
144
  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 })),
145
+ amount: v.object({
146
+ currency: v.literal("CLP"),
147
+ value: PesosSchema,
148
+ editable: v.boolean(),
149
+ confirmed: v.nullable(PesosSchema),
150
+ }),
151
+ comment: v.optional(v.object({ value: text, editable: v.boolean() })),
152
+ settled: v.nullable(v.object({ currency: v.literal("CLP"), value: PesosSchema, at: text })),
127
153
  signed: v.boolean(),
128
154
  // Why only a person can release the Intent while it is `requires_action`. A Host that reads
129
155
  // `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
156
+ // command for AndCo's challenge (web AndPass and SMS code), so it sends the person to the hosted
131
157
  // page, and `confirm_transfer` answers `409` with `error.code` `interaction_required` in that case.
132
158
  interaction_reason: v.optional(v.picklist(["bank_verification_required", "source_account_required"])),
133
159
  // 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", [
160
+ // `receiver: null`; afterwards the account she wrote. Whatever it names is locked: a person
161
+ // completes a receiver, never redirects one.
162
+ receiver: v.nullable(v.variant("type", [
137
163
  v.object({ ...accountKeyAccount.entries, editable: v.literal(false) }),
138
164
  v.object({ ...idAccount.entries, editable: v.literal(false) }),
139
165
  v.object({ ...externalAccount.entries, editable: v.literal(false) }),
140
166
  ])),
141
- source: v.nullable(v.variant("type", [accountKeyAccount, idAccount])),
167
+ sender: v.nullable(v.variant("type", [accountKeyAccount, idAccount])),
142
168
  }),
143
169
  ]),
144
170
  sources: v.array(v.object({ id: uuid, number: text, name: v.nullable(text) })),
@@ -181,14 +207,14 @@ export const AndCoNativeIntentCommandSchema = /* @__PURE__ */ v.variant("action"
181
207
  // One command confirms money movement, whichever of the two forms carries it: what the person
182
208
  // decides -- which account it leaves from, how much, where it lands and under what reference -- is
183
209
  // 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`).
210
+ // editable has no separate shape here to be injected through. `receiver` is sent only for an
211
+ // Intent that left it to the screen (`receiver: null`).
186
212
  v.strictObject({
187
213
  action: v.literal("confirm_transfer"),
188
- sourceAccountId: TransferConfirmationSchema.entries.source_account_id,
214
+ senderAccountId: TransferConfirmationSchema.entries.sender_account_id,
189
215
  amount: TransferConfirmationSchema.entries.amount,
190
- destination: TransferConfirmationSchema.entries.destination,
191
- note: TransferConfirmationSchema.entries.note,
216
+ receiver: TransferConfirmationSchema.entries.receiver,
217
+ comment: TransferConfirmationSchema.entries.comment,
192
218
  }),
193
219
  v.strictObject({ action: v.literal("close_deposit") }),
194
220
  v.strictObject({
@@ -204,8 +230,8 @@ export const AndCoNativeIntentCommandSchema = /* @__PURE__ */ v.variant("action"
204
230
  }),
205
231
  ]);
206
232
  /**
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
233
+ * The rules of a command that its shape does not say: a confirmed transfer's comment is at most
234
+ * 60 bytes of UTF-8 (`comment_too_long`) and its receiver's holder name at most
209
235
  * `HOLDER_NAME_MAX_LENGTH` (`holder_name_too_long`), and `assign_deposit_credits` selects each
210
236
  * movement once (`duplicate_movement`, at the repeated entry).
211
237
  *
@@ -256,7 +282,7 @@ export function ANDCO_NATIVE_INTENT_ID(value, bankOrigin) {
256
282
  export function ANDCO_NATIVE_INTENT_PRESENTATION(value, bankOrigin, miniappOrigin) {
257
283
  const id = ANDCO_NATIVE_INTENT_ID(value, bankOrigin);
258
284
  if (!id)
259
- throw new Error("La URL no corresponde a una operación de Andco.");
285
+ throw new Error("La URL no corresponde a una operación de AndCo.");
260
286
  const url = new URL(value);
261
287
  const returnUri = new SafeURL(url.searchParams.get("return_uri") ?? "");
262
288
  const errorReturnUri = new SafeURL(url.searchParams.get("error_return_uri") ?? "");
@@ -435,49 +461,59 @@ export function ANDCO_NATIVE_INTENT_VIEW(data, now = Date.now(), observedAt = no
435
461
  (intent.status === "processing.confirmed" && data.retryable)),
436
462
  };
437
463
  }
438
- const BLANK_DESTINATION = {
439
- bank_id: "",
464
+ const BLANK_RECEIVER = {
465
+ country: "CL",
466
+ bank_code: "",
440
467
  account_type: "",
441
- account_id: "",
442
- holder_id: "",
443
- holder_name: "",
468
+ account_number: "",
469
+ name: "",
470
+ national_kind_id: "RUT",
471
+ national_id: "",
444
472
  };
445
473
  /**
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.
474
+ * Whether the person still writes where the money lands: a transfer created with `receiver: null`
475
+ * answers `receiver: null` until she confirms, and then the account she wrote.
448
476
  */
449
- function destinationIsOpen(intent) {
450
- return intent.type === "transfer" && intent.destination === null;
477
+ function receiverIsOpen(intent) {
478
+ return intent.type === "transfer" && intent.receiver === null;
451
479
  }
452
480
  /** Restores accepted command values; otherwise defaults only an unambiguous source. */
453
481
  export function ANDCO_NATIVE_INTENT_FORM(data, retry) {
454
482
  const intent = data.intent;
455
483
  if (retry?.action === "fund_deposit")
456
- return { source: retry.sourceAccountId, amount: String(retry.amount), note: retry.note ?? "", destination: null };
484
+ return { source: retry.sourceAccountId, amount: String(retry.amount), note: retry.note ?? "", receiver: null };
457
485
  const transferRetry = retry?.action === "confirm_transfer" ? retry : undefined;
458
- const retried = transferRetry?.destination;
486
+ const retried = transferRetry?.receiver;
487
+ let amount;
488
+ let note;
489
+ if (intent.type === "deposit") {
490
+ amount = data.funding?.pendingAmount ?? intent.progress.remaining ?? "";
491
+ note = intent.note?.value;
492
+ }
493
+ else {
494
+ amount = String(transferRetry?.amount ?? intent.amount.confirmed ?? intent.amount.value);
495
+ note = intent.comment?.value;
496
+ }
459
497
  return {
460
- source: transferRetry?.sourceAccountId ??
498
+ source: transferRetry?.senderAccountId ??
461
499
  data.funding?.pendingSourceId ??
462
- (intent.type !== "deposit" && intent.source?.type === "account"
463
- ? intent.source.id
500
+ (intent.type !== "deposit" && intent.sender?.type === "account"
501
+ ? intent.sender.id
464
502
  : data.sources.length === 1
465
503
  ? data.sources[0]?.id
466
504
  : undefined) ??
467
505
  "",
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)
506
+ amount,
507
+ note: transferRetry?.comment ?? data.funding?.pendingNote ?? data.confirmedNote ?? note ?? "",
508
+ receiver: receiverIsOpen(intent)
475
509
  ? {
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,
510
+ country: BLANK_RECEIVER.country,
511
+ bank_code: retried?.bank_code ?? BLANK_RECEIVER.bank_code,
512
+ account_type: retried?.account_type ?? BLANK_RECEIVER.account_type,
513
+ account_number: retried?.account_number ?? BLANK_RECEIVER.account_number,
514
+ name: retried?.name ?? BLANK_RECEIVER.name,
515
+ national_kind_id: BLANK_RECEIVER.national_kind_id,
516
+ national_id: retried?.national_id ?? BLANK_RECEIVER.national_id,
481
517
  }
482
518
  : null,
483
519
  };
@@ -485,40 +521,54 @@ export function ANDCO_NATIVE_INTENT_FORM(data, retry) {
485
521
  /** Builds an explicit command without resending frozen or non-editable values of a money movement. */
486
522
  export function ANDCO_NATIVE_INTENT_COMMAND(data, form) {
487
523
  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
- ? {
524
+ if (intent.type === "deposit") {
525
+ return v.parse(AndCoNativeIntentCommandSchema, {
494
526
  action: "fund_deposit",
495
527
  sourceAccountId: form.source,
496
528
  amount: data.funding?.pendingAmount ?? intent.progress.remaining ?? form.amount,
497
529
  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
530
  });
531
+ }
532
+ // Editability is read from the Intent the server sent and never from the form, so a screen that
533
+ // holds an edited value cannot turn a frozen amount, receiver or comment into a confirmed one.
534
+ const frozen = INTENT_STATUS_BASE(intent.status) === "processing";
535
+ const receiver = form.receiver;
536
+ let amount;
537
+ if (frozen || !intent.amount.editable) {
538
+ amount = undefined;
539
+ }
540
+ else if (/^\d+$/.test(form.amount)) {
541
+ amount = Number(form.amount);
542
+ }
543
+ else {
544
+ // Not an integer in the minor unit of the currency: the command refuses it, and the form is not valid.
545
+ amount = Number.NaN;
546
+ }
547
+ return v.parse(AndCoNativeIntentCommandSchema, {
548
+ action: "confirm_transfer",
549
+ senderAccountId: form.source || undefined,
550
+ comment: !frozen && intent.comment?.editable ? form.note : undefined,
551
+ amount,
552
+ receiver: !frozen && receiverIsOpen(intent) && receiver
553
+ ? {
554
+ type: "external",
555
+ country: receiver.country,
556
+ bank_code: receiver.bank_code,
557
+ account_type: receiver.account_type,
558
+ account_number: receiver.account_number,
559
+ name: receiver.name,
560
+ national_kind_id: receiver.national_kind_id,
561
+ national_id: receiver.national_id,
562
+ }
563
+ : undefined,
564
+ });
515
565
  }
516
566
  /** Validates the proposed command while preserving an already accepted deposit's frozen amount. */
517
567
  export function ANDCO_NATIVE_INTENT_FORM_VALID(data, form) {
518
568
  if (data.intent.type !== "deposit" && data.sourceEditable && !form.source)
519
569
  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)
570
+ // A receiver the Intent left to the person has to be written whole before there is a command.
571
+ if (receiverIsOpen(data.intent) && !form.receiver)
522
572
  return false;
523
573
  try {
524
574
  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 Core's vocabulary (`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: Core's
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 in Core's catalog. Andco is `0739`.">]>, undefined>;
120
+ readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's 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 in Core's catalog. Andco is `0739`.">]>, undefined>;
172
+ readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's 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 in Core's catalog. Andco is `0739`.">]>, undefined>;
208
+ readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's 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 in Core's catalog. Andco is `0739`.">]>, undefined>;
250
+ readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's 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,0FAA8E,CAAC;AAC5G,+FAA+F;AAC/F,eAAO,MAAM,uBAAuB,0FAGnC,CAAC;AAEF,yCAAyC;AACzC,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAKhD,uFAAuF;AACvF,eAAO,MAAM,uBAAuB,gFAAiF,CAAC;AAYtH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,iCAAkC,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAKnE;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;;aAKlC,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAEtE;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;;;;aAIzC,CAAC;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