@andco/protocol 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) 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.js +2 -2
  5. package/dist/authorization.d.ts +1 -1
  6. package/dist/authorization.js +1 -1
  7. package/dist/consent.d.ts +2 -2
  8. package/dist/consent.js +2 -2
  9. package/dist/errors.d.ts +9 -9
  10. package/dist/errors.js +9 -9
  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 +431 -872
  15. package/dist/intent-input.d.ts.map +1 -1
  16. package/dist/intent-input.js +142 -121
  17. package/dist/miniapp-manifest.d.ts +1 -1
  18. package/dist/native-intent.d.ts +82 -68
  19. package/dist/native-intent.d.ts.map +1 -1
  20. package/dist/native-intent.js +134 -84
  21. package/dist/native.d.ts +1 -1
  22. package/dist/rar/account-matchers.d.ts +35 -30
  23. package/dist/rar/account-matchers.d.ts.map +1 -1
  24. package/dist/rar/account-matchers.js +27 -21
  25. package/dist/rar/bank.d.ts +81 -81
  26. package/dist/rar/bank.js +1 -1
  27. package/dist/rar/catalog.d.ts +48 -48
  28. package/dist/rar/catalog.js +6 -6
  29. package/dist/rar/detail.d.ts +1 -1
  30. package/dist/rar/detail.js +1 -1
  31. package/dist/rar/json-schemas.generated.d.ts +1 -1
  32. package/dist/rar/json-schemas.generated.d.ts.map +1 -1
  33. package/dist/rar/json-schemas.generated.js +25 -21
  34. package/dist/rar/subject-data.d.ts +1 -1
  35. package/dist/rar/subject-data.js +1 -1
  36. package/dist/rar/subject.d.ts +1 -1
  37. package/dist/rar/subject.js +1 -1
  38. package/dist/rest/accounts.d.ts +28 -28
  39. package/dist/rest/accounts.d.ts.map +1 -1
  40. package/dist/rest/accounts.js +22 -22
  41. package/dist/rest/api-error.d.ts +1 -1
  42. package/dist/rest/api-error.js +1 -1
  43. package/dist/rest/catalog.d.ts +3 -3
  44. package/dist/rest/catalog.js +2 -2
  45. package/dist/rest/common.d.ts +3 -3
  46. package/dist/rest/common.js +3 -3
  47. package/dist/rest/contract.d.ts +905 -528
  48. package/dist/rest/contract.d.ts.map +1 -1
  49. package/dist/rest/contract.js +17 -5
  50. package/dist/rest/events.d.ts +1 -1
  51. package/dist/rest/events.d.ts.map +1 -1
  52. package/dist/rest/events.js +2 -2
  53. package/dist/rest/identity.d.ts +22 -22
  54. package/dist/rest/identity.js +5 -5
  55. package/dist/rest/index.d.ts +1 -0
  56. package/dist/rest/index.d.ts.map +1 -1
  57. package/dist/rest/index.js +1 -0
  58. package/dist/rest/intents.d.ts +787 -716
  59. package/dist/rest/intents.d.ts.map +1 -1
  60. package/dist/rest/intents.js +62 -53
  61. package/dist/rest/signatures.d.ts +11 -5
  62. package/dist/rest/signatures.d.ts.map +1 -1
  63. package/dist/rest/signatures.js +10 -0
  64. package/dist/rest/transfers.d.ts +612 -0
  65. package/dist/rest/transfers.d.ts.map +1 -0
  66. package/dist/rest/transfers.js +115 -0
  67. package/dist/scopes.d.ts +1 -1
  68. package/dist/signing.d.ts +12 -2
  69. package/dist/signing.d.ts.map +1 -1
  70. package/dist/signing.js +6 -0
  71. package/dist/transfer.d.ts +363 -0
  72. package/dist/transfer.d.ts.map +1 -0
  73. package/dist/transfer.js +287 -0
  74. package/dist/transport/financial-events.d.ts +21 -17
  75. package/dist/transport/financial-events.d.ts.map +1 -1
  76. package/dist/transport/generated/oauth-api.d.ts +1017 -194
  77. package/dist/transport/generated/oauth-api.d.ts.map +1 -1
  78. package/dist/transport/intents.d.ts +28 -12
  79. package/dist/transport/intents.d.ts.map +1 -1
  80. package/dist/transport/intents.js +1 -1
  81. package/dist/transport/rest.d.ts +4 -4
  82. package/dist/urls.d.ts +2 -2
  83. package/dist/urls.js +3 -3
  84. package/dist/userinfo.d.ts +2 -2
  85. package/dist/userinfo.js +2 -2
  86. package/dist/webhooks.d.ts +16 -16
  87. package/dist/webhooks.js +14 -14
  88. package/dist/window-features.d.ts +2 -2
  89. package/dist/window-features.js +2 -2
  90. package/package.json +2 -2
@@ -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 in Core's catalog: the `bank_code` of a Receptor.")),
10
10
  name: v.pipe(v.string(), v.description("The bank's name as the bank lists it.")),
11
11
  });
12
12
  /** The whole list of banks as one page. */
@@ -36,7 +36,7 @@ export const getBankCatalog = /* @__PURE__ */ oc
36
36
  method: "GET",
37
37
  path: "/catalog/banks",
38
38
  summary: "List the banks a transfer can be sent to",
39
- description: "The `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 of Core's catalog, each with its four-digit code and its name: the `bank_code` values a Receptor (a `bank_transfer` destination of type `external`) names, so an integrator never guesses one. `@andco/protocol` also exports the known codes as `CHILEAN_BANK_CODES`, which no validation reads; a code Core does not know fails with `unsupported_bank` when the transfer is executed. Granted by a `bank_transfer` authorization detail with `create`. The bank's catalog is read on behalf of the subject, through the web session of one of the accounts that detail reaches, so a subject without any answers `409 interaction_required` like any other read of the bank. It is one bounded list, answered whole as a single page: `pageInfo.hasNextPage` is false, no edge carries a cursor and the pagination parameters do not apply. Returns edges and camelCase pageInfo.",
40
40
  successDescription: "The banks a transfer can be sent to, ordered as the bank lists them",
41
41
  }))
42
42
  .errors(errors(InvalidToken, InvalidOrigin, InsufficientAuthorization, UnsupportedVersion, ServerError, BankConnectionInteractionRequired, TemporarilyUnavailable))
@@ -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
  }