@moovio/sdk 0.14.15 → 0.14.17

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 (149) hide show
  1. package/README.md +32 -2
  2. package/bin/mcp-server.js +399 -392
  3. package/bin/mcp-server.js.map +30 -32
  4. package/docs/sdks/accounts/README.md +19 -10
  5. package/docs/sdks/accountterminalapplications/README.md +4 -0
  6. package/docs/sdks/adjustments/README.md +2 -0
  7. package/docs/sdks/applepay/README.md +5 -0
  8. package/docs/sdks/authentication/README.md +2 -0
  9. package/docs/sdks/avatars/README.md +1 -0
  10. package/docs/sdks/bankaccounts/README.md +9 -0
  11. package/docs/sdks/branding/README.md +4 -0
  12. package/docs/sdks/capabilities/README.md +4 -0
  13. package/docs/sdks/cardissuing/README.md +5 -0
  14. package/docs/sdks/cards/README.md +5 -0
  15. package/docs/sdks/disputes/README.md +11 -0
  16. package/docs/sdks/endtoendencryption/README.md +2 -0
  17. package/docs/sdks/enrichedaddress/README.md +1 -0
  18. package/docs/sdks/enrichedprofile/README.md +1 -0
  19. package/docs/sdks/feeplans/README.md +7 -0
  20. package/docs/sdks/files/README.md +3 -0
  21. package/docs/sdks/industries/README.md +1 -0
  22. package/docs/sdks/institutions/README.md +2 -0
  23. package/docs/sdks/issuingtransactions/README.md +5 -0
  24. package/docs/sdks/onboarding/README.md +4 -0
  25. package/docs/sdks/paymentlinks/README.md +6 -0
  26. package/docs/sdks/paymentmethods/README.md +2 -0
  27. package/docs/sdks/ping/README.md +1 -0
  28. package/docs/sdks/receipts/README.md +2 -0
  29. package/docs/sdks/representatives/README.md +5 -0
  30. package/docs/sdks/scheduling/README.md +6 -0
  31. package/docs/sdks/support/README.md +35 -0
  32. package/docs/sdks/sweeps/README.md +6 -0
  33. package/docs/sdks/terminalapplications/README.md +5 -0
  34. package/docs/sdks/transfers/README.md +11 -0
  35. package/docs/sdks/underwriting/README.md +3 -0
  36. package/docs/sdks/wallets/README.md +2 -0
  37. package/docs/sdks/wallettransactions/README.md +2 -0
  38. package/examples/package-lock.json +1 -1
  39. package/funcs/accountsCreate.d.ts +1 -1
  40. package/funcs/accountsCreate.d.ts.map +1 -1
  41. package/funcs/accountsCreate.js +1 -3
  42. package/funcs/accountsCreate.js.map +1 -1
  43. package/funcs/accountsUpdate.d.ts +1 -1
  44. package/funcs/accountsUpdate.d.ts.map +1 -1
  45. package/funcs/accountsUpdate.js +1 -3
  46. package/funcs/accountsUpdate.js.map +1 -1
  47. package/funcs/supportCreateTicket.d.ts +3 -0
  48. package/funcs/supportCreateTicket.d.ts.map +1 -1
  49. package/funcs/supportCreateTicket.js +3 -0
  50. package/funcs/supportCreateTicket.js.map +1 -1
  51. package/funcs/supportGetTicket.d.ts +3 -0
  52. package/funcs/supportGetTicket.d.ts.map +1 -1
  53. package/funcs/supportGetTicket.js +3 -0
  54. package/funcs/supportGetTicket.js.map +1 -1
  55. package/funcs/supportListTicketMessages.d.ts +3 -0
  56. package/funcs/supportListTicketMessages.d.ts.map +1 -1
  57. package/funcs/supportListTicketMessages.js +3 -0
  58. package/funcs/supportListTicketMessages.js.map +1 -1
  59. package/funcs/supportListTickets.d.ts +3 -0
  60. package/funcs/supportListTickets.d.ts.map +1 -1
  61. package/funcs/supportListTickets.js +3 -0
  62. package/funcs/supportListTickets.js.map +1 -1
  63. package/funcs/supportUpdateTicket.d.ts +3 -0
  64. package/funcs/supportUpdateTicket.d.ts.map +1 -1
  65. package/funcs/supportUpdateTicket.js +3 -0
  66. package/funcs/supportUpdateTicket.js.map +1 -1
  67. package/jsr.json +1 -1
  68. package/lib/config.d.ts +3 -3
  69. package/lib/config.js +3 -3
  70. package/mcp-server/mcp-server.js +1 -1
  71. package/mcp-server/server.js +1 -1
  72. package/mcp-server/tools/supportCreateTicket.d.ts.map +1 -1
  73. package/mcp-server/tools/supportCreateTicket.js +4 -1
  74. package/mcp-server/tools/supportCreateTicket.js.map +1 -1
  75. package/mcp-server/tools/supportGetTicket.d.ts.map +1 -1
  76. package/mcp-server/tools/supportGetTicket.js +4 -1
  77. package/mcp-server/tools/supportGetTicket.js.map +1 -1
  78. package/mcp-server/tools/supportListTicketMessages.d.ts.map +1 -1
  79. package/mcp-server/tools/supportListTicketMessages.js +4 -1
  80. package/mcp-server/tools/supportListTicketMessages.js.map +1 -1
  81. package/mcp-server/tools/supportListTickets.d.ts.map +1 -1
  82. package/mcp-server/tools/supportListTickets.js +4 -1
  83. package/mcp-server/tools/supportListTickets.js.map +1 -1
  84. package/mcp-server/tools/supportUpdateTicket.d.ts.map +1 -1
  85. package/mcp-server/tools/supportUpdateTicket.js +4 -1
  86. package/mcp-server/tools/supportUpdateTicket.js.map +1 -1
  87. package/models/components/index.d.ts +0 -2
  88. package/models/components/index.d.ts.map +1 -1
  89. package/models/components/index.js +0 -2
  90. package/models/components/index.js.map +1 -1
  91. package/models/components/underwritingstatus.d.ts +6 -6
  92. package/models/components/underwritingstatus.js +2 -2
  93. package/models/components/underwritingstatus.js.map +1 -1
  94. package/models/errors/createaccounterror.d.ts +64 -0
  95. package/models/errors/createaccounterror.d.ts.map +1 -0
  96. package/models/{components → errors}/createaccounterror.js +52 -24
  97. package/models/errors/createaccounterror.js.map +1 -0
  98. package/models/errors/index.d.ts +2 -2
  99. package/models/errors/index.d.ts.map +1 -1
  100. package/models/errors/index.js +2 -2
  101. package/models/errors/index.js.map +1 -1
  102. package/models/errors/patchaccounterror.d.ts +52 -0
  103. package/models/errors/patchaccounterror.d.ts.map +1 -0
  104. package/models/{components → errors}/patchaccounterror.js +48 -24
  105. package/models/errors/patchaccounterror.js.map +1 -0
  106. package/package.json +1 -1
  107. package/sdk/support.d.ts +15 -0
  108. package/sdk/support.d.ts.map +1 -1
  109. package/sdk/support.js +15 -0
  110. package/sdk/support.js.map +1 -1
  111. package/src/funcs/accountsCreate.ts +4 -6
  112. package/src/funcs/accountsUpdate.ts +4 -6
  113. package/src/funcs/supportCreateTicket.ts +3 -0
  114. package/src/funcs/supportGetTicket.ts +3 -0
  115. package/src/funcs/supportListTicketMessages.ts +3 -0
  116. package/src/funcs/supportListTickets.ts +3 -0
  117. package/src/funcs/supportUpdateTicket.ts +3 -0
  118. package/src/lib/config.ts +3 -3
  119. package/src/mcp-server/mcp-server.ts +1 -1
  120. package/src/mcp-server/server.ts +1 -1
  121. package/src/mcp-server/tools/supportCreateTicket.ts +4 -1
  122. package/src/mcp-server/tools/supportGetTicket.ts +4 -1
  123. package/src/mcp-server/tools/supportListTicketMessages.ts +4 -1
  124. package/src/mcp-server/tools/supportListTickets.ts +4 -1
  125. package/src/mcp-server/tools/supportUpdateTicket.ts +4 -1
  126. package/src/models/components/index.ts +0 -2
  127. package/src/models/components/underwritingstatus.ts +2 -2
  128. package/src/models/errors/createaccounterror.ts +122 -0
  129. package/src/models/errors/index.ts +2 -2
  130. package/src/models/errors/patchaccounterror.ts +110 -0
  131. package/src/sdk/support.ts +15 -0
  132. package/models/components/createaccounterror.d.ts +0 -51
  133. package/models/components/createaccounterror.d.ts.map +0 -1
  134. package/models/components/createaccounterror.js.map +0 -1
  135. package/models/components/patchaccounterror.d.ts +0 -43
  136. package/models/components/patchaccounterror.d.ts.map +0 -1
  137. package/models/components/patchaccounterror.js.map +0 -1
  138. package/models/errors/createaccount.d.ts +0 -43
  139. package/models/errors/createaccount.d.ts.map +0 -1
  140. package/models/errors/createaccount.js +0 -89
  141. package/models/errors/createaccount.js.map +0 -1
  142. package/models/errors/updateaccount.d.ts +0 -43
  143. package/models/errors/updateaccount.d.ts.map +0 -1
  144. package/models/errors/updateaccount.js +0 -89
  145. package/models/errors/updateaccount.js.map +0 -1
  146. package/src/models/components/createaccounterror.ts +0 -118
  147. package/src/models/components/patchaccounterror.ts +0 -110
  148. package/src/models/errors/createaccount.ts +0 -86
  149. package/src/models/errors/updateaccount.ts +0 -86
@@ -1,43 +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
- import { CreateAccountSettings, CreateAccountSettings$Outbound } from "./createaccountsettings.js";
5
- import { CreateProfileError, CreateProfileError$Outbound } from "./createprofileerror.js";
6
- import { CustomerSupportError, CustomerSupportError$Outbound } from "./customersupporterror.js";
7
- import { TermsOfServiceError, TermsOfServiceError$Outbound } from "./termsofserviceerror.js";
8
- export type PatchAccountError = {
9
- profile?: CreateProfileError | undefined;
10
- metadata?: string | undefined;
11
- termsOfService?: TermsOfServiceError | undefined;
12
- foreignID?: string | undefined;
13
- customerSupport?: CustomerSupportError | undefined;
14
- settings?: CreateAccountSettings | undefined;
15
- };
16
- /** @internal */
17
- export declare const PatchAccountError$inboundSchema: z.ZodType<PatchAccountError, z.ZodTypeDef, unknown>;
18
- /** @internal */
19
- export type PatchAccountError$Outbound = {
20
- profile?: CreateProfileError$Outbound | undefined;
21
- metadata?: string | undefined;
22
- termsOfService?: TermsOfServiceError$Outbound | undefined;
23
- foreignID?: string | undefined;
24
- customerSupport?: CustomerSupportError$Outbound | undefined;
25
- settings?: CreateAccountSettings$Outbound | undefined;
26
- };
27
- /** @internal */
28
- export declare const PatchAccountError$outboundSchema: z.ZodType<PatchAccountError$Outbound, z.ZodTypeDef, PatchAccountError>;
29
- /**
30
- * @internal
31
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
32
- */
33
- export declare namespace PatchAccountError$ {
34
- /** @deprecated use `PatchAccountError$inboundSchema` instead. */
35
- const inboundSchema: z.ZodType<PatchAccountError, z.ZodTypeDef, unknown>;
36
- /** @deprecated use `PatchAccountError$outboundSchema` instead. */
37
- const outboundSchema: z.ZodType<PatchAccountError$Outbound, z.ZodTypeDef, PatchAccountError>;
38
- /** @deprecated use `PatchAccountError$Outbound` instead. */
39
- type Outbound = PatchAccountError$Outbound;
40
- }
41
- export declare function patchAccountErrorToJSON(patchAccountError: PatchAccountError): string;
42
- export declare function patchAccountErrorFromJSON(jsonString: string): SafeParseResult<PatchAccountError, SDKValidationError>;
43
- //# sourceMappingURL=patchaccounterror.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patchaccounterror.d.ts","sourceRoot":"","sources":["../../src/models/components/patchaccounterror.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;AACrE,OAAO,EACL,qBAAqB,EAErB,8BAA8B,EAE/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,kBAAkB,EAElB,2BAA2B,EAE5B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,oBAAoB,EAEpB,6BAA6B,EAE9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,mBAAmB,EAEnB,4BAA4B,EAE7B,MAAM,0BAA0B,CAAC;AAElC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,OAAO,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,mBAAmB,GAAG,SAAS,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,eAAe,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACnD,QAAQ,CAAC,EAAE,qBAAqB,GAAG,SAAS,CAAC;CAC9C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,+BAA+B,EAAE,CAAC,CAAC,OAAO,CACrD,iBAAiB,EACjB,CAAC,CAAC,UAAU,EACZ,OAAO,CAQP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,CAAC,EAAE,2BAA2B,GAAG,SAAS,CAAC;IAClD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,cAAc,CAAC,EAAE,4BAA4B,GAAG,SAAS,CAAC;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,eAAe,CAAC,EAAE,6BAA6B,GAAG,SAAS,CAAC;IAC5D,QAAQ,CAAC,EAAE,8BAA8B,GAAG,SAAS,CAAC;CACvD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,OAAO,CACtD,0BAA0B,EAC1B,CAAC,CAAC,UAAU,EACZ,iBAAiB,CAQjB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,kBAAkB,CAAC;IAClC,iEAAiE;IAC1D,MAAM,aAAa,qDAAkC,CAAC;IAC7D,kEAAkE;IAC3D,MAAM,cAAc,wEAAmC,CAAC;IAC/D,4DAA4D;IAC5D,KAAY,QAAQ,GAAG,0BAA0B,CAAC;CACnD;AAED,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,iBAAiB,GACnC,MAAM,CAIR;AAED,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,CAMxD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"patchaccounterror.js","sourceRoot":"","sources":["../../src/models/components/patchaccounterror.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2FH,0DAMC;AAED,8DAQC;AAzGD,uCAAyB;AACzB,qDAAiD;AAGjD,yEAKoC;AACpC,mEAKiC;AACjC,uEAKmC;AACnC,qEAKkC;AAWlC,gBAAgB;AACH,QAAA,+BAA+B,GAIxC,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,wDAAgC,CAAC,QAAQ,EAAE;IACpD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,cAAc,EAAE,0DAAiC,CAAC,QAAQ,EAAE;IAC5D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,eAAe,EAAE,4DAAkC,CAAC,QAAQ,EAAE;IAC9D,QAAQ,EAAE,8DAAmC,CAAC,QAAQ,EAAE;CACzD,CAAC,CAAC;AAYH,gBAAgB;AACH,QAAA,gCAAgC,GAIzC,CAAC,CAAC,MAAM,CAAC;IACX,OAAO,EAAE,yDAAiC,CAAC,QAAQ,EAAE;IACrD,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,cAAc,EAAE,2DAAkC,CAAC,QAAQ,EAAE;IAC7D,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,eAAe,EAAE,6DAAmC,CAAC,QAAQ,EAAE;IAC/D,QAAQ,EAAE,+DAAoC,CAAC,QAAQ,EAAE;CAC1D,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,kBAAkB,CAOlC;AAPD,WAAiB,kBAAkB;IACjC,iEAAiE;IACpD,gCAAa,GAAG,uCAA+B,CAAC;IAC7D,kEAAkE;IACrD,iCAAc,GAAG,wCAAgC,CAAC;AAGjE,CAAC,EAPgB,kBAAkB,kCAAlB,kBAAkB,QAOlC;AAED,SAAgB,uBAAuB,CACrC,iBAAoC;IAEpC,OAAO,IAAI,CAAC,SAAS,CACnB,wCAAgC,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAC1D,CAAC;AACJ,CAAC;AAED,SAAgB,yBAAyB,CACvC,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,uCAA+B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC3D,+CAA+C,CAChD,CAAC;AACJ,CAAC"}
@@ -1,43 +0,0 @@
1
- import * as z from "zod";
2
- import * as components from "../components/index.js";
3
- import { MoovError } from "./mooverror.js";
4
- /**
5
- * The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
6
- */
7
- export type CreateAccountResponseBodyData = {
8
- error: components.CreateAccountError;
9
- };
10
- /**
11
- * The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
12
- */
13
- export declare class CreateAccountResponseBody extends MoovError {
14
- error: components.CreateAccountError;
15
- /** The original data that was passed to this error instance. */
16
- data$: CreateAccountResponseBodyData;
17
- constructor(err: CreateAccountResponseBodyData, httpMeta: {
18
- response: Response;
19
- request: Request;
20
- body: string;
21
- });
22
- }
23
- /** @internal */
24
- export declare const CreateAccountResponseBody$inboundSchema: z.ZodType<CreateAccountResponseBody, z.ZodTypeDef, unknown>;
25
- /** @internal */
26
- export type CreateAccountResponseBody$Outbound = {
27
- error: components.CreateAccountError$Outbound;
28
- };
29
- /** @internal */
30
- export declare const CreateAccountResponseBody$outboundSchema: z.ZodType<CreateAccountResponseBody$Outbound, z.ZodTypeDef, CreateAccountResponseBody>;
31
- /**
32
- * @internal
33
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
34
- */
35
- export declare namespace CreateAccountResponseBody$ {
36
- /** @deprecated use `CreateAccountResponseBody$inboundSchema` instead. */
37
- const inboundSchema: z.ZodType<CreateAccountResponseBody, z.ZodTypeDef, unknown>;
38
- /** @deprecated use `CreateAccountResponseBody$outboundSchema` instead. */
39
- const outboundSchema: z.ZodType<CreateAccountResponseBody$Outbound, z.ZodTypeDef, CreateAccountResponseBody>;
40
- /** @deprecated use `CreateAccountResponseBody$Outbound` instead. */
41
- type Outbound = CreateAccountResponseBody$Outbound;
42
- }
43
- //# sourceMappingURL=createaccount.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createaccount.d.ts","sourceRoot":"","sources":["../../src/models/errors/createaccount.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC;CACtC,CAAC;AAEF;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACtD,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC;IAErC,gEAAgE;IAChE,KAAK,EAAE,6BAA6B,CAAC;gBAGnC,GAAG,EAAE,6BAA6B,EAClC,QAAQ,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAWnE;AAED,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,yBAAyB,EACzB,CAAC,CAAC,UAAU,EACZ,OAAO,CAaL,CAAC;AAEL,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,KAAK,EAAE,UAAU,CAAC,2BAA2B,CAAC;CAC/C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,kCAAkC,EAClC,CAAC,CAAC,UAAU,EACZ,yBAAyB,CAKtB,CAAC;AAEN;;;GAGG;AACH,yBAAiB,0BAA0B,CAAC;IAC1C,yEAAyE;IAClE,MAAM,aAAa,6DAA0C,CAAC;IACrE,0EAA0E;IACnE,MAAM,cAAc,wFAA2C,CAAC;IACvE,oEAAoE;IACpE,KAAY,QAAQ,GAAG,kCAAkC,CAAC;CAC3D"}
@@ -1,89 +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.CreateAccountResponseBody$ = exports.CreateAccountResponseBody$outboundSchema = exports.CreateAccountResponseBody$inboundSchema = exports.CreateAccountResponseBody = void 0;
40
- const z = __importStar(require("zod"));
41
- const components = __importStar(require("../components/index.js"));
42
- const mooverror_js_1 = require("./mooverror.js");
43
- /**
44
- * The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
45
- */
46
- class CreateAccountResponseBody extends mooverror_js_1.MoovError {
47
- constructor(err, httpMeta) {
48
- const message = "message" in err && typeof err.message === "string"
49
- ? err.message
50
- : `API error occurred: ${JSON.stringify(err)}`;
51
- super(message, httpMeta);
52
- this.data$ = err;
53
- this.error = err.error;
54
- this.name = "CreateAccountResponseBody";
55
- }
56
- }
57
- exports.CreateAccountResponseBody = CreateAccountResponseBody;
58
- /** @internal */
59
- exports.CreateAccountResponseBody$inboundSchema = z.object({
60
- error: components.CreateAccountError$inboundSchema,
61
- request$: z.instanceof(Request),
62
- response$: z.instanceof(Response),
63
- body$: z.string(),
64
- })
65
- .transform((v) => {
66
- return new CreateAccountResponseBody(v, {
67
- request: v.request$,
68
- response: v.response$,
69
- body: v.body$,
70
- });
71
- });
72
- /** @internal */
73
- exports.CreateAccountResponseBody$outboundSchema = z.instanceof(CreateAccountResponseBody)
74
- .transform(v => v.data$)
75
- .pipe(z.object({
76
- error: components.CreateAccountError$outboundSchema,
77
- }));
78
- /**
79
- * @internal
80
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
- */
82
- var CreateAccountResponseBody$;
83
- (function (CreateAccountResponseBody$) {
84
- /** @deprecated use `CreateAccountResponseBody$inboundSchema` instead. */
85
- CreateAccountResponseBody$.inboundSchema = exports.CreateAccountResponseBody$inboundSchema;
86
- /** @deprecated use `CreateAccountResponseBody$outboundSchema` instead. */
87
- CreateAccountResponseBody$.outboundSchema = exports.CreateAccountResponseBody$outboundSchema;
88
- })(CreateAccountResponseBody$ || (exports.CreateAccountResponseBody$ = CreateAccountResponseBody$ = {}));
89
- //# sourceMappingURL=createaccount.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"createaccount.js","sourceRoot":"","sources":["../../src/models/errors/createaccount.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,mEAAqD;AACrD,iDAA2C;AAS3C;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAS;IAMtD,YACE,GAAkC,EAClC,QAAgE;QAEhE,MAAM,OAAO,GAAG,SAAS,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;YACjE,CAAC,CAAC,GAAG,CAAC,OAAO;YACb,CAAC,CAAC,uBAAuB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QACjD,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QAEvB,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAnBD,8DAmBC;AAED,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,UAAU,CAAC,gCAAgC;IAClD,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;IAC/B,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC;KACC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACf,OAAO,IAAI,yBAAyB,CAAC,CAAC,EAAE;QACtC,OAAO,EAAE,CAAC,CAAC,QAAQ;QACnB,QAAQ,EAAE,CAAC,CAAC,SAAS;QACrB,IAAI,EAAE,CAAC,CAAC,KAAK;KACd,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAOL,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,UAAU,CAAC,yBAAyB,CAAC;KACxC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;KACvB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC,iCAAiC;CACpD,CAAC,CAAC,CAAC;AAEN;;;GAGG;AACH,IAAiB,0BAA0B,CAO1C;AAPD,WAAiB,0BAA0B;IACzC,yEAAyE;IAC5D,wCAAa,GAAG,+CAAuC,CAAC;IACrE,0EAA0E;IAC7D,yCAAc,GAAG,gDAAwC,CAAC;AAGzE,CAAC,EAPgB,0BAA0B,0CAA1B,0BAA0B,QAO1C"}
@@ -1,43 +0,0 @@
1
- import * as z from "zod";
2
- import * as components from "../components/index.js";
3
- import { MoovError } from "./mooverror.js";
4
- /**
5
- * The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
6
- */
7
- export type UpdateAccountResponseBodyData = {
8
- error: components.PatchAccountError;
9
- };
10
- /**
11
- * The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
12
- */
13
- export declare class UpdateAccountResponseBody extends MoovError {
14
- error: components.PatchAccountError;
15
- /** The original data that was passed to this error instance. */
16
- data$: UpdateAccountResponseBodyData;
17
- constructor(err: UpdateAccountResponseBodyData, httpMeta: {
18
- response: Response;
19
- request: Request;
20
- body: string;
21
- });
22
- }
23
- /** @internal */
24
- export declare const UpdateAccountResponseBody$inboundSchema: z.ZodType<UpdateAccountResponseBody, z.ZodTypeDef, unknown>;
25
- /** @internal */
26
- export type UpdateAccountResponseBody$Outbound = {
27
- error: components.PatchAccountError$Outbound;
28
- };
29
- /** @internal */
30
- export declare const UpdateAccountResponseBody$outboundSchema: z.ZodType<UpdateAccountResponseBody$Outbound, z.ZodTypeDef, UpdateAccountResponseBody>;
31
- /**
32
- * @internal
33
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
34
- */
35
- export declare namespace UpdateAccountResponseBody$ {
36
- /** @deprecated use `UpdateAccountResponseBody$inboundSchema` instead. */
37
- const inboundSchema: z.ZodType<UpdateAccountResponseBody, z.ZodTypeDef, unknown>;
38
- /** @deprecated use `UpdateAccountResponseBody$outboundSchema` instead. */
39
- const outboundSchema: z.ZodType<UpdateAccountResponseBody$Outbound, z.ZodTypeDef, UpdateAccountResponseBody>;
40
- /** @deprecated use `UpdateAccountResponseBody$Outbound` instead. */
41
- type Outbound = UpdateAccountResponseBody$Outbound;
42
- }
43
- //# sourceMappingURL=updateaccount.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateaccount.d.ts","sourceRoot":"","sources":["../../src/models/errors/updateaccount.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC;CACrC,CAAC;AAEF;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACtD,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC;IAEpC,gEAAgE;IAChE,KAAK,EAAE,6BAA6B,CAAC;gBAGnC,GAAG,EAAE,6BAA6B,EAClC,QAAQ,EAAE;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE;CAWnE;AAED,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,yBAAyB,EACzB,CAAC,CAAC,UAAU,EACZ,OAAO,CAaL,CAAC;AAEL,gBAAgB;AAChB,MAAM,MAAM,kCAAkC,GAAG;IAC/C,KAAK,EAAE,UAAU,CAAC,0BAA0B,CAAC;CAC9C,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wCAAwC,EAAE,CAAC,CAAC,OAAO,CAC9D,kCAAkC,EAClC,CAAC,CAAC,UAAU,EACZ,yBAAyB,CAKtB,CAAC;AAEN;;;GAGG;AACH,yBAAiB,0BAA0B,CAAC;IAC1C,yEAAyE;IAClE,MAAM,aAAa,6DAA0C,CAAC;IACrE,0EAA0E;IACnE,MAAM,cAAc,wFAA2C,CAAC;IACvE,oEAAoE;IACpE,KAAY,QAAQ,GAAG,kCAAkC,CAAC;CAC3D"}
@@ -1,89 +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.UpdateAccountResponseBody$ = exports.UpdateAccountResponseBody$outboundSchema = exports.UpdateAccountResponseBody$inboundSchema = exports.UpdateAccountResponseBody = void 0;
40
- const z = __importStar(require("zod"));
41
- const components = __importStar(require("../components/index.js"));
42
- const mooverror_js_1 = require("./mooverror.js");
43
- /**
44
- * The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
45
- */
46
- class UpdateAccountResponseBody extends mooverror_js_1.MoovError {
47
- constructor(err, httpMeta) {
48
- const message = "message" in err && typeof err.message === "string"
49
- ? err.message
50
- : `API error occurred: ${JSON.stringify(err)}`;
51
- super(message, httpMeta);
52
- this.data$ = err;
53
- this.error = err.error;
54
- this.name = "UpdateAccountResponseBody";
55
- }
56
- }
57
- exports.UpdateAccountResponseBody = UpdateAccountResponseBody;
58
- /** @internal */
59
- exports.UpdateAccountResponseBody$inboundSchema = z.object({
60
- error: components.PatchAccountError$inboundSchema,
61
- request$: z.instanceof(Request),
62
- response$: z.instanceof(Response),
63
- body$: z.string(),
64
- })
65
- .transform((v) => {
66
- return new UpdateAccountResponseBody(v, {
67
- request: v.request$,
68
- response: v.response$,
69
- body: v.body$,
70
- });
71
- });
72
- /** @internal */
73
- exports.UpdateAccountResponseBody$outboundSchema = z.instanceof(UpdateAccountResponseBody)
74
- .transform(v => v.data$)
75
- .pipe(z.object({
76
- error: components.PatchAccountError$outboundSchema,
77
- }));
78
- /**
79
- * @internal
80
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
81
- */
82
- var UpdateAccountResponseBody$;
83
- (function (UpdateAccountResponseBody$) {
84
- /** @deprecated use `UpdateAccountResponseBody$inboundSchema` instead. */
85
- UpdateAccountResponseBody$.inboundSchema = exports.UpdateAccountResponseBody$inboundSchema;
86
- /** @deprecated use `UpdateAccountResponseBody$outboundSchema` instead. */
87
- UpdateAccountResponseBody$.outboundSchema = exports.UpdateAccountResponseBody$outboundSchema;
88
- })(UpdateAccountResponseBody$ || (exports.UpdateAccountResponseBody$ = UpdateAccountResponseBody$ = {}));
89
- //# sourceMappingURL=updateaccount.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateaccount.js","sourceRoot":"","sources":["../../src/models/errors/updateaccount.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,mEAAqD;AACrD,iDAA2C;AAS3C;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAS;IAMtD,YACE,GAAkC,EAClC,QAAgE;QAEhE,MAAM,OAAO,GAAG,SAAS,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ;YACjE,CAAC,CAAC,GAAG,CAAC,OAAO;YACb,CAAC,CAAC,uBAAuB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC;QACjD,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC;QACjB,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QAEvB,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF;AAnBD,8DAmBC;AAED,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,UAAU,CAAC,+BAA+B;IACjD,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC;IAC/B,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC;KACC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACf,OAAO,IAAI,yBAAyB,CAAC,CAAC,EAAE;QACtC,OAAO,EAAE,CAAC,CAAC,QAAQ;QACnB,QAAQ,EAAE,CAAC,CAAC,SAAS;QACrB,IAAI,EAAE,CAAC,CAAC,KAAK;KACd,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAOL,gBAAgB;AACH,QAAA,wCAAwC,GAIjD,CAAC,CAAC,UAAU,CAAC,yBAAyB,CAAC;KACxC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;KACvB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACb,KAAK,EAAE,UAAU,CAAC,gCAAgC;CACnD,CAAC,CAAC,CAAC;AAEN;;;GAGG;AACH,IAAiB,0BAA0B,CAO1C;AAPD,WAAiB,0BAA0B;IACzC,yEAAyE;IAC5D,wCAAa,GAAG,+CAAuC,CAAC;IACrE,0EAA0E;IAC7D,yCAAc,GAAG,gDAAwC,CAAC;AAGzE,CAAC,EAPgB,0BAA0B,0CAA1B,0BAA0B,QAO1C"}
@@ -1,118 +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
- import {
10
- CreateAccountSettings,
11
- CreateAccountSettings$inboundSchema,
12
- CreateAccountSettings$Outbound,
13
- CreateAccountSettings$outboundSchema,
14
- } from "./createaccountsettings.js";
15
- import {
16
- CreateProfileError,
17
- CreateProfileError$inboundSchema,
18
- CreateProfileError$Outbound,
19
- CreateProfileError$outboundSchema,
20
- } from "./createprofileerror.js";
21
- import {
22
- CustomerSupportError,
23
- CustomerSupportError$inboundSchema,
24
- CustomerSupportError$Outbound,
25
- CustomerSupportError$outboundSchema,
26
- } from "./customersupporterror.js";
27
- import {
28
- TermsOfServiceError,
29
- TermsOfServiceError$inboundSchema,
30
- TermsOfServiceError$Outbound,
31
- TermsOfServiceError$outboundSchema,
32
- } from "./termsofserviceerror.js";
33
-
34
- export type CreateAccountError = {
35
- accountType?: string | undefined;
36
- profile?: CreateProfileError | undefined;
37
- metadata?: string | undefined;
38
- termsOfService?: TermsOfServiceError | undefined;
39
- foreignID?: string | undefined;
40
- customerSupport?: CustomerSupportError | undefined;
41
- settings?: CreateAccountSettings | undefined;
42
- capabilities?: { [k: string]: string } | undefined;
43
- };
44
-
45
- /** @internal */
46
- export const CreateAccountError$inboundSchema: z.ZodType<
47
- CreateAccountError,
48
- z.ZodTypeDef,
49
- unknown
50
- > = z.object({
51
- accountType: z.string().optional(),
52
- profile: CreateProfileError$inboundSchema.optional(),
53
- metadata: z.string().optional(),
54
- termsOfService: TermsOfServiceError$inboundSchema.optional(),
55
- foreignID: z.string().optional(),
56
- customerSupport: CustomerSupportError$inboundSchema.optional(),
57
- settings: CreateAccountSettings$inboundSchema.optional(),
58
- capabilities: z.record(z.string()).optional(),
59
- });
60
-
61
- /** @internal */
62
- export type CreateAccountError$Outbound = {
63
- accountType?: string | undefined;
64
- profile?: CreateProfileError$Outbound | undefined;
65
- metadata?: string | undefined;
66
- termsOfService?: TermsOfServiceError$Outbound | undefined;
67
- foreignID?: string | undefined;
68
- customerSupport?: CustomerSupportError$Outbound | undefined;
69
- settings?: CreateAccountSettings$Outbound | undefined;
70
- capabilities?: { [k: string]: string } | undefined;
71
- };
72
-
73
- /** @internal */
74
- export const CreateAccountError$outboundSchema: z.ZodType<
75
- CreateAccountError$Outbound,
76
- z.ZodTypeDef,
77
- CreateAccountError
78
- > = z.object({
79
- accountType: z.string().optional(),
80
- profile: CreateProfileError$outboundSchema.optional(),
81
- metadata: z.string().optional(),
82
- termsOfService: TermsOfServiceError$outboundSchema.optional(),
83
- foreignID: z.string().optional(),
84
- customerSupport: CustomerSupportError$outboundSchema.optional(),
85
- settings: CreateAccountSettings$outboundSchema.optional(),
86
- capabilities: z.record(z.string()).optional(),
87
- });
88
-
89
- /**
90
- * @internal
91
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
92
- */
93
- export namespace CreateAccountError$ {
94
- /** @deprecated use `CreateAccountError$inboundSchema` instead. */
95
- export const inboundSchema = CreateAccountError$inboundSchema;
96
- /** @deprecated use `CreateAccountError$outboundSchema` instead. */
97
- export const outboundSchema = CreateAccountError$outboundSchema;
98
- /** @deprecated use `CreateAccountError$Outbound` instead. */
99
- export type Outbound = CreateAccountError$Outbound;
100
- }
101
-
102
- export function createAccountErrorToJSON(
103
- createAccountError: CreateAccountError,
104
- ): string {
105
- return JSON.stringify(
106
- CreateAccountError$outboundSchema.parse(createAccountError),
107
- );
108
- }
109
-
110
- export function createAccountErrorFromJSON(
111
- jsonString: string,
112
- ): SafeParseResult<CreateAccountError, SDKValidationError> {
113
- return safeParse(
114
- jsonString,
115
- (x) => CreateAccountError$inboundSchema.parse(JSON.parse(x)),
116
- `Failed to parse 'CreateAccountError' from JSON`,
117
- );
118
- }
@@ -1,110 +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
- import {
10
- CreateAccountSettings,
11
- CreateAccountSettings$inboundSchema,
12
- CreateAccountSettings$Outbound,
13
- CreateAccountSettings$outboundSchema,
14
- } from "./createaccountsettings.js";
15
- import {
16
- CreateProfileError,
17
- CreateProfileError$inboundSchema,
18
- CreateProfileError$Outbound,
19
- CreateProfileError$outboundSchema,
20
- } from "./createprofileerror.js";
21
- import {
22
- CustomerSupportError,
23
- CustomerSupportError$inboundSchema,
24
- CustomerSupportError$Outbound,
25
- CustomerSupportError$outboundSchema,
26
- } from "./customersupporterror.js";
27
- import {
28
- TermsOfServiceError,
29
- TermsOfServiceError$inboundSchema,
30
- TermsOfServiceError$Outbound,
31
- TermsOfServiceError$outboundSchema,
32
- } from "./termsofserviceerror.js";
33
-
34
- export type PatchAccountError = {
35
- profile?: CreateProfileError | undefined;
36
- metadata?: string | undefined;
37
- termsOfService?: TermsOfServiceError | undefined;
38
- foreignID?: string | undefined;
39
- customerSupport?: CustomerSupportError | undefined;
40
- settings?: CreateAccountSettings | undefined;
41
- };
42
-
43
- /** @internal */
44
- export const PatchAccountError$inboundSchema: z.ZodType<
45
- PatchAccountError,
46
- z.ZodTypeDef,
47
- unknown
48
- > = z.object({
49
- profile: CreateProfileError$inboundSchema.optional(),
50
- metadata: z.string().optional(),
51
- termsOfService: TermsOfServiceError$inboundSchema.optional(),
52
- foreignID: z.string().optional(),
53
- customerSupport: CustomerSupportError$inboundSchema.optional(),
54
- settings: CreateAccountSettings$inboundSchema.optional(),
55
- });
56
-
57
- /** @internal */
58
- export type PatchAccountError$Outbound = {
59
- profile?: CreateProfileError$Outbound | undefined;
60
- metadata?: string | undefined;
61
- termsOfService?: TermsOfServiceError$Outbound | undefined;
62
- foreignID?: string | undefined;
63
- customerSupport?: CustomerSupportError$Outbound | undefined;
64
- settings?: CreateAccountSettings$Outbound | undefined;
65
- };
66
-
67
- /** @internal */
68
- export const PatchAccountError$outboundSchema: z.ZodType<
69
- PatchAccountError$Outbound,
70
- z.ZodTypeDef,
71
- PatchAccountError
72
- > = z.object({
73
- profile: CreateProfileError$outboundSchema.optional(),
74
- metadata: z.string().optional(),
75
- termsOfService: TermsOfServiceError$outboundSchema.optional(),
76
- foreignID: z.string().optional(),
77
- customerSupport: CustomerSupportError$outboundSchema.optional(),
78
- settings: CreateAccountSettings$outboundSchema.optional(),
79
- });
80
-
81
- /**
82
- * @internal
83
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
84
- */
85
- export namespace PatchAccountError$ {
86
- /** @deprecated use `PatchAccountError$inboundSchema` instead. */
87
- export const inboundSchema = PatchAccountError$inboundSchema;
88
- /** @deprecated use `PatchAccountError$outboundSchema` instead. */
89
- export const outboundSchema = PatchAccountError$outboundSchema;
90
- /** @deprecated use `PatchAccountError$Outbound` instead. */
91
- export type Outbound = PatchAccountError$Outbound;
92
- }
93
-
94
- export function patchAccountErrorToJSON(
95
- patchAccountError: PatchAccountError,
96
- ): string {
97
- return JSON.stringify(
98
- PatchAccountError$outboundSchema.parse(patchAccountError),
99
- );
100
- }
101
-
102
- export function patchAccountErrorFromJSON(
103
- jsonString: string,
104
- ): SafeParseResult<PatchAccountError, SDKValidationError> {
105
- return safeParse(
106
- jsonString,
107
- (x) => PatchAccountError$inboundSchema.parse(JSON.parse(x)),
108
- `Failed to parse 'PatchAccountError' from JSON`,
109
- );
110
- }
@@ -1,86 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import * as components from "../components/index.js";
7
- import { MoovError } from "./mooverror.js";
8
-
9
- /**
10
- * The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
11
- */
12
- export type CreateAccountResponseBodyData = {
13
- error: components.CreateAccountError;
14
- };
15
-
16
- /**
17
- * The request was well-formed, but the contents failed validation. Check the request for missing or invalid fields.
18
- */
19
- export class CreateAccountResponseBody extends MoovError {
20
- error: components.CreateAccountError;
21
-
22
- /** The original data that was passed to this error instance. */
23
- data$: CreateAccountResponseBodyData;
24
-
25
- constructor(
26
- err: CreateAccountResponseBodyData,
27
- httpMeta: { response: Response; request: Request; body: string },
28
- ) {
29
- const message = "message" in err && typeof err.message === "string"
30
- ? err.message
31
- : `API error occurred: ${JSON.stringify(err)}`;
32
- super(message, httpMeta);
33
- this.data$ = err;
34
- this.error = err.error;
35
-
36
- this.name = "CreateAccountResponseBody";
37
- }
38
- }
39
-
40
- /** @internal */
41
- export const CreateAccountResponseBody$inboundSchema: z.ZodType<
42
- CreateAccountResponseBody,
43
- z.ZodTypeDef,
44
- unknown
45
- > = z.object({
46
- error: components.CreateAccountError$inboundSchema,
47
- request$: z.instanceof(Request),
48
- response$: z.instanceof(Response),
49
- body$: z.string(),
50
- })
51
- .transform((v) => {
52
- return new CreateAccountResponseBody(v, {
53
- request: v.request$,
54
- response: v.response$,
55
- body: v.body$,
56
- });
57
- });
58
-
59
- /** @internal */
60
- export type CreateAccountResponseBody$Outbound = {
61
- error: components.CreateAccountError$Outbound;
62
- };
63
-
64
- /** @internal */
65
- export const CreateAccountResponseBody$outboundSchema: z.ZodType<
66
- CreateAccountResponseBody$Outbound,
67
- z.ZodTypeDef,
68
- CreateAccountResponseBody
69
- > = z.instanceof(CreateAccountResponseBody)
70
- .transform(v => v.data$)
71
- .pipe(z.object({
72
- error: components.CreateAccountError$outboundSchema,
73
- }));
74
-
75
- /**
76
- * @internal
77
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
78
- */
79
- export namespace CreateAccountResponseBody$ {
80
- /** @deprecated use `CreateAccountResponseBody$inboundSchema` instead. */
81
- export const inboundSchema = CreateAccountResponseBody$inboundSchema;
82
- /** @deprecated use `CreateAccountResponseBody$outboundSchema` instead. */
83
- export const outboundSchema = CreateAccountResponseBody$outboundSchema;
84
- /** @deprecated use `CreateAccountResponseBody$Outbound` instead. */
85
- export type Outbound = CreateAccountResponseBody$Outbound;
86
- }