@andco/protocol 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/api-errors.d.ts +9 -9
- package/dist/api-errors.js +9 -9
- package/dist/authorization-preparation.js +2 -2
- package/dist/authorization.d.ts +1 -1
- package/dist/authorization.js +1 -1
- package/dist/consent.d.ts +2 -2
- package/dist/consent.js +2 -2
- package/dist/constants.d.ts +15 -2
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +17 -3
- package/dist/errors.d.ts +36 -9
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +49 -11
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/intent-input.d.ts +431 -872
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +142 -121
- package/dist/miniapp-icon.js +1 -1
- package/dist/miniapp-manifest.d.ts +1 -1
- package/dist/native-intent.d.ts +82 -68
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +134 -84
- package/dist/native.d.ts +1 -1
- package/dist/rar/account-matchers.d.ts +35 -30
- package/dist/rar/account-matchers.d.ts.map +1 -1
- package/dist/rar/account-matchers.js +27 -21
- package/dist/rar/bank.d.ts +81 -81
- package/dist/rar/bank.js +1 -1
- package/dist/rar/catalog.d.ts +48 -48
- package/dist/rar/catalog.js +6 -6
- package/dist/rar/detail.d.ts +1 -1
- package/dist/rar/detail.js +1 -1
- package/dist/rar/json-schemas.generated.d.ts +1 -1
- package/dist/rar/json-schemas.generated.d.ts.map +1 -1
- package/dist/rar/json-schemas.generated.js +25 -21
- package/dist/rar/subject-data.d.ts +1 -1
- package/dist/rar/subject-data.js +1 -1
- package/dist/rar/subject.d.ts +1 -1
- package/dist/rar/subject.js +1 -1
- package/dist/rest/accounts.d.ts +28 -28
- package/dist/rest/accounts.d.ts.map +1 -1
- package/dist/rest/accounts.js +22 -22
- package/dist/rest/api-error.d.ts +1 -1
- package/dist/rest/api-error.js +1 -1
- package/dist/rest/catalog.d.ts +3 -3
- package/dist/rest/catalog.js +2 -2
- package/dist/rest/common.d.ts +3 -3
- package/dist/rest/common.js +3 -3
- package/dist/rest/contract.d.ts +905 -528
- package/dist/rest/contract.d.ts.map +1 -1
- package/dist/rest/contract.js +17 -5
- package/dist/rest/events.d.ts +1 -1
- package/dist/rest/events.d.ts.map +1 -1
- package/dist/rest/events.js +2 -2
- package/dist/rest/identity.d.ts +22 -22
- package/dist/rest/identity.js +5 -5
- package/dist/rest/index.d.ts +1 -0
- package/dist/rest/index.d.ts.map +1 -1
- package/dist/rest/index.js +1 -0
- package/dist/rest/intents.d.ts +787 -716
- package/dist/rest/intents.d.ts.map +1 -1
- package/dist/rest/intents.js +62 -53
- package/dist/rest/signatures.d.ts +11 -5
- package/dist/rest/signatures.d.ts.map +1 -1
- package/dist/rest/signatures.js +10 -0
- package/dist/rest/subjects.d.ts +1 -1
- package/dist/rest/subjects.d.ts.map +1 -1
- package/dist/rest/subjects.js +3 -2
- package/dist/rest/transfers.d.ts +612 -0
- package/dist/rest/transfers.d.ts.map +1 -0
- package/dist/rest/transfers.js +115 -0
- package/dist/scopes.d.ts +1 -1
- package/dist/signing.d.ts +13 -2
- package/dist/signing.d.ts.map +1 -1
- package/dist/signing.js +13 -0
- package/dist/transfer.d.ts +363 -0
- package/dist/transfer.d.ts.map +1 -0
- package/dist/transfer.js +287 -0
- package/dist/transport/financial-events.d.ts +21 -17
- package/dist/transport/financial-events.d.ts.map +1 -1
- package/dist/transport/generated/oauth-api.d.ts +1017 -194
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +28 -12
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/intents.js +1 -1
- package/dist/transport/rest.d.ts +4 -4
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/transport/rest.js +33 -4
- package/dist/urls.d.ts +25 -2
- package/dist/urls.d.ts.map +1 -1
- package/dist/urls.js +47 -4
- package/dist/userinfo.d.ts +2 -2
- package/dist/userinfo.js +2 -2
- package/dist/webhooks.d.ts +19 -15
- package/dist/webhooks.d.ts.map +1 -1
- package/dist/webhooks.js +17 -15
- package/dist/window-features.d.ts +2 -2
- package/dist/window-features.js +2 -2
- package/package.json +2 -2
package/dist/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(
|
|
9
|
+
id: v.pipe(v.string(), v.regex(/^\d{4}$/), v.description("The bank's four-digit code in Core's catalog: 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 `
|
|
39
|
+
description: "The banks of Core's catalog, 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 Core does not know fails with `unsupported_bank` when the transfer is executed. Granted by a `bank_transfer` authorization detail with `create`. The bank's catalog is read on behalf of the subject, through the web session of one of the accounts that detail reaches, so a subject without any answers `409 interaction_required` like any other read of the bank. 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))
|
package/dist/rest/common.d.ts
CHANGED
|
@@ -415,7 +415,7 @@ declare const TemporarilyUnavailable_base: (abstract new (data: {}, message?: st
|
|
|
415
415
|
};
|
|
416
416
|
};
|
|
417
417
|
/**
|
|
418
|
-
*
|
|
418
|
+
* AndCo could not serve the request and the caller did nothing wrong. Safe to retry with backoff; a
|
|
419
419
|
* money operation retries with the same `Idempotency-Key`.
|
|
420
420
|
*/
|
|
421
421
|
export declare class TemporarilyUnavailable extends /* @__PURE__ */ TemporarilyUnavailable_base {
|
|
@@ -432,7 +432,7 @@ declare const ServerError_base: (abstract new (data: {}, message?: string, hint?
|
|
|
432
432
|
}) & {
|
|
433
433
|
readonly error: "server_error";
|
|
434
434
|
readonly status: 500;
|
|
435
|
-
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{}, undefined>, v.DescriptionAction<{}, "
|
|
435
|
+
readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{}, undefined>, v.DescriptionAction<{}, "AndCo failed while serving the request.">]>;
|
|
436
436
|
define<const Code extends string, const Status extends number, Data extends import("./api-error.js").AndcoAPIErrorDataSchema>(error: Code, status: Status, data: Data): (abstract new (data: v.InferOutput<Data>, message?: string, hint?: string) => {
|
|
437
437
|
readonly error: Code;
|
|
438
438
|
readonly hint?: string;
|
|
@@ -449,7 +449,7 @@ declare const ServerError_base: (abstract new (data: {}, message?: string, hint?
|
|
|
449
449
|
};
|
|
450
450
|
};
|
|
451
451
|
/**
|
|
452
|
-
*
|
|
452
|
+
* AndCo failed while serving the request: a bug, or an answer that did not match this contract. Every
|
|
453
453
|
* operation can answer it, so a `switch` over `error` that handles each declared code is exhaustive.
|
|
454
454
|
* Retrying is safe only for an operation that is idempotent or carries an `Idempotency-Key`.
|
|
455
455
|
*/
|
package/dist/rest/common.js
CHANGED
|
@@ -89,7 +89,7 @@ export class PayloadTooLarge extends /* @__PURE__ */ AndcoAPIError.define("paylo
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
92
|
+
* AndCo could not serve the request and the caller did nothing wrong. Safe to retry with backoff; a
|
|
93
93
|
* money operation retries with the same `Idempotency-Key`.
|
|
94
94
|
*/
|
|
95
95
|
export class TemporarilyUnavailable extends /* @__PURE__ */ AndcoAPIError.define("temporarily_unavailable", 503, v.pipe(v.object({}), v.description("A required upstream service is temporarily unavailable."))) {
|
|
@@ -98,11 +98,11 @@ export class TemporarilyUnavailable extends /* @__PURE__ */ AndcoAPIError.define
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
/**
|
|
101
|
-
*
|
|
101
|
+
* AndCo failed while serving the request: a bug, or an answer that did not match this contract. Every
|
|
102
102
|
* operation can answer it, so a `switch` over `error` that handles each declared code is exhaustive.
|
|
103
103
|
* Retrying is safe only for an operation that is idempotent or carries an `Idempotency-Key`.
|
|
104
104
|
*/
|
|
105
|
-
export class ServerError extends /* @__PURE__ */ AndcoAPIError.define("server_error", 500, v.pipe(v.object({}), v.description("
|
|
105
|
+
export class ServerError extends /* @__PURE__ */ AndcoAPIError.define("server_error", 500, v.pipe(v.object({}), v.description("AndCo failed while serving the request."))) {
|
|
106
106
|
constructor(message) {
|
|
107
107
|
super({}, message);
|
|
108
108
|
}
|