@andco/protocol 0.0.15 → 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/dist/authorization-preparation.d.ts +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/errors.js +1 -1
- package/dist/intent-input.d.ts +67 -54
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +39 -23
- package/dist/intent-status.d.ts +5 -6
- package/dist/intent-status.d.ts.map +1 -1
- package/dist/intent-status.js +12 -7
- package/dist/miniapp-manifest.d.ts +2 -2
- package/dist/miniapp-manifest.js +1 -1
- package/dist/native-intent.d.ts +12 -12
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +7 -4
- package/dist/rar/account-matchers.d.ts +10 -10
- package/dist/rar/account-matchers.js +2 -2
- package/dist/rar/bank.d.ts +284 -12
- package/dist/rar/bank.d.ts.map +1 -1
- package/dist/rar/bank.js +42 -4
- package/dist/rar/catalog.d.ts +130 -5
- package/dist/rar/catalog.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.js +372 -4
- package/dist/rar/money.d.ts +1 -1
- package/dist/rar/money.js +1 -1
- package/dist/rar/subject-data.d.ts +1 -1
- package/dist/rar/subject-data.js +1 -1
- package/dist/rest/accounts.d.ts +3 -3
- package/dist/rest/accounts.js +1 -1
- package/dist/rest/catalog.d.ts +3 -3
- package/dist/rest/catalog.js +2 -2
- package/dist/rest/contract.d.ts +561 -302
- package/dist/rest/contract.d.ts.map +1 -1
- package/dist/rest/contract.js +6 -2
- package/dist/rest/identity.d.ts +22 -22
- package/dist/rest/identity.d.ts.map +1 -1
- package/dist/rest/identity.js +4 -4
- package/dist/rest/intents.d.ts +301 -142
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +66 -52
- package/dist/rest/signatures.d.ts +19 -5
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +47 -5
- package/dist/rest/transfers.d.ts +738 -362
- package/dist/rest/transfers.d.ts.map +1 -1
- package/dist/rest/transfers.js +71 -44
- package/dist/signing.d.ts +6 -2
- package/dist/signing.d.ts.map +1 -1
- package/dist/signing.js +2 -1
- package/dist/transfer.d.ts +101 -65
- package/dist/transfer.d.ts.map +1 -1
- package/dist/transfer.js +69 -43
- package/dist/transport/financial-events.d.ts +64 -13
- 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 +352 -88
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +6 -6
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/rest.d.ts +4 -4
- package/package.json +1 -1
package/dist/rar/subject-data.js
CHANGED
|
@@ -10,7 +10,7 @@ export const ORGANIZATION_ACTIONS = ["list"];
|
|
|
10
10
|
/** Editing the signed-in person's Profile. Replaces the former `profile:write` scope. */
|
|
11
11
|
export const PROFILE_ACTIONS = ["update"];
|
|
12
12
|
/**
|
|
13
|
-
* The `validation` of an `identity` detail: the application asks that AndCo
|
|
13
|
+
* The `validation` of an `identity` detail: the application asks that AndCo has validated the
|
|
14
14
|
* person's identity (the ID card, a liveness check and the comparison of the face with the card's),
|
|
15
15
|
* and reads that validation together with the identity.
|
|
16
16
|
*
|
package/dist/rest/accounts.d.ts
CHANGED
|
@@ -131,7 +131,7 @@ export declare const BankAccount: v.StrictObjectSchema<{
|
|
|
131
131
|
readonly number: v.StringSchema<undefined>;
|
|
132
132
|
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.">]>;
|
|
133
133
|
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.">]>;
|
|
134
|
-
readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The
|
|
134
|
+
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.">]>;
|
|
135
135
|
}, undefined>;
|
|
136
136
|
/** One of the subject's personal digital accounts. */
|
|
137
137
|
export type BankAccount = v.InferOutput<typeof BankAccount>;
|
|
@@ -146,7 +146,7 @@ export declare const AccountPage: v.SchemaWithPipe<readonly [v.StrictObjectSchem
|
|
|
146
146
|
readonly number: v.StringSchema<undefined>;
|
|
147
147
|
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.">]>;
|
|
148
148
|
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.">]>;
|
|
149
|
-
readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The
|
|
149
|
+
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.">]>;
|
|
150
150
|
}, undefined>;
|
|
151
151
|
}, undefined>, undefined>;
|
|
152
152
|
readonly pageInfo: v.StrictObjectSchema<{
|
|
@@ -262,7 +262,7 @@ export declare const listAccounts: import("@orpc/contract").ProcedureContractBui
|
|
|
262
262
|
readonly number: v.StringSchema<undefined>;
|
|
263
263
|
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.">]>;
|
|
264
264
|
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.">]>;
|
|
265
|
-
readonly balance: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The
|
|
265
|
+
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.">]>;
|
|
266
266
|
}, undefined>;
|
|
267
267
|
}, undefined>, undefined>;
|
|
268
268
|
readonly pageInfo: v.StrictObjectSchema<{
|
package/dist/rest/accounts.js
CHANGED
|
@@ -52,7 +52,7 @@ export const BankAccount = /* @__PURE__ */ v.strictObject({
|
|
|
52
52
|
number: v.string(),
|
|
53
53
|
type: v.pipe(v.nullable(v.string()), v.description("Null while the balance projection does not know the account yet.")),
|
|
54
54
|
currency: v.pipe(v.nullable(v.pipe(v.string(), v.regex(/^[A-Z]{3}$/))), v.description("Null while the balance projection does not know the account yet.")),
|
|
55
|
-
balance: v.pipe(v.nullable(BankDecimal), v.description("The
|
|
55
|
+
balance: v.pipe(v.nullable(BankDecimal), v.description("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.")),
|
|
56
56
|
});
|
|
57
57
|
/** A page of the subject's accounts. */
|
|
58
58
|
export const AccountPage = /* @__PURE__ */ connection(BankAccount, "A standard connection. Edge cursors remain present on nonempty terminal pages. Reads are live; offset positions can shift under concurrent changes.");
|
package/dist/rest/catalog.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { BankConnectionInteractionRequired } from "./accounts.js";
|
|
|
3
3
|
import { InsufficientAuthorization, InvalidOrigin, InvalidRequest, InvalidToken, ServerError, TemporarilyUnavailable, UnsupportedVersion } from "./common.js";
|
|
4
4
|
/** A bank a transfer can be sent to. */
|
|
5
5
|
export declare const BankCatalogEntry: v.StrictObjectSchema<{
|
|
6
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
6
|
+
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.">]>;
|
|
7
7
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
|
|
8
8
|
}, undefined>;
|
|
9
9
|
/** The whole list of banks as one page. */
|
|
@@ -11,7 +11,7 @@ export declare const BankCatalogPage: v.SchemaWithPipe<readonly [v.StrictObjectS
|
|
|
11
11
|
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
12
12
|
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
13
13
|
readonly node: v.StrictObjectSchema<{
|
|
14
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
14
|
+
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.">]>;
|
|
15
15
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
|
|
16
16
|
}, undefined>;
|
|
17
17
|
}, undefined>, undefined>;
|
|
@@ -110,7 +110,7 @@ export declare const getBankCatalog: import("@orpc/contract").ProcedureContractB
|
|
|
110
110
|
readonly edges: v.ArraySchema<v.StrictObjectSchema<{
|
|
111
111
|
readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
112
112
|
readonly node: v.StrictObjectSchema<{
|
|
113
|
-
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The bank's four-digit code
|
|
113
|
+
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.">]>;
|
|
114
114
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
|
|
115
115
|
}, undefined>;
|
|
116
116
|
}, undefined>, undefined>;
|
package/dist/rest/catalog.js
CHANGED
|
@@ -6,7 +6,7 @@ import { BackwardPageQuery, connection, cursorlessConnection, ForwardPageQuery,
|
|
|
6
6
|
import { http } from "./http.js";
|
|
7
7
|
/** A bank a transfer can be sent to. */
|
|
8
8
|
export const BankCatalogEntry = /* @__PURE__ */ v.strictObject({
|
|
9
|
-
id: v.pipe(v.string(), v.regex(/^\d{4}$/), v.description("The bank's four-digit code
|
|
9
|
+
id: v.pipe(v.string(), v.regex(/^\d{4}$/), v.description("The bank's four-digit code: the `bank_code` of a Receptor.")),
|
|
10
10
|
name: v.pipe(v.string(), v.description("The bank's name as the bank lists it.")),
|
|
11
11
|
});
|
|
12
12
|
/** The whole list of banks as one page. */
|
|
@@ -36,7 +36,7 @@ export const getBankCatalog = /* @__PURE__ */ oc
|
|
|
36
36
|
method: "GET",
|
|
37
37
|
path: "/catalog/banks",
|
|
38
38
|
summary: "List the banks a transfer can be sent to",
|
|
39
|
-
description: "The banks
|
|
39
|
+
description: "The banks a transfer can be sent to, each with its four-digit code and its name: the `bank_code` values a Receptor (a `bank_transfer` destination of type `external`) names, so an integrator never guesses one. `@andco/protocol` also exports the known codes as `CHILEAN_BANK_CODES`, which no validation reads; a code the catalog does not know fails with `unsupported_bank` when the transfer is executed. Granted by a `bank_transfer` authorization detail with `create`. It is read on behalf of the subject through one of the accounts that detail reaches, so a subject without any answers `409 interaction_required`. It is one bounded list, answered whole as a single page: `pageInfo.hasNextPage` is false, no edge carries a cursor and the pagination parameters do not apply. Returns edges and camelCase pageInfo.",
|
|
40
40
|
successDescription: "The banks a transfer can be sent to, ordered as the bank lists them",
|
|
41
41
|
}))
|
|
42
42
|
.errors(errors(InvalidToken, InvalidOrigin, InsufficientAuthorization, UnsupportedVersion, ServerError, BankConnectionInteractionRequired, TemporarilyUnavailable))
|