@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,60 @@
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
+ ProductCategory,
11
+ ProductCategory$inboundSchema,
12
+ ProductCategory$Outbound,
13
+ ProductCategory$outboundSchema,
14
+ } from "./productcategory.js";
15
+
16
+ /**
17
+ * A list of product categories from the product taxonomy.
18
+ */
19
+ export type ProductCategories = {
20
+ categories: Array<ProductCategory>;
21
+ };
22
+
23
+ /** @internal */
24
+ export const ProductCategories$inboundSchema: z.ZodType<
25
+ ProductCategories,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ categories: z.array(ProductCategory$inboundSchema),
30
+ });
31
+ /** @internal */
32
+ export type ProductCategories$Outbound = {
33
+ categories: Array<ProductCategory$Outbound>;
34
+ };
35
+
36
+ /** @internal */
37
+ export const ProductCategories$outboundSchema: z.ZodType<
38
+ ProductCategories$Outbound,
39
+ z.ZodTypeDef,
40
+ ProductCategories
41
+ > = z.object({
42
+ categories: z.array(ProductCategory$outboundSchema),
43
+ });
44
+
45
+ export function productCategoriesToJSON(
46
+ productCategories: ProductCategories,
47
+ ): string {
48
+ return JSON.stringify(
49
+ ProductCategories$outboundSchema.parse(productCategories),
50
+ );
51
+ }
52
+ export function productCategoriesFromJSON(
53
+ jsonString: string,
54
+ ): SafeParseResult<ProductCategories, SDKValidationError> {
55
+ return safeParse(
56
+ jsonString,
57
+ (x) => ProductCategories$inboundSchema.parse(JSON.parse(x)),
58
+ `Failed to parse 'ProductCategories' from JSON`,
59
+ );
60
+ }
@@ -0,0 +1,84 @@
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
+ * A product category from the product taxonomy.
13
+ */
14
+ export type ProductCategory = {
15
+ /**
16
+ * The unique identifier for the category.
17
+ */
18
+ categoryID: string;
19
+ /**
20
+ * The short display name of the category.
21
+ */
22
+ name: string;
23
+ /**
24
+ * The full taxonomy path name of the category.
25
+ */
26
+ fullName: string;
27
+ /**
28
+ * The depth of the category in the taxonomy tree (1 = top-level).
29
+ */
30
+ level: number;
31
+ /**
32
+ * The identifier of the parent category, if any. Absent for top-level categories.
33
+ */
34
+ parentID?: string | undefined;
35
+ };
36
+
37
+ /** @internal */
38
+ export const ProductCategory$inboundSchema: z.ZodType<
39
+ ProductCategory,
40
+ z.ZodTypeDef,
41
+ unknown
42
+ > = z.object({
43
+ categoryID: types.string(),
44
+ name: types.string(),
45
+ fullName: types.string(),
46
+ level: types.number(),
47
+ parentID: types.optional(types.string()),
48
+ });
49
+ /** @internal */
50
+ export type ProductCategory$Outbound = {
51
+ categoryID: string;
52
+ name: string;
53
+ fullName: string;
54
+ level: number;
55
+ parentID?: string | undefined;
56
+ };
57
+
58
+ /** @internal */
59
+ export const ProductCategory$outboundSchema: z.ZodType<
60
+ ProductCategory$Outbound,
61
+ z.ZodTypeDef,
62
+ ProductCategory
63
+ > = z.object({
64
+ categoryID: z.string(),
65
+ name: z.string(),
66
+ fullName: z.string(),
67
+ level: z.number().int(),
68
+ parentID: z.string().optional(),
69
+ });
70
+
71
+ export function productCategoryToJSON(
72
+ productCategory: ProductCategory,
73
+ ): string {
74
+ return JSON.stringify(ProductCategory$outboundSchema.parse(productCategory));
75
+ }
76
+ export function productCategoryFromJSON(
77
+ jsonString: string,
78
+ ): SafeParseResult<ProductCategory, SDKValidationError> {
79
+ return safeParse(
80
+ jsonString,
81
+ (x) => ProductCategory$inboundSchema.parse(JSON.parse(x)),
82
+ `Failed to parse 'ProductCategory' from JSON`,
83
+ );
84
+ }
@@ -53,6 +53,10 @@ export type ProductRequest = {
53
53
  * Optional configuration options for a product, such as size or color.
54
54
  */
55
55
  optionGroups?: Array<CreateProductOptionGroup> | undefined;
56
+ /**
57
+ * The ID of a product taxonomy category to associate with the product.
58
+ */
59
+ categoryID?: string | undefined;
56
60
  };
57
61
 
58
62
  /** @internal */
@@ -66,6 +70,7 @@ export const ProductRequest$inboundSchema: z.ZodType<
66
70
  basePrice: AmountDecimal$inboundSchema,
67
71
  images: types.optional(z.array(AssignProductImage$inboundSchema)),
68
72
  optionGroups: types.optional(z.array(CreateProductOptionGroup$inboundSchema)),
73
+ categoryID: types.optional(types.string()),
69
74
  });
70
75
  /** @internal */
71
76
  export type ProductRequest$Outbound = {
@@ -74,6 +79,7 @@ export type ProductRequest$Outbound = {
74
79
  basePrice: AmountDecimal$Outbound;
75
80
  images?: Array<AssignProductImage$Outbound> | undefined;
76
81
  optionGroups?: Array<CreateProductOptionGroup$Outbound> | undefined;
82
+ categoryID?: string | undefined;
77
83
  };
78
84
 
79
85
  /** @internal */
@@ -87,6 +93,7 @@ export const ProductRequest$outboundSchema: z.ZodType<
87
93
  basePrice: AmountDecimal$outboundSchema,
88
94
  images: z.array(AssignProductImage$outboundSchema).optional(),
89
95
  optionGroups: z.array(CreateProductOptionGroup$outboundSchema).optional(),
96
+ categoryID: z.string().optional(),
90
97
  });
91
98
 
92
99
  export function productRequestToJSON(productRequest: ProductRequest): string {
@@ -0,0 +1,73 @@
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
+ IssuingScheduleDay,
12
+ IssuingScheduleDay$inboundSchema,
13
+ IssuingScheduleDay$outboundSchema,
14
+ } from "./issuingscheduleday.js";
15
+
16
+ /**
17
+ * A window of time during which the card may authorize.
18
+ */
19
+ export type ScheduleWindow = {
20
+ /**
21
+ * The days of the week this window applies to.
22
+ */
23
+ days: Array<IssuingScheduleDay>;
24
+ /**
25
+ * Inclusive window start time in 24-hour `HH:MM` format.
26
+ */
27
+ startTime: string;
28
+ /**
29
+ * Exclusive window end time in 24-hour `HH:MM` format. If earlier than `startTime`, the window wraps past midnight.
30
+ */
31
+ endTime: string;
32
+ };
33
+
34
+ /** @internal */
35
+ export const ScheduleWindow$inboundSchema: z.ZodType<
36
+ ScheduleWindow,
37
+ z.ZodTypeDef,
38
+ unknown
39
+ > = z.object({
40
+ days: z.array(IssuingScheduleDay$inboundSchema),
41
+ startTime: types.string(),
42
+ endTime: types.string(),
43
+ });
44
+ /** @internal */
45
+ export type ScheduleWindow$Outbound = {
46
+ days: Array<string>;
47
+ startTime: string;
48
+ endTime: string;
49
+ };
50
+
51
+ /** @internal */
52
+ export const ScheduleWindow$outboundSchema: z.ZodType<
53
+ ScheduleWindow$Outbound,
54
+ z.ZodTypeDef,
55
+ ScheduleWindow
56
+ > = z.object({
57
+ days: z.array(IssuingScheduleDay$outboundSchema),
58
+ startTime: z.string(),
59
+ endTime: z.string(),
60
+ });
61
+
62
+ export function scheduleWindowToJSON(scheduleWindow: ScheduleWindow): string {
63
+ return JSON.stringify(ScheduleWindow$outboundSchema.parse(scheduleWindow));
64
+ }
65
+ export function scheduleWindowFromJSON(
66
+ jsonString: string,
67
+ ): SafeParseResult<ScheduleWindow, SDKValidationError> {
68
+ return safeParse(
69
+ jsonString,
70
+ (x) => ScheduleWindow$inboundSchema.parse(JSON.parse(x)),
71
+ `Failed to parse 'ScheduleWindow' from JSON`,
72
+ );
73
+ }
@@ -0,0 +1,60 @@
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 ScheduleWindowError = {
12
+ days?: string | undefined;
13
+ startTime?: string | undefined;
14
+ endTime?: string | undefined;
15
+ };
16
+
17
+ /** @internal */
18
+ export const ScheduleWindowError$inboundSchema: z.ZodType<
19
+ ScheduleWindowError,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ days: types.optional(types.string()),
24
+ startTime: types.optional(types.string()),
25
+ endTime: types.optional(types.string()),
26
+ });
27
+ /** @internal */
28
+ export type ScheduleWindowError$Outbound = {
29
+ days?: string | undefined;
30
+ startTime?: string | undefined;
31
+ endTime?: string | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const ScheduleWindowError$outboundSchema: z.ZodType<
36
+ ScheduleWindowError$Outbound,
37
+ z.ZodTypeDef,
38
+ ScheduleWindowError
39
+ > = z.object({
40
+ days: z.string().optional(),
41
+ startTime: z.string().optional(),
42
+ endTime: z.string().optional(),
43
+ });
44
+
45
+ export function scheduleWindowErrorToJSON(
46
+ scheduleWindowError: ScheduleWindowError,
47
+ ): string {
48
+ return JSON.stringify(
49
+ ScheduleWindowError$outboundSchema.parse(scheduleWindowError),
50
+ );
51
+ }
52
+ export function scheduleWindowErrorFromJSON(
53
+ jsonString: string,
54
+ ): SafeParseResult<ScheduleWindowError, SDKValidationError> {
55
+ return safeParse(
56
+ jsonString,
57
+ (x) => ScheduleWindowError$inboundSchema.parse(JSON.parse(x)),
58
+ `Failed to parse 'ScheduleWindowError' from JSON`,
59
+ );
60
+ }
@@ -0,0 +1,63 @@
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
+ FeePaidBy,
12
+ FeePaidBy$inboundSchema,
13
+ FeePaidBy$outboundSchema,
14
+ } from "./feepaidby.js";
15
+
16
+ /**
17
+ * Indicates which party bears fees for a transfer, keyed by fee type.
18
+ */
19
+ export type TransferFeePaidBy = {
20
+ /**
21
+ * For payouts, indicates which party bears the fee. Defaults to `source`.
22
+ */
23
+ payout?: FeePaidBy | undefined;
24
+ };
25
+
26
+ /** @internal */
27
+ export const TransferFeePaidBy$inboundSchema: z.ZodType<
28
+ TransferFeePaidBy,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ payout: types.optional(FeePaidBy$inboundSchema),
33
+ });
34
+ /** @internal */
35
+ export type TransferFeePaidBy$Outbound = {
36
+ payout?: string | undefined;
37
+ };
38
+
39
+ /** @internal */
40
+ export const TransferFeePaidBy$outboundSchema: z.ZodType<
41
+ TransferFeePaidBy$Outbound,
42
+ z.ZodTypeDef,
43
+ TransferFeePaidBy
44
+ > = z.object({
45
+ payout: FeePaidBy$outboundSchema.optional(),
46
+ });
47
+
48
+ export function transferFeePaidByToJSON(
49
+ transferFeePaidBy: TransferFeePaidBy,
50
+ ): string {
51
+ return JSON.stringify(
52
+ TransferFeePaidBy$outboundSchema.parse(transferFeePaidBy),
53
+ );
54
+ }
55
+ export function transferFeePaidByFromJSON(
56
+ jsonString: string,
57
+ ): SafeParseResult<TransferFeePaidBy, SDKValidationError> {
58
+ return safeParse(
59
+ jsonString,
60
+ (x) => TransferFeePaidBy$inboundSchema.parse(JSON.parse(x)),
61
+ `Failed to parse 'TransferFeePaidBy' from JSON`,
62
+ );
63
+ }
@@ -12,6 +12,12 @@ import {
12
12
  UpdateIssuedCardState$inboundSchema,
13
13
  UpdateIssuedCardState$outboundSchema,
14
14
  } from "./updateissuedcardstate.js";
15
+ import {
16
+ UpdateIssuingControls,
17
+ UpdateIssuingControls$inboundSchema,
18
+ UpdateIssuingControls$Outbound,
19
+ UpdateIssuingControls$outboundSchema,
20
+ } from "./updateissuingcontrols.js";
15
21
 
16
22
  export type BillingAddress = {
17
23
  addressLine1?: string | undefined;
@@ -33,6 +39,10 @@ export type UpdateIssuedCard = {
33
39
  nickname?: string | null | undefined;
34
40
  metadata?: { [k: string]: string } | null | undefined;
35
41
  billingAddress?: BillingAddress | null | undefined;
42
+ /**
43
+ * Mutable spend controls for the card.
44
+ */
45
+ controls?: UpdateIssuingControls | undefined;
36
46
  };
37
47
 
38
48
  /** @internal */
@@ -96,6 +106,7 @@ export const UpdateIssuedCard$inboundSchema: z.ZodType<
96
106
  metadata: z.nullable(z.record(types.string())).optional(),
97
107
  billingAddress: z.nullable(z.lazy(() => BillingAddress$inboundSchema))
98
108
  .optional(),
109
+ controls: types.optional(UpdateIssuingControls$inboundSchema),
99
110
  });
100
111
  /** @internal */
101
112
  export type UpdateIssuedCard$Outbound = {
@@ -103,6 +114,7 @@ export type UpdateIssuedCard$Outbound = {
103
114
  nickname?: string | null | undefined;
104
115
  metadata?: { [k: string]: string } | null | undefined;
105
116
  billingAddress?: BillingAddress$Outbound | null | undefined;
117
+ controls?: UpdateIssuingControls$Outbound | undefined;
106
118
  };
107
119
 
108
120
  /** @internal */
@@ -116,6 +128,7 @@ export const UpdateIssuedCard$outboundSchema: z.ZodType<
116
128
  metadata: z.nullable(z.record(z.string())).optional(),
117
129
  billingAddress: z.nullable(z.lazy(() => BillingAddress$outboundSchema))
118
130
  .optional(),
131
+ controls: UpdateIssuingControls$outboundSchema.optional(),
119
132
  });
120
133
 
121
134
  export function updateIssuedCardToJSON(