@andco/protocol 0.0.14 → 0.1.0-ti.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/api-errors.d.ts +9 -9
- package/dist/api-errors.js +9 -9
- package/dist/authorization-preparation.d.ts +1 -1
- package/dist/authorization-preparation.js +2 -2
- package/dist/authorization.d.ts +1 -1
- package/dist/authorization.js +1 -1
- package/dist/consent.d.ts +2 -2
- package/dist/consent.js +2 -2
- package/dist/errors.d.ts +10 -10
- package/dist/errors.js +10 -10
- 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 +452 -880
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +164 -127
- package/dist/intent-status.d.ts +5 -6
- package/dist/intent-status.d.ts.map +1 -1
- package/dist/intent-status.js +12 -7
- package/dist/miniapp-manifest.d.ts +3 -3
- package/dist/miniapp-manifest.js +1 -1
- package/dist/native-intent.d.ts +82 -68
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +137 -84
- package/dist/native.d.ts +1 -1
- package/dist/rar/account-matchers.d.ts +35 -30
- package/dist/rar/account-matchers.d.ts.map +1 -1
- package/dist/rar/account-matchers.js +27 -21
- package/dist/rar/bank.d.ts +357 -85
- package/dist/rar/bank.d.ts.map +1 -1
- package/dist/rar/bank.js +43 -5
- package/dist/rar/catalog.d.ts +174 -49
- package/dist/rar/catalog.d.ts.map +1 -1
- package/dist/rar/catalog.js +6 -6
- package/dist/rar/detail.d.ts +1 -1
- package/dist/rar/detail.js +1 -1
- package/dist/rar/json-schemas.generated.d.ts +1 -1
- package/dist/rar/json-schemas.generated.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.js +393 -21
- package/dist/rar/money.d.ts +1 -1
- package/dist/rar/money.js +1 -1
- package/dist/rar/subject-data.d.ts +1 -1
- package/dist/rar/subject-data.js +1 -1
- package/dist/rar/subject.d.ts +1 -1
- package/dist/rar/subject.js +1 -1
- package/dist/rest/accounts.d.ts +28 -28
- package/dist/rest/accounts.d.ts.map +1 -1
- package/dist/rest/accounts.js +22 -22
- package/dist/rest/api-error.d.ts +1 -1
- package/dist/rest/api-error.js +1 -1
- package/dist/rest/catalog.d.ts +3 -3
- package/dist/rest/catalog.js +2 -2
- package/dist/rest/common.d.ts +3 -3
- package/dist/rest/common.js +3 -3
- package/dist/rest/contract.d.ts +1183 -547
- package/dist/rest/contract.d.ts.map +1 -1
- package/dist/rest/contract.js +21 -5
- package/dist/rest/events.d.ts +1 -1
- package/dist/rest/events.d.ts.map +1 -1
- package/dist/rest/events.js +2 -2
- package/dist/rest/identity.d.ts +22 -22
- package/dist/rest/identity.d.ts.map +1 -1
- package/dist/rest/identity.js +5 -5
- package/dist/rest/index.d.ts +1 -0
- package/dist/rest/index.d.ts.map +1 -1
- package/dist/rest/index.js +1 -0
- package/dist/rest/intents.d.ts +973 -743
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +112 -89
- package/dist/rest/signatures.d.ts +25 -5
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +52 -0
- package/dist/rest/transfers.d.ts +988 -0
- package/dist/rest/transfers.d.ts.map +1 -0
- package/dist/rest/transfers.js +142 -0
- package/dist/scopes.d.ts +1 -1
- package/dist/signing.d.ts +17 -3
- package/dist/signing.d.ts.map +1 -1
- package/dist/signing.js +8 -1
- package/dist/transfer.d.ts +399 -0
- package/dist/transfer.d.ts.map +1 -0
- package/dist/transfer.js +313 -0
- package/dist/transport/financial-events.d.ts +82 -27
- package/dist/transport/financial-events.d.ts.map +1 -1
- package/dist/transport/financial-events.js +34 -0
- package/dist/transport/generated/oauth-api.d.ts +1420 -333
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +29 -13
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/intents.js +1 -1
- package/dist/transport/rest.d.ts +5 -5
- package/dist/urls.d.ts +2 -2
- package/dist/urls.js +3 -3
- package/dist/userinfo.d.ts +2 -2
- package/dist/userinfo.js +2 -2
- package/dist/webhooks.d.ts +16 -16
- package/dist/webhooks.js +14 -14
- package/dist/window-features.d.ts +2 -2
- package/dist/window-features.js +2 -2
- package/package.json +2 -2
package/dist/rest/contract.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as v from "valibot";
|
|
2
2
|
/**
|
|
3
|
-
* The operations of the
|
|
3
|
+
* The operations of the AndCo OAuth Resource API, each under its `operationId`. `@andco/protocol`
|
|
4
4
|
* declares them once (ADR 0038): Platform implements them with `implement(contract)` and the
|
|
5
5
|
* OpenAPI document, `openapi/oauth-api.yaml`, is generated from them (`pnpm generate:openapi`).
|
|
6
6
|
*/
|
|
@@ -55,7 +55,7 @@ export declare const contract: {
|
|
|
55
55
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
56
56
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
57
57
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
58
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"
|
|
58
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
59
59
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
60
60
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
61
61
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -88,7 +88,7 @@ export declare const contract: {
|
|
|
88
88
|
account_type: "checking" | "debit" | "savings";
|
|
89
89
|
holder_id: string | null;
|
|
90
90
|
holder_name: string;
|
|
91
|
-
}, "The
|
|
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
92
|
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
93
93
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
94
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.">]>;
|
|
@@ -112,8 +112,8 @@ export declare const contract: {
|
|
|
112
112
|
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
113
113
|
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
114
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
|
|
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
|
|
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 AndCo 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 AndCo reported it.">]>;
|
|
117
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
118
|
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
119
119
|
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -127,49 +127,50 @@ export declare const contract: {
|
|
|
127
127
|
}, undefined>;
|
|
128
128
|
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
129
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
130
|
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
|
|
131
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
134
132
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
135
133
|
}, undefined>, v.DescriptionAction<{
|
|
136
134
|
value: string;
|
|
137
135
|
editable: boolean;
|
|
138
|
-
}, "The
|
|
136
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
137
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
138
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
139
139
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
140
140
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
141
141
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
142
142
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
143
143
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
144
144
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
145
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
145
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
146
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
146
147
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
147
|
-
readonly
|
|
148
|
+
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
148
149
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
149
150
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
150
151
|
}, undefined>, v.DescriptionAction<{
|
|
151
152
|
type: "account_key";
|
|
152
153
|
accountKey: string;
|
|
153
|
-
}, "One
|
|
154
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
154
155
|
type: v.LiteralSchema<"account", undefined>;
|
|
155
156
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
156
157
|
}, undefined>, v.DescriptionAction<{
|
|
157
158
|
type: "account";
|
|
158
159
|
id: string;
|
|
159
|
-
}, "One
|
|
160
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
160
161
|
type: "account_key";
|
|
161
162
|
accountKey: string;
|
|
162
163
|
} | {
|
|
163
164
|
type: "account";
|
|
164
165
|
id: string;
|
|
165
|
-
}, "One
|
|
166
|
+
}, "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
167
|
type: "account_key";
|
|
167
168
|
accountKey: string;
|
|
168
169
|
} | {
|
|
169
170
|
type: "account";
|
|
170
171
|
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
|
|
172
|
+
} | null, "The Remitente. 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.">]>;
|
|
173
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
173
174
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
174
175
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
175
176
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -180,11 +181,13 @@ export declare const contract: {
|
|
|
180
181
|
}, undefined>, v.StrictObjectSchema<{
|
|
181
182
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
182
183
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
183
|
-
readonly
|
|
184
|
-
readonly
|
|
185
|
-
readonly
|
|
186
|
-
readonly
|
|
187
|
-
readonly
|
|
184
|
+
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
185
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
186
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
187
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
188
|
+
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
189
|
+
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
190
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
|
|
188
191
|
}, undefined>], undefined>, v.DescriptionAction<{
|
|
189
192
|
editable: false;
|
|
190
193
|
type: "account_key";
|
|
@@ -196,12 +199,14 @@ export declare const contract: {
|
|
|
196
199
|
} | {
|
|
197
200
|
editable: false;
|
|
198
201
|
type: "external";
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
country: "CL";
|
|
203
|
+
bank_code: string;
|
|
204
|
+
account_type: "10" | "20" | "40";
|
|
205
|
+
account_number: string;
|
|
206
|
+
name: string;
|
|
207
|
+
national_kind_id: "RUT";
|
|
208
|
+
national_id: string;
|
|
209
|
+
}, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor 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 `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
205
210
|
editable: false;
|
|
206
211
|
type: "account_key";
|
|
207
212
|
accountKey: string;
|
|
@@ -212,64 +217,67 @@ export declare const contract: {
|
|
|
212
217
|
} | {
|
|
213
218
|
editable: false;
|
|
214
219
|
type: "external";
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
220
|
+
country: "CL";
|
|
221
|
+
bank_code: string;
|
|
222
|
+
account_type: "10" | "20" | "40";
|
|
223
|
+
account_number: string;
|
|
224
|
+
name: string;
|
|
225
|
+
national_kind_id: "RUT";
|
|
226
|
+
national_id: string;
|
|
227
|
+
} | null, "The Receptor. 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.">]>;
|
|
228
|
+
readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
229
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
|
|
230
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
231
|
+
}, undefined>, v.DescriptionAction<{
|
|
232
|
+
value: string;
|
|
233
|
+
editable: boolean;
|
|
234
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
221
235
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
222
236
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
223
|
-
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.
|
|
237
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
224
238
|
readonly editable: v.BooleanSchema<undefined>;
|
|
225
|
-
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.
|
|
239
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
226
240
|
}, undefined>, v.DescriptionAction<{
|
|
227
241
|
currency: "CLP";
|
|
228
|
-
value:
|
|
242
|
+
value: number;
|
|
229
243
|
editable: boolean;
|
|
230
|
-
confirmed:
|
|
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.">]>;
|
|
244
|
+
confirmed: number | null;
|
|
245
|
+
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
232
246
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
233
247
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
234
|
-
readonly value: v.SchemaWithPipe<readonly [v.
|
|
248
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
235
249
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
236
250
|
}, undefined>, v.DescriptionAction<{
|
|
237
251
|
currency: "CLP";
|
|
238
|
-
value:
|
|
252
|
+
value: number;
|
|
239
253
|
at: string;
|
|
240
254
|
}, "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
255
|
readonly fee: v.StrictObjectSchema<{
|
|
242
256
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
243
257
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
244
258
|
}, undefined>;
|
|
245
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
259
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
246
260
|
readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
|
|
247
261
|
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
|
|
248
262
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
249
263
|
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
264
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
258
265
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
259
266
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
260
267
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
261
268
|
}, undefined>, v.DescriptionAction<{
|
|
262
269
|
type: "transfer";
|
|
263
|
-
status: "
|
|
270
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
271
|
+
transfer_id: string | null;
|
|
264
272
|
signed: boolean;
|
|
265
|
-
|
|
273
|
+
sender: {
|
|
266
274
|
type: "account_key";
|
|
267
275
|
accountKey: string;
|
|
268
276
|
} | {
|
|
269
277
|
type: "account";
|
|
270
278
|
id: string;
|
|
271
279
|
} | null;
|
|
272
|
-
|
|
280
|
+
receiver: {
|
|
273
281
|
editable: false;
|
|
274
282
|
type: "account_key";
|
|
275
283
|
accountKey: string;
|
|
@@ -280,45 +288,49 @@ export declare const contract: {
|
|
|
280
288
|
} | {
|
|
281
289
|
editable: false;
|
|
282
290
|
type: "external";
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
291
|
+
country: "CL";
|
|
292
|
+
bank_code: string;
|
|
293
|
+
account_type: "10" | "20" | "40";
|
|
294
|
+
account_number: string;
|
|
295
|
+
name: string;
|
|
296
|
+
national_kind_id: "RUT";
|
|
297
|
+
national_id: string;
|
|
288
298
|
} | null;
|
|
299
|
+
comment?: {
|
|
300
|
+
value: string;
|
|
301
|
+
editable: boolean;
|
|
302
|
+
} | undefined;
|
|
289
303
|
amount: {
|
|
290
304
|
currency: "CLP";
|
|
291
|
-
value:
|
|
305
|
+
value: number;
|
|
292
306
|
editable: boolean;
|
|
293
|
-
confirmed:
|
|
307
|
+
confirmed: number | null;
|
|
294
308
|
};
|
|
295
309
|
settled: {
|
|
296
310
|
currency: "CLP";
|
|
297
|
-
value:
|
|
311
|
+
value: number;
|
|
298
312
|
at: string;
|
|
299
313
|
} | null;
|
|
300
314
|
fee: {
|
|
301
315
|
currency: "CLP";
|
|
302
316
|
amount: "0";
|
|
303
317
|
};
|
|
304
|
-
interaction_reason?: "
|
|
318
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
305
319
|
expires_at: string | null;
|
|
306
320
|
expires_in_seconds: number | null;
|
|
307
321
|
id: string;
|
|
308
322
|
resource_server: string;
|
|
309
|
-
note?: {
|
|
310
|
-
value: string;
|
|
311
|
-
editable: boolean;
|
|
312
|
-
} | undefined;
|
|
313
323
|
metadata: {
|
|
314
324
|
[x: string]: unknown;
|
|
315
325
|
};
|
|
316
326
|
server_time: string;
|
|
317
327
|
created_at: string;
|
|
318
328
|
authorization_url: string;
|
|
319
|
-
}, "Authoritative Project-facing state of a transfer. `
|
|
329
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
320
330
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
321
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
331
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
332
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
333
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
322
334
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
323
335
|
readonly account: v.StrictObjectSchema<{
|
|
324
336
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -328,22 +340,24 @@ export declare const contract: {
|
|
|
328
340
|
}, undefined>;
|
|
329
341
|
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
342
|
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
343
|
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
|
|
344
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
335
345
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
336
346
|
}, undefined>, v.DescriptionAction<{
|
|
337
347
|
value: string;
|
|
338
348
|
editable: boolean;
|
|
339
|
-
}, "The
|
|
349
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
350
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
351
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
340
352
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
341
353
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
342
354
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
343
355
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
344
356
|
}, undefined>, v.DescriptionAction<{
|
|
345
357
|
type: "account_opening";
|
|
346
|
-
status: "
|
|
358
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
359
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
360
|
+
account_opening_status_detail: string | null;
|
|
347
361
|
signed: boolean;
|
|
348
362
|
account: {
|
|
349
363
|
accountKey: string;
|
|
@@ -353,21 +367,23 @@ export declare const contract: {
|
|
|
353
367
|
};
|
|
354
368
|
expires_at: string | null;
|
|
355
369
|
expires_in_seconds: number | null;
|
|
356
|
-
id: string;
|
|
357
|
-
resource_server: string;
|
|
358
370
|
note?: {
|
|
359
371
|
value: string;
|
|
360
372
|
editable: boolean;
|
|
361
373
|
} | undefined;
|
|
374
|
+
id: string;
|
|
375
|
+
resource_server: string;
|
|
362
376
|
metadata: {
|
|
363
377
|
[x: string]: unknown;
|
|
364
378
|
};
|
|
365
379
|
server_time: string;
|
|
366
380
|
created_at: string;
|
|
367
381
|
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
|
|
382
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
369
383
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
370
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
384
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
385
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
386
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
371
387
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
372
388
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
373
389
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -375,38 +391,40 @@ export declare const contract: {
|
|
|
375
391
|
}, undefined>, v.DescriptionAction<{
|
|
376
392
|
type: "account_key";
|
|
377
393
|
accountKey: string;
|
|
378
|
-
}, "One
|
|
394
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
379
395
|
type: v.LiteralSchema<"account", undefined>;
|
|
380
396
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
381
397
|
}, undefined>, v.DescriptionAction<{
|
|
382
398
|
type: "account";
|
|
383
399
|
id: string;
|
|
384
|
-
}, "One
|
|
400
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
385
401
|
type: "account_key";
|
|
386
402
|
accountKey: string;
|
|
387
403
|
} | {
|
|
388
404
|
type: "account";
|
|
389
405
|
id: string;
|
|
390
|
-
}, "One
|
|
406
|
+
}, "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
407
|
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
408
|
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
393
409
|
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
410
|
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
|
|
411
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
398
412
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
399
413
|
}, undefined>, v.DescriptionAction<{
|
|
400
414
|
value: string;
|
|
401
415
|
editable: boolean;
|
|
402
|
-
}, "The
|
|
416
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
417
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
418
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
403
419
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
404
420
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
405
421
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
406
422
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
407
423
|
}, undefined>, v.DescriptionAction<{
|
|
408
424
|
type: "account_closure";
|
|
409
|
-
status: "
|
|
425
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
426
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
427
|
+
account_closure_status_detail: string | null;
|
|
410
428
|
signed: boolean;
|
|
411
429
|
account: {
|
|
412
430
|
type: "account_key";
|
|
@@ -418,12 +436,12 @@ export declare const contract: {
|
|
|
418
436
|
resolved_account_id: string | null;
|
|
419
437
|
expires_at: string;
|
|
420
438
|
expires_in_seconds: number;
|
|
421
|
-
id: string;
|
|
422
|
-
resource_server: string;
|
|
423
439
|
note?: {
|
|
424
440
|
value: string;
|
|
425
441
|
editable: boolean;
|
|
426
442
|
} | undefined;
|
|
443
|
+
id: string;
|
|
444
|
+
resource_server: string;
|
|
427
445
|
metadata: {
|
|
428
446
|
[x: string]: unknown;
|
|
429
447
|
};
|
|
@@ -436,11 +454,11 @@ export declare const contract: {
|
|
|
436
454
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
437
455
|
}, undefined>;
|
|
438
456
|
readonly body: v.StrictObjectSchema<{
|
|
439
|
-
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
457
|
+
readonly reason: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
440
458
|
}, undefined>;
|
|
441
459
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
442
460
|
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"
|
|
461
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
444
462
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
445
463
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
446
464
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -473,7 +491,7 @@ export declare const contract: {
|
|
|
473
491
|
account_type: "checking" | "debit" | "savings";
|
|
474
492
|
holder_id: string | null;
|
|
475
493
|
holder_name: string;
|
|
476
|
-
}, "The
|
|
494
|
+
}, "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
495
|
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
478
496
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
479
497
|
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
@@ -497,8 +515,8 @@ export declare const contract: {
|
|
|
497
515
|
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
498
516
|
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
499
517
|
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
|
|
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
|
|
518
|
+
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 AndCo reported it.">]>;
|
|
519
|
+
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 AndCo reported it.">]>;
|
|
502
520
|
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
521
|
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
504
522
|
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -512,49 +530,50 @@ export declare const contract: {
|
|
|
512
530
|
}, undefined>;
|
|
513
531
|
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
514
532
|
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
533
|
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
|
|
534
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
519
535
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
520
536
|
}, undefined>, v.DescriptionAction<{
|
|
521
537
|
value: string;
|
|
522
538
|
editable: boolean;
|
|
523
|
-
}, "The
|
|
539
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
540
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
541
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
524
542
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
525
543
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
526
544
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
527
545
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
528
546
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
529
547
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
530
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
548
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
549
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
531
550
|
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
|
|
551
|
+
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
533
552
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
534
553
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
535
554
|
}, undefined>, v.DescriptionAction<{
|
|
536
555
|
type: "account_key";
|
|
537
556
|
accountKey: string;
|
|
538
|
-
}, "One
|
|
557
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
539
558
|
type: v.LiteralSchema<"account", undefined>;
|
|
540
559
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
541
560
|
}, undefined>, v.DescriptionAction<{
|
|
542
561
|
type: "account";
|
|
543
562
|
id: string;
|
|
544
|
-
}, "One
|
|
563
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
545
564
|
type: "account_key";
|
|
546
565
|
accountKey: string;
|
|
547
566
|
} | {
|
|
548
567
|
type: "account";
|
|
549
568
|
id: string;
|
|
550
|
-
}, "One
|
|
569
|
+
}, "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
570
|
type: "account_key";
|
|
552
571
|
accountKey: string;
|
|
553
572
|
} | {
|
|
554
573
|
type: "account";
|
|
555
574
|
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
|
|
575
|
+
} | null, "The Remitente. 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.">]>;
|
|
576
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
558
577
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
559
578
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
560
579
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -565,11 +584,13 @@ export declare const contract: {
|
|
|
565
584
|
}, undefined>, v.StrictObjectSchema<{
|
|
566
585
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
567
586
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
568
|
-
readonly
|
|
569
|
-
readonly
|
|
570
|
-
readonly
|
|
571
|
-
readonly
|
|
572
|
-
readonly
|
|
587
|
+
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
588
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
589
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
590
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
591
|
+
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
592
|
+
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
593
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
|
|
573
594
|
}, undefined>], undefined>, v.DescriptionAction<{
|
|
574
595
|
editable: false;
|
|
575
596
|
type: "account_key";
|
|
@@ -581,12 +602,14 @@ export declare const contract: {
|
|
|
581
602
|
} | {
|
|
582
603
|
editable: false;
|
|
583
604
|
type: "external";
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
605
|
+
country: "CL";
|
|
606
|
+
bank_code: string;
|
|
607
|
+
account_type: "10" | "20" | "40";
|
|
608
|
+
account_number: string;
|
|
609
|
+
name: string;
|
|
610
|
+
national_kind_id: "RUT";
|
|
611
|
+
national_id: string;
|
|
612
|
+
}, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor 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 `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
590
613
|
editable: false;
|
|
591
614
|
type: "account_key";
|
|
592
615
|
accountKey: string;
|
|
@@ -597,64 +620,67 @@ export declare const contract: {
|
|
|
597
620
|
} | {
|
|
598
621
|
editable: false;
|
|
599
622
|
type: "external";
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
623
|
+
country: "CL";
|
|
624
|
+
bank_code: string;
|
|
625
|
+
account_type: "10" | "20" | "40";
|
|
626
|
+
account_number: string;
|
|
627
|
+
name: string;
|
|
628
|
+
national_kind_id: "RUT";
|
|
629
|
+
national_id: string;
|
|
630
|
+
} | null, "The Receptor. 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.">]>;
|
|
631
|
+
readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
632
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
|
|
633
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
634
|
+
}, undefined>, v.DescriptionAction<{
|
|
635
|
+
value: string;
|
|
636
|
+
editable: boolean;
|
|
637
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
606
638
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
607
639
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
608
|
-
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.
|
|
640
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
609
641
|
readonly editable: v.BooleanSchema<undefined>;
|
|
610
|
-
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.
|
|
642
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
611
643
|
}, undefined>, v.DescriptionAction<{
|
|
612
644
|
currency: "CLP";
|
|
613
|
-
value:
|
|
645
|
+
value: number;
|
|
614
646
|
editable: boolean;
|
|
615
|
-
confirmed:
|
|
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.">]>;
|
|
647
|
+
confirmed: number | null;
|
|
648
|
+
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
617
649
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
618
650
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
619
|
-
readonly value: v.SchemaWithPipe<readonly [v.
|
|
651
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
620
652
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
621
653
|
}, undefined>, v.DescriptionAction<{
|
|
622
654
|
currency: "CLP";
|
|
623
|
-
value:
|
|
655
|
+
value: number;
|
|
624
656
|
at: string;
|
|
625
657
|
}, "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
658
|
readonly fee: v.StrictObjectSchema<{
|
|
627
659
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
628
660
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
629
661
|
}, undefined>;
|
|
630
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
662
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
631
663
|
readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
|
|
632
664
|
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
|
|
633
665
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
634
666
|
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
667
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
643
668
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
644
669
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
645
670
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
646
671
|
}, undefined>, v.DescriptionAction<{
|
|
647
672
|
type: "transfer";
|
|
648
|
-
status: "
|
|
673
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
674
|
+
transfer_id: string | null;
|
|
649
675
|
signed: boolean;
|
|
650
|
-
|
|
676
|
+
sender: {
|
|
651
677
|
type: "account_key";
|
|
652
678
|
accountKey: string;
|
|
653
679
|
} | {
|
|
654
680
|
type: "account";
|
|
655
681
|
id: string;
|
|
656
682
|
} | null;
|
|
657
|
-
|
|
683
|
+
receiver: {
|
|
658
684
|
editable: false;
|
|
659
685
|
type: "account_key";
|
|
660
686
|
accountKey: string;
|
|
@@ -665,45 +691,49 @@ export declare const contract: {
|
|
|
665
691
|
} | {
|
|
666
692
|
editable: false;
|
|
667
693
|
type: "external";
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
694
|
+
country: "CL";
|
|
695
|
+
bank_code: string;
|
|
696
|
+
account_type: "10" | "20" | "40";
|
|
697
|
+
account_number: string;
|
|
698
|
+
name: string;
|
|
699
|
+
national_kind_id: "RUT";
|
|
700
|
+
national_id: string;
|
|
673
701
|
} | null;
|
|
702
|
+
comment?: {
|
|
703
|
+
value: string;
|
|
704
|
+
editable: boolean;
|
|
705
|
+
} | undefined;
|
|
674
706
|
amount: {
|
|
675
707
|
currency: "CLP";
|
|
676
|
-
value:
|
|
708
|
+
value: number;
|
|
677
709
|
editable: boolean;
|
|
678
|
-
confirmed:
|
|
710
|
+
confirmed: number | null;
|
|
679
711
|
};
|
|
680
712
|
settled: {
|
|
681
713
|
currency: "CLP";
|
|
682
|
-
value:
|
|
714
|
+
value: number;
|
|
683
715
|
at: string;
|
|
684
716
|
} | null;
|
|
685
717
|
fee: {
|
|
686
718
|
currency: "CLP";
|
|
687
719
|
amount: "0";
|
|
688
720
|
};
|
|
689
|
-
interaction_reason?: "
|
|
721
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
690
722
|
expires_at: string | null;
|
|
691
723
|
expires_in_seconds: number | null;
|
|
692
724
|
id: string;
|
|
693
725
|
resource_server: string;
|
|
694
|
-
note?: {
|
|
695
|
-
value: string;
|
|
696
|
-
editable: boolean;
|
|
697
|
-
} | undefined;
|
|
698
726
|
metadata: {
|
|
699
727
|
[x: string]: unknown;
|
|
700
728
|
};
|
|
701
729
|
server_time: string;
|
|
702
730
|
created_at: string;
|
|
703
731
|
authorization_url: string;
|
|
704
|
-
}, "Authoritative Project-facing state of a transfer. `
|
|
732
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
705
733
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
706
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
734
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
735
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
736
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
707
737
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
708
738
|
readonly account: v.StrictObjectSchema<{
|
|
709
739
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -713,22 +743,24 @@ export declare const contract: {
|
|
|
713
743
|
}, undefined>;
|
|
714
744
|
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
745
|
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
746
|
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
|
|
747
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
720
748
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
721
749
|
}, undefined>, v.DescriptionAction<{
|
|
722
750
|
value: string;
|
|
723
751
|
editable: boolean;
|
|
724
|
-
}, "The
|
|
752
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
753
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
754
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
725
755
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
726
756
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
727
757
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
728
758
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
729
759
|
}, undefined>, v.DescriptionAction<{
|
|
730
760
|
type: "account_opening";
|
|
731
|
-
status: "
|
|
761
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
762
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
763
|
+
account_opening_status_detail: string | null;
|
|
732
764
|
signed: boolean;
|
|
733
765
|
account: {
|
|
734
766
|
accountKey: string;
|
|
@@ -738,21 +770,23 @@ export declare const contract: {
|
|
|
738
770
|
};
|
|
739
771
|
expires_at: string | null;
|
|
740
772
|
expires_in_seconds: number | null;
|
|
741
|
-
id: string;
|
|
742
|
-
resource_server: string;
|
|
743
773
|
note?: {
|
|
744
774
|
value: string;
|
|
745
775
|
editable: boolean;
|
|
746
776
|
} | undefined;
|
|
777
|
+
id: string;
|
|
778
|
+
resource_server: string;
|
|
747
779
|
metadata: {
|
|
748
780
|
[x: string]: unknown;
|
|
749
781
|
};
|
|
750
782
|
server_time: string;
|
|
751
783
|
created_at: string;
|
|
752
784
|
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
|
|
785
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
754
786
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
755
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
787
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
788
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
789
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
756
790
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
757
791
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
758
792
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -760,38 +794,40 @@ export declare const contract: {
|
|
|
760
794
|
}, undefined>, v.DescriptionAction<{
|
|
761
795
|
type: "account_key";
|
|
762
796
|
accountKey: string;
|
|
763
|
-
}, "One
|
|
797
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
764
798
|
type: v.LiteralSchema<"account", undefined>;
|
|
765
799
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
766
800
|
}, undefined>, v.DescriptionAction<{
|
|
767
801
|
type: "account";
|
|
768
802
|
id: string;
|
|
769
|
-
}, "One
|
|
803
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
770
804
|
type: "account_key";
|
|
771
805
|
accountKey: string;
|
|
772
806
|
} | {
|
|
773
807
|
type: "account";
|
|
774
808
|
id: string;
|
|
775
|
-
}, "One
|
|
809
|
+
}, "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
810
|
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
811
|
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
778
812
|
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
813
|
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
|
|
814
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
783
815
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
784
816
|
}, undefined>, v.DescriptionAction<{
|
|
785
817
|
value: string;
|
|
786
818
|
editable: boolean;
|
|
787
|
-
}, "The
|
|
819
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
820
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
821
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
788
822
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
789
823
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
790
824
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
791
825
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
792
826
|
}, undefined>, v.DescriptionAction<{
|
|
793
827
|
type: "account_closure";
|
|
794
|
-
status: "
|
|
828
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
829
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
830
|
+
account_closure_status_detail: string | null;
|
|
795
831
|
signed: boolean;
|
|
796
832
|
account: {
|
|
797
833
|
type: "account_key";
|
|
@@ -803,12 +839,12 @@ export declare const contract: {
|
|
|
803
839
|
resolved_account_id: string | null;
|
|
804
840
|
expires_at: string;
|
|
805
841
|
expires_in_seconds: number;
|
|
806
|
-
id: string;
|
|
807
|
-
resource_server: string;
|
|
808
842
|
note?: {
|
|
809
843
|
value: string;
|
|
810
844
|
editable: boolean;
|
|
811
845
|
} | undefined;
|
|
846
|
+
id: string;
|
|
847
|
+
resource_server: string;
|
|
812
848
|
metadata: {
|
|
813
849
|
[x: string]: unknown;
|
|
814
850
|
};
|
|
@@ -829,7 +865,7 @@ export declare const contract: {
|
|
|
829
865
|
}, undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").InvalidIntentState, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
830
866
|
createIntent: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
831
867
|
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
|
|
868
|
+
readonly "idempotency-key": v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Required with `application/json`, and refused with `application/jwt` and `application/jose+json`, which answer `400 idempotency_key_not_allowed` when it arrives beside a signature: the idempotency key of a Signed Instruction is its own `jti`, and two candidates for one key is exactly the ambiguity that gets read the wrong way round. OpenAPI cannot make a header conditional on the media type, so it is published as optional rather than demanding what the server refuses.">]>;
|
|
833
869
|
}, undefined>;
|
|
834
870
|
readonly body: v.UnionSchema<[v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
835
871
|
readonly type: v.LiteralSchema<"deposit", undefined>;
|
|
@@ -839,19 +875,19 @@ export declare const contract: {
|
|
|
839
875
|
}, undefined>, v.DescriptionAction<{
|
|
840
876
|
type: "account_key";
|
|
841
877
|
accountKey: string;
|
|
842
|
-
}, "One
|
|
878
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
843
879
|
type: v.LiteralSchema<"account", undefined>;
|
|
844
880
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
845
881
|
}, undefined>, v.DescriptionAction<{
|
|
846
882
|
type: "account";
|
|
847
883
|
id: string;
|
|
848
|
-
}, "One
|
|
884
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
849
885
|
type: "account_key";
|
|
850
886
|
accountKey: string;
|
|
851
887
|
} | {
|
|
852
888
|
type: "account";
|
|
853
889
|
id: string;
|
|
854
|
-
}, "One
|
|
890
|
+
}, "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
891
|
type: "account_key";
|
|
856
892
|
accountKey: string;
|
|
857
893
|
} | {
|
|
@@ -868,12 +904,12 @@ export declare const contract: {
|
|
|
868
904
|
editable: boolean;
|
|
869
905
|
}, "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
906
|
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
|
|
907
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
872
908
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
873
909
|
}, undefined>, v.DescriptionAction<{
|
|
874
910
|
value: string;
|
|
875
911
|
editable: boolean;
|
|
876
|
-
}, "The
|
|
912
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
877
913
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
878
914
|
} & {
|
|
879
915
|
readonly expires_in: v.StringSchema<undefined>;
|
|
@@ -886,19 +922,19 @@ export declare const contract: {
|
|
|
886
922
|
}, undefined>, v.DescriptionAction<{
|
|
887
923
|
type: "account_key";
|
|
888
924
|
accountKey: string;
|
|
889
|
-
}, "One
|
|
925
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
890
926
|
type: v.LiteralSchema<"account", undefined>;
|
|
891
927
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
892
928
|
}, undefined>, v.DescriptionAction<{
|
|
893
929
|
type: "account";
|
|
894
930
|
id: string;
|
|
895
|
-
}, "One
|
|
931
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
896
932
|
type: "account_key";
|
|
897
933
|
accountKey: string;
|
|
898
934
|
} | {
|
|
899
935
|
type: "account";
|
|
900
936
|
id: string;
|
|
901
|
-
}, "One
|
|
937
|
+
}, "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
938
|
type: "account_key";
|
|
903
939
|
accountKey: string;
|
|
904
940
|
} | {
|
|
@@ -915,12 +951,12 @@ export declare const contract: {
|
|
|
915
951
|
editable: boolean;
|
|
916
952
|
}, "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
953
|
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
|
|
954
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
919
955
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
920
956
|
}, undefined>, v.DescriptionAction<{
|
|
921
957
|
value: string;
|
|
922
958
|
editable: boolean;
|
|
923
|
-
}, "The
|
|
959
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
924
960
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
925
961
|
} & {
|
|
926
962
|
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
@@ -972,42 +1008,43 @@ export declare const contract: {
|
|
|
972
1008
|
expires_in?: undefined;
|
|
973
1009
|
expires_at: string | null;
|
|
974
1010
|
}, "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<{
|
|
1011
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
975
1012
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
976
1013
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
977
1014
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
978
|
-
readonly value: v.SchemaWithPipe<readonly [v.
|
|
1015
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
979
1016
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
980
1017
|
}, undefined>, v.DescriptionAction<{
|
|
981
1018
|
currency: "CLP";
|
|
982
|
-
value:
|
|
1019
|
+
value: number;
|
|
983
1020
|
editable: boolean;
|
|
984
|
-
}, "The amount a transfer proposes. `editable: true` lets the person who confirms set the amount on
|
|
985
|
-
readonly
|
|
1021
|
+
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
|
|
1022
|
+
readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
986
1023
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
987
1024
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
988
1025
|
}, undefined>, v.DescriptionAction<{
|
|
989
1026
|
type: "account_key";
|
|
990
1027
|
accountKey: string;
|
|
991
|
-
}, "One
|
|
1028
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
992
1029
|
type: v.LiteralSchema<"account", undefined>;
|
|
993
1030
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
994
1031
|
}, undefined>, v.DescriptionAction<{
|
|
995
1032
|
type: "account";
|
|
996
1033
|
id: string;
|
|
997
|
-
}, "One
|
|
1034
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
998
1035
|
type: "account_key";
|
|
999
1036
|
accountKey: string;
|
|
1000
1037
|
} | {
|
|
1001
1038
|
type: "account";
|
|
1002
1039
|
id: string;
|
|
1003
|
-
}, "One
|
|
1040
|
+
}, "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
1041
|
type: "account_key";
|
|
1005
1042
|
accountKey: string;
|
|
1006
1043
|
} | {
|
|
1007
1044
|
type: "account";
|
|
1008
1045
|
id: string;
|
|
1009
|
-
} | null, "The
|
|
1010
|
-
readonly
|
|
1046
|
+
} | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
|
|
1047
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1011
1048
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1012
1049
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
1013
1050
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1018,11 +1055,13 @@ export declare const contract: {
|
|
|
1018
1055
|
}, undefined>, v.StrictObjectSchema<{
|
|
1019
1056
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1020
1057
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1021
|
-
readonly
|
|
1022
|
-
readonly
|
|
1023
|
-
readonly
|
|
1024
|
-
readonly
|
|
1025
|
-
readonly
|
|
1058
|
+
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
1059
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1060
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1061
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1062
|
+
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
1063
|
+
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
1064
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
|
|
1026
1065
|
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1027
1066
|
editable: false;
|
|
1028
1067
|
type: "account_key";
|
|
@@ -1034,12 +1073,14 @@ export declare const contract: {
|
|
|
1034
1073
|
} | {
|
|
1035
1074
|
editable: false;
|
|
1036
1075
|
type: "external";
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1076
|
+
country: "CL";
|
|
1077
|
+
bank_code: string;
|
|
1078
|
+
account_type: "10" | "20" | "40";
|
|
1079
|
+
account_number: string;
|
|
1080
|
+
name: string;
|
|
1081
|
+
national_kind_id: "RUT";
|
|
1082
|
+
national_id: string;
|
|
1083
|
+
}, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor 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 `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
|
|
1043
1084
|
editable: false;
|
|
1044
1085
|
type: "account_key";
|
|
1045
1086
|
accountKey: string;
|
|
@@ -1050,60 +1091,62 @@ export declare const contract: {
|
|
|
1050
1091
|
} | {
|
|
1051
1092
|
editable: false;
|
|
1052
1093
|
type: "external";
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1094
|
+
country: "CL";
|
|
1095
|
+
bank_code: string;
|
|
1096
|
+
account_type: "10" | "20" | "40";
|
|
1097
|
+
account_number: string;
|
|
1098
|
+
name: string;
|
|
1099
|
+
national_kind_id: "RUT";
|
|
1100
|
+
national_id: string;
|
|
1101
|
+
} | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
|
|
1102
|
+
readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1103
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
|
|
1061
1104
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1062
1105
|
}, undefined>, v.DescriptionAction<{
|
|
1063
1106
|
value: string;
|
|
1064
1107
|
editable: boolean;
|
|
1065
|
-
}, "The
|
|
1066
|
-
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1108
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
1067
1109
|
} & {
|
|
1068
1110
|
readonly expires_in: v.StringSchema<undefined>;
|
|
1069
1111
|
readonly expires_at: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1070
1112
|
}, undefined>, v.StrictObjectSchema<{
|
|
1113
|
+
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1071
1114
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1072
1115
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1073
1116
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1074
|
-
readonly value: v.SchemaWithPipe<readonly [v.
|
|
1117
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
1075
1118
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1076
1119
|
}, undefined>, v.DescriptionAction<{
|
|
1077
1120
|
currency: "CLP";
|
|
1078
|
-
value:
|
|
1121
|
+
value: number;
|
|
1079
1122
|
editable: boolean;
|
|
1080
|
-
}, "The amount a transfer proposes. `editable: true` lets the person who confirms set the amount on
|
|
1081
|
-
readonly
|
|
1123
|
+
}, "The amount a transfer proposes: `value` is an integer in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `editable: true` lets the person who confirms set the amount on AndCo's confirmation screen, and `value` is the initial proposal shown there; the amount must fall within the Grant's `transactions.minimum` and `transactions.maximum` and not exceed the balance. Without `editable` (or with `false`) the amount is locked. What moved is `settled`.">]>;
|
|
1124
|
+
readonly sender: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1082
1125
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
1083
1126
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1084
1127
|
}, undefined>, v.DescriptionAction<{
|
|
1085
1128
|
type: "account_key";
|
|
1086
1129
|
accountKey: string;
|
|
1087
|
-
}, "One
|
|
1130
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1088
1131
|
type: v.LiteralSchema<"account", undefined>;
|
|
1089
1132
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1090
1133
|
}, undefined>, v.DescriptionAction<{
|
|
1091
1134
|
type: "account";
|
|
1092
1135
|
id: string;
|
|
1093
|
-
}, "One
|
|
1136
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1094
1137
|
type: "account_key";
|
|
1095
1138
|
accountKey: string;
|
|
1096
1139
|
} | {
|
|
1097
1140
|
type: "account";
|
|
1098
1141
|
id: string;
|
|
1099
|
-
}, "One
|
|
1142
|
+
}, "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
1143
|
type: "account_key";
|
|
1101
1144
|
accountKey: string;
|
|
1102
1145
|
} | {
|
|
1103
1146
|
type: "account";
|
|
1104
1147
|
id: string;
|
|
1105
|
-
} | null, "The
|
|
1106
|
-
readonly
|
|
1148
|
+
} | null, "The Remitente: the AndCo account the money leaves. Null leaves that choice to a person on a screen.">]>;
|
|
1149
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.OptionalSchema<v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1107
1150
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1108
1151
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
1109
1152
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1114,11 +1157,13 @@ export declare const contract: {
|
|
|
1114
1157
|
}, undefined>, v.StrictObjectSchema<{
|
|
1115
1158
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1116
1159
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1117
|
-
readonly
|
|
1118
|
-
readonly
|
|
1119
|
-
readonly
|
|
1120
|
-
readonly
|
|
1121
|
-
readonly
|
|
1160
|
+
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
1161
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1162
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1163
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1164
|
+
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
1165
|
+
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
1166
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
|
|
1122
1167
|
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1123
1168
|
editable: false;
|
|
1124
1169
|
type: "account_key";
|
|
@@ -1130,12 +1175,14 @@ export declare const contract: {
|
|
|
1130
1175
|
} | {
|
|
1131
1176
|
editable: false;
|
|
1132
1177
|
type: "external";
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1178
|
+
country: "CL";
|
|
1179
|
+
bank_code: string;
|
|
1180
|
+
account_type: "10" | "20" | "40";
|
|
1181
|
+
account_number: string;
|
|
1182
|
+
name: string;
|
|
1183
|
+
national_kind_id: "RUT";
|
|
1184
|
+
national_id: string;
|
|
1185
|
+
}, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor 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 `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, null>, v.DescriptionAction<{
|
|
1139
1186
|
editable: false;
|
|
1140
1187
|
type: "account_key";
|
|
1141
1188
|
accountKey: string;
|
|
@@ -1146,38 +1193,42 @@ export declare const contract: {
|
|
|
1146
1193
|
} | {
|
|
1147
1194
|
editable: false;
|
|
1148
1195
|
type: "external";
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1196
|
+
country: "CL";
|
|
1197
|
+
bank_code: string;
|
|
1198
|
+
account_type: "10" | "20" | "40";
|
|
1199
|
+
account_number: string;
|
|
1200
|
+
name: string;
|
|
1201
|
+
national_kind_id: "RUT";
|
|
1202
|
+
national_id: string;
|
|
1203
|
+
} | null, "The Receptor: where the money lands. Null leaves it to a person on the screen, within the Grant's destinations.">]>;
|
|
1204
|
+
readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1205
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
|
|
1157
1206
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1158
1207
|
}, undefined>, v.DescriptionAction<{
|
|
1159
1208
|
value: string;
|
|
1160
1209
|
editable: boolean;
|
|
1161
|
-
}, "The
|
|
1162
|
-
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1210
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
1163
1211
|
} & {
|
|
1164
1212
|
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
1165
1213
|
readonly expires_at: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1166
1214
|
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1215
|
+
metadata: {
|
|
1216
|
+
[x: string]: unknown;
|
|
1217
|
+
};
|
|
1167
1218
|
type: "transfer";
|
|
1168
1219
|
amount: {
|
|
1169
1220
|
currency: "CLP";
|
|
1170
|
-
value:
|
|
1221
|
+
value: number;
|
|
1171
1222
|
editable: boolean;
|
|
1172
1223
|
};
|
|
1173
|
-
|
|
1224
|
+
sender: {
|
|
1174
1225
|
type: "account_key";
|
|
1175
1226
|
accountKey: string;
|
|
1176
1227
|
} | {
|
|
1177
1228
|
type: "account";
|
|
1178
1229
|
id: string;
|
|
1179
1230
|
} | null;
|
|
1180
|
-
|
|
1231
|
+
receiver: {
|
|
1181
1232
|
editable: false;
|
|
1182
1233
|
type: "account_key";
|
|
1183
1234
|
accountKey: string;
|
|
@@ -1188,36 +1239,38 @@ export declare const contract: {
|
|
|
1188
1239
|
} | {
|
|
1189
1240
|
editable: false;
|
|
1190
1241
|
type: "external";
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1242
|
+
country: "CL";
|
|
1243
|
+
bank_code: string;
|
|
1244
|
+
account_type: "10" | "20" | "40";
|
|
1245
|
+
account_number: string;
|
|
1246
|
+
name: string;
|
|
1247
|
+
national_kind_id: "RUT";
|
|
1248
|
+
national_id: string;
|
|
1196
1249
|
} | null;
|
|
1197
|
-
|
|
1250
|
+
comment?: {
|
|
1198
1251
|
value: string;
|
|
1199
1252
|
editable: boolean;
|
|
1200
1253
|
} | undefined;
|
|
1201
|
-
metadata: {
|
|
1202
|
-
[x: string]: unknown;
|
|
1203
|
-
};
|
|
1204
1254
|
expires_in: string;
|
|
1205
1255
|
expires_at?: undefined;
|
|
1206
1256
|
} | {
|
|
1257
|
+
metadata: {
|
|
1258
|
+
[x: string]: unknown;
|
|
1259
|
+
};
|
|
1207
1260
|
type: "transfer";
|
|
1208
1261
|
amount: {
|
|
1209
1262
|
currency: "CLP";
|
|
1210
|
-
value:
|
|
1263
|
+
value: number;
|
|
1211
1264
|
editable: boolean;
|
|
1212
1265
|
};
|
|
1213
|
-
|
|
1266
|
+
sender: {
|
|
1214
1267
|
type: "account_key";
|
|
1215
1268
|
accountKey: string;
|
|
1216
1269
|
} | {
|
|
1217
1270
|
type: "account";
|
|
1218
1271
|
id: string;
|
|
1219
1272
|
} | null;
|
|
1220
|
-
|
|
1273
|
+
receiver: {
|
|
1221
1274
|
editable: false;
|
|
1222
1275
|
type: "account_key";
|
|
1223
1276
|
accountKey: string;
|
|
@@ -1228,33 +1281,32 @@ export declare const contract: {
|
|
|
1228
1281
|
} | {
|
|
1229
1282
|
editable: false;
|
|
1230
1283
|
type: "external";
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1284
|
+
country: "CL";
|
|
1285
|
+
bank_code: string;
|
|
1286
|
+
account_type: "10" | "20" | "40";
|
|
1287
|
+
account_number: string;
|
|
1288
|
+
name: string;
|
|
1289
|
+
national_kind_id: "RUT";
|
|
1290
|
+
national_id: string;
|
|
1236
1291
|
} | null;
|
|
1237
|
-
|
|
1292
|
+
comment?: {
|
|
1238
1293
|
value: string;
|
|
1239
1294
|
editable: boolean;
|
|
1240
1295
|
} | undefined;
|
|
1241
|
-
metadata: {
|
|
1242
|
-
[x: string]: unknown;
|
|
1243
|
-
};
|
|
1244
1296
|
expires_in?: undefined;
|
|
1245
1297
|
expires_at: string | null;
|
|
1246
|
-
}, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval. A null `
|
|
1298
|
+
}, "The `application/json` half of creating a transfer: an Intent born waiting for an Approval, in the transfer vocabulary of the API: `sender`, `receiver`, an integer `amount.value` and a `comment` of at most 60 bytes. A null `sender` is the confirmation screen, where a person picks the account the money leaves from among the Grant's sources, and a null `receiver` is the screen too: the person completes where the money goes (the bank, the type and number of the account, and its holder's RUT and name), and the server checks what she wrote against the Grant's `destinations` when she confirms, refusing one outside them with `invalid_destination`. Both default to null when omitted. A Receptor the request names is locked on the screen (`editable: true` is an `invalid_request`), and the amount is too unless `amount.editable` is true, in which case the person sets it. A Receptor at a bank is named in the transfer vocabulary of the API (`IntentAccountExternal`). A signed transfer is not an Intent: it is submitted to `POST /transfers` as a `SignedTransferEnvelope`.">]>, v.SchemaWithPipe<readonly [v.VariantSchema<"expires_in", [v.StrictObjectSchema<{
|
|
1247
1299
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
1248
1300
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1249
1301
|
readonly name: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "The display label the account opens with. Mutable afterwards, and read by no permission.">]>;
|
|
1250
1302
|
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
1303
|
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
|
|
1304
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
1253
1305
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1254
1306
|
}, undefined>, v.DescriptionAction<{
|
|
1255
1307
|
value: string;
|
|
1256
1308
|
editable: boolean;
|
|
1257
|
-
}, "The
|
|
1309
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1258
1310
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1259
1311
|
} & {
|
|
1260
1312
|
readonly expires_in: v.StringSchema<undefined>;
|
|
@@ -1265,12 +1317,12 @@ export declare const contract: {
|
|
|
1265
1317
|
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
1318
|
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
1319
|
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
|
|
1320
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
1269
1321
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1270
1322
|
}, undefined>, v.DescriptionAction<{
|
|
1271
1323
|
value: string;
|
|
1272
1324
|
editable: boolean;
|
|
1273
|
-
}, "The
|
|
1325
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1274
1326
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1275
1327
|
} & {
|
|
1276
1328
|
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
@@ -1303,7 +1355,7 @@ export declare const contract: {
|
|
|
1303
1355
|
};
|
|
1304
1356
|
expires_in?: undefined;
|
|
1305
1357
|
expires_at: string | null;
|
|
1306
|
-
}, "The `application/json` half of opening a
|
|
1358
|
+
}, "The `application/json` half of opening a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `POST` because everything that changes an account 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
1359
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
1308
1360
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1309
1361
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -1311,26 +1363,26 @@ export declare const contract: {
|
|
|
1311
1363
|
}, undefined>, v.DescriptionAction<{
|
|
1312
1364
|
type: "account_key";
|
|
1313
1365
|
accountKey: string;
|
|
1314
|
-
}, "One
|
|
1366
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1315
1367
|
type: v.LiteralSchema<"account", undefined>;
|
|
1316
1368
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1317
1369
|
}, undefined>, v.DescriptionAction<{
|
|
1318
1370
|
type: "account";
|
|
1319
1371
|
id: string;
|
|
1320
|
-
}, "One
|
|
1372
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1321
1373
|
type: "account_key";
|
|
1322
1374
|
accountKey: string;
|
|
1323
1375
|
} | {
|
|
1324
1376
|
type: "account";
|
|
1325
1377
|
id: string;
|
|
1326
|
-
}, "One
|
|
1378
|
+
}, "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
1379
|
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
|
|
1380
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
1329
1381
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1330
1382
|
}, undefined>, v.DescriptionAction<{
|
|
1331
1383
|
value: string;
|
|
1332
1384
|
editable: boolean;
|
|
1333
|
-
}, "The
|
|
1385
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1334
1386
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1335
1387
|
} & {
|
|
1336
1388
|
readonly expires_in: v.StringSchema<undefined>;
|
|
@@ -1343,26 +1395,26 @@ export declare const contract: {
|
|
|
1343
1395
|
}, undefined>, v.DescriptionAction<{
|
|
1344
1396
|
type: "account_key";
|
|
1345
1397
|
accountKey: string;
|
|
1346
|
-
}, "One
|
|
1398
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1347
1399
|
type: v.LiteralSchema<"account", undefined>;
|
|
1348
1400
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1349
1401
|
}, undefined>, v.DescriptionAction<{
|
|
1350
1402
|
type: "account";
|
|
1351
1403
|
id: string;
|
|
1352
|
-
}, "One
|
|
1404
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1353
1405
|
type: "account_key";
|
|
1354
1406
|
accountKey: string;
|
|
1355
1407
|
} | {
|
|
1356
1408
|
type: "account";
|
|
1357
1409
|
id: string;
|
|
1358
|
-
}, "One
|
|
1410
|
+
}, "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
1411
|
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
|
|
1412
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
1361
1413
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1362
1414
|
}, undefined>, v.DescriptionAction<{
|
|
1363
1415
|
value: string;
|
|
1364
1416
|
editable: boolean;
|
|
1365
|
-
}, "The
|
|
1417
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1366
1418
|
readonly metadata: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>, {}>;
|
|
1367
1419
|
} & {
|
|
1368
1420
|
readonly expires_in: v.OptionalSchema<v.NeverSchema<undefined>, undefined>;
|
|
@@ -1403,10 +1455,28 @@ export declare const contract: {
|
|
|
1403
1455
|
};
|
|
1404
1456
|
expires_in?: undefined;
|
|
1405
1457
|
expires_at: string;
|
|
1406
|
-
}, "The `application/json` half of closing a
|
|
1458
|
+
}, "The `application/json` half of closing a cuenta digital: an Intent born waiting for an Approval. `/accounts` has no `DELETE` because everything that changes an account happens through an Intent. It carries no amount, no source and no destination -- only a reference to the account it closes.">]>], undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, string>, v.MetadataAction<string, Record<string, unknown>>]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1459
|
+
readonly payload: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON claims (`SignedTransferClaims`).">]>;
|
|
1460
|
+
readonly signatures: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
1461
|
+
readonly protected: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON protected header (`SignedTransferHeader`).">]>;
|
|
1462
|
+
readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1463
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
1464
|
+
protected: string;
|
|
1465
|
+
signature: string;
|
|
1466
|
+
}[], 1, undefined>, v.DescriptionAction<{
|
|
1467
|
+
protected: string;
|
|
1468
|
+
signature: string;
|
|
1469
|
+
}[], "At least one signature over the same payload; every one is verified.">]>;
|
|
1470
|
+
}, undefined>, v.DescriptionAction<{
|
|
1471
|
+
payload: string;
|
|
1472
|
+
signatures: {
|
|
1473
|
+
protected: string;
|
|
1474
|
+
signature: string;
|
|
1475
|
+
}[];
|
|
1476
|
+
}, "A signed transfer: a JWS in the General JSON Serialization (RFC 7515 §7.2.1), with one `payload` and at least one signature, each with a protected header of `typ` `transfer.v1+jwt`. Sent as `application/jose+json`.">]>], undefined>;
|
|
1407
1477
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1408
1478
|
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"
|
|
1479
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
1410
1480
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1411
1481
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
1412
1482
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -1439,7 +1509,7 @@ export declare const contract: {
|
|
|
1439
1509
|
account_type: "checking" | "debit" | "savings";
|
|
1440
1510
|
holder_id: string | null;
|
|
1441
1511
|
holder_name: string;
|
|
1442
|
-
}, "The
|
|
1512
|
+
}, "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
1513
|
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1444
1514
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1445
1515
|
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
@@ -1463,8 +1533,8 @@ export declare const contract: {
|
|
|
1463
1533
|
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1464
1534
|
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
1465
1535
|
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
|
|
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
|
|
1536
|
+
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 AndCo reported it.">]>;
|
|
1537
|
+
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 AndCo reported it.">]>;
|
|
1468
1538
|
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
1539
|
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
1470
1540
|
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -1478,49 +1548,50 @@ export declare const contract: {
|
|
|
1478
1548
|
}, undefined>;
|
|
1479
1549
|
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1480
1550
|
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
1551
|
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
|
|
1552
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
1485
1553
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1486
1554
|
}, undefined>, v.DescriptionAction<{
|
|
1487
1555
|
value: string;
|
|
1488
1556
|
editable: boolean;
|
|
1489
|
-
}, "The
|
|
1557
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1558
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1559
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1490
1560
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1491
1561
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1492
1562
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1493
1563
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1494
1564
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1495
1565
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1496
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
1566
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
1567
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
1497
1568
|
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
|
|
1569
|
+
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1499
1570
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
1500
1571
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1501
1572
|
}, undefined>, v.DescriptionAction<{
|
|
1502
1573
|
type: "account_key";
|
|
1503
1574
|
accountKey: string;
|
|
1504
|
-
}, "One
|
|
1575
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1505
1576
|
type: v.LiteralSchema<"account", undefined>;
|
|
1506
1577
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1507
1578
|
}, undefined>, v.DescriptionAction<{
|
|
1508
1579
|
type: "account";
|
|
1509
1580
|
id: string;
|
|
1510
|
-
}, "One
|
|
1581
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1511
1582
|
type: "account_key";
|
|
1512
1583
|
accountKey: string;
|
|
1513
1584
|
} | {
|
|
1514
1585
|
type: "account";
|
|
1515
1586
|
id: string;
|
|
1516
|
-
}, "One
|
|
1587
|
+
}, "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
1588
|
type: "account_key";
|
|
1518
1589
|
accountKey: string;
|
|
1519
1590
|
} | {
|
|
1520
1591
|
type: "account";
|
|
1521
1592
|
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
|
|
1593
|
+
} | null, "The Remitente. 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.">]>;
|
|
1594
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1524
1595
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1525
1596
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
1526
1597
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1531,11 +1602,13 @@ export declare const contract: {
|
|
|
1531
1602
|
}, undefined>, v.StrictObjectSchema<{
|
|
1532
1603
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1533
1604
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1534
|
-
readonly
|
|
1535
|
-
readonly
|
|
1536
|
-
readonly
|
|
1537
|
-
readonly
|
|
1538
|
-
readonly
|
|
1605
|
+
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
1606
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1607
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1608
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
1609
|
+
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
1610
|
+
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
1611
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
|
|
1539
1612
|
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1540
1613
|
editable: false;
|
|
1541
1614
|
type: "account_key";
|
|
@@ -1547,12 +1620,14 @@ export declare const contract: {
|
|
|
1547
1620
|
} | {
|
|
1548
1621
|
editable: false;
|
|
1549
1622
|
type: "external";
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1623
|
+
country: "CL";
|
|
1624
|
+
bank_code: string;
|
|
1625
|
+
account_type: "10" | "20" | "40";
|
|
1626
|
+
account_number: string;
|
|
1627
|
+
name: string;
|
|
1628
|
+
national_kind_id: "RUT";
|
|
1629
|
+
national_id: string;
|
|
1630
|
+
}, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor 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 `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
1556
1631
|
editable: false;
|
|
1557
1632
|
type: "account_key";
|
|
1558
1633
|
accountKey: string;
|
|
@@ -1563,64 +1638,67 @@ export declare const contract: {
|
|
|
1563
1638
|
} | {
|
|
1564
1639
|
editable: false;
|
|
1565
1640
|
type: "external";
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1641
|
+
country: "CL";
|
|
1642
|
+
bank_code: string;
|
|
1643
|
+
account_type: "10" | "20" | "40";
|
|
1644
|
+
account_number: string;
|
|
1645
|
+
name: string;
|
|
1646
|
+
national_kind_id: "RUT";
|
|
1647
|
+
national_id: string;
|
|
1648
|
+
} | null, "The Receptor. 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.">]>;
|
|
1649
|
+
readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1650
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
|
|
1651
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1652
|
+
}, undefined>, v.DescriptionAction<{
|
|
1653
|
+
value: string;
|
|
1654
|
+
editable: boolean;
|
|
1655
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
1572
1656
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1573
1657
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1574
|
-
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.
|
|
1658
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
1575
1659
|
readonly editable: v.BooleanSchema<undefined>;
|
|
1576
|
-
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.
|
|
1660
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
1577
1661
|
}, undefined>, v.DescriptionAction<{
|
|
1578
1662
|
currency: "CLP";
|
|
1579
|
-
value:
|
|
1663
|
+
value: number;
|
|
1580
1664
|
editable: boolean;
|
|
1581
|
-
confirmed:
|
|
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.">]>;
|
|
1665
|
+
confirmed: number | null;
|
|
1666
|
+
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
1583
1667
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1584
1668
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1585
|
-
readonly value: v.SchemaWithPipe<readonly [v.
|
|
1669
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
1586
1670
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1587
1671
|
}, undefined>, v.DescriptionAction<{
|
|
1588
1672
|
currency: "CLP";
|
|
1589
|
-
value:
|
|
1673
|
+
value: number;
|
|
1590
1674
|
at: string;
|
|
1591
1675
|
}, "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
1676
|
readonly fee: v.StrictObjectSchema<{
|
|
1593
1677
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1594
1678
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
1595
1679
|
}, undefined>;
|
|
1596
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
1680
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
1597
1681
|
readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
|
|
1598
1682
|
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
|
|
1599
1683
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1600
1684
|
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
1685
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1609
1686
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1610
1687
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1611
1688
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1612
1689
|
}, undefined>, v.DescriptionAction<{
|
|
1613
1690
|
type: "transfer";
|
|
1614
|
-
status: "
|
|
1691
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
1692
|
+
transfer_id: string | null;
|
|
1615
1693
|
signed: boolean;
|
|
1616
|
-
|
|
1694
|
+
sender: {
|
|
1617
1695
|
type: "account_key";
|
|
1618
1696
|
accountKey: string;
|
|
1619
1697
|
} | {
|
|
1620
1698
|
type: "account";
|
|
1621
1699
|
id: string;
|
|
1622
1700
|
} | null;
|
|
1623
|
-
|
|
1701
|
+
receiver: {
|
|
1624
1702
|
editable: false;
|
|
1625
1703
|
type: "account_key";
|
|
1626
1704
|
accountKey: string;
|
|
@@ -1631,45 +1709,49 @@ export declare const contract: {
|
|
|
1631
1709
|
} | {
|
|
1632
1710
|
editable: false;
|
|
1633
1711
|
type: "external";
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1712
|
+
country: "CL";
|
|
1713
|
+
bank_code: string;
|
|
1714
|
+
account_type: "10" | "20" | "40";
|
|
1715
|
+
account_number: string;
|
|
1716
|
+
name: string;
|
|
1717
|
+
national_kind_id: "RUT";
|
|
1718
|
+
national_id: string;
|
|
1639
1719
|
} | null;
|
|
1720
|
+
comment?: {
|
|
1721
|
+
value: string;
|
|
1722
|
+
editable: boolean;
|
|
1723
|
+
} | undefined;
|
|
1640
1724
|
amount: {
|
|
1641
1725
|
currency: "CLP";
|
|
1642
|
-
value:
|
|
1726
|
+
value: number;
|
|
1643
1727
|
editable: boolean;
|
|
1644
|
-
confirmed:
|
|
1728
|
+
confirmed: number | null;
|
|
1645
1729
|
};
|
|
1646
1730
|
settled: {
|
|
1647
1731
|
currency: "CLP";
|
|
1648
|
-
value:
|
|
1732
|
+
value: number;
|
|
1649
1733
|
at: string;
|
|
1650
1734
|
} | null;
|
|
1651
1735
|
fee: {
|
|
1652
1736
|
currency: "CLP";
|
|
1653
1737
|
amount: "0";
|
|
1654
1738
|
};
|
|
1655
|
-
interaction_reason?: "
|
|
1739
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
1656
1740
|
expires_at: string | null;
|
|
1657
1741
|
expires_in_seconds: number | null;
|
|
1658
1742
|
id: string;
|
|
1659
1743
|
resource_server: string;
|
|
1660
|
-
note?: {
|
|
1661
|
-
value: string;
|
|
1662
|
-
editable: boolean;
|
|
1663
|
-
} | undefined;
|
|
1664
1744
|
metadata: {
|
|
1665
1745
|
[x: string]: unknown;
|
|
1666
1746
|
};
|
|
1667
1747
|
server_time: string;
|
|
1668
1748
|
created_at: string;
|
|
1669
1749
|
authorization_url: string;
|
|
1670
|
-
}, "Authoritative Project-facing state of a transfer. `
|
|
1750
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1671
1751
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
1672
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
1752
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
1753
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
1754
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
1673
1755
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
1674
1756
|
readonly account: v.StrictObjectSchema<{
|
|
1675
1757
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1679,22 +1761,24 @@ export declare const contract: {
|
|
|
1679
1761
|
}, undefined>;
|
|
1680
1762
|
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
1763
|
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
1764
|
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
|
|
1765
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
1686
1766
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1687
1767
|
}, undefined>, v.DescriptionAction<{
|
|
1688
1768
|
value: string;
|
|
1689
1769
|
editable: boolean;
|
|
1690
|
-
}, "The
|
|
1770
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1771
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1772
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1691
1773
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1692
1774
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1693
1775
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1694
1776
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1695
1777
|
}, undefined>, v.DescriptionAction<{
|
|
1696
1778
|
type: "account_opening";
|
|
1697
|
-
status: "
|
|
1779
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
1780
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
1781
|
+
account_opening_status_detail: string | null;
|
|
1698
1782
|
signed: boolean;
|
|
1699
1783
|
account: {
|
|
1700
1784
|
accountKey: string;
|
|
@@ -1704,21 +1788,23 @@ export declare const contract: {
|
|
|
1704
1788
|
};
|
|
1705
1789
|
expires_at: string | null;
|
|
1706
1790
|
expires_in_seconds: number | null;
|
|
1707
|
-
id: string;
|
|
1708
|
-
resource_server: string;
|
|
1709
1791
|
note?: {
|
|
1710
1792
|
value: string;
|
|
1711
1793
|
editable: boolean;
|
|
1712
1794
|
} | undefined;
|
|
1795
|
+
id: string;
|
|
1796
|
+
resource_server: string;
|
|
1713
1797
|
metadata: {
|
|
1714
1798
|
[x: string]: unknown;
|
|
1715
1799
|
};
|
|
1716
1800
|
server_time: string;
|
|
1717
1801
|
created_at: string;
|
|
1718
1802
|
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
|
|
1803
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1720
1804
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
1721
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
1805
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
1806
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
1807
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
1722
1808
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
1723
1809
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1724
1810
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -1726,38 +1812,40 @@ export declare const contract: {
|
|
|
1726
1812
|
}, undefined>, v.DescriptionAction<{
|
|
1727
1813
|
type: "account_key";
|
|
1728
1814
|
accountKey: string;
|
|
1729
|
-
}, "One
|
|
1815
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1730
1816
|
type: v.LiteralSchema<"account", undefined>;
|
|
1731
1817
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1732
1818
|
}, undefined>, v.DescriptionAction<{
|
|
1733
1819
|
type: "account";
|
|
1734
1820
|
id: string;
|
|
1735
|
-
}, "One
|
|
1821
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1736
1822
|
type: "account_key";
|
|
1737
1823
|
accountKey: string;
|
|
1738
1824
|
} | {
|
|
1739
1825
|
type: "account";
|
|
1740
1826
|
id: string;
|
|
1741
|
-
}, "One
|
|
1827
|
+
}, "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
1828
|
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
1829
|
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1744
1830
|
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
1831
|
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
|
|
1832
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
1749
1833
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1750
1834
|
}, undefined>, v.DescriptionAction<{
|
|
1751
1835
|
value: string;
|
|
1752
1836
|
editable: boolean;
|
|
1753
|
-
}, "The
|
|
1837
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
1838
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1839
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1754
1840
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1755
1841
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1756
1842
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1757
1843
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1758
1844
|
}, undefined>, v.DescriptionAction<{
|
|
1759
1845
|
type: "account_closure";
|
|
1760
|
-
status: "
|
|
1846
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
1847
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
1848
|
+
account_closure_status_detail: string | null;
|
|
1761
1849
|
signed: boolean;
|
|
1762
1850
|
account: {
|
|
1763
1851
|
type: "account_key";
|
|
@@ -1769,24 +1857,137 @@ export declare const contract: {
|
|
|
1769
1857
|
resolved_account_id: string | null;
|
|
1770
1858
|
expires_at: string;
|
|
1771
1859
|
expires_in_seconds: number;
|
|
1772
|
-
id: string;
|
|
1773
|
-
resource_server: string;
|
|
1774
1860
|
note?: {
|
|
1775
1861
|
value: string;
|
|
1776
1862
|
editable: boolean;
|
|
1777
1863
|
} | undefined;
|
|
1864
|
+
id: string;
|
|
1865
|
+
resource_server: string;
|
|
1778
1866
|
metadata: {
|
|
1779
1867
|
[x: string]: unknown;
|
|
1780
1868
|
};
|
|
1781
1869
|
server_time: string;
|
|
1782
1870
|
created_at: string;
|
|
1783
1871
|
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]>>;
|
|
1872
|
+
}, "Authoritative Project-facing state of an account closure. It carries no amount and no fee.">]>], undefined>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").ApprovedUseTransfers, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./intents.js").AccountKeyOutOfGrant, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./intents.js").AccountKeyTaken, typeof import("./intents.js").BankAccountQuotaExceeded, typeof import("./intents.js").InvalidIntentState, typeof import("./intents.js").IntentExpired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./intents.js").DepositAmountOutOfBounds, typeof import("./intents.js").DepositDestinationAmbiguous, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").UnsupportedBank, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankAccountNumberMissing, typeof import("./intents.js").BankAuthorizationDenied, typeof import("./intents.js").BankHolderWithoutAccount, typeof import("./intents.js").BankAccountLimitReached, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
1873
|
+
createTransfer: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1874
|
+
readonly payload: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON claims (`SignedTransferClaims`).">]>;
|
|
1875
|
+
readonly signatures: v.SchemaWithPipe<readonly [v.ArraySchema<v.StrictObjectSchema<{
|
|
1876
|
+
readonly protected: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "The base64url of the JSON protected header (`SignedTransferHeader`).">]>;
|
|
1877
|
+
readonly signature: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1878
|
+
}, undefined>, undefined>, v.MinLengthAction<{
|
|
1879
|
+
protected: string;
|
|
1880
|
+
signature: string;
|
|
1881
|
+
}[], 1, undefined>, v.DescriptionAction<{
|
|
1882
|
+
protected: string;
|
|
1883
|
+
signature: string;
|
|
1884
|
+
}[], "At least one signature over the same payload; every one is verified.">]>;
|
|
1885
|
+
}, undefined>, v.DescriptionAction<{
|
|
1886
|
+
payload: string;
|
|
1887
|
+
signatures: {
|
|
1888
|
+
protected: string;
|
|
1889
|
+
signature: string;
|
|
1890
|
+
}[];
|
|
1891
|
+
}, "A signed transfer: a JWS in the General JSON Serialization (RFC 7515 §7.2.1), with one `payload` and at least one signature, each with a protected header of `typ` `transfer.v1+jwt`. Sent as `application/jose+json`.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1892
|
+
readonly object: v.LiteralSchema<"transfer", undefined>;
|
|
1893
|
+
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
|
|
1894
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing", "succeeded", "failed", "cancelled"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "requires_action" | "processing", "Where the Transfer stands: `requires_action` while the person still owes the bank a step, `processing` while the bank holds it and has not answered for good, then `succeeded`, `failed` or `cancelled`, which are final. `status_detail` says why. There is no `rejected` Transfer: a rejection ends an Intent, and a rejected Intent has no Transfer.">]>;
|
|
1895
|
+
readonly status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The word that says why, null when the status has none: `bank_refused` for a `failed` Transfer the bank refused for sure, `expired` for a `cancelled` one whose deadline passed, `grant_revoked` or `grant_expired` for one whose Grant ended. The vocabulary is open: a detail added later appears here as it is, so decide on `status`.">]>;
|
|
1896
|
+
readonly origin: v.SchemaWithPipe<readonly [v.PicklistSchema<["oauth", "platform", "emisor"], undefined>, v.DescriptionAction<"oauth" | "platform" | "emisor", "Who made it: `oauth`, a Project through the API; `platform`, a person in the AndCo web app; `emisor`, a person in the issuer's own channels, for example its mobile app.">]>;
|
|
1897
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647.">]>;
|
|
1898
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1899
|
+
readonly sender: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1900
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
1901
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1902
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1903
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
1904
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
1905
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
1906
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
1907
|
+
}, undefined>, v.DescriptionAction<{
|
|
1908
|
+
country: string;
|
|
1909
|
+
bank_code: string;
|
|
1910
|
+
account_type: "10" | "20" | "40";
|
|
1911
|
+
account_number: string;
|
|
1912
|
+
name: string | null;
|
|
1913
|
+
national_kind_id: string | null;
|
|
1914
|
+
national_id: string | null;
|
|
1915
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
1916
|
+
country: string;
|
|
1917
|
+
bank_code: string;
|
|
1918
|
+
account_type: "10" | "20" | "40";
|
|
1919
|
+
account_number: string;
|
|
1920
|
+
name: string | null;
|
|
1921
|
+
national_kind_id: string | null;
|
|
1922
|
+
national_id: string | null;
|
|
1923
|
+
}, "The Remitente: the account the money leaves and its holder.">]>;
|
|
1924
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1925
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
1926
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
1927
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
1928
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
1929
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
1930
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
1931
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
1932
|
+
}, undefined>, v.DescriptionAction<{
|
|
1933
|
+
country: string;
|
|
1934
|
+
bank_code: string;
|
|
1935
|
+
account_type: "10" | "20" | "40";
|
|
1936
|
+
account_number: string;
|
|
1937
|
+
name: string | null;
|
|
1938
|
+
national_kind_id: string | null;
|
|
1939
|
+
national_id: string | null;
|
|
1940
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
1941
|
+
country: string;
|
|
1942
|
+
bank_code: string;
|
|
1943
|
+
account_type: "10" | "20" | "40";
|
|
1944
|
+
account_number: string;
|
|
1945
|
+
name: string | null;
|
|
1946
|
+
national_kind_id: string | null;
|
|
1947
|
+
national_id: string | null;
|
|
1948
|
+
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
1949
|
+
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
1950
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer with `approved: true` (its signature approved it, so there was no request).">]>;
|
|
1951
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer with `approved: true` that submitted it, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
1952
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
1953
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
1954
|
+
}, undefined>, v.DescriptionAction<{
|
|
1955
|
+
object: "transfer";
|
|
1956
|
+
id: string;
|
|
1957
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
1958
|
+
status_detail: string | null;
|
|
1959
|
+
origin: "oauth" | "platform" | "emisor";
|
|
1960
|
+
amount: number;
|
|
1961
|
+
currency: "CLP";
|
|
1962
|
+
sender: {
|
|
1963
|
+
country: string;
|
|
1964
|
+
bank_code: string;
|
|
1965
|
+
account_type: "10" | "20" | "40";
|
|
1966
|
+
account_number: string;
|
|
1967
|
+
name: string | null;
|
|
1968
|
+
national_kind_id: string | null;
|
|
1969
|
+
national_id: string | null;
|
|
1970
|
+
};
|
|
1971
|
+
receiver: {
|
|
1972
|
+
country: string;
|
|
1973
|
+
bank_code: string;
|
|
1974
|
+
account_type: "10" | "20" | "40";
|
|
1975
|
+
account_number: string;
|
|
1976
|
+
name: string | null;
|
|
1977
|
+
national_kind_id: string | null;
|
|
1978
|
+
national_id: string | null;
|
|
1979
|
+
};
|
|
1980
|
+
comment: string | null;
|
|
1981
|
+
intent_id: string | null;
|
|
1982
|
+
jti: string | null;
|
|
1983
|
+
transaction_id: string | null;
|
|
1984
|
+
created_at: string;
|
|
1985
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./intents.js").IdempotencyKeyNotAllowed, typeof import("./intents.js").ApprovalRequiredUseIntents, typeof import("./intents.js").InvalidSignedInstruction, typeof import("./common.js").InvalidToken, typeof import("./intents.js").ExpiredSignedInstruction, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").InsufficientAuthorization, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./intents.js").IdempotencyConflict, typeof import("./intents.js").IntentInteractionRequired, typeof import("./common.js").PayloadTooLarge, typeof import("./common.js").UnsupportedMediaType, typeof import("./transfers.js").SenderMismatch, typeof import("./intents.js").TransferSenderIdentityUnavailable, typeof import("./intents.js").AmountOutOfGrant, typeof import("./intents.js").InvalidSource, typeof import("./intents.js").InvalidDestination, typeof import("./intents.js").BankConnectionUnavailable, typeof import("./intents.js").BankRefused, typeof import("./intents.js").InsufficientFunds, typeof import("./intents.js").BankRejected, typeof import("./intents.js").BankReviewRequired, typeof import("./intents.js").NotImplemented, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
1785
1986
|
getBankCatalog: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1786
1987
|
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
1787
1988
|
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1788
1989
|
readonly node: v.StrictObjectSchema<{
|
|
1789
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The `
|
|
1990
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code: the `bank_code` of a Receptor.">]>;
|
|
1790
1991
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
|
|
1791
1992
|
}, undefined>;
|
|
1792
1993
|
}, undefined>, undefined>;
|
|
@@ -1815,7 +2016,7 @@ export declare const contract: {
|
|
|
1815
2016
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1816
2017
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
1817
2018
|
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"
|
|
2019
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
1819
2020
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
1820
2021
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
1821
2022
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -1848,7 +2049,7 @@ export declare const contract: {
|
|
|
1848
2049
|
account_type: "checking" | "debit" | "savings";
|
|
1849
2050
|
holder_id: string | null;
|
|
1850
2051
|
holder_name: string;
|
|
1851
|
-
}, "The
|
|
2052
|
+
}, "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
2053
|
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1853
2054
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1854
2055
|
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
@@ -1872,8 +2073,8 @@ export declare const contract: {
|
|
|
1872
2073
|
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
1873
2074
|
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
1874
2075
|
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
|
|
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
|
|
2076
|
+
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 AndCo reported it.">]>;
|
|
2077
|
+
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 AndCo reported it.">]>;
|
|
1877
2078
|
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
2079
|
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
1879
2080
|
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -1887,49 +2088,50 @@ export declare const contract: {
|
|
|
1887
2088
|
}, undefined>;
|
|
1888
2089
|
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
1889
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.">]>;
|
|
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
2091
|
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
|
|
2092
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
1894
2093
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
1895
2094
|
}, undefined>, v.DescriptionAction<{
|
|
1896
2095
|
value: string;
|
|
1897
2096
|
editable: boolean;
|
|
1898
|
-
}, "The
|
|
2097
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
2098
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2099
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1899
2100
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
1900
2101
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1901
2102
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1902
2103
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
1903
2104
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1904
2105
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
1905
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
2106
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
2107
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
1906
2108
|
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
|
|
2109
|
+
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1908
2110
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
1909
2111
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
1910
2112
|
}, undefined>, v.DescriptionAction<{
|
|
1911
2113
|
type: "account_key";
|
|
1912
2114
|
accountKey: string;
|
|
1913
|
-
}, "One
|
|
2115
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1914
2116
|
type: v.LiteralSchema<"account", undefined>;
|
|
1915
2117
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
1916
2118
|
}, undefined>, v.DescriptionAction<{
|
|
1917
2119
|
type: "account";
|
|
1918
2120
|
id: string;
|
|
1919
|
-
}, "One
|
|
2121
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
1920
2122
|
type: "account_key";
|
|
1921
2123
|
accountKey: string;
|
|
1922
2124
|
} | {
|
|
1923
2125
|
type: "account";
|
|
1924
2126
|
id: string;
|
|
1925
|
-
}, "One
|
|
2127
|
+
}, "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
2128
|
type: "account_key";
|
|
1927
2129
|
accountKey: string;
|
|
1928
2130
|
} | {
|
|
1929
2131
|
type: "account";
|
|
1930
2132
|
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
|
|
2133
|
+
} | null, "The Remitente. 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.">]>;
|
|
2134
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
1933
2135
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1934
2136
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
1935
2137
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -1940,11 +2142,13 @@ export declare const contract: {
|
|
|
1940
2142
|
}, undefined>, v.StrictObjectSchema<{
|
|
1941
2143
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
1942
2144
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
1943
|
-
readonly
|
|
1944
|
-
readonly
|
|
1945
|
-
readonly
|
|
1946
|
-
readonly
|
|
1947
|
-
readonly
|
|
2145
|
+
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
2146
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2147
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2148
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
2149
|
+
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
2150
|
+
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
2151
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
|
|
1948
2152
|
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1949
2153
|
editable: false;
|
|
1950
2154
|
type: "account_key";
|
|
@@ -1956,12 +2160,14 @@ export declare const contract: {
|
|
|
1956
2160
|
} | {
|
|
1957
2161
|
editable: false;
|
|
1958
2162
|
type: "external";
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
2163
|
+
country: "CL";
|
|
2164
|
+
bank_code: string;
|
|
2165
|
+
account_type: "10" | "20" | "40";
|
|
2166
|
+
account_number: string;
|
|
2167
|
+
name: string;
|
|
2168
|
+
national_kind_id: "RUT";
|
|
2169
|
+
national_id: string;
|
|
2170
|
+
}, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor 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 `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
1965
2171
|
editable: false;
|
|
1966
2172
|
type: "account_key";
|
|
1967
2173
|
accountKey: string;
|
|
@@ -1972,64 +2178,67 @@ export declare const contract: {
|
|
|
1972
2178
|
} | {
|
|
1973
2179
|
editable: false;
|
|
1974
2180
|
type: "external";
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2181
|
+
country: "CL";
|
|
2182
|
+
bank_code: string;
|
|
2183
|
+
account_type: "10" | "20" | "40";
|
|
2184
|
+
account_number: string;
|
|
2185
|
+
name: string;
|
|
2186
|
+
national_kind_id: "RUT";
|
|
2187
|
+
national_id: string;
|
|
2188
|
+
} | null, "The Receptor. 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.">]>;
|
|
2189
|
+
readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2190
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
|
|
2191
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
2192
|
+
}, undefined>, v.DescriptionAction<{
|
|
2193
|
+
value: string;
|
|
2194
|
+
editable: boolean;
|
|
2195
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
1981
2196
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1982
2197
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1983
|
-
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.
|
|
2198
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
1984
2199
|
readonly editable: v.BooleanSchema<undefined>;
|
|
1985
|
-
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.
|
|
2200
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
1986
2201
|
}, undefined>, v.DescriptionAction<{
|
|
1987
2202
|
currency: "CLP";
|
|
1988
|
-
value:
|
|
2203
|
+
value: number;
|
|
1989
2204
|
editable: boolean;
|
|
1990
|
-
confirmed:
|
|
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.">]>;
|
|
2205
|
+
confirmed: number | null;
|
|
2206
|
+
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
1992
2207
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
1993
2208
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
1994
|
-
readonly value: v.SchemaWithPipe<readonly [v.
|
|
2209
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
1995
2210
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
1996
2211
|
}, undefined>, v.DescriptionAction<{
|
|
1997
2212
|
currency: "CLP";
|
|
1998
|
-
value:
|
|
2213
|
+
value: number;
|
|
1999
2214
|
at: string;
|
|
2000
2215
|
}, "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
2216
|
readonly fee: v.StrictObjectSchema<{
|
|
2002
2217
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
2003
2218
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
2004
2219
|
}, undefined>;
|
|
2005
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
2220
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
2006
2221
|
readonly expires_at: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The deadline to approve and execute the Intent. `null`: the Intent never expires.">]>;
|
|
2007
2222
|
readonly expires_in_seconds: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, undefined>, v.DescriptionAction<number | null, "Remaining actionable lifetime at server_time; zero for finite terminal Intents, `null` when the Intent never expires.">]>;
|
|
2008
2223
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2009
2224
|
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
2225
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2018
2226
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2019
2227
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2020
2228
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2021
2229
|
}, undefined>, v.DescriptionAction<{
|
|
2022
2230
|
type: "transfer";
|
|
2023
|
-
status: "
|
|
2231
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
2232
|
+
transfer_id: string | null;
|
|
2024
2233
|
signed: boolean;
|
|
2025
|
-
|
|
2234
|
+
sender: {
|
|
2026
2235
|
type: "account_key";
|
|
2027
2236
|
accountKey: string;
|
|
2028
2237
|
} | {
|
|
2029
2238
|
type: "account";
|
|
2030
2239
|
id: string;
|
|
2031
2240
|
} | null;
|
|
2032
|
-
|
|
2241
|
+
receiver: {
|
|
2033
2242
|
editable: false;
|
|
2034
2243
|
type: "account_key";
|
|
2035
2244
|
accountKey: string;
|
|
@@ -2040,45 +2249,49 @@ export declare const contract: {
|
|
|
2040
2249
|
} | {
|
|
2041
2250
|
editable: false;
|
|
2042
2251
|
type: "external";
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2252
|
+
country: "CL";
|
|
2253
|
+
bank_code: string;
|
|
2254
|
+
account_type: "10" | "20" | "40";
|
|
2255
|
+
account_number: string;
|
|
2256
|
+
name: string;
|
|
2257
|
+
national_kind_id: "RUT";
|
|
2258
|
+
national_id: string;
|
|
2048
2259
|
} | null;
|
|
2260
|
+
comment?: {
|
|
2261
|
+
value: string;
|
|
2262
|
+
editable: boolean;
|
|
2263
|
+
} | undefined;
|
|
2049
2264
|
amount: {
|
|
2050
2265
|
currency: "CLP";
|
|
2051
|
-
value:
|
|
2266
|
+
value: number;
|
|
2052
2267
|
editable: boolean;
|
|
2053
|
-
confirmed:
|
|
2268
|
+
confirmed: number | null;
|
|
2054
2269
|
};
|
|
2055
2270
|
settled: {
|
|
2056
2271
|
currency: "CLP";
|
|
2057
|
-
value:
|
|
2272
|
+
value: number;
|
|
2058
2273
|
at: string;
|
|
2059
2274
|
} | null;
|
|
2060
2275
|
fee: {
|
|
2061
2276
|
currency: "CLP";
|
|
2062
2277
|
amount: "0";
|
|
2063
2278
|
};
|
|
2064
|
-
interaction_reason?: "
|
|
2279
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
2065
2280
|
expires_at: string | null;
|
|
2066
2281
|
expires_in_seconds: number | null;
|
|
2067
2282
|
id: string;
|
|
2068
2283
|
resource_server: string;
|
|
2069
|
-
note?: {
|
|
2070
|
-
value: string;
|
|
2071
|
-
editable: boolean;
|
|
2072
|
-
} | undefined;
|
|
2073
2284
|
metadata: {
|
|
2074
2285
|
[x: string]: unknown;
|
|
2075
2286
|
};
|
|
2076
2287
|
server_time: string;
|
|
2077
2288
|
created_at: string;
|
|
2078
2289
|
authorization_url: string;
|
|
2079
|
-
}, "Authoritative Project-facing state of a transfer. `
|
|
2290
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2080
2291
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
2081
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
2292
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
2293
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
2294
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
2082
2295
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
2083
2296
|
readonly account: v.StrictObjectSchema<{
|
|
2084
2297
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -2088,22 +2301,24 @@ export declare const contract: {
|
|
|
2088
2301
|
}, undefined>;
|
|
2089
2302
|
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
2303
|
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
2304
|
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
|
|
2305
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
2095
2306
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
2096
2307
|
}, undefined>, v.DescriptionAction<{
|
|
2097
2308
|
value: string;
|
|
2098
2309
|
editable: boolean;
|
|
2099
|
-
}, "The
|
|
2310
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
2311
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2312
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2100
2313
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2101
2314
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2102
2315
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2103
2316
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2104
2317
|
}, undefined>, v.DescriptionAction<{
|
|
2105
2318
|
type: "account_opening";
|
|
2106
|
-
status: "
|
|
2319
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
2320
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
2321
|
+
account_opening_status_detail: string | null;
|
|
2107
2322
|
signed: boolean;
|
|
2108
2323
|
account: {
|
|
2109
2324
|
accountKey: string;
|
|
@@ -2113,21 +2328,23 @@ export declare const contract: {
|
|
|
2113
2328
|
};
|
|
2114
2329
|
expires_at: string | null;
|
|
2115
2330
|
expires_in_seconds: number | null;
|
|
2116
|
-
id: string;
|
|
2117
|
-
resource_server: string;
|
|
2118
2331
|
note?: {
|
|
2119
2332
|
value: string;
|
|
2120
2333
|
editable: boolean;
|
|
2121
2334
|
} | undefined;
|
|
2335
|
+
id: string;
|
|
2336
|
+
resource_server: string;
|
|
2122
2337
|
metadata: {
|
|
2123
2338
|
[x: string]: unknown;
|
|
2124
2339
|
};
|
|
2125
2340
|
server_time: string;
|
|
2126
2341
|
created_at: string;
|
|
2127
2342
|
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
|
|
2343
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2129
2344
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
2130
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
2345
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
2346
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
2347
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
2131
2348
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
2132
2349
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2133
2350
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -2135,38 +2352,40 @@ export declare const contract: {
|
|
|
2135
2352
|
}, undefined>, v.DescriptionAction<{
|
|
2136
2353
|
type: "account_key";
|
|
2137
2354
|
accountKey: string;
|
|
2138
|
-
}, "One
|
|
2355
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2139
2356
|
type: v.LiteralSchema<"account", undefined>;
|
|
2140
2357
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2141
2358
|
}, undefined>, v.DescriptionAction<{
|
|
2142
2359
|
type: "account";
|
|
2143
2360
|
id: string;
|
|
2144
|
-
}, "One
|
|
2361
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
2145
2362
|
type: "account_key";
|
|
2146
2363
|
accountKey: string;
|
|
2147
2364
|
} | {
|
|
2148
2365
|
type: "account";
|
|
2149
2366
|
id: string;
|
|
2150
|
-
}, "One
|
|
2367
|
+
}, "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
2368
|
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
2369
|
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2153
2370
|
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
2371
|
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
|
|
2372
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
2158
2373
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
2159
2374
|
}, undefined>, v.DescriptionAction<{
|
|
2160
2375
|
value: string;
|
|
2161
2376
|
editable: boolean;
|
|
2162
|
-
}, "The
|
|
2377
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
2378
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2379
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2163
2380
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
2164
2381
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2165
2382
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2166
2383
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
2167
2384
|
}, undefined>, v.DescriptionAction<{
|
|
2168
2385
|
type: "account_closure";
|
|
2169
|
-
status: "
|
|
2386
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
2387
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
2388
|
+
account_closure_status_detail: string | null;
|
|
2170
2389
|
signed: boolean;
|
|
2171
2390
|
account: {
|
|
2172
2391
|
type: "account_key";
|
|
@@ -2178,12 +2397,12 @@ export declare const contract: {
|
|
|
2178
2397
|
resolved_account_id: string | null;
|
|
2179
2398
|
expires_at: string;
|
|
2180
2399
|
expires_in_seconds: number;
|
|
2181
|
-
id: string;
|
|
2182
|
-
resource_server: string;
|
|
2183
2400
|
note?: {
|
|
2184
2401
|
value: string;
|
|
2185
2402
|
editable: boolean;
|
|
2186
2403
|
} | undefined;
|
|
2404
|
+
id: string;
|
|
2405
|
+
resource_server: string;
|
|
2187
2406
|
metadata: {
|
|
2188
2407
|
[x: string]: unknown;
|
|
2189
2408
|
};
|
|
@@ -2283,6 +2502,103 @@ export declare const contract: {
|
|
|
2283
2502
|
hasNextPage: boolean;
|
|
2284
2503
|
};
|
|
2285
2504
|
}, 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]>>;
|
|
2505
|
+
getTransfer: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2506
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2507
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2508
|
+
readonly object: v.LiteralSchema<"transfer", undefined>;
|
|
2509
|
+
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
|
|
2510
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing", "succeeded", "failed", "cancelled"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "requires_action" | "processing", "Where the Transfer stands: `requires_action` while the person still owes the bank a step, `processing` while the bank holds it and has not answered for good, then `succeeded`, `failed` or `cancelled`, which are final. `status_detail` says why. There is no `rejected` Transfer: a rejection ends an Intent, and a rejected Intent has no Transfer.">]>;
|
|
2511
|
+
readonly status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The word that says why, null when the status has none: `bank_refused` for a `failed` Transfer the bank refused for sure, `expired` for a `cancelled` one whose deadline passed, `grant_revoked` or `grant_expired` for one whose Grant ended. The vocabulary is open: a detail added later appears here as it is, so decide on `status`.">]>;
|
|
2512
|
+
readonly origin: v.SchemaWithPipe<readonly [v.PicklistSchema<["oauth", "platform", "emisor"], undefined>, v.DescriptionAction<"oauth" | "platform" | "emisor", "Who made it: `oauth`, a Project through the API; `platform`, a person in the AndCo web app; `emisor`, a person in the issuer's own channels, for example its mobile app.">]>;
|
|
2513
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647.">]>;
|
|
2514
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
2515
|
+
readonly sender: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2516
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
2517
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2518
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2519
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
2520
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
2521
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
2522
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
2523
|
+
}, undefined>, v.DescriptionAction<{
|
|
2524
|
+
country: string;
|
|
2525
|
+
bank_code: string;
|
|
2526
|
+
account_type: "10" | "20" | "40";
|
|
2527
|
+
account_number: string;
|
|
2528
|
+
name: string | null;
|
|
2529
|
+
national_kind_id: string | null;
|
|
2530
|
+
national_id: string | null;
|
|
2531
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
2532
|
+
country: string;
|
|
2533
|
+
bank_code: string;
|
|
2534
|
+
account_type: "10" | "20" | "40";
|
|
2535
|
+
account_number: string;
|
|
2536
|
+
name: string | null;
|
|
2537
|
+
national_kind_id: string | null;
|
|
2538
|
+
national_id: string | null;
|
|
2539
|
+
}, "The Remitente: the account the money leaves and its holder.">]>;
|
|
2540
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2541
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
2542
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2543
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2544
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
2545
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
2546
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
2547
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
2548
|
+
}, undefined>, v.DescriptionAction<{
|
|
2549
|
+
country: string;
|
|
2550
|
+
bank_code: string;
|
|
2551
|
+
account_type: "10" | "20" | "40";
|
|
2552
|
+
account_number: string;
|
|
2553
|
+
name: string | null;
|
|
2554
|
+
national_kind_id: string | null;
|
|
2555
|
+
national_id: string | null;
|
|
2556
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
2557
|
+
country: string;
|
|
2558
|
+
bank_code: string;
|
|
2559
|
+
account_type: "10" | "20" | "40";
|
|
2560
|
+
account_number: string;
|
|
2561
|
+
name: string | null;
|
|
2562
|
+
national_kind_id: string | null;
|
|
2563
|
+
national_id: string | null;
|
|
2564
|
+
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
2565
|
+
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
2566
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer with `approved: true` (its signature approved it, so there was no request).">]>;
|
|
2567
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer with `approved: true` that submitted it, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
2568
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
2569
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
2570
|
+
}, undefined>, v.DescriptionAction<{
|
|
2571
|
+
object: "transfer";
|
|
2572
|
+
id: string;
|
|
2573
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
2574
|
+
status_detail: string | null;
|
|
2575
|
+
origin: "oauth" | "platform" | "emisor";
|
|
2576
|
+
amount: number;
|
|
2577
|
+
currency: "CLP";
|
|
2578
|
+
sender: {
|
|
2579
|
+
country: string;
|
|
2580
|
+
bank_code: string;
|
|
2581
|
+
account_type: "10" | "20" | "40";
|
|
2582
|
+
account_number: string;
|
|
2583
|
+
name: string | null;
|
|
2584
|
+
national_kind_id: string | null;
|
|
2585
|
+
national_id: string | null;
|
|
2586
|
+
};
|
|
2587
|
+
receiver: {
|
|
2588
|
+
country: string;
|
|
2589
|
+
bank_code: string;
|
|
2590
|
+
account_type: "10" | "20" | "40";
|
|
2591
|
+
account_number: string;
|
|
2592
|
+
name: string | null;
|
|
2593
|
+
national_kind_id: string | null;
|
|
2594
|
+
national_id: string | null;
|
|
2595
|
+
};
|
|
2596
|
+
comment: string | null;
|
|
2597
|
+
intent_id: string | null;
|
|
2598
|
+
jti: string | null;
|
|
2599
|
+
transaction_id: string | null;
|
|
2600
|
+
created_at: string;
|
|
2601
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidIdentifier, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2286
2602
|
getUserInfo: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.ObjectSchema<{
|
|
2287
2603
|
readonly sub: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2288
2604
|
readonly email: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The Profile's email address, present with the `email` scope. Any address the identity provider accepts, so a client must not require a narrower syntax.">]>, undefined>;
|
|
@@ -2310,7 +2626,7 @@ export declare const contract: {
|
|
|
2310
2626
|
readonly number: v.StringSchema<undefined>;
|
|
2311
2627
|
readonly type: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Null while the balance projection does not know the account yet.">]>;
|
|
2312
2628
|
readonly currency: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "Null while the balance projection does not know the account yet.">]>;
|
|
2313
|
-
readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The
|
|
2629
|
+
readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The balance AndCo maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds on hold are not subtracted from it. Null while AndCo does not know the account's balance yet, for example right after it is opened, and null when the Grant lacks `read_balance`; a listing never fails for it and never makes up a zero.">]>;
|
|
2314
2630
|
}, undefined>;
|
|
2315
2631
|
}, undefined>, undefined>;
|
|
2316
2632
|
readonly pageInfo: v.StrictObjectSchema<{
|
|
@@ -2350,11 +2666,11 @@ export declare const contract: {
|
|
|
2350
2666
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
2351
2667
|
readonly transactionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2352
2668
|
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
|
|
2354
|
-
readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of movement, under
|
|
2669
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Issued by AndCo and republished exactly as AndCo 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: AndCo sends the amount as a positive figure.">]>;
|
|
2670
|
+
readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of movement, under AndCo'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
2671
|
readonly origin: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2356
2672
|
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
|
|
2673
|
+
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 AndCo and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away.">]>;
|
|
2358
2674
|
readonly paymentType: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2359
2675
|
readonly reversed: v.BooleanSchema<undefined>;
|
|
2360
2676
|
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
@@ -2390,6 +2706,158 @@ export declare const contract: {
|
|
|
2390
2706
|
hasNextPage: boolean;
|
|
2391
2707
|
};
|
|
2392
2708
|
}, 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]>>;
|
|
2709
|
+
listAccountTransfers: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2710
|
+
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>;
|
|
2711
|
+
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.">]>;
|
|
2712
|
+
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.">]>;
|
|
2713
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2714
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
2715
|
+
readonly cursor: v.StringSchema<undefined>;
|
|
2716
|
+
readonly node: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2717
|
+
readonly object: v.LiteralSchema<"transfer", undefined>;
|
|
2718
|
+
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
|
|
2719
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing", "succeeded", "failed", "cancelled"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "requires_action" | "processing", "Where the Transfer stands: `requires_action` while the person still owes the bank a step, `processing` while the bank holds it and has not answered for good, then `succeeded`, `failed` or `cancelled`, which are final. `status_detail` says why. There is no `rejected` Transfer: a rejection ends an Intent, and a rejected Intent has no Transfer.">]>;
|
|
2720
|
+
readonly status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The word that says why, null when the status has none: `bank_refused` for a `failed` Transfer the bank refused for sure, `expired` for a `cancelled` one whose deadline passed, `grant_revoked` or `grant_expired` for one whose Grant ended. The vocabulary is open: a detail added later appears here as it is, so decide on `status`.">]>;
|
|
2721
|
+
readonly origin: v.SchemaWithPipe<readonly [v.PicklistSchema<["oauth", "platform", "emisor"], undefined>, v.DescriptionAction<"oauth" | "platform" | "emisor", "Who made it: `oauth`, a Project through the API; `platform`, a person in the AndCo web app; `emisor`, a person in the issuer's own channels, for example its mobile app.">]>;
|
|
2722
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647.">]>;
|
|
2723
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
2724
|
+
readonly sender: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2725
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
2726
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2727
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2728
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
2729
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
2730
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
2731
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
2732
|
+
}, undefined>, v.DescriptionAction<{
|
|
2733
|
+
country: string;
|
|
2734
|
+
bank_code: string;
|
|
2735
|
+
account_type: "10" | "20" | "40";
|
|
2736
|
+
account_number: string;
|
|
2737
|
+
name: string | null;
|
|
2738
|
+
national_kind_id: string | null;
|
|
2739
|
+
national_id: string | null;
|
|
2740
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
2741
|
+
country: string;
|
|
2742
|
+
bank_code: string;
|
|
2743
|
+
account_type: "10" | "20" | "40";
|
|
2744
|
+
account_number: string;
|
|
2745
|
+
name: string | null;
|
|
2746
|
+
national_kind_id: string | null;
|
|
2747
|
+
national_id: string | null;
|
|
2748
|
+
}, "The Remitente: the account the money leaves and its holder.">]>;
|
|
2749
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
2750
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
2751
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
2752
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
2753
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
2754
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
2755
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
2756
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
2757
|
+
}, undefined>, v.DescriptionAction<{
|
|
2758
|
+
country: string;
|
|
2759
|
+
bank_code: string;
|
|
2760
|
+
account_type: "10" | "20" | "40";
|
|
2761
|
+
account_number: string;
|
|
2762
|
+
name: string | null;
|
|
2763
|
+
national_kind_id: string | null;
|
|
2764
|
+
national_id: string | null;
|
|
2765
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
2766
|
+
country: string;
|
|
2767
|
+
bank_code: string;
|
|
2768
|
+
account_type: "10" | "20" | "40";
|
|
2769
|
+
account_number: string;
|
|
2770
|
+
name: string | null;
|
|
2771
|
+
national_kind_id: string | null;
|
|
2772
|
+
national_id: string | null;
|
|
2773
|
+
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
2774
|
+
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
2775
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer with `approved: true` (its signature approved it, so there was no request).">]>;
|
|
2776
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer with `approved: true` that submitted it, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
2777
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
2778
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
2779
|
+
}, undefined>, v.DescriptionAction<{
|
|
2780
|
+
object: "transfer";
|
|
2781
|
+
id: string;
|
|
2782
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
2783
|
+
status_detail: string | null;
|
|
2784
|
+
origin: "oauth" | "platform" | "emisor";
|
|
2785
|
+
amount: number;
|
|
2786
|
+
currency: "CLP";
|
|
2787
|
+
sender: {
|
|
2788
|
+
country: string;
|
|
2789
|
+
bank_code: string;
|
|
2790
|
+
account_type: "10" | "20" | "40";
|
|
2791
|
+
account_number: string;
|
|
2792
|
+
name: string | null;
|
|
2793
|
+
national_kind_id: string | null;
|
|
2794
|
+
national_id: string | null;
|
|
2795
|
+
};
|
|
2796
|
+
receiver: {
|
|
2797
|
+
country: string;
|
|
2798
|
+
bank_code: string;
|
|
2799
|
+
account_type: "10" | "20" | "40";
|
|
2800
|
+
account_number: string;
|
|
2801
|
+
name: string | null;
|
|
2802
|
+
national_kind_id: string | null;
|
|
2803
|
+
national_id: string | null;
|
|
2804
|
+
};
|
|
2805
|
+
comment: string | null;
|
|
2806
|
+
intent_id: string | null;
|
|
2807
|
+
jti: string | null;
|
|
2808
|
+
transaction_id: string | null;
|
|
2809
|
+
created_at: string;
|
|
2810
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>;
|
|
2811
|
+
}, undefined>, undefined>;
|
|
2812
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
2813
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2814
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2815
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
2816
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
2817
|
+
}, undefined>;
|
|
2818
|
+
}, undefined>, v.DescriptionAction<{
|
|
2819
|
+
edges: {
|
|
2820
|
+
cursor: string;
|
|
2821
|
+
node: {
|
|
2822
|
+
object: "transfer";
|
|
2823
|
+
id: string;
|
|
2824
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
2825
|
+
status_detail: string | null;
|
|
2826
|
+
origin: "oauth" | "platform" | "emisor";
|
|
2827
|
+
amount: number;
|
|
2828
|
+
currency: "CLP";
|
|
2829
|
+
sender: {
|
|
2830
|
+
country: string;
|
|
2831
|
+
bank_code: string;
|
|
2832
|
+
account_type: "10" | "20" | "40";
|
|
2833
|
+
account_number: string;
|
|
2834
|
+
name: string | null;
|
|
2835
|
+
national_kind_id: string | null;
|
|
2836
|
+
national_id: string | null;
|
|
2837
|
+
};
|
|
2838
|
+
receiver: {
|
|
2839
|
+
country: string;
|
|
2840
|
+
bank_code: string;
|
|
2841
|
+
account_type: "10" | "20" | "40";
|
|
2842
|
+
account_number: string;
|
|
2843
|
+
name: string | null;
|
|
2844
|
+
national_kind_id: string | null;
|
|
2845
|
+
national_id: string | null;
|
|
2846
|
+
};
|
|
2847
|
+
comment: string | null;
|
|
2848
|
+
intent_id: string | null;
|
|
2849
|
+
jti: string | null;
|
|
2850
|
+
transaction_id: string | null;
|
|
2851
|
+
created_at: string;
|
|
2852
|
+
};
|
|
2853
|
+
}[];
|
|
2854
|
+
pageInfo: {
|
|
2855
|
+
startCursor: string | null;
|
|
2856
|
+
endCursor: string | null;
|
|
2857
|
+
hasPreviousPage: boolean;
|
|
2858
|
+
hasNextPage: boolean;
|
|
2859
|
+
};
|
|
2860
|
+
}, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof import("./common.js").InvalidRequest, typeof import("./accounts.js").InvalidCursor, typeof import("./common.js").InvalidToken, typeof import("./common.js").InvalidOrigin, typeof import("./common.js").NotFound, typeof import("./common.js").UnsupportedVersion, typeof import("./common.js").ServerError, typeof import("./common.js").TemporarilyUnavailable]>>;
|
|
2393
2861
|
listOrganizationAddresses: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2394
2862
|
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
2863
|
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.">]>;
|
|
@@ -2558,16 +3026,16 @@ export declare const contract: {
|
|
|
2558
3026
|
readonly family_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2559
3027
|
readonly business_activity_code: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2560
3028
|
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
|
|
3029
|
+
readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is AndCo's own check, on its hosted page.">]>;
|
|
2562
3030
|
readonly validated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2563
3031
|
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, "
|
|
3032
|
+
readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "AndCo's identifier of the validation. Keep it as the reference to the validation.">]>;
|
|
2565
3033
|
}, undefined>, v.DescriptionAction<{
|
|
2566
3034
|
validated_by: "andco_core";
|
|
2567
3035
|
validated_at: string;
|
|
2568
3036
|
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2569
3037
|
verification_id: string;
|
|
2570
|
-
}, "What
|
|
3038
|
+
}, "What AndCo checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts.">]>, undefined>, undefined>, v.DescriptionAction<{
|
|
2571
3039
|
validated_by: "andco_core";
|
|
2572
3040
|
validated_at: string;
|
|
2573
3041
|
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
@@ -2678,16 +3146,16 @@ export declare const contract: {
|
|
|
2678
3146
|
readonly family_names: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2679
3147
|
readonly business_activity_code: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
2680
3148
|
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
|
|
3149
|
+
readonly validated_by: v.SchemaWithPipe<readonly [v.PicklistSchema<["andco_core"], undefined>, v.DescriptionAction<"andco_core", "Who validated the identity. `andco_core` is AndCo's own check, on its hosted page.">]>;
|
|
2682
3150
|
readonly validated_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
2683
3151
|
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, "
|
|
3152
|
+
readonly verification_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "AndCo's identifier of the validation. Keep it as the reference to the validation.">]>;
|
|
2685
3153
|
}, undefined>, v.DescriptionAction<{
|
|
2686
3154
|
validated_by: "andco_core";
|
|
2687
3155
|
validated_at: string;
|
|
2688
3156
|
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
2689
3157
|
verification_id: string;
|
|
2690
|
-
}, "What
|
|
3158
|
+
}, "What AndCo checked about the identity's document. It belongs to the document (country, kind and number), so correcting the number voids it and correcting the names does not. It does not expire; the reader decides how old a validation it accepts.">]>, undefined>, undefined>, v.DescriptionAction<{
|
|
2691
3159
|
validated_by: "andco_core";
|
|
2692
3160
|
validated_at: string;
|
|
2693
3161
|
evidence: ("document" | "liveness" | "face_comparison")[];
|
|
@@ -2760,6 +3228,156 @@ export declare const contract: {
|
|
|
2760
3228
|
hasNextPage: boolean;
|
|
2761
3229
|
};
|
|
2762
3230
|
}, 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]>>;
|
|
3231
|
+
listTransfers: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
3232
|
+
readonly jti: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, v.DescriptionAction<string, "The `jti` of the signed transfer that submitted the Transfer, a UUID in lowercase.">]>;
|
|
3233
|
+
}, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3234
|
+
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
3235
|
+
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3236
|
+
readonly node: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3237
|
+
readonly object: v.LiteralSchema<"transfer", undefined>;
|
|
3238
|
+
readonly id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, v.DescriptionAction<string, "The Transfer's own id: what `GET /transfers/{transfer_id}` reads.">]>;
|
|
3239
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "processing", "succeeded", "failed", "cancelled"], undefined>, v.DescriptionAction<"succeeded" | "failed" | "cancelled" | "requires_action" | "processing", "Where the Transfer stands: `requires_action` while the person still owes the bank a step, `processing` while the bank holds it and has not answered for good, then `succeeded`, `failed` or `cancelled`, which are final. `status_detail` says why. There is no `rejected` Transfer: a rejection ends an Intent, and a rejected Intent has no Transfer.">]>;
|
|
3240
|
+
readonly status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The word that says why, null when the status has none: `bank_refused` for a `failed` Transfer the bank refused for sure, `expired` for a `cancelled` one whose deadline passed, `grant_revoked` or `grant_expired` for one whose Grant ended. The vocabulary is open: a detail added later appears here as it is, so decide on `status`.">]>;
|
|
3241
|
+
readonly origin: v.SchemaWithPipe<readonly [v.PicklistSchema<["oauth", "platform", "emisor"], undefined>, v.DescriptionAction<"oauth" | "platform" | "emisor", "Who made it: `oauth`, a Project through the API; `platform`, a person in the AndCo web app; `emisor`, a person in the issuer's own channels, for example its mobile app.">]>;
|
|
3242
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647.">]>;
|
|
3243
|
+
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3244
|
+
readonly sender: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3245
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
3246
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
3247
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
3248
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
3249
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
3250
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
3251
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
3252
|
+
}, undefined>, v.DescriptionAction<{
|
|
3253
|
+
country: string;
|
|
3254
|
+
bank_code: string;
|
|
3255
|
+
account_type: "10" | "20" | "40";
|
|
3256
|
+
account_number: string;
|
|
3257
|
+
name: string | null;
|
|
3258
|
+
national_kind_id: string | null;
|
|
3259
|
+
national_id: string | null;
|
|
3260
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
3261
|
+
country: string;
|
|
3262
|
+
bank_code: string;
|
|
3263
|
+
account_type: "10" | "20" | "40";
|
|
3264
|
+
account_number: string;
|
|
3265
|
+
name: string | null;
|
|
3266
|
+
national_kind_id: string | null;
|
|
3267
|
+
national_id: string | null;
|
|
3268
|
+
}, "The Remitente: the account the money leaves and its holder.">]>;
|
|
3269
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3270
|
+
readonly country: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.DescriptionAction<string, "The country of the account, for example `CL`.">]>;
|
|
3271
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
3272
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
3273
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.DescriptionAction<string, "The account number, as its bank writes it.">]>;
|
|
3274
|
+
readonly name: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's name, or null when it is not known.">]>;
|
|
3275
|
+
readonly national_kind_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The kind of the holder's document, for example `RUT`, or null when it is not known.">]>;
|
|
3276
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The holder's document number, or null when it is not known.">]>;
|
|
3277
|
+
}, undefined>, v.DescriptionAction<{
|
|
3278
|
+
country: string;
|
|
3279
|
+
bank_code: string;
|
|
3280
|
+
account_type: "10" | "20" | "40";
|
|
3281
|
+
account_number: string;
|
|
3282
|
+
name: string | null;
|
|
3283
|
+
national_kind_id: string | null;
|
|
3284
|
+
national_id: string | null;
|
|
3285
|
+
}, "One side of a Transfer: the account and its holder, with the same seven fields for the Remitente and the Receptor. The amount is on the Transfer.">]>, v.DescriptionAction<{
|
|
3286
|
+
country: string;
|
|
3287
|
+
bank_code: string;
|
|
3288
|
+
account_type: "10" | "20" | "40";
|
|
3289
|
+
account_number: string;
|
|
3290
|
+
name: string | null;
|
|
3291
|
+
national_kind_id: string | null;
|
|
3292
|
+
national_id: string | null;
|
|
3293
|
+
}, "The Receptor: the account the money lands on and its holder.">]>;
|
|
3294
|
+
readonly comment: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The Nota de operación, at most 60 bytes of UTF-8, or null when there is none.">]>;
|
|
3295
|
+
readonly intent_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Intent this Transfer came from. Null for origin `emisor` (no request came first) and for a signed transfer with `approved: true` (its signature approved it, so there was no request).">]>;
|
|
3296
|
+
readonly jti: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>, v.RegexAction<string, "jti must be a lowercase UUID">, v.DescriptionAction<string, "A UUID in lowercase. It names the Transfer: it is its idempotency-key. The same `jti` with other content is a conflict.">]>, undefined>, v.DescriptionAction<string | null, "The `jti` of the signed transfer with `approved: true` that submitted it, a UUID in lowercase. Null for any other Transfer: the `jti` of a signed Intent stays on the Intent. `GET /transfers?jti=` finds only a Transfer that has one.">]>;
|
|
3297
|
+
readonly transaction_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "The ledger id of the debit once the Transfer succeeded, else null. A Movement carries the same id.">]>;
|
|
3298
|
+
readonly created_at: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, v.DescriptionAction<string, "When the Transfer came to exist.">]>;
|
|
3299
|
+
}, undefined>, v.DescriptionAction<{
|
|
3300
|
+
object: "transfer";
|
|
3301
|
+
id: string;
|
|
3302
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
3303
|
+
status_detail: string | null;
|
|
3304
|
+
origin: "oauth" | "platform" | "emisor";
|
|
3305
|
+
amount: number;
|
|
3306
|
+
currency: "CLP";
|
|
3307
|
+
sender: {
|
|
3308
|
+
country: string;
|
|
3309
|
+
bank_code: string;
|
|
3310
|
+
account_type: "10" | "20" | "40";
|
|
3311
|
+
account_number: string;
|
|
3312
|
+
name: string | null;
|
|
3313
|
+
national_kind_id: string | null;
|
|
3314
|
+
national_id: string | null;
|
|
3315
|
+
};
|
|
3316
|
+
receiver: {
|
|
3317
|
+
country: string;
|
|
3318
|
+
bank_code: string;
|
|
3319
|
+
account_type: "10" | "20" | "40";
|
|
3320
|
+
account_number: string;
|
|
3321
|
+
name: string | null;
|
|
3322
|
+
national_kind_id: string | null;
|
|
3323
|
+
national_id: string | null;
|
|
3324
|
+
};
|
|
3325
|
+
comment: string | null;
|
|
3326
|
+
intent_id: string | null;
|
|
3327
|
+
jti: string | null;
|
|
3328
|
+
transaction_id: string | null;
|
|
3329
|
+
created_at: string;
|
|
3330
|
+
}, "A Transfer, with one shape for every origin. `sender` and `receiver` have the same fields, and `amount` and `currency` sit on the Transfer. It has no `approved` and no deadline: the decision belongs to the Intent.">]>;
|
|
3331
|
+
}, undefined>, undefined>;
|
|
3332
|
+
readonly pageInfo: v.StrictObjectSchema<{
|
|
3333
|
+
readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3334
|
+
readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3335
|
+
readonly hasPreviousPage: v.BooleanSchema<undefined>;
|
|
3336
|
+
readonly hasNextPage: v.BooleanSchema<undefined>;
|
|
3337
|
+
}, undefined>;
|
|
3338
|
+
}, undefined>, v.DescriptionAction<{
|
|
3339
|
+
edges: {
|
|
3340
|
+
cursor: string | null;
|
|
3341
|
+
node: {
|
|
3342
|
+
object: "transfer";
|
|
3343
|
+
id: string;
|
|
3344
|
+
status: "succeeded" | "failed" | "cancelled" | "requires_action" | "processing";
|
|
3345
|
+
status_detail: string | null;
|
|
3346
|
+
origin: "oauth" | "platform" | "emisor";
|
|
3347
|
+
amount: number;
|
|
3348
|
+
currency: "CLP";
|
|
3349
|
+
sender: {
|
|
3350
|
+
country: string;
|
|
3351
|
+
bank_code: string;
|
|
3352
|
+
account_type: "10" | "20" | "40";
|
|
3353
|
+
account_number: string;
|
|
3354
|
+
name: string | null;
|
|
3355
|
+
national_kind_id: string | null;
|
|
3356
|
+
national_id: string | null;
|
|
3357
|
+
};
|
|
3358
|
+
receiver: {
|
|
3359
|
+
country: string;
|
|
3360
|
+
bank_code: string;
|
|
3361
|
+
account_type: "10" | "20" | "40";
|
|
3362
|
+
account_number: string;
|
|
3363
|
+
name: string | null;
|
|
3364
|
+
national_kind_id: string | null;
|
|
3365
|
+
national_id: string | null;
|
|
3366
|
+
};
|
|
3367
|
+
comment: string | null;
|
|
3368
|
+
intent_id: string | null;
|
|
3369
|
+
jti: string | null;
|
|
3370
|
+
transaction_id: string | null;
|
|
3371
|
+
created_at: string;
|
|
3372
|
+
};
|
|
3373
|
+
}[];
|
|
3374
|
+
pageInfo: {
|
|
3375
|
+
startCursor: string | null;
|
|
3376
|
+
endCursor: string | null;
|
|
3377
|
+
hasPreviousPage: boolean;
|
|
3378
|
+
hasNextPage: boolean;
|
|
3379
|
+
};
|
|
3380
|
+
}, 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]>>;
|
|
2763
3381
|
readAccountEvents: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
|
|
2764
3382
|
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
3383
|
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.">]>;
|
|
@@ -3079,11 +3697,11 @@ export declare const contract: {
|
|
|
3079
3697
|
readonly intent_id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3080
3698
|
}, undefined>;
|
|
3081
3699
|
readonly body: v.StrictObjectSchema<{
|
|
3082
|
-
readonly reason: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>;
|
|
3700
|
+
readonly reason: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, undefined>;
|
|
3083
3701
|
}, undefined>;
|
|
3084
3702
|
}, undefined>, v.VariantSchema<"type", [v.ObjectSchema<{
|
|
3085
3703
|
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"
|
|
3704
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "completed", "closed", "expired", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired"], undefined>, v.DescriptionAction<"completed" | "closed" | "cancelled" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired", "`<base>[.<detail>]`. Read the base, what precedes the first dot, to know whether the Deposit can still change: `requires_action` can, every other base is final. A Grant that ends cancels its waiting Deposits with a detail.">]>;
|
|
3087
3705
|
readonly attribution_version: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>;
|
|
3088
3706
|
readonly closure: v.NullableSchema<v.ObjectSchema<{
|
|
3089
3707
|
readonly closed_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
@@ -3116,7 +3734,7 @@ export declare const contract: {
|
|
|
3116
3734
|
account_type: "checking" | "debit" | "savings";
|
|
3117
3735
|
holder_id: string | null;
|
|
3118
3736
|
holder_name: string;
|
|
3119
|
-
}, "The
|
|
3737
|
+
}, "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
3738
|
readonly amount: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3121
3739
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3122
3740
|
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Immutable amount from the creation request.">]>;
|
|
@@ -3140,8 +3758,8 @@ export declare const contract: {
|
|
|
3140
3758
|
readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
3141
3759
|
readonly outcome: v.PicklistSchema<["credited", "reversed"], undefined>;
|
|
3142
3760
|
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
|
|
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
|
|
3761
|
+
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 AndCo reported it.">]>;
|
|
3762
|
+
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 AndCo reported it.">]>;
|
|
3145
3763
|
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
3764
|
readonly sender_account_type: v.NullableSchema<v.PicklistSchema<["checking", "debit", "savings"], undefined>, undefined>;
|
|
3147
3765
|
readonly sender_account_number: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, undefined>;
|
|
@@ -3155,49 +3773,50 @@ export declare const contract: {
|
|
|
3155
3773
|
}, undefined>;
|
|
3156
3774
|
readonly expires_at: v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>, undefined>;
|
|
3157
3775
|
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
3776
|
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
|
|
3777
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
3162
3778
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
3163
3779
|
}, undefined>, v.DescriptionAction<{
|
|
3164
3780
|
value: string;
|
|
3165
3781
|
editable: boolean;
|
|
3166
|
-
}, "The
|
|
3782
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
3783
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3784
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3167
3785
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
3168
3786
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3169
3787
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3170
3788
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3171
3789
|
}, undefined>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3172
3790
|
readonly type: v.LiteralSchema<"transfer", undefined>;
|
|
3173
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
3791
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
3792
|
+
readonly transfer_id: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The id of the Transfer that exists after the Intent is approved: read it with `GET /transfers/{transfer_id}`. Null while the Intent waits, and for ever when it ends rejected, cancelled or expired, because no Transfer exists then.">]>;
|
|
3174
3793
|
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
|
|
3794
|
+
readonly sender: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3176
3795
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
3177
3796
|
accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
3178
3797
|
}, undefined>, v.DescriptionAction<{
|
|
3179
3798
|
type: "account_key";
|
|
3180
3799
|
accountKey: string;
|
|
3181
|
-
}, "One
|
|
3800
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3182
3801
|
type: v.LiteralSchema<"account", undefined>;
|
|
3183
3802
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3184
3803
|
}, undefined>, v.DescriptionAction<{
|
|
3185
3804
|
type: "account";
|
|
3186
3805
|
id: string;
|
|
3187
|
-
}, "One
|
|
3806
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
3188
3807
|
type: "account_key";
|
|
3189
3808
|
accountKey: string;
|
|
3190
3809
|
} | {
|
|
3191
3810
|
type: "account";
|
|
3192
3811
|
id: string;
|
|
3193
|
-
}, "One
|
|
3812
|
+
}, "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
3813
|
type: "account_key";
|
|
3195
3814
|
accountKey: string;
|
|
3196
3815
|
} | {
|
|
3197
3816
|
type: "account";
|
|
3198
3817
|
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
|
|
3818
|
+
} | null, "The Remitente. 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.">]>;
|
|
3819
|
+
readonly receiver: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.StrictObjectSchema<{
|
|
3201
3820
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
3202
3821
|
readonly type: v.LiteralSchema<"account_key", undefined>;
|
|
3203
3822
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -3208,11 +3827,13 @@ export declare const contract: {
|
|
|
3208
3827
|
}, undefined>, v.StrictObjectSchema<{
|
|
3209
3828
|
readonly editable: v.OptionalSchema<v.LiteralSchema<false, undefined>, false>;
|
|
3210
3829
|
readonly type: v.LiteralSchema<"external", undefined>;
|
|
3211
|
-
readonly
|
|
3212
|
-
readonly
|
|
3213
|
-
readonly
|
|
3214
|
-
readonly
|
|
3215
|
-
readonly
|
|
3830
|
+
readonly country: v.LiteralSchema<"CL", undefined>;
|
|
3831
|
+
readonly bank_code: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code, as `GET /catalogs/banks` lists it. AndCo is `0739`.">]>;
|
|
3832
|
+
readonly account_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["10", "20", "40"], undefined>, v.DescriptionAction<"10" | "20" | "40", "The account type code: `\"10\"` savings, `\"20\"` checking, `\"40\"` debit (cuenta vista).">]>;
|
|
3833
|
+
readonly account_number: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>;
|
|
3834
|
+
readonly name: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>]>, v.DescriptionAction<string, "The holder's name, at most 256 code points (`holder_name_too_long`).">]>;
|
|
3835
|
+
readonly national_kind_id: v.LiteralSchema<"RUT", undefined>;
|
|
3836
|
+
readonly national_id: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, number, undefined>]>, v.DescriptionAction<string, "The holder's RUT.">]>;
|
|
3216
3837
|
}, undefined>], undefined>, v.DescriptionAction<{
|
|
3217
3838
|
editable: false;
|
|
3218
3839
|
type: "account_key";
|
|
@@ -3224,12 +3845,14 @@ export declare const contract: {
|
|
|
3224
3845
|
} | {
|
|
3225
3846
|
editable: false;
|
|
3226
3847
|
type: "external";
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3848
|
+
country: "CL";
|
|
3849
|
+
bank_code: string;
|
|
3850
|
+
account_type: "10" | "20" | "40";
|
|
3851
|
+
account_number: string;
|
|
3852
|
+
name: string;
|
|
3853
|
+
national_kind_id: "RUT";
|
|
3854
|
+
national_id: string;
|
|
3855
|
+
}, "The Receptor of a transfer when it is named, in the request and in the answered Intent alike. A named Receptor 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 `receiver: null` instead (`TransferIntentCreate`). Defaults to false in a request; an answered Intent always states it, including a Receptor the person completed on the screen, which is locked once she confirms.">]>, undefined>, v.DescriptionAction<{
|
|
3233
3856
|
editable: false;
|
|
3234
3857
|
type: "account_key";
|
|
3235
3858
|
accountKey: string;
|
|
@@ -3240,64 +3863,67 @@ export declare const contract: {
|
|
|
3240
3863
|
} | {
|
|
3241
3864
|
editable: false;
|
|
3242
3865
|
type: "external";
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3866
|
+
country: "CL";
|
|
3867
|
+
bank_code: string;
|
|
3868
|
+
account_type: "10" | "20" | "40";
|
|
3869
|
+
account_number: string;
|
|
3870
|
+
name: string;
|
|
3871
|
+
national_kind_id: "RUT";
|
|
3872
|
+
national_id: string;
|
|
3873
|
+
} | null, "The Receptor. 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.">]>;
|
|
3874
|
+
readonly comment: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3875
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty one is allowed.">]>;
|
|
3876
|
+
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
3877
|
+
}, undefined>, v.DescriptionAction<{
|
|
3878
|
+
value: string;
|
|
3879
|
+
editable: boolean;
|
|
3880
|
+
}, "The comment a transfer asks for: at most 60 bytes of UTF-8 (`comment_too_long`). `editable: true` lets the person who confirms change it; the comment freezes at confirmation.">]>, undefined>;
|
|
3249
3881
|
readonly amount: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3250
3882
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3251
|
-
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.
|
|
3883
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, v.DescriptionAction<number, "Immutable amount from the creation request, in the minor unit of the currency.">]>;
|
|
3252
3884
|
readonly editable: v.BooleanSchema<undefined>;
|
|
3253
|
-
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.
|
|
3885
|
+
readonly confirmed: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>, undefined>, v.DescriptionAction<number | null, "The amount the person confirmed, null until then; it is what moves. For a transfer that is not editable it is `value`, set when the person confirms. Always within the Grant's `transactions.minimum` and `transactions.maximum`, when it has them.">]>;
|
|
3254
3886
|
}, undefined>, v.DescriptionAction<{
|
|
3255
3887
|
currency: "CLP";
|
|
3256
|
-
value:
|
|
3888
|
+
value: number;
|
|
3257
3889
|
editable: boolean;
|
|
3258
|
-
confirmed:
|
|
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.">]>;
|
|
3890
|
+
confirmed: number | null;
|
|
3891
|
+
}, "The amount a transfer orders, as it is answered: integers in the minor unit of the currency (CLP: whole pesos), at most 2147483647. `value` is the request's proposal and never changes; `confirmed` is the amount the person confirmed, null until they confirm, and it is what moves. It is never proof that money moved; read `settled` for that.">]>;
|
|
3260
3892
|
readonly settled: v.NullableSchema<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3261
3893
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3262
|
-
readonly value: v.SchemaWithPipe<readonly [v.
|
|
3894
|
+
readonly value: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 2147483647, undefined>, v.DescriptionAction<number, "An integer in the minor unit of the currency (CLP: whole pesos), from 1 to 2147483647. A larger one is refused with `max_value`.">]>;
|
|
3263
3895
|
readonly at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3264
3896
|
}, undefined>, v.DescriptionAction<{
|
|
3265
3897
|
currency: "CLP";
|
|
3266
|
-
value:
|
|
3898
|
+
value: number;
|
|
3267
3899
|
at: string;
|
|
3268
3900
|
}, "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
3901
|
readonly fee: v.StrictObjectSchema<{
|
|
3270
3902
|
readonly currency: v.LiteralSchema<"CLP", undefined>;
|
|
3271
3903
|
readonly amount: v.LiteralSchema<"0", undefined>;
|
|
3272
3904
|
}, undefined>;
|
|
3273
|
-
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["
|
|
3905
|
+
readonly interaction_reason: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<["source_account_required"], undefined>, undefined>, v.DescriptionAction<"source_account_required" | undefined, "Present on every read of the Intent while it is `requires_action` and only a person can complete it; absent once the Intent is no longer `requires_action`. `source_account_required`: the person still picks the account the money leaves from. A step that the bank asks after the approval, for example a verification with the web AndPass and an SMS code, belongs to the Transfer and is not an Intent reason.">]>;
|
|
3274
3906
|
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
3907
|
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
3908
|
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3277
3909
|
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
3910
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
3286
3911
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3287
3912
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3288
3913
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3289
3914
|
}, undefined>, v.DescriptionAction<{
|
|
3290
3915
|
type: "transfer";
|
|
3291
|
-
status: "
|
|
3916
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
3917
|
+
transfer_id: string | null;
|
|
3292
3918
|
signed: boolean;
|
|
3293
|
-
|
|
3919
|
+
sender: {
|
|
3294
3920
|
type: "account_key";
|
|
3295
3921
|
accountKey: string;
|
|
3296
3922
|
} | {
|
|
3297
3923
|
type: "account";
|
|
3298
3924
|
id: string;
|
|
3299
3925
|
} | null;
|
|
3300
|
-
|
|
3926
|
+
receiver: {
|
|
3301
3927
|
editable: false;
|
|
3302
3928
|
type: "account_key";
|
|
3303
3929
|
accountKey: string;
|
|
@@ -3308,45 +3934,49 @@ export declare const contract: {
|
|
|
3308
3934
|
} | {
|
|
3309
3935
|
editable: false;
|
|
3310
3936
|
type: "external";
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3937
|
+
country: "CL";
|
|
3938
|
+
bank_code: string;
|
|
3939
|
+
account_type: "10" | "20" | "40";
|
|
3940
|
+
account_number: string;
|
|
3941
|
+
name: string;
|
|
3942
|
+
national_kind_id: "RUT";
|
|
3943
|
+
national_id: string;
|
|
3316
3944
|
} | null;
|
|
3945
|
+
comment?: {
|
|
3946
|
+
value: string;
|
|
3947
|
+
editable: boolean;
|
|
3948
|
+
} | undefined;
|
|
3317
3949
|
amount: {
|
|
3318
3950
|
currency: "CLP";
|
|
3319
|
-
value:
|
|
3951
|
+
value: number;
|
|
3320
3952
|
editable: boolean;
|
|
3321
|
-
confirmed:
|
|
3953
|
+
confirmed: number | null;
|
|
3322
3954
|
};
|
|
3323
3955
|
settled: {
|
|
3324
3956
|
currency: "CLP";
|
|
3325
|
-
value:
|
|
3957
|
+
value: number;
|
|
3326
3958
|
at: string;
|
|
3327
3959
|
} | null;
|
|
3328
3960
|
fee: {
|
|
3329
3961
|
currency: "CLP";
|
|
3330
3962
|
amount: "0";
|
|
3331
3963
|
};
|
|
3332
|
-
interaction_reason?: "
|
|
3964
|
+
interaction_reason?: "source_account_required" | undefined;
|
|
3333
3965
|
expires_at: string | null;
|
|
3334
3966
|
expires_in_seconds: number | null;
|
|
3335
3967
|
id: string;
|
|
3336
3968
|
resource_server: string;
|
|
3337
|
-
note?: {
|
|
3338
|
-
value: string;
|
|
3339
|
-
editable: boolean;
|
|
3340
|
-
} | undefined;
|
|
3341
3969
|
metadata: {
|
|
3342
3970
|
[x: string]: unknown;
|
|
3343
3971
|
};
|
|
3344
3972
|
server_time: string;
|
|
3345
3973
|
created_at: string;
|
|
3346
3974
|
authorization_url: string;
|
|
3347
|
-
}, "Authoritative Project-facing state of a transfer. `
|
|
3975
|
+
}, "Authoritative Project-facing state of a transfer request, in the transfer vocabulary of the API. The Intent is the request for a decision and ends at it: once it is `approved` it names its Transfer in `transfer_id`, and the money is followed on the Transfer. `sender` and `receiver` answer in the same matcher vocabulary as the request, and `comment` is the request's comment. `amount.value` is the proposal of the request and `amount.confirmed` the amount the person confirmed (null until then; it is what moves). `transfer.confirmed` and the events after it report the confirmed amount.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3348
3976
|
readonly type: v.LiteralSchema<"account_opening", undefined>;
|
|
3349
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
3977
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
3978
|
+
readonly account_opening_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
3979
|
+
readonly account_opening_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
3350
3980
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
3351
3981
|
readonly account: v.StrictObjectSchema<{
|
|
3352
3982
|
readonly accountKey: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
|
|
@@ -3356,22 +3986,24 @@ export declare const contract: {
|
|
|
3356
3986
|
}, undefined>;
|
|
3357
3987
|
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
3988
|
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
3989
|
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
|
|
3990
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
3363
3991
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
3364
3992
|
}, undefined>, v.DescriptionAction<{
|
|
3365
3993
|
value: string;
|
|
3366
3994
|
editable: boolean;
|
|
3367
|
-
}, "The
|
|
3995
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
3996
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3997
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3368
3998
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
3369
3999
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3370
4000
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3371
4001
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3372
4002
|
}, undefined>, v.DescriptionAction<{
|
|
3373
4003
|
type: "account_opening";
|
|
3374
|
-
status: "
|
|
4004
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
4005
|
+
account_opening_status: "succeeded" | "failed" | "processing" | null;
|
|
4006
|
+
account_opening_status_detail: string | null;
|
|
3375
4007
|
signed: boolean;
|
|
3376
4008
|
account: {
|
|
3377
4009
|
accountKey: string;
|
|
@@ -3381,21 +4013,23 @@ export declare const contract: {
|
|
|
3381
4013
|
};
|
|
3382
4014
|
expires_at: string | null;
|
|
3383
4015
|
expires_in_seconds: number | null;
|
|
3384
|
-
id: string;
|
|
3385
|
-
resource_server: string;
|
|
3386
4016
|
note?: {
|
|
3387
4017
|
value: string;
|
|
3388
4018
|
editable: boolean;
|
|
3389
4019
|
} | undefined;
|
|
4020
|
+
id: string;
|
|
4021
|
+
resource_server: string;
|
|
3390
4022
|
metadata: {
|
|
3391
4023
|
[x: string]: unknown;
|
|
3392
4024
|
};
|
|
3393
4025
|
server_time: string;
|
|
3394
4026
|
created_at: string;
|
|
3395
4027
|
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
|
|
4028
|
+
}, "Authoritative Project-facing state of an account opening. It carries no amount and no fee: an opening moves no money. Opening is asynchronous, so `account.bank_account_id` is absent until AndCo assigns the Número de Cuenta, which arrives on the account's own event stream rather than in this response.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3397
4029
|
readonly type: v.LiteralSchema<"account_closure", undefined>;
|
|
3398
|
-
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "
|
|
4030
|
+
readonly status: v.SchemaWithPipe<readonly [v.PicklistSchema<["requires_action", "approved", "rejected", "cancelled", "cancelled.grant_revoked", "cancelled.grant_expired", "cancelled.migration", "expired", "completed", "closed"], undefined>, v.DescriptionAction<"completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration", "`<base>[.<detail>]`. The base, what precedes the first dot, is one of `requires_action`, `approved`, `rejected`, `cancelled`, `expired`, and, for a deposit only, `completed` and `closed`. It tells whether the Intent can still change: `requires_action` can, every other base is final. Decide on the base, never on the whole value, so that a detail added later is not misread. In TypeScript, `INTENT_STATUS_BASE` and `IS_INTENT_TERMINAL_STATUS` from `@andco/protocol` do exactly that.\n\nAn Intent is the request for a decision, and it ends at that decision. `requires_action`: nobody has decided yet. `approved`: a person or a credential approved it; that is the end of the Intent, and the operation it asked for goes on elsewhere. `rejected`: an approver declined it. `cancelled`: the Project that created it withdrew it, or its Grant ended (`cancelled.grant_revoked`, `cancelled.grant_expired`), or a data migration of AndCo cancelled it (`cancelled.migration`, a transfer Intent that was already past its approval in a development or staging environment: no Transfer exists for it). `expired`: nobody decided before its deadline. A deposit has no approval: it ends `completed` when it collected its amount, or `closed`.\n\nThe outcome of an approved Intent is not here. An approved transfer Intent names its Transfer in `transfer_id`, and the Transfer carries `status` and `status_detail` (`processing`, `succeeded`, `failed`, `cancelled`). An approved account opening or closure carries its outcome beside `approved`, in `account_opening_status` or `account_closure_status` (`processing`, `succeeded` or `failed`) with the detail that says why.">]>;
|
|
4031
|
+
readonly account_closure_status: v.SchemaWithPipe<readonly [v.NullableSchema<v.PicklistSchema<["processing", "succeeded", "failed"], undefined>, undefined>, v.DescriptionAction<"succeeded" | "failed" | "processing" | null, "The outcome of the account closure once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent." | "The outcome of the account opening once the Intent is `approved`: `processing` from the approval until AndCo answers, then `succeeded` or `failed`. Null while the Intent has no decision, and for ever when it ends rejected, cancelled or expired. The Intent stays `approved` in every case: a refusal does not revive it, and a new try is a new Intent.">]>;
|
|
4032
|
+
readonly account_closure_status_detail: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Why the closure failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the closure failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_authorization_denied`, `bank_holder_without_account`, `bank_account_limit_reached`, `account_opening_not_implemented`, `bank_core_unavailable`, `bank_account_save_failed`, `bank_connection_unavailable`, `bank_account_quota_exceeded` and `account_key_taken`. The vocabulary is open: a word added later appears here as it is, so decide on the status." | "Why the opening failed, null when it did not: `bank_account_not_found` and `bank_account_balance_not_zero`. The vocabulary is open: a word added later appears here as it is, so decide on the status.">]>;
|
|
3399
4033
|
readonly signed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether a Signed Instruction created this Intent rather than a plain request.">]>;
|
|
3400
4034
|
readonly account: v.SchemaWithPipe<readonly [v.VariantSchema<"type", [v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3401
4035
|
type: v.LiteralSchema<"account_key", undefined>;
|
|
@@ -3403,38 +4037,40 @@ export declare const contract: {
|
|
|
3403
4037
|
}, undefined>, v.DescriptionAction<{
|
|
3404
4038
|
type: "account_key";
|
|
3405
4039
|
accountKey: string;
|
|
3406
|
-
}, "One
|
|
4040
|
+
}, "One AndCo account of the Grant's subject, named by its Account Key.">]>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
|
|
3407
4041
|
type: v.LiteralSchema<"account", undefined>;
|
|
3408
4042
|
id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
3409
4043
|
}, undefined>, v.DescriptionAction<{
|
|
3410
4044
|
type: "account";
|
|
3411
4045
|
id: string;
|
|
3412
|
-
}, "One
|
|
4046
|
+
}, "One AndCo account, named by its identifier.">]>], undefined>, v.DescriptionAction<{
|
|
3413
4047
|
type: "account_key";
|
|
3414
4048
|
accountKey: string;
|
|
3415
4049
|
} | {
|
|
3416
4050
|
type: "account";
|
|
3417
4051
|
id: string;
|
|
3418
|
-
}, "One
|
|
4052
|
+
}, "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
4053
|
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
4054
|
readonly expires_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3421
4055
|
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
4056
|
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
|
|
4057
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, v.DescriptionAction<string, "Trimmed comment. An empty reference is allowed.">]>;
|
|
3426
4058
|
readonly editable: v.SchemaWithPipe<readonly [v.OptionalSchema<v.BooleanSchema<undefined>, false>, v.DescriptionAction<boolean, "Defaults to false when omitted.">]>;
|
|
3427
4059
|
}, undefined>, v.DescriptionAction<{
|
|
3428
4060
|
value: string;
|
|
3429
4061
|
editable: boolean;
|
|
3430
|
-
}, "The
|
|
4062
|
+
}, "The comment a request asks for. `editable: true` lets the person who confirms change it; each operation freezes its own final note at confirmation.">]>, undefined>;
|
|
4063
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
|
|
4064
|
+
readonly resource_server: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3431
4065
|
readonly metadata: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
|
|
3432
4066
|
readonly server_time: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3433
4067
|
readonly created_at: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
|
|
3434
4068
|
readonly authorization_url: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>;
|
|
3435
4069
|
}, undefined>, v.DescriptionAction<{
|
|
3436
4070
|
type: "account_closure";
|
|
3437
|
-
status: "
|
|
4071
|
+
status: "completed" | "approved" | "closed" | "cancelled" | "rejected" | "expired" | "requires_action" | "cancelled.grant_revoked" | "cancelled.grant_expired" | "cancelled.migration";
|
|
4072
|
+
account_closure_status: "succeeded" | "failed" | "processing" | null;
|
|
4073
|
+
account_closure_status_detail: string | null;
|
|
3438
4074
|
signed: boolean;
|
|
3439
4075
|
account: {
|
|
3440
4076
|
type: "account_key";
|
|
@@ -3446,12 +4082,12 @@ export declare const contract: {
|
|
|
3446
4082
|
resolved_account_id: string | null;
|
|
3447
4083
|
expires_at: string;
|
|
3448
4084
|
expires_in_seconds: number;
|
|
3449
|
-
id: string;
|
|
3450
|
-
resource_server: string;
|
|
3451
4085
|
note?: {
|
|
3452
4086
|
value: string;
|
|
3453
4087
|
editable: boolean;
|
|
3454
4088
|
} | undefined;
|
|
4089
|
+
id: string;
|
|
4090
|
+
resource_server: string;
|
|
3455
4091
|
metadata: {
|
|
3456
4092
|
[x: string]: unknown;
|
|
3457
4093
|
};
|