ce-storefront 0.3.6 → 0.3.8

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 (67) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/components/bundleproduct.d.ts +236 -0
  4. package/esm/models/components/bundleproduct.d.ts.map +1 -0
  5. package/esm/models/components/bundleproduct.js +262 -0
  6. package/esm/models/components/bundleproduct.js.map +1 -0
  7. package/esm/models/components/bundleproductdetail.d.ts +265 -0
  8. package/esm/models/components/bundleproductdetail.d.ts.map +1 -0
  9. package/esm/models/components/bundleproductdetail.js +288 -0
  10. package/esm/models/components/bundleproductdetail.js.map +1 -0
  11. package/esm/models/components/index.d.ts +4 -1
  12. package/esm/models/components/index.d.ts.map +1 -1
  13. package/esm/models/components/index.js +4 -1
  14. package/esm/models/components/index.js.map +1 -1
  15. package/esm/models/components/productdetail.d.ts +16 -86
  16. package/esm/models/components/productdetail.d.ts.map +1 -1
  17. package/esm/models/components/productdetail.js +20 -88
  18. package/esm/models/components/productdetail.js.map +1 -1
  19. package/esm/models/components/productlistresponse.d.ts +6 -5
  20. package/esm/models/components/productlistresponse.d.ts.map +1 -1
  21. package/esm/models/components/productlistresponse.js +6 -5
  22. package/esm/models/components/productlistresponse.js.map +1 -1
  23. package/esm/models/components/productpricing.d.ts +12 -12
  24. package/esm/models/components/productpricing.d.ts.map +1 -1
  25. package/esm/models/components/productpricing.js +12 -12
  26. package/esm/models/components/productpricing.js.map +1 -1
  27. package/esm/models/components/productshipping.d.ts +13 -13
  28. package/esm/models/components/productshipping.d.ts.map +1 -1
  29. package/esm/models/components/productshipping.js +14 -14
  30. package/esm/models/components/productshipping.js.map +1 -1
  31. package/esm/models/components/{product.d.ts → singleproduct.d.ts} +39 -24
  32. package/esm/models/components/singleproduct.d.ts.map +1 -0
  33. package/esm/models/components/{product.js → singleproduct.js} +24 -25
  34. package/esm/models/components/singleproduct.js.map +1 -0
  35. package/esm/models/components/singleproductdetail.d.ts +159 -0
  36. package/esm/models/components/singleproductdetail.d.ts.map +1 -0
  37. package/esm/models/components/singleproductdetail.js +156 -0
  38. package/esm/models/components/singleproductdetail.js.map +1 -0
  39. package/esm/models/components/sku.d.ts +7 -4
  40. package/esm/models/components/sku.d.ts.map +1 -1
  41. package/esm/models/components/sku.js +6 -4
  42. package/esm/models/components/sku.js.map +1 -1
  43. package/esm/models/components/variant.d.ts +39 -30
  44. package/esm/models/components/variant.d.ts.map +1 -1
  45. package/esm/models/components/variant.js +38 -31
  46. package/esm/models/components/variant.js.map +1 -1
  47. package/esm/models/components/variantdetail.d.ts +89 -27
  48. package/esm/models/components/variantdetail.d.ts.map +1 -1
  49. package/esm/models/components/variantdetail.js +93 -28
  50. package/esm/models/components/variantdetail.js.map +1 -1
  51. package/jsr.json +1 -1
  52. package/package.json +1 -1
  53. package/src/lib/config.ts +2 -2
  54. package/src/models/components/bundleproduct.ts +501 -0
  55. package/src/models/components/bundleproductdetail.ts +567 -0
  56. package/src/models/components/index.ts +4 -1
  57. package/src/models/components/productdetail.ts +50 -198
  58. package/src/models/components/productlistresponse.ts +23 -13
  59. package/src/models/components/productpricing.ts +24 -24
  60. package/src/models/components/productshipping.ts +27 -27
  61. package/src/models/components/{product.ts → singleproduct.ts} +90 -73
  62. package/src/models/components/singleproductdetail.ts +339 -0
  63. package/src/models/components/sku.ts +16 -8
  64. package/src/models/components/variant.ts +75 -59
  65. package/src/models/components/variantdetail.ts +168 -55
  66. package/esm/models/components/product.d.ts.map +0 -1
  67. package/esm/models/components/product.js.map +0 -1
@@ -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;
157
+ /**
158
+ * this will be used if has_variant is true, to auto set default values.
159
+ */
160
+ variantOptions: Array<VariantOption> | null;
161
+ promotion: ProductPromotion | null;
162
+ images: Array<ProductImage>;
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;
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,
411
+ variant_options: z.nullable(z.array(VariantOption$inboundSchema)),
412
+ promotion: z.nullable(ProductPromotion$inboundSchema),
413
+ images: z.array(ProductImage$inboundSchema),
414
+ 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(),
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;
465
+ variant_options: Array<VariantOption$Outbound> | null;
466
+ promotion: ProductPromotion$Outbound | null;
467
+ images: Array<ProductImage$Outbound>;
468
+ 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;
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,
504
+ variantOptions: z.nullable(z.array(VariantOption$outboundSchema)),
505
+ promotion: z.nullable(ProductPromotion$outboundSchema),
506
+ images: z.array(ProductImage$outboundSchema),
507
+ 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(),
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
+ }
@@ -6,6 +6,8 @@ export * from "./analyticsevent.js";
6
6
  export * from "./anonymoususer.js";
7
7
  export * from "./associatedoption.js";
8
8
  export * from "./banktransfer.js";
9
+ export * from "./bundleproduct.js";
10
+ export * from "./bundleproductdetail.js";
9
11
  export * from "./business.js";
10
12
  export * from "./cardpayment.js";
11
13
  export * from "./cart.js";
@@ -52,7 +54,6 @@ export * from "./payupaymentinfo.js";
52
54
  export * from "./payupaymentmethod.js";
53
55
  export * from "./payusavedcard.js";
54
56
  export * from "./pincode.js";
55
- export * from "./product.js";
56
57
  export * from "./productattribute.js";
57
58
  export * from "./productcategory.js";
58
59
  export * from "./productdetail.js";
@@ -68,6 +69,8 @@ export * from "./promotiondetail.js";
68
69
  export * from "./security.js";
69
70
  export * from "./seo.js";
70
71
  export * from "./shipmentitem.js";
72
+ export * from "./singleproduct.js";
73
+ export * from "./singleproductdetail.js";
71
74
  export * from "./sku.js";
72
75
  export * from "./updatecustomer.js";
73
76
  export * from "./upipayment.js";