@moovio/sdk 0.0.0-dev.27 → 0.0.0-dev.28

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 (277) hide show
  1. package/README.md +121 -59
  2. package/bin/mcp-server.js +969 -217
  3. package/bin/mcp-server.js.map +55 -29
  4. package/funcs/avatarsDelete.d.ts +23 -0
  5. package/funcs/avatarsDelete.d.ts.map +1 -0
  6. package/funcs/avatarsDelete.js +135 -0
  7. package/funcs/avatarsDelete.js.map +1 -0
  8. package/funcs/avatarsUpload.d.ts +23 -0
  9. package/funcs/avatarsUpload.d.ts.map +1 -0
  10. package/funcs/avatarsUpload.js +155 -0
  11. package/funcs/avatarsUpload.js.map +1 -0
  12. package/funcs/productsList.js +1 -0
  13. package/funcs/productsList.js.map +1 -1
  14. package/funcs/productsListCategories.d.ts +14 -0
  15. package/funcs/productsListCategories.d.ts.map +1 -0
  16. package/funcs/productsListCategories.js +107 -0
  17. package/funcs/productsListCategories.js.map +1 -0
  18. package/hooks/oauth2scopes.d.ts +5 -0
  19. package/hooks/oauth2scopes.d.ts.map +1 -0
  20. package/hooks/oauth2scopes.js +6 -0
  21. package/hooks/oauth2scopes.js.map +1 -0
  22. package/jsr.json +1 -1
  23. package/lib/config.d.ts +3 -3
  24. package/lib/config.js +3 -3
  25. package/mcp-server/mcp-server.js +1 -1
  26. package/mcp-server/server.d.ts.map +1 -1
  27. package/mcp-server/server.js +3 -1
  28. package/mcp-server/server.js.map +1 -1
  29. package/mcp-server/tools/productsListCategories.d.ts +3 -0
  30. package/mcp-server/tools/productsListCategories.d.ts.map +1 -0
  31. package/mcp-server/tools/productsListCategories.js +24 -0
  32. package/mcp-server/tools/productsListCategories.js.map +1 -0
  33. package/models/components/allowedscheduleerror.d.ts +24 -0
  34. package/models/components/allowedscheduleerror.d.ts.map +1 -0
  35. package/models/components/allowedscheduleerror.js +62 -0
  36. package/models/components/allowedscheduleerror.js.map +1 -0
  37. package/models/components/avataruploadrequest.d.ts +35 -0
  38. package/models/components/avataruploadrequest.d.ts.map +1 -0
  39. package/models/components/avataruploadrequest.js +88 -0
  40. package/models/components/avataruploadrequest.js.map +1 -0
  41. package/models/components/capabilityid.d.ts +1 -0
  42. package/models/components/capabilityid.d.ts.map +1 -1
  43. package/models/components/capabilityid.js +1 -0
  44. package/models/components/capabilityid.js.map +1 -1
  45. package/models/components/createtransfer.d.ts +6 -0
  46. package/models/components/createtransfer.d.ts.map +1 -1
  47. package/models/components/createtransfer.js +3 -0
  48. package/models/components/createtransfer.js.map +1 -1
  49. package/models/components/feepaidby.d.ts +18 -0
  50. package/models/components/feepaidby.d.ts.map +1 -0
  51. package/models/components/feepaidby.js +52 -0
  52. package/models/components/feepaidby.js.map +1 -0
  53. package/models/components/fullissuedcard.d.ts +6 -3
  54. package/models/components/fullissuedcard.d.ts.map +1 -1
  55. package/models/components/fullissuedcard.js +3 -3
  56. package/models/components/fullissuedcard.js.map +1 -1
  57. package/models/components/incurredfee.d.ts +6 -0
  58. package/models/components/incurredfee.d.ts.map +1 -1
  59. package/models/components/incurredfee.js +3 -0
  60. package/models/components/incurredfee.js.map +1 -1
  61. package/models/components/index.d.ts +21 -0
  62. package/models/components/index.d.ts.map +1 -1
  63. package/models/components/index.js +21 -0
  64. package/models/components/index.js.map +1 -1
  65. package/models/components/issuedcard.d.ts +6 -3
  66. package/models/components/issuedcard.d.ts.map +1 -1
  67. package/models/components/issuedcard.js +3 -3
  68. package/models/components/issuedcard.js.map +1 -1
  69. package/models/components/issuedcontrols.d.ts +76 -0
  70. package/models/components/issuedcontrols.d.ts.map +1 -0
  71. package/models/components/issuedcontrols.js +92 -0
  72. package/models/components/issuedcontrols.js.map +1 -0
  73. package/models/components/issuedvelocitylimit.d.ts +59 -0
  74. package/models/components/issuedvelocitylimit.d.ts.map +1 -0
  75. package/models/components/issuedvelocitylimit.js +74 -0
  76. package/models/components/issuedvelocitylimit.js.map +1 -0
  77. package/models/components/issuingcontrols.d.ts +47 -0
  78. package/models/components/issuingcontrols.d.ts.map +1 -1
  79. package/models/components/issuingcontrols.js +33 -1
  80. package/models/components/issuingcontrols.js.map +1 -1
  81. package/models/components/issuingcontrolserror.d.ts +11 -0
  82. package/models/components/issuingcontrolserror.d.ts.map +1 -1
  83. package/models/components/issuingcontrolserror.js +12 -0
  84. package/models/components/issuingcontrolserror.js.map +1 -1
  85. package/models/components/issuingcontrolsrestrictionmode.d.ts +18 -0
  86. package/models/components/issuingcontrolsrestrictionmode.d.ts.map +1 -0
  87. package/models/components/issuingcontrolsrestrictionmode.js +52 -0
  88. package/models/components/issuingcontrolsrestrictionmode.js.map +1 -0
  89. package/models/components/issuingintervallimit.d.ts +9 -6
  90. package/models/components/issuingintervallimit.d.ts.map +1 -1
  91. package/models/components/issuingintervallimit.js +7 -4
  92. package/models/components/issuingintervallimit.js.map +1 -1
  93. package/models/components/issuingmerchantcategory.d.ts +42 -0
  94. package/models/components/issuingmerchantcategory.d.ts.map +1 -0
  95. package/models/components/issuingmerchantcategory.js +76 -0
  96. package/models/components/issuingmerchantcategory.js.map +1 -0
  97. package/models/components/issuingscheduleday.d.ts +17 -0
  98. package/models/components/issuingscheduleday.d.ts.map +1 -0
  99. package/models/components/issuingscheduleday.js +54 -0
  100. package/models/components/issuingscheduleday.js.map +1 -0
  101. package/models/components/issuingvelocitylimit.d.ts +8 -3
  102. package/models/components/issuingvelocitylimit.d.ts.map +1 -1
  103. package/models/components/issuingvelocitylimit.js +4 -2
  104. package/models/components/issuingvelocitylimit.js.map +1 -1
  105. package/models/components/issuingvelocitylimiterror.d.ts +2 -0
  106. package/models/components/issuingvelocitylimiterror.d.ts.map +1 -1
  107. package/models/components/issuingvelocitylimiterror.js +2 -0
  108. package/models/components/issuingvelocitylimiterror.js.map +1 -1
  109. package/models/components/merchantcategoryrestrictions.d.ts +41 -0
  110. package/models/components/merchantcategoryrestrictions.d.ts.map +1 -0
  111. package/models/components/merchantcategoryrestrictions.js +68 -0
  112. package/models/components/merchantcategoryrestrictions.js.map +1 -0
  113. package/models/components/merchantcategoryrestrictionserror.d.ts +36 -0
  114. package/models/components/merchantcategoryrestrictionserror.d.ts.map +1 -0
  115. package/models/components/merchantcategoryrestrictionserror.js +66 -0
  116. package/models/components/merchantcategoryrestrictionserror.js.map +1 -0
  117. package/models/components/merchantentry.d.ts +33 -0
  118. package/models/components/merchantentry.d.ts.map +1 -0
  119. package/models/components/merchantentry.js +63 -0
  120. package/models/components/merchantentry.js.map +1 -0
  121. package/models/components/merchantentryerror.d.ts +19 -0
  122. package/models/components/merchantentryerror.d.ts.map +1 -0
  123. package/models/components/merchantentryerror.js +61 -0
  124. package/models/components/merchantentryerror.js.map +1 -0
  125. package/models/components/merchantrestrictions.d.ts +30 -0
  126. package/models/components/merchantrestrictions.d.ts.map +1 -0
  127. package/models/components/merchantrestrictions.js +62 -0
  128. package/models/components/merchantrestrictions.js.map +1 -0
  129. package/models/components/merchantrestrictionserror.d.ts +24 -0
  130. package/models/components/merchantrestrictionserror.d.ts.map +1 -0
  131. package/models/components/merchantrestrictionserror.js +62 -0
  132. package/models/components/merchantrestrictionserror.js.map +1 -0
  133. package/models/components/paymentlinkpayoutdetails.d.ts +14 -0
  134. package/models/components/paymentlinkpayoutdetails.d.ts.map +1 -1
  135. package/models/components/paymentlinkpayoutdetails.js +3 -0
  136. package/models/components/paymentlinkpayoutdetails.js.map +1 -1
  137. package/models/components/paymentlinkpayoutdetailsupdate.d.ts +14 -0
  138. package/models/components/paymentlinkpayoutdetailsupdate.d.ts.map +1 -1
  139. package/models/components/paymentlinkpayoutdetailsupdate.js +3 -0
  140. package/models/components/paymentlinkpayoutdetailsupdate.js.map +1 -1
  141. package/models/components/payoutdetailserror.d.ts +2 -0
  142. package/models/components/payoutdetailserror.d.ts.map +1 -1
  143. package/models/components/payoutdetailserror.js +2 -0
  144. package/models/components/payoutdetailserror.js.map +1 -1
  145. package/models/components/product.d.ts +6 -0
  146. package/models/components/product.d.ts.map +1 -1
  147. package/models/components/product.js +3 -0
  148. package/models/components/product.js.map +1 -1
  149. package/models/components/productcategories.d.ts +21 -0
  150. package/models/components/productcategories.d.ts.map +1 -0
  151. package/models/components/productcategories.js +59 -0
  152. package/models/components/productcategories.js.map +1 -0
  153. package/models/components/productcategory.d.ts +43 -0
  154. package/models/components/productcategory.d.ts.map +1 -0
  155. package/models/components/productcategory.js +67 -0
  156. package/models/components/productcategory.js.map +1 -0
  157. package/models/components/productrequest.d.ts +5 -0
  158. package/models/components/productrequest.d.ts.map +1 -1
  159. package/models/components/productrequest.js +2 -0
  160. package/models/components/productrequest.js.map +1 -1
  161. package/models/components/schedulewindow.d.ts +34 -0
  162. package/models/components/schedulewindow.d.ts.map +1 -0
  163. package/models/components/schedulewindow.js +64 -0
  164. package/models/components/schedulewindow.js.map +1 -0
  165. package/models/components/schedulewindowerror.d.ts +21 -0
  166. package/models/components/schedulewindowerror.d.ts.map +1 -0
  167. package/models/components/schedulewindowerror.js +63 -0
  168. package/models/components/schedulewindowerror.js.map +1 -0
  169. package/models/components/transferfeepaidby.d.ts +24 -0
  170. package/models/components/transferfeepaidby.d.ts.map +1 -0
  171. package/models/components/transferfeepaidby.js +60 -0
  172. package/models/components/transferfeepaidby.js.map +1 -0
  173. package/models/components/updateissuedcard.d.ts +6 -0
  174. package/models/components/updateissuedcard.d.ts.map +1 -1
  175. package/models/components/updateissuedcard.js +3 -0
  176. package/models/components/updateissuedcard.js.map +1 -1
  177. package/models/components/updateissuingcontrols.d.ts +130 -0
  178. package/models/components/updateissuingcontrols.d.ts.map +1 -0
  179. package/models/components/updateissuingcontrols.js +130 -0
  180. package/models/components/updateissuingcontrols.js.map +1 -0
  181. package/models/components/updateissuingcontrolserror.d.ts +33 -0
  182. package/models/components/updateissuingcontrolserror.d.ts.map +1 -0
  183. package/models/components/updateissuingcontrolserror.js +72 -0
  184. package/models/components/updateissuingcontrolserror.js.map +1 -0
  185. package/models/errors/productrequestvalidationerror.d.ts +3 -0
  186. package/models/errors/productrequestvalidationerror.d.ts.map +1 -1
  187. package/models/errors/productrequestvalidationerror.js +4 -0
  188. package/models/errors/productrequestvalidationerror.js.map +1 -1
  189. package/models/errors/updateissuedcarderror.d.ts +3 -0
  190. package/models/errors/updateissuedcarderror.d.ts.map +1 -1
  191. package/models/errors/updateissuedcarderror.js +4 -0
  192. package/models/errors/updateissuedcarderror.js.map +1 -1
  193. package/models/operations/deleteavatar.d.ts +52 -0
  194. package/models/operations/deleteavatar.d.ts.map +1 -0
  195. package/models/operations/deleteavatar.js +102 -0
  196. package/models/operations/deleteavatar.js.map +1 -0
  197. package/models/operations/index.d.ts +3 -0
  198. package/models/operations/index.d.ts.map +1 -1
  199. package/models/operations/index.js +3 -0
  200. package/models/operations/index.js.map +1 -1
  201. package/models/operations/listproductcategories.d.ts +24 -0
  202. package/models/operations/listproductcategories.d.ts.map +1 -0
  203. package/models/operations/listproductcategories.js +72 -0
  204. package/models/operations/listproductcategories.js.map +1 -0
  205. package/models/operations/listproducts.d.ts +9 -0
  206. package/models/operations/listproducts.d.ts.map +1 -1
  207. package/models/operations/listproducts.js +2 -0
  208. package/models/operations/listproducts.js.map +1 -1
  209. package/models/operations/uploadavatar.d.ts +55 -0
  210. package/models/operations/uploadavatar.d.ts.map +1 -0
  211. package/models/operations/uploadavatar.js +113 -0
  212. package/models/operations/uploadavatar.js.map +1 -0
  213. package/package.json +1 -1
  214. package/sdk/avatars.d.ts +24 -0
  215. package/sdk/avatars.d.ts.map +1 -1
  216. package/sdk/avatars.js +30 -0
  217. package/sdk/avatars.js.map +1 -1
  218. package/sdk/products.d.ts +4 -0
  219. package/sdk/products.d.ts.map +1 -1
  220. package/sdk/products.js +7 -0
  221. package/sdk/products.js.map +1 -1
  222. package/src/funcs/avatarsDelete.ts +194 -0
  223. package/src/funcs/avatarsUpload.ts +231 -0
  224. package/src/funcs/productsList.ts +1 -0
  225. package/src/funcs/productsListCategories.ts +149 -0
  226. package/src/hooks/oauth2scopes.ts +8 -0
  227. package/src/lib/config.ts +3 -3
  228. package/src/mcp-server/mcp-server.ts +1 -1
  229. package/src/mcp-server/server.ts +3 -1
  230. package/src/mcp-server/tools/productsListCategories.ts +29 -0
  231. package/src/models/components/allowedscheduleerror.ts +62 -0
  232. package/src/models/components/avataruploadrequest.ts +113 -0
  233. package/src/models/components/capabilityid.ts +1 -0
  234. package/src/models/components/createtransfer.ts +13 -0
  235. package/src/models/components/feepaidby.ts +32 -0
  236. package/src/models/components/fullissuedcard.ts +12 -9
  237. package/src/models/components/incurredfee.ts +12 -0
  238. package/src/models/components/index.ts +21 -0
  239. package/src/models/components/issuedcard.ts +12 -9
  240. package/src/models/components/issuedcontrols.ts +180 -0
  241. package/src/models/components/issuedvelocitylimit.ts +112 -0
  242. package/src/models/components/issuingcontrols.ts +107 -0
  243. package/src/models/components/issuingcontrolserror.ts +39 -0
  244. package/src/models/components/issuingcontrolsrestrictionmode.ts +34 -0
  245. package/src/models/components/issuingintervallimit.ts +18 -10
  246. package/src/models/components/issuingmerchantcategory.ts +56 -0
  247. package/src/models/components/issuingscheduleday.ts +26 -0
  248. package/src/models/components/issuingvelocitylimit.ts +12 -5
  249. package/src/models/components/issuingvelocitylimiterror.ts +4 -0
  250. package/src/models/components/merchantcategoryrestrictions.ts +97 -0
  251. package/src/models/components/merchantcategoryrestrictionserror.ts +72 -0
  252. package/src/models/components/merchantentry.ts +68 -0
  253. package/src/models/components/merchantentryerror.ts +56 -0
  254. package/src/models/components/merchantrestrictions.ts +75 -0
  255. package/src/models/components/merchantrestrictionserror.ts +62 -0
  256. package/src/models/components/paymentlinkpayoutdetails.ts +16 -0
  257. package/src/models/components/paymentlinkpayoutdetailsupdate.ts +16 -0
  258. package/src/models/components/payoutdetailserror.ts +4 -0
  259. package/src/models/components/product.ts +13 -0
  260. package/src/models/components/productcategories.ts +60 -0
  261. package/src/models/components/productcategory.ts +84 -0
  262. package/src/models/components/productrequest.ts +7 -0
  263. package/src/models/components/schedulewindow.ts +73 -0
  264. package/src/models/components/schedulewindowerror.ts +60 -0
  265. package/src/models/components/transferfeepaidby.ts +63 -0
  266. package/src/models/components/updateissuedcard.ts +13 -0
  267. package/src/models/components/updateissuingcontrols.ts +351 -0
  268. package/src/models/components/updateissuingcontrolserror.ts +101 -0
  269. package/src/models/errors/productrequestvalidationerror.ts +6 -0
  270. package/src/models/errors/updateissuedcarderror.ts +6 -0
  271. package/src/models/operations/deleteavatar.ts +154 -0
  272. package/src/models/operations/index.ts +3 -0
  273. package/src/models/operations/listproductcategories.ts +69 -0
  274. package/src/models/operations/listproducts.ts +11 -0
  275. package/src/models/operations/uploadavatar.ts +167 -0
  276. package/src/sdk/avatars.ts +50 -0
  277. package/src/sdk/products.ts +13 -0
@@ -0,0 +1,351 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ IssuingControlsRestrictionMode,
12
+ IssuingControlsRestrictionMode$inboundSchema,
13
+ IssuingControlsRestrictionMode$outboundSchema,
14
+ } from "./issuingcontrolsrestrictionmode.js";
15
+ import {
16
+ IssuingMerchantCategory,
17
+ IssuingMerchantCategory$inboundSchema,
18
+ IssuingMerchantCategory$outboundSchema,
19
+ } from "./issuingmerchantcategory.js";
20
+ import {
21
+ IssuingVelocityLimit,
22
+ IssuingVelocityLimit$inboundSchema,
23
+ IssuingVelocityLimit$Outbound,
24
+ IssuingVelocityLimit$outboundSchema,
25
+ } from "./issuingvelocitylimit.js";
26
+ import {
27
+ MerchantEntry,
28
+ MerchantEntry$inboundSchema,
29
+ MerchantEntry$Outbound,
30
+ MerchantEntry$outboundSchema,
31
+ } from "./merchantentry.js";
32
+ import {
33
+ ScheduleWindow,
34
+ ScheduleWindow$inboundSchema,
35
+ ScheduleWindow$Outbound,
36
+ ScheduleWindow$outboundSchema,
37
+ } from "./schedulewindow.js";
38
+
39
+ /**
40
+ * Replaces the merchant category restrictions. Set to `null` to remove.
41
+ */
42
+ export type UpdateIssuingControlsMerchantCategoryRestrictions = {
43
+ /**
44
+ * Whether the listed categories are the only ones allowed, or the ones to block.
45
+ */
46
+ mode?: IssuingControlsRestrictionMode | undefined;
47
+ /**
48
+ * Predefined category groups to allow or block.
49
+ */
50
+ categories?: Array<IssuingMerchantCategory> | undefined;
51
+ /**
52
+ * Individual merchant category codes (MCCs) to allow or block, for codes not covered by a predefined category.
53
+ */
54
+ customMCCs?: Array<string> | undefined;
55
+ /**
56
+ * Merchants that are exempt from category restrictions regardless of their category.
57
+ */
58
+ exemptMerchants?: Array<MerchantEntry> | undefined;
59
+ };
60
+
61
+ /**
62
+ * Replaces the merchant restrictions. Set to `null` to remove.
63
+ */
64
+ export type UpdateIssuingControlsMerchantRestrictions = {
65
+ /**
66
+ * Whether the listed merchants are the only ones allowed, or the ones to block.
67
+ */
68
+ mode?: IssuingControlsRestrictionMode | undefined;
69
+ /**
70
+ * The merchants to allow or block.
71
+ */
72
+ merchants?: Array<MerchantEntry> | undefined;
73
+ };
74
+
75
+ /**
76
+ * Replaces the allowed schedule. Set to `null` to remove all schedule restrictions.
77
+ */
78
+ export type UpdateIssuingControlsAllowedSchedule = {
79
+ /**
80
+ * IANA timezone string used to evaluate window boundaries against the authorization time.
81
+ */
82
+ timezone?: string | undefined;
83
+ /**
84
+ * Time windows during which the card may authorize. Any matching window allows the transaction.
85
+ */
86
+ windows?: Array<ScheduleWindow> | undefined;
87
+ };
88
+
89
+ /**
90
+ * Mutable spend controls. Each field replaces the entire corresponding value.
91
+ */
92
+ export type UpdateIssuingControls = {
93
+ /**
94
+ * Replaces the entire set of velocity limits. Send an empty array to clear all limits.
95
+ */
96
+ velocityLimits?: Array<IssuingVelocityLimit> | undefined;
97
+ /**
98
+ * Replaces the merchant category restrictions. Set to `null` to remove.
99
+ */
100
+ merchantCategoryRestrictions?:
101
+ | UpdateIssuingControlsMerchantCategoryRestrictions
102
+ | null
103
+ | undefined;
104
+ /**
105
+ * Replaces the merchant restrictions. Set to `null` to remove.
106
+ */
107
+ merchantRestrictions?:
108
+ | UpdateIssuingControlsMerchantRestrictions
109
+ | null
110
+ | undefined;
111
+ /**
112
+ * Replaces the allowed schedule. Set to `null` to remove all schedule restrictions.
113
+ */
114
+ allowedSchedule?: UpdateIssuingControlsAllowedSchedule | null | undefined;
115
+ /**
116
+ * A spend cutoff date and time. Set to `null` to remove the cutoff.
117
+ */
118
+ expiresOn?: Date | null | undefined;
119
+ };
120
+
121
+ /** @internal */
122
+ export const UpdateIssuingControlsMerchantCategoryRestrictions$inboundSchema:
123
+ z.ZodType<
124
+ UpdateIssuingControlsMerchantCategoryRestrictions,
125
+ z.ZodTypeDef,
126
+ unknown
127
+ > = z.object({
128
+ mode: types.optional(IssuingControlsRestrictionMode$inboundSchema),
129
+ categories: types.optional(z.array(IssuingMerchantCategory$inboundSchema)),
130
+ customMCCs: types.optional(z.array(types.string())),
131
+ exemptMerchants: types.optional(z.array(MerchantEntry$inboundSchema)),
132
+ });
133
+ /** @internal */
134
+ export type UpdateIssuingControlsMerchantCategoryRestrictions$Outbound = {
135
+ mode?: string | undefined;
136
+ categories?: Array<string> | undefined;
137
+ customMCCs?: Array<string> | undefined;
138
+ exemptMerchants?: Array<MerchantEntry$Outbound> | undefined;
139
+ };
140
+
141
+ /** @internal */
142
+ export const UpdateIssuingControlsMerchantCategoryRestrictions$outboundSchema:
143
+ z.ZodType<
144
+ UpdateIssuingControlsMerchantCategoryRestrictions$Outbound,
145
+ z.ZodTypeDef,
146
+ UpdateIssuingControlsMerchantCategoryRestrictions
147
+ > = z.object({
148
+ mode: IssuingControlsRestrictionMode$outboundSchema.optional(),
149
+ categories: z.array(IssuingMerchantCategory$outboundSchema).optional(),
150
+ customMCCs: z.array(z.string()).optional(),
151
+ exemptMerchants: z.array(MerchantEntry$outboundSchema).optional(),
152
+ });
153
+
154
+ export function updateIssuingControlsMerchantCategoryRestrictionsToJSON(
155
+ updateIssuingControlsMerchantCategoryRestrictions:
156
+ UpdateIssuingControlsMerchantCategoryRestrictions,
157
+ ): string {
158
+ return JSON.stringify(
159
+ UpdateIssuingControlsMerchantCategoryRestrictions$outboundSchema.parse(
160
+ updateIssuingControlsMerchantCategoryRestrictions,
161
+ ),
162
+ );
163
+ }
164
+ export function updateIssuingControlsMerchantCategoryRestrictionsFromJSON(
165
+ jsonString: string,
166
+ ): SafeParseResult<
167
+ UpdateIssuingControlsMerchantCategoryRestrictions,
168
+ SDKValidationError
169
+ > {
170
+ return safeParse(
171
+ jsonString,
172
+ (x) =>
173
+ UpdateIssuingControlsMerchantCategoryRestrictions$inboundSchema.parse(
174
+ JSON.parse(x),
175
+ ),
176
+ `Failed to parse 'UpdateIssuingControlsMerchantCategoryRestrictions' from JSON`,
177
+ );
178
+ }
179
+
180
+ /** @internal */
181
+ export const UpdateIssuingControlsMerchantRestrictions$inboundSchema: z.ZodType<
182
+ UpdateIssuingControlsMerchantRestrictions,
183
+ z.ZodTypeDef,
184
+ unknown
185
+ > = z.object({
186
+ mode: types.optional(IssuingControlsRestrictionMode$inboundSchema),
187
+ merchants: types.optional(z.array(MerchantEntry$inboundSchema)),
188
+ });
189
+ /** @internal */
190
+ export type UpdateIssuingControlsMerchantRestrictions$Outbound = {
191
+ mode?: string | undefined;
192
+ merchants?: Array<MerchantEntry$Outbound> | undefined;
193
+ };
194
+
195
+ /** @internal */
196
+ export const UpdateIssuingControlsMerchantRestrictions$outboundSchema:
197
+ z.ZodType<
198
+ UpdateIssuingControlsMerchantRestrictions$Outbound,
199
+ z.ZodTypeDef,
200
+ UpdateIssuingControlsMerchantRestrictions
201
+ > = z.object({
202
+ mode: IssuingControlsRestrictionMode$outboundSchema.optional(),
203
+ merchants: z.array(MerchantEntry$outboundSchema).optional(),
204
+ });
205
+
206
+ export function updateIssuingControlsMerchantRestrictionsToJSON(
207
+ updateIssuingControlsMerchantRestrictions:
208
+ UpdateIssuingControlsMerchantRestrictions,
209
+ ): string {
210
+ return JSON.stringify(
211
+ UpdateIssuingControlsMerchantRestrictions$outboundSchema.parse(
212
+ updateIssuingControlsMerchantRestrictions,
213
+ ),
214
+ );
215
+ }
216
+ export function updateIssuingControlsMerchantRestrictionsFromJSON(
217
+ jsonString: string,
218
+ ): SafeParseResult<
219
+ UpdateIssuingControlsMerchantRestrictions,
220
+ SDKValidationError
221
+ > {
222
+ return safeParse(
223
+ jsonString,
224
+ (x) =>
225
+ UpdateIssuingControlsMerchantRestrictions$inboundSchema.parse(
226
+ JSON.parse(x),
227
+ ),
228
+ `Failed to parse 'UpdateIssuingControlsMerchantRestrictions' from JSON`,
229
+ );
230
+ }
231
+
232
+ /** @internal */
233
+ export const UpdateIssuingControlsAllowedSchedule$inboundSchema: z.ZodType<
234
+ UpdateIssuingControlsAllowedSchedule,
235
+ z.ZodTypeDef,
236
+ unknown
237
+ > = z.object({
238
+ timezone: types.optional(types.string()),
239
+ windows: types.optional(z.array(ScheduleWindow$inboundSchema)),
240
+ });
241
+ /** @internal */
242
+ export type UpdateIssuingControlsAllowedSchedule$Outbound = {
243
+ timezone?: string | undefined;
244
+ windows?: Array<ScheduleWindow$Outbound> | undefined;
245
+ };
246
+
247
+ /** @internal */
248
+ export const UpdateIssuingControlsAllowedSchedule$outboundSchema: z.ZodType<
249
+ UpdateIssuingControlsAllowedSchedule$Outbound,
250
+ z.ZodTypeDef,
251
+ UpdateIssuingControlsAllowedSchedule
252
+ > = z.object({
253
+ timezone: z.string().optional(),
254
+ windows: z.array(ScheduleWindow$outboundSchema).optional(),
255
+ });
256
+
257
+ export function updateIssuingControlsAllowedScheduleToJSON(
258
+ updateIssuingControlsAllowedSchedule: UpdateIssuingControlsAllowedSchedule,
259
+ ): string {
260
+ return JSON.stringify(
261
+ UpdateIssuingControlsAllowedSchedule$outboundSchema.parse(
262
+ updateIssuingControlsAllowedSchedule,
263
+ ),
264
+ );
265
+ }
266
+ export function updateIssuingControlsAllowedScheduleFromJSON(
267
+ jsonString: string,
268
+ ): SafeParseResult<UpdateIssuingControlsAllowedSchedule, SDKValidationError> {
269
+ return safeParse(
270
+ jsonString,
271
+ (x) =>
272
+ UpdateIssuingControlsAllowedSchedule$inboundSchema.parse(JSON.parse(x)),
273
+ `Failed to parse 'UpdateIssuingControlsAllowedSchedule' from JSON`,
274
+ );
275
+ }
276
+
277
+ /** @internal */
278
+ export const UpdateIssuingControls$inboundSchema: z.ZodType<
279
+ UpdateIssuingControls,
280
+ z.ZodTypeDef,
281
+ unknown
282
+ > = z.object({
283
+ velocityLimits: types.optional(z.array(IssuingVelocityLimit$inboundSchema)),
284
+ merchantCategoryRestrictions: z.nullable(
285
+ z.lazy(() =>
286
+ UpdateIssuingControlsMerchantCategoryRestrictions$inboundSchema
287
+ ),
288
+ ).optional(),
289
+ merchantRestrictions: z.nullable(
290
+ z.lazy(() => UpdateIssuingControlsMerchantRestrictions$inboundSchema),
291
+ ).optional(),
292
+ allowedSchedule: z.nullable(
293
+ z.lazy(() => UpdateIssuingControlsAllowedSchedule$inboundSchema),
294
+ ).optional(),
295
+ expiresOn: z.nullable(types.date()).optional(),
296
+ });
297
+ /** @internal */
298
+ export type UpdateIssuingControls$Outbound = {
299
+ velocityLimits?: Array<IssuingVelocityLimit$Outbound> | undefined;
300
+ merchantCategoryRestrictions?:
301
+ | UpdateIssuingControlsMerchantCategoryRestrictions$Outbound
302
+ | null
303
+ | undefined;
304
+ merchantRestrictions?:
305
+ | UpdateIssuingControlsMerchantRestrictions$Outbound
306
+ | null
307
+ | undefined;
308
+ allowedSchedule?:
309
+ | UpdateIssuingControlsAllowedSchedule$Outbound
310
+ | null
311
+ | undefined;
312
+ expiresOn?: string | null | undefined;
313
+ };
314
+
315
+ /** @internal */
316
+ export const UpdateIssuingControls$outboundSchema: z.ZodType<
317
+ UpdateIssuingControls$Outbound,
318
+ z.ZodTypeDef,
319
+ UpdateIssuingControls
320
+ > = z.object({
321
+ velocityLimits: z.array(IssuingVelocityLimit$outboundSchema).optional(),
322
+ merchantCategoryRestrictions: z.nullable(
323
+ z.lazy(() =>
324
+ UpdateIssuingControlsMerchantCategoryRestrictions$outboundSchema
325
+ ),
326
+ ).optional(),
327
+ merchantRestrictions: z.nullable(
328
+ z.lazy(() => UpdateIssuingControlsMerchantRestrictions$outboundSchema),
329
+ ).optional(),
330
+ allowedSchedule: z.nullable(
331
+ z.lazy(() => UpdateIssuingControlsAllowedSchedule$outboundSchema),
332
+ ).optional(),
333
+ expiresOn: z.nullable(z.date().transform(v => v.toISOString())).optional(),
334
+ });
335
+
336
+ export function updateIssuingControlsToJSON(
337
+ updateIssuingControls: UpdateIssuingControls,
338
+ ): string {
339
+ return JSON.stringify(
340
+ UpdateIssuingControls$outboundSchema.parse(updateIssuingControls),
341
+ );
342
+ }
343
+ export function updateIssuingControlsFromJSON(
344
+ jsonString: string,
345
+ ): SafeParseResult<UpdateIssuingControls, SDKValidationError> {
346
+ return safeParse(
347
+ jsonString,
348
+ (x) => UpdateIssuingControls$inboundSchema.parse(JSON.parse(x)),
349
+ `Failed to parse 'UpdateIssuingControls' from JSON`,
350
+ );
351
+ }
@@ -0,0 +1,101 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as types from "../../types/primitives.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ AllowedScheduleError,
12
+ AllowedScheduleError$inboundSchema,
13
+ AllowedScheduleError$Outbound,
14
+ AllowedScheduleError$outboundSchema,
15
+ } from "./allowedscheduleerror.js";
16
+ import {
17
+ IssuingVelocityLimitError,
18
+ IssuingVelocityLimitError$inboundSchema,
19
+ IssuingVelocityLimitError$Outbound,
20
+ IssuingVelocityLimitError$outboundSchema,
21
+ } from "./issuingvelocitylimiterror.js";
22
+ import {
23
+ MerchantCategoryRestrictionsError,
24
+ MerchantCategoryRestrictionsError$inboundSchema,
25
+ MerchantCategoryRestrictionsError$Outbound,
26
+ MerchantCategoryRestrictionsError$outboundSchema,
27
+ } from "./merchantcategoryrestrictionserror.js";
28
+ import {
29
+ MerchantRestrictionsError,
30
+ MerchantRestrictionsError$inboundSchema,
31
+ MerchantRestrictionsError$Outbound,
32
+ MerchantRestrictionsError$outboundSchema,
33
+ } from "./merchantrestrictionserror.js";
34
+
35
+ export type UpdateIssuingControlsError = {
36
+ velocityLimits?: { [k: string]: IssuingVelocityLimitError } | undefined;
37
+ merchantCategoryRestrictions?: MerchantCategoryRestrictionsError | undefined;
38
+ merchantRestrictions?: MerchantRestrictionsError | undefined;
39
+ allowedSchedule?: AllowedScheduleError | undefined;
40
+ expiresOn?: string | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const UpdateIssuingControlsError$inboundSchema: z.ZodType<
45
+ UpdateIssuingControlsError,
46
+ z.ZodTypeDef,
47
+ unknown
48
+ > = z.object({
49
+ velocityLimits: types.optional(
50
+ z.record(IssuingVelocityLimitError$inboundSchema),
51
+ ),
52
+ merchantCategoryRestrictions: types.optional(
53
+ MerchantCategoryRestrictionsError$inboundSchema,
54
+ ),
55
+ merchantRestrictions: types.optional(MerchantRestrictionsError$inboundSchema),
56
+ allowedSchedule: types.optional(AllowedScheduleError$inboundSchema),
57
+ expiresOn: types.optional(types.string()),
58
+ });
59
+ /** @internal */
60
+ export type UpdateIssuingControlsError$Outbound = {
61
+ velocityLimits?:
62
+ | { [k: string]: IssuingVelocityLimitError$Outbound }
63
+ | undefined;
64
+ merchantCategoryRestrictions?:
65
+ | MerchantCategoryRestrictionsError$Outbound
66
+ | undefined;
67
+ merchantRestrictions?: MerchantRestrictionsError$Outbound | undefined;
68
+ allowedSchedule?: AllowedScheduleError$Outbound | undefined;
69
+ expiresOn?: string | undefined;
70
+ };
71
+
72
+ /** @internal */
73
+ export const UpdateIssuingControlsError$outboundSchema: z.ZodType<
74
+ UpdateIssuingControlsError$Outbound,
75
+ z.ZodTypeDef,
76
+ UpdateIssuingControlsError
77
+ > = z.object({
78
+ velocityLimits: z.record(IssuingVelocityLimitError$outboundSchema).optional(),
79
+ merchantCategoryRestrictions: MerchantCategoryRestrictionsError$outboundSchema
80
+ .optional(),
81
+ merchantRestrictions: MerchantRestrictionsError$outboundSchema.optional(),
82
+ allowedSchedule: AllowedScheduleError$outboundSchema.optional(),
83
+ expiresOn: z.string().optional(),
84
+ });
85
+
86
+ export function updateIssuingControlsErrorToJSON(
87
+ updateIssuingControlsError: UpdateIssuingControlsError,
88
+ ): string {
89
+ return JSON.stringify(
90
+ UpdateIssuingControlsError$outboundSchema.parse(updateIssuingControlsError),
91
+ );
92
+ }
93
+ export function updateIssuingControlsErrorFromJSON(
94
+ jsonString: string,
95
+ ): SafeParseResult<UpdateIssuingControlsError, SDKValidationError> {
96
+ return safeParse(
97
+ jsonString,
98
+ (x) => UpdateIssuingControlsError$inboundSchema.parse(JSON.parse(x)),
99
+ `Failed to parse 'UpdateIssuingControlsError' from JSON`,
100
+ );
101
+ }
@@ -17,6 +17,7 @@ export type ProductRequestValidationErrorData = {
17
17
  optionGroups?:
18
18
  | { [k: string]: components.ProductOptionGroupValidationError }
19
19
  | undefined;
20
+ categoryID?: string | undefined;
20
21
  };
21
22
 
22
23
  export class ProductRequestValidationError extends MoovError {
@@ -29,6 +30,7 @@ export class ProductRequestValidationError extends MoovError {
29
30
  optionGroups?:
30
31
  | { [k: string]: components.ProductOptionGroupValidationError }
31
32
  | undefined;
33
+ categoryID?: string | undefined;
32
34
 
33
35
  /** The original data that was passed to this error instance. */
34
36
  data$: ProductRequestValidationErrorData;
@@ -47,6 +49,7 @@ export class ProductRequestValidationError extends MoovError {
47
49
  if (err.basePrice != null) this.basePrice = err.basePrice;
48
50
  if (err.images != null) this.images = err.images;
49
51
  if (err.optionGroups != null) this.optionGroups = err.optionGroups;
52
+ if (err.categoryID != null) this.categoryID = err.categoryID;
50
53
 
51
54
  this.name = "ProductRequestValidationError";
52
55
  }
@@ -69,6 +72,7 @@ export const ProductRequestValidationError$inboundSchema: z.ZodType<
69
72
  optionGroups: types.optional(
70
73
  z.record(components.ProductOptionGroupValidationError$inboundSchema),
71
74
  ),
75
+ categoryID: types.optional(types.string()),
72
76
  request$: z.instanceof(Request),
73
77
  response$: z.instanceof(Response),
74
78
  body$: z.string(),
@@ -92,6 +96,7 @@ export type ProductRequestValidationError$Outbound = {
92
96
  optionGroups?: {
93
97
  [k: string]: components.ProductOptionGroupValidationError$Outbound;
94
98
  } | undefined;
99
+ categoryID?: string | undefined;
95
100
  };
96
101
 
97
102
  /** @internal */
@@ -112,4 +117,5 @@ export const ProductRequestValidationError$outboundSchema: z.ZodType<
112
117
  optionGroups: z.record(
113
118
  components.ProductOptionGroupValidationError$outboundSchema,
114
119
  ).optional(),
120
+ categoryID: z.string().optional(),
115
121
  }));
@@ -12,6 +12,7 @@ export type UpdateIssuedCardErrorData = {
12
12
  nickname?: string | undefined;
13
13
  metadata?: string | undefined;
14
14
  billingAddress?: components.AddressError | undefined;
15
+ controls?: components.UpdateIssuingControlsError | undefined;
15
16
  };
16
17
 
17
18
  export class UpdateIssuedCardError extends MoovError {
@@ -19,6 +20,7 @@ export class UpdateIssuedCardError extends MoovError {
19
20
  nickname?: string | undefined;
20
21
  metadata?: string | undefined;
21
22
  billingAddress?: components.AddressError | undefined;
23
+ controls?: components.UpdateIssuingControlsError | undefined;
22
24
 
23
25
  /** The original data that was passed to this error instance. */
24
26
  data$: UpdateIssuedCardErrorData;
@@ -36,6 +38,7 @@ export class UpdateIssuedCardError extends MoovError {
36
38
  if (err.nickname != null) this.nickname = err.nickname;
37
39
  if (err.metadata != null) this.metadata = err.metadata;
38
40
  if (err.billingAddress != null) this.billingAddress = err.billingAddress;
41
+ if (err.controls != null) this.controls = err.controls;
39
42
 
40
43
  this.name = "UpdateIssuedCardError";
41
44
  }
@@ -51,6 +54,7 @@ export const UpdateIssuedCardError$inboundSchema: z.ZodType<
51
54
  nickname: types.optional(types.string()),
52
55
  metadata: types.optional(types.string()),
53
56
  billingAddress: types.optional(components.AddressError$inboundSchema),
57
+ controls: types.optional(components.UpdateIssuingControlsError$inboundSchema),
54
58
  request$: z.instanceof(Request),
55
59
  response$: z.instanceof(Response),
56
60
  body$: z.string(),
@@ -69,6 +73,7 @@ export type UpdateIssuedCardError$Outbound = {
69
73
  nickname?: string | undefined;
70
74
  metadata?: string | undefined;
71
75
  billingAddress?: components.AddressError$Outbound | undefined;
76
+ controls?: components.UpdateIssuingControlsError$Outbound | undefined;
72
77
  };
73
78
 
74
79
  /** @internal */
@@ -83,4 +88,5 @@ export const UpdateIssuedCardError$outboundSchema: z.ZodType<
83
88
  nickname: z.string().optional(),
84
89
  metadata: z.string().optional(),
85
90
  billingAddress: components.AddressError$outboundSchema.optional(),
91
+ controls: components.UpdateIssuingControlsError$outboundSchema.optional(),
86
92
  }));
@@ -0,0 +1,154 @@
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 types from "../../types/primitives.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type DeleteAvatarSecurity = {
13
+ username?: string | undefined;
14
+ password?: string | undefined;
15
+ };
16
+
17
+ export type DeleteAvatarRequest = {
18
+ /**
19
+ * The accountID to delete the avatar for. Only accountID values are accepted for writes.
20
+ */
21
+ uniqueID: string;
22
+ };
23
+
24
+ export type DeleteAvatarResponse = {
25
+ headers: { [k: string]: Array<string> };
26
+ };
27
+
28
+ /** @internal */
29
+ export const DeleteAvatarSecurity$inboundSchema: z.ZodType<
30
+ DeleteAvatarSecurity,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.object({
34
+ username: types.optional(types.string()),
35
+ password: types.optional(types.string()),
36
+ });
37
+ /** @internal */
38
+ export type DeleteAvatarSecurity$Outbound = {
39
+ username?: string | undefined;
40
+ password?: string | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const DeleteAvatarSecurity$outboundSchema: z.ZodType<
45
+ DeleteAvatarSecurity$Outbound,
46
+ z.ZodTypeDef,
47
+ DeleteAvatarSecurity
48
+ > = z.object({
49
+ username: z.string().optional(),
50
+ password: z.string().optional(),
51
+ });
52
+
53
+ export function deleteAvatarSecurityToJSON(
54
+ deleteAvatarSecurity: DeleteAvatarSecurity,
55
+ ): string {
56
+ return JSON.stringify(
57
+ DeleteAvatarSecurity$outboundSchema.parse(deleteAvatarSecurity),
58
+ );
59
+ }
60
+ export function deleteAvatarSecurityFromJSON(
61
+ jsonString: string,
62
+ ): SafeParseResult<DeleteAvatarSecurity, SDKValidationError> {
63
+ return safeParse(
64
+ jsonString,
65
+ (x) => DeleteAvatarSecurity$inboundSchema.parse(JSON.parse(x)),
66
+ `Failed to parse 'DeleteAvatarSecurity' from JSON`,
67
+ );
68
+ }
69
+
70
+ /** @internal */
71
+ export const DeleteAvatarRequest$inboundSchema: z.ZodType<
72
+ DeleteAvatarRequest,
73
+ z.ZodTypeDef,
74
+ unknown
75
+ > = z.object({
76
+ uniqueID: types.string(),
77
+ });
78
+ /** @internal */
79
+ export type DeleteAvatarRequest$Outbound = {
80
+ uniqueID: string;
81
+ };
82
+
83
+ /** @internal */
84
+ export const DeleteAvatarRequest$outboundSchema: z.ZodType<
85
+ DeleteAvatarRequest$Outbound,
86
+ z.ZodTypeDef,
87
+ DeleteAvatarRequest
88
+ > = z.object({
89
+ uniqueID: z.string(),
90
+ });
91
+
92
+ export function deleteAvatarRequestToJSON(
93
+ deleteAvatarRequest: DeleteAvatarRequest,
94
+ ): string {
95
+ return JSON.stringify(
96
+ DeleteAvatarRequest$outboundSchema.parse(deleteAvatarRequest),
97
+ );
98
+ }
99
+ export function deleteAvatarRequestFromJSON(
100
+ jsonString: string,
101
+ ): SafeParseResult<DeleteAvatarRequest, SDKValidationError> {
102
+ return safeParse(
103
+ jsonString,
104
+ (x) => DeleteAvatarRequest$inboundSchema.parse(JSON.parse(x)),
105
+ `Failed to parse 'DeleteAvatarRequest' from JSON`,
106
+ );
107
+ }
108
+
109
+ /** @internal */
110
+ export const DeleteAvatarResponse$inboundSchema: z.ZodType<
111
+ DeleteAvatarResponse,
112
+ z.ZodTypeDef,
113
+ unknown
114
+ > = z.object({
115
+ Headers: z.record(z.array(z.string())).default({}),
116
+ }).transform((v) => {
117
+ return remap$(v, {
118
+ "Headers": "headers",
119
+ });
120
+ });
121
+ /** @internal */
122
+ export type DeleteAvatarResponse$Outbound = {
123
+ Headers: { [k: string]: Array<string> };
124
+ };
125
+
126
+ /** @internal */
127
+ export const DeleteAvatarResponse$outboundSchema: z.ZodType<
128
+ DeleteAvatarResponse$Outbound,
129
+ z.ZodTypeDef,
130
+ DeleteAvatarResponse
131
+ > = z.object({
132
+ headers: z.record(z.array(z.string())),
133
+ }).transform((v) => {
134
+ return remap$(v, {
135
+ headers: "Headers",
136
+ });
137
+ });
138
+
139
+ export function deleteAvatarResponseToJSON(
140
+ deleteAvatarResponse: DeleteAvatarResponse,
141
+ ): string {
142
+ return JSON.stringify(
143
+ DeleteAvatarResponse$outboundSchema.parse(deleteAvatarResponse),
144
+ );
145
+ }
146
+ export function deleteAvatarResponseFromJSON(
147
+ jsonString: string,
148
+ ): SafeParseResult<DeleteAvatarResponse, SDKValidationError> {
149
+ return safeParse(
150
+ jsonString,
151
+ (x) => DeleteAvatarResponse$inboundSchema.parse(JSON.parse(x)),
152
+ `Failed to parse 'DeleteAvatarResponse' from JSON`,
153
+ );
154
+ }