@moovio/sdk 0.12.3 → 0.12.5

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 (142) hide show
  1. package/README.md +54 -36
  2. package/bin/mcp-server.js +453 -202
  3. package/bin/mcp-server.js.map +31 -28
  4. package/docs/sdks/transfers/README.md +117 -2
  5. package/funcs/disputesUploadEvidenceFile.d.ts.map +1 -1
  6. package/funcs/disputesUploadEvidenceFile.js +5 -3
  7. package/funcs/disputesUploadEvidenceFile.js.map +1 -1
  8. package/funcs/filesUpload.d.ts.map +1 -1
  9. package/funcs/filesUpload.js +5 -3
  10. package/funcs/filesUpload.js.map +1 -1
  11. package/funcs/transfersGenerateOptions.d.ts +1 -1
  12. package/funcs/transfersGenerateOptions.js +1 -1
  13. package/funcs/transfersGenerateOptionsForAccount.d.ts +23 -0
  14. package/funcs/transfersGenerateOptionsForAccount.d.ts.map +1 -0
  15. package/funcs/transfersGenerateOptionsForAccount.js +133 -0
  16. package/funcs/transfersGenerateOptionsForAccount.js.map +1 -0
  17. package/funcs/transfersList.js +1 -1
  18. package/funcs/transfersList.js.map +1 -1
  19. package/jsr.json +1 -1
  20. package/lib/config.d.ts +3 -3
  21. package/lib/config.js +3 -3
  22. package/lib/files.d.ts +5 -0
  23. package/lib/files.d.ts.map +1 -1
  24. package/lib/files.js +41 -0
  25. package/lib/files.js.map +1 -1
  26. package/lib/security.d.ts +2 -2
  27. package/lib/security.d.ts.map +1 -1
  28. package/mcp-server/mcp-server.js +1 -1
  29. package/mcp-server/server.d.ts.map +1 -1
  30. package/mcp-server/server.js +3 -1
  31. package/mcp-server/server.js.map +1 -1
  32. package/mcp-server/tools/transfersGenerateOptions.js +1 -1
  33. package/mcp-server/tools/transfersGenerateOptions.js.map +1 -1
  34. package/mcp-server/tools/transfersGenerateOptionsForAccount.d.ts +8 -0
  35. package/mcp-server/tools/transfersGenerateOptionsForAccount.d.ts.map +1 -0
  36. package/mcp-server/tools/transfersGenerateOptionsForAccount.js +70 -0
  37. package/mcp-server/tools/transfersGenerateOptionsForAccount.js.map +1 -0
  38. package/models/components/createaccount.d.ts +4 -4
  39. package/models/components/createaccount.d.ts.map +1 -1
  40. package/models/components/createaccount.js +4 -4
  41. package/models/components/createaccount.js.map +1 -1
  42. package/models/components/createdtransfer.d.ts +2 -0
  43. package/models/components/createdtransfer.d.ts.map +1 -1
  44. package/models/components/createdtransfer.js +2 -0
  45. package/models/components/createdtransfer.js.map +1 -1
  46. package/models/components/createrefundresponse.d.ts +2 -2
  47. package/models/components/createrefundresponse.d.ts.map +1 -1
  48. package/models/components/createrefundresponse.js +2 -2
  49. package/models/components/createrefundresponse.js.map +1 -1
  50. package/models/components/index.d.ts +1 -1
  51. package/models/components/index.d.ts.map +1 -1
  52. package/models/components/index.js +1 -1
  53. package/models/components/index.js.map +1 -1
  54. package/models/components/transfer.d.ts +2 -2
  55. package/models/components/transfer.d.ts.map +1 -1
  56. package/models/components/transfer.js +2 -2
  57. package/models/components/transfer.js.map +1 -1
  58. package/models/components/webhookdata.d.ts +2 -2
  59. package/models/components/webhookdata.d.ts.map +1 -1
  60. package/models/components/webhookdata.js +38 -38
  61. package/models/components/webhookdata.js.map +1 -1
  62. package/models/components/webhookdatatransfercreated.d.ts +2 -5
  63. package/models/components/webhookdatatransfercreated.d.ts.map +1 -1
  64. package/models/components/webhookdatatransfercreated.js +3 -3
  65. package/models/components/webhookdatatransfercreated.js.map +1 -1
  66. package/models/components/webhookdatatransferstatus.d.ts +94 -0
  67. package/models/components/webhookdatatransferstatus.d.ts.map +1 -0
  68. package/models/components/webhookdatatransferstatus.js +82 -0
  69. package/models/components/webhookdatatransferstatus.js.map +1 -0
  70. package/models/components/webhookdatatransferupdated.d.ts +2 -5
  71. package/models/components/webhookdatatransferupdated.d.ts.map +1 -1
  72. package/models/components/webhookdatatransferupdated.js +3 -3
  73. package/models/components/webhookdatatransferupdated.js.map +1 -1
  74. package/models/components/webhookdatawallettransactionupdated.d.ts +3 -6
  75. package/models/components/webhookdatawallettransactionupdated.d.ts.map +1 -1
  76. package/models/components/webhookdatawallettransactionupdated.js +3 -3
  77. package/models/components/webhookdatawallettransactionupdated.js.map +1 -1
  78. package/models/components/webhookeventtype.d.ts +3 -0
  79. package/models/components/webhookeventtype.d.ts.map +1 -1
  80. package/models/components/webhookeventtype.js +1 -0
  81. package/models/components/webhookeventtype.js.map +1 -1
  82. package/models/errors/transfer.d.ts +3 -3
  83. package/models/errors/transfer.d.ts.map +1 -1
  84. package/models/errors/transfer.js +4 -4
  85. package/models/errors/transfer.js.map +1 -1
  86. package/models/operations/createtransfer.d.ts +4 -4
  87. package/models/operations/createtransfer.d.ts.map +1 -1
  88. package/models/operations/createtransfer.js +8 -8
  89. package/models/operations/createtransfer.js.map +1 -1
  90. package/models/operations/createtransferoptionsforaccount.d.ts +104 -0
  91. package/models/operations/createtransferoptionsforaccount.d.ts.map +1 -0
  92. package/models/operations/createtransferoptionsforaccount.js +155 -0
  93. package/models/operations/createtransferoptionsforaccount.js.map +1 -0
  94. package/models/operations/index.d.ts +1 -0
  95. package/models/operations/index.d.ts.map +1 -1
  96. package/models/operations/index.js +1 -0
  97. package/models/operations/index.js.map +1 -1
  98. package/models/operations/listtransfers.d.ts +3 -3
  99. package/models/operations/listtransfers.d.ts.map +1 -1
  100. package/models/operations/listtransfers.js +2 -2
  101. package/models/operations/listtransfers.js.map +1 -1
  102. package/package.json +1 -1
  103. package/sdk/transfers.d.ts +13 -1
  104. package/sdk/transfers.d.ts.map +1 -1
  105. package/sdk/transfers.js +16 -1
  106. package/sdk/transfers.js.map +1 -1
  107. package/src/funcs/disputesUploadEvidenceFile.ts +20 -4
  108. package/src/funcs/filesUpload.ts +20 -4
  109. package/src/funcs/transfersGenerateOptions.ts +1 -1
  110. package/src/funcs/transfersGenerateOptionsForAccount.ts +202 -0
  111. package/src/funcs/transfersList.ts +1 -1
  112. package/src/lib/config.ts +3 -3
  113. package/src/lib/files.ts +42 -0
  114. package/src/lib/security.ts +2 -2
  115. package/src/mcp-server/mcp-server.ts +1 -1
  116. package/src/mcp-server/server.ts +3 -1
  117. package/src/mcp-server/tools/transfersGenerateOptions.ts +1 -1
  118. package/src/mcp-server/tools/transfersGenerateOptionsForAccount.ts +46 -0
  119. package/src/models/components/createaccount.ts +10 -10
  120. package/src/models/components/createdtransfer.ts +4 -0
  121. package/src/models/components/createrefundresponse.ts +5 -5
  122. package/src/models/components/index.ts +1 -1
  123. package/src/models/components/transfer.ts +4 -4
  124. package/src/models/components/webhookdata.ts +76 -76
  125. package/src/models/components/webhookdatatransfercreated.ts +7 -10
  126. package/src/models/components/webhookdatatransferstatus.ts +57 -0
  127. package/src/models/components/webhookdatatransferupdated.ts +7 -10
  128. package/src/models/components/webhookdatawallettransactionupdated.ts +10 -13
  129. package/src/models/components/webhookeventtype.ts +1 -0
  130. package/src/models/errors/transfer.ts +6 -6
  131. package/src/models/operations/createtransfer.ts +16 -16
  132. package/src/models/operations/createtransferoptionsforaccount.ts +257 -0
  133. package/src/models/operations/index.ts +1 -0
  134. package/src/models/operations/listtransfers.ts +5 -5
  135. package/src/sdk/transfers.ts +24 -1
  136. package/src/types/constdatetime.ts +1 -1
  137. package/types/constdatetime.js +1 -1
  138. package/models/components/webhookwalletavailablebalance.d.ts +0 -36
  139. package/models/components/webhookwalletavailablebalance.d.ts.map +0 -1
  140. package/models/components/webhookwalletavailablebalance.js +0 -73
  141. package/models/components/webhookwalletavailablebalance.js.map +0 -1
  142. package/src/models/components/webhookwalletavailablebalance.ts +0 -79
@@ -46,16 +46,16 @@ export type CreateTransferRequest = {
46
46
  };
47
47
 
48
48
  export type CreateTransferResponseResult =
49
- | components.AsyncTransfer
49
+ | components.Transfer
50
50
  | components.CreatedTransfer
51
- | components.Transfer;
51
+ | components.AsyncTransfer;
52
52
 
53
53
  export type CreateTransferResponse = {
54
54
  headers: { [k: string]: Array<string> };
55
55
  result:
56
- | components.AsyncTransfer
56
+ | components.Transfer
57
57
  | components.CreatedTransfer
58
- | components.Transfer;
58
+ | components.AsyncTransfer;
59
59
  };
60
60
 
61
61
  /** @internal */
@@ -201,16 +201,16 @@ export const CreateTransferResponseResult$inboundSchema: z.ZodType<
201
201
  z.ZodTypeDef,
202
202
  unknown
203
203
  > = z.union([
204
- components.AsyncTransfer$inboundSchema,
205
- components.CreatedTransfer$inboundSchema,
206
204
  components.Transfer$inboundSchema,
205
+ components.CreatedTransfer$inboundSchema,
206
+ components.AsyncTransfer$inboundSchema,
207
207
  ]);
208
208
 
209
209
  /** @internal */
210
210
  export type CreateTransferResponseResult$Outbound =
211
- | components.AsyncTransfer$Outbound
211
+ | components.Transfer$Outbound
212
212
  | components.CreatedTransfer$Outbound
213
- | components.Transfer$Outbound;
213
+ | components.AsyncTransfer$Outbound;
214
214
 
215
215
  /** @internal */
216
216
  export const CreateTransferResponseResult$outboundSchema: z.ZodType<
@@ -218,9 +218,9 @@ export const CreateTransferResponseResult$outboundSchema: z.ZodType<
218
218
  z.ZodTypeDef,
219
219
  CreateTransferResponseResult
220
220
  > = z.union([
221
- components.AsyncTransfer$outboundSchema,
222
- components.CreatedTransfer$outboundSchema,
223
221
  components.Transfer$outboundSchema,
222
+ components.CreatedTransfer$outboundSchema,
223
+ components.AsyncTransfer$outboundSchema,
224
224
  ]);
225
225
 
226
226
  /**
@@ -264,9 +264,9 @@ export const CreateTransferResponse$inboundSchema: z.ZodType<
264
264
  > = z.object({
265
265
  Headers: z.record(z.array(z.string())),
266
266
  Result: z.union([
267
- components.AsyncTransfer$inboundSchema,
268
- components.CreatedTransfer$inboundSchema,
269
267
  components.Transfer$inboundSchema,
268
+ components.CreatedTransfer$inboundSchema,
269
+ components.AsyncTransfer$inboundSchema,
270
270
  ]),
271
271
  }).transform((v) => {
272
272
  return remap$(v, {
@@ -279,9 +279,9 @@ export const CreateTransferResponse$inboundSchema: z.ZodType<
279
279
  export type CreateTransferResponse$Outbound = {
280
280
  Headers: { [k: string]: Array<string> };
281
281
  Result:
282
- | components.AsyncTransfer$Outbound
282
+ | components.Transfer$Outbound
283
283
  | components.CreatedTransfer$Outbound
284
- | components.Transfer$Outbound;
284
+ | components.AsyncTransfer$Outbound;
285
285
  };
286
286
 
287
287
  /** @internal */
@@ -292,9 +292,9 @@ export const CreateTransferResponse$outboundSchema: z.ZodType<
292
292
  > = z.object({
293
293
  headers: z.record(z.array(z.string())),
294
294
  result: z.union([
295
- components.AsyncTransfer$outboundSchema,
296
- components.CreatedTransfer$outboundSchema,
297
295
  components.Transfer$outboundSchema,
296
+ components.CreatedTransfer$outboundSchema,
297
+ components.AsyncTransfer$outboundSchema,
298
298
  ]),
299
299
  }).transform((v) => {
300
300
  return remap$(v, {
@@ -0,0 +1,257 @@
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 CreateTransferOptionsForAccountGlobals = {
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 CreateTransferOptionsForAccountRequest = {
30
+ /**
31
+ * The partner's Moov account ID.
32
+ */
33
+ accountID: string;
34
+ createTransferOptions: components.CreateTransferOptions;
35
+ };
36
+
37
+ export type CreateTransferOptionsForAccountResponse = {
38
+ headers: { [k: string]: Array<string> };
39
+ result: components.TransferOptions;
40
+ };
41
+
42
+ /** @internal */
43
+ export const CreateTransferOptionsForAccountGlobals$inboundSchema: z.ZodType<
44
+ CreateTransferOptionsForAccountGlobals,
45
+ z.ZodTypeDef,
46
+ unknown
47
+ > = z.object({
48
+ "x-moov-version": z.string().default("v2024.01.00"),
49
+ }).transform((v) => {
50
+ return remap$(v, {
51
+ "x-moov-version": "xMoovVersion",
52
+ });
53
+ });
54
+
55
+ /** @internal */
56
+ export type CreateTransferOptionsForAccountGlobals$Outbound = {
57
+ "x-moov-version": string;
58
+ };
59
+
60
+ /** @internal */
61
+ export const CreateTransferOptionsForAccountGlobals$outboundSchema: z.ZodType<
62
+ CreateTransferOptionsForAccountGlobals$Outbound,
63
+ z.ZodTypeDef,
64
+ CreateTransferOptionsForAccountGlobals
65
+ > = z.object({
66
+ xMoovVersion: z.string().default("v2024.01.00"),
67
+ }).transform((v) => {
68
+ return remap$(v, {
69
+ xMoovVersion: "x-moov-version",
70
+ });
71
+ });
72
+
73
+ /**
74
+ * @internal
75
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
76
+ */
77
+ export namespace CreateTransferOptionsForAccountGlobals$ {
78
+ /** @deprecated use `CreateTransferOptionsForAccountGlobals$inboundSchema` instead. */
79
+ export const inboundSchema =
80
+ CreateTransferOptionsForAccountGlobals$inboundSchema;
81
+ /** @deprecated use `CreateTransferOptionsForAccountGlobals$outboundSchema` instead. */
82
+ export const outboundSchema =
83
+ CreateTransferOptionsForAccountGlobals$outboundSchema;
84
+ /** @deprecated use `CreateTransferOptionsForAccountGlobals$Outbound` instead. */
85
+ export type Outbound = CreateTransferOptionsForAccountGlobals$Outbound;
86
+ }
87
+
88
+ export function createTransferOptionsForAccountGlobalsToJSON(
89
+ createTransferOptionsForAccountGlobals:
90
+ CreateTransferOptionsForAccountGlobals,
91
+ ): string {
92
+ return JSON.stringify(
93
+ CreateTransferOptionsForAccountGlobals$outboundSchema.parse(
94
+ createTransferOptionsForAccountGlobals,
95
+ ),
96
+ );
97
+ }
98
+
99
+ export function createTransferOptionsForAccountGlobalsFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<CreateTransferOptionsForAccountGlobals, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) =>
105
+ CreateTransferOptionsForAccountGlobals$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'CreateTransferOptionsForAccountGlobals' from JSON`,
107
+ );
108
+ }
109
+
110
+ /** @internal */
111
+ export const CreateTransferOptionsForAccountRequest$inboundSchema: z.ZodType<
112
+ CreateTransferOptionsForAccountRequest,
113
+ z.ZodTypeDef,
114
+ unknown
115
+ > = z.object({
116
+ accountID: z.string(),
117
+ CreateTransferOptions: components.CreateTransferOptions$inboundSchema,
118
+ }).transform((v) => {
119
+ return remap$(v, {
120
+ "CreateTransferOptions": "createTransferOptions",
121
+ });
122
+ });
123
+
124
+ /** @internal */
125
+ export type CreateTransferOptionsForAccountRequest$Outbound = {
126
+ accountID: string;
127
+ CreateTransferOptions: components.CreateTransferOptions$Outbound;
128
+ };
129
+
130
+ /** @internal */
131
+ export const CreateTransferOptionsForAccountRequest$outboundSchema: z.ZodType<
132
+ CreateTransferOptionsForAccountRequest$Outbound,
133
+ z.ZodTypeDef,
134
+ CreateTransferOptionsForAccountRequest
135
+ > = z.object({
136
+ accountID: z.string(),
137
+ createTransferOptions: components.CreateTransferOptions$outboundSchema,
138
+ }).transform((v) => {
139
+ return remap$(v, {
140
+ createTransferOptions: "CreateTransferOptions",
141
+ });
142
+ });
143
+
144
+ /**
145
+ * @internal
146
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
147
+ */
148
+ export namespace CreateTransferOptionsForAccountRequest$ {
149
+ /** @deprecated use `CreateTransferOptionsForAccountRequest$inboundSchema` instead. */
150
+ export const inboundSchema =
151
+ CreateTransferOptionsForAccountRequest$inboundSchema;
152
+ /** @deprecated use `CreateTransferOptionsForAccountRequest$outboundSchema` instead. */
153
+ export const outboundSchema =
154
+ CreateTransferOptionsForAccountRequest$outboundSchema;
155
+ /** @deprecated use `CreateTransferOptionsForAccountRequest$Outbound` instead. */
156
+ export type Outbound = CreateTransferOptionsForAccountRequest$Outbound;
157
+ }
158
+
159
+ export function createTransferOptionsForAccountRequestToJSON(
160
+ createTransferOptionsForAccountRequest:
161
+ CreateTransferOptionsForAccountRequest,
162
+ ): string {
163
+ return JSON.stringify(
164
+ CreateTransferOptionsForAccountRequest$outboundSchema.parse(
165
+ createTransferOptionsForAccountRequest,
166
+ ),
167
+ );
168
+ }
169
+
170
+ export function createTransferOptionsForAccountRequestFromJSON(
171
+ jsonString: string,
172
+ ): SafeParseResult<CreateTransferOptionsForAccountRequest, SDKValidationError> {
173
+ return safeParse(
174
+ jsonString,
175
+ (x) =>
176
+ CreateTransferOptionsForAccountRequest$inboundSchema.parse(JSON.parse(x)),
177
+ `Failed to parse 'CreateTransferOptionsForAccountRequest' from JSON`,
178
+ );
179
+ }
180
+
181
+ /** @internal */
182
+ export const CreateTransferOptionsForAccountResponse$inboundSchema: z.ZodType<
183
+ CreateTransferOptionsForAccountResponse,
184
+ z.ZodTypeDef,
185
+ unknown
186
+ > = z.object({
187
+ Headers: z.record(z.array(z.string())),
188
+ Result: components.TransferOptions$inboundSchema,
189
+ }).transform((v) => {
190
+ return remap$(v, {
191
+ "Headers": "headers",
192
+ "Result": "result",
193
+ });
194
+ });
195
+
196
+ /** @internal */
197
+ export type CreateTransferOptionsForAccountResponse$Outbound = {
198
+ Headers: { [k: string]: Array<string> };
199
+ Result: components.TransferOptions$Outbound;
200
+ };
201
+
202
+ /** @internal */
203
+ export const CreateTransferOptionsForAccountResponse$outboundSchema: z.ZodType<
204
+ CreateTransferOptionsForAccountResponse$Outbound,
205
+ z.ZodTypeDef,
206
+ CreateTransferOptionsForAccountResponse
207
+ > = z.object({
208
+ headers: z.record(z.array(z.string())),
209
+ result: components.TransferOptions$outboundSchema,
210
+ }).transform((v) => {
211
+ return remap$(v, {
212
+ headers: "Headers",
213
+ result: "Result",
214
+ });
215
+ });
216
+
217
+ /**
218
+ * @internal
219
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
220
+ */
221
+ export namespace CreateTransferOptionsForAccountResponse$ {
222
+ /** @deprecated use `CreateTransferOptionsForAccountResponse$inboundSchema` instead. */
223
+ export const inboundSchema =
224
+ CreateTransferOptionsForAccountResponse$inboundSchema;
225
+ /** @deprecated use `CreateTransferOptionsForAccountResponse$outboundSchema` instead. */
226
+ export const outboundSchema =
227
+ CreateTransferOptionsForAccountResponse$outboundSchema;
228
+ /** @deprecated use `CreateTransferOptionsForAccountResponse$Outbound` instead. */
229
+ export type Outbound = CreateTransferOptionsForAccountResponse$Outbound;
230
+ }
231
+
232
+ export function createTransferOptionsForAccountResponseToJSON(
233
+ createTransferOptionsForAccountResponse:
234
+ CreateTransferOptionsForAccountResponse,
235
+ ): string {
236
+ return JSON.stringify(
237
+ CreateTransferOptionsForAccountResponse$outboundSchema.parse(
238
+ createTransferOptionsForAccountResponse,
239
+ ),
240
+ );
241
+ }
242
+
243
+ export function createTransferOptionsForAccountResponseFromJSON(
244
+ jsonString: string,
245
+ ): SafeParseResult<
246
+ CreateTransferOptionsForAccountResponse,
247
+ SDKValidationError
248
+ > {
249
+ return safeParse(
250
+ jsonString,
251
+ (x) =>
252
+ CreateTransferOptionsForAccountResponse$inboundSchema.parse(
253
+ JSON.parse(x),
254
+ ),
255
+ `Failed to parse 'CreateTransferOptionsForAccountResponse' from JSON`,
256
+ );
257
+ }
@@ -23,6 +23,7 @@ export * from "./createsweepconfig.js";
23
23
  export * from "./createterminalapplication.js";
24
24
  export * from "./createtransfer.js";
25
25
  export * from "./createtransferoptions.js";
26
+ export * from "./createtransferoptionsforaccount.js";
26
27
  export * from "./deletedisputeevidencefile.js";
27
28
  export * from "./deleterepresentative.js";
28
29
  export * from "./deleteterminalapplication.js";
@@ -52,9 +52,9 @@ export type ListTransfersRequest = {
52
52
  */
53
53
  scheduleID?: string | undefined;
54
54
  /**
55
- * Optional ID to filter for transfers associated with the payment link.
55
+ * Optional code to filter for transfers associated with the payment link.
56
56
  */
57
- paymentLinkID?: string | undefined;
57
+ paymentLinkCode?: string | undefined;
58
58
  /**
59
59
  * Optional parameter to only return refunded transfers.
60
60
  */
@@ -150,7 +150,7 @@ export const ListTransfersRequest$inboundSchema: z.ZodType<
150
150
  .optional(),
151
151
  groupID: z.string().optional(),
152
152
  scheduleID: z.string().optional(),
153
- paymentLinkID: z.string().optional(),
153
+ paymentLinkCode: z.string().optional(),
154
154
  refunded: z.boolean().optional(),
155
155
  disputed: z.boolean().optional(),
156
156
  skip: z.number().int().optional(),
@@ -166,7 +166,7 @@ export type ListTransfersRequest$Outbound = {
166
166
  endDateTime?: string | undefined;
167
167
  groupID?: string | undefined;
168
168
  scheduleID?: string | undefined;
169
- paymentLinkID?: string | undefined;
169
+ paymentLinkCode?: string | undefined;
170
170
  refunded?: boolean | undefined;
171
171
  disputed?: boolean | undefined;
172
172
  skip?: number | undefined;
@@ -186,7 +186,7 @@ export const ListTransfersRequest$outboundSchema: z.ZodType<
186
186
  endDateTime: z.date().transform(v => v.toISOString()).optional(),
187
187
  groupID: z.string().optional(),
188
188
  scheduleID: z.string().optional(),
189
- paymentLinkID: z.string().optional(),
189
+ paymentLinkCode: z.string().optional(),
190
190
  refunded: z.boolean().optional(),
191
191
  disputed: z.boolean().optional(),
192
192
  skip: z.number().int().optional(),
@@ -6,6 +6,7 @@ import { transfersCreate } from "../funcs/transfersCreate.js";
6
6
  import { transfersCreateCancellation } from "../funcs/transfersCreateCancellation.js";
7
7
  import { transfersCreateReversal } from "../funcs/transfersCreateReversal.js";
8
8
  import { transfersGenerateOptions } from "../funcs/transfersGenerateOptions.js";
9
+ import { transfersGenerateOptionsForAccount } from "../funcs/transfersGenerateOptionsForAccount.js";
9
10
  import { transfersGet } from "../funcs/transfersGet.js";
10
11
  import { transfersGetCancellation } from "../funcs/transfersGetCancellation.js";
11
12
  import { transfersGetRefund } from "../funcs/transfersGetRefund.js";
@@ -19,6 +20,28 @@ import * as operations from "../models/operations/index.js";
19
20
  import { unwrapAsync } from "../types/fp.js";
20
21
 
21
22
  export class Transfers extends ClientSDK {
23
+ /**
24
+ * Generate available payment method options for one or multiple transfer participants depending on the accountID or paymentMethodID you
25
+ * supply in the request body.
26
+ *
27
+ * The accountID in the route should the partner's accountID.
28
+ *
29
+ * Read our [transfers overview guide](https://docs.moov.io/guides/money-movement/overview/) to learn more.
30
+ *
31
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
32
+ * you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
33
+ */
34
+ async generateOptionsForAccount(
35
+ request: operations.CreateTransferOptionsForAccountRequest,
36
+ options?: RequestOptions,
37
+ ): Promise<operations.CreateTransferOptionsForAccountResponse> {
38
+ return unwrapAsync(transfersGenerateOptionsForAccount(
39
+ this,
40
+ request,
41
+ options,
42
+ ));
43
+ }
44
+
22
45
  /**
23
46
  * Move money by providing the source, destination, and amount in the request body.
24
47
  *
@@ -215,7 +238,7 @@ export class Transfers extends ClientSDK {
215
238
  * Read our [transfers overview guide](https://docs.moov.io/guides/money-movement/overview/) to learn more.
216
239
  *
217
240
  * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
218
- * you'll need to specify the `/accounts/{accountID}/transfers.read` scope.
241
+ * you'll need to specify the `/accounts/{accountID}/transfers.write` scope.
219
242
  */
220
243
  async generateOptions(
221
244
  request: components.CreateTransferOptions,
@@ -11,5 +11,5 @@ export function constDateTime(
11
11
  return (
12
12
  typeof v === "string" && new Date(v).getTime() === new Date(val).getTime()
13
13
  );
14
- }, `Value must be equivelant to ${val}`);
14
+ }, `Value must be equivalent to ${val}`);
15
15
  }
@@ -41,6 +41,6 @@ const z = __importStar(require("zod"));
41
41
  function constDateTime(val) {
42
42
  return z.custom((v) => {
43
43
  return (typeof v === "string" && new Date(v).getTime() === new Date(val).getTime());
44
- }, `Value must be equivelant to ${val}`);
44
+ }, `Value must be equivalent to ${val}`);
45
45
  }
46
46
  //# sourceMappingURL=constdatetime.js.map
@@ -1,36 +0,0 @@
1
- import * as z from "zod";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- /**
5
- * The available balance of a wallet.
6
- */
7
- export type WebhookWalletAvailableBalance = {
8
- currency: string;
9
- value: number;
10
- valueDecimal: string;
11
- };
12
- /** @internal */
13
- export declare const WebhookWalletAvailableBalance$inboundSchema: z.ZodType<WebhookWalletAvailableBalance, z.ZodTypeDef, unknown>;
14
- /** @internal */
15
- export type WebhookWalletAvailableBalance$Outbound = {
16
- currency: string;
17
- value: number;
18
- valueDecimal: string;
19
- };
20
- /** @internal */
21
- export declare const WebhookWalletAvailableBalance$outboundSchema: z.ZodType<WebhookWalletAvailableBalance$Outbound, z.ZodTypeDef, WebhookWalletAvailableBalance>;
22
- /**
23
- * @internal
24
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
25
- */
26
- export declare namespace WebhookWalletAvailableBalance$ {
27
- /** @deprecated use `WebhookWalletAvailableBalance$inboundSchema` instead. */
28
- const inboundSchema: z.ZodType<WebhookWalletAvailableBalance, z.ZodTypeDef, unknown>;
29
- /** @deprecated use `WebhookWalletAvailableBalance$outboundSchema` instead. */
30
- const outboundSchema: z.ZodType<WebhookWalletAvailableBalance$Outbound, z.ZodTypeDef, WebhookWalletAvailableBalance>;
31
- /** @deprecated use `WebhookWalletAvailableBalance$Outbound` instead. */
32
- type Outbound = WebhookWalletAvailableBalance$Outbound;
33
- }
34
- export declare function webhookWalletAvailableBalanceToJSON(webhookWalletAvailableBalance: WebhookWalletAvailableBalance): string;
35
- export declare function webhookWalletAvailableBalanceFromJSON(jsonString: string): SafeParseResult<WebhookWalletAvailableBalance, SDKValidationError>;
36
- //# sourceMappingURL=webhookwalletavailablebalance.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhookwalletavailablebalance.d.ts","sourceRoot":"","sources":["../../src/models/components/webhookwalletavailablebalance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2CAA2C,EAAE,CAAC,CAAC,OAAO,CACjE,6BAA6B,EAC7B,CAAC,CAAC,UAAU,EACZ,OAAO,CAKP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,sCAAsC,GAAG;IACnD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,sCAAsC,EACtC,CAAC,CAAC,UAAU,EACZ,6BAA6B,CAK7B,CAAC;AAEH;;;GAGG;AACH,yBAAiB,8BAA8B,CAAC;IAC9C,6EAA6E;IACtE,MAAM,aAAa,iEAA8C,CAAC;IACzE,8EAA8E;IACvE,MAAM,cAAc,gGAA+C,CAAC;IAC3E,wEAAwE;IACxE,KAAY,QAAQ,GAAG,sCAAsC,CAAC;CAC/D;AAED,wBAAgB,mCAAmC,CACjD,6BAA6B,EAAE,6BAA6B,GAC3D,MAAM,CAMR;AAED,wBAAgB,qCAAqC,CACnD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,6BAA6B,EAAE,kBAAkB,CAAC,CAMpE"}
@@ -1,73 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.WebhookWalletAvailableBalance$ = exports.WebhookWalletAvailableBalance$outboundSchema = exports.WebhookWalletAvailableBalance$inboundSchema = void 0;
40
- exports.webhookWalletAvailableBalanceToJSON = webhookWalletAvailableBalanceToJSON;
41
- exports.webhookWalletAvailableBalanceFromJSON = webhookWalletAvailableBalanceFromJSON;
42
- const z = __importStar(require("zod"));
43
- const schemas_js_1 = require("../../lib/schemas.js");
44
- /** @internal */
45
- exports.WebhookWalletAvailableBalance$inboundSchema = z.object({
46
- currency: z.string(),
47
- value: z.number().int(),
48
- valueDecimal: z.string(),
49
- });
50
- /** @internal */
51
- exports.WebhookWalletAvailableBalance$outboundSchema = z.object({
52
- currency: z.string(),
53
- value: z.number().int(),
54
- valueDecimal: z.string(),
55
- });
56
- /**
57
- * @internal
58
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
59
- */
60
- var WebhookWalletAvailableBalance$;
61
- (function (WebhookWalletAvailableBalance$) {
62
- /** @deprecated use `WebhookWalletAvailableBalance$inboundSchema` instead. */
63
- WebhookWalletAvailableBalance$.inboundSchema = exports.WebhookWalletAvailableBalance$inboundSchema;
64
- /** @deprecated use `WebhookWalletAvailableBalance$outboundSchema` instead. */
65
- WebhookWalletAvailableBalance$.outboundSchema = exports.WebhookWalletAvailableBalance$outboundSchema;
66
- })(WebhookWalletAvailableBalance$ || (exports.WebhookWalletAvailableBalance$ = WebhookWalletAvailableBalance$ = {}));
67
- function webhookWalletAvailableBalanceToJSON(webhookWalletAvailableBalance) {
68
- return JSON.stringify(exports.WebhookWalletAvailableBalance$outboundSchema.parse(webhookWalletAvailableBalance));
69
- }
70
- function webhookWalletAvailableBalanceFromJSON(jsonString) {
71
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.WebhookWalletAvailableBalance$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebhookWalletAvailableBalance' from JSON`);
72
- }
73
- //# sourceMappingURL=webhookwalletavailablebalance.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhookwalletavailablebalance.js","sourceRoot":"","sources":["../../src/models/components/webhookwalletavailablebalance.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0DH,kFAQC;AAED,sFAQC;AA1ED,uCAAyB;AACzB,qDAAiD;AAajD,gBAAgB;AACH,QAAA,2CAA2C,GAIpD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AASH,gBAAgB;AACH,QAAA,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IACvB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;CACzB,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,8BAA8B,CAO9C;AAPD,WAAiB,8BAA8B;IAC7C,6EAA6E;IAChE,4CAAa,GAAG,mDAA2C,CAAC;IACzE,8EAA8E;IACjE,6CAAc,GAAG,oDAA4C,CAAC;AAG7E,CAAC,EAPgB,8BAA8B,8CAA9B,8BAA8B,QAO9C;AAED,SAAgB,mCAAmC,CACjD,6BAA4D;IAE5D,OAAO,IAAI,CAAC,SAAS,CACnB,oDAA4C,CAAC,KAAK,CAChD,6BAA6B,CAC9B,CACF,CAAC;AACJ,CAAC;AAED,SAAgB,qCAAqC,CACnD,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,mDAA2C,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvE,2DAA2D,CAC5D,CAAC;AACJ,CAAC"}
@@ -1,79 +0,0 @@
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
- /**
11
- * The available balance of a wallet.
12
- */
13
- export type WebhookWalletAvailableBalance = {
14
- currency: string;
15
- value: number;
16
- valueDecimal: string;
17
- };
18
-
19
- /** @internal */
20
- export const WebhookWalletAvailableBalance$inboundSchema: z.ZodType<
21
- WebhookWalletAvailableBalance,
22
- z.ZodTypeDef,
23
- unknown
24
- > = z.object({
25
- currency: z.string(),
26
- value: z.number().int(),
27
- valueDecimal: z.string(),
28
- });
29
-
30
- /** @internal */
31
- export type WebhookWalletAvailableBalance$Outbound = {
32
- currency: string;
33
- value: number;
34
- valueDecimal: string;
35
- };
36
-
37
- /** @internal */
38
- export const WebhookWalletAvailableBalance$outboundSchema: z.ZodType<
39
- WebhookWalletAvailableBalance$Outbound,
40
- z.ZodTypeDef,
41
- WebhookWalletAvailableBalance
42
- > = z.object({
43
- currency: z.string(),
44
- value: z.number().int(),
45
- valueDecimal: z.string(),
46
- });
47
-
48
- /**
49
- * @internal
50
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
51
- */
52
- export namespace WebhookWalletAvailableBalance$ {
53
- /** @deprecated use `WebhookWalletAvailableBalance$inboundSchema` instead. */
54
- export const inboundSchema = WebhookWalletAvailableBalance$inboundSchema;
55
- /** @deprecated use `WebhookWalletAvailableBalance$outboundSchema` instead. */
56
- export const outboundSchema = WebhookWalletAvailableBalance$outboundSchema;
57
- /** @deprecated use `WebhookWalletAvailableBalance$Outbound` instead. */
58
- export type Outbound = WebhookWalletAvailableBalance$Outbound;
59
- }
60
-
61
- export function webhookWalletAvailableBalanceToJSON(
62
- webhookWalletAvailableBalance: WebhookWalletAvailableBalance,
63
- ): string {
64
- return JSON.stringify(
65
- WebhookWalletAvailableBalance$outboundSchema.parse(
66
- webhookWalletAvailableBalance,
67
- ),
68
- );
69
- }
70
-
71
- export function webhookWalletAvailableBalanceFromJSON(
72
- jsonString: string,
73
- ): SafeParseResult<WebhookWalletAvailableBalance, SDKValidationError> {
74
- return safeParse(
75
- jsonString,
76
- (x) => WebhookWalletAvailableBalance$inboundSchema.parse(JSON.parse(x)),
77
- `Failed to parse 'WebhookWalletAvailableBalance' from JSON`,
78
- );
79
- }