@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
@@ -17,9 +17,13 @@ export type IssuingVelocityLimit = {
17
17
  /**
18
18
  * The maximum amount in cents that can be spent in a given interval.
19
19
  */
20
- amount: number;
20
+ amount?: number | undefined;
21
21
  /**
22
- * Specifies the time frame for the velocity limit. Currently supports only per-transaction limits.
22
+ * The maximum number of transactions allowed in the given interval. At least one of `amount` or `count` must be set.
23
+ */
24
+ count?: number | undefined;
25
+ /**
26
+ * Specifies the time frame for a velocity limit. `per-transaction` applies to each individual authorization and never resets. Time-based intervals (where supported) reset at midnight ET.
23
27
  */
24
28
  interval: IssuingIntervalLimit;
25
29
  };
@@ -30,12 +34,14 @@ export const IssuingVelocityLimit$inboundSchema: z.ZodType<
30
34
  z.ZodTypeDef,
31
35
  unknown
32
36
  > = z.object({
33
- amount: types.number(),
37
+ amount: types.optional(types.number()),
38
+ count: types.optional(types.number()),
34
39
  interval: IssuingIntervalLimit$inboundSchema,
35
40
  });
36
41
  /** @internal */
37
42
  export type IssuingVelocityLimit$Outbound = {
38
- amount: number;
43
+ amount?: number | undefined;
44
+ count?: number | undefined;
39
45
  interval: string;
40
46
  };
41
47
 
@@ -45,7 +51,8 @@ export const IssuingVelocityLimit$outboundSchema: z.ZodType<
45
51
  z.ZodTypeDef,
46
52
  IssuingVelocityLimit
47
53
  > = z.object({
48
- amount: z.number().int(),
54
+ amount: z.number().int().optional(),
55
+ count: z.number().int().optional(),
49
56
  interval: IssuingIntervalLimit$outboundSchema,
50
57
  });
51
58
 
@@ -10,6 +10,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type IssuingVelocityLimitError = {
12
12
  amount?: string | undefined;
13
+ count?: string | undefined;
13
14
  interval?: string | undefined;
14
15
  };
15
16
 
@@ -20,11 +21,13 @@ export const IssuingVelocityLimitError$inboundSchema: z.ZodType<
20
21
  unknown
21
22
  > = z.object({
22
23
  amount: types.optional(types.string()),
24
+ count: types.optional(types.string()),
23
25
  interval: types.optional(types.string()),
24
26
  });
25
27
  /** @internal */
26
28
  export type IssuingVelocityLimitError$Outbound = {
27
29
  amount?: string | undefined;
30
+ count?: string | undefined;
28
31
  interval?: string | undefined;
29
32
  };
30
33
 
@@ -35,6 +38,7 @@ export const IssuingVelocityLimitError$outboundSchema: z.ZodType<
35
38
  IssuingVelocityLimitError
36
39
  > = z.object({
37
40
  amount: z.string().optional(),
41
+ count: z.string().optional(),
38
42
  interval: z.string().optional(),
39
43
  });
40
44
 
@@ -0,0 +1,97 @@
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
+ MerchantEntry,
22
+ MerchantEntry$inboundSchema,
23
+ MerchantEntry$Outbound,
24
+ MerchantEntry$outboundSchema,
25
+ } from "./merchantentry.js";
26
+
27
+ /**
28
+ * Restricts card usage by merchant category.
29
+ */
30
+ export type MerchantCategoryRestrictions = {
31
+ /**
32
+ * Whether the listed categories are the only ones allowed, or the ones to block.
33
+ */
34
+ mode: IssuingControlsRestrictionMode;
35
+ /**
36
+ * Predefined category groups to allow or block.
37
+ */
38
+ categories?: Array<IssuingMerchantCategory> | undefined;
39
+ /**
40
+ * Individual merchant category codes (MCCs) to allow or block, for codes not covered by a predefined category.
41
+ */
42
+ customMCCs?: Array<string> | undefined;
43
+ /**
44
+ * Merchants that are exempt from category restrictions regardless of their category.
45
+ */
46
+ exemptMerchants?: Array<MerchantEntry> | undefined;
47
+ };
48
+
49
+ /** @internal */
50
+ export const MerchantCategoryRestrictions$inboundSchema: z.ZodType<
51
+ MerchantCategoryRestrictions,
52
+ z.ZodTypeDef,
53
+ unknown
54
+ > = z.object({
55
+ mode: IssuingControlsRestrictionMode$inboundSchema,
56
+ categories: types.optional(z.array(IssuingMerchantCategory$inboundSchema)),
57
+ customMCCs: types.optional(z.array(types.string())),
58
+ exemptMerchants: types.optional(z.array(MerchantEntry$inboundSchema)),
59
+ });
60
+ /** @internal */
61
+ export type MerchantCategoryRestrictions$Outbound = {
62
+ mode: string;
63
+ categories?: Array<string> | undefined;
64
+ customMCCs?: Array<string> | undefined;
65
+ exemptMerchants?: Array<MerchantEntry$Outbound> | undefined;
66
+ };
67
+
68
+ /** @internal */
69
+ export const MerchantCategoryRestrictions$outboundSchema: z.ZodType<
70
+ MerchantCategoryRestrictions$Outbound,
71
+ z.ZodTypeDef,
72
+ MerchantCategoryRestrictions
73
+ > = z.object({
74
+ mode: IssuingControlsRestrictionMode$outboundSchema,
75
+ categories: z.array(IssuingMerchantCategory$outboundSchema).optional(),
76
+ customMCCs: z.array(z.string()).optional(),
77
+ exemptMerchants: z.array(MerchantEntry$outboundSchema).optional(),
78
+ });
79
+
80
+ export function merchantCategoryRestrictionsToJSON(
81
+ merchantCategoryRestrictions: MerchantCategoryRestrictions,
82
+ ): string {
83
+ return JSON.stringify(
84
+ MerchantCategoryRestrictions$outboundSchema.parse(
85
+ merchantCategoryRestrictions,
86
+ ),
87
+ );
88
+ }
89
+ export function merchantCategoryRestrictionsFromJSON(
90
+ jsonString: string,
91
+ ): SafeParseResult<MerchantCategoryRestrictions, SDKValidationError> {
92
+ return safeParse(
93
+ jsonString,
94
+ (x) => MerchantCategoryRestrictions$inboundSchema.parse(JSON.parse(x)),
95
+ `Failed to parse 'MerchantCategoryRestrictions' from JSON`,
96
+ );
97
+ }
@@ -0,0 +1,72 @@
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
+ MerchantEntryError,
12
+ MerchantEntryError$inboundSchema,
13
+ MerchantEntryError$Outbound,
14
+ MerchantEntryError$outboundSchema,
15
+ } from "./merchantentryerror.js";
16
+
17
+ export type MerchantCategoryRestrictionsError = {
18
+ mode?: string | undefined;
19
+ categories?: { [k: string]: string } | undefined;
20
+ customMCCs?: { [k: string]: string } | undefined;
21
+ exemptMerchants?: { [k: string]: MerchantEntryError } | undefined;
22
+ };
23
+
24
+ /** @internal */
25
+ export const MerchantCategoryRestrictionsError$inboundSchema: z.ZodType<
26
+ MerchantCategoryRestrictionsError,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({
30
+ mode: types.optional(types.string()),
31
+ categories: types.optional(z.record(types.string())),
32
+ customMCCs: types.optional(z.record(types.string())),
33
+ exemptMerchants: types.optional(z.record(MerchantEntryError$inboundSchema)),
34
+ });
35
+ /** @internal */
36
+ export type MerchantCategoryRestrictionsError$Outbound = {
37
+ mode?: string | undefined;
38
+ categories?: { [k: string]: string } | undefined;
39
+ customMCCs?: { [k: string]: string } | undefined;
40
+ exemptMerchants?: { [k: string]: MerchantEntryError$Outbound } | undefined;
41
+ };
42
+
43
+ /** @internal */
44
+ export const MerchantCategoryRestrictionsError$outboundSchema: z.ZodType<
45
+ MerchantCategoryRestrictionsError$Outbound,
46
+ z.ZodTypeDef,
47
+ MerchantCategoryRestrictionsError
48
+ > = z.object({
49
+ mode: z.string().optional(),
50
+ categories: z.record(z.string()).optional(),
51
+ customMCCs: z.record(z.string()).optional(),
52
+ exemptMerchants: z.record(MerchantEntryError$outboundSchema).optional(),
53
+ });
54
+
55
+ export function merchantCategoryRestrictionsErrorToJSON(
56
+ merchantCategoryRestrictionsError: MerchantCategoryRestrictionsError,
57
+ ): string {
58
+ return JSON.stringify(
59
+ MerchantCategoryRestrictionsError$outboundSchema.parse(
60
+ merchantCategoryRestrictionsError,
61
+ ),
62
+ );
63
+ }
64
+ export function merchantCategoryRestrictionsErrorFromJSON(
65
+ jsonString: string,
66
+ ): SafeParseResult<MerchantCategoryRestrictionsError, SDKValidationError> {
67
+ return safeParse(
68
+ jsonString,
69
+ (x) => MerchantCategoryRestrictionsError$inboundSchema.parse(JSON.parse(x)),
70
+ `Failed to parse 'MerchantCategoryRestrictionsError' from JSON`,
71
+ );
72
+ }
@@ -0,0 +1,68 @@
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
+
11
+ /**
12
+ * Identifies a merchant by ID, descriptor pattern, or both. At least one of `mid` or `descriptorPattern` must be set.
13
+ */
14
+ export type MerchantEntry = {
15
+ /**
16
+ * The merchant's unique identifier (ISO 8583 DE42), matched exactly.
17
+ */
18
+ mid?: string | undefined;
19
+ /**
20
+ * A case-insensitive RE2 regular expression matched against the merchant descriptor (ISO 8583 DE43).
21
+ */
22
+ descriptorPattern?: string | undefined;
23
+ /**
24
+ * An optional label for this entry.
25
+ */
26
+ name?: string | undefined;
27
+ };
28
+
29
+ /** @internal */
30
+ export const MerchantEntry$inboundSchema: z.ZodType<
31
+ MerchantEntry,
32
+ z.ZodTypeDef,
33
+ unknown
34
+ > = z.object({
35
+ mid: types.optional(types.string()),
36
+ descriptorPattern: types.optional(types.string()),
37
+ name: types.optional(types.string()),
38
+ });
39
+ /** @internal */
40
+ export type MerchantEntry$Outbound = {
41
+ mid?: string | undefined;
42
+ descriptorPattern?: string | undefined;
43
+ name?: string | undefined;
44
+ };
45
+
46
+ /** @internal */
47
+ export const MerchantEntry$outboundSchema: z.ZodType<
48
+ MerchantEntry$Outbound,
49
+ z.ZodTypeDef,
50
+ MerchantEntry
51
+ > = z.object({
52
+ mid: z.string().optional(),
53
+ descriptorPattern: z.string().optional(),
54
+ name: z.string().optional(),
55
+ });
56
+
57
+ export function merchantEntryToJSON(merchantEntry: MerchantEntry): string {
58
+ return JSON.stringify(MerchantEntry$outboundSchema.parse(merchantEntry));
59
+ }
60
+ export function merchantEntryFromJSON(
61
+ jsonString: string,
62
+ ): SafeParseResult<MerchantEntry, SDKValidationError> {
63
+ return safeParse(
64
+ jsonString,
65
+ (x) => MerchantEntry$inboundSchema.parse(JSON.parse(x)),
66
+ `Failed to parse 'MerchantEntry' from JSON`,
67
+ );
68
+ }
@@ -0,0 +1,56 @@
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
+
11
+ export type MerchantEntryError = {
12
+ mid?: string | undefined;
13
+ descriptorPattern?: string | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export const MerchantEntryError$inboundSchema: z.ZodType<
18
+ MerchantEntryError,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ mid: types.optional(types.string()),
23
+ descriptorPattern: types.optional(types.string()),
24
+ });
25
+ /** @internal */
26
+ export type MerchantEntryError$Outbound = {
27
+ mid?: string | undefined;
28
+ descriptorPattern?: string | undefined;
29
+ };
30
+
31
+ /** @internal */
32
+ export const MerchantEntryError$outboundSchema: z.ZodType<
33
+ MerchantEntryError$Outbound,
34
+ z.ZodTypeDef,
35
+ MerchantEntryError
36
+ > = z.object({
37
+ mid: z.string().optional(),
38
+ descriptorPattern: z.string().optional(),
39
+ });
40
+
41
+ export function merchantEntryErrorToJSON(
42
+ merchantEntryError: MerchantEntryError,
43
+ ): string {
44
+ return JSON.stringify(
45
+ MerchantEntryError$outboundSchema.parse(merchantEntryError),
46
+ );
47
+ }
48
+ export function merchantEntryErrorFromJSON(
49
+ jsonString: string,
50
+ ): SafeParseResult<MerchantEntryError, SDKValidationError> {
51
+ return safeParse(
52
+ jsonString,
53
+ (x) => MerchantEntryError$inboundSchema.parse(JSON.parse(x)),
54
+ `Failed to parse 'MerchantEntryError' from JSON`,
55
+ );
56
+ }
@@ -0,0 +1,75 @@
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ IssuingControlsRestrictionMode,
11
+ IssuingControlsRestrictionMode$inboundSchema,
12
+ IssuingControlsRestrictionMode$outboundSchema,
13
+ } from "./issuingcontrolsrestrictionmode.js";
14
+ import {
15
+ MerchantEntry,
16
+ MerchantEntry$inboundSchema,
17
+ MerchantEntry$Outbound,
18
+ MerchantEntry$outboundSchema,
19
+ } from "./merchantentry.js";
20
+
21
+ /**
22
+ * Restricts card usage to specific merchants, independent of merchant category.
23
+ */
24
+ export type MerchantRestrictions = {
25
+ /**
26
+ * Whether the listed merchants are the only ones allowed, or the ones to block.
27
+ */
28
+ mode: IssuingControlsRestrictionMode;
29
+ /**
30
+ * The merchants to allow or block.
31
+ */
32
+ merchants: Array<MerchantEntry>;
33
+ };
34
+
35
+ /** @internal */
36
+ export const MerchantRestrictions$inboundSchema: z.ZodType<
37
+ MerchantRestrictions,
38
+ z.ZodTypeDef,
39
+ unknown
40
+ > = z.object({
41
+ mode: IssuingControlsRestrictionMode$inboundSchema,
42
+ merchants: z.array(MerchantEntry$inboundSchema),
43
+ });
44
+ /** @internal */
45
+ export type MerchantRestrictions$Outbound = {
46
+ mode: string;
47
+ merchants: Array<MerchantEntry$Outbound>;
48
+ };
49
+
50
+ /** @internal */
51
+ export const MerchantRestrictions$outboundSchema: z.ZodType<
52
+ MerchantRestrictions$Outbound,
53
+ z.ZodTypeDef,
54
+ MerchantRestrictions
55
+ > = z.object({
56
+ mode: IssuingControlsRestrictionMode$outboundSchema,
57
+ merchants: z.array(MerchantEntry$outboundSchema),
58
+ });
59
+
60
+ export function merchantRestrictionsToJSON(
61
+ merchantRestrictions: MerchantRestrictions,
62
+ ): string {
63
+ return JSON.stringify(
64
+ MerchantRestrictions$outboundSchema.parse(merchantRestrictions),
65
+ );
66
+ }
67
+ export function merchantRestrictionsFromJSON(
68
+ jsonString: string,
69
+ ): SafeParseResult<MerchantRestrictions, SDKValidationError> {
70
+ return safeParse(
71
+ jsonString,
72
+ (x) => MerchantRestrictions$inboundSchema.parse(JSON.parse(x)),
73
+ `Failed to parse 'MerchantRestrictions' from JSON`,
74
+ );
75
+ }
@@ -0,0 +1,62 @@
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
+ MerchantEntryError,
12
+ MerchantEntryError$inboundSchema,
13
+ MerchantEntryError$Outbound,
14
+ MerchantEntryError$outboundSchema,
15
+ } from "./merchantentryerror.js";
16
+
17
+ export type MerchantRestrictionsError = {
18
+ mode?: string | undefined;
19
+ merchants?: { [k: string]: MerchantEntryError } | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const MerchantRestrictionsError$inboundSchema: z.ZodType<
24
+ MerchantRestrictionsError,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ mode: types.optional(types.string()),
29
+ merchants: types.optional(z.record(MerchantEntryError$inboundSchema)),
30
+ });
31
+ /** @internal */
32
+ export type MerchantRestrictionsError$Outbound = {
33
+ mode?: string | undefined;
34
+ merchants?: { [k: string]: MerchantEntryError$Outbound } | undefined;
35
+ };
36
+
37
+ /** @internal */
38
+ export const MerchantRestrictionsError$outboundSchema: z.ZodType<
39
+ MerchantRestrictionsError$Outbound,
40
+ z.ZodTypeDef,
41
+ MerchantRestrictionsError
42
+ > = z.object({
43
+ mode: z.string().optional(),
44
+ merchants: z.record(MerchantEntryError$outboundSchema).optional(),
45
+ });
46
+
47
+ export function merchantRestrictionsErrorToJSON(
48
+ merchantRestrictionsError: MerchantRestrictionsError,
49
+ ): string {
50
+ return JSON.stringify(
51
+ MerchantRestrictionsError$outboundSchema.parse(merchantRestrictionsError),
52
+ );
53
+ }
54
+ export function merchantRestrictionsErrorFromJSON(
55
+ jsonString: string,
56
+ ): SafeParseResult<MerchantRestrictionsError, SDKValidationError> {
57
+ return safeParse(
58
+ jsonString,
59
+ (x) => MerchantRestrictionsError$inboundSchema.parse(JSON.parse(x)),
60
+ `Failed to parse 'MerchantRestrictionsError' from JSON`,
61
+ );
62
+ }
@@ -12,6 +12,11 @@ import {
12
12
  DisbursementPaymentMethodType$inboundSchema,
13
13
  DisbursementPaymentMethodType$outboundSchema,
14
14
  } from "./disbursementpaymentmethodtype.js";
15
+ import {
16
+ FeePaidBy,
17
+ FeePaidBy$inboundSchema,
18
+ FeePaidBy$outboundSchema,
19
+ } from "./feepaidby.js";
15
20
  import {
16
21
  PayoutRecipient,
17
22
  PayoutRecipient$inboundSchema,
@@ -52,6 +57,14 @@ export type PaymentLinkPayoutDetails = {
52
57
  * (`push-to-apple-pay`, `push-to-google-pay`) are always delivered instantly regardless of these options.
53
58
  */
54
59
  pushOptions?: PushOptions | undefined;
60
+ /**
61
+ * Indicates which party bears the fee, keyed by disbursement payment method (`DisbursementPaymentMethodType`).
62
+ *
63
+ * @remarks
64
+ *
65
+ * Sparse — include only the methods you want to attribute. Any method left unset defaults to `source`.
66
+ */
67
+ feePaidBy?: { [k: string]: FeePaidBy } | undefined;
55
68
  };
56
69
 
57
70
  /** @internal */
@@ -64,6 +77,7 @@ export const PaymentLinkPayoutDetails$inboundSchema: z.ZodType<
64
77
  recipient: PayoutRecipient$inboundSchema,
65
78
  metadata: types.optional(z.record(types.string())),
66
79
  pushOptions: types.optional(PushOptions$inboundSchema),
80
+ feePaidBy: types.optional(z.record(FeePaidBy$inboundSchema)),
67
81
  });
68
82
  /** @internal */
69
83
  export type PaymentLinkPayoutDetails$Outbound = {
@@ -71,6 +85,7 @@ export type PaymentLinkPayoutDetails$Outbound = {
71
85
  recipient: PayoutRecipient$Outbound;
72
86
  metadata?: { [k: string]: string } | undefined;
73
87
  pushOptions?: PushOptions$Outbound | undefined;
88
+ feePaidBy?: { [k: string]: string } | undefined;
74
89
  };
75
90
 
76
91
  /** @internal */
@@ -83,6 +98,7 @@ export const PaymentLinkPayoutDetails$outboundSchema: z.ZodType<
83
98
  recipient: PayoutRecipient$outboundSchema,
84
99
  metadata: z.record(z.string()).optional(),
85
100
  pushOptions: PushOptions$outboundSchema.optional(),
101
+ feePaidBy: z.record(FeePaidBy$outboundSchema).optional(),
86
102
  });
87
103
 
88
104
  export function paymentLinkPayoutDetailsToJSON(
@@ -12,6 +12,11 @@ import {
12
12
  DisbursementPaymentMethodType$inboundSchema,
13
13
  DisbursementPaymentMethodType$outboundSchema,
14
14
  } from "./disbursementpaymentmethodtype.js";
15
+ import {
16
+ FeePaidBy,
17
+ FeePaidBy$inboundSchema,
18
+ FeePaidBy$outboundSchema,
19
+ } from "./feepaidby.js";
15
20
  import {
16
21
  PayoutRecipient,
17
22
  PayoutRecipient$inboundSchema,
@@ -52,6 +57,14 @@ export type PaymentLinkPayoutDetailsUpdate = {
52
57
  * (`push-to-apple-pay`, `push-to-google-pay`) are always delivered instantly regardless of these options.
53
58
  */
54
59
  pushOptions?: PushOptionsUpdate | undefined;
60
+ /**
61
+ * Indicates which party bears the fee, keyed by disbursement payment method (`DisbursementPaymentMethodType`).
62
+ *
63
+ * @remarks
64
+ *
65
+ * Sparse — include only the methods you want to attribute. Any method left unset defaults to `source`.
66
+ */
67
+ feePaidBy?: { [k: string]: FeePaidBy } | undefined;
55
68
  };
56
69
 
57
70
  /** @internal */
@@ -66,6 +79,7 @@ export const PaymentLinkPayoutDetailsUpdate$inboundSchema: z.ZodType<
66
79
  recipient: types.optional(PayoutRecipient$inboundSchema),
67
80
  metadata: types.optional(z.record(types.string())),
68
81
  pushOptions: types.optional(PushOptionsUpdate$inboundSchema),
82
+ feePaidBy: types.optional(z.record(FeePaidBy$inboundSchema)),
69
83
  });
70
84
  /** @internal */
71
85
  export type PaymentLinkPayoutDetailsUpdate$Outbound = {
@@ -73,6 +87,7 @@ export type PaymentLinkPayoutDetailsUpdate$Outbound = {
73
87
  recipient?: PayoutRecipient$Outbound | undefined;
74
88
  metadata?: { [k: string]: string } | undefined;
75
89
  pushOptions?: PushOptionsUpdate$Outbound | undefined;
90
+ feePaidBy?: { [k: string]: string } | undefined;
76
91
  };
77
92
 
78
93
  /** @internal */
@@ -86,6 +101,7 @@ export const PaymentLinkPayoutDetailsUpdate$outboundSchema: z.ZodType<
86
101
  recipient: PayoutRecipient$outboundSchema.optional(),
87
102
  metadata: z.record(z.string()).optional(),
88
103
  pushOptions: PushOptionsUpdate$outboundSchema.optional(),
104
+ feePaidBy: z.record(FeePaidBy$outboundSchema).optional(),
89
105
  });
90
106
 
91
107
  export function paymentLinkPayoutDetailsUpdateToJSON(
@@ -25,6 +25,7 @@ export type PayoutDetailsError = {
25
25
  recipient?: PayoutRecipientError | undefined;
26
26
  metadata?: string | undefined;
27
27
  pushOptions?: PushOptionsError | undefined;
28
+ feePaidBy?: string | undefined;
28
29
  };
29
30
 
30
31
  /** @internal */
@@ -37,6 +38,7 @@ export const PayoutDetailsError$inboundSchema: z.ZodType<
37
38
  recipient: types.optional(PayoutRecipientError$inboundSchema),
38
39
  metadata: types.optional(types.string()),
39
40
  pushOptions: types.optional(PushOptionsError$inboundSchema),
41
+ feePaidBy: types.optional(types.string()),
40
42
  });
41
43
  /** @internal */
42
44
  export type PayoutDetailsError$Outbound = {
@@ -44,6 +46,7 @@ export type PayoutDetailsError$Outbound = {
44
46
  recipient?: PayoutRecipientError$Outbound | undefined;
45
47
  metadata?: string | undefined;
46
48
  pushOptions?: PushOptionsError$Outbound | undefined;
49
+ feePaidBy?: string | undefined;
47
50
  };
48
51
 
49
52
  /** @internal */
@@ -56,6 +59,7 @@ export const PayoutDetailsError$outboundSchema: z.ZodType<
56
59
  recipient: PayoutRecipientError$outboundSchema.optional(),
57
60
  metadata: z.string().optional(),
58
61
  pushOptions: PushOptionsError$outboundSchema.optional(),
62
+ feePaidBy: z.string().optional(),
59
63
  });
60
64
 
61
65
  export function payoutDetailsErrorToJSON(
@@ -13,6 +13,12 @@ import {
13
13
  AmountDecimal$Outbound,
14
14
  AmountDecimal$outboundSchema,
15
15
  } from "./amountdecimal.js";
16
+ import {
17
+ ProductCategory,
18
+ ProductCategory$inboundSchema,
19
+ ProductCategory$Outbound,
20
+ ProductCategory$outboundSchema,
21
+ } from "./productcategory.js";
16
22
  import {
17
23
  ProductImageMetadata,
18
24
  ProductImageMetadata$inboundSchema,
@@ -57,6 +63,10 @@ export type Product = {
57
63
  * Optional images associated with the product.
58
64
  */
59
65
  images?: Array<ProductImageMetadata> | undefined;
66
+ /**
67
+ * The product taxonomy category associated with the product, if any.
68
+ */
69
+ category?: ProductCategory | undefined;
60
70
  /**
61
71
  * The date and time when the product was added.
62
72
  */
@@ -80,6 +90,7 @@ export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
80
90
  basePrice: AmountDecimal$inboundSchema,
81
91
  optionGroups: types.optional(z.array(ProductOptionGroup$inboundSchema)),
82
92
  images: types.optional(z.array(ProductImageMetadata$inboundSchema)),
93
+ category: types.optional(ProductCategory$inboundSchema),
83
94
  createdOn: types.date(),
84
95
  updatedOn: types.date(),
85
96
  disabledOn: types.optional(types.date()),
@@ -92,6 +103,7 @@ export type Product$Outbound = {
92
103
  basePrice: AmountDecimal$Outbound;
93
104
  optionGroups?: Array<ProductOptionGroup$Outbound> | undefined;
94
105
  images?: Array<ProductImageMetadata$Outbound> | undefined;
106
+ category?: ProductCategory$Outbound | undefined;
95
107
  createdOn: string;
96
108
  updatedOn: string;
97
109
  disabledOn?: string | undefined;
@@ -109,6 +121,7 @@ export const Product$outboundSchema: z.ZodType<
109
121
  basePrice: AmountDecimal$outboundSchema,
110
122
  optionGroups: z.array(ProductOptionGroup$outboundSchema).optional(),
111
123
  images: z.array(ProductImageMetadata$outboundSchema).optional(),
124
+ category: ProductCategory$outboundSchema.optional(),
112
125
  createdOn: z.date().transform(v => v.toISOString()),
113
126
  updatedOn: z.date().transform(v => v.toISOString()),
114
127
  disabledOn: z.date().transform(v => v.toISOString()).optional(),