@andco/protocol 0.0.3 → 0.0.4
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/LICENSE +1 -1
- package/README.md +33 -3
- package/dist/api-errors.d.ts +109 -0
- package/dist/api-errors.d.ts.map +1 -0
- package/dist/api-errors.js +111 -0
- package/dist/authorization-preparation.d.ts +52 -543
- package/dist/authorization-preparation.d.ts.map +1 -1
- package/dist/authorization-preparation.js +19 -42
- package/dist/authorization.d.ts +64 -22
- package/dist/authorization.d.ts.map +1 -1
- package/dist/authorization.js +136 -55
- package/dist/consent.d.ts +5 -8
- package/dist/consent.d.ts.map +1 -1
- package/dist/consent.js +5 -62
- package/dist/constants.d.ts +19 -3
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +19 -3
- package/dist/errors.d.ts +156 -58
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +176 -57
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/intent-input.d.ts +1010 -279
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +268 -40
- package/dist/messages/error.d.ts +1 -2
- package/dist/messages/error.d.ts.map +1 -1
- package/dist/messages/error.js +5 -2
- package/dist/messages/index.d.ts +1 -1
- package/dist/native-copy.d.ts +23 -2
- package/dist/native-copy.d.ts.map +1 -1
- package/dist/native-copy.js +42 -98
- package/dist/native-intent.d.ts +126 -75
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +140 -48
- package/dist/rar/account-matchers.d.ts +579 -0
- package/dist/rar/account-matchers.d.ts.map +1 -0
- package/dist/rar/account-matchers.js +480 -0
- package/dist/rar/bank.d.ts +1549 -0
- package/dist/rar/bank.d.ts.map +1 -0
- package/dist/rar/bank.js +379 -0
- package/dist/rar/catalog.d.ts +1155 -0
- package/dist/rar/catalog.d.ts.map +1 -0
- package/dist/rar/catalog.js +175 -0
- package/dist/rar/detail.d.ts +39 -0
- package/dist/rar/detail.d.ts.map +1 -0
- package/dist/rar/detail.js +44 -0
- package/dist/rar/index.d.ts +9 -0
- package/dist/rar/index.d.ts.map +1 -0
- package/dist/rar/index.js +8 -0
- package/dist/rar/money.d.ts +58 -0
- package/dist/rar/money.d.ts.map +1 -0
- package/dist/rar/money.js +61 -0
- package/dist/rar/project-users.d.ts +43 -0
- package/dist/rar/project-users.d.ts.map +1 -0
- package/dist/rar/project-users.js +63 -0
- package/dist/rar/subject-data.d.ts +170 -0
- package/dist/rar/subject-data.d.ts.map +1 -0
- package/dist/rar/subject-data.js +127 -0
- package/dist/rar/subject.d.ts +166 -0
- package/dist/rar/subject.d.ts.map +1 -0
- package/dist/rar/subject.js +119 -0
- package/dist/scopes.d.ts +5 -30
- package/dist/scopes.d.ts.map +1 -1
- package/dist/scopes.js +0 -13
- package/dist/service-grants.d.ts +44 -0
- package/dist/service-grants.d.ts.map +1 -0
- package/dist/service-grants.js +45 -0
- package/dist/signing.d.ts +56 -0
- package/dist/signing.d.ts.map +1 -0
- package/dist/signing.js +233 -0
- package/dist/transport/financial-events.d.ts +90 -35
- package/dist/transport/financial-events.d.ts.map +1 -1
- package/dist/transport/financial-events.js +7 -1
- package/dist/transport/generated/oauth-api.d.ts +908 -440
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/index.d.ts +0 -1
- package/dist/transport/index.d.ts.map +1 -1
- package/dist/transport/index.js +0 -1
- package/dist/transport/intents.d.ts +155 -23
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/intents.js +192 -59
- package/dist/transport/rest.d.ts +18 -8
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/transport/rest.js +1 -1
- package/dist/urls.d.ts.map +1 -1
- package/dist/urls.js +1 -1
- package/dist/userinfo.d.ts +10 -1
- package/dist/userinfo.d.ts.map +1 -1
- package/dist/userinfo.js +10 -1
- package/dist/utils.d.ts +15 -0
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +31 -0
- package/dist/webhooks.d.ts +154 -0
- package/dist/webhooks.d.ts.map +1 -0
- package/dist/webhooks.js +249 -0
- package/package.json +18 -1
- package/dist/automatic-charge.d.ts +0 -314
- package/dist/automatic-charge.d.ts.map +0 -1
- package/dist/automatic-charge.js +0 -126
- package/dist/bank-account-authorization.d.ts +0 -6
- package/dist/bank-account-authorization.d.ts.map +0 -1
- package/dist/bank-account-authorization.js +0 -13
- package/dist/transport/webhooks.d.ts +0 -27
- package/dist/transport/webhooks.d.ts.map +0 -1
- package/dist/transport/webhooks.js +0 -68
- package/dist/webhook-input.d.ts +0 -22
- package/dist/webhook-input.d.ts.map +0 -1
- package/dist/webhook-input.js +0 -11
- package/dist/webhook-signature.d.ts +0 -54
- package/dist/webhook-signature.d.ts.map +0 -1
- package/dist/webhook-signature.js +0 -74
package/dist/intent-input.d.ts
CHANGED
|
@@ -1,150 +1,246 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
|
+
/**
|
|
3
|
+
* One Andco account of the Grant's subject, named by Account Alias or by identifier: where a
|
|
4
|
+
* transfer's money leaves from, where a deposit lands, and the account a closure closes.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* const account: IntentAccount = { type: "alias", alias: "ventas" };
|
|
8
|
+
*/
|
|
9
|
+
declare const andcoAccount: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
10
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
11
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
12
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
13
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
14
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
15
|
+
}, undefined>], undefined>;
|
|
16
|
+
/** One Andco account named by Account Alias or by identifier, exactly as an Intent carries it. */
|
|
17
|
+
export type IntentAccount = v.InferOutput<typeof andcoAccount>;
|
|
18
|
+
/** Where a signed transfer's money lands: nothing on this path is left for a person to complete. */
|
|
19
|
+
declare const signedTransferDestination: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
20
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
21
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
22
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
23
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
24
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
25
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
26
|
+
type: v.LiteralSchema<"external", undefined>;
|
|
27
|
+
bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
28
|
+
account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
29
|
+
account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
30
|
+
holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
31
|
+
holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
32
|
+
}, undefined>], undefined>;
|
|
33
|
+
/** One account a transfer names, exactly as a signed instruction carries it. */
|
|
34
|
+
export type TransferAccount = v.InferOutput<typeof signedTransferDestination>;
|
|
2
35
|
/** Validates fixed-duration syntax without anchoring it to a changing clock. */
|
|
3
36
|
export declare function isIntentDuration(value: string): boolean;
|
|
4
37
|
/** Validates a real ISO calendar datetime with a timezone; past dates remain valid for idempotent replay. */
|
|
5
38
|
export declare function isIntentDeadline(value: string): boolean;
|
|
6
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Public creation validation shared by the API and SDK. SQL resolves deadlines and enforces authorization.
|
|
41
|
+
*
|
|
42
|
+
* This is the `application/json` half of the creation contract: an Intent born waiting for an
|
|
43
|
+
* Approval, where a `null` means a person will choose. The `application/jwt` half is
|
|
44
|
+
* {@link SignedIntentSchema}, and the two are separate schemas rather than one with optional fields
|
|
45
|
+
* on purpose — when signed and unsigned members share an object, something eventually reads the
|
|
46
|
+
* wrong ones.
|
|
47
|
+
*
|
|
48
|
+
* `transfer` is the only way money movement is expressed: money leaving an account towards a
|
|
49
|
+
* `destination`, both named in the `bank_transfer` matcher vocabulary (`alias`, `account`,
|
|
50
|
+
* `external`). A null `source` is the confirmation screen's source picker; `editable: false` locks
|
|
51
|
+
* the destination there. Who may approve the Intent without a person belongs to the Grant, never to
|
|
52
|
+
* the operation itself.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* safeParseIntentCreate({
|
|
56
|
+
* type: "transfer", expires_in: "30 minutes", source: null,
|
|
57
|
+
* destination: { type: "alias", alias: "proveedores" },
|
|
58
|
+
* amount: { currency: "CLP", value: "40000" },
|
|
59
|
+
* note: { value: "Factura 42", editable: true },
|
|
60
|
+
* });
|
|
61
|
+
*
|
|
62
|
+
* `account_opening` is here for the same reason money movement is: everything with banking
|
|
63
|
+
* consequence happens through an Intent, so `/accounts` has no `POST`. It carries no amount, no
|
|
64
|
+
* source and no destination — only the name the account will answer to, and whether naming one that
|
|
65
|
+
* already exists is an error or a request for the account that is already there.
|
|
66
|
+
*/
|
|
7
67
|
export declare const IntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
8
68
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
69
|
+
readonly destination: v.OptionalSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
70
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
71
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
72
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
73
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
74
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
75
|
+
}, undefined>], undefined>, undefined>;
|
|
9
76
|
readonly amount: v.OptionalSchema<v.StrictObjectSchema<{
|
|
10
77
|
currency: v.LiteralSchema<"CLP", undefined>;
|
|
78
|
+
value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
|
|
11
79
|
editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
12
|
-
suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
|
|
13
80
|
}, undefined>, undefined>;
|
|
14
81
|
readonly expires_at: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>, undefined>;
|
|
15
82
|
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
16
83
|
readonly note: v.OptionalSchema<v.StrictObjectSchema<{
|
|
17
|
-
readonly
|
|
84
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
|
|
18
85
|
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
19
86
|
}, undefined>, undefined>;
|
|
20
87
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
21
88
|
}, undefined>, v.StrictObjectSchema<{
|
|
22
|
-
readonly type: v.LiteralSchema<"
|
|
89
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
23
90
|
readonly amount: v.StrictObjectSchema<{
|
|
24
91
|
currency: v.LiteralSchema<"CLP", undefined>;
|
|
92
|
+
value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
|
|
25
93
|
editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
26
|
-
suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
|
|
27
94
|
}, undefined>;
|
|
28
|
-
readonly source: v.OptionalSchema<v.NullableSchema<v.
|
|
29
|
-
|
|
95
|
+
readonly source: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
96
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
97
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
30
98
|
}, undefined>, v.StrictObjectSchema<{
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
34
|
-
account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
35
|
-
bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
36
|
-
country: v.LiteralSchema<"CL", undefined>;
|
|
99
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
100
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
37
101
|
}, undefined>], undefined>, undefined>, null>;
|
|
38
|
-
readonly
|
|
39
|
-
readonly editable: v.OptionalSchema<v.
|
|
40
|
-
readonly
|
|
41
|
-
readonly
|
|
42
|
-
readonly account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
43
|
-
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
44
|
-
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
45
|
-
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
102
|
+
readonly destination: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
103
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
104
|
+
readonly type: v.LiteralSchema<"alias", undefined>;
|
|
105
|
+
readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
46
106
|
}, undefined>, v.StrictObjectSchema<{
|
|
47
|
-
readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
48
107
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
108
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
109
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
110
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
111
|
+
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
112
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
113
|
+
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
114
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
115
|
+
readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
116
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
117
|
+
readonly holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
49
118
|
}, undefined>], undefined>;
|
|
50
119
|
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
51
120
|
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
52
121
|
readonly note: v.OptionalSchema<v.StrictObjectSchema<{
|
|
53
|
-
readonly
|
|
122
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
|
|
54
123
|
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
55
124
|
}, undefined>, undefined>;
|
|
56
125
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
57
126
|
}, undefined>, v.StrictObjectSchema<{
|
|
58
|
-
readonly type: v.LiteralSchema<"
|
|
59
|
-
readonly
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
readonly suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
|
|
63
|
-
}, undefined>;
|
|
64
|
-
readonly source: v.OptionalSchema<v.NullableSchema<v.StrictObjectSchema<{
|
|
65
|
-
readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
66
|
-
}, undefined>, undefined>, null>;
|
|
67
|
-
readonly beneficiary: v.StrictObjectSchema<{
|
|
68
|
-
readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
69
|
-
}, undefined>;
|
|
127
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
128
|
+
readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
129
|
+
readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
|
|
130
|
+
readonly upsert: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
70
131
|
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
71
132
|
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
72
133
|
readonly note: v.OptionalSchema<v.StrictObjectSchema<{
|
|
73
|
-
readonly
|
|
134
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
|
|
135
|
+
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
136
|
+
}, undefined>, undefined>;
|
|
137
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
138
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
139
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
140
|
+
readonly account: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
141
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
142
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
143
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
144
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
145
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
146
|
+
}, undefined>], undefined>;
|
|
147
|
+
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
148
|
+
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
149
|
+
readonly note: v.OptionalSchema<v.StrictObjectSchema<{
|
|
150
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
|
|
74
151
|
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
75
152
|
}, undefined>, undefined>;
|
|
76
153
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
77
154
|
}, undefined>], undefined>, v.CheckAction<{
|
|
78
155
|
type: "deposit";
|
|
156
|
+
destination?: {
|
|
157
|
+
type: "alias";
|
|
158
|
+
alias: string;
|
|
159
|
+
} | {
|
|
160
|
+
type: "account";
|
|
161
|
+
id: string;
|
|
162
|
+
} | undefined;
|
|
79
163
|
amount?: {
|
|
80
164
|
currency: "CLP";
|
|
165
|
+
value: string;
|
|
81
166
|
editable: boolean;
|
|
82
|
-
suggested: string;
|
|
83
167
|
} | undefined;
|
|
84
168
|
expires_at?: string | null | undefined;
|
|
85
169
|
expires_in?: string | undefined;
|
|
86
170
|
note?: {
|
|
87
|
-
|
|
171
|
+
value: string;
|
|
88
172
|
editable: boolean;
|
|
89
173
|
} | undefined;
|
|
90
174
|
metadata: {
|
|
91
175
|
[x: string]: unknown;
|
|
92
176
|
};
|
|
93
177
|
} | {
|
|
94
|
-
type: "
|
|
178
|
+
type: "transfer";
|
|
95
179
|
amount: {
|
|
96
180
|
currency: "CLP";
|
|
181
|
+
value: string;
|
|
97
182
|
editable: boolean;
|
|
98
|
-
suggested: string;
|
|
99
183
|
};
|
|
100
184
|
source: {
|
|
101
|
-
|
|
185
|
+
type: "alias";
|
|
186
|
+
alias: string;
|
|
102
187
|
} | {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
account_kind: "checking" | "debit" | "savings";
|
|
106
|
-
account_number: string;
|
|
107
|
-
bank_id: string;
|
|
108
|
-
country: "CL";
|
|
188
|
+
type: "account";
|
|
189
|
+
id: string;
|
|
109
190
|
} | null;
|
|
110
|
-
|
|
111
|
-
editable:
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
account_kind: "checking" | "debit" | "savings";
|
|
115
|
-
account_number: string;
|
|
116
|
-
bank_id: string;
|
|
117
|
-
country: "CL";
|
|
191
|
+
destination: {
|
|
192
|
+
editable: false;
|
|
193
|
+
type: "alias";
|
|
194
|
+
alias: string;
|
|
118
195
|
} | {
|
|
119
|
-
bank_account_id: string;
|
|
120
196
|
editable: false;
|
|
197
|
+
type: "account";
|
|
198
|
+
id: string;
|
|
199
|
+
} | {
|
|
200
|
+
editable: boolean;
|
|
201
|
+
type: "external";
|
|
202
|
+
bank_id: string;
|
|
203
|
+
account_type: "checking" | "debit" | "savings";
|
|
204
|
+
account_id: string;
|
|
205
|
+
holder_id: string;
|
|
206
|
+
holder_name: string;
|
|
121
207
|
};
|
|
122
208
|
expires_in?: string | undefined;
|
|
123
209
|
expires_at?: string | undefined;
|
|
124
210
|
note?: {
|
|
125
|
-
|
|
211
|
+
value: string;
|
|
126
212
|
editable: boolean;
|
|
127
213
|
} | undefined;
|
|
128
214
|
metadata: {
|
|
129
215
|
[x: string]: unknown;
|
|
130
216
|
};
|
|
131
217
|
} | {
|
|
132
|
-
type: "
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
218
|
+
type: "account_opening";
|
|
219
|
+
alias: string;
|
|
220
|
+
name?: string | undefined;
|
|
221
|
+
upsert: boolean;
|
|
222
|
+
expires_in?: string | undefined;
|
|
223
|
+
expires_at?: string | undefined;
|
|
224
|
+
note?: {
|
|
225
|
+
value: string;
|
|
226
|
+
editable: boolean;
|
|
227
|
+
} | undefined;
|
|
228
|
+
metadata: {
|
|
229
|
+
[x: string]: unknown;
|
|
137
230
|
};
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
231
|
+
} | {
|
|
232
|
+
type: "account_closure";
|
|
233
|
+
account: {
|
|
234
|
+
type: "alias";
|
|
235
|
+
alias: string;
|
|
236
|
+
} | {
|
|
237
|
+
type: "account";
|
|
238
|
+
id: string;
|
|
143
239
|
};
|
|
144
240
|
expires_in?: string | undefined;
|
|
145
241
|
expires_at?: string | undefined;
|
|
146
242
|
note?: {
|
|
147
|
-
|
|
243
|
+
value: string;
|
|
148
244
|
editable: boolean;
|
|
149
245
|
} | undefined;
|
|
150
246
|
metadata: {
|
|
@@ -152,75 +248,94 @@ export declare const IntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSch
|
|
|
152
248
|
};
|
|
153
249
|
}, "exactly_one_expiration_required">, v.CheckAction<{
|
|
154
250
|
type: "deposit";
|
|
251
|
+
destination?: {
|
|
252
|
+
type: "alias";
|
|
253
|
+
alias: string;
|
|
254
|
+
} | {
|
|
255
|
+
type: "account";
|
|
256
|
+
id: string;
|
|
257
|
+
} | undefined;
|
|
155
258
|
amount?: {
|
|
156
259
|
currency: "CLP";
|
|
260
|
+
value: string;
|
|
157
261
|
editable: boolean;
|
|
158
|
-
suggested: string;
|
|
159
262
|
} | undefined;
|
|
160
263
|
expires_at?: string | null | undefined;
|
|
161
264
|
expires_in?: string | undefined;
|
|
162
265
|
note?: {
|
|
163
|
-
|
|
266
|
+
value: string;
|
|
164
267
|
editable: boolean;
|
|
165
268
|
} | undefined;
|
|
166
269
|
metadata: {
|
|
167
270
|
[x: string]: unknown;
|
|
168
271
|
};
|
|
169
272
|
} | {
|
|
170
|
-
type: "
|
|
273
|
+
type: "transfer";
|
|
171
274
|
amount: {
|
|
172
275
|
currency: "CLP";
|
|
276
|
+
value: string;
|
|
173
277
|
editable: boolean;
|
|
174
|
-
suggested: string;
|
|
175
278
|
};
|
|
176
279
|
source: {
|
|
177
|
-
|
|
280
|
+
type: "alias";
|
|
281
|
+
alias: string;
|
|
178
282
|
} | {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
account_kind: "checking" | "debit" | "savings";
|
|
182
|
-
account_number: string;
|
|
183
|
-
bank_id: string;
|
|
184
|
-
country: "CL";
|
|
283
|
+
type: "account";
|
|
284
|
+
id: string;
|
|
185
285
|
} | null;
|
|
186
|
-
|
|
187
|
-
editable:
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
account_kind: "checking" | "debit" | "savings";
|
|
191
|
-
account_number: string;
|
|
192
|
-
bank_id: string;
|
|
193
|
-
country: "CL";
|
|
286
|
+
destination: {
|
|
287
|
+
editable: false;
|
|
288
|
+
type: "alias";
|
|
289
|
+
alias: string;
|
|
194
290
|
} | {
|
|
195
|
-
bank_account_id: string;
|
|
196
291
|
editable: false;
|
|
292
|
+
type: "account";
|
|
293
|
+
id: string;
|
|
294
|
+
} | {
|
|
295
|
+
editable: boolean;
|
|
296
|
+
type: "external";
|
|
297
|
+
bank_id: string;
|
|
298
|
+
account_type: "checking" | "debit" | "savings";
|
|
299
|
+
account_id: string;
|
|
300
|
+
holder_id: string;
|
|
301
|
+
holder_name: string;
|
|
197
302
|
};
|
|
198
303
|
expires_in?: string | undefined;
|
|
199
304
|
expires_at?: string | undefined;
|
|
200
305
|
note?: {
|
|
201
|
-
|
|
306
|
+
value: string;
|
|
202
307
|
editable: boolean;
|
|
203
308
|
} | undefined;
|
|
204
309
|
metadata: {
|
|
205
310
|
[x: string]: unknown;
|
|
206
311
|
};
|
|
207
312
|
} | {
|
|
208
|
-
type: "
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
313
|
+
type: "account_opening";
|
|
314
|
+
alias: string;
|
|
315
|
+
name?: string | undefined;
|
|
316
|
+
upsert: boolean;
|
|
317
|
+
expires_in?: string | undefined;
|
|
318
|
+
expires_at?: string | undefined;
|
|
319
|
+
note?: {
|
|
320
|
+
value: string;
|
|
321
|
+
editable: boolean;
|
|
322
|
+
} | undefined;
|
|
323
|
+
metadata: {
|
|
324
|
+
[x: string]: unknown;
|
|
213
325
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
326
|
+
} | {
|
|
327
|
+
type: "account_closure";
|
|
328
|
+
account: {
|
|
329
|
+
type: "alias";
|
|
330
|
+
alias: string;
|
|
331
|
+
} | {
|
|
332
|
+
type: "account";
|
|
333
|
+
id: string;
|
|
219
334
|
};
|
|
220
335
|
expires_in?: string | undefined;
|
|
221
336
|
expires_at?: string | undefined;
|
|
222
337
|
note?: {
|
|
223
|
-
|
|
338
|
+
value: string;
|
|
224
339
|
editable: boolean;
|
|
225
340
|
} | undefined;
|
|
226
341
|
metadata: {
|
|
@@ -228,223 +343,280 @@ export declare const IntentCreateSchema: v.SchemaWithPipe<readonly [v.VariantSch
|
|
|
228
343
|
};
|
|
229
344
|
}, "passive_deposit_requires_no_target">, v.CheckAction<{
|
|
230
345
|
type: "deposit";
|
|
346
|
+
destination?: {
|
|
347
|
+
type: "alias";
|
|
348
|
+
alias: string;
|
|
349
|
+
} | {
|
|
350
|
+
type: "account";
|
|
351
|
+
id: string;
|
|
352
|
+
} | undefined;
|
|
231
353
|
amount?: {
|
|
232
354
|
currency: "CLP";
|
|
355
|
+
value: string;
|
|
233
356
|
editable: boolean;
|
|
234
|
-
suggested: string;
|
|
235
357
|
} | undefined;
|
|
236
358
|
expires_at?: string | null | undefined;
|
|
237
359
|
expires_in?: string | undefined;
|
|
238
360
|
note?: {
|
|
239
|
-
|
|
361
|
+
value: string;
|
|
240
362
|
editable: boolean;
|
|
241
363
|
} | undefined;
|
|
242
364
|
metadata: {
|
|
243
365
|
[x: string]: unknown;
|
|
244
366
|
};
|
|
245
367
|
} | {
|
|
246
|
-
type: "
|
|
368
|
+
type: "transfer";
|
|
247
369
|
amount: {
|
|
248
370
|
currency: "CLP";
|
|
371
|
+
value: string;
|
|
249
372
|
editable: boolean;
|
|
250
|
-
suggested: string;
|
|
251
373
|
};
|
|
252
374
|
source: {
|
|
253
|
-
|
|
375
|
+
type: "alias";
|
|
376
|
+
alias: string;
|
|
254
377
|
} | {
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
account_kind: "checking" | "debit" | "savings";
|
|
258
|
-
account_number: string;
|
|
259
|
-
bank_id: string;
|
|
260
|
-
country: "CL";
|
|
378
|
+
type: "account";
|
|
379
|
+
id: string;
|
|
261
380
|
} | null;
|
|
262
|
-
|
|
263
|
-
editable:
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
account_kind: "checking" | "debit" | "savings";
|
|
267
|
-
account_number: string;
|
|
268
|
-
bank_id: string;
|
|
269
|
-
country: "CL";
|
|
381
|
+
destination: {
|
|
382
|
+
editable: false;
|
|
383
|
+
type: "alias";
|
|
384
|
+
alias: string;
|
|
270
385
|
} | {
|
|
271
|
-
bank_account_id: string;
|
|
272
386
|
editable: false;
|
|
387
|
+
type: "account";
|
|
388
|
+
id: string;
|
|
389
|
+
} | {
|
|
390
|
+
editable: boolean;
|
|
391
|
+
type: "external";
|
|
392
|
+
bank_id: string;
|
|
393
|
+
account_type: "checking" | "debit" | "savings";
|
|
394
|
+
account_id: string;
|
|
395
|
+
holder_id: string;
|
|
396
|
+
holder_name: string;
|
|
273
397
|
};
|
|
274
398
|
expires_in?: string | undefined;
|
|
275
399
|
expires_at?: string | undefined;
|
|
276
400
|
note?: {
|
|
277
|
-
|
|
401
|
+
value: string;
|
|
278
402
|
editable: boolean;
|
|
279
403
|
} | undefined;
|
|
280
404
|
metadata: {
|
|
281
405
|
[x: string]: unknown;
|
|
282
406
|
};
|
|
283
407
|
} | {
|
|
284
|
-
type: "
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
408
|
+
type: "account_opening";
|
|
409
|
+
alias: string;
|
|
410
|
+
name?: string | undefined;
|
|
411
|
+
upsert: boolean;
|
|
412
|
+
expires_in?: string | undefined;
|
|
413
|
+
expires_at?: string | undefined;
|
|
414
|
+
note?: {
|
|
415
|
+
value: string;
|
|
416
|
+
editable: boolean;
|
|
417
|
+
} | undefined;
|
|
418
|
+
metadata: {
|
|
419
|
+
[x: string]: unknown;
|
|
289
420
|
};
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
421
|
+
} | {
|
|
422
|
+
type: "account_closure";
|
|
423
|
+
account: {
|
|
424
|
+
type: "alias";
|
|
425
|
+
alias: string;
|
|
426
|
+
} | {
|
|
427
|
+
type: "account";
|
|
428
|
+
id: string;
|
|
295
429
|
};
|
|
296
430
|
expires_in?: string | undefined;
|
|
297
431
|
expires_at?: string | undefined;
|
|
298
432
|
note?: {
|
|
299
|
-
|
|
433
|
+
value: string;
|
|
300
434
|
editable: boolean;
|
|
301
435
|
} | undefined;
|
|
302
436
|
metadata: {
|
|
303
437
|
[x: string]: unknown;
|
|
304
438
|
};
|
|
305
439
|
}, "metadata_too_large">]>;
|
|
440
|
+
/** Validated Intent creation payload inferred from the public schema. */
|
|
441
|
+
export type IntentCreate = v.InferOutput<typeof IntentCreateSchema>;
|
|
306
442
|
/** Returns validation issues without throwing across the HTTP boundary. */
|
|
307
443
|
export declare function safeParseIntentCreate(input: unknown): v.SafeParseResult<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
308
444
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
445
|
+
readonly destination: v.OptionalSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
446
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
447
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
448
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
449
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
450
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
451
|
+
}, undefined>], undefined>, undefined>;
|
|
309
452
|
readonly amount: v.OptionalSchema<v.StrictObjectSchema<{
|
|
310
453
|
currency: v.LiteralSchema<"CLP", undefined>;
|
|
454
|
+
value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
|
|
311
455
|
editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
312
|
-
suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
|
|
313
456
|
}, undefined>, undefined>;
|
|
314
457
|
readonly expires_at: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>, undefined>;
|
|
315
458
|
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
316
459
|
readonly note: v.OptionalSchema<v.StrictObjectSchema<{
|
|
317
|
-
readonly
|
|
460
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
|
|
318
461
|
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
319
462
|
}, undefined>, undefined>;
|
|
320
463
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
321
464
|
}, undefined>, v.StrictObjectSchema<{
|
|
322
|
-
readonly type: v.LiteralSchema<"
|
|
465
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
323
466
|
readonly amount: v.StrictObjectSchema<{
|
|
324
467
|
currency: v.LiteralSchema<"CLP", undefined>;
|
|
468
|
+
value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
|
|
325
469
|
editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
326
|
-
suggested: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>;
|
|
327
470
|
}, undefined>;
|
|
328
|
-
readonly source: v.OptionalSchema<v.NullableSchema<v.
|
|
329
|
-
|
|
471
|
+
readonly source: v.OptionalSchema<v.NullableSchema<v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
472
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
473
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
330
474
|
}, undefined>, v.StrictObjectSchema<{
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
334
|
-
account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
335
|
-
bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
336
|
-
country: v.LiteralSchema<"CL", undefined>;
|
|
475
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
476
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
337
477
|
}, undefined>], undefined>, undefined>, null>;
|
|
338
|
-
readonly
|
|
339
|
-
readonly editable: v.OptionalSchema<v.
|
|
340
|
-
readonly
|
|
341
|
-
readonly
|
|
342
|
-
readonly account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
343
|
-
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
344
|
-
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
345
|
-
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
478
|
+
readonly destination: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
479
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
480
|
+
readonly type: v.LiteralSchema<"alias", undefined>;
|
|
481
|
+
readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
346
482
|
}, undefined>, v.StrictObjectSchema<{
|
|
347
|
-
readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
348
483
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
484
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
485
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
486
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
487
|
+
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
488
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
489
|
+
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
490
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
491
|
+
readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
492
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
493
|
+
readonly holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
349
494
|
}, undefined>], undefined>;
|
|
350
495
|
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
351
496
|
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
352
497
|
readonly note: v.OptionalSchema<v.StrictObjectSchema<{
|
|
353
|
-
readonly
|
|
498
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
|
|
354
499
|
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
355
500
|
}, undefined>, undefined>;
|
|
356
501
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
357
502
|
}, undefined>, v.StrictObjectSchema<{
|
|
358
|
-
readonly type: v.LiteralSchema<"
|
|
359
|
-
readonly
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
readonly
|
|
365
|
-
readonly
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
503
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
504
|
+
readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
505
|
+
readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
|
|
506
|
+
readonly upsert: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
507
|
+
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
508
|
+
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
509
|
+
readonly note: v.OptionalSchema<v.StrictObjectSchema<{
|
|
510
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
|
|
511
|
+
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
512
|
+
}, undefined>, undefined>;
|
|
513
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
514
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
515
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
516
|
+
readonly account: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
517
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
518
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
519
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
520
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
521
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
522
|
+
}, undefined>], undefined>;
|
|
370
523
|
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
371
524
|
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
372
525
|
readonly note: v.OptionalSchema<v.StrictObjectSchema<{
|
|
373
|
-
readonly
|
|
526
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>;
|
|
374
527
|
readonly editable: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
375
528
|
}, undefined>, undefined>;
|
|
376
529
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
377
530
|
}, undefined>], undefined>, v.CheckAction<{
|
|
378
531
|
type: "deposit";
|
|
532
|
+
destination?: {
|
|
533
|
+
type: "alias";
|
|
534
|
+
alias: string;
|
|
535
|
+
} | {
|
|
536
|
+
type: "account";
|
|
537
|
+
id: string;
|
|
538
|
+
} | undefined;
|
|
379
539
|
amount?: {
|
|
380
540
|
currency: "CLP";
|
|
541
|
+
value: string;
|
|
381
542
|
editable: boolean;
|
|
382
|
-
suggested: string;
|
|
383
543
|
} | undefined;
|
|
384
544
|
expires_at?: string | null | undefined;
|
|
385
545
|
expires_in?: string | undefined;
|
|
386
546
|
note?: {
|
|
387
|
-
|
|
547
|
+
value: string;
|
|
388
548
|
editable: boolean;
|
|
389
549
|
} | undefined;
|
|
390
550
|
metadata: {
|
|
391
551
|
[x: string]: unknown;
|
|
392
552
|
};
|
|
393
553
|
} | {
|
|
394
|
-
type: "
|
|
554
|
+
type: "transfer";
|
|
395
555
|
amount: {
|
|
396
556
|
currency: "CLP";
|
|
557
|
+
value: string;
|
|
397
558
|
editable: boolean;
|
|
398
|
-
suggested: string;
|
|
399
559
|
};
|
|
400
560
|
source: {
|
|
401
|
-
|
|
561
|
+
type: "alias";
|
|
562
|
+
alias: string;
|
|
402
563
|
} | {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
account_kind: "checking" | "debit" | "savings";
|
|
406
|
-
account_number: string;
|
|
407
|
-
bank_id: string;
|
|
408
|
-
country: "CL";
|
|
564
|
+
type: "account";
|
|
565
|
+
id: string;
|
|
409
566
|
} | null;
|
|
410
|
-
|
|
411
|
-
editable:
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
account_kind: "checking" | "debit" | "savings";
|
|
415
|
-
account_number: string;
|
|
416
|
-
bank_id: string;
|
|
417
|
-
country: "CL";
|
|
567
|
+
destination: {
|
|
568
|
+
editable: false;
|
|
569
|
+
type: "alias";
|
|
570
|
+
alias: string;
|
|
418
571
|
} | {
|
|
419
|
-
bank_account_id: string;
|
|
420
572
|
editable: false;
|
|
573
|
+
type: "account";
|
|
574
|
+
id: string;
|
|
575
|
+
} | {
|
|
576
|
+
editable: boolean;
|
|
577
|
+
type: "external";
|
|
578
|
+
bank_id: string;
|
|
579
|
+
account_type: "checking" | "debit" | "savings";
|
|
580
|
+
account_id: string;
|
|
581
|
+
holder_id: string;
|
|
582
|
+
holder_name: string;
|
|
421
583
|
};
|
|
422
584
|
expires_in?: string | undefined;
|
|
423
585
|
expires_at?: string | undefined;
|
|
424
586
|
note?: {
|
|
425
|
-
|
|
587
|
+
value: string;
|
|
426
588
|
editable: boolean;
|
|
427
589
|
} | undefined;
|
|
428
590
|
metadata: {
|
|
429
591
|
[x: string]: unknown;
|
|
430
592
|
};
|
|
431
593
|
} | {
|
|
432
|
-
type: "
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
594
|
+
type: "account_opening";
|
|
595
|
+
alias: string;
|
|
596
|
+
name?: string | undefined;
|
|
597
|
+
upsert: boolean;
|
|
598
|
+
expires_in?: string | undefined;
|
|
599
|
+
expires_at?: string | undefined;
|
|
600
|
+
note?: {
|
|
601
|
+
value: string;
|
|
602
|
+
editable: boolean;
|
|
603
|
+
} | undefined;
|
|
604
|
+
metadata: {
|
|
605
|
+
[x: string]: unknown;
|
|
437
606
|
};
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
607
|
+
} | {
|
|
608
|
+
type: "account_closure";
|
|
609
|
+
account: {
|
|
610
|
+
type: "alias";
|
|
611
|
+
alias: string;
|
|
612
|
+
} | {
|
|
613
|
+
type: "account";
|
|
614
|
+
id: string;
|
|
443
615
|
};
|
|
444
616
|
expires_in?: string | undefined;
|
|
445
617
|
expires_at?: string | undefined;
|
|
446
618
|
note?: {
|
|
447
|
-
|
|
619
|
+
value: string;
|
|
448
620
|
editable: boolean;
|
|
449
621
|
} | undefined;
|
|
450
622
|
metadata: {
|
|
@@ -452,75 +624,94 @@ export declare function safeParseIntentCreate(input: unknown): v.SafeParseResult
|
|
|
452
624
|
};
|
|
453
625
|
}, "exactly_one_expiration_required">, v.CheckAction<{
|
|
454
626
|
type: "deposit";
|
|
627
|
+
destination?: {
|
|
628
|
+
type: "alias";
|
|
629
|
+
alias: string;
|
|
630
|
+
} | {
|
|
631
|
+
type: "account";
|
|
632
|
+
id: string;
|
|
633
|
+
} | undefined;
|
|
455
634
|
amount?: {
|
|
456
635
|
currency: "CLP";
|
|
636
|
+
value: string;
|
|
457
637
|
editable: boolean;
|
|
458
|
-
suggested: string;
|
|
459
638
|
} | undefined;
|
|
460
639
|
expires_at?: string | null | undefined;
|
|
461
640
|
expires_in?: string | undefined;
|
|
462
641
|
note?: {
|
|
463
|
-
|
|
642
|
+
value: string;
|
|
464
643
|
editable: boolean;
|
|
465
644
|
} | undefined;
|
|
466
645
|
metadata: {
|
|
467
646
|
[x: string]: unknown;
|
|
468
647
|
};
|
|
469
648
|
} | {
|
|
470
|
-
type: "
|
|
649
|
+
type: "transfer";
|
|
471
650
|
amount: {
|
|
472
651
|
currency: "CLP";
|
|
652
|
+
value: string;
|
|
473
653
|
editable: boolean;
|
|
474
|
-
suggested: string;
|
|
475
654
|
};
|
|
476
655
|
source: {
|
|
477
|
-
|
|
656
|
+
type: "alias";
|
|
657
|
+
alias: string;
|
|
478
658
|
} | {
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
account_kind: "checking" | "debit" | "savings";
|
|
482
|
-
account_number: string;
|
|
483
|
-
bank_id: string;
|
|
484
|
-
country: "CL";
|
|
659
|
+
type: "account";
|
|
660
|
+
id: string;
|
|
485
661
|
} | null;
|
|
486
|
-
|
|
487
|
-
editable:
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
account_kind: "checking" | "debit" | "savings";
|
|
491
|
-
account_number: string;
|
|
492
|
-
bank_id: string;
|
|
493
|
-
country: "CL";
|
|
662
|
+
destination: {
|
|
663
|
+
editable: false;
|
|
664
|
+
type: "alias";
|
|
665
|
+
alias: string;
|
|
494
666
|
} | {
|
|
495
|
-
bank_account_id: string;
|
|
496
667
|
editable: false;
|
|
668
|
+
type: "account";
|
|
669
|
+
id: string;
|
|
670
|
+
} | {
|
|
671
|
+
editable: boolean;
|
|
672
|
+
type: "external";
|
|
673
|
+
bank_id: string;
|
|
674
|
+
account_type: "checking" | "debit" | "savings";
|
|
675
|
+
account_id: string;
|
|
676
|
+
holder_id: string;
|
|
677
|
+
holder_name: string;
|
|
497
678
|
};
|
|
498
679
|
expires_in?: string | undefined;
|
|
499
680
|
expires_at?: string | undefined;
|
|
500
681
|
note?: {
|
|
501
|
-
|
|
682
|
+
value: string;
|
|
502
683
|
editable: boolean;
|
|
503
684
|
} | undefined;
|
|
504
685
|
metadata: {
|
|
505
686
|
[x: string]: unknown;
|
|
506
687
|
};
|
|
507
688
|
} | {
|
|
508
|
-
type: "
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
689
|
+
type: "account_opening";
|
|
690
|
+
alias: string;
|
|
691
|
+
name?: string | undefined;
|
|
692
|
+
upsert: boolean;
|
|
693
|
+
expires_in?: string | undefined;
|
|
694
|
+
expires_at?: string | undefined;
|
|
695
|
+
note?: {
|
|
696
|
+
value: string;
|
|
697
|
+
editable: boolean;
|
|
698
|
+
} | undefined;
|
|
699
|
+
metadata: {
|
|
700
|
+
[x: string]: unknown;
|
|
513
701
|
};
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
702
|
+
} | {
|
|
703
|
+
type: "account_closure";
|
|
704
|
+
account: {
|
|
705
|
+
type: "alias";
|
|
706
|
+
alias: string;
|
|
707
|
+
} | {
|
|
708
|
+
type: "account";
|
|
709
|
+
id: string;
|
|
519
710
|
};
|
|
520
711
|
expires_in?: string | undefined;
|
|
521
712
|
expires_at?: string | undefined;
|
|
522
713
|
note?: {
|
|
523
|
-
|
|
714
|
+
value: string;
|
|
524
715
|
editable: boolean;
|
|
525
716
|
} | undefined;
|
|
526
717
|
metadata: {
|
|
@@ -528,110 +719,650 @@ export declare function safeParseIntentCreate(input: unknown): v.SafeParseResult
|
|
|
528
719
|
};
|
|
529
720
|
}, "passive_deposit_requires_no_target">, v.CheckAction<{
|
|
530
721
|
type: "deposit";
|
|
722
|
+
destination?: {
|
|
723
|
+
type: "alias";
|
|
724
|
+
alias: string;
|
|
725
|
+
} | {
|
|
726
|
+
type: "account";
|
|
727
|
+
id: string;
|
|
728
|
+
} | undefined;
|
|
531
729
|
amount?: {
|
|
532
730
|
currency: "CLP";
|
|
731
|
+
value: string;
|
|
533
732
|
editable: boolean;
|
|
534
|
-
suggested: string;
|
|
535
733
|
} | undefined;
|
|
536
734
|
expires_at?: string | null | undefined;
|
|
537
735
|
expires_in?: string | undefined;
|
|
538
736
|
note?: {
|
|
539
|
-
|
|
737
|
+
value: string;
|
|
540
738
|
editable: boolean;
|
|
541
739
|
} | undefined;
|
|
542
740
|
metadata: {
|
|
543
741
|
[x: string]: unknown;
|
|
544
742
|
};
|
|
545
743
|
} | {
|
|
546
|
-
type: "
|
|
744
|
+
type: "transfer";
|
|
547
745
|
amount: {
|
|
548
746
|
currency: "CLP";
|
|
747
|
+
value: string;
|
|
549
748
|
editable: boolean;
|
|
550
|
-
suggested: string;
|
|
551
749
|
};
|
|
552
750
|
source: {
|
|
553
|
-
|
|
751
|
+
type: "alias";
|
|
752
|
+
alias: string;
|
|
554
753
|
} | {
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
account_kind: "checking" | "debit" | "savings";
|
|
558
|
-
account_number: string;
|
|
559
|
-
bank_id: string;
|
|
560
|
-
country: "CL";
|
|
754
|
+
type: "account";
|
|
755
|
+
id: string;
|
|
561
756
|
} | null;
|
|
562
|
-
|
|
757
|
+
destination: {
|
|
758
|
+
editable: false;
|
|
759
|
+
type: "alias";
|
|
760
|
+
alias: string;
|
|
761
|
+
} | {
|
|
762
|
+
editable: false;
|
|
763
|
+
type: "account";
|
|
764
|
+
id: string;
|
|
765
|
+
} | {
|
|
563
766
|
editable: boolean;
|
|
564
|
-
|
|
565
|
-
account_holder_name: string;
|
|
566
|
-
account_kind: "checking" | "debit" | "savings";
|
|
567
|
-
account_number: string;
|
|
767
|
+
type: "external";
|
|
568
768
|
bank_id: string;
|
|
569
|
-
|
|
769
|
+
account_type: "checking" | "debit" | "savings";
|
|
770
|
+
account_id: string;
|
|
771
|
+
holder_id: string;
|
|
772
|
+
holder_name: string;
|
|
773
|
+
};
|
|
774
|
+
expires_in?: string | undefined;
|
|
775
|
+
expires_at?: string | undefined;
|
|
776
|
+
note?: {
|
|
777
|
+
value: string;
|
|
778
|
+
editable: boolean;
|
|
779
|
+
} | undefined;
|
|
780
|
+
metadata: {
|
|
781
|
+
[x: string]: unknown;
|
|
782
|
+
};
|
|
783
|
+
} | {
|
|
784
|
+
type: "account_opening";
|
|
785
|
+
alias: string;
|
|
786
|
+
name?: string | undefined;
|
|
787
|
+
upsert: boolean;
|
|
788
|
+
expires_in?: string | undefined;
|
|
789
|
+
expires_at?: string | undefined;
|
|
790
|
+
note?: {
|
|
791
|
+
value: string;
|
|
792
|
+
editable: boolean;
|
|
793
|
+
} | undefined;
|
|
794
|
+
metadata: {
|
|
795
|
+
[x: string]: unknown;
|
|
796
|
+
};
|
|
797
|
+
} | {
|
|
798
|
+
type: "account_closure";
|
|
799
|
+
account: {
|
|
800
|
+
type: "alias";
|
|
801
|
+
alias: string;
|
|
570
802
|
} | {
|
|
571
|
-
|
|
572
|
-
|
|
803
|
+
type: "account";
|
|
804
|
+
id: string;
|
|
573
805
|
};
|
|
574
806
|
expires_in?: string | undefined;
|
|
575
807
|
expires_at?: string | undefined;
|
|
576
808
|
note?: {
|
|
577
|
-
|
|
809
|
+
value: string;
|
|
578
810
|
editable: boolean;
|
|
579
811
|
} | undefined;
|
|
580
812
|
metadata: {
|
|
581
813
|
[x: string]: unknown;
|
|
582
814
|
};
|
|
815
|
+
}, "metadata_too_large">]>>;
|
|
816
|
+
/**
|
|
817
|
+
* The verified claims of a Signed Instruction: the `application/jwt` half of the same creation.
|
|
818
|
+
*
|
|
819
|
+
* Nothing here is optional that the transfer needs and nothing here is editable. An instruction that
|
|
820
|
+
* does not say where the money comes from or where it goes is not signable, so `source` and
|
|
821
|
+
* `destination` are required and the amount carries no `editable`. `note` is a plain reference for
|
|
822
|
+
* the same reason: there is no screen on this path, so there is nobody to propose it to.
|
|
823
|
+
*
|
|
824
|
+
* There is no `org_id`: the subject is the one of the Grant behind the access token that submits the
|
|
825
|
+
* instruction, and nothing inside the signature may name another.
|
|
826
|
+
*
|
|
827
|
+
* The expiration is present on this side too, and it is not `exp`. `exp` bounds how long the
|
|
828
|
+
* instruction may be *submitted*; the Intent expiration bounds how long the Intent may be approved
|
|
829
|
+
* and executed. They are different deadlines, and because every value a signed transfer uses has to
|
|
830
|
+
* come from inside the signature, the second one cannot arrive in a header or a query string.
|
|
831
|
+
*
|
|
832
|
+
* `account_opening` is signed on the same terms, and `upsert` is the reason it matters here. The
|
|
833
|
+
* flag decides whether naming an Account Alias that already exists is a refusal or a request for the
|
|
834
|
+
* account already carrying it, which is a difference in what the instruction *orders*. Carried as a
|
|
835
|
+
* transport option — a header, a query parameter, a field beside the assertion — anybody holding the
|
|
836
|
+
* signed instruction could flip it, and the order executed would not be the order signed.
|
|
837
|
+
*
|
|
838
|
+
* @example
|
|
839
|
+
* const claims = safeParseSignedIntent(verification.claims);
|
|
840
|
+
* if (claims.success) console.log(claims.output.jti, claims.output.amount.value);
|
|
841
|
+
*/
|
|
842
|
+
export declare const SignedIntentSchema: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
843
|
+
readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
844
|
+
readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
|
|
845
|
+
readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
846
|
+
readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
847
|
+
readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
848
|
+
readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
849
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
850
|
+
readonly source: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
851
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
852
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
853
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
854
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
855
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
856
|
+
}, undefined>], undefined>;
|
|
857
|
+
readonly destination: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
858
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
859
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
860
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
861
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
862
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
863
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
864
|
+
type: v.LiteralSchema<"external", undefined>;
|
|
865
|
+
bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
866
|
+
account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
867
|
+
account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
868
|
+
holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
869
|
+
holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
870
|
+
}, undefined>], undefined>;
|
|
871
|
+
readonly amount: v.StrictObjectSchema<{
|
|
872
|
+
currency: v.LiteralSchema<"CLP", undefined>;
|
|
873
|
+
value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
|
|
874
|
+
}, undefined>;
|
|
875
|
+
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
876
|
+
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
877
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
|
|
878
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
879
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
880
|
+
readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
881
|
+
readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
|
|
882
|
+
readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
883
|
+
readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
884
|
+
readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
885
|
+
readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
886
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
887
|
+
readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
888
|
+
readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
|
|
889
|
+
readonly upsert: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
890
|
+
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
891
|
+
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
892
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
893
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
894
|
+
readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
895
|
+
readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
|
|
896
|
+
readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
897
|
+
readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
898
|
+
readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
899
|
+
readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
900
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
901
|
+
readonly account: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
902
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
903
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
904
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
905
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
906
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
907
|
+
}, undefined>], undefined>;
|
|
908
|
+
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
909
|
+
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
910
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
911
|
+
}, undefined>], undefined>, v.CheckAction<{
|
|
912
|
+
iss: string;
|
|
913
|
+
aud: "https://api.andco.com";
|
|
914
|
+
jti: string;
|
|
915
|
+
exp: number;
|
|
916
|
+
iat?: number | undefined;
|
|
917
|
+
nbf?: number | undefined;
|
|
918
|
+
type: "transfer";
|
|
919
|
+
source: {
|
|
920
|
+
type: "alias";
|
|
921
|
+
alias: string;
|
|
922
|
+
} | {
|
|
923
|
+
type: "account";
|
|
924
|
+
id: string;
|
|
925
|
+
};
|
|
926
|
+
destination: {
|
|
927
|
+
type: "alias";
|
|
928
|
+
alias: string;
|
|
929
|
+
} | {
|
|
930
|
+
type: "account";
|
|
931
|
+
id: string;
|
|
932
|
+
} | {
|
|
933
|
+
type: "external";
|
|
934
|
+
bank_id: string;
|
|
935
|
+
account_type: "checking" | "debit" | "savings";
|
|
936
|
+
account_id: string;
|
|
937
|
+
holder_id: string;
|
|
938
|
+
holder_name: string;
|
|
939
|
+
};
|
|
940
|
+
amount: {
|
|
941
|
+
currency: "CLP";
|
|
942
|
+
value: string;
|
|
943
|
+
};
|
|
944
|
+
expires_in?: string | undefined;
|
|
945
|
+
expires_at?: string | undefined;
|
|
946
|
+
note?: string | undefined;
|
|
947
|
+
metadata: {
|
|
948
|
+
[x: string]: unknown;
|
|
949
|
+
};
|
|
950
|
+
} | {
|
|
951
|
+
iss: string;
|
|
952
|
+
aud: "https://api.andco.com";
|
|
953
|
+
jti: string;
|
|
954
|
+
exp: number;
|
|
955
|
+
iat?: number | undefined;
|
|
956
|
+
nbf?: number | undefined;
|
|
957
|
+
type: "account_opening";
|
|
958
|
+
alias: string;
|
|
959
|
+
name?: string | undefined;
|
|
960
|
+
upsert: boolean;
|
|
961
|
+
expires_in?: string | undefined;
|
|
962
|
+
expires_at?: string | undefined;
|
|
963
|
+
metadata: {
|
|
964
|
+
[x: string]: unknown;
|
|
965
|
+
};
|
|
583
966
|
} | {
|
|
584
|
-
|
|
967
|
+
iss: string;
|
|
968
|
+
aud: "https://api.andco.com";
|
|
969
|
+
jti: string;
|
|
970
|
+
exp: number;
|
|
971
|
+
iat?: number | undefined;
|
|
972
|
+
nbf?: number | undefined;
|
|
973
|
+
type: "account_closure";
|
|
974
|
+
account: {
|
|
975
|
+
type: "alias";
|
|
976
|
+
alias: string;
|
|
977
|
+
} | {
|
|
978
|
+
type: "account";
|
|
979
|
+
id: string;
|
|
980
|
+
};
|
|
981
|
+
expires_in?: string | undefined;
|
|
982
|
+
expires_at?: string | undefined;
|
|
983
|
+
metadata: {
|
|
984
|
+
[x: string]: unknown;
|
|
985
|
+
};
|
|
986
|
+
}, "exactly_one_expiration_required">, v.CheckAction<{
|
|
987
|
+
iss: string;
|
|
988
|
+
aud: "https://api.andco.com";
|
|
989
|
+
jti: string;
|
|
990
|
+
exp: number;
|
|
991
|
+
iat?: number | undefined;
|
|
992
|
+
nbf?: number | undefined;
|
|
993
|
+
type: "transfer";
|
|
994
|
+
source: {
|
|
995
|
+
type: "alias";
|
|
996
|
+
alias: string;
|
|
997
|
+
} | {
|
|
998
|
+
type: "account";
|
|
999
|
+
id: string;
|
|
1000
|
+
};
|
|
1001
|
+
destination: {
|
|
1002
|
+
type: "alias";
|
|
1003
|
+
alias: string;
|
|
1004
|
+
} | {
|
|
1005
|
+
type: "account";
|
|
1006
|
+
id: string;
|
|
1007
|
+
} | {
|
|
1008
|
+
type: "external";
|
|
1009
|
+
bank_id: string;
|
|
1010
|
+
account_type: "checking" | "debit" | "savings";
|
|
1011
|
+
account_id: string;
|
|
1012
|
+
holder_id: string;
|
|
1013
|
+
holder_name: string;
|
|
1014
|
+
};
|
|
1015
|
+
amount: {
|
|
1016
|
+
currency: "CLP";
|
|
1017
|
+
value: string;
|
|
1018
|
+
};
|
|
1019
|
+
expires_in?: string | undefined;
|
|
1020
|
+
expires_at?: string | undefined;
|
|
1021
|
+
note?: string | undefined;
|
|
1022
|
+
metadata: {
|
|
1023
|
+
[x: string]: unknown;
|
|
1024
|
+
};
|
|
1025
|
+
} | {
|
|
1026
|
+
iss: string;
|
|
1027
|
+
aud: "https://api.andco.com";
|
|
1028
|
+
jti: string;
|
|
1029
|
+
exp: number;
|
|
1030
|
+
iat?: number | undefined;
|
|
1031
|
+
nbf?: number | undefined;
|
|
1032
|
+
type: "account_opening";
|
|
1033
|
+
alias: string;
|
|
1034
|
+
name?: string | undefined;
|
|
1035
|
+
upsert: boolean;
|
|
1036
|
+
expires_in?: string | undefined;
|
|
1037
|
+
expires_at?: string | undefined;
|
|
1038
|
+
metadata: {
|
|
1039
|
+
[x: string]: unknown;
|
|
1040
|
+
};
|
|
1041
|
+
} | {
|
|
1042
|
+
iss: string;
|
|
1043
|
+
aud: "https://api.andco.com";
|
|
1044
|
+
jti: string;
|
|
1045
|
+
exp: number;
|
|
1046
|
+
iat?: number | undefined;
|
|
1047
|
+
nbf?: number | undefined;
|
|
1048
|
+
type: "account_closure";
|
|
1049
|
+
account: {
|
|
1050
|
+
type: "alias";
|
|
1051
|
+
alias: string;
|
|
1052
|
+
} | {
|
|
1053
|
+
type: "account";
|
|
1054
|
+
id: string;
|
|
1055
|
+
};
|
|
1056
|
+
expires_in?: string | undefined;
|
|
1057
|
+
expires_at?: string | undefined;
|
|
1058
|
+
metadata: {
|
|
1059
|
+
[x: string]: unknown;
|
|
1060
|
+
};
|
|
1061
|
+
}, "metadata_too_large">]>;
|
|
1062
|
+
/** Validated signed Intent claims; schema parsing alone does not verify a signature. */
|
|
1063
|
+
export type SignedIntent = v.InferOutput<typeof SignedIntentSchema>;
|
|
1064
|
+
/**
|
|
1065
|
+
* Cancelling names why, because an Intent that vanished without a reason is an unexplained gap.
|
|
1066
|
+
* A Cancellation is the creator withdrawing its own request: only the client that created the
|
|
1067
|
+
* Intent may cancel it. An approver declining it is a Rejection ({@link IntentRejectionSchema}).
|
|
1068
|
+
*
|
|
1069
|
+
* @example
|
|
1070
|
+
* safeParseIntentCancellation({ reason: "rejected_by_erp" });
|
|
1071
|
+
*/
|
|
1072
|
+
export declare const IntentCancellationSchema: v.StrictObjectSchema<{
|
|
1073
|
+
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.CheckAction<string, "reason_too_long">]>;
|
|
1074
|
+
}, undefined>;
|
|
1075
|
+
/** A required reason, 1–280 characters, naming why an Intent was cancelled. */
|
|
1076
|
+
export type IntentCancellation = v.InferOutput<typeof IntentCancellationSchema>;
|
|
1077
|
+
/** Returns validation issues for a cancellation reason without throwing across the HTTP boundary. */
|
|
1078
|
+
export declare function safeParseIntentCancellation(input: unknown): v.SafeParseResult<v.StrictObjectSchema<{
|
|
1079
|
+
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.CheckAction<string, "reason_too_long">]>;
|
|
1080
|
+
}, undefined>>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Rejecting names why. A Rejection is an approver declining an Intent with a Grant holding the
|
|
1083
|
+
* family's `reject` action (`bank_transfer` for a transfer); the audit keeps it apart from a
|
|
1084
|
+
* Cancellation, which is the creator withdrawing its own request.
|
|
1085
|
+
*
|
|
1086
|
+
* @example
|
|
1087
|
+
* safeParseIntentRejection({ reason: "duplicated_invoice" });
|
|
1088
|
+
*/
|
|
1089
|
+
export declare const IntentRejectionSchema: v.StrictObjectSchema<{
|
|
1090
|
+
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.CheckAction<string, "reason_too_long">]>;
|
|
1091
|
+
}, undefined>;
|
|
1092
|
+
/** A required reason, 1–280 characters, naming why an approver rejected an Intent. */
|
|
1093
|
+
export type IntentRejection = v.InferOutput<typeof IntentRejectionSchema>;
|
|
1094
|
+
/** Returns validation issues for a rejection reason without throwing across the HTTP boundary. */
|
|
1095
|
+
export declare function safeParseIntentRejection(input: unknown): v.SafeParseResult<v.StrictObjectSchema<{
|
|
1096
|
+
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.CheckAction<string, "reason_too_long">]>;
|
|
1097
|
+
}, undefined>>;
|
|
1098
|
+
/**
|
|
1099
|
+
* Error codes an Intent's Approval lifecycle answers with, beyond the generic transport codes.
|
|
1100
|
+
*
|
|
1101
|
+
* A cancellation or an approval may observe an Intent whose deadline to be approved and executed
|
|
1102
|
+
* has already passed; `intent_expired` names that failure so a caller can distinguish it from an
|
|
1103
|
+
* ordinary rejection.
|
|
1104
|
+
*/
|
|
1105
|
+
export declare const ANDCO_INTENT_ERROR_CODES: {
|
|
1106
|
+
/** The Intent's deadline to be approved and executed has already passed. */
|
|
1107
|
+
readonly INTENT_EXPIRED: "intent_expired";
|
|
1108
|
+
};
|
|
1109
|
+
/** Returns validation issues for the verified claims without throwing across the HTTP boundary. */
|
|
1110
|
+
export declare function safeParseSignedIntent(input: unknown): v.SafeParseResult<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1111
|
+
readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1112
|
+
readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
|
|
1113
|
+
readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1114
|
+
readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
1115
|
+
readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
1116
|
+
readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
1117
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1118
|
+
readonly source: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1119
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
1120
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1121
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1122
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
1123
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1124
|
+
}, undefined>], undefined>;
|
|
1125
|
+
readonly destination: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1126
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
1127
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1128
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1129
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
1130
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1131
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1132
|
+
type: v.LiteralSchema<"external", undefined>;
|
|
1133
|
+
bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1134
|
+
account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
1135
|
+
account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1136
|
+
holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1137
|
+
holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1138
|
+
}, undefined>], undefined>;
|
|
1139
|
+
readonly amount: v.StrictObjectSchema<{
|
|
1140
|
+
currency: v.LiteralSchema<"CLP", undefined>;
|
|
1141
|
+
value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>;
|
|
1142
|
+
}, undefined>;
|
|
1143
|
+
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
1144
|
+
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
1145
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
|
|
1146
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1147
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1148
|
+
readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1149
|
+
readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
|
|
1150
|
+
readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1151
|
+
readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
1152
|
+
readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
1153
|
+
readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
1154
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
1155
|
+
readonly alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1156
|
+
readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 80, undefined>]>, undefined>;
|
|
1157
|
+
readonly upsert: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
1158
|
+
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
1159
|
+
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
1160
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1161
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1162
|
+
readonly iss: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1163
|
+
readonly aud: v.LiteralSchema<"https://api.andco.com", undefined>;
|
|
1164
|
+
readonly jti: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1165
|
+
readonly exp: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>;
|
|
1166
|
+
readonly iat: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
1167
|
+
readonly nbf: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>]>, undefined>;
|
|
1168
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
1169
|
+
readonly account: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1170
|
+
type: v.LiteralSchema<"alias", undefined>;
|
|
1171
|
+
alias: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1172
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1173
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
1174
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1175
|
+
}, undefined>], undefined>;
|
|
1176
|
+
readonly expires_in: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_interval">]>, undefined>;
|
|
1177
|
+
readonly expires_at: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.CheckAction<string, "invalid_expiration_datetime">]>, undefined>;
|
|
1178
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1179
|
+
}, undefined>], undefined>, v.CheckAction<{
|
|
1180
|
+
iss: string;
|
|
1181
|
+
aud: "https://api.andco.com";
|
|
1182
|
+
jti: string;
|
|
1183
|
+
exp: number;
|
|
1184
|
+
iat?: number | undefined;
|
|
1185
|
+
nbf?: number | undefined;
|
|
1186
|
+
type: "transfer";
|
|
1187
|
+
source: {
|
|
1188
|
+
type: "alias";
|
|
1189
|
+
alias: string;
|
|
1190
|
+
} | {
|
|
1191
|
+
type: "account";
|
|
1192
|
+
id: string;
|
|
1193
|
+
};
|
|
1194
|
+
destination: {
|
|
1195
|
+
type: "alias";
|
|
1196
|
+
alias: string;
|
|
1197
|
+
} | {
|
|
1198
|
+
type: "account";
|
|
1199
|
+
id: string;
|
|
1200
|
+
} | {
|
|
1201
|
+
type: "external";
|
|
1202
|
+
bank_id: string;
|
|
1203
|
+
account_type: "checking" | "debit" | "savings";
|
|
1204
|
+
account_id: string;
|
|
1205
|
+
holder_id: string;
|
|
1206
|
+
holder_name: string;
|
|
1207
|
+
};
|
|
585
1208
|
amount: {
|
|
586
|
-
editable: false;
|
|
587
1209
|
currency: "CLP";
|
|
588
|
-
|
|
1210
|
+
value: string;
|
|
1211
|
+
};
|
|
1212
|
+
expires_in?: string | undefined;
|
|
1213
|
+
expires_at?: string | undefined;
|
|
1214
|
+
note?: string | undefined;
|
|
1215
|
+
metadata: {
|
|
1216
|
+
[x: string]: unknown;
|
|
1217
|
+
};
|
|
1218
|
+
} | {
|
|
1219
|
+
iss: string;
|
|
1220
|
+
aud: "https://api.andco.com";
|
|
1221
|
+
jti: string;
|
|
1222
|
+
exp: number;
|
|
1223
|
+
iat?: number | undefined;
|
|
1224
|
+
nbf?: number | undefined;
|
|
1225
|
+
type: "account_opening";
|
|
1226
|
+
alias: string;
|
|
1227
|
+
name?: string | undefined;
|
|
1228
|
+
upsert: boolean;
|
|
1229
|
+
expires_in?: string | undefined;
|
|
1230
|
+
expires_at?: string | undefined;
|
|
1231
|
+
metadata: {
|
|
1232
|
+
[x: string]: unknown;
|
|
1233
|
+
};
|
|
1234
|
+
} | {
|
|
1235
|
+
iss: string;
|
|
1236
|
+
aud: "https://api.andco.com";
|
|
1237
|
+
jti: string;
|
|
1238
|
+
exp: number;
|
|
1239
|
+
iat?: number | undefined;
|
|
1240
|
+
nbf?: number | undefined;
|
|
1241
|
+
type: "account_closure";
|
|
1242
|
+
account: {
|
|
1243
|
+
type: "alias";
|
|
1244
|
+
alias: string;
|
|
1245
|
+
} | {
|
|
1246
|
+
type: "account";
|
|
1247
|
+
id: string;
|
|
1248
|
+
};
|
|
1249
|
+
expires_in?: string | undefined;
|
|
1250
|
+
expires_at?: string | undefined;
|
|
1251
|
+
metadata: {
|
|
1252
|
+
[x: string]: unknown;
|
|
589
1253
|
};
|
|
1254
|
+
}, "exactly_one_expiration_required">, v.CheckAction<{
|
|
1255
|
+
iss: string;
|
|
1256
|
+
aud: "https://api.andco.com";
|
|
1257
|
+
jti: string;
|
|
1258
|
+
exp: number;
|
|
1259
|
+
iat?: number | undefined;
|
|
1260
|
+
nbf?: number | undefined;
|
|
1261
|
+
type: "transfer";
|
|
590
1262
|
source: {
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
1263
|
+
type: "alias";
|
|
1264
|
+
alias: string;
|
|
1265
|
+
} | {
|
|
1266
|
+
type: "account";
|
|
1267
|
+
id: string;
|
|
1268
|
+
};
|
|
1269
|
+
destination: {
|
|
1270
|
+
type: "alias";
|
|
1271
|
+
alias: string;
|
|
1272
|
+
} | {
|
|
1273
|
+
type: "account";
|
|
1274
|
+
id: string;
|
|
1275
|
+
} | {
|
|
1276
|
+
type: "external";
|
|
1277
|
+
bank_id: string;
|
|
1278
|
+
account_type: "checking" | "debit" | "savings";
|
|
1279
|
+
account_id: string;
|
|
1280
|
+
holder_id: string;
|
|
1281
|
+
holder_name: string;
|
|
1282
|
+
};
|
|
1283
|
+
amount: {
|
|
1284
|
+
currency: "CLP";
|
|
1285
|
+
value: string;
|
|
1286
|
+
};
|
|
1287
|
+
expires_in?: string | undefined;
|
|
1288
|
+
expires_at?: string | undefined;
|
|
1289
|
+
note?: string | undefined;
|
|
1290
|
+
metadata: {
|
|
1291
|
+
[x: string]: unknown;
|
|
1292
|
+
};
|
|
1293
|
+
} | {
|
|
1294
|
+
iss: string;
|
|
1295
|
+
aud: "https://api.andco.com";
|
|
1296
|
+
jti: string;
|
|
1297
|
+
exp: number;
|
|
1298
|
+
iat?: number | undefined;
|
|
1299
|
+
nbf?: number | undefined;
|
|
1300
|
+
type: "account_opening";
|
|
1301
|
+
alias: string;
|
|
1302
|
+
name?: string | undefined;
|
|
1303
|
+
upsert: boolean;
|
|
1304
|
+
expires_in?: string | undefined;
|
|
1305
|
+
expires_at?: string | undefined;
|
|
1306
|
+
metadata: {
|
|
1307
|
+
[x: string]: unknown;
|
|
1308
|
+
};
|
|
1309
|
+
} | {
|
|
1310
|
+
iss: string;
|
|
1311
|
+
aud: "https://api.andco.com";
|
|
1312
|
+
jti: string;
|
|
1313
|
+
exp: number;
|
|
1314
|
+
iat?: number | undefined;
|
|
1315
|
+
nbf?: number | undefined;
|
|
1316
|
+
type: "account_closure";
|
|
1317
|
+
account: {
|
|
1318
|
+
type: "alias";
|
|
1319
|
+
alias: string;
|
|
1320
|
+
} | {
|
|
1321
|
+
type: "account";
|
|
1322
|
+
id: string;
|
|
595
1323
|
};
|
|
596
1324
|
expires_in?: string | undefined;
|
|
597
1325
|
expires_at?: string | undefined;
|
|
598
|
-
note?: {
|
|
599
|
-
suggested: string;
|
|
600
|
-
editable: boolean;
|
|
601
|
-
} | undefined;
|
|
602
1326
|
metadata: {
|
|
603
1327
|
[x: string]: unknown;
|
|
604
1328
|
};
|
|
605
1329
|
}, "metadata_too_large">]>>;
|
|
606
1330
|
/** Identifies recognized unsupported payment shapes without silently dropping their extra instructions. */
|
|
607
1331
|
export declare function unsupportedIntentPaymentShape(input: unknown): string | undefined;
|
|
608
|
-
/**
|
|
609
|
-
|
|
1332
|
+
/**
|
|
1333
|
+
* Values proposed by the account holder; the database enforces editability and freezes confirmation.
|
|
1334
|
+
*
|
|
1335
|
+
* Every member but `intent_id` is optional because nothing here is necessarily editable: a screen
|
|
1336
|
+
* sends only what the Intent left open, and a value that was frozen has nowhere to arrive from.
|
|
1337
|
+
*/
|
|
1338
|
+
export declare const TransferConfirmationSchema: v.StrictObjectSchema<{
|
|
610
1339
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
611
1340
|
readonly source_account_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
612
|
-
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
|
|
613
|
-
readonly
|
|
614
|
-
|
|
615
|
-
account_holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
616
|
-
account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
617
|
-
account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1341
|
+
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>;
|
|
1342
|
+
readonly destination: v.OptionalSchema<v.StrictObjectSchema<{
|
|
1343
|
+
type: v.LiteralSchema<"external", undefined>;
|
|
618
1344
|
bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
619
|
-
|
|
1345
|
+
account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
1346
|
+
account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1347
|
+
holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1348
|
+
holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
620
1349
|
}, undefined>, undefined>;
|
|
621
1350
|
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
|
|
622
1351
|
}, undefined>;
|
|
623
|
-
|
|
1352
|
+
/** Validates proposed confirmation fields without throwing; the server enforces editability. */
|
|
1353
|
+
export declare function safeParseTransferConfirmation(input: unknown): v.SafeParseResult<v.StrictObjectSchema<{
|
|
624
1354
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
625
1355
|
readonly source_account_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
626
|
-
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.CheckAction<string, undefined>]>, undefined>;
|
|
627
|
-
readonly
|
|
628
|
-
|
|
629
|
-
account_holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
630
|
-
account_kind: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
631
|
-
account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1356
|
+
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.CheckAction<string, undefined>]>, undefined>;
|
|
1357
|
+
readonly destination: v.OptionalSchema<v.StrictObjectSchema<{
|
|
1358
|
+
type: v.LiteralSchema<"external", undefined>;
|
|
632
1359
|
bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
633
|
-
|
|
1360
|
+
account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
1361
|
+
account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1362
|
+
holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1363
|
+
holder_name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
634
1364
|
}, undefined>, undefined>;
|
|
635
1365
|
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.CheckAction<string, "note_too_long">]>, undefined>;
|
|
636
1366
|
}, undefined>>;
|
|
1367
|
+
export {};
|
|
637
1368
|
//# sourceMappingURL=intent-input.d.ts.map
|