@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
|
@@ -333,7 +333,7 @@ export declare const AndCoAuthorizationErrorSchema: v.ObjectSchema<{
|
|
|
333
333
|
readonly requirement: v.OptionalSchema<v.PicklistSchema<["phone", "personal_identity", "address", "bank_account", "identity_validation"], undefined>, undefined>;
|
|
334
334
|
}, undefined>;
|
|
335
335
|
}, undefined>;
|
|
336
|
-
/** Canonical consent state resolved by
|
|
336
|
+
/** Canonical consent state resolved by the Platform for one authorization. */
|
|
337
337
|
export type AndCoAuthorizationPreparation = v.InferOutput<typeof AndCoAuthorizationPreparationSchema>;
|
|
338
338
|
/** Completed approve or deny result containing the safe OAuth continuation URL. */
|
|
339
339
|
export type AndCoAuthorizationCompletion = v.InferOutput<typeof AndCoAuthorizationCompletionSchema>;
|
package/dist/errors.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { GrantedOrganizationSubject } from "./rar/subject.js";
|
|
|
4
4
|
* it sends: lower snake_case, no prefix. Both vocabularies end up in the same `error.code` field, so
|
|
5
5
|
* an integrator should not have to remember which half of a failure produced the string in hand.
|
|
6
6
|
*
|
|
7
|
-
* The
|
|
7
|
+
* The API never reports most of these -- it cannot see a blocked popup or a browser without Web
|
|
8
8
|
* Crypto -- which is why they live apart from the codes the API answers, which its OpenAPI document
|
|
9
9
|
* declares, each with its status and data. The two it shares, `invalid_identifier` and
|
|
10
10
|
* `invalid_request`, are here for the times the SDK refuses an argument before sending it.
|
package/dist/errors.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* it sends: lower snake_case, no prefix. Both vocabularies end up in the same `error.code` field, so
|
|
4
4
|
* an integrator should not have to remember which half of a failure produced the string in hand.
|
|
5
5
|
*
|
|
6
|
-
* The
|
|
6
|
+
* The API never reports most of these -- it cannot see a blocked popup or a browser without Web
|
|
7
7
|
* Crypto -- which is why they live apart from the codes the API answers, which its OpenAPI document
|
|
8
8
|
* declares, each with its status and data. The two it shares, `invalid_identifier` and
|
|
9
9
|
* `invalid_request`, are here for the times the SDK refuses an argument before sending it.
|
package/dist/intent-input.d.ts
CHANGED
|
@@ -21,20 +21,20 @@ export declare const IntentAmountSchema: v.SchemaWithPipe<readonly [v.StrictObje
|
|
|
21
21
|
* AndCo's confirmation screen, and `value` is the initial proposal shown there; the server checks it
|
|
22
22
|
* against the Grant's `transactions.minimum` and `transactions.maximum` and the balance.
|
|
23
23
|
* Without `editable` (or with `false`) the amount is locked. What moved is `settled`. `value` is
|
|
24
|
-
* an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
24
|
+
* an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647.
|
|
25
25
|
*
|
|
26
26
|
* @example
|
|
27
27
|
* const amount = { currency: "CLP", value: 40000, editable: true };
|
|
28
28
|
*/
|
|
29
29
|
export declare const TransferAmountProposalSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
30
30
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
31
|
-
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
|
|
31
|
+
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`.">]>;
|
|
32
32
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
33
33
|
}, undefined>, v.DescriptionAction<{
|
|
34
34
|
currency: "CLP";
|
|
35
35
|
value: number;
|
|
36
36
|
editable: boolean;
|
|
37
|
-
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
37
|
+
}, "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.
|
|
@@ -47,7 +47,7 @@ export declare const SignedAmountSchema: v.SchemaWithPipe<readonly [v.StrictObje
|
|
|
47
47
|
value: string;
|
|
48
48
|
}, "An amount with nothing left for a person to change: the same `{ currency, value }` as a request, without `editable`.">]>;
|
|
49
49
|
/**
|
|
50
|
-
* The comment a transfer asks for
|
|
50
|
+
* The comment a transfer asks for: at most 60 bytes of UTF-8, which is a rule
|
|
51
51
|
* (`comment_too_long`). `editable: true` lets the person who confirms change it.
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
@@ -59,7 +59,7 @@ export declare const TransferCommentProposalSchema: v.SchemaWithPipe<readonly [v
|
|
|
59
59
|
}, undefined>, v.DescriptionAction<{
|
|
60
60
|
value: string;
|
|
61
61
|
editable: boolean;
|
|
62
|
-
}, "The comment a transfer asks for
|
|
62
|
+
}, "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.">]>;
|
|
63
63
|
/**
|
|
64
64
|
* The comment a request asks for. `editable: true` lets the person who confirms change it.
|
|
65
65
|
*
|
|
@@ -90,14 +90,14 @@ export declare const IntentAccountIdSchema: v.SchemaWithPipe<readonly [v.StrictO
|
|
|
90
90
|
id: string;
|
|
91
91
|
}, "One AndCo account, named by its identifier.">]>;
|
|
92
92
|
/**
|
|
93
|
-
* A Receptor at a Chilean bank, in
|
|
93
|
+
* A Receptor at a Chilean bank, in the transfer vocabulary of the API: the fields of a transfer's `receiver` without the
|
|
94
94
|
* amount, which the Intent carries apart. `country` and `national_kind_id` are always declared.
|
|
95
95
|
*/
|
|
96
96
|
export declare const IntentAccountExternalSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
97
97
|
type: v.LiteralSchema<"external", undefined>;
|
|
98
98
|
country: v.LiteralSchema<"CL", undefined>;
|
|
99
|
-
bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
100
|
-
account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
99
|
+
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`.">]>;
|
|
100
|
+
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).">]>;
|
|
101
101
|
account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
102
102
|
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`).">]>;
|
|
103
103
|
national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -111,7 +111,7 @@ export declare const IntentAccountExternalSchema: v.SchemaWithPipe<readonly [v.S
|
|
|
111
111
|
name: string;
|
|
112
112
|
national_kind_id: "RUT";
|
|
113
113
|
national_id: string;
|
|
114
|
-
}, "A Receptor at a Chilean bank, in
|
|
114
|
+
}, "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.">]>;
|
|
115
115
|
/**
|
|
116
116
|
* One AndCo account of the Grant's subject, named by Account Key or by identifier: where a
|
|
117
117
|
* transfer's money leaves from, where a deposit lands, and the account a closure closes.
|
|
@@ -175,8 +175,8 @@ export declare const TransferIntentReceiverSchema: v.SchemaWithPipe<readonly [v.
|
|
|
175
175
|
}, "One AndCo account, named by its identifier.">]>, v.SchemaWithPipe<readonly [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>;
|
|
@@ -190,7 +190,7 @@ export declare const TransferIntentReceiverSchema: v.SchemaWithPipe<readonly [v.
|
|
|
190
190
|
name: string;
|
|
191
191
|
national_kind_id: "RUT";
|
|
192
192
|
national_id: string;
|
|
193
|
-
}, "A Receptor at a Chilean bank, in
|
|
193
|
+
}, "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.">]>], undefined>, v.DescriptionAction<{
|
|
194
194
|
type: "account_key";
|
|
195
195
|
accountKey: string;
|
|
196
196
|
} | {
|
|
@@ -205,7 +205,7 @@ export declare const TransferIntentReceiverSchema: v.SchemaWithPipe<readonly [v.
|
|
|
205
205
|
name: string;
|
|
206
206
|
national_kind_id: "RUT";
|
|
207
207
|
national_id: string;
|
|
208
|
-
}, "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
|
|
208
|
+
}, "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.">]>;
|
|
209
209
|
export declare const TransferIntentReceiverProposalSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
210
210
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
211
211
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -218,8 +218,8 @@ export declare const TransferIntentReceiverProposalSchema: v.SchemaWithPipe<read
|
|
|
218
218
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
219
219
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
220
220
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
221
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
222
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
221
|
+
readonly 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`.">]>;
|
|
222
|
+
readonly 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).">]>;
|
|
223
223
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
224
224
|
readonly 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`).">]>;
|
|
225
225
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -397,13 +397,13 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
|
|
|
397
397
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
398
398
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
399
399
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
400
|
-
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
|
|
400
|
+
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`.">]>;
|
|
401
401
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
402
402
|
}, undefined>, v.DescriptionAction<{
|
|
403
403
|
currency: "CLP";
|
|
404
404
|
value: number;
|
|
405
405
|
editable: boolean;
|
|
406
|
-
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
406
|
+
}, "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`.">]>;
|
|
407
407
|
readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
408
408
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
409
409
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -441,8 +441,8 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
|
|
|
441
441
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
442
442
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
443
443
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
444
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
445
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
444
|
+
readonly 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`.">]>;
|
|
445
|
+
readonly 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).">]>;
|
|
446
446
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
447
447
|
readonly 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`).">]>;
|
|
448
448
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -490,7 +490,7 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
|
|
|
490
490
|
}, undefined>, v.DescriptionAction<{
|
|
491
491
|
value: string;
|
|
492
492
|
editable: boolean;
|
|
493
|
-
}, "The comment a transfer asks for
|
|
493
|
+
}, "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.">]>, undefined>;
|
|
494
494
|
} & {
|
|
495
495
|
readonly expires_in: v.StringSchema<undefined>;
|
|
496
496
|
readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
@@ -499,13 +499,13 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
|
|
|
499
499
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
500
500
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
501
501
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
502
|
-
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
|
|
502
|
+
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`.">]>;
|
|
503
503
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
504
504
|
}, undefined>, v.DescriptionAction<{
|
|
505
505
|
currency: "CLP";
|
|
506
506
|
value: number;
|
|
507
507
|
editable: boolean;
|
|
508
|
-
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
508
|
+
}, "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`.">]>;
|
|
509
509
|
readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
510
510
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
511
511
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -543,8 +543,8 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
|
|
|
543
543
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
544
544
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
545
545
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
546
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
547
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
546
|
+
readonly 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`.">]>;
|
|
547
|
+
readonly 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).">]>;
|
|
548
548
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
549
549
|
readonly 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`).">]>;
|
|
550
550
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -592,7 +592,7 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
|
|
|
592
592
|
}, undefined>, v.DescriptionAction<{
|
|
593
593
|
value: string;
|
|
594
594
|
editable: boolean;
|
|
595
|
-
}, "The comment a transfer asks for
|
|
595
|
+
}, "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.">]>, undefined>;
|
|
596
596
|
} & {
|
|
597
597
|
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
598
598
|
readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -680,7 +680,7 @@ export declare const TransferIntentCreateSchema: v.SchemaWithPipe<readonly [v.Va
|
|
|
680
680
|
} | undefined;
|
|
681
681
|
expires_in?: undefined;
|
|
682
682
|
expires_at: string | null;
|
|
683
|
-
}, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in
|
|
683
|
+
}, "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`.">]>;
|
|
684
684
|
/** A proposal to open a cuenta digital, born waiting for an Approval. See {@link IntentCreateSchema}. */
|
|
685
685
|
export declare const AccountOpeningIntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
686
686
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
@@ -856,7 +856,7 @@ export declare const AccountClosureIntentCreateSchema: v.SchemaWithPipe<readonly
|
|
|
856
856
|
*
|
|
857
857
|
* `transfer` is the only way money movement is expressed: money leaving a `sender` account towards a
|
|
858
858
|
* `receiver`, both named in the `bank_transfer` matcher vocabulary (`account_key`, `account`,
|
|
859
|
-
* `external`, whose Receptor speaks
|
|
859
|
+
* `external`, whose Receptor speaks the transfer vocabulary of the API). A null `sender` is the confirmation screen's
|
|
860
860
|
* source picker, and a null `receiver` is the screen's receiver form: the person completes where the
|
|
861
861
|
* money goes (another bank's account, or another AndCo customer's), and the server checks what she
|
|
862
862
|
* wrote against the Grant's `destinations` when she confirms. Both are the screen's when omitted. A
|
|
@@ -1029,13 +1029,13 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
|
|
|
1029
1029
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1030
1030
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1031
1031
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1032
|
-
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
|
|
1032
|
+
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`.">]>;
|
|
1033
1033
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1034
1034
|
}, undefined>, v.DescriptionAction<{
|
|
1035
1035
|
currency: "CLP";
|
|
1036
1036
|
value: number;
|
|
1037
1037
|
editable: boolean;
|
|
1038
|
-
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
1038
|
+
}, "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`.">]>;
|
|
1039
1039
|
readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1040
1040
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
1041
1041
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1073,8 +1073,8 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
|
|
|
1073
1073
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1074
1074
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1075
1075
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
1076
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
1077
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
1076
|
+
readonly 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`.">]>;
|
|
1077
|
+
readonly 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).">]>;
|
|
1078
1078
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1079
1079
|
readonly 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`).">]>;
|
|
1080
1080
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -1122,7 +1122,7 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
|
|
|
1122
1122
|
}, undefined>, v.DescriptionAction<{
|
|
1123
1123
|
value: string;
|
|
1124
1124
|
editable: boolean;
|
|
1125
|
-
}, "The comment a transfer asks for
|
|
1125
|
+
}, "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.">]>, undefined>;
|
|
1126
1126
|
} & {
|
|
1127
1127
|
readonly expires_in: v.StringSchema<undefined>;
|
|
1128
1128
|
readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
@@ -1131,13 +1131,13 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
|
|
|
1131
1131
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1132
1132
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1133
1133
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1134
|
-
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
|
|
1134
|
+
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`.">]>;
|
|
1135
1135
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1136
1136
|
}, undefined>, v.DescriptionAction<{
|
|
1137
1137
|
currency: "CLP";
|
|
1138
1138
|
value: number;
|
|
1139
1139
|
editable: boolean;
|
|
1140
|
-
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
1140
|
+
}, "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`.">]>;
|
|
1141
1141
|
readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1142
1142
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
1143
1143
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1175,8 +1175,8 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
|
|
|
1175
1175
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1176
1176
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1177
1177
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
1178
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
1179
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
1178
|
+
readonly 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`.">]>;
|
|
1179
|
+
readonly 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).">]>;
|
|
1180
1180
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1181
1181
|
readonly 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`).">]>;
|
|
1182
1182
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -1224,7 +1224,7 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
|
|
|
1224
1224
|
}, undefined>, v.DescriptionAction<{
|
|
1225
1225
|
value: string;
|
|
1226
1226
|
editable: boolean;
|
|
1227
|
-
}, "The comment a transfer asks for
|
|
1227
|
+
}, "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.">]>, undefined>;
|
|
1228
1228
|
} & {
|
|
1229
1229
|
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1230
1230
|
readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1312,7 +1312,7 @@ export declare const IntentCreateSchema: v.VariantSchema<"type", [v.SchemaWithPi
|
|
|
1312
1312
|
} | undefined;
|
|
1313
1313
|
expires_in?: undefined;
|
|
1314
1314
|
expires_at: string | null;
|
|
1315
|
-
}, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in
|
|
1315
|
+
}, "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`.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
1316
1316
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
1317
1317
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1318
1318
|
readonly name: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The display label the account opens with. Mutable afterwards, and read by no permission.">]>;
|
|
@@ -1493,7 +1493,7 @@ export declare const METADATA_MAX_LENGTH = 16384;
|
|
|
1493
1493
|
* - `invalid_expiration_datetime`: `expires_at` is not a real calendar datetime with a timezone.
|
|
1494
1494
|
* - `note_too_long`: the note of a deposit or an account Intent has more than {@link NOTE_MAX_LENGTH}
|
|
1495
1495
|
* code points.
|
|
1496
|
-
* - `comment_too_long`: a transfer's comment has more than 60 bytes of UTF-8
|
|
1496
|
+
* - `comment_too_long`: a transfer's comment has more than 60 bytes of UTF-8.
|
|
1497
1497
|
* - `name_too_long`: an account opening's `name` has more than {@link ACCOUNT_NAME_MAX_LENGTH} code points.
|
|
1498
1498
|
* - `holder_name_too_long`: an external Receptor's holder `name` has more than
|
|
1499
1499
|
* {@link HOLDER_NAME_MAX_LENGTH} code points.
|
|
@@ -1693,8 +1693,8 @@ export declare const SignedAccountClosureIntentClaimsSchema: v.SchemaWithPipe<re
|
|
|
1693
1693
|
* The verified claims of a Signed Instruction: the `application/jwt` half of the same creation, for
|
|
1694
1694
|
* opening and closing an account.
|
|
1695
1695
|
*
|
|
1696
|
-
* A signed transfer is not here: it is a Transfer of its own,
|
|
1697
|
-
* `SignedTransferEnvelope` whose claims are `SignedTransferClaims
|
|
1696
|
+
* A signed transfer is not here: it is a Transfer of its own, submitted to `POST /transfers` as a
|
|
1697
|
+
* `SignedTransferEnvelope` whose claims are `SignedTransferClaims`.
|
|
1698
1698
|
*
|
|
1699
1699
|
* There is no `org_id`: the subject is the one of the Grant behind the access token that submits the
|
|
1700
1700
|
* instruction, and nothing inside the signature may name another.
|
|
@@ -1902,35 +1902,38 @@ export declare function parseSignedIntentInput(input: unknown): ParseResult<Sign
|
|
|
1902
1902
|
* the way the server counts them: `reason_too_long`, past {@link REASON_MAX_LENGTH}.
|
|
1903
1903
|
*/
|
|
1904
1904
|
export declare function intentDecisionIssues(input: {
|
|
1905
|
-
readonly reason
|
|
1905
|
+
readonly reason?: string | undefined;
|
|
1906
1906
|
}): Issue[];
|
|
1907
1907
|
/**
|
|
1908
|
-
* Cancelling
|
|
1909
|
-
*
|
|
1908
|
+
* Cancelling may say why: the reason is optional, and when given it has 1 to 280 code points. A
|
|
1909
|
+
* Cancellation is the creator withdrawing its own request: only the client that created the
|
|
1910
1910
|
* Intent may cancel it. An approver declining it is a Rejection ({@link IntentRejectionSchema}).
|
|
1911
1911
|
*
|
|
1912
1912
|
* @example
|
|
1913
1913
|
* parseIntentCancellation({ reason: "rejected_by_erp" });
|
|
1914
|
+
* parseIntentCancellation({}); // a reason is optional
|
|
1914
1915
|
*/
|
|
1915
1916
|
export declare const IntentCancellationSchema: v.StrictObjectSchema<{
|
|
1916
|
-
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
1917
|
+
readonly reason: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
1917
1918
|
}, undefined>;
|
|
1918
|
-
/**
|
|
1919
|
+
/** An optional reason, 1–280 code points, naming why an Intent was cancelled. */
|
|
1919
1920
|
export type IntentCancellation = v.InferOutput<typeof IntentCancellationSchema>;
|
|
1920
1921
|
/** Parses a cancellation: its shape and then {@link intentDecisionIssues}. */
|
|
1921
1922
|
export declare function parseIntentCancellation(input: unknown): ParseResult<IntentCancellation>;
|
|
1922
1923
|
/**
|
|
1923
|
-
* Rejecting
|
|
1924
|
+
* Rejecting may say why: the reason is optional, and when given it has 1 to 280 code points. A
|
|
1925
|
+
* Rejection is an approver declining an Intent with a Grant holding the
|
|
1924
1926
|
* family's `reject` action (`bank_transfer` for a transfer); the audit keeps it apart from a
|
|
1925
1927
|
* Cancellation, which is the creator withdrawing its own request.
|
|
1926
1928
|
*
|
|
1927
1929
|
* @example
|
|
1928
1930
|
* parseIntentRejection({ reason: "duplicated_invoice" });
|
|
1931
|
+
* parseIntentRejection({}); // a reason is optional
|
|
1929
1932
|
*/
|
|
1930
1933
|
export declare const IntentRejectionSchema: v.StrictObjectSchema<{
|
|
1931
|
-
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
1934
|
+
readonly reason: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
1932
1935
|
}, undefined>;
|
|
1933
|
-
/**
|
|
1936
|
+
/** An optional reason, 1–280 code points, naming why an approver rejected an Intent. */
|
|
1934
1937
|
export type IntentRejection = v.InferOutput<typeof IntentRejectionSchema>;
|
|
1935
1938
|
/** Parses a rejection: its shape and then {@link intentDecisionIssues}. */
|
|
1936
1939
|
export declare function parseIntentRejection(input: unknown): ParseResult<IntentRejection>;
|
|
@@ -1967,12 +1970,22 @@ export declare const ANDCO_INTENT_ERROR_CODES: {
|
|
|
1967
1970
|
readonly OWN_ACCOUNT_TRANSFER_NOT_IMPLEMENTED: "own_account_transfer_not_implemented";
|
|
1968
1971
|
/**
|
|
1969
1972
|
* A signed transfer that leaves its holder (to another bank or to another AndCo customer) moves
|
|
1970
|
-
* only where AndCo
|
|
1973
|
+
* only where AndCo serves that rail. Where it does not, `POST /transfers`
|
|
1971
1974
|
* answers `not_implemented` (501) with this stable `code` once the instruction verified and the
|
|
1972
1975
|
* Grant covers it, and nothing is created. A signed transfer between two accounts of the same
|
|
1973
1976
|
* holder is not affected.
|
|
1974
1977
|
*/
|
|
1975
1978
|
readonly SIGNED_OUTGOING_TRANSFER_NOT_IMPLEMENTED: "signed_outgoing_transfer_not_implemented";
|
|
1979
|
+
/**
|
|
1980
|
+
* `POST /transfers` answers `400` with this code for a signed transfer with `approved: false`: that
|
|
1981
|
+
* transfer waits for a decision, so it is an Intent. Send it to `POST /intents`. Nothing is recorded.
|
|
1982
|
+
*/
|
|
1983
|
+
readonly APPROVAL_REQUIRED_USE_INTENTS: "approval_required_use_intents";
|
|
1984
|
+
/**
|
|
1985
|
+
* `POST /intents` answers `400` with this code for a signed transfer with `approved: true`: its
|
|
1986
|
+
* signature is the approval, so it is a Transfer. Send it to `POST /transfers`. Nothing is recorded.
|
|
1987
|
+
*/
|
|
1988
|
+
readonly APPROVED_USE_TRANSFERS: "approved_use_transfers";
|
|
1976
1989
|
};
|
|
1977
1990
|
/**
|
|
1978
1991
|
* Identifies recognized unsupported Intents without silently dropping their extra instructions: an
|
|
@@ -1992,12 +2005,12 @@ export declare function unsupportedIntentShape(input: unknown): string | undefin
|
|
|
1992
2005
|
export declare const TransferConfirmationSchema: v.StrictObjectSchema<{
|
|
1993
2006
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1994
2007
|
readonly sender_account_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
1995
|
-
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
|
|
2008
|
+
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>;
|
|
1996
2009
|
readonly receiver: v.OptionalSchema<v.StrictObjectSchema<{
|
|
1997
2010
|
type: v.LiteralSchema<"external", undefined>;
|
|
1998
2011
|
country: v.LiteralSchema<"CL", undefined>;
|
|
1999
|
-
bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
2000
|
-
account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
2012
|
+
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`.">]>;
|
|
2013
|
+
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).">]>;
|
|
2001
2014
|
account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
2002
2015
|
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`).">]>;
|
|
2003
2016
|
national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -2008,7 +2021,7 @@ export declare const TransferConfirmationSchema: v.StrictObjectSchema<{
|
|
|
2008
2021
|
/** Validated confirmation fields inferred from {@link TransferConfirmationSchema}. */
|
|
2009
2022
|
export type TransferConfirmation = v.InferOutput<typeof TransferConfirmationSchema>;
|
|
2010
2023
|
/**
|
|
2011
|
-
* The rules of a confirmation that JSON Schema does not say: `comment_too_long`, past
|
|
2024
|
+
* The rules of a confirmation that JSON Schema does not say: `comment_too_long`, past 60 bytes
|
|
2012
2025
|
* of UTF-8, and `holder_name_too_long`, past {@link HOLDER_NAME_MAX_LENGTH} code points.
|
|
2013
2026
|
*/
|
|
2014
2027
|
export declare function transferConfirmationIssues(input: Pick<TransferConfirmation, "comment" | "receiver">): Issue[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intent-input.d.ts","sourceRoot":"","sources":["../src/intent-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAkB,MAAM,aAAa,CAAC;AAU3E;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;sKAS9B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"intent-input.d.ts","sourceRoot":"","sources":["../src/intent-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,WAAW,EAAkB,MAAM,aAAa,CAAC;AAU3E;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;sKAS9B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;+dASxC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;4HAK9B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;;sLAQzC,CAAC;AASF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;;;;;;2JAQ5B,CAAC;AAgCF,0EAA0E;AAC1E,eAAO,MAAM,sBAAsB;;;;;;2EAGlC,CAAC;AAEF,kDAAkD;AAClD,eAAO,MAAM,qBAAqB;;;;;;mDAGjC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;6dAKvC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;0XAK/B,CAAC;AACF,QAAA,MAAM,YAAY;;;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