@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
@@ -0,0 +1,72 @@
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
+
10
+ export type RTPServices = {
11
+ /**
12
+ * Can the institution receive payments
13
+ */
14
+ receivePayments: boolean;
15
+ /**
16
+ * Can the institution receive request for payment messages
17
+ */
18
+ receiveRequestForPayment: boolean;
19
+ };
20
+
21
+ /** @internal */
22
+ export const RTPServices$inboundSchema: z.ZodType<
23
+ RTPServices,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ receivePayments: z.boolean(),
28
+ receiveRequestForPayment: z.boolean(),
29
+ });
30
+
31
+ /** @internal */
32
+ export type RTPServices$Outbound = {
33
+ receivePayments: boolean;
34
+ receiveRequestForPayment: boolean;
35
+ };
36
+
37
+ /** @internal */
38
+ export const RTPServices$outboundSchema: z.ZodType<
39
+ RTPServices$Outbound,
40
+ z.ZodTypeDef,
41
+ RTPServices
42
+ > = z.object({
43
+ receivePayments: z.boolean(),
44
+ receiveRequestForPayment: z.boolean(),
45
+ });
46
+
47
+ /**
48
+ * @internal
49
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
50
+ */
51
+ export namespace RTPServices$ {
52
+ /** @deprecated use `RTPServices$inboundSchema` instead. */
53
+ export const inboundSchema = RTPServices$inboundSchema;
54
+ /** @deprecated use `RTPServices$outboundSchema` instead. */
55
+ export const outboundSchema = RTPServices$outboundSchema;
56
+ /** @deprecated use `RTPServices$Outbound` instead. */
57
+ export type Outbound = RTPServices$Outbound;
58
+ }
59
+
60
+ export function rtpServicesToJSON(rtpServices: RTPServices): string {
61
+ return JSON.stringify(RTPServices$outboundSchema.parse(rtpServices));
62
+ }
63
+
64
+ export function rtpServicesFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<RTPServices, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => RTPServices$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'RTPServices' from JSON`,
71
+ );
72
+ }
@@ -0,0 +1,91 @@
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
+ WireServices,
17
+ WireServices$inboundSchema,
18
+ WireServices$Outbound,
19
+ WireServices$outboundSchema,
20
+ } from "./wireservices.js";
21
+
22
+ export type WireInstitution = {
23
+ /**
24
+ * Name of the financial institution.
25
+ */
26
+ name: string;
27
+ routingNumber: string;
28
+ address?: Address | undefined;
29
+ services: WireServices;
30
+ };
31
+
32
+ /** @internal */
33
+ export const WireInstitution$inboundSchema: z.ZodType<
34
+ WireInstitution,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ name: z.string(),
39
+ routingNumber: z.string(),
40
+ address: Address$inboundSchema.optional(),
41
+ services: WireServices$inboundSchema,
42
+ });
43
+
44
+ /** @internal */
45
+ export type WireInstitution$Outbound = {
46
+ name: string;
47
+ routingNumber: string;
48
+ address?: Address$Outbound | undefined;
49
+ services: WireServices$Outbound;
50
+ };
51
+
52
+ /** @internal */
53
+ export const WireInstitution$outboundSchema: z.ZodType<
54
+ WireInstitution$Outbound,
55
+ z.ZodTypeDef,
56
+ WireInstitution
57
+ > = z.object({
58
+ name: z.string(),
59
+ routingNumber: z.string(),
60
+ address: Address$outboundSchema.optional(),
61
+ services: WireServices$outboundSchema,
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 WireInstitution$ {
69
+ /** @deprecated use `WireInstitution$inboundSchema` instead. */
70
+ export const inboundSchema = WireInstitution$inboundSchema;
71
+ /** @deprecated use `WireInstitution$outboundSchema` instead. */
72
+ export const outboundSchema = WireInstitution$outboundSchema;
73
+ /** @deprecated use `WireInstitution$Outbound` instead. */
74
+ export type Outbound = WireInstitution$Outbound;
75
+ }
76
+
77
+ export function wireInstitutionToJSON(
78
+ wireInstitution: WireInstitution,
79
+ ): string {
80
+ return JSON.stringify(WireInstitution$outboundSchema.parse(wireInstitution));
81
+ }
82
+
83
+ export function wireInstitutionFromJSON(
84
+ jsonString: string,
85
+ ): SafeParseResult<WireInstitution, SDKValidationError> {
86
+ return safeParse(
87
+ jsonString,
88
+ (x) => WireInstitution$inboundSchema.parse(JSON.parse(x)),
89
+ `Failed to parse 'WireInstitution' from JSON`,
90
+ );
91
+ }
@@ -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
+
10
+ export type WireServices = {
11
+ /**
12
+ * The institution's capability to process standard Fedwire funds transfers.
13
+ */
14
+ fundsTransferStatus: boolean;
15
+ /**
16
+ * The institution's capability for settlement-only transfers.
17
+ */
18
+ fundsSettlementOnlyStatus: boolean;
19
+ /**
20
+ * The institution's capability to handle transfers of securities.
21
+ */
22
+ bookEntrySecuritiesTransferStatus: boolean;
23
+ };
24
+
25
+ /** @internal */
26
+ export const WireServices$inboundSchema: z.ZodType<
27
+ WireServices,
28
+ z.ZodTypeDef,
29
+ unknown
30
+ > = z.object({
31
+ fundsTransferStatus: z.boolean(),
32
+ fundsSettlementOnlyStatus: z.boolean(),
33
+ bookEntrySecuritiesTransferStatus: z.boolean(),
34
+ });
35
+
36
+ /** @internal */
37
+ export type WireServices$Outbound = {
38
+ fundsTransferStatus: boolean;
39
+ fundsSettlementOnlyStatus: boolean;
40
+ bookEntrySecuritiesTransferStatus: boolean;
41
+ };
42
+
43
+ /** @internal */
44
+ export const WireServices$outboundSchema: z.ZodType<
45
+ WireServices$Outbound,
46
+ z.ZodTypeDef,
47
+ WireServices
48
+ > = z.object({
49
+ fundsTransferStatus: z.boolean(),
50
+ fundsSettlementOnlyStatus: z.boolean(),
51
+ bookEntrySecuritiesTransferStatus: z.boolean(),
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 WireServices$ {
59
+ /** @deprecated use `WireServices$inboundSchema` instead. */
60
+ export const inboundSchema = WireServices$inboundSchema;
61
+ /** @deprecated use `WireServices$outboundSchema` instead. */
62
+ export const outboundSchema = WireServices$outboundSchema;
63
+ /** @deprecated use `WireServices$Outbound` instead. */
64
+ export type Outbound = WireServices$Outbound;
65
+ }
66
+
67
+ export function wireServicesToJSON(wireServices: WireServices): string {
68
+ return JSON.stringify(WireServices$outboundSchema.parse(wireServices));
69
+ }
70
+
71
+ export function wireServicesFromJSON(
72
+ jsonString: string,
73
+ ): SafeParseResult<WireServices, SDKValidationError> {
74
+ return safeParse(
75
+ jsonString,
76
+ (x) => WireServices$inboundSchema.parse(JSON.parse(x)),
77
+ `Failed to parse 'WireServices' from JSON`,
78
+ );
79
+ }
@@ -3,22 +3,37 @@
3
3
  */
4
4
 
5
5
  export class APIError extends Error {
6
+ /**
7
+ * HTTP status code
8
+ */
6
9
  public readonly statusCode: number;
10
+ /**
11
+ * HTTP content type
12
+ */
7
13
  public readonly contentType: string;
14
+ /**
15
+ * HTTP body
16
+ */
17
+ public readonly body: string;
18
+ /**
19
+ * Raw response
20
+ */
21
+ public readonly rawResponse: Response;
8
22
 
9
23
  constructor(
10
24
  message: string,
11
- public readonly rawResponse: Response,
12
- public readonly body: string = "",
25
+ rawResponse: Response,
26
+ body: string = "",
13
27
  ) {
14
28
  const statusCode = rawResponse.status;
15
29
  const contentType = rawResponse.headers.get("content-type") || "";
16
30
  const bodyString = body.length > 0 ? `\n${body}` : "";
17
-
18
31
  super(
19
32
  `${message}: Status ${statusCode} Content-Type ${contentType} Body ${bodyString}`,
20
33
  );
21
34
 
35
+ this.body = body;
36
+ this.rawResponse = rawResponse;
22
37
  this.statusCode = statusCode;
23
38
  this.contentType = contentType;
24
39
 
@@ -119,6 +119,7 @@ export * from "./requestcard.js";
119
119
  export * from "./retrievefees.js";
120
120
  export * from "./revokeaccesstoken.js";
121
121
  export * from "./revokeonboardinginvite.js";
122
+ export * from "./searchinstitutions.js";
122
123
  export * from "./submitdisputeevidence.js";
123
124
  export * from "./testendtoendtoken.js";
124
125
  export * from "./updateaccount.js";
@@ -0,0 +1,236 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type SearchInstitutionsGlobals = {
13
+ /**
14
+ * Specify an API version.
15
+ *
16
+ * @remarks
17
+ *
18
+ * API versioning follows the format `vYYYY.QQ.BB`, where
19
+ * - `YYYY` is the year
20
+ * - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
21
+ * - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
22
+ * - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
23
+ *
24
+ * The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
25
+ */
26
+ xMoovVersion?: string | undefined;
27
+ };
28
+
29
+ export type SearchInstitutionsRequest = {
30
+ /**
31
+ * Name of the financial institution. Either `name` or `routingNumber` is required.
32
+ */
33
+ name?: string | undefined;
34
+ /**
35
+ * Routing number for a financial institution. Either `routingNumber` or `name` is required.
36
+ */
37
+ routingNumber?: string | undefined;
38
+ /**
39
+ * Maximum results returned by a search.
40
+ */
41
+ limit?: number | undefined;
42
+ };
43
+
44
+ export type SearchInstitutionsResponse = {
45
+ headers: { [k: string]: Array<string> };
46
+ result: components.InstitutionsSearchResponse;
47
+ };
48
+
49
+ /** @internal */
50
+ export const SearchInstitutionsGlobals$inboundSchema: z.ZodType<
51
+ SearchInstitutionsGlobals,
52
+ z.ZodTypeDef,
53
+ unknown
54
+ > = z.object({
55
+ "x-moov-version": z.string().default("v2024.01.00"),
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ "x-moov-version": "xMoovVersion",
59
+ });
60
+ });
61
+
62
+ /** @internal */
63
+ export type SearchInstitutionsGlobals$Outbound = {
64
+ "x-moov-version": string;
65
+ };
66
+
67
+ /** @internal */
68
+ export const SearchInstitutionsGlobals$outboundSchema: z.ZodType<
69
+ SearchInstitutionsGlobals$Outbound,
70
+ z.ZodTypeDef,
71
+ SearchInstitutionsGlobals
72
+ > = z.object({
73
+ xMoovVersion: z.string().default("v2024.01.00"),
74
+ }).transform((v) => {
75
+ return remap$(v, {
76
+ xMoovVersion: "x-moov-version",
77
+ });
78
+ });
79
+
80
+ /**
81
+ * @internal
82
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
83
+ */
84
+ export namespace SearchInstitutionsGlobals$ {
85
+ /** @deprecated use `SearchInstitutionsGlobals$inboundSchema` instead. */
86
+ export const inboundSchema = SearchInstitutionsGlobals$inboundSchema;
87
+ /** @deprecated use `SearchInstitutionsGlobals$outboundSchema` instead. */
88
+ export const outboundSchema = SearchInstitutionsGlobals$outboundSchema;
89
+ /** @deprecated use `SearchInstitutionsGlobals$Outbound` instead. */
90
+ export type Outbound = SearchInstitutionsGlobals$Outbound;
91
+ }
92
+
93
+ export function searchInstitutionsGlobalsToJSON(
94
+ searchInstitutionsGlobals: SearchInstitutionsGlobals,
95
+ ): string {
96
+ return JSON.stringify(
97
+ SearchInstitutionsGlobals$outboundSchema.parse(searchInstitutionsGlobals),
98
+ );
99
+ }
100
+
101
+ export function searchInstitutionsGlobalsFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<SearchInstitutionsGlobals, SDKValidationError> {
104
+ return safeParse(
105
+ jsonString,
106
+ (x) => SearchInstitutionsGlobals$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'SearchInstitutionsGlobals' from JSON`,
108
+ );
109
+ }
110
+
111
+ /** @internal */
112
+ export const SearchInstitutionsRequest$inboundSchema: z.ZodType<
113
+ SearchInstitutionsRequest,
114
+ z.ZodTypeDef,
115
+ unknown
116
+ > = z.object({
117
+ name: z.string().optional(),
118
+ routingNumber: z.string().optional(),
119
+ limit: z.number().int().optional(),
120
+ });
121
+
122
+ /** @internal */
123
+ export type SearchInstitutionsRequest$Outbound = {
124
+ name?: string | undefined;
125
+ routingNumber?: string | undefined;
126
+ limit?: number | undefined;
127
+ };
128
+
129
+ /** @internal */
130
+ export const SearchInstitutionsRequest$outboundSchema: z.ZodType<
131
+ SearchInstitutionsRequest$Outbound,
132
+ z.ZodTypeDef,
133
+ SearchInstitutionsRequest
134
+ > = z.object({
135
+ name: z.string().optional(),
136
+ routingNumber: z.string().optional(),
137
+ limit: z.number().int().optional(),
138
+ });
139
+
140
+ /**
141
+ * @internal
142
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
143
+ */
144
+ export namespace SearchInstitutionsRequest$ {
145
+ /** @deprecated use `SearchInstitutionsRequest$inboundSchema` instead. */
146
+ export const inboundSchema = SearchInstitutionsRequest$inboundSchema;
147
+ /** @deprecated use `SearchInstitutionsRequest$outboundSchema` instead. */
148
+ export const outboundSchema = SearchInstitutionsRequest$outboundSchema;
149
+ /** @deprecated use `SearchInstitutionsRequest$Outbound` instead. */
150
+ export type Outbound = SearchInstitutionsRequest$Outbound;
151
+ }
152
+
153
+ export function searchInstitutionsRequestToJSON(
154
+ searchInstitutionsRequest: SearchInstitutionsRequest,
155
+ ): string {
156
+ return JSON.stringify(
157
+ SearchInstitutionsRequest$outboundSchema.parse(searchInstitutionsRequest),
158
+ );
159
+ }
160
+
161
+ export function searchInstitutionsRequestFromJSON(
162
+ jsonString: string,
163
+ ): SafeParseResult<SearchInstitutionsRequest, SDKValidationError> {
164
+ return safeParse(
165
+ jsonString,
166
+ (x) => SearchInstitutionsRequest$inboundSchema.parse(JSON.parse(x)),
167
+ `Failed to parse 'SearchInstitutionsRequest' from JSON`,
168
+ );
169
+ }
170
+
171
+ /** @internal */
172
+ export const SearchInstitutionsResponse$inboundSchema: z.ZodType<
173
+ SearchInstitutionsResponse,
174
+ z.ZodTypeDef,
175
+ unknown
176
+ > = z.object({
177
+ Headers: z.record(z.array(z.string())),
178
+ Result: components.InstitutionsSearchResponse$inboundSchema,
179
+ }).transform((v) => {
180
+ return remap$(v, {
181
+ "Headers": "headers",
182
+ "Result": "result",
183
+ });
184
+ });
185
+
186
+ /** @internal */
187
+ export type SearchInstitutionsResponse$Outbound = {
188
+ Headers: { [k: string]: Array<string> };
189
+ Result: components.InstitutionsSearchResponse$Outbound;
190
+ };
191
+
192
+ /** @internal */
193
+ export const SearchInstitutionsResponse$outboundSchema: z.ZodType<
194
+ SearchInstitutionsResponse$Outbound,
195
+ z.ZodTypeDef,
196
+ SearchInstitutionsResponse
197
+ > = z.object({
198
+ headers: z.record(z.array(z.string())),
199
+ result: components.InstitutionsSearchResponse$outboundSchema,
200
+ }).transform((v) => {
201
+ return remap$(v, {
202
+ headers: "Headers",
203
+ result: "Result",
204
+ });
205
+ });
206
+
207
+ /**
208
+ * @internal
209
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
210
+ */
211
+ export namespace SearchInstitutionsResponse$ {
212
+ /** @deprecated use `SearchInstitutionsResponse$inboundSchema` instead. */
213
+ export const inboundSchema = SearchInstitutionsResponse$inboundSchema;
214
+ /** @deprecated use `SearchInstitutionsResponse$outboundSchema` instead. */
215
+ export const outboundSchema = SearchInstitutionsResponse$outboundSchema;
216
+ /** @deprecated use `SearchInstitutionsResponse$Outbound` instead. */
217
+ export type Outbound = SearchInstitutionsResponse$Outbound;
218
+ }
219
+
220
+ export function searchInstitutionsResponseToJSON(
221
+ searchInstitutionsResponse: SearchInstitutionsResponse,
222
+ ): string {
223
+ return JSON.stringify(
224
+ SearchInstitutionsResponse$outboundSchema.parse(searchInstitutionsResponse),
225
+ );
226
+ }
227
+
228
+ export function searchInstitutionsResponseFromJSON(
229
+ jsonString: string,
230
+ ): SafeParseResult<SearchInstitutionsResponse, SDKValidationError> {
231
+ return safeParse(
232
+ jsonString,
233
+ (x) => SearchInstitutionsResponse$inboundSchema.parse(JSON.parse(x)),
234
+ `Failed to parse 'SearchInstitutionsResponse' from JSON`,
235
+ );
236
+ }
@@ -3,11 +3,33 @@
3
3
  */
4
4
 
5
5
  import { institutionsSearch } from "../funcs/institutionsSearch.js";
6
+ import { institutionsSearchInstitutions } from "../funcs/institutionsSearchInstitutions.js";
6
7
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
8
  import * as operations from "../models/operations/index.js";
8
9
  import { unwrapAsync } from "../types/fp.js";
9
10
 
10
11
  export class Institutions extends 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(
23
+ request: operations.SearchInstitutionsRequest,
24
+ options?: RequestOptions,
25
+ ): Promise<operations.SearchInstitutionsResponse> {
26
+ return unwrapAsync(institutionsSearchInstitutions(
27
+ this,
28
+ request,
29
+ options,
30
+ ));
31
+ }
32
+
11
33
  /**
12
34
  * Search for institutions by either their name or routing number.
13
35
  *