@andco/protocol 0.0.11 → 0.0.13
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/api-errors.d.ts +5 -128
- package/dist/api-errors.d.ts.map +1 -1
- package/dist/api-errors.js +5 -131
- package/dist/authorization-preparation.d.ts +3 -3
- package/dist/authorization-preparation.d.ts.map +1 -1
- package/dist/authorization-preparation.js +4 -0
- package/dist/authorization.js +2 -2
- package/dist/errors.d.ts +111 -16
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +124 -12
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/intent-input.d.ts +1791 -725
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +325 -157
- package/dist/issues.d.ts +62 -0
- package/dist/issues.d.ts.map +1 -0
- package/dist/issues.js +61 -0
- package/dist/messages/index.d.ts +2 -2
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/messages/index.js +10 -3
- package/dist/messages/set-preferences.d.ts +13 -1
- package/dist/messages/set-preferences.d.ts.map +1 -1
- package/dist/messages/set-preferences.js +31 -9
- package/dist/miniapp-manifest.d.ts +2 -2
- package/dist/miniapp-manifest.d.ts.map +1 -1
- package/dist/miniapp-manifest.js +1 -1
- package/dist/native-intent.d.ts +48 -28
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +76 -24
- package/dist/pagination.d.ts +37 -31
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +72 -24
- package/dist/rar/account-matchers.d.ts +47 -240
- package/dist/rar/account-matchers.d.ts.map +1 -1
- package/dist/rar/account-matchers.js +52 -131
- package/dist/rar/bank.d.ts +280 -392
- package/dist/rar/bank.d.ts.map +1 -1
- package/dist/rar/bank.js +68 -137
- package/dist/rar/catalog.d.ts +305 -288
- package/dist/rar/catalog.d.ts.map +1 -1
- package/dist/rar/catalog.js +69 -29
- package/dist/rar/detail.d.ts +15 -32
- package/dist/rar/detail.d.ts.map +1 -1
- package/dist/rar/detail.js +14 -34
- package/dist/rar/index.d.ts +2 -1
- package/dist/rar/index.d.ts.map +1 -1
- package/dist/rar/index.js +2 -1
- package/dist/rar/json-schemas.generated.d.ts +4 -0
- package/dist/rar/json-schemas.generated.d.ts.map +1 -0
- package/dist/rar/json-schemas.generated.js +3570 -0
- package/dist/rar/money.d.ts +5 -5
- package/dist/rar/money.d.ts.map +1 -1
- package/dist/rar/money.js +5 -5
- package/dist/rar/project-users.d.ts +40 -14
- package/dist/rar/project-users.d.ts.map +1 -1
- package/dist/rar/project-users.js +20 -23
- package/dist/rar/subject-data.d.ts +96 -48
- package/dist/rar/subject-data.d.ts.map +1 -1
- package/dist/rar/subject-data.js +61 -34
- package/dist/rar/subject.d.ts +18 -85
- package/dist/rar/subject.d.ts.map +1 -1
- package/dist/rar/subject.js +23 -51
- package/dist/rest/accounts.d.ts +347 -0
- package/dist/rest/accounts.d.ts.map +1 -0
- package/dist/rest/accounts.js +108 -0
- package/dist/rest/addresses.d.ts +581 -0
- package/dist/rest/addresses.d.ts.map +1 -0
- package/dist/rest/addresses.js +190 -0
- package/dist/rest/api-error.d.ts +104 -0
- package/dist/rest/api-error.d.ts.map +1 -0
- package/dist/rest/api-error.js +103 -0
- package/dist/rest/authorization.d.ts +123 -0
- package/dist/rest/authorization.d.ts.map +1 -0
- package/dist/rest/authorization.js +62 -0
- package/dist/rest/catalog.d.ts +199 -0
- package/dist/rest/catalog.d.ts.map +1 -0
- package/dist/rest/catalog.js +63 -0
- package/dist/rest/common.d.ts +637 -0
- package/dist/rest/common.d.ts.map +1 -0
- package/dist/rest/common.js +172 -0
- package/dist/rest/contract.d.ts +3480 -0
- package/dist/rest/contract.d.ts.map +1 -0
- package/dist/rest/contract.js +120 -0
- package/dist/rest/events.d.ts +145 -0
- package/dist/rest/events.d.ts.map +1 -0
- package/dist/rest/events.js +42 -0
- package/dist/rest/http.d.ts +49 -0
- package/dist/rest/http.d.ts.map +1 -0
- package/dist/rest/http.js +25 -0
- package/dist/rest/identity.d.ts +627 -0
- package/dist/rest/identity.d.ts.map +1 -0
- package/dist/rest/identity.js +128 -0
- package/dist/rest/index.d.ts +14 -0
- package/dist/rest/index.d.ts.map +1 -0
- package/dist/rest/index.js +13 -0
- package/dist/rest/intents.d.ts +4556 -0
- package/dist/rest/intents.d.ts.map +1 -0
- package/dist/rest/intents.js +551 -0
- package/dist/rest/signatures.d.ts +110 -0
- package/dist/rest/signatures.d.ts.map +1 -0
- package/dist/rest/signatures.js +113 -0
- package/dist/rest/subjects.d.ts +14 -0
- package/dist/rest/subjects.d.ts.map +1 -0
- package/dist/rest/subjects.js +22 -0
- package/dist/service-grants.d.ts +2 -2
- package/dist/service-grants.d.ts.map +1 -1
- package/dist/service-grants.js +1 -1
- package/dist/transport/generated/oauth-api.d.ts +5547 -1448
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +9 -134
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/intents.js +21 -405
- package/dist/transport/rest.d.ts +15 -5
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/userinfo.d.ts +22 -9
- package/dist/userinfo.d.ts.map +1 -1
- package/dist/userinfo.js +17 -12
- package/package.json +13 -2
|
@@ -0,0 +1,3480 @@
|
|
|
1
|
+
import type * as v from "valibot";
|
|
2
|
+
/**
|
|
3
|
+
* The operations of the Andco OAuth Resource API, each under its `operationId`. `@andco/protocol`
|
|
4
|
+
* declares them once (ADR 0038): Platform implements them with `implement(contract)` and the
|
|
5
|
+
* OpenAPI document, `openapi/oauth-api.yaml`, is generated from them (`pnpm generate:openapi`).
|
|
6
|
+
*/
|
|
7
|
+
export declare const contract: {
|
|
8
|
+
createOrganizationAddress: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
9
|
+
readonly params: v.ObjectSchema<{
|
|
10
|
+
readonly organization_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The Organization the Grant's subject names.">]>;
|
|
11
|
+
}, undefined>;
|
|
12
|
+
readonly body: v.StrictObjectSchema<{
|
|
13
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 16, undefined>]>;
|
|
14
|
+
readonly level1: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
15
|
+
readonly level2: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
16
|
+
readonly level3: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
17
|
+
readonly street_address: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, undefined>;
|
|
18
|
+
readonly label_kind: v.PicklistSchema<["home", "work", "vacation", "other"], undefined>;
|
|
19
|
+
readonly label_name: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>, undefined>;
|
|
20
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -2147483648, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>, undefined>;
|
|
21
|
+
}, undefined>;
|
|
22
|
+
}, undefined>, v.ObjectSchema<{
|
|
23
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
24
|
+
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable, typeof import("./common.js").InvalidRequest, typeof import("./addresses.js").AddressNotCreated, typeof import("./common.js").PayloadTooLarge]>>;
|
|
25
|
+
createProfileAddress: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
26
|
+
readonly params: v.ObjectSchema<{
|
|
27
|
+
readonly profile_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Profile the Grant's subject names.">]>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
readonly body: v.StrictObjectSchema<{
|
|
30
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 16, undefined>]>;
|
|
31
|
+
readonly level1: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
32
|
+
readonly level2: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
33
|
+
readonly level3: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
34
|
+
readonly street_address: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, undefined>;
|
|
35
|
+
readonly label_kind: v.PicklistSchema<["home", "work", "vacation", "other"], undefined>;
|
|
36
|
+
readonly label_name: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>, undefined>;
|
|
37
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -2147483648, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>, undefined>;
|
|
38
|
+
}, undefined>;
|
|
39
|
+
}, undefined>, v.ObjectSchema<{
|
|
40
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
41
|
+
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable, typeof import("./common.js").InvalidRequest, typeof import("./addresses.js").AddressNotCreated, typeof import("./common.js").PayloadTooLarge]>>;
|
|
42
|
+
deleteOrganizationAddress: import("@orpc/contract").ProcedureContractBuilderWithInput<v.ObjectSchema<{
|
|
43
|
+
readonly params: v.ObjectSchema<{
|
|
44
|
+
readonly organization_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The Organization the Grant's subject names.">]>;
|
|
45
|
+
readonly address_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
46
|
+
}, undefined>;
|
|
47
|
+
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
48
|
+
deleteProfileAddress: import("@orpc/contract").ProcedureContractBuilderWithInput<v.ObjectSchema<{
|
|
49
|
+
readonly params: v.ObjectSchema<{
|
|
50
|
+
readonly profile_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Profile the Grant's subject names.">]>;
|
|
51
|
+
readonly address_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
52
|
+
}, undefined>;
|
|
53
|
+
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
54
|
+
approveIntent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
55
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
56
|
+
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
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", "failed"], undefined>, v.DescriptionAction<"completed" | "closed" | "failed" | "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
|
+
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
60
|
+
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
61
|
+
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
62
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
63
|
+
}, undefined>, undefined>;
|
|
64
|
+
readonly termination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
65
|
+
readonly status: v.StringSchema<undefined>;
|
|
66
|
+
readonly at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
67
|
+
readonly total: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
68
|
+
}, undefined>, undefined>, undefined>, v.DescriptionAction<{
|
|
69
|
+
status: string;
|
|
70
|
+
at: string | null;
|
|
71
|
+
total: string | null;
|
|
72
|
+
} | null | undefined, "First terminal state and total, unchanged by later attribution corrections. Legacy unknown totals remain null.">]>;
|
|
73
|
+
readonly completion: v.NullableSchema<v.ObjectSchema<{
|
|
74
|
+
readonly completed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
75
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
76
|
+
}, undefined>, undefined>;
|
|
77
|
+
readonly destination: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
78
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
79
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
80
|
+
readonly number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
81
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
82
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Null when the holder has no identity document on file.">]>;
|
|
83
|
+
readonly holder_name: v.StringSchema<undefined>;
|
|
84
|
+
}, undefined>, v.DescriptionAction<{
|
|
85
|
+
type: "account";
|
|
86
|
+
id: string;
|
|
87
|
+
number: string;
|
|
88
|
+
account_type: "checking" | "debit" | "savings";
|
|
89
|
+
holder_id: string | null;
|
|
90
|
+
holder_name: string;
|
|
91
|
+
}, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
|
|
92
|
+
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
93
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
94
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
95
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
96
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Explicitly confirmed target; `value` applies until confirmation.">]>;
|
|
97
|
+
readonly frozen_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "First funding confirmation or attribution freezes the target permanently.">]>;
|
|
98
|
+
}, undefined>, v.DescriptionAction<{
|
|
99
|
+
currency: "CLP";
|
|
100
|
+
value: string;
|
|
101
|
+
editable: boolean;
|
|
102
|
+
confirmed: string | null;
|
|
103
|
+
frozen_at: string | null;
|
|
104
|
+
}, "The amount a deposit asks for. `value` is the request's, `confirmed` the payer's own target when `editable`; what arrived is `progress.credited`, never these.">]>, undefined>;
|
|
105
|
+
readonly progress: v.StrictObjectSchema<{
|
|
106
|
+
readonly credited: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
107
|
+
readonly remaining: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
108
|
+
}, undefined>;
|
|
109
|
+
readonly transactions: v.ArraySchema<v.StrictObjectSchema<{
|
|
110
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
111
|
+
readonly received_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
112
|
+
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
113
|
+
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
114
|
+
readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
|
|
115
|
+
readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
|
|
116
|
+
readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
|
|
117
|
+
readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
|
|
118
|
+
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
119
|
+
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
120
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
121
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
122
|
+
readonly transaction_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
123
|
+
}, undefined>, undefined>;
|
|
124
|
+
readonly fee: v.StrictObjectSchema<{
|
|
125
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
126
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
127
|
+
}, undefined>;
|
|
128
|
+
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
129
|
+
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.">]>;
|
|
130
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
131
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
132
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
133
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
134
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
135
|
+
}, undefined>, v.DescriptionAction<{
|
|
136
|
+
value: string;
|
|
137
|
+
editable: boolean;
|
|
138
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
139
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
140
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
141
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
142
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
143
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
144
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
145
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
146
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
147
|
+
readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
148
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
149
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
150
|
+
}, undefined>, v.DescriptionAction<{
|
|
151
|
+
type: "account_key";
|
|
152
|
+
accountKey: string;
|
|
153
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
154
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
155
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
156
|
+
}, undefined>, v.DescriptionAction<{
|
|
157
|
+
type: "account";
|
|
158
|
+
id: string;
|
|
159
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
160
|
+
type: "account_key";
|
|
161
|
+
accountKey: string;
|
|
162
|
+
} | {
|
|
163
|
+
type: "account";
|
|
164
|
+
id: string;
|
|
165
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
|
|
166
|
+
type: "account_key";
|
|
167
|
+
accountKey: string;
|
|
168
|
+
} | {
|
|
169
|
+
type: "account";
|
|
170
|
+
id: string;
|
|
171
|
+
} | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
|
|
172
|
+
readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
173
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
174
|
+
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
175
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
176
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
177
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
178
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
179
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
180
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
181
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
182
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
183
|
+
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
184
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
185
|
+
readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
186
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
187
|
+
readonly holder_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
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
189
|
+
editable: false;
|
|
190
|
+
type: "account_key";
|
|
191
|
+
accountKey: string;
|
|
192
|
+
} | {
|
|
193
|
+
editable: false;
|
|
194
|
+
type: "account";
|
|
195
|
+
id: string;
|
|
196
|
+
} | {
|
|
197
|
+
editable: false;
|
|
198
|
+
type: "external";
|
|
199
|
+
bank_id: string;
|
|
200
|
+
account_type: "checking" | "debit" | "savings";
|
|
201
|
+
account_id: string;
|
|
202
|
+
holder_id: string;
|
|
203
|
+
holder_name: string;
|
|
204
|
+
}, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
205
|
+
editable: false;
|
|
206
|
+
type: "account_key";
|
|
207
|
+
accountKey: string;
|
|
208
|
+
} | {
|
|
209
|
+
editable: false;
|
|
210
|
+
type: "account";
|
|
211
|
+
id: string;
|
|
212
|
+
} | {
|
|
213
|
+
editable: false;
|
|
214
|
+
type: "external";
|
|
215
|
+
bank_id: string;
|
|
216
|
+
account_type: "checking" | "debit" | "savings";
|
|
217
|
+
account_id: string;
|
|
218
|
+
holder_id: string;
|
|
219
|
+
holder_name: string;
|
|
220
|
+
} | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
|
|
221
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
222
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
223
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
224
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
225
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | 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.">]>;
|
|
226
|
+
}, undefined>, v.DescriptionAction<{
|
|
227
|
+
currency: "CLP";
|
|
228
|
+
value: string;
|
|
229
|
+
editable: boolean;
|
|
230
|
+
confirmed: string | null;
|
|
231
|
+
}, "The amount a transfer orders, as it is answered. `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.">]>;
|
|
232
|
+
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
233
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
234
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
235
|
+
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
236
|
+
}, undefined>, v.DescriptionAction<{
|
|
237
|
+
currency: "CLP";
|
|
238
|
+
value: string;
|
|
239
|
+
at: string;
|
|
240
|
+
}, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
|
|
241
|
+
readonly fee: v.StrictObjectSchema<{
|
|
242
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
243
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
244
|
+
}, undefined>;
|
|
245
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
|
|
246
|
+
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.">]>;
|
|
247
|
+
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.">]>;
|
|
248
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
249
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
250
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
251
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
252
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
253
|
+
}, undefined>, v.DescriptionAction<{
|
|
254
|
+
value: string;
|
|
255
|
+
editable: boolean;
|
|
256
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
257
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
258
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
259
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
260
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
261
|
+
}, undefined>, v.DescriptionAction<{
|
|
262
|
+
type: "transfer";
|
|
263
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
264
|
+
signed: boolean;
|
|
265
|
+
source: {
|
|
266
|
+
type: "account_key";
|
|
267
|
+
accountKey: string;
|
|
268
|
+
} | {
|
|
269
|
+
type: "account";
|
|
270
|
+
id: string;
|
|
271
|
+
} | null;
|
|
272
|
+
destination: {
|
|
273
|
+
editable: false;
|
|
274
|
+
type: "account_key";
|
|
275
|
+
accountKey: string;
|
|
276
|
+
} | {
|
|
277
|
+
editable: false;
|
|
278
|
+
type: "account";
|
|
279
|
+
id: string;
|
|
280
|
+
} | {
|
|
281
|
+
editable: false;
|
|
282
|
+
type: "external";
|
|
283
|
+
bank_id: string;
|
|
284
|
+
account_type: "checking" | "debit" | "savings";
|
|
285
|
+
account_id: string;
|
|
286
|
+
holder_id: string;
|
|
287
|
+
holder_name: string;
|
|
288
|
+
} | null;
|
|
289
|
+
amount: {
|
|
290
|
+
currency: "CLP";
|
|
291
|
+
value: string;
|
|
292
|
+
editable: boolean;
|
|
293
|
+
confirmed: string | null;
|
|
294
|
+
};
|
|
295
|
+
settled: {
|
|
296
|
+
currency: "CLP";
|
|
297
|
+
value: string;
|
|
298
|
+
at: string;
|
|
299
|
+
} | null;
|
|
300
|
+
fee: {
|
|
301
|
+
currency: "CLP";
|
|
302
|
+
amount: "0";
|
|
303
|
+
};
|
|
304
|
+
interaction_reason?: "bank_verification_required" | "source_account_required" | undefined;
|
|
305
|
+
expires_at: string | null;
|
|
306
|
+
expires_in_seconds: number | null;
|
|
307
|
+
id: string;
|
|
308
|
+
resource_server: string;
|
|
309
|
+
note?: {
|
|
310
|
+
value: string;
|
|
311
|
+
editable: boolean;
|
|
312
|
+
} | undefined;
|
|
313
|
+
metadata: {
|
|
314
|
+
[x: string]: unknown;
|
|
315
|
+
};
|
|
316
|
+
server_time: string;
|
|
317
|
+
created_at: string;
|
|
318
|
+
authorization_url: string;
|
|
319
|
+
}, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
320
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
321
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
322
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
323
|
+
readonly account: v.StrictObjectSchema<{
|
|
324
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
325
|
+
readonly name: v.StringSchema<undefined>;
|
|
326
|
+
readonly upsert: v.BooleanSchema<undefined>;
|
|
327
|
+
readonly bank_account_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
328
|
+
}, undefined>;
|
|
329
|
+
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.">]>;
|
|
330
|
+
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.">]>;
|
|
331
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
332
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
333
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
334
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
335
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
336
|
+
}, undefined>, v.DescriptionAction<{
|
|
337
|
+
value: string;
|
|
338
|
+
editable: boolean;
|
|
339
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
340
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
341
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
342
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
343
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
344
|
+
}, undefined>, v.DescriptionAction<{
|
|
345
|
+
type: "account_opening";
|
|
346
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
347
|
+
signed: boolean;
|
|
348
|
+
account: {
|
|
349
|
+
accountKey: string;
|
|
350
|
+
name: string;
|
|
351
|
+
upsert: boolean;
|
|
352
|
+
bank_account_id: string | null;
|
|
353
|
+
};
|
|
354
|
+
expires_at: string | null;
|
|
355
|
+
expires_in_seconds: number | null;
|
|
356
|
+
id: string;
|
|
357
|
+
resource_server: string;
|
|
358
|
+
note?: {
|
|
359
|
+
value: string;
|
|
360
|
+
editable: boolean;
|
|
361
|
+
} | undefined;
|
|
362
|
+
metadata: {
|
|
363
|
+
[x: string]: unknown;
|
|
364
|
+
};
|
|
365
|
+
server_time: string;
|
|
366
|
+
created_at: string;
|
|
367
|
+
authorization_url: string;
|
|
368
|
+
}, "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 the core 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<{
|
|
369
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
370
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
371
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
372
|
+
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
373
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
374
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
375
|
+
}, undefined>, v.DescriptionAction<{
|
|
376
|
+
type: "account_key";
|
|
377
|
+
accountKey: string;
|
|
378
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
379
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
380
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
381
|
+
}, undefined>, v.DescriptionAction<{
|
|
382
|
+
type: "account";
|
|
383
|
+
id: string;
|
|
384
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
385
|
+
type: "account_key";
|
|
386
|
+
accountKey: string;
|
|
387
|
+
} | {
|
|
388
|
+
type: "account";
|
|
389
|
+
id: string;
|
|
390
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
|
|
391
|
+
readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
|
|
392
|
+
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
393
|
+
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
|
|
394
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
395
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
396
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
397
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
398
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
399
|
+
}, undefined>, v.DescriptionAction<{
|
|
400
|
+
value: string;
|
|
401
|
+
editable: boolean;
|
|
402
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
403
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
404
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
405
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
406
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
407
|
+
}, undefined>, v.DescriptionAction<{
|
|
408
|
+
type: "account_closure";
|
|
409
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
410
|
+
signed: boolean;
|
|
411
|
+
account: {
|
|
412
|
+
type: "account_key";
|
|
413
|
+
accountKey: string;
|
|
414
|
+
} | {
|
|
415
|
+
type: "account";
|
|
416
|
+
id: string;
|
|
417
|
+
};
|
|
418
|
+
resolved_account_id: string | null;
|
|
419
|
+
expires_at: string;
|
|
420
|
+
expires_in_seconds: number;
|
|
421
|
+
id: string;
|
|
422
|
+
resource_server: string;
|
|
423
|
+
note?: {
|
|
424
|
+
value: string;
|
|
425
|
+
editable: boolean;
|
|
426
|
+
} | undefined;
|
|
427
|
+
metadata: {
|
|
428
|
+
[x: string]: unknown;
|
|
429
|
+
};
|
|
430
|
+
server_time: string;
|
|
431
|
+
created_at: string;
|
|
432
|
+
authorization_url: string;
|
|
433
|
+
}, "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("./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").IntentInteractionRequired, typeof import("./intents.js").AccountKeyTaken, typeof import("./intents.js").BankAccountQuotaExceeded, typeof import("./intents.js").InvalidIntentState, typeof import("./intents.js").IntentExpired, typeof import("./intents.js").TransferAmountRequired, typeof import("./intents.js").TransferDestinationRequired, 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]>>;
|
|
434
|
+
cancelIntent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
435
|
+
readonly params: v.ObjectSchema<{
|
|
436
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
437
|
+
}, undefined>;
|
|
438
|
+
readonly body: v.StrictObjectSchema<{
|
|
439
|
+
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
440
|
+
}, undefined>;
|
|
441
|
+
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
442
|
+
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
443
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "failed"], undefined>, v.DescriptionAction<"completed" | "closed" | "failed" | "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.">]>;
|
|
444
|
+
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
445
|
+
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
446
|
+
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
447
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
448
|
+
}, undefined>, undefined>;
|
|
449
|
+
readonly termination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
450
|
+
readonly status: v.StringSchema<undefined>;
|
|
451
|
+
readonly at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
452
|
+
readonly total: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
453
|
+
}, undefined>, undefined>, undefined>, v.DescriptionAction<{
|
|
454
|
+
status: string;
|
|
455
|
+
at: string | null;
|
|
456
|
+
total: string | null;
|
|
457
|
+
} | null | undefined, "First terminal state and total, unchanged by later attribution corrections. Legacy unknown totals remain null.">]>;
|
|
458
|
+
readonly completion: v.NullableSchema<v.ObjectSchema<{
|
|
459
|
+
readonly completed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
460
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
461
|
+
}, undefined>, undefined>;
|
|
462
|
+
readonly destination: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
463
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
464
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
465
|
+
readonly number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
466
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
467
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Null when the holder has no identity document on file.">]>;
|
|
468
|
+
readonly holder_name: v.StringSchema<undefined>;
|
|
469
|
+
}, undefined>, v.DescriptionAction<{
|
|
470
|
+
type: "account";
|
|
471
|
+
id: string;
|
|
472
|
+
number: string;
|
|
473
|
+
account_type: "checking" | "debit" | "savings";
|
|
474
|
+
holder_id: string | null;
|
|
475
|
+
holder_name: string;
|
|
476
|
+
}, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
|
|
477
|
+
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
478
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
479
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
480
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
481
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Explicitly confirmed target; `value` applies until confirmation.">]>;
|
|
482
|
+
readonly frozen_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "First funding confirmation or attribution freezes the target permanently.">]>;
|
|
483
|
+
}, undefined>, v.DescriptionAction<{
|
|
484
|
+
currency: "CLP";
|
|
485
|
+
value: string;
|
|
486
|
+
editable: boolean;
|
|
487
|
+
confirmed: string | null;
|
|
488
|
+
frozen_at: string | null;
|
|
489
|
+
}, "The amount a deposit asks for. `value` is the request's, `confirmed` the payer's own target when `editable`; what arrived is `progress.credited`, never these.">]>, undefined>;
|
|
490
|
+
readonly progress: v.StrictObjectSchema<{
|
|
491
|
+
readonly credited: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
492
|
+
readonly remaining: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
493
|
+
}, undefined>;
|
|
494
|
+
readonly transactions: v.ArraySchema<v.StrictObjectSchema<{
|
|
495
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
496
|
+
readonly received_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
497
|
+
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
498
|
+
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
499
|
+
readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
|
|
500
|
+
readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
|
|
501
|
+
readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
|
|
502
|
+
readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
|
|
503
|
+
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
504
|
+
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
505
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
506
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
507
|
+
readonly transaction_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
508
|
+
}, undefined>, undefined>;
|
|
509
|
+
readonly fee: v.StrictObjectSchema<{
|
|
510
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
511
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
512
|
+
}, undefined>;
|
|
513
|
+
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
514
|
+
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.">]>;
|
|
515
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
516
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
517
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
518
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
519
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
520
|
+
}, undefined>, v.DescriptionAction<{
|
|
521
|
+
value: string;
|
|
522
|
+
editable: boolean;
|
|
523
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
524
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
525
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
526
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
527
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
528
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
529
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
530
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
531
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
532
|
+
readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
533
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
534
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
535
|
+
}, undefined>, v.DescriptionAction<{
|
|
536
|
+
type: "account_key";
|
|
537
|
+
accountKey: string;
|
|
538
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
539
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
540
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
541
|
+
}, undefined>, v.DescriptionAction<{
|
|
542
|
+
type: "account";
|
|
543
|
+
id: string;
|
|
544
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
545
|
+
type: "account_key";
|
|
546
|
+
accountKey: string;
|
|
547
|
+
} | {
|
|
548
|
+
type: "account";
|
|
549
|
+
id: string;
|
|
550
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
|
|
551
|
+
type: "account_key";
|
|
552
|
+
accountKey: string;
|
|
553
|
+
} | {
|
|
554
|
+
type: "account";
|
|
555
|
+
id: string;
|
|
556
|
+
} | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
|
|
557
|
+
readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
558
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
559
|
+
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
560
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
561
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
562
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
563
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
564
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
565
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
566
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
567
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
568
|
+
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
569
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
570
|
+
readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
571
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
572
|
+
readonly holder_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`).">]>;
|
|
573
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
574
|
+
editable: false;
|
|
575
|
+
type: "account_key";
|
|
576
|
+
accountKey: string;
|
|
577
|
+
} | {
|
|
578
|
+
editable: false;
|
|
579
|
+
type: "account";
|
|
580
|
+
id: string;
|
|
581
|
+
} | {
|
|
582
|
+
editable: false;
|
|
583
|
+
type: "external";
|
|
584
|
+
bank_id: string;
|
|
585
|
+
account_type: "checking" | "debit" | "savings";
|
|
586
|
+
account_id: string;
|
|
587
|
+
holder_id: string;
|
|
588
|
+
holder_name: string;
|
|
589
|
+
}, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
590
|
+
editable: false;
|
|
591
|
+
type: "account_key";
|
|
592
|
+
accountKey: string;
|
|
593
|
+
} | {
|
|
594
|
+
editable: false;
|
|
595
|
+
type: "account";
|
|
596
|
+
id: string;
|
|
597
|
+
} | {
|
|
598
|
+
editable: false;
|
|
599
|
+
type: "external";
|
|
600
|
+
bank_id: string;
|
|
601
|
+
account_type: "checking" | "debit" | "savings";
|
|
602
|
+
account_id: string;
|
|
603
|
+
holder_id: string;
|
|
604
|
+
holder_name: string;
|
|
605
|
+
} | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
|
|
606
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
607
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
608
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
609
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
610
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | 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.">]>;
|
|
611
|
+
}, undefined>, v.DescriptionAction<{
|
|
612
|
+
currency: "CLP";
|
|
613
|
+
value: string;
|
|
614
|
+
editable: boolean;
|
|
615
|
+
confirmed: string | null;
|
|
616
|
+
}, "The amount a transfer orders, as it is answered. `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.">]>;
|
|
617
|
+
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
618
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
619
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
620
|
+
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
621
|
+
}, undefined>, v.DescriptionAction<{
|
|
622
|
+
currency: "CLP";
|
|
623
|
+
value: string;
|
|
624
|
+
at: string;
|
|
625
|
+
}, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
|
|
626
|
+
readonly fee: v.StrictObjectSchema<{
|
|
627
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
628
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
629
|
+
}, undefined>;
|
|
630
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
|
|
631
|
+
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.">]>;
|
|
632
|
+
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.">]>;
|
|
633
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
634
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
635
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
636
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
637
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
638
|
+
}, undefined>, v.DescriptionAction<{
|
|
639
|
+
value: string;
|
|
640
|
+
editable: boolean;
|
|
641
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
642
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
643
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
644
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
645
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
646
|
+
}, undefined>, v.DescriptionAction<{
|
|
647
|
+
type: "transfer";
|
|
648
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
649
|
+
signed: boolean;
|
|
650
|
+
source: {
|
|
651
|
+
type: "account_key";
|
|
652
|
+
accountKey: string;
|
|
653
|
+
} | {
|
|
654
|
+
type: "account";
|
|
655
|
+
id: string;
|
|
656
|
+
} | null;
|
|
657
|
+
destination: {
|
|
658
|
+
editable: false;
|
|
659
|
+
type: "account_key";
|
|
660
|
+
accountKey: string;
|
|
661
|
+
} | {
|
|
662
|
+
editable: false;
|
|
663
|
+
type: "account";
|
|
664
|
+
id: string;
|
|
665
|
+
} | {
|
|
666
|
+
editable: false;
|
|
667
|
+
type: "external";
|
|
668
|
+
bank_id: string;
|
|
669
|
+
account_type: "checking" | "debit" | "savings";
|
|
670
|
+
account_id: string;
|
|
671
|
+
holder_id: string;
|
|
672
|
+
holder_name: string;
|
|
673
|
+
} | null;
|
|
674
|
+
amount: {
|
|
675
|
+
currency: "CLP";
|
|
676
|
+
value: string;
|
|
677
|
+
editable: boolean;
|
|
678
|
+
confirmed: string | null;
|
|
679
|
+
};
|
|
680
|
+
settled: {
|
|
681
|
+
currency: "CLP";
|
|
682
|
+
value: string;
|
|
683
|
+
at: string;
|
|
684
|
+
} | null;
|
|
685
|
+
fee: {
|
|
686
|
+
currency: "CLP";
|
|
687
|
+
amount: "0";
|
|
688
|
+
};
|
|
689
|
+
interaction_reason?: "bank_verification_required" | "source_account_required" | undefined;
|
|
690
|
+
expires_at: string | null;
|
|
691
|
+
expires_in_seconds: number | null;
|
|
692
|
+
id: string;
|
|
693
|
+
resource_server: string;
|
|
694
|
+
note?: {
|
|
695
|
+
value: string;
|
|
696
|
+
editable: boolean;
|
|
697
|
+
} | undefined;
|
|
698
|
+
metadata: {
|
|
699
|
+
[x: string]: unknown;
|
|
700
|
+
};
|
|
701
|
+
server_time: string;
|
|
702
|
+
created_at: string;
|
|
703
|
+
authorization_url: string;
|
|
704
|
+
}, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
705
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
706
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
707
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
708
|
+
readonly account: v.StrictObjectSchema<{
|
|
709
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
710
|
+
readonly name: v.StringSchema<undefined>;
|
|
711
|
+
readonly upsert: v.BooleanSchema<undefined>;
|
|
712
|
+
readonly bank_account_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
713
|
+
}, undefined>;
|
|
714
|
+
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.">]>;
|
|
715
|
+
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.">]>;
|
|
716
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
717
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
718
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
719
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
720
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
721
|
+
}, undefined>, v.DescriptionAction<{
|
|
722
|
+
value: string;
|
|
723
|
+
editable: boolean;
|
|
724
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
725
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
726
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
727
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
728
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
729
|
+
}, undefined>, v.DescriptionAction<{
|
|
730
|
+
type: "account_opening";
|
|
731
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
732
|
+
signed: boolean;
|
|
733
|
+
account: {
|
|
734
|
+
accountKey: string;
|
|
735
|
+
name: string;
|
|
736
|
+
upsert: boolean;
|
|
737
|
+
bank_account_id: string | null;
|
|
738
|
+
};
|
|
739
|
+
expires_at: string | null;
|
|
740
|
+
expires_in_seconds: number | null;
|
|
741
|
+
id: string;
|
|
742
|
+
resource_server: string;
|
|
743
|
+
note?: {
|
|
744
|
+
value: string;
|
|
745
|
+
editable: boolean;
|
|
746
|
+
} | undefined;
|
|
747
|
+
metadata: {
|
|
748
|
+
[x: string]: unknown;
|
|
749
|
+
};
|
|
750
|
+
server_time: string;
|
|
751
|
+
created_at: string;
|
|
752
|
+
authorization_url: string;
|
|
753
|
+
}, "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 the core 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<{
|
|
754
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
755
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
756
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
757
|
+
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
758
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
759
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
760
|
+
}, undefined>, v.DescriptionAction<{
|
|
761
|
+
type: "account_key";
|
|
762
|
+
accountKey: string;
|
|
763
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
764
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
765
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
766
|
+
}, undefined>, v.DescriptionAction<{
|
|
767
|
+
type: "account";
|
|
768
|
+
id: string;
|
|
769
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
770
|
+
type: "account_key";
|
|
771
|
+
accountKey: string;
|
|
772
|
+
} | {
|
|
773
|
+
type: "account";
|
|
774
|
+
id: string;
|
|
775
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
|
|
776
|
+
readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
|
|
777
|
+
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
778
|
+
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
|
|
779
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
780
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
781
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
782
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
783
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
784
|
+
}, undefined>, v.DescriptionAction<{
|
|
785
|
+
value: string;
|
|
786
|
+
editable: boolean;
|
|
787
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
788
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
789
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
790
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
791
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
792
|
+
}, undefined>, v.DescriptionAction<{
|
|
793
|
+
type: "account_closure";
|
|
794
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
795
|
+
signed: boolean;
|
|
796
|
+
account: {
|
|
797
|
+
type: "account_key";
|
|
798
|
+
accountKey: string;
|
|
799
|
+
} | {
|
|
800
|
+
type: "account";
|
|
801
|
+
id: string;
|
|
802
|
+
};
|
|
803
|
+
resolved_account_id: string | null;
|
|
804
|
+
expires_at: string;
|
|
805
|
+
expires_in_seconds: number;
|
|
806
|
+
id: string;
|
|
807
|
+
resource_server: string;
|
|
808
|
+
note?: {
|
|
809
|
+
value: string;
|
|
810
|
+
editable: boolean;
|
|
811
|
+
} | undefined;
|
|
812
|
+
metadata: {
|
|
813
|
+
[x: string]: unknown;
|
|
814
|
+
};
|
|
815
|
+
server_time: string;
|
|
816
|
+
created_at: string;
|
|
817
|
+
authorization_url: string;
|
|
818
|
+
}, "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("./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("./intents.js").InvalidIntentState, typeof import("./intents.js").IntentExpired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
819
|
+
closeDeposit: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
820
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
821
|
+
}, undefined>, v.ObjectSchema<{
|
|
822
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
823
|
+
readonly status: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Existing terminal outcome is preserved, including expired.">]>;
|
|
824
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
825
|
+
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
826
|
+
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
827
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
828
|
+
}, undefined>, undefined>;
|
|
829
|
+
}, 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]>>;
|
|
830
|
+
createIntent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
831
|
+
readonly headers: v.ObjectSchema<{
|
|
832
|
+
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 answers `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.">]>;
|
|
833
|
+
}, undefined>;
|
|
834
|
+
readonly body: v.UnionSchema<[v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
835
|
+
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
836
|
+
readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
837
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
838
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
839
|
+
}, undefined>, v.DescriptionAction<{
|
|
840
|
+
type: "account_key";
|
|
841
|
+
accountKey: string;
|
|
842
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
843
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
844
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
845
|
+
}, undefined>, v.DescriptionAction<{
|
|
846
|
+
type: "account";
|
|
847
|
+
id: string;
|
|
848
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
849
|
+
type: "account_key";
|
|
850
|
+
accountKey: string;
|
|
851
|
+
} | {
|
|
852
|
+
type: "account";
|
|
853
|
+
id: string;
|
|
854
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
|
|
855
|
+
type: "account_key";
|
|
856
|
+
accountKey: string;
|
|
857
|
+
} | {
|
|
858
|
+
type: "account";
|
|
859
|
+
id: string;
|
|
860
|
+
} | undefined, "The account of the Grant's subject the money lands on. Omitted, the Grant's `bank_deposit` destinations must admit exactly one active account, or the request fails with `deposit_destination_ambiguous`; named, it must be one of them, or the request fails with `invalid_destination`.">]>;
|
|
861
|
+
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
862
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
863
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
864
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
865
|
+
}, undefined>, v.DescriptionAction<{
|
|
866
|
+
currency: "CLP";
|
|
867
|
+
value: string;
|
|
868
|
+
editable: boolean;
|
|
869
|
+
}, "The amount a deposit asks for. `editable: true` lets the payer change it on the screen. It is never what moved: a deposit answers that in `progress.credited`.">]>, undefined>;
|
|
870
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
871
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
872
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
873
|
+
}, undefined>, v.DescriptionAction<{
|
|
874
|
+
value: string;
|
|
875
|
+
editable: boolean;
|
|
876
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
877
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
878
|
+
} & {
|
|
879
|
+
readonly expires_in: v.StringSchema<undefined>;
|
|
880
|
+
readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
881
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
882
|
+
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
883
|
+
readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
884
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
885
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
886
|
+
}, undefined>, v.DescriptionAction<{
|
|
887
|
+
type: "account_key";
|
|
888
|
+
accountKey: string;
|
|
889
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
890
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
891
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
892
|
+
}, undefined>, v.DescriptionAction<{
|
|
893
|
+
type: "account";
|
|
894
|
+
id: string;
|
|
895
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
896
|
+
type: "account_key";
|
|
897
|
+
accountKey: string;
|
|
898
|
+
} | {
|
|
899
|
+
type: "account";
|
|
900
|
+
id: string;
|
|
901
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
|
|
902
|
+
type: "account_key";
|
|
903
|
+
accountKey: string;
|
|
904
|
+
} | {
|
|
905
|
+
type: "account";
|
|
906
|
+
id: string;
|
|
907
|
+
} | undefined, "The account of the Grant's subject the money lands on. Omitted, the Grant's `bank_deposit` destinations must admit exactly one active account, or the request fails with `deposit_destination_ambiguous`; named, it must be one of them, or the request fails with `invalid_destination`.">]>;
|
|
908
|
+
readonly amount: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
909
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
910
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
911
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
912
|
+
}, undefined>, v.DescriptionAction<{
|
|
913
|
+
currency: "CLP";
|
|
914
|
+
value: string;
|
|
915
|
+
editable: boolean;
|
|
916
|
+
}, "The amount a deposit asks for. `editable: true` lets the payer change it on the screen. It is never what moved: a deposit answers that in `progress.credited`.">]>, undefined>;
|
|
917
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
918
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
919
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
920
|
+
}, undefined>, v.DescriptionAction<{
|
|
921
|
+
value: string;
|
|
922
|
+
editable: boolean;
|
|
923
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
924
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
925
|
+
} & {
|
|
926
|
+
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
927
|
+
readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
928
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
929
|
+
type: "deposit";
|
|
930
|
+
destination?: {
|
|
931
|
+
type: "account_key";
|
|
932
|
+
accountKey: string;
|
|
933
|
+
} | {
|
|
934
|
+
type: "account";
|
|
935
|
+
id: string;
|
|
936
|
+
} | undefined;
|
|
937
|
+
amount?: {
|
|
938
|
+
currency: "CLP";
|
|
939
|
+
value: string;
|
|
940
|
+
editable: boolean;
|
|
941
|
+
} | undefined;
|
|
942
|
+
note?: {
|
|
943
|
+
value: string;
|
|
944
|
+
editable: boolean;
|
|
945
|
+
} | undefined;
|
|
946
|
+
metadata: {
|
|
947
|
+
[x: string]: unknown;
|
|
948
|
+
};
|
|
949
|
+
expires_in: string;
|
|
950
|
+
expires_at?: undefined;
|
|
951
|
+
} | {
|
|
952
|
+
type: "deposit";
|
|
953
|
+
destination?: {
|
|
954
|
+
type: "account_key";
|
|
955
|
+
accountKey: string;
|
|
956
|
+
} | {
|
|
957
|
+
type: "account";
|
|
958
|
+
id: string;
|
|
959
|
+
} | undefined;
|
|
960
|
+
amount?: {
|
|
961
|
+
currency: "CLP";
|
|
962
|
+
value: string;
|
|
963
|
+
editable: boolean;
|
|
964
|
+
} | undefined;
|
|
965
|
+
note?: {
|
|
966
|
+
value: string;
|
|
967
|
+
editable: boolean;
|
|
968
|
+
} | undefined;
|
|
969
|
+
metadata: {
|
|
970
|
+
[x: string]: unknown;
|
|
971
|
+
};
|
|
972
|
+
expires_in?: undefined;
|
|
973
|
+
expires_at: string | null;
|
|
974
|
+
}, "The `application/json` half of collecting money into an account of the Grant's subject: an Intent born waiting for a payer. Exactly one of `expires_in` and `expires_at`; `expires_at: null` (never expires) only when `amount` is omitted.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
975
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
976
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
977
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
978
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
979
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
980
|
+
}, undefined>, v.DescriptionAction<{
|
|
981
|
+
currency: "CLP";
|
|
982
|
+
value: string;
|
|
983
|
+
editable: boolean;
|
|
984
|
+
}, "The amount a transfer proposes. `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 available balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
|
|
985
|
+
readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
986
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
987
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
988
|
+
}, undefined>, v.DescriptionAction<{
|
|
989
|
+
type: "account_key";
|
|
990
|
+
accountKey: string;
|
|
991
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
992
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
993
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
994
|
+
}, undefined>, v.DescriptionAction<{
|
|
995
|
+
type: "account";
|
|
996
|
+
id: string;
|
|
997
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
998
|
+
type: "account_key";
|
|
999
|
+
accountKey: string;
|
|
1000
|
+
} | {
|
|
1001
|
+
type: "account";
|
|
1002
|
+
id: string;
|
|
1003
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
|
|
1004
|
+
type: "account_key";
|
|
1005
|
+
accountKey: string;
|
|
1006
|
+
} | {
|
|
1007
|
+
type: "account";
|
|
1008
|
+
id: string;
|
|
1009
|
+
} | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
|
|
1010
|
+
readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1011
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1012
|
+
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
1013
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1014
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1015
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1016
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1017
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1018
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1019
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1020
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1021
|
+
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1022
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
1023
|
+
readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1024
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1025
|
+
readonly holder_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`).">]>;
|
|
1026
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1027
|
+
editable: false;
|
|
1028
|
+
type: "account_key";
|
|
1029
|
+
accountKey: string;
|
|
1030
|
+
} | {
|
|
1031
|
+
editable: false;
|
|
1032
|
+
type: "account";
|
|
1033
|
+
id: string;
|
|
1034
|
+
} | {
|
|
1035
|
+
editable: false;
|
|
1036
|
+
type: "external";
|
|
1037
|
+
bank_id: string;
|
|
1038
|
+
account_type: "checking" | "debit" | "savings";
|
|
1039
|
+
account_id: string;
|
|
1040
|
+
holder_id: string;
|
|
1041
|
+
holder_name: string;
|
|
1042
|
+
}, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
|
|
1043
|
+
editable: false;
|
|
1044
|
+
type: "account_key";
|
|
1045
|
+
accountKey: string;
|
|
1046
|
+
} | {
|
|
1047
|
+
editable: false;
|
|
1048
|
+
type: "account";
|
|
1049
|
+
id: string;
|
|
1050
|
+
} | {
|
|
1051
|
+
editable: false;
|
|
1052
|
+
type: "external";
|
|
1053
|
+
bank_id: string;
|
|
1054
|
+
account_type: "checking" | "debit" | "savings";
|
|
1055
|
+
account_id: string;
|
|
1056
|
+
holder_id: string;
|
|
1057
|
+
holder_name: string;
|
|
1058
|
+
} | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
|
|
1059
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1060
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1061
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1062
|
+
}, undefined>, v.DescriptionAction<{
|
|
1063
|
+
value: string;
|
|
1064
|
+
editable: boolean;
|
|
1065
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1066
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1067
|
+
} & {
|
|
1068
|
+
readonly expires_in: v.StringSchema<undefined>;
|
|
1069
|
+
readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1070
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1071
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1072
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1073
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1074
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1075
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1076
|
+
}, undefined>, v.DescriptionAction<{
|
|
1077
|
+
currency: "CLP";
|
|
1078
|
+
value: string;
|
|
1079
|
+
editable: boolean;
|
|
1080
|
+
}, "The amount a transfer proposes. `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 available balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
|
|
1081
|
+
readonly source: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1082
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
1083
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1084
|
+
}, undefined>, v.DescriptionAction<{
|
|
1085
|
+
type: "account_key";
|
|
1086
|
+
accountKey: string;
|
|
1087
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1088
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
1089
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1090
|
+
}, undefined>, v.DescriptionAction<{
|
|
1091
|
+
type: "account";
|
|
1092
|
+
id: string;
|
|
1093
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1094
|
+
type: "account_key";
|
|
1095
|
+
accountKey: string;
|
|
1096
|
+
} | {
|
|
1097
|
+
type: "account";
|
|
1098
|
+
id: string;
|
|
1099
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, null>, v.DescriptionAction<{
|
|
1100
|
+
type: "account_key";
|
|
1101
|
+
accountKey: string;
|
|
1102
|
+
} | {
|
|
1103
|
+
type: "account";
|
|
1104
|
+
id: string;
|
|
1105
|
+
} | null, "The Andco account the money leaves. Null leaves that choice to a person on a screen.">]>;
|
|
1106
|
+
readonly destination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1107
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1108
|
+
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
1109
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1110
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1111
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1112
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1113
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1114
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1115
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1116
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1117
|
+
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1118
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
1119
|
+
readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1120
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1121
|
+
readonly holder_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`).">]>;
|
|
1122
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1123
|
+
editable: false;
|
|
1124
|
+
type: "account_key";
|
|
1125
|
+
accountKey: string;
|
|
1126
|
+
} | {
|
|
1127
|
+
editable: false;
|
|
1128
|
+
type: "account";
|
|
1129
|
+
id: string;
|
|
1130
|
+
} | {
|
|
1131
|
+
editable: false;
|
|
1132
|
+
type: "external";
|
|
1133
|
+
bank_id: string;
|
|
1134
|
+
account_type: "checking" | "debit" | "savings";
|
|
1135
|
+
account_id: string;
|
|
1136
|
+
holder_id: string;
|
|
1137
|
+
holder_name: string;
|
|
1138
|
+
}, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
|
|
1139
|
+
editable: false;
|
|
1140
|
+
type: "account_key";
|
|
1141
|
+
accountKey: string;
|
|
1142
|
+
} | {
|
|
1143
|
+
editable: false;
|
|
1144
|
+
type: "account";
|
|
1145
|
+
id: string;
|
|
1146
|
+
} | {
|
|
1147
|
+
editable: false;
|
|
1148
|
+
type: "external";
|
|
1149
|
+
bank_id: string;
|
|
1150
|
+
account_type: "checking" | "debit" | "savings";
|
|
1151
|
+
account_id: string;
|
|
1152
|
+
holder_id: string;
|
|
1153
|
+
holder_name: string;
|
|
1154
|
+
} | null, "Where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
|
|
1155
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1156
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1157
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1158
|
+
}, undefined>, v.DescriptionAction<{
|
|
1159
|
+
value: string;
|
|
1160
|
+
editable: boolean;
|
|
1161
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1162
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1163
|
+
} & {
|
|
1164
|
+
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1165
|
+
readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1166
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1167
|
+
type: "transfer";
|
|
1168
|
+
amount: {
|
|
1169
|
+
currency: "CLP";
|
|
1170
|
+
value: string;
|
|
1171
|
+
editable: boolean;
|
|
1172
|
+
};
|
|
1173
|
+
source: {
|
|
1174
|
+
type: "account_key";
|
|
1175
|
+
accountKey: string;
|
|
1176
|
+
} | {
|
|
1177
|
+
type: "account";
|
|
1178
|
+
id: string;
|
|
1179
|
+
} | null;
|
|
1180
|
+
destination: {
|
|
1181
|
+
editable: false;
|
|
1182
|
+
type: "account_key";
|
|
1183
|
+
accountKey: string;
|
|
1184
|
+
} | {
|
|
1185
|
+
editable: false;
|
|
1186
|
+
type: "account";
|
|
1187
|
+
id: string;
|
|
1188
|
+
} | {
|
|
1189
|
+
editable: false;
|
|
1190
|
+
type: "external";
|
|
1191
|
+
bank_id: string;
|
|
1192
|
+
account_type: "checking" | "debit" | "savings";
|
|
1193
|
+
account_id: string;
|
|
1194
|
+
holder_id: string;
|
|
1195
|
+
holder_name: string;
|
|
1196
|
+
} | null;
|
|
1197
|
+
note?: {
|
|
1198
|
+
value: string;
|
|
1199
|
+
editable: boolean;
|
|
1200
|
+
} | undefined;
|
|
1201
|
+
metadata: {
|
|
1202
|
+
[x: string]: unknown;
|
|
1203
|
+
};
|
|
1204
|
+
expires_in: string;
|
|
1205
|
+
expires_at?: undefined;
|
|
1206
|
+
} | {
|
|
1207
|
+
type: "transfer";
|
|
1208
|
+
amount: {
|
|
1209
|
+
currency: "CLP";
|
|
1210
|
+
value: string;
|
|
1211
|
+
editable: boolean;
|
|
1212
|
+
};
|
|
1213
|
+
source: {
|
|
1214
|
+
type: "account_key";
|
|
1215
|
+
accountKey: string;
|
|
1216
|
+
} | {
|
|
1217
|
+
type: "account";
|
|
1218
|
+
id: string;
|
|
1219
|
+
} | null;
|
|
1220
|
+
destination: {
|
|
1221
|
+
editable: false;
|
|
1222
|
+
type: "account_key";
|
|
1223
|
+
accountKey: string;
|
|
1224
|
+
} | {
|
|
1225
|
+
editable: false;
|
|
1226
|
+
type: "account";
|
|
1227
|
+
id: string;
|
|
1228
|
+
} | {
|
|
1229
|
+
editable: false;
|
|
1230
|
+
type: "external";
|
|
1231
|
+
bank_id: string;
|
|
1232
|
+
account_type: "checking" | "debit" | "savings";
|
|
1233
|
+
account_id: string;
|
|
1234
|
+
holder_id: string;
|
|
1235
|
+
holder_name: string;
|
|
1236
|
+
} | null;
|
|
1237
|
+
note?: {
|
|
1238
|
+
value: string;
|
|
1239
|
+
editable: boolean;
|
|
1240
|
+
} | undefined;
|
|
1241
|
+
metadata: {
|
|
1242
|
+
[x: string]: unknown;
|
|
1243
|
+
};
|
|
1244
|
+
expires_in?: undefined;
|
|
1245
|
+
expires_at: string | null;
|
|
1246
|
+
}, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval. A null `source` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `destination` 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 destination 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. The `application/jwt` half is `SignedTransferIntentClaims`, and the two are separate schemas rather than one with optional fields on purpose: when signed and unsigned members share an object, something eventually reads the wrong ones.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
1247
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
1248
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1249
|
+
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.">]>;
|
|
1250
|
+
readonly upsert: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Whether naming an AccountKey that already exists answers with that account instead of failing. It defaults to false, so one name never quietly becomes two accounts.">]>;
|
|
1251
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1252
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1253
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1254
|
+
}, undefined>, v.DescriptionAction<{
|
|
1255
|
+
value: string;
|
|
1256
|
+
editable: boolean;
|
|
1257
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1258
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1259
|
+
} & {
|
|
1260
|
+
readonly expires_in: v.StringSchema<undefined>;
|
|
1261
|
+
readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1262
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1263
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
1264
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1265
|
+
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.">]>;
|
|
1266
|
+
readonly upsert: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Whether naming an AccountKey that already exists answers with that account instead of failing. It defaults to false, so one name never quietly becomes two accounts.">]>;
|
|
1267
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1268
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1269
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1270
|
+
}, undefined>, v.DescriptionAction<{
|
|
1271
|
+
value: string;
|
|
1272
|
+
editable: boolean;
|
|
1273
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1274
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1275
|
+
} & {
|
|
1276
|
+
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1277
|
+
readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1278
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1279
|
+
type: "account_opening";
|
|
1280
|
+
accountKey: string;
|
|
1281
|
+
name?: string | undefined;
|
|
1282
|
+
upsert: boolean;
|
|
1283
|
+
note?: {
|
|
1284
|
+
value: string;
|
|
1285
|
+
editable: boolean;
|
|
1286
|
+
} | undefined;
|
|
1287
|
+
metadata: {
|
|
1288
|
+
[x: string]: unknown;
|
|
1289
|
+
};
|
|
1290
|
+
expires_in: string;
|
|
1291
|
+
expires_at?: undefined;
|
|
1292
|
+
} | {
|
|
1293
|
+
type: "account_opening";
|
|
1294
|
+
accountKey: string;
|
|
1295
|
+
name?: string | undefined;
|
|
1296
|
+
upsert: boolean;
|
|
1297
|
+
note?: {
|
|
1298
|
+
value: string;
|
|
1299
|
+
editable: boolean;
|
|
1300
|
+
} | undefined;
|
|
1301
|
+
metadata: {
|
|
1302
|
+
[x: string]: unknown;
|
|
1303
|
+
};
|
|
1304
|
+
expires_in?: undefined;
|
|
1305
|
+
expires_at: string | null;
|
|
1306
|
+
}, "The `application/json` half of opening a Cuenta Vista: an Intent born waiting for an Approval. `/accounts` has no `POST` because everything with banking consequence happens through an Intent, and an opening carries no amount, no source and no destination -- only the name the account will answer to. Opening is asynchronous: the answer is the Intent and its status, and the Número de Cuenta arrives on the account's event stream.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
1307
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
1308
|
+
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1309
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
1310
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1311
|
+
}, undefined>, v.DescriptionAction<{
|
|
1312
|
+
type: "account_key";
|
|
1313
|
+
accountKey: string;
|
|
1314
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1315
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
1316
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1317
|
+
}, undefined>, v.DescriptionAction<{
|
|
1318
|
+
type: "account";
|
|
1319
|
+
id: string;
|
|
1320
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1321
|
+
type: "account_key";
|
|
1322
|
+
accountKey: string;
|
|
1323
|
+
} | {
|
|
1324
|
+
type: "account";
|
|
1325
|
+
id: string;
|
|
1326
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
|
|
1327
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1328
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1329
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1330
|
+
}, undefined>, v.DescriptionAction<{
|
|
1331
|
+
value: string;
|
|
1332
|
+
editable: boolean;
|
|
1333
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1334
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1335
|
+
} & {
|
|
1336
|
+
readonly expires_in: v.StringSchema<undefined>;
|
|
1337
|
+
readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1338
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1339
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
1340
|
+
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1341
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
1342
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1343
|
+
}, undefined>, v.DescriptionAction<{
|
|
1344
|
+
type: "account_key";
|
|
1345
|
+
accountKey: string;
|
|
1346
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1347
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
1348
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1349
|
+
}, undefined>, v.DescriptionAction<{
|
|
1350
|
+
type: "account";
|
|
1351
|
+
id: string;
|
|
1352
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1353
|
+
type: "account_key";
|
|
1354
|
+
accountKey: string;
|
|
1355
|
+
} | {
|
|
1356
|
+
type: "account";
|
|
1357
|
+
id: string;
|
|
1358
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
|
|
1359
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1360
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1361
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1362
|
+
}, undefined>, v.DescriptionAction<{
|
|
1363
|
+
value: string;
|
|
1364
|
+
editable: boolean;
|
|
1365
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1366
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1367
|
+
} & {
|
|
1368
|
+
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1369
|
+
readonly expires_at: v.StringSchema<undefined>;
|
|
1370
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1371
|
+
type: "account_closure";
|
|
1372
|
+
account: {
|
|
1373
|
+
type: "account_key";
|
|
1374
|
+
accountKey: string;
|
|
1375
|
+
} | {
|
|
1376
|
+
type: "account";
|
|
1377
|
+
id: string;
|
|
1378
|
+
};
|
|
1379
|
+
note?: {
|
|
1380
|
+
value: string;
|
|
1381
|
+
editable: boolean;
|
|
1382
|
+
} | undefined;
|
|
1383
|
+
metadata: {
|
|
1384
|
+
[x: string]: unknown;
|
|
1385
|
+
};
|
|
1386
|
+
expires_in: string;
|
|
1387
|
+
expires_at?: undefined;
|
|
1388
|
+
} | {
|
|
1389
|
+
type: "account_closure";
|
|
1390
|
+
account: {
|
|
1391
|
+
type: "account_key";
|
|
1392
|
+
accountKey: string;
|
|
1393
|
+
} | {
|
|
1394
|
+
type: "account";
|
|
1395
|
+
id: string;
|
|
1396
|
+
};
|
|
1397
|
+
note?: {
|
|
1398
|
+
value: string;
|
|
1399
|
+
editable: boolean;
|
|
1400
|
+
} | undefined;
|
|
1401
|
+
metadata: {
|
|
1402
|
+
[x: string]: unknown;
|
|
1403
|
+
};
|
|
1404
|
+
expires_in?: undefined;
|
|
1405
|
+
expires_at: string;
|
|
1406
|
+
}, "The `application/json` half of closing a Cuenta Vista: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything with banking consequence 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>>]>], undefined>;
|
|
1407
|
+
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1408
|
+
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
1409
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "failed"], undefined>, v.DescriptionAction<"completed" | "closed" | "failed" | "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.">]>;
|
|
1410
|
+
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1411
|
+
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
1412
|
+
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1413
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1414
|
+
}, undefined>, undefined>;
|
|
1415
|
+
readonly termination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1416
|
+
readonly status: v.StringSchema<undefined>;
|
|
1417
|
+
readonly at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1418
|
+
readonly total: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1419
|
+
}, undefined>, undefined>, undefined>, v.DescriptionAction<{
|
|
1420
|
+
status: string;
|
|
1421
|
+
at: string | null;
|
|
1422
|
+
total: string | null;
|
|
1423
|
+
} | null | undefined, "First terminal state and total, unchanged by later attribution corrections. Legacy unknown totals remain null.">]>;
|
|
1424
|
+
readonly completion: v.NullableSchema<v.ObjectSchema<{
|
|
1425
|
+
readonly completed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1426
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1427
|
+
}, undefined>, undefined>;
|
|
1428
|
+
readonly destination: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1429
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1430
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1431
|
+
readonly number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1432
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
1433
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Null when the holder has no identity document on file.">]>;
|
|
1434
|
+
readonly holder_name: v.StringSchema<undefined>;
|
|
1435
|
+
}, undefined>, v.DescriptionAction<{
|
|
1436
|
+
type: "account";
|
|
1437
|
+
id: string;
|
|
1438
|
+
number: string;
|
|
1439
|
+
account_type: "checking" | "debit" | "savings";
|
|
1440
|
+
holder_id: string | null;
|
|
1441
|
+
holder_name: string;
|
|
1442
|
+
}, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
|
|
1443
|
+
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1444
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1445
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
1446
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
1447
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Explicitly confirmed target; `value` applies until confirmation.">]>;
|
|
1448
|
+
readonly frozen_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "First funding confirmation or attribution freezes the target permanently.">]>;
|
|
1449
|
+
}, undefined>, v.DescriptionAction<{
|
|
1450
|
+
currency: "CLP";
|
|
1451
|
+
value: string;
|
|
1452
|
+
editable: boolean;
|
|
1453
|
+
confirmed: string | null;
|
|
1454
|
+
frozen_at: string | null;
|
|
1455
|
+
}, "The amount a deposit asks for. `value` is the request's, `confirmed` the payer's own target when `editable`; what arrived is `progress.credited`, never these.">]>, undefined>;
|
|
1456
|
+
readonly progress: v.StrictObjectSchema<{
|
|
1457
|
+
readonly credited: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1458
|
+
readonly remaining: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1459
|
+
}, undefined>;
|
|
1460
|
+
readonly transactions: v.ArraySchema<v.StrictObjectSchema<{
|
|
1461
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1462
|
+
readonly received_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1463
|
+
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1464
|
+
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
1465
|
+
readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
|
|
1466
|
+
readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
|
|
1467
|
+
readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
|
|
1468
|
+
readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
|
|
1469
|
+
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
1470
|
+
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
1471
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1472
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1473
|
+
readonly transaction_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
1474
|
+
}, undefined>, undefined>;
|
|
1475
|
+
readonly fee: v.StrictObjectSchema<{
|
|
1476
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1477
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
1478
|
+
}, undefined>;
|
|
1479
|
+
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1480
|
+
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.">]>;
|
|
1481
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1482
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1483
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1484
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1485
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1486
|
+
}, undefined>, v.DescriptionAction<{
|
|
1487
|
+
value: string;
|
|
1488
|
+
editable: boolean;
|
|
1489
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1490
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1491
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1492
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1493
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1494
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1495
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1496
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
1497
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
1498
|
+
readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1499
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
1500
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1501
|
+
}, undefined>, v.DescriptionAction<{
|
|
1502
|
+
type: "account_key";
|
|
1503
|
+
accountKey: string;
|
|
1504
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1505
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
1506
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1507
|
+
}, undefined>, v.DescriptionAction<{
|
|
1508
|
+
type: "account";
|
|
1509
|
+
id: string;
|
|
1510
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1511
|
+
type: "account_key";
|
|
1512
|
+
accountKey: string;
|
|
1513
|
+
} | {
|
|
1514
|
+
type: "account";
|
|
1515
|
+
id: string;
|
|
1516
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
|
|
1517
|
+
type: "account_key";
|
|
1518
|
+
accountKey: string;
|
|
1519
|
+
} | {
|
|
1520
|
+
type: "account";
|
|
1521
|
+
id: string;
|
|
1522
|
+
} | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
|
|
1523
|
+
readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1524
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1525
|
+
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
1526
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1527
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1528
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1529
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1530
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1531
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1532
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1533
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1534
|
+
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1535
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
1536
|
+
readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1537
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1538
|
+
readonly holder_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`).">]>;
|
|
1539
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1540
|
+
editable: false;
|
|
1541
|
+
type: "account_key";
|
|
1542
|
+
accountKey: string;
|
|
1543
|
+
} | {
|
|
1544
|
+
editable: false;
|
|
1545
|
+
type: "account";
|
|
1546
|
+
id: string;
|
|
1547
|
+
} | {
|
|
1548
|
+
editable: false;
|
|
1549
|
+
type: "external";
|
|
1550
|
+
bank_id: string;
|
|
1551
|
+
account_type: "checking" | "debit" | "savings";
|
|
1552
|
+
account_id: string;
|
|
1553
|
+
holder_id: string;
|
|
1554
|
+
holder_name: string;
|
|
1555
|
+
}, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
1556
|
+
editable: false;
|
|
1557
|
+
type: "account_key";
|
|
1558
|
+
accountKey: string;
|
|
1559
|
+
} | {
|
|
1560
|
+
editable: false;
|
|
1561
|
+
type: "account";
|
|
1562
|
+
id: string;
|
|
1563
|
+
} | {
|
|
1564
|
+
editable: false;
|
|
1565
|
+
type: "external";
|
|
1566
|
+
bank_id: string;
|
|
1567
|
+
account_type: "checking" | "debit" | "savings";
|
|
1568
|
+
account_id: string;
|
|
1569
|
+
holder_id: string;
|
|
1570
|
+
holder_name: string;
|
|
1571
|
+
} | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
|
|
1572
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1573
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1574
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
1575
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
1576
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | 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.">]>;
|
|
1577
|
+
}, undefined>, v.DescriptionAction<{
|
|
1578
|
+
currency: "CLP";
|
|
1579
|
+
value: string;
|
|
1580
|
+
editable: boolean;
|
|
1581
|
+
confirmed: string | null;
|
|
1582
|
+
}, "The amount a transfer orders, as it is answered. `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.">]>;
|
|
1583
|
+
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1584
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1585
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1586
|
+
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1587
|
+
}, undefined>, v.DescriptionAction<{
|
|
1588
|
+
currency: "CLP";
|
|
1589
|
+
value: string;
|
|
1590
|
+
at: string;
|
|
1591
|
+
}, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
|
|
1592
|
+
readonly fee: v.StrictObjectSchema<{
|
|
1593
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1594
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
1595
|
+
}, undefined>;
|
|
1596
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
|
|
1597
|
+
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.">]>;
|
|
1598
|
+
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.">]>;
|
|
1599
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1600
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1601
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1602
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1603
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1604
|
+
}, undefined>, v.DescriptionAction<{
|
|
1605
|
+
value: string;
|
|
1606
|
+
editable: boolean;
|
|
1607
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1608
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1609
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1610
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1611
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1612
|
+
}, undefined>, v.DescriptionAction<{
|
|
1613
|
+
type: "transfer";
|
|
1614
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
1615
|
+
signed: boolean;
|
|
1616
|
+
source: {
|
|
1617
|
+
type: "account_key";
|
|
1618
|
+
accountKey: string;
|
|
1619
|
+
} | {
|
|
1620
|
+
type: "account";
|
|
1621
|
+
id: string;
|
|
1622
|
+
} | null;
|
|
1623
|
+
destination: {
|
|
1624
|
+
editable: false;
|
|
1625
|
+
type: "account_key";
|
|
1626
|
+
accountKey: string;
|
|
1627
|
+
} | {
|
|
1628
|
+
editable: false;
|
|
1629
|
+
type: "account";
|
|
1630
|
+
id: string;
|
|
1631
|
+
} | {
|
|
1632
|
+
editable: false;
|
|
1633
|
+
type: "external";
|
|
1634
|
+
bank_id: string;
|
|
1635
|
+
account_type: "checking" | "debit" | "savings";
|
|
1636
|
+
account_id: string;
|
|
1637
|
+
holder_id: string;
|
|
1638
|
+
holder_name: string;
|
|
1639
|
+
} | null;
|
|
1640
|
+
amount: {
|
|
1641
|
+
currency: "CLP";
|
|
1642
|
+
value: string;
|
|
1643
|
+
editable: boolean;
|
|
1644
|
+
confirmed: string | null;
|
|
1645
|
+
};
|
|
1646
|
+
settled: {
|
|
1647
|
+
currency: "CLP";
|
|
1648
|
+
value: string;
|
|
1649
|
+
at: string;
|
|
1650
|
+
} | null;
|
|
1651
|
+
fee: {
|
|
1652
|
+
currency: "CLP";
|
|
1653
|
+
amount: "0";
|
|
1654
|
+
};
|
|
1655
|
+
interaction_reason?: "bank_verification_required" | "source_account_required" | undefined;
|
|
1656
|
+
expires_at: string | null;
|
|
1657
|
+
expires_in_seconds: number | null;
|
|
1658
|
+
id: string;
|
|
1659
|
+
resource_server: string;
|
|
1660
|
+
note?: {
|
|
1661
|
+
value: string;
|
|
1662
|
+
editable: boolean;
|
|
1663
|
+
} | undefined;
|
|
1664
|
+
metadata: {
|
|
1665
|
+
[x: string]: unknown;
|
|
1666
|
+
};
|
|
1667
|
+
server_time: string;
|
|
1668
|
+
created_at: string;
|
|
1669
|
+
authorization_url: string;
|
|
1670
|
+
}, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1671
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
1672
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
1673
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
1674
|
+
readonly account: v.StrictObjectSchema<{
|
|
1675
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1676
|
+
readonly name: v.StringSchema<undefined>;
|
|
1677
|
+
readonly upsert: v.BooleanSchema<undefined>;
|
|
1678
|
+
readonly bank_account_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
1679
|
+
}, undefined>;
|
|
1680
|
+
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.">]>;
|
|
1681
|
+
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.">]>;
|
|
1682
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1683
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1684
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1685
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1686
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1687
|
+
}, undefined>, v.DescriptionAction<{
|
|
1688
|
+
value: string;
|
|
1689
|
+
editable: boolean;
|
|
1690
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1691
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1692
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1693
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1694
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1695
|
+
}, undefined>, v.DescriptionAction<{
|
|
1696
|
+
type: "account_opening";
|
|
1697
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
1698
|
+
signed: boolean;
|
|
1699
|
+
account: {
|
|
1700
|
+
accountKey: string;
|
|
1701
|
+
name: string;
|
|
1702
|
+
upsert: boolean;
|
|
1703
|
+
bank_account_id: string | null;
|
|
1704
|
+
};
|
|
1705
|
+
expires_at: string | null;
|
|
1706
|
+
expires_in_seconds: number | null;
|
|
1707
|
+
id: string;
|
|
1708
|
+
resource_server: string;
|
|
1709
|
+
note?: {
|
|
1710
|
+
value: string;
|
|
1711
|
+
editable: boolean;
|
|
1712
|
+
} | undefined;
|
|
1713
|
+
metadata: {
|
|
1714
|
+
[x: string]: unknown;
|
|
1715
|
+
};
|
|
1716
|
+
server_time: string;
|
|
1717
|
+
created_at: string;
|
|
1718
|
+
authorization_url: string;
|
|
1719
|
+
}, "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 the core 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<{
|
|
1720
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
1721
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
1722
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
1723
|
+
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1724
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
1725
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1726
|
+
}, undefined>, v.DescriptionAction<{
|
|
1727
|
+
type: "account_key";
|
|
1728
|
+
accountKey: string;
|
|
1729
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1730
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
1731
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1732
|
+
}, undefined>, v.DescriptionAction<{
|
|
1733
|
+
type: "account";
|
|
1734
|
+
id: string;
|
|
1735
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1736
|
+
type: "account_key";
|
|
1737
|
+
accountKey: string;
|
|
1738
|
+
} | {
|
|
1739
|
+
type: "account";
|
|
1740
|
+
id: string;
|
|
1741
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
|
|
1742
|
+
readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
|
|
1743
|
+
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1744
|
+
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
|
|
1745
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1746
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1747
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1748
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1749
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1750
|
+
}, undefined>, v.DescriptionAction<{
|
|
1751
|
+
value: string;
|
|
1752
|
+
editable: boolean;
|
|
1753
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1754
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1755
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1756
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1757
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1758
|
+
}, undefined>, v.DescriptionAction<{
|
|
1759
|
+
type: "account_closure";
|
|
1760
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
1761
|
+
signed: boolean;
|
|
1762
|
+
account: {
|
|
1763
|
+
type: "account_key";
|
|
1764
|
+
accountKey: string;
|
|
1765
|
+
} | {
|
|
1766
|
+
type: "account";
|
|
1767
|
+
id: string;
|
|
1768
|
+
};
|
|
1769
|
+
resolved_account_id: string | null;
|
|
1770
|
+
expires_at: string;
|
|
1771
|
+
expires_in_seconds: number;
|
|
1772
|
+
id: string;
|
|
1773
|
+
resource_server: string;
|
|
1774
|
+
note?: {
|
|
1775
|
+
value: string;
|
|
1776
|
+
editable: boolean;
|
|
1777
|
+
} | undefined;
|
|
1778
|
+
metadata: {
|
|
1779
|
+
[x: string]: unknown;
|
|
1780
|
+
};
|
|
1781
|
+
server_time: string;
|
|
1782
|
+
created_at: string;
|
|
1783
|
+
authorization_url: string;
|
|
1784
|
+
}, "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]>>;
|
|
1785
|
+
getBankCatalog: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1786
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
1787
|
+
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1788
|
+
readonly node: v.StrictObjectSchema<{
|
|
1789
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The `bank_id` of a destination of type `external`.">]>;
|
|
1790
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
|
|
1791
|
+
}, undefined>;
|
|
1792
|
+
}, undefined>, undefined>;
|
|
1793
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
1794
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1795
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1796
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
1797
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
1798
|
+
}, undefined>;
|
|
1799
|
+
}, undefined>, v.DescriptionAction<{
|
|
1800
|
+
edges: {
|
|
1801
|
+
cursor: string | null;
|
|
1802
|
+
node: {
|
|
1803
|
+
id: string;
|
|
1804
|
+
name: string;
|
|
1805
|
+
};
|
|
1806
|
+
}[];
|
|
1807
|
+
pageInfo: {
|
|
1808
|
+
startCursor: string | null;
|
|
1809
|
+
endCursor: string | null;
|
|
1810
|
+
hasPreviousPage: boolean;
|
|
1811
|
+
hasNextPage: boolean;
|
|
1812
|
+
};
|
|
1813
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [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]>>;
|
|
1814
|
+
getIntent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
1815
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1816
|
+
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1817
|
+
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
1818
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "failed"], undefined>, v.DescriptionAction<"completed" | "closed" | "failed" | "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.">]>;
|
|
1819
|
+
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1820
|
+
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
1821
|
+
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1822
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1823
|
+
}, undefined>, undefined>;
|
|
1824
|
+
readonly termination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
1825
|
+
readonly status: v.StringSchema<undefined>;
|
|
1826
|
+
readonly at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1827
|
+
readonly total: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1828
|
+
}, undefined>, undefined>, undefined>, v.DescriptionAction<{
|
|
1829
|
+
status: string;
|
|
1830
|
+
at: string | null;
|
|
1831
|
+
total: string | null;
|
|
1832
|
+
} | null | undefined, "First terminal state and total, unchanged by later attribution corrections. Legacy unknown totals remain null.">]>;
|
|
1833
|
+
readonly completion: v.NullableSchema<v.ObjectSchema<{
|
|
1834
|
+
readonly completed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1835
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1836
|
+
}, undefined>, undefined>;
|
|
1837
|
+
readonly destination: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1838
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1839
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1840
|
+
readonly number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
1841
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
1842
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Null when the holder has no identity document on file.">]>;
|
|
1843
|
+
readonly holder_name: v.StringSchema<undefined>;
|
|
1844
|
+
}, undefined>, v.DescriptionAction<{
|
|
1845
|
+
type: "account";
|
|
1846
|
+
id: string;
|
|
1847
|
+
number: string;
|
|
1848
|
+
account_type: "checking" | "debit" | "savings";
|
|
1849
|
+
holder_id: string | null;
|
|
1850
|
+
holder_name: string;
|
|
1851
|
+
}, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
|
|
1852
|
+
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1853
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1854
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
1855
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
1856
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Explicitly confirmed target; `value` applies until confirmation.">]>;
|
|
1857
|
+
readonly frozen_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "First funding confirmation or attribution freezes the target permanently.">]>;
|
|
1858
|
+
}, undefined>, v.DescriptionAction<{
|
|
1859
|
+
currency: "CLP";
|
|
1860
|
+
value: string;
|
|
1861
|
+
editable: boolean;
|
|
1862
|
+
confirmed: string | null;
|
|
1863
|
+
frozen_at: string | null;
|
|
1864
|
+
}, "The amount a deposit asks for. `value` is the request's, `confirmed` the payer's own target when `editable`; what arrived is `progress.credited`, never these.">]>, undefined>;
|
|
1865
|
+
readonly progress: v.StrictObjectSchema<{
|
|
1866
|
+
readonly credited: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1867
|
+
readonly remaining: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
1868
|
+
}, undefined>;
|
|
1869
|
+
readonly transactions: v.ArraySchema<v.StrictObjectSchema<{
|
|
1870
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1871
|
+
readonly received_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1872
|
+
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1873
|
+
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
1874
|
+
readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
|
|
1875
|
+
readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
|
|
1876
|
+
readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
|
|
1877
|
+
readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
|
|
1878
|
+
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
1879
|
+
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
1880
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1881
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1882
|
+
readonly transaction_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
1883
|
+
}, undefined>, undefined>;
|
|
1884
|
+
readonly fee: v.StrictObjectSchema<{
|
|
1885
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1886
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
1887
|
+
}, undefined>;
|
|
1888
|
+
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1889
|
+
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.">]>;
|
|
1890
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1891
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1892
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1893
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
1894
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1895
|
+
}, undefined>, v.DescriptionAction<{
|
|
1896
|
+
value: string;
|
|
1897
|
+
editable: boolean;
|
|
1898
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1899
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1900
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1901
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1902
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1903
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1904
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1905
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
1906
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
1907
|
+
readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1908
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
1909
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1910
|
+
}, undefined>, v.DescriptionAction<{
|
|
1911
|
+
type: "account_key";
|
|
1912
|
+
accountKey: string;
|
|
1913
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1914
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
1915
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1916
|
+
}, undefined>, v.DescriptionAction<{
|
|
1917
|
+
type: "account";
|
|
1918
|
+
id: string;
|
|
1919
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1920
|
+
type: "account_key";
|
|
1921
|
+
accountKey: string;
|
|
1922
|
+
} | {
|
|
1923
|
+
type: "account";
|
|
1924
|
+
id: string;
|
|
1925
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
|
|
1926
|
+
type: "account_key";
|
|
1927
|
+
accountKey: string;
|
|
1928
|
+
} | {
|
|
1929
|
+
type: "account";
|
|
1930
|
+
id: string;
|
|
1931
|
+
} | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
|
|
1932
|
+
readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1933
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1934
|
+
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
1935
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1936
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1937
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1938
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
1939
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1940
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
1941
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1942
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1943
|
+
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1944
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
1945
|
+
readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1946
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1947
|
+
readonly holder_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`).">]>;
|
|
1948
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1949
|
+
editable: false;
|
|
1950
|
+
type: "account_key";
|
|
1951
|
+
accountKey: string;
|
|
1952
|
+
} | {
|
|
1953
|
+
editable: false;
|
|
1954
|
+
type: "account";
|
|
1955
|
+
id: string;
|
|
1956
|
+
} | {
|
|
1957
|
+
editable: false;
|
|
1958
|
+
type: "external";
|
|
1959
|
+
bank_id: string;
|
|
1960
|
+
account_type: "checking" | "debit" | "savings";
|
|
1961
|
+
account_id: string;
|
|
1962
|
+
holder_id: string;
|
|
1963
|
+
holder_name: string;
|
|
1964
|
+
}, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
1965
|
+
editable: false;
|
|
1966
|
+
type: "account_key";
|
|
1967
|
+
accountKey: string;
|
|
1968
|
+
} | {
|
|
1969
|
+
editable: false;
|
|
1970
|
+
type: "account";
|
|
1971
|
+
id: string;
|
|
1972
|
+
} | {
|
|
1973
|
+
editable: false;
|
|
1974
|
+
type: "external";
|
|
1975
|
+
bank_id: string;
|
|
1976
|
+
account_type: "checking" | "debit" | "savings";
|
|
1977
|
+
account_id: string;
|
|
1978
|
+
holder_id: string;
|
|
1979
|
+
holder_name: string;
|
|
1980
|
+
} | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
|
|
1981
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1982
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1983
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
1984
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
1985
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | 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.">]>;
|
|
1986
|
+
}, undefined>, v.DescriptionAction<{
|
|
1987
|
+
currency: "CLP";
|
|
1988
|
+
value: string;
|
|
1989
|
+
editable: boolean;
|
|
1990
|
+
confirmed: string | null;
|
|
1991
|
+
}, "The amount a transfer orders, as it is answered. `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.">]>;
|
|
1992
|
+
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1993
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1994
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1995
|
+
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1996
|
+
}, undefined>, v.DescriptionAction<{
|
|
1997
|
+
currency: "CLP";
|
|
1998
|
+
value: string;
|
|
1999
|
+
at: string;
|
|
2000
|
+
}, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
|
|
2001
|
+
readonly fee: v.StrictObjectSchema<{
|
|
2002
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
2003
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
2004
|
+
}, undefined>;
|
|
2005
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
|
|
2006
|
+
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.">]>;
|
|
2007
|
+
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.">]>;
|
|
2008
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2009
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2010
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2011
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
2012
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
2013
|
+
}, undefined>, v.DescriptionAction<{
|
|
2014
|
+
value: string;
|
|
2015
|
+
editable: boolean;
|
|
2016
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
2017
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2018
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2019
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2020
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2021
|
+
}, undefined>, v.DescriptionAction<{
|
|
2022
|
+
type: "transfer";
|
|
2023
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
2024
|
+
signed: boolean;
|
|
2025
|
+
source: {
|
|
2026
|
+
type: "account_key";
|
|
2027
|
+
accountKey: string;
|
|
2028
|
+
} | {
|
|
2029
|
+
type: "account";
|
|
2030
|
+
id: string;
|
|
2031
|
+
} | null;
|
|
2032
|
+
destination: {
|
|
2033
|
+
editable: false;
|
|
2034
|
+
type: "account_key";
|
|
2035
|
+
accountKey: string;
|
|
2036
|
+
} | {
|
|
2037
|
+
editable: false;
|
|
2038
|
+
type: "account";
|
|
2039
|
+
id: string;
|
|
2040
|
+
} | {
|
|
2041
|
+
editable: false;
|
|
2042
|
+
type: "external";
|
|
2043
|
+
bank_id: string;
|
|
2044
|
+
account_type: "checking" | "debit" | "savings";
|
|
2045
|
+
account_id: string;
|
|
2046
|
+
holder_id: string;
|
|
2047
|
+
holder_name: string;
|
|
2048
|
+
} | null;
|
|
2049
|
+
amount: {
|
|
2050
|
+
currency: "CLP";
|
|
2051
|
+
value: string;
|
|
2052
|
+
editable: boolean;
|
|
2053
|
+
confirmed: string | null;
|
|
2054
|
+
};
|
|
2055
|
+
settled: {
|
|
2056
|
+
currency: "CLP";
|
|
2057
|
+
value: string;
|
|
2058
|
+
at: string;
|
|
2059
|
+
} | null;
|
|
2060
|
+
fee: {
|
|
2061
|
+
currency: "CLP";
|
|
2062
|
+
amount: "0";
|
|
2063
|
+
};
|
|
2064
|
+
interaction_reason?: "bank_verification_required" | "source_account_required" | undefined;
|
|
2065
|
+
expires_at: string | null;
|
|
2066
|
+
expires_in_seconds: number | null;
|
|
2067
|
+
id: string;
|
|
2068
|
+
resource_server: string;
|
|
2069
|
+
note?: {
|
|
2070
|
+
value: string;
|
|
2071
|
+
editable: boolean;
|
|
2072
|
+
} | undefined;
|
|
2073
|
+
metadata: {
|
|
2074
|
+
[x: string]: unknown;
|
|
2075
|
+
};
|
|
2076
|
+
server_time: string;
|
|
2077
|
+
created_at: string;
|
|
2078
|
+
authorization_url: string;
|
|
2079
|
+
}, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2080
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
2081
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
2082
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
2083
|
+
readonly account: v.StrictObjectSchema<{
|
|
2084
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
2085
|
+
readonly name: v.StringSchema<undefined>;
|
|
2086
|
+
readonly upsert: v.BooleanSchema<undefined>;
|
|
2087
|
+
readonly bank_account_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
2088
|
+
}, undefined>;
|
|
2089
|
+
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.">]>;
|
|
2090
|
+
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.">]>;
|
|
2091
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2092
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2093
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2094
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
2095
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
2096
|
+
}, undefined>, v.DescriptionAction<{
|
|
2097
|
+
value: string;
|
|
2098
|
+
editable: boolean;
|
|
2099
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
2100
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2101
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2102
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2103
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2104
|
+
}, undefined>, v.DescriptionAction<{
|
|
2105
|
+
type: "account_opening";
|
|
2106
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
2107
|
+
signed: boolean;
|
|
2108
|
+
account: {
|
|
2109
|
+
accountKey: string;
|
|
2110
|
+
name: string;
|
|
2111
|
+
upsert: boolean;
|
|
2112
|
+
bank_account_id: string | null;
|
|
2113
|
+
};
|
|
2114
|
+
expires_at: string | null;
|
|
2115
|
+
expires_in_seconds: number | null;
|
|
2116
|
+
id: string;
|
|
2117
|
+
resource_server: string;
|
|
2118
|
+
note?: {
|
|
2119
|
+
value: string;
|
|
2120
|
+
editable: boolean;
|
|
2121
|
+
} | undefined;
|
|
2122
|
+
metadata: {
|
|
2123
|
+
[x: string]: unknown;
|
|
2124
|
+
};
|
|
2125
|
+
server_time: string;
|
|
2126
|
+
created_at: string;
|
|
2127
|
+
authorization_url: string;
|
|
2128
|
+
}, "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 the core 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<{
|
|
2129
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
2130
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
2131
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
2132
|
+
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2133
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
2134
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
2135
|
+
}, undefined>, v.DescriptionAction<{
|
|
2136
|
+
type: "account_key";
|
|
2137
|
+
accountKey: string;
|
|
2138
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2139
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
2140
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2141
|
+
}, undefined>, v.DescriptionAction<{
|
|
2142
|
+
type: "account";
|
|
2143
|
+
id: string;
|
|
2144
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
2145
|
+
type: "account_key";
|
|
2146
|
+
accountKey: string;
|
|
2147
|
+
} | {
|
|
2148
|
+
type: "account";
|
|
2149
|
+
id: string;
|
|
2150
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
|
|
2151
|
+
readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
|
|
2152
|
+
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2153
|
+
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
|
|
2154
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2155
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2156
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2157
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
2158
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
2159
|
+
}, undefined>, v.DescriptionAction<{
|
|
2160
|
+
value: string;
|
|
2161
|
+
editable: boolean;
|
|
2162
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
2163
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2164
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2165
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2166
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2167
|
+
}, undefined>, v.DescriptionAction<{
|
|
2168
|
+
type: "account_closure";
|
|
2169
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
2170
|
+
signed: boolean;
|
|
2171
|
+
account: {
|
|
2172
|
+
type: "account_key";
|
|
2173
|
+
accountKey: string;
|
|
2174
|
+
} | {
|
|
2175
|
+
type: "account";
|
|
2176
|
+
id: string;
|
|
2177
|
+
};
|
|
2178
|
+
resolved_account_id: string | null;
|
|
2179
|
+
expires_at: string;
|
|
2180
|
+
expires_in_seconds: number;
|
|
2181
|
+
id: string;
|
|
2182
|
+
resource_server: string;
|
|
2183
|
+
note?: {
|
|
2184
|
+
value: string;
|
|
2185
|
+
editable: boolean;
|
|
2186
|
+
} | undefined;
|
|
2187
|
+
metadata: {
|
|
2188
|
+
[x: string]: unknown;
|
|
2189
|
+
};
|
|
2190
|
+
server_time: string;
|
|
2191
|
+
created_at: string;
|
|
2192
|
+
authorization_url: string;
|
|
2193
|
+
}, "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").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]>>;
|
|
2194
|
+
getGrantAuthorization: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.StrictObjectSchema<{
|
|
2195
|
+
readonly active: v.LiteralSchema<true, undefined>;
|
|
2196
|
+
readonly actor: v.StrictObjectSchema<{
|
|
2197
|
+
readonly type: v.LiteralSchema<"profile", undefined>;
|
|
2198
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2199
|
+
}, undefined>;
|
|
2200
|
+
readonly authorizationDetails: v.ArraySchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, undefined>;
|
|
2201
|
+
readonly clientId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2202
|
+
readonly grantId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2203
|
+
readonly holder: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
2204
|
+
readonly type: v.LiteralSchema<"profile", undefined>;
|
|
2205
|
+
readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2206
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
2207
|
+
readonly type: v.LiteralSchema<"organization", undefined>;
|
|
2208
|
+
readonly identifier: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The Organization's identifier, the same value `authorizationDetails[].subject.identifier` carries: a positive decimal integer, as a string.">]>;
|
|
2209
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
2210
|
+
type: "profile";
|
|
2211
|
+
identifier: string;
|
|
2212
|
+
} | {
|
|
2213
|
+
type: "organization";
|
|
2214
|
+
identifier: string;
|
|
2215
|
+
}, "Whose resources the Grant reaches: the Profile, or the Organization (Company) the person consented for. It is the only place this response names an Organization outside `authorizationDetails`, because for an Organization the `subject` is the application. It carries the identifier and no identity data; the RUT and the legal name are read from the identities of the Organization.">]>;
|
|
2216
|
+
readonly resource: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2217
|
+
readonly scopes: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
2218
|
+
readonly subject: v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
2219
|
+
readonly type: v.LiteralSchema<"profile", undefined>;
|
|
2220
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2221
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
2222
|
+
readonly type: v.LiteralSchema<"application", undefined>;
|
|
2223
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2224
|
+
}, undefined>], undefined>;
|
|
2225
|
+
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2226
|
+
getPermissionCatalog: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2227
|
+
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>;
|
|
2228
|
+
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, 200, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Cursor page size; forward and backward argument families are exclusive.">]>;
|
|
2229
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2230
|
+
readonly last: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 200, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Cursor page size; forward and backward argument families are exclusive.">]>;
|
|
2231
|
+
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>;
|
|
2232
|
+
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, 200, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Offset page size; do not combine with cursor arguments.">]>;
|
|
2233
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2234
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2235
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2236
|
+
readonly node: v.StrictObjectSchema<{
|
|
2237
|
+
readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2238
|
+
readonly providerProjectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2239
|
+
readonly providerName: v.StringSchema<undefined>;
|
|
2240
|
+
readonly resource: v.StringSchema<undefined>;
|
|
2241
|
+
readonly kind: v.PicklistSchema<["scope", "authorization_details"], undefined>;
|
|
2242
|
+
readonly identifier: v.StringSchema<undefined>;
|
|
2243
|
+
readonly name: v.StringSchema<undefined>;
|
|
2244
|
+
readonly description: v.StringSchema<undefined>;
|
|
2245
|
+
readonly actions: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
|
|
2246
|
+
readonly restrictions: v.StringSchema<undefined>;
|
|
2247
|
+
readonly schema: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2248
|
+
readonly examples: v.ArraySchema<v.UnknownSchema, undefined>;
|
|
2249
|
+
}, undefined>;
|
|
2250
|
+
}, undefined>, undefined>;
|
|
2251
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2252
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2253
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2254
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2255
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2256
|
+
}, undefined>;
|
|
2257
|
+
}, undefined>, v.DescriptionAction<{
|
|
2258
|
+
edges: {
|
|
2259
|
+
cursor: string;
|
|
2260
|
+
node: {
|
|
2261
|
+
providerId: string;
|
|
2262
|
+
providerProjectId: string;
|
|
2263
|
+
providerName: string;
|
|
2264
|
+
resource: string;
|
|
2265
|
+
kind: "scope" | "authorization_details";
|
|
2266
|
+
identifier: string;
|
|
2267
|
+
name: string;
|
|
2268
|
+
description: string;
|
|
2269
|
+
actions: {
|
|
2270
|
+
[x: string]: string;
|
|
2271
|
+
};
|
|
2272
|
+
restrictions: string;
|
|
2273
|
+
schema: {
|
|
2274
|
+
[x: string]: unknown;
|
|
2275
|
+
};
|
|
2276
|
+
examples: unknown[];
|
|
2277
|
+
};
|
|
2278
|
+
}[];
|
|
2279
|
+
pageInfo: {
|
|
2280
|
+
startCursor: string | null;
|
|
2281
|
+
endCursor: string | null;
|
|
2282
|
+
hasPreviousPage: boolean;
|
|
2283
|
+
hasNextPage: boolean;
|
|
2284
|
+
};
|
|
2285
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2286
|
+
getUserInfo: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.ObjectSchema<{
|
|
2287
|
+
readonly sub: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2288
|
+
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>;
|
|
2289
|
+
readonly email_verified: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
2290
|
+
readonly name: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
2291
|
+
readonly picture: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
|
|
2292
|
+
readonly phone: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The Profile's phone number, present when the `phone` scope is granted and a number is on file.">]>, undefined>;
|
|
2293
|
+
readonly phone_verified: v.OptionalSchema<v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Present and `true` when the `phone` scope is granted and the number was confirmed.">]>, undefined>;
|
|
2294
|
+
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientScope, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2295
|
+
listAccounts: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2296
|
+
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>;
|
|
2297
|
+
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.">]>;
|
|
2298
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2299
|
+
readonly last: 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.">]>;
|
|
2300
|
+
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>;
|
|
2301
|
+
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.">]>;
|
|
2302
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Exact-match lookup by Account Key. Not compatible with `after`/`limit` paging.">]>;
|
|
2303
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2304
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2305
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2306
|
+
readonly node: v.StrictObjectSchema<{
|
|
2307
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2308
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Account Key its holder chose, or null for an account opened before account keys existed. Exact-match input for `GET /accounts?accountKey=`.">]>;
|
|
2309
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The account's own name, the one `account_opening.succeeded` announces; the product name for an account nobody named; null for an account nobody named that the balance projection does not know yet. Show the Account Key or a placeholder of your own for null, never made-up text.">]>;
|
|
2310
|
+
readonly number: v.StringSchema<undefined>;
|
|
2311
|
+
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.">]>;
|
|
2312
|
+
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.">]>;
|
|
2313
|
+
readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The ledger balance the bank maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds the bank has on hold are not subtracted from it. Null while the balance projection does not know the account 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.">]>;
|
|
2314
|
+
}, undefined>;
|
|
2315
|
+
}, undefined>, undefined>;
|
|
2316
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2317
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2318
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2319
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2320
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2321
|
+
}, undefined>;
|
|
2322
|
+
}, undefined>, v.DescriptionAction<{
|
|
2323
|
+
edges: {
|
|
2324
|
+
cursor: string;
|
|
2325
|
+
node: {
|
|
2326
|
+
id: string;
|
|
2327
|
+
accountKey: string | null;
|
|
2328
|
+
name: string | null;
|
|
2329
|
+
number: string;
|
|
2330
|
+
type: string | null;
|
|
2331
|
+
currency: string | null;
|
|
2332
|
+
balance: string | null;
|
|
2333
|
+
};
|
|
2334
|
+
}[];
|
|
2335
|
+
pageInfo: {
|
|
2336
|
+
startCursor: string | null;
|
|
2337
|
+
endCursor: string | null;
|
|
2338
|
+
hasPreviousPage: boolean;
|
|
2339
|
+
hasNextPage: boolean;
|
|
2340
|
+
};
|
|
2341
|
+
}, 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]>>;
|
|
2342
|
+
listAccountTransactions: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2343
|
+
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>;
|
|
2344
|
+
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.">]>;
|
|
2345
|
+
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.">]>;
|
|
2346
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2347
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2348
|
+
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2349
|
+
readonly node: v.StrictObjectSchema<{
|
|
2350
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2351
|
+
readonly transactionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2352
|
+
readonly description: v.StringSchema<undefined>;
|
|
2353
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Issued by the external bank and republished exactly as the bank sent it, with none of the digit-count bound of an Andco-defined amount. What tells an inflow from an outflow is `movement_type`, not a sign: the bank sends the amount as a positive figure.">]>;
|
|
2354
|
+
readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of movement, under the bank's own field name and in its 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.">]>;
|
|
2355
|
+
readonly origin: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2356
|
+
readonly date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2357
|
+
readonly runningBalance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "Same provenance as `amount`: issued by the external bank and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away.">]>;
|
|
2358
|
+
readonly paymentType: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2359
|
+
readonly reversed: v.BooleanSchema<undefined>;
|
|
2360
|
+
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2361
|
+
}, undefined>;
|
|
2362
|
+
}, undefined>, undefined>;
|
|
2363
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2364
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2365
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2366
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2367
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2368
|
+
}, undefined>;
|
|
2369
|
+
}, undefined>, v.DescriptionAction<{
|
|
2370
|
+
edges: {
|
|
2371
|
+
cursor: string | null;
|
|
2372
|
+
node: {
|
|
2373
|
+
id: string;
|
|
2374
|
+
transactionId: string | null;
|
|
2375
|
+
description: string;
|
|
2376
|
+
amount: string;
|
|
2377
|
+
movement_type: "deposit" | "interest" | "withdrawal";
|
|
2378
|
+
origin: string | null;
|
|
2379
|
+
date: string;
|
|
2380
|
+
runningBalance: string | null;
|
|
2381
|
+
paymentType: string | null;
|
|
2382
|
+
reversed: boolean;
|
|
2383
|
+
note: string | null;
|
|
2384
|
+
};
|
|
2385
|
+
}[];
|
|
2386
|
+
pageInfo: {
|
|
2387
|
+
startCursor: string | null;
|
|
2388
|
+
endCursor: string | null;
|
|
2389
|
+
hasPreviousPage: boolean;
|
|
2390
|
+
hasNextPage: boolean;
|
|
2391
|
+
};
|
|
2392
|
+
}, 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]>>;
|
|
2393
|
+
listOrganizationAddresses: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2394
|
+
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>;
|
|
2395
|
+
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.">]>;
|
|
2396
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2397
|
+
readonly last: 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.">]>;
|
|
2398
|
+
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>;
|
|
2399
|
+
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.">]>;
|
|
2400
|
+
readonly organization_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The Organization the Grant's subject names.">]>;
|
|
2401
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2402
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2403
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2404
|
+
readonly node: v.ObjectSchema<{
|
|
2405
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2406
|
+
readonly country: v.StringSchema<undefined>;
|
|
2407
|
+
readonly level1: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2408
|
+
readonly level2: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2409
|
+
readonly level3: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2410
|
+
readonly street_address: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2411
|
+
readonly label_kind: v.PicklistSchema<["home", "work", "vacation", "other"], undefined>;
|
|
2412
|
+
readonly label_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2413
|
+
readonly priority: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -2147483648, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>;
|
|
2414
|
+
}, undefined>;
|
|
2415
|
+
}, undefined>, undefined>;
|
|
2416
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2417
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2418
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2419
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2420
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2421
|
+
}, undefined>;
|
|
2422
|
+
}, undefined>, v.DescriptionAction<{
|
|
2423
|
+
edges: {
|
|
2424
|
+
cursor: string;
|
|
2425
|
+
node: {
|
|
2426
|
+
id: string;
|
|
2427
|
+
country: string;
|
|
2428
|
+
level1: string | null;
|
|
2429
|
+
level2: string | null;
|
|
2430
|
+
level3: string | null;
|
|
2431
|
+
street_address: string | null;
|
|
2432
|
+
label_kind: "home" | "work" | "vacation" | "other";
|
|
2433
|
+
label_name: string | null;
|
|
2434
|
+
priority: number;
|
|
2435
|
+
};
|
|
2436
|
+
}[];
|
|
2437
|
+
pageInfo: {
|
|
2438
|
+
startCursor: string | null;
|
|
2439
|
+
endCursor: string | null;
|
|
2440
|
+
hasPreviousPage: boolean;
|
|
2441
|
+
hasNextPage: boolean;
|
|
2442
|
+
};
|
|
2443
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable, typeof import("./common.js").InvalidRequest]>>;
|
|
2444
|
+
listOrganizationIdentities: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2445
|
+
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>;
|
|
2446
|
+
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.">]>;
|
|
2447
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2448
|
+
readonly last: 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.">]>;
|
|
2449
|
+
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>;
|
|
2450
|
+
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.">]>;
|
|
2451
|
+
readonly organization_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The Organization the Grant's subject names.">]>;
|
|
2452
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2453
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2454
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2455
|
+
readonly node: v.ObjectSchema<{
|
|
2456
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2457
|
+
readonly legal_name: v.StringSchema<undefined>;
|
|
2458
|
+
readonly country: v.StringSchema<undefined>;
|
|
2459
|
+
readonly document_kind: v.LiteralSchema<"rut", undefined>;
|
|
2460
|
+
readonly document_value: v.StringSchema<undefined>;
|
|
2461
|
+
}, undefined>;
|
|
2462
|
+
}, undefined>, undefined>;
|
|
2463
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2464
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2465
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2466
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2467
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2468
|
+
}, undefined>;
|
|
2469
|
+
}, undefined>, v.DescriptionAction<{
|
|
2470
|
+
edges: {
|
|
2471
|
+
cursor: string;
|
|
2472
|
+
node: {
|
|
2473
|
+
id: string;
|
|
2474
|
+
legal_name: string;
|
|
2475
|
+
country: string;
|
|
2476
|
+
document_kind: "rut";
|
|
2477
|
+
document_value: string;
|
|
2478
|
+
};
|
|
2479
|
+
}[];
|
|
2480
|
+
pageInfo: {
|
|
2481
|
+
startCursor: string | null;
|
|
2482
|
+
endCursor: string | null;
|
|
2483
|
+
hasPreviousPage: boolean;
|
|
2484
|
+
hasNextPage: boolean;
|
|
2485
|
+
};
|
|
2486
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable, typeof import("./common.js").InvalidRequest]>>;
|
|
2487
|
+
listProfileAddresses: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2488
|
+
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>;
|
|
2489
|
+
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.">]>;
|
|
2490
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2491
|
+
readonly last: 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.">]>;
|
|
2492
|
+
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>;
|
|
2493
|
+
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.">]>;
|
|
2494
|
+
readonly profile_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Profile the Grant's subject names.">]>;
|
|
2495
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2496
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2497
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2498
|
+
readonly node: v.ObjectSchema<{
|
|
2499
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2500
|
+
readonly country: v.StringSchema<undefined>;
|
|
2501
|
+
readonly level1: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2502
|
+
readonly level2: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2503
|
+
readonly level3: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2504
|
+
readonly street_address: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2505
|
+
readonly label_kind: v.PicklistSchema<["home", "work", "vacation", "other"], undefined>;
|
|
2506
|
+
readonly label_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2507
|
+
readonly priority: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -2147483648, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>;
|
|
2508
|
+
}, undefined>;
|
|
2509
|
+
}, undefined>, undefined>;
|
|
2510
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2511
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2512
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2513
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2514
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2515
|
+
}, undefined>;
|
|
2516
|
+
}, undefined>, v.DescriptionAction<{
|
|
2517
|
+
edges: {
|
|
2518
|
+
cursor: string;
|
|
2519
|
+
node: {
|
|
2520
|
+
id: string;
|
|
2521
|
+
country: string;
|
|
2522
|
+
level1: string | null;
|
|
2523
|
+
level2: string | null;
|
|
2524
|
+
level3: string | null;
|
|
2525
|
+
street_address: string | null;
|
|
2526
|
+
label_kind: "home" | "work" | "vacation" | "other";
|
|
2527
|
+
label_name: string | null;
|
|
2528
|
+
priority: number;
|
|
2529
|
+
};
|
|
2530
|
+
}[];
|
|
2531
|
+
pageInfo: {
|
|
2532
|
+
startCursor: string | null;
|
|
2533
|
+
endCursor: string | null;
|
|
2534
|
+
hasPreviousPage: boolean;
|
|
2535
|
+
hasNextPage: boolean;
|
|
2536
|
+
};
|
|
2537
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable, typeof import("./common.js").InvalidRequest]>>;
|
|
2538
|
+
listProfileIdentities: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2539
|
+
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>;
|
|
2540
|
+
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.">]>;
|
|
2541
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2542
|
+
readonly last: 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.">]>;
|
|
2543
|
+
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>;
|
|
2544
|
+
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.">]>;
|
|
2545
|
+
readonly profile_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Profile the Grant's subject names.">]>;
|
|
2546
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2547
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2548
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2549
|
+
readonly node: v.ObjectSchema<{
|
|
2550
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2551
|
+
readonly country: v.StringSchema<undefined>;
|
|
2552
|
+
readonly nationality: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2553
|
+
readonly born_date: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, undefined>]>, undefined>;
|
|
2554
|
+
readonly gender: v.NullableSchema<v.PicklistSchema<["male", "female", "other"], undefined>, undefined>;
|
|
2555
|
+
readonly document_kind: v.PicklistSchema<["nin", "passport"], undefined>;
|
|
2556
|
+
readonly document_value: v.StringSchema<undefined>;
|
|
2557
|
+
readonly given_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2558
|
+
readonly family_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2559
|
+
readonly business_activity_code: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2560
|
+
readonly validation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2561
|
+
readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is Andco Core, on its hosted page.">]>;
|
|
2562
|
+
readonly validated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2563
|
+
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.">]>;
|
|
2564
|
+
readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "Andco Core's identifier of the validation. Keep it as the reference to the validation.">]>;
|
|
2565
|
+
}, undefined>, v.DescriptionAction<{
|
|
2566
|
+
validated_by: "andco_core";
|
|
2567
|
+
validated_at: string;
|
|
2568
|
+
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2569
|
+
verification_id: string;
|
|
2570
|
+
}, "What Andco Core 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<{
|
|
2571
|
+
validated_by: "andco_core";
|
|
2572
|
+
validated_at: string;
|
|
2573
|
+
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2574
|
+
verification_id: string;
|
|
2575
|
+
} | null | undefined, "Only on `GET /profiles/{profile_id}/identities`, and only when the Grant's `identity` detail asked for it with `validation` and `required` true; a plain `identity` read does not get the field, not even `null`. `null` means this identity has no validation.">]>;
|
|
2576
|
+
}, undefined>;
|
|
2577
|
+
}, undefined>, undefined>;
|
|
2578
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2579
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2580
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2581
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2582
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2583
|
+
}, undefined>;
|
|
2584
|
+
}, undefined>, v.DescriptionAction<{
|
|
2585
|
+
edges: {
|
|
2586
|
+
cursor: string;
|
|
2587
|
+
node: {
|
|
2588
|
+
id: string;
|
|
2589
|
+
country: string;
|
|
2590
|
+
nationality: string | null;
|
|
2591
|
+
born_date: string | null;
|
|
2592
|
+
gender: "other" | "male" | "female" | null;
|
|
2593
|
+
document_kind: "nin" | "passport";
|
|
2594
|
+
document_value: string;
|
|
2595
|
+
given_names: string | null;
|
|
2596
|
+
family_names: string | null;
|
|
2597
|
+
business_activity_code: string | null;
|
|
2598
|
+
validation?: {
|
|
2599
|
+
validated_by: "andco_core";
|
|
2600
|
+
validated_at: string;
|
|
2601
|
+
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2602
|
+
verification_id: string;
|
|
2603
|
+
} | null | undefined;
|
|
2604
|
+
};
|
|
2605
|
+
}[];
|
|
2606
|
+
pageInfo: {
|
|
2607
|
+
startCursor: string | null;
|
|
2608
|
+
endCursor: string | null;
|
|
2609
|
+
hasPreviousPage: boolean;
|
|
2610
|
+
hasNextPage: boolean;
|
|
2611
|
+
};
|
|
2612
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable, typeof import("./common.js").InvalidRequest]>>;
|
|
2613
|
+
listProfileOrganizations: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2614
|
+
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>;
|
|
2615
|
+
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.">]>;
|
|
2616
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2617
|
+
readonly last: 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.">]>;
|
|
2618
|
+
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>;
|
|
2619
|
+
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.">]>;
|
|
2620
|
+
readonly profile_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Profile the Grant's subject names.">]>;
|
|
2621
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2622
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2623
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2624
|
+
readonly node: v.ObjectSchema<{
|
|
2625
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
2626
|
+
readonly name: v.StringSchema<undefined>;
|
|
2627
|
+
}, undefined>;
|
|
2628
|
+
}, undefined>, undefined>;
|
|
2629
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2630
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2631
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2632
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2633
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2634
|
+
}, undefined>;
|
|
2635
|
+
}, undefined>, v.DescriptionAction<{
|
|
2636
|
+
edges: {
|
|
2637
|
+
cursor: string;
|
|
2638
|
+
node: {
|
|
2639
|
+
id: string;
|
|
2640
|
+
name: string;
|
|
2641
|
+
};
|
|
2642
|
+
}[];
|
|
2643
|
+
pageInfo: {
|
|
2644
|
+
startCursor: string | null;
|
|
2645
|
+
endCursor: string | null;
|
|
2646
|
+
hasPreviousPage: boolean;
|
|
2647
|
+
hasNextPage: boolean;
|
|
2648
|
+
};
|
|
2649
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable, typeof import("./common.js").InvalidRequest]>>;
|
|
2650
|
+
listProjectProfiles: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2651
|
+
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>;
|
|
2652
|
+
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.">]>;
|
|
2653
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2654
|
+
readonly last: 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.">]>;
|
|
2655
|
+
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>;
|
|
2656
|
+
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.">]>;
|
|
2657
|
+
readonly project_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Project whose Profiles are read; it must be one of the Grant's `project_ids`, or any of the Organization's when that list is empty.">]>;
|
|
2658
|
+
readonly client_id: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "An eq.UUID or in.(UUID,UUID) filter that narrows the authorized Clients.">]>;
|
|
2659
|
+
readonly fields: v.SchemaWithPipe<readonly [v.OptionalSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | undefined, "A comma-separated subset of the fields the Grant allows, for example `name,email`.">]>;
|
|
2660
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2661
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2662
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2663
|
+
readonly node: v.ObjectSchema<{
|
|
2664
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2665
|
+
readonly name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2666
|
+
readonly email: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2667
|
+
readonly avatar: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>;
|
|
2668
|
+
readonly phone: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2669
|
+
readonly identities: v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2670
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2671
|
+
readonly country: v.StringSchema<undefined>;
|
|
2672
|
+
readonly nationality: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2673
|
+
readonly born_date: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoDateAction<string, undefined>]>, undefined>;
|
|
2674
|
+
readonly gender: v.NullableSchema<v.PicklistSchema<["male", "female", "other"], undefined>, undefined>;
|
|
2675
|
+
readonly document_kind: v.PicklistSchema<["nin", "passport"], undefined>;
|
|
2676
|
+
readonly document_value: v.StringSchema<undefined>;
|
|
2677
|
+
readonly given_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2678
|
+
readonly family_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2679
|
+
readonly business_activity_code: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2680
|
+
readonly validation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2681
|
+
readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is Andco Core, on its hosted page.">]>;
|
|
2682
|
+
readonly validated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2683
|
+
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.">]>;
|
|
2684
|
+
readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "Andco Core's identifier of the validation. Keep it as the reference to the validation.">]>;
|
|
2685
|
+
}, undefined>, v.DescriptionAction<{
|
|
2686
|
+
validated_by: "andco_core";
|
|
2687
|
+
validated_at: string;
|
|
2688
|
+
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2689
|
+
verification_id: string;
|
|
2690
|
+
}, "What Andco Core 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<{
|
|
2691
|
+
validated_by: "andco_core";
|
|
2692
|
+
validated_at: string;
|
|
2693
|
+
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2694
|
+
verification_id: string;
|
|
2695
|
+
} | null | undefined, "Only on `GET /profiles/{profile_id}/identities`, and only when the Grant's `identity` detail asked for it with `validation` and `required` true; a plain `identity` read does not get the field, not even `null`. `null` means this identity has no validation.">]>;
|
|
2696
|
+
}, undefined>, undefined>, undefined>;
|
|
2697
|
+
readonly addresses: v.NullableSchema<v.ArraySchema<v.ObjectSchema<{
|
|
2698
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2699
|
+
readonly country: v.StringSchema<undefined>;
|
|
2700
|
+
readonly level1: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2701
|
+
readonly level2: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2702
|
+
readonly level3: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2703
|
+
readonly street_address: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2704
|
+
readonly label_kind: v.PicklistSchema<["home", "work", "vacation", "other"], undefined>;
|
|
2705
|
+
readonly label_name: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2706
|
+
readonly priority: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -2147483648, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>;
|
|
2707
|
+
}, undefined>, undefined>, undefined>;
|
|
2708
|
+
}, undefined>;
|
|
2709
|
+
}, undefined>, undefined>;
|
|
2710
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2711
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2712
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2713
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2714
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2715
|
+
}, undefined>;
|
|
2716
|
+
}, undefined>, v.DescriptionAction<{
|
|
2717
|
+
edges: {
|
|
2718
|
+
cursor: string;
|
|
2719
|
+
node: {
|
|
2720
|
+
id: string;
|
|
2721
|
+
name: string | null;
|
|
2722
|
+
email: string | null;
|
|
2723
|
+
avatar: string | null;
|
|
2724
|
+
phone: string | null;
|
|
2725
|
+
identities: {
|
|
2726
|
+
id: string;
|
|
2727
|
+
country: string;
|
|
2728
|
+
nationality: string | null;
|
|
2729
|
+
born_date: string | null;
|
|
2730
|
+
gender: "other" | "male" | "female" | null;
|
|
2731
|
+
document_kind: "nin" | "passport";
|
|
2732
|
+
document_value: string;
|
|
2733
|
+
given_names: string | null;
|
|
2734
|
+
family_names: string | null;
|
|
2735
|
+
business_activity_code: string | null;
|
|
2736
|
+
validation?: {
|
|
2737
|
+
validated_by: "andco_core";
|
|
2738
|
+
validated_at: string;
|
|
2739
|
+
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2740
|
+
verification_id: string;
|
|
2741
|
+
} | null | undefined;
|
|
2742
|
+
}[] | null;
|
|
2743
|
+
addresses: {
|
|
2744
|
+
id: string;
|
|
2745
|
+
country: string;
|
|
2746
|
+
level1: string | null;
|
|
2747
|
+
level2: string | null;
|
|
2748
|
+
level3: string | null;
|
|
2749
|
+
street_address: string | null;
|
|
2750
|
+
label_kind: "home" | "work" | "vacation" | "other";
|
|
2751
|
+
label_name: string | null;
|
|
2752
|
+
priority: number;
|
|
2753
|
+
}[] | null;
|
|
2754
|
+
};
|
|
2755
|
+
}[];
|
|
2756
|
+
pageInfo: {
|
|
2757
|
+
startCursor: string | null;
|
|
2758
|
+
endCursor: string | null;
|
|
2759
|
+
hasPreviousPage: boolean;
|
|
2760
|
+
hasNextPage: boolean;
|
|
2761
|
+
};
|
|
2762
|
+
}, 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]>>;
|
|
2763
|
+
readAccountEvents: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2764
|
+
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>;
|
|
2765
|
+
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.">]>;
|
|
2766
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2767
|
+
readonly last: 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.">]>;
|
|
2768
|
+
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>;
|
|
2769
|
+
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.">]>;
|
|
2770
|
+
readonly bank_account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2771
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2772
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2773
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2774
|
+
readonly node: v.ObjectSchema<{
|
|
2775
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2776
|
+
readonly type: v.StringSchema<undefined>;
|
|
2777
|
+
readonly payload: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2778
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
2779
|
+
readonly occurred_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2780
|
+
}, undefined>;
|
|
2781
|
+
}, undefined>, undefined>;
|
|
2782
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2783
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2784
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2785
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2786
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2787
|
+
}, undefined>;
|
|
2788
|
+
}, undefined>, v.DescriptionAction<{
|
|
2789
|
+
edges: {
|
|
2790
|
+
cursor: string;
|
|
2791
|
+
node: {
|
|
2792
|
+
id: string;
|
|
2793
|
+
type: string;
|
|
2794
|
+
payload: {
|
|
2795
|
+
[x: string]: unknown;
|
|
2796
|
+
};
|
|
2797
|
+
version: 1;
|
|
2798
|
+
occurred_at: string;
|
|
2799
|
+
};
|
|
2800
|
+
}[];
|
|
2801
|
+
pageInfo: {
|
|
2802
|
+
startCursor: string | null;
|
|
2803
|
+
endCursor: string | null;
|
|
2804
|
+
hasPreviousPage: boolean;
|
|
2805
|
+
hasNextPage: boolean;
|
|
2806
|
+
};
|
|
2807
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, 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("./common.js").TemporarilyUnavailable]>>;
|
|
2808
|
+
readIntentEvents: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2809
|
+
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>;
|
|
2810
|
+
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.">]>;
|
|
2811
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2812
|
+
readonly last: 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.">]>;
|
|
2813
|
+
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>;
|
|
2814
|
+
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.">]>;
|
|
2815
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2816
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2817
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2818
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2819
|
+
readonly node: v.ObjectSchema<{
|
|
2820
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2821
|
+
readonly type: v.StringSchema<undefined>;
|
|
2822
|
+
readonly payload: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2823
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
2824
|
+
readonly occurred_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2825
|
+
}, undefined>;
|
|
2826
|
+
}, undefined>, undefined>;
|
|
2827
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2828
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2829
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2830
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2831
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2832
|
+
}, undefined>;
|
|
2833
|
+
}, undefined>, v.DescriptionAction<{
|
|
2834
|
+
edges: {
|
|
2835
|
+
cursor: string;
|
|
2836
|
+
node: {
|
|
2837
|
+
id: string;
|
|
2838
|
+
type: string;
|
|
2839
|
+
payload: {
|
|
2840
|
+
[x: string]: unknown;
|
|
2841
|
+
};
|
|
2842
|
+
version: 1;
|
|
2843
|
+
occurred_at: string;
|
|
2844
|
+
};
|
|
2845
|
+
}[];
|
|
2846
|
+
pageInfo: {
|
|
2847
|
+
startCursor: string | null;
|
|
2848
|
+
endCursor: string | null;
|
|
2849
|
+
hasPreviousPage: boolean;
|
|
2850
|
+
hasNextPage: boolean;
|
|
2851
|
+
};
|
|
2852
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, 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]>>;
|
|
2853
|
+
readOrganizationEvents: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2854
|
+
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>;
|
|
2855
|
+
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.">]>;
|
|
2856
|
+
readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
|
|
2857
|
+
readonly last: 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.">]>;
|
|
2858
|
+
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>;
|
|
2859
|
+
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.">]>;
|
|
2860
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2861
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2862
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2863
|
+
readonly node: v.ObjectSchema<{
|
|
2864
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2865
|
+
readonly type: v.StringSchema<undefined>;
|
|
2866
|
+
readonly payload: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2867
|
+
readonly version: v.LiteralSchema<1, undefined>;
|
|
2868
|
+
readonly occurred_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2869
|
+
}, undefined>;
|
|
2870
|
+
}, undefined>, undefined>;
|
|
2871
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2872
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2873
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2874
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2875
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2876
|
+
}, undefined>;
|
|
2877
|
+
}, undefined>, v.DescriptionAction<{
|
|
2878
|
+
edges: {
|
|
2879
|
+
cursor: string;
|
|
2880
|
+
node: {
|
|
2881
|
+
id: string;
|
|
2882
|
+
type: string;
|
|
2883
|
+
payload: {
|
|
2884
|
+
[x: string]: unknown;
|
|
2885
|
+
};
|
|
2886
|
+
version: 1;
|
|
2887
|
+
occurred_at: string;
|
|
2888
|
+
};
|
|
2889
|
+
}[];
|
|
2890
|
+
pageInfo: {
|
|
2891
|
+
startCursor: string | null;
|
|
2892
|
+
endCursor: string | null;
|
|
2893
|
+
hasPreviousPage: boolean;
|
|
2894
|
+
hasNextPage: boolean;
|
|
2895
|
+
};
|
|
2896
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2897
|
+
updateOrganizationAddress: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2898
|
+
readonly params: v.ObjectSchema<{
|
|
2899
|
+
readonly organization_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The Organization the Grant's subject names.">]>;
|
|
2900
|
+
readonly address_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2901
|
+
}, undefined>;
|
|
2902
|
+
readonly body: v.SchemaWithPipe<readonly [Omit<v.StrictObjectSchema<{
|
|
2903
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 16, undefined>]>;
|
|
2904
|
+
readonly level1: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
2905
|
+
readonly level2: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
2906
|
+
readonly level3: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
2907
|
+
readonly street_address: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, undefined>;
|
|
2908
|
+
readonly label_kind: v.PicklistSchema<["home", "work", "vacation", "other"], undefined>;
|
|
2909
|
+
readonly label_name: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>, undefined>;
|
|
2910
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -2147483648, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>, undefined>;
|
|
2911
|
+
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
2912
|
+
readonly entries: {
|
|
2913
|
+
readonly country: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 16, undefined>]>, undefined>;
|
|
2914
|
+
readonly level1: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>, undefined>;
|
|
2915
|
+
readonly level2: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>, undefined>;
|
|
2916
|
+
readonly level3: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>, undefined>;
|
|
2917
|
+
readonly street_address: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, undefined>, undefined>;
|
|
2918
|
+
readonly label_kind: v.OptionalSchema<v.PicklistSchema<["home", "work", "vacation", "other"], undefined>, undefined>;
|
|
2919
|
+
readonly label_name: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>, undefined>, undefined>;
|
|
2920
|
+
readonly priority: v.OptionalSchema<v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -2147483648, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>, undefined>, undefined>;
|
|
2921
|
+
};
|
|
2922
|
+
readonly "~standard": v.StandardProps<{
|
|
2923
|
+
country?: string | undefined;
|
|
2924
|
+
level1?: string | null | undefined;
|
|
2925
|
+
level2?: string | null | undefined;
|
|
2926
|
+
level3?: string | null | undefined;
|
|
2927
|
+
street_address?: string | null | undefined;
|
|
2928
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
2929
|
+
label_name?: string | null | undefined;
|
|
2930
|
+
priority?: number | undefined;
|
|
2931
|
+
}, {
|
|
2932
|
+
country?: string | undefined;
|
|
2933
|
+
level1?: string | null | undefined;
|
|
2934
|
+
level2?: string | null | undefined;
|
|
2935
|
+
level3?: string | null | undefined;
|
|
2936
|
+
street_address?: string | null | undefined;
|
|
2937
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
2938
|
+
label_name?: string | null | undefined;
|
|
2939
|
+
priority?: number | undefined;
|
|
2940
|
+
}>;
|
|
2941
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
2942
|
+
country?: string | undefined;
|
|
2943
|
+
level1?: string | null | undefined;
|
|
2944
|
+
level2?: string | null | undefined;
|
|
2945
|
+
level3?: string | null | undefined;
|
|
2946
|
+
street_address?: string | null | undefined;
|
|
2947
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
2948
|
+
label_name?: string | null | undefined;
|
|
2949
|
+
priority?: number | undefined;
|
|
2950
|
+
}, v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 128> | v.PicklistIssue | v.NumberIssue | v.IntegerIssue<number> | v.StrictObjectIssue | v.MaxValueIssue<number, 2147483647> | v.MaxLengthIssue<string, 16> | v.MaxLengthIssue<string, 200> | v.MaxLengthIssue<string, 100> | v.MinValueIssue<number, -2147483648>>;
|
|
2951
|
+
readonly "~types"?: {
|
|
2952
|
+
readonly input: {
|
|
2953
|
+
country?: string | undefined;
|
|
2954
|
+
level1?: string | null | undefined;
|
|
2955
|
+
level2?: string | null | undefined;
|
|
2956
|
+
level3?: string | null | undefined;
|
|
2957
|
+
street_address?: string | null | undefined;
|
|
2958
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
2959
|
+
label_name?: string | null | undefined;
|
|
2960
|
+
priority?: number | undefined;
|
|
2961
|
+
};
|
|
2962
|
+
readonly output: {
|
|
2963
|
+
country?: string | undefined;
|
|
2964
|
+
level1?: string | null | undefined;
|
|
2965
|
+
level2?: string | null | undefined;
|
|
2966
|
+
level3?: string | null | undefined;
|
|
2967
|
+
street_address?: string | null | undefined;
|
|
2968
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
2969
|
+
label_name?: string | null | undefined;
|
|
2970
|
+
priority?: number | undefined;
|
|
2971
|
+
};
|
|
2972
|
+
readonly issue: v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 128> | v.PicklistIssue | v.NumberIssue | v.IntegerIssue<number> | v.StrictObjectIssue | v.MaxValueIssue<number, 2147483647> | v.MaxLengthIssue<string, 16> | v.MaxLengthIssue<string, 200> | v.MaxLengthIssue<string, 100> | v.MinValueIssue<number, -2147483648>;
|
|
2973
|
+
} | undefined;
|
|
2974
|
+
}, v.DescriptionAction<{
|
|
2975
|
+
country?: string | undefined;
|
|
2976
|
+
level1?: string | null | undefined;
|
|
2977
|
+
level2?: string | null | undefined;
|
|
2978
|
+
level3?: string | null | undefined;
|
|
2979
|
+
street_address?: string | null | undefined;
|
|
2980
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
2981
|
+
label_name?: string | null | undefined;
|
|
2982
|
+
priority?: number | undefined;
|
|
2983
|
+
}, "At least one address field must be provided.">]>;
|
|
2984
|
+
}, undefined>, v.ObjectSchema<{
|
|
2985
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2986
|
+
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable, typeof import("./common.js").InvalidRequest, typeof import("./addresses.js").AddressNotUpdated, typeof import("./common.js").PayloadTooLarge]>>;
|
|
2987
|
+
updateProfileAddress: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2988
|
+
readonly params: v.ObjectSchema<{
|
|
2989
|
+
readonly profile_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Profile the Grant's subject names.">]>;
|
|
2990
|
+
readonly address_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2991
|
+
}, undefined>;
|
|
2992
|
+
readonly body: v.SchemaWithPipe<readonly [Omit<v.StrictObjectSchema<{
|
|
2993
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 16, undefined>]>;
|
|
2994
|
+
readonly level1: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
2995
|
+
readonly level2: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
2996
|
+
readonly level3: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>;
|
|
2997
|
+
readonly street_address: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, undefined>;
|
|
2998
|
+
readonly label_kind: v.PicklistSchema<["home", "work", "vacation", "other"], undefined>;
|
|
2999
|
+
readonly label_name: v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>, undefined>;
|
|
3000
|
+
readonly priority: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -2147483648, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>, undefined>;
|
|
3001
|
+
}, undefined>, "~types" | "~run" | "~standard" | "entries"> & {
|
|
3002
|
+
readonly entries: {
|
|
3003
|
+
readonly country: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 16, undefined>]>, undefined>;
|
|
3004
|
+
readonly level1: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>, undefined>;
|
|
3005
|
+
readonly level2: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>, undefined>;
|
|
3006
|
+
readonly level3: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 128, undefined>]>, undefined>, undefined>, undefined>;
|
|
3007
|
+
readonly street_address: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>, undefined>, undefined>;
|
|
3008
|
+
readonly label_kind: v.OptionalSchema<v.PicklistSchema<["home", "work", "vacation", "other"], undefined>, undefined>;
|
|
3009
|
+
readonly label_name: v.OptionalSchema<v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>, undefined>, undefined>, undefined>;
|
|
3010
|
+
readonly priority: v.OptionalSchema<v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, -2147483648, undefined>, v.MaxValueAction<number, 2147483647, undefined>]>, undefined>, undefined>;
|
|
3011
|
+
};
|
|
3012
|
+
readonly "~standard": v.StandardProps<{
|
|
3013
|
+
country?: string | undefined;
|
|
3014
|
+
level1?: string | null | undefined;
|
|
3015
|
+
level2?: string | null | undefined;
|
|
3016
|
+
level3?: string | null | undefined;
|
|
3017
|
+
street_address?: string | null | undefined;
|
|
3018
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
3019
|
+
label_name?: string | null | undefined;
|
|
3020
|
+
priority?: number | undefined;
|
|
3021
|
+
}, {
|
|
3022
|
+
country?: string | undefined;
|
|
3023
|
+
level1?: string | null | undefined;
|
|
3024
|
+
level2?: string | null | undefined;
|
|
3025
|
+
level3?: string | null | undefined;
|
|
3026
|
+
street_address?: string | null | undefined;
|
|
3027
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
3028
|
+
label_name?: string | null | undefined;
|
|
3029
|
+
priority?: number | undefined;
|
|
3030
|
+
}>;
|
|
3031
|
+
readonly "~run": (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
3032
|
+
country?: string | undefined;
|
|
3033
|
+
level1?: string | null | undefined;
|
|
3034
|
+
level2?: string | null | undefined;
|
|
3035
|
+
level3?: string | null | undefined;
|
|
3036
|
+
street_address?: string | null | undefined;
|
|
3037
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
3038
|
+
label_name?: string | null | undefined;
|
|
3039
|
+
priority?: number | undefined;
|
|
3040
|
+
}, v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 128> | v.PicklistIssue | v.NumberIssue | v.IntegerIssue<number> | v.StrictObjectIssue | v.MaxValueIssue<number, 2147483647> | v.MaxLengthIssue<string, 16> | v.MaxLengthIssue<string, 200> | v.MaxLengthIssue<string, 100> | v.MinValueIssue<number, -2147483648>>;
|
|
3041
|
+
readonly "~types"?: {
|
|
3042
|
+
readonly input: {
|
|
3043
|
+
country?: string | undefined;
|
|
3044
|
+
level1?: string | null | undefined;
|
|
3045
|
+
level2?: string | null | undefined;
|
|
3046
|
+
level3?: string | null | undefined;
|
|
3047
|
+
street_address?: string | null | undefined;
|
|
3048
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
3049
|
+
label_name?: string | null | undefined;
|
|
3050
|
+
priority?: number | undefined;
|
|
3051
|
+
};
|
|
3052
|
+
readonly output: {
|
|
3053
|
+
country?: string | undefined;
|
|
3054
|
+
level1?: string | null | undefined;
|
|
3055
|
+
level2?: string | null | undefined;
|
|
3056
|
+
level3?: string | null | undefined;
|
|
3057
|
+
street_address?: string | null | undefined;
|
|
3058
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
3059
|
+
label_name?: string | null | undefined;
|
|
3060
|
+
priority?: number | undefined;
|
|
3061
|
+
};
|
|
3062
|
+
readonly issue: v.StringIssue | v.MinLengthIssue<string, 1> | v.MaxLengthIssue<string, 128> | v.PicklistIssue | v.NumberIssue | v.IntegerIssue<number> | v.StrictObjectIssue | v.MaxValueIssue<number, 2147483647> | v.MaxLengthIssue<string, 16> | v.MaxLengthIssue<string, 200> | v.MaxLengthIssue<string, 100> | v.MinValueIssue<number, -2147483648>;
|
|
3063
|
+
} | undefined;
|
|
3064
|
+
}, v.DescriptionAction<{
|
|
3065
|
+
country?: string | undefined;
|
|
3066
|
+
level1?: string | null | undefined;
|
|
3067
|
+
level2?: string | null | undefined;
|
|
3068
|
+
level3?: string | null | undefined;
|
|
3069
|
+
street_address?: string | null | undefined;
|
|
3070
|
+
label_kind?: "home" | "work" | "vacation" | "other" | undefined;
|
|
3071
|
+
label_name?: string | null | undefined;
|
|
3072
|
+
priority?: number | undefined;
|
|
3073
|
+
}, "At least one address field must be provided.">]>;
|
|
3074
|
+
}, undefined>, v.ObjectSchema<{
|
|
3075
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3076
|
+
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable, typeof import("./common.js").InvalidRequest, typeof import("./addresses.js").AddressNotUpdated, typeof import("./common.js").PayloadTooLarge]>>;
|
|
3077
|
+
rejectIntent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
3078
|
+
readonly params: v.ObjectSchema<{
|
|
3079
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3080
|
+
}, undefined>;
|
|
3081
|
+
readonly body: v.StrictObjectSchema<{
|
|
3082
|
+
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
3083
|
+
}, undefined>;
|
|
3084
|
+
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
3085
|
+
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
3086
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "failed"], undefined>, v.DescriptionAction<"completed" | "closed" | "failed" | "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.">]>;
|
|
3087
|
+
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
3088
|
+
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
3089
|
+
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3090
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3091
|
+
}, undefined>, undefined>;
|
|
3092
|
+
readonly termination: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.ObjectSchema<{
|
|
3093
|
+
readonly status: v.StringSchema<undefined>;
|
|
3094
|
+
readonly at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
3095
|
+
readonly total: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
3096
|
+
}, undefined>, undefined>, undefined>, v.DescriptionAction<{
|
|
3097
|
+
status: string;
|
|
3098
|
+
at: string | null;
|
|
3099
|
+
total: string | null;
|
|
3100
|
+
} | null | undefined, "First terminal state and total, unchanged by later attribution corrections. Legacy unknown totals remain null.">]>;
|
|
3101
|
+
readonly completion: v.NullableSchema<v.ObjectSchema<{
|
|
3102
|
+
readonly completed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3103
|
+
readonly total: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3104
|
+
}, undefined>, undefined>;
|
|
3105
|
+
readonly destination: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3106
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
3107
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3108
|
+
readonly number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>;
|
|
3109
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
3110
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Null when the holder has no identity document on file.">]>;
|
|
3111
|
+
readonly holder_name: v.StringSchema<undefined>;
|
|
3112
|
+
}, undefined>, v.DescriptionAction<{
|
|
3113
|
+
type: "account";
|
|
3114
|
+
id: string;
|
|
3115
|
+
number: string;
|
|
3116
|
+
account_type: "checking" | "debit" | "savings";
|
|
3117
|
+
holder_id: string | null;
|
|
3118
|
+
holder_name: string;
|
|
3119
|
+
}, "The Andco account a deposit lands on: the `{ type: \"account\", id }` matcher plus what a payer at another bank types to pay into it, holder included: `holder_id` is the holder's RUT and `holder_name` their name, as a Chilean transfer shows them to whoever sends the money.">]>;
|
|
3120
|
+
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3121
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3122
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
3123
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
3124
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Explicitly confirmed target; `value` applies until confirmation.">]>;
|
|
3125
|
+
readonly frozen_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "First funding confirmation or attribution freezes the target permanently.">]>;
|
|
3126
|
+
}, undefined>, v.DescriptionAction<{
|
|
3127
|
+
currency: "CLP";
|
|
3128
|
+
value: string;
|
|
3129
|
+
editable: boolean;
|
|
3130
|
+
confirmed: string | null;
|
|
3131
|
+
frozen_at: string | null;
|
|
3132
|
+
}, "The amount a deposit asks for. `value` is the request's, `confirmed` the payer's own target when `editable`; what arrived is `progress.credited`, never these.">]>, undefined>;
|
|
3133
|
+
readonly progress: v.StrictObjectSchema<{
|
|
3134
|
+
readonly credited: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3135
|
+
readonly remaining: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>;
|
|
3136
|
+
}, undefined>;
|
|
3137
|
+
readonly transactions: v.ArraySchema<v.StrictObjectSchema<{
|
|
3138
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3139
|
+
readonly received_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3140
|
+
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3141
|
+
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
3142
|
+
readonly receipt_time_source: v.PicklistSchema<["bank_timestamp", "unknown"], undefined>;
|
|
3143
|
+
readonly sender_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Name of the account holder that sent the money, exactly as the bank reported it.">]>;
|
|
3144
|
+
readonly sender_national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "National id (RUT) of the sender, as the bank reported it.">]>;
|
|
3145
|
+
readonly sender_bank_name: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>, v.DescriptionAction<string | null, "Display name of the sender's bank.">]>;
|
|
3146
|
+
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
3147
|
+
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
3148
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3149
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3150
|
+
readonly transaction_id: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
3151
|
+
}, undefined>, undefined>;
|
|
3152
|
+
readonly fee: v.StrictObjectSchema<{
|
|
3153
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3154
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
3155
|
+
}, undefined>;
|
|
3156
|
+
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
3157
|
+
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.">]>;
|
|
3158
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3159
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3160
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3161
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
3162
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
3163
|
+
}, undefined>, v.DescriptionAction<{
|
|
3164
|
+
value: string;
|
|
3165
|
+
editable: boolean;
|
|
3166
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
3167
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
3168
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3169
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3170
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3171
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3172
|
+
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
3173
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
3174
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
3175
|
+
readonly source: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3176
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
3177
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3178
|
+
}, undefined>, v.DescriptionAction<{
|
|
3179
|
+
type: "account_key";
|
|
3180
|
+
accountKey: string;
|
|
3181
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3182
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
3183
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3184
|
+
}, undefined>, v.DescriptionAction<{
|
|
3185
|
+
type: "account";
|
|
3186
|
+
id: string;
|
|
3187
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
3188
|
+
type: "account_key";
|
|
3189
|
+
accountKey: string;
|
|
3190
|
+
} | {
|
|
3191
|
+
type: "account";
|
|
3192
|
+
id: string;
|
|
3193
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>, undefined>, v.DescriptionAction<{
|
|
3194
|
+
type: "account_key";
|
|
3195
|
+
accountKey: string;
|
|
3196
|
+
} | {
|
|
3197
|
+
type: "account";
|
|
3198
|
+
id: string;
|
|
3199
|
+
} | null, "Null while the person has yet to pick where the money leaves from. An AccountKey is answered back as an AccountKey, because it stays unresolved until execution.">]>;
|
|
3200
|
+
readonly destination: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
3201
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
3202
|
+
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
3203
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3204
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
3205
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
3206
|
+
readonly type: v.LiteralSchema<"account", undefined>;
|
|
3207
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3208
|
+
}, undefined>, v.StrictObjectSchema<{
|
|
3209
|
+
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
3210
|
+
readonly type: v.LiteralSchema<"external", undefined>;
|
|
3211
|
+
readonly bank_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3212
|
+
readonly account_type: v.PicklistSchema<["checking", "debit", "savings"], undefined>;
|
|
3213
|
+
readonly account_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
3214
|
+
readonly holder_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
3215
|
+
readonly holder_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`).">]>;
|
|
3216
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
3217
|
+
editable: false;
|
|
3218
|
+
type: "account_key";
|
|
3219
|
+
accountKey: string;
|
|
3220
|
+
} | {
|
|
3221
|
+
editable: false;
|
|
3222
|
+
type: "account";
|
|
3223
|
+
id: string;
|
|
3224
|
+
} | {
|
|
3225
|
+
editable: false;
|
|
3226
|
+
type: "external";
|
|
3227
|
+
bank_id: string;
|
|
3228
|
+
account_type: "checking" | "debit" | "savings";
|
|
3229
|
+
account_id: string;
|
|
3230
|
+
holder_id: string;
|
|
3231
|
+
holder_name: string;
|
|
3232
|
+
}, "Where a transfer's money lands when it is named, in the request and in the answered Intent alike. A named destination is always locked on the confirmation screen: `editable` only admits `false`, and `editable: true` fails at creation with `invalid_request`. To let the person choose where the money goes, the request says `destination: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a destination the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
3233
|
+
editable: false;
|
|
3234
|
+
type: "account_key";
|
|
3235
|
+
accountKey: string;
|
|
3236
|
+
} | {
|
|
3237
|
+
editable: false;
|
|
3238
|
+
type: "account";
|
|
3239
|
+
id: string;
|
|
3240
|
+
} | {
|
|
3241
|
+
editable: false;
|
|
3242
|
+
type: "external";
|
|
3243
|
+
bank_id: string;
|
|
3244
|
+
account_type: "checking" | "debit" | "savings";
|
|
3245
|
+
account_id: string;
|
|
3246
|
+
holder_id: string;
|
|
3247
|
+
holder_name: string;
|
|
3248
|
+
} | null, "Null while the person has yet to complete where the money lands, when the request left it to the screen. Once she confirms, the account she wrote is answered back here, locked.">]>;
|
|
3249
|
+
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3250
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3251
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
3252
|
+
readonly editable: v.BooleanSchema<undefined>;
|
|
3253
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | 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.">]>;
|
|
3254
|
+
}, undefined>, v.DescriptionAction<{
|
|
3255
|
+
currency: "CLP";
|
|
3256
|
+
value: string;
|
|
3257
|
+
editable: boolean;
|
|
3258
|
+
confirmed: string | null;
|
|
3259
|
+
}, "The amount a transfer orders, as it is answered. `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.">]>;
|
|
3260
|
+
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3261
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3262
|
+
readonly value: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3263
|
+
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3264
|
+
}, undefined>, v.DescriptionAction<{
|
|
3265
|
+
currency: "CLP";
|
|
3266
|
+
value: string;
|
|
3267
|
+
at: string;
|
|
3268
|
+
}, "The money a transfer actually moved and when it settled. Present only once the transfer `succeeded`; null before, and null for ever when it fails, is rejected, cancelled or expires.">]>, undefined>;
|
|
3269
|
+
readonly fee: v.StrictObjectSchema<{
|
|
3270
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3271
|
+
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
3272
|
+
}, undefined>;
|
|
3273
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["bank_verification_required", "source_account_required"], undefined>, undefined>, v.DescriptionAction<"bank_verification_required" | "source_account_required" | undefined, "Present on every read of the Intent (GET, list, creation answers and signed-instruction answers) while it is `requires_action` and only a person can release it; absent when a credential may release it, and absent once the Intent is no longer `requires_action`. The same two words `409 interaction_required` gives as `reason` when a credential tries `POST /intents/{intent_id}/approve`. `bank_verification_required`: the transfer leaves its holder's own accounts and the bank asks the person to confirm it at `authorization_url` with their web PIN and an SMS code; the Intent becomes `processing.confirmed` only when the bank accepts it. A transfer created with `destination: null` reads this way until the person completes it, because what she writes there always leaves her accounts. `source_account_required`: the person still picks the account the money leaves from.">]>;
|
|
3274
|
+
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.">]>;
|
|
3275
|
+
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.">]>;
|
|
3276
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3277
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3278
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3279
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
3280
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
3281
|
+
}, undefined>, v.DescriptionAction<{
|
|
3282
|
+
value: string;
|
|
3283
|
+
editable: boolean;
|
|
3284
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
3285
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
3286
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3287
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3288
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3289
|
+
}, undefined>, v.DescriptionAction<{
|
|
3290
|
+
type: "transfer";
|
|
3291
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
3292
|
+
signed: boolean;
|
|
3293
|
+
source: {
|
|
3294
|
+
type: "account_key";
|
|
3295
|
+
accountKey: string;
|
|
3296
|
+
} | {
|
|
3297
|
+
type: "account";
|
|
3298
|
+
id: string;
|
|
3299
|
+
} | null;
|
|
3300
|
+
destination: {
|
|
3301
|
+
editable: false;
|
|
3302
|
+
type: "account_key";
|
|
3303
|
+
accountKey: string;
|
|
3304
|
+
} | {
|
|
3305
|
+
editable: false;
|
|
3306
|
+
type: "account";
|
|
3307
|
+
id: string;
|
|
3308
|
+
} | {
|
|
3309
|
+
editable: false;
|
|
3310
|
+
type: "external";
|
|
3311
|
+
bank_id: string;
|
|
3312
|
+
account_type: "checking" | "debit" | "savings";
|
|
3313
|
+
account_id: string;
|
|
3314
|
+
holder_id: string;
|
|
3315
|
+
holder_name: string;
|
|
3316
|
+
} | null;
|
|
3317
|
+
amount: {
|
|
3318
|
+
currency: "CLP";
|
|
3319
|
+
value: string;
|
|
3320
|
+
editable: boolean;
|
|
3321
|
+
confirmed: string | null;
|
|
3322
|
+
};
|
|
3323
|
+
settled: {
|
|
3324
|
+
currency: "CLP";
|
|
3325
|
+
value: string;
|
|
3326
|
+
at: string;
|
|
3327
|
+
} | null;
|
|
3328
|
+
fee: {
|
|
3329
|
+
currency: "CLP";
|
|
3330
|
+
amount: "0";
|
|
3331
|
+
};
|
|
3332
|
+
interaction_reason?: "bank_verification_required" | "source_account_required" | undefined;
|
|
3333
|
+
expires_at: string | null;
|
|
3334
|
+
expires_in_seconds: number | null;
|
|
3335
|
+
id: string;
|
|
3336
|
+
resource_server: string;
|
|
3337
|
+
note?: {
|
|
3338
|
+
value: string;
|
|
3339
|
+
editable: boolean;
|
|
3340
|
+
} | undefined;
|
|
3341
|
+
metadata: {
|
|
3342
|
+
[x: string]: unknown;
|
|
3343
|
+
};
|
|
3344
|
+
server_time: string;
|
|
3345
|
+
created_at: string;
|
|
3346
|
+
authorization_url: string;
|
|
3347
|
+
}, "Authoritative Project-facing state of a transfer. `source` and `destination` answer in the same matcher vocabulary as the request. `amount.value` is the proposal of the request, `amount.confirmed` the amount the person confirmed (null until then; it is what moves) and `settled` what it moved: reconciliation reads `settled`, which stays null until the money moved. `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3348
|
+
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
3349
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
3350
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
3351
|
+
readonly account: v.StrictObjectSchema<{
|
|
3352
|
+
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3353
|
+
readonly name: v.StringSchema<undefined>;
|
|
3354
|
+
readonly upsert: v.BooleanSchema<undefined>;
|
|
3355
|
+
readonly bank_account_id: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>;
|
|
3356
|
+
}, undefined>;
|
|
3357
|
+
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.">]>;
|
|
3358
|
+
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.">]>;
|
|
3359
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3360
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3361
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3362
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
3363
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
3364
|
+
}, undefined>, v.DescriptionAction<{
|
|
3365
|
+
value: string;
|
|
3366
|
+
editable: boolean;
|
|
3367
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
3368
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
3369
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3370
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3371
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3372
|
+
}, undefined>, v.DescriptionAction<{
|
|
3373
|
+
type: "account_opening";
|
|
3374
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
3375
|
+
signed: boolean;
|
|
3376
|
+
account: {
|
|
3377
|
+
accountKey: string;
|
|
3378
|
+
name: string;
|
|
3379
|
+
upsert: boolean;
|
|
3380
|
+
bank_account_id: string | null;
|
|
3381
|
+
};
|
|
3382
|
+
expires_at: string | null;
|
|
3383
|
+
expires_in_seconds: number | null;
|
|
3384
|
+
id: string;
|
|
3385
|
+
resource_server: string;
|
|
3386
|
+
note?: {
|
|
3387
|
+
value: string;
|
|
3388
|
+
editable: boolean;
|
|
3389
|
+
} | undefined;
|
|
3390
|
+
metadata: {
|
|
3391
|
+
[x: string]: unknown;
|
|
3392
|
+
};
|
|
3393
|
+
server_time: string;
|
|
3394
|
+
created_at: string;
|
|
3395
|
+
authorization_url: string;
|
|
3396
|
+
}, "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 the core 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<{
|
|
3397
|
+
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
3398
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing.confirmed", "processing.settling", "processing.reversing", "processing.reconciling", "processing.opening", "processing.closing", "succeeded", "failed", "failed.insufficient_funds", "failed.fraud_rejected", "failed.bank_refused", "failed.bank_rejected", "failed.bank_review_required", "failed.own_account_transfer_not_implemented", "failed.bank_authorization_denied", "failed.bank_holder_without_account", "failed.bank_account_limit_reached", "failed.account_opening_not_implemented", "failed.bank_core_unavailable", "failed.bank_account_save_failed", "failed.bank_connection_unavailable", "failed.bank_account_quota_exceeded", "failed.account_key_taken", "failed.bank_account_not_found", "failed.bank_account_balance_not_zero", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "rejected", "expired"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `processing`, `succeeded`, `failed`, `cancelled`, `rejected` or `expired`, and it is what tells whether the Intent can still change: `requires_action` and `processing` 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; an exhaustive `switch` over the enum below stops being exhaustive the first time a detail is added.\n\nWhere an Intent stands. `failed` says why, and whether money moved. A transfer that leaves its holder's own accounts (to another bank or to another Andco customer) is `requires_action` from creation for as long as a person still owes the bank a proof, and every read of it carries `interaction_reason: bank_verification_required`; pressing Confirm, typing the web PIN or typing the SMS code does not change its status. It becomes `processing.confirmed`, and `transfer.confirmed` is published once, when the bank accepts the transfer; from then on nobody has to do anything and the outcome arrives as `succeeded` or `failed.bank_rejected`. A challenge the person abandons, lets run out or exhausts with wrong answers leaves the Intent `requires_action` (the person confirms again and gets a new code) until its own expiry, `expired`. A transfer between two accounts of the same holder has no challenge: it is `processing.confirmed` from its release, while the server asks the bank again under the same key. In both, `processing.confirmed` means that the bank holds the command and nobody has to do anything. `processing.settling`, `processing.reversing` and `processing.reconciling` are not emitted. While the bank has been asked and its answer is not yet known (normally one request) the Intent still reads `requires_action`, does not read `expired` even if its deadline passes, and `cancel` and `reject` answer `409 invalid_intent_state`. Transfers: `failed.fraud_rejected` (the bank's fraud engine refused it before accepting, straight from `requires_action`), `failed.bank_refused` (the bank or its ledger refused the request, before accepting it when the transfer leaves its holder; for a transfer between own accounts, for example, the destination is not an active account of the same holder), `failed.bank_rejected` (the bank accepted it and the receiving bank, or the ledger, rejected it; the debit is undone by the bank), `failed.bank_review_required` (a transfer between own accounts the bank stopped half way or gave no usable answer for a day: money may have left the source account without reaching the destination, the bank must review it, and it is never retried under a new Intent) and `failed.own_account_transfer_not_implemented` (the bank does not serve transfers between own accounts). In `failed.fraud_rejected`, `failed.bank_refused` and `failed.own_account_transfer_not_implemented` no money moved; in `failed.bank_rejected` nothing stays moved. Account openings: `failed.bank_authorization_denied` (the bank does not let that person open accounts for that company), `failed.bank_holder_without_account`, `failed.bank_account_limit_reached`, `failed.bank_connection_unavailable` (no bank connection to a company), `failed.account_opening_not_implemented` (the bank does not serve openings), `failed.bank_core_unavailable`, `failed.bank_account_save_failed`, `failed.bank_account_quota_exceeded` (the holder already has as many accounts as allowed) and `failed.account_key_taken`. An opening that failed opened no account in any of them. Closures, which are not served today: `failed.bank_account_not_found` and `failed.bank_account_balance_not_zero`.\n\n`failed.<code>` names the reason. The list holds every code Andco records, and it may grow: a `failed.` value outside this list is a failure like any other.">]>;
|
|
3399
|
+
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
3400
|
+
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3401
|
+
type: v.LiteralSchema<"account_key", undefined>;
|
|
3402
|
+
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3403
|
+
}, undefined>, v.DescriptionAction<{
|
|
3404
|
+
type: "account_key";
|
|
3405
|
+
accountKey: string;
|
|
3406
|
+
}, "One Andco account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3407
|
+
type: v.LiteralSchema<"account", undefined>;
|
|
3408
|
+
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3409
|
+
}, undefined>, v.DescriptionAction<{
|
|
3410
|
+
type: "account";
|
|
3411
|
+
id: string;
|
|
3412
|
+
}, "One Andco account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
3413
|
+
type: "account_key";
|
|
3414
|
+
accountKey: string;
|
|
3415
|
+
} | {
|
|
3416
|
+
type: "account";
|
|
3417
|
+
id: string;
|
|
3418
|
+
}, "One Andco account of the Grant's subject, in the account matcher vocabulary: by Account Key (`{ type: \"account_key\", accountKey }`) or by identifier (`{ type: \"account\", id }`). It is where a transfer's money leaves from, where a deposit lands and the account a closure closes. An AccountKey is answered back as an AccountKey: it resolves to an account at execution.">]>;
|
|
3419
|
+
readonly resolved_account_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The account the reference resolved to, once resolution has happened, whether or not the closure itself has settled yet.">]>;
|
|
3420
|
+
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3421
|
+
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>, v.DescriptionAction<number, "Remaining actionable lifetime at server_time; zero for finite terminal Intents.">]>;
|
|
3422
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3423
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3424
|
+
readonly note: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3425
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed bank reference. An empty reference is allowed.">]>;
|
|
3426
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
3427
|
+
}, undefined>, v.DescriptionAction<{
|
|
3428
|
+
value: string;
|
|
3429
|
+
editable: boolean;
|
|
3430
|
+
}, "The bank reference a request asks for. `editable: true` lets the person who confirms change it; each bank operation freezes its own final note at confirmation.">]>, undefined>;
|
|
3431
|
+
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
3432
|
+
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3433
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3434
|
+
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3435
|
+
}, undefined>, v.DescriptionAction<{
|
|
3436
|
+
type: "account_closure";
|
|
3437
|
+
status: "succeeded" | "failed" | "cancelled" | "rejected" | "expired" | "requires_action" | "processing.confirmed" | "processing.settling" | "processing.reversing" | "processing.reconciling" | "processing.opening" | "processing.closing" | "failed.insufficient_funds" | "failed.fraud_rejected" | "failed.bank_refused" | "failed.bank_rejected" | "failed.bank_review_required" | "failed.own_account_transfer_not_implemented" | "failed.bank_authorization_denied" | "failed.bank_holder_without_account" | "failed.bank_account_limit_reached" | "failed.account_opening_not_implemented" | "failed.bank_core_unavailable" | "failed.bank_account_save_failed" | "failed.bank_connection_unavailable" | "failed.bank_account_quota_exceeded" | "failed.account_key_taken" | "failed.bank_account_not_found" | "failed.bank_account_balance_not_zero" | "cancelled.grant_revoked" | "cancelled.grant_expired";
|
|
3438
|
+
signed: boolean;
|
|
3439
|
+
account: {
|
|
3440
|
+
type: "account_key";
|
|
3441
|
+
accountKey: string;
|
|
3442
|
+
} | {
|
|
3443
|
+
type: "account";
|
|
3444
|
+
id: string;
|
|
3445
|
+
};
|
|
3446
|
+
resolved_account_id: string | null;
|
|
3447
|
+
expires_at: string;
|
|
3448
|
+
expires_in_seconds: number;
|
|
3449
|
+
id: string;
|
|
3450
|
+
resource_server: string;
|
|
3451
|
+
note?: {
|
|
3452
|
+
value: string;
|
|
3453
|
+
editable: boolean;
|
|
3454
|
+
} | undefined;
|
|
3455
|
+
metadata: {
|
|
3456
|
+
[x: string]: unknown;
|
|
3457
|
+
};
|
|
3458
|
+
server_time: string;
|
|
3459
|
+
created_at: string;
|
|
3460
|
+
authorization_url: string;
|
|
3461
|
+
}, "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("./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("./intents.js").IntentExpired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
3462
|
+
verifySignature: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3463
|
+
readonly key_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "RFC 7638 JWK Thumbprint of the Signing Key that verified the assertion.">]>;
|
|
3464
|
+
readonly algorithm: v.PicklistSchema<["RS256", "ES256"], undefined>;
|
|
3465
|
+
readonly claims: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
3466
|
+
}, undefined>, v.DescriptionAction<{
|
|
3467
|
+
key_id: string;
|
|
3468
|
+
algorithm: "ES256" | "RS256";
|
|
3469
|
+
claims: {
|
|
3470
|
+
[x: string]: unknown;
|
|
3471
|
+
};
|
|
3472
|
+
}, "The verified `kid`, algorithm and claims of a Signed Instruction that verified against the presenting OAuth Client's registered keys. `claims` is the decoded JWT payload as signed -- this operation checks only `exp` and `jti` structurally and otherwise passes every claim through untouched, so it never narrows to one Intent family's claim schema.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./signatures.js").UnverifiedSignedInstruction, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
3473
|
+
};
|
|
3474
|
+
/**
|
|
3475
|
+
* The Valibot schemas the OpenAPI document writes once under `components.schemas`, by name, and
|
|
3476
|
+
* refers to wherever an operation uses them. A schema listed here keeps its name in the document;
|
|
3477
|
+
* one that is not is written inline.
|
|
3478
|
+
*/
|
|
3479
|
+
export declare const components: Record<string, v.GenericSchema>;
|
|
3480
|
+
//# sourceMappingURL=contract.d.ts.map
|