@moovio/sdk 0.22.11 → 0.22.13

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 (290) hide show
  1. package/README.md +91 -51
  2. package/bin/mcp-server.js +2557 -621
  3. package/bin/mcp-server.js.map +59 -16
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/invoicesCreateInvoicePayment.d.ts +19 -0
  6. package/funcs/invoicesCreateInvoicePayment.d.ts.map +1 -0
  7. package/funcs/invoicesCreateInvoicePayment.js +148 -0
  8. package/funcs/invoicesCreateInvoicePayment.js.map +1 -0
  9. package/funcs/invoicesListInvoicePayments.d.ts +17 -0
  10. package/funcs/invoicesListInvoicePayments.d.ts.map +1 -0
  11. package/funcs/invoicesListInvoicePayments.js +129 -0
  12. package/funcs/invoicesListInvoicePayments.js.map +1 -0
  13. package/funcs/webhooksCreate.d.ts +16 -0
  14. package/funcs/webhooksCreate.d.ts.map +1 -0
  15. package/funcs/webhooksCreate.js +133 -0
  16. package/funcs/webhooksCreate.js.map +1 -0
  17. package/funcs/webhooksDisable.d.ts +15 -0
  18. package/funcs/webhooksDisable.d.ts.map +1 -0
  19. package/funcs/webhooksDisable.js +133 -0
  20. package/funcs/webhooksDisable.js.map +1 -0
  21. package/funcs/webhooksGet.d.ts +14 -0
  22. package/funcs/webhooksGet.d.ts.map +1 -0
  23. package/funcs/webhooksGet.js +122 -0
  24. package/funcs/webhooksGet.js.map +1 -0
  25. package/funcs/webhooksGetSecret.d.ts +14 -0
  26. package/funcs/webhooksGetSecret.d.ts.map +1 -0
  27. package/funcs/webhooksGetSecret.js +122 -0
  28. package/funcs/webhooksGetSecret.js.map +1 -0
  29. package/funcs/webhooksList.d.ts +14 -0
  30. package/funcs/webhooksList.d.ts.map +1 -0
  31. package/funcs/webhooksList.js +108 -0
  32. package/funcs/webhooksList.js.map +1 -0
  33. package/funcs/webhooksListEventTypes.d.ts +14 -0
  34. package/funcs/webhooksListEventTypes.d.ts.map +1 -0
  35. package/funcs/webhooksListEventTypes.js +108 -0
  36. package/funcs/webhooksListEventTypes.js.map +1 -0
  37. package/funcs/webhooksPing.d.ts +14 -0
  38. package/funcs/webhooksPing.d.ts.map +1 -0
  39. package/funcs/webhooksPing.js +122 -0
  40. package/funcs/webhooksPing.js.map +1 -0
  41. package/funcs/webhooksUpdate.d.ts +15 -0
  42. package/funcs/webhooksUpdate.d.ts.map +1 -0
  43. package/funcs/webhooksUpdate.js +138 -0
  44. package/funcs/webhooksUpdate.js.map +1 -0
  45. package/jsr.json +1 -1
  46. package/lib/config.d.ts +3 -3
  47. package/lib/config.js +3 -3
  48. package/mcp-server/mcp-server.js +1 -1
  49. package/mcp-server/server.d.ts.map +1 -1
  50. package/mcp-server/server.js +21 -1
  51. package/mcp-server/server.js.map +1 -1
  52. package/mcp-server/tools/invoicesCreateInvoicePayment.d.ts +8 -0
  53. package/mcp-server/tools/invoicesCreateInvoicePayment.d.ts.map +1 -0
  54. package/mcp-server/tools/invoicesCreateInvoicePayment.js +66 -0
  55. package/mcp-server/tools/invoicesCreateInvoicePayment.js.map +1 -0
  56. package/mcp-server/tools/invoicesListInvoicePayments.d.ts +8 -0
  57. package/mcp-server/tools/invoicesListInvoicePayments.d.ts.map +1 -0
  58. package/mcp-server/tools/invoicesListInvoicePayments.js +65 -0
  59. package/mcp-server/tools/invoicesListInvoicePayments.js.map +1 -0
  60. package/mcp-server/tools/webhooksCreate.d.ts +8 -0
  61. package/mcp-server/tools/webhooksCreate.d.ts.map +1 -0
  62. package/mcp-server/tools/webhooksCreate.js +62 -0
  63. package/mcp-server/tools/webhooksCreate.js.map +1 -0
  64. package/mcp-server/tools/webhooksDisable.d.ts +8 -0
  65. package/mcp-server/tools/webhooksDisable.d.ts.map +1 -0
  66. package/mcp-server/tools/webhooksDisable.js +61 -0
  67. package/mcp-server/tools/webhooksDisable.js.map +1 -0
  68. package/mcp-server/tools/webhooksGet.d.ts +8 -0
  69. package/mcp-server/tools/webhooksGet.d.ts.map +1 -0
  70. package/mcp-server/tools/webhooksGet.js +62 -0
  71. package/mcp-server/tools/webhooksGet.js.map +1 -0
  72. package/mcp-server/tools/webhooksGetSecret.d.ts +8 -0
  73. package/mcp-server/tools/webhooksGetSecret.d.ts.map +1 -0
  74. package/mcp-server/tools/webhooksGetSecret.js +62 -0
  75. package/mcp-server/tools/webhooksGetSecret.js.map +1 -0
  76. package/mcp-server/tools/webhooksList.d.ts +8 -0
  77. package/mcp-server/tools/webhooksList.d.ts.map +1 -0
  78. package/mcp-server/tools/webhooksList.js +62 -0
  79. package/mcp-server/tools/webhooksList.js.map +1 -0
  80. package/mcp-server/tools/webhooksListEventTypes.d.ts +8 -0
  81. package/mcp-server/tools/webhooksListEventTypes.d.ts.map +1 -0
  82. package/mcp-server/tools/webhooksListEventTypes.js +62 -0
  83. package/mcp-server/tools/webhooksListEventTypes.js.map +1 -0
  84. package/mcp-server/tools/webhooksPing.d.ts +8 -0
  85. package/mcp-server/tools/webhooksPing.d.ts.map +1 -0
  86. package/mcp-server/tools/webhooksPing.js +62 -0
  87. package/mcp-server/tools/webhooksPing.js.map +1 -0
  88. package/mcp-server/tools/webhooksUpdate.d.ts +8 -0
  89. package/mcp-server/tools/webhooksUpdate.d.ts.map +1 -0
  90. package/mcp-server/tools/webhooksUpdate.js +62 -0
  91. package/mcp-server/tools/webhooksUpdate.js.map +1 -0
  92. package/models/components/achtransactiondetails.d.ts +3 -0
  93. package/models/components/achtransactiondetails.d.ts.map +1 -1
  94. package/models/components/achtransactiondetails.js +3 -0
  95. package/models/components/achtransactiondetails.js.map +1 -1
  96. package/models/components/createinvoicepayment.d.ts +21 -0
  97. package/models/components/createinvoicepayment.d.ts.map +1 -0
  98. package/models/components/createinvoicepayment.js +63 -0
  99. package/models/components/createinvoicepayment.js.map +1 -0
  100. package/models/components/createtransferachaddendarecord.d.ts +23 -0
  101. package/models/components/createtransferachaddendarecord.d.ts.map +1 -0
  102. package/models/components/createtransferachaddendarecord.js +58 -0
  103. package/models/components/createtransferachaddendarecord.js.map +1 -0
  104. package/models/components/createtransferdestinationach.d.ts +3 -0
  105. package/models/components/createtransferdestinationach.d.ts.map +1 -1
  106. package/models/components/createtransferdestinationach.js +3 -0
  107. package/models/components/createtransferdestinationach.js.map +1 -1
  108. package/models/components/createtransfersourceach.d.ts +3 -0
  109. package/models/components/createtransfersourceach.d.ts.map +1 -1
  110. package/models/components/createtransfersourceach.js +3 -0
  111. package/models/components/createtransfersourceach.js.map +1 -1
  112. package/models/components/createwebhook.d.ts +40 -0
  113. package/models/components/createwebhook.d.ts.map +1 -0
  114. package/models/components/createwebhook.js +66 -0
  115. package/models/components/createwebhook.js.map +1 -0
  116. package/models/components/eventtype.d.ts +33 -0
  117. package/models/components/eventtype.d.ts.map +1 -0
  118. package/models/components/eventtype.js +62 -0
  119. package/models/components/eventtype.js.map +1 -0
  120. package/models/components/index.d.ts +10 -0
  121. package/models/components/index.d.ts.map +1 -1
  122. package/models/components/index.js +10 -0
  123. package/models/components/index.js.map +1 -1
  124. package/models/components/invoiceexternalpayment.d.ts +0 -11
  125. package/models/components/invoiceexternalpayment.d.ts.map +1 -1
  126. package/models/components/invoiceexternalpayment.js +1 -10
  127. package/models/components/invoiceexternalpayment.js.map +1 -1
  128. package/models/components/invoicepayment.d.ts +4 -2
  129. package/models/components/invoicepayment.d.ts.map +1 -1
  130. package/models/components/invoicepayment.js +4 -2
  131. package/models/components/invoicepayment.js.map +1 -1
  132. package/models/components/invoicetransferpayment.d.ts +0 -11
  133. package/models/components/invoicetransferpayment.d.ts.map +1 -1
  134. package/models/components/invoicetransferpayment.js +1 -11
  135. package/models/components/invoicetransferpayment.js.map +1 -1
  136. package/models/components/pingresponse.d.ts +38 -0
  137. package/models/components/pingresponse.d.ts.map +1 -0
  138. package/models/components/pingresponse.js +63 -0
  139. package/models/components/pingresponse.js.map +1 -0
  140. package/models/components/transferachaddendarecord.d.ts +28 -0
  141. package/models/components/transferachaddendarecord.d.ts.map +1 -0
  142. package/models/components/transferachaddendarecord.js +60 -0
  143. package/models/components/transferachaddendarecord.js.map +1 -0
  144. package/models/components/updatewebhook.d.ts +40 -0
  145. package/models/components/updatewebhook.d.ts.map +1 -0
  146. package/models/components/updatewebhook.js +66 -0
  147. package/models/components/updatewebhook.js.map +1 -0
  148. package/models/components/webhook.d.ts +60 -0
  149. package/models/components/webhook.d.ts.map +1 -0
  150. package/models/components/webhook.js +74 -0
  151. package/models/components/webhook.js.map +1 -0
  152. package/models/components/webhooksecret.d.ts +23 -0
  153. package/models/components/webhooksecret.d.ts.map +1 -0
  154. package/models/components/webhooksecret.js +58 -0
  155. package/models/components/webhooksecret.js.map +1 -0
  156. package/models/components/webhookstatus.d.ts +18 -0
  157. package/models/components/webhookstatus.d.ts.map +1 -0
  158. package/models/components/webhookstatus.js +52 -0
  159. package/models/components/webhookstatus.js.map +1 -0
  160. package/models/errors/createinvoicepaymenterror.d.ts +30 -0
  161. package/models/errors/createinvoicepaymenterror.d.ts.map +1 -0
  162. package/models/errors/createinvoicepaymenterror.js +83 -0
  163. package/models/errors/createinvoicepaymenterror.js.map +1 -0
  164. package/models/errors/createwebhookvalidationerror.d.ts +57 -0
  165. package/models/errors/createwebhookvalidationerror.d.ts.map +1 -0
  166. package/models/errors/createwebhookvalidationerror.js +87 -0
  167. package/models/errors/createwebhookvalidationerror.js.map +1 -0
  168. package/models/errors/index.d.ts +3 -0
  169. package/models/errors/index.d.ts.map +1 -1
  170. package/models/errors/index.js +3 -0
  171. package/models/errors/index.js.map +1 -1
  172. package/models/errors/updatewebhookvalidationerror.d.ts +57 -0
  173. package/models/errors/updatewebhookvalidationerror.d.ts.map +1 -0
  174. package/models/errors/updatewebhookvalidationerror.js +87 -0
  175. package/models/errors/updatewebhookvalidationerror.js.map +1 -0
  176. package/models/operations/createinvoicepayment.d.ts +68 -0
  177. package/models/operations/createinvoicepayment.d.ts.map +1 -0
  178. package/models/operations/createinvoicepayment.js +124 -0
  179. package/models/operations/createinvoicepayment.js.map +1 -0
  180. package/models/operations/createwebhook.d.ts +51 -0
  181. package/models/operations/createwebhook.d.ts.map +1 -0
  182. package/models/operations/createwebhook.js +96 -0
  183. package/models/operations/createwebhook.js.map +1 -0
  184. package/models/operations/disablewebhook.d.ts +61 -0
  185. package/models/operations/disablewebhook.d.ts.map +1 -0
  186. package/models/operations/disablewebhook.js +107 -0
  187. package/models/operations/disablewebhook.js.map +1 -0
  188. package/models/operations/getwebhook.d.ts +64 -0
  189. package/models/operations/getwebhook.d.ts.map +1 -0
  190. package/models/operations/getwebhook.js +112 -0
  191. package/models/operations/getwebhook.js.map +1 -0
  192. package/models/operations/getwebhooksecret.d.ts +64 -0
  193. package/models/operations/getwebhooksecret.d.ts.map +1 -0
  194. package/models/operations/getwebhooksecret.js +112 -0
  195. package/models/operations/getwebhooksecret.js.map +1 -0
  196. package/models/operations/index.d.ts +10 -0
  197. package/models/operations/index.d.ts.map +1 -1
  198. package/models/operations/index.js +10 -0
  199. package/models/operations/index.js.map +1 -1
  200. package/models/operations/listeventtypes.d.ts +60 -0
  201. package/models/operations/listeventtypes.d.ts.map +1 -0
  202. package/models/operations/listeventtypes.js +108 -0
  203. package/models/operations/listeventtypes.js.map +1 -0
  204. package/models/operations/listinvoicepayments.d.ts +66 -0
  205. package/models/operations/listinvoicepayments.d.ts.map +1 -0
  206. package/models/operations/listinvoicepayments.js +114 -0
  207. package/models/operations/listinvoicepayments.js.map +1 -0
  208. package/models/operations/listwebhooks.d.ts +60 -0
  209. package/models/operations/listwebhooks.d.ts.map +1 -0
  210. package/models/operations/listwebhooks.js +108 -0
  211. package/models/operations/listwebhooks.js.map +1 -0
  212. package/models/operations/pingwebhook.d.ts +64 -0
  213. package/models/operations/pingwebhook.d.ts.map +1 -0
  214. package/models/operations/pingwebhook.js +112 -0
  215. package/models/operations/pingwebhook.js.map +1 -0
  216. package/models/operations/updatewebhook.d.ts +66 -0
  217. package/models/operations/updatewebhook.d.ts.map +1 -0
  218. package/models/operations/updatewebhook.js +122 -0
  219. package/models/operations/updatewebhook.js.map +1 -0
  220. package/package.json +1 -1
  221. package/sdk/invoices.d.ts +15 -0
  222. package/sdk/invoices.d.ts.map +1 -1
  223. package/sdk/invoices.js +21 -0
  224. package/sdk/invoices.js.map +1 -1
  225. package/sdk/sdk.d.ts +3 -0
  226. package/sdk/sdk.d.ts.map +1 -1
  227. package/sdk/sdk.js +4 -0
  228. package/sdk/sdk.js.map +1 -1
  229. package/sdk/webhooks.d.ts +38 -0
  230. package/sdk/webhooks.d.ts.map +1 -0
  231. package/sdk/webhooks.js +68 -0
  232. package/sdk/webhooks.js.map +1 -0
  233. package/src/funcs/invoicesCreateInvoicePayment.ts +213 -0
  234. package/src/funcs/invoicesListInvoicePayments.ts +186 -0
  235. package/src/funcs/webhooksCreate.ts +194 -0
  236. package/src/funcs/webhooksDisable.ts +191 -0
  237. package/src/funcs/webhooksGet.ts +176 -0
  238. package/src/funcs/webhooksGetSecret.ts +176 -0
  239. package/src/funcs/webhooksList.ts +156 -0
  240. package/src/funcs/webhooksListEventTypes.ts +156 -0
  241. package/src/funcs/webhooksPing.ts +176 -0
  242. package/src/funcs/webhooksUpdate.ts +200 -0
  243. package/src/lib/config.ts +3 -3
  244. package/src/mcp-server/mcp-server.ts +1 -1
  245. package/src/mcp-server/server.ts +21 -1
  246. package/src/mcp-server/tools/invoicesCreateInvoicePayment.ts +40 -0
  247. package/src/mcp-server/tools/invoicesListInvoicePayments.ts +38 -0
  248. package/src/mcp-server/tools/webhooksCreate.ts +35 -0
  249. package/src/mcp-server/tools/webhooksDisable.ts +34 -0
  250. package/src/mcp-server/tools/webhooksGet.ts +35 -0
  251. package/src/mcp-server/tools/webhooksGetSecret.ts +35 -0
  252. package/src/mcp-server/tools/webhooksList.ts +35 -0
  253. package/src/mcp-server/tools/webhooksListEventTypes.ts +35 -0
  254. package/src/mcp-server/tools/webhooksPing.ts +36 -0
  255. package/src/mcp-server/tools/webhooksUpdate.ts +35 -0
  256. package/src/models/components/achtransactiondetails.ts +10 -0
  257. package/src/models/components/createinvoicepayment.ts +60 -0
  258. package/src/models/components/createtransferachaddendarecord.ts +59 -0
  259. package/src/models/components/createtransferdestinationach.ts +10 -0
  260. package/src/models/components/createtransfersourceach.ts +10 -0
  261. package/src/models/components/createwebhook.ts +84 -0
  262. package/src/models/components/eventtype.ts +67 -0
  263. package/src/models/components/index.ts +10 -0
  264. package/src/models/components/invoiceexternalpayment.ts +0 -21
  265. package/src/models/components/invoicepayment.ts +8 -4
  266. package/src/models/components/invoicetransferpayment.ts +0 -17
  267. package/src/models/components/pingresponse.ts +73 -0
  268. package/src/models/components/transferachaddendarecord.ts +64 -0
  269. package/src/models/components/updatewebhook.ts +84 -0
  270. package/src/models/components/webhook.ts +115 -0
  271. package/src/models/components/webhooksecret.ts +53 -0
  272. package/src/models/components/webhookstatus.ts +27 -0
  273. package/src/models/errors/createinvoicepaymenterror.ts +78 -0
  274. package/src/models/errors/createwebhookvalidationerror.ts +108 -0
  275. package/src/models/errors/index.ts +3 -0
  276. package/src/models/errors/updatewebhookvalidationerror.ts +108 -0
  277. package/src/models/operations/createinvoicepayment.ts +197 -0
  278. package/src/models/operations/createwebhook.ts +132 -0
  279. package/src/models/operations/disablewebhook.ts +168 -0
  280. package/src/models/operations/getwebhook.ts +175 -0
  281. package/src/models/operations/getwebhooksecret.ts +175 -0
  282. package/src/models/operations/index.ts +10 -0
  283. package/src/models/operations/listeventtypes.ts +167 -0
  284. package/src/models/operations/listinvoicepayments.ts +181 -0
  285. package/src/models/operations/listwebhooks.ts +167 -0
  286. package/src/models/operations/pingwebhook.ts +175 -0
  287. package/src/models/operations/updatewebhook.ts +187 -0
  288. package/src/sdk/invoices.ts +37 -0
  289. package/src/sdk/sdk.ts +6 -0
  290. package/src/sdk/webhooks.ts +130 -0
@@ -13,10 +13,12 @@ export * from "./cardacquiringrefund.js";
13
13
  export * from "./connectaccountrequestvalidationerror.js";
14
14
  export * from "./createaccounterror.js";
15
15
  export * from "./createinvoiceerror.js";
16
+ export * from "./createinvoicepaymenterror.js";
16
17
  export * from "./createpaymentlinkerror.js";
17
18
  export * from "./createsweepconfigerror.js";
18
19
  export * from "./createticketerror.js";
19
20
  export * from "./createwalletvalidationerror.js";
21
+ export * from "./createwebhookvalidationerror.js";
20
22
  export * from "./feeplanagreementerror.js";
21
23
  export * from "./fileuploadvalidationerror.js";
22
24
  export * from "./filevalidationerror.js";
@@ -56,4 +58,5 @@ export * from "./updateissuedcarderror.js";
56
58
  export * from "./updatepaymentlinkerror.js";
57
59
  export * from "./updateticketerror.js";
58
60
  export * from "./updateunderwritingerror.js";
61
+ export * from "./updatewebhookvalidationerror.js";
59
62
  export * from "./upsertunderwritingerror.js";
@@ -0,0 +1,108 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { MoovError } from "./mooverror.js";
7
+
8
+ export type UpdateWebhookValidationErrorData = {
9
+ /**
10
+ * Details about the URL validation error.
11
+ */
12
+ url?: string | undefined;
13
+ /**
14
+ * Details about the status validation error.
15
+ */
16
+ status?: string | undefined;
17
+ /**
18
+ * Details about the event types validation error.
19
+ */
20
+ eventTypes?: string | undefined;
21
+ /**
22
+ * Details about the description validation error.
23
+ */
24
+ description?: string | undefined;
25
+ };
26
+
27
+ export class UpdateWebhookValidationError extends MoovError {
28
+ /**
29
+ * Details about the URL validation error.
30
+ */
31
+ url?: string | undefined;
32
+ /**
33
+ * Details about the status validation error.
34
+ */
35
+ status?: string | undefined;
36
+ /**
37
+ * Details about the event types validation error.
38
+ */
39
+ eventTypes?: string | undefined;
40
+ /**
41
+ * Details about the description validation error.
42
+ */
43
+ description?: string | undefined;
44
+
45
+ /** The original data that was passed to this error instance. */
46
+ data$: UpdateWebhookValidationErrorData;
47
+
48
+ constructor(
49
+ err: UpdateWebhookValidationErrorData,
50
+ httpMeta: { response: Response; request: Request; body: string },
51
+ ) {
52
+ const message = "message" in err && typeof err.message === "string"
53
+ ? err.message
54
+ : `API error occurred: ${JSON.stringify(err)}`;
55
+ super(message, httpMeta);
56
+ this.data$ = err;
57
+ if (err.url != null) this.url = err.url;
58
+ if (err.status != null) this.status = err.status;
59
+ if (err.eventTypes != null) this.eventTypes = err.eventTypes;
60
+ if (err.description != null) this.description = err.description;
61
+
62
+ this.name = "UpdateWebhookValidationError";
63
+ }
64
+ }
65
+
66
+ /** @internal */
67
+ export const UpdateWebhookValidationError$inboundSchema: z.ZodType<
68
+ UpdateWebhookValidationError,
69
+ z.ZodTypeDef,
70
+ unknown
71
+ > = z.object({
72
+ url: z.string().optional(),
73
+ status: z.string().optional(),
74
+ eventTypes: z.string().optional(),
75
+ description: z.string().optional(),
76
+ request$: z.instanceof(Request),
77
+ response$: z.instanceof(Response),
78
+ body$: z.string(),
79
+ })
80
+ .transform((v) => {
81
+ return new UpdateWebhookValidationError(v, {
82
+ request: v.request$,
83
+ response: v.response$,
84
+ body: v.body$,
85
+ });
86
+ });
87
+
88
+ /** @internal */
89
+ export type UpdateWebhookValidationError$Outbound = {
90
+ url?: string | undefined;
91
+ status?: string | undefined;
92
+ eventTypes?: string | undefined;
93
+ description?: string | undefined;
94
+ };
95
+
96
+ /** @internal */
97
+ export const UpdateWebhookValidationError$outboundSchema: z.ZodType<
98
+ UpdateWebhookValidationError$Outbound,
99
+ z.ZodTypeDef,
100
+ UpdateWebhookValidationError
101
+ > = z.instanceof(UpdateWebhookValidationError)
102
+ .transform(v => v.data$)
103
+ .pipe(z.object({
104
+ url: z.string().optional(),
105
+ status: z.string().optional(),
106
+ eventTypes: z.string().optional(),
107
+ description: z.string().optional(),
108
+ }));
@@ -0,0 +1,197 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type CreateInvoicePaymentGlobals = {
13
+ /**
14
+ * Specify an API version.
15
+ *
16
+ * @remarks
17
+ *
18
+ * API versioning follows the format `vYYYY.QQ.BB`, where
19
+ * - `YYYY` is the year
20
+ * - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
21
+ * - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
22
+ * - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
23
+ *
24
+ * The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
25
+ * When no version is specified, the API defaults to `v2024.01.00`.
26
+ */
27
+ xMoovVersion?: string | undefined;
28
+ };
29
+
30
+ export type CreateInvoicePaymentRequest = {
31
+ accountID: string;
32
+ invoiceID: string;
33
+ createInvoicePayment: components.CreateInvoicePayment;
34
+ };
35
+
36
+ export type CreateInvoicePaymentResponse = {
37
+ headers: { [k: string]: Array<string> };
38
+ result: components.InvoicePayment;
39
+ };
40
+
41
+ /** @internal */
42
+ export const CreateInvoicePaymentGlobals$inboundSchema: z.ZodType<
43
+ CreateInvoicePaymentGlobals,
44
+ z.ZodTypeDef,
45
+ unknown
46
+ > = z.object({
47
+ "X-Moov-Version": z.string().optional(),
48
+ }).transform((v) => {
49
+ return remap$(v, {
50
+ "X-Moov-Version": "xMoovVersion",
51
+ });
52
+ });
53
+ /** @internal */
54
+ export type CreateInvoicePaymentGlobals$Outbound = {
55
+ "X-Moov-Version"?: string | undefined;
56
+ };
57
+
58
+ /** @internal */
59
+ export const CreateInvoicePaymentGlobals$outboundSchema: z.ZodType<
60
+ CreateInvoicePaymentGlobals$Outbound,
61
+ z.ZodTypeDef,
62
+ CreateInvoicePaymentGlobals
63
+ > = z.object({
64
+ xMoovVersion: z.string().optional(),
65
+ }).transform((v) => {
66
+ return remap$(v, {
67
+ xMoovVersion: "X-Moov-Version",
68
+ });
69
+ });
70
+
71
+ export function createInvoicePaymentGlobalsToJSON(
72
+ createInvoicePaymentGlobals: CreateInvoicePaymentGlobals,
73
+ ): string {
74
+ return JSON.stringify(
75
+ CreateInvoicePaymentGlobals$outboundSchema.parse(
76
+ createInvoicePaymentGlobals,
77
+ ),
78
+ );
79
+ }
80
+ export function createInvoicePaymentGlobalsFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<CreateInvoicePaymentGlobals, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => CreateInvoicePaymentGlobals$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'CreateInvoicePaymentGlobals' from JSON`,
87
+ );
88
+ }
89
+
90
+ /** @internal */
91
+ export const CreateInvoicePaymentRequest$inboundSchema: z.ZodType<
92
+ CreateInvoicePaymentRequest,
93
+ z.ZodTypeDef,
94
+ unknown
95
+ > = z.object({
96
+ accountID: z.string(),
97
+ invoiceID: z.string(),
98
+ CreateInvoicePayment: components.CreateInvoicePayment$inboundSchema,
99
+ }).transform((v) => {
100
+ return remap$(v, {
101
+ "CreateInvoicePayment": "createInvoicePayment",
102
+ });
103
+ });
104
+ /** @internal */
105
+ export type CreateInvoicePaymentRequest$Outbound = {
106
+ accountID: string;
107
+ invoiceID: string;
108
+ CreateInvoicePayment: components.CreateInvoicePayment$Outbound;
109
+ };
110
+
111
+ /** @internal */
112
+ export const CreateInvoicePaymentRequest$outboundSchema: z.ZodType<
113
+ CreateInvoicePaymentRequest$Outbound,
114
+ z.ZodTypeDef,
115
+ CreateInvoicePaymentRequest
116
+ > = z.object({
117
+ accountID: z.string(),
118
+ invoiceID: z.string(),
119
+ createInvoicePayment: components.CreateInvoicePayment$outboundSchema,
120
+ }).transform((v) => {
121
+ return remap$(v, {
122
+ createInvoicePayment: "CreateInvoicePayment",
123
+ });
124
+ });
125
+
126
+ export function createInvoicePaymentRequestToJSON(
127
+ createInvoicePaymentRequest: CreateInvoicePaymentRequest,
128
+ ): string {
129
+ return JSON.stringify(
130
+ CreateInvoicePaymentRequest$outboundSchema.parse(
131
+ createInvoicePaymentRequest,
132
+ ),
133
+ );
134
+ }
135
+ export function createInvoicePaymentRequestFromJSON(
136
+ jsonString: string,
137
+ ): SafeParseResult<CreateInvoicePaymentRequest, SDKValidationError> {
138
+ return safeParse(
139
+ jsonString,
140
+ (x) => CreateInvoicePaymentRequest$inboundSchema.parse(JSON.parse(x)),
141
+ `Failed to parse 'CreateInvoicePaymentRequest' from JSON`,
142
+ );
143
+ }
144
+
145
+ /** @internal */
146
+ export const CreateInvoicePaymentResponse$inboundSchema: z.ZodType<
147
+ CreateInvoicePaymentResponse,
148
+ z.ZodTypeDef,
149
+ unknown
150
+ > = z.object({
151
+ Headers: z.record(z.array(z.string())).default({}),
152
+ Result: components.InvoicePayment$inboundSchema,
153
+ }).transform((v) => {
154
+ return remap$(v, {
155
+ "Headers": "headers",
156
+ "Result": "result",
157
+ });
158
+ });
159
+ /** @internal */
160
+ export type CreateInvoicePaymentResponse$Outbound = {
161
+ Headers: { [k: string]: Array<string> };
162
+ Result: components.InvoicePayment$Outbound;
163
+ };
164
+
165
+ /** @internal */
166
+ export const CreateInvoicePaymentResponse$outboundSchema: z.ZodType<
167
+ CreateInvoicePaymentResponse$Outbound,
168
+ z.ZodTypeDef,
169
+ CreateInvoicePaymentResponse
170
+ > = z.object({
171
+ headers: z.record(z.array(z.string())),
172
+ result: components.InvoicePayment$outboundSchema,
173
+ }).transform((v) => {
174
+ return remap$(v, {
175
+ headers: "Headers",
176
+ result: "Result",
177
+ });
178
+ });
179
+
180
+ export function createInvoicePaymentResponseToJSON(
181
+ createInvoicePaymentResponse: CreateInvoicePaymentResponse,
182
+ ): string {
183
+ return JSON.stringify(
184
+ CreateInvoicePaymentResponse$outboundSchema.parse(
185
+ createInvoicePaymentResponse,
186
+ ),
187
+ );
188
+ }
189
+ export function createInvoicePaymentResponseFromJSON(
190
+ jsonString: string,
191
+ ): SafeParseResult<CreateInvoicePaymentResponse, SDKValidationError> {
192
+ return safeParse(
193
+ jsonString,
194
+ (x) => CreateInvoicePaymentResponse$inboundSchema.parse(JSON.parse(x)),
195
+ `Failed to parse 'CreateInvoicePaymentResponse' from JSON`,
196
+ );
197
+ }
@@ -0,0 +1,132 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type CreateWebhookGlobals = {
13
+ /**
14
+ * Specify an API version.
15
+ *
16
+ * @remarks
17
+ *
18
+ * API versioning follows the format `vYYYY.QQ.BB`, where
19
+ * - `YYYY` is the year
20
+ * - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
21
+ * - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
22
+ * - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
23
+ *
24
+ * The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
25
+ * When no version is specified, the API defaults to `v2024.01.00`.
26
+ */
27
+ xMoovVersion?: string | undefined;
28
+ };
29
+
30
+ export type CreateWebhookResponse = {
31
+ headers: { [k: string]: Array<string> };
32
+ result: components.Webhook;
33
+ };
34
+
35
+ /** @internal */
36
+ export const CreateWebhookGlobals$inboundSchema: z.ZodType<
37
+ CreateWebhookGlobals,
38
+ z.ZodTypeDef,
39
+ unknown
40
+ > = z.object({
41
+ "X-Moov-Version": z.string().optional(),
42
+ }).transform((v) => {
43
+ return remap$(v, {
44
+ "X-Moov-Version": "xMoovVersion",
45
+ });
46
+ });
47
+ /** @internal */
48
+ export type CreateWebhookGlobals$Outbound = {
49
+ "X-Moov-Version"?: string | undefined;
50
+ };
51
+
52
+ /** @internal */
53
+ export const CreateWebhookGlobals$outboundSchema: z.ZodType<
54
+ CreateWebhookGlobals$Outbound,
55
+ z.ZodTypeDef,
56
+ CreateWebhookGlobals
57
+ > = z.object({
58
+ xMoovVersion: z.string().optional(),
59
+ }).transform((v) => {
60
+ return remap$(v, {
61
+ xMoovVersion: "X-Moov-Version",
62
+ });
63
+ });
64
+
65
+ export function createWebhookGlobalsToJSON(
66
+ createWebhookGlobals: CreateWebhookGlobals,
67
+ ): string {
68
+ return JSON.stringify(
69
+ CreateWebhookGlobals$outboundSchema.parse(createWebhookGlobals),
70
+ );
71
+ }
72
+ export function createWebhookGlobalsFromJSON(
73
+ jsonString: string,
74
+ ): SafeParseResult<CreateWebhookGlobals, SDKValidationError> {
75
+ return safeParse(
76
+ jsonString,
77
+ (x) => CreateWebhookGlobals$inboundSchema.parse(JSON.parse(x)),
78
+ `Failed to parse 'CreateWebhookGlobals' from JSON`,
79
+ );
80
+ }
81
+
82
+ /** @internal */
83
+ export const CreateWebhookResponse$inboundSchema: z.ZodType<
84
+ CreateWebhookResponse,
85
+ z.ZodTypeDef,
86
+ unknown
87
+ > = z.object({
88
+ Headers: z.record(z.array(z.string())).default({}),
89
+ Result: components.Webhook$inboundSchema,
90
+ }).transform((v) => {
91
+ return remap$(v, {
92
+ "Headers": "headers",
93
+ "Result": "result",
94
+ });
95
+ });
96
+ /** @internal */
97
+ export type CreateWebhookResponse$Outbound = {
98
+ Headers: { [k: string]: Array<string> };
99
+ Result: components.Webhook$Outbound;
100
+ };
101
+
102
+ /** @internal */
103
+ export const CreateWebhookResponse$outboundSchema: z.ZodType<
104
+ CreateWebhookResponse$Outbound,
105
+ z.ZodTypeDef,
106
+ CreateWebhookResponse
107
+ > = z.object({
108
+ headers: z.record(z.array(z.string())),
109
+ result: components.Webhook$outboundSchema,
110
+ }).transform((v) => {
111
+ return remap$(v, {
112
+ headers: "Headers",
113
+ result: "Result",
114
+ });
115
+ });
116
+
117
+ export function createWebhookResponseToJSON(
118
+ createWebhookResponse: CreateWebhookResponse,
119
+ ): string {
120
+ return JSON.stringify(
121
+ CreateWebhookResponse$outboundSchema.parse(createWebhookResponse),
122
+ );
123
+ }
124
+ export function createWebhookResponseFromJSON(
125
+ jsonString: string,
126
+ ): SafeParseResult<CreateWebhookResponse, SDKValidationError> {
127
+ return safeParse(
128
+ jsonString,
129
+ (x) => CreateWebhookResponse$inboundSchema.parse(JSON.parse(x)),
130
+ `Failed to parse 'CreateWebhookResponse' from JSON`,
131
+ );
132
+ }
@@ -0,0 +1,168 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type DisableWebhookGlobals = {
12
+ /**
13
+ * Specify an API version.
14
+ *
15
+ * @remarks
16
+ *
17
+ * API versioning follows the format `vYYYY.QQ.BB`, where
18
+ * - `YYYY` is the year
19
+ * - `QQ` is the two-digit month for the first month of the quarter (e.g., 01, 04, 07, 10)
20
+ * - `BB` is the build number, starting at `.01`, for subsequent builds in the same quarter.
21
+ * - For example, `v2024.01.00` is the initial release of the first quarter of 2024.
22
+ *
23
+ * The `latest` version represents the most recent development state. It may include breaking changes and should be treated as a beta release.
24
+ * When no version is specified, the API defaults to `v2024.01.00`.
25
+ */
26
+ xMoovVersion?: string | undefined;
27
+ };
28
+
29
+ export type DisableWebhookRequest = {
30
+ webhookID: string;
31
+ };
32
+
33
+ export type DisableWebhookResponse = {
34
+ headers: { [k: string]: Array<string> };
35
+ };
36
+
37
+ /** @internal */
38
+ export const DisableWebhookGlobals$inboundSchema: z.ZodType<
39
+ DisableWebhookGlobals,
40
+ z.ZodTypeDef,
41
+ unknown
42
+ > = z.object({
43
+ "X-Moov-Version": z.string().optional(),
44
+ }).transform((v) => {
45
+ return remap$(v, {
46
+ "X-Moov-Version": "xMoovVersion",
47
+ });
48
+ });
49
+ /** @internal */
50
+ export type DisableWebhookGlobals$Outbound = {
51
+ "X-Moov-Version"?: string | undefined;
52
+ };
53
+
54
+ /** @internal */
55
+ export const DisableWebhookGlobals$outboundSchema: z.ZodType<
56
+ DisableWebhookGlobals$Outbound,
57
+ z.ZodTypeDef,
58
+ DisableWebhookGlobals
59
+ > = z.object({
60
+ xMoovVersion: z.string().optional(),
61
+ }).transform((v) => {
62
+ return remap$(v, {
63
+ xMoovVersion: "X-Moov-Version",
64
+ });
65
+ });
66
+
67
+ export function disableWebhookGlobalsToJSON(
68
+ disableWebhookGlobals: DisableWebhookGlobals,
69
+ ): string {
70
+ return JSON.stringify(
71
+ DisableWebhookGlobals$outboundSchema.parse(disableWebhookGlobals),
72
+ );
73
+ }
74
+ export function disableWebhookGlobalsFromJSON(
75
+ jsonString: string,
76
+ ): SafeParseResult<DisableWebhookGlobals, SDKValidationError> {
77
+ return safeParse(
78
+ jsonString,
79
+ (x) => DisableWebhookGlobals$inboundSchema.parse(JSON.parse(x)),
80
+ `Failed to parse 'DisableWebhookGlobals' from JSON`,
81
+ );
82
+ }
83
+
84
+ /** @internal */
85
+ export const DisableWebhookRequest$inboundSchema: z.ZodType<
86
+ DisableWebhookRequest,
87
+ z.ZodTypeDef,
88
+ unknown
89
+ > = z.object({
90
+ webhookID: z.string(),
91
+ });
92
+ /** @internal */
93
+ export type DisableWebhookRequest$Outbound = {
94
+ webhookID: string;
95
+ };
96
+
97
+ /** @internal */
98
+ export const DisableWebhookRequest$outboundSchema: z.ZodType<
99
+ DisableWebhookRequest$Outbound,
100
+ z.ZodTypeDef,
101
+ DisableWebhookRequest
102
+ > = z.object({
103
+ webhookID: z.string(),
104
+ });
105
+
106
+ export function disableWebhookRequestToJSON(
107
+ disableWebhookRequest: DisableWebhookRequest,
108
+ ): string {
109
+ return JSON.stringify(
110
+ DisableWebhookRequest$outboundSchema.parse(disableWebhookRequest),
111
+ );
112
+ }
113
+ export function disableWebhookRequestFromJSON(
114
+ jsonString: string,
115
+ ): SafeParseResult<DisableWebhookRequest, SDKValidationError> {
116
+ return safeParse(
117
+ jsonString,
118
+ (x) => DisableWebhookRequest$inboundSchema.parse(JSON.parse(x)),
119
+ `Failed to parse 'DisableWebhookRequest' from JSON`,
120
+ );
121
+ }
122
+
123
+ /** @internal */
124
+ export const DisableWebhookResponse$inboundSchema: z.ZodType<
125
+ DisableWebhookResponse,
126
+ z.ZodTypeDef,
127
+ unknown
128
+ > = z.object({
129
+ Headers: z.record(z.array(z.string())).default({}),
130
+ }).transform((v) => {
131
+ return remap$(v, {
132
+ "Headers": "headers",
133
+ });
134
+ });
135
+ /** @internal */
136
+ export type DisableWebhookResponse$Outbound = {
137
+ Headers: { [k: string]: Array<string> };
138
+ };
139
+
140
+ /** @internal */
141
+ export const DisableWebhookResponse$outboundSchema: z.ZodType<
142
+ DisableWebhookResponse$Outbound,
143
+ z.ZodTypeDef,
144
+ DisableWebhookResponse
145
+ > = z.object({
146
+ headers: z.record(z.array(z.string())),
147
+ }).transform((v) => {
148
+ return remap$(v, {
149
+ headers: "Headers",
150
+ });
151
+ });
152
+
153
+ export function disableWebhookResponseToJSON(
154
+ disableWebhookResponse: DisableWebhookResponse,
155
+ ): string {
156
+ return JSON.stringify(
157
+ DisableWebhookResponse$outboundSchema.parse(disableWebhookResponse),
158
+ );
159
+ }
160
+ export function disableWebhookResponseFromJSON(
161
+ jsonString: string,
162
+ ): SafeParseResult<DisableWebhookResponse, SDKValidationError> {
163
+ return safeParse(
164
+ jsonString,
165
+ (x) => DisableWebhookResponse$inboundSchema.parse(JSON.parse(x)),
166
+ `Failed to parse 'DisableWebhookResponse' from JSON`,
167
+ );
168
+ }