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.
- package/docs/sdks/auth/README.md +2 -0
- package/docs/sdks/carts/README.md +22 -12
- package/docs/sdks/cestorefrontuser/README.md +30 -2
- package/docs/sdks/checkout/README.md +4 -0
- package/esm/funcs/cartsAddItem.js +1 -1
- package/esm/funcs/cartsAddItem.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/config.js.map +1 -1
- package/esm/models/components/anonymoususer.d.ts +14 -14
- package/esm/models/components/anonymoususer.d.ts.map +1 -1
- package/esm/models/components/anonymoususer.js +14 -14
- package/esm/models/components/anonymoususer.js.map +1 -1
- package/esm/models/components/associatedoption.d.ts +4 -102
- package/esm/models/components/associatedoption.d.ts.map +1 -1
- package/esm/models/components/associatedoption.js +4 -82
- package/esm/models/components/associatedoption.js.map +1 -1
- package/esm/models/components/bundleproduct.d.ts +48 -48
- package/esm/models/components/bundleproduct.d.ts.map +1 -1
- package/esm/models/components/bundleproduct.js +46 -50
- package/esm/models/components/bundleproduct.js.map +1 -1
- package/esm/models/components/bundleproductdetail.d.ts +66 -66
- package/esm/models/components/bundleproductdetail.d.ts.map +1 -1
- package/esm/models/components/bundleproductdetail.js +62 -66
- package/esm/models/components/bundleproductdetail.js.map +1 -1
- package/esm/models/components/coloroption.d.ts +72 -0
- package/esm/models/components/coloroption.d.ts.map +1 -0
- package/esm/models/components/coloroption.js +62 -0
- package/esm/models/components/coloroption.js.map +1 -0
- package/esm/models/components/currency.d.ts +6 -6
- package/esm/models/components/currency.d.ts.map +1 -1
- package/esm/models/components/currency.js +6 -6
- package/esm/models/components/currency.js.map +1 -1
- package/esm/models/components/index.d.ts +3 -1
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +3 -1
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/notificationpreferences.d.ts +6 -6
- package/esm/models/components/notificationpreferences.d.ts.map +1 -1
- package/esm/models/components/notificationpreferences.js +6 -6
- package/esm/models/components/notificationpreferences.js.map +1 -1
- package/esm/models/components/pagination.d.ts +8 -8
- package/esm/models/components/pagination.d.ts.map +1 -1
- package/esm/models/components/pagination.js +8 -8
- package/esm/models/components/pagination.js.map +1 -1
- package/esm/models/components/productattribute.d.ts +2 -2
- package/esm/models/components/productattribute.d.ts.map +1 -1
- package/esm/models/components/productattribute.js +2 -2
- package/esm/models/components/productattribute.js.map +1 -1
- package/esm/models/components/productcategory.d.ts +20 -20
- package/esm/models/components/productcategory.d.ts.map +1 -1
- package/esm/models/components/productcategory.js +20 -20
- package/esm/models/components/productcategory.js.map +1 -1
- package/esm/models/components/productdetail.d.ts +2 -14
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +4 -18
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/components/productimage.d.ts +14 -14
- package/esm/models/components/productimage.d.ts.map +1 -1
- package/esm/models/components/productimage.js +14 -14
- package/esm/models/components/productimage.js.map +1 -1
- package/esm/models/components/productpricing.d.ts +4 -4
- package/esm/models/components/productpricing.d.ts.map +1 -1
- package/esm/models/components/productpricing.js +4 -4
- package/esm/models/components/productpricing.js.map +1 -1
- package/esm/models/components/productshipping.d.ts +12 -12
- package/esm/models/components/productshipping.d.ts.map +1 -1
- package/esm/models/components/productshipping.js +12 -12
- package/esm/models/components/productshipping.js.map +1 -1
- package/esm/models/components/productvideo.d.ts +16 -16
- package/esm/models/components/productvideo.d.ts.map +1 -1
- package/esm/models/components/productvideo.js +16 -16
- package/esm/models/components/productvideo.js.map +1 -1
- package/esm/models/components/seo.d.ts +8 -8
- package/esm/models/components/seo.d.ts.map +1 -1
- package/esm/models/components/seo.js +8 -8
- package/esm/models/components/seo.js.map +1 -1
- package/esm/models/components/singleproduct.d.ts +18 -18
- package/esm/models/components/singleproduct.d.ts.map +1 -1
- package/esm/models/components/singleproduct.js +18 -18
- package/esm/models/components/singleproduct.js.map +1 -1
- package/esm/models/components/singleproductdetail.d.ts +36 -36
- package/esm/models/components/singleproductdetail.d.ts.map +1 -1
- package/esm/models/components/singleproductdetail.js +34 -34
- package/esm/models/components/singleproductdetail.js.map +1 -1
- package/esm/models/components/singleselectoption.d.ts +42 -0
- package/esm/models/components/singleselectoption.d.ts.map +1 -0
- package/esm/models/components/singleselectoption.js +35 -0
- package/esm/models/components/singleselectoption.js.map +1 -0
- package/esm/models/components/sku.d.ts +30 -30
- package/esm/models/components/sku.d.ts.map +1 -1
- package/esm/models/components/sku.js +28 -30
- package/esm/models/components/sku.js.map +1 -1
- package/esm/models/components/updatecartitem.d.ts +45 -0
- package/esm/models/components/updatecartitem.d.ts.map +1 -0
- package/esm/models/components/updatecartitem.js +46 -0
- package/esm/models/components/updatecartitem.js.map +1 -0
- package/esm/models/components/user.d.ts +116 -26
- package/esm/models/components/user.d.ts.map +1 -1
- package/esm/models/components/user.js +104 -30
- package/esm/models/components/user.js.map +1 -1
- package/esm/models/components/variant.d.ts +15 -12
- package/esm/models/components/variant.d.ts.map +1 -1
- package/esm/models/components/variant.js +12 -12
- package/esm/models/components/variant.js.map +1 -1
- package/esm/models/components/variantdetail.d.ts +41 -38
- package/esm/models/components/variantdetail.d.ts.map +1 -1
- package/esm/models/components/variantdetail.js +36 -36
- package/esm/models/components/variantdetail.js.map +1 -1
- package/esm/models/components/variantoption.d.ts +34 -26
- package/esm/models/components/variantoption.d.ts.map +1 -1
- package/esm/models/components/variantoption.js +32 -45
- package/esm/models/components/variantoption.js.map +1 -1
- package/esm/models/operations/getcrosssell.d.ts +6 -6
- package/esm/models/operations/getcrosssell.d.ts.map +1 -1
- package/esm/models/operations/getcrosssell.js +6 -6
- package/esm/models/operations/getcrosssell.js.map +1 -1
- package/esm/models/operations/getproductscategories.d.ts +4 -4
- package/esm/models/operations/getproductscategories.d.ts.map +1 -1
- package/esm/models/operations/getproductscategories.js +4 -4
- package/esm/models/operations/getproductscategories.js.map +1 -1
- package/esm/models/operations/getproductsidreviews.d.ts +4 -4
- package/esm/models/operations/getproductsidreviews.d.ts.map +1 -1
- package/esm/models/operations/getproductsidreviews.js +4 -4
- package/esm/models/operations/getproductsidreviews.js.map +1 -1
- package/esm/models/operations/getsimilar.d.ts +6 -6
- package/esm/models/operations/getsimilar.d.ts.map +1 -1
- package/esm/models/operations/getsimilar.js +6 -6
- package/esm/models/operations/getsimilar.js.map +1 -1
- package/esm/models/operations/getskus.d.ts +4 -4
- package/esm/models/operations/getskus.d.ts.map +1 -1
- package/esm/models/operations/getskus.js +4 -4
- package/esm/models/operations/getskus.js.map +1 -1
- package/esm/models/operations/getupsell.d.ts +6 -6
- package/esm/models/operations/getupsell.d.ts.map +1 -1
- package/esm/models/operations/getupsell.js +6 -6
- package/esm/models/operations/getupsell.js.map +1 -1
- package/esm/models/operations/postauthanonymous.d.ts +12 -12
- package/esm/models/operations/postauthanonymous.d.ts.map +1 -1
- package/esm/models/operations/postauthanonymous.js +12 -12
- package/esm/models/operations/postauthanonymous.js.map +1 -1
- package/esm/models/operations/postauthgenerateotp.d.ts +2 -2
- package/esm/models/operations/postauthgenerateotp.d.ts.map +1 -1
- package/esm/models/operations/postauthgenerateotp.js +2 -2
- package/esm/models/operations/postauthgenerateotp.js.map +1 -1
- package/esm/models/operations/postcartaddress.d.ts +8 -8
- package/esm/models/operations/postcartaddress.d.ts.map +1 -1
- package/esm/models/operations/postcartaddress.js +8 -12
- package/esm/models/operations/postcartaddress.js.map +1 -1
- package/esm/models/operations/postcartitemid.d.ts +2 -35
- package/esm/models/operations/postcartitemid.d.ts.map +1 -1
- package/esm/models/operations/postcartitemid.js +4 -49
- package/esm/models/operations/postcartitemid.js.map +1 -1
- package/esm/models/operations/postcartsid.d.ts +5 -31
- package/esm/models/operations/postcartsid.d.ts.map +1 -1
- package/esm/models/operations/postcartsid.js +2 -41
- package/esm/models/operations/postcartsid.js.map +1 -1
- package/esm/models/operations/postproductsidreviews.d.ts +4 -4
- package/esm/models/operations/postproductsidreviews.d.ts.map +1 -1
- package/esm/models/operations/postproductsidreviews.js +4 -4
- package/esm/models/operations/postproductsidreviews.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/cartsAddItem.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/anonymoususer.ts +28 -28
- package/src/models/components/associatedoption.ts +19 -164
- package/src/models/components/bundleproduct.ts +92 -99
- package/src/models/components/bundleproductdetail.ts +124 -131
- package/src/models/components/coloroption.ts +144 -0
- package/src/models/components/currency.ts +12 -12
- package/src/models/components/index.ts +3 -1
- package/src/models/components/notificationpreferences.ts +12 -12
- package/src/models/components/pagination.ts +16 -16
- package/src/models/components/productattribute.ts +4 -4
- package/src/models/components/productcategory.ts +40 -40
- package/src/models/components/productdetail.ts +7 -37
- package/src/models/components/productimage.ts +28 -28
- package/src/models/components/productpricing.ts +8 -8
- package/src/models/components/productshipping.ts +24 -24
- package/src/models/components/productvideo.ts +32 -32
- package/src/models/components/seo.ts +16 -16
- package/src/models/components/singleproduct.ts +36 -36
- package/src/models/components/singleproductdetail.ts +68 -68
- package/src/models/components/singleselectoption.ts +83 -0
- package/src/models/components/sku.ts +56 -61
- package/src/models/components/updatecartitem.ts +93 -0
- package/src/models/components/user.ts +199 -56
- package/src/models/components/variant.ts +27 -24
- package/src/models/components/variantdetail.ts +75 -72
- package/src/models/components/variantoption.ts +54 -61
- package/src/models/operations/getcrosssell.ts +12 -12
- package/src/models/operations/getproductscategories.ts +8 -8
- package/src/models/operations/getproductsidreviews.ts +8 -8
- package/src/models/operations/getsimilar.ts +12 -12
- package/src/models/operations/getskus.ts +8 -8
- package/src/models/operations/getupsell.ts +12 -12
- package/src/models/operations/postauthanonymous.ts +24 -24
- package/src/models/operations/postauthgenerateotp.ts +4 -4
- package/src/models/operations/postcartaddress.ts +16 -23
- package/src/models/operations/postcartitemid.ts +6 -94
- package/src/models/operations/postcartsid.ts +7 -72
- package/src/models/operations/postproductsidreviews.ts +8 -8
- package/esm/models/components/userinput.d.ts +0 -63
- package/esm/models/components/userinput.d.ts.map +0 -1
- package/esm/models/components/userinput.js +0 -61
- package/esm/models/components/userinput.js.map +0 -1
- 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
|
|
93
|
+
variantId: string | null;
|
|
94
94
|
sku: string;
|
|
95
|
-
slug
|
|
95
|
+
slug: string | null;
|
|
96
96
|
productName: string;
|
|
97
|
-
variantName
|
|
97
|
+
variantName: string | null;
|
|
98
98
|
productType: BundleProductDetailBundleItemsProductType;
|
|
99
|
-
shortDescription
|
|
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
|
|
109
|
-
tags
|
|
110
|
-
reviewsCount
|
|
111
|
-
reviewsRatingSum
|
|
112
|
-
attributes
|
|
113
|
-
images
|
|
114
|
-
pricing
|
|
115
|
-
promotion
|
|
116
|
-
subscription
|
|
117
|
-
associatedOptions
|
|
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
|
|
125
|
+
sku: string | null;
|
|
126
126
|
name: string;
|
|
127
|
-
slug: string;
|
|
128
|
-
shortDescription
|
|
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
|
|
152
|
-
categoryIds
|
|
153
|
-
reviewsRatingSum
|
|
154
|
-
reviewsCount
|
|
155
|
-
attributes
|
|
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
|
|
165
|
-
description
|
|
166
|
-
hsnCode
|
|
167
|
-
videos
|
|
168
|
-
shipping
|
|
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
|
|
172
|
+
upsellingProductIds: Array<string>;
|
|
173
173
|
/**
|
|
174
174
|
* An array of product ULIDs
|
|
175
175
|
*/
|
|
176
|
-
crosssellingProductIds
|
|
177
|
-
seo
|
|
178
|
-
metadata
|
|
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())
|
|
233
|
+
variant_id: z.nullable(z.string()),
|
|
234
234
|
sku: z.string(),
|
|
235
|
-
slug: z.
|
|
235
|
+
slug: z.nullable(z.string()),
|
|
236
236
|
product_name: z.string(),
|
|
237
|
-
variant_name: z.nullable(z.string())
|
|
237
|
+
variant_name: z.nullable(z.string()),
|
|
238
238
|
product_type: BundleProductDetailBundleItemsProductType$inboundSchema,
|
|
239
|
-
short_description: z.
|
|
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())
|
|
246
|
-
tags: z.array(z.string())
|
|
247
|
-
reviews_count: z.number().int()
|
|
248
|
-
reviews_rating_sum: z.
|
|
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))
|
|
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
|
|
278
|
+
variant_id: string | null;
|
|
280
279
|
sku: string;
|
|
281
|
-
slug
|
|
280
|
+
slug: string | null;
|
|
282
281
|
product_name: string;
|
|
283
|
-
variant_name
|
|
282
|
+
variant_name: string | null;
|
|
284
283
|
product_type: string;
|
|
285
|
-
short_description
|
|
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
|
|
292
|
-
tags
|
|
293
|
-
reviews_count
|
|
294
|
-
reviews_rating_sum
|
|
295
|
-
attributes
|
|
296
|
-
images
|
|
297
|
-
pricing
|
|
298
|
-
promotion
|
|
299
|
-
subscription
|
|
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())
|
|
310
|
+
variantId: z.nullable(z.string()),
|
|
315
311
|
sku: z.string(),
|
|
316
|
-
slug: z.
|
|
312
|
+
slug: z.nullable(z.string()),
|
|
317
313
|
productName: z.string(),
|
|
318
|
-
variantName: z.nullable(z.string())
|
|
314
|
+
variantName: z.nullable(z.string()),
|
|
319
315
|
productType: BundleProductDetailBundleItemsProductType$outboundSchema,
|
|
320
|
-
shortDescription: z.
|
|
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())
|
|
327
|
-
tags: z.array(z.string())
|
|
328
|
-
reviewsCount: z.number().int()
|
|
329
|
-
reviewsRatingSum: z.
|
|
330
|
-
attributes: z.array(ProductAttribute$outboundSchema)
|
|
331
|
-
images: z.array(ProductImage$outboundSchema)
|
|
332
|
-
pricing: ProductPricing$outboundSchema
|
|
333
|
-
promotion: z.nullable(ProductPromotion$outboundSchema)
|
|
334
|
-
subscription: z.array(ProductSubscription$outboundSchema)
|
|
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.
|
|
389
|
+
sku: z.nullable(z.string()),
|
|
395
390
|
name: z.string(),
|
|
396
|
-
slug: z.string(),
|
|
397
|
-
short_description: z.
|
|
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()))
|
|
406
|
-
category_ids: z.array(z.string())
|
|
407
|
-
reviews_rating_sum: z.number()
|
|
408
|
-
reviews_count: z.number().int()
|
|
409
|
-
attributes: z.array(ProductAttribute$inboundSchema)
|
|
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
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
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
|
|
442
|
+
sku: string | null;
|
|
449
443
|
name: string;
|
|
450
|
-
slug: string;
|
|
451
|
-
short_description
|
|
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
|
|
460
|
-
category_ids
|
|
461
|
-
reviews_rating_sum
|
|
462
|
-
reviews_count
|
|
463
|
-
attributes
|
|
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
|
|
470
|
-
description
|
|
471
|
-
hsn_code
|
|
472
|
-
videos
|
|
473
|
-
shipping
|
|
474
|
-
upselling_product_ids
|
|
475
|
-
crossselling_product_ids
|
|
476
|
-
seo
|
|
477
|
-
metadata
|
|
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.
|
|
481
|
+
sku: z.nullable(z.string()),
|
|
488
482
|
name: z.string(),
|
|
489
|
-
slug: z.string(),
|
|
490
|
-
shortDescription: z.
|
|
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()))
|
|
499
|
-
categoryIds: z.array(z.string())
|
|
500
|
-
reviewsRatingSum: z.number()
|
|
501
|
-
reviewsCount: z.number().int()
|
|
502
|
-
attributes: z.array(ProductAttribute$outboundSchema)
|
|
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
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
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
|
|
12
|
-
code
|
|
13
|
-
symbol
|
|
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()
|
|
23
|
-
code: z.string()
|
|
24
|
-
symbol: z.string()
|
|
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
|
|
30
|
-
code
|
|
31
|
-
symbol
|
|
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()
|
|
41
|
-
code: z.string()
|
|
42
|
-
symbol: z.string()
|
|
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
|
|
23
|
+
transactional: NotificationChannelPreferences;
|
|
24
24
|
/**
|
|
25
25
|
* Set specific channel preferences
|
|
26
26
|
*/
|
|
27
|
-
promotional
|
|
27
|
+
promotional: NotificationChannelPreferences;
|
|
28
28
|
/**
|
|
29
29
|
* Set specific channel preferences
|
|
30
30
|
*/
|
|
31
|
-
newsletter
|
|
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
|
|
41
|
-
promotional: NotificationChannelPreferences$inboundSchema
|
|
42
|
-
newsletter: NotificationChannelPreferences$inboundSchema
|
|
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
|
|
48
|
-
promotional
|
|
49
|
-
newsletter
|
|
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
|
|
59
|
-
promotional: NotificationChannelPreferences$outboundSchema
|
|
60
|
-
newsletter: NotificationChannelPreferences$outboundSchema
|
|
58
|
+
transactional: NotificationChannelPreferences$outboundSchema,
|
|
59
|
+
promotional: NotificationChannelPreferences$outboundSchema,
|
|
60
|
+
newsletter: NotificationChannelPreferences$outboundSchema,
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
/**
|