@andco/protocol 0.0.10 → 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.
Files changed (120) hide show
  1. package/dist/api-errors.d.ts +5 -128
  2. package/dist/api-errors.d.ts.map +1 -1
  3. package/dist/api-errors.js +5 -131
  4. package/dist/authorization-preparation.d.ts +3 -3
  5. package/dist/authorization-preparation.d.ts.map +1 -1
  6. package/dist/authorization-preparation.js +4 -0
  7. package/dist/authorization.js +2 -2
  8. package/dist/errors.d.ts +60 -16
  9. package/dist/errors.d.ts.map +1 -1
  10. package/dist/errors.js +60 -12
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +1 -0
  14. package/dist/intent-input.d.ts +1791 -725
  15. package/dist/intent-input.d.ts.map +1 -1
  16. package/dist/intent-input.js +325 -157
  17. package/dist/issues.d.ts +61 -0
  18. package/dist/issues.d.ts.map +1 -0
  19. package/dist/issues.js +61 -0
  20. package/dist/messages/index.d.ts +2 -2
  21. package/dist/messages/index.d.ts.map +1 -1
  22. package/dist/messages/index.js +10 -3
  23. package/dist/messages/set-preferences.d.ts +13 -1
  24. package/dist/messages/set-preferences.d.ts.map +1 -1
  25. package/dist/messages/set-preferences.js +31 -9
  26. package/dist/miniapp-manifest.d.ts +2 -2
  27. package/dist/miniapp-manifest.d.ts.map +1 -1
  28. package/dist/miniapp-manifest.js +1 -1
  29. package/dist/native-intent.d.ts +48 -28
  30. package/dist/native-intent.d.ts.map +1 -1
  31. package/dist/native-intent.js +76 -24
  32. package/dist/pagination.d.ts +37 -31
  33. package/dist/pagination.d.ts.map +1 -1
  34. package/dist/pagination.js +72 -24
  35. package/dist/rar/account-matchers.d.ts +47 -240
  36. package/dist/rar/account-matchers.d.ts.map +1 -1
  37. package/dist/rar/account-matchers.js +52 -131
  38. package/dist/rar/bank.d.ts +280 -392
  39. package/dist/rar/bank.d.ts.map +1 -1
  40. package/dist/rar/bank.js +68 -137
  41. package/dist/rar/catalog.d.ts +305 -288
  42. package/dist/rar/catalog.d.ts.map +1 -1
  43. package/dist/rar/catalog.js +69 -29
  44. package/dist/rar/detail.d.ts +15 -32
  45. package/dist/rar/detail.d.ts.map +1 -1
  46. package/dist/rar/detail.js +14 -34
  47. package/dist/rar/index.d.ts +2 -1
  48. package/dist/rar/index.d.ts.map +1 -1
  49. package/dist/rar/index.js +2 -1
  50. package/dist/rar/json-schemas.generated.d.ts +4 -0
  51. package/dist/rar/json-schemas.generated.d.ts.map +1 -0
  52. package/dist/rar/json-schemas.generated.js +3570 -0
  53. package/dist/rar/money.d.ts +5 -5
  54. package/dist/rar/money.d.ts.map +1 -1
  55. package/dist/rar/money.js +5 -5
  56. package/dist/rar/project-users.d.ts +40 -14
  57. package/dist/rar/project-users.d.ts.map +1 -1
  58. package/dist/rar/project-users.js +20 -23
  59. package/dist/rar/subject-data.d.ts +96 -48
  60. package/dist/rar/subject-data.d.ts.map +1 -1
  61. package/dist/rar/subject-data.js +61 -34
  62. package/dist/rar/subject.d.ts +18 -85
  63. package/dist/rar/subject.d.ts.map +1 -1
  64. package/dist/rar/subject.js +23 -51
  65. package/dist/rest/accounts.d.ts +347 -0
  66. package/dist/rest/accounts.d.ts.map +1 -0
  67. package/dist/rest/accounts.js +108 -0
  68. package/dist/rest/addresses.d.ts +581 -0
  69. package/dist/rest/addresses.d.ts.map +1 -0
  70. package/dist/rest/addresses.js +190 -0
  71. package/dist/rest/api-error.d.ts +104 -0
  72. package/dist/rest/api-error.d.ts.map +1 -0
  73. package/dist/rest/api-error.js +103 -0
  74. package/dist/rest/authorization.d.ts +123 -0
  75. package/dist/rest/authorization.d.ts.map +1 -0
  76. package/dist/rest/authorization.js +62 -0
  77. package/dist/rest/catalog.d.ts +199 -0
  78. package/dist/rest/catalog.d.ts.map +1 -0
  79. package/dist/rest/catalog.js +63 -0
  80. package/dist/rest/common.d.ts +637 -0
  81. package/dist/rest/common.d.ts.map +1 -0
  82. package/dist/rest/common.js +172 -0
  83. package/dist/rest/contract.d.ts +3480 -0
  84. package/dist/rest/contract.d.ts.map +1 -0
  85. package/dist/rest/contract.js +120 -0
  86. package/dist/rest/events.d.ts +145 -0
  87. package/dist/rest/events.d.ts.map +1 -0
  88. package/dist/rest/events.js +42 -0
  89. package/dist/rest/http.d.ts +49 -0
  90. package/dist/rest/http.d.ts.map +1 -0
  91. package/dist/rest/http.js +25 -0
  92. package/dist/rest/identity.d.ts +627 -0
  93. package/dist/rest/identity.d.ts.map +1 -0
  94. package/dist/rest/identity.js +128 -0
  95. package/dist/rest/index.d.ts +14 -0
  96. package/dist/rest/index.d.ts.map +1 -0
  97. package/dist/rest/index.js +13 -0
  98. package/dist/rest/intents.d.ts +4556 -0
  99. package/dist/rest/intents.d.ts.map +1 -0
  100. package/dist/rest/intents.js +551 -0
  101. package/dist/rest/signatures.d.ts +110 -0
  102. package/dist/rest/signatures.d.ts.map +1 -0
  103. package/dist/rest/signatures.js +113 -0
  104. package/dist/rest/subjects.d.ts +14 -0
  105. package/dist/rest/subjects.d.ts.map +1 -0
  106. package/dist/rest/subjects.js +22 -0
  107. package/dist/service-grants.d.ts +2 -2
  108. package/dist/service-grants.d.ts.map +1 -1
  109. package/dist/service-grants.js +1 -1
  110. package/dist/transport/generated/oauth-api.d.ts +5547 -1448
  111. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  112. package/dist/transport/intents.d.ts +9 -134
  113. package/dist/transport/intents.d.ts.map +1 -1
  114. package/dist/transport/intents.js +21 -405
  115. package/dist/transport/rest.d.ts +15 -5
  116. package/dist/transport/rest.d.ts.map +1 -1
  117. package/dist/userinfo.d.ts +22 -9
  118. package/dist/userinfo.d.ts.map +1 -1
  119. package/dist/userinfo.js +17 -12
  120. package/package.json +13 -2
@@ -0,0 +1,199 @@
1
+ import * as v from "valibot";
2
+ import { BankConnectionInteractionRequired } from "./accounts.js";
3
+ import { InsufficientAuthorization, InvalidOrigin, InvalidRequest, InvalidToken, ServerError, TemporarilyUnavailable, UnsupportedVersion } from "./common.js";
4
+ /** A bank a transfer can be sent to. */
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_id` of a destination of type `external`.">]>;
7
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
8
+ }, undefined>;
9
+ /** The whole list of banks as one page. */
10
+ export declare const BankCatalogPage: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
11
+ readonly edges: v.ArraySchema<v.StrictObjectSchema<{
12
+ readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
13
+ readonly node: v.StrictObjectSchema<{
14
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The `bank_id` of a destination of type `external`.">]>;
15
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
16
+ }, undefined>;
17
+ }, undefined>, undefined>;
18
+ readonly pageInfo: v.StrictObjectSchema<{
19
+ readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
20
+ readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
21
+ readonly hasPreviousPage: v.BooleanSchema<undefined>;
22
+ readonly hasNextPage: v.BooleanSchema<undefined>;
23
+ }, undefined>;
24
+ }, undefined>, v.DescriptionAction<{
25
+ edges: {
26
+ cursor: string | null;
27
+ node: {
28
+ id: string;
29
+ name: string;
30
+ };
31
+ }[];
32
+ pageInfo: {
33
+ startCursor: string | null;
34
+ endCursor: string | null;
35
+ hasPreviousPage: boolean;
36
+ hasNextPage: boolean;
37
+ };
38
+ }, string>]>;
39
+ /** One scope or authorization detail type a live provider publishes. */
40
+ export declare const PermissionCatalogEntry: v.StrictObjectSchema<{
41
+ readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
42
+ readonly providerProjectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
43
+ readonly providerName: v.StringSchema<undefined>;
44
+ readonly resource: v.StringSchema<undefined>;
45
+ readonly kind: v.PicklistSchema<["scope", "authorization_details"], undefined>;
46
+ readonly identifier: v.StringSchema<undefined>;
47
+ readonly name: v.StringSchema<undefined>;
48
+ readonly description: v.StringSchema<undefined>;
49
+ readonly actions: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
50
+ readonly restrictions: v.StringSchema<undefined>;
51
+ readonly schema: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
52
+ readonly examples: v.ArraySchema<v.UnknownSchema, undefined>;
53
+ }, undefined>;
54
+ /** One page of the public Permission Catalog. */
55
+ export declare const PermissionCatalogPage: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
56
+ readonly edges: v.ArraySchema<v.StrictObjectSchema<{
57
+ readonly cursor: v.StringSchema<undefined>;
58
+ readonly node: v.StrictObjectSchema<{
59
+ readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
60
+ readonly providerProjectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
61
+ readonly providerName: v.StringSchema<undefined>;
62
+ readonly resource: v.StringSchema<undefined>;
63
+ readonly kind: v.PicklistSchema<["scope", "authorization_details"], undefined>;
64
+ readonly identifier: v.StringSchema<undefined>;
65
+ readonly name: v.StringSchema<undefined>;
66
+ readonly description: v.StringSchema<undefined>;
67
+ readonly actions: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
68
+ readonly restrictions: v.StringSchema<undefined>;
69
+ readonly schema: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
70
+ readonly examples: v.ArraySchema<v.UnknownSchema, undefined>;
71
+ }, undefined>;
72
+ }, undefined>, undefined>;
73
+ readonly pageInfo: v.StrictObjectSchema<{
74
+ readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
75
+ readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
76
+ readonly hasPreviousPage: v.BooleanSchema<undefined>;
77
+ readonly hasNextPage: v.BooleanSchema<undefined>;
78
+ }, undefined>;
79
+ }, undefined>, v.DescriptionAction<{
80
+ edges: {
81
+ cursor: string;
82
+ node: {
83
+ providerId: string;
84
+ providerProjectId: string;
85
+ providerName: string;
86
+ resource: string;
87
+ kind: "scope" | "authorization_details";
88
+ identifier: string;
89
+ name: string;
90
+ description: string;
91
+ actions: {
92
+ [x: string]: string;
93
+ };
94
+ restrictions: string;
95
+ schema: {
96
+ [x: string]: unknown;
97
+ };
98
+ examples: unknown[];
99
+ };
100
+ }[];
101
+ pageInfo: {
102
+ startCursor: string | null;
103
+ endCursor: string | null;
104
+ hasPreviousPage: boolean;
105
+ hasNextPage: boolean;
106
+ };
107
+ }, string>]>;
108
+ /** Lists the banks a transfer to an external account can name. */
109
+ export declare const getBankCatalog: import("@orpc/contract").ProcedureContractBuilderWithOutput<v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
110
+ readonly edges: v.ArraySchema<v.StrictObjectSchema<{
111
+ readonly cursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
112
+ readonly node: v.StrictObjectSchema<{
113
+ readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.DescriptionAction<string, "The `bank_id` of a destination of type `external`.">]>;
114
+ readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The bank's name as the bank lists it.">]>;
115
+ }, undefined>;
116
+ }, undefined>, undefined>;
117
+ readonly pageInfo: v.StrictObjectSchema<{
118
+ readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
119
+ readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
120
+ readonly hasPreviousPage: v.BooleanSchema<undefined>;
121
+ readonly hasNextPage: v.BooleanSchema<undefined>;
122
+ }, undefined>;
123
+ }, undefined>, v.DescriptionAction<{
124
+ edges: {
125
+ cursor: string | null;
126
+ node: {
127
+ id: string;
128
+ name: string;
129
+ };
130
+ }[];
131
+ pageInfo: {
132
+ startCursor: string | null;
133
+ endCursor: string | null;
134
+ hasPreviousPage: boolean;
135
+ hasNextPage: boolean;
136
+ };
137
+ }, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidToken, typeof InvalidOrigin, typeof InsufficientAuthorization, typeof UnsupportedVersion, typeof ServerError, typeof BankConnectionInteractionRequired, typeof TemporarilyUnavailable]>>;
138
+ /** Lists the public Permission Catalog, the only resource of the API that needs no authorization. */
139
+ export declare const getPermissionCatalog: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
140
+ 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>;
141
+ readonly first: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 200, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Cursor page size; forward and backward argument families are exclusive.">]>;
142
+ readonly before: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MaxLengthAction<string, 2048, undefined>, v.DescriptionAction<string, "Opaque cursor previously returned by this collection.">]>, undefined>;
143
+ readonly last: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 200, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Cursor page size; forward and backward argument families are exclusive.">]>;
144
+ 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>;
145
+ readonly limit: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.MinValueAction<number, 1, undefined>, v.MaxValueAction<number, 200, undefined>]>, undefined>, v.DescriptionAction<number | undefined, "Offset page size; do not combine with cursor arguments.">]>;
146
+ }, undefined>, v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
147
+ readonly edges: v.ArraySchema<v.StrictObjectSchema<{
148
+ readonly cursor: v.StringSchema<undefined>;
149
+ readonly node: v.StrictObjectSchema<{
150
+ readonly providerId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
151
+ readonly providerProjectId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
152
+ readonly providerName: v.StringSchema<undefined>;
153
+ readonly resource: v.StringSchema<undefined>;
154
+ readonly kind: v.PicklistSchema<["scope", "authorization_details"], undefined>;
155
+ readonly identifier: v.StringSchema<undefined>;
156
+ readonly name: v.StringSchema<undefined>;
157
+ readonly description: v.StringSchema<undefined>;
158
+ readonly actions: v.RecordSchema<v.StringSchema<undefined>, v.StringSchema<undefined>, undefined>;
159
+ readonly restrictions: v.StringSchema<undefined>;
160
+ readonly schema: v.RecordSchema<v.StringSchema<undefined>, v.UnknownSchema, undefined>;
161
+ readonly examples: v.ArraySchema<v.UnknownSchema, undefined>;
162
+ }, undefined>;
163
+ }, undefined>, undefined>;
164
+ readonly pageInfo: v.StrictObjectSchema<{
165
+ readonly startCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
166
+ readonly endCursor: v.NullableSchema<v.StringSchema<undefined>, undefined>;
167
+ readonly hasPreviousPage: v.BooleanSchema<undefined>;
168
+ readonly hasNextPage: v.BooleanSchema<undefined>;
169
+ }, undefined>;
170
+ }, undefined>, v.DescriptionAction<{
171
+ edges: {
172
+ cursor: string;
173
+ node: {
174
+ providerId: string;
175
+ providerProjectId: string;
176
+ providerName: string;
177
+ resource: string;
178
+ kind: "scope" | "authorization_details";
179
+ identifier: string;
180
+ name: string;
181
+ description: string;
182
+ actions: {
183
+ [x: string]: string;
184
+ };
185
+ restrictions: string;
186
+ schema: {
187
+ [x: string]: unknown;
188
+ };
189
+ examples: unknown[];
190
+ };
191
+ }[];
192
+ pageInfo: {
193
+ startCursor: string | null;
194
+ endCursor: string | null;
195
+ hasPreviousPage: boolean;
196
+ hasNextPage: boolean;
197
+ };
198
+ }, string>]>, import("./api-error.js").AndcoAPIErrorMap<readonly [typeof InvalidRequest, typeof UnsupportedVersion, typeof ServerError, typeof TemporarilyUnavailable]>>;
199
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/rest/catalog.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAC7B,OAAO,EAAE,iCAAiC,EAAE,MAAM,eAAe,CAAC;AAElE,OAAO,EAKL,yBAAyB,EACzB,aAAa,EACb,cAAc,EACd,YAAY,EAEZ,WAAW,EACX,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB,wCAAwC;AACxC,eAAO,MAAM,gBAAgB;;;aAO3B,CAAC;AAEH,2CAA2C;AAC3C,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAG3B,CAAC;AAEF,wEAAwE;AACxE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;aAajC,CAAC;AAEH,iDAAiD;AACjD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAGjC,CAAC;AAKF,kEAAkE;AAClE,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;wQAsBD,CAAC;AAE3B,qGAAqG;AACrG,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wKA6BD,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { oc } from "@orpc/contract";
2
+ import * as v from "valibot";
3
+ import { BankConnectionInteractionRequired } from "./accounts.js";
4
+ import { errors } from "./api-error.js";
5
+ import { BackwardPageQuery, connection, cursorlessConnection, ForwardPageQuery, InsufficientAuthorization, InvalidOrigin, InvalidRequest, InvalidToken, OffsetPageQuery, ServerError, TemporarilyUnavailable, UnsupportedVersion, } from "./common.js";
6
+ import { http } from "./http.js";
7
+ /** A bank a transfer can be sent to. */
8
+ export const BankCatalogEntry = /* @__PURE__ */ v.strictObject({
9
+ id: v.pipe(v.string(), v.regex(/^[a-z0-9][a-z0-9_-]{0,63}$/), v.description("The `bank_id` of a destination of type `external`.")),
10
+ name: v.pipe(v.string(), v.description("The bank's name as the bank lists it.")),
11
+ });
12
+ /** The whole list of banks as one page. */
13
+ export const BankCatalogPage = /* @__PURE__ */ cursorlessConnection(BankCatalogEntry, "The whole list of banks as one page. `pageInfo.hasNextPage` is false and `endCursor` null; an edge's `cursor` is null because the list has no positions to resume from.");
14
+ /** One scope or authorization detail type a live provider publishes. */
15
+ export const PermissionCatalogEntry = /* @__PURE__ */ v.strictObject({
16
+ providerId: v.pipe(v.string(), v.uuid()),
17
+ providerProjectId: v.pipe(v.string(), v.uuid()),
18
+ providerName: v.string(),
19
+ resource: v.string(),
20
+ kind: v.picklist(["scope", "authorization_details"]),
21
+ identifier: v.string(),
22
+ name: v.string(),
23
+ description: v.string(),
24
+ actions: v.record(v.string(), v.string()),
25
+ restrictions: v.string(),
26
+ schema: v.record(v.string(), v.unknown()),
27
+ examples: v.array(v.unknown()),
28
+ });
29
+ /** One page of the public Permission Catalog. */
30
+ export const PermissionCatalogPage = /* @__PURE__ */ connection(PermissionCatalogEntry, "A standard connection. Edge cursors remain present on nonempty terminal pages. Reads are live; offset positions can shift under concurrent changes.");
31
+ /** The page size of the Permission Catalog, which allows up to 200. */
32
+ const CatalogPageSize = /* @__PURE__ */ v.optional(v.pipe(v.number(), v.integer(), v.minValue(1), v.maxValue(200)));
33
+ /** Lists the banks a transfer to an external account can name. */
34
+ export const getBankCatalog = /* @__PURE__ */ oc
35
+ .meta(http({
36
+ method: "GET",
37
+ path: "/catalog/banks",
38
+ summary: "List the banks a transfer can be sent to",
39
+ description: "The `bank_id` values that a `bank_transfer` destination of type `external` accepts, each with the bank's name, so an integrator never guesses a slug. The list and the check a transfer goes through are the same function: an `id` here is a `bank_id` the transfer resolves to that bank, and a `bank_id` that resolves to none 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
+ successDescription: "The banks a transfer can be sent to, ordered as the bank lists them",
41
+ }))
42
+ .errors(errors(InvalidToken, InvalidOrigin, InsufficientAuthorization, UnsupportedVersion, ServerError, BankConnectionInteractionRequired, TemporarilyUnavailable))
43
+ .output(BankCatalogPage);
44
+ /** Lists the public Permission Catalog, the only resource of the API that needs no authorization. */
45
+ export const getPermissionCatalog = /* @__PURE__ */ oc
46
+ .meta(http({
47
+ method: "GET",
48
+ path: "/catalog/permissions",
49
+ summary: "List the public Permission Catalog",
50
+ description: "The reference of the OAuth Scopes and Detailed Authorization types that live providers publish, with their actions, restrictions and request examples. It describes requestable capabilities, never a Profile, Organization or Grant, and is the only resource in this API that requires no authorization. Returns edges and camelCase pageInfo. Cursor and offset argument families cannot be mixed.",
51
+ successDescription: "One page of the public Permission Catalog",
52
+ spec: (operation) => ({ ...operation, security: [] }),
53
+ }))
54
+ .errors(errors(InvalidRequest, UnsupportedVersion, ServerError, TemporarilyUnavailable))
55
+ .input(v.object({
56
+ after: ForwardPageQuery.after,
57
+ first: v.pipe(CatalogPageSize, v.description("Cursor page size; forward and backward argument families are exclusive.")),
58
+ before: BackwardPageQuery.before,
59
+ last: v.pipe(CatalogPageSize, v.description("Cursor page size; forward and backward argument families are exclusive.")),
60
+ offset: OffsetPageQuery.offset,
61
+ limit: v.pipe(CatalogPageSize, v.description("Offset page size; do not combine with cursor arguments.")),
62
+ }))
63
+ .output(PermissionCatalogPage);