ce-storefront 0.3.5 → 0.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/components/analyticsevent.d.ts +8 -8
- package/esm/models/components/analyticsevent.d.ts.map +1 -1
- package/esm/models/components/analyticsevent.js +12 -12
- package/esm/models/components/analyticsevent.js.map +1 -1
- package/esm/models/components/associatedoption.d.ts +125 -0
- package/esm/models/components/associatedoption.d.ts.map +1 -0
- package/esm/models/components/associatedoption.js +107 -0
- package/esm/models/components/associatedoption.js.map +1 -0
- package/esm/models/components/bundleproduct.d.ts +236 -0
- package/esm/models/components/bundleproduct.d.ts.map +1 -0
- package/esm/models/components/bundleproduct.js +262 -0
- package/esm/models/components/bundleproduct.js.map +1 -0
- package/esm/models/components/bundleproductdetail.d.ts +265 -0
- package/esm/models/components/bundleproductdetail.d.ts.map +1 -0
- package/esm/models/components/bundleproductdetail.js +288 -0
- package/esm/models/components/bundleproductdetail.js.map +1 -0
- package/esm/models/components/cart.d.ts +15 -15
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +15 -15
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/discountbasedpromotion.d.ts +0 -2
- package/esm/models/components/discountbasedpromotion.d.ts.map +1 -1
- package/esm/models/components/discountbasedpromotion.js +0 -4
- package/esm/models/components/discountbasedpromotion.js.map +1 -1
- package/esm/models/components/fixedpricepromotion.d.ts +0 -2
- package/esm/models/components/fixedpricepromotion.d.ts.map +1 -1
- package/esm/models/components/fixedpricepromotion.js +0 -4
- package/esm/models/components/fixedpricepromotion.js.map +1 -1
- package/esm/models/components/freegoodspromotion.d.ts +0 -5
- package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
- package/esm/models/components/freegoodspromotion.js +0 -4
- package/esm/models/components/freegoodspromotion.js.map +1 -1
- package/esm/models/components/index.d.ts +8 -6
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +8 -6
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/productattribute.d.ts +97 -64
- package/esm/models/components/productattribute.d.ts.map +1 -1
- package/esm/models/components/productattribute.js +67 -128
- package/esm/models/components/productattribute.js.map +1 -1
- package/esm/models/components/productcategory.d.ts +2 -2
- package/esm/models/components/productcategory.d.ts.map +1 -1
- package/esm/models/components/productcategory.js +2 -2
- package/esm/models/components/productcategory.js.map +1 -1
- package/esm/models/components/productdetail.d.ts +16 -188
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +26 -228
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/components/productlistresponse.d.ts +49 -3
- package/esm/models/components/productlistresponse.d.ts.map +1 -1
- package/esm/models/components/productlistresponse.js +65 -3
- package/esm/models/components/productlistresponse.js.map +1 -1
- package/esm/models/components/productshipping.d.ts +13 -15
- package/esm/models/components/productshipping.d.ts.map +1 -1
- package/esm/models/components/productshipping.js +14 -18
- package/esm/models/components/productshipping.js.map +1 -1
- package/esm/models/components/{promotion.d.ts → promotiondetail.d.ts} +29 -29
- package/esm/models/components/promotiondetail.d.ts.map +1 -0
- package/esm/models/components/{promotion.js → promotiondetail.js} +29 -29
- package/esm/models/components/promotiondetail.js.map +1 -0
- package/esm/models/components/seo.d.ts +6 -6
- package/esm/models/components/seo.d.ts.map +1 -1
- package/esm/models/components/seo.js +6 -19
- package/esm/models/components/seo.js.map +1 -1
- package/esm/models/components/{product.d.ts → singleproduct.d.ts} +52 -75
- package/esm/models/components/singleproduct.d.ts.map +1 -0
- package/esm/models/components/{product.js → singleproduct.js} +37 -95
- package/esm/models/components/singleproduct.js.map +1 -0
- package/esm/models/components/singleproductdetail.d.ts +159 -0
- package/esm/models/components/singleproductdetail.d.ts.map +1 -0
- package/esm/models/components/singleproductdetail.js +156 -0
- package/esm/models/components/singleproductdetail.js.map +1 -0
- package/esm/models/components/{skuinfo.d.ts → sku.d.ts} +59 -48
- package/esm/models/components/sku.d.ts.map +1 -0
- package/esm/models/components/{skuinfo.js → sku.js} +67 -57
- package/esm/models/components/sku.js.map +1 -0
- package/esm/models/components/variant.d.ts +42 -72
- package/esm/models/components/variant.d.ts.map +1 -1
- package/esm/models/components/variant.js +39 -82
- package/esm/models/components/variant.js.map +1 -1
- package/esm/models/components/variantdetail.d.ts +101 -68
- package/esm/models/components/variantdetail.d.ts.map +1 -1
- package/esm/models/components/variantdetail.js +99 -71
- package/esm/models/components/variantdetail.js.map +1 -1
- package/esm/models/components/variantoption.d.ts +118 -0
- package/esm/models/components/variantoption.d.ts.map +1 -0
- package/esm/models/components/variantoption.js +114 -0
- package/esm/models/components/variantoption.js.map +1 -0
- package/esm/models/components/volumebasedpromotion.d.ts +0 -5
- package/esm/models/components/volumebasedpromotion.d.ts.map +1 -1
- package/esm/models/components/volumebasedpromotion.js +0 -4
- package/esm/models/components/volumebasedpromotion.js.map +1 -1
- package/esm/models/operations/getpromotions.d.ts +2 -2
- package/esm/models/operations/getpromotions.d.ts.map +1 -1
- package/esm/models/operations/getpromotions.js +2 -2
- package/esm/models/operations/getpromotions.js.map +1 -1
- package/esm/models/operations/getskus.d.ts +2 -2
- package/esm/models/operations/getskus.d.ts.map +1 -1
- package/esm/models/operations/getskus.js +2 -2
- package/esm/models/operations/getskus.js.map +1 -1
- package/esm/models/operations/getwishtlist.d.ts +2 -2
- package/esm/models/operations/getwishtlist.d.ts.map +1 -1
- package/esm/models/operations/getwishtlist.js +2 -2
- package/esm/models/operations/getwishtlist.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/analyticsevent.ts +16 -15
- package/src/models/components/associatedoption.ts +217 -0
- package/src/models/components/bundleproduct.ts +501 -0
- package/src/models/components/bundleproductdetail.ts +567 -0
- package/src/models/components/cart.ts +24 -24
- package/src/models/components/discountbasedpromotion.ts +0 -6
- package/src/models/components/fixedpricepromotion.ts +0 -6
- package/src/models/components/freegoodspromotion.ts +0 -9
- package/src/models/components/index.ts +8 -6
- package/src/models/components/productattribute.ts +162 -188
- package/src/models/components/productcategory.ts +4 -4
- package/src/models/components/productdetail.ts +52 -475
- package/src/models/components/productlistresponse.ts +147 -9
- package/src/models/components/productshipping.ts +27 -33
- package/src/models/components/{promotion.ts → promotiondetail.ts} +47 -45
- package/src/models/components/seo.ts +12 -25
- package/src/models/components/singleproduct.ts +269 -0
- package/src/models/components/singleproductdetail.ts +339 -0
- package/src/models/components/sku.ts +252 -0
- package/src/models/components/variant.ts +81 -170
- package/src/models/components/variantdetail.ts +189 -168
- package/src/models/components/variantoption.ts +214 -0
- package/src/models/components/volumebasedpromotion.ts +0 -9
- package/src/models/operations/getpromotions.ts +4 -4
- package/src/models/operations/getskus.ts +4 -4
- package/src/models/operations/getwishtlist.ts +4 -4
- package/esm/models/components/product.d.ts.map +0 -1
- package/esm/models/components/product.js.map +0 -1
- package/esm/models/components/productbundleitem.d.ts +0 -47
- package/esm/models/components/productbundleitem.d.ts.map +0 -1
- package/esm/models/components/productbundleitem.js +0 -66
- package/esm/models/components/productbundleitem.js.map +0 -1
- package/esm/models/components/productpackaging.d.ts +0 -68
- package/esm/models/components/productpackaging.d.ts.map +0 -1
- package/esm/models/components/productpackaging.js +0 -88
- package/esm/models/components/productpackaging.js.map +0 -1
- package/esm/models/components/promotion.d.ts.map +0 -1
- package/esm/models/components/promotion.js.map +0 -1
- package/esm/models/components/saleschannel.d.ts +0 -39
- package/esm/models/components/saleschannel.d.ts.map +0 -1
- package/esm/models/components/saleschannel.js +0 -53
- package/esm/models/components/saleschannel.js.map +0 -1
- package/esm/models/components/skuinfo.d.ts.map +0 -1
- package/esm/models/components/skuinfo.js.map +0 -1
- package/src/models/components/product.ts +0 -363
- package/src/models/components/productbundleitem.ts +0 -127
- package/src/models/components/productpackaging.ts +0 -162
- package/src/models/components/saleschannel.ts +0 -96
- package/src/models/components/skuinfo.ts +0 -237
|
@@ -1,108 +1,78 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
+
import { AssociatedOption, AssociatedOption$Outbound } from "./associatedoption.js";
|
|
4
5
|
import { ProductImage, ProductImage$Outbound } from "./productimage.js";
|
|
5
6
|
import { ProductPricing, ProductPricing$Outbound } from "./productpricing.js";
|
|
6
7
|
import { ProductPromotion, ProductPromotion$Outbound } from "./productpromotion.js";
|
|
7
|
-
import { ProductShipping, ProductShipping$Outbound } from "./productshipping.js";
|
|
8
8
|
import { ProductSubscription, ProductSubscription$Outbound } from "./productsubscription.js";
|
|
9
|
-
export type AssociatedOptions = {};
|
|
10
|
-
export type Metadata = {
|
|
11
|
-
key?: string | undefined;
|
|
12
|
-
value?: string | undefined;
|
|
13
|
-
};
|
|
14
9
|
export type Variant = {
|
|
15
10
|
/**
|
|
16
11
|
* variant id
|
|
17
12
|
*/
|
|
18
|
-
id
|
|
13
|
+
id: string;
|
|
19
14
|
/**
|
|
20
|
-
*
|
|
15
|
+
* product id
|
|
21
16
|
*/
|
|
22
|
-
|
|
17
|
+
productId: string;
|
|
23
18
|
/**
|
|
24
19
|
* variant sku
|
|
25
20
|
*/
|
|
26
21
|
sku?: string | undefined;
|
|
27
22
|
slug?: string | undefined;
|
|
28
|
-
|
|
23
|
+
/**
|
|
24
|
+
* variant name
|
|
25
|
+
*/
|
|
26
|
+
name: string;
|
|
27
|
+
/**
|
|
28
|
+
* variant name
|
|
29
|
+
*/
|
|
30
|
+
productName: string;
|
|
31
|
+
shortDescription: string;
|
|
32
|
+
active: boolean;
|
|
33
|
+
stockAvailable: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Indicates whether this item is associated with any active (product-specific) coupons
|
|
36
|
+
*/
|
|
37
|
+
onOffer?: boolean | undefined;
|
|
29
38
|
onPromotion?: boolean | undefined;
|
|
30
39
|
onSubscription?: boolean | undefined;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
isDefault
|
|
40
|
+
/**
|
|
41
|
+
* Indicates whether a variant is marked as the default variant for a product
|
|
42
|
+
*/
|
|
43
|
+
isDefault: boolean;
|
|
44
|
+
associatedOptions: {
|
|
45
|
+
[k: string]: AssociatedOption;
|
|
46
|
+
};
|
|
35
47
|
images?: Array<ProductImage> | undefined;
|
|
36
|
-
pricing
|
|
48
|
+
pricing: ProductPricing;
|
|
37
49
|
subscription?: Array<ProductSubscription> | undefined;
|
|
38
50
|
promotion?: Array<ProductPromotion> | undefined;
|
|
39
|
-
shipping?: ProductShipping | undefined;
|
|
40
|
-
metadata?: Array<Metadata> | null | undefined;
|
|
41
51
|
};
|
|
42
52
|
/** @internal */
|
|
43
|
-
export declare const AssociatedOptions$inboundSchema: z.ZodType<AssociatedOptions, z.ZodTypeDef, unknown>;
|
|
44
|
-
/** @internal */
|
|
45
|
-
export type AssociatedOptions$Outbound = {};
|
|
46
|
-
/** @internal */
|
|
47
|
-
export declare const AssociatedOptions$outboundSchema: z.ZodType<AssociatedOptions$Outbound, z.ZodTypeDef, AssociatedOptions>;
|
|
48
|
-
/**
|
|
49
|
-
* @internal
|
|
50
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
-
*/
|
|
52
|
-
export declare namespace AssociatedOptions$ {
|
|
53
|
-
/** @deprecated use `AssociatedOptions$inboundSchema` instead. */
|
|
54
|
-
const inboundSchema: z.ZodType<AssociatedOptions, z.ZodTypeDef, unknown>;
|
|
55
|
-
/** @deprecated use `AssociatedOptions$outboundSchema` instead. */
|
|
56
|
-
const outboundSchema: z.ZodType<AssociatedOptions$Outbound, z.ZodTypeDef, AssociatedOptions>;
|
|
57
|
-
/** @deprecated use `AssociatedOptions$Outbound` instead. */
|
|
58
|
-
type Outbound = AssociatedOptions$Outbound;
|
|
59
|
-
}
|
|
60
|
-
export declare function associatedOptionsToJSON(associatedOptions: AssociatedOptions): string;
|
|
61
|
-
export declare function associatedOptionsFromJSON(jsonString: string): SafeParseResult<AssociatedOptions, SDKValidationError>;
|
|
62
|
-
/** @internal */
|
|
63
|
-
export declare const Metadata$inboundSchema: z.ZodType<Metadata, z.ZodTypeDef, unknown>;
|
|
64
|
-
/** @internal */
|
|
65
|
-
export type Metadata$Outbound = {
|
|
66
|
-
key?: string | undefined;
|
|
67
|
-
value?: string | undefined;
|
|
68
|
-
};
|
|
69
|
-
/** @internal */
|
|
70
|
-
export declare const Metadata$outboundSchema: z.ZodType<Metadata$Outbound, z.ZodTypeDef, Metadata>;
|
|
71
|
-
/**
|
|
72
|
-
* @internal
|
|
73
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
74
|
-
*/
|
|
75
|
-
export declare namespace Metadata$ {
|
|
76
|
-
/** @deprecated use `Metadata$inboundSchema` instead. */
|
|
77
|
-
const inboundSchema: z.ZodType<Metadata, z.ZodTypeDef, unknown>;
|
|
78
|
-
/** @deprecated use `Metadata$outboundSchema` instead. */
|
|
79
|
-
const outboundSchema: z.ZodType<Metadata$Outbound, z.ZodTypeDef, Metadata>;
|
|
80
|
-
/** @deprecated use `Metadata$Outbound` instead. */
|
|
81
|
-
type Outbound = Metadata$Outbound;
|
|
82
|
-
}
|
|
83
|
-
export declare function metadataToJSON(metadata: Metadata): string;
|
|
84
|
-
export declare function metadataFromJSON(jsonString: string): SafeParseResult<Metadata, SDKValidationError>;
|
|
85
|
-
/** @internal */
|
|
86
53
|
export declare const Variant$inboundSchema: z.ZodType<Variant, z.ZodTypeDef, unknown>;
|
|
87
54
|
/** @internal */
|
|
88
55
|
export type Variant$Outbound = {
|
|
89
|
-
id
|
|
90
|
-
|
|
56
|
+
id: string;
|
|
57
|
+
product_id: string;
|
|
91
58
|
sku?: string | undefined;
|
|
92
59
|
slug?: string | undefined;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
stock_available
|
|
98
|
-
|
|
99
|
-
|
|
60
|
+
name: string;
|
|
61
|
+
product_name: string;
|
|
62
|
+
short_description: string;
|
|
63
|
+
active: boolean;
|
|
64
|
+
stock_available: boolean;
|
|
65
|
+
on_offer: boolean;
|
|
66
|
+
on_promotion: boolean;
|
|
67
|
+
on_subscription: boolean;
|
|
68
|
+
is_default: boolean;
|
|
69
|
+
associated_options: {
|
|
70
|
+
[k: string]: AssociatedOption$Outbound;
|
|
71
|
+
};
|
|
100
72
|
images?: Array<ProductImage$Outbound> | undefined;
|
|
101
|
-
pricing
|
|
73
|
+
pricing: ProductPricing$Outbound;
|
|
102
74
|
subscription?: Array<ProductSubscription$Outbound> | undefined;
|
|
103
75
|
promotion?: Array<ProductPromotion$Outbound> | undefined;
|
|
104
|
-
shipping?: ProductShipping$Outbound | undefined;
|
|
105
|
-
metadata?: Array<Metadata$Outbound> | null | undefined;
|
|
106
76
|
};
|
|
107
77
|
/** @internal */
|
|
108
78
|
export declare const Variant$outboundSchema: z.ZodType<Variant$Outbound, z.ZodTypeDef, Variant>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../src/models/components/variant.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;AACrE,OAAO,EACL,YAAY,EAEZ,qBAAqB,EAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,cAAc,EAEd,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAEhB,yBAAyB,EAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../src/models/components/variant.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,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AgCP,CAAC;AAEH;;;GAGG;AACH,yBAAiB,QAAQ,CAAC;IACxB,uDAAuD;IAChD,MAAM,aAAa,2CAAwB,CAAC;IACnD,wDAAwD;IACjD,MAAM,cAAc,oDAAyB,CAAC;IACrD,kDAAkD;IAClD,KAAY,QAAQ,GAAG,gBAAgB,CAAC;CACzC;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAEtD;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAM9C"}
|
|
@@ -4,118 +4,75 @@
|
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { AssociatedOption$inboundSchema, AssociatedOption$outboundSchema, } from "./associatedoption.js";
|
|
7
8
|
import { ProductImage$inboundSchema, ProductImage$outboundSchema, } from "./productimage.js";
|
|
8
9
|
import { ProductPricing$inboundSchema, ProductPricing$outboundSchema, } from "./productpricing.js";
|
|
9
10
|
import { ProductPromotion$inboundSchema, ProductPromotion$outboundSchema, } from "./productpromotion.js";
|
|
10
|
-
import { ProductShipping$inboundSchema, ProductShipping$outboundSchema, } from "./productshipping.js";
|
|
11
11
|
import { ProductSubscription$inboundSchema, ProductSubscription$outboundSchema, } from "./productsubscription.js";
|
|
12
12
|
/** @internal */
|
|
13
|
-
export const AssociatedOptions$inboundSchema = z.object({});
|
|
14
|
-
/** @internal */
|
|
15
|
-
export const AssociatedOptions$outboundSchema = z.object({});
|
|
16
|
-
/**
|
|
17
|
-
* @internal
|
|
18
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
19
|
-
*/
|
|
20
|
-
export var AssociatedOptions$;
|
|
21
|
-
(function (AssociatedOptions$) {
|
|
22
|
-
/** @deprecated use `AssociatedOptions$inboundSchema` instead. */
|
|
23
|
-
AssociatedOptions$.inboundSchema = AssociatedOptions$inboundSchema;
|
|
24
|
-
/** @deprecated use `AssociatedOptions$outboundSchema` instead. */
|
|
25
|
-
AssociatedOptions$.outboundSchema = AssociatedOptions$outboundSchema;
|
|
26
|
-
})(AssociatedOptions$ || (AssociatedOptions$ = {}));
|
|
27
|
-
export function associatedOptionsToJSON(associatedOptions) {
|
|
28
|
-
return JSON.stringify(AssociatedOptions$outboundSchema.parse(associatedOptions));
|
|
29
|
-
}
|
|
30
|
-
export function associatedOptionsFromJSON(jsonString) {
|
|
31
|
-
return safeParse(jsonString, (x) => AssociatedOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AssociatedOptions' from JSON`);
|
|
32
|
-
}
|
|
33
|
-
/** @internal */
|
|
34
|
-
export const Metadata$inboundSchema = z.object({
|
|
35
|
-
key: z.string().optional(),
|
|
36
|
-
value: z.string().optional(),
|
|
37
|
-
});
|
|
38
|
-
/** @internal */
|
|
39
|
-
export const Metadata$outboundSchema = z.object({
|
|
40
|
-
key: z.string().optional(),
|
|
41
|
-
value: z.string().optional(),
|
|
42
|
-
});
|
|
43
|
-
/**
|
|
44
|
-
* @internal
|
|
45
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
46
|
-
*/
|
|
47
|
-
export var Metadata$;
|
|
48
|
-
(function (Metadata$) {
|
|
49
|
-
/** @deprecated use `Metadata$inboundSchema` instead. */
|
|
50
|
-
Metadata$.inboundSchema = Metadata$inboundSchema;
|
|
51
|
-
/** @deprecated use `Metadata$outboundSchema` instead. */
|
|
52
|
-
Metadata$.outboundSchema = Metadata$outboundSchema;
|
|
53
|
-
})(Metadata$ || (Metadata$ = {}));
|
|
54
|
-
export function metadataToJSON(metadata) {
|
|
55
|
-
return JSON.stringify(Metadata$outboundSchema.parse(metadata));
|
|
56
|
-
}
|
|
57
|
-
export function metadataFromJSON(jsonString) {
|
|
58
|
-
return safeParse(jsonString, (x) => Metadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Metadata' from JSON`);
|
|
59
|
-
}
|
|
60
|
-
/** @internal */
|
|
61
13
|
export const Variant$inboundSchema = z.object({
|
|
62
|
-
id: z.string()
|
|
63
|
-
|
|
14
|
+
id: z.string(),
|
|
15
|
+
product_id: z.string(),
|
|
64
16
|
sku: z.string().optional(),
|
|
65
17
|
slug: z.string().optional(),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
18
|
+
name: z.string(),
|
|
19
|
+
product_name: z.string(),
|
|
20
|
+
short_description: z.string(),
|
|
21
|
+
active: z.boolean(),
|
|
22
|
+
stock_available: z.boolean(),
|
|
23
|
+
on_offer: z.boolean().default(false),
|
|
24
|
+
on_promotion: z.boolean().default(false),
|
|
25
|
+
on_subscription: z.boolean().default(false),
|
|
26
|
+
is_default: z.boolean(),
|
|
27
|
+
associated_options: z.record(AssociatedOption$inboundSchema),
|
|
74
28
|
images: z.array(ProductImage$inboundSchema).optional(),
|
|
75
|
-
pricing: ProductPricing$inboundSchema
|
|
29
|
+
pricing: ProductPricing$inboundSchema,
|
|
76
30
|
subscription: z.array(ProductSubscription$inboundSchema).optional(),
|
|
77
31
|
promotion: z.array(ProductPromotion$inboundSchema).optional(),
|
|
78
|
-
shipping: ProductShipping$inboundSchema.optional(),
|
|
79
|
-
metadata: z.nullable(z.array(z.lazy(() => Metadata$inboundSchema)))
|
|
80
|
-
.optional(),
|
|
81
32
|
}).transform((v) => {
|
|
82
33
|
return remap$(v, {
|
|
34
|
+
"product_id": "productId",
|
|
35
|
+
"product_name": "productName",
|
|
36
|
+
"short_description": "shortDescription",
|
|
37
|
+
"stock_available": "stockAvailable",
|
|
38
|
+
"on_offer": "onOffer",
|
|
83
39
|
"on_promotion": "onPromotion",
|
|
84
40
|
"on_subscription": "onSubscription",
|
|
85
|
-
"associated_options": "associatedOptions",
|
|
86
|
-
"stock_available": "stockAvailable",
|
|
87
|
-
"short_description": "shortDescription",
|
|
88
41
|
"is_default": "isDefault",
|
|
42
|
+
"associated_options": "associatedOptions",
|
|
89
43
|
});
|
|
90
44
|
});
|
|
91
45
|
/** @internal */
|
|
92
46
|
export const Variant$outboundSchema = z.object({
|
|
93
|
-
id: z.string()
|
|
94
|
-
|
|
47
|
+
id: z.string(),
|
|
48
|
+
productId: z.string(),
|
|
95
49
|
sku: z.string().optional(),
|
|
96
50
|
slug: z.string().optional(),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
stockAvailable: z.boolean()
|
|
102
|
-
|
|
103
|
-
|
|
51
|
+
name: z.string(),
|
|
52
|
+
productName: z.string(),
|
|
53
|
+
shortDescription: z.string(),
|
|
54
|
+
active: z.boolean(),
|
|
55
|
+
stockAvailable: z.boolean(),
|
|
56
|
+
onOffer: z.boolean().default(false),
|
|
57
|
+
onPromotion: z.boolean().default(false),
|
|
58
|
+
onSubscription: z.boolean().default(false),
|
|
59
|
+
isDefault: z.boolean(),
|
|
60
|
+
associatedOptions: z.record(AssociatedOption$outboundSchema),
|
|
104
61
|
images: z.array(ProductImage$outboundSchema).optional(),
|
|
105
|
-
pricing: ProductPricing$outboundSchema
|
|
62
|
+
pricing: ProductPricing$outboundSchema,
|
|
106
63
|
subscription: z.array(ProductSubscription$outboundSchema).optional(),
|
|
107
64
|
promotion: z.array(ProductPromotion$outboundSchema).optional(),
|
|
108
|
-
shipping: ProductShipping$outboundSchema.optional(),
|
|
109
|
-
metadata: z.nullable(z.array(z.lazy(() => Metadata$outboundSchema)))
|
|
110
|
-
.optional(),
|
|
111
65
|
}).transform((v) => {
|
|
112
66
|
return remap$(v, {
|
|
67
|
+
productId: "product_id",
|
|
68
|
+
productName: "product_name",
|
|
69
|
+
shortDescription: "short_description",
|
|
70
|
+
stockAvailable: "stock_available",
|
|
71
|
+
onOffer: "on_offer",
|
|
113
72
|
onPromotion: "on_promotion",
|
|
114
73
|
onSubscription: "on_subscription",
|
|
115
|
-
associatedOptions: "associated_options",
|
|
116
|
-
stockAvailable: "stock_available",
|
|
117
|
-
shortDescription: "short_description",
|
|
118
74
|
isDefault: "is_default",
|
|
75
|
+
associatedOptions: "associated_options",
|
|
119
76
|
});
|
|
120
77
|
});
|
|
121
78
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variant.js","sourceRoot":"","sources":["../../../src/models/components/variant.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;AAGjD,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,
|
|
1
|
+
{"version":3,"file":"variant.js","sourceRoot":"","sources":["../../../src/models/components/variant.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;AAGjD,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,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kCAAkC,CAAC,CAAC,QAAQ,EAAE;IACpE,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC,QAAQ,EAAE;CAC/D,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,SAAS,EAAE,YAAY;QACvB,WAAW,EAAE,cAAc;QAC3B,gBAAgB,EAAE,mBAAmB;QACrC,cAAc,EAAE,iBAAiB;QACjC,OAAO,EAAE,UAAU;QACnB,WAAW,EAAE,cAAc;QAC3B,cAAc,EAAE,iBAAiB;QACjC,SAAS,EAAE,YAAY;QACvB,iBAAiB,EAAE,oBAAoB;KACxC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,QAAQ,CAOxB;AAPD,WAAiB,QAAQ;IACvB,uDAAuD;IAC1C,sBAAa,GAAG,qBAAqB,CAAC;IACnD,wDAAwD;IAC3C,uBAAc,GAAG,sBAAsB,CAAC;AAGvD,CAAC,EAPgB,QAAQ,KAAR,QAAQ,QAOxB;AAED,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC5C,OAAO,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,eAAe,CAC7B,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qBAAqB,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjD,qCAAqC,CACtC,CAAC;AACJ,CAAC"}
|
|
@@ -1,111 +1,144 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
|
+
import { AssociatedOption, AssociatedOption$Outbound } from "./associatedoption.js";
|
|
6
|
+
import { ProductAttribute, ProductAttribute$Outbound } from "./productattribute.js";
|
|
4
7
|
import { ProductImage, ProductImage$Outbound } from "./productimage.js";
|
|
5
|
-
import { ProductPackaging, ProductPackaging$Outbound } from "./productpackaging.js";
|
|
6
8
|
import { ProductPricing, ProductPricing$Outbound } from "./productpricing.js";
|
|
7
9
|
import { ProductPromotion, ProductPromotion$Outbound } from "./productpromotion.js";
|
|
8
10
|
import { ProductShipping, ProductShipping$Outbound } from "./productshipping.js";
|
|
9
11
|
import { ProductSubscription, ProductSubscription$Outbound } from "./productsubscription.js";
|
|
10
12
|
import { ProductVideo, ProductVideo$Outbound } from "./productvideo.js";
|
|
11
13
|
import { Seo, Seo$Outbound } from "./seo.js";
|
|
12
|
-
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
import { VariantOption, VariantOption$Outbound } from "./variantoption.js";
|
|
15
|
+
export declare const VariantDetailProductType: {
|
|
16
|
+
readonly Physical: "physical";
|
|
17
|
+
readonly Digital: "digital";
|
|
18
|
+
readonly Bundle: "bundle";
|
|
16
19
|
};
|
|
20
|
+
export type VariantDetailProductType = ClosedEnum<typeof VariantDetailProductType>;
|
|
17
21
|
export type VariantDetail = {
|
|
18
22
|
/**
|
|
19
23
|
* variant id
|
|
20
24
|
*/
|
|
21
|
-
id
|
|
25
|
+
id: string;
|
|
22
26
|
/**
|
|
23
|
-
*
|
|
27
|
+
* product id
|
|
24
28
|
*/
|
|
25
|
-
|
|
26
|
-
shortDescription?: string | undefined;
|
|
27
|
-
description?: string | undefined;
|
|
28
|
-
stockAvailable?: boolean | undefined;
|
|
29
|
-
isDefault?: boolean | undefined;
|
|
30
|
-
associatedOptions?: VariantDetailAssociatedOptions | undefined;
|
|
31
|
-
metadata?: Array<VariantDetailMetadata> | null | undefined;
|
|
29
|
+
productId: string;
|
|
32
30
|
/**
|
|
33
31
|
* variant sku
|
|
34
32
|
*/
|
|
35
33
|
sku?: string | undefined;
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
slug?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* variant name
|
|
37
|
+
*/
|
|
38
|
+
name: string;
|
|
39
|
+
/**
|
|
40
|
+
* variant name
|
|
41
|
+
*/
|
|
42
|
+
productName: string;
|
|
43
|
+
shortDescription: string;
|
|
44
|
+
active: boolean;
|
|
45
|
+
stockAvailable: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Indicates whether this item is associated with any active (product-specific) coupons
|
|
48
|
+
*/
|
|
49
|
+
onOffer?: boolean | undefined;
|
|
50
|
+
onPromotion?: boolean | undefined;
|
|
51
|
+
onSubscription?: boolean | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Indicates whether a variant is marked as the default variant for a product
|
|
54
|
+
*/
|
|
55
|
+
isDefault: boolean;
|
|
56
|
+
associatedOptions: {
|
|
57
|
+
[k: string]: AssociatedOption;
|
|
58
|
+
};
|
|
38
59
|
images?: Array<ProductImage> | undefined;
|
|
39
|
-
|
|
40
|
-
packaging?: ProductPackaging | undefined;
|
|
41
|
-
promotion?: Array<ProductPromotion> | undefined;
|
|
60
|
+
pricing: ProductPricing;
|
|
42
61
|
subscription?: Array<ProductSubscription> | undefined;
|
|
62
|
+
promotion?: Array<ProductPromotion> | undefined;
|
|
63
|
+
productType: VariantDetailProductType;
|
|
64
|
+
description?: string | undefined;
|
|
65
|
+
categoryIds?: Array<string> | undefined;
|
|
66
|
+
tags?: Array<string> | null | undefined;
|
|
67
|
+
reviewRatingSum?: number | undefined;
|
|
68
|
+
reviewsCount?: number | undefined;
|
|
69
|
+
hsnCode?: string | undefined;
|
|
70
|
+
variantOptions: Array<VariantOption>;
|
|
71
|
+
productAttributes?: Array<ProductAttribute> | undefined;
|
|
72
|
+
variantAttributes?: Array<ProductAttribute> | undefined;
|
|
73
|
+
videos?: Array<ProductVideo> | undefined;
|
|
74
|
+
shipping?: ProductShipping | null | undefined;
|
|
43
75
|
seo?: Seo | undefined;
|
|
76
|
+
metadata?: {
|
|
77
|
+
[k: string]: string;
|
|
78
|
+
} | undefined;
|
|
44
79
|
};
|
|
45
80
|
/** @internal */
|
|
46
|
-
export declare const
|
|
81
|
+
export declare const VariantDetailProductType$inboundSchema: z.ZodNativeEnum<typeof VariantDetailProductType>;
|
|
47
82
|
/** @internal */
|
|
48
|
-
export
|
|
49
|
-
/** @internal */
|
|
50
|
-
export declare const VariantDetailAssociatedOptions$outboundSchema: z.ZodType<VariantDetailAssociatedOptions$Outbound, z.ZodTypeDef, VariantDetailAssociatedOptions>;
|
|
51
|
-
/**
|
|
52
|
-
* @internal
|
|
53
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
|
-
*/
|
|
55
|
-
export declare namespace VariantDetailAssociatedOptions$ {
|
|
56
|
-
/** @deprecated use `VariantDetailAssociatedOptions$inboundSchema` instead. */
|
|
57
|
-
const inboundSchema: z.ZodType<VariantDetailAssociatedOptions, z.ZodTypeDef, unknown>;
|
|
58
|
-
/** @deprecated use `VariantDetailAssociatedOptions$outboundSchema` instead. */
|
|
59
|
-
const outboundSchema: z.ZodType<VariantDetailAssociatedOptions$Outbound, z.ZodTypeDef, VariantDetailAssociatedOptions>;
|
|
60
|
-
/** @deprecated use `VariantDetailAssociatedOptions$Outbound` instead. */
|
|
61
|
-
type Outbound = VariantDetailAssociatedOptions$Outbound;
|
|
62
|
-
}
|
|
63
|
-
export declare function variantDetailAssociatedOptionsToJSON(variantDetailAssociatedOptions: VariantDetailAssociatedOptions): string;
|
|
64
|
-
export declare function variantDetailAssociatedOptionsFromJSON(jsonString: string): SafeParseResult<VariantDetailAssociatedOptions, SDKValidationError>;
|
|
65
|
-
/** @internal */
|
|
66
|
-
export declare const VariantDetailMetadata$inboundSchema: z.ZodType<VariantDetailMetadata, z.ZodTypeDef, unknown>;
|
|
67
|
-
/** @internal */
|
|
68
|
-
export type VariantDetailMetadata$Outbound = {
|
|
69
|
-
key?: string | undefined;
|
|
70
|
-
value?: string | undefined;
|
|
71
|
-
};
|
|
72
|
-
/** @internal */
|
|
73
|
-
export declare const VariantDetailMetadata$outboundSchema: z.ZodType<VariantDetailMetadata$Outbound, z.ZodTypeDef, VariantDetailMetadata>;
|
|
83
|
+
export declare const VariantDetailProductType$outboundSchema: z.ZodNativeEnum<typeof VariantDetailProductType>;
|
|
74
84
|
/**
|
|
75
85
|
* @internal
|
|
76
86
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
77
87
|
*/
|
|
78
|
-
export declare namespace
|
|
79
|
-
/** @deprecated use `
|
|
80
|
-
const inboundSchema: z.
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
export declare namespace VariantDetailProductType$ {
|
|
89
|
+
/** @deprecated use `VariantDetailProductType$inboundSchema` instead. */
|
|
90
|
+
const inboundSchema: z.ZodNativeEnum<{
|
|
91
|
+
readonly Physical: "physical";
|
|
92
|
+
readonly Digital: "digital";
|
|
93
|
+
readonly Bundle: "bundle";
|
|
94
|
+
}>;
|
|
95
|
+
/** @deprecated use `VariantDetailProductType$outboundSchema` instead. */
|
|
96
|
+
const outboundSchema: z.ZodNativeEnum<{
|
|
97
|
+
readonly Physical: "physical";
|
|
98
|
+
readonly Digital: "digital";
|
|
99
|
+
readonly Bundle: "bundle";
|
|
100
|
+
}>;
|
|
85
101
|
}
|
|
86
|
-
export declare function variantDetailMetadataToJSON(variantDetailMetadata: VariantDetailMetadata): string;
|
|
87
|
-
export declare function variantDetailMetadataFromJSON(jsonString: string): SafeParseResult<VariantDetailMetadata, SDKValidationError>;
|
|
88
102
|
/** @internal */
|
|
89
103
|
export declare const VariantDetail$inboundSchema: z.ZodType<VariantDetail, z.ZodTypeDef, unknown>;
|
|
90
104
|
/** @internal */
|
|
91
105
|
export type VariantDetail$Outbound = {
|
|
92
|
-
id
|
|
93
|
-
|
|
94
|
-
short_description?: string | undefined;
|
|
95
|
-
description?: string | undefined;
|
|
96
|
-
stock_available?: boolean | undefined;
|
|
97
|
-
is_default?: boolean | undefined;
|
|
98
|
-
associated_options?: VariantDetailAssociatedOptions$Outbound | undefined;
|
|
99
|
-
metadata?: Array<VariantDetailMetadata$Outbound> | null | undefined;
|
|
106
|
+
id: string;
|
|
107
|
+
product_id: string;
|
|
100
108
|
sku?: string | undefined;
|
|
101
|
-
|
|
102
|
-
|
|
109
|
+
slug?: string | undefined;
|
|
110
|
+
name: string;
|
|
111
|
+
product_name: string;
|
|
112
|
+
short_description: string;
|
|
113
|
+
active: boolean;
|
|
114
|
+
stock_available: boolean;
|
|
115
|
+
on_offer: boolean;
|
|
116
|
+
on_promotion: boolean;
|
|
117
|
+
on_subscription: boolean;
|
|
118
|
+
is_default: boolean;
|
|
119
|
+
associated_options: {
|
|
120
|
+
[k: string]: AssociatedOption$Outbound;
|
|
121
|
+
};
|
|
103
122
|
images?: Array<ProductImage$Outbound> | undefined;
|
|
104
|
-
|
|
105
|
-
packaging?: ProductPackaging$Outbound | undefined;
|
|
106
|
-
promotion?: Array<ProductPromotion$Outbound> | undefined;
|
|
123
|
+
pricing: ProductPricing$Outbound;
|
|
107
124
|
subscription?: Array<ProductSubscription$Outbound> | undefined;
|
|
125
|
+
promotion?: Array<ProductPromotion$Outbound> | undefined;
|
|
126
|
+
product_type: string;
|
|
127
|
+
description?: string | undefined;
|
|
128
|
+
category_ids?: Array<string> | undefined;
|
|
129
|
+
tags?: Array<string> | null | undefined;
|
|
130
|
+
review_rating_sum?: number | undefined;
|
|
131
|
+
reviews_count?: number | undefined;
|
|
132
|
+
hsn_code?: string | undefined;
|
|
133
|
+
variant_options: Array<VariantOption$Outbound>;
|
|
134
|
+
product_attributes?: Array<ProductAttribute$Outbound> | undefined;
|
|
135
|
+
variant_attributes?: Array<ProductAttribute$Outbound> | undefined;
|
|
136
|
+
videos?: Array<ProductVideo$Outbound> | undefined;
|
|
137
|
+
shipping?: ProductShipping$Outbound | null | undefined;
|
|
108
138
|
seo?: Seo$Outbound | undefined;
|
|
139
|
+
metadata?: {
|
|
140
|
+
[k: string]: string;
|
|
141
|
+
} | undefined;
|
|
109
142
|
};
|
|
110
143
|
/** @internal */
|
|
111
144
|
export declare const VariantDetail$outboundSchema: z.ZodType<VariantDetail$Outbound, z.ZodTypeDef, VariantDetail>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variantdetail.d.ts","sourceRoot":"","sources":["../../../src/models/components/variantdetail.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;AACrE,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"variantdetail.d.ts","sourceRoot":"","sources":["../../../src/models/components/variantdetail.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,gBAAgB,EAEhB,yBAAyB,EAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,YAAY,EAEZ,qBAAqB,EAEtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,cAAc,EAEd,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,gBAAgB,EAEhB,yBAAyB,EAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,eAAe,EAEf,wBAAwB,EAEzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,mBAAmB,EAEn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