@moovio/sdk 26.7.0-dev.5 → 26.7.0

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 (182) hide show
  1. package/README.md +121 -59
  2. package/bin/mcp-server.js +520 -187
  3. package/bin/mcp-server.js.map +38 -28
  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.d.ts.map +1 -1
  25. package/lib/config.js +3 -3
  26. package/lib/config.js.map +1 -1
  27. package/lib/http.d.ts +1 -1
  28. package/lib/http.d.ts.map +1 -1
  29. package/lib/http.js +1 -1
  30. package/lib/http.js.map +1 -1
  31. package/lib/security.d.ts +5 -4
  32. package/lib/security.d.ts.map +1 -1
  33. package/lib/security.js +6 -7
  34. package/lib/security.js.map +1 -1
  35. package/mcp-server/mcp-server.js +1 -1
  36. package/mcp-server/mcp-server.js.map +1 -1
  37. package/mcp-server/server.d.ts.map +1 -1
  38. package/mcp-server/server.js +3 -1
  39. package/mcp-server/server.js.map +1 -1
  40. package/mcp-server/tools/productsListCategories.d.ts +3 -0
  41. package/mcp-server/tools/productsListCategories.d.ts.map +1 -0
  42. package/mcp-server/tools/productsListCategories.js +24 -0
  43. package/mcp-server/tools/productsListCategories.js.map +1 -0
  44. package/models/components/avataruploadrequest.d.ts +35 -0
  45. package/models/components/avataruploadrequest.d.ts.map +1 -0
  46. package/models/components/avataruploadrequest.js +88 -0
  47. package/models/components/avataruploadrequest.js.map +1 -0
  48. package/models/components/capabilityid.d.ts +1 -0
  49. package/models/components/capabilityid.d.ts.map +1 -1
  50. package/models/components/capabilityid.js +1 -0
  51. package/models/components/capabilityid.js.map +1 -1
  52. package/models/components/cardbrandfees.d.ts +5 -0
  53. package/models/components/cardbrandfees.d.ts.map +1 -1
  54. package/models/components/cardbrandfees.js +2 -0
  55. package/models/components/cardbrandfees.js.map +1 -1
  56. package/models/components/createtransfer.d.ts +6 -0
  57. package/models/components/createtransfer.d.ts.map +1 -1
  58. package/models/components/createtransfer.js +3 -0
  59. package/models/components/createtransfer.js.map +1 -1
  60. package/models/components/feepaidby.d.ts +18 -0
  61. package/models/components/feepaidby.d.ts.map +1 -0
  62. package/models/components/feepaidby.js +52 -0
  63. package/models/components/feepaidby.js.map +1 -0
  64. package/models/components/filedetails.d.ts +1 -1
  65. package/models/components/filepurpose.d.ts +2 -2
  66. package/models/components/filepurpose.js +1 -1
  67. package/models/components/incurredfee.d.ts +6 -0
  68. package/models/components/incurredfee.d.ts.map +1 -1
  69. package/models/components/incurredfee.js +3 -0
  70. package/models/components/incurredfee.js.map +1 -1
  71. package/models/components/index.d.ts +5 -0
  72. package/models/components/index.d.ts.map +1 -1
  73. package/models/components/index.js +5 -0
  74. package/models/components/index.js.map +1 -1
  75. package/models/components/issuingintervallimit.d.ts +2 -2
  76. package/models/components/issuingintervallimit.js +1 -1
  77. package/models/components/issuingvelocitylimit.d.ts +1 -1
  78. package/models/components/onboardinginvite.d.ts +1 -1
  79. package/models/components/paymentlinkpayoutdetails.d.ts +14 -0
  80. package/models/components/paymentlinkpayoutdetails.d.ts.map +1 -1
  81. package/models/components/paymentlinkpayoutdetails.js +3 -0
  82. package/models/components/paymentlinkpayoutdetails.js.map +1 -1
  83. package/models/components/paymentlinkpayoutdetailsupdate.d.ts +14 -0
  84. package/models/components/paymentlinkpayoutdetailsupdate.d.ts.map +1 -1
  85. package/models/components/paymentlinkpayoutdetailsupdate.js +3 -0
  86. package/models/components/paymentlinkpayoutdetailsupdate.js.map +1 -1
  87. package/models/components/payoutdetailserror.d.ts +2 -0
  88. package/models/components/payoutdetailserror.d.ts.map +1 -1
  89. package/models/components/payoutdetailserror.js +2 -0
  90. package/models/components/payoutdetailserror.js.map +1 -1
  91. package/models/components/product.d.ts +6 -0
  92. package/models/components/product.d.ts.map +1 -1
  93. package/models/components/product.js +3 -0
  94. package/models/components/product.js.map +1 -1
  95. package/models/components/productcategories.d.ts +21 -0
  96. package/models/components/productcategories.d.ts.map +1 -0
  97. package/models/components/productcategories.js +59 -0
  98. package/models/components/productcategories.js.map +1 -0
  99. package/models/components/productcategory.d.ts +43 -0
  100. package/models/components/productcategory.d.ts.map +1 -0
  101. package/models/components/productcategory.js +67 -0
  102. package/models/components/productcategory.js.map +1 -0
  103. package/models/components/productrequest.d.ts +5 -0
  104. package/models/components/productrequest.d.ts.map +1 -1
  105. package/models/components/productrequest.js +2 -0
  106. package/models/components/productrequest.js.map +1 -1
  107. package/models/components/transferfeepaidby.d.ts +24 -0
  108. package/models/components/transferfeepaidby.d.ts.map +1 -0
  109. package/models/components/transferfeepaidby.js +60 -0
  110. package/models/components/transferfeepaidby.js.map +1 -0
  111. package/models/errors/productrequestvalidationerror.d.ts +3 -0
  112. package/models/errors/productrequestvalidationerror.d.ts.map +1 -1
  113. package/models/errors/productrequestvalidationerror.js +4 -0
  114. package/models/errors/productrequestvalidationerror.js.map +1 -1
  115. package/models/operations/deleteavatar.d.ts +52 -0
  116. package/models/operations/deleteavatar.d.ts.map +1 -0
  117. package/models/operations/deleteavatar.js +102 -0
  118. package/models/operations/deleteavatar.js.map +1 -0
  119. package/models/operations/index.d.ts +3 -0
  120. package/models/operations/index.d.ts.map +1 -1
  121. package/models/operations/index.js +3 -0
  122. package/models/operations/index.js.map +1 -1
  123. package/models/operations/listproductcategories.d.ts +24 -0
  124. package/models/operations/listproductcategories.d.ts.map +1 -0
  125. package/models/operations/listproductcategories.js +72 -0
  126. package/models/operations/listproductcategories.js.map +1 -0
  127. package/models/operations/listproducts.d.ts +9 -0
  128. package/models/operations/listproducts.d.ts.map +1 -1
  129. package/models/operations/listproducts.js +2 -0
  130. package/models/operations/listproducts.js.map +1 -1
  131. package/models/operations/uploadavatar.d.ts +55 -0
  132. package/models/operations/uploadavatar.d.ts.map +1 -0
  133. package/models/operations/uploadavatar.js +113 -0
  134. package/models/operations/uploadavatar.js.map +1 -0
  135. package/package.json +1 -1
  136. package/sdk/avatars.d.ts +24 -0
  137. package/sdk/avatars.d.ts.map +1 -1
  138. package/sdk/avatars.js +30 -0
  139. package/sdk/avatars.js.map +1 -1
  140. package/sdk/products.d.ts +4 -0
  141. package/sdk/products.d.ts.map +1 -1
  142. package/sdk/products.js +7 -0
  143. package/sdk/products.js.map +1 -1
  144. package/src/funcs/avatarsDelete.ts +194 -0
  145. package/src/funcs/avatarsUpload.ts +231 -0
  146. package/src/funcs/productsList.ts +1 -0
  147. package/src/funcs/productsListCategories.ts +149 -0
  148. package/src/hooks/oauth2scopes.ts +8 -0
  149. package/src/lib/config.ts +3 -4
  150. package/src/lib/http.ts +3 -1
  151. package/src/lib/security.ts +10 -5
  152. package/src/mcp-server/mcp-server.ts +1 -1
  153. package/src/mcp-server/server.ts +3 -1
  154. package/src/mcp-server/tools/productsListCategories.ts +29 -0
  155. package/src/models/components/avataruploadrequest.ts +113 -0
  156. package/src/models/components/capabilityid.ts +1 -0
  157. package/src/models/components/cardbrandfees.ts +7 -0
  158. package/src/models/components/createtransfer.ts +13 -0
  159. package/src/models/components/feepaidby.ts +32 -0
  160. package/src/models/components/filedetails.ts +1 -1
  161. package/src/models/components/filepurpose.ts +2 -2
  162. package/src/models/components/incurredfee.ts +12 -0
  163. package/src/models/components/index.ts +5 -0
  164. package/src/models/components/issuingintervallimit.ts +2 -2
  165. package/src/models/components/issuingvelocitylimit.ts +1 -1
  166. package/src/models/components/onboardinginvite.ts +1 -1
  167. package/src/models/components/paymentlinkpayoutdetails.ts +16 -0
  168. package/src/models/components/paymentlinkpayoutdetailsupdate.ts +16 -0
  169. package/src/models/components/payoutdetailserror.ts +4 -0
  170. package/src/models/components/product.ts +13 -0
  171. package/src/models/components/productcategories.ts +60 -0
  172. package/src/models/components/productcategory.ts +84 -0
  173. package/src/models/components/productrequest.ts +7 -0
  174. package/src/models/components/transferfeepaidby.ts +63 -0
  175. package/src/models/errors/productrequestvalidationerror.ts +6 -0
  176. package/src/models/operations/deleteavatar.ts +154 -0
  177. package/src/models/operations/index.ts +3 -0
  178. package/src/models/operations/listproductcategories.ts +69 -0
  179. package/src/models/operations/listproducts.ts +11 -0
  180. package/src/models/operations/uploadavatar.ts +167 -0
  181. package/src/sdk/avatars.ts +50 -0
  182. package/src/sdk/products.ts +13 -0
@@ -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(),
@@ -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,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
+ }
@@ -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
  }));
@@ -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
+ }
@@ -35,6 +35,7 @@ export * from "./createtransferconfig.js";
35
35
  export * from "./createtransferoptions.js";
36
36
  export * from "./createwallet.js";
37
37
  export * from "./createwebhook.js";
38
+ export * from "./deleteavatar.js";
38
39
  export * from "./deletedisputeevidencefile.js";
39
40
  export * from "./deleteimage.js";
40
41
  export * from "./deleteinvoice.js";
@@ -138,6 +139,7 @@ export * from "./listonboardinginvites.js";
138
139
  export * from "./listpartnerpricingagreements.js";
139
140
  export * from "./listpaymentlinks.js";
140
141
  export * from "./listpaymentmethods.js";
142
+ export * from "./listproductcategories.js";
141
143
  export * from "./listproducts.js";
142
144
  export * from "./listreceipts.js";
143
145
  export * from "./listrefunds.js";
@@ -186,6 +188,7 @@ export * from "./updatetransfer.js";
186
188
  export * from "./updatetransferconfig.js";
187
189
  export * from "./updatewallet.js";
188
190
  export * from "./updatewebhook.js";
191
+ export * from "./uploadavatar.js";
189
192
  export * from "./uploaddisputeevidencefile.js";
190
193
  export * from "./uploaddisputeevidencetext.js";
191
194
  export * from "./uploadfile.js";
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type ListProductCategoriesResponse = {
13
+ headers: { [k: string]: Array<string> };
14
+ result: components.ProductCategories;
15
+ };
16
+
17
+ /** @internal */
18
+ export const ListProductCategoriesResponse$inboundSchema: z.ZodType<
19
+ ListProductCategoriesResponse,
20
+ z.ZodTypeDef,
21
+ unknown
22
+ > = z.object({
23
+ Headers: z.record(z.array(z.string())).default({}),
24
+ Result: components.ProductCategories$inboundSchema,
25
+ }).transform((v) => {
26
+ return remap$(v, {
27
+ "Headers": "headers",
28
+ "Result": "result",
29
+ });
30
+ });
31
+ /** @internal */
32
+ export type ListProductCategoriesResponse$Outbound = {
33
+ Headers: { [k: string]: Array<string> };
34
+ Result: components.ProductCategories$Outbound;
35
+ };
36
+
37
+ /** @internal */
38
+ export const ListProductCategoriesResponse$outboundSchema: z.ZodType<
39
+ ListProductCategoriesResponse$Outbound,
40
+ z.ZodTypeDef,
41
+ ListProductCategoriesResponse
42
+ > = z.object({
43
+ headers: z.record(z.array(z.string())),
44
+ result: components.ProductCategories$outboundSchema,
45
+ }).transform((v) => {
46
+ return remap$(v, {
47
+ headers: "Headers",
48
+ result: "Result",
49
+ });
50
+ });
51
+
52
+ export function listProductCategoriesResponseToJSON(
53
+ listProductCategoriesResponse: ListProductCategoriesResponse,
54
+ ): string {
55
+ return JSON.stringify(
56
+ ListProductCategoriesResponse$outboundSchema.parse(
57
+ listProductCategoriesResponse,
58
+ ),
59
+ );
60
+ }
61
+ export function listProductCategoriesResponseFromJSON(
62
+ jsonString: string,
63
+ ): SafeParseResult<ListProductCategoriesResponse, SDKValidationError> {
64
+ return safeParse(
65
+ jsonString,
66
+ (x) => ListProductCategoriesResponse$inboundSchema.parse(JSON.parse(x)),
67
+ `Failed to parse 'ListProductCategoriesResponse' from JSON`,
68
+ );
69
+ }
@@ -16,6 +16,14 @@ export type ListProductsRequest = {
16
16
  * Allows filtering products by title. This supports partial matches and is case-insensitive
17
17
  */
18
18
  title?: string | undefined;
19
+ /**
20
+ * Filter products by category. Accepts a category ID at any level of the taxonomy;
21
+ *
22
+ * @remarks
23
+ * a product matches when the given category is anywhere in its category's breadcrumb
24
+ * (i.e. filtering by a top-level category returns products in any of its descendants).
25
+ */
26
+ category?: string | undefined;
19
27
  skip?: number | undefined;
20
28
  count?: number | undefined;
21
29
  };
@@ -33,6 +41,7 @@ export const ListProductsRequest$inboundSchema: z.ZodType<
33
41
  > = z.object({
34
42
  accountID: types.string(),
35
43
  title: types.optional(types.string()),
44
+ category: types.optional(types.string()),
36
45
  skip: types.optional(types.number()),
37
46
  count: types.optional(types.number()),
38
47
  });
@@ -40,6 +49,7 @@ export const ListProductsRequest$inboundSchema: z.ZodType<
40
49
  export type ListProductsRequest$Outbound = {
41
50
  accountID: string;
42
51
  title?: string | undefined;
52
+ category?: string | undefined;
43
53
  skip?: number | undefined;
44
54
  count?: number | undefined;
45
55
  };
@@ -52,6 +62,7 @@ export const ListProductsRequest$outboundSchema: z.ZodType<
52
62
  > = z.object({
53
63
  accountID: z.string(),
54
64
  title: z.string().optional(),
65
+ category: z.string().optional(),
55
66
  skip: z.number().int().optional(),
56
67
  count: z.number().int().optional(),
57
68
  });