@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.
Files changed (101) hide show
  1. package/README.md +2 -2
  2. package/dist/api-errors.d.ts +9 -9
  3. package/dist/api-errors.js +9 -9
  4. package/dist/authorization-preparation.d.ts +1 -1
  5. package/dist/authorization-preparation.js +2 -2
  6. package/dist/authorization.d.ts +1 -1
  7. package/dist/authorization.js +1 -1
  8. package/dist/consent.d.ts +2 -2
  9. package/dist/consent.js +2 -2
  10. package/dist/errors.d.ts +10 -10
  11. package/dist/errors.js +10 -10
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +1 -0
  15. package/dist/intent-input.d.ts +452 -880
  16. package/dist/intent-input.d.ts.map +1 -1
  17. package/dist/intent-input.js +164 -127
  18. package/dist/intent-status.d.ts +5 -6
  19. package/dist/intent-status.d.ts.map +1 -1
  20. package/dist/intent-status.js +12 -7
  21. package/dist/miniapp-manifest.d.ts +3 -3
  22. package/dist/miniapp-manifest.js +1 -1
  23. package/dist/native-intent.d.ts +82 -68
  24. package/dist/native-intent.d.ts.map +1 -1
  25. package/dist/native-intent.js +137 -84
  26. package/dist/native.d.ts +1 -1
  27. package/dist/rar/account-matchers.d.ts +35 -30
  28. package/dist/rar/account-matchers.d.ts.map +1 -1
  29. package/dist/rar/account-matchers.js +27 -21
  30. package/dist/rar/bank.d.ts +357 -85
  31. package/dist/rar/bank.d.ts.map +1 -1
  32. package/dist/rar/bank.js +43 -5
  33. package/dist/rar/catalog.d.ts +174 -49
  34. package/dist/rar/catalog.d.ts.map +1 -1
  35. package/dist/rar/catalog.js +6 -6
  36. package/dist/rar/detail.d.ts +1 -1
  37. package/dist/rar/detail.js +1 -1
  38. package/dist/rar/json-schemas.generated.d.ts +1 -1
  39. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  40. package/dist/rar/json-schemas.generated.js +393 -21
  41. package/dist/rar/money.d.ts +1 -1
  42. package/dist/rar/money.js +1 -1
  43. package/dist/rar/subject-data.d.ts +1 -1
  44. package/dist/rar/subject-data.js +1 -1
  45. package/dist/rar/subject.d.ts +1 -1
  46. package/dist/rar/subject.js +1 -1
  47. package/dist/rest/accounts.d.ts +28 -28
  48. package/dist/rest/accounts.d.ts.map +1 -1
  49. package/dist/rest/accounts.js +22 -22
  50. package/dist/rest/api-error.d.ts +1 -1
  51. package/dist/rest/api-error.js +1 -1
  52. package/dist/rest/catalog.d.ts +3 -3
  53. package/dist/rest/catalog.js +2 -2
  54. package/dist/rest/common.d.ts +3 -3
  55. package/dist/rest/common.js +3 -3
  56. package/dist/rest/contract.d.ts +1183 -547
  57. package/dist/rest/contract.d.ts.map +1 -1
  58. package/dist/rest/contract.js +21 -5
  59. package/dist/rest/events.d.ts +1 -1
  60. package/dist/rest/events.d.ts.map +1 -1
  61. package/dist/rest/events.js +2 -2
  62. package/dist/rest/identity.d.ts +22 -22
  63. package/dist/rest/identity.d.ts.map +1 -1
  64. package/dist/rest/identity.js +5 -5
  65. package/dist/rest/index.d.ts +1 -0
  66. package/dist/rest/index.d.ts.map +1 -1
  67. package/dist/rest/index.js +1 -0
  68. package/dist/rest/intents.d.ts +973 -743
  69. package/dist/rest/intents.d.ts.map +1 -1
  70. package/dist/rest/intents.js +112 -89
  71. package/dist/rest/signatures.d.ts +25 -5
  72. package/dist/rest/signatures.d.ts.map +1 -1
  73. package/dist/rest/signatures.js +52 -0
  74. package/dist/rest/transfers.d.ts +988 -0
  75. package/dist/rest/transfers.d.ts.map +1 -0
  76. package/dist/rest/transfers.js +142 -0
  77. package/dist/scopes.d.ts +1 -1
  78. package/dist/signing.d.ts +17 -3
  79. package/dist/signing.d.ts.map +1 -1
  80. package/dist/signing.js +8 -1
  81. package/dist/transfer.d.ts +399 -0
  82. package/dist/transfer.d.ts.map +1 -0
  83. package/dist/transfer.js +313 -0
  84. package/dist/transport/financial-events.d.ts +82 -27
  85. package/dist/transport/financial-events.d.ts.map +1 -1
  86. package/dist/transport/financial-events.js +34 -0
  87. package/dist/transport/generated/oauth-api.d.ts +1420 -333
  88. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  89. package/dist/transport/intents.d.ts +29 -13
  90. package/dist/transport/intents.d.ts.map +1 -1
  91. package/dist/transport/intents.js +1 -1
  92. package/dist/transport/rest.d.ts +5 -5
  93. package/dist/urls.d.ts +2 -2
  94. package/dist/urls.js +3 -3
  95. package/dist/userinfo.d.ts +2 -2
  96. package/dist/userinfo.js +2 -2
  97. package/dist/webhooks.d.ts +16 -16
  98. package/dist/webhooks.js +14 -14
  99. package/dist/window-features.d.ts +2 -2
  100. package/dist/window-features.js +2 -2
  101. package/package.json +2 -2
@@ -1,10 +1,10 @@
1
1
  import * as v from "valibot";
2
2
  import { InsufficientAuthorization, InvalidIdentifier, InvalidOrigin, InvalidRequest, InvalidToken, NotFound, ServerError, TemporarilyUnavailable, UnsupportedVersion } from "./common.js";
3
3
  /**
4
- * A decimal figure issued by the external bank, as the bank sent it: a string, never a number, with
5
- * no bound on its digits. Andco republishes it untouched so a reconciliation can compare it byte for
6
- * byte with the bank's own record; tightening it would turn a quirk of the bank into the refusal of a
7
- * legitimate bank fact.
4
+ * A decimal figure issued by AndCo, as AndCo sent it: a string, never a number, with
5
+ * no bound on its digits. AndCo republishes it untouched so a reconciliation can compare it byte for
6
+ * byte with AndCo's own record; tightening it would turn a quirk of AndCo into the refusal of a
7
+ * legitimate fact.
8
8
  */
9
9
  export declare const BankDecimal: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>;
10
10
  declare const BankConnectionInteractionRequired_base: (abstract new (data: {
@@ -25,12 +25,12 @@ declare const BankConnectionInteractionRequired_base: (abstract new (data: {
25
25
  readonly error: "interaction_required";
26
26
  readonly status: 409;
27
27
  readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{
28
- readonly code: v.SchemaWithPipe<readonly [v.PicklistSchema<["bank_connection_pin_required", "bank_connection_reconnect_required", "bank_representative_replacement_required"], undefined>, v.DescriptionAction<"bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required", "What the person has to do: type the web PIN (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another bank representative (`bank_representative_replacement_required`).">]>;
28
+ readonly code: v.SchemaWithPipe<readonly [v.PicklistSchema<["bank_connection_pin_required", "bank_connection_reconnect_required", "bank_representative_replacement_required"], undefined>, v.DescriptionAction<"bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required", "What the person has to do: type the web AndPass (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another account representative (`bank_representative_replacement_required`).">]>;
29
29
  readonly interaction_url: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UrlAction<string, undefined>]>, undefined>, v.DescriptionAction<string | undefined, "Where in Platform the person does what `code` names.">]>;
30
30
  }, undefined>, v.DescriptionAction<{
31
31
  code: "bank_connection_pin_required" | "bank_connection_reconnect_required" | "bank_representative_replacement_required";
32
32
  interaction_url?: string | undefined;
33
- }, "The subject's bank connection needs the person back before the bank can answer for them.">]>;
33
+ }, "The subject's AndCo account connection needs the person back before AndCo can answer for them.">]>;
34
34
  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) => {
35
35
  readonly error: Code;
36
36
  readonly hint?: string;
@@ -47,7 +47,7 @@ declare const BankConnectionInteractionRequired_base: (abstract new (data: {
47
47
  };
48
48
  };
49
49
  /**
50
- * The subject's connection with the bank needs the person back before the bank can answer for them.
50
+ * The subject's connection with AndCo needs the person back before AndCo can answer for them.
51
51
  * `code` says what the person has to do, and `interaction_url` is where they do it in Platform.
52
52
  * Nothing is wrong with the Grant: the same request succeeds afterwards, and retrying before then
53
53
  * answers the same.
@@ -100,7 +100,7 @@ declare const InvalidCursor_base: (abstract new (data: {}, message?: string, hin
100
100
  }) & {
101
101
  readonly error: "invalid_cursor";
102
102
  readonly status: 400;
103
- readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{}, undefined>, v.DescriptionAction<{}, "`after` is not a cursor the bank issued.">]>;
103
+ readonly data: v.SchemaWithPipe<readonly [v.ObjectSchema<{}, undefined>, v.DescriptionAction<{}, "`after` is not a cursor AndCo issued.">]>;
104
104
  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) => {
105
105
  readonly error: Code;
106
106
  readonly hint?: string;
@@ -117,13 +117,13 @@ declare const InvalidCursor_base: (abstract new (data: {}, message?: string, hin
117
117
  };
118
118
  };
119
119
  /**
120
- * The `after` of the transactions walk is not the cursor the bank issued for the next page. The
121
- * bank's cursor travels untouched: take it from `pageInfo.endCursor` and nothing else.
120
+ * The `after` of the transactions walk is not the cursor AndCo issued for the next page. The
121
+ * AndCo's cursor travels untouched: take it from `pageInfo.endCursor` and nothing else.
122
122
  */
123
123
  export declare class InvalidCursor extends /* @__PURE__ */ InvalidCursor_base {
124
124
  constructor(message?: string);
125
125
  }
126
- /** One of the subject's personal bank accounts. */
126
+ /** One of the subject's personal digital accounts. */
127
127
  export declare const BankAccount: v.StrictObjectSchema<{
128
128
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
129
129
  readonly accountKey: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, undefined>, v.DescriptionAction<string | null, "The Account Key its holder chose, or null for an account opened before account keys existed. Exact-match input for `GET /accounts?accountKey=`.">]>;
@@ -131,9 +131,9 @@ 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 ledger balance the bank maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds the bank has on hold are not subtracted from it. Null while the balance projection does not know the account 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.">]>;
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
- /** One of the subject's personal bank accounts. */
136
+ /** One of the subject's personal digital accounts. */
137
137
  export type BankAccount = v.InferOutput<typeof BankAccount>;
138
138
  /** A page of the subject's accounts. */
139
139
  export declare const AccountPage: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
@@ -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 ledger balance the bank maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds the bank has on hold are not subtracted from it. Null while the balance projection does not know the account 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.">]>;
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<{
@@ -176,24 +176,24 @@ export declare const AccountPage: v.SchemaWithPipe<readonly [v.StrictObjectSchem
176
176
  };
177
177
  }, string>]>;
178
178
  /**
179
- * One account transaction, as the bank reports it. Keys are camelCase because this schema describes
179
+ * One account transaction, as AndCo reports it. Keys are camelCase because this schema describes
180
180
  * the wire shape the server sends here, which differs from the snake_case of the rest of the
181
- * contract; `movement_type` keeps the bank's own field name.
181
+ * contract; `movement_type` keeps AndCo's own field name.
182
182
  */
183
183
  export declare const BankTransaction: v.StrictObjectSchema<{
184
184
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
185
185
  readonly transactionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
186
186
  readonly description: v.StringSchema<undefined>;
187
- readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Issued by the external bank and republished exactly as the bank 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: the bank sends the amount as a positive figure.">]>;
188
- readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of movement, under the bank'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.">]>;
187
+ 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.">]>;
188
+ 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.">]>;
189
189
  readonly origin: v.NullableSchema<v.StringSchema<undefined>, undefined>;
190
190
  readonly date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
191
- 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 the external bank and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away.">]>;
191
+ 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.">]>;
192
192
  readonly paymentType: v.NullableSchema<v.StringSchema<undefined>, undefined>;
193
193
  readonly reversed: v.BooleanSchema<undefined>;
194
194
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
195
195
  }, undefined>;
196
- /** One account transaction, as the bank reports it. */
196
+ /** One account transaction, as AndCo reports it. */
197
197
  export type BankTransaction = v.InferOutput<typeof BankTransaction>;
198
198
  /** A page of one account's transactions, read live from the bank. */
199
199
  export declare const BankTransactionPage: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
@@ -203,11 +203,11 @@ export declare const BankTransactionPage: v.SchemaWithPipe<readonly [v.StrictObj
203
203
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
204
204
  readonly transactionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
205
205
  readonly description: v.StringSchema<undefined>;
206
- readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Issued by the external bank and republished exactly as the bank 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: the bank sends the amount as a positive figure.">]>;
207
- readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of movement, under the bank'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.">]>;
206
+ 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.">]>;
207
+ 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.">]>;
208
208
  readonly origin: v.NullableSchema<v.StringSchema<undefined>, undefined>;
209
209
  readonly date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
210
- 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 the external bank and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away.">]>;
210
+ 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.">]>;
211
211
  readonly paymentType: v.NullableSchema<v.StringSchema<undefined>, undefined>;
212
212
  readonly reversed: v.BooleanSchema<undefined>;
213
213
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -243,7 +243,7 @@ export declare const BankTransactionPage: v.SchemaWithPipe<readonly [v.StrictObj
243
243
  hasNextPage: boolean;
244
244
  };
245
245
  }, string>]>;
246
- /** Lists the personal bank accounts the Grant reaches, with their balances. */
246
+ /** Lists the personal digital accounts the Grant reaches, with their balances. */
247
247
  export declare const listAccounts: import("@orpc/contract").ProcedureContractBuilderWithInputOutput<v.ObjectSchema<{
248
248
  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>;
249
249
  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.">]>;
@@ -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 ledger balance the bank maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds the bank has on hold are not subtracted from it. Null while the balance projection does not know the account 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.">]>;
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<{
@@ -303,11 +303,11 @@ export declare const listAccountTransactions: import("@orpc/contract").Procedure
303
303
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.UuidAction<string, undefined>]>;
304
304
  readonly transactionId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
305
305
  readonly description: v.StringSchema<undefined>;
306
- readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>]>, v.DescriptionAction<string, "Issued by the external bank and republished exactly as the bank 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: the bank sends the amount as a positive figure.">]>;
307
- readonly movement_type: v.SchemaWithPipe<readonly [v.PicklistSchema<["deposit", "interest", "withdrawal"], undefined>, v.DescriptionAction<"deposit" | "interest" | "withdrawal", "The kind of movement, under the bank'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.">]>;
306
+ 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.">]>;
307
+ 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.">]>;
308
308
  readonly origin: v.NullableSchema<v.StringSchema<undefined>, undefined>;
309
309
  readonly date: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.IsoTimestampAction<string, undefined>]>;
310
- 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 the external bank and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away.">]>;
310
+ 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.">]>;
311
311
  readonly paymentType: v.NullableSchema<v.StringSchema<undefined>, undefined>;
312
312
  readonly reversed: v.BooleanSchema<undefined>;
313
313
  readonly note: v.NullableSchema<v.StringSchema<undefined>, undefined>;
@@ -1 +1 @@
1
- {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/rest/accounts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,OAAO,EAIL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EAER,WAAW,EACX,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB;;;;;GAKG;AACH,eAAO,MAAM,WAAW,0FAAyE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElG;;;;;GAKG;AACH,qBAAa,iCAAkC,SAAQ,eAAe,CAAC,sCAsBtE;gBAEG,IAAI,EAAE;QAAE,IAAI,EAAE,iCAAiC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,EAC3F,OAAO,CAAC,EAAE,MAAM;CAInB;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,yGAAyG;AACzG,qBAAa,qBAAsB,SAAQ,eAAe,CAAC,0BAI1D;gBACa,OAAO,CAAC,EAAE,MAAM;CAG7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,eAAe,CAAC,kBAIlD;gBACa,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,mDAAmD;AACnD,eAAO,MAAM,WAAW;;;;;;;;aA6BtB,CAAC;AAEH,mDAAmD;AACnD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC;AAE5D,wCAAwC;AACxC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAGvB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;aA2B1B,CAAC;AAEH,uDAAuD;AACvD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAEpE,qEAAqE;AACrE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAG/B,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6TAiCH,CAAC;AAEvB,0EAA0E;AAC1E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gWAoCN,CAAC"}
1
+ {"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/rest/accounts.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAG7B,OAAO,EAIL,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,QAAQ,EAER,WAAW,EACX,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAGrB;;;;;GAKG;AACH,eAAO,MAAM,WAAW,0FAAyE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElG;;;;;GAKG;AACH,qBAAa,iCAAkC,SAAQ,eAAe,CAAC,sCAsBtE;gBAEG,IAAI,EAAE;QAAE,IAAI,EAAE,iCAAiC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAAC,eAAe,CAAC,EAAE,MAAM,CAAA;KAAE,EAC3F,OAAO,CAAC,EAAE,MAAM;CAInB;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED,yGAAyG;AACzG,qBAAa,qBAAsB,SAAQ,eAAe,CAAC,0BAI1D;gBACa,OAAO,CAAC,EAAE,MAAM;CAG7B;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAED;;;GAGG;AACH,qBAAa,aAAc,SAAQ,eAAe,CAAC,kBAIlD;gBACa,OAAO,CAAC,EAAE,MAAM;CAG7B;AAED,sDAAsD;AACtD,eAAO,MAAM,WAAW;;;;;;;;aA6BtB,CAAC;AAEH,sDAAsD;AACtD,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,WAAW,CAAC,CAAC;AAE5D,wCAAwC;AACxC,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAGvB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;aA2B1B,CAAC;AAEH,oDAAoD;AACpD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC;AAEpE,qEAAqE;AACrE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAG/B,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6TAiCH,CAAC;AAEvB,0EAA0E;AAC1E,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gWAoCN,CAAC"}
@@ -5,14 +5,14 @@ import { AndcoAPIError, errors } from "./api-error.js";
5
5
  import { connection, cursorlessConnection, ForwardPageQuery, InsufficientAuthorization, InvalidIdentifier, InvalidOrigin, InvalidRequest, InvalidToken, NotFound, PageQuery, ServerError, TemporarilyUnavailable, UnsupportedVersion, } from "./common.js";
6
6
  import { http } from "./http.js";
7
7
  /**
8
- * A decimal figure issued by the external bank, as the bank sent it: a string, never a number, with
9
- * no bound on its digits. Andco republishes it untouched so a reconciliation can compare it byte for
10
- * byte with the bank's own record; tightening it would turn a quirk of the bank into the refusal of a
11
- * legitimate bank fact.
8
+ * A decimal figure issued by AndCo, as AndCo sent it: a string, never a number, with
9
+ * no bound on its digits. AndCo republishes it untouched so a reconciliation can compare it byte for
10
+ * byte with AndCo's own record; tightening it would turn a quirk of AndCo into the refusal of a
11
+ * legitimate fact.
12
12
  */
13
13
  export const BankDecimal = /* @__PURE__ */ v.pipe(v.string(), v.regex(/^-?[0-9]+(?:\.[0-9]+)?$/));
14
14
  /**
15
- * The subject's connection with the bank needs the person back before the bank can answer for them.
15
+ * The subject's connection with AndCo needs the person back before AndCo can answer for them.
16
16
  * `code` says what the person has to do, and `interaction_url` is where they do it in Platform.
17
17
  * Nothing is wrong with the Grant: the same request succeeds afterwards, and retrying before then
18
18
  * answers the same.
@@ -22,9 +22,9 @@ export class BankConnectionInteractionRequired extends /* @__PURE__ */ AndcoAPIE
22
22
  "bank_connection_pin_required",
23
23
  "bank_connection_reconnect_required",
24
24
  "bank_representative_replacement_required",
25
- ]), v.description("What the person has to do: type the web PIN (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another bank representative (`bank_representative_replacement_required`).")),
25
+ ]), v.description("What the person has to do: type the web AndPass (`bank_connection_pin_required`), connect the account again (`bank_connection_reconnect_required`) or, for an Organization, connect another account representative (`bank_representative_replacement_required`).")),
26
26
  interaction_url: v.pipe(v.optional(v.pipe(v.string(), v.url())), v.description("Where in Platform the person does what `code` names.")),
27
- }), v.description("The subject's bank connection needs the person back before the bank can answer for them."))) {
27
+ }), v.description("The subject's AndCo account connection needs the person back before AndCo can answer for them."))) {
28
28
  constructor(data, message) {
29
29
  super(data, message);
30
30
  }
@@ -36,15 +36,15 @@ export class InvalidAccountsCursor extends /* @__PURE__ */ AndcoAPIError.define(
36
36
  }
37
37
  }
38
38
  /**
39
- * The `after` of the transactions walk is not the cursor the bank issued for the next page. The
40
- * bank's cursor travels untouched: take it from `pageInfo.endCursor` and nothing else.
39
+ * The `after` of the transactions walk is not the cursor AndCo issued for the next page. The
40
+ * AndCo's cursor travels untouched: take it from `pageInfo.endCursor` and nothing else.
41
41
  */
42
- export class InvalidCursor extends /* @__PURE__ */ AndcoAPIError.define("invalid_cursor", 400, v.pipe(v.object({}), v.description("`after` is not a cursor the bank issued."))) {
42
+ export class InvalidCursor extends /* @__PURE__ */ AndcoAPIError.define("invalid_cursor", 400, v.pipe(v.object({}), v.description("`after` is not a cursor AndCo issued."))) {
43
43
  constructor(message) {
44
44
  super({}, message);
45
45
  }
46
46
  }
47
- /** One of the subject's personal bank accounts. */
47
+ /** One of the subject's personal digital accounts. */
48
48
  export const BankAccount = /* @__PURE__ */ v.strictObject({
49
49
  id: v.pipe(v.string(), v.uuid()),
50
50
  accountKey: v.pipe(v.nullable(AccountKeySchema), v.description("The Account Key its holder chose, or null for an account opened before account keys existed. Exact-match input for `GET /accounts?accountKey=`.")),
@@ -52,38 +52,38 @@ 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 ledger balance the bank maintains for the account, as a decimal string, never a number. It is what the account holds after its last movement; funds the bank has on hold are not subtracted from it. Null while the balance projection does not know the account 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.")),
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.");
59
59
  /**
60
- * One account transaction, as the bank reports it. Keys are camelCase because this schema describes
60
+ * One account transaction, as AndCo reports it. Keys are camelCase because this schema describes
61
61
  * the wire shape the server sends here, which differs from the snake_case of the rest of the
62
- * contract; `movement_type` keeps the bank's own field name.
62
+ * contract; `movement_type` keeps AndCo's own field name.
63
63
  */
64
64
  export const BankTransaction = /* @__PURE__ */ v.strictObject({
65
65
  id: v.pipe(v.string(), v.uuid()),
66
66
  transactionId: v.nullable(v.string()),
67
67
  description: v.string(),
68
- amount: v.pipe(BankDecimal, v.description("Issued by the external bank and republished exactly as the bank 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: the bank sends the amount as a positive figure.")),
69
- movement_type: v.pipe(v.picklist(["deposit", "interest", "withdrawal"]), v.description("The kind of movement, under the bank'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.")),
68
+ amount: v.pipe(BankDecimal, v.description("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.")),
69
+ movement_type: v.pipe(v.picklist(["deposit", "interest", "withdrawal"]), v.description("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.")),
70
70
  origin: v.nullable(v.string()),
71
71
  date: v.pipe(v.string(), v.isoTimestamp()),
72
- runningBalance: v.pipe(v.nullable(BankDecimal), v.description("Same provenance as `amount`: issued by the external bank and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away.")),
72
+ runningBalance: v.pipe(v.nullable(BankDecimal), v.description("Same provenance as `amount`: issued by AndCo and republished exactly, never normalized. Real balances do go negative, so the sign is not narrowed away.")),
73
73
  paymentType: v.nullable(v.string()),
74
74
  reversed: v.boolean(),
75
75
  note: v.nullable(v.string()),
76
76
  });
77
77
  /** A page of one account's transactions, read live from the bank. */
78
- export const BankTransactionPage = /* @__PURE__ */ cursorlessConnection(BankTransaction, "A connection read live from the bank, which issues one cursor per page and walks forward only. `pageInfo.endCursor` is that cursor and is null on the last page; `pageInfo.startCursor` is always null and `pageInfo.hasPreviousPage` always false. An edge's `cursor` is null: the bank names no position inside a page, so a walk resumes from the end of a page, never from one transaction.");
79
- /** Lists the personal bank accounts the Grant reaches, with their balances. */
78
+ export const BankTransactionPage = /* @__PURE__ */ cursorlessConnection(BankTransaction, "A connection read live from AndCo, which issues one cursor per page and walks forward only. `pageInfo.endCursor` is that cursor and is null on the last page; `pageInfo.startCursor` is always null and `pageInfo.hasPreviousPage` always false. An edge's `cursor` is null: AndCo names no position inside a page, so a walk resumes from the end of a page, never from one transaction.");
79
+ /** Lists the personal digital accounts the Grant reaches, with their balances. */
80
80
  export const listAccounts = /* @__PURE__ */ oc
81
81
  .meta(http({
82
82
  method: "GET",
83
83
  path: "/accounts",
84
- summary: "List personal bank accounts and balances",
84
+ summary: "List personal digital accounts and balances",
85
85
  description: "Paginated by cursor, in publication order. `?accountKey=` switches from walking the collection to addressing one account by the identifier its holder chose: an exact match, not a search, and `after`/`first` are ignored alongside it. Returns edges and camelCase pageInfo. Cursor and offset argument families cannot be mixed.",
86
- successDescription: "Active bank accounts granted by bank_accounts:read",
86
+ successDescription: "Active digital accounts granted by bank_accounts:read",
87
87
  }))
88
88
  .errors(errors(InvalidRequest, InvalidAccountsCursor, InvalidToken, InvalidOrigin, InsufficientAuthorization, UnsupportedVersion, ServerError, BankConnectionInteractionRequired, TemporarilyUnavailable))
89
89
  .input(v.object({
@@ -97,7 +97,7 @@ export const listAccountTransactions = /* @__PURE__ */ oc
97
97
  method: "GET",
98
98
  path: "/accounts/{bank_account_id}/transactions",
99
99
  summary: "List one account's transactions",
100
- description: "Answers the transactions the account's statement presentation reads, so an integrator sees exactly what a person would see, newest first, one page at a time: feed `pageInfo.endCursor` back as `?after=` while `pageInfo.hasNextPage`. Granted by a `bank_transaction` authorization detail with `read` whose `accounts` reach this account. The account is named by its identifier or by its Account Key, whichever the integrator knows: a segment shaped like a UUID is an identifier, any other is an Account Key of the Grant's subject. The permission is the same for both and the key is resolved on this request: an account the Grant does not reach, by identifier or by key, and a key that names no account of the subject answer `404`, as if it did not exist, whether or not the account exists. The page is read from the bank on behalf of the subject, and the bank's read model walks forward only: `pageInfo.endCursor` is the bank's own cursor for the next page, handed over untouched, and `after` accepts nothing else (`invalid_cursor` otherwise). There is no cursor per transaction, no backward walk and no offset: `before`, `last`, `offset` and `limit` answer `invalid_request`. Returns edges and camelCase pageInfo.",
100
+ description: "Answers the transactions the account's statement presentation reads, so an integrator sees exactly what a person would see, newest first, one page at a time: feed `pageInfo.endCursor` back as `?after=` while `pageInfo.hasNextPage`. Granted by a `bank_transaction` authorization detail with `read` whose `accounts` reach this account. The account is named by its identifier or by its Account Key, whichever the integrator knows: a segment shaped like a UUID is an identifier, any other is an Account Key of the Grant's subject. The permission is the same for both and the key is resolved on this request: an account the Grant does not reach, by identifier or by key, and a key that names no account of the subject answer `404`, as if it did not exist, whether or not the account exists. The page is read from AndCo on behalf of the subject, and its read model walks forward only: `pageInfo.endCursor` is AndCo's own cursor for the next page, handed over untouched, and `after` accepts nothing else (`invalid_cursor` otherwise). There is no cursor per transaction, no backward walk and no offset: `before`, `last`, `offset` and `limit` answer `invalid_request`. Returns edges and camelCase pageInfo.",
101
101
  successDescription: "Authorized cursor page of account transactions, newest first",
102
102
  }))
103
103
  .errors(errors(InvalidRequest, InvalidIdentifier, InvalidCursor, InvalidToken, InvalidOrigin, InsufficientAuthorization, NotFound, UnsupportedVersion, ServerError, BankConnectionInteractionRequired, TemporarilyUnavailable))
@@ -1,7 +1,7 @@
1
1
  import { type RouterContract } from "@orpc/contract";
2
2
  import type * as v from "valibot";
3
3
  /**
4
- * An error the Andco API answers, as a class: its `error` code, its HTTP status and the schema of
4
+ * An error the AndCo API answers, as a class: its `error` code, its HTTP status and the schema of
5
5
  * its data are declared once with {@link AndcoAPIError.define}, next to the operations that answer
6
6
  * it, and the generated OpenAPI and the server's status map are read from those declarations.
7
7
  *
@@ -1,6 +1,6 @@
1
1
  import { ProcedureContract } from "@orpc/contract";
2
2
  /**
3
- * An error the Andco API answers, as a class: its `error` code, its HTTP status and the schema of
3
+ * An error the AndCo API answers, as a class: its `error` code, its HTTP status and the schema of
4
4
  * its data are declared once with {@link AndcoAPIError.define}, next to the operations that answer
5
5
  * it, and the generated OpenAPI and the server's status map are read from those declarations.
6
6
  *
@@ -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_id` of a destination of type `external`.">]>;
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_id` of a destination of type `external`.">]>;
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_id` of a destination of type `external`.">]>;
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>;
@@ -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(/^[a-z0-9][a-z0-9_-]{0,63}$/), v.description("The `bank_id` of a destination of type `external`.")),
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 `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.",
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))
@@ -415,7 +415,7 @@ declare const TemporarilyUnavailable_base: (abstract new (data: {}, message?: st
415
415
  };
416
416
  };
417
417
  /**
418
- * Andco could not serve the request and the caller did nothing wrong. Safe to retry with backoff; a
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<{}, "Andco failed while serving the request.">]>;
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
- * Andco failed while serving the request: a bug, or an answer that did not match this contract. Every
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
  */
@@ -89,7 +89,7 @@ export class PayloadTooLarge extends /* @__PURE__ */ AndcoAPIError.define("paylo
89
89
  }
90
90
  }
91
91
  /**
92
- * Andco could not serve the request and the caller did nothing wrong. Safe to retry with backoff; a
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
- * Andco failed while serving the request: a bug, or an answer that did not match this contract. Every
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("Andco failed while serving the request."))) {
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
  }