@moovio/sdk 0.14.24 → 0.14.26

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 (78) hide show
  1. package/bin/mcp-server.js +292 -228
  2. package/bin/mcp-server.js.map +20 -19
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/lib/security.d.ts.map +1 -1
  8. package/lib/security.js.map +1 -1
  9. package/mcp-server/mcp-server.js +1 -1
  10. package/mcp-server/server.js +1 -1
  11. package/models/components/index.d.ts +3 -2
  12. package/models/components/index.d.ts.map +1 -1
  13. package/models/components/index.js +3 -2
  14. package/models/components/index.js.map +1 -1
  15. package/models/components/webhookdata.d.ts +5 -2
  16. package/models/components/webhookdata.d.ts.map +1 -1
  17. package/models/components/webhookdata.js +9 -0
  18. package/models/components/webhookdata.js.map +1 -1
  19. package/models/components/webhookdataticketcreated.d.ts +31 -0
  20. package/models/components/webhookdataticketcreated.d.ts.map +1 -0
  21. package/models/components/{countrieserrors.js → webhookdataticketcreated.js} +21 -19
  22. package/models/components/webhookdataticketcreated.js.map +1 -0
  23. package/models/components/webhookdataticketmessageadded.d.ts +31 -0
  24. package/models/components/webhookdataticketmessageadded.d.ts.map +1 -0
  25. package/models/components/{capabilitieserror.js → webhookdataticketmessageadded.js} +21 -19
  26. package/models/components/webhookdataticketmessageadded.js.map +1 -0
  27. package/models/components/webhookdataticketupdated.d.ts +34 -0
  28. package/models/components/webhookdataticketupdated.d.ts.map +1 -0
  29. package/models/components/webhookdataticketupdated.js +74 -0
  30. package/models/components/webhookdataticketupdated.js.map +1 -0
  31. package/models/components/webhookeventtype.d.ts +9 -0
  32. package/models/components/webhookeventtype.d.ts.map +1 -1
  33. package/models/components/webhookeventtype.js +3 -0
  34. package/models/components/webhookeventtype.js.map +1 -1
  35. package/models/errors/addcapabilitieserror.d.ts +12 -4
  36. package/models/errors/addcapabilitieserror.d.ts.map +1 -1
  37. package/models/errors/addcapabilitieserror.js +6 -3
  38. package/models/errors/addcapabilitieserror.js.map +1 -1
  39. package/models/errors/assigncountrieserror.d.ts +9 -4
  40. package/models/errors/assigncountrieserror.d.ts.map +1 -1
  41. package/models/errors/assigncountrieserror.js +3 -4
  42. package/models/errors/assigncountrieserror.js.map +1 -1
  43. package/models/errors/filevalidationerror.d.ts +3 -0
  44. package/models/errors/filevalidationerror.d.ts.map +1 -1
  45. package/models/errors/filevalidationerror.js +13 -1
  46. package/models/errors/filevalidationerror.js.map +1 -1
  47. package/models/errors/patchaccounterror.d.ts +3 -0
  48. package/models/errors/patchaccounterror.d.ts.map +1 -1
  49. package/models/errors/patchaccounterror.js +4 -0
  50. package/models/errors/patchaccounterror.js.map +1 -1
  51. package/models/errors/upsertunderwritingerror.d.ts +3 -0
  52. package/models/errors/upsertunderwritingerror.d.ts.map +1 -1
  53. package/models/errors/upsertunderwritingerror.js +4 -0
  54. package/models/errors/upsertunderwritingerror.js.map +1 -1
  55. package/package.json +1 -1
  56. package/src/lib/config.ts +3 -3
  57. package/src/lib/security.ts +4 -1
  58. package/src/mcp-server/mcp-server.ts +1 -1
  59. package/src/mcp-server/server.ts +1 -1
  60. package/src/models/components/index.ts +3 -2
  61. package/src/models/components/webhookdata.ts +30 -0
  62. package/src/models/components/webhookdataticketcreated.ts +70 -0
  63. package/src/models/components/webhookdataticketmessageadded.ts +72 -0
  64. package/src/models/components/webhookdataticketupdated.ts +79 -0
  65. package/src/models/components/webhookeventtype.ts +3 -0
  66. package/src/models/errors/addcapabilitieserror.ts +11 -6
  67. package/src/models/errors/assigncountrieserror.ts +6 -7
  68. package/src/models/errors/filevalidationerror.ts +24 -7
  69. package/src/models/errors/patchaccounterror.ts +6 -0
  70. package/src/models/errors/upsertunderwritingerror.ts +6 -0
  71. package/models/components/capabilitieserror.d.ts +0 -33
  72. package/models/components/capabilitieserror.d.ts.map +0 -1
  73. package/models/components/capabilitieserror.js.map +0 -1
  74. package/models/components/countrieserrors.d.ts +0 -33
  75. package/models/components/countrieserrors.d.ts.map +0 -1
  76. package/models/components/countrieserrors.js.map +0 -1
  77. package/src/models/components/capabilitieserror.ts +0 -66
  78. package/src/models/components/countrieserrors.ts +0 -64
@@ -168,7 +168,7 @@ export function createMCPServer(deps: {
168
168
  }) {
169
169
  const server = new McpServer({
170
170
  name: "Moov",
171
- version: "0.14.24",
171
+ version: "0.14.26",
172
172
  });
173
173
 
174
174
  const client = new MoovCore({
@@ -73,7 +73,6 @@ export * from "./businesstype.js";
73
73
  export * from "./calltoaction.js";
74
74
  export * from "./cancellation.js";
75
75
  export * from "./cancellationstatus.js";
76
- export * from "./capabilitieserror.js";
77
76
  export * from "./capability.js";
78
77
  export * from "./capabilityid.js";
79
78
  export * from "./capabilityrequirement.js";
@@ -116,7 +115,6 @@ export * from "./completebankaccountverification.js";
116
115
  export * from "./completedmicrodeposits.js";
117
116
  export * from "./completemicrodeposits.js";
118
117
  export * from "./contact.js";
119
- export * from "./countrieserrors.js";
120
118
  export * from "./createaccount.js";
121
119
  export * from "./createaccountsettings.js";
122
120
  export * from "./createaccounttype.js";
@@ -445,6 +443,9 @@ export * from "./webhookdatasweepcreated.js";
445
443
  export * from "./webhookdatasweepupdated.js";
446
444
  export * from "./webhookdataterminalapplicationcreated.js";
447
445
  export * from "./webhookdataterminalapplicationupdated.js";
446
+ export * from "./webhookdataticketcreated.js";
447
+ export * from "./webhookdataticketmessageadded.js";
448
+ export * from "./webhookdataticketupdated.js";
448
449
  export * from "./webhookdatatransfercreated.js";
449
450
  export * from "./webhookdatatransferstatus.js";
450
451
  export * from "./webhookdatatransferupdated.js";
@@ -162,6 +162,24 @@ import {
162
162
  WebhookDataTerminalApplicationUpdated$Outbound,
163
163
  WebhookDataTerminalApplicationUpdated$outboundSchema,
164
164
  } from "./webhookdataterminalapplicationupdated.js";
165
+ import {
166
+ WebhookDataTicketCreated,
167
+ WebhookDataTicketCreated$inboundSchema,
168
+ WebhookDataTicketCreated$Outbound,
169
+ WebhookDataTicketCreated$outboundSchema,
170
+ } from "./webhookdataticketcreated.js";
171
+ import {
172
+ WebhookDataTicketMessageAdded,
173
+ WebhookDataTicketMessageAdded$inboundSchema,
174
+ WebhookDataTicketMessageAdded$Outbound,
175
+ WebhookDataTicketMessageAdded$outboundSchema,
176
+ } from "./webhookdataticketmessageadded.js";
177
+ import {
178
+ WebhookDataTicketUpdated,
179
+ WebhookDataTicketUpdated$inboundSchema,
180
+ WebhookDataTicketUpdated$Outbound,
181
+ WebhookDataTicketUpdated$outboundSchema,
182
+ } from "./webhookdataticketupdated.js";
165
183
  import {
166
184
  WebhookDataTransferCreated,
167
185
  WebhookDataTransferCreated$inboundSchema,
@@ -199,6 +217,7 @@ export type WebhookData =
199
217
  | WebhookDataPaymentMethodDisabled
200
218
  | WebhookDataRefundCreated
201
219
  | WebhookDataSweepUpdated
220
+ | WebhookDataTicketUpdated
202
221
  | WebhookDataTransferCreated
203
222
  | WebhookDataBalanceUpdated
204
223
  | WebhookDataBankAccountCreated
@@ -210,6 +229,8 @@ export type WebhookData =
210
229
  | WebhookDataSweepCreated
211
230
  | WebhookDataTerminalApplicationCreated
212
231
  | WebhookDataTerminalApplicationUpdated
232
+ | WebhookDataTicketCreated
233
+ | WebhookDataTicketMessageAdded
213
234
  | WebhookDataAccountCreated
214
235
  | WebhookDataAccountUpdated
215
236
  | WebhookDataAccountDisconnected
@@ -235,6 +256,7 @@ export const WebhookData$inboundSchema: z.ZodType<
235
256
  WebhookDataPaymentMethodDisabled$inboundSchema,
236
257
  WebhookDataRefundCreated$inboundSchema,
237
258
  WebhookDataSweepUpdated$inboundSchema,
259
+ WebhookDataTicketUpdated$inboundSchema,
238
260
  WebhookDataTransferCreated$inboundSchema,
239
261
  WebhookDataBalanceUpdated$inboundSchema,
240
262
  WebhookDataBankAccountCreated$inboundSchema,
@@ -246,6 +268,8 @@ export const WebhookData$inboundSchema: z.ZodType<
246
268
  WebhookDataSweepCreated$inboundSchema,
247
269
  WebhookDataTerminalApplicationCreated$inboundSchema,
248
270
  WebhookDataTerminalApplicationUpdated$inboundSchema,
271
+ WebhookDataTicketCreated$inboundSchema,
272
+ WebhookDataTicketMessageAdded$inboundSchema,
249
273
  WebhookDataAccountCreated$inboundSchema,
250
274
  WebhookDataAccountUpdated$inboundSchema,
251
275
  WebhookDataAccountDisconnected$inboundSchema,
@@ -268,6 +292,7 @@ export type WebhookData$Outbound =
268
292
  | WebhookDataPaymentMethodDisabled$Outbound
269
293
  | WebhookDataRefundCreated$Outbound
270
294
  | WebhookDataSweepUpdated$Outbound
295
+ | WebhookDataTicketUpdated$Outbound
271
296
  | WebhookDataTransferCreated$Outbound
272
297
  | WebhookDataBalanceUpdated$Outbound
273
298
  | WebhookDataBankAccountCreated$Outbound
@@ -279,6 +304,8 @@ export type WebhookData$Outbound =
279
304
  | WebhookDataSweepCreated$Outbound
280
305
  | WebhookDataTerminalApplicationCreated$Outbound
281
306
  | WebhookDataTerminalApplicationUpdated$Outbound
307
+ | WebhookDataTicketCreated$Outbound
308
+ | WebhookDataTicketMessageAdded$Outbound
282
309
  | WebhookDataAccountCreated$Outbound
283
310
  | WebhookDataAccountUpdated$Outbound
284
311
  | WebhookDataAccountDisconnected$Outbound
@@ -304,6 +331,7 @@ export const WebhookData$outboundSchema: z.ZodType<
304
331
  WebhookDataPaymentMethodDisabled$outboundSchema,
305
332
  WebhookDataRefundCreated$outboundSchema,
306
333
  WebhookDataSweepUpdated$outboundSchema,
334
+ WebhookDataTicketUpdated$outboundSchema,
307
335
  WebhookDataTransferCreated$outboundSchema,
308
336
  WebhookDataBalanceUpdated$outboundSchema,
309
337
  WebhookDataBankAccountCreated$outboundSchema,
@@ -315,6 +343,8 @@ export const WebhookData$outboundSchema: z.ZodType<
315
343
  WebhookDataSweepCreated$outboundSchema,
316
344
  WebhookDataTerminalApplicationCreated$outboundSchema,
317
345
  WebhookDataTerminalApplicationUpdated$outboundSchema,
346
+ WebhookDataTicketCreated$outboundSchema,
347
+ WebhookDataTicketMessageAdded$outboundSchema,
318
348
  WebhookDataAccountCreated$outboundSchema,
319
349
  WebhookDataAccountUpdated$outboundSchema,
320
350
  WebhookDataAccountDisconnected$outboundSchema,
@@ -0,0 +1,70 @@
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 WebhookDataTicketCreated = {
11
+ accountID: string;
12
+ ticketID: string;
13
+ };
14
+
15
+ /** @internal */
16
+ export const WebhookDataTicketCreated$inboundSchema: z.ZodType<
17
+ WebhookDataTicketCreated,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ accountID: z.string(),
22
+ ticketID: z.string(),
23
+ });
24
+
25
+ /** @internal */
26
+ export type WebhookDataTicketCreated$Outbound = {
27
+ accountID: string;
28
+ ticketID: string;
29
+ };
30
+
31
+ /** @internal */
32
+ export const WebhookDataTicketCreated$outboundSchema: z.ZodType<
33
+ WebhookDataTicketCreated$Outbound,
34
+ z.ZodTypeDef,
35
+ WebhookDataTicketCreated
36
+ > = z.object({
37
+ accountID: z.string(),
38
+ ticketID: z.string(),
39
+ });
40
+
41
+ /**
42
+ * @internal
43
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
44
+ */
45
+ export namespace WebhookDataTicketCreated$ {
46
+ /** @deprecated use `WebhookDataTicketCreated$inboundSchema` instead. */
47
+ export const inboundSchema = WebhookDataTicketCreated$inboundSchema;
48
+ /** @deprecated use `WebhookDataTicketCreated$outboundSchema` instead. */
49
+ export const outboundSchema = WebhookDataTicketCreated$outboundSchema;
50
+ /** @deprecated use `WebhookDataTicketCreated$Outbound` instead. */
51
+ export type Outbound = WebhookDataTicketCreated$Outbound;
52
+ }
53
+
54
+ export function webhookDataTicketCreatedToJSON(
55
+ webhookDataTicketCreated: WebhookDataTicketCreated,
56
+ ): string {
57
+ return JSON.stringify(
58
+ WebhookDataTicketCreated$outboundSchema.parse(webhookDataTicketCreated),
59
+ );
60
+ }
61
+
62
+ export function webhookDataTicketCreatedFromJSON(
63
+ jsonString: string,
64
+ ): SafeParseResult<WebhookDataTicketCreated, SDKValidationError> {
65
+ return safeParse(
66
+ jsonString,
67
+ (x) => WebhookDataTicketCreated$inboundSchema.parse(JSON.parse(x)),
68
+ `Failed to parse 'WebhookDataTicketCreated' from JSON`,
69
+ );
70
+ }
@@ -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 WebhookDataTicketMessageAdded = {
11
+ accountID: string;
12
+ ticketID: string;
13
+ };
14
+
15
+ /** @internal */
16
+ export const WebhookDataTicketMessageAdded$inboundSchema: z.ZodType<
17
+ WebhookDataTicketMessageAdded,
18
+ z.ZodTypeDef,
19
+ unknown
20
+ > = z.object({
21
+ accountID: z.string(),
22
+ ticketID: z.string(),
23
+ });
24
+
25
+ /** @internal */
26
+ export type WebhookDataTicketMessageAdded$Outbound = {
27
+ accountID: string;
28
+ ticketID: string;
29
+ };
30
+
31
+ /** @internal */
32
+ export const WebhookDataTicketMessageAdded$outboundSchema: z.ZodType<
33
+ WebhookDataTicketMessageAdded$Outbound,
34
+ z.ZodTypeDef,
35
+ WebhookDataTicketMessageAdded
36
+ > = z.object({
37
+ accountID: z.string(),
38
+ ticketID: z.string(),
39
+ });
40
+
41
+ /**
42
+ * @internal
43
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
44
+ */
45
+ export namespace WebhookDataTicketMessageAdded$ {
46
+ /** @deprecated use `WebhookDataTicketMessageAdded$inboundSchema` instead. */
47
+ export const inboundSchema = WebhookDataTicketMessageAdded$inboundSchema;
48
+ /** @deprecated use `WebhookDataTicketMessageAdded$outboundSchema` instead. */
49
+ export const outboundSchema = WebhookDataTicketMessageAdded$outboundSchema;
50
+ /** @deprecated use `WebhookDataTicketMessageAdded$Outbound` instead. */
51
+ export type Outbound = WebhookDataTicketMessageAdded$Outbound;
52
+ }
53
+
54
+ export function webhookDataTicketMessageAddedToJSON(
55
+ webhookDataTicketMessageAdded: WebhookDataTicketMessageAdded,
56
+ ): string {
57
+ return JSON.stringify(
58
+ WebhookDataTicketMessageAdded$outboundSchema.parse(
59
+ webhookDataTicketMessageAdded,
60
+ ),
61
+ );
62
+ }
63
+
64
+ export function webhookDataTicketMessageAddedFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<WebhookDataTicketMessageAdded, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => WebhookDataTicketMessageAdded$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'WebhookDataTicketMessageAdded' from JSON`,
71
+ );
72
+ }
@@ -0,0 +1,79 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ TicketStatus,
11
+ TicketStatus$inboundSchema,
12
+ TicketStatus$outboundSchema,
13
+ } from "./ticketstatus.js";
14
+
15
+ export type WebhookDataTicketUpdated = {
16
+ accountID: string;
17
+ ticketID: string;
18
+ status: TicketStatus;
19
+ };
20
+
21
+ /** @internal */
22
+ export const WebhookDataTicketUpdated$inboundSchema: z.ZodType<
23
+ WebhookDataTicketUpdated,
24
+ z.ZodTypeDef,
25
+ unknown
26
+ > = z.object({
27
+ accountID: z.string(),
28
+ ticketID: z.string(),
29
+ status: TicketStatus$inboundSchema,
30
+ });
31
+
32
+ /** @internal */
33
+ export type WebhookDataTicketUpdated$Outbound = {
34
+ accountID: string;
35
+ ticketID: string;
36
+ status: string;
37
+ };
38
+
39
+ /** @internal */
40
+ export const WebhookDataTicketUpdated$outboundSchema: z.ZodType<
41
+ WebhookDataTicketUpdated$Outbound,
42
+ z.ZodTypeDef,
43
+ WebhookDataTicketUpdated
44
+ > = z.object({
45
+ accountID: z.string(),
46
+ ticketID: z.string(),
47
+ status: TicketStatus$outboundSchema,
48
+ });
49
+
50
+ /**
51
+ * @internal
52
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
53
+ */
54
+ export namespace WebhookDataTicketUpdated$ {
55
+ /** @deprecated use `WebhookDataTicketUpdated$inboundSchema` instead. */
56
+ export const inboundSchema = WebhookDataTicketUpdated$inboundSchema;
57
+ /** @deprecated use `WebhookDataTicketUpdated$outboundSchema` instead. */
58
+ export const outboundSchema = WebhookDataTicketUpdated$outboundSchema;
59
+ /** @deprecated use `WebhookDataTicketUpdated$Outbound` instead. */
60
+ export type Outbound = WebhookDataTicketUpdated$Outbound;
61
+ }
62
+
63
+ export function webhookDataTicketUpdatedToJSON(
64
+ webhookDataTicketUpdated: WebhookDataTicketUpdated,
65
+ ): string {
66
+ return JSON.stringify(
67
+ WebhookDataTicketUpdated$outboundSchema.parse(webhookDataTicketUpdated),
68
+ );
69
+ }
70
+
71
+ export function webhookDataTicketUpdatedFromJSON(
72
+ jsonString: string,
73
+ ): SafeParseResult<WebhookDataTicketUpdated, SDKValidationError> {
74
+ return safeParse(
75
+ jsonString,
76
+ (x) => WebhookDataTicketUpdated$inboundSchema.parse(JSON.parse(x)),
77
+ `Failed to parse 'WebhookDataTicketUpdated' from JSON`,
78
+ );
79
+ }
@@ -36,6 +36,9 @@ export const WebhookEventType = {
36
36
  SweepUpdated: "sweep.updated",
37
37
  TerminalApplicationCreated: "terminalApplication.created",
38
38
  TerminalApplicationUpdated: "terminalApplication.updated",
39
+ TicketCreated: "ticket.created",
40
+ TicketUpdated: "ticket.updated",
41
+ TicketMessageAdded: "ticket.messageAdded",
39
42
  TransferCreated: "transfer.created",
40
43
  TransferUpdated: "transfer.updated",
41
44
  WalletTransactionUpdated: "walletTransaction.updated",
@@ -3,15 +3,16 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import * as components from "../components/index.js";
7
6
  import { MoovError } from "./mooverror.js";
8
7
 
9
8
  export type AddCapabilitiesErrorData = {
10
- error?: components.CapabilitiesError | undefined;
9
+ error?: string | undefined;
10
+ capabilities?: { [k: string]: string } | undefined;
11
11
  };
12
12
 
13
13
  export class AddCapabilitiesError extends MoovError {
14
- error?: components.CapabilitiesError | undefined;
14
+ error?: string | undefined;
15
+ capabilities?: { [k: string]: string } | undefined;
15
16
 
16
17
  /** The original data that was passed to this error instance. */
17
18
  data$: AddCapabilitiesErrorData;
@@ -26,6 +27,7 @@ export class AddCapabilitiesError extends MoovError {
26
27
  super(message, httpMeta);
27
28
  this.data$ = err;
28
29
  if (err.error != null) this.error = err.error;
30
+ if (err.capabilities != null) this.capabilities = err.capabilities;
29
31
 
30
32
  this.name = "AddCapabilitiesError";
31
33
  }
@@ -37,7 +39,8 @@ export const AddCapabilitiesError$inboundSchema: z.ZodType<
37
39
  z.ZodTypeDef,
38
40
  unknown
39
41
  > = z.object({
40
- error: components.CapabilitiesError$inboundSchema.optional(),
42
+ error: z.string().optional(),
43
+ capabilities: z.record(z.string()).optional(),
41
44
  request$: z.instanceof(Request),
42
45
  response$: z.instanceof(Response),
43
46
  body$: z.string(),
@@ -52,7 +55,8 @@ export const AddCapabilitiesError$inboundSchema: z.ZodType<
52
55
 
53
56
  /** @internal */
54
57
  export type AddCapabilitiesError$Outbound = {
55
- error?: components.CapabilitiesError$Outbound | undefined;
58
+ error?: string | undefined;
59
+ capabilities?: { [k: string]: string } | undefined;
56
60
  };
57
61
 
58
62
  /** @internal */
@@ -63,7 +67,8 @@ export const AddCapabilitiesError$outboundSchema: z.ZodType<
63
67
  > = z.instanceof(AddCapabilitiesError)
64
68
  .transform(v => v.data$)
65
69
  .pipe(z.object({
66
- error: components.CapabilitiesError$outboundSchema.optional(),
70
+ error: z.string().optional(),
71
+ capabilities: z.record(z.string()).optional(),
67
72
  }));
68
73
 
69
74
  /**
@@ -3,15 +3,14 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
- import * as components from "../components/index.js";
7
6
  import { MoovError } from "./mooverror.js";
8
7
 
9
8
  export type AssignCountriesErrorData = {
10
- error: components.CountriesErrors;
9
+ countries: { [k: string]: string };
11
10
  };
12
11
 
13
12
  export class AssignCountriesError extends MoovError {
14
- error: components.CountriesErrors;
13
+ countries: { [k: string]: string };
15
14
 
16
15
  /** The original data that was passed to this error instance. */
17
16
  data$: AssignCountriesErrorData;
@@ -25,7 +24,7 @@ export class AssignCountriesError extends MoovError {
25
24
  : `API error occurred: ${JSON.stringify(err)}`;
26
25
  super(message, httpMeta);
27
26
  this.data$ = err;
28
- this.error = err.error;
27
+ this.countries = err.countries;
29
28
 
30
29
  this.name = "AssignCountriesError";
31
30
  }
@@ -37,7 +36,7 @@ export const AssignCountriesError$inboundSchema: z.ZodType<
37
36
  z.ZodTypeDef,
38
37
  unknown
39
38
  > = z.object({
40
- error: components.CountriesErrors$inboundSchema,
39
+ countries: z.record(z.string()),
41
40
  request$: z.instanceof(Request),
42
41
  response$: z.instanceof(Response),
43
42
  body$: z.string(),
@@ -52,7 +51,7 @@ export const AssignCountriesError$inboundSchema: z.ZodType<
52
51
 
53
52
  /** @internal */
54
53
  export type AssignCountriesError$Outbound = {
55
- error: components.CountriesErrors$Outbound;
54
+ countries: { [k: string]: string };
56
55
  };
57
56
 
58
57
  /** @internal */
@@ -63,7 +62,7 @@ export const AssignCountriesError$outboundSchema: z.ZodType<
63
62
  > = z.instanceof(AssignCountriesError)
64
63
  .transform(v => v.data$)
65
64
  .pipe(z.object({
66
- error: components.CountriesErrors$outboundSchema,
65
+ countries: z.record(z.string()),
67
66
  }));
68
67
 
69
68
  /**
@@ -3,11 +3,13 @@
3
3
  */
4
4
 
5
5
  import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
6
7
  import { MoovError } from "./mooverror.js";
7
8
 
8
9
  export type FileValidationErrorData = {
9
10
  error?: string | undefined;
10
11
  file?: string | undefined;
12
+ fileName?: string | undefined;
11
13
  filePurpose?: string | undefined;
12
14
  metadata?: string | undefined;
13
15
  };
@@ -15,6 +17,7 @@ export type FileValidationErrorData = {
15
17
  export class FileValidationError extends MoovError {
16
18
  error?: string | undefined;
17
19
  file?: string | undefined;
20
+ fileName?: string | undefined;
18
21
  filePurpose?: string | undefined;
19
22
  metadata?: string | undefined;
20
23
 
@@ -32,6 +35,7 @@ export class FileValidationError extends MoovError {
32
35
  this.data$ = err;
33
36
  if (err.error != null) this.error = err.error;
34
37
  if (err.file != null) this.file = err.file;
38
+ if (err.fileName != null) this.fileName = err.fileName;
35
39
  if (err.filePurpose != null) this.filePurpose = err.filePurpose;
36
40
  if (err.metadata != null) this.metadata = err.metadata;
37
41
 
@@ -47,6 +51,7 @@ export const FileValidationError$inboundSchema: z.ZodType<
47
51
  > = z.object({
48
52
  error: z.string().optional(),
49
53
  file: z.string().optional(),
54
+ FileName: z.string().optional(),
50
55
  filePurpose: z.string().optional(),
51
56
  metadata: z.string().optional(),
52
57
  request$: z.instanceof(Request),
@@ -54,7 +59,11 @@ export const FileValidationError$inboundSchema: z.ZodType<
54
59
  body$: z.string(),
55
60
  })
56
61
  .transform((v) => {
57
- return new FileValidationError(v, {
62
+ const remapped = remap$(v, {
63
+ "FileName": "fileName",
64
+ });
65
+
66
+ return new FileValidationError(remapped, {
58
67
  request: v.request$,
59
68
  response: v.response$,
60
69
  body: v.body$,
@@ -65,6 +74,7 @@ export const FileValidationError$inboundSchema: z.ZodType<
65
74
  export type FileValidationError$Outbound = {
66
75
  error?: string | undefined;
67
76
  file?: string | undefined;
77
+ FileName?: string | undefined;
68
78
  filePurpose?: string | undefined;
69
79
  metadata?: string | undefined;
70
80
  };
@@ -76,12 +86,19 @@ export const FileValidationError$outboundSchema: z.ZodType<
76
86
  FileValidationError
77
87
  > = z.instanceof(FileValidationError)
78
88
  .transform(v => v.data$)
79
- .pipe(z.object({
80
- error: z.string().optional(),
81
- file: z.string().optional(),
82
- filePurpose: z.string().optional(),
83
- metadata: z.string().optional(),
84
- }));
89
+ .pipe(
90
+ z.object({
91
+ error: z.string().optional(),
92
+ file: z.string().optional(),
93
+ fileName: z.string().optional(),
94
+ filePurpose: z.string().optional(),
95
+ metadata: z.string().optional(),
96
+ }).transform((v) => {
97
+ return remap$(v, {
98
+ fileName: "FileName",
99
+ });
100
+ }),
101
+ );
85
102
 
86
103
  /**
87
104
  * @internal
@@ -13,6 +13,7 @@ export type PatchAccountErrorData = {
13
13
  foreignID?: string | undefined;
14
14
  customerSupport?: components.CustomerSupportError | undefined;
15
15
  settings?: components.CreateAccountSettings | undefined;
16
+ error?: string | undefined;
16
17
  };
17
18
 
18
19
  export class PatchAccountError extends MoovError {
@@ -22,6 +23,7 @@ export class PatchAccountError extends MoovError {
22
23
  foreignID?: string | undefined;
23
24
  customerSupport?: components.CustomerSupportError | undefined;
24
25
  settings?: components.CreateAccountSettings | undefined;
26
+ error?: string | undefined;
25
27
 
26
28
  /** The original data that was passed to this error instance. */
27
29
  data$: PatchAccountErrorData;
@@ -41,6 +43,7 @@ export class PatchAccountError extends MoovError {
41
43
  if (err.foreignID != null) this.foreignID = err.foreignID;
42
44
  if (err.customerSupport != null) this.customerSupport = err.customerSupport;
43
45
  if (err.settings != null) this.settings = err.settings;
46
+ if (err.error != null) this.error = err.error;
44
47
 
45
48
  this.name = "PatchAccountError";
46
49
  }
@@ -58,6 +61,7 @@ export const PatchAccountError$inboundSchema: z.ZodType<
58
61
  foreignID: z.string().optional(),
59
62
  customerSupport: components.CustomerSupportError$inboundSchema.optional(),
60
63
  settings: components.CreateAccountSettings$inboundSchema.optional(),
64
+ error: z.string().optional(),
61
65
  request$: z.instanceof(Request),
62
66
  response$: z.instanceof(Response),
63
67
  body$: z.string(),
@@ -78,6 +82,7 @@ export type PatchAccountError$Outbound = {
78
82
  foreignID?: string | undefined;
79
83
  customerSupport?: components.CustomerSupportError$Outbound | undefined;
80
84
  settings?: components.CreateAccountSettings$Outbound | undefined;
85
+ error?: string | undefined;
81
86
  };
82
87
 
83
88
  /** @internal */
@@ -94,6 +99,7 @@ export const PatchAccountError$outboundSchema: z.ZodType<
94
99
  foreignID: z.string().optional(),
95
100
  customerSupport: components.CustomerSupportError$outboundSchema.optional(),
96
101
  settings: components.CreateAccountSettings$outboundSchema.optional(),
102
+ error: z.string().optional(),
97
103
  }));
98
104
 
99
105
  /**
@@ -17,6 +17,7 @@ export type UpsertUnderwritingErrorData = {
17
17
  moneyTransfer?: components.MoneyTransferError | undefined;
18
18
  sendFunds?: components.SendFundsError | undefined;
19
19
  averageMonthlyTransactionVolume?: string | undefined;
20
+ error?: string | undefined;
20
21
  averageTransactionSize?: string | undefined;
21
22
  maxTransactionSize?: string | undefined;
22
23
  volumeByCustomerType?: components.VolumeByCustomerTypeError | undefined;
@@ -35,6 +36,7 @@ export class UpsertUnderwritingError extends MoovError {
35
36
  moneyTransfer?: components.MoneyTransferError | undefined;
36
37
  sendFunds?: components.SendFundsError | undefined;
37
38
  averageMonthlyTransactionVolume?: string | undefined;
39
+ error?: string | undefined;
38
40
  averageTransactionSize?: string | undefined;
39
41
  maxTransactionSize?: string | undefined;
40
42
  volumeByCustomerType?: components.VolumeByCustomerTypeError | undefined;
@@ -70,6 +72,7 @@ export class UpsertUnderwritingError extends MoovError {
70
72
  this.averageMonthlyTransactionVolume =
71
73
  err.averageMonthlyTransactionVolume;
72
74
  }
75
+ if (err.error != null) this.error = err.error;
73
76
  if (err.averageTransactionSize != null) {
74
77
  this.averageTransactionSize = err.averageTransactionSize;
75
78
  }
@@ -103,6 +106,7 @@ export const UpsertUnderwritingError$inboundSchema: z.ZodType<
103
106
  moneyTransfer: components.MoneyTransferError$inboundSchema.optional(),
104
107
  sendFunds: components.SendFundsError$inboundSchema.optional(),
105
108
  averageMonthlyTransactionVolume: z.string().optional(),
109
+ error: z.string().optional(),
106
110
  averageTransactionSize: z.string().optional(),
107
111
  maxTransactionSize: z.string().optional(),
108
112
  volumeByCustomerType: components.VolumeByCustomerTypeError$inboundSchema
@@ -134,6 +138,7 @@ export type UpsertUnderwritingError$Outbound = {
134
138
  moneyTransfer?: components.MoneyTransferError$Outbound | undefined;
135
139
  sendFunds?: components.SendFundsError$Outbound | undefined;
136
140
  averageMonthlyTransactionVolume?: string | undefined;
141
+ error?: string | undefined;
137
142
  averageTransactionSize?: string | undefined;
138
143
  maxTransactionSize?: string | undefined;
139
144
  volumeByCustomerType?:
@@ -162,6 +167,7 @@ export const UpsertUnderwritingError$outboundSchema: z.ZodType<
162
167
  moneyTransfer: components.MoneyTransferError$outboundSchema.optional(),
163
168
  sendFunds: components.SendFundsError$outboundSchema.optional(),
164
169
  averageMonthlyTransactionVolume: z.string().optional(),
170
+ error: z.string().optional(),
165
171
  averageTransactionSize: z.string().optional(),
166
172
  maxTransactionSize: z.string().optional(),
167
173
  volumeByCustomerType: components.VolumeByCustomerTypeError$outboundSchema
@@ -1,33 +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
- export type CapabilitiesError = {
5
- capabilities?: {
6
- [k: string]: string;
7
- } | undefined;
8
- };
9
- /** @internal */
10
- export declare const CapabilitiesError$inboundSchema: z.ZodType<CapabilitiesError, z.ZodTypeDef, unknown>;
11
- /** @internal */
12
- export type CapabilitiesError$Outbound = {
13
- capabilities?: {
14
- [k: string]: string;
15
- } | undefined;
16
- };
17
- /** @internal */
18
- export declare const CapabilitiesError$outboundSchema: z.ZodType<CapabilitiesError$Outbound, z.ZodTypeDef, CapabilitiesError>;
19
- /**
20
- * @internal
21
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
22
- */
23
- export declare namespace CapabilitiesError$ {
24
- /** @deprecated use `CapabilitiesError$inboundSchema` instead. */
25
- const inboundSchema: z.ZodType<CapabilitiesError, z.ZodTypeDef, unknown>;
26
- /** @deprecated use `CapabilitiesError$outboundSchema` instead. */
27
- const outboundSchema: z.ZodType<CapabilitiesError$Outbound, z.ZodTypeDef, CapabilitiesError>;
28
- /** @deprecated use `CapabilitiesError$Outbound` instead. */
29
- type Outbound = CapabilitiesError$Outbound;
30
- }
31
- export declare function capabilitiesErrorToJSON(capabilitiesError: CapabilitiesError): string;
32
- export declare function capabilitiesErrorFromJSON(jsonString: string): SafeParseResult<CapabilitiesError, SDKValidationError>;
33
- //# sourceMappingURL=capabilitieserror.d.ts.map