ce-storefront 0.3.19 → 0.4.1
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/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/cartitem.d.ts +4 -4
- package/esm/models/components/cartitem.d.ts.map +1 -1
- package/esm/models/components/cartitem.js +8 -8
- package/esm/models/components/cartitem.js.map +1 -1
- package/esm/models/components/index.d.ts +3 -5
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +3 -5
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/{singleproduct.d.ts → product.d.ts} +23 -20
- package/esm/models/components/product.d.ts.map +1 -0
- package/esm/models/components/{singleproduct.js → product.js} +31 -26
- package/esm/models/components/product.js.map +1 -0
- package/esm/models/components/productbundleitem.d.ts +142 -0
- package/esm/models/components/productbundleitem.d.ts.map +1 -0
- package/esm/models/components/productbundleitem.js +171 -0
- package/esm/models/components/productbundleitem.js.map +1 -0
- package/esm/models/components/productdetail.d.ts +139 -4
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +136 -10
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/components/productimage.d.ts +2 -0
- package/esm/models/components/productimage.d.ts.map +1 -1
- package/esm/models/components/productimage.js +2 -0
- package/esm/models/components/productimage.js.map +1 -1
- package/esm/models/components/productlist.d.ts +36 -0
- package/esm/models/components/productlist.d.ts.map +1 -0
- package/esm/models/components/productlist.js +35 -0
- package/esm/models/components/productlist.js.map +1 -0
- package/esm/models/components/sku.d.ts +5 -5
- package/esm/models/components/sku.d.ts.map +1 -1
- package/esm/models/components/sku.js +10 -10
- package/esm/models/components/sku.js.map +1 -1
- package/esm/models/components/variant.d.ts +3 -3
- package/esm/models/components/variant.d.ts.map +1 -1
- package/esm/models/components/variant.js +6 -6
- package/esm/models/components/variant.js.map +1 -1
- package/esm/models/components/variantdetail.d.ts +3 -3
- package/esm/models/components/variantdetail.d.ts.map +1 -1
- package/esm/models/components/variantdetail.js +6 -6
- package/esm/models/components/variantdetail.js.map +1 -1
- package/esm/models/operations/getcrosssell.d.ts +2 -2
- package/esm/models/operations/getcrosssell.d.ts.map +1 -1
- package/esm/models/operations/getcrosssell.js +2 -2
- package/esm/models/operations/getcrosssell.js.map +1 -1
- package/esm/models/operations/getproducts.d.ts +32 -2
- package/esm/models/operations/getproducts.d.ts.map +1 -1
- package/esm/models/operations/getproducts.js +29 -2
- package/esm/models/operations/getproducts.js.map +1 -1
- package/esm/models/operations/getsimilar.d.ts +2 -2
- package/esm/models/operations/getsimilar.d.ts.map +1 -1
- package/esm/models/operations/getsimilar.js +2 -2
- package/esm/models/operations/getsimilar.js.map +1 -1
- package/esm/models/operations/getskus.d.ts +15 -15
- package/esm/models/operations/getskus.d.ts.map +1 -1
- package/esm/models/operations/getskus.js +15 -15
- package/esm/models/operations/getskus.js.map +1 -1
- package/esm/models/operations/getupsell.d.ts +2 -2
- package/esm/models/operations/getupsell.d.ts.map +1 -1
- package/esm/models/operations/getupsell.js +2 -2
- package/esm/models/operations/getupsell.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/models/components/cartitem.ts +12 -12
- package/src/models/components/index.ts +3 -5
- package/src/models/components/{singleproduct.ts → product.ts} +81 -72
- package/src/models/components/productbundleitem.ts +329 -0
- package/src/models/components/productdetail.ts +295 -22
- package/src/models/components/productimage.ts +4 -0
- package/src/models/components/productlist.ts +81 -0
- package/src/models/components/sku.ts +15 -15
- package/src/models/components/variant.ts +9 -9
- package/src/models/components/variantdetail.ts +9 -9
- package/src/models/operations/getcrosssell.ts +4 -4
- package/src/models/operations/getproducts.ts +62 -4
- package/src/models/operations/getsimilar.ts +4 -4
- package/src/models/operations/getskus.ts +30 -27
- package/src/models/operations/getupsell.ts +4 -4
- package/esm/models/components/bundleproduct.d.ts +0 -236
- package/esm/models/components/bundleproduct.d.ts.map +0 -1
- package/esm/models/components/bundleproduct.js +0 -258
- package/esm/models/components/bundleproduct.js.map +0 -1
- package/esm/models/components/bundleproductdetail.d.ts +0 -265
- package/esm/models/components/bundleproductdetail.d.ts.map +0 -1
- package/esm/models/components/bundleproductdetail.js +0 -284
- package/esm/models/components/bundleproductdetail.js.map +0 -1
- package/esm/models/components/productlistresponse.d.ts +0 -58
- package/esm/models/components/productlistresponse.d.ts.map +0 -1
- package/esm/models/components/productlistresponse.js +0 -57
- package/esm/models/components/productlistresponse.js.map +0 -1
- package/esm/models/components/singleproduct.d.ts.map +0 -1
- package/esm/models/components/singleproduct.js.map +0 -1
- package/esm/models/components/singleproductdetail.d.ts +0 -159
- package/esm/models/components/singleproductdetail.d.ts.map +0 -1
- package/esm/models/components/singleproductdetail.js +0 -156
- package/esm/models/components/singleproductdetail.js.map +0 -1
- package/src/models/components/bundleproduct.ts +0 -494
- package/src/models/components/bundleproductdetail.ts +0 -560
- package/src/models/components/productlistresponse.ts +0 -141
- package/src/models/components/singleproductdetail.ts +0 -339
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { AssociatedOption$inboundSchema, AssociatedOption$outboundSchema, } from "./associatedoption.js";
|
|
8
|
+
import { ProductAttribute$inboundSchema, ProductAttribute$outboundSchema, } from "./productattribute.js";
|
|
9
|
+
import { ProductImage$inboundSchema, ProductImage$outboundSchema, } from "./productimage.js";
|
|
10
|
+
import { ProductPricing$inboundSchema, ProductPricing$outboundSchema, } from "./productpricing.js";
|
|
11
|
+
import { ProductPromotion$inboundSchema, ProductPromotion$outboundSchema, } from "./productpromotion.js";
|
|
12
|
+
import { ProductSubscription$inboundSchema, ProductSubscription$outboundSchema, } from "./productsubscription.js";
|
|
13
|
+
export const ProductBundleItemProductType = {
|
|
14
|
+
Physical: "physical",
|
|
15
|
+
Digital: "digital",
|
|
16
|
+
Bundle: "bundle",
|
|
17
|
+
};
|
|
18
|
+
/** @internal */
|
|
19
|
+
export const ProductBundleItemProductType$inboundSchema = z.nativeEnum(ProductBundleItemProductType);
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ProductBundleItemProductType$outboundSchema = ProductBundleItemProductType$inboundSchema;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
25
|
+
*/
|
|
26
|
+
export var ProductBundleItemProductType$;
|
|
27
|
+
(function (ProductBundleItemProductType$) {
|
|
28
|
+
/** @deprecated use `ProductBundleItemProductType$inboundSchema` instead. */
|
|
29
|
+
ProductBundleItemProductType$.inboundSchema = ProductBundleItemProductType$inboundSchema;
|
|
30
|
+
/** @deprecated use `ProductBundleItemProductType$outboundSchema` instead. */
|
|
31
|
+
ProductBundleItemProductType$.outboundSchema = ProductBundleItemProductType$outboundSchema;
|
|
32
|
+
})(ProductBundleItemProductType$ || (ProductBundleItemProductType$ = {}));
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const ProductBundleItemSKU$inboundSchema = z.object({
|
|
35
|
+
quantity: z.number().int(),
|
|
36
|
+
product_id: z.string(),
|
|
37
|
+
variant_id: z.nullable(z.string()),
|
|
38
|
+
sku: z.string(),
|
|
39
|
+
slug: z.nullable(z.string()),
|
|
40
|
+
product_name: z.string(),
|
|
41
|
+
variant_name: z.nullable(z.string()),
|
|
42
|
+
product_type: ProductBundleItemProductType$inboundSchema,
|
|
43
|
+
short_description: z.nullable(z.string()),
|
|
44
|
+
active: z.boolean(),
|
|
45
|
+
stock_available: z.boolean(),
|
|
46
|
+
on_offer: z.boolean(),
|
|
47
|
+
on_subscription: z.boolean(),
|
|
48
|
+
on_promotion: z.boolean(),
|
|
49
|
+
category_ids: z.array(z.string()),
|
|
50
|
+
tags: z.nullable(z.array(z.string())),
|
|
51
|
+
reviews_count: z.number().int(),
|
|
52
|
+
reviews_rating_sum: z.nullable(z.number()),
|
|
53
|
+
attributes: z.array(ProductAttribute$inboundSchema),
|
|
54
|
+
images: z.array(ProductImage$inboundSchema),
|
|
55
|
+
pricing: ProductPricing$inboundSchema,
|
|
56
|
+
promotion: z.nullable(ProductPromotion$inboundSchema),
|
|
57
|
+
subscription: z.array(ProductSubscription$inboundSchema),
|
|
58
|
+
associated_options: z.nullable(z.record(AssociatedOption$inboundSchema)),
|
|
59
|
+
}).transform((v) => {
|
|
60
|
+
return remap$(v, {
|
|
61
|
+
"product_id": "productId",
|
|
62
|
+
"variant_id": "variantId",
|
|
63
|
+
"product_name": "productName",
|
|
64
|
+
"variant_name": "variantName",
|
|
65
|
+
"product_type": "productType",
|
|
66
|
+
"short_description": "shortDescription",
|
|
67
|
+
"stock_available": "stockAvailable",
|
|
68
|
+
"on_offer": "onOffer",
|
|
69
|
+
"on_subscription": "onSubscription",
|
|
70
|
+
"on_promotion": "onPromotion",
|
|
71
|
+
"category_ids": "categoryIds",
|
|
72
|
+
"reviews_count": "reviewsCount",
|
|
73
|
+
"reviews_rating_sum": "reviewsRatingSum",
|
|
74
|
+
"associated_options": "associatedOptions",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const ProductBundleItemSKU$outboundSchema = z.object({
|
|
79
|
+
quantity: z.number().int(),
|
|
80
|
+
productId: z.string(),
|
|
81
|
+
variantId: z.nullable(z.string()),
|
|
82
|
+
sku: z.string(),
|
|
83
|
+
slug: z.nullable(z.string()),
|
|
84
|
+
productName: z.string(),
|
|
85
|
+
variantName: z.nullable(z.string()),
|
|
86
|
+
productType: ProductBundleItemProductType$outboundSchema,
|
|
87
|
+
shortDescription: z.nullable(z.string()),
|
|
88
|
+
active: z.boolean(),
|
|
89
|
+
stockAvailable: z.boolean(),
|
|
90
|
+
onOffer: z.boolean(),
|
|
91
|
+
onSubscription: z.boolean(),
|
|
92
|
+
onPromotion: z.boolean(),
|
|
93
|
+
categoryIds: z.array(z.string()),
|
|
94
|
+
tags: z.nullable(z.array(z.string())),
|
|
95
|
+
reviewsCount: z.number().int(),
|
|
96
|
+
reviewsRatingSum: z.nullable(z.number()),
|
|
97
|
+
attributes: z.array(ProductAttribute$outboundSchema),
|
|
98
|
+
images: z.array(ProductImage$outboundSchema),
|
|
99
|
+
pricing: ProductPricing$outboundSchema,
|
|
100
|
+
promotion: z.nullable(ProductPromotion$outboundSchema),
|
|
101
|
+
subscription: z.array(ProductSubscription$outboundSchema),
|
|
102
|
+
associatedOptions: z.nullable(z.record(AssociatedOption$outboundSchema)),
|
|
103
|
+
}).transform((v) => {
|
|
104
|
+
return remap$(v, {
|
|
105
|
+
productId: "product_id",
|
|
106
|
+
variantId: "variant_id",
|
|
107
|
+
productName: "product_name",
|
|
108
|
+
variantName: "variant_name",
|
|
109
|
+
productType: "product_type",
|
|
110
|
+
shortDescription: "short_description",
|
|
111
|
+
stockAvailable: "stock_available",
|
|
112
|
+
onOffer: "on_offer",
|
|
113
|
+
onSubscription: "on_subscription",
|
|
114
|
+
onPromotion: "on_promotion",
|
|
115
|
+
categoryIds: "category_ids",
|
|
116
|
+
reviewsCount: "reviews_count",
|
|
117
|
+
reviewsRatingSum: "reviews_rating_sum",
|
|
118
|
+
associatedOptions: "associated_options",
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
/**
|
|
122
|
+
* @internal
|
|
123
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
124
|
+
*/
|
|
125
|
+
export var ProductBundleItemSKU$;
|
|
126
|
+
(function (ProductBundleItemSKU$) {
|
|
127
|
+
/** @deprecated use `ProductBundleItemSKU$inboundSchema` instead. */
|
|
128
|
+
ProductBundleItemSKU$.inboundSchema = ProductBundleItemSKU$inboundSchema;
|
|
129
|
+
/** @deprecated use `ProductBundleItemSKU$outboundSchema` instead. */
|
|
130
|
+
ProductBundleItemSKU$.outboundSchema = ProductBundleItemSKU$outboundSchema;
|
|
131
|
+
})(ProductBundleItemSKU$ || (ProductBundleItemSKU$ = {}));
|
|
132
|
+
export function productBundleItemSKUToJSON(productBundleItemSKU) {
|
|
133
|
+
return JSON.stringify(ProductBundleItemSKU$outboundSchema.parse(productBundleItemSKU));
|
|
134
|
+
}
|
|
135
|
+
export function productBundleItemSKUFromJSON(jsonString) {
|
|
136
|
+
return safeParse(jsonString, (x) => ProductBundleItemSKU$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductBundleItemSKU' from JSON`);
|
|
137
|
+
}
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const ProductBundleItem$inboundSchema = z.object({
|
|
140
|
+
bundle_items: z.array(z.lazy(() => ProductBundleItemSKU$inboundSchema)),
|
|
141
|
+
}).transform((v) => {
|
|
142
|
+
return remap$(v, {
|
|
143
|
+
"bundle_items": "bundleItems",
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
/** @internal */
|
|
147
|
+
export const ProductBundleItem$outboundSchema = z.object({
|
|
148
|
+
bundleItems: z.array(z.lazy(() => ProductBundleItemSKU$outboundSchema)),
|
|
149
|
+
}).transform((v) => {
|
|
150
|
+
return remap$(v, {
|
|
151
|
+
bundleItems: "bundle_items",
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
/**
|
|
155
|
+
* @internal
|
|
156
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
157
|
+
*/
|
|
158
|
+
export var ProductBundleItem$;
|
|
159
|
+
(function (ProductBundleItem$) {
|
|
160
|
+
/** @deprecated use `ProductBundleItem$inboundSchema` instead. */
|
|
161
|
+
ProductBundleItem$.inboundSchema = ProductBundleItem$inboundSchema;
|
|
162
|
+
/** @deprecated use `ProductBundleItem$outboundSchema` instead. */
|
|
163
|
+
ProductBundleItem$.outboundSchema = ProductBundleItem$outboundSchema;
|
|
164
|
+
})(ProductBundleItem$ || (ProductBundleItem$ = {}));
|
|
165
|
+
export function productBundleItemToJSON(productBundleItem) {
|
|
166
|
+
return JSON.stringify(ProductBundleItem$outboundSchema.parse(productBundleItem));
|
|
167
|
+
}
|
|
168
|
+
export function productBundleItemFromJSON(jsonString) {
|
|
169
|
+
return safeParse(jsonString, (x) => ProductBundleItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProductBundleItem' from JSON`);
|
|
170
|
+
}
|
|
171
|
+
//# sourceMappingURL=productbundleitem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productbundleitem.js","sourceRoot":"","sources":["../../../src/models/components/productbundleitem.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAIjD,OAAO,EAEL,8BAA8B,EAE9B,+BAA+B,GAChC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,8BAA8B,EAE9B,+BAA+B,GAChC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,0BAA0B,EAE1B,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,4BAA4B,EAE5B,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,8BAA8B,EAE9B,+BAA+B,GAChC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAEL,iCAAiC,EAEjC,kCAAkC,GACnC,MAAM,0BAA0B,CAAC;AAElC,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACR,CAAC;AAuCX,gBAAgB;AAChB,MAAM,CAAC,MAAM,0CAA0C,GAEnD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
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { ProductAttribute, ProductAttribute$Outbound } from "./productattribute.js";
|
|
6
|
+
import { ProductBundleItem, ProductBundleItem$Outbound } from "./productbundleitem.js";
|
|
7
|
+
import { ProductImage, ProductImage$Outbound } from "./productimage.js";
|
|
8
|
+
import { ProductPricing, ProductPricing$Outbound } from "./productpricing.js";
|
|
9
|
+
import { ProductPromotion, ProductPromotion$Outbound } from "./productpromotion.js";
|
|
10
|
+
import { ProductShipping, ProductShipping$Outbound } from "./productshipping.js";
|
|
11
|
+
import { ProductSubscription, ProductSubscription$Outbound } from "./productsubscription.js";
|
|
12
|
+
import { ProductVideo, ProductVideo$Outbound } from "./productvideo.js";
|
|
13
|
+
import { Seo, Seo$Outbound } from "./seo.js";
|
|
14
|
+
import { Variant, Variant$Outbound } from "./variant.js";
|
|
15
|
+
import { VariantOption, VariantOption$Outbound } from "./variantoption.js";
|
|
16
|
+
export declare const ProductDetailProductType: {
|
|
17
|
+
readonly Physical: "physical";
|
|
18
|
+
readonly Digital: "digital";
|
|
19
|
+
readonly Bundle: "bundle";
|
|
20
|
+
};
|
|
21
|
+
export type ProductDetailProductType = ClosedEnum<typeof ProductDetailProductType>;
|
|
22
|
+
export type ProductDetail = {
|
|
23
|
+
/**
|
|
24
|
+
* The ULID of the product
|
|
25
|
+
*/
|
|
26
|
+
id: string;
|
|
27
|
+
sku: string | null;
|
|
28
|
+
name: string;
|
|
29
|
+
slug: string | null;
|
|
30
|
+
shortDescription: string | null;
|
|
31
|
+
productType: ProductDetailProductType;
|
|
32
|
+
active: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Indicates whether the product has stock available
|
|
35
|
+
*/
|
|
36
|
+
stockAvailable: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Indicates whether this item is associated with any active (product-specific) coupons
|
|
39
|
+
*/
|
|
40
|
+
onOffer: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Indicates whether the product has any subscription plans avaialble
|
|
43
|
+
*/
|
|
44
|
+
onSubscription: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Indicates whether the product is currently on promotion. When true, the `ProductPromotion` object will contain details of the promotion
|
|
47
|
+
*/
|
|
48
|
+
onPromotion: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Indicates whether the product has variants
|
|
51
|
+
*/
|
|
52
|
+
hasVariant: boolean;
|
|
53
|
+
tags: Array<string> | null;
|
|
54
|
+
categoryIds: Array<string>;
|
|
55
|
+
reviewsRatingSum: number;
|
|
56
|
+
reviewsCount: number;
|
|
57
|
+
attributes: Array<ProductAttribute>;
|
|
58
|
+
pricing: ProductPricing;
|
|
59
|
+
/**
|
|
60
|
+
* this will be used if has_variant is true, to auto set default values.
|
|
61
|
+
*/
|
|
62
|
+
variantOptions: Array<VariantOption> | null;
|
|
63
|
+
promotion: ProductPromotion | null;
|
|
64
|
+
images: Array<ProductImage>;
|
|
65
|
+
subscription: Array<ProductSubscription>;
|
|
66
|
+
variants: Array<Variant>;
|
|
67
|
+
bundleItems: ProductBundleItem;
|
|
68
|
+
description: string | null;
|
|
69
|
+
hsnCode: string | null;
|
|
70
|
+
videos: Array<ProductVideo>;
|
|
71
|
+
shipping: ProductShipping | null;
|
|
72
|
+
/**
|
|
73
|
+
* An array of product ULIDs
|
|
74
|
+
*/
|
|
75
|
+
upsellingProductIds: Array<string>;
|
|
76
|
+
/**
|
|
77
|
+
* An array of product ULIDs
|
|
78
|
+
*/
|
|
79
|
+
crosssellingProductIds: Array<string>;
|
|
80
|
+
seo: Seo;
|
|
81
|
+
metadata: {
|
|
82
|
+
[k: string]: string;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
/** @internal */
|
|
86
|
+
export declare const ProductDetailProductType$inboundSchema: z.ZodNativeEnum<typeof ProductDetailProductType>;
|
|
87
|
+
/** @internal */
|
|
88
|
+
export declare const ProductDetailProductType$outboundSchema: z.ZodNativeEnum<typeof ProductDetailProductType>;
|
|
89
|
+
/**
|
|
90
|
+
* @internal
|
|
91
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
92
|
+
*/
|
|
93
|
+
export declare namespace ProductDetailProductType$ {
|
|
94
|
+
/** @deprecated use `ProductDetailProductType$inboundSchema` instead. */
|
|
95
|
+
const inboundSchema: z.ZodNativeEnum<{
|
|
96
|
+
readonly Physical: "physical";
|
|
97
|
+
readonly Digital: "digital";
|
|
98
|
+
readonly Bundle: "bundle";
|
|
99
|
+
}>;
|
|
100
|
+
/** @deprecated use `ProductDetailProductType$outboundSchema` instead. */
|
|
101
|
+
const outboundSchema: z.ZodNativeEnum<{
|
|
102
|
+
readonly Physical: "physical";
|
|
103
|
+
readonly Digital: "digital";
|
|
104
|
+
readonly Bundle: "bundle";
|
|
105
|
+
}>;
|
|
106
|
+
}
|
|
7
107
|
/** @internal */
|
|
8
108
|
export declare const ProductDetail$inboundSchema: z.ZodType<ProductDetail, z.ZodTypeDef, unknown>;
|
|
9
109
|
/** @internal */
|
|
10
|
-
export type ProductDetail$Outbound =
|
|
110
|
+
export type ProductDetail$Outbound = {
|
|
111
|
+
id: string;
|
|
112
|
+
sku: string | null;
|
|
113
|
+
name: string;
|
|
114
|
+
slug: string | null;
|
|
115
|
+
short_description: string | null;
|
|
116
|
+
product_type: string;
|
|
117
|
+
active: boolean;
|
|
118
|
+
stock_available: boolean;
|
|
119
|
+
on_offer: boolean;
|
|
120
|
+
on_subscription: boolean;
|
|
121
|
+
on_promotion: boolean;
|
|
122
|
+
has_variant: boolean;
|
|
123
|
+
tags: Array<string> | null;
|
|
124
|
+
category_ids: Array<string>;
|
|
125
|
+
reviews_rating_sum: number;
|
|
126
|
+
reviews_count: number;
|
|
127
|
+
attributes: Array<ProductAttribute$Outbound>;
|
|
128
|
+
pricing: ProductPricing$Outbound;
|
|
129
|
+
variant_options: Array<VariantOption$Outbound> | null;
|
|
130
|
+
promotion: ProductPromotion$Outbound | null;
|
|
131
|
+
images: Array<ProductImage$Outbound>;
|
|
132
|
+
subscription: Array<ProductSubscription$Outbound>;
|
|
133
|
+
variants: Array<Variant$Outbound>;
|
|
134
|
+
bundle_items: ProductBundleItem$Outbound;
|
|
135
|
+
description: string | null;
|
|
136
|
+
hsn_code: string | null;
|
|
137
|
+
videos: Array<ProductVideo$Outbound>;
|
|
138
|
+
shipping: ProductShipping$Outbound | null;
|
|
139
|
+
upselling_product_ids: Array<string>;
|
|
140
|
+
crossselling_product_ids: Array<string>;
|
|
141
|
+
seo: Seo$Outbound;
|
|
142
|
+
metadata: {
|
|
143
|
+
[k: string]: string;
|
|
144
|
+
};
|
|
145
|
+
};
|
|
11
146
|
/** @internal */
|
|
12
147
|
export declare const ProductDetail$outboundSchema: z.ZodType<ProductDetail$Outbound, z.ZodTypeDef, ProductDetail>;
|
|
13
148
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productdetail.d.ts","sourceRoot":"","sources":["../../../src/models/components/productdetail.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"productdetail.d.ts","sourceRoot":"","sources":["../../../src/models/components/productdetail.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,gBAAgB,EAEhB,yBAAyB,EAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,iBAAiB,EAEjB,0BAA0B,EAE3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,YAAY,EAEZ,qBAAqB,EAEtB,MA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AAM,EAAE,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACrC,QAAQ,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC1C,qBAAqB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrC,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxC,GAAG,EAAE,YAAY,CAAC;IAClB,QAAQ,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACnC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,EAAE,CAAC,CAAC,OAAO,CAClD,sBAAsB,EACtB,CAAC,CAAC,UAAU,EACZ,aAAa,CAoDb,CAAC;AAEH;;;GAGG;AACH,yBAAiB,cAAc,CAAC;IAC9B,6DAA6D;IACtD,MAAM,aAAa,iDAA8B,CAAC;IACzD,8DAA8D;IACvD,MAAM,cAAc,gEAA+B,CAAC;IAC3D,wDAAwD;IACxD,KAAY,QAAQ,GAAG,sBAAsB,CAAC;CAC/C;AAED,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,aAAa,GAAG,MAAM,CAExE;AAED,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,aAAa,EAAE,kBAAkB,CAAC,CAMpD"}
|
|
@@ -2,19 +2,145 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
import * as z from "zod";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
5
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
7
|
+
import { ProductAttribute$inboundSchema, ProductAttribute$outboundSchema, } from "./productattribute.js";
|
|
8
|
+
import { ProductBundleItem$inboundSchema, ProductBundleItem$outboundSchema, } from "./productbundleitem.js";
|
|
9
|
+
import { ProductImage$inboundSchema, ProductImage$outboundSchema, } from "./productimage.js";
|
|
10
|
+
import { ProductPricing$inboundSchema, ProductPricing$outboundSchema, } from "./productpricing.js";
|
|
11
|
+
import { ProductPromotion$inboundSchema, ProductPromotion$outboundSchema, } from "./productpromotion.js";
|
|
12
|
+
import { ProductShipping$inboundSchema, ProductShipping$outboundSchema, } from "./productshipping.js";
|
|
13
|
+
import { ProductSubscription$inboundSchema, ProductSubscription$outboundSchema, } from "./productsubscription.js";
|
|
14
|
+
import { ProductVideo$inboundSchema, ProductVideo$outboundSchema, } from "./productvideo.js";
|
|
15
|
+
import { Seo$inboundSchema, Seo$outboundSchema, } from "./seo.js";
|
|
16
|
+
import { Variant$inboundSchema, Variant$outboundSchema, } from "./variant.js";
|
|
17
|
+
import { VariantOption$inboundSchema, VariantOption$outboundSchema, } from "./variantoption.js";
|
|
18
|
+
export const ProductDetailProductType = {
|
|
19
|
+
Physical: "physical",
|
|
20
|
+
Digital: "digital",
|
|
21
|
+
Bundle: "bundle",
|
|
22
|
+
};
|
|
8
23
|
/** @internal */
|
|
9
|
-
export const
|
|
10
|
-
SingleProductDetail$inboundSchema,
|
|
11
|
-
BundleProductDetail$inboundSchema,
|
|
12
|
-
]);
|
|
24
|
+
export const ProductDetailProductType$inboundSchema = z.nativeEnum(ProductDetailProductType);
|
|
13
25
|
/** @internal */
|
|
14
|
-
export const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
26
|
+
export const ProductDetailProductType$outboundSchema = ProductDetailProductType$inboundSchema;
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
30
|
+
*/
|
|
31
|
+
export var ProductDetailProductType$;
|
|
32
|
+
(function (ProductDetailProductType$) {
|
|
33
|
+
/** @deprecated use `ProductDetailProductType$inboundSchema` instead. */
|
|
34
|
+
ProductDetailProductType$.inboundSchema = ProductDetailProductType$inboundSchema;
|
|
35
|
+
/** @deprecated use `ProductDetailProductType$outboundSchema` instead. */
|
|
36
|
+
ProductDetailProductType$.outboundSchema = ProductDetailProductType$outboundSchema;
|
|
37
|
+
})(ProductDetailProductType$ || (ProductDetailProductType$ = {}));
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const ProductDetail$inboundSchema = z.object({
|
|
40
|
+
id: z.string(),
|
|
41
|
+
sku: z.nullable(z.string()),
|
|
42
|
+
name: z.string(),
|
|
43
|
+
slug: z.nullable(z.string()),
|
|
44
|
+
short_description: z.nullable(z.string()),
|
|
45
|
+
product_type: ProductDetailProductType$inboundSchema,
|
|
46
|
+
active: z.boolean(),
|
|
47
|
+
stock_available: z.boolean(),
|
|
48
|
+
on_offer: z.boolean(),
|
|
49
|
+
on_subscription: z.boolean(),
|
|
50
|
+
on_promotion: z.boolean(),
|
|
51
|
+
has_variant: z.boolean(),
|
|
52
|
+
tags: z.nullable(z.array(z.string())),
|
|
53
|
+
category_ids: z.array(z.string()),
|
|
54
|
+
reviews_rating_sum: z.number(),
|
|
55
|
+
reviews_count: z.number().int(),
|
|
56
|
+
attributes: z.array(ProductAttribute$inboundSchema),
|
|
57
|
+
pricing: ProductPricing$inboundSchema,
|
|
58
|
+
variant_options: z.nullable(z.array(VariantOption$inboundSchema)),
|
|
59
|
+
promotion: z.nullable(ProductPromotion$inboundSchema),
|
|
60
|
+
images: z.array(ProductImage$inboundSchema),
|
|
61
|
+
subscription: z.array(ProductSubscription$inboundSchema),
|
|
62
|
+
variants: z.array(Variant$inboundSchema),
|
|
63
|
+
bundle_items: ProductBundleItem$inboundSchema,
|
|
64
|
+
description: z.nullable(z.string()),
|
|
65
|
+
hsn_code: z.nullable(z.string()),
|
|
66
|
+
videos: z.array(ProductVideo$inboundSchema),
|
|
67
|
+
shipping: z.nullable(ProductShipping$inboundSchema),
|
|
68
|
+
upselling_product_ids: z.array(z.string()),
|
|
69
|
+
crossselling_product_ids: z.array(z.string()),
|
|
70
|
+
seo: Seo$inboundSchema,
|
|
71
|
+
metadata: z.record(z.string()),
|
|
72
|
+
}).transform((v) => {
|
|
73
|
+
return remap$(v, {
|
|
74
|
+
"short_description": "shortDescription",
|
|
75
|
+
"product_type": "productType",
|
|
76
|
+
"stock_available": "stockAvailable",
|
|
77
|
+
"on_offer": "onOffer",
|
|
78
|
+
"on_subscription": "onSubscription",
|
|
79
|
+
"on_promotion": "onPromotion",
|
|
80
|
+
"has_variant": "hasVariant",
|
|
81
|
+
"category_ids": "categoryIds",
|
|
82
|
+
"reviews_rating_sum": "reviewsRatingSum",
|
|
83
|
+
"reviews_count": "reviewsCount",
|
|
84
|
+
"variant_options": "variantOptions",
|
|
85
|
+
"bundle_items": "bundleItems",
|
|
86
|
+
"hsn_code": "hsnCode",
|
|
87
|
+
"upselling_product_ids": "upsellingProductIds",
|
|
88
|
+
"crossselling_product_ids": "crosssellingProductIds",
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const ProductDetail$outboundSchema = z.object({
|
|
93
|
+
id: z.string(),
|
|
94
|
+
sku: z.nullable(z.string()),
|
|
95
|
+
name: z.string(),
|
|
96
|
+
slug: z.nullable(z.string()),
|
|
97
|
+
shortDescription: z.nullable(z.string()),
|
|
98
|
+
productType: ProductDetailProductType$outboundSchema,
|
|
99
|
+
active: z.boolean(),
|
|
100
|
+
stockAvailable: z.boolean(),
|
|
101
|
+
onOffer: z.boolean(),
|
|
102
|
+
onSubscription: z.boolean(),
|
|
103
|
+
onPromotion: z.boolean(),
|
|
104
|
+
hasVariant: z.boolean(),
|
|
105
|
+
tags: z.nullable(z.array(z.string())),
|
|
106
|
+
categoryIds: z.array(z.string()),
|
|
107
|
+
reviewsRatingSum: z.number(),
|
|
108
|
+
reviewsCount: z.number().int(),
|
|
109
|
+
attributes: z.array(ProductAttribute$outboundSchema),
|
|
110
|
+
pricing: ProductPricing$outboundSchema,
|
|
111
|
+
variantOptions: z.nullable(z.array(VariantOption$outboundSchema)),
|
|
112
|
+
promotion: z.nullable(ProductPromotion$outboundSchema),
|
|
113
|
+
images: z.array(ProductImage$outboundSchema),
|
|
114
|
+
subscription: z.array(ProductSubscription$outboundSchema),
|
|
115
|
+
variants: z.array(Variant$outboundSchema),
|
|
116
|
+
bundleItems: ProductBundleItem$outboundSchema,
|
|
117
|
+
description: z.nullable(z.string()),
|
|
118
|
+
hsnCode: z.nullable(z.string()),
|
|
119
|
+
videos: z.array(ProductVideo$outboundSchema),
|
|
120
|
+
shipping: z.nullable(ProductShipping$outboundSchema),
|
|
121
|
+
upsellingProductIds: z.array(z.string()),
|
|
122
|
+
crosssellingProductIds: z.array(z.string()),
|
|
123
|
+
seo: Seo$outboundSchema,
|
|
124
|
+
metadata: z.record(z.string()),
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
return remap$(v, {
|
|
127
|
+
shortDescription: "short_description",
|
|
128
|
+
productType: "product_type",
|
|
129
|
+
stockAvailable: "stock_available",
|
|
130
|
+
onOffer: "on_offer",
|
|
131
|
+
onSubscription: "on_subscription",
|
|
132
|
+
onPromotion: "on_promotion",
|
|
133
|
+
hasVariant: "has_variant",
|
|
134
|
+
categoryIds: "category_ids",
|
|
135
|
+
reviewsRatingSum: "reviews_rating_sum",
|
|
136
|
+
reviewsCount: "reviews_count",
|
|
137
|
+
variantOptions: "variant_options",
|
|
138
|
+
bundleItems: "bundle_items",
|
|
139
|
+
hsnCode: "hsn_code",
|
|
140
|
+
upsellingProductIds: "upselling_product_ids",
|
|
141
|
+
crosssellingProductIds: "crossselling_product_ids",
|
|
142
|
+
});
|
|
143
|
+
});
|
|
18
144
|
/**
|
|
19
145
|
* @internal
|
|
20
146
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productdetail.js","sourceRoot":"","sources":["../../../src/models/components/productdetail.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
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AAoB;QACtC,YAAY,EAAE,eAAe;QAC7B,cAAc,EAAE,iBAAiB;QACjC,WAAW,EAAE,cAAc;QAC3B,OAAO,EAAE,UAAU;QACnB,mBAAmB,EAAE,uBAAuB;QAC5C,sBAAsB,EAAE,0BAA0B;KACnD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,cAAc,CAO9B;AAPD,WAAiB,cAAc;IAC7B,6DAA6D;IAChD,4BAAa,GAAG,2BAA2B,CAAC;IACzD,8DAA8D;IACjD,6BAAc,GAAG,4BAA4B,CAAC;AAG7D,CAAC,EAPgB,cAAc,KAAd,cAAc,QAO9B;AAED,MAAM,UAAU,mBAAmB,CAAC,aAA4B;IAC9D,OAAO,IAAI,CAAC,SAAS,CAAC,4BAA4B,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,2BAA2B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvD,2CAA2C,CAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -2,6 +2,7 @@ import * as z from "zod";
|
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
4
|
export type ProductImage = {
|
|
5
|
+
id: string;
|
|
5
6
|
title: string | null;
|
|
6
7
|
alternateText: string | null;
|
|
7
8
|
sortOrder: number;
|
|
@@ -14,6 +15,7 @@ export type ProductImage = {
|
|
|
14
15
|
export declare const ProductImage$inboundSchema: z.ZodType<ProductImage, z.ZodTypeDef, unknown>;
|
|
15
16
|
/** @internal */
|
|
16
17
|
export type ProductImage$Outbound = {
|
|
18
|
+
id: string;
|
|
17
19
|
title: string | null;
|
|
18
20
|
alternate_text: string | null;
|
|
19
21
|
sort_order: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productimage.d.ts","sourceRoot":"","sources":["../../../src/models/components/productimage.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,
|
|
1
|
+
{"version":3,"file":"productimage.d.ts","sourceRoot":"","sources":["../../../src/models/components/productimage.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,YAAY,EACZ,CAAC,CAAC,UAAU,EACZ,OAAO,CAmBP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,2BAA2B,EAAE,CAAC,CAAC,OAAO,CACjD,qBAAqB,EACrB,CAAC,CAAC,UAAU,EACZ,YAAY,CAmBZ,CAAC;AAEH;;;GAGG;AACH,yBAAiB,aAAa,CAAC;IAC7B,4DAA4D;IACrD,MAAM,aAAa,gDAA6B,CAAC;IACxD,6DAA6D;IACtD,MAAM,cAAc,8DAA8B,CAAC;IAC1D,uDAAuD;IACvD,KAAY,QAAQ,GAAG,qBAAqB,CAAC;CAC9C;AAED,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,YAAY,GAAG,MAAM,CAErE;AAED,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAMnD"}
|
|
@@ -6,6 +6,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const ProductImage$inboundSchema = z.object({
|
|
9
|
+
id: z.string(),
|
|
9
10
|
title: z.nullable(z.string()),
|
|
10
11
|
alternate_text: z.nullable(z.string()),
|
|
11
12
|
sort_order: z.number().int(),
|
|
@@ -25,6 +26,7 @@ export const ProductImage$inboundSchema = z.object({
|
|
|
25
26
|
});
|
|
26
27
|
/** @internal */
|
|
27
28
|
export const ProductImage$outboundSchema = z.object({
|
|
29
|
+
id: z.string(),
|
|
28
30
|
title: z.nullable(z.string()),
|
|
29
31
|
alternateText: z.nullable(z.string()),
|
|
30
32
|
sortOrder: z.number().int(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"productimage.js","sourceRoot":"","sources":["../../../src/models/components/productimage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"productimage.js","sourceRoot":"","sources":["../../../src/models/components/productimage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAejD,gBAAgB;AAChB,MAAM,CAAC,MAAM,0BAA0B,GAInC,CAAC,CAAC,MAAM,CAAC;IACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7B,cAAc,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACtC,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;IAC5B,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;IACpB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE;IACzB,YAAY,EAAE,CAAC,CAAC,MAAM,EAAE;IACxB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE;CACrB,CAAC,CA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Ab,aAAa,QAO7B;AAED,MAAM,UAAU,kBAAkB,CAAC,YAA0B;IAC3D,OAAO,IAAI,CAAC,SAAS,CAAC,2BAA2B,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,0BAA0B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,0CAA0C,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
import { Pagination, Pagination$Outbound } from "./pagination.js";
|
|
5
|
+
import { Product, Product$Outbound } from "./product.js";
|
|
6
|
+
export type ProductList = {
|
|
7
|
+
products: Product;
|
|
8
|
+
/**
|
|
9
|
+
* pagination metadata structure
|
|
10
|
+
*/
|
|
11
|
+
pagination: Pagination;
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export declare const ProductList$inboundSchema: z.ZodType<ProductList, z.ZodTypeDef, unknown>;
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type ProductList$Outbound = {
|
|
17
|
+
products: Product$Outbound;
|
|
18
|
+
pagination: Pagination$Outbound;
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export declare const ProductList$outboundSchema: z.ZodType<ProductList$Outbound, z.ZodTypeDef, ProductList>;
|
|
22
|
+
/**
|
|
23
|
+
* @internal
|
|
24
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
25
|
+
*/
|
|
26
|
+
export declare namespace ProductList$ {
|
|
27
|
+
/** @deprecated use `ProductList$inboundSchema` instead. */
|
|
28
|
+
const inboundSchema: z.ZodType<ProductList, z.ZodTypeDef, unknown>;
|
|
29
|
+
/** @deprecated use `ProductList$outboundSchema` instead. */
|
|
30
|
+
const outboundSchema: z.ZodType<ProductList$Outbound, z.ZodTypeDef, ProductList>;
|
|
31
|
+
/** @deprecated use `ProductList$Outbound` instead. */
|
|
32
|
+
type Outbound = ProductList$Outbound;
|
|
33
|
+
}
|
|
34
|
+
export declare function productListToJSON(productList: ProductList): string;
|
|
35
|
+
export declare function productListFromJSON(jsonString: string): SafeParseResult<ProductList, SDKValidationError>;
|
|
36
|
+
//# sourceMappingURL=productlist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"productlist.d.ts","sourceRoot":"","sources":["../../../src/models/components/productlist.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,UAAU,EAEV,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,OAAO,EAEP,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,yBAAyB,EAAE,CAAC,CAAC,OAAO,CAC/C,WAAW,EACX,CAAC,CAAC,UAAU,EACZ,OAAO,CAIP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,mBAAmB,CAAC;CACjC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,EAAE,CAAC,CAAC,OAAO,CAChD,oBAAoB,EACpB,CAAC,CAAC,UAAU,EAC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