@moovio/sdk 0.12.6 → 0.13.0

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 (279) hide show
  1. package/README.md +48 -35
  2. package/bin/mcp-server.js +1183 -68
  3. package/bin/mcp-server.js.map +58 -18
  4. package/docs/sdks/underwriting/README.md +95 -0
  5. package/funcs/transfersList.js +1 -0
  6. package/funcs/transfersList.js.map +1 -1
  7. package/funcs/underwritingSave.d.ts +20 -0
  8. package/funcs/underwritingSave.d.ts.map +1 -0
  9. package/funcs/underwritingSave.js +145 -0
  10. package/funcs/underwritingSave.js.map +1 -0
  11. package/jsr.json +1 -1
  12. package/lib/config.d.ts +3 -3
  13. package/lib/config.js +3 -3
  14. package/mcp-server/mcp-server.js +1 -1
  15. package/mcp-server/server.d.ts.map +1 -1
  16. package/mcp-server/server.js +3 -1
  17. package/mcp-server/server.js.map +1 -1
  18. package/mcp-server/tools/underwritingSave.d.ts +8 -0
  19. package/mcp-server/tools/underwritingSave.d.ts.map +1 -0
  20. package/mcp-server/tools/underwritingSave.js +67 -0
  21. package/mcp-server/tools/underwritingSave.js.map +1 -0
  22. package/models/components/businesspresence.d.ts +40 -0
  23. package/models/components/businesspresence.d.ts.map +1 -0
  24. package/models/components/businesspresence.js +64 -0
  25. package/models/components/businesspresence.js.map +1 -0
  26. package/models/components/cardacceptancemethods.d.ts +45 -0
  27. package/models/components/cardacceptancemethods.d.ts.map +1 -0
  28. package/models/components/cardacceptancemethods.js +73 -0
  29. package/models/components/cardacceptancemethods.js.map +1 -0
  30. package/models/components/cardacceptancemethodserror.d.ts +33 -0
  31. package/models/components/cardacceptancemethodserror.d.ts.map +1 -0
  32. package/models/components/cardacceptancemethodserror.js +73 -0
  33. package/models/components/cardacceptancemethodserror.js.map +1 -0
  34. package/models/components/collectfunds.d.ts +33 -0
  35. package/models/components/collectfunds.d.ts.map +1 -0
  36. package/models/components/collectfunds.js +73 -0
  37. package/models/components/collectfunds.js.map +1 -0
  38. package/models/components/collectfundsach.d.ts +30 -0
  39. package/models/components/collectfundsach.d.ts.map +1 -0
  40. package/models/components/collectfundsach.js +70 -0
  41. package/models/components/collectfundsach.js.map +1 -0
  42. package/models/components/collectfundsacherror.d.ts +30 -0
  43. package/models/components/collectfundsacherror.d.ts.map +1 -0
  44. package/models/components/collectfundsacherror.js +70 -0
  45. package/models/components/collectfundsacherror.js.map +1 -0
  46. package/models/components/collectfundscardpayments.d.ts +44 -0
  47. package/models/components/collectfundscardpayments.d.ts.map +1 -0
  48. package/models/components/collectfundscardpayments.js +81 -0
  49. package/models/components/collectfundscardpayments.js.map +1 -0
  50. package/models/components/collectfundscardpaymentserror.d.ts +40 -0
  51. package/models/components/collectfundscardpaymentserror.d.ts.map +1 -0
  52. package/models/components/collectfundscardpaymentserror.js +80 -0
  53. package/models/components/collectfundscardpaymentserror.js.map +1 -0
  54. package/models/components/collectfundserror.d.ts +33 -0
  55. package/models/components/collectfundserror.d.ts.map +1 -0
  56. package/models/components/collectfundserror.js +73 -0
  57. package/models/components/collectfundserror.js.map +1 -0
  58. package/models/components/createdtransfer.d.ts +5 -0
  59. package/models/components/createdtransfer.d.ts.map +1 -1
  60. package/models/components/createdtransfer.js +2 -0
  61. package/models/components/createdtransfer.js.map +1 -1
  62. package/models/components/createtransfer.d.ts +5 -0
  63. package/models/components/createtransfer.d.ts.map +1 -1
  64. package/models/components/createtransfer.js +2 -0
  65. package/models/components/createtransfer.js.map +1 -1
  66. package/models/components/estimatedactivity.d.ts +37 -0
  67. package/models/components/estimatedactivity.d.ts.map +1 -0
  68. package/models/components/estimatedactivity.js +74 -0
  69. package/models/components/estimatedactivity.js.map +1 -0
  70. package/models/components/estimatedactivityerror.d.ts +33 -0
  71. package/models/components/estimatedactivityerror.d.ts.map +1 -0
  72. package/models/components/estimatedactivityerror.js +73 -0
  73. package/models/components/estimatedactivityerror.js.map +1 -0
  74. package/models/components/fulfillment.d.ts +33 -0
  75. package/models/components/fulfillment.d.ts.map +1 -0
  76. package/models/components/fulfillment.js +73 -0
  77. package/models/components/fulfillment.js.map +1 -0
  78. package/models/components/fulfillmenterror.d.ts +31 -0
  79. package/models/components/fulfillmenterror.d.ts.map +1 -0
  80. package/models/components/fulfillmenterror.js +71 -0
  81. package/models/components/fulfillmenterror.js.map +1 -0
  82. package/models/components/fulfillmentmethod.d.ts +49 -0
  83. package/models/components/fulfillmentmethod.d.ts.map +1 -0
  84. package/models/components/fulfillmentmethod.js +67 -0
  85. package/models/components/fulfillmentmethod.js.map +1 -0
  86. package/models/components/fulfillmenttimeframe.d.ts +46 -0
  87. package/models/components/fulfillmenttimeframe.d.ts.map +1 -0
  88. package/models/components/fulfillmenttimeframe.js +66 -0
  89. package/models/components/fulfillmenttimeframe.js.map +1 -0
  90. package/models/components/geographicreach.d.ts +31 -0
  91. package/models/components/geographicreach.d.ts.map +1 -0
  92. package/models/components/geographicreach.js +61 -0
  93. package/models/components/geographicreach.js.map +1 -0
  94. package/models/components/index.d.ts +36 -0
  95. package/models/components/index.d.ts.map +1 -1
  96. package/models/components/index.js +36 -0
  97. package/models/components/index.js.map +1 -1
  98. package/models/components/moneytransfer.d.ts +33 -0
  99. package/models/components/moneytransfer.d.ts.map +1 -0
  100. package/models/components/moneytransfer.js +73 -0
  101. package/models/components/moneytransfer.js.map +1 -0
  102. package/models/components/moneytransfererror.d.ts +33 -0
  103. package/models/components/moneytransfererror.d.ts.map +1 -0
  104. package/models/components/moneytransfererror.js +73 -0
  105. package/models/components/moneytransfererror.js.map +1 -0
  106. package/models/components/moneytransferpullfromcard.d.ts +30 -0
  107. package/models/components/moneytransferpullfromcard.d.ts.map +1 -0
  108. package/models/components/moneytransferpullfromcard.js +70 -0
  109. package/models/components/moneytransferpullfromcard.js.map +1 -0
  110. package/models/components/moneytransferpullfromcarderror.d.ts +30 -0
  111. package/models/components/moneytransferpullfromcarderror.d.ts.map +1 -0
  112. package/models/components/moneytransferpullfromcarderror.js +70 -0
  113. package/models/components/moneytransferpullfromcarderror.js.map +1 -0
  114. package/models/components/moneytransferpushtocard.d.ts +30 -0
  115. package/models/components/moneytransferpushtocard.d.ts.map +1 -0
  116. package/models/components/moneytransferpushtocard.js +70 -0
  117. package/models/components/moneytransferpushtocard.js.map +1 -0
  118. package/models/components/moneytransferpushtocarderror.d.ts +30 -0
  119. package/models/components/moneytransferpushtocarderror.d.ts.map +1 -0
  120. package/models/components/moneytransferpushtocarderror.js +70 -0
  121. package/models/components/moneytransferpushtocarderror.js.map +1 -0
  122. package/models/components/monthlyvolumerange.d.ts +52 -0
  123. package/models/components/monthlyvolumerange.d.ts.map +1 -0
  124. package/models/components/monthlyvolumerange.js +69 -0
  125. package/models/components/monthlyvolumerange.js.map +1 -0
  126. package/models/components/pendinglitigation.d.ts +52 -0
  127. package/models/components/pendinglitigation.d.ts.map +1 -0
  128. package/models/components/pendinglitigation.js +68 -0
  129. package/models/components/pendinglitigation.js.map +1 -0
  130. package/models/components/refundpolicy.d.ts +49 -0
  131. package/models/components/refundpolicy.d.ts.map +1 -0
  132. package/models/components/refundpolicy.js +67 -0
  133. package/models/components/refundpolicy.js.map +1 -0
  134. package/models/components/sendfunds.d.ts +36 -0
  135. package/models/components/sendfunds.d.ts.map +1 -0
  136. package/models/components/sendfunds.js +76 -0
  137. package/models/components/sendfunds.js.map +1 -0
  138. package/models/components/sendfundsach.d.ts +30 -0
  139. package/models/components/sendfundsach.d.ts.map +1 -0
  140. package/models/components/sendfundsach.js +70 -0
  141. package/models/components/sendfundsach.js.map +1 -0
  142. package/models/components/sendfundsacherror.d.ts +30 -0
  143. package/models/components/sendfundsacherror.d.ts.map +1 -0
  144. package/models/components/sendfundsacherror.js +70 -0
  145. package/models/components/sendfundsacherror.js.map +1 -0
  146. package/models/components/sendfundserror.d.ts +36 -0
  147. package/models/components/sendfundserror.d.ts.map +1 -0
  148. package/models/components/sendfundserror.js +76 -0
  149. package/models/components/sendfundserror.js.map +1 -0
  150. package/models/components/sendfundspushtocard.d.ts +30 -0
  151. package/models/components/sendfundspushtocard.d.ts.map +1 -0
  152. package/models/components/sendfundspushtocard.js +70 -0
  153. package/models/components/sendfundspushtocard.js.map +1 -0
  154. package/models/components/sendfundspushtocarderror.d.ts +30 -0
  155. package/models/components/sendfundspushtocarderror.d.ts.map +1 -0
  156. package/models/components/sendfundspushtocarderror.js +70 -0
  157. package/models/components/sendfundspushtocarderror.js.map +1 -0
  158. package/models/components/sendfundsrtp.d.ts +30 -0
  159. package/models/components/sendfundsrtp.d.ts.map +1 -0
  160. package/models/components/sendfundsrtp.js +70 -0
  161. package/models/components/sendfundsrtp.js.map +1 -0
  162. package/models/components/sendfundsrtperror.d.ts +30 -0
  163. package/models/components/sendfundsrtperror.d.ts.map +1 -0
  164. package/models/components/sendfundsrtperror.js +70 -0
  165. package/models/components/sendfundsrtperror.js.map +1 -0
  166. package/models/components/transfer.d.ts +5 -0
  167. package/models/components/transfer.d.ts.map +1 -1
  168. package/models/components/transfer.js +2 -0
  169. package/models/components/transfer.js.map +1 -1
  170. package/models/components/underwriting.d.ts +35 -14
  171. package/models/components/underwriting.d.ts.map +1 -1
  172. package/models/components/underwriting.js +36 -14
  173. package/models/components/underwriting.js.map +1 -1
  174. package/models/components/upsertunderwriting.d.ts +48 -0
  175. package/models/components/upsertunderwriting.d.ts.map +1 -0
  176. package/models/components/upsertunderwriting.js +89 -0
  177. package/models/components/upsertunderwriting.js.map +1 -0
  178. package/models/components/volumesharebycustomertype.d.ts +33 -0
  179. package/models/components/volumesharebycustomertype.d.ts.map +1 -0
  180. package/models/components/volumesharebycustomertype.js +73 -0
  181. package/models/components/volumesharebycustomertype.js.map +1 -0
  182. package/models/components/volumesharebycustomertypeerror.d.ts +33 -0
  183. package/models/components/volumesharebycustomertypeerror.d.ts.map +1 -0
  184. package/models/components/volumesharebycustomertypeerror.js +73 -0
  185. package/models/components/volumesharebycustomertypeerror.js.map +1 -0
  186. package/models/components/webhookdatatransfercreated.d.ts +2 -0
  187. package/models/components/webhookdatatransfercreated.d.ts.map +1 -1
  188. package/models/components/webhookdatatransfercreated.js +2 -0
  189. package/models/components/webhookdatatransfercreated.js.map +1 -1
  190. package/models/components/webhookdatatransferupdated.d.ts +2 -0
  191. package/models/components/webhookdatatransferupdated.d.ts.map +1 -1
  192. package/models/components/webhookdatatransferupdated.js +2 -0
  193. package/models/components/webhookdatatransferupdated.js.map +1 -1
  194. package/models/errors/index.d.ts +1 -0
  195. package/models/errors/index.d.ts.map +1 -1
  196. package/models/errors/index.js +1 -0
  197. package/models/errors/index.js.map +1 -1
  198. package/models/errors/transfer.d.ts +9 -0
  199. package/models/errors/transfer.d.ts.map +1 -1
  200. package/models/errors/transfer.js +4 -0
  201. package/models/errors/transfer.js.map +1 -1
  202. package/models/errors/upsertunderwritingerror.d.ts +73 -0
  203. package/models/errors/upsertunderwritingerror.d.ts.map +1 -0
  204. package/models/errors/upsertunderwritingerror.js +150 -0
  205. package/models/errors/upsertunderwritingerror.js.map +1 -0
  206. package/models/operations/index.d.ts +1 -0
  207. package/models/operations/index.d.ts.map +1 -1
  208. package/models/operations/index.js +1 -0
  209. package/models/operations/index.js.map +1 -1
  210. package/models/operations/listtransfers.d.ts +5 -0
  211. package/models/operations/listtransfers.d.ts.map +1 -1
  212. package/models/operations/listtransfers.js +2 -0
  213. package/models/operations/listtransfers.js.map +1 -1
  214. package/models/operations/saveunderwriting.d.ts +101 -0
  215. package/models/operations/saveunderwriting.d.ts.map +1 -0
  216. package/models/operations/saveunderwriting.js +155 -0
  217. package/models/operations/saveunderwriting.js.map +1 -0
  218. package/package.json +1 -1
  219. package/sdk/underwriting.d.ts +9 -0
  220. package/sdk/underwriting.d.ts.map +1 -1
  221. package/sdk/underwriting.js +12 -0
  222. package/sdk/underwriting.js.map +1 -1
  223. package/src/__tests__/mockserver/README.md +52 -0
  224. package/src/funcs/transfersList.ts +1 -0
  225. package/src/funcs/underwritingSave.ts +207 -0
  226. package/src/lib/config.ts +3 -3
  227. package/src/mcp-server/mcp-server.ts +1 -1
  228. package/src/mcp-server/server.ts +3 -1
  229. package/src/mcp-server/tools/underwritingSave.ts +40 -0
  230. package/src/models/components/businesspresence.ts +37 -0
  231. package/src/models/components/cardacceptancemethods.ts +86 -0
  232. package/src/models/components/cardacceptancemethodserror.ts +74 -0
  233. package/src/models/components/collectfunds.ts +78 -0
  234. package/src/models/components/collectfundsach.ts +70 -0
  235. package/src/models/components/collectfundsacherror.ts +72 -0
  236. package/src/models/components/collectfundscardpayments.ts +108 -0
  237. package/src/models/components/collectfundscardpaymentserror.ts +102 -0
  238. package/src/models/components/collectfundserror.ts +82 -0
  239. package/src/models/components/createdtransfer.ts +7 -0
  240. package/src/models/components/createtransfer.ts +7 -0
  241. package/src/models/components/estimatedactivity.ts +82 -0
  242. package/src/models/components/estimatedactivityerror.ts +74 -0
  243. package/src/models/components/fulfillment.ts +76 -0
  244. package/src/models/components/fulfillmenterror.ts +70 -0
  245. package/src/models/components/fulfillmentmethod.ts +40 -0
  246. package/src/models/components/fulfillmenttimeframe.ts +39 -0
  247. package/src/models/components/geographicreach.ts +34 -0
  248. package/src/models/components/index.ts +36 -0
  249. package/src/models/components/moneytransfer.ts +78 -0
  250. package/src/models/components/moneytransfererror.ts +82 -0
  251. package/src/models/components/moneytransferpullfromcard.ts +72 -0
  252. package/src/models/components/moneytransferpullfromcarderror.ts +74 -0
  253. package/src/models/components/moneytransferpushtocard.ts +72 -0
  254. package/src/models/components/moneytransferpushtocarderror.ts +74 -0
  255. package/src/models/components/monthlyvolumerange.ts +45 -0
  256. package/src/models/components/pendinglitigation.ts +42 -0
  257. package/src/models/components/refundpolicy.ts +38 -0
  258. package/src/models/components/sendfunds.ts +88 -0
  259. package/src/models/components/sendfundsach.ts +68 -0
  260. package/src/models/components/sendfundsacherror.ts +72 -0
  261. package/src/models/components/sendfundserror.ts +88 -0
  262. package/src/models/components/sendfundspushtocard.ts +72 -0
  263. package/src/models/components/sendfundspushtocarderror.ts +72 -0
  264. package/src/models/components/sendfundsrtp.ts +68 -0
  265. package/src/models/components/sendfundsrtperror.ts +72 -0
  266. package/src/models/components/transfer.ts +7 -0
  267. package/src/models/components/underwriting.ts +96 -28
  268. package/src/models/components/upsertunderwriting.ts +130 -0
  269. package/src/models/components/volumesharebycustomertype.ts +74 -0
  270. package/src/models/components/volumesharebycustomertypeerror.ts +76 -0
  271. package/src/models/components/webhookdatatransfercreated.ts +4 -0
  272. package/src/models/components/webhookdatatransferupdated.ts +4 -0
  273. package/src/models/errors/index.ts +1 -0
  274. package/src/models/errors/transfer.ts +12 -0
  275. package/src/models/errors/upsertunderwritingerror.ts +185 -0
  276. package/src/models/operations/index.ts +1 -0
  277. package/src/models/operations/listtransfers.ts +7 -0
  278. package/src/models/operations/saveunderwriting.ts +231 -0
  279. package/src/sdk/underwriting.ts +20 -0
@@ -0,0 +1,40 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { underwritingSave } from "../../funcs/underwritingSave.js";
6
+ import * as operations from "../../models/operations/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: operations.SaveUnderwritingRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$underwritingSave: ToolDefinition<typeof args> = {
14
+ name: "underwriting-save",
15
+ description: `Create or update the account's underwriting.
16
+
17
+ Read our [underwriting guide](https://docs.moov.io/guides/accounts/requirements/underwriting/) to learn more.
18
+
19
+ To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
20
+ you'll need to specify the \`/accounts/{accountID}/profile.write\` scope.`,
21
+ args,
22
+ tool: async (client, args, ctx) => {
23
+ const [result, apiCall] = await underwritingSave(
24
+ client,
25
+ args.request,
26
+ { fetchOptions: { signal: ctx.signal } },
27
+ ).$inspect();
28
+
29
+ if (!result.ok) {
30
+ return {
31
+ content: [{ type: "text", text: result.error.message }],
32
+ isError: true,
33
+ };
34
+ }
35
+
36
+ const value = result.value.result;
37
+
38
+ return formatResult(value, apiCall);
39
+ },
40
+ };
@@ -0,0 +1,37 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { ClosedEnum } from "../../types/enums.js";
7
+
8
+ export const BusinessPresence = {
9
+ CommercialOffice: "commercial-office",
10
+ HomeBased: "home-based",
11
+ MixedPresence: "mixed-presence",
12
+ MobileBusiness: "mobile-business",
13
+ OnlineOnly: "online-only",
14
+ RetailStorefront: "retail-storefront",
15
+ } as const;
16
+ export type BusinessPresence = ClosedEnum<typeof BusinessPresence>;
17
+
18
+ /** @internal */
19
+ export const BusinessPresence$inboundSchema: z.ZodNativeEnum<
20
+ typeof BusinessPresence
21
+ > = z.nativeEnum(BusinessPresence);
22
+
23
+ /** @internal */
24
+ export const BusinessPresence$outboundSchema: z.ZodNativeEnum<
25
+ typeof BusinessPresence
26
+ > = BusinessPresence$inboundSchema;
27
+
28
+ /**
29
+ * @internal
30
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
31
+ */
32
+ export namespace BusinessPresence$ {
33
+ /** @deprecated use `BusinessPresence$inboundSchema` instead. */
34
+ export const inboundSchema = BusinessPresence$inboundSchema;
35
+ /** @deprecated use `BusinessPresence$outboundSchema` instead. */
36
+ export const outboundSchema = BusinessPresence$outboundSchema;
37
+ }
@@ -0,0 +1,86 @@
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
+ * Describes the distribution of card transactions by payment method.
12
+ */
13
+ export type CardAcceptanceMethods = {
14
+ /**
15
+ * Percentage of card transactions that are in-person payments. Minimum value is 0, maximum is 100.
16
+ */
17
+ inPersonPercentage?: number | undefined;
18
+ /**
19
+ * Percentage of card transactions that are mail or phone payments. Minimum value is 0, maximum is 100.
20
+ */
21
+ mailOrPhonePercentage?: number | undefined;
22
+ /**
23
+ * Percentage of card transactions that are online payments. Minimum value is 0, maximum is 100.
24
+ */
25
+ onlinePercentage?: number | undefined;
26
+ };
27
+
28
+ /** @internal */
29
+ export const CardAcceptanceMethods$inboundSchema: z.ZodType<
30
+ CardAcceptanceMethods,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.object({
34
+ inPersonPercentage: z.number().int().optional(),
35
+ mailOrPhonePercentage: z.number().int().optional(),
36
+ onlinePercentage: z.number().int().optional(),
37
+ });
38
+
39
+ /** @internal */
40
+ export type CardAcceptanceMethods$Outbound = {
41
+ inPersonPercentage?: number | undefined;
42
+ mailOrPhonePercentage?: number | undefined;
43
+ onlinePercentage?: number | undefined;
44
+ };
45
+
46
+ /** @internal */
47
+ export const CardAcceptanceMethods$outboundSchema: z.ZodType<
48
+ CardAcceptanceMethods$Outbound,
49
+ z.ZodTypeDef,
50
+ CardAcceptanceMethods
51
+ > = z.object({
52
+ inPersonPercentage: z.number().int().optional(),
53
+ mailOrPhonePercentage: z.number().int().optional(),
54
+ onlinePercentage: z.number().int().optional(),
55
+ });
56
+
57
+ /**
58
+ * @internal
59
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
+ */
61
+ export namespace CardAcceptanceMethods$ {
62
+ /** @deprecated use `CardAcceptanceMethods$inboundSchema` instead. */
63
+ export const inboundSchema = CardAcceptanceMethods$inboundSchema;
64
+ /** @deprecated use `CardAcceptanceMethods$outboundSchema` instead. */
65
+ export const outboundSchema = CardAcceptanceMethods$outboundSchema;
66
+ /** @deprecated use `CardAcceptanceMethods$Outbound` instead. */
67
+ export type Outbound = CardAcceptanceMethods$Outbound;
68
+ }
69
+
70
+ export function cardAcceptanceMethodsToJSON(
71
+ cardAcceptanceMethods: CardAcceptanceMethods,
72
+ ): string {
73
+ return JSON.stringify(
74
+ CardAcceptanceMethods$outboundSchema.parse(cardAcceptanceMethods),
75
+ );
76
+ }
77
+
78
+ export function cardAcceptanceMethodsFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<CardAcceptanceMethods, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) => CardAcceptanceMethods$inboundSchema.parse(JSON.parse(x)),
84
+ `Failed to parse 'CardAcceptanceMethods' from JSON`,
85
+ );
86
+ }
@@ -0,0 +1,74 @@
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 CardAcceptanceMethodsError = {
11
+ inPersonPercentage?: string | undefined;
12
+ mailOrPhonePercentage?: string | undefined;
13
+ onlinePercentage?: string | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export const CardAcceptanceMethodsError$inboundSchema: z.ZodType<
18
+ CardAcceptanceMethodsError,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ inPersonPercentage: z.string().optional(),
23
+ mailOrPhonePercentage: z.string().optional(),
24
+ onlinePercentage: z.string().optional(),
25
+ });
26
+
27
+ /** @internal */
28
+ export type CardAcceptanceMethodsError$Outbound = {
29
+ inPersonPercentage?: string | undefined;
30
+ mailOrPhonePercentage?: string | undefined;
31
+ onlinePercentage?: string | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const CardAcceptanceMethodsError$outboundSchema: z.ZodType<
36
+ CardAcceptanceMethodsError$Outbound,
37
+ z.ZodTypeDef,
38
+ CardAcceptanceMethodsError
39
+ > = z.object({
40
+ inPersonPercentage: z.string().optional(),
41
+ mailOrPhonePercentage: z.string().optional(),
42
+ onlinePercentage: z.string().optional(),
43
+ });
44
+
45
+ /**
46
+ * @internal
47
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
48
+ */
49
+ export namespace CardAcceptanceMethodsError$ {
50
+ /** @deprecated use `CardAcceptanceMethodsError$inboundSchema` instead. */
51
+ export const inboundSchema = CardAcceptanceMethodsError$inboundSchema;
52
+ /** @deprecated use `CardAcceptanceMethodsError$outboundSchema` instead. */
53
+ export const outboundSchema = CardAcceptanceMethodsError$outboundSchema;
54
+ /** @deprecated use `CardAcceptanceMethodsError$Outbound` instead. */
55
+ export type Outbound = CardAcceptanceMethodsError$Outbound;
56
+ }
57
+
58
+ export function cardAcceptanceMethodsErrorToJSON(
59
+ cardAcceptanceMethodsError: CardAcceptanceMethodsError,
60
+ ): string {
61
+ return JSON.stringify(
62
+ CardAcceptanceMethodsError$outboundSchema.parse(cardAcceptanceMethodsError),
63
+ );
64
+ }
65
+
66
+ export function cardAcceptanceMethodsErrorFromJSON(
67
+ jsonString: string,
68
+ ): SafeParseResult<CardAcceptanceMethodsError, SDKValidationError> {
69
+ return safeParse(
70
+ jsonString,
71
+ (x) => CardAcceptanceMethodsError$inboundSchema.parse(JSON.parse(x)),
72
+ `Failed to parse 'CardAcceptanceMethodsError' from JSON`,
73
+ );
74
+ }
@@ -0,0 +1,78 @@
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
+ CollectFundsAch,
11
+ CollectFundsAch$inboundSchema,
12
+ CollectFundsAch$Outbound,
13
+ CollectFundsAch$outboundSchema,
14
+ } from "./collectfundsach.js";
15
+ import {
16
+ CollectFundsCardPayments,
17
+ CollectFundsCardPayments$inboundSchema,
18
+ CollectFundsCardPayments$Outbound,
19
+ CollectFundsCardPayments$outboundSchema,
20
+ } from "./collectfundscardpayments.js";
21
+
22
+ export type CollectFunds = {
23
+ ach?: CollectFundsAch | undefined;
24
+ cardPayments?: CollectFundsCardPayments | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const CollectFunds$inboundSchema: z.ZodType<
29
+ CollectFunds,
30
+ z.ZodTypeDef,
31
+ unknown
32
+ > = z.object({
33
+ ach: CollectFundsAch$inboundSchema.optional(),
34
+ cardPayments: CollectFundsCardPayments$inboundSchema.optional(),
35
+ });
36
+
37
+ /** @internal */
38
+ export type CollectFunds$Outbound = {
39
+ ach?: CollectFundsAch$Outbound | undefined;
40
+ cardPayments?: CollectFundsCardPayments$Outbound | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const CollectFunds$outboundSchema: z.ZodType<
45
+ CollectFunds$Outbound,
46
+ z.ZodTypeDef,
47
+ CollectFunds
48
+ > = z.object({
49
+ ach: CollectFundsAch$outboundSchema.optional(),
50
+ cardPayments: CollectFundsCardPayments$outboundSchema.optional(),
51
+ });
52
+
53
+ /**
54
+ * @internal
55
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
+ */
57
+ export namespace CollectFunds$ {
58
+ /** @deprecated use `CollectFunds$inboundSchema` instead. */
59
+ export const inboundSchema = CollectFunds$inboundSchema;
60
+ /** @deprecated use `CollectFunds$outboundSchema` instead. */
61
+ export const outboundSchema = CollectFunds$outboundSchema;
62
+ /** @deprecated use `CollectFunds$Outbound` instead. */
63
+ export type Outbound = CollectFunds$Outbound;
64
+ }
65
+
66
+ export function collectFundsToJSON(collectFunds: CollectFunds): string {
67
+ return JSON.stringify(CollectFunds$outboundSchema.parse(collectFunds));
68
+ }
69
+
70
+ export function collectFundsFromJSON(
71
+ jsonString: string,
72
+ ): SafeParseResult<CollectFunds, SDKValidationError> {
73
+ return safeParse(
74
+ jsonString,
75
+ (x) => CollectFunds$inboundSchema.parse(JSON.parse(x)),
76
+ `Failed to parse 'CollectFunds' from JSON`,
77
+ );
78
+ }
@@ -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
+ import {
10
+ EstimatedActivity,
11
+ EstimatedActivity$inboundSchema,
12
+ EstimatedActivity$Outbound,
13
+ EstimatedActivity$outboundSchema,
14
+ } from "./estimatedactivity.js";
15
+
16
+ export type CollectFundsAch = {
17
+ estimatedActivity?: EstimatedActivity | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export const CollectFundsAch$inboundSchema: z.ZodType<
22
+ CollectFundsAch,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ estimatedActivity: EstimatedActivity$inboundSchema.optional(),
27
+ });
28
+
29
+ /** @internal */
30
+ export type CollectFundsAch$Outbound = {
31
+ estimatedActivity?: EstimatedActivity$Outbound | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const CollectFundsAch$outboundSchema: z.ZodType<
36
+ CollectFundsAch$Outbound,
37
+ z.ZodTypeDef,
38
+ CollectFundsAch
39
+ > = z.object({
40
+ estimatedActivity: EstimatedActivity$outboundSchema.optional(),
41
+ });
42
+
43
+ /**
44
+ * @internal
45
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
46
+ */
47
+ export namespace CollectFundsAch$ {
48
+ /** @deprecated use `CollectFundsAch$inboundSchema` instead. */
49
+ export const inboundSchema = CollectFundsAch$inboundSchema;
50
+ /** @deprecated use `CollectFundsAch$outboundSchema` instead. */
51
+ export const outboundSchema = CollectFundsAch$outboundSchema;
52
+ /** @deprecated use `CollectFundsAch$Outbound` instead. */
53
+ export type Outbound = CollectFundsAch$Outbound;
54
+ }
55
+
56
+ export function collectFundsAchToJSON(
57
+ collectFundsAch: CollectFundsAch,
58
+ ): string {
59
+ return JSON.stringify(CollectFundsAch$outboundSchema.parse(collectFundsAch));
60
+ }
61
+
62
+ export function collectFundsAchFromJSON(
63
+ jsonString: string,
64
+ ): SafeParseResult<CollectFundsAch, SDKValidationError> {
65
+ return safeParse(
66
+ jsonString,
67
+ (x) => CollectFundsAch$inboundSchema.parse(JSON.parse(x)),
68
+ `Failed to parse 'CollectFundsAch' 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
+ import {
10
+ EstimatedActivityError,
11
+ EstimatedActivityError$inboundSchema,
12
+ EstimatedActivityError$Outbound,
13
+ EstimatedActivityError$outboundSchema,
14
+ } from "./estimatedactivityerror.js";
15
+
16
+ export type CollectFundsAchError = {
17
+ estimatedActivity?: EstimatedActivityError | undefined;
18
+ };
19
+
20
+ /** @internal */
21
+ export const CollectFundsAchError$inboundSchema: z.ZodType<
22
+ CollectFundsAchError,
23
+ z.ZodTypeDef,
24
+ unknown
25
+ > = z.object({
26
+ estimatedActivity: EstimatedActivityError$inboundSchema.optional(),
27
+ });
28
+
29
+ /** @internal */
30
+ export type CollectFundsAchError$Outbound = {
31
+ estimatedActivity?: EstimatedActivityError$Outbound | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const CollectFundsAchError$outboundSchema: z.ZodType<
36
+ CollectFundsAchError$Outbound,
37
+ z.ZodTypeDef,
38
+ CollectFundsAchError
39
+ > = z.object({
40
+ estimatedActivity: EstimatedActivityError$outboundSchema.optional(),
41
+ });
42
+
43
+ /**
44
+ * @internal
45
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
46
+ */
47
+ export namespace CollectFundsAchError$ {
48
+ /** @deprecated use `CollectFundsAchError$inboundSchema` instead. */
49
+ export const inboundSchema = CollectFundsAchError$inboundSchema;
50
+ /** @deprecated use `CollectFundsAchError$outboundSchema` instead. */
51
+ export const outboundSchema = CollectFundsAchError$outboundSchema;
52
+ /** @deprecated use `CollectFundsAchError$Outbound` instead. */
53
+ export type Outbound = CollectFundsAchError$Outbound;
54
+ }
55
+
56
+ export function collectFundsAchErrorToJSON(
57
+ collectFundsAchError: CollectFundsAchError,
58
+ ): string {
59
+ return JSON.stringify(
60
+ CollectFundsAchError$outboundSchema.parse(collectFundsAchError),
61
+ );
62
+ }
63
+
64
+ export function collectFundsAchErrorFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<CollectFundsAchError, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => CollectFundsAchError$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'CollectFundsAchError' from JSON`,
71
+ );
72
+ }
@@ -0,0 +1,108 @@
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
+ CardAcceptanceMethods,
11
+ CardAcceptanceMethods$inboundSchema,
12
+ CardAcceptanceMethods$Outbound,
13
+ CardAcceptanceMethods$outboundSchema,
14
+ } from "./cardacceptancemethods.js";
15
+ import {
16
+ EstimatedActivity,
17
+ EstimatedActivity$inboundSchema,
18
+ EstimatedActivity$Outbound,
19
+ EstimatedActivity$outboundSchema,
20
+ } from "./estimatedactivity.js";
21
+ import {
22
+ Fulfillment,
23
+ Fulfillment$inboundSchema,
24
+ Fulfillment$Outbound,
25
+ Fulfillment$outboundSchema,
26
+ } from "./fulfillment.js";
27
+ import {
28
+ RefundPolicy,
29
+ RefundPolicy$inboundSchema,
30
+ RefundPolicy$outboundSchema,
31
+ } from "./refundpolicy.js";
32
+
33
+ export type CollectFundsCardPayments = {
34
+ /**
35
+ * Describes the distribution of card transactions by payment method.
36
+ */
37
+ cardAcceptanceMethods?: CardAcceptanceMethods | undefined;
38
+ currentlyAcceptsCards?: boolean | undefined;
39
+ estimatedActivity?: EstimatedActivity | undefined;
40
+ fulfillment?: Fulfillment | undefined;
41
+ refundPolicy?: RefundPolicy | undefined;
42
+ };
43
+
44
+ /** @internal */
45
+ export const CollectFundsCardPayments$inboundSchema: z.ZodType<
46
+ CollectFundsCardPayments,
47
+ z.ZodTypeDef,
48
+ unknown
49
+ > = z.object({
50
+ cardAcceptanceMethods: CardAcceptanceMethods$inboundSchema.optional(),
51
+ currentlyAcceptsCards: z.boolean().optional(),
52
+ estimatedActivity: EstimatedActivity$inboundSchema.optional(),
53
+ fulfillment: Fulfillment$inboundSchema.optional(),
54
+ refundPolicy: RefundPolicy$inboundSchema.optional(),
55
+ });
56
+
57
+ /** @internal */
58
+ export type CollectFundsCardPayments$Outbound = {
59
+ cardAcceptanceMethods?: CardAcceptanceMethods$Outbound | undefined;
60
+ currentlyAcceptsCards?: boolean | undefined;
61
+ estimatedActivity?: EstimatedActivity$Outbound | undefined;
62
+ fulfillment?: Fulfillment$Outbound | undefined;
63
+ refundPolicy?: string | undefined;
64
+ };
65
+
66
+ /** @internal */
67
+ export const CollectFundsCardPayments$outboundSchema: z.ZodType<
68
+ CollectFundsCardPayments$Outbound,
69
+ z.ZodTypeDef,
70
+ CollectFundsCardPayments
71
+ > = z.object({
72
+ cardAcceptanceMethods: CardAcceptanceMethods$outboundSchema.optional(),
73
+ currentlyAcceptsCards: z.boolean().optional(),
74
+ estimatedActivity: EstimatedActivity$outboundSchema.optional(),
75
+ fulfillment: Fulfillment$outboundSchema.optional(),
76
+ refundPolicy: RefundPolicy$outboundSchema.optional(),
77
+ });
78
+
79
+ /**
80
+ * @internal
81
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
82
+ */
83
+ export namespace CollectFundsCardPayments$ {
84
+ /** @deprecated use `CollectFundsCardPayments$inboundSchema` instead. */
85
+ export const inboundSchema = CollectFundsCardPayments$inboundSchema;
86
+ /** @deprecated use `CollectFundsCardPayments$outboundSchema` instead. */
87
+ export const outboundSchema = CollectFundsCardPayments$outboundSchema;
88
+ /** @deprecated use `CollectFundsCardPayments$Outbound` instead. */
89
+ export type Outbound = CollectFundsCardPayments$Outbound;
90
+ }
91
+
92
+ export function collectFundsCardPaymentsToJSON(
93
+ collectFundsCardPayments: CollectFundsCardPayments,
94
+ ): string {
95
+ return JSON.stringify(
96
+ CollectFundsCardPayments$outboundSchema.parse(collectFundsCardPayments),
97
+ );
98
+ }
99
+
100
+ export function collectFundsCardPaymentsFromJSON(
101
+ jsonString: string,
102
+ ): SafeParseResult<CollectFundsCardPayments, SDKValidationError> {
103
+ return safeParse(
104
+ jsonString,
105
+ (x) => CollectFundsCardPayments$inboundSchema.parse(JSON.parse(x)),
106
+ `Failed to parse 'CollectFundsCardPayments' from JSON`,
107
+ );
108
+ }
@@ -0,0 +1,102 @@
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
+ CardAcceptanceMethodsError,
11
+ CardAcceptanceMethodsError$inboundSchema,
12
+ CardAcceptanceMethodsError$Outbound,
13
+ CardAcceptanceMethodsError$outboundSchema,
14
+ } from "./cardacceptancemethodserror.js";
15
+ import {
16
+ EstimatedActivityError,
17
+ EstimatedActivityError$inboundSchema,
18
+ EstimatedActivityError$Outbound,
19
+ EstimatedActivityError$outboundSchema,
20
+ } from "./estimatedactivityerror.js";
21
+ import {
22
+ FulfillmentError,
23
+ FulfillmentError$inboundSchema,
24
+ FulfillmentError$Outbound,
25
+ FulfillmentError$outboundSchema,
26
+ } from "./fulfillmenterror.js";
27
+
28
+ export type CollectFundsCardPaymentsError = {
29
+ cardAcceptanceMethods?: CardAcceptanceMethodsError | undefined;
30
+ currentlyAcceptsCards?: string | undefined;
31
+ estimatedActivity?: EstimatedActivityError | undefined;
32
+ fulfillment?: FulfillmentError | undefined;
33
+ refundPolicy?: string | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const CollectFundsCardPaymentsError$inboundSchema: z.ZodType<
38
+ CollectFundsCardPaymentsError,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.object({
42
+ cardAcceptanceMethods: CardAcceptanceMethodsError$inboundSchema.optional(),
43
+ currentlyAcceptsCards: z.string().optional(),
44
+ estimatedActivity: EstimatedActivityError$inboundSchema.optional(),
45
+ fulfillment: FulfillmentError$inboundSchema.optional(),
46
+ refundPolicy: z.string().optional(),
47
+ });
48
+
49
+ /** @internal */
50
+ export type CollectFundsCardPaymentsError$Outbound = {
51
+ cardAcceptanceMethods?: CardAcceptanceMethodsError$Outbound | undefined;
52
+ currentlyAcceptsCards?: string | undefined;
53
+ estimatedActivity?: EstimatedActivityError$Outbound | undefined;
54
+ fulfillment?: FulfillmentError$Outbound | undefined;
55
+ refundPolicy?: string | undefined;
56
+ };
57
+
58
+ /** @internal */
59
+ export const CollectFundsCardPaymentsError$outboundSchema: z.ZodType<
60
+ CollectFundsCardPaymentsError$Outbound,
61
+ z.ZodTypeDef,
62
+ CollectFundsCardPaymentsError
63
+ > = z.object({
64
+ cardAcceptanceMethods: CardAcceptanceMethodsError$outboundSchema.optional(),
65
+ currentlyAcceptsCards: z.string().optional(),
66
+ estimatedActivity: EstimatedActivityError$outboundSchema.optional(),
67
+ fulfillment: FulfillmentError$outboundSchema.optional(),
68
+ refundPolicy: z.string().optional(),
69
+ });
70
+
71
+ /**
72
+ * @internal
73
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
74
+ */
75
+ export namespace CollectFundsCardPaymentsError$ {
76
+ /** @deprecated use `CollectFundsCardPaymentsError$inboundSchema` instead. */
77
+ export const inboundSchema = CollectFundsCardPaymentsError$inboundSchema;
78
+ /** @deprecated use `CollectFundsCardPaymentsError$outboundSchema` instead. */
79
+ export const outboundSchema = CollectFundsCardPaymentsError$outboundSchema;
80
+ /** @deprecated use `CollectFundsCardPaymentsError$Outbound` instead. */
81
+ export type Outbound = CollectFundsCardPaymentsError$Outbound;
82
+ }
83
+
84
+ export function collectFundsCardPaymentsErrorToJSON(
85
+ collectFundsCardPaymentsError: CollectFundsCardPaymentsError,
86
+ ): string {
87
+ return JSON.stringify(
88
+ CollectFundsCardPaymentsError$outboundSchema.parse(
89
+ collectFundsCardPaymentsError,
90
+ ),
91
+ );
92
+ }
93
+
94
+ export function collectFundsCardPaymentsErrorFromJSON(
95
+ jsonString: string,
96
+ ): SafeParseResult<CollectFundsCardPaymentsError, SDKValidationError> {
97
+ return safeParse(
98
+ jsonString,
99
+ (x) => CollectFundsCardPaymentsError$inboundSchema.parse(JSON.parse(x)),
100
+ `Failed to parse 'CollectFundsCardPaymentsError' from JSON`,
101
+ );
102
+ }