@moovio/sdk 0.21.13 → 0.21.15

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 (275) hide show
  1. package/README.md +106 -49
  2. package/bin/mcp-server.js +2707 -977
  3. package/bin/mcp-server.js.map +56 -15
  4. package/examples/package-lock.json +1 -1
  5. package/funcs/feePlansListFeeRevenue.d.ts +17 -0
  6. package/funcs/feePlansListFeeRevenue.d.ts.map +1 -0
  7. package/funcs/feePlansListFeeRevenue.js +132 -0
  8. package/funcs/feePlansListFeeRevenue.js.map +1 -0
  9. package/funcs/feePlansRetrieveFees.d.ts +1 -1
  10. package/funcs/feePlansRetrieveFees.js +1 -1
  11. package/funcs/invoicesCreateInvoice.d.ts +18 -0
  12. package/funcs/invoicesCreateInvoice.d.ts.map +1 -0
  13. package/funcs/invoicesCreateInvoice.js +139 -0
  14. package/funcs/invoicesCreateInvoice.js.map +1 -0
  15. package/funcs/invoicesGetInvoice.d.ts +17 -0
  16. package/funcs/invoicesGetInvoice.d.ts.map +1 -0
  17. package/funcs/invoicesGetInvoice.js +129 -0
  18. package/funcs/invoicesGetInvoice.js.map +1 -0
  19. package/funcs/invoicesListInvoices.d.ts +18 -0
  20. package/funcs/invoicesListInvoices.d.ts.map +1 -0
  21. package/funcs/invoicesListInvoices.js +135 -0
  22. package/funcs/invoicesListInvoices.js.map +1 -0
  23. package/funcs/invoicesMarkPaidInvoice.d.ts +19 -0
  24. package/funcs/invoicesMarkPaidInvoice.d.ts.map +1 -0
  25. package/funcs/invoicesMarkPaidInvoice.js +144 -0
  26. package/funcs/invoicesMarkPaidInvoice.js.map +1 -0
  27. package/funcs/invoicesUpdateInvoice.d.ts +18 -0
  28. package/funcs/invoicesUpdateInvoice.d.ts.map +1 -0
  29. package/funcs/invoicesUpdateInvoice.js +143 -0
  30. package/funcs/invoicesUpdateInvoice.js.map +1 -0
  31. package/jsr.json +1 -1
  32. package/lib/config.d.ts +2 -2
  33. package/lib/config.js +2 -2
  34. package/mcp-server/mcp-server.js +1 -1
  35. package/mcp-server/server.d.ts.map +1 -1
  36. package/mcp-server/server.js +13 -1
  37. package/mcp-server/server.js.map +1 -1
  38. package/mcp-server/tools/feePlansListFeeRevenue.d.ts +8 -0
  39. package/mcp-server/tools/feePlansListFeeRevenue.d.ts.map +1 -0
  40. package/mcp-server/tools/feePlansListFeeRevenue.js +65 -0
  41. package/mcp-server/tools/feePlansListFeeRevenue.js.map +1 -0
  42. package/mcp-server/tools/feePlansRetrieveFees.js +1 -1
  43. package/mcp-server/tools/invoicesCreateInvoice.d.ts +8 -0
  44. package/mcp-server/tools/invoicesCreateInvoice.d.ts.map +1 -0
  45. package/mcp-server/tools/invoicesCreateInvoice.js +65 -0
  46. package/mcp-server/tools/invoicesCreateInvoice.js.map +1 -0
  47. package/mcp-server/tools/invoicesGetInvoice.d.ts +8 -0
  48. package/mcp-server/tools/invoicesGetInvoice.d.ts.map +1 -0
  49. package/mcp-server/tools/invoicesGetInvoice.js +65 -0
  50. package/mcp-server/tools/invoicesGetInvoice.js.map +1 -0
  51. package/mcp-server/tools/invoicesListInvoices.d.ts +8 -0
  52. package/mcp-server/tools/invoicesListInvoices.d.ts.map +1 -0
  53. package/mcp-server/tools/invoicesListInvoices.js +65 -0
  54. package/mcp-server/tools/invoicesListInvoices.js.map +1 -0
  55. package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts +8 -0
  56. package/mcp-server/tools/invoicesMarkPaidInvoice.d.ts.map +1 -0
  57. package/mcp-server/tools/invoicesMarkPaidInvoice.js +66 -0
  58. package/mcp-server/tools/invoicesMarkPaidInvoice.js.map +1 -0
  59. package/mcp-server/tools/invoicesUpdateInvoice.d.ts +8 -0
  60. package/mcp-server/tools/invoicesUpdateInvoice.d.ts.map +1 -0
  61. package/mcp-server/tools/invoicesUpdateInvoice.js +65 -0
  62. package/mcp-server/tools/invoicesUpdateInvoice.js.map +1 -0
  63. package/models/components/amountdecimalupdate.d.ts +29 -0
  64. package/models/components/amountdecimalupdate.d.ts.map +1 -0
  65. package/models/components/amountdecimalupdate.js +60 -0
  66. package/models/components/amountdecimalupdate.js.map +1 -0
  67. package/models/components/createinvoice.d.ts +32 -0
  68. package/models/components/createinvoice.d.ts.map +1 -0
  69. package/models/components/createinvoice.js +72 -0
  70. package/models/components/createinvoice.js.map +1 -0
  71. package/models/components/index.d.ts +19 -0
  72. package/models/components/index.d.ts.map +1 -1
  73. package/models/components/index.js +19 -0
  74. package/models/components/index.js.map +1 -1
  75. package/models/components/instantbankcreditpaymentmethod.d.ts +40 -0
  76. package/models/components/instantbankcreditpaymentmethod.d.ts.map +1 -0
  77. package/models/components/instantbankcreditpaymentmethod.js +71 -0
  78. package/models/components/instantbankcreditpaymentmethod.js.map +1 -0
  79. package/models/components/invoice.d.ts +81 -0
  80. package/models/components/invoice.d.ts.map +1 -0
  81. package/models/components/invoice.js +107 -0
  82. package/models/components/invoice.js.map +1 -0
  83. package/models/components/invoiceexternalpayment.d.ts +35 -0
  84. package/models/components/invoiceexternalpayment.d.ts.map +1 -0
  85. package/models/components/invoiceexternalpayment.js +75 -0
  86. package/models/components/invoiceexternalpayment.js.map +1 -0
  87. package/models/components/invoicelineitem.d.ts +45 -0
  88. package/models/components/invoicelineitem.d.ts.map +1 -0
  89. package/models/components/invoicelineitem.js +68 -0
  90. package/models/components/invoicelineitem.js.map +1 -0
  91. package/models/components/invoicelineitemoption.d.ts +39 -0
  92. package/models/components/invoicelineitemoption.d.ts.map +1 -0
  93. package/models/components/invoicelineitemoption.js +65 -0
  94. package/models/components/invoicelineitemoption.js.map +1 -0
  95. package/models/components/invoicelineitemoptionvalidationerror.d.ts +24 -0
  96. package/models/components/invoicelineitemoptionvalidationerror.d.ts.map +1 -0
  97. package/models/components/invoicelineitemoptionvalidationerror.js +65 -0
  98. package/models/components/invoicelineitemoptionvalidationerror.js.map +1 -0
  99. package/models/components/invoicelineitems.d.ts +24 -0
  100. package/models/components/invoicelineitems.d.ts.map +1 -0
  101. package/models/components/invoicelineitems.js +59 -0
  102. package/models/components/invoicelineitems.js.map +1 -0
  103. package/models/components/invoicelineitemsupdate.d.ts +24 -0
  104. package/models/components/invoicelineitemsupdate.d.ts.map +1 -0
  105. package/models/components/invoicelineitemsupdate.js +59 -0
  106. package/models/components/invoicelineitemsupdate.js.map +1 -0
  107. package/models/components/invoicelineitemsvalidationerror.d.ts +22 -0
  108. package/models/components/invoicelineitemsvalidationerror.d.ts.map +1 -0
  109. package/models/components/invoicelineitemsvalidationerror.js +59 -0
  110. package/models/components/invoicelineitemsvalidationerror.js.map +1 -0
  111. package/models/components/invoicelineitemvalidationerror.d.ts +31 -0
  112. package/models/components/invoicelineitemvalidationerror.d.ts.map +1 -0
  113. package/models/components/invoicelineitemvalidationerror.js +70 -0
  114. package/models/components/invoicelineitemvalidationerror.js.map +1 -0
  115. package/models/components/invoicepayment.d.ts +23 -0
  116. package/models/components/invoicepayment.d.ts.map +1 -0
  117. package/models/components/invoicepayment.js +70 -0
  118. package/models/components/invoicepayment.js.map +1 -0
  119. package/models/components/invoicestatus.d.ts +16 -0
  120. package/models/components/invoicestatus.d.ts.map +1 -0
  121. package/models/components/invoicestatus.js +53 -0
  122. package/models/components/invoicestatus.js.map +1 -0
  123. package/models/components/invoicetransferpayment.d.ts +28 -0
  124. package/models/components/invoicetransferpayment.d.ts.map +1 -0
  125. package/models/components/invoicetransferpayment.js +68 -0
  126. package/models/components/invoicetransferpayment.js.map +1 -0
  127. package/models/components/markinvoicepaid.d.ts +21 -0
  128. package/models/components/markinvoicepaid.d.ts.map +1 -0
  129. package/models/components/markinvoicepaid.js +63 -0
  130. package/models/components/markinvoicepaid.js.map +1 -0
  131. package/models/components/paymentmethod.d.ts +5 -0
  132. package/models/components/paymentmethod.d.ts.map +1 -1
  133. package/models/components/paymentmethod.js +3 -0
  134. package/models/components/paymentmethod.js.map +1 -1
  135. package/models/components/paymentmethodtype.d.ts +1 -0
  136. package/models/components/paymentmethodtype.d.ts.map +1 -1
  137. package/models/components/paymentmethodtype.js +1 -0
  138. package/models/components/paymentmethodtype.js.map +1 -1
  139. package/models/components/updateinvoice.d.ts +36 -0
  140. package/models/components/updateinvoice.d.ts.map +1 -0
  141. package/models/components/updateinvoice.js +71 -0
  142. package/models/components/updateinvoice.js.map +1 -0
  143. package/models/components/webhookdata.d.ts +4 -2
  144. package/models/components/webhookdata.d.ts.map +1 -1
  145. package/models/components/webhookdata.js +6 -0
  146. package/models/components/webhookdata.js.map +1 -1
  147. package/models/components/webhookdatainvoicecreated.d.ts +19 -0
  148. package/models/components/webhookdatainvoicecreated.d.ts.map +1 -0
  149. package/models/components/webhookdatainvoicecreated.js +60 -0
  150. package/models/components/webhookdatainvoicecreated.js.map +1 -0
  151. package/models/components/webhookdatainvoiceupdated.d.ts +22 -0
  152. package/models/components/webhookdatainvoiceupdated.d.ts.map +1 -0
  153. package/models/components/webhookdatainvoiceupdated.js +63 -0
  154. package/models/components/webhookdatainvoiceupdated.js.map +1 -0
  155. package/models/components/webhookeventtype.d.ts +2 -0
  156. package/models/components/webhookeventtype.d.ts.map +1 -1
  157. package/models/components/webhookeventtype.js +2 -0
  158. package/models/components/webhookeventtype.js.map +1 -1
  159. package/models/errors/createinvoiceerror.d.ts +40 -0
  160. package/models/errors/createinvoiceerror.d.ts.map +1 -0
  161. package/models/errors/createinvoiceerror.js +100 -0
  162. package/models/errors/createinvoiceerror.js.map +1 -0
  163. package/models/errors/index.d.ts +4 -0
  164. package/models/errors/index.d.ts.map +1 -1
  165. package/models/errors/index.js +4 -0
  166. package/models/errors/index.js.map +1 -1
  167. package/models/errors/listinvoicesvalidationerror.d.ts +33 -0
  168. package/models/errors/listinvoicesvalidationerror.d.ts.map +1 -0
  169. package/models/errors/listinvoicesvalidationerror.js +88 -0
  170. package/models/errors/listinvoicesvalidationerror.js.map +1 -0
  171. package/models/errors/markinvoicepaiderror.d.ts +30 -0
  172. package/models/errors/markinvoicepaiderror.d.ts.map +1 -0
  173. package/models/errors/markinvoicepaiderror.js +83 -0
  174. package/models/errors/markinvoicepaiderror.js.map +1 -0
  175. package/models/errors/updateinvoiceerror.d.ts +40 -0
  176. package/models/errors/updateinvoiceerror.d.ts.map +1 -0
  177. package/models/errors/updateinvoiceerror.js +99 -0
  178. package/models/errors/updateinvoiceerror.js.map +1 -0
  179. package/models/operations/createinvoice.d.ts +66 -0
  180. package/models/operations/createinvoice.d.ts.map +1 -0
  181. package/models/operations/createinvoice.js +122 -0
  182. package/models/operations/createinvoice.js.map +1 -0
  183. package/models/operations/getinvoice.d.ts +66 -0
  184. package/models/operations/getinvoice.d.ts.map +1 -0
  185. package/models/operations/getinvoice.js +114 -0
  186. package/models/operations/getinvoice.js.map +1 -0
  187. package/models/operations/index.d.ts +6 -0
  188. package/models/operations/index.d.ts.map +1 -1
  189. package/models/operations/index.js +6 -0
  190. package/models/operations/index.js.map +1 -1
  191. package/models/operations/listfeerevenue.d.ts +81 -0
  192. package/models/operations/listfeerevenue.d.ts.map +1 -0
  193. package/models/operations/listfeerevenue.js +120 -0
  194. package/models/operations/listfeerevenue.js.map +1 -0
  195. package/models/operations/listinvoices.d.ts +72 -0
  196. package/models/operations/listinvoices.d.ts.map +1 -0
  197. package/models/operations/listinvoices.js +120 -0
  198. package/models/operations/listinvoices.js.map +1 -0
  199. package/models/operations/markpaidinvoice.d.ts +68 -0
  200. package/models/operations/markpaidinvoice.d.ts.map +1 -0
  201. package/models/operations/markpaidinvoice.js +124 -0
  202. package/models/operations/markpaidinvoice.js.map +1 -0
  203. package/models/operations/updateinvoice.d.ts +68 -0
  204. package/models/operations/updateinvoice.d.ts.map +1 -0
  205. package/models/operations/updateinvoice.js +124 -0
  206. package/models/operations/updateinvoice.js.map +1 -0
  207. package/package.json +1 -1
  208. package/sdk/feeplans.d.ts +8 -1
  209. package/sdk/feeplans.d.ts.map +1 -1
  210. package/sdk/feeplans.js +11 -1
  211. package/sdk/feeplans.js.map +1 -1
  212. package/sdk/invoices.d.ts +41 -0
  213. package/sdk/invoices.d.ts.map +1 -0
  214. package/sdk/invoices.js +63 -0
  215. package/sdk/invoices.js.map +1 -0
  216. package/sdk/sdk.d.ts +3 -0
  217. package/sdk/sdk.d.ts.map +1 -1
  218. package/sdk/sdk.js +4 -0
  219. package/sdk/sdk.js.map +1 -1
  220. package/src/funcs/feePlansListFeeRevenue.ts +187 -0
  221. package/src/funcs/feePlansRetrieveFees.ts +1 -1
  222. package/src/funcs/invoicesCreateInvoice.ts +201 -0
  223. package/src/funcs/invoicesGetInvoice.ts +185 -0
  224. package/src/funcs/invoicesListInvoices.ts +194 -0
  225. package/src/funcs/invoicesMarkPaidInvoice.ts +208 -0
  226. package/src/funcs/invoicesUpdateInvoice.ts +207 -0
  227. package/src/lib/config.ts +2 -2
  228. package/src/mcp-server/mcp-server.ts +1 -1
  229. package/src/mcp-server/server.ts +13 -1
  230. package/src/mcp-server/tools/feePlansListFeeRevenue.ts +39 -0
  231. package/src/mcp-server/tools/feePlansRetrieveFees.ts +1 -1
  232. package/src/mcp-server/tools/invoicesCreateInvoice.ts +38 -0
  233. package/src/mcp-server/tools/invoicesGetInvoice.ts +38 -0
  234. package/src/mcp-server/tools/invoicesListInvoices.ts +38 -0
  235. package/src/mcp-server/tools/invoicesMarkPaidInvoice.ts +39 -0
  236. package/src/mcp-server/tools/invoicesUpdateInvoice.ts +38 -0
  237. package/src/models/components/amountdecimalupdate.ts +65 -0
  238. package/src/models/components/createinvoice.ts +84 -0
  239. package/src/models/components/index.ts +19 -0
  240. package/src/models/components/instantbankcreditpaymentmethod.ts +95 -0
  241. package/src/models/components/invoice.ts +178 -0
  242. package/src/models/components/invoiceexternalpayment.ts +91 -0
  243. package/src/models/components/invoicelineitem.ts +95 -0
  244. package/src/models/components/invoicelineitemoption.ts +84 -0
  245. package/src/models/components/invoicelineitemoptionvalidationerror.ts +72 -0
  246. package/src/models/components/invoicelineitems.ts +63 -0
  247. package/src/models/components/invoicelineitemsupdate.ts +63 -0
  248. package/src/models/components/invoicelineitemsvalidationerror.ts +59 -0
  249. package/src/models/components/invoicelineitemvalidationerror.ts +85 -0
  250. package/src/models/components/invoicepayment.ts +77 -0
  251. package/src/models/components/invoicestatus.ts +25 -0
  252. package/src/models/components/invoicetransferpayment.ts +68 -0
  253. package/src/models/components/markinvoicepaid.ts +58 -0
  254. package/src/models/components/paymentmethod.ts +22 -0
  255. package/src/models/components/paymentmethodtype.ts +1 -0
  256. package/src/models/components/updateinvoice.ts +94 -0
  257. package/src/models/components/webhookdata.ts +20 -0
  258. package/src/models/components/webhookdatainvoicecreated.ts +55 -0
  259. package/src/models/components/webhookdatainvoiceupdated.ts +64 -0
  260. package/src/models/components/webhookeventtype.ts +2 -0
  261. package/src/models/errors/createinvoiceerror.ts +102 -0
  262. package/src/models/errors/index.ts +4 -0
  263. package/src/models/errors/listinvoicesvalidationerror.ts +86 -0
  264. package/src/models/errors/markinvoicepaiderror.ts +78 -0
  265. package/src/models/errors/updateinvoiceerror.ts +100 -0
  266. package/src/models/operations/createinvoice.ts +187 -0
  267. package/src/models/operations/getinvoice.ts +179 -0
  268. package/src/models/operations/index.ts +6 -0
  269. package/src/models/operations/listfeerevenue.ts +200 -0
  270. package/src/models/operations/listinvoices.ts +191 -0
  271. package/src/models/operations/markpaidinvoice.ts +191 -0
  272. package/src/models/operations/updateinvoice.ts +191 -0
  273. package/src/sdk/feeplans.ts +19 -1
  274. package/src/sdk/invoices.ts +100 -0
  275. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,194 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { MoovCore } from "../core.js";
6
+ import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { MoovError } from "../models/errors/mooverror.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * List all the invoices created under a Moov account.
30
+ *
31
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
32
+ * you'll need to specify the `/accounts/{accountID}/invoices.read` scope.
33
+ */
34
+ export function invoicesListInvoices(
35
+ client: MoovCore,
36
+ request: operations.ListInvoicesRequest,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ operations.ListInvoicesResponse,
41
+ | errors.ListInvoicesValidationError
42
+ | MoovError
43
+ | ResponseValidationError
44
+ | ConnectionError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | InvalidRequestError
48
+ | UnexpectedClientError
49
+ | SDKValidationError
50
+ >
51
+ > {
52
+ return new APIPromise($do(
53
+ client,
54
+ request,
55
+ options,
56
+ ));
57
+ }
58
+
59
+ async function $do(
60
+ client: MoovCore,
61
+ request: operations.ListInvoicesRequest,
62
+ options?: RequestOptions,
63
+ ): Promise<
64
+ [
65
+ Result<
66
+ operations.ListInvoicesResponse,
67
+ | errors.ListInvoicesValidationError
68
+ | MoovError
69
+ | ResponseValidationError
70
+ | ConnectionError
71
+ | RequestAbortedError
72
+ | RequestTimeoutError
73
+ | InvalidRequestError
74
+ | UnexpectedClientError
75
+ | SDKValidationError
76
+ >,
77
+ APICall,
78
+ ]
79
+ > {
80
+ const parsed = safeParse(
81
+ request,
82
+ (value) => operations.ListInvoicesRequest$outboundSchema.parse(value),
83
+ "Input validation failed",
84
+ );
85
+ if (!parsed.ok) {
86
+ return [parsed, { status: "invalid" }];
87
+ }
88
+ const payload = parsed.value;
89
+ const body = null;
90
+
91
+ const pathParams = {
92
+ accountID: encodeSimple("accountID", payload.accountID, {
93
+ explode: false,
94
+ charEncoding: "percent",
95
+ }),
96
+ };
97
+
98
+ const path = pathToFunc("/accounts/{accountID}/invoices")(pathParams);
99
+
100
+ const query = encodeFormQuery({
101
+ "count": payload.count,
102
+ "customerAccountID": payload.customerAccountID,
103
+ "skip": payload.skip,
104
+ "status": payload.status,
105
+ }, { explode: false });
106
+
107
+ const headers = new Headers(compactMap({
108
+ Accept: "application/json",
109
+ "X-Moov-Version": encodeSimple(
110
+ "X-Moov-Version",
111
+ client._options.xMoovVersion,
112
+ { explode: false, charEncoding: "none" },
113
+ ),
114
+ }));
115
+
116
+ const securityInput = await extractSecurity(client._options.security);
117
+ const requestSecurity = resolveGlobalSecurity(securityInput);
118
+
119
+ const context = {
120
+ options: client._options,
121
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
122
+ operationID: "listInvoices",
123
+ oAuth2Scopes: null,
124
+
125
+ resolvedSecurity: requestSecurity,
126
+
127
+ securitySource: client._options.security,
128
+ retryConfig: options?.retries
129
+ || client._options.retryConfig
130
+ || { strategy: "none" },
131
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
132
+ };
133
+
134
+ const requestRes = client._createRequest(context, {
135
+ security: requestSecurity,
136
+ method: "GET",
137
+ baseURL: options?.serverURL,
138
+ path: path,
139
+ headers: headers,
140
+ query: query,
141
+ body: body,
142
+ userAgent: client._options.userAgent,
143
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
144
+ }, options);
145
+ if (!requestRes.ok) {
146
+ return [requestRes, { status: "invalid" }];
147
+ }
148
+ const req = requestRes.value;
149
+
150
+ const doResult = await client._do(req, {
151
+ context,
152
+ errorCodes: ["401", "403", "422", "429", "4XX", "500", "504", "5XX"],
153
+ retryConfig: context.retryConfig,
154
+ retryCodes: context.retryCodes,
155
+ });
156
+ if (!doResult.ok) {
157
+ return [doResult, { status: "request-error", request: req }];
158
+ }
159
+ const response = doResult.value;
160
+
161
+ const responseFields = {
162
+ HttpMeta: { Response: response, Request: req },
163
+ };
164
+
165
+ const [result] = await M.match<
166
+ operations.ListInvoicesResponse,
167
+ | errors.ListInvoicesValidationError
168
+ | MoovError
169
+ | ResponseValidationError
170
+ | ConnectionError
171
+ | RequestAbortedError
172
+ | RequestTimeoutError
173
+ | InvalidRequestError
174
+ | UnexpectedClientError
175
+ | SDKValidationError
176
+ >(
177
+ M.json(200, operations.ListInvoicesResponse$inboundSchema, {
178
+ hdrs: true,
179
+ key: "Result",
180
+ }),
181
+ M.jsonErr(422, errors.ListInvoicesValidationError$inboundSchema, {
182
+ hdrs: true,
183
+ }),
184
+ M.fail([401, 403, 429]),
185
+ M.fail([500, 504]),
186
+ M.fail("4XX"),
187
+ M.fail("5XX"),
188
+ )(response, req, { extraFields: responseFields });
189
+ if (!result.ok) {
190
+ return [result, { status: "complete", request: req, response }];
191
+ }
192
+
193
+ return [result, { status: "complete", request: req, response }];
194
+ }
@@ -0,0 +1,208 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { MoovCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { MoovError } from "../models/errors/mooverror.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Marks an invoice as paid outside of the Moov platform.
30
+ * If a payment link was created, the corresponding payment link is canceled, but a receipt is still sent.
31
+ *
32
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
33
+ * you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
34
+ */
35
+ export function invoicesMarkPaidInvoice(
36
+ client: MoovCore,
37
+ request: operations.MarkPaidInvoiceRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ operations.MarkPaidInvoiceResponse,
42
+ | errors.GenericError
43
+ | errors.MarkInvoicePaidError
44
+ | MoovError
45
+ | ResponseValidationError
46
+ | ConnectionError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | InvalidRequestError
50
+ | UnexpectedClientError
51
+ | SDKValidationError
52
+ >
53
+ > {
54
+ return new APIPromise($do(
55
+ client,
56
+ request,
57
+ options,
58
+ ));
59
+ }
60
+
61
+ async function $do(
62
+ client: MoovCore,
63
+ request: operations.MarkPaidInvoiceRequest,
64
+ options?: RequestOptions,
65
+ ): Promise<
66
+ [
67
+ Result<
68
+ operations.MarkPaidInvoiceResponse,
69
+ | errors.GenericError
70
+ | errors.MarkInvoicePaidError
71
+ | MoovError
72
+ | ResponseValidationError
73
+ | ConnectionError
74
+ | RequestAbortedError
75
+ | RequestTimeoutError
76
+ | InvalidRequestError
77
+ | UnexpectedClientError
78
+ | SDKValidationError
79
+ >,
80
+ APICall,
81
+ ]
82
+ > {
83
+ const parsed = safeParse(
84
+ request,
85
+ (value) => operations.MarkPaidInvoiceRequest$outboundSchema.parse(value),
86
+ "Input validation failed",
87
+ );
88
+ if (!parsed.ok) {
89
+ return [parsed, { status: "invalid" }];
90
+ }
91
+ const payload = parsed.value;
92
+ const body = encodeJSON("body", payload.MarkInvoicePaid, { explode: true });
93
+
94
+ const pathParams = {
95
+ accountID: encodeSimple("accountID", payload.accountID, {
96
+ explode: false,
97
+ charEncoding: "percent",
98
+ }),
99
+ invoiceID: encodeSimple("invoiceID", payload.invoiceID, {
100
+ explode: false,
101
+ charEncoding: "percent",
102
+ }),
103
+ };
104
+
105
+ const path = pathToFunc(
106
+ "/accounts/{accountID}/invoices/{invoiceID}/mark-paid",
107
+ )(pathParams);
108
+
109
+ const headers = new Headers(compactMap({
110
+ "Content-Type": "application/json",
111
+ Accept: "application/json",
112
+ "X-Moov-Version": encodeSimple(
113
+ "X-Moov-Version",
114
+ client._options.xMoovVersion,
115
+ { explode: false, charEncoding: "none" },
116
+ ),
117
+ }));
118
+
119
+ const securityInput = await extractSecurity(client._options.security);
120
+ const requestSecurity = resolveGlobalSecurity(securityInput);
121
+
122
+ const context = {
123
+ options: client._options,
124
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
125
+ operationID: "markPaidInvoice",
126
+ oAuth2Scopes: null,
127
+
128
+ resolvedSecurity: requestSecurity,
129
+
130
+ securitySource: client._options.security,
131
+ retryConfig: options?.retries
132
+ || client._options.retryConfig
133
+ || { strategy: "none" },
134
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
135
+ };
136
+
137
+ const requestRes = client._createRequest(context, {
138
+ security: requestSecurity,
139
+ method: "PUT",
140
+ baseURL: options?.serverURL,
141
+ path: path,
142
+ headers: headers,
143
+ body: body,
144
+ userAgent: client._options.userAgent,
145
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
146
+ }, options);
147
+ if (!requestRes.ok) {
148
+ return [requestRes, { status: "invalid" }];
149
+ }
150
+ const req = requestRes.value;
151
+
152
+ const doResult = await client._do(req, {
153
+ context,
154
+ errorCodes: [
155
+ "400",
156
+ "401",
157
+ "403",
158
+ "404",
159
+ "409",
160
+ "422",
161
+ "429",
162
+ "4XX",
163
+ "500",
164
+ "504",
165
+ "5XX",
166
+ ],
167
+ retryConfig: context.retryConfig,
168
+ retryCodes: context.retryCodes,
169
+ });
170
+ if (!doResult.ok) {
171
+ return [doResult, { status: "request-error", request: req }];
172
+ }
173
+ const response = doResult.value;
174
+
175
+ const responseFields = {
176
+ HttpMeta: { Response: response, Request: req },
177
+ };
178
+
179
+ const [result] = await M.match<
180
+ operations.MarkPaidInvoiceResponse,
181
+ | errors.GenericError
182
+ | errors.MarkInvoicePaidError
183
+ | MoovError
184
+ | ResponseValidationError
185
+ | ConnectionError
186
+ | RequestAbortedError
187
+ | RequestTimeoutError
188
+ | InvalidRequestError
189
+ | UnexpectedClientError
190
+ | SDKValidationError
191
+ >(
192
+ M.json(200, operations.MarkPaidInvoiceResponse$inboundSchema, {
193
+ hdrs: true,
194
+ key: "Result",
195
+ }),
196
+ M.jsonErr([400, 409], errors.GenericError$inboundSchema, { hdrs: true }),
197
+ M.jsonErr(422, errors.MarkInvoicePaidError$inboundSchema, { hdrs: true }),
198
+ M.fail([401, 403, 404, 429]),
199
+ M.fail([500, 504]),
200
+ M.fail("4XX"),
201
+ M.fail("5XX"),
202
+ )(response, req, { extraFields: responseFields });
203
+ if (!result.ok) {
204
+ return [result, { status: "complete", request: req, response }];
205
+ }
206
+
207
+ return [result, { status: "complete", request: req, response }];
208
+ }
@@ -0,0 +1,207 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { MoovCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import {
14
+ ConnectionError,
15
+ InvalidRequestError,
16
+ RequestAbortedError,
17
+ RequestTimeoutError,
18
+ UnexpectedClientError,
19
+ } from "../models/errors/httpclienterrors.js";
20
+ import * as errors from "../models/errors/index.js";
21
+ import { MoovError } from "../models/errors/mooverror.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * Updates an invoice.
30
+ *
31
+ * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/)
32
+ * you'll need to specify the `/accounts/{accountID}/invoices.write` scope.
33
+ */
34
+ export function invoicesUpdateInvoice(
35
+ client: MoovCore,
36
+ request: operations.UpdateInvoiceRequest,
37
+ options?: RequestOptions,
38
+ ): APIPromise<
39
+ Result<
40
+ operations.UpdateInvoiceResponse,
41
+ | errors.GenericError
42
+ | errors.UpdateInvoiceError
43
+ | MoovError
44
+ | ResponseValidationError
45
+ | ConnectionError
46
+ | RequestAbortedError
47
+ | RequestTimeoutError
48
+ | InvalidRequestError
49
+ | UnexpectedClientError
50
+ | SDKValidationError
51
+ >
52
+ > {
53
+ return new APIPromise($do(
54
+ client,
55
+ request,
56
+ options,
57
+ ));
58
+ }
59
+
60
+ async function $do(
61
+ client: MoovCore,
62
+ request: operations.UpdateInvoiceRequest,
63
+ options?: RequestOptions,
64
+ ): Promise<
65
+ [
66
+ Result<
67
+ operations.UpdateInvoiceResponse,
68
+ | errors.GenericError
69
+ | errors.UpdateInvoiceError
70
+ | MoovError
71
+ | ResponseValidationError
72
+ | ConnectionError
73
+ | RequestAbortedError
74
+ | RequestTimeoutError
75
+ | InvalidRequestError
76
+ | UnexpectedClientError
77
+ | SDKValidationError
78
+ >,
79
+ APICall,
80
+ ]
81
+ > {
82
+ const parsed = safeParse(
83
+ request,
84
+ (value) => operations.UpdateInvoiceRequest$outboundSchema.parse(value),
85
+ "Input validation failed",
86
+ );
87
+ if (!parsed.ok) {
88
+ return [parsed, { status: "invalid" }];
89
+ }
90
+ const payload = parsed.value;
91
+ const body = encodeJSON("body", payload.UpdateInvoice, { explode: true });
92
+
93
+ const pathParams = {
94
+ accountID: encodeSimple("accountID", payload.accountID, {
95
+ explode: false,
96
+ charEncoding: "percent",
97
+ }),
98
+ invoiceID: encodeSimple("invoiceID", payload.invoiceID, {
99
+ explode: false,
100
+ charEncoding: "percent",
101
+ }),
102
+ };
103
+
104
+ const path = pathToFunc("/accounts/{accountID}/invoices/{invoiceID}")(
105
+ pathParams,
106
+ );
107
+
108
+ const headers = new Headers(compactMap({
109
+ "Content-Type": "application/json",
110
+ Accept: "application/json",
111
+ "X-Moov-Version": encodeSimple(
112
+ "X-Moov-Version",
113
+ client._options.xMoovVersion,
114
+ { explode: false, charEncoding: "none" },
115
+ ),
116
+ }));
117
+
118
+ const securityInput = await extractSecurity(client._options.security);
119
+ const requestSecurity = resolveGlobalSecurity(securityInput);
120
+
121
+ const context = {
122
+ options: client._options,
123
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
124
+ operationID: "updateInvoice",
125
+ oAuth2Scopes: null,
126
+
127
+ resolvedSecurity: requestSecurity,
128
+
129
+ securitySource: client._options.security,
130
+ retryConfig: options?.retries
131
+ || client._options.retryConfig
132
+ || { strategy: "none" },
133
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
134
+ };
135
+
136
+ const requestRes = client._createRequest(context, {
137
+ security: requestSecurity,
138
+ method: "PATCH",
139
+ baseURL: options?.serverURL,
140
+ path: path,
141
+ headers: headers,
142
+ body: body,
143
+ userAgent: client._options.userAgent,
144
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
145
+ }, options);
146
+ if (!requestRes.ok) {
147
+ return [requestRes, { status: "invalid" }];
148
+ }
149
+ const req = requestRes.value;
150
+
151
+ const doResult = await client._do(req, {
152
+ context,
153
+ errorCodes: [
154
+ "400",
155
+ "401",
156
+ "403",
157
+ "404",
158
+ "409",
159
+ "422",
160
+ "429",
161
+ "4XX",
162
+ "500",
163
+ "504",
164
+ "5XX",
165
+ ],
166
+ retryConfig: context.retryConfig,
167
+ retryCodes: context.retryCodes,
168
+ });
169
+ if (!doResult.ok) {
170
+ return [doResult, { status: "request-error", request: req }];
171
+ }
172
+ const response = doResult.value;
173
+
174
+ const responseFields = {
175
+ HttpMeta: { Response: response, Request: req },
176
+ };
177
+
178
+ const [result] = await M.match<
179
+ operations.UpdateInvoiceResponse,
180
+ | errors.GenericError
181
+ | errors.UpdateInvoiceError
182
+ | MoovError
183
+ | ResponseValidationError
184
+ | ConnectionError
185
+ | RequestAbortedError
186
+ | RequestTimeoutError
187
+ | InvalidRequestError
188
+ | UnexpectedClientError
189
+ | SDKValidationError
190
+ >(
191
+ M.json(200, operations.UpdateInvoiceResponse$inboundSchema, {
192
+ hdrs: true,
193
+ key: "Result",
194
+ }),
195
+ M.jsonErr([400, 409], errors.GenericError$inboundSchema, { hdrs: true }),
196
+ M.jsonErr(422, errors.UpdateInvoiceError$inboundSchema, { hdrs: true }),
197
+ M.fail([401, 403, 404, 429]),
198
+ M.fail([500, 504]),
199
+ M.fail("4XX"),
200
+ M.fail("5XX"),
201
+ )(response, req, { extraFields: responseFields });
202
+ if (!result.ok) {
203
+ return [result, { status: "complete", request: req, response }];
204
+ }
205
+
206
+ return [result, { status: "complete", request: req, response }];
207
+ }
package/src/lib/config.ts CHANGED
@@ -73,7 +73,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
73
73
  export const SDK_METADATA = {
74
74
  language: "typescript",
75
75
  openapiDocVersion: "latest",
76
- sdkVersion: "0.21.13",
76
+ sdkVersion: "0.21.15",
77
77
  genVersion: "2.755.9",
78
- userAgent: "speakeasy-sdk/typescript 0.21.13 2.755.9 latest @moovio/sdk",
78
+ userAgent: "speakeasy-sdk/typescript 0.21.15 2.755.9 latest @moovio/sdk",
79
79
  } as const;
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.21.13",
22
+ currentVersion: "0.21.15",
23
23
  },
24
24
  });
25
25
 
@@ -82,6 +82,7 @@ import { tool$feePlansCreateFeePlanAgreements } from "./tools/feePlansCreateFeeP
82
82
  import { tool$feePlansGetResidual } from "./tools/feePlansGetResidual.js";
83
83
  import { tool$feePlansListFeePlanAgreements } from "./tools/feePlansListFeePlanAgreements.js";
84
84
  import { tool$feePlansListFeePlans } from "./tools/feePlansListFeePlans.js";
85
+ import { tool$feePlansListFeeRevenue } from "./tools/feePlansListFeeRevenue.js";
85
86
  import { tool$feePlansListFeesFetch } from "./tools/feePlansListFeesFetch.js";
86
87
  import { tool$feePlansListPartnerPricing } from "./tools/feePlansListPartnerPricing.js";
87
88
  import { tool$feePlansListPartnerPricingAgreements } from "./tools/feePlansListPartnerPricingAgreements.js";
@@ -101,6 +102,11 @@ import { tool$imagesUpload } from "./tools/imagesUpload.js";
101
102
  import { tool$industriesList } from "./tools/industriesList.js";
102
103
  import { tool$institutionsSearch } from "./tools/institutionsSearch.js";
103
104
  import { tool$institutionsSearchInstitutions } from "./tools/institutionsSearchInstitutions.js";
105
+ import { tool$invoicesCreateInvoice } from "./tools/invoicesCreateInvoice.js";
106
+ import { tool$invoicesGetInvoice } from "./tools/invoicesGetInvoice.js";
107
+ import { tool$invoicesListInvoices } from "./tools/invoicesListInvoices.js";
108
+ import { tool$invoicesMarkPaidInvoice } from "./tools/invoicesMarkPaidInvoice.js";
109
+ import { tool$invoicesUpdateInvoice } from "./tools/invoicesUpdateInvoice.js";
104
110
  import { tool$issuingTransactionsGet } from "./tools/issuingTransactionsGet.js";
105
111
  import { tool$issuingTransactionsGetAuthorization } from "./tools/issuingTransactionsGetAuthorization.js";
106
112
  import { tool$issuingTransactionsList } from "./tools/issuingTransactionsList.js";
@@ -187,7 +193,7 @@ export function createMCPServer(deps: {
187
193
  }) {
188
194
  const server = new McpServer({
189
195
  name: "Moov",
190
- version: "0.21.13",
196
+ version: "0.21.15",
191
197
  });
192
198
 
193
199
  const client = new MoovCore({
@@ -270,6 +276,7 @@ export function createMCPServer(deps: {
270
276
  tool(tool$feePlansListFeePlanAgreements);
271
277
  tool(tool$feePlansCreateFeePlanAgreements);
272
278
  tool(tool$feePlansListFeePlans);
279
+ tool(tool$feePlansListFeeRevenue);
273
280
  tool(tool$feePlansRetrieveFees);
274
281
  tool(tool$feePlansListFeesFetch);
275
282
  tool(tool$feePlansListPartnerPricing);
@@ -287,6 +294,11 @@ export function createMCPServer(deps: {
287
294
  tool(tool$imagesDelete);
288
295
  tool(tool$imagesUpdateMetadata);
289
296
  tool(tool$imagesGetPublic);
297
+ tool(tool$invoicesCreateInvoice);
298
+ tool(tool$invoicesListInvoices);
299
+ tool(tool$invoicesGetInvoice);
300
+ tool(tool$invoicesUpdateInvoice);
301
+ tool(tool$invoicesMarkPaidInvoice);
290
302
  tool(tool$paymentLinksCreate);
291
303
  tool(tool$paymentLinksList);
292
304
  tool(tool$paymentLinksGet);