@andco/protocol 0.0.15 → 0.1.0-ti.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authorization-preparation.d.ts +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -1
- package/dist/intent-input.d.ts +67 -54
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +39 -23
- package/dist/intent-status.d.ts +5 -6
- package/dist/intent-status.d.ts.map +1 -1
- package/dist/intent-status.js +12 -7
- package/dist/miniapp-manifest.d.ts +2 -2
- package/dist/miniapp-manifest.js +1 -1
- package/dist/native-intent.d.ts +12 -12
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +7 -4
- package/dist/rar/account-matchers.d.ts +10 -10
- package/dist/rar/account-matchers.js +2 -2
- package/dist/rar/bank.d.ts +284 -12
- package/dist/rar/bank.d.ts.map +1 -1
- package/dist/rar/bank.js +42 -4
- package/dist/rar/catalog.d.ts +130 -5
- package/dist/rar/catalog.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.js +372 -4
- package/dist/rar/money.d.ts +1 -1
- package/dist/rar/money.js +1 -1
- package/dist/rar/subject-data.d.ts +1 -1
- package/dist/rar/subject-data.js +1 -1
- package/dist/rest/accounts.d.ts +3 -3
- package/dist/rest/accounts.js +1 -1
- package/dist/rest/catalog.d.ts +3 -3
- package/dist/rest/catalog.js +2 -2
- package/dist/rest/contract.d.ts +561 -302
- package/dist/rest/contract.d.ts.map +1 -1
- package/dist/rest/contract.js +6 -2
- package/dist/rest/identity.d.ts +22 -22
- package/dist/rest/identity.d.ts.map +1 -1
- package/dist/rest/identity.js +4 -4
- package/dist/rest/intents.d.ts +301 -142
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +66 -52
- package/dist/rest/signatures.d.ts +19 -5
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +47 -5
- package/dist/rest/transfers.d.ts +738 -362
- package/dist/rest/transfers.d.ts.map +1 -1
- package/dist/rest/transfers.js +71 -44
- package/dist/signing.d.ts +6 -2
- package/dist/signing.d.ts.map +1 -1
- package/dist/signing.js +2 -1
- package/dist/transfer.d.ts +101 -65
- package/dist/transfer.d.ts.map +1 -1
- package/dist/transfer.js +69 -43
- package/dist/transport/financial-events.d.ts +64 -13
- package/dist/transport/financial-events.d.ts.map +1 -1
- package/dist/transport/financial-events.js +34 -0
- package/dist/transport/generated/oauth-api.d.ts +352 -88
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +6 -6
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/rest.d.ts +4 -4
- package/package.json +1 -1
package/dist/intent-input.js
CHANGED
|
@@ -25,7 +25,7 @@ export const IntentAmountSchema = /* @__PURE__ */ v.pipe(v.strictObject({
|
|
|
25
25
|
* AndCo's confirmation screen, and `value` is the initial proposal shown there; the server checks it
|
|
26
26
|
* against the Grant's `transactions.minimum` and `transactions.maximum` and the balance.
|
|
27
27
|
* Without `editable` (or with `false`) the amount is locked. What moved is `settled`. `value` is
|
|
28
|
-
* an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
28
|
+
* an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647.
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* const amount = { currency: "CLP", value: 40000, editable: true };
|
|
@@ -34,14 +34,14 @@ export const TransferAmountProposalSchema = /* @__PURE__ */ v.pipe(v.strictObjec
|
|
|
34
34
|
currency: v.literal("CLP"),
|
|
35
35
|
value: PesosSchema,
|
|
36
36
|
editable: v.pipe(v.optional(v.boolean(), false), v.description("Defaults to false when omitted.")),
|
|
37
|
-
}), v.description("The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
37
|
+
}), v.description("The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`."));
|
|
38
38
|
/**
|
|
39
39
|
* An amount with nothing left for a person to change: the same `{ currency, value }` as a request,
|
|
40
40
|
* without `editable`. It is how an event reports an amount.
|
|
41
41
|
*/
|
|
42
42
|
export const SignedAmountSchema = /* @__PURE__ */ v.pipe(v.strictObject({ currency: v.literal("CLP"), value: MoneySchema }), v.description("An amount with nothing left for a person to change: the same `{ currency, value }` as a request, without `editable`."));
|
|
43
43
|
/**
|
|
44
|
-
* The comment a transfer asks for
|
|
44
|
+
* The comment a transfer asks for: at most 60 bytes of UTF-8, which is a rule
|
|
45
45
|
* (`comment_too_long`). `editable: true` lets the person who confirms change it.
|
|
46
46
|
*
|
|
47
47
|
* @example
|
|
@@ -50,7 +50,7 @@ export const SignedAmountSchema = /* @__PURE__ */ v.pipe(v.strictObject({ curren
|
|
|
50
50
|
export const TransferCommentProposalSchema = /* @__PURE__ */ v.pipe(v.strictObject({
|
|
51
51
|
value: v.pipe(v.pipe(v.string(), v.trim()), v.description("Trimmed comment. An empty one is allowed.")),
|
|
52
52
|
editable: v.pipe(v.optional(v.boolean(), false), v.description("Defaults to false when omitted.")),
|
|
53
|
-
}), v.description("The comment a transfer asks for
|
|
53
|
+
}), v.description("The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation."));
|
|
54
54
|
// `MoneySchema`'s pattern is the whole bound of an amount: at most 15 digits, which also keeps every
|
|
55
55
|
// value inside `Number.MAX_SAFE_INTEGER` for whoever converts it. JSON Schema says the same pattern,
|
|
56
56
|
// so no numeric check sits on top, and an amount never goes through `Number()` here.
|
|
@@ -69,7 +69,7 @@ export const IntentNoteSchema = /* @__PURE__ */ v.pipe(v.strictObject({
|
|
|
69
69
|
/**
|
|
70
70
|
* The account a transfer names, in the vocabulary of the `bank_transfer` matchers it has to fit:
|
|
71
71
|
* `{ type: "account_key", accountKey }` and `{ type: "account", id }` name one AndCo account, and
|
|
72
|
-
* `{ type: "external", ... }` names a Receptor at a Chilean bank in
|
|
72
|
+
* `{ type: "external", ... }` names a Receptor at a Chilean bank in the transfer vocabulary of the API,
|
|
73
73
|
* with every field the `external` matcher can fix. A transfer names exactly one account, so nothing
|
|
74
74
|
* here is a pattern.
|
|
75
75
|
*
|
|
@@ -97,10 +97,10 @@ export const IntentAccountKeySchema = /* @__PURE__ */ v.pipe(v.strictObject(tran
|
|
|
97
97
|
/** One AndCo account, named by its identifier. */
|
|
98
98
|
export const IntentAccountIdSchema = /* @__PURE__ */ v.pipe(v.strictObject(transferAccount), v.description("One AndCo account, named by its identifier."));
|
|
99
99
|
/**
|
|
100
|
-
* A Receptor at a Chilean bank, in
|
|
100
|
+
* A Receptor at a Chilean bank, in the transfer vocabulary of the API: the fields of a transfer's `receiver` without the
|
|
101
101
|
* amount, which the Intent carries apart. `country` and `national_kind_id` are always declared.
|
|
102
102
|
*/
|
|
103
|
-
export const IntentAccountExternalSchema = /* @__PURE__ */ v.pipe(v.strictObject(transferExternal), v.description('A Receptor at a Chilean bank, in
|
|
103
|
+
export const IntentAccountExternalSchema = /* @__PURE__ */ v.pipe(v.strictObject(transferExternal), v.description('A Receptor at a Chilean bank, in the transfer vocabulary of the API (`receiver` without the amount): the four-digit `bank_code` (AndCo is `0739`), the `account_type` code (`"10"` savings, `"20"` checking, `"40"` debit), the `account_number`, and the holder\'s `name` and RUT. `country` and `national_kind_id` are always declared. It carries every field a `bank_transfer` `external` matcher can fix, so the Grant\'s destinations are asked about exactly this account.'));
|
|
104
104
|
/**
|
|
105
105
|
* One AndCo account of the Grant's subject, named by Account Key or by identifier: where a
|
|
106
106
|
* transfer's money leaves from, where a deposit lands, and the account a closure closes.
|
|
@@ -113,7 +113,7 @@ const andcoAccount = IntentAccountSchema;
|
|
|
113
113
|
/** The Remitente of a transfer Intent: always an AndCo account of the Grant's subject. */
|
|
114
114
|
const transferSender = andcoAccount;
|
|
115
115
|
/** The Receptor of a transfer, with nothing left to complete: how an event reports it. */
|
|
116
|
-
export const TransferIntentReceiverSchema = /* @__PURE__ */ v.pipe(v.variant("type", [IntentAccountKeySchema, IntentAccountIdSchema, IntentAccountExternalSchema]), v.description("The Receptor of a transfer, in the `bank_transfer` matcher vocabulary: an AndCo account by AccountKey or identifier, or a Receptor at a Chilean bank in
|
|
116
|
+
export const TransferIntentReceiverSchema = /* @__PURE__ */ v.pipe(v.variant("type", [IntentAccountKeySchema, IntentAccountIdSchema, IntentAccountExternalSchema]), v.description("The Receptor of a transfer, in the `bank_transfer` matcher vocabulary: an AndCo account by AccountKey or identifier, or a Receptor at a Chilean bank in the transfer vocabulary of the API."));
|
|
117
117
|
/**
|
|
118
118
|
* The Receptor of a proposed transfer when the request names it: locked on the confirmation screen,
|
|
119
119
|
* which shows it and lets the person confirm it or not. `editable` only accepts `false`: a named
|
|
@@ -193,7 +193,7 @@ export const TransferIntentCreateSchema = /* @__PURE__ */ v.pipe(withOneExpirati
|
|
|
193
193
|
// the Grant's destinations. A named one is locked there.
|
|
194
194
|
receiver: v.pipe(v.optional(v.nullable(proposedTransferReceiver), null), v.description("The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.")),
|
|
195
195
|
comment: v.optional(TransferCommentProposalSchema),
|
|
196
|
-
}, expiresAtOrNever), v.description("The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in
|
|
196
|
+
}, expiresAtOrNever), v.description("The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in the transfer vocabulary of the API: `sender`, `receiver`, an integer `amount.value` and a `comment` of at most 60 bytes. A null `sender` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `receiver` is the screen too: the person completes where the money goes (the bank, the type and number of the account, and its holder's RUT and name), and the server checks what she wrote against the Grant's `destinations` when she confirms, refusing one outside them with `invalid_destination`. Both default to null when omitted. A Receptor the request names is locked on the screen (`editable: true` is an `invalid_request`), and the amount is too unless `amount.editable` is true, in which case the person sets it. A Receptor at a bank is named in the transfer vocabulary of the API (`IntentAccountExternal`). A signed transfer is not an Intent: it is submitted to `POST /transfers` as a `SignedTransferEnvelope`."));
|
|
197
197
|
/** A proposal to open a cuenta digital, born waiting for an Approval. See {@link IntentCreateSchema}. */
|
|
198
198
|
export const AccountOpeningIntentCreateSchema = /* @__PURE__ */ v.pipe(withOneExpiration({
|
|
199
199
|
...common,
|
|
@@ -217,7 +217,7 @@ export const AccountClosureIntentCreateSchema = /* @__PURE__ */ v.pipe(withOneEx
|
|
|
217
217
|
*
|
|
218
218
|
* `transfer` is the only way money movement is expressed: money leaving a `sender` account towards a
|
|
219
219
|
* `receiver`, both named in the `bank_transfer` matcher vocabulary (`account_key`, `account`,
|
|
220
|
-
* `external`, whose Receptor speaks
|
|
220
|
+
* `external`, whose Receptor speaks the transfer vocabulary of the API). A null `sender` is the confirmation screen's
|
|
221
221
|
* source picker, and a null `receiver` is the screen's receiver form: the person completes where the
|
|
222
222
|
* money goes (another bank's account, or another AndCo customer's), and the server checks what she
|
|
223
223
|
* wrote against the Grant's `destinations` when she confirms. Both are the screen's when omitted. A
|
|
@@ -311,7 +311,7 @@ function metadataIssues(metadata) {
|
|
|
311
311
|
* - `invalid_expiration_datetime`: `expires_at` is not a real calendar datetime with a timezone.
|
|
312
312
|
* - `note_too_long`: the note of a deposit or an account Intent has more than {@link NOTE_MAX_LENGTH}
|
|
313
313
|
* code points.
|
|
314
|
-
* - `comment_too_long`: a transfer's comment has more than 60 bytes of UTF-8
|
|
314
|
+
* - `comment_too_long`: a transfer's comment has more than 60 bytes of UTF-8.
|
|
315
315
|
* - `name_too_long`: an account opening's `name` has more than {@link ACCOUNT_NAME_MAX_LENGTH} code points.
|
|
316
316
|
* - `holder_name_too_long`: an external Receptor's holder `name` has more than
|
|
317
317
|
* {@link HOLDER_NAME_MAX_LENGTH} code points.
|
|
@@ -386,8 +386,8 @@ export const SignedAccountClosureIntentClaimsSchema = /* @__PURE__ */ v.pipe(wit
|
|
|
386
386
|
* The verified claims of a Signed Instruction: the `application/jwt` half of the same creation, for
|
|
387
387
|
* opening and closing an account.
|
|
388
388
|
*
|
|
389
|
-
* A signed transfer is not here: it is a Transfer of its own,
|
|
390
|
-
* `SignedTransferEnvelope` whose claims are `SignedTransferClaims
|
|
389
|
+
* A signed transfer is not here: it is a Transfer of its own, submitted to `POST /transfers` as a
|
|
390
|
+
* `SignedTransferEnvelope` whose claims are `SignedTransferClaims`.
|
|
391
391
|
*
|
|
392
392
|
* There is no `org_id`: the subject is the one of the Grant behind the access token that submits the
|
|
393
393
|
* instruction, and nothing inside the signature may name another.
|
|
@@ -434,24 +434,28 @@ export function signedIntentInputIssues(input) {
|
|
|
434
434
|
export function parseSignedIntentInput(input) {
|
|
435
435
|
return parseWithRules(SignedIntentSchema, signedIntentInputIssues, input);
|
|
436
436
|
}
|
|
437
|
-
/**
|
|
438
|
-
|
|
437
|
+
/**
|
|
438
|
+
* Why an Intent is cancelled or rejected: optional, and when given trimmed and never blank. Its length
|
|
439
|
+
* is a rule.
|
|
440
|
+
*/
|
|
441
|
+
const decisionReason = /* @__PURE__ */ v.optional(v.pipe(v.string(), v.trim(), v.minLength(1)));
|
|
439
442
|
/**
|
|
440
443
|
* The rule of a Cancellation's or a Rejection's reason that JSON Schema does not say in code points
|
|
441
444
|
* the way the server counts them: `reason_too_long`, past {@link REASON_MAX_LENGTH}.
|
|
442
445
|
*/
|
|
443
446
|
export function intentDecisionIssues(input) {
|
|
444
|
-
if (codePoints(input.reason) <= REASON_MAX_LENGTH)
|
|
447
|
+
if (input.reason === undefined || codePoints(input.reason) <= REASON_MAX_LENGTH)
|
|
445
448
|
return [];
|
|
446
449
|
return [{ type: "reason_too_long", path: [{ key: "reason" }], requirement: REASON_MAX_LENGTH }];
|
|
447
450
|
}
|
|
448
451
|
/**
|
|
449
|
-
* Cancelling
|
|
450
|
-
*
|
|
452
|
+
* Cancelling may say why: the reason is optional, and when given it has 1 to 280 code points. A
|
|
453
|
+
* Cancellation is the creator withdrawing its own request: only the client that created the
|
|
451
454
|
* Intent may cancel it. An approver declining it is a Rejection ({@link IntentRejectionSchema}).
|
|
452
455
|
*
|
|
453
456
|
* @example
|
|
454
457
|
* parseIntentCancellation({ reason: "rejected_by_erp" });
|
|
458
|
+
* parseIntentCancellation({}); // a reason is optional
|
|
455
459
|
*/
|
|
456
460
|
export const IntentCancellationSchema = /* @__PURE__ */ v.strictObject({ reason: decisionReason });
|
|
457
461
|
/** Parses a cancellation: its shape and then {@link intentDecisionIssues}. */
|
|
@@ -459,12 +463,14 @@ export function parseIntentCancellation(input) {
|
|
|
459
463
|
return parseWithRules(IntentCancellationSchema, intentDecisionIssues, input);
|
|
460
464
|
}
|
|
461
465
|
/**
|
|
462
|
-
* Rejecting
|
|
466
|
+
* Rejecting may say why: the reason is optional, and when given it has 1 to 280 code points. A
|
|
467
|
+
* Rejection is an approver declining an Intent with a Grant holding the
|
|
463
468
|
* family's `reject` action (`bank_transfer` for a transfer); the audit keeps it apart from a
|
|
464
469
|
* Cancellation, which is the creator withdrawing its own request.
|
|
465
470
|
*
|
|
466
471
|
* @example
|
|
467
472
|
* parseIntentRejection({ reason: "duplicated_invoice" });
|
|
473
|
+
* parseIntentRejection({}); // a reason is optional
|
|
468
474
|
*/
|
|
469
475
|
export const IntentRejectionSchema = /* @__PURE__ */ v.strictObject({ reason: decisionReason });
|
|
470
476
|
/** Parses a rejection: its shape and then {@link intentDecisionIssues}. */
|
|
@@ -504,12 +510,22 @@ export const ANDCO_INTENT_ERROR_CODES = {
|
|
|
504
510
|
OWN_ACCOUNT_TRANSFER_NOT_IMPLEMENTED: "own_account_transfer_not_implemented",
|
|
505
511
|
/**
|
|
506
512
|
* A signed transfer that leaves its holder (to another bank or to another AndCo customer) moves
|
|
507
|
-
* only where AndCo
|
|
513
|
+
* only where AndCo serves that rail. Where it does not, `POST /transfers`
|
|
508
514
|
* answers `not_implemented` (501) with this stable `code` once the instruction verified and the
|
|
509
515
|
* Grant covers it, and nothing is created. A signed transfer between two accounts of the same
|
|
510
516
|
* holder is not affected.
|
|
511
517
|
*/
|
|
512
518
|
SIGNED_OUTGOING_TRANSFER_NOT_IMPLEMENTED: "signed_outgoing_transfer_not_implemented",
|
|
519
|
+
/**
|
|
520
|
+
* `POST /transfers` answers `400` with this code for a signed transfer with `approved: false`: that
|
|
521
|
+
* transfer waits for a decision, so it is an Intent. Send it to `POST /intents`. Nothing is recorded.
|
|
522
|
+
*/
|
|
523
|
+
APPROVAL_REQUIRED_USE_INTENTS: "approval_required_use_intents",
|
|
524
|
+
/**
|
|
525
|
+
* `POST /intents` answers `400` with this code for a signed transfer with `approved: true`: its
|
|
526
|
+
* signature is the approval, so it is a Transfer. Send it to `POST /transfers`. Nothing is recorded.
|
|
527
|
+
*/
|
|
528
|
+
APPROVED_USE_TRANSFERS: "approved_use_transfers",
|
|
513
529
|
};
|
|
514
530
|
/**
|
|
515
531
|
* Identifies recognized unsupported Intents without silently dropping their extra instructions: an
|
|
@@ -546,14 +562,14 @@ export const TransferConfirmationSchema = /* @__PURE__ */ v.strictObject({
|
|
|
546
562
|
intent_id: accountId,
|
|
547
563
|
sender_account_id: v.optional(accountId),
|
|
548
564
|
amount: v.optional(PesosSchema),
|
|
549
|
-
// What the person wrote is always a Receptor at a bank, in
|
|
550
|
-
// another
|
|
565
|
+
// What the person wrote is always a Receptor at a bank, in the transfer vocabulary of the API:
|
|
566
|
+
// another bank's, or another AndCo customer's with bank code `0739`. An AndCo account of the Grant's subject is not
|
|
551
567
|
// offered on the screen yet.
|
|
552
568
|
receiver: v.optional(v.strictObject(transferExternal)),
|
|
553
569
|
comment: v.optional(noteText),
|
|
554
570
|
});
|
|
555
571
|
/**
|
|
556
|
-
* The rules of a confirmation that JSON Schema does not say: `comment_too_long`, past
|
|
572
|
+
* The rules of a confirmation that JSON Schema does not say: `comment_too_long`, past 60 bytes
|
|
557
573
|
* of UTF-8, and `holder_name_too_long`, past {@link HOLDER_NAME_MAX_LENGTH} code points.
|
|
558
574
|
*/
|
|
559
575
|
export function transferConfirmationIssues(input) {
|
package/dist/intent-status.d.ts
CHANGED
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* The lifecycle stage of an Intent status: what precedes the first dot of `<base>[.<detail>]`.
|
|
3
3
|
*
|
|
4
4
|
* Decide on the base, or with {@link IS_INTENT_TERMINAL_STATUS}, never with an exhaustive `switch` over
|
|
5
|
-
* the whole status: its vocabulary is open, and
|
|
6
|
-
* that no enum lists.
|
|
5
|
+
* the whole status: its vocabulary is open, and a detail can be one that no enum lists yet.
|
|
7
6
|
*
|
|
8
7
|
* @example
|
|
9
8
|
* ```ts
|
|
@@ -14,15 +13,15 @@
|
|
|
14
13
|
export declare function INTENT_STATUS_BASE(status: string): string;
|
|
15
14
|
/**
|
|
16
15
|
* Whether an Intent status is one the Intent never leaves, decided by its base alone so a detail the
|
|
17
|
-
* server adds later is never misread: `
|
|
18
|
-
* `
|
|
19
|
-
* `processing` are not. Use it, and {@link INTENT_STATUS_BASE}, instead of an exhaustive `switch` over
|
|
16
|
+
* server adds later is never misread: `approved`, `completed`, `closed`, `cancelled`, `rejected` and
|
|
17
|
+
* `expired` are terminal with or without a detail (so are `succeeded` and `failed`, which only the
|
|
18
|
+
* native presentation reports); `requires_action` and `processing` are not. Use it, and {@link INTENT_STATUS_BASE}, instead of an exhaustive `switch` over
|
|
20
19
|
* the whole status, whose vocabulary is open.
|
|
21
20
|
*
|
|
22
21
|
* @example
|
|
23
22
|
* ```ts
|
|
24
23
|
* IS_INTENT_TERMINAL_STATUS("cancelled.grant_revoked"); // true
|
|
25
|
-
* IS_INTENT_TERMINAL_STATUS("
|
|
24
|
+
* IS_INTENT_TERMINAL_STATUS("approved"); // true: an Intent ends at its decision
|
|
26
25
|
* ```
|
|
27
26
|
*/
|
|
28
27
|
export declare function IS_INTENT_TERMINAL_STATUS(status: string): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-status.d.ts","sourceRoot":"","sources":["../src/intent-status.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"intent-status.d.ts","sourceRoot":"","sources":["../src/intent-status.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEjE"}
|
package/dist/intent-status.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The bases of an Intent status that never change again. `requires_action` does, and so does
|
|
3
|
+
* `processing`, a word that the native presentation still reports. An Intent ends at its decision, so
|
|
4
|
+
* `approved` is final: the outcome of what it asked for is on a Transfer, or beside `approved` on an
|
|
5
|
+
* account opening or closure. `succeeded` and `failed` stay in the set for the native presentation.
|
|
6
|
+
*/
|
|
2
7
|
const TERMINAL_INTENT_STATUS_BASES = /* @__PURE__ */ new Set([
|
|
8
|
+
"approved",
|
|
3
9
|
"succeeded",
|
|
4
10
|
"completed",
|
|
5
11
|
"closed",
|
|
@@ -12,8 +18,7 @@ const TERMINAL_INTENT_STATUS_BASES = /* @__PURE__ */ new Set([
|
|
|
12
18
|
* The lifecycle stage of an Intent status: what precedes the first dot of `<base>[.<detail>]`.
|
|
13
19
|
*
|
|
14
20
|
* Decide on the base, or with {@link IS_INTENT_TERMINAL_STATUS}, never with an exhaustive `switch` over
|
|
15
|
-
* the whole status: its vocabulary is open, and
|
|
16
|
-
* that no enum lists.
|
|
21
|
+
* the whole status: its vocabulary is open, and a detail can be one that no enum lists yet.
|
|
17
22
|
*
|
|
18
23
|
* @example
|
|
19
24
|
* ```ts
|
|
@@ -26,15 +31,15 @@ export function INTENT_STATUS_BASE(status) {
|
|
|
26
31
|
}
|
|
27
32
|
/**
|
|
28
33
|
* Whether an Intent status is one the Intent never leaves, decided by its base alone so a detail the
|
|
29
|
-
* server adds later is never misread: `
|
|
30
|
-
* `
|
|
31
|
-
* `processing` are not. Use it, and {@link INTENT_STATUS_BASE}, instead of an exhaustive `switch` over
|
|
34
|
+
* server adds later is never misread: `approved`, `completed`, `closed`, `cancelled`, `rejected` and
|
|
35
|
+
* `expired` are terminal with or without a detail (so are `succeeded` and `failed`, which only the
|
|
36
|
+
* native presentation reports); `requires_action` and `processing` are not. Use it, and {@link INTENT_STATUS_BASE}, instead of an exhaustive `switch` over
|
|
32
37
|
* the whole status, whose vocabulary is open.
|
|
33
38
|
*
|
|
34
39
|
* @example
|
|
35
40
|
* ```ts
|
|
36
41
|
* IS_INTENT_TERMINAL_STATUS("cancelled.grant_revoked"); // true
|
|
37
|
-
* IS_INTENT_TERMINAL_STATUS("
|
|
42
|
+
* IS_INTENT_TERMINAL_STATUS("approved"); // true: an Intent ends at its decision
|
|
38
43
|
* ```
|
|
39
44
|
*/
|
|
40
45
|
export function IS_INTENT_TERMINAL_STATUS(status) {
|
|
@@ -16,7 +16,7 @@ export declare const AndCoOAuthScopePolicySchema: v.ObjectSchema<{
|
|
|
16
16
|
readonly scope: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
17
17
|
readonly mode: v.PicklistSchema<["optional", "default", "required"], undefined>;
|
|
18
18
|
}, undefined>;
|
|
19
|
-
/** Public, non-secret OAuth registration returned by
|
|
19
|
+
/** Public, non-secret OAuth registration returned by the Platform. */
|
|
20
20
|
export declare const AndCoOAuthClientConfigurationSchema: v.ObjectSchema<{
|
|
21
21
|
readonly client_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 255, undefined>]>;
|
|
22
22
|
readonly client_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 256, undefined>]>;
|
|
@@ -64,7 +64,7 @@ export declare const AndCoMiniappManifestSchema: v.ObjectSchema<{
|
|
|
64
64
|
}, undefined>;
|
|
65
65
|
/** Parsed Miniapp Descriptor consumed by AndCo Host Applications. */
|
|
66
66
|
export type AndCoMiniappManifest = v.InferOutput<typeof AndCoMiniappManifestSchema>;
|
|
67
|
-
/** Public OAuth registration loaded from
|
|
67
|
+
/** Public OAuth registration loaded from the Platform. */
|
|
68
68
|
export type AndCoOAuthClientConfiguration = v.InferOutput<typeof AndCoOAuthClientConfigurationSchema>;
|
|
69
69
|
/** Server-authoritative permission policy used by a Host consent surface. */
|
|
70
70
|
export type AndCoOAuthScopePolicy = v.InferOutput<typeof AndCoOAuthScopePolicySchema>;
|
package/dist/miniapp-manifest.js
CHANGED
|
@@ -20,7 +20,7 @@ export const AndCoOAuthScopePolicySchema = /* @__PURE__ */ v.object({
|
|
|
20
20
|
scope: v.pipe(v.string(), v.regex(ANDCO_SCOPE_REGEX)),
|
|
21
21
|
mode: OAuthScopeModeSchema,
|
|
22
22
|
});
|
|
23
|
-
/** Public, non-secret OAuth registration returned by
|
|
23
|
+
/** Public, non-secret OAuth registration returned by the Platform. */
|
|
24
24
|
export const AndCoOAuthClientConfigurationSchema = /* @__PURE__ */ v.object({
|
|
25
25
|
client_id: v.pipe(v.string(), v.minLength(1), v.maxLength(255)),
|
|
26
26
|
client_name: NonEmptyTextSchema,
|
package/dist/native-intent.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
|
|
|
50
50
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
51
51
|
}, undefined>, undefined>;
|
|
52
52
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
53
|
-
readonly status: v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "completed", "closed", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>;
|
|
53
|
+
readonly status: v.PicklistSchema<["requires_action", "approved", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "completed", "closed", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "rejected", "expired"], undefined>;
|
|
54
54
|
readonly fee: v.ObjectSchema<{
|
|
55
55
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
56
56
|
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -66,9 +66,9 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
|
|
|
66
66
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
67
67
|
readonly amount: v.ObjectSchema<{
|
|
68
68
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
69
|
-
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647
|
|
69
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
70
70
|
readonly editable: v.BooleanSchema<undefined>;
|
|
71
|
-
readonly confirmed: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647
|
|
71
|
+
readonly confirmed: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>;
|
|
72
72
|
}, undefined>;
|
|
73
73
|
readonly comment: v.OptionalSchema<v.ObjectSchema<{
|
|
74
74
|
readonly value: v.StringSchema<undefined>;
|
|
@@ -76,7 +76,7 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
|
|
|
76
76
|
}, undefined>, undefined>;
|
|
77
77
|
readonly settled: v.NullableSchema<v.ObjectSchema<{
|
|
78
78
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
79
|
-
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647
|
|
79
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
80
80
|
readonly at: v.StringSchema<undefined>;
|
|
81
81
|
}, undefined>, undefined>;
|
|
82
82
|
readonly signed: v.BooleanSchema<undefined>;
|
|
@@ -108,7 +108,7 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
|
|
|
108
108
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
109
109
|
}, undefined>], undefined>, undefined>;
|
|
110
110
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
111
|
-
readonly status: v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "completed", "closed", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>;
|
|
111
|
+
readonly status: v.PicklistSchema<["requires_action", "approved", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "completed", "closed", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "rejected", "expired"], undefined>;
|
|
112
112
|
readonly fee: v.ObjectSchema<{
|
|
113
113
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
114
114
|
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -171,12 +171,12 @@ export declare const AndCoNativeIntentCommandSchema: v.VariantSchema<"action", [
|
|
|
171
171
|
}, undefined>, v.StrictObjectSchema<{
|
|
172
172
|
readonly action: v.LiteralSchema<"confirm_transfer", undefined>;
|
|
173
173
|
readonly senderAccountId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
174
|
-
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647
|
|
174
|
+
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>;
|
|
175
175
|
readonly receiver: v.OptionalSchema<v.StrictObjectSchema<{
|
|
176
176
|
type: v.LiteralSchema<"external", undefined>;
|
|
177
177
|
country: v.LiteralSchema<"CL", undefined>;
|
|
178
|
-
bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
179
|
-
account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
178
|
+
bank_code: 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`.">]>;
|
|
179
|
+
account_type: 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).">]>;
|
|
180
180
|
account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
181
181
|
name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
182
182
|
national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -288,7 +288,7 @@ export declare function requestAndCoNativeIntent(options: {
|
|
|
288
288
|
currency: "CLP";
|
|
289
289
|
}[];
|
|
290
290
|
id: string;
|
|
291
|
-
status: "completed" | "succeeded" | "closed" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
291
|
+
status: "completed" | "approved" | "succeeded" | "closed" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
292
292
|
fee: {
|
|
293
293
|
currency: "CLP";
|
|
294
294
|
amount: string;
|
|
@@ -346,7 +346,7 @@ export declare function requestAndCoNativeIntent(options: {
|
|
|
346
346
|
id: string;
|
|
347
347
|
} | null;
|
|
348
348
|
id: string;
|
|
349
|
-
status: "completed" | "succeeded" | "closed" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
349
|
+
status: "completed" | "approved" | "succeeded" | "closed" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
350
350
|
fee: {
|
|
351
351
|
currency: "CLP";
|
|
352
352
|
amount: string;
|
|
@@ -433,9 +433,9 @@ export declare function ANDCO_NATIVE_INTENT_VIEW(data: AndCoNativeIntentPreparat
|
|
|
433
433
|
};
|
|
434
434
|
/**
|
|
435
435
|
* Where the money lands, as the person writes it on a screen when the Intent left it to her: a
|
|
436
|
-
* Receptor at a bank in
|
|
436
|
+
* Receptor at a bank in the transfer vocabulary of the API, field by field, with every field she writes empty until
|
|
437
437
|
* she writes it. `bank_code` is the `id` of one of the preparation's `banks`, and `account_type` is
|
|
438
|
-
*
|
|
438
|
+
* the account type code (`"10"` savings, `"20"` checking, `"40"` debit). The country and the kind of document
|
|
439
439
|
* are fixed: Chile and the RUT are the only ones. It is `null` in an {@link AndCoNativeIntentForm}
|
|
440
440
|
* when the Intent named its receiver, because a named receiver is shown, never edited.
|
|
441
441
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-intent.d.ts","sourceRoot":"","sources":["../src/native-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,OAAO,EAAmB,KAAK,KAAK,EAAY,KAAK,WAAW,EAAkB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"native-intent.d.ts","sourceRoot":"","sources":["../src/native-intent.ts"],"names":[],"mappings":"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"}
|
package/dist/native-intent.js
CHANGED
|
@@ -23,7 +23,7 @@ const accountType = /* @__PURE__ */ v.picklist(["checking", "debit", "savings"])
|
|
|
23
23
|
const accountKeyAccount = /* @__PURE__ */ v.object({ type: v.literal("account_key"), accountKey: text });
|
|
24
24
|
const idAccount = /* @__PURE__ */ v.object({ type: v.literal("account"), id: uuid });
|
|
25
25
|
/**
|
|
26
|
-
* A Receptor at a bank, in
|
|
26
|
+
* A Receptor at a bank, in the transfer vocabulary of the API, with every field the `external` matcher can fix. It is
|
|
27
27
|
* also what a person writes on the screen when the Intent left where the money lands to her (see
|
|
28
28
|
* {@link AndCoNativeIntentReceiver}), so a transfer's answered receiver and the command that
|
|
29
29
|
* completes it share one shape.
|
|
@@ -42,6 +42,8 @@ const base = {
|
|
|
42
42
|
id: uuid,
|
|
43
43
|
status: v.picklist([
|
|
44
44
|
"requires_action",
|
|
45
|
+
// The decision word of an Intent that a person or a credential approved: an Intent ends there.
|
|
46
|
+
"approved",
|
|
45
47
|
"processing.confirmed",
|
|
46
48
|
"processing.settling",
|
|
47
49
|
"processing.reversing",
|
|
@@ -61,8 +63,8 @@ const base = {
|
|
|
61
63
|
// A transfer between own accounts AndCo stopped half way, and the ways an opening can fail.
|
|
62
64
|
"failed.bank_review_required",
|
|
63
65
|
"failed.own_account_transfer_not_implemented",
|
|
64
|
-
// A signed Transfer that leaves its holder:
|
|
65
|
-
// refused
|
|
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
|
|
66
68
|
// expired before it executed. No money moved.
|
|
67
69
|
"failed.bank_challenge_required",
|
|
68
70
|
"failed.unknown_key",
|
|
@@ -86,6 +88,7 @@ const base = {
|
|
|
86
88
|
"cancelled",
|
|
87
89
|
"cancelled.grant_revoked",
|
|
88
90
|
"cancelled.grant_expired",
|
|
91
|
+
"cancelled.migration",
|
|
89
92
|
"rejected",
|
|
90
93
|
"expired",
|
|
91
94
|
]),
|
|
@@ -135,7 +138,7 @@ export const AndCoNativeIntentPreparationSchema = /* @__PURE__ */ v.object({
|
|
|
135
138
|
currency: v.literal("CLP"),
|
|
136
139
|
})),
|
|
137
140
|
}),
|
|
138
|
-
// Money leaving the sender's account towards a receiver, in
|
|
141
|
+
// Money leaving the sender's account towards a receiver, in the transfer vocabulary of the API: whole
|
|
139
142
|
// pesos as integers. `amount.value` is the proposal, `amount.confirmed` what the person confirmed
|
|
140
143
|
// (null until then) and `settled` what it moved, null until it succeeded: a Host that reconciles
|
|
141
144
|
// reads `settled`.
|
|
@@ -28,7 +28,7 @@ export declare const AccountKeyPatternSchema: v.SchemaWithPipe<readonly [v.Strin
|
|
|
28
28
|
export declare const ACCOUNT_MATCHER_LIST_CEILING = 100;
|
|
29
29
|
/**
|
|
30
30
|
* The fields an `external` matcher may fix, each narrowing the accounts it admits. They are the
|
|
31
|
-
* Receptor's own fields in
|
|
31
|
+
* Receptor's own fields in the transfer vocabulary of the API (`receiver`), so a Receptor is compared field by field.
|
|
32
32
|
*/
|
|
33
33
|
export declare const ACCOUNT_EXTERNAL_FIELDS: readonly ["bank_code", "account_type", "account_number", "national_id", "name"];
|
|
34
34
|
/**
|
|
@@ -106,7 +106,7 @@ export declare const AnyAllMatcherSchema: v.StrictObjectSchema<{
|
|
|
106
106
|
}, undefined>;
|
|
107
107
|
export type AnyAll = v.InferInput<typeof AnyAllMatcherSchema>;
|
|
108
108
|
/**
|
|
109
|
-
* Accounts at other banks, narrowed by every field it fixes, in the Receptor's vocabulary:
|
|
109
|
+
* Accounts at other banks, narrowed by every field it fixes, in the Receptor's vocabulary: the
|
|
110
110
|
* four-digit `bank_code`, its `account_type` code (`"10"`, `"20"`, `"40"`), the `account_number`, and
|
|
111
111
|
* the holder's `national_id` (RUT) and `name`. `{ type: "external" }` alone admits every account
|
|
112
112
|
* outside AndCo. Only a destination.
|
|
@@ -116,8 +116,8 @@ export type AnyAll = v.InferInput<typeof AnyAllMatcherSchema>;
|
|
|
116
116
|
*/
|
|
117
117
|
export declare const AccountExternalMatcherSchema: v.StrictObjectSchema<{
|
|
118
118
|
readonly type: v.LiteralSchema<"external", 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
|
|
120
|
-
readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
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
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
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
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>;
|
|
@@ -168,8 +168,8 @@ export declare const DestinationAccountMatcherSchema: v.UnionSchema<[v.StrictObj
|
|
|
168
168
|
readonly limit: v.LiteralSchema<"all", undefined>;
|
|
169
169
|
}, undefined>, v.StrictObjectSchema<{
|
|
170
170
|
readonly type: v.LiteralSchema<"external", 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
|
|
172
|
-
readonly account_type: v.NullishSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
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
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
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
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>;
|
|
@@ -204,8 +204,8 @@ export declare const GrantedAnyAllSchema: v.StrictObjectSchema<{
|
|
|
204
204
|
/** {@link AccountExternalMatcherSchema} as granted: absent fields are unrestricted, never `null`. */
|
|
205
205
|
export declare const GrantedAccountExternalSchema: v.StrictObjectSchema<{
|
|
206
206
|
readonly type: v.LiteralSchema<"external", 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
|
|
208
|
-
readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
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
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
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
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>;
|
|
@@ -246,8 +246,8 @@ export declare const GrantedDestinationAccountMatcherSchema: v.UnionSchema<[v.St
|
|
|
246
246
|
readonly limit: v.LiteralSchema<"all", undefined>;
|
|
247
247
|
}, undefined>, v.StrictObjectSchema<{
|
|
248
248
|
readonly type: v.LiteralSchema<"external", 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
|
|
250
|
-
readonly account_type: v.OptionalSchema<v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
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
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
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
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>;
|
|
@@ -31,7 +31,7 @@ export const ACCOUNT_MATCHER_LIST_CEILING = 100;
|
|
|
31
31
|
const EXTERNAL_FIELD_CEILING = 128;
|
|
32
32
|
/**
|
|
33
33
|
* The fields an `external` matcher may fix, each narrowing the accounts it admits. They are the
|
|
34
|
-
* Receptor's own fields in
|
|
34
|
+
* Receptor's own fields in the transfer vocabulary of the API (`receiver`), so a Receptor is compared field by field.
|
|
35
35
|
*/
|
|
36
36
|
export const ACCOUNT_EXTERNAL_FIELDS = ["bank_code", "account_type", "account_number", "national_id", "name"];
|
|
37
37
|
/** An AndCo account identifier: any 8-4-4-4-12 hex, with no version or variant check. */
|
|
@@ -108,7 +108,7 @@ export const AnyAllMatcherSchema = /* @__PURE__ */ v.strictObject({
|
|
|
108
108
|
limit: v.literal("all"),
|
|
109
109
|
});
|
|
110
110
|
/**
|
|
111
|
-
* Accounts at other banks, narrowed by every field it fixes, in the Receptor's vocabulary:
|
|
111
|
+
* Accounts at other banks, narrowed by every field it fixes, in the Receptor's vocabulary: the
|
|
112
112
|
* four-digit `bank_code`, its `account_type` code (`"10"`, `"20"`, `"40"`), the `account_number`, and
|
|
113
113
|
* the holder's `national_id` (RUT) and `name`. `{ type: "external" }` alone admits every account
|
|
114
114
|
* outside AndCo. Only a destination.
|