@andco/protocol 0.0.13 → 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.
- package/README.md +2 -2
- package/dist/api-errors.d.ts +9 -9
- package/dist/api-errors.js +9 -9
- package/dist/authorization-preparation.js +2 -2
- package/dist/authorization.d.ts +1 -1
- package/dist/authorization.js +1 -1
- package/dist/consent.d.ts +2 -2
- package/dist/consent.js +2 -2
- package/dist/constants.d.ts +15 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +17 -3
- package/dist/errors.d.ts +36 -9
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +49 -11
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/intent-input.d.ts +431 -872
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +142 -121
- package/dist/miniapp-icon.js +1 -1
- package/dist/miniapp-manifest.d.ts +1 -1
- package/dist/native-intent.d.ts +82 -68
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +134 -84
- package/dist/native.d.ts +1 -1
- package/dist/rar/account-matchers.d.ts +35 -30
- package/dist/rar/account-matchers.d.ts.map +1 -1
- package/dist/rar/account-matchers.js +27 -21
- package/dist/rar/bank.d.ts +81 -81
- package/dist/rar/bank.js +1 -1
- package/dist/rar/catalog.d.ts +48 -48
- package/dist/rar/catalog.js +6 -6
- package/dist/rar/detail.d.ts +1 -1
- package/dist/rar/detail.js +1 -1
- package/dist/rar/json-schemas.generated.d.ts +1 -1
- package/dist/rar/json-schemas.generated.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.js +25 -21
- package/dist/rar/subject-data.d.ts +1 -1
- package/dist/rar/subject-data.js +1 -1
- package/dist/rar/subject.d.ts +1 -1
- package/dist/rar/subject.js +1 -1
- package/dist/rest/accounts.d.ts +28 -28
- package/dist/rest/accounts.d.ts.map +1 -1
- package/dist/rest/accounts.js +22 -22
- package/dist/rest/api-error.d.ts +1 -1
- package/dist/rest/api-error.js +1 -1
- package/dist/rest/catalog.d.ts +3 -3
- package/dist/rest/catalog.js +2 -2
- package/dist/rest/common.d.ts +3 -3
- package/dist/rest/common.js +3 -3
- package/dist/rest/contract.d.ts +905 -528
- package/dist/rest/contract.d.ts.map +1 -1
- package/dist/rest/contract.js +17 -5
- package/dist/rest/events.d.ts +1 -1
- package/dist/rest/events.d.ts.map +1 -1
- package/dist/rest/events.js +2 -2
- package/dist/rest/identity.d.ts +22 -22
- package/dist/rest/identity.js +5 -5
- package/dist/rest/index.d.ts +1 -0
- package/dist/rest/index.d.ts.map +1 -1
- package/dist/rest/index.js +1 -0
- package/dist/rest/intents.d.ts +787 -716
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +62 -53
- package/dist/rest/signatures.d.ts +11 -5
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +10 -0
- package/dist/rest/subjects.d.ts +1 -1
- package/dist/rest/subjects.d.ts.map +1 -1
- package/dist/rest/subjects.js +3 -2
- package/dist/rest/transfers.d.ts +612 -0
- package/dist/rest/transfers.d.ts.map +1 -0
- package/dist/rest/transfers.js +115 -0
- package/dist/scopes.d.ts +1 -1
- package/dist/signing.d.ts +13 -2
- package/dist/signing.d.ts.map +1 -1
- package/dist/signing.js +13 -0
- package/dist/transfer.d.ts +363 -0
- package/dist/transfer.d.ts.map +1 -0
- package/dist/transfer.js +287 -0
- package/dist/transport/financial-events.d.ts +21 -17
- package/dist/transport/financial-events.d.ts.map +1 -1
- package/dist/transport/generated/oauth-api.d.ts +1017 -194
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +28 -12
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/intents.js +1 -1
- package/dist/transport/rest.d.ts +4 -4
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/transport/rest.js +33 -4
- package/dist/urls.d.ts +25 -2
- package/dist/urls.d.ts.map +1 -1
- package/dist/urls.js +47 -4
- package/dist/userinfo.d.ts +2 -2
- package/dist/userinfo.js +2 -2
- package/dist/webhooks.d.ts +19 -15
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js +17 -15
- package/dist/window-features.d.ts +2 -2
- package/dist/window-features.js +2 -2
- package/package.json +2 -2
package/dist/native-intent.js
CHANGED
|
@@ -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
|
|
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
|
-
*
|
|
25
|
-
* person writes on the screen when the Intent left where the money lands to her (see
|
|
26
|
-
* {@link
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
|
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
|
|
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
|
|
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;
|
|
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({
|
|
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
|
|
120
|
-
//
|
|
121
|
-
// a Host that reconciles
|
|
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({
|
|
126
|
-
|
|
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
|
|
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
|
-
// `
|
|
135
|
-
// completes a
|
|
136
|
-
|
|
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
|
-
|
|
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. `
|
|
185
|
-
// Intent that left it to the screen (`
|
|
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
|
-
|
|
214
|
+
senderAccountId: TransferConfirmationSchema.entries.sender_account_id,
|
|
189
215
|
amount: TransferConfirmationSchema.entries.amount,
|
|
190
|
-
|
|
191
|
-
|
|
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
|
|
208
|
-
*
|
|
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
|
|
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
|
|
439
|
-
|
|
464
|
+
const BLANK_RECEIVER = {
|
|
465
|
+
country: "CL",
|
|
466
|
+
bank_code: "",
|
|
440
467
|
account_type: "",
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
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 `
|
|
447
|
-
* answers `
|
|
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
|
|
450
|
-
return intent.type === "transfer" && intent.
|
|
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 ?? "",
|
|
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?.
|
|
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?.
|
|
498
|
+
source: transferRetry?.senderAccountId ??
|
|
461
499
|
data.funding?.pendingSourceId ??
|
|
462
|
-
(intent.type !== "deposit" && intent.
|
|
463
|
-
? intent.
|
|
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
|
|
469
|
-
|
|
470
|
-
|
|
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
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
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
|
-
|
|
489
|
-
|
|
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
|
|
521
|
-
if (
|
|
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
|
|
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
|
|
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
|
-
/**
|
|
30
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
107
|
-
*
|
|
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",
|
|
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
|
|
115
|
-
readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.
|
|
116
|
-
readonly
|
|
117
|
-
readonly
|
|
118
|
-
readonly
|
|
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
|
|
167
|
-
readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.
|
|
168
|
-
readonly
|
|
169
|
-
readonly
|
|
170
|
-
readonly
|
|
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
|
|
203
|
-
readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.
|
|
204
|
-
readonly
|
|
205
|
-
readonly
|
|
206
|
-
readonly
|
|
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
|
|
245
|
-
readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.
|
|
246
|
-
readonly
|
|
247
|
-
readonly
|
|
248
|
-
readonly
|
|
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
|
|
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;
|
|
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;AAG3D;;;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;;;GAGG;AACH,eAAO,MAAM,uBAAuB,iFAAkF,CAAC;AAYvH;;;;;;;;;;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;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;AAEpF;;;GAGG;A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