@moovio/sdk 0.12.0 → 0.12.1

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 (118) hide show
  1. package/FUNCTIONS.md +6 -22
  2. package/README.md +97 -55
  3. package/bin/mcp-server.js +749 -415
  4. package/bin/mcp-server.js.map +19 -9
  5. package/docs/sdks/accounts/README.md +63 -81
  6. package/docs/sdks/accountterminalapplications/README.md +28 -36
  7. package/docs/sdks/adjustments/README.md +14 -18
  8. package/docs/sdks/applepay/README.md +35 -45
  9. package/docs/sdks/authentication/README.md +14 -18
  10. package/docs/sdks/avatars/README.md +7 -9
  11. package/docs/sdks/bankaccounts/README.md +63 -81
  12. package/docs/sdks/branding/README.md +28 -36
  13. package/docs/sdks/capabilities/README.md +28 -36
  14. package/docs/sdks/cardissuing/README.md +35 -45
  15. package/docs/sdks/cards/README.md +35 -45
  16. package/docs/sdks/disputes/README.md +77 -99
  17. package/docs/sdks/endtoendencryption/README.md +14 -18
  18. package/docs/sdks/enrichedaddress/README.md +7 -9
  19. package/docs/sdks/enrichedprofile/README.md +7 -9
  20. package/docs/sdks/feeplans/README.md +49 -63
  21. package/docs/sdks/files/README.md +21 -27
  22. package/docs/sdks/industries/README.md +7 -9
  23. package/docs/sdks/institutions/README.md +98 -9
  24. package/docs/sdks/issuingtransactions/README.md +35 -45
  25. package/docs/sdks/onboarding/README.md +28 -36
  26. package/docs/sdks/paymentlinks/README.md +42 -54
  27. package/docs/sdks/paymentmethods/README.md +14 -18
  28. package/docs/sdks/ping/README.md +7 -9
  29. package/docs/sdks/receipts/README.md +14 -18
  30. package/docs/sdks/representatives/README.md +35 -45
  31. package/docs/sdks/scheduling/README.md +42 -54
  32. package/docs/sdks/sweeps/README.md +42 -54
  33. package/docs/sdks/terminalapplications/README.md +28 -36
  34. package/docs/sdks/transfers/README.md +77 -99
  35. package/docs/sdks/underwriting/README.md +14 -18
  36. package/docs/sdks/wallets/README.md +14 -18
  37. package/docs/sdks/wallettransactions/README.md +14 -18
  38. package/funcs/institutionsSearchInstitutions.d.ts +20 -0
  39. package/funcs/institutionsSearchInstitutions.d.ts.map +1 -0
  40. package/funcs/institutionsSearchInstitutions.js +129 -0
  41. package/funcs/institutionsSearchInstitutions.js.map +1 -0
  42. package/jsr.json +1 -1
  43. package/lib/config.d.ts +3 -3
  44. package/lib/config.js +3 -3
  45. package/mcp-server/mcp-server.js +1 -1
  46. package/mcp-server/server.d.ts.map +1 -1
  47. package/mcp-server/server.js +3 -1
  48. package/mcp-server/server.js.map +1 -1
  49. package/mcp-server/tools/institutionsSearchInstitutions.d.ts +8 -0
  50. package/mcp-server/tools/institutionsSearchInstitutions.d.ts.map +1 -0
  51. package/mcp-server/tools/institutionsSearchInstitutions.js +69 -0
  52. package/mcp-server/tools/institutionsSearchInstitutions.js.map +1 -0
  53. package/models/components/achinstitution.d.ts +40 -0
  54. package/models/components/achinstitution.d.ts.map +1 -0
  55. package/models/components/achinstitution.js +77 -0
  56. package/models/components/achinstitution.js.map +1 -0
  57. package/models/components/contact.d.ts +30 -0
  58. package/models/components/contact.d.ts.map +1 -0
  59. package/models/components/contact.js +70 -0
  60. package/models/components/contact.js.map +1 -0
  61. package/models/components/index.d.ts +7 -0
  62. package/models/components/index.d.ts.map +1 -1
  63. package/models/components/index.js +7 -0
  64. package/models/components/index.js.map +1 -1
  65. package/models/components/institutionssearchresponse.d.ts +36 -0
  66. package/models/components/institutionssearchresponse.d.ts.map +1 -0
  67. package/models/components/institutionssearchresponse.js +76 -0
  68. package/models/components/institutionssearchresponse.js.map +1 -0
  69. package/models/components/rtpinstitution.d.ts +37 -0
  70. package/models/components/rtpinstitution.d.ts.map +1 -0
  71. package/models/components/rtpinstitution.js +74 -0
  72. package/models/components/rtpinstitution.js.map +1 -0
  73. package/models/components/rtpservices.d.ts +37 -0
  74. package/models/components/rtpservices.d.ts.map +1 -0
  75. package/models/components/rtpservices.js +71 -0
  76. package/models/components/rtpservices.js.map +1 -0
  77. package/models/components/wireinstitution.d.ts +40 -0
  78. package/models/components/wireinstitution.d.ts.map +1 -0
  79. package/models/components/wireinstitution.js +77 -0
  80. package/models/components/wireinstitution.js.map +1 -0
  81. package/models/components/wireservices.d.ts +42 -0
  82. package/models/components/wireservices.d.ts.map +1 -0
  83. package/models/components/wireservices.js +73 -0
  84. package/models/components/wireservices.js.map +1 -0
  85. package/models/errors/apierror.d.ts +14 -2
  86. package/models/errors/apierror.d.ts.map +1 -1
  87. package/models/errors/apierror.js +1 -1
  88. package/models/errors/apierror.js.map +1 -1
  89. package/models/operations/index.d.ts +1 -0
  90. package/models/operations/index.d.ts.map +1 -1
  91. package/models/operations/index.js +1 -0
  92. package/models/operations/index.js.map +1 -1
  93. package/models/operations/searchinstitutions.d.ts +112 -0
  94. package/models/operations/searchinstitutions.d.ts.map +1 -0
  95. package/models/operations/searchinstitutions.js +149 -0
  96. package/models/operations/searchinstitutions.js.map +1 -0
  97. package/package.json +1 -1
  98. package/sdk/institutions.d.ts +11 -0
  99. package/sdk/institutions.d.ts.map +1 -1
  100. package/sdk/institutions.js +14 -0
  101. package/sdk/institutions.js.map +1 -1
  102. package/src/funcs/institutionsSearchInstitutions.ts +179 -0
  103. package/src/lib/config.ts +3 -3
  104. package/src/mcp-server/mcp-server.ts +1 -1
  105. package/src/mcp-server/server.ts +3 -1
  106. package/src/mcp-server/tools/institutionsSearchInstitutions.ts +43 -0
  107. package/src/models/components/achinstitution.ts +89 -0
  108. package/src/models/components/contact.ts +65 -0
  109. package/src/models/components/index.ts +7 -0
  110. package/src/models/components/institutionssearchresponse.ts +92 -0
  111. package/src/models/components/rtpinstitution.ts +79 -0
  112. package/src/models/components/rtpservices.ts +72 -0
  113. package/src/models/components/wireinstitution.ts +91 -0
  114. package/src/models/components/wireservices.ts +79 -0
  115. package/src/models/errors/apierror.ts +18 -3
  116. package/src/models/operations/index.ts +1 -0
  117. package/src/models/operations/searchinstitutions.ts +236 -0
  118. package/src/sdk/institutions.ts +22 -0
@@ -5,9 +5,23 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Institutions = void 0;
7
7
  const institutionsSearch_js_1 = require("../funcs/institutionsSearch.js");
8
+ const institutionsSearchInstitutions_js_1 = require("../funcs/institutionsSearchInstitutions.js");
8
9
  const sdks_js_1 = require("../lib/sdks.js");
9
10
  const fp_js_1 = require("../types/fp.js");
10
11
  class Institutions extends sdks_js_1.ClientSDK {
12
+ /**
13
+ * Search for financial institutions by name or routing number.
14
+ *
15
+ * This endpoint returns metadata about each matched institution, including basic identifying details (such as name, routing number, and address) and information about which payment services they support (e.g., ACH, RTP, and Wire).
16
+ *
17
+ * This can be used to validate a financial institution before initiating payment activity, or to check which payment rails are available for a given routing number.
18
+ *
19
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
20
+ * you'll need to specify the `/institutions.read` scope.
21
+ */
22
+ async searchInstitutions(request, options) {
23
+ return (0, fp_js_1.unwrapAsync)((0, institutionsSearchInstitutions_js_1.institutionsSearchInstitutions)(this, request, options));
24
+ }
11
25
  /**
12
26
  * Search for institutions by either their name or routing number.
13
27
  *
@@ -1 +1 @@
1
- {"version":3,"file":"institutions.js","sourceRoot":"","sources":["../src/sdk/institutions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0EAAoE;AACpE,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,YAAa,SAAQ,mBAAS;IACzC;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAjBD,oCAiBC"}
1
+ {"version":3,"file":"institutions.js","sourceRoot":"","sources":["../src/sdk/institutions.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,0EAAoE;AACpE,kGAA4F;AAC5F,4CAA2D;AAE3D,0CAA6C;AAE7C,MAAa,YAAa,SAAQ,mBAAS;IACzC;;;;;;;;;OASG;IACH,KAAK,CAAC,kBAAkB,CACtB,OAA6C,EAC7C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,kEAA8B,EAC/C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,OAA2C,EAC3C,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,0CAAkB,EACnC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAtCD,oCAsCC"}
@@ -0,0 +1,179 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { MoovCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import { APIError } from "../models/errors/apierror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { APICall, APIPromise } from "../types/async.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Search for financial institutions by name or routing number.
28
+ *
29
+ * This endpoint returns metadata about each matched institution, including basic identifying details (such as name, routing number, and address) and information about which payment services they support (e.g., ACH, RTP, and Wire).
30
+ *
31
+ * This can be used to validate a financial institution before initiating payment activity, or to check which payment rails are available for a given routing number.
32
+ *
33
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
34
+ * you'll need to specify the `/institutions.read` scope.
35
+ */
36
+ export function institutionsSearchInstitutions(
37
+ client: MoovCore,
38
+ request: operations.SearchInstitutionsRequest,
39
+ options?: RequestOptions,
40
+ ): APIPromise<
41
+ Result<
42
+ operations.SearchInstitutionsResponse,
43
+ | APIError
44
+ | SDKValidationError
45
+ | UnexpectedClientError
46
+ | InvalidRequestError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | ConnectionError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: MoovCore,
61
+ request: operations.SearchInstitutionsRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ operations.SearchInstitutionsResponse,
67
+ | APIError
68
+ | SDKValidationError
69
+ | UnexpectedClientError
70
+ | InvalidRequestError
71
+ | RequestAbortedError
72
+ | RequestTimeoutError
73
+ | ConnectionError
74
+ >,
75
+ APICall,
76
+ ]
77
+ > {
78
+ const parsed = safeParse(
79
+ request,
80
+ (value) => operations.SearchInstitutionsRequest$outboundSchema.parse(value),
81
+ "Input validation failed",
82
+ );
83
+ if (!parsed.ok) {
84
+ return [parsed, { status: "invalid" }];
85
+ }
86
+ const payload = parsed.value;
87
+ const body = null;
88
+
89
+ const path = pathToFunc("/institutions")();
90
+
91
+ const query = encodeFormQuery({
92
+ "limit": payload.limit,
93
+ "name": payload.name,
94
+ "routingNumber": payload.routingNumber,
95
+ }, { explode: false });
96
+
97
+ const headers = new Headers(compactMap({
98
+ Accept: "application/json",
99
+ "x-moov-version": encodeSimple(
100
+ "x-moov-version",
101
+ client._options.xMoovVersion,
102
+ { explode: false, charEncoding: "none" },
103
+ ),
104
+ }));
105
+
106
+ const securityInput = await extractSecurity(client._options.security);
107
+ const requestSecurity = resolveGlobalSecurity(securityInput);
108
+
109
+ const context = {
110
+ options: client._options,
111
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
112
+ operationID: "searchInstitutions",
113
+ oAuth2Scopes: [],
114
+
115
+ resolvedSecurity: requestSecurity,
116
+
117
+ securitySource: client._options.security,
118
+ retryConfig: options?.retries
119
+ || client._options.retryConfig
120
+ || { strategy: "none" },
121
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
122
+ };
123
+
124
+ const requestRes = client._createRequest(context, {
125
+ security: requestSecurity,
126
+ method: "GET",
127
+ baseURL: options?.serverURL,
128
+ path: path,
129
+ headers: headers,
130
+ query: query,
131
+ body: body,
132
+ userAgent: client._options.userAgent,
133
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
134
+ }, options);
135
+ if (!requestRes.ok) {
136
+ return [requestRes, { status: "invalid" }];
137
+ }
138
+ const req = requestRes.value;
139
+
140
+ const doResult = await client._do(req, {
141
+ context,
142
+ errorCodes: ["401", "403", "404", "429", "4XX", "500", "504", "5XX"],
143
+ retryConfig: context.retryConfig,
144
+ retryCodes: context.retryCodes,
145
+ });
146
+ if (!doResult.ok) {
147
+ return [doResult, { status: "request-error", request: req }];
148
+ }
149
+ const response = doResult.value;
150
+
151
+ const responseFields = {
152
+ HttpMeta: { Response: response, Request: req },
153
+ };
154
+
155
+ const [result] = await M.match<
156
+ operations.SearchInstitutionsResponse,
157
+ | APIError
158
+ | SDKValidationError
159
+ | UnexpectedClientError
160
+ | InvalidRequestError
161
+ | RequestAbortedError
162
+ | RequestTimeoutError
163
+ | ConnectionError
164
+ >(
165
+ M.json(200, operations.SearchInstitutionsResponse$inboundSchema, {
166
+ hdrs: true,
167
+ key: "Result",
168
+ }),
169
+ M.fail([401, 403, 404, 429]),
170
+ M.fail([500, 504]),
171
+ M.fail("4XX"),
172
+ M.fail("5XX"),
173
+ )(response, { extraFields: responseFields });
174
+ if (!result.ok) {
175
+ return [result, { status: "complete", request: req, response }];
176
+ }
177
+
178
+ return [result, { status: "complete", request: req, response }];
179
+ }
package/src/lib/config.ts CHANGED
@@ -73,7 +73,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
75
  openapiDocVersion: "latest",
76
- sdkVersion: "0.12.0",
77
- genVersion: "2.618.0",
78
- userAgent: "speakeasy-sdk/typescript 0.12.0 2.618.0 latest @moovio/sdk",
76
+ sdkVersion: "0.12.1",
77
+ genVersion: "2.621.3",
78
+ userAgent: "speakeasy-sdk/typescript 0.12.1 2.621.3 latest @moovio/sdk",
79
79
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.12.0",
22
+ currentVersion: "0.12.1",
23
23
  },
24
24
  });
25
25
 
@@ -90,6 +90,7 @@ import { tool$filesList } from "./tools/filesList.js";
90
90
  import { tool$filesUpload } from "./tools/filesUpload.js";
91
91
  import { tool$industriesList } from "./tools/industriesList.js";
92
92
  import { tool$institutionsSearch } from "./tools/institutionsSearch.js";
93
+ import { tool$institutionsSearchInstitutions } from "./tools/institutionsSearchInstitutions.js";
93
94
  import { tool$issuingTransactionsGet } from "./tools/issuingTransactionsGet.js";
94
95
  import { tool$issuingTransactionsGetAuthorization } from "./tools/issuingTransactionsGetAuthorization.js";
95
96
  import { tool$issuingTransactionsList } from "./tools/issuingTransactionsList.js";
@@ -160,7 +161,7 @@ export function createMCPServer(deps: {
160
161
  }) {
161
162
  const server = new McpServer({
162
163
  name: "Moov",
163
- version: "0.12.0",
164
+ version: "0.12.1",
164
165
  });
165
166
 
166
167
  const client = new MoovCore({
@@ -302,6 +303,7 @@ export function createMCPServer(deps: {
302
303
  tool(tool$enrichedAddressGet);
303
304
  tool(tool$enrichedProfileGet);
304
305
  tool(tool$industriesList);
306
+ tool(tool$institutionsSearchInstitutions);
305
307
  tool(tool$institutionsSearch);
306
308
  tool(tool$issuingTransactionsListAuthorizations);
307
309
  tool(tool$issuingTransactionsGetAuthorization);
@@ -0,0 +1,43 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { institutionsSearchInstitutions } from "../../funcs/institutionsSearchInstitutions.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.SearchInstitutionsRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$institutionsSearchInstitutions: ToolDefinition<typeof args> =
14
+ {
15
+ name: "institutions-search-institutions",
16
+ description: `Search for financial institutions by name or routing number.
17
+
18
+ This endpoint returns metadata about each matched institution, including basic identifying details (such as name, routing number, and address) and information about which payment services they support (e.g., ACH, RTP, and Wire).
19
+
20
+ This can be used to validate a financial institution before initiating payment activity, or to check which payment rails are available for a given routing number.
21
+
22
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
23
+ you'll need to specify the \`/institutions.read\` scope.`,
24
+ args,
25
+ tool: async (client, args, ctx) => {
26
+ const [result, apiCall] = await institutionsSearchInstitutions(
27
+ client,
28
+ args.request,
29
+ { fetchOptions: { signal: ctx.signal } },
30
+ ).$inspect();
31
+
32
+ if (!result.ok) {
33
+ return {
34
+ content: [{ type: "text", text: result.error.message }],
35
+ isError: true,
36
+ };
37
+ }
38
+
39
+ const value = result.value.result;
40
+
41
+ return formatResult(value, apiCall);
42
+ },
43
+ };
@@ -0,0 +1,89 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ Address,
11
+ Address$inboundSchema,
12
+ Address$Outbound,
13
+ Address$outboundSchema,
14
+ } from "./address.js";
15
+ import {
16
+ Contact,
17
+ Contact$inboundSchema,
18
+ Contact$Outbound,
19
+ Contact$outboundSchema,
20
+ } from "./contact.js";
21
+
22
+ export type ACHInstitution = {
23
+ /**
24
+ * Name of the financial institution.
25
+ */
26
+ name: string;
27
+ routingNumber: string;
28
+ address?: Address | undefined;
29
+ contact?: Contact | undefined;
30
+ };
31
+
32
+ /** @internal */
33
+ export const ACHInstitution$inboundSchema: z.ZodType<
34
+ ACHInstitution,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ name: z.string(),
39
+ routingNumber: z.string(),
40
+ address: Address$inboundSchema.optional(),
41
+ contact: Contact$inboundSchema.optional(),
42
+ });
43
+
44
+ /** @internal */
45
+ export type ACHInstitution$Outbound = {
46
+ name: string;
47
+ routingNumber: string;
48
+ address?: Address$Outbound | undefined;
49
+ contact?: Contact$Outbound | undefined;
50
+ };
51
+
52
+ /** @internal */
53
+ export const ACHInstitution$outboundSchema: z.ZodType<
54
+ ACHInstitution$Outbound,
55
+ z.ZodTypeDef,
56
+ ACHInstitution
57
+ > = z.object({
58
+ name: z.string(),
59
+ routingNumber: z.string(),
60
+ address: Address$outboundSchema.optional(),
61
+ contact: Contact$outboundSchema.optional(),
62
+ });
63
+
64
+ /**
65
+ * @internal
66
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
67
+ */
68
+ export namespace ACHInstitution$ {
69
+ /** @deprecated use `ACHInstitution$inboundSchema` instead. */
70
+ export const inboundSchema = ACHInstitution$inboundSchema;
71
+ /** @deprecated use `ACHInstitution$outboundSchema` instead. */
72
+ export const outboundSchema = ACHInstitution$outboundSchema;
73
+ /** @deprecated use `ACHInstitution$Outbound` instead. */
74
+ export type Outbound = ACHInstitution$Outbound;
75
+ }
76
+
77
+ export function achInstitutionToJSON(achInstitution: ACHInstitution): string {
78
+ return JSON.stringify(ACHInstitution$outboundSchema.parse(achInstitution));
79
+ }
80
+
81
+ export function achInstitutionFromJSON(
82
+ jsonString: string,
83
+ ): SafeParseResult<ACHInstitution, SDKValidationError> {
84
+ return safeParse(
85
+ jsonString,
86
+ (x) => ACHInstitution$inboundSchema.parse(JSON.parse(x)),
87
+ `Failed to parse 'ACHInstitution' from JSON`,
88
+ );
89
+ }
@@ -0,0 +1,65 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ PhoneNumber,
11
+ PhoneNumber$inboundSchema,
12
+ PhoneNumber$Outbound,
13
+ PhoneNumber$outboundSchema,
14
+ } from "./phonenumber.js";
15
+
16
+ export type Contact = {
17
+ phone?: PhoneNumber | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export const Contact$inboundSchema: z.ZodType<Contact, z.ZodTypeDef, unknown> =
22
+ z.object({
23
+ phone: PhoneNumber$inboundSchema.optional(),
24
+ });
25
+
26
+ /** @internal */
27
+ export type Contact$Outbound = {
28
+ phone?: PhoneNumber$Outbound | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export const Contact$outboundSchema: z.ZodType<
33
+ Contact$Outbound,
34
+ z.ZodTypeDef,
35
+ Contact
36
+ > = z.object({
37
+ phone: PhoneNumber$outboundSchema.optional(),
38
+ });
39
+
40
+ /**
41
+ * @internal
42
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
43
+ */
44
+ export namespace Contact$ {
45
+ /** @deprecated use `Contact$inboundSchema` instead. */
46
+ export const inboundSchema = Contact$inboundSchema;
47
+ /** @deprecated use `Contact$outboundSchema` instead. */
48
+ export const outboundSchema = Contact$outboundSchema;
49
+ /** @deprecated use `Contact$Outbound` instead. */
50
+ export type Outbound = Contact$Outbound;
51
+ }
52
+
53
+ export function contactToJSON(contact: Contact): string {
54
+ return JSON.stringify(Contact$outboundSchema.parse(contact));
55
+ }
56
+
57
+ export function contactFromJSON(
58
+ jsonString: string,
59
+ ): SafeParseResult<Contact, SDKValidationError> {
60
+ return safeParse(
61
+ jsonString,
62
+ (x) => Contact$inboundSchema.parse(JSON.parse(x)),
63
+ `Failed to parse 'Contact' from JSON`,
64
+ );
65
+ }
@@ -13,6 +13,7 @@ export * from "./achcreditstandardpaymentmethod.js";
13
13
  export * from "./achdebitcollectpaymentmethod.js";
14
14
  export * from "./achdebitfundpaymentmethod.js";
15
15
  export * from "./achexception.js";
16
+ export * from "./achinstitution.js";
16
17
  export * from "./achlocation.js";
17
18
  export * from "./achparticipant.js";
18
19
  export * from "./achpaymentdetails.js";
@@ -104,6 +105,7 @@ export * from "./colorsvalidationerror.js";
104
105
  export * from "./completebankaccountverification.js";
105
106
  export * from "./completedmicrodeposits.js";
106
107
  export * from "./completemicrodeposits.js";
108
+ export * from "./contact.js";
107
109
  export * from "./countrieserrors.js";
108
110
  export * from "./createaccount.js";
109
111
  export * from "./createaccounterror.js";
@@ -196,6 +198,7 @@ export * from "./individualnameupdate.js";
196
198
  export * from "./individualprofile.js";
197
199
  export * from "./industrycodes.js";
198
200
  export * from "./industrytaxonomy.js";
201
+ export * from "./institutionssearchresponse.js";
199
202
  export * from "./issuedcard.js";
200
203
  export * from "./issuedcardauthorization.js";
201
204
  export * from "./issuedcardauthorizationevent.js";
@@ -301,7 +304,9 @@ export * from "./reversedwithrefund.js";
301
304
  export * from "./revoketokenrequest.js";
302
305
  export * from "./rtpcreditpaymentmethod.js";
303
306
  export * from "./rtpfailurecode.js";
307
+ export * from "./rtpinstitution.js";
304
308
  export * from "./rtprejectioncode.js";
309
+ export * from "./rtpservices.js";
305
310
  export * from "./rtptransactiondetails.js";
306
311
  export * from "./rtptransactionstatus.js";
307
312
  export * from "./runtransfer.js";
@@ -401,3 +406,5 @@ export * from "./webhookevent.js";
401
406
  export * from "./webhookeventtype.js";
402
407
  export * from "./webhooktransferpaymentmethoddetails.js";
403
408
  export * from "./webhookwalletavailablebalance.js";
409
+ export * from "./wireinstitution.js";
410
+ export * from "./wireservices.js";
@@ -0,0 +1,92 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ ACHInstitution,
11
+ ACHInstitution$inboundSchema,
12
+ ACHInstitution$Outbound,
13
+ ACHInstitution$outboundSchema,
14
+ } from "./achinstitution.js";
15
+ import {
16
+ RTPInstitution,
17
+ RTPInstitution$inboundSchema,
18
+ RTPInstitution$Outbound,
19
+ RTPInstitution$outboundSchema,
20
+ } from "./rtpinstitution.js";
21
+ import {
22
+ WireInstitution,
23
+ WireInstitution$inboundSchema,
24
+ WireInstitution$Outbound,
25
+ WireInstitution$outboundSchema,
26
+ } from "./wireinstitution.js";
27
+
28
+ export type InstitutionsSearchResponse = {
29
+ ach: Array<ACHInstitution>;
30
+ rtp: Array<RTPInstitution>;
31
+ wire: Array<WireInstitution>;
32
+ };
33
+
34
+ /** @internal */
35
+ export const InstitutionsSearchResponse$inboundSchema: z.ZodType<
36
+ InstitutionsSearchResponse,
37
+ z.ZodTypeDef,
38
+ unknown
39
+ > = z.object({
40
+ ach: z.array(ACHInstitution$inboundSchema),
41
+ rtp: z.array(RTPInstitution$inboundSchema),
42
+ wire: z.array(WireInstitution$inboundSchema),
43
+ });
44
+
45
+ /** @internal */
46
+ export type InstitutionsSearchResponse$Outbound = {
47
+ ach: Array<ACHInstitution$Outbound>;
48
+ rtp: Array<RTPInstitution$Outbound>;
49
+ wire: Array<WireInstitution$Outbound>;
50
+ };
51
+
52
+ /** @internal */
53
+ export const InstitutionsSearchResponse$outboundSchema: z.ZodType<
54
+ InstitutionsSearchResponse$Outbound,
55
+ z.ZodTypeDef,
56
+ InstitutionsSearchResponse
57
+ > = z.object({
58
+ ach: z.array(ACHInstitution$outboundSchema),
59
+ rtp: z.array(RTPInstitution$outboundSchema),
60
+ wire: z.array(WireInstitution$outboundSchema),
61
+ });
62
+
63
+ /**
64
+ * @internal
65
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
+ */
67
+ export namespace InstitutionsSearchResponse$ {
68
+ /** @deprecated use `InstitutionsSearchResponse$inboundSchema` instead. */
69
+ export const inboundSchema = InstitutionsSearchResponse$inboundSchema;
70
+ /** @deprecated use `InstitutionsSearchResponse$outboundSchema` instead. */
71
+ export const outboundSchema = InstitutionsSearchResponse$outboundSchema;
72
+ /** @deprecated use `InstitutionsSearchResponse$Outbound` instead. */
73
+ export type Outbound = InstitutionsSearchResponse$Outbound;
74
+ }
75
+
76
+ export function institutionsSearchResponseToJSON(
77
+ institutionsSearchResponse: InstitutionsSearchResponse,
78
+ ): string {
79
+ return JSON.stringify(
80
+ InstitutionsSearchResponse$outboundSchema.parse(institutionsSearchResponse),
81
+ );
82
+ }
83
+
84
+ export function institutionsSearchResponseFromJSON(
85
+ jsonString: string,
86
+ ): SafeParseResult<InstitutionsSearchResponse, SDKValidationError> {
87
+ return safeParse(
88
+ jsonString,
89
+ (x) => InstitutionsSearchResponse$inboundSchema.parse(JSON.parse(x)),
90
+ `Failed to parse 'InstitutionsSearchResponse' from JSON`,
91
+ );
92
+ }
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ RTPServices,
11
+ RTPServices$inboundSchema,
12
+ RTPServices$Outbound,
13
+ RTPServices$outboundSchema,
14
+ } from "./rtpservices.js";
15
+
16
+ export type RTPInstitution = {
17
+ /**
18
+ * Name of the financial institution.
19
+ */
20
+ name: string;
21
+ routingNumber: string;
22
+ services: RTPServices;
23
+ };
24
+
25
+ /** @internal */
26
+ export const RTPInstitution$inboundSchema: z.ZodType<
27
+ RTPInstitution,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ name: z.string(),
32
+ routingNumber: z.string(),
33
+ services: RTPServices$inboundSchema,
34
+ });
35
+
36
+ /** @internal */
37
+ export type RTPInstitution$Outbound = {
38
+ name: string;
39
+ routingNumber: string;
40
+ services: RTPServices$Outbound;
41
+ };
42
+
43
+ /** @internal */
44
+ export const RTPInstitution$outboundSchema: z.ZodType<
45
+ RTPInstitution$Outbound,
46
+ z.ZodTypeDef,
47
+ RTPInstitution
48
+ > = z.object({
49
+ name: z.string(),
50
+ routingNumber: z.string(),
51
+ services: RTPServices$outboundSchema,
52
+ });
53
+
54
+ /**
55
+ * @internal
56
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
57
+ */
58
+ export namespace RTPInstitution$ {
59
+ /** @deprecated use `RTPInstitution$inboundSchema` instead. */
60
+ export const inboundSchema = RTPInstitution$inboundSchema;
61
+ /** @deprecated use `RTPInstitution$outboundSchema` instead. */
62
+ export const outboundSchema = RTPInstitution$outboundSchema;
63
+ /** @deprecated use `RTPInstitution$Outbound` instead. */
64
+ export type Outbound = RTPInstitution$Outbound;
65
+ }
66
+
67
+ export function rtpInstitutionToJSON(rtpInstitution: RTPInstitution): string {
68
+ return JSON.stringify(RTPInstitution$outboundSchema.parse(rtpInstitution));
69
+ }
70
+
71
+ export function rtpInstitutionFromJSON(
72
+ jsonString: string,
73
+ ): SafeParseResult<RTPInstitution, SDKValidationError> {
74
+ return safeParse(
75
+ jsonString,
76
+ (x) => RTPInstitution$inboundSchema.parse(JSON.parse(x)),
77
+ `Failed to parse 'RTPInstitution' from JSON`,
78
+ );
79
+ }