@andco/protocol 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/api-errors.d.ts +9 -9
- package/dist/api-errors.js +9 -9
- package/dist/authorization-preparation.js +2 -2
- package/dist/authorization.d.ts +1 -1
- package/dist/authorization.js +1 -1
- package/dist/consent.d.ts +2 -2
- package/dist/consent.js +2 -2
- package/dist/constants.d.ts +15 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +17 -3
- package/dist/errors.d.ts +36 -9
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +49 -11
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/intent-input.d.ts +431 -872
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +142 -121
- package/dist/miniapp-icon.js +1 -1
- package/dist/miniapp-manifest.d.ts +1 -1
- package/dist/native-intent.d.ts +82 -68
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +134 -84
- package/dist/native.d.ts +1 -1
- package/dist/rar/account-matchers.d.ts +35 -30
- package/dist/rar/account-matchers.d.ts.map +1 -1
- package/dist/rar/account-matchers.js +27 -21
- package/dist/rar/bank.d.ts +81 -81
- package/dist/rar/bank.js +1 -1
- package/dist/rar/catalog.d.ts +48 -48
- package/dist/rar/catalog.js +6 -6
- package/dist/rar/detail.d.ts +1 -1
- package/dist/rar/detail.js +1 -1
- package/dist/rar/json-schemas.generated.d.ts +1 -1
- package/dist/rar/json-schemas.generated.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.js +25 -21
- package/dist/rar/subject-data.d.ts +1 -1
- package/dist/rar/subject-data.js +1 -1
- package/dist/rar/subject.d.ts +1 -1
- package/dist/rar/subject.js +1 -1
- package/dist/rest/accounts.d.ts +28 -28
- package/dist/rest/accounts.d.ts.map +1 -1
- package/dist/rest/accounts.js +22 -22
- package/dist/rest/api-error.d.ts +1 -1
- package/dist/rest/api-error.js +1 -1
- package/dist/rest/catalog.d.ts +3 -3
- package/dist/rest/catalog.js +2 -2
- package/dist/rest/common.d.ts +3 -3
- package/dist/rest/common.js +3 -3
- package/dist/rest/contract.d.ts +905 -528
- package/dist/rest/contract.d.ts.map +1 -1
- package/dist/rest/contract.js +17 -5
- package/dist/rest/events.d.ts +1 -1
- package/dist/rest/events.d.ts.map +1 -1
- package/dist/rest/events.js +2 -2
- package/dist/rest/identity.d.ts +22 -22
- package/dist/rest/identity.js +5 -5
- package/dist/rest/index.d.ts +1 -0
- package/dist/rest/index.d.ts.map +1 -1
- package/dist/rest/index.js +1 -0
- package/dist/rest/intents.d.ts +787 -716
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +62 -53
- package/dist/rest/signatures.d.ts +11 -5
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +10 -0
- package/dist/rest/subjects.d.ts +1 -1
- package/dist/rest/subjects.d.ts.map +1 -1
- package/dist/rest/subjects.js +3 -2
- package/dist/rest/transfers.d.ts +612 -0
- package/dist/rest/transfers.d.ts.map +1 -0
- package/dist/rest/transfers.js +115 -0
- package/dist/scopes.d.ts +1 -1
- package/dist/signing.d.ts +13 -2
- package/dist/signing.d.ts.map +1 -1
- package/dist/signing.js +13 -0
- package/dist/transfer.d.ts +363 -0
- package/dist/transfer.d.ts.map +1 -0
- package/dist/transfer.js +287 -0
- package/dist/transport/financial-events.d.ts +21 -17
- package/dist/transport/financial-events.d.ts.map +1 -1
- package/dist/transport/generated/oauth-api.d.ts +1017 -194
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +28 -12
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/intents.js +1 -1
- package/dist/transport/rest.d.ts +4 -4
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/transport/rest.js +33 -4
- package/dist/urls.d.ts +25 -2
- package/dist/urls.d.ts.map +1 -1
- package/dist/urls.js +47 -4
- package/dist/userinfo.d.ts +2 -2
- package/dist/userinfo.js +2 -2
- package/dist/webhooks.d.ts +19 -15
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js +17 -15
- package/dist/window-features.d.ts +2 -2
- package/dist/window-features.js +2 -2
- package/package.json +2 -2
package/dist/native-intent.d.ts
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import * as v from "valibot";
|
|
2
2
|
import { type Issue, type ParseResult } from "./issues.js";
|
|
3
|
-
/** Authenticated Host presentation;
|
|
3
|
+
/** Authenticated Host presentation; commands to AndCo and account ownership remain on Platform. */
|
|
4
4
|
export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
|
|
5
5
|
readonly intent: v.VariantSchema<"type", [v.ObjectSchema<{
|
|
6
6
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
7
7
|
readonly amount: v.NullableSchema<v.ObjectSchema<{
|
|
8
|
-
readonly confirmed: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
9
|
-
readonly frozen_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
10
8
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
11
9
|
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
12
10
|
readonly editable: v.BooleanSchema<undefined>;
|
|
11
|
+
readonly confirmed: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
12
|
+
readonly frozen_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
13
|
+
}, undefined>, undefined>;
|
|
14
|
+
readonly note: v.OptionalSchema<v.ObjectSchema<{
|
|
15
|
+
readonly value: v.StringSchema<undefined>;
|
|
16
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
13
17
|
}, undefined>, undefined>;
|
|
14
18
|
readonly destination: v.ObjectSchema<{
|
|
15
19
|
readonly type: v.LiteralSchema<"account", undefined>;
|
|
@@ -46,15 +50,11 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
|
|
|
46
50
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
47
51
|
}, undefined>, undefined>;
|
|
48
52
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
49
|
-
readonly status: v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "completed", "closed", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>;
|
|
53
|
+
readonly status: v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "completed", "closed", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>;
|
|
50
54
|
readonly fee: v.ObjectSchema<{
|
|
51
55
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
52
56
|
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
53
57
|
}, undefined>;
|
|
54
|
-
readonly note: v.OptionalSchema<v.ObjectSchema<{
|
|
55
|
-
readonly value: v.StringSchema<undefined>;
|
|
56
|
-
readonly editable: v.BooleanSchema<undefined>;
|
|
57
|
-
}, undefined>, undefined>;
|
|
58
58
|
readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
59
59
|
readonly server_time: v.StringSchema<undefined>;
|
|
60
60
|
readonly can_confirm: v.BooleanSchema<undefined>;
|
|
@@ -65,19 +65,23 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
|
|
|
65
65
|
}, undefined>, v.ObjectSchema<{
|
|
66
66
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
67
67
|
readonly amount: v.ObjectSchema<{
|
|
68
|
-
readonly confirmed: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
69
68
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
70
|
-
readonly value: v.SchemaWithPipe<readonly [v.
|
|
69
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
|
|
71
70
|
readonly editable: v.BooleanSchema<undefined>;
|
|
71
|
+
readonly confirmed: v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>;
|
|
72
72
|
}, undefined>;
|
|
73
|
+
readonly comment: v.OptionalSchema<v.ObjectSchema<{
|
|
74
|
+
readonly value: v.StringSchema<undefined>;
|
|
75
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
76
|
+
}, undefined>, undefined>;
|
|
73
77
|
readonly settled: v.NullableSchema<v.ObjectSchema<{
|
|
74
78
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
75
|
-
readonly value: v.SchemaWithPipe<readonly [v.
|
|
79
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>;
|
|
76
80
|
readonly at: v.StringSchema<undefined>;
|
|
77
81
|
}, undefined>, undefined>;
|
|
78
82
|
readonly signed: v.BooleanSchema<undefined>;
|
|
79
83
|
readonly interaction_reason: v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>;
|
|
80
|
-
readonly
|
|
84
|
+
readonly receiver: v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
81
85
|
readonly editable: v.LiteralSchema<false, undefined>;
|
|
82
86
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
83
87
|
readonly accountKey: v.StringSchema<undefined>;
|
|
@@ -88,13 +92,15 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
|
|
|
88
92
|
}, undefined>, v.ObjectSchema<{
|
|
89
93
|
readonly editable: v.LiteralSchema<false, undefined>;
|
|
90
94
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
91
|
-
readonly
|
|
92
|
-
readonly
|
|
93
|
-
readonly
|
|
94
|
-
readonly
|
|
95
|
-
readonly
|
|
95
|
+
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
96
|
+
readonly bank_code: v.StringSchema<undefined>;
|
|
97
|
+
readonly account_type: v.PicklistSchema<["10", "20", "40"], undefined>;
|
|
98
|
+
readonly account_number: v.StringSchema<undefined>;
|
|
99
|
+
readonly name: v.StringSchema<undefined>;
|
|
100
|
+
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
101
|
+
readonly national_id: v.StringSchema<undefined>;
|
|
96
102
|
}, undefined>], undefined>, undefined>;
|
|
97
|
-
readonly
|
|
103
|
+
readonly sender: v.NullableSchema<v.VariantSchema<"type", [v.ObjectSchema<{
|
|
98
104
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
99
105
|
readonly accountKey: v.StringSchema<undefined>;
|
|
100
106
|
}, undefined>, v.ObjectSchema<{
|
|
@@ -102,15 +108,11 @@ export declare const AndCoNativeIntentPreparationSchema: v.ObjectSchema<{
|
|
|
102
108
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
103
109
|
}, undefined>], undefined>, undefined>;
|
|
104
110
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
105
|
-
readonly status: v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "completed", "closed", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>;
|
|
111
|
+
readonly status: v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "completed", "closed", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_challenge_required", "failed.unknown_key", "failed.revoked_key", "failed.expired_key", "failed.invalid_signature", "failed.expired_signed_instruction", "failed.sender_mismatch", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>;
|
|
106
112
|
readonly fee: v.ObjectSchema<{
|
|
107
113
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
108
114
|
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
109
115
|
}, undefined>;
|
|
110
|
-
readonly note: v.OptionalSchema<v.ObjectSchema<{
|
|
111
|
-
readonly value: v.StringSchema<undefined>;
|
|
112
|
-
readonly editable: v.BooleanSchema<undefined>;
|
|
113
|
-
}, undefined>, undefined>;
|
|
114
116
|
readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
115
117
|
readonly server_time: v.StringSchema<undefined>;
|
|
116
118
|
readonly can_confirm: v.BooleanSchema<undefined>;
|
|
@@ -168,17 +170,19 @@ export declare const AndCoNativeIntentCommandSchema: v.VariantSchema<"action", [
|
|
|
168
170
|
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 140, undefined>]>, undefined>;
|
|
169
171
|
}, undefined>, v.StrictObjectSchema<{
|
|
170
172
|
readonly action: v.LiteralSchema<"confirm_transfer", undefined>;
|
|
171
|
-
readonly
|
|
172
|
-
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.
|
|
173
|
-
readonly
|
|
173
|
+
readonly senderAccountId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
174
|
+
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647, because Core stores it as int4. A larger one is refused with `max_value`.">]>, undefined>;
|
|
175
|
+
readonly receiver: v.OptionalSchema<v.StrictObjectSchema<{
|
|
174
176
|
type: v.LiteralSchema<"external", undefined>;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
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 in Core's catalog. Andco is `0739`.">]>;
|
|
179
|
+
account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "Core's account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
180
|
+
account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
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
|
+
national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
183
|
+
national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
|
|
180
184
|
}, undefined>, undefined>;
|
|
181
|
-
readonly
|
|
185
|
+
readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>;
|
|
182
186
|
}, undefined>, v.StrictObjectSchema<{
|
|
183
187
|
readonly action: v.LiteralSchema<"close_deposit", undefined>;
|
|
184
188
|
}, undefined>, v.StrictObjectSchema<{
|
|
@@ -194,8 +198,8 @@ export declare const AndCoNativeIntentCommandSchema: v.VariantSchema<"action", [
|
|
|
194
198
|
}, undefined>], undefined>;
|
|
195
199
|
export type AndCoNativeIntentCommand = v.InferOutput<typeof AndCoNativeIntentCommandSchema>;
|
|
196
200
|
/**
|
|
197
|
-
* The rules of a command that its shape does not say: a confirmed transfer's
|
|
198
|
-
*
|
|
201
|
+
* The rules of a command that its shape does not say: a confirmed transfer's comment is at most
|
|
202
|
+
* 60 bytes of UTF-8 (`comment_too_long`) and its receiver's holder name at most
|
|
199
203
|
* `HOLDER_NAME_MAX_LENGTH` (`holder_name_too_long`), and `assign_deposit_credits` selects each
|
|
200
204
|
* movement once (`duplicate_movement`, at the repeated entry).
|
|
201
205
|
*
|
|
@@ -239,12 +243,16 @@ export declare function requestAndCoNativeIntent(options: {
|
|
|
239
243
|
intent: {
|
|
240
244
|
type: "deposit";
|
|
241
245
|
amount: {
|
|
242
|
-
confirmed: string | null;
|
|
243
|
-
frozen_at: string | null;
|
|
244
246
|
currency: "CLP";
|
|
245
247
|
value: string;
|
|
246
248
|
editable: boolean;
|
|
249
|
+
confirmed: string | null;
|
|
250
|
+
frozen_at: string | null;
|
|
247
251
|
} | null;
|
|
252
|
+
note?: {
|
|
253
|
+
value: string;
|
|
254
|
+
editable: boolean;
|
|
255
|
+
} | undefined;
|
|
248
256
|
destination: {
|
|
249
257
|
type: "account";
|
|
250
258
|
id: string;
|
|
@@ -280,15 +288,11 @@ export declare function requestAndCoNativeIntent(options: {
|
|
|
280
288
|
currency: "CLP";
|
|
281
289
|
}[];
|
|
282
290
|
id: string;
|
|
283
|
-
status: "completed" | "succeeded" | "closed" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
291
|
+
status: "completed" | "succeeded" | "closed" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
284
292
|
fee: {
|
|
285
293
|
currency: "CLP";
|
|
286
294
|
amount: string;
|
|
287
295
|
};
|
|
288
|
-
note?: {
|
|
289
|
-
value: string;
|
|
290
|
-
editable: boolean;
|
|
291
|
-
} | undefined;
|
|
292
296
|
expires_at: string | null;
|
|
293
297
|
server_time: string;
|
|
294
298
|
can_confirm: boolean;
|
|
@@ -299,19 +303,23 @@ export declare function requestAndCoNativeIntent(options: {
|
|
|
299
303
|
} | {
|
|
300
304
|
type: "transfer";
|
|
301
305
|
amount: {
|
|
302
|
-
confirmed: string | null;
|
|
303
306
|
currency: "CLP";
|
|
304
|
-
value:
|
|
307
|
+
value: number;
|
|
305
308
|
editable: boolean;
|
|
309
|
+
confirmed: number | null;
|
|
306
310
|
};
|
|
311
|
+
comment?: {
|
|
312
|
+
value: string;
|
|
313
|
+
editable: boolean;
|
|
314
|
+
} | undefined;
|
|
307
315
|
settled: {
|
|
308
316
|
currency: "CLP";
|
|
309
|
-
value:
|
|
317
|
+
value: number;
|
|
310
318
|
at: string;
|
|
311
319
|
} | null;
|
|
312
320
|
signed: boolean;
|
|
313
321
|
interaction_reason?: "bank_verification_required" | "source_account_required" | undefined;
|
|
314
|
-
|
|
322
|
+
receiver: {
|
|
315
323
|
editable: false;
|
|
316
324
|
type: "account_key";
|
|
317
325
|
accountKey: string;
|
|
@@ -322,13 +330,15 @@ export declare function requestAndCoNativeIntent(options: {
|
|
|
322
330
|
} | {
|
|
323
331
|
editable: false;
|
|
324
332
|
type: "external";
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
333
|
+
country: "CL";
|
|
334
|
+
bank_code: string;
|
|
335
|
+
account_type: "10" | "20" | "40";
|
|
336
|
+
account_number: string;
|
|
337
|
+
name: string;
|
|
338
|
+
national_kind_id: "RUT";
|
|
339
|
+
national_id: string;
|
|
330
340
|
} | null;
|
|
331
|
-
|
|
341
|
+
sender: {
|
|
332
342
|
type: "account_key";
|
|
333
343
|
accountKey: string;
|
|
334
344
|
} | {
|
|
@@ -336,15 +346,11 @@ export declare function requestAndCoNativeIntent(options: {
|
|
|
336
346
|
id: string;
|
|
337
347
|
} | null;
|
|
338
348
|
id: string;
|
|
339
|
-
status: "completed" | "succeeded" | "closed" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
349
|
+
status: "completed" | "succeeded" | "closed" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_challenge_required" | "failed.unknown_key" | "failed.revoked_key" | "failed.expired_key" | "failed.invalid_signature" | "failed.expired_signed_instruction" | "failed.sender_mismatch" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
340
350
|
fee: {
|
|
341
351
|
currency: "CLP";
|
|
342
352
|
amount: string;
|
|
343
353
|
};
|
|
344
|
-
note?: {
|
|
345
|
-
value: string;
|
|
346
|
-
editable: boolean;
|
|
347
|
-
} | undefined;
|
|
348
354
|
expires_at: string | null;
|
|
349
355
|
server_time: string;
|
|
350
356
|
can_confirm: boolean;
|
|
@@ -426,24 +432,32 @@ export declare function ANDCO_NATIVE_INTENT_VIEW(data: AndCoNativeIntentPreparat
|
|
|
426
432
|
canSubmit: boolean;
|
|
427
433
|
};
|
|
428
434
|
/**
|
|
429
|
-
* Where the money lands, as the person writes it on a screen when the Intent left it to her:
|
|
430
|
-
* bank's
|
|
431
|
-
*
|
|
432
|
-
*
|
|
435
|
+
* Where the money lands, as the person writes it on a screen when the Intent left it to her: a
|
|
436
|
+
* Receptor at a bank in Core's vocabulary, field by field, with every field she writes empty until
|
|
437
|
+
* she writes it. `bank_code` is the `id` of one of the preparation's `banks`, and `account_type` is
|
|
438
|
+
* Core's code (`"10"` savings, `"20"` checking, `"40"` debit). The country and the kind of document
|
|
439
|
+
* are fixed: Chile and the RUT are the only ones. It is `null` in an {@link AndCoNativeIntentForm}
|
|
440
|
+
* when the Intent named its receiver, because a named receiver is shown, never edited.
|
|
433
441
|
*/
|
|
434
|
-
export type
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
442
|
+
export type AndCoNativeIntentReceiver = {
|
|
443
|
+
country: "CL";
|
|
444
|
+
bank_code: string;
|
|
445
|
+
account_type: "10" | "20" | "40" | "";
|
|
446
|
+
account_number: string;
|
|
447
|
+
name: string;
|
|
448
|
+
national_kind_id: "RUT";
|
|
449
|
+
national_id: string;
|
|
440
450
|
};
|
|
441
|
-
/**
|
|
451
|
+
/**
|
|
452
|
+
* User-edited values, separate from the durable financial state. `source` is the account the money
|
|
453
|
+
* leaves (a transfer's sender, or the account that funds a deposit), `amount` the text the person
|
|
454
|
+
* typed, and `note` a deposit's note or a transfer's comment.
|
|
455
|
+
*/
|
|
442
456
|
export type AndCoNativeIntentForm = {
|
|
443
457
|
source: string;
|
|
444
458
|
amount: string;
|
|
445
459
|
note: string;
|
|
446
|
-
|
|
460
|
+
receiver: AndCoNativeIntentReceiver | null;
|
|
447
461
|
};
|
|
448
462
|
/** Restores accepted command values; otherwise defaults only an unambiguous source. */
|
|
449
463
|
export declare function ANDCO_NATIVE_INTENT_FORM(data: AndCoNativeIntentPreparation, retry?: AndCoNativeIntentCommand): AndCoNativeIntentForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native-intent.d.ts","sourceRoot":"","sources":["../src/native-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,OAAO,EAAmB,KAAK,KAAK,EAAY,KAAK,WAAW,EAAkB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"native-intent.d.ts","sourceRoot":"","sources":["../src/native-intent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,OAAO,EAAmB,KAAK,KAAK,EAAY,KAAK,WAAW,EAAkB,MAAM,aAAa,CAAC;AAgGtG,mGAAmG;AACnG,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aA8G7C,CAAC;AACH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAEpG,mEAAmE;AACnE,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAgCzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,8BAA8B,CAAC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