@moovio/sdk 0.21.12 → 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 (70) hide show
  1. package/README.md +56 -48
  2. package/bin/mcp-server.js +863 -659
  3. package/bin/mcp-server.js.map +17 -13
  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 +3 -3
  13. package/lib/config.js +3 -3
  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/paymentlink.d.ts +5 -0
  32. package/models/components/paymentlink.d.ts.map +1 -1
  33. package/models/components/paymentlink.js +2 -0
  34. package/models/components/paymentlink.js.map +1 -1
  35. package/models/components/paymentmethod.d.ts +5 -0
  36. package/models/components/paymentmethod.d.ts.map +1 -1
  37. package/models/components/paymentmethod.js +3 -0
  38. package/models/components/paymentmethod.js.map +1 -1
  39. package/models/components/paymentmethodtype.d.ts +1 -0
  40. package/models/components/paymentmethodtype.d.ts.map +1 -1
  41. package/models/components/paymentmethodtype.js +1 -0
  42. package/models/components/paymentmethodtype.js.map +1 -1
  43. package/models/operations/index.d.ts +1 -0
  44. package/models/operations/index.d.ts.map +1 -1
  45. package/models/operations/index.js +1 -0
  46. package/models/operations/index.js.map +1 -1
  47. package/models/operations/listfeerevenue.d.ts +81 -0
  48. package/models/operations/listfeerevenue.d.ts.map +1 -0
  49. package/models/operations/listfeerevenue.js +120 -0
  50. package/models/operations/listfeerevenue.js.map +1 -0
  51. package/package.json +1 -1
  52. package/sdk/feeplans.d.ts +8 -1
  53. package/sdk/feeplans.d.ts.map +1 -1
  54. package/sdk/feeplans.js +11 -1
  55. package/sdk/feeplans.js.map +1 -1
  56. package/src/funcs/feePlansListFeeRevenue.ts +187 -0
  57. package/src/funcs/feePlansRetrieveFees.ts +1 -1
  58. package/src/lib/config.ts +3 -3
  59. package/src/mcp-server/mcp-server.ts +1 -1
  60. package/src/mcp-server/server.ts +3 -1
  61. package/src/mcp-server/tools/feePlansListFeeRevenue.ts +39 -0
  62. package/src/mcp-server/tools/feePlansRetrieveFees.ts +1 -1
  63. package/src/models/components/index.ts +1 -0
  64. package/src/models/components/instantbankcreditpaymentmethod.ts +95 -0
  65. package/src/models/components/paymentlink.ts +7 -0
  66. package/src/models/components/paymentmethod.ts +22 -0
  67. package/src/models/components/paymentmethodtype.ts +1 -0
  68. package/src/models/operations/index.ts +1 -0
  69. package/src/models/operations/listfeerevenue.ts +200 -0
  70. package/src/sdk/feeplans.ts +19 -1
@@ -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
+ }
@@ -6,6 +6,7 @@ import { feePlansCreateFeePlanAgreements } from "../funcs/feePlansCreateFeePlanA
6
6
  import { feePlansGetResidual } from "../funcs/feePlansGetResidual.js";
7
7
  import { feePlansListFeePlanAgreements } from "../funcs/feePlansListFeePlanAgreements.js";
8
8
  import { feePlansListFeePlans } from "../funcs/feePlansListFeePlans.js";
9
+ import { feePlansListFeeRevenue } from "../funcs/feePlansListFeeRevenue.js";
9
10
  import { feePlansListFeesFetch } from "../funcs/feePlansListFeesFetch.js";
10
11
  import { feePlansListPartnerPricing } from "../funcs/feePlansListPartnerPricing.js";
11
12
  import { feePlansListPartnerPricingAgreements } from "../funcs/feePlansListPartnerPricingAgreements.js";
@@ -70,7 +71,24 @@ export class FeePlans extends ClientSDK {
70
71
  }
71
72
 
72
73
  /**
73
- * Retrieve fees associated with an account.
74
+ * Used by a partner. Retrieve revenue generated from merchant fees.
75
+ *
76
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
77
+ * you'll need to specify the `/accounts/{accountID}/profile.read` scope.
78
+ */
79
+ async listFeeRevenue(
80
+ request: operations.ListFeeRevenueRequest,
81
+ options?: RequestOptions,
82
+ ): Promise<operations.ListFeeRevenueResponse> {
83
+ return unwrapAsync(feePlansListFeeRevenue(
84
+ this,
85
+ request,
86
+ options,
87
+ ));
88
+ }
89
+
90
+ /**
91
+ * Retrieve fees assessed to an account.
74
92
  *
75
93
  * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
76
94
  * you'll need to specify the `/accounts/{accountID}/transfers.read` scope.