@andco/protocol 0.0.15 → 0.1.0-ti.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authorization-preparation.d.ts +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -1
- package/dist/intent-input.d.ts +67 -54
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +39 -23
- package/dist/intent-status.d.ts +5 -6
- package/dist/intent-status.d.ts.map +1 -1
- package/dist/intent-status.js +12 -7
- package/dist/miniapp-manifest.d.ts +2 -2
- package/dist/miniapp-manifest.js +1 -1
- package/dist/native-intent.d.ts +12 -12
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +7 -4
- package/dist/rar/account-matchers.d.ts +10 -10
- package/dist/rar/account-matchers.js +2 -2
- package/dist/rar/bank.d.ts +295 -23
- package/dist/rar/bank.d.ts.map +1 -1
- package/dist/rar/bank.js +54 -16
- package/dist/rar/catalog.d.ts +134 -9
- package/dist/rar/catalog.d.ts.map +1 -1
- package/dist/rar/catalog.js +6 -6
- package/dist/rar/json-schemas.generated.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.js +375 -7
- package/dist/rar/money.d.ts +1 -1
- package/dist/rar/money.js +1 -1
- package/dist/rar/subject-data.d.ts +1 -1
- package/dist/rar/subject-data.js +1 -1
- package/dist/rest/accounts.d.ts +69 -47
- package/dist/rest/accounts.d.ts.map +1 -1
- package/dist/rest/accounts.js +32 -22
- package/dist/rest/catalog.d.ts +3 -3
- package/dist/rest/catalog.js +2 -2
- package/dist/rest/contract.d.ts +581 -316
- package/dist/rest/contract.d.ts.map +1 -1
- package/dist/rest/contract.js +10 -6
- package/dist/rest/events.js +1 -1
- package/dist/rest/identity.d.ts +22 -22
- package/dist/rest/identity.d.ts.map +1 -1
- package/dist/rest/identity.js +4 -4
- package/dist/rest/intents.d.ts +301 -142
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +67 -53
- package/dist/rest/signatures.d.ts +19 -5
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +47 -5
- package/dist/rest/transfers.d.ts +738 -362
- package/dist/rest/transfers.d.ts.map +1 -1
- package/dist/rest/transfers.js +71 -44
- package/dist/signing.d.ts +6 -2
- package/dist/signing.d.ts.map +1 -1
- package/dist/signing.js +2 -1
- package/dist/transfer.d.ts +101 -65
- package/dist/transfer.d.ts.map +1 -1
- package/dist/transfer.js +69 -43
- package/dist/transport/financial-events.d.ts +65 -14
- package/dist/transport/financial-events.d.ts.map +1 -1
- package/dist/transport/financial-events.js +34 -0
- package/dist/transport/generated/oauth-api.d.ts +384 -110
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +6 -6
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/rest.d.ts +9 -8
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/transport/rest.js +1 -1
- package/package.json +1 -1
package/dist/rest/contract.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare const contract: {
|
|
|
55
55
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
56
56
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
57
57
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
58
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"
|
|
58
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
59
59
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
60
60
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
61
61
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -142,7 +142,8 @@ export declare const contract: {
|
|
|
142
142
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
143
143
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
144
144
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
145
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
145
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
146
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
146
147
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
147
148
|
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
148
149
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -181,8 +182,8 @@ export declare const contract: {
|
|
|
181
182
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
182
183
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
183
184
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
184
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
185
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
185
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
186
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
186
187
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
187
188
|
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
188
189
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -230,12 +231,12 @@ export declare const contract: {
|
|
|
230
231
|
}, undefined>, v.DescriptionAction<{
|
|
231
232
|
value: string;
|
|
232
233
|
editable: boolean;
|
|
233
|
-
}, "The comment a transfer asks for
|
|
234
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
234
235
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
235
236
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
236
|
-
readonly value: v.SchemaWithPipe<readonly [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
|
|
237
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
237
238
|
readonly editable: v.BooleanSchema<undefined>;
|
|
238
|
-
readonly confirmed: v.SchemaWithPipe<readonly [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
|
|
239
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
239
240
|
}, undefined>, v.DescriptionAction<{
|
|
240
241
|
currency: "CLP";
|
|
241
242
|
value: number;
|
|
@@ -244,7 +245,7 @@ export declare const contract: {
|
|
|
244
245
|
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
245
246
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
246
247
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
247
|
-
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
|
|
248
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
248
249
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
249
250
|
}, undefined>, v.DescriptionAction<{
|
|
250
251
|
currency: "CLP";
|
|
@@ -255,7 +256,7 @@ export declare const contract: {
|
|
|
255
256
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
256
257
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
257
258
|
}, undefined>;
|
|
258
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
259
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
259
260
|
readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
|
|
260
261
|
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
|
|
261
262
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -266,7 +267,8 @@ export declare const contract: {
|
|
|
266
267
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
267
268
|
}, undefined>, v.DescriptionAction<{
|
|
268
269
|
type: "transfer";
|
|
269
|
-
status: "
|
|
270
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
271
|
+
transfer_id: string | null;
|
|
270
272
|
signed: boolean;
|
|
271
273
|
sender: {
|
|
272
274
|
type: "account_key";
|
|
@@ -313,7 +315,7 @@ export declare const contract: {
|
|
|
313
315
|
currency: "CLP";
|
|
314
316
|
amount: "0";
|
|
315
317
|
};
|
|
316
|
-
interaction_reason?: "
|
|
318
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
317
319
|
expires_at: string | null;
|
|
318
320
|
expires_in_seconds: number | null;
|
|
319
321
|
id: string;
|
|
@@ -324,9 +326,11 @@ export declare const contract: {
|
|
|
324
326
|
server_time: string;
|
|
325
327
|
created_at: string;
|
|
326
328
|
authorization_url: string;
|
|
327
|
-
}, "Authoritative Project-facing state of a transfer, in
|
|
329
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
328
330
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
329
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
331
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
332
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
333
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
330
334
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
331
335
|
readonly account: v.StrictObjectSchema<{
|
|
332
336
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -351,7 +355,9 @@ export declare const contract: {
|
|
|
351
355
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
352
356
|
}, undefined>, v.DescriptionAction<{
|
|
353
357
|
type: "account_opening";
|
|
354
|
-
status: "
|
|
358
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
359
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
360
|
+
account_opening_status_detail: string | null;
|
|
355
361
|
signed: boolean;
|
|
356
362
|
account: {
|
|
357
363
|
accountKey: string;
|
|
@@ -373,9 +379,11 @@ export declare const contract: {
|
|
|
373
379
|
server_time: string;
|
|
374
380
|
created_at: string;
|
|
375
381
|
authorization_url: string;
|
|
376
|
-
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until
|
|
382
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
377
383
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
378
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
384
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
385
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
386
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
379
387
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
380
388
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
381
389
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -414,7 +422,9 @@ export declare const contract: {
|
|
|
414
422
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
415
423
|
}, undefined>, v.DescriptionAction<{
|
|
416
424
|
type: "account_closure";
|
|
417
|
-
status: "
|
|
425
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
426
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
427
|
+
account_closure_status_detail: string | null;
|
|
418
428
|
signed: boolean;
|
|
419
429
|
account: {
|
|
420
430
|
type: "account_key";
|
|
@@ -444,11 +454,11 @@ export declare const contract: {
|
|
|
444
454
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
445
455
|
}, undefined>;
|
|
446
456
|
readonly body: v.StrictObjectSchema<{
|
|
447
|
-
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
457
|
+
readonly reason: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
448
458
|
}, undefined>;
|
|
449
459
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
450
460
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
451
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"
|
|
461
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
452
462
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
453
463
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
454
464
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -535,7 +545,8 @@ export declare const contract: {
|
|
|
535
545
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
536
546
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
537
547
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
538
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
548
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
549
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
539
550
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
540
551
|
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
541
552
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -574,8 +585,8 @@ export declare const contract: {
|
|
|
574
585
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
575
586
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
576
587
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
577
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
578
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
588
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
589
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
579
590
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
580
591
|
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
581
592
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -623,12 +634,12 @@ export declare const contract: {
|
|
|
623
634
|
}, undefined>, v.DescriptionAction<{
|
|
624
635
|
value: string;
|
|
625
636
|
editable: boolean;
|
|
626
|
-
}, "The comment a transfer asks for
|
|
637
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
627
638
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
628
639
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
629
|
-
readonly value: v.SchemaWithPipe<readonly [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
|
|
640
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
630
641
|
readonly editable: v.BooleanSchema<undefined>;
|
|
631
|
-
readonly confirmed: v.SchemaWithPipe<readonly [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
|
|
642
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
632
643
|
}, undefined>, v.DescriptionAction<{
|
|
633
644
|
currency: "CLP";
|
|
634
645
|
value: number;
|
|
@@ -637,7 +648,7 @@ export declare const contract: {
|
|
|
637
648
|
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
638
649
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
639
650
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
640
|
-
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
|
|
651
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
641
652
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
642
653
|
}, undefined>, v.DescriptionAction<{
|
|
643
654
|
currency: "CLP";
|
|
@@ -648,7 +659,7 @@ export declare const contract: {
|
|
|
648
659
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
649
660
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
650
661
|
}, undefined>;
|
|
651
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
662
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
652
663
|
readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
|
|
653
664
|
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
|
|
654
665
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -659,7 +670,8 @@ export declare const contract: {
|
|
|
659
670
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
660
671
|
}, undefined>, v.DescriptionAction<{
|
|
661
672
|
type: "transfer";
|
|
662
|
-
status: "
|
|
673
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
674
|
+
transfer_id: string | null;
|
|
663
675
|
signed: boolean;
|
|
664
676
|
sender: {
|
|
665
677
|
type: "account_key";
|
|
@@ -706,7 +718,7 @@ export declare const contract: {
|
|
|
706
718
|
currency: "CLP";
|
|
707
719
|
amount: "0";
|
|
708
720
|
};
|
|
709
|
-
interaction_reason?: "
|
|
721
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
710
722
|
expires_at: string | null;
|
|
711
723
|
expires_in_seconds: number | null;
|
|
712
724
|
id: string;
|
|
@@ -717,9 +729,11 @@ export declare const contract: {
|
|
|
717
729
|
server_time: string;
|
|
718
730
|
created_at: string;
|
|
719
731
|
authorization_url: string;
|
|
720
|
-
}, "Authoritative Project-facing state of a transfer, in
|
|
732
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
721
733
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
722
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
734
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
735
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
736
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
723
737
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
724
738
|
readonly account: v.StrictObjectSchema<{
|
|
725
739
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -744,7 +758,9 @@ export declare const contract: {
|
|
|
744
758
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
745
759
|
}, undefined>, v.DescriptionAction<{
|
|
746
760
|
type: "account_opening";
|
|
747
|
-
status: "
|
|
761
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
762
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
763
|
+
account_opening_status_detail: string | null;
|
|
748
764
|
signed: boolean;
|
|
749
765
|
account: {
|
|
750
766
|
accountKey: string;
|
|
@@ -766,9 +782,11 @@ export declare const contract: {
|
|
|
766
782
|
server_time: string;
|
|
767
783
|
created_at: string;
|
|
768
784
|
authorization_url: string;
|
|
769
|
-
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until
|
|
785
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
770
786
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
771
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
787
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
788
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
789
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
772
790
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
773
791
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
774
792
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -807,7 +825,9 @@ export declare const contract: {
|
|
|
807
825
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
808
826
|
}, undefined>, v.DescriptionAction<{
|
|
809
827
|
type: "account_closure";
|
|
810
|
-
status: "
|
|
828
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
829
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
830
|
+
account_closure_status_detail: string | null;
|
|
811
831
|
signed: boolean;
|
|
812
832
|
account: {
|
|
813
833
|
type: "account_key";
|
|
@@ -845,7 +865,7 @@ export declare const contract: {
|
|
|
845
865
|
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").InvalidIntentState, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
846
866
|
createIntent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
847
867
|
readonly headers: v.ObjectSchema<{
|
|
848
|
-
readonly "idempotency-key": v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Required with `application/json`, and refused with `application/jwt`, which
|
|
868
|
+
readonly "idempotency-key": v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Required with `application/json`, and refused with `application/jwt` and `application/jose+json`, which answer `400 idempotency_key_not_allowed` when it arrives beside a signature: the idempotency key of a Signed Instruction is its own `jti`, and two candidates for one key is exactly the ambiguity that gets read the wrong way round. OpenAPI cannot make a header conditional on the media type, so it is published as optional rather than demanding what the server refuses.">]>;
|
|
849
869
|
}, undefined>;
|
|
850
870
|
readonly body: v.UnionSchema<[v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
851
871
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
@@ -992,13 +1012,13 @@ export declare const contract: {
|
|
|
992
1012
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
993
1013
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
994
1014
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
995
|
-
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
|
|
1015
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
996
1016
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
997
1017
|
}, undefined>, v.DescriptionAction<{
|
|
998
1018
|
currency: "CLP";
|
|
999
1019
|
value: number;
|
|
1000
1020
|
editable: boolean;
|
|
1001
|
-
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
1021
|
+
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
|
|
1002
1022
|
readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1003
1023
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
1004
1024
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1036,8 +1056,8 @@ export declare const contract: {
|
|
|
1036
1056
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1037
1057
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1038
1058
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
1039
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
1040
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
1059
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1060
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1041
1061
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1042
1062
|
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
1043
1063
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -1085,7 +1105,7 @@ export declare const contract: {
|
|
|
1085
1105
|
}, undefined>, v.DescriptionAction<{
|
|
1086
1106
|
value: string;
|
|
1087
1107
|
editable: boolean;
|
|
1088
|
-
}, "The comment a transfer asks for
|
|
1108
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
1089
1109
|
} & {
|
|
1090
1110
|
readonly expires_in: v.StringSchema<undefined>;
|
|
1091
1111
|
readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
@@ -1094,13 +1114,13 @@ export declare const contract: {
|
|
|
1094
1114
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1095
1115
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1096
1116
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1097
|
-
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
|
|
1117
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
1098
1118
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1099
1119
|
}, undefined>, v.DescriptionAction<{
|
|
1100
1120
|
currency: "CLP";
|
|
1101
1121
|
value: number;
|
|
1102
1122
|
editable: boolean;
|
|
1103
|
-
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647
|
|
1123
|
+
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
|
|
1104
1124
|
readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1105
1125
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
1106
1126
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1138,8 +1158,8 @@ export declare const contract: {
|
|
|
1138
1158
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1139
1159
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1140
1160
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
1141
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
1142
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
1161
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1162
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1143
1163
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1144
1164
|
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
1145
1165
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -1187,7 +1207,7 @@ export declare const contract: {
|
|
|
1187
1207
|
}, undefined>, v.DescriptionAction<{
|
|
1188
1208
|
value: string;
|
|
1189
1209
|
editable: boolean;
|
|
1190
|
-
}, "The comment a transfer asks for
|
|
1210
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
1191
1211
|
} & {
|
|
1192
1212
|
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1193
1213
|
readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -1275,7 +1295,7 @@ export declare const contract: {
|
|
|
1275
1295
|
} | undefined;
|
|
1276
1296
|
expires_in?: undefined;
|
|
1277
1297
|
expires_at: string | null;
|
|
1278
|
-
}, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in
|
|
1298
|
+
}, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in the transfer vocabulary of the API: `sender`, `receiver`, an integer `amount.value` and a `comment` of at most 60 bytes. A null `sender` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `receiver` is the screen too: the person completes where the money goes (the bank, the type and number of the account, and its holder's RUT and name), and the server checks what she wrote against the Grant's `destinations` when she confirms, refusing one outside them with `invalid_destination`. Both default to null when omitted. A Receptor the request names is locked on the screen (`editable: true` is an `invalid_request`), and the amount is too unless `amount.editable` is true, in which case the person sets it. A Receptor at a bank is named in the transfer vocabulary of the API (`IntentAccountExternal`). A signed transfer is not an Intent: it is submitted to `POST /transfers` as a `SignedTransferEnvelope`.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
1279
1299
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
1280
1300
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1281
1301
|
readonly name: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The display label the account opens with. Mutable afterwards, and read by no permission.">]>;
|
|
@@ -1435,10 +1455,28 @@ export declare const contract: {
|
|
|
1435
1455
|
};
|
|
1436
1456
|
expires_in?: undefined;
|
|
1437
1457
|
expires_at: string;
|
|
1438
|
-
}, "The `application/json` half of closing a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything that changes an account happens through an Intent. It carries no amount, no source and no destination -- only a reference to the account it closes.">]>], undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]
|
|
1458
|
+
}, "The `application/json` half of closing a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything that changes an account happens through an Intent. It carries no amount, no source and no destination -- only a reference to the account it closes.">]>], undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1459
|
+
readonly payload: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON claims (`SignedTransferClaims`).">]>;
|
|
1460
|
+
readonly signatures: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
1461
|
+
readonly protected: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON protected header (`SignedTransferHeader`).">]>;
|
|
1462
|
+
readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1463
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
1464
|
+
protected: string;
|
|
1465
|
+
signature: string;
|
|
1466
|
+
}[], 1, undefined>, v.DescriptionAction<{
|
|
1467
|
+
protected: string;
|
|
1468
|
+
signature: string;
|
|
1469
|
+
}[], "At least one signature over the same payload; every one is verified.">]>;
|
|
1470
|
+
}, undefined>, v.DescriptionAction<{
|
|
1471
|
+
payload: string;
|
|
1472
|
+
signatures: {
|
|
1473
|
+
protected: string;
|
|
1474
|
+
signature: string;
|
|
1475
|
+
}[];
|
|
1476
|
+
}, "A signed transfer: a JWS in the General JSON Serialization (RFC 7515 §7.2.1), with one `payload` and at least one signature, each with a protected header of `typ` `transfer.v1+jwt`. Sent as `application/jose+json`.">]>], undefined>;
|
|
1439
1477
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1440
1478
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
1441
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"
|
|
1479
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
1442
1480
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1443
1481
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
1444
1482
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -1525,7 +1563,8 @@ export declare const contract: {
|
|
|
1525
1563
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1526
1564
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1527
1565
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1528
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
1566
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
1567
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
1529
1568
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
1530
1569
|
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1531
1570
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -1564,8 +1603,8 @@ export declare const contract: {
|
|
|
1564
1603
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1565
1604
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1566
1605
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
1567
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
1568
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
1606
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1607
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1569
1608
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1570
1609
|
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
1571
1610
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -1613,12 +1652,12 @@ export declare const contract: {
|
|
|
1613
1652
|
}, undefined>, v.DescriptionAction<{
|
|
1614
1653
|
value: string;
|
|
1615
1654
|
editable: boolean;
|
|
1616
|
-
}, "The comment a transfer asks for
|
|
1655
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
1617
1656
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1618
1657
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1619
|
-
readonly value: v.SchemaWithPipe<readonly [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
|
|
1658
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
1620
1659
|
readonly editable: v.BooleanSchema<undefined>;
|
|
1621
|
-
readonly confirmed: v.SchemaWithPipe<readonly [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
|
|
1660
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
1622
1661
|
}, undefined>, v.DescriptionAction<{
|
|
1623
1662
|
currency: "CLP";
|
|
1624
1663
|
value: number;
|
|
@@ -1627,7 +1666,7 @@ export declare const contract: {
|
|
|
1627
1666
|
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
1628
1667
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1629
1668
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1630
|
-
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
|
|
1669
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
1631
1670
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1632
1671
|
}, undefined>, v.DescriptionAction<{
|
|
1633
1672
|
currency: "CLP";
|
|
@@ -1638,7 +1677,7 @@ export declare const contract: {
|
|
|
1638
1677
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1639
1678
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
1640
1679
|
}, undefined>;
|
|
1641
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
1680
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
1642
1681
|
readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
|
|
1643
1682
|
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
|
|
1644
1683
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -1649,7 +1688,8 @@ export declare const contract: {
|
|
|
1649
1688
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1650
1689
|
}, undefined>, v.DescriptionAction<{
|
|
1651
1690
|
type: "transfer";
|
|
1652
|
-
status: "
|
|
1691
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
1692
|
+
transfer_id: string | null;
|
|
1653
1693
|
signed: boolean;
|
|
1654
1694
|
sender: {
|
|
1655
1695
|
type: "account_key";
|
|
@@ -1696,7 +1736,7 @@ export declare const contract: {
|
|
|
1696
1736
|
currency: "CLP";
|
|
1697
1737
|
amount: "0";
|
|
1698
1738
|
};
|
|
1699
|
-
interaction_reason?: "
|
|
1739
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
1700
1740
|
expires_at: string | null;
|
|
1701
1741
|
expires_in_seconds: number | null;
|
|
1702
1742
|
id: string;
|
|
@@ -1707,9 +1747,11 @@ export declare const contract: {
|
|
|
1707
1747
|
server_time: string;
|
|
1708
1748
|
created_at: string;
|
|
1709
1749
|
authorization_url: string;
|
|
1710
|
-
}, "Authoritative Project-facing state of a transfer, in
|
|
1750
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1711
1751
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
1712
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
1752
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
1753
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
1754
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
1713
1755
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
1714
1756
|
readonly account: v.StrictObjectSchema<{
|
|
1715
1757
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1734,7 +1776,9 @@ export declare const contract: {
|
|
|
1734
1776
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1735
1777
|
}, undefined>, v.DescriptionAction<{
|
|
1736
1778
|
type: "account_opening";
|
|
1737
|
-
status: "
|
|
1779
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
1780
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
1781
|
+
account_opening_status_detail: string | null;
|
|
1738
1782
|
signed: boolean;
|
|
1739
1783
|
account: {
|
|
1740
1784
|
accountKey: string;
|
|
@@ -1756,9 +1800,11 @@ export declare const contract: {
|
|
|
1756
1800
|
server_time: string;
|
|
1757
1801
|
created_at: string;
|
|
1758
1802
|
authorization_url: string;
|
|
1759
|
-
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until
|
|
1803
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1760
1804
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
1761
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
1805
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
1806
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
1807
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
1762
1808
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
1763
1809
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1764
1810
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -1797,7 +1843,9 @@ export declare const contract: {
|
|
|
1797
1843
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1798
1844
|
}, undefined>, v.DescriptionAction<{
|
|
1799
1845
|
type: "account_closure";
|
|
1800
|
-
status: "
|
|
1846
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
1847
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
1848
|
+
account_closure_status_detail: string | null;
|
|
1801
1849
|
signed: boolean;
|
|
1802
1850
|
account: {
|
|
1803
1851
|
type: "account_key";
|
|
@@ -1821,7 +1869,7 @@ export declare const contract: {
|
|
|
1821
1869
|
server_time: string;
|
|
1822
1870
|
created_at: string;
|
|
1823
1871
|
authorization_url: string;
|
|
1824
|
-
}, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./intents.js").AccountKeyOutOfGrant, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./intents.js").AccountKeyTaken, typeof import("./intents.js").BankAccountQuotaExceeded, typeof import("./intents.js").InvalidIntentState, typeof import("./intents.js").IntentExpired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./intents.js").DepositAmountOutOfBounds, typeof import("./intents.js").DepositDestinationAmbiguous, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").UnsupportedBank, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankAccountNumberMissing, typeof import("./intents.js").BankAuthorizationDenied, typeof import("./intents.js").BankHolderWithoutAccount, typeof import("./intents.js").BankAccountLimitReached, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
1872
|
+
}, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").ApprovedUseTransfers, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./intents.js").AccountKeyOutOfGrant, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./intents.js").AccountKeyTaken, typeof import("./intents.js").BankAccountQuotaExceeded, typeof import("./intents.js").InvalidIntentState, typeof import("./intents.js").IntentExpired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./intents.js").DepositAmountOutOfBounds, typeof import("./intents.js").DepositDestinationAmbiguous, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").UnsupportedBank, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankAccountNumberMissing, typeof import("./intents.js").BankAuthorizationDenied, typeof import("./intents.js").BankHolderWithoutAccount, typeof import("./intents.js").BankAccountLimitReached, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
1825
1873
|
createTransfer: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1826
1874
|
readonly payload: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON claims (`SignedTransferClaims`).">]>;
|
|
1827
1875
|
readonly signatures: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
@@ -1833,7 +1881,7 @@ export declare const contract: {
|
|
|
1833
1881
|
}[], 1, undefined>, v.DescriptionAction<{
|
|
1834
1882
|
protected: string;
|
|
1835
1883
|
signature: string;
|
|
1836
|
-
}[], "At least one signature over the same payload;
|
|
1884
|
+
}[], "At least one signature over the same payload; every one is verified.">]>;
|
|
1837
1885
|
}, undefined>, v.DescriptionAction<{
|
|
1838
1886
|
payload: string;
|
|
1839
1887
|
signatures: {
|
|
@@ -1843,90 +1891,103 @@ export declare const contract: {
|
|
|
1843
1891
|
}, "A signed transfer: a JWS in the General JSON Serialization (RFC 7515 §7.2.1), with one `payload` and at least one signature, each with a protected header of `typ` `transfer.v1+jwt`. Sent as `application/jose+json`.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1844
1892
|
readonly object: v.LiteralSchema<"transfer", undefined>;
|
|
1845
1893
|
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
|
|
1846
|
-
readonly
|
|
1847
|
-
readonly
|
|
1848
|
-
readonly
|
|
1849
|
-
readonly
|
|
1850
|
-
readonly
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1894
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing", "succeeded", "failed", "cancelled"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "requires_action" | "processing", "Where the Transfer stands: `requires_action` while the person still owes the bank a step, `processing` while the bank holds it and has not answered for good, then `succeeded`, `failed` or `cancelled`, which are final. `status_detail` says why. There is no `rejected` Transfer: a rejection ends an Intent, and a rejected Intent has no Transfer.">]>;
|
|
1895
|
+
readonly status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The word that says why, null when the status has none: `bank_refused` for a `failed` Transfer the bank refused for sure, `expired` for a `cancelled` one whose deadline passed, `grant_revoked` or `grant_expired` for one whose Grant ended. The vocabulary is open: a detail added later appears here as it is, so decide on `status`.">]>;
|
|
1896
|
+
readonly origin: v.SchemaWithPipe<readonly [v.PicklistSchema<["oauth", "platform", "emisor"], undefined>, v.DescriptionAction<"oauth" | "platform" | "emisor", "Who made it: `oauth`, a Project through the API; `platform`, a person in the AndCo web app; `emisor`, a person in the issuer's own channels, for example its mobile app.">]>;
|
|
1897
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647.">]>;
|
|
1898
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1899
|
+
readonly sender: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1900
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
1901
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1902
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1903
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
1904
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
1905
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
1906
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
1907
|
+
}, undefined>, v.DescriptionAction<{
|
|
1908
|
+
country: string;
|
|
1860
1909
|
bank_code: string;
|
|
1861
1910
|
account_type: "10" | "20" | "40";
|
|
1862
1911
|
account_number: string;
|
|
1863
|
-
name: string;
|
|
1864
|
-
national_kind_id:
|
|
1865
|
-
national_id: string;
|
|
1866
|
-
}, "
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1912
|
+
name: string | null;
|
|
1913
|
+
national_kind_id: string | null;
|
|
1914
|
+
national_id: string | null;
|
|
1915
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
1916
|
+
country: string;
|
|
1917
|
+
bank_code: string;
|
|
1918
|
+
account_type: "10" | "20" | "40";
|
|
1919
|
+
account_number: string;
|
|
1920
|
+
name: string | null;
|
|
1921
|
+
national_kind_id: string | null;
|
|
1922
|
+
national_id: string | null;
|
|
1923
|
+
}, "The Remitente: the account the money leaves and its holder.">]>;
|
|
1924
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1925
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
1926
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1927
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1874
1928
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
1875
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>,
|
|
1876
|
-
readonly national_kind_id: v.
|
|
1877
|
-
readonly national_id: v.SchemaWithPipe<readonly [v.
|
|
1878
|
-
}, undefined
|
|
1879
|
-
|
|
1880
|
-
currency: "CLP";
|
|
1881
|
-
email?: string | undefined;
|
|
1882
|
-
country: "CL";
|
|
1929
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
1930
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
1931
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
1932
|
+
}, undefined>, v.DescriptionAction<{
|
|
1933
|
+
country: string;
|
|
1883
1934
|
bank_code: string;
|
|
1884
1935
|
account_type: "10" | "20" | "40";
|
|
1885
1936
|
account_number: string;
|
|
1886
|
-
name: string;
|
|
1887
|
-
national_kind_id:
|
|
1888
|
-
national_id: string;
|
|
1889
|
-
}, "
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1937
|
+
name: string | null;
|
|
1938
|
+
national_kind_id: string | null;
|
|
1939
|
+
national_id: string | null;
|
|
1940
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
1941
|
+
country: string;
|
|
1942
|
+
bank_code: string;
|
|
1943
|
+
account_type: "10" | "20" | "40";
|
|
1944
|
+
account_number: string;
|
|
1945
|
+
name: string | null;
|
|
1946
|
+
national_kind_id: string | null;
|
|
1947
|
+
national_id: string | null;
|
|
1948
|
+
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
1949
|
+
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
1950
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer with `approved: true` (its signature approved it, so there was no request).">]>;
|
|
1951
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer with `approved: true` that submitted it, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
1952
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
1953
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
1893
1954
|
}, undefined>, v.DescriptionAction<{
|
|
1894
1955
|
object: "transfer";
|
|
1895
1956
|
id: string;
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
|
|
1957
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
1958
|
+
status_detail: string | null;
|
|
1959
|
+
origin: "oauth" | "platform" | "emisor";
|
|
1960
|
+
amount: number;
|
|
1961
|
+
currency: "CLP";
|
|
1900
1962
|
sender: {
|
|
1901
|
-
country:
|
|
1963
|
+
country: string;
|
|
1902
1964
|
bank_code: string;
|
|
1903
1965
|
account_type: "10" | "20" | "40";
|
|
1904
1966
|
account_number: string;
|
|
1905
|
-
name: string;
|
|
1906
|
-
national_kind_id:
|
|
1907
|
-
national_id: string;
|
|
1967
|
+
name: string | null;
|
|
1968
|
+
national_kind_id: string | null;
|
|
1969
|
+
national_id: string | null;
|
|
1908
1970
|
};
|
|
1909
1971
|
receiver: {
|
|
1910
|
-
|
|
1911
|
-
currency: "CLP";
|
|
1912
|
-
email?: string | undefined;
|
|
1913
|
-
country: "CL";
|
|
1972
|
+
country: string;
|
|
1914
1973
|
bank_code: string;
|
|
1915
1974
|
account_type: "10" | "20" | "40";
|
|
1916
1975
|
account_number: string;
|
|
1917
|
-
name: string;
|
|
1918
|
-
national_kind_id:
|
|
1919
|
-
national_id: string;
|
|
1976
|
+
name: string | null;
|
|
1977
|
+
national_kind_id: string | null;
|
|
1978
|
+
national_id: string | null;
|
|
1920
1979
|
};
|
|
1921
|
-
comment
|
|
1980
|
+
comment: string | null;
|
|
1981
|
+
intent_id: string | null;
|
|
1982
|
+
jti: string | null;
|
|
1983
|
+
transaction_id: string | null;
|
|
1922
1984
|
created_at: string;
|
|
1923
|
-
|
|
1924
|
-
}, "A Transfer uploaded as a Signed Instruction (ADR 0093), in Core's vocabulary: `sender`, `receiver` (with the amount, an integer in the minor unit of the currency) and `comment` exactly as signed. `status` is where it stands; `core_status` the core's own word, for the record.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./transfers.js").SenderMismatch, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
1985
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").ApprovalRequiredUseIntents, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./transfers.js").SenderMismatch, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
1925
1986
|
getBankCatalog: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1926
1987
|
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
1927
1988
|
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1928
1989
|
readonly node: v.StrictObjectSchema<{
|
|
1929
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
1990
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code: the `bank_code` of a Receptor.">]>;
|
|
1930
1991
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
|
|
1931
1992
|
}, undefined>;
|
|
1932
1993
|
}, undefined>, undefined>;
|
|
@@ -1955,7 +2016,7 @@ export declare const contract: {
|
|
|
1955
2016
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1956
2017
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1957
2018
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
1958
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"
|
|
2019
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
1959
2020
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1960
2021
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
1961
2022
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -2042,7 +2103,8 @@ export declare const contract: {
|
|
|
2042
2103
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2043
2104
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2044
2105
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
2045
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
2106
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
2107
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
2046
2108
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
2047
2109
|
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2048
2110
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -2081,8 +2143,8 @@ export declare const contract: {
|
|
|
2081
2143
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
2082
2144
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
2083
2145
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
2084
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
2085
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
2146
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2147
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2086
2148
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
2087
2149
|
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
2088
2150
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -2130,12 +2192,12 @@ export declare const contract: {
|
|
|
2130
2192
|
}, undefined>, v.DescriptionAction<{
|
|
2131
2193
|
value: string;
|
|
2132
2194
|
editable: boolean;
|
|
2133
|
-
}, "The comment a transfer asks for
|
|
2195
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
2134
2196
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2135
2197
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
2136
|
-
readonly value: v.SchemaWithPipe<readonly [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
|
|
2198
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
2137
2199
|
readonly editable: v.BooleanSchema<undefined>;
|
|
2138
|
-
readonly confirmed: v.SchemaWithPipe<readonly [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
|
|
2200
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
2139
2201
|
}, undefined>, v.DescriptionAction<{
|
|
2140
2202
|
currency: "CLP";
|
|
2141
2203
|
value: number;
|
|
@@ -2144,7 +2206,7 @@ export declare const contract: {
|
|
|
2144
2206
|
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
2145
2207
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2146
2208
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
2147
|
-
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
|
|
2209
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
2148
2210
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2149
2211
|
}, undefined>, v.DescriptionAction<{
|
|
2150
2212
|
currency: "CLP";
|
|
@@ -2155,7 +2217,7 @@ export declare const contract: {
|
|
|
2155
2217
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
2156
2218
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
2157
2219
|
}, undefined>;
|
|
2158
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
2220
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
2159
2221
|
readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
|
|
2160
2222
|
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
|
|
2161
2223
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -2166,7 +2228,8 @@ export declare const contract: {
|
|
|
2166
2228
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2167
2229
|
}, undefined>, v.DescriptionAction<{
|
|
2168
2230
|
type: "transfer";
|
|
2169
|
-
status: "
|
|
2231
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
2232
|
+
transfer_id: string | null;
|
|
2170
2233
|
signed: boolean;
|
|
2171
2234
|
sender: {
|
|
2172
2235
|
type: "account_key";
|
|
@@ -2213,7 +2276,7 @@ export declare const contract: {
|
|
|
2213
2276
|
currency: "CLP";
|
|
2214
2277
|
amount: "0";
|
|
2215
2278
|
};
|
|
2216
|
-
interaction_reason?: "
|
|
2279
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
2217
2280
|
expires_at: string | null;
|
|
2218
2281
|
expires_in_seconds: number | null;
|
|
2219
2282
|
id: string;
|
|
@@ -2224,9 +2287,11 @@ export declare const contract: {
|
|
|
2224
2287
|
server_time: string;
|
|
2225
2288
|
created_at: string;
|
|
2226
2289
|
authorization_url: string;
|
|
2227
|
-
}, "Authoritative Project-facing state of a transfer, in
|
|
2290
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2228
2291
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
2229
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
2292
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
2293
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
2294
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
2230
2295
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
2231
2296
|
readonly account: v.StrictObjectSchema<{
|
|
2232
2297
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -2251,7 +2316,9 @@ export declare const contract: {
|
|
|
2251
2316
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2252
2317
|
}, undefined>, v.DescriptionAction<{
|
|
2253
2318
|
type: "account_opening";
|
|
2254
|
-
status: "
|
|
2319
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
2320
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
2321
|
+
account_opening_status_detail: string | null;
|
|
2255
2322
|
signed: boolean;
|
|
2256
2323
|
account: {
|
|
2257
2324
|
accountKey: string;
|
|
@@ -2273,9 +2340,11 @@ export declare const contract: {
|
|
|
2273
2340
|
server_time: string;
|
|
2274
2341
|
created_at: string;
|
|
2275
2342
|
authorization_url: string;
|
|
2276
|
-
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until
|
|
2343
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2277
2344
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
2278
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
2345
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
2346
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
2347
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
2279
2348
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
2280
2349
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2281
2350
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -2314,7 +2383,9 @@ export declare const contract: {
|
|
|
2314
2383
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2315
2384
|
}, undefined>, v.DescriptionAction<{
|
|
2316
2385
|
type: "account_closure";
|
|
2317
|
-
status: "
|
|
2386
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
2387
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
2388
|
+
account_closure_status_detail: string | null;
|
|
2318
2389
|
signed: boolean;
|
|
2319
2390
|
account: {
|
|
2320
2391
|
type: "account_key";
|
|
@@ -2436,85 +2507,98 @@ export declare const contract: {
|
|
|
2436
2507
|
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2437
2508
|
readonly object: v.LiteralSchema<"transfer", undefined>;
|
|
2438
2509
|
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
|
|
2439
|
-
readonly
|
|
2440
|
-
readonly
|
|
2441
|
-
readonly
|
|
2442
|
-
readonly
|
|
2443
|
-
readonly
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2510
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing", "succeeded", "failed", "cancelled"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "requires_action" | "processing", "Where the Transfer stands: `requires_action` while the person still owes the bank a step, `processing` while the bank holds it and has not answered for good, then `succeeded`, `failed` or `cancelled`, which are final. `status_detail` says why. There is no `rejected` Transfer: a rejection ends an Intent, and a rejected Intent has no Transfer.">]>;
|
|
2511
|
+
readonly status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The word that says why, null when the status has none: `bank_refused` for a `failed` Transfer the bank refused for sure, `expired` for a `cancelled` one whose deadline passed, `grant_revoked` or `grant_expired` for one whose Grant ended. The vocabulary is open: a detail added later appears here as it is, so decide on `status`.">]>;
|
|
2512
|
+
readonly origin: v.SchemaWithPipe<readonly [v.PicklistSchema<["oauth", "platform", "emisor"], undefined>, v.DescriptionAction<"oauth" | "platform" | "emisor", "Who made it: `oauth`, a Project through the API; `platform`, a person in the AndCo web app; `emisor`, a person in the issuer's own channels, for example its mobile app.">]>;
|
|
2513
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647.">]>;
|
|
2514
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
2515
|
+
readonly sender: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2516
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
2517
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2518
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2519
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
2520
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
2521
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
2522
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
2523
|
+
}, undefined>, v.DescriptionAction<{
|
|
2524
|
+
country: string;
|
|
2453
2525
|
bank_code: string;
|
|
2454
2526
|
account_type: "10" | "20" | "40";
|
|
2455
2527
|
account_number: string;
|
|
2456
|
-
name: string;
|
|
2457
|
-
national_kind_id:
|
|
2458
|
-
national_id: string;
|
|
2459
|
-
}, "
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2528
|
+
name: string | null;
|
|
2529
|
+
national_kind_id: string | null;
|
|
2530
|
+
national_id: string | null;
|
|
2531
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
2532
|
+
country: string;
|
|
2533
|
+
bank_code: string;
|
|
2534
|
+
account_type: "10" | "20" | "40";
|
|
2535
|
+
account_number: string;
|
|
2536
|
+
name: string | null;
|
|
2537
|
+
national_kind_id: string | null;
|
|
2538
|
+
national_id: string | null;
|
|
2539
|
+
}, "The Remitente: the account the money leaves and its holder.">]>;
|
|
2540
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2541
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
2542
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2543
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2467
2544
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
2468
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>,
|
|
2469
|
-
readonly national_kind_id: v.
|
|
2470
|
-
readonly national_id: v.SchemaWithPipe<readonly [v.
|
|
2471
|
-
}, undefined
|
|
2472
|
-
|
|
2473
|
-
currency: "CLP";
|
|
2474
|
-
email?: string | undefined;
|
|
2475
|
-
country: "CL";
|
|
2545
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
2546
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
2547
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
2548
|
+
}, undefined>, v.DescriptionAction<{
|
|
2549
|
+
country: string;
|
|
2476
2550
|
bank_code: string;
|
|
2477
2551
|
account_type: "10" | "20" | "40";
|
|
2478
2552
|
account_number: string;
|
|
2479
|
-
name: string;
|
|
2480
|
-
national_kind_id:
|
|
2481
|
-
national_id: string;
|
|
2482
|
-
}, "
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2553
|
+
name: string | null;
|
|
2554
|
+
national_kind_id: string | null;
|
|
2555
|
+
national_id: string | null;
|
|
2556
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
2557
|
+
country: string;
|
|
2558
|
+
bank_code: string;
|
|
2559
|
+
account_type: "10" | "20" | "40";
|
|
2560
|
+
account_number: string;
|
|
2561
|
+
name: string | null;
|
|
2562
|
+
national_kind_id: string | null;
|
|
2563
|
+
national_id: string | null;
|
|
2564
|
+
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
2565
|
+
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
2566
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer with `approved: true` (its signature approved it, so there was no request).">]>;
|
|
2567
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer with `approved: true` that submitted it, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
2568
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
2569
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
2486
2570
|
}, undefined>, v.DescriptionAction<{
|
|
2487
2571
|
object: "transfer";
|
|
2488
2572
|
id: string;
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2573
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
2574
|
+
status_detail: string | null;
|
|
2575
|
+
origin: "oauth" | "platform" | "emisor";
|
|
2576
|
+
amount: number;
|
|
2577
|
+
currency: "CLP";
|
|
2493
2578
|
sender: {
|
|
2494
|
-
country:
|
|
2579
|
+
country: string;
|
|
2495
2580
|
bank_code: string;
|
|
2496
2581
|
account_type: "10" | "20" | "40";
|
|
2497
2582
|
account_number: string;
|
|
2498
|
-
name: string;
|
|
2499
|
-
national_kind_id:
|
|
2500
|
-
national_id: string;
|
|
2583
|
+
name: string | null;
|
|
2584
|
+
national_kind_id: string | null;
|
|
2585
|
+
national_id: string | null;
|
|
2501
2586
|
};
|
|
2502
2587
|
receiver: {
|
|
2503
|
-
|
|
2504
|
-
currency: "CLP";
|
|
2505
|
-
email?: string | undefined;
|
|
2506
|
-
country: "CL";
|
|
2588
|
+
country: string;
|
|
2507
2589
|
bank_code: string;
|
|
2508
2590
|
account_type: "10" | "20" | "40";
|
|
2509
2591
|
account_number: string;
|
|
2510
|
-
name: string;
|
|
2511
|
-
national_kind_id:
|
|
2512
|
-
national_id: string;
|
|
2592
|
+
name: string | null;
|
|
2593
|
+
national_kind_id: string | null;
|
|
2594
|
+
national_id: string | null;
|
|
2513
2595
|
};
|
|
2514
|
-
comment
|
|
2596
|
+
comment: string | null;
|
|
2597
|
+
intent_id: string | null;
|
|
2598
|
+
jti: string | null;
|
|
2599
|
+
transaction_id: string | null;
|
|
2515
2600
|
created_at: string;
|
|
2516
|
-
|
|
2517
|
-
}, "A Transfer uploaded as a Signed Instruction (ADR 0093), in Core's vocabulary: `sender`, `receiver` (with the amount, an integer in the minor unit of the currency) and `comment` exactly as signed. `status` is where it stands; `core_status` the core's own word, for the record.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2601
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2518
2602
|
getUserInfo: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.ObjectSchema<{
|
|
2519
2603
|
readonly sub: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2520
2604
|
readonly email: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The Profile's email address, present with the `email` scope. Any address the identity provider accepts, so a client must not require a narrower syntax.">]>, undefined>;
|
|
@@ -2542,7 +2626,7 @@ export declare const contract: {
|
|
|
2542
2626
|
readonly number: v.StringSchema<undefined>;
|
|
2543
2627
|
readonly type: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Null while the balance projection does not know the account yet.">]>;
|
|
2544
2628
|
readonly currency: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "Null while the balance projection does not know the account yet.">]>;
|
|
2545
|
-
readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The
|
|
2629
|
+
readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The balance AndCo maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds on hold are not subtracted from it. Null while AndCo does not know the account's balance yet, for example right after it is opened, and null when the Grant lacks `read_balance`; a listing never fails for it and never makes up a zero.">]>;
|
|
2546
2630
|
}, undefined>;
|
|
2547
2631
|
}, undefined>, undefined>;
|
|
2548
2632
|
readonly pageInfo: v.StrictObjectSchema<{
|
|
@@ -2571,7 +2655,7 @@ export declare const contract: {
|
|
|
2571
2655
|
hasNextPage: boolean;
|
|
2572
2656
|
};
|
|
2573
2657
|
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./accounts.js").InvalidAccountsCursor, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./accounts.js").BankConnectionInteractionRequired, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2574
|
-
|
|
2658
|
+
listAccountMovements: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2575
2659
|
readonly after: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2576
2660
|
readonly first: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Cursor page size; forward and backward argument families are exclusive.">]>;
|
|
2577
2661
|
readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account's identifier (a UUID) or its Account Key.">]>;
|
|
@@ -2579,17 +2663,20 @@ export declare const contract: {
|
|
|
2579
2663
|
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2580
2664
|
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2581
2665
|
readonly node: v.StrictObjectSchema<{
|
|
2666
|
+
readonly object: v.LiteralSchema<"movement", undefined>;
|
|
2582
2667
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2583
|
-
readonly
|
|
2668
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the transaction that posted this Movement, or null when AndCo has none. A Transfer that succeeded carries the same id of its debit.">]>;
|
|
2584
2669
|
readonly description: v.StringSchema<undefined>;
|
|
2585
|
-
readonly amount: v.SchemaWithPipe<readonly [v.
|
|
2586
|
-
readonly
|
|
2587
|
-
readonly
|
|
2588
|
-
readonly
|
|
2589
|
-
readonly
|
|
2590
|
-
readonly
|
|
2670
|
+
readonly amount: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, number, undefined>, v.DescriptionAction<number, "A positive integer in whole pesos (CLP). What tells an inflow from an outflow is `movement_type`, not a sign.">]>;
|
|
2671
|
+
readonly currency: v.SchemaWithPipe<readonly [v.LiteralSchema<"CLP", undefined>, v.DescriptionAction<"CLP", "The currency of the account: a permission never assumes it, so the node names it.">]>;
|
|
2672
|
+
readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of Movement, in AndCo's own words. `deposit` and `interest` bring money into this account and raise its balance; `withdrawal` takes money out and lowers it. `amount` is always positive, so `movement_type` is what tells an inflow from an outflow.">]>;
|
|
2673
|
+
readonly movement_origin: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2674
|
+
readonly movement_date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2675
|
+
readonly running_balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, number, undefined>, v.MaxValueAction<number, number, undefined>]>, undefined>, v.DescriptionAction<number | null, "The balance after this Movement, an integer in whole pesos, or null when AndCo did not send one: it is never made up. Real balances do go negative, so the sign is not narrowed away.">]>;
|
|
2676
|
+
readonly payment_type: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2591
2677
|
readonly reversed: v.BooleanSchema<undefined>;
|
|
2592
2678
|
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2679
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that this debit belongs to, only when the Grant may read that Transfer: one this client created for the same subject, or any Transfer of an account that a `bank_transfer` `read` detail covers. Always present. A null never means that no Transfer exists: it means no Transfer that this Grant may read, and it is also null for a credit, for a Movement without a `transaction_id` and for one that AndCo has posted before AndCo recorded the Transfer, which fills on a later read.">]>;
|
|
2593
2680
|
}, undefined>;
|
|
2594
2681
|
}, undefined>, undefined>;
|
|
2595
2682
|
readonly pageInfo: v.StrictObjectSchema<{
|
|
@@ -2602,17 +2689,20 @@ export declare const contract: {
|
|
|
2602
2689
|
edges: {
|
|
2603
2690
|
cursor: string | null;
|
|
2604
2691
|
node: {
|
|
2692
|
+
object: "movement";
|
|
2605
2693
|
id: string;
|
|
2606
|
-
|
|
2694
|
+
transaction_id: string | null;
|
|
2607
2695
|
description: string;
|
|
2608
|
-
amount:
|
|
2696
|
+
amount: number;
|
|
2697
|
+
currency: "CLP";
|
|
2609
2698
|
movement_type: "deposit" | "interest" | "withdrawal";
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2699
|
+
movement_origin: string | null;
|
|
2700
|
+
movement_date: string;
|
|
2701
|
+
running_balance: number | null;
|
|
2702
|
+
payment_type: string | null;
|
|
2614
2703
|
reversed: boolean;
|
|
2615
2704
|
note: string | null;
|
|
2705
|
+
transfer_id: string | null;
|
|
2616
2706
|
};
|
|
2617
2707
|
}[];
|
|
2618
2708
|
pageInfo: {
|
|
@@ -2622,6 +2712,158 @@ export declare const contract: {
|
|
|
2622
2712
|
hasNextPage: boolean;
|
|
2623
2713
|
};
|
|
2624
2714
|
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./common.js").InvalidIdentifier, typeof import("./accounts.js").InvalidCursor, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./accounts.js").BankConnectionInteractionRequired, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2715
|
+
listAccountTransfers: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2716
|
+
readonly after: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2717
|
+
readonly first: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Cursor page size; forward and backward argument families are exclusive.">]>;
|
|
2718
|
+
readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account's identifier (a UUID) or its Account Key.">]>;
|
|
2719
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2720
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2721
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2722
|
+
readonly node: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2723
|
+
readonly object: v.LiteralSchema<"transfer", undefined>;
|
|
2724
|
+
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
|
|
2725
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing", "succeeded", "failed", "cancelled"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "requires_action" | "processing", "Where the Transfer stands: `requires_action` while the person still owes the bank a step, `processing` while the bank holds it and has not answered for good, then `succeeded`, `failed` or `cancelled`, which are final. `status_detail` says why. There is no `rejected` Transfer: a rejection ends an Intent, and a rejected Intent has no Transfer.">]>;
|
|
2726
|
+
readonly status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The word that says why, null when the status has none: `bank_refused` for a `failed` Transfer the bank refused for sure, `expired` for a `cancelled` one whose deadline passed, `grant_revoked` or `grant_expired` for one whose Grant ended. The vocabulary is open: a detail added later appears here as it is, so decide on `status`.">]>;
|
|
2727
|
+
readonly origin: v.SchemaWithPipe<readonly [v.PicklistSchema<["oauth", "platform", "emisor"], undefined>, v.DescriptionAction<"oauth" | "platform" | "emisor", "Who made it: `oauth`, a Project through the API; `platform`, a person in the AndCo web app; `emisor`, a person in the issuer's own channels, for example its mobile app.">]>;
|
|
2728
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647.">]>;
|
|
2729
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
2730
|
+
readonly sender: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2731
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
2732
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2733
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2734
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
2735
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
2736
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
2737
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
2738
|
+
}, undefined>, v.DescriptionAction<{
|
|
2739
|
+
country: string;
|
|
2740
|
+
bank_code: string;
|
|
2741
|
+
account_type: "10" | "20" | "40";
|
|
2742
|
+
account_number: string;
|
|
2743
|
+
name: string | null;
|
|
2744
|
+
national_kind_id: string | null;
|
|
2745
|
+
national_id: string | null;
|
|
2746
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
2747
|
+
country: string;
|
|
2748
|
+
bank_code: string;
|
|
2749
|
+
account_type: "10" | "20" | "40";
|
|
2750
|
+
account_number: string;
|
|
2751
|
+
name: string | null;
|
|
2752
|
+
national_kind_id: string | null;
|
|
2753
|
+
national_id: string | null;
|
|
2754
|
+
}, "The Remitente: the account the money leaves and its holder.">]>;
|
|
2755
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2756
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
2757
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2758
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2759
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
2760
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
2761
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
2762
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
2763
|
+
}, undefined>, v.DescriptionAction<{
|
|
2764
|
+
country: string;
|
|
2765
|
+
bank_code: string;
|
|
2766
|
+
account_type: "10" | "20" | "40";
|
|
2767
|
+
account_number: string;
|
|
2768
|
+
name: string | null;
|
|
2769
|
+
national_kind_id: string | null;
|
|
2770
|
+
national_id: string | null;
|
|
2771
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
2772
|
+
country: string;
|
|
2773
|
+
bank_code: string;
|
|
2774
|
+
account_type: "10" | "20" | "40";
|
|
2775
|
+
account_number: string;
|
|
2776
|
+
name: string | null;
|
|
2777
|
+
national_kind_id: string | null;
|
|
2778
|
+
national_id: string | null;
|
|
2779
|
+
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
2780
|
+
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
2781
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer with `approved: true` (its signature approved it, so there was no request).">]>;
|
|
2782
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer with `approved: true` that submitted it, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
2783
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
2784
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
2785
|
+
}, undefined>, v.DescriptionAction<{
|
|
2786
|
+
object: "transfer";
|
|
2787
|
+
id: string;
|
|
2788
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
2789
|
+
status_detail: string | null;
|
|
2790
|
+
origin: "oauth" | "platform" | "emisor";
|
|
2791
|
+
amount: number;
|
|
2792
|
+
currency: "CLP";
|
|
2793
|
+
sender: {
|
|
2794
|
+
country: string;
|
|
2795
|
+
bank_code: string;
|
|
2796
|
+
account_type: "10" | "20" | "40";
|
|
2797
|
+
account_number: string;
|
|
2798
|
+
name: string | null;
|
|
2799
|
+
national_kind_id: string | null;
|
|
2800
|
+
national_id: string | null;
|
|
2801
|
+
};
|
|
2802
|
+
receiver: {
|
|
2803
|
+
country: string;
|
|
2804
|
+
bank_code: string;
|
|
2805
|
+
account_type: "10" | "20" | "40";
|
|
2806
|
+
account_number: string;
|
|
2807
|
+
name: string | null;
|
|
2808
|
+
national_kind_id: string | null;
|
|
2809
|
+
national_id: string | null;
|
|
2810
|
+
};
|
|
2811
|
+
comment: string | null;
|
|
2812
|
+
intent_id: string | null;
|
|
2813
|
+
jti: string | null;
|
|
2814
|
+
transaction_id: string | null;
|
|
2815
|
+
created_at: string;
|
|
2816
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>;
|
|
2817
|
+
}, undefined>, undefined>;
|
|
2818
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2819
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2820
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2821
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2822
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2823
|
+
}, undefined>;
|
|
2824
|
+
}, undefined>, v.DescriptionAction<{
|
|
2825
|
+
edges: {
|
|
2826
|
+
cursor: string;
|
|
2827
|
+
node: {
|
|
2828
|
+
object: "transfer";
|
|
2829
|
+
id: string;
|
|
2830
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
2831
|
+
status_detail: string | null;
|
|
2832
|
+
origin: "oauth" | "platform" | "emisor";
|
|
2833
|
+
amount: number;
|
|
2834
|
+
currency: "CLP";
|
|
2835
|
+
sender: {
|
|
2836
|
+
country: string;
|
|
2837
|
+
bank_code: string;
|
|
2838
|
+
account_type: "10" | "20" | "40";
|
|
2839
|
+
account_number: string;
|
|
2840
|
+
name: string | null;
|
|
2841
|
+
national_kind_id: string | null;
|
|
2842
|
+
national_id: string | null;
|
|
2843
|
+
};
|
|
2844
|
+
receiver: {
|
|
2845
|
+
country: string;
|
|
2846
|
+
bank_code: string;
|
|
2847
|
+
account_type: "10" | "20" | "40";
|
|
2848
|
+
account_number: string;
|
|
2849
|
+
name: string | null;
|
|
2850
|
+
national_kind_id: string | null;
|
|
2851
|
+
national_id: string | null;
|
|
2852
|
+
};
|
|
2853
|
+
comment: string | null;
|
|
2854
|
+
intent_id: string | null;
|
|
2855
|
+
jti: string | null;
|
|
2856
|
+
transaction_id: string | null;
|
|
2857
|
+
created_at: string;
|
|
2858
|
+
};
|
|
2859
|
+
}[];
|
|
2860
|
+
pageInfo: {
|
|
2861
|
+
startCursor: string | null;
|
|
2862
|
+
endCursor: string | null;
|
|
2863
|
+
hasPreviousPage: boolean;
|
|
2864
|
+
hasNextPage: boolean;
|
|
2865
|
+
};
|
|
2866
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./accounts.js").InvalidCursor, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2625
2867
|
listOrganizationAddresses: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2626
2868
|
readonly offset: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "Nonnegative position in live ordered results.">]>, undefined>;
|
|
2627
2869
|
readonly limit: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 100, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Offset page size; do not combine with cursor arguments.">]>;
|
|
@@ -2790,16 +3032,16 @@ export declare const contract: {
|
|
|
2790
3032
|
readonly family_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2791
3033
|
readonly business_activity_code: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2792
3034
|
readonly validation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2793
|
-
readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is AndCo
|
|
3035
|
+
readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is AndCo's own check, on its hosted page.">]>;
|
|
2794
3036
|
readonly validated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2795
3037
|
readonly evidence: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["document", "liveness", "face_comparison"], undefined>, undefined>, v.MinLengthAction<("document" | "liveness" | "face_comparison")[], 1, undefined>]>, v.DescriptionAction<("document" | "liveness" | "face_comparison")[], "The kinds of evidence, named after the `evidence` of `verified_claims` in OpenID Connect for Identity Assurance.">]>;
|
|
2796
|
-
readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "AndCo
|
|
3038
|
+
readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "AndCo's identifier of the validation. Keep it as the reference to the validation.">]>;
|
|
2797
3039
|
}, undefined>, v.DescriptionAction<{
|
|
2798
3040
|
validated_by: "andco_core";
|
|
2799
3041
|
validated_at: string;
|
|
2800
3042
|
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2801
3043
|
verification_id: string;
|
|
2802
|
-
}, "What AndCo
|
|
3044
|
+
}, "What AndCo checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts.">]>, undefined>, undefined>, v.DescriptionAction<{
|
|
2803
3045
|
validated_by: "andco_core";
|
|
2804
3046
|
validated_at: string;
|
|
2805
3047
|
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
@@ -2910,16 +3152,16 @@ export declare const contract: {
|
|
|
2910
3152
|
readonly family_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2911
3153
|
readonly business_activity_code: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2912
3154
|
readonly validation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2913
|
-
readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is AndCo
|
|
3155
|
+
readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is AndCo's own check, on its hosted page.">]>;
|
|
2914
3156
|
readonly validated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2915
3157
|
readonly evidence: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ArraySchema<v.PicklistSchema<["document", "liveness", "face_comparison"], undefined>, undefined>, v.MinLengthAction<("document" | "liveness" | "face_comparison")[], 1, undefined>]>, v.DescriptionAction<("document" | "liveness" | "face_comparison")[], "The kinds of evidence, named after the `evidence` of `verified_claims` in OpenID Connect for Identity Assurance.">]>;
|
|
2916
|
-
readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "AndCo
|
|
3158
|
+
readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "AndCo's identifier of the validation. Keep it as the reference to the validation.">]>;
|
|
2917
3159
|
}, undefined>, v.DescriptionAction<{
|
|
2918
3160
|
validated_by: "andco_core";
|
|
2919
3161
|
validated_at: string;
|
|
2920
3162
|
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2921
3163
|
verification_id: string;
|
|
2922
|
-
}, "What AndCo
|
|
3164
|
+
}, "What AndCo checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts.">]>, undefined>, undefined>, v.DescriptionAction<{
|
|
2923
3165
|
validated_by: "andco_core";
|
|
2924
3166
|
validated_at: string;
|
|
2925
3167
|
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
@@ -2993,92 +3235,105 @@ export declare const contract: {
|
|
|
2993
3235
|
};
|
|
2994
3236
|
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidRequest, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2995
3237
|
listTransfers: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2996
|
-
readonly jti: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The `jti` of the
|
|
3238
|
+
readonly jti: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, v.DescriptionAction<string, "The `jti` of the signed transfer that submitted the Transfer, a UUID in lowercase.">]>;
|
|
2997
3239
|
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2998
3240
|
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2999
3241
|
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3000
3242
|
readonly node: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3001
3243
|
readonly object: v.LiteralSchema<"transfer", undefined>;
|
|
3002
3244
|
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
|
|
3003
|
-
readonly
|
|
3004
|
-
readonly
|
|
3005
|
-
readonly
|
|
3006
|
-
readonly
|
|
3007
|
-
readonly
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3245
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing", "succeeded", "failed", "cancelled"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "requires_action" | "processing", "Where the Transfer stands: `requires_action` while the person still owes the bank a step, `processing` while the bank holds it and has not answered for good, then `succeeded`, `failed` or `cancelled`, which are final. `status_detail` says why. There is no `rejected` Transfer: a rejection ends an Intent, and a rejected Intent has no Transfer.">]>;
|
|
3246
|
+
readonly status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The word that says why, null when the status has none: `bank_refused` for a `failed` Transfer the bank refused for sure, `expired` for a `cancelled` one whose deadline passed, `grant_revoked` or `grant_expired` for one whose Grant ended. The vocabulary is open: a detail added later appears here as it is, so decide on `status`.">]>;
|
|
3247
|
+
readonly origin: v.SchemaWithPipe<readonly [v.PicklistSchema<["oauth", "platform", "emisor"], undefined>, v.DescriptionAction<"oauth" | "platform" | "emisor", "Who made it: `oauth`, a Project through the API; `platform`, a person in the AndCo web app; `emisor`, a person in the issuer's own channels, for example its mobile app.">]>;
|
|
3248
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647.">]>;
|
|
3249
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3250
|
+
readonly sender: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3251
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
3252
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
3253
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
3254
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
3255
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
3256
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
3257
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
3258
|
+
}, undefined>, v.DescriptionAction<{
|
|
3259
|
+
country: string;
|
|
3017
3260
|
bank_code: string;
|
|
3018
3261
|
account_type: "10" | "20" | "40";
|
|
3019
3262
|
account_number: string;
|
|
3020
|
-
name: string;
|
|
3021
|
-
national_kind_id:
|
|
3022
|
-
national_id: string;
|
|
3023
|
-
}, "
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3263
|
+
name: string | null;
|
|
3264
|
+
national_kind_id: string | null;
|
|
3265
|
+
national_id: string | null;
|
|
3266
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
3267
|
+
country: string;
|
|
3268
|
+
bank_code: string;
|
|
3269
|
+
account_type: "10" | "20" | "40";
|
|
3270
|
+
account_number: string;
|
|
3271
|
+
name: string | null;
|
|
3272
|
+
national_kind_id: string | null;
|
|
3273
|
+
national_id: string | null;
|
|
3274
|
+
}, "The Remitente: the account the money leaves and its holder.">]>;
|
|
3275
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3276
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
3277
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
3278
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
3031
3279
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
3032
|
-
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>,
|
|
3033
|
-
readonly national_kind_id: v.
|
|
3034
|
-
readonly national_id: v.SchemaWithPipe<readonly [v.
|
|
3035
|
-
}, undefined
|
|
3036
|
-
|
|
3037
|
-
currency: "CLP";
|
|
3038
|
-
email?: string | undefined;
|
|
3039
|
-
country: "CL";
|
|
3280
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
3281
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
3282
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
3283
|
+
}, undefined>, v.DescriptionAction<{
|
|
3284
|
+
country: string;
|
|
3040
3285
|
bank_code: string;
|
|
3041
3286
|
account_type: "10" | "20" | "40";
|
|
3042
3287
|
account_number: string;
|
|
3043
|
-
name: string;
|
|
3044
|
-
national_kind_id:
|
|
3045
|
-
national_id: string;
|
|
3046
|
-
}, "
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3288
|
+
name: string | null;
|
|
3289
|
+
national_kind_id: string | null;
|
|
3290
|
+
national_id: string | null;
|
|
3291
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
3292
|
+
country: string;
|
|
3293
|
+
bank_code: string;
|
|
3294
|
+
account_type: "10" | "20" | "40";
|
|
3295
|
+
account_number: string;
|
|
3296
|
+
name: string | null;
|
|
3297
|
+
national_kind_id: string | null;
|
|
3298
|
+
national_id: string | null;
|
|
3299
|
+
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
3300
|
+
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
3301
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer with `approved: true` (its signature approved it, so there was no request).">]>;
|
|
3302
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer with `approved: true` that submitted it, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
3303
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
3304
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
3050
3305
|
}, undefined>, v.DescriptionAction<{
|
|
3051
3306
|
object: "transfer";
|
|
3052
3307
|
id: string;
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3308
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
3309
|
+
status_detail: string | null;
|
|
3310
|
+
origin: "oauth" | "platform" | "emisor";
|
|
3311
|
+
amount: number;
|
|
3312
|
+
currency: "CLP";
|
|
3057
3313
|
sender: {
|
|
3058
|
-
country:
|
|
3314
|
+
country: string;
|
|
3059
3315
|
bank_code: string;
|
|
3060
3316
|
account_type: "10" | "20" | "40";
|
|
3061
3317
|
account_number: string;
|
|
3062
|
-
name: string;
|
|
3063
|
-
national_kind_id:
|
|
3064
|
-
national_id: string;
|
|
3318
|
+
name: string | null;
|
|
3319
|
+
national_kind_id: string | null;
|
|
3320
|
+
national_id: string | null;
|
|
3065
3321
|
};
|
|
3066
3322
|
receiver: {
|
|
3067
|
-
|
|
3068
|
-
currency: "CLP";
|
|
3069
|
-
email?: string | undefined;
|
|
3070
|
-
country: "CL";
|
|
3323
|
+
country: string;
|
|
3071
3324
|
bank_code: string;
|
|
3072
3325
|
account_type: "10" | "20" | "40";
|
|
3073
3326
|
account_number: string;
|
|
3074
|
-
name: string;
|
|
3075
|
-
national_kind_id:
|
|
3076
|
-
national_id: string;
|
|
3327
|
+
name: string | null;
|
|
3328
|
+
national_kind_id: string | null;
|
|
3329
|
+
national_id: string | null;
|
|
3077
3330
|
};
|
|
3078
|
-
comment
|
|
3331
|
+
comment: string | null;
|
|
3332
|
+
intent_id: string | null;
|
|
3333
|
+
jti: string | null;
|
|
3334
|
+
transaction_id: string | null;
|
|
3079
3335
|
created_at: string;
|
|
3080
|
-
|
|
3081
|
-
}, "A Transfer uploaded as a Signed Instruction (ADR 0093), in Core's vocabulary: `sender`, `receiver` (with the amount, an integer in the minor unit of the currency) and `comment` exactly as signed. `status` is where it stands; `core_status` the core's own word, for the record.">]>;
|
|
3336
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>;
|
|
3082
3337
|
}, undefined>, undefined>;
|
|
3083
3338
|
readonly pageInfo: v.StrictObjectSchema<{
|
|
3084
3339
|
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -3092,34 +3347,34 @@ export declare const contract: {
|
|
|
3092
3347
|
node: {
|
|
3093
3348
|
object: "transfer";
|
|
3094
3349
|
id: string;
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3350
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
3351
|
+
status_detail: string | null;
|
|
3352
|
+
origin: "oauth" | "platform" | "emisor";
|
|
3353
|
+
amount: number;
|
|
3354
|
+
currency: "CLP";
|
|
3099
3355
|
sender: {
|
|
3100
|
-
country:
|
|
3356
|
+
country: string;
|
|
3101
3357
|
bank_code: string;
|
|
3102
3358
|
account_type: "10" | "20" | "40";
|
|
3103
3359
|
account_number: string;
|
|
3104
|
-
name: string;
|
|
3105
|
-
national_kind_id:
|
|
3106
|
-
national_id: string;
|
|
3360
|
+
name: string | null;
|
|
3361
|
+
national_kind_id: string | null;
|
|
3362
|
+
national_id: string | null;
|
|
3107
3363
|
};
|
|
3108
3364
|
receiver: {
|
|
3109
|
-
|
|
3110
|
-
currency: "CLP";
|
|
3111
|
-
email?: string | undefined;
|
|
3112
|
-
country: "CL";
|
|
3365
|
+
country: string;
|
|
3113
3366
|
bank_code: string;
|
|
3114
3367
|
account_type: "10" | "20" | "40";
|
|
3115
3368
|
account_number: string;
|
|
3116
|
-
name: string;
|
|
3117
|
-
national_kind_id:
|
|
3118
|
-
national_id: string;
|
|
3369
|
+
name: string | null;
|
|
3370
|
+
national_kind_id: string | null;
|
|
3371
|
+
national_id: string | null;
|
|
3119
3372
|
};
|
|
3120
|
-
comment
|
|
3373
|
+
comment: string | null;
|
|
3374
|
+
intent_id: string | null;
|
|
3375
|
+
jti: string | null;
|
|
3376
|
+
transaction_id: string | null;
|
|
3121
3377
|
created_at: string;
|
|
3122
|
-
expires_at: string;
|
|
3123
3378
|
};
|
|
3124
3379
|
}[];
|
|
3125
3380
|
pageInfo: {
|
|
@@ -3448,11 +3703,11 @@ export declare const contract: {
|
|
|
3448
3703
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3449
3704
|
}, undefined>;
|
|
3450
3705
|
readonly body: v.StrictObjectSchema<{
|
|
3451
|
-
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
3706
|
+
readonly reason: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
3452
3707
|
}, undefined>;
|
|
3453
3708
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
3454
3709
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
3455
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"
|
|
3710
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
3456
3711
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
3457
3712
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
3458
3713
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -3539,7 +3794,8 @@ export declare const contract: {
|
|
|
3539
3794
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3540
3795
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3541
3796
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
3542
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
3797
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
3798
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
3543
3799
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
3544
3800
|
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3545
3801
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -3578,8 +3834,8 @@ export declare const contract: {
|
|
|
3578
3834
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
3579
3835
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
3580
3836
|
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
3581
|
-
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
3582
|
-
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "
|
|
3837
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
3838
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
3583
3839
|
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
3584
3840
|
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
3585
3841
|
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
@@ -3627,12 +3883,12 @@ export declare const contract: {
|
|
|
3627
3883
|
}, undefined>, v.DescriptionAction<{
|
|
3628
3884
|
value: string;
|
|
3629
3885
|
editable: boolean;
|
|
3630
|
-
}, "The comment a transfer asks for
|
|
3886
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
3631
3887
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3632
3888
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3633
|
-
readonly value: v.SchemaWithPipe<readonly [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
|
|
3889
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
3634
3890
|
readonly editable: v.BooleanSchema<undefined>;
|
|
3635
|
-
readonly confirmed: v.SchemaWithPipe<readonly [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
|
|
3891
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
3636
3892
|
}, undefined>, v.DescriptionAction<{
|
|
3637
3893
|
currency: "CLP";
|
|
3638
3894
|
value: number;
|
|
@@ -3641,7 +3897,7 @@ export declare const contract: {
|
|
|
3641
3897
|
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
3642
3898
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3643
3899
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3644
|
-
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
|
|
3900
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
3645
3901
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3646
3902
|
}, undefined>, v.DescriptionAction<{
|
|
3647
3903
|
currency: "CLP";
|
|
@@ -3652,7 +3908,7 @@ export declare const contract: {
|
|
|
3652
3908
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3653
3909
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
3654
3910
|
}, undefined>;
|
|
3655
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
3911
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
3656
3912
|
readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
|
|
3657
3913
|
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
|
|
3658
3914
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
@@ -3663,7 +3919,8 @@ export declare const contract: {
|
|
|
3663
3919
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3664
3920
|
}, undefined>, v.DescriptionAction<{
|
|
3665
3921
|
type: "transfer";
|
|
3666
|
-
status: "
|
|
3922
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
3923
|
+
transfer_id: string | null;
|
|
3667
3924
|
signed: boolean;
|
|
3668
3925
|
sender: {
|
|
3669
3926
|
type: "account_key";
|
|
@@ -3710,7 +3967,7 @@ export declare const contract: {
|
|
|
3710
3967
|
currency: "CLP";
|
|
3711
3968
|
amount: "0";
|
|
3712
3969
|
};
|
|
3713
|
-
interaction_reason?: "
|
|
3970
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
3714
3971
|
expires_at: string | null;
|
|
3715
3972
|
expires_in_seconds: number | null;
|
|
3716
3973
|
id: string;
|
|
@@ -3721,9 +3978,11 @@ export declare const contract: {
|
|
|
3721
3978
|
server_time: string;
|
|
3722
3979
|
created_at: string;
|
|
3723
3980
|
authorization_url: string;
|
|
3724
|
-
}, "Authoritative Project-facing state of a transfer, in
|
|
3981
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3725
3982
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
3726
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
3983
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
3984
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
3985
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
3727
3986
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
3728
3987
|
readonly account: v.StrictObjectSchema<{
|
|
3729
3988
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -3748,7 +4007,9 @@ export declare const contract: {
|
|
|
3748
4007
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3749
4008
|
}, undefined>, v.DescriptionAction<{
|
|
3750
4009
|
type: "account_opening";
|
|
3751
|
-
status: "
|
|
4010
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
4011
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
4012
|
+
account_opening_status_detail: string | null;
|
|
3752
4013
|
signed: boolean;
|
|
3753
4014
|
account: {
|
|
3754
4015
|
accountKey: string;
|
|
@@ -3770,9 +4031,11 @@ export declare const contract: {
|
|
|
3770
4031
|
server_time: string;
|
|
3771
4032
|
created_at: string;
|
|
3772
4033
|
authorization_url: string;
|
|
3773
|
-
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until
|
|
4034
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3774
4035
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
3775
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
4036
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
4037
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
4038
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
3776
4039
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
3777
4040
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3778
4041
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -3811,7 +4074,9 @@ export declare const contract: {
|
|
|
3811
4074
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3812
4075
|
}, undefined>, v.DescriptionAction<{
|
|
3813
4076
|
type: "account_closure";
|
|
3814
|
-
status: "
|
|
4077
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
4078
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
4079
|
+
account_closure_status_detail: string | null;
|
|
3815
4080
|
signed: boolean;
|
|
3816
4081
|
account: {
|
|
3817
4082
|
type: "account_key";
|