ce-storefront 0.3.5 → 0.3.7

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 (158) hide show
  1. package/esm/lib/config.d.ts +3 -3
  2. package/esm/lib/config.js +3 -3
  3. package/esm/models/components/analyticsevent.d.ts +8 -8
  4. package/esm/models/components/analyticsevent.d.ts.map +1 -1
  5. package/esm/models/components/analyticsevent.js +12 -12
  6. package/esm/models/components/analyticsevent.js.map +1 -1
  7. package/esm/models/components/associatedoption.d.ts +125 -0
  8. package/esm/models/components/associatedoption.d.ts.map +1 -0
  9. package/esm/models/components/associatedoption.js +107 -0
  10. package/esm/models/components/associatedoption.js.map +1 -0
  11. package/esm/models/components/bundleproduct.d.ts +236 -0
  12. package/esm/models/components/bundleproduct.d.ts.map +1 -0
  13. package/esm/models/components/bundleproduct.js +262 -0
  14. package/esm/models/components/bundleproduct.js.map +1 -0
  15. package/esm/models/components/bundleproductdetail.d.ts +265 -0
  16. package/esm/models/components/bundleproductdetail.d.ts.map +1 -0
  17. package/esm/models/components/bundleproductdetail.js +288 -0
  18. package/esm/models/components/bundleproductdetail.js.map +1 -0
  19. package/esm/models/components/cart.d.ts +15 -15
  20. package/esm/models/components/cart.d.ts.map +1 -1
  21. package/esm/models/components/cart.js +15 -15
  22. package/esm/models/components/cart.js.map +1 -1
  23. package/esm/models/components/discountbasedpromotion.d.ts +0 -2
  24. package/esm/models/components/discountbasedpromotion.d.ts.map +1 -1
  25. package/esm/models/components/discountbasedpromotion.js +0 -4
  26. package/esm/models/components/discountbasedpromotion.js.map +1 -1
  27. package/esm/models/components/fixedpricepromotion.d.ts +0 -2
  28. package/esm/models/components/fixedpricepromotion.d.ts.map +1 -1
  29. package/esm/models/components/fixedpricepromotion.js +0 -4
  30. package/esm/models/components/fixedpricepromotion.js.map +1 -1
  31. package/esm/models/components/freegoodspromotion.d.ts +0 -5
  32. package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
  33. package/esm/models/components/freegoodspromotion.js +0 -4
  34. package/esm/models/components/freegoodspromotion.js.map +1 -1
  35. package/esm/models/components/index.d.ts +8 -6
  36. package/esm/models/components/index.d.ts.map +1 -1
  37. package/esm/models/components/index.js +8 -6
  38. package/esm/models/components/index.js.map +1 -1
  39. package/esm/models/components/productattribute.d.ts +97 -64
  40. package/esm/models/components/productattribute.d.ts.map +1 -1
  41. package/esm/models/components/productattribute.js +67 -128
  42. package/esm/models/components/productattribute.js.map +1 -1
  43. package/esm/models/components/productcategory.d.ts +2 -2
  44. package/esm/models/components/productcategory.d.ts.map +1 -1
  45. package/esm/models/components/productcategory.js +2 -2
  46. package/esm/models/components/productcategory.js.map +1 -1
  47. package/esm/models/components/productdetail.d.ts +16 -188
  48. package/esm/models/components/productdetail.d.ts.map +1 -1
  49. package/esm/models/components/productdetail.js +26 -228
  50. package/esm/models/components/productdetail.js.map +1 -1
  51. package/esm/models/components/productlistresponse.d.ts +49 -3
  52. package/esm/models/components/productlistresponse.d.ts.map +1 -1
  53. package/esm/models/components/productlistresponse.js +65 -3
  54. package/esm/models/components/productlistresponse.js.map +1 -1
  55. package/esm/models/components/productshipping.d.ts +13 -15
  56. package/esm/models/components/productshipping.d.ts.map +1 -1
  57. package/esm/models/components/productshipping.js +14 -18
  58. package/esm/models/components/productshipping.js.map +1 -1
  59. package/esm/models/components/{promotion.d.ts → promotiondetail.d.ts} +29 -29
  60. package/esm/models/components/promotiondetail.d.ts.map +1 -0
  61. package/esm/models/components/{promotion.js → promotiondetail.js} +29 -29
  62. package/esm/models/components/promotiondetail.js.map +1 -0
  63. package/esm/models/components/seo.d.ts +6 -6
  64. package/esm/models/components/seo.d.ts.map +1 -1
  65. package/esm/models/components/seo.js +6 -19
  66. package/esm/models/components/seo.js.map +1 -1
  67. package/esm/models/components/{product.d.ts → singleproduct.d.ts} +52 -75
  68. package/esm/models/components/singleproduct.d.ts.map +1 -0
  69. package/esm/models/components/{product.js → singleproduct.js} +37 -95
  70. package/esm/models/components/singleproduct.js.map +1 -0
  71. package/esm/models/components/singleproductdetail.d.ts +159 -0
  72. package/esm/models/components/singleproductdetail.d.ts.map +1 -0
  73. package/esm/models/components/singleproductdetail.js +156 -0
  74. package/esm/models/components/singleproductdetail.js.map +1 -0
  75. package/esm/models/components/{skuinfo.d.ts → sku.d.ts} +59 -48
  76. package/esm/models/components/sku.d.ts.map +1 -0
  77. package/esm/models/components/{skuinfo.js → sku.js} +67 -57
  78. package/esm/models/components/sku.js.map +1 -0
  79. package/esm/models/components/variant.d.ts +42 -72
  80. package/esm/models/components/variant.d.ts.map +1 -1
  81. package/esm/models/components/variant.js +39 -82
  82. package/esm/models/components/variant.js.map +1 -1
  83. package/esm/models/components/variantdetail.d.ts +101 -68
  84. package/esm/models/components/variantdetail.d.ts.map +1 -1
  85. package/esm/models/components/variantdetail.js +99 -71
  86. package/esm/models/components/variantdetail.js.map +1 -1
  87. package/esm/models/components/variantoption.d.ts +118 -0
  88. package/esm/models/components/variantoption.d.ts.map +1 -0
  89. package/esm/models/components/variantoption.js +114 -0
  90. package/esm/models/components/variantoption.js.map +1 -0
  91. package/esm/models/components/volumebasedpromotion.d.ts +0 -5
  92. package/esm/models/components/volumebasedpromotion.d.ts.map +1 -1
  93. package/esm/models/components/volumebasedpromotion.js +0 -4
  94. package/esm/models/components/volumebasedpromotion.js.map +1 -1
  95. package/esm/models/operations/getpromotions.d.ts +2 -2
  96. package/esm/models/operations/getpromotions.d.ts.map +1 -1
  97. package/esm/models/operations/getpromotions.js +2 -2
  98. package/esm/models/operations/getpromotions.js.map +1 -1
  99. package/esm/models/operations/getskus.d.ts +2 -2
  100. package/esm/models/operations/getskus.d.ts.map +1 -1
  101. package/esm/models/operations/getskus.js +2 -2
  102. package/esm/models/operations/getskus.js.map +1 -1
  103. package/esm/models/operations/getwishtlist.d.ts +2 -2
  104. package/esm/models/operations/getwishtlist.d.ts.map +1 -1
  105. package/esm/models/operations/getwishtlist.js +2 -2
  106. package/esm/models/operations/getwishtlist.js.map +1 -1
  107. package/jsr.json +1 -1
  108. package/package.json +1 -1
  109. package/src/lib/config.ts +3 -3
  110. package/src/models/components/analyticsevent.ts +16 -15
  111. package/src/models/components/associatedoption.ts +217 -0
  112. package/src/models/components/bundleproduct.ts +501 -0
  113. package/src/models/components/bundleproductdetail.ts +567 -0
  114. package/src/models/components/cart.ts +24 -24
  115. package/src/models/components/discountbasedpromotion.ts +0 -6
  116. package/src/models/components/fixedpricepromotion.ts +0 -6
  117. package/src/models/components/freegoodspromotion.ts +0 -9
  118. package/src/models/components/index.ts +8 -6
  119. package/src/models/components/productattribute.ts +162 -188
  120. package/src/models/components/productcategory.ts +4 -4
  121. package/src/models/components/productdetail.ts +52 -475
  122. package/src/models/components/productlistresponse.ts +147 -9
  123. package/src/models/components/productshipping.ts +27 -33
  124. package/src/models/components/{promotion.ts → promotiondetail.ts} +47 -45
  125. package/src/models/components/seo.ts +12 -25
  126. package/src/models/components/singleproduct.ts +269 -0
  127. package/src/models/components/singleproductdetail.ts +339 -0
  128. package/src/models/components/sku.ts +252 -0
  129. package/src/models/components/variant.ts +81 -170
  130. package/src/models/components/variantdetail.ts +189 -168
  131. package/src/models/components/variantoption.ts +214 -0
  132. package/src/models/components/volumebasedpromotion.ts +0 -9
  133. package/src/models/operations/getpromotions.ts +4 -4
  134. package/src/models/operations/getskus.ts +4 -4
  135. package/src/models/operations/getwishtlist.ts +4 -4
  136. package/esm/models/components/product.d.ts.map +0 -1
  137. package/esm/models/components/product.js.map +0 -1
  138. package/esm/models/components/productbundleitem.d.ts +0 -47
  139. package/esm/models/components/productbundleitem.d.ts.map +0 -1
  140. package/esm/models/components/productbundleitem.js +0 -66
  141. package/esm/models/components/productbundleitem.js.map +0 -1
  142. package/esm/models/components/productpackaging.d.ts +0 -68
  143. package/esm/models/components/productpackaging.d.ts.map +0 -1
  144. package/esm/models/components/productpackaging.js +0 -88
  145. package/esm/models/components/productpackaging.js.map +0 -1
  146. package/esm/models/components/promotion.d.ts.map +0 -1
  147. package/esm/models/components/promotion.js.map +0 -1
  148. package/esm/models/components/saleschannel.d.ts +0 -39
  149. package/esm/models/components/saleschannel.d.ts.map +0 -1
  150. package/esm/models/components/saleschannel.js +0 -53
  151. package/esm/models/components/saleschannel.js.map +0 -1
  152. package/esm/models/components/skuinfo.d.ts.map +0 -1
  153. package/esm/models/components/skuinfo.js.map +0 -1
  154. package/src/models/components/product.ts +0 -363
  155. package/src/models/components/productbundleitem.ts +0 -127
  156. package/src/models/components/productpackaging.ts +0 -162
  157. package/src/models/components/saleschannel.ts +0 -96
  158. package/src/models/components/skuinfo.ts +0 -237
@@ -0,0 +1,567 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+ import {
12
+ AssociatedOption,
13
+ AssociatedOption$inboundSchema,
14
+ AssociatedOption$Outbound,
15
+ AssociatedOption$outboundSchema,
16
+ } from "./associatedoption.js";
17
+ import {
18
+ ProductAttribute,
19
+ ProductAttribute$inboundSchema,
20
+ ProductAttribute$Outbound,
21
+ ProductAttribute$outboundSchema,
22
+ } from "./productattribute.js";
23
+ import {
24
+ ProductImage,
25
+ ProductImage$inboundSchema,
26
+ ProductImage$Outbound,
27
+ ProductImage$outboundSchema,
28
+ } from "./productimage.js";
29
+ import {
30
+ ProductPricing,
31
+ ProductPricing$inboundSchema,
32
+ ProductPricing$Outbound,
33
+ ProductPricing$outboundSchema,
34
+ } from "./productpricing.js";
35
+ import {
36
+ ProductPromotion,
37
+ ProductPromotion$inboundSchema,
38
+ ProductPromotion$Outbound,
39
+ ProductPromotion$outboundSchema,
40
+ } from "./productpromotion.js";
41
+ import {
42
+ ProductShipping,
43
+ ProductShipping$inboundSchema,
44
+ ProductShipping$Outbound,
45
+ ProductShipping$outboundSchema,
46
+ } from "./productshipping.js";
47
+ import {
48
+ ProductSubscription,
49
+ ProductSubscription$inboundSchema,
50
+ ProductSubscription$Outbound,
51
+ ProductSubscription$outboundSchema,
52
+ } from "./productsubscription.js";
53
+ import {
54
+ ProductVideo,
55
+ ProductVideo$inboundSchema,
56
+ ProductVideo$Outbound,
57
+ ProductVideo$outboundSchema,
58
+ } from "./productvideo.js";
59
+ import {
60
+ Seo,
61
+ Seo$inboundSchema,
62
+ Seo$Outbound,
63
+ Seo$outboundSchema,
64
+ } from "./seo.js";
65
+ import {
66
+ VariantOption,
67
+ VariantOption$inboundSchema,
68
+ VariantOption$Outbound,
69
+ VariantOption$outboundSchema,
70
+ } from "./variantoption.js";
71
+
72
+ export const BundleProductDetailProductType = {
73
+ Physical: "physical",
74
+ Digital: "digital",
75
+ Bundle: "bundle",
76
+ } as const;
77
+ export type BundleProductDetailProductType = ClosedEnum<
78
+ typeof BundleProductDetailProductType
79
+ >;
80
+
81
+ export const BundleProductDetailBundleItemsProductType = {
82
+ Physical: "physical",
83
+ Digital: "digital",
84
+ Bundle: "bundle",
85
+ } as const;
86
+ export type BundleProductDetailBundleItemsProductType = ClosedEnum<
87
+ typeof BundleProductDetailBundleItemsProductType
88
+ >;
89
+
90
+ export type BundleProductDetailSKU = {
91
+ quantity: number;
92
+ productId: string;
93
+ variantId?: string | null | undefined;
94
+ sku: string;
95
+ slug?: string | undefined;
96
+ productName: string;
97
+ variantName?: string | null | undefined;
98
+ productType: BundleProductDetailBundleItemsProductType;
99
+ shortDescription?: string | undefined;
100
+ active?: boolean | undefined;
101
+ stockAvailable?: boolean | undefined;
102
+ /**
103
+ * Indicates whether this item is associated with any active (product-specific) coupons
104
+ */
105
+ onOffer?: boolean | undefined;
106
+ onSubscription?: boolean | undefined;
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;
118
+ };
119
+
120
+ export type BundleProductDetail = {
121
+ /**
122
+ * The ULID of the product
123
+ */
124
+ id: string;
125
+ sku?: string | undefined;
126
+ name: string;
127
+ slug: string;
128
+ shortDescription?: string | undefined;
129
+ productType: BundleProductDetailProductType;
130
+ active?: boolean | undefined;
131
+ /**
132
+ * Indicates whether the product has stock available
133
+ */
134
+ stockAvailable?: boolean | undefined;
135
+ /**
136
+ * Indicates whether this item is associated with any active (product-specific) coupons
137
+ */
138
+ onOffer?: boolean | undefined;
139
+ /**
140
+ * Indicates whether the product has any subscription plans avaialble
141
+ */
142
+ onSubscription?: boolean | undefined;
143
+ /**
144
+ * Indicates whether the product is currently on promotion. When true, the `ProductPromotion` object will contain details of the promotion
145
+ */
146
+ onPromotion?: boolean | undefined;
147
+ /**
148
+ * Indicates whether the product has variants
149
+ */
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;
156
+ pricing?: ProductPricing | undefined;
157
+ /**
158
+ * this will be used if has_variant is true, to auto set default values.
159
+ */
160
+ variantOptions?: Array<VariantOption> | null | undefined;
161
+ promotion?: ProductPromotion | null | undefined;
162
+ images?: Array<ProductImage> | undefined;
163
+ subscription?: Array<ProductSubscription> | undefined;
164
+ bundleItems?: Array<BundleProductDetailSKU> | undefined;
165
+ description?: string | undefined;
166
+ hsnCode?: string | undefined;
167
+ videos?: Array<ProductVideo> | undefined;
168
+ shipping?: ProductShipping | null | undefined;
169
+ /**
170
+ * An array of product ULIDs
171
+ */
172
+ upsellingProductIds?: Array<string> | undefined;
173
+ /**
174
+ * An array of product ULIDs
175
+ */
176
+ crosssellingProductIds?: Array<string> | undefined;
177
+ seo?: Seo | undefined;
178
+ metadata?: { [k: string]: string } | undefined;
179
+ };
180
+
181
+ /** @internal */
182
+ export const BundleProductDetailProductType$inboundSchema: z.ZodNativeEnum<
183
+ typeof BundleProductDetailProductType
184
+ > = z.nativeEnum(BundleProductDetailProductType);
185
+
186
+ /** @internal */
187
+ export const BundleProductDetailProductType$outboundSchema: z.ZodNativeEnum<
188
+ typeof BundleProductDetailProductType
189
+ > = BundleProductDetailProductType$inboundSchema;
190
+
191
+ /**
192
+ * @internal
193
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
194
+ */
195
+ export namespace BundleProductDetailProductType$ {
196
+ /** @deprecated use `BundleProductDetailProductType$inboundSchema` instead. */
197
+ export const inboundSchema = BundleProductDetailProductType$inboundSchema;
198
+ /** @deprecated use `BundleProductDetailProductType$outboundSchema` instead. */
199
+ export const outboundSchema = BundleProductDetailProductType$outboundSchema;
200
+ }
201
+
202
+ /** @internal */
203
+ export const BundleProductDetailBundleItemsProductType$inboundSchema:
204
+ z.ZodNativeEnum<typeof BundleProductDetailBundleItemsProductType> = z
205
+ .nativeEnum(BundleProductDetailBundleItemsProductType);
206
+
207
+ /** @internal */
208
+ export const BundleProductDetailBundleItemsProductType$outboundSchema:
209
+ z.ZodNativeEnum<typeof BundleProductDetailBundleItemsProductType> =
210
+ BundleProductDetailBundleItemsProductType$inboundSchema;
211
+
212
+ /**
213
+ * @internal
214
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
215
+ */
216
+ export namespace BundleProductDetailBundleItemsProductType$ {
217
+ /** @deprecated use `BundleProductDetailBundleItemsProductType$inboundSchema` instead. */
218
+ export const inboundSchema =
219
+ BundleProductDetailBundleItemsProductType$inboundSchema;
220
+ /** @deprecated use `BundleProductDetailBundleItemsProductType$outboundSchema` instead. */
221
+ export const outboundSchema =
222
+ BundleProductDetailBundleItemsProductType$outboundSchema;
223
+ }
224
+
225
+ /** @internal */
226
+ export const BundleProductDetailSKU$inboundSchema: z.ZodType<
227
+ BundleProductDetailSKU,
228
+ z.ZodTypeDef,
229
+ unknown
230
+ > = z.object({
231
+ quantity: z.number().int(),
232
+ product_id: z.string(),
233
+ variant_id: z.nullable(z.string()).optional(),
234
+ sku: z.string(),
235
+ slug: z.string().optional(),
236
+ product_name: z.string(),
237
+ variant_name: z.nullable(z.string()).optional(),
238
+ product_type: BundleProductDetailBundleItemsProductType$inboundSchema,
239
+ short_description: z.string().optional(),
240
+ active: z.boolean().default(true),
241
+ stock_available: z.boolean().default(true),
242
+ on_offer: z.boolean().default(false),
243
+ on_subscription: z.boolean().default(false),
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(),
256
+ }).transform((v) => {
257
+ return remap$(v, {
258
+ "product_id": "productId",
259
+ "variant_id": "variantId",
260
+ "product_name": "productName",
261
+ "variant_name": "variantName",
262
+ "product_type": "productType",
263
+ "short_description": "shortDescription",
264
+ "stock_available": "stockAvailable",
265
+ "on_offer": "onOffer",
266
+ "on_subscription": "onSubscription",
267
+ "on_promotion": "onPromotion",
268
+ "category_ids": "categoryIds",
269
+ "reviews_count": "reviewsCount",
270
+ "reviews_rating_sum": "reviewsRatingSum",
271
+ "associated_options": "associatedOptions",
272
+ });
273
+ });
274
+
275
+ /** @internal */
276
+ export type BundleProductDetailSKU$Outbound = {
277
+ quantity: number;
278
+ product_id: string;
279
+ variant_id?: string | null | undefined;
280
+ sku: string;
281
+ slug?: string | undefined;
282
+ product_name: string;
283
+ variant_name?: string | null | undefined;
284
+ product_type: string;
285
+ short_description?: string | undefined;
286
+ active: boolean;
287
+ stock_available: boolean;
288
+ on_offer: boolean;
289
+ on_subscription: boolean;
290
+ 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;
304
+ };
305
+
306
+ /** @internal */
307
+ export const BundleProductDetailSKU$outboundSchema: z.ZodType<
308
+ BundleProductDetailSKU$Outbound,
309
+ z.ZodTypeDef,
310
+ BundleProductDetailSKU
311
+ > = z.object({
312
+ quantity: z.number().int(),
313
+ productId: z.string(),
314
+ variantId: z.nullable(z.string()).optional(),
315
+ sku: z.string(),
316
+ slug: z.string().optional(),
317
+ productName: z.string(),
318
+ variantName: z.nullable(z.string()).optional(),
319
+ productType: BundleProductDetailBundleItemsProductType$outboundSchema,
320
+ shortDescription: z.string().optional(),
321
+ active: z.boolean().default(true),
322
+ stockAvailable: z.boolean().default(true),
323
+ onOffer: z.boolean().default(false),
324
+ onSubscription: z.boolean().default(false),
325
+ 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(),
337
+ }).transform((v) => {
338
+ return remap$(v, {
339
+ productId: "product_id",
340
+ variantId: "variant_id",
341
+ productName: "product_name",
342
+ variantName: "variant_name",
343
+ productType: "product_type",
344
+ shortDescription: "short_description",
345
+ stockAvailable: "stock_available",
346
+ onOffer: "on_offer",
347
+ onSubscription: "on_subscription",
348
+ onPromotion: "on_promotion",
349
+ categoryIds: "category_ids",
350
+ reviewsCount: "reviews_count",
351
+ reviewsRatingSum: "reviews_rating_sum",
352
+ associatedOptions: "associated_options",
353
+ });
354
+ });
355
+
356
+ /**
357
+ * @internal
358
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
359
+ */
360
+ export namespace BundleProductDetailSKU$ {
361
+ /** @deprecated use `BundleProductDetailSKU$inboundSchema` instead. */
362
+ export const inboundSchema = BundleProductDetailSKU$inboundSchema;
363
+ /** @deprecated use `BundleProductDetailSKU$outboundSchema` instead. */
364
+ export const outboundSchema = BundleProductDetailSKU$outboundSchema;
365
+ /** @deprecated use `BundleProductDetailSKU$Outbound` instead. */
366
+ export type Outbound = BundleProductDetailSKU$Outbound;
367
+ }
368
+
369
+ export function bundleProductDetailSKUToJSON(
370
+ bundleProductDetailSKU: BundleProductDetailSKU,
371
+ ): string {
372
+ return JSON.stringify(
373
+ BundleProductDetailSKU$outboundSchema.parse(bundleProductDetailSKU),
374
+ );
375
+ }
376
+
377
+ export function bundleProductDetailSKUFromJSON(
378
+ jsonString: string,
379
+ ): SafeParseResult<BundleProductDetailSKU, SDKValidationError> {
380
+ return safeParse(
381
+ jsonString,
382
+ (x) => BundleProductDetailSKU$inboundSchema.parse(JSON.parse(x)),
383
+ `Failed to parse 'BundleProductDetailSKU' from JSON`,
384
+ );
385
+ }
386
+
387
+ /** @internal */
388
+ export const BundleProductDetail$inboundSchema: z.ZodType<
389
+ BundleProductDetail,
390
+ z.ZodTypeDef,
391
+ unknown
392
+ > = z.object({
393
+ id: z.string(),
394
+ sku: z.string().optional(),
395
+ name: z.string(),
396
+ slug: z.string(),
397
+ short_description: z.string().optional(),
398
+ product_type: BundleProductDetailProductType$inboundSchema,
399
+ active: z.boolean().default(true),
400
+ stock_available: z.boolean().default(true),
401
+ on_offer: z.boolean().default(false),
402
+ on_subscription: z.boolean().default(false),
403
+ on_promotion: z.boolean().default(false),
404
+ 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(),
410
+ pricing: ProductPricing$inboundSchema.optional(),
411
+ variant_options: z.nullable(z.array(VariantOption$inboundSchema)).optional(),
412
+ promotion: z.nullable(ProductPromotion$inboundSchema).optional(),
413
+ images: z.array(ProductImage$inboundSchema).optional(),
414
+ subscription: z.array(ProductSubscription$inboundSchema).optional(),
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(),
425
+ }).transform((v) => {
426
+ return remap$(v, {
427
+ "short_description": "shortDescription",
428
+ "product_type": "productType",
429
+ "stock_available": "stockAvailable",
430
+ "on_offer": "onOffer",
431
+ "on_subscription": "onSubscription",
432
+ "on_promotion": "onPromotion",
433
+ "has_variant": "hasVariant",
434
+ "category_ids": "categoryIds",
435
+ "reviews_rating_sum": "reviewsRatingSum",
436
+ "reviews_count": "reviewsCount",
437
+ "variant_options": "variantOptions",
438
+ "bundle_items": "bundleItems",
439
+ "hsn_code": "hsnCode",
440
+ "upselling_product_ids": "upsellingProductIds",
441
+ "crossselling_product_ids": "crosssellingProductIds",
442
+ });
443
+ });
444
+
445
+ /** @internal */
446
+ export type BundleProductDetail$Outbound = {
447
+ id: string;
448
+ sku?: string | undefined;
449
+ name: string;
450
+ slug: string;
451
+ short_description?: string | undefined;
452
+ product_type: string;
453
+ active: boolean;
454
+ stock_available: boolean;
455
+ on_offer: boolean;
456
+ on_subscription: boolean;
457
+ on_promotion: boolean;
458
+ 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;
464
+ pricing?: ProductPricing$Outbound | undefined;
465
+ variant_options?: Array<VariantOption$Outbound> | null | undefined;
466
+ promotion?: ProductPromotion$Outbound | null | undefined;
467
+ images?: Array<ProductImage$Outbound> | undefined;
468
+ subscription?: Array<ProductSubscription$Outbound> | undefined;
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;
478
+ };
479
+
480
+ /** @internal */
481
+ export const BundleProductDetail$outboundSchema: z.ZodType<
482
+ BundleProductDetail$Outbound,
483
+ z.ZodTypeDef,
484
+ BundleProductDetail
485
+ > = z.object({
486
+ id: z.string(),
487
+ sku: z.string().optional(),
488
+ name: z.string(),
489
+ slug: z.string(),
490
+ shortDescription: z.string().optional(),
491
+ productType: BundleProductDetailProductType$outboundSchema,
492
+ active: z.boolean().default(true),
493
+ stockAvailable: z.boolean().default(true),
494
+ onOffer: z.boolean().default(false),
495
+ onSubscription: z.boolean().default(false),
496
+ onPromotion: z.boolean().default(false),
497
+ 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(),
503
+ pricing: ProductPricing$outboundSchema.optional(),
504
+ variantOptions: z.nullable(z.array(VariantOption$outboundSchema)).optional(),
505
+ promotion: z.nullable(ProductPromotion$outboundSchema).optional(),
506
+ images: z.array(ProductImage$outboundSchema).optional(),
507
+ subscription: z.array(ProductSubscription$outboundSchema).optional(),
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(),
518
+ }).transform((v) => {
519
+ return remap$(v, {
520
+ shortDescription: "short_description",
521
+ productType: "product_type",
522
+ stockAvailable: "stock_available",
523
+ onOffer: "on_offer",
524
+ onSubscription: "on_subscription",
525
+ onPromotion: "on_promotion",
526
+ hasVariant: "has_variant",
527
+ categoryIds: "category_ids",
528
+ reviewsRatingSum: "reviews_rating_sum",
529
+ reviewsCount: "reviews_count",
530
+ variantOptions: "variant_options",
531
+ bundleItems: "bundle_items",
532
+ hsnCode: "hsn_code",
533
+ upsellingProductIds: "upselling_product_ids",
534
+ crosssellingProductIds: "crossselling_product_ids",
535
+ });
536
+ });
537
+
538
+ /**
539
+ * @internal
540
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
541
+ */
542
+ export namespace BundleProductDetail$ {
543
+ /** @deprecated use `BundleProductDetail$inboundSchema` instead. */
544
+ export const inboundSchema = BundleProductDetail$inboundSchema;
545
+ /** @deprecated use `BundleProductDetail$outboundSchema` instead. */
546
+ export const outboundSchema = BundleProductDetail$outboundSchema;
547
+ /** @deprecated use `BundleProductDetail$Outbound` instead. */
548
+ export type Outbound = BundleProductDetail$Outbound;
549
+ }
550
+
551
+ export function bundleProductDetailToJSON(
552
+ bundleProductDetail: BundleProductDetail,
553
+ ): string {
554
+ return JSON.stringify(
555
+ BundleProductDetail$outboundSchema.parse(bundleProductDetail),
556
+ );
557
+ }
558
+
559
+ export function bundleProductDetailFromJSON(
560
+ jsonString: string,
561
+ ): SafeParseResult<BundleProductDetail, SDKValidationError> {
562
+ return safeParse(
563
+ jsonString,
564
+ (x) => BundleProductDetail$inboundSchema.parse(JSON.parse(x)),
565
+ `Failed to parse 'BundleProductDetail' from JSON`,
566
+ );
567
+ }
@@ -26,7 +26,7 @@ import {
26
26
  CustomerAddress$outboundSchema,
27
27
  } from "./customeraddress.js";
28
28
 
29
- export type CartMetadata = {};
29
+ export type Metadata = {};
30
30
 
31
31
  /**
32
32
  * This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
@@ -138,7 +138,7 @@ export type Cart = {
138
138
  /**
139
139
  * Additional metadata associated with the cart. The example includes an empty object in the list.
140
140
  */
141
- metadata?: Array<CartMetadata> | null | undefined;
141
+ metadata?: Array<Metadata> | null | undefined;
142
142
  /**
143
143
  * the expiration timestamp of the shopping cart. .
144
144
  *
@@ -148,46 +148,46 @@ export type Cart = {
148
148
  };
149
149
 
150
150
  /** @internal */
151
- export const CartMetadata$inboundSchema: z.ZodType<
152
- CartMetadata,
151
+ export const Metadata$inboundSchema: z.ZodType<
152
+ Metadata,
153
153
  z.ZodTypeDef,
154
154
  unknown
155
155
  > = z.object({});
156
156
 
157
157
  /** @internal */
158
- export type CartMetadata$Outbound = {};
158
+ export type Metadata$Outbound = {};
159
159
 
160
160
  /** @internal */
161
- export const CartMetadata$outboundSchema: z.ZodType<
162
- CartMetadata$Outbound,
161
+ export const Metadata$outboundSchema: z.ZodType<
162
+ Metadata$Outbound,
163
163
  z.ZodTypeDef,
164
- CartMetadata
164
+ Metadata
165
165
  > = z.object({});
166
166
 
167
167
  /**
168
168
  * @internal
169
169
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
170
170
  */
171
- export namespace CartMetadata$ {
172
- /** @deprecated use `CartMetadata$inboundSchema` instead. */
173
- export const inboundSchema = CartMetadata$inboundSchema;
174
- /** @deprecated use `CartMetadata$outboundSchema` instead. */
175
- export const outboundSchema = CartMetadata$outboundSchema;
176
- /** @deprecated use `CartMetadata$Outbound` instead. */
177
- export type Outbound = CartMetadata$Outbound;
171
+ export namespace Metadata$ {
172
+ /** @deprecated use `Metadata$inboundSchema` instead. */
173
+ export const inboundSchema = Metadata$inboundSchema;
174
+ /** @deprecated use `Metadata$outboundSchema` instead. */
175
+ export const outboundSchema = Metadata$outboundSchema;
176
+ /** @deprecated use `Metadata$Outbound` instead. */
177
+ export type Outbound = Metadata$Outbound;
178
178
  }
179
179
 
180
- export function cartMetadataToJSON(cartMetadata: CartMetadata): string {
181
- return JSON.stringify(CartMetadata$outboundSchema.parse(cartMetadata));
180
+ export function metadataToJSON(metadata: Metadata): string {
181
+ return JSON.stringify(Metadata$outboundSchema.parse(metadata));
182
182
  }
183
183
 
184
- export function cartMetadataFromJSON(
184
+ export function metadataFromJSON(
185
185
  jsonString: string,
186
- ): SafeParseResult<CartMetadata, SDKValidationError> {
186
+ ): SafeParseResult<Metadata, SDKValidationError> {
187
187
  return safeParse(
188
188
  jsonString,
189
- (x) => CartMetadata$inboundSchema.parse(JSON.parse(x)),
190
- `Failed to parse 'CartMetadata' from JSON`,
189
+ (x) => Metadata$inboundSchema.parse(JSON.parse(x)),
190
+ `Failed to parse 'Metadata' from JSON`,
191
191
  );
192
192
  }
193
193
 
@@ -222,7 +222,7 @@ export const Cart$inboundSchema: z.ZodType<Cart, z.ZodTypeDef, unknown> = z
222
222
  billing_address: z.nullable(CustomerAddress$inboundSchema).optional(),
223
223
  shipping_address: z.nullable(CustomerAddress$inboundSchema).optional(),
224
224
  currency: Currency$inboundSchema.optional(),
225
- metadata: z.nullable(z.array(z.lazy(() => CartMetadata$inboundSchema)))
225
+ metadata: z.nullable(z.array(z.lazy(() => Metadata$inboundSchema)))
226
226
  .optional(),
227
227
  expires_at: z.string().datetime({ offset: true }).transform(v =>
228
228
  new Date(v)
@@ -287,7 +287,7 @@ export type Cart$Outbound = {
287
287
  billing_address?: CustomerAddress$Outbound | null | undefined;
288
288
  shipping_address?: CustomerAddress$Outbound | null | undefined;
289
289
  currency?: Currency$Outbound | undefined;
290
- metadata?: Array<CartMetadata$Outbound> | null | undefined;
290
+ metadata?: Array<Metadata$Outbound> | null | undefined;
291
291
  expires_at?: string | undefined;
292
292
  };
293
293
 
@@ -322,7 +322,7 @@ export const Cart$outboundSchema: z.ZodType<Cart$Outbound, z.ZodTypeDef, Cart> =
322
322
  billingAddress: z.nullable(CustomerAddress$outboundSchema).optional(),
323
323
  shippingAddress: z.nullable(CustomerAddress$outboundSchema).optional(),
324
324
  currency: Currency$outboundSchema.optional(),
325
- metadata: z.nullable(z.array(z.lazy(() => CartMetadata$outboundSchema)))
325
+ metadata: z.nullable(z.array(z.lazy(() => Metadata$outboundSchema)))
326
326
  .optional(),
327
327
  expiresAt: z.date().transform(v => v.toISOString()).optional(),
328
328
  }).transform((v) => {