@moovio/sdk 0.21.13 → 0.21.14

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 (65) hide show
  1. package/README.md +56 -48
  2. package/bin/mcp-server.js +860 -658
  3. package/bin/mcp-server.js.map +16 -12
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/feePlansListFeeRevenue.d.ts +17 -0
  6. package/funcs/feePlansListFeeRevenue.d.ts.map +1 -0
  7. package/funcs/feePlansListFeeRevenue.js +132 -0
  8. package/funcs/feePlansListFeeRevenue.js.map +1 -0
  9. package/funcs/feePlansRetrieveFees.d.ts +1 -1
  10. package/funcs/feePlansRetrieveFees.js +1 -1
  11. package/jsr.json +1 -1
  12. package/lib/config.d.ts +2 -2
  13. package/lib/config.js +2 -2
  14. package/mcp-server/mcp-server.js +1 -1
  15. package/mcp-server/server.d.ts.map +1 -1
  16. package/mcp-server/server.js +3 -1
  17. package/mcp-server/server.js.map +1 -1
  18. package/mcp-server/tools/feePlansListFeeRevenue.d.ts +8 -0
  19. package/mcp-server/tools/feePlansListFeeRevenue.d.ts.map +1 -0
  20. package/mcp-server/tools/feePlansListFeeRevenue.js +65 -0
  21. package/mcp-server/tools/feePlansListFeeRevenue.js.map +1 -0
  22. package/mcp-server/tools/feePlansRetrieveFees.js +1 -1
  23. package/models/components/index.d.ts +1 -0
  24. package/models/components/index.d.ts.map +1 -1
  25. package/models/components/index.js +1 -0
  26. package/models/components/index.js.map +1 -1
  27. package/models/components/instantbankcreditpaymentmethod.d.ts +40 -0
  28. package/models/components/instantbankcreditpaymentmethod.d.ts.map +1 -0
  29. package/models/components/instantbankcreditpaymentmethod.js +71 -0
  30. package/models/components/instantbankcreditpaymentmethod.js.map +1 -0
  31. package/models/components/paymentmethod.d.ts +5 -0
  32. package/models/components/paymentmethod.d.ts.map +1 -1
  33. package/models/components/paymentmethod.js +3 -0
  34. package/models/components/paymentmethod.js.map +1 -1
  35. package/models/components/paymentmethodtype.d.ts +1 -0
  36. package/models/components/paymentmethodtype.d.ts.map +1 -1
  37. package/models/components/paymentmethodtype.js +1 -0
  38. package/models/components/paymentmethodtype.js.map +1 -1
  39. package/models/operations/index.d.ts +1 -0
  40. package/models/operations/index.d.ts.map +1 -1
  41. package/models/operations/index.js +1 -0
  42. package/models/operations/index.js.map +1 -1
  43. package/models/operations/listfeerevenue.d.ts +81 -0
  44. package/models/operations/listfeerevenue.d.ts.map +1 -0
  45. package/models/operations/listfeerevenue.js +120 -0
  46. package/models/operations/listfeerevenue.js.map +1 -0
  47. package/package.json +1 -1
  48. package/sdk/feeplans.d.ts +8 -1
  49. package/sdk/feeplans.d.ts.map +1 -1
  50. package/sdk/feeplans.js +11 -1
  51. package/sdk/feeplans.js.map +1 -1
  52. package/src/funcs/feePlansListFeeRevenue.ts +187 -0
  53. package/src/funcs/feePlansRetrieveFees.ts +1 -1
  54. package/src/lib/config.ts +2 -2
  55. package/src/mcp-server/mcp-server.ts +1 -1
  56. package/src/mcp-server/server.ts +3 -1
  57. package/src/mcp-server/tools/feePlansListFeeRevenue.ts +39 -0
  58. package/src/mcp-server/tools/feePlansRetrieveFees.ts +1 -1
  59. package/src/models/components/index.ts +1 -0
  60. package/src/models/components/instantbankcreditpaymentmethod.ts +95 -0
  61. package/src/models/components/paymentmethod.ts +22 -0
  62. package/src/models/components/paymentmethodtype.ts +1 -0
  63. package/src/models/operations/index.ts +1 -0
  64. package/src/models/operations/listfeerevenue.ts +200 -0
  65. package/src/sdk/feeplans.ts +19 -1
@@ -0,0 +1,187 @@
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 {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import { MoovError } from "../models/errors/mooverror.js";
21
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { APICall, APIPromise } from "../types/async.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ /**
28
+ * Used by a partner. Retrieve revenue generated from merchant fees.
29
+ *
30
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
31
+ * you'll need to specify the `/accounts/{accountID}/profile.read` scope.
32
+ */
33
+ export function feePlansListFeeRevenue(
34
+ client: MoovCore,
35
+ request: operations.ListFeeRevenueRequest,
36
+ options?: RequestOptions,
37
+ ): APIPromise<
38
+ Result<
39
+ operations.ListFeeRevenueResponse,
40
+ | MoovError
41
+ | ResponseValidationError
42
+ | ConnectionError
43
+ | RequestAbortedError
44
+ | RequestTimeoutError
45
+ | InvalidRequestError
46
+ | UnexpectedClientError
47
+ | SDKValidationError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client: MoovCore,
59
+ request: operations.ListFeeRevenueRequest,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ operations.ListFeeRevenueResponse,
65
+ | MoovError
66
+ | ResponseValidationError
67
+ | ConnectionError
68
+ | RequestAbortedError
69
+ | RequestTimeoutError
70
+ | InvalidRequestError
71
+ | UnexpectedClientError
72
+ | SDKValidationError
73
+ >,
74
+ APICall,
75
+ ]
76
+ > {
77
+ const parsed = safeParse(
78
+ request,
79
+ (value) => operations.ListFeeRevenueRequest$outboundSchema.parse(value),
80
+ "Input validation failed",
81
+ );
82
+ if (!parsed.ok) {
83
+ return [parsed, { status: "invalid" }];
84
+ }
85
+ const payload = parsed.value;
86
+ const body = null;
87
+
88
+ const pathParams = {
89
+ accountID: encodeSimple("accountID", payload.accountID, {
90
+ explode: false,
91
+ charEncoding: "percent",
92
+ }),
93
+ };
94
+
95
+ const path = pathToFunc("/accounts/{accountID}/fee-revenue")(pathParams);
96
+
97
+ const query = encodeFormQuery({
98
+ "count": payload.count,
99
+ "endDateTime": payload.endDateTime,
100
+ "skip": payload.skip,
101
+ "startDateTime": payload.startDateTime,
102
+ }, { explode: false });
103
+
104
+ const headers = new Headers(compactMap({
105
+ Accept: "application/json",
106
+ "X-Moov-Version": encodeSimple(
107
+ "X-Moov-Version",
108
+ client._options.xMoovVersion,
109
+ { explode: false, charEncoding: "none" },
110
+ ),
111
+ }));
112
+
113
+ const securityInput = await extractSecurity(client._options.security);
114
+ const requestSecurity = resolveGlobalSecurity(securityInput);
115
+
116
+ const context = {
117
+ options: client._options,
118
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
119
+ operationID: "listFeeRevenue",
120
+ oAuth2Scopes: null,
121
+
122
+ resolvedSecurity: requestSecurity,
123
+
124
+ securitySource: client._options.security,
125
+ retryConfig: options?.retries
126
+ || client._options.retryConfig
127
+ || { strategy: "none" },
128
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
129
+ };
130
+
131
+ const requestRes = client._createRequest(context, {
132
+ security: requestSecurity,
133
+ method: "GET",
134
+ baseURL: options?.serverURL,
135
+ path: path,
136
+ headers: headers,
137
+ query: query,
138
+ body: body,
139
+ userAgent: client._options.userAgent,
140
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
141
+ }, options);
142
+ if (!requestRes.ok) {
143
+ return [requestRes, { status: "invalid" }];
144
+ }
145
+ const req = requestRes.value;
146
+
147
+ const doResult = await client._do(req, {
148
+ context,
149
+ errorCodes: ["401", "403", "429", "4XX", "500", "504", "5XX"],
150
+ retryConfig: context.retryConfig,
151
+ retryCodes: context.retryCodes,
152
+ });
153
+ if (!doResult.ok) {
154
+ return [doResult, { status: "request-error", request: req }];
155
+ }
156
+ const response = doResult.value;
157
+
158
+ const responseFields = {
159
+ HttpMeta: { Response: response, Request: req },
160
+ };
161
+
162
+ const [result] = await M.match<
163
+ operations.ListFeeRevenueResponse,
164
+ | MoovError
165
+ | ResponseValidationError
166
+ | ConnectionError
167
+ | RequestAbortedError
168
+ | RequestTimeoutError
169
+ | InvalidRequestError
170
+ | UnexpectedClientError
171
+ | SDKValidationError
172
+ >(
173
+ M.json(200, operations.ListFeeRevenueResponse$inboundSchema, {
174
+ hdrs: true,
175
+ key: "Result",
176
+ }),
177
+ M.fail([401, 403, 429]),
178
+ M.fail([500, 504]),
179
+ M.fail("4XX"),
180
+ M.fail("5XX"),
181
+ )(response, req, { extraFields: responseFields });
182
+ if (!result.ok) {
183
+ return [result, { status: "complete", request: req, response }];
184
+ }
185
+
186
+ return [result, { status: "complete", request: req, response }];
187
+ }
@@ -25,7 +25,7 @@ import { APICall, APIPromise } from "../types/async.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
27
  /**
28
- * Retrieve fees associated with an account.
28
+ * Retrieve fees assessed to an account.
29
29
  *
30
30
  * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
31
31
  * you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
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.21.13",
76
+ sdkVersion: "0.21.14",
77
77
  genVersion: "2.755.9",
78
- userAgent: "speakeasy-sdk/typescript 0.21.13 2.755.9 latest @moovio/sdk",
78
+ userAgent: "speakeasy-sdk/typescript 0.21.14 2.755.9 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.21.13",
22
+ currentVersion: "0.21.14",
23
23
  },
24
24
  });
25
25
 
@@ -82,6 +82,7 @@ import { tool$feePlansCreateFeePlanAgreements } from "./tools/feePlansCreateFeeP
82
82
  import { tool$feePlansGetResidual } from "./tools/feePlansGetResidual.js";
83
83
  import { tool$feePlansListFeePlanAgreements } from "./tools/feePlansListFeePlanAgreements.js";
84
84
  import { tool$feePlansListFeePlans } from "./tools/feePlansListFeePlans.js";
85
+ import { tool$feePlansListFeeRevenue } from "./tools/feePlansListFeeRevenue.js";
85
86
  import { tool$feePlansListFeesFetch } from "./tools/feePlansListFeesFetch.js";
86
87
  import { tool$feePlansListPartnerPricing } from "./tools/feePlansListPartnerPricing.js";
87
88
  import { tool$feePlansListPartnerPricingAgreements } from "./tools/feePlansListPartnerPricingAgreements.js";
@@ -187,7 +188,7 @@ export function createMCPServer(deps: {
187
188
  }) {
188
189
  const server = new McpServer({
189
190
  name: "Moov",
190
- version: "0.21.13",
191
+ version: "0.21.14",
191
192
  });
192
193
 
193
194
  const client = new MoovCore({
@@ -270,6 +271,7 @@ export function createMCPServer(deps: {
270
271
  tool(tool$feePlansListFeePlanAgreements);
271
272
  tool(tool$feePlansCreateFeePlanAgreements);
272
273
  tool(tool$feePlansListFeePlans);
274
+ tool(tool$feePlansListFeeRevenue);
273
275
  tool(tool$feePlansRetrieveFees);
274
276
  tool(tool$feePlansListFeesFetch);
275
277
  tool(tool$feePlansListPartnerPricing);
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { feePlansListFeeRevenue } from "../../funcs/feePlansListFeeRevenue.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.ListFeeRevenueRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$feePlansListFeeRevenue: ToolDefinition<typeof args> = {
14
+ name: "fee-plans-list-fee-revenue",
15
+ description:
16
+ `Used by a partner. Retrieve revenue generated from merchant fees.
17
+
18
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
19
+ you'll need to specify the \`/accounts/{accountID}/profile.read\` scope.`,
20
+ args,
21
+ tool: async (client, args, ctx) => {
22
+ const [result, apiCall] = await feePlansListFeeRevenue(
23
+ client,
24
+ args.request,
25
+ { fetchOptions: { signal: ctx.signal } },
26
+ ).$inspect();
27
+
28
+ if (!result.ok) {
29
+ return {
30
+ content: [{ type: "text", text: result.error.message }],
31
+ isError: true,
32
+ };
33
+ }
34
+
35
+ const value = result.value.result;
36
+
37
+ return formatResult(value, apiCall);
38
+ },
39
+ };
@@ -12,7 +12,7 @@ const args = {
12
12
 
13
13
  export const tool$feePlansRetrieveFees: ToolDefinition<typeof args> = {
14
14
  name: "fee-plans-retrieve-fees",
15
- description: `Retrieve fees associated with an account.
15
+ description: `Retrieve fees assessed to an account.
16
16
 
17
17
  To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
18
18
  you'll need to specify the \`/accounts/{accountID}/transfers.read\` scope.`,
@@ -230,6 +230,7 @@ export * from "./individualnameupdate.js";
230
230
  export * from "./individualprofile.js";
231
231
  export * from "./industrycodes.js";
232
232
  export * from "./industrytaxonomy.js";
233
+ export * from "./instantbankcreditpaymentmethod.js";
233
234
  export * from "./instantpaymentfees.js";
234
235
  export * from "./institutionssearchresponse.js";
235
236
  export * from "./issuedcard.js";
@@ -0,0 +1,95 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { ClosedEnum } from "../../types/enums.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ PaymentMethodsBankAccount,
12
+ PaymentMethodsBankAccount$inboundSchema,
13
+ PaymentMethodsBankAccount$Outbound,
14
+ PaymentMethodsBankAccount$outboundSchema,
15
+ } from "./paymentmethodsbankaccount.js";
16
+
17
+ export const InstantBankCreditPaymentMethodPaymentMethodType = {
18
+ InstantBankCredit: "instant-bank-credit",
19
+ } as const;
20
+ export type InstantBankCreditPaymentMethodPaymentMethodType = ClosedEnum<
21
+ typeof InstantBankCreditPaymentMethodPaymentMethodType
22
+ >;
23
+
24
+ /**
25
+ * Instantly send funds to a bank account.
26
+ */
27
+ export type InstantBankCreditPaymentMethod = {
28
+ /**
29
+ * ID of the payment method.
30
+ */
31
+ paymentMethodID: string;
32
+ paymentMethodType: InstantBankCreditPaymentMethodPaymentMethodType;
33
+ /**
34
+ * A bank account as contained within a payment method.
35
+ */
36
+ bankAccount: PaymentMethodsBankAccount;
37
+ };
38
+
39
+ /** @internal */
40
+ export const InstantBankCreditPaymentMethodPaymentMethodType$inboundSchema:
41
+ z.ZodNativeEnum<typeof InstantBankCreditPaymentMethodPaymentMethodType> = z
42
+ .nativeEnum(InstantBankCreditPaymentMethodPaymentMethodType);
43
+ /** @internal */
44
+ export const InstantBankCreditPaymentMethodPaymentMethodType$outboundSchema:
45
+ z.ZodNativeEnum<typeof InstantBankCreditPaymentMethodPaymentMethodType> =
46
+ InstantBankCreditPaymentMethodPaymentMethodType$inboundSchema;
47
+
48
+ /** @internal */
49
+ export const InstantBankCreditPaymentMethod$inboundSchema: z.ZodType<
50
+ InstantBankCreditPaymentMethod,
51
+ z.ZodTypeDef,
52
+ unknown
53
+ > = z.object({
54
+ paymentMethodID: z.string(),
55
+ paymentMethodType:
56
+ InstantBankCreditPaymentMethodPaymentMethodType$inboundSchema,
57
+ bankAccount: PaymentMethodsBankAccount$inboundSchema,
58
+ });
59
+ /** @internal */
60
+ export type InstantBankCreditPaymentMethod$Outbound = {
61
+ paymentMethodID: string;
62
+ paymentMethodType: string;
63
+ bankAccount: PaymentMethodsBankAccount$Outbound;
64
+ };
65
+
66
+ /** @internal */
67
+ export const InstantBankCreditPaymentMethod$outboundSchema: z.ZodType<
68
+ InstantBankCreditPaymentMethod$Outbound,
69
+ z.ZodTypeDef,
70
+ InstantBankCreditPaymentMethod
71
+ > = z.object({
72
+ paymentMethodID: z.string(),
73
+ paymentMethodType:
74
+ InstantBankCreditPaymentMethodPaymentMethodType$outboundSchema,
75
+ bankAccount: PaymentMethodsBankAccount$outboundSchema,
76
+ });
77
+
78
+ export function instantBankCreditPaymentMethodToJSON(
79
+ instantBankCreditPaymentMethod: InstantBankCreditPaymentMethod,
80
+ ): string {
81
+ return JSON.stringify(
82
+ InstantBankCreditPaymentMethod$outboundSchema.parse(
83
+ instantBankCreditPaymentMethod,
84
+ ),
85
+ );
86
+ }
87
+ export function instantBankCreditPaymentMethodFromJSON(
88
+ jsonString: string,
89
+ ): SafeParseResult<InstantBankCreditPaymentMethod, SDKValidationError> {
90
+ return safeParse(
91
+ jsonString,
92
+ (x) => InstantBankCreditPaymentMethod$inboundSchema.parse(JSON.parse(x)),
93
+ `Failed to parse 'InstantBankCreditPaymentMethod' from JSON`,
94
+ );
95
+ }
@@ -48,6 +48,12 @@ import {
48
48
  CardPresentPaymentPaymentMethod$Outbound,
49
49
  CardPresentPaymentPaymentMethod$outboundSchema,
50
50
  } from "./cardpresentpaymentpaymentmethod.js";
51
+ import {
52
+ InstantBankCreditPaymentMethod,
53
+ InstantBankCreditPaymentMethod$inboundSchema,
54
+ InstantBankCreditPaymentMethod$Outbound,
55
+ InstantBankCreditPaymentMethod$outboundSchema,
56
+ } from "./instantbankcreditpaymentmethod.js";
51
57
  import {
52
58
  MoovWalletPaymentMethod,
53
59
  MoovWalletPaymentMethod$inboundSchema,
@@ -91,6 +97,9 @@ export type PaymentMethod =
91
97
  | (PushToCardPaymentMethod & { paymentMethodType: "push-to-card" })
92
98
  | (PullFromCardPaymentMethod & { paymentMethodType: "pull-from-card" })
93
99
  | (ApplePayPaymentMethod & { paymentMethodType: "apple-pay" })
100
+ | (InstantBankCreditPaymentMethod & {
101
+ paymentMethodType: "instant-bank-credit";
102
+ })
94
103
  | (CardPresentPaymentPaymentMethod & {
95
104
  paymentMethodType: "card-present-payment";
96
105
  });
@@ -151,6 +160,11 @@ export const PaymentMethod$inboundSchema: z.ZodType<
151
160
  paymentMethodType: v.paymentMethodType,
152
161
  })),
153
162
  ),
163
+ InstantBankCreditPaymentMethod$inboundSchema.and(
164
+ z.object({ paymentMethodType: z.literal("instant-bank-credit") }).transform(
165
+ (v) => ({ paymentMethodType: v.paymentMethodType })
166
+ ),
167
+ ),
154
168
  CardPresentPaymentPaymentMethod$inboundSchema.and(
155
169
  z.object({ paymentMethodType: z.literal("card-present-payment") })
156
170
  .transform((v) => ({ paymentMethodType: v.paymentMethodType })),
@@ -178,6 +192,9 @@ export type PaymentMethod$Outbound =
178
192
  paymentMethodType: "pull-from-card";
179
193
  })
180
194
  | (ApplePayPaymentMethod$Outbound & { paymentMethodType: "apple-pay" })
195
+ | (InstantBankCreditPaymentMethod$Outbound & {
196
+ paymentMethodType: "instant-bank-credit";
197
+ })
181
198
  | (CardPresentPaymentPaymentMethod$Outbound & {
182
199
  paymentMethodType: "card-present-payment";
183
200
  });
@@ -238,6 +255,11 @@ export const PaymentMethod$outboundSchema: z.ZodType<
238
255
  paymentMethodType: v.paymentMethodType,
239
256
  })),
240
257
  ),
258
+ InstantBankCreditPaymentMethod$outboundSchema.and(
259
+ z.object({ paymentMethodType: z.literal("instant-bank-credit") }).transform(
260
+ (v) => ({ paymentMethodType: v.paymentMethodType })
261
+ ),
262
+ ),
241
263
  CardPresentPaymentPaymentMethod$outboundSchema.and(
242
264
  z.object({ paymentMethodType: z.literal("card-present-payment") })
243
265
  .transform((v) => ({ paymentMethodType: v.paymentMethodType })),
@@ -20,6 +20,7 @@ export const PaymentMethodType = {
20
20
  PullFromCard: "pull-from-card",
21
21
  ApplePay: "apple-pay",
22
22
  CardPresentPayment: "card-present-payment",
23
+ InstantBankCredit: "instant-bank-credit",
23
24
  } as const;
24
25
  /**
25
26
  * The payment method type that represents a payment rail and directionality
@@ -101,6 +101,7 @@ export * from "./listdisputeevidence.js";
101
101
  export * from "./listdisputes.js";
102
102
  export * from "./listfeeplanagreements.js";
103
103
  export * from "./listfeeplans.js";
104
+ export * from "./listfeerevenue.js";
104
105
  export * from "./listfeesfetch.js";
105
106
  export * from "./listfiles.js";
106
107
  export * from "./listimagemetadata.js";
@@ -0,0 +1,200 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
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 ListFeeRevenueGlobals = {
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
+ * When no version is specified, the API defaults to `v2024.01.00`.
26
+ */
27
+ xMoovVersion?: string | undefined;
28
+ };
29
+
30
+ export type ListFeeRevenueRequest = {
31
+ skip?: number | undefined;
32
+ count?: number | undefined;
33
+ /**
34
+ * The Partner's AccountID.
35
+ */
36
+ accountID: string;
37
+ /**
38
+ * Optional date-time to inclusively filter all fees created after this date-time.
39
+ */
40
+ startDateTime?: string | undefined;
41
+ /**
42
+ * Optional date-time to exclusively filter all fees created before this date-time.
43
+ */
44
+ endDateTime?: string | undefined;
45
+ };
46
+
47
+ export type ListFeeRevenueResponse = {
48
+ headers: { [k: string]: Array<string> };
49
+ result: Array<components.IncurredFee>;
50
+ };
51
+
52
+ /** @internal */
53
+ export const ListFeeRevenueGlobals$inboundSchema: z.ZodType<
54
+ ListFeeRevenueGlobals,
55
+ z.ZodTypeDef,
56
+ unknown
57
+ > = z.object({
58
+ "X-Moov-Version": z.string().optional(),
59
+ }).transform((v) => {
60
+ return remap$(v, {
61
+ "X-Moov-Version": "xMoovVersion",
62
+ });
63
+ });
64
+ /** @internal */
65
+ export type ListFeeRevenueGlobals$Outbound = {
66
+ "X-Moov-Version"?: string | undefined;
67
+ };
68
+
69
+ /** @internal */
70
+ export const ListFeeRevenueGlobals$outboundSchema: z.ZodType<
71
+ ListFeeRevenueGlobals$Outbound,
72
+ z.ZodTypeDef,
73
+ ListFeeRevenueGlobals
74
+ > = z.object({
75
+ xMoovVersion: z.string().optional(),
76
+ }).transform((v) => {
77
+ return remap$(v, {
78
+ xMoovVersion: "X-Moov-Version",
79
+ });
80
+ });
81
+
82
+ export function listFeeRevenueGlobalsToJSON(
83
+ listFeeRevenueGlobals: ListFeeRevenueGlobals,
84
+ ): string {
85
+ return JSON.stringify(
86
+ ListFeeRevenueGlobals$outboundSchema.parse(listFeeRevenueGlobals),
87
+ );
88
+ }
89
+ export function listFeeRevenueGlobalsFromJSON(
90
+ jsonString: string,
91
+ ): SafeParseResult<ListFeeRevenueGlobals, SDKValidationError> {
92
+ return safeParse(
93
+ jsonString,
94
+ (x) => ListFeeRevenueGlobals$inboundSchema.parse(JSON.parse(x)),
95
+ `Failed to parse 'ListFeeRevenueGlobals' from JSON`,
96
+ );
97
+ }
98
+
99
+ /** @internal */
100
+ export const ListFeeRevenueRequest$inboundSchema: z.ZodType<
101
+ ListFeeRevenueRequest,
102
+ z.ZodTypeDef,
103
+ unknown
104
+ > = z.object({
105
+ skip: z.number().int().optional(),
106
+ count: z.number().int().optional(),
107
+ accountID: z.string(),
108
+ startDateTime: z.string().optional(),
109
+ endDateTime: z.string().optional(),
110
+ });
111
+ /** @internal */
112
+ export type ListFeeRevenueRequest$Outbound = {
113
+ skip?: number | undefined;
114
+ count?: number | undefined;
115
+ accountID: string;
116
+ startDateTime?: string | undefined;
117
+ endDateTime?: string | undefined;
118
+ };
119
+
120
+ /** @internal */
121
+ export const ListFeeRevenueRequest$outboundSchema: z.ZodType<
122
+ ListFeeRevenueRequest$Outbound,
123
+ z.ZodTypeDef,
124
+ ListFeeRevenueRequest
125
+ > = z.object({
126
+ skip: z.number().int().optional(),
127
+ count: z.number().int().optional(),
128
+ accountID: z.string(),
129
+ startDateTime: z.string().optional(),
130
+ endDateTime: z.string().optional(),
131
+ });
132
+
133
+ export function listFeeRevenueRequestToJSON(
134
+ listFeeRevenueRequest: ListFeeRevenueRequest,
135
+ ): string {
136
+ return JSON.stringify(
137
+ ListFeeRevenueRequest$outboundSchema.parse(listFeeRevenueRequest),
138
+ );
139
+ }
140
+ export function listFeeRevenueRequestFromJSON(
141
+ jsonString: string,
142
+ ): SafeParseResult<ListFeeRevenueRequest, SDKValidationError> {
143
+ return safeParse(
144
+ jsonString,
145
+ (x) => ListFeeRevenueRequest$inboundSchema.parse(JSON.parse(x)),
146
+ `Failed to parse 'ListFeeRevenueRequest' from JSON`,
147
+ );
148
+ }
149
+
150
+ /** @internal */
151
+ export const ListFeeRevenueResponse$inboundSchema: z.ZodType<
152
+ ListFeeRevenueResponse,
153
+ z.ZodTypeDef,
154
+ unknown
155
+ > = z.object({
156
+ Headers: z.record(z.array(z.string())).default({}),
157
+ Result: z.array(components.IncurredFee$inboundSchema),
158
+ }).transform((v) => {
159
+ return remap$(v, {
160
+ "Headers": "headers",
161
+ "Result": "result",
162
+ });
163
+ });
164
+ /** @internal */
165
+ export type ListFeeRevenueResponse$Outbound = {
166
+ Headers: { [k: string]: Array<string> };
167
+ Result: Array<components.IncurredFee$Outbound>;
168
+ };
169
+
170
+ /** @internal */
171
+ export const ListFeeRevenueResponse$outboundSchema: z.ZodType<
172
+ ListFeeRevenueResponse$Outbound,
173
+ z.ZodTypeDef,
174
+ ListFeeRevenueResponse
175
+ > = z.object({
176
+ headers: z.record(z.array(z.string())),
177
+ result: z.array(components.IncurredFee$outboundSchema),
178
+ }).transform((v) => {
179
+ return remap$(v, {
180
+ headers: "Headers",
181
+ result: "Result",
182
+ });
183
+ });
184
+
185
+ export function listFeeRevenueResponseToJSON(
186
+ listFeeRevenueResponse: ListFeeRevenueResponse,
187
+ ): string {
188
+ return JSON.stringify(
189
+ ListFeeRevenueResponse$outboundSchema.parse(listFeeRevenueResponse),
190
+ );
191
+ }
192
+ export function listFeeRevenueResponseFromJSON(
193
+ jsonString: string,
194
+ ): SafeParseResult<ListFeeRevenueResponse, SDKValidationError> {
195
+ return safeParse(
196
+ jsonString,
197
+ (x) => ListFeeRevenueResponse$inboundSchema.parse(JSON.parse(x)),
198
+ `Failed to parse 'ListFeeRevenueResponse' from JSON`,
199
+ );
200
+ }