ce-storefront 0.3.9 → 0.3.11

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 (208) hide show
  1. package/docs/sdks/auth/README.md +2 -0
  2. package/docs/sdks/carts/README.md +22 -12
  3. package/docs/sdks/cestorefrontuser/README.md +30 -2
  4. package/docs/sdks/checkout/README.md +4 -0
  5. package/esm/funcs/cartsAddItem.js +1 -1
  6. package/esm/funcs/cartsAddItem.js.map +1 -1
  7. package/esm/lib/config.d.ts +2 -2
  8. package/esm/lib/config.js +2 -2
  9. package/esm/lib/config.js.map +1 -1
  10. package/esm/models/components/anonymoususer.d.ts +14 -14
  11. package/esm/models/components/anonymoususer.d.ts.map +1 -1
  12. package/esm/models/components/anonymoususer.js +14 -14
  13. package/esm/models/components/anonymoususer.js.map +1 -1
  14. package/esm/models/components/associatedoption.d.ts +4 -102
  15. package/esm/models/components/associatedoption.d.ts.map +1 -1
  16. package/esm/models/components/associatedoption.js +4 -82
  17. package/esm/models/components/associatedoption.js.map +1 -1
  18. package/esm/models/components/bundleproduct.d.ts +48 -48
  19. package/esm/models/components/bundleproduct.d.ts.map +1 -1
  20. package/esm/models/components/bundleproduct.js +46 -50
  21. package/esm/models/components/bundleproduct.js.map +1 -1
  22. package/esm/models/components/bundleproductdetail.d.ts +66 -66
  23. package/esm/models/components/bundleproductdetail.d.ts.map +1 -1
  24. package/esm/models/components/bundleproductdetail.js +62 -66
  25. package/esm/models/components/bundleproductdetail.js.map +1 -1
  26. package/esm/models/components/coloroption.d.ts +72 -0
  27. package/esm/models/components/coloroption.d.ts.map +1 -0
  28. package/esm/models/components/coloroption.js +62 -0
  29. package/esm/models/components/coloroption.js.map +1 -0
  30. package/esm/models/components/currency.d.ts +6 -6
  31. package/esm/models/components/currency.d.ts.map +1 -1
  32. package/esm/models/components/currency.js +6 -6
  33. package/esm/models/components/currency.js.map +1 -1
  34. package/esm/models/components/index.d.ts +3 -1
  35. package/esm/models/components/index.d.ts.map +1 -1
  36. package/esm/models/components/index.js +3 -1
  37. package/esm/models/components/index.js.map +1 -1
  38. package/esm/models/components/notificationpreferences.d.ts +6 -6
  39. package/esm/models/components/notificationpreferences.d.ts.map +1 -1
  40. package/esm/models/components/notificationpreferences.js +6 -6
  41. package/esm/models/components/notificationpreferences.js.map +1 -1
  42. package/esm/models/components/pagination.d.ts +8 -8
  43. package/esm/models/components/pagination.d.ts.map +1 -1
  44. package/esm/models/components/pagination.js +8 -8
  45. package/esm/models/components/pagination.js.map +1 -1
  46. package/esm/models/components/productattribute.d.ts +2 -2
  47. package/esm/models/components/productattribute.d.ts.map +1 -1
  48. package/esm/models/components/productattribute.js +2 -2
  49. package/esm/models/components/productattribute.js.map +1 -1
  50. package/esm/models/components/productcategory.d.ts +20 -20
  51. package/esm/models/components/productcategory.d.ts.map +1 -1
  52. package/esm/models/components/productcategory.js +20 -20
  53. package/esm/models/components/productcategory.js.map +1 -1
  54. package/esm/models/components/productdetail.d.ts +2 -14
  55. package/esm/models/components/productdetail.d.ts.map +1 -1
  56. package/esm/models/components/productdetail.js +4 -18
  57. package/esm/models/components/productdetail.js.map +1 -1
  58. package/esm/models/components/productimage.d.ts +14 -14
  59. package/esm/models/components/productimage.d.ts.map +1 -1
  60. package/esm/models/components/productimage.js +14 -14
  61. package/esm/models/components/productimage.js.map +1 -1
  62. package/esm/models/components/productpricing.d.ts +4 -4
  63. package/esm/models/components/productpricing.d.ts.map +1 -1
  64. package/esm/models/components/productpricing.js +4 -4
  65. package/esm/models/components/productpricing.js.map +1 -1
  66. package/esm/models/components/productshipping.d.ts +12 -12
  67. package/esm/models/components/productshipping.d.ts.map +1 -1
  68. package/esm/models/components/productshipping.js +12 -12
  69. package/esm/models/components/productshipping.js.map +1 -1
  70. package/esm/models/components/productvideo.d.ts +16 -16
  71. package/esm/models/components/productvideo.d.ts.map +1 -1
  72. package/esm/models/components/productvideo.js +16 -16
  73. package/esm/models/components/productvideo.js.map +1 -1
  74. package/esm/models/components/seo.d.ts +8 -8
  75. package/esm/models/components/seo.d.ts.map +1 -1
  76. package/esm/models/components/seo.js +8 -8
  77. package/esm/models/components/seo.js.map +1 -1
  78. package/esm/models/components/singleproduct.d.ts +18 -18
  79. package/esm/models/components/singleproduct.d.ts.map +1 -1
  80. package/esm/models/components/singleproduct.js +18 -18
  81. package/esm/models/components/singleproduct.js.map +1 -1
  82. package/esm/models/components/singleproductdetail.d.ts +36 -36
  83. package/esm/models/components/singleproductdetail.d.ts.map +1 -1
  84. package/esm/models/components/singleproductdetail.js +34 -34
  85. package/esm/models/components/singleproductdetail.js.map +1 -1
  86. package/esm/models/components/singleselectoption.d.ts +42 -0
  87. package/esm/models/components/singleselectoption.d.ts.map +1 -0
  88. package/esm/models/components/singleselectoption.js +35 -0
  89. package/esm/models/components/singleselectoption.js.map +1 -0
  90. package/esm/models/components/sku.d.ts +30 -30
  91. package/esm/models/components/sku.d.ts.map +1 -1
  92. package/esm/models/components/sku.js +28 -30
  93. package/esm/models/components/sku.js.map +1 -1
  94. package/esm/models/components/updatecartitem.d.ts +45 -0
  95. package/esm/models/components/updatecartitem.d.ts.map +1 -0
  96. package/esm/models/components/updatecartitem.js +46 -0
  97. package/esm/models/components/updatecartitem.js.map +1 -0
  98. package/esm/models/components/user.d.ts +116 -26
  99. package/esm/models/components/user.d.ts.map +1 -1
  100. package/esm/models/components/user.js +104 -30
  101. package/esm/models/components/user.js.map +1 -1
  102. package/esm/models/components/variant.d.ts +15 -12
  103. package/esm/models/components/variant.d.ts.map +1 -1
  104. package/esm/models/components/variant.js +12 -12
  105. package/esm/models/components/variant.js.map +1 -1
  106. package/esm/models/components/variantdetail.d.ts +41 -38
  107. package/esm/models/components/variantdetail.d.ts.map +1 -1
  108. package/esm/models/components/variantdetail.js +36 -36
  109. package/esm/models/components/variantdetail.js.map +1 -1
  110. package/esm/models/components/variantoption.d.ts +34 -26
  111. package/esm/models/components/variantoption.d.ts.map +1 -1
  112. package/esm/models/components/variantoption.js +32 -45
  113. package/esm/models/components/variantoption.js.map +1 -1
  114. package/esm/models/operations/getcrosssell.d.ts +6 -6
  115. package/esm/models/operations/getcrosssell.d.ts.map +1 -1
  116. package/esm/models/operations/getcrosssell.js +6 -6
  117. package/esm/models/operations/getcrosssell.js.map +1 -1
  118. package/esm/models/operations/getproductscategories.d.ts +4 -4
  119. package/esm/models/operations/getproductscategories.d.ts.map +1 -1
  120. package/esm/models/operations/getproductscategories.js +4 -4
  121. package/esm/models/operations/getproductscategories.js.map +1 -1
  122. package/esm/models/operations/getproductsidreviews.d.ts +4 -4
  123. package/esm/models/operations/getproductsidreviews.d.ts.map +1 -1
  124. package/esm/models/operations/getproductsidreviews.js +4 -4
  125. package/esm/models/operations/getproductsidreviews.js.map +1 -1
  126. package/esm/models/operations/getsimilar.d.ts +6 -6
  127. package/esm/models/operations/getsimilar.d.ts.map +1 -1
  128. package/esm/models/operations/getsimilar.js +6 -6
  129. package/esm/models/operations/getsimilar.js.map +1 -1
  130. package/esm/models/operations/getskus.d.ts +4 -4
  131. package/esm/models/operations/getskus.d.ts.map +1 -1
  132. package/esm/models/operations/getskus.js +4 -4
  133. package/esm/models/operations/getskus.js.map +1 -1
  134. package/esm/models/operations/getupsell.d.ts +6 -6
  135. package/esm/models/operations/getupsell.d.ts.map +1 -1
  136. package/esm/models/operations/getupsell.js +6 -6
  137. package/esm/models/operations/getupsell.js.map +1 -1
  138. package/esm/models/operations/postauthanonymous.d.ts +12 -12
  139. package/esm/models/operations/postauthanonymous.d.ts.map +1 -1
  140. package/esm/models/operations/postauthanonymous.js +12 -12
  141. package/esm/models/operations/postauthanonymous.js.map +1 -1
  142. package/esm/models/operations/postauthgenerateotp.d.ts +2 -2
  143. package/esm/models/operations/postauthgenerateotp.d.ts.map +1 -1
  144. package/esm/models/operations/postauthgenerateotp.js +2 -2
  145. package/esm/models/operations/postauthgenerateotp.js.map +1 -1
  146. package/esm/models/operations/postcartaddress.d.ts +8 -8
  147. package/esm/models/operations/postcartaddress.d.ts.map +1 -1
  148. package/esm/models/operations/postcartaddress.js +8 -12
  149. package/esm/models/operations/postcartaddress.js.map +1 -1
  150. package/esm/models/operations/postcartitemid.d.ts +2 -35
  151. package/esm/models/operations/postcartitemid.d.ts.map +1 -1
  152. package/esm/models/operations/postcartitemid.js +4 -49
  153. package/esm/models/operations/postcartitemid.js.map +1 -1
  154. package/esm/models/operations/postcartsid.d.ts +5 -31
  155. package/esm/models/operations/postcartsid.d.ts.map +1 -1
  156. package/esm/models/operations/postcartsid.js +2 -41
  157. package/esm/models/operations/postcartsid.js.map +1 -1
  158. package/esm/models/operations/postproductsidreviews.d.ts +4 -4
  159. package/esm/models/operations/postproductsidreviews.d.ts.map +1 -1
  160. package/esm/models/operations/postproductsidreviews.js +4 -4
  161. package/esm/models/operations/postproductsidreviews.js.map +1 -1
  162. package/jsr.json +1 -1
  163. package/package.json +1 -1
  164. package/src/funcs/cartsAddItem.ts +1 -1
  165. package/src/lib/config.ts +2 -2
  166. package/src/models/components/anonymoususer.ts +28 -28
  167. package/src/models/components/associatedoption.ts +19 -164
  168. package/src/models/components/bundleproduct.ts +92 -99
  169. package/src/models/components/bundleproductdetail.ts +124 -131
  170. package/src/models/components/coloroption.ts +144 -0
  171. package/src/models/components/currency.ts +12 -12
  172. package/src/models/components/index.ts +3 -1
  173. package/src/models/components/notificationpreferences.ts +12 -12
  174. package/src/models/components/pagination.ts +16 -16
  175. package/src/models/components/productattribute.ts +4 -4
  176. package/src/models/components/productcategory.ts +40 -40
  177. package/src/models/components/productdetail.ts +7 -37
  178. package/src/models/components/productimage.ts +28 -28
  179. package/src/models/components/productpricing.ts +8 -8
  180. package/src/models/components/productshipping.ts +24 -24
  181. package/src/models/components/productvideo.ts +32 -32
  182. package/src/models/components/seo.ts +16 -16
  183. package/src/models/components/singleproduct.ts +36 -36
  184. package/src/models/components/singleproductdetail.ts +68 -68
  185. package/src/models/components/singleselectoption.ts +83 -0
  186. package/src/models/components/sku.ts +56 -61
  187. package/src/models/components/updatecartitem.ts +93 -0
  188. package/src/models/components/user.ts +199 -56
  189. package/src/models/components/variant.ts +27 -24
  190. package/src/models/components/variantdetail.ts +75 -72
  191. package/src/models/components/variantoption.ts +54 -61
  192. package/src/models/operations/getcrosssell.ts +12 -12
  193. package/src/models/operations/getproductscategories.ts +8 -8
  194. package/src/models/operations/getproductsidreviews.ts +8 -8
  195. package/src/models/operations/getsimilar.ts +12 -12
  196. package/src/models/operations/getskus.ts +8 -8
  197. package/src/models/operations/getupsell.ts +12 -12
  198. package/src/models/operations/postauthanonymous.ts +24 -24
  199. package/src/models/operations/postauthgenerateotp.ts +4 -4
  200. package/src/models/operations/postcartaddress.ts +16 -23
  201. package/src/models/operations/postcartitemid.ts +6 -94
  202. package/src/models/operations/postcartsid.ts +7 -72
  203. package/src/models/operations/postproductsidreviews.ts +8 -8
  204. package/esm/models/components/userinput.d.ts +0 -63
  205. package/esm/models/components/userinput.d.ts.map +0 -1
  206. package/esm/models/components/userinput.js +0 -61
  207. package/esm/models/components/userinput.js.map +0 -1
  208. package/src/models/components/userinput.ts +0 -130
@@ -90,13 +90,13 @@ export type BundleProductDetailBundleItemsProductType = ClosedEnum<
90
90
  export type BundleProductDetailSKU = {
91
91
  quantity: number;
92
92
  productId: string;
93
- variantId?: string | null | undefined;
93
+ variantId: string | null;
94
94
  sku: string;
95
- slug?: string | undefined;
95
+ slug: string | null;
96
96
  productName: string;
97
- variantName?: string | null | undefined;
97
+ variantName: string | null;
98
98
  productType: BundleProductDetailBundleItemsProductType;
99
- shortDescription?: string | undefined;
99
+ shortDescription: string | null;
100
100
  active?: boolean | undefined;
101
101
  stockAvailable?: boolean | undefined;
102
102
  /**
@@ -105,16 +105,16 @@ export type BundleProductDetailSKU = {
105
105
  onOffer?: boolean | undefined;
106
106
  onSubscription?: boolean | undefined;
107
107
  onPromotion?: boolean | undefined;
108
- categoryIds?: Array<string> | undefined;
109
- tags?: Array<string> | undefined;
110
- reviewsCount?: number | undefined;
111
- reviewsRatingSum?: number | undefined;
112
- attributes?: Array<ProductAttribute> | undefined;
113
- images?: Array<ProductImage> | undefined;
114
- pricing?: ProductPricing | undefined;
115
- promotion?: ProductPromotion | null | undefined;
116
- subscription?: Array<ProductSubscription> | undefined;
117
- associatedOptions?: { [k: string]: AssociatedOption } | null | undefined;
108
+ categoryIds: Array<string>;
109
+ tags: Array<string> | null;
110
+ reviewsCount: number;
111
+ reviewsRatingSum: number | null;
112
+ attributes: Array<ProductAttribute>;
113
+ images: Array<ProductImage>;
114
+ pricing: ProductPricing;
115
+ promotion: ProductPromotion | null;
116
+ subscription: Array<ProductSubscription>;
117
+ associatedOptions: { [k: string]: AssociatedOption } | null;
118
118
  };
119
119
 
120
120
  export type BundleProductDetail = {
@@ -122,10 +122,10 @@ export type BundleProductDetail = {
122
122
  * The ULID of the product
123
123
  */
124
124
  id: string;
125
- sku?: string | undefined;
125
+ sku: string | null;
126
126
  name: string;
127
- slug: string;
128
- shortDescription?: string | undefined;
127
+ slug: string | null;
128
+ shortDescription: string | null;
129
129
  productType: BundleProductDetailProductType;
130
130
  active?: boolean | undefined;
131
131
  /**
@@ -148,11 +148,11 @@ export type BundleProductDetail = {
148
148
  * Indicates whether the product has variants
149
149
  */
150
150
  hasVariant?: boolean | undefined;
151
- tags?: Array<string> | null | undefined;
152
- categoryIds?: Array<string> | undefined;
153
- reviewsRatingSum?: number | undefined;
154
- reviewsCount?: number | undefined;
155
- attributes?: Array<ProductAttribute> | undefined;
151
+ tags: Array<string> | null;
152
+ categoryIds: Array<string>;
153
+ reviewsRatingSum: number;
154
+ reviewsCount: number;
155
+ attributes: Array<ProductAttribute>;
156
156
  pricing: ProductPricing;
157
157
  /**
158
158
  * this will be used if has_variant is true, to auto set default values.
@@ -161,21 +161,21 @@ export type BundleProductDetail = {
161
161
  promotion: ProductPromotion | null;
162
162
  images: Array<ProductImage>;
163
163
  subscription: Array<ProductSubscription>;
164
- bundleItems?: Array<BundleProductDetailSKU> | undefined;
165
- description?: string | undefined;
166
- hsnCode?: string | undefined;
167
- videos?: Array<ProductVideo> | undefined;
168
- shipping?: ProductShipping | null | undefined;
164
+ bundleItems: Array<BundleProductDetailSKU>;
165
+ description: string | null;
166
+ hsnCode: string | null;
167
+ videos: Array<ProductVideo>;
168
+ shipping: ProductShipping | null;
169
169
  /**
170
170
  * An array of product ULIDs
171
171
  */
172
- upsellingProductIds?: Array<string> | undefined;
172
+ upsellingProductIds: Array<string>;
173
173
  /**
174
174
  * An array of product ULIDs
175
175
  */
176
- crosssellingProductIds?: Array<string> | undefined;
177
- seo?: Seo | undefined;
178
- metadata?: { [k: string]: string } | undefined;
176
+ crosssellingProductIds: Array<string>;
177
+ seo: Seo;
178
+ metadata: { [k: string]: string };
179
179
  };
180
180
 
181
181
  /** @internal */
@@ -230,29 +230,28 @@ export const BundleProductDetailSKU$inboundSchema: z.ZodType<
230
230
  > = z.object({
231
231
  quantity: z.number().int(),
232
232
  product_id: z.string(),
233
- variant_id: z.nullable(z.string()).optional(),
233
+ variant_id: z.nullable(z.string()),
234
234
  sku: z.string(),
235
- slug: z.string().optional(),
235
+ slug: z.nullable(z.string()),
236
236
  product_name: z.string(),
237
- variant_name: z.nullable(z.string()).optional(),
237
+ variant_name: z.nullable(z.string()),
238
238
  product_type: BundleProductDetailBundleItemsProductType$inboundSchema,
239
- short_description: z.string().optional(),
239
+ short_description: z.nullable(z.string()),
240
240
  active: z.boolean().default(true),
241
241
  stock_available: z.boolean().default(true),
242
242
  on_offer: z.boolean().default(false),
243
243
  on_subscription: z.boolean().default(false),
244
244
  on_promotion: z.boolean().default(false),
245
- category_ids: z.array(z.string()).optional(),
246
- tags: z.array(z.string()).optional(),
247
- reviews_count: z.number().int().optional(),
248
- reviews_rating_sum: z.number().optional(),
249
- attributes: z.array(ProductAttribute$inboundSchema).optional(),
250
- images: z.array(ProductImage$inboundSchema).optional(),
251
- pricing: ProductPricing$inboundSchema.optional(),
252
- promotion: z.nullable(ProductPromotion$inboundSchema).optional(),
253
- subscription: z.array(ProductSubscription$inboundSchema).optional(),
254
- associated_options: z.nullable(z.record(AssociatedOption$inboundSchema))
255
- .optional(),
245
+ category_ids: z.array(z.string()),
246
+ tags: z.nullable(z.array(z.string())),
247
+ reviews_count: z.number().int(),
248
+ reviews_rating_sum: z.nullable(z.number()),
249
+ attributes: z.array(ProductAttribute$inboundSchema),
250
+ images: z.array(ProductImage$inboundSchema),
251
+ pricing: ProductPricing$inboundSchema,
252
+ promotion: z.nullable(ProductPromotion$inboundSchema),
253
+ subscription: z.array(ProductSubscription$inboundSchema),
254
+ associated_options: z.nullable(z.record(AssociatedOption$inboundSchema)),
256
255
  }).transform((v) => {
257
256
  return remap$(v, {
258
257
  "product_id": "productId",
@@ -276,31 +275,28 @@ export const BundleProductDetailSKU$inboundSchema: z.ZodType<
276
275
  export type BundleProductDetailSKU$Outbound = {
277
276
  quantity: number;
278
277
  product_id: string;
279
- variant_id?: string | null | undefined;
278
+ variant_id: string | null;
280
279
  sku: string;
281
- slug?: string | undefined;
280
+ slug: string | null;
282
281
  product_name: string;
283
- variant_name?: string | null | undefined;
282
+ variant_name: string | null;
284
283
  product_type: string;
285
- short_description?: string | undefined;
284
+ short_description: string | null;
286
285
  active: boolean;
287
286
  stock_available: boolean;
288
287
  on_offer: boolean;
289
288
  on_subscription: boolean;
290
289
  on_promotion: boolean;
291
- category_ids?: Array<string> | undefined;
292
- tags?: Array<string> | undefined;
293
- reviews_count?: number | undefined;
294
- reviews_rating_sum?: number | undefined;
295
- attributes?: Array<ProductAttribute$Outbound> | undefined;
296
- images?: Array<ProductImage$Outbound> | undefined;
297
- pricing?: ProductPricing$Outbound | undefined;
298
- promotion?: ProductPromotion$Outbound | null | undefined;
299
- subscription?: Array<ProductSubscription$Outbound> | undefined;
300
- associated_options?:
301
- | { [k: string]: AssociatedOption$Outbound }
302
- | null
303
- | undefined;
290
+ category_ids: Array<string>;
291
+ tags: Array<string> | null;
292
+ reviews_count: number;
293
+ reviews_rating_sum: number | null;
294
+ attributes: Array<ProductAttribute$Outbound>;
295
+ images: Array<ProductImage$Outbound>;
296
+ pricing: ProductPricing$Outbound;
297
+ promotion: ProductPromotion$Outbound | null;
298
+ subscription: Array<ProductSubscription$Outbound>;
299
+ associated_options: { [k: string]: AssociatedOption$Outbound } | null;
304
300
  };
305
301
 
306
302
  /** @internal */
@@ -311,29 +307,28 @@ export const BundleProductDetailSKU$outboundSchema: z.ZodType<
311
307
  > = z.object({
312
308
  quantity: z.number().int(),
313
309
  productId: z.string(),
314
- variantId: z.nullable(z.string()).optional(),
310
+ variantId: z.nullable(z.string()),
315
311
  sku: z.string(),
316
- slug: z.string().optional(),
312
+ slug: z.nullable(z.string()),
317
313
  productName: z.string(),
318
- variantName: z.nullable(z.string()).optional(),
314
+ variantName: z.nullable(z.string()),
319
315
  productType: BundleProductDetailBundleItemsProductType$outboundSchema,
320
- shortDescription: z.string().optional(),
316
+ shortDescription: z.nullable(z.string()),
321
317
  active: z.boolean().default(true),
322
318
  stockAvailable: z.boolean().default(true),
323
319
  onOffer: z.boolean().default(false),
324
320
  onSubscription: z.boolean().default(false),
325
321
  onPromotion: z.boolean().default(false),
326
- categoryIds: z.array(z.string()).optional(),
327
- tags: z.array(z.string()).optional(),
328
- reviewsCount: z.number().int().optional(),
329
- reviewsRatingSum: z.number().optional(),
330
- attributes: z.array(ProductAttribute$outboundSchema).optional(),
331
- images: z.array(ProductImage$outboundSchema).optional(),
332
- pricing: ProductPricing$outboundSchema.optional(),
333
- promotion: z.nullable(ProductPromotion$outboundSchema).optional(),
334
- subscription: z.array(ProductSubscription$outboundSchema).optional(),
335
- associatedOptions: z.nullable(z.record(AssociatedOption$outboundSchema))
336
- .optional(),
322
+ categoryIds: z.array(z.string()),
323
+ tags: z.nullable(z.array(z.string())),
324
+ reviewsCount: z.number().int(),
325
+ reviewsRatingSum: z.nullable(z.number()),
326
+ attributes: z.array(ProductAttribute$outboundSchema),
327
+ images: z.array(ProductImage$outboundSchema),
328
+ pricing: ProductPricing$outboundSchema,
329
+ promotion: z.nullable(ProductPromotion$outboundSchema),
330
+ subscription: z.array(ProductSubscription$outboundSchema),
331
+ associatedOptions: z.nullable(z.record(AssociatedOption$outboundSchema)),
337
332
  }).transform((v) => {
338
333
  return remap$(v, {
339
334
  productId: "product_id",
@@ -391,10 +386,10 @@ export const BundleProductDetail$inboundSchema: z.ZodType<
391
386
  unknown
392
387
  > = z.object({
393
388
  id: z.string(),
394
- sku: z.string().optional(),
389
+ sku: z.nullable(z.string()),
395
390
  name: z.string(),
396
- slug: z.string(),
397
- short_description: z.string().optional(),
391
+ slug: z.nullable(z.string()),
392
+ short_description: z.nullable(z.string()),
398
393
  product_type: BundleProductDetailProductType$inboundSchema,
399
394
  active: z.boolean().default(true),
400
395
  stock_available: z.boolean().default(true),
@@ -402,26 +397,25 @@ export const BundleProductDetail$inboundSchema: z.ZodType<
402
397
  on_subscription: z.boolean().default(false),
403
398
  on_promotion: z.boolean().default(false),
404
399
  has_variant: z.boolean().default(false),
405
- tags: z.nullable(z.array(z.string())).optional(),
406
- category_ids: z.array(z.string()).optional(),
407
- reviews_rating_sum: z.number().optional(),
408
- reviews_count: z.number().int().optional(),
409
- attributes: z.array(ProductAttribute$inboundSchema).optional(),
400
+ tags: z.nullable(z.array(z.string())),
401
+ category_ids: z.array(z.string()),
402
+ reviews_rating_sum: z.number(),
403
+ reviews_count: z.number().int(),
404
+ attributes: z.array(ProductAttribute$inboundSchema),
410
405
  pricing: ProductPricing$inboundSchema,
411
406
  variant_options: z.nullable(z.array(VariantOption$inboundSchema)),
412
407
  promotion: z.nullable(ProductPromotion$inboundSchema),
413
408
  images: z.array(ProductImage$inboundSchema),
414
409
  subscription: z.array(ProductSubscription$inboundSchema),
415
- bundle_items: z.array(z.lazy(() => BundleProductDetailSKU$inboundSchema))
416
- .optional(),
417
- description: z.string().optional(),
418
- hsn_code: z.string().optional(),
419
- videos: z.array(ProductVideo$inboundSchema).optional(),
420
- shipping: z.nullable(ProductShipping$inboundSchema).optional(),
421
- upselling_product_ids: z.array(z.string()).optional(),
422
- crossselling_product_ids: z.array(z.string()).optional(),
423
- seo: Seo$inboundSchema.optional(),
424
- metadata: z.record(z.string()).optional(),
410
+ bundle_items: z.array(z.lazy(() => BundleProductDetailSKU$inboundSchema)),
411
+ description: z.nullable(z.string()),
412
+ hsn_code: z.nullable(z.string()),
413
+ videos: z.array(ProductVideo$inboundSchema),
414
+ shipping: z.nullable(ProductShipping$inboundSchema),
415
+ upselling_product_ids: z.array(z.string()),
416
+ crossselling_product_ids: z.array(z.string()),
417
+ seo: Seo$inboundSchema,
418
+ metadata: z.record(z.string()),
425
419
  }).transform((v) => {
426
420
  return remap$(v, {
427
421
  "short_description": "shortDescription",
@@ -445,10 +439,10 @@ export const BundleProductDetail$inboundSchema: z.ZodType<
445
439
  /** @internal */
446
440
  export type BundleProductDetail$Outbound = {
447
441
  id: string;
448
- sku?: string | undefined;
442
+ sku: string | null;
449
443
  name: string;
450
- slug: string;
451
- short_description?: string | undefined;
444
+ slug: string | null;
445
+ short_description: string | null;
452
446
  product_type: string;
453
447
  active: boolean;
454
448
  stock_available: boolean;
@@ -456,25 +450,25 @@ export type BundleProductDetail$Outbound = {
456
450
  on_subscription: boolean;
457
451
  on_promotion: boolean;
458
452
  has_variant: boolean;
459
- tags?: Array<string> | null | undefined;
460
- category_ids?: Array<string> | undefined;
461
- reviews_rating_sum?: number | undefined;
462
- reviews_count?: number | undefined;
463
- attributes?: Array<ProductAttribute$Outbound> | undefined;
453
+ tags: Array<string> | null;
454
+ category_ids: Array<string>;
455
+ reviews_rating_sum: number;
456
+ reviews_count: number;
457
+ attributes: Array<ProductAttribute$Outbound>;
464
458
  pricing: ProductPricing$Outbound;
465
459
  variant_options: Array<VariantOption$Outbound> | null;
466
460
  promotion: ProductPromotion$Outbound | null;
467
461
  images: Array<ProductImage$Outbound>;
468
462
  subscription: Array<ProductSubscription$Outbound>;
469
- bundle_items?: Array<BundleProductDetailSKU$Outbound> | undefined;
470
- description?: string | undefined;
471
- hsn_code?: string | undefined;
472
- videos?: Array<ProductVideo$Outbound> | undefined;
473
- shipping?: ProductShipping$Outbound | null | undefined;
474
- upselling_product_ids?: Array<string> | undefined;
475
- crossselling_product_ids?: Array<string> | undefined;
476
- seo?: Seo$Outbound | undefined;
477
- metadata?: { [k: string]: string } | undefined;
463
+ bundle_items: Array<BundleProductDetailSKU$Outbound>;
464
+ description: string | null;
465
+ hsn_code: string | null;
466
+ videos: Array<ProductVideo$Outbound>;
467
+ shipping: ProductShipping$Outbound | null;
468
+ upselling_product_ids: Array<string>;
469
+ crossselling_product_ids: Array<string>;
470
+ seo: Seo$Outbound;
471
+ metadata: { [k: string]: string };
478
472
  };
479
473
 
480
474
  /** @internal */
@@ -484,10 +478,10 @@ export const BundleProductDetail$outboundSchema: z.ZodType<
484
478
  BundleProductDetail
485
479
  > = z.object({
486
480
  id: z.string(),
487
- sku: z.string().optional(),
481
+ sku: z.nullable(z.string()),
488
482
  name: z.string(),
489
- slug: z.string(),
490
- shortDescription: z.string().optional(),
483
+ slug: z.nullable(z.string()),
484
+ shortDescription: z.nullable(z.string()),
491
485
  productType: BundleProductDetailProductType$outboundSchema,
492
486
  active: z.boolean().default(true),
493
487
  stockAvailable: z.boolean().default(true),
@@ -495,26 +489,25 @@ export const BundleProductDetail$outboundSchema: z.ZodType<
495
489
  onSubscription: z.boolean().default(false),
496
490
  onPromotion: z.boolean().default(false),
497
491
  hasVariant: z.boolean().default(false),
498
- tags: z.nullable(z.array(z.string())).optional(),
499
- categoryIds: z.array(z.string()).optional(),
500
- reviewsRatingSum: z.number().optional(),
501
- reviewsCount: z.number().int().optional(),
502
- attributes: z.array(ProductAttribute$outboundSchema).optional(),
492
+ tags: z.nullable(z.array(z.string())),
493
+ categoryIds: z.array(z.string()),
494
+ reviewsRatingSum: z.number(),
495
+ reviewsCount: z.number().int(),
496
+ attributes: z.array(ProductAttribute$outboundSchema),
503
497
  pricing: ProductPricing$outboundSchema,
504
498
  variantOptions: z.nullable(z.array(VariantOption$outboundSchema)),
505
499
  promotion: z.nullable(ProductPromotion$outboundSchema),
506
500
  images: z.array(ProductImage$outboundSchema),
507
501
  subscription: z.array(ProductSubscription$outboundSchema),
508
- bundleItems: z.array(z.lazy(() => BundleProductDetailSKU$outboundSchema))
509
- .optional(),
510
- description: z.string().optional(),
511
- hsnCode: z.string().optional(),
512
- videos: z.array(ProductVideo$outboundSchema).optional(),
513
- shipping: z.nullable(ProductShipping$outboundSchema).optional(),
514
- upsellingProductIds: z.array(z.string()).optional(),
515
- crosssellingProductIds: z.array(z.string()).optional(),
516
- seo: Seo$outboundSchema.optional(),
517
- metadata: z.record(z.string()).optional(),
502
+ bundleItems: z.array(z.lazy(() => BundleProductDetailSKU$outboundSchema)),
503
+ description: z.nullable(z.string()),
504
+ hsnCode: z.nullable(z.string()),
505
+ videos: z.array(ProductVideo$outboundSchema),
506
+ shipping: z.nullable(ProductShipping$outboundSchema),
507
+ upsellingProductIds: z.array(z.string()),
508
+ crosssellingProductIds: z.array(z.string()),
509
+ seo: Seo$outboundSchema,
510
+ metadata: z.record(z.string()),
518
511
  }).transform((v) => {
519
512
  return remap$(v, {
520
513
  shortDescription: "short_description",
@@ -0,0 +1,144 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type ColorOptionValue = {
11
+ /**
12
+ * The name of the color.
13
+ */
14
+ name: string;
15
+ /**
16
+ * The hex code of the color (e.g., #000000).
17
+ */
18
+ hexcode: string;
19
+ };
20
+
21
+ export type ColorOption = {
22
+ /**
23
+ * The name of the associated option.
24
+ */
25
+ name: string;
26
+ /**
27
+ * The type of the associated option.
28
+ */
29
+ type?: "color" | undefined;
30
+ value: ColorOptionValue;
31
+ };
32
+
33
+ /** @internal */
34
+ export const ColorOptionValue$inboundSchema: z.ZodType<
35
+ ColorOptionValue,
36
+ z.ZodTypeDef,
37
+ unknown
38
+ > = z.object({
39
+ name: z.string(),
40
+ hexcode: z.string(),
41
+ });
42
+
43
+ /** @internal */
44
+ export type ColorOptionValue$Outbound = {
45
+ name: string;
46
+ hexcode: string;
47
+ };
48
+
49
+ /** @internal */
50
+ export const ColorOptionValue$outboundSchema: z.ZodType<
51
+ ColorOptionValue$Outbound,
52
+ z.ZodTypeDef,
53
+ ColorOptionValue
54
+ > = z.object({
55
+ name: z.string(),
56
+ hexcode: z.string(),
57
+ });
58
+
59
+ /**
60
+ * @internal
61
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
62
+ */
63
+ export namespace ColorOptionValue$ {
64
+ /** @deprecated use `ColorOptionValue$inboundSchema` instead. */
65
+ export const inboundSchema = ColorOptionValue$inboundSchema;
66
+ /** @deprecated use `ColorOptionValue$outboundSchema` instead. */
67
+ export const outboundSchema = ColorOptionValue$outboundSchema;
68
+ /** @deprecated use `ColorOptionValue$Outbound` instead. */
69
+ export type Outbound = ColorOptionValue$Outbound;
70
+ }
71
+
72
+ export function colorOptionValueToJSON(
73
+ colorOptionValue: ColorOptionValue,
74
+ ): string {
75
+ return JSON.stringify(
76
+ ColorOptionValue$outboundSchema.parse(colorOptionValue),
77
+ );
78
+ }
79
+
80
+ export function colorOptionValueFromJSON(
81
+ jsonString: string,
82
+ ): SafeParseResult<ColorOptionValue, SDKValidationError> {
83
+ return safeParse(
84
+ jsonString,
85
+ (x) => ColorOptionValue$inboundSchema.parse(JSON.parse(x)),
86
+ `Failed to parse 'ColorOptionValue' from JSON`,
87
+ );
88
+ }
89
+
90
+ /** @internal */
91
+ export const ColorOption$inboundSchema: z.ZodType<
92
+ ColorOption,
93
+ z.ZodTypeDef,
94
+ unknown
95
+ > = z.object({
96
+ name: z.string(),
97
+ type: z.literal("color").optional(),
98
+ value: z.lazy(() => ColorOptionValue$inboundSchema),
99
+ });
100
+
101
+ /** @internal */
102
+ export type ColorOption$Outbound = {
103
+ name: string;
104
+ type: "color";
105
+ value: ColorOptionValue$Outbound;
106
+ };
107
+
108
+ /** @internal */
109
+ export const ColorOption$outboundSchema: z.ZodType<
110
+ ColorOption$Outbound,
111
+ z.ZodTypeDef,
112
+ ColorOption
113
+ > = z.object({
114
+ name: z.string(),
115
+ type: z.literal("color").default("color" as const),
116
+ value: z.lazy(() => ColorOptionValue$outboundSchema),
117
+ });
118
+
119
+ /**
120
+ * @internal
121
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
122
+ */
123
+ export namespace ColorOption$ {
124
+ /** @deprecated use `ColorOption$inboundSchema` instead. */
125
+ export const inboundSchema = ColorOption$inboundSchema;
126
+ /** @deprecated use `ColorOption$outboundSchema` instead. */
127
+ export const outboundSchema = ColorOption$outboundSchema;
128
+ /** @deprecated use `ColorOption$Outbound` instead. */
129
+ export type Outbound = ColorOption$Outbound;
130
+ }
131
+
132
+ export function colorOptionToJSON(colorOption: ColorOption): string {
133
+ return JSON.stringify(ColorOption$outboundSchema.parse(colorOption));
134
+ }
135
+
136
+ export function colorOptionFromJSON(
137
+ jsonString: string,
138
+ ): SafeParseResult<ColorOption, SDKValidationError> {
139
+ return safeParse(
140
+ jsonString,
141
+ (x) => ColorOption$inboundSchema.parse(JSON.parse(x)),
142
+ `Failed to parse 'ColorOption' from JSON`,
143
+ );
144
+ }
@@ -8,9 +8,9 @@ import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type Currency = {
11
- name?: string | undefined;
12
- code?: string | undefined;
13
- symbol?: string | undefined;
11
+ name: string;
12
+ code: string;
13
+ symbol: string;
14
14
  };
15
15
 
16
16
  /** @internal */
@@ -19,16 +19,16 @@ export const Currency$inboundSchema: z.ZodType<
19
19
  z.ZodTypeDef,
20
20
  unknown
21
21
  > = z.object({
22
- name: z.string().optional(),
23
- code: z.string().optional(),
24
- symbol: z.string().optional(),
22
+ name: z.string(),
23
+ code: z.string(),
24
+ symbol: z.string(),
25
25
  });
26
26
 
27
27
  /** @internal */
28
28
  export type Currency$Outbound = {
29
- name?: string | undefined;
30
- code?: string | undefined;
31
- symbol?: string | undefined;
29
+ name: string;
30
+ code: string;
31
+ symbol: string;
32
32
  };
33
33
 
34
34
  /** @internal */
@@ -37,9 +37,9 @@ export const Currency$outboundSchema: z.ZodType<
37
37
  z.ZodTypeDef,
38
38
  Currency
39
39
  > = z.object({
40
- name: z.string().optional(),
41
- code: z.string().optional(),
42
- symbol: z.string().optional(),
40
+ name: z.string(),
41
+ code: z.string(),
42
+ symbol: z.string(),
43
43
  });
44
44
 
45
45
  /**
@@ -12,6 +12,7 @@ export * from "./business.js";
12
12
  export * from "./cardpayment.js";
13
13
  export * from "./cart.js";
14
14
  export * from "./cartitem.js";
15
+ export * from "./coloroption.js";
15
16
  export * from "./country.js";
16
17
  export * from "./countrystate.js";
17
18
  export * from "./coupon.js";
@@ -71,11 +72,12 @@ export * from "./seo.js";
71
72
  export * from "./shipmentitem.js";
72
73
  export * from "./singleproduct.js";
73
74
  export * from "./singleproductdetail.js";
75
+ export * from "./singleselectoption.js";
74
76
  export * from "./sku.js";
77
+ export * from "./updatecartitem.js";
75
78
  export * from "./updatecustomer.js";
76
79
  export * from "./upipayment.js";
77
80
  export * from "./user.js";
78
- export * from "./userinput.js";
79
81
  export * from "./variant.js";
80
82
  export * from "./variantdetail.js";
81
83
  export * from "./variantoption.js";
@@ -20,15 +20,15 @@ export type NotificationPreferences = {
20
20
  /**
21
21
  * Set specific channel preferences
22
22
  */
23
- transactional?: NotificationChannelPreferences | undefined;
23
+ transactional: NotificationChannelPreferences;
24
24
  /**
25
25
  * Set specific channel preferences
26
26
  */
27
- promotional?: NotificationChannelPreferences | undefined;
27
+ promotional: NotificationChannelPreferences;
28
28
  /**
29
29
  * Set specific channel preferences
30
30
  */
31
- newsletter?: NotificationChannelPreferences | undefined;
31
+ newsletter: NotificationChannelPreferences;
32
32
  };
33
33
 
34
34
  /** @internal */
@@ -37,16 +37,16 @@ export const NotificationPreferences$inboundSchema: z.ZodType<
37
37
  z.ZodTypeDef,
38
38
  unknown
39
39
  > = z.object({
40
- transactional: NotificationChannelPreferences$inboundSchema.optional(),
41
- promotional: NotificationChannelPreferences$inboundSchema.optional(),
42
- newsletter: NotificationChannelPreferences$inboundSchema.optional(),
40
+ transactional: NotificationChannelPreferences$inboundSchema,
41
+ promotional: NotificationChannelPreferences$inboundSchema,
42
+ newsletter: NotificationChannelPreferences$inboundSchema,
43
43
  });
44
44
 
45
45
  /** @internal */
46
46
  export type NotificationPreferences$Outbound = {
47
- transactional?: NotificationChannelPreferences$Outbound | undefined;
48
- promotional?: NotificationChannelPreferences$Outbound | undefined;
49
- newsletter?: NotificationChannelPreferences$Outbound | undefined;
47
+ transactional: NotificationChannelPreferences$Outbound;
48
+ promotional: NotificationChannelPreferences$Outbound;
49
+ newsletter: NotificationChannelPreferences$Outbound;
50
50
  };
51
51
 
52
52
  /** @internal */
@@ -55,9 +55,9 @@ export const NotificationPreferences$outboundSchema: z.ZodType<
55
55
  z.ZodTypeDef,
56
56
  NotificationPreferences
57
57
  > = z.object({
58
- transactional: NotificationChannelPreferences$outboundSchema.optional(),
59
- promotional: NotificationChannelPreferences$outboundSchema.optional(),
60
- newsletter: NotificationChannelPreferences$outboundSchema.optional(),
58
+ transactional: NotificationChannelPreferences$outboundSchema,
59
+ promotional: NotificationChannelPreferences$outboundSchema,
60
+ newsletter: NotificationChannelPreferences$outboundSchema,
61
61
  });
62
62
 
63
63
  /**