@andco/protocol 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-errors.d.ts +5 -128
- package/dist/api-errors.d.ts.map +1 -1
- package/dist/api-errors.js +5 -131
- package/dist/authorization-preparation.d.ts +3 -3
- package/dist/authorization-preparation.d.ts.map +1 -1
- package/dist/authorization-preparation.js +4 -0
- package/dist/authorization.js +2 -2
- package/dist/errors.d.ts +52 -16
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +52 -12
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/intent-input.d.ts +1791 -725
- package/dist/intent-input.d.ts.map +1 -1
- package/dist/intent-input.js +325 -157
- package/dist/issues.d.ts +61 -0
- package/dist/issues.d.ts.map +1 -0
- package/dist/issues.js +61 -0
- package/dist/messages/index.d.ts +2 -2
- package/dist/messages/index.d.ts.map +1 -1
- package/dist/messages/index.js +10 -3
- package/dist/messages/set-preferences.d.ts +13 -1
- package/dist/messages/set-preferences.d.ts.map +1 -1
- package/dist/messages/set-preferences.js +31 -9
- package/dist/miniapp-manifest.d.ts +2 -2
- package/dist/miniapp-manifest.d.ts.map +1 -1
- package/dist/miniapp-manifest.js +1 -1
- package/dist/native-intent.d.ts +48 -28
- package/dist/native-intent.d.ts.map +1 -1
- package/dist/native-intent.js +76 -24
- package/dist/pagination.d.ts +37 -31
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +72 -24
- package/dist/rar/account-matchers.d.ts +47 -240
- package/dist/rar/account-matchers.d.ts.map +1 -1
- package/dist/rar/account-matchers.js +52 -131
- package/dist/rar/bank.d.ts +280 -392
- package/dist/rar/bank.d.ts.map +1 -1
- package/dist/rar/bank.js +68 -137
- package/dist/rar/catalog.d.ts +305 -288
- package/dist/rar/catalog.d.ts.map +1 -1
- package/dist/rar/catalog.js +69 -29
- package/dist/rar/detail.d.ts +15 -32
- package/dist/rar/detail.d.ts.map +1 -1
- package/dist/rar/detail.js +14 -34
- package/dist/rar/index.d.ts +2 -1
- package/dist/rar/index.d.ts.map +1 -1
- package/dist/rar/index.js +2 -1
- package/dist/rar/json-schemas.generated.d.ts +4 -0
- package/dist/rar/json-schemas.generated.d.ts.map +1 -0
- package/dist/rar/json-schemas.generated.js +3570 -0
- package/dist/rar/money.d.ts +5 -5
- package/dist/rar/money.d.ts.map +1 -1
- package/dist/rar/money.js +5 -5
- package/dist/rar/project-users.d.ts +40 -14
- package/dist/rar/project-users.d.ts.map +1 -1
- package/dist/rar/project-users.js +20 -23
- package/dist/rar/subject-data.d.ts +96 -48
- package/dist/rar/subject-data.d.ts.map +1 -1
- package/dist/rar/subject-data.js +61 -34
- package/dist/rar/subject.d.ts +18 -85
- package/dist/rar/subject.d.ts.map +1 -1
- package/dist/rar/subject.js +23 -51
- package/dist/rest/accounts.d.ts +347 -0
- package/dist/rest/accounts.d.ts.map +1 -0
- package/dist/rest/accounts.js +108 -0
- package/dist/rest/addresses.d.ts +581 -0
- package/dist/rest/addresses.d.ts.map +1 -0
- package/dist/rest/addresses.js +190 -0
- package/dist/rest/api-error.d.ts +104 -0
- package/dist/rest/api-error.d.ts.map +1 -0
- package/dist/rest/api-error.js +103 -0
- package/dist/rest/authorization.d.ts +123 -0
- package/dist/rest/authorization.d.ts.map +1 -0
- package/dist/rest/authorization.js +62 -0
- package/dist/rest/catalog.d.ts +199 -0
- package/dist/rest/catalog.d.ts.map +1 -0
- package/dist/rest/catalog.js +63 -0
- package/dist/rest/common.d.ts +637 -0
- package/dist/rest/common.d.ts.map +1 -0
- package/dist/rest/common.js +172 -0
- package/dist/rest/contract.d.ts +3480 -0
- package/dist/rest/contract.d.ts.map +1 -0
- package/dist/rest/contract.js +120 -0
- package/dist/rest/events.d.ts +145 -0
- package/dist/rest/events.d.ts.map +1 -0
- package/dist/rest/events.js +42 -0
- package/dist/rest/http.d.ts +49 -0
- package/dist/rest/http.d.ts.map +1 -0
- package/dist/rest/http.js +25 -0
- package/dist/rest/identity.d.ts +627 -0
- package/dist/rest/identity.d.ts.map +1 -0
- package/dist/rest/identity.js +128 -0
- package/dist/rest/index.d.ts +14 -0
- package/dist/rest/index.d.ts.map +1 -0
- package/dist/rest/index.js +13 -0
- package/dist/rest/intents.d.ts +4556 -0
- package/dist/rest/intents.d.ts.map +1 -0
- package/dist/rest/intents.js +551 -0
- package/dist/rest/signatures.d.ts +110 -0
- package/dist/rest/signatures.d.ts.map +1 -0
- package/dist/rest/signatures.js +113 -0
- package/dist/rest/subjects.d.ts +14 -0
- package/dist/rest/subjects.d.ts.map +1 -0
- package/dist/rest/subjects.js +22 -0
- package/dist/service-grants.d.ts +2 -2
- package/dist/service-grants.d.ts.map +1 -1
- package/dist/service-grants.js +1 -1
- package/dist/transport/generated/oauth-api.d.ts +5547 -1448
- package/dist/transport/generated/oauth-api.d.ts.map +1 -1
- package/dist/transport/intents.d.ts +9 -134
- package/dist/transport/intents.d.ts.map +1 -1
- package/dist/transport/intents.js +21 -405
- package/dist/transport/rest.d.ts +15 -5
- package/dist/transport/rest.d.ts.map +1 -1
- package/dist/userinfo.d.ts +22 -9
- package/dist/userinfo.d.ts.map +1 -1
- package/dist/userinfo.js +17 -12
- package/package.json +13 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/rest/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,qFAAqF;AACrF,eAAO,MAAM,QAAQ;;;;aAiBnB,CAAC;AAEH,wDAAwD;AACxD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,QAAQ,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtD;;;GAGG;AACH,qBAAa,cAAe,SAAQ,eAAe,CAAC,mBAOnD;gBACa,MAAM,EAA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AK,CAAC,IAAI,SAAS,CAAC,CAAC,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAEvG"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
import { AndcoAPIError } from "./api-error.js";
|
|
3
|
+
/** One reason a request did not match its operation, at one place of the request. */
|
|
4
|
+
export const ApiIssue = /* @__PURE__ */ v.object({
|
|
5
|
+
type: v.pipe(v.string(), v.description("What failed, as a stable code: a schema check such as `max_length`, `regex` or `uuid`, or the code of a rule such as `note_too_long`. Map it to your own words.")),
|
|
6
|
+
path: v.pipe(v.array(v.string()), v.description("Where it failed, as the keys from the root of the part of the request it belongs to; empty for the part as a whole.")),
|
|
7
|
+
requirement: v.pipe(v.optional(v.unknown()), v.description("What the check required, when it has a value: the maximum of `max_length`, for instance.")),
|
|
8
|
+
});
|
|
9
|
+
/**
|
|
10
|
+
* The request's body, query or headers do not match the operation. `issues` names each field and
|
|
11
|
+
* what failed in it, and never repeats what was sent.
|
|
12
|
+
*/
|
|
13
|
+
export class InvalidRequest extends /* @__PURE__ */ AndcoAPIError.define("invalid_request", 400, v.pipe(v.object({ issues: v.array(ApiIssue) }), v.description("The request's body, query or headers do not match the operation."))) {
|
|
14
|
+
constructor(issues, message) {
|
|
15
|
+
super({ issues }, message);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* An identifier in the path (an account, an Intent) is not well formed. It is refused before
|
|
20
|
+
* authorization, so a typo never reads as `not_found`.
|
|
21
|
+
*/
|
|
22
|
+
export class InvalidIdentifier extends /* @__PURE__ */ AndcoAPIError.define("invalid_identifier", 400, v.pipe(v.object({
|
|
23
|
+
parameter: v.pipe(v.string(), v.description("The path parameter that is not well formed.")),
|
|
24
|
+
}), v.description("An identifier in the path is not well formed."))) {
|
|
25
|
+
constructor(parameter, message) {
|
|
26
|
+
super({ parameter }, message);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The OAuth bearer token is missing, malformed, expired or revoked. Refresh once and retry; a second
|
|
31
|
+
* failure means the Grant is gone and the person has to authorize the application again.
|
|
32
|
+
*/
|
|
33
|
+
export class InvalidToken extends /* @__PURE__ */ AndcoAPIError.define("invalid_token", 401, v.pipe(v.object({}), v.description("The OAuth bearer token is missing, invalid, expired or revoked."))) {
|
|
34
|
+
constructor(message) {
|
|
35
|
+
super({}, message);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The Grant is valid but carries no scope for this operation. Not retryable: the application has to
|
|
40
|
+
* request that scope and the person has to consent to it.
|
|
41
|
+
*/
|
|
42
|
+
export class InsufficientScope extends /* @__PURE__ */ AndcoAPIError.define("insufficient_scope", 403, v.pipe(v.object({
|
|
43
|
+
required_scope: v.pipe(v.string(), v.description("The scope the operation requires.")),
|
|
44
|
+
}), v.description("The Grant carries no scope for this operation."))) {
|
|
45
|
+
constructor(requiredScope, message) {
|
|
46
|
+
super({ required_scope: requiredScope }, message);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The Grant covers the scope but not this exact resource: an account outside the pattern it was
|
|
51
|
+
* given, or an action its authorization details do not name.
|
|
52
|
+
*/
|
|
53
|
+
export class InsufficientAuthorization extends /* @__PURE__ */ AndcoAPIError.define("insufficient_authorization", 403, v.pipe(v.object({
|
|
54
|
+
required_type: v.pipe(v.optional(v.string()), v.description("The authorization detail type the Grant has to cover for this operation.")),
|
|
55
|
+
required_action: v.pipe(v.optional(v.string()), v.description("The action the authorization detail has to name for this operation.")),
|
|
56
|
+
}), v.description("The Grant lacks the authorization detail the resource requires."))) {
|
|
57
|
+
constructor(data, message) {
|
|
58
|
+
super(data, message);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/** The request arrived from a browser origin this Client is not registered for. */
|
|
62
|
+
export class InvalidOrigin extends /* @__PURE__ */ AndcoAPIError.define("invalid_origin", 403, v.pipe(v.object({}), v.description("The browser origin is not allowed for this Client."))) {
|
|
63
|
+
constructor(message) {
|
|
64
|
+
super({}, message);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/** The addressed resource does not exist, or exists outside what this Grant can see. */
|
|
68
|
+
export class NotFound extends /* @__PURE__ */ AndcoAPIError.define("not_found", 404, v.pipe(v.object({}), v.description("The resource does not exist under the presented Grant."))) {
|
|
69
|
+
constructor(message) {
|
|
70
|
+
super({}, message);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/** The API version in the path is not one this deployment serves. */
|
|
74
|
+
export class UnsupportedVersion extends /* @__PURE__ */ AndcoAPIError.define("unsupported_version", 404, v.pipe(v.object({}), v.description("The requested API version is not supported."))) {
|
|
75
|
+
constructor(message) {
|
|
76
|
+
super({}, message);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
/** The `Content-Type` of the request is not one this operation accepts. */
|
|
80
|
+
export class UnsupportedMediaType extends /* @__PURE__ */ AndcoAPIError.define("unsupported_media_type", 415, v.pipe(v.object({}), v.description("The request's `Content-Type` is not one this operation accepts."))) {
|
|
81
|
+
constructor(message) {
|
|
82
|
+
super({}, message);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/** The body of the request is larger than this operation reads. */
|
|
86
|
+
export class PayloadTooLarge extends /* @__PURE__ */ AndcoAPIError.define("payload_too_large", 413, v.pipe(v.object({}), v.description("The request body is larger than this operation reads."))) {
|
|
87
|
+
constructor(message) {
|
|
88
|
+
super({}, message);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Andco could not serve the request and the caller did nothing wrong. Safe to retry with backoff; a
|
|
93
|
+
* money operation retries with the same `Idempotency-Key`.
|
|
94
|
+
*/
|
|
95
|
+
export class TemporarilyUnavailable extends /* @__PURE__ */ AndcoAPIError.define("temporarily_unavailable", 503, v.pipe(v.object({}), v.description("A required upstream service is temporarily unavailable."))) {
|
|
96
|
+
constructor(message) {
|
|
97
|
+
super({}, message);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Andco failed while serving the request: a bug, or an answer that did not match this contract. Every
|
|
102
|
+
* operation can answer it, so a `switch` over `error` that handles each declared code is exhaustive.
|
|
103
|
+
* Retrying is safe only for an operation that is idempotent or carries an `Idempotency-Key`.
|
|
104
|
+
*/
|
|
105
|
+
export class ServerError extends /* @__PURE__ */ AndcoAPIError.define("server_error", 500, v.pipe(v.object({}), v.description("Andco failed while serving the request."))) {
|
|
106
|
+
constructor(message) {
|
|
107
|
+
super({}, message);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
/** An opaque position in a collection, exactly as a previous page returned it. */
|
|
111
|
+
export const PageCursor = /* @__PURE__ */ v.pipe(v.string(), v.maxLength(2048), v.description("Opaque cursor previously returned by this collection."));
|
|
112
|
+
/** How many items a cursor page holds, 1 to 100. */
|
|
113
|
+
export const PageSize = /* @__PURE__ */ v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(100));
|
|
114
|
+
/** A nonnegative position in the live, ordered results. */
|
|
115
|
+
export const PageOffset = /* @__PURE__ */ v.pipe(v.number(), v.integer(), v.minValue(0), v.maxValue(2147483647), v.description("Nonnegative position in live ordered results."));
|
|
116
|
+
/**
|
|
117
|
+
* The arguments that walk a collection forward from a cursor. Spread them into the query of an
|
|
118
|
+
* operation: `v.object({ ...ForwardPageQuery })`.
|
|
119
|
+
*/
|
|
120
|
+
export const ForwardPageQuery = {
|
|
121
|
+
after: /* @__PURE__ */ v.optional(PageCursor),
|
|
122
|
+
first: /* @__PURE__ */ v.pipe(v.optional(PageSize), v.description("Cursor page size; forward and backward argument families are exclusive.")),
|
|
123
|
+
};
|
|
124
|
+
/** The arguments that walk a collection backward from a cursor. */
|
|
125
|
+
export const BackwardPageQuery = {
|
|
126
|
+
before: /* @__PURE__ */ v.optional(PageCursor),
|
|
127
|
+
last: /* @__PURE__ */ v.pipe(v.optional(PageSize), v.description("Cursor page size; forward and backward argument families are exclusive.")),
|
|
128
|
+
};
|
|
129
|
+
/** The arguments that read a collection by position. */
|
|
130
|
+
export const OffsetPageQuery = {
|
|
131
|
+
offset: /* @__PURE__ */ v.optional(PageOffset),
|
|
132
|
+
limit: /* @__PURE__ */ v.pipe(v.optional(PageSize), v.description("Offset page size; do not combine with cursor arguments.")),
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Every pagination argument of a standard collection. The cursor, backward and offset families
|
|
136
|
+
* cannot be mixed in one request; the server answers `invalid_request` when they are.
|
|
137
|
+
*/
|
|
138
|
+
export const PageQuery = {
|
|
139
|
+
...ForwardPageQuery,
|
|
140
|
+
...BackwardPageQuery,
|
|
141
|
+
...OffsetPageQuery,
|
|
142
|
+
};
|
|
143
|
+
/** Where a page sits in its collection. */
|
|
144
|
+
export const PageInfo = /* @__PURE__ */ v.strictObject({
|
|
145
|
+
startCursor: v.nullable(v.string()),
|
|
146
|
+
endCursor: v.nullable(v.string()),
|
|
147
|
+
hasPreviousPage: v.boolean(),
|
|
148
|
+
hasNextPage: v.boolean(),
|
|
149
|
+
});
|
|
150
|
+
/**
|
|
151
|
+
* A page of a collection as a connection: `edges`, each with its `cursor` and `node`, and the
|
|
152
|
+
* `pageInfo` that says where the page sits.
|
|
153
|
+
*
|
|
154
|
+
* @param node The schema of one item.
|
|
155
|
+
* @param description What this page is, for the reference.
|
|
156
|
+
*/
|
|
157
|
+
export function connection(node, description) {
|
|
158
|
+
return edgesOf(v.string(), node, description);
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* A page whose edges carry no cursor of their own, because the collection has no position per item:
|
|
162
|
+
* it is walked from the end of a page (`pageInfo.endCursor`), never from one item.
|
|
163
|
+
*
|
|
164
|
+
* @param node The schema of one item.
|
|
165
|
+
* @param description What this page is, for the reference, and how it is walked.
|
|
166
|
+
*/
|
|
167
|
+
export function cursorlessConnection(node, description) {
|
|
168
|
+
return edgesOf(v.nullable(v.string()), node, description);
|
|
169
|
+
}
|
|
170
|
+
function edgesOf(cursor, node, description) {
|
|
171
|
+
return v.pipe(v.strictObject({ edges: v.array(v.strictObject({ cursor, node })), pageInfo: PageInfo }), v.description(description));
|
|
172
|
+
}
|