ce-storefront 0.4.0 → 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.
Files changed (77) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/components/index.d.ts +3 -5
  4. package/esm/models/components/index.d.ts.map +1 -1
  5. package/esm/models/components/index.js +3 -5
  6. package/esm/models/components/index.js.map +1 -1
  7. package/esm/models/components/{singleproduct.d.ts → product.d.ts} +17 -14
  8. package/esm/models/components/product.d.ts.map +1 -0
  9. package/esm/models/components/{singleproduct.js → product.js} +19 -14
  10. package/esm/models/components/product.js.map +1 -0
  11. package/esm/models/components/productbundleitem.d.ts +142 -0
  12. package/esm/models/components/productbundleitem.d.ts.map +1 -0
  13. package/esm/models/components/productbundleitem.js +171 -0
  14. package/esm/models/components/productbundleitem.js.map +1 -0
  15. package/esm/models/components/productdetail.d.ts +139 -4
  16. package/esm/models/components/productdetail.d.ts.map +1 -1
  17. package/esm/models/components/productdetail.js +136 -10
  18. package/esm/models/components/productdetail.js.map +1 -1
  19. package/esm/models/components/productlist.d.ts +36 -0
  20. package/esm/models/components/productlist.d.ts.map +1 -0
  21. package/esm/models/components/productlist.js +35 -0
  22. package/esm/models/components/productlist.js.map +1 -0
  23. package/esm/models/operations/getcrosssell.d.ts +2 -2
  24. package/esm/models/operations/getcrosssell.d.ts.map +1 -1
  25. package/esm/models/operations/getcrosssell.js +2 -2
  26. package/esm/models/operations/getcrosssell.js.map +1 -1
  27. package/esm/models/operations/getproducts.d.ts +32 -2
  28. package/esm/models/operations/getproducts.d.ts.map +1 -1
  29. package/esm/models/operations/getproducts.js +29 -2
  30. package/esm/models/operations/getproducts.js.map +1 -1
  31. package/esm/models/operations/getsimilar.d.ts +2 -2
  32. package/esm/models/operations/getsimilar.d.ts.map +1 -1
  33. package/esm/models/operations/getsimilar.js +2 -2
  34. package/esm/models/operations/getsimilar.js.map +1 -1
  35. package/esm/models/operations/getskus.d.ts +15 -15
  36. package/esm/models/operations/getskus.d.ts.map +1 -1
  37. package/esm/models/operations/getskus.js +15 -15
  38. package/esm/models/operations/getskus.js.map +1 -1
  39. package/esm/models/operations/getupsell.d.ts +2 -2
  40. package/esm/models/operations/getupsell.d.ts.map +1 -1
  41. package/esm/models/operations/getupsell.js +2 -2
  42. package/esm/models/operations/getupsell.js.map +1 -1
  43. package/jsr.json +1 -1
  44. package/package.json +1 -1
  45. package/src/lib/config.ts +2 -2
  46. package/src/models/components/index.ts +3 -5
  47. package/src/models/components/{singleproduct.ts → product.ts} +69 -60
  48. package/src/models/components/productbundleitem.ts +329 -0
  49. package/src/models/components/productdetail.ts +295 -22
  50. package/src/models/components/productlist.ts +81 -0
  51. package/src/models/operations/getcrosssell.ts +4 -4
  52. package/src/models/operations/getproducts.ts +62 -4
  53. package/src/models/operations/getsimilar.ts +4 -4
  54. package/src/models/operations/getskus.ts +30 -27
  55. package/src/models/operations/getupsell.ts +4 -4
  56. package/esm/models/components/bundleproduct.d.ts +0 -236
  57. package/esm/models/components/bundleproduct.d.ts.map +0 -1
  58. package/esm/models/components/bundleproduct.js +0 -258
  59. package/esm/models/components/bundleproduct.js.map +0 -1
  60. package/esm/models/components/bundleproductdetail.d.ts +0 -265
  61. package/esm/models/components/bundleproductdetail.d.ts.map +0 -1
  62. package/esm/models/components/bundleproductdetail.js +0 -284
  63. package/esm/models/components/bundleproductdetail.js.map +0 -1
  64. package/esm/models/components/productlistresponse.d.ts +0 -58
  65. package/esm/models/components/productlistresponse.d.ts.map +0 -1
  66. package/esm/models/components/productlistresponse.js +0 -57
  67. package/esm/models/components/productlistresponse.js.map +0 -1
  68. package/esm/models/components/singleproduct.d.ts.map +0 -1
  69. package/esm/models/components/singleproduct.js.map +0 -1
  70. package/esm/models/components/singleproductdetail.d.ts +0 -159
  71. package/esm/models/components/singleproductdetail.d.ts.map +0 -1
  72. package/esm/models/components/singleproductdetail.js +0 -156
  73. package/esm/models/components/singleproductdetail.js.map +0 -1
  74. package/src/models/components/bundleproduct.ts +0 -494
  75. package/src/models/components/bundleproductdetail.ts +0 -560
  76. package/src/models/components/productlistresponse.ts +0 -141
  77. package/src/models/components/singleproductdetail.ts +0 -339
@@ -0,0 +1,81 @@
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
+ import {
10
+ Pagination,
11
+ Pagination$inboundSchema,
12
+ Pagination$Outbound,
13
+ Pagination$outboundSchema,
14
+ } from "./pagination.js";
15
+ import {
16
+ Product,
17
+ Product$inboundSchema,
18
+ Product$Outbound,
19
+ Product$outboundSchema,
20
+ } from "./product.js";
21
+
22
+ export type ProductList = {
23
+ products: Product;
24
+ /**
25
+ * pagination metadata structure
26
+ */
27
+ pagination: Pagination;
28
+ };
29
+
30
+ /** @internal */
31
+ export const ProductList$inboundSchema: z.ZodType<
32
+ ProductList,
33
+ z.ZodTypeDef,
34
+ unknown
35
+ > = z.object({
36
+ products: Product$inboundSchema,
37
+ pagination: Pagination$inboundSchema,
38
+ });
39
+
40
+ /** @internal */
41
+ export type ProductList$Outbound = {
42
+ products: Product$Outbound;
43
+ pagination: Pagination$Outbound;
44
+ };
45
+
46
+ /** @internal */
47
+ export const ProductList$outboundSchema: z.ZodType<
48
+ ProductList$Outbound,
49
+ z.ZodTypeDef,
50
+ ProductList
51
+ > = z.object({
52
+ products: Product$outboundSchema,
53
+ pagination: Pagination$outboundSchema,
54
+ });
55
+
56
+ /**
57
+ * @internal
58
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
59
+ */
60
+ export namespace ProductList$ {
61
+ /** @deprecated use `ProductList$inboundSchema` instead. */
62
+ export const inboundSchema = ProductList$inboundSchema;
63
+ /** @deprecated use `ProductList$outboundSchema` instead. */
64
+ export const outboundSchema = ProductList$outboundSchema;
65
+ /** @deprecated use `ProductList$Outbound` instead. */
66
+ export type Outbound = ProductList$Outbound;
67
+ }
68
+
69
+ export function productListToJSON(productList: ProductList): string {
70
+ return JSON.stringify(ProductList$outboundSchema.parse(productList));
71
+ }
72
+
73
+ export function productListFromJSON(
74
+ jsonString: string,
75
+ ): SafeParseResult<ProductList, SDKValidationError> {
76
+ return safeParse(
77
+ jsonString,
78
+ (x) => ProductList$inboundSchema.parse(JSON.parse(x)),
79
+ `Failed to parse 'ProductList' from JSON`,
80
+ );
81
+ }
@@ -34,7 +34,7 @@ export type GetCrossSellRequest = {
34
34
  export type GetCrossSellResponseBody = {
35
35
  message: string;
36
36
  success: boolean;
37
- content: components.ProductListResponse;
37
+ content: components.ProductList;
38
38
  };
39
39
 
40
40
  /** @internal */
@@ -118,14 +118,14 @@ export const GetCrossSellResponseBody$inboundSchema: z.ZodType<
118
118
  > = z.object({
119
119
  message: z.string(),
120
120
  success: z.boolean(),
121
- content: components.ProductListResponse$inboundSchema,
121
+ content: components.ProductList$inboundSchema,
122
122
  });
123
123
 
124
124
  /** @internal */
125
125
  export type GetCrossSellResponseBody$Outbound = {
126
126
  message: string;
127
127
  success: boolean;
128
- content: components.ProductListResponse$Outbound;
128
+ content: components.ProductList$Outbound;
129
129
  };
130
130
 
131
131
  /** @internal */
@@ -136,7 +136,7 @@ export const GetCrossSellResponseBody$outboundSchema: z.ZodType<
136
136
  > = z.object({
137
137
  message: z.string(),
138
138
  success: z.boolean(),
139
- content: components.ProductListResponse$outboundSchema,
139
+ content: components.ProductList$outboundSchema,
140
140
  });
141
141
 
142
142
  /**
@@ -32,13 +32,21 @@ export type GetProductsRequest = {
32
32
  customerGroup?: string | undefined;
33
33
  };
34
34
 
35
+ export type Content = {
36
+ products?: Array<components.Product> | undefined;
37
+ /**
38
+ * pagination metadata structure
39
+ */
40
+ pagination?: components.Pagination | undefined;
41
+ };
42
+
35
43
  /**
36
44
  * Success response
37
45
  */
38
46
  export type GetProductsResponseBody = {
39
47
  message: string;
40
48
  success?: boolean | undefined;
41
- content: components.ProductListResponse;
49
+ content: Content;
42
50
  };
43
51
 
44
52
  /** @internal */
@@ -119,6 +127,56 @@ export function getProductsRequestFromJSON(
119
127
  );
120
128
  }
121
129
 
130
+ /** @internal */
131
+ export const Content$inboundSchema: z.ZodType<Content, z.ZodTypeDef, unknown> =
132
+ z.object({
133
+ products: z.array(components.Product$inboundSchema).optional(),
134
+ pagination: components.Pagination$inboundSchema.optional(),
135
+ });
136
+
137
+ /** @internal */
138
+ export type Content$Outbound = {
139
+ products?: Array<components.Product$Outbound> | undefined;
140
+ pagination?: components.Pagination$Outbound | undefined;
141
+ };
142
+
143
+ /** @internal */
144
+ export const Content$outboundSchema: z.ZodType<
145
+ Content$Outbound,
146
+ z.ZodTypeDef,
147
+ Content
148
+ > = z.object({
149
+ products: z.array(components.Product$outboundSchema).optional(),
150
+ pagination: components.Pagination$outboundSchema.optional(),
151
+ });
152
+
153
+ /**
154
+ * @internal
155
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
156
+ */
157
+ export namespace Content$ {
158
+ /** @deprecated use `Content$inboundSchema` instead. */
159
+ export const inboundSchema = Content$inboundSchema;
160
+ /** @deprecated use `Content$outboundSchema` instead. */
161
+ export const outboundSchema = Content$outboundSchema;
162
+ /** @deprecated use `Content$Outbound` instead. */
163
+ export type Outbound = Content$Outbound;
164
+ }
165
+
166
+ export function contentToJSON(content: Content): string {
167
+ return JSON.stringify(Content$outboundSchema.parse(content));
168
+ }
169
+
170
+ export function contentFromJSON(
171
+ jsonString: string,
172
+ ): SafeParseResult<Content, SDKValidationError> {
173
+ return safeParse(
174
+ jsonString,
175
+ (x) => Content$inboundSchema.parse(JSON.parse(x)),
176
+ `Failed to parse 'Content' from JSON`,
177
+ );
178
+ }
179
+
122
180
  /** @internal */
123
181
  export const GetProductsResponseBody$inboundSchema: z.ZodType<
124
182
  GetProductsResponseBody,
@@ -127,14 +185,14 @@ export const GetProductsResponseBody$inboundSchema: z.ZodType<
127
185
  > = z.object({
128
186
  message: z.string(),
129
187
  success: z.boolean().default(true),
130
- content: components.ProductListResponse$inboundSchema,
188
+ content: z.lazy(() => Content$inboundSchema),
131
189
  });
132
190
 
133
191
  /** @internal */
134
192
  export type GetProductsResponseBody$Outbound = {
135
193
  message: string;
136
194
  success: boolean;
137
- content: components.ProductListResponse$Outbound;
195
+ content: Content$Outbound;
138
196
  };
139
197
 
140
198
  /** @internal */
@@ -145,7 +203,7 @@ export const GetProductsResponseBody$outboundSchema: z.ZodType<
145
203
  > = z.object({
146
204
  message: z.string(),
147
205
  success: z.boolean().default(true),
148
- content: components.ProductListResponse$outboundSchema,
206
+ content: z.lazy(() => Content$outboundSchema),
149
207
  });
150
208
 
151
209
  /**
@@ -34,7 +34,7 @@ export type GetSimilarRequest = {
34
34
  export type GetSimilarResponseBody = {
35
35
  message: string;
36
36
  success: boolean;
37
- content: components.ProductListResponse;
37
+ content: components.ProductList;
38
38
  };
39
39
 
40
40
  /** @internal */
@@ -118,14 +118,14 @@ export const GetSimilarResponseBody$inboundSchema: z.ZodType<
118
118
  > = z.object({
119
119
  message: z.string(),
120
120
  success: z.boolean(),
121
- content: components.ProductListResponse$inboundSchema,
121
+ content: components.ProductList$inboundSchema,
122
122
  });
123
123
 
124
124
  /** @internal */
125
125
  export type GetSimilarResponseBody$Outbound = {
126
126
  message: string;
127
127
  success: boolean;
128
- content: components.ProductListResponse$Outbound;
128
+ content: components.ProductList$Outbound;
129
129
  };
130
130
 
131
131
  /** @internal */
@@ -136,7 +136,7 @@ export const GetSimilarResponseBody$outboundSchema: z.ZodType<
136
136
  > = z.object({
137
137
  message: z.string(),
138
138
  success: z.boolean(),
139
- content: components.ProductListResponse$outboundSchema,
139
+ content: components.ProductList$outboundSchema,
140
140
  });
141
141
 
142
142
  /**
@@ -36,7 +36,7 @@ export type GetSkusRequest = {
36
36
  sku?: Array<string> | undefined;
37
37
  };
38
38
 
39
- export type Content = {
39
+ export type GetSkusContent = {
40
40
  skus: Array<components.Sku>;
41
41
  /**
42
42
  * pagination metadata structure
@@ -50,7 +50,7 @@ export type Content = {
50
50
  export type GetSkusResponseBody = {
51
51
  message: string;
52
52
  success?: boolean | undefined;
53
- content: Content;
53
+ content: GetSkusContent;
54
54
  };
55
55
 
56
56
  /** @internal */
@@ -131,23 +131,26 @@ export function getSkusRequestFromJSON(
131
131
  }
132
132
 
133
133
  /** @internal */
134
- export const Content$inboundSchema: z.ZodType<Content, z.ZodTypeDef, unknown> =
135
- z.object({
136
- skus: z.array(components.Sku$inboundSchema),
137
- pagination: components.Pagination$inboundSchema,
138
- });
134
+ export const GetSkusContent$inboundSchema: z.ZodType<
135
+ GetSkusContent,
136
+ z.ZodTypeDef,
137
+ unknown
138
+ > = z.object({
139
+ skus: z.array(components.Sku$inboundSchema),
140
+ pagination: components.Pagination$inboundSchema,
141
+ });
139
142
 
140
143
  /** @internal */
141
- export type Content$Outbound = {
144
+ export type GetSkusContent$Outbound = {
142
145
  skus: Array<components.Sku$Outbound>;
143
146
  pagination: components.Pagination$Outbound;
144
147
  };
145
148
 
146
149
  /** @internal */
147
- export const Content$outboundSchema: z.ZodType<
148
- Content$Outbound,
150
+ export const GetSkusContent$outboundSchema: z.ZodType<
151
+ GetSkusContent$Outbound,
149
152
  z.ZodTypeDef,
150
- Content
153
+ GetSkusContent
151
154
  > = z.object({
152
155
  skus: z.array(components.Sku$outboundSchema),
153
156
  pagination: components.Pagination$outboundSchema,
@@ -157,26 +160,26 @@ export const Content$outboundSchema: z.ZodType<
157
160
  * @internal
158
161
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
159
162
  */
160
- export namespace Content$ {
161
- /** @deprecated use `Content$inboundSchema` instead. */
162
- export const inboundSchema = Content$inboundSchema;
163
- /** @deprecated use `Content$outboundSchema` instead. */
164
- export const outboundSchema = Content$outboundSchema;
165
- /** @deprecated use `Content$Outbound` instead. */
166
- export type Outbound = Content$Outbound;
163
+ export namespace GetSkusContent$ {
164
+ /** @deprecated use `GetSkusContent$inboundSchema` instead. */
165
+ export const inboundSchema = GetSkusContent$inboundSchema;
166
+ /** @deprecated use `GetSkusContent$outboundSchema` instead. */
167
+ export const outboundSchema = GetSkusContent$outboundSchema;
168
+ /** @deprecated use `GetSkusContent$Outbound` instead. */
169
+ export type Outbound = GetSkusContent$Outbound;
167
170
  }
168
171
 
169
- export function contentToJSON(content: Content): string {
170
- return JSON.stringify(Content$outboundSchema.parse(content));
172
+ export function getSkusContentToJSON(getSkusContent: GetSkusContent): string {
173
+ return JSON.stringify(GetSkusContent$outboundSchema.parse(getSkusContent));
171
174
  }
172
175
 
173
- export function contentFromJSON(
176
+ export function getSkusContentFromJSON(
174
177
  jsonString: string,
175
- ): SafeParseResult<Content, SDKValidationError> {
178
+ ): SafeParseResult<GetSkusContent, SDKValidationError> {
176
179
  return safeParse(
177
180
  jsonString,
178
- (x) => Content$inboundSchema.parse(JSON.parse(x)),
179
- `Failed to parse 'Content' from JSON`,
181
+ (x) => GetSkusContent$inboundSchema.parse(JSON.parse(x)),
182
+ `Failed to parse 'GetSkusContent' from JSON`,
180
183
  );
181
184
  }
182
185
 
@@ -188,14 +191,14 @@ export const GetSkusResponseBody$inboundSchema: z.ZodType<
188
191
  > = z.object({
189
192
  message: z.string(),
190
193
  success: z.boolean().default(true),
191
- content: z.lazy(() => Content$inboundSchema),
194
+ content: z.lazy(() => GetSkusContent$inboundSchema),
192
195
  });
193
196
 
194
197
  /** @internal */
195
198
  export type GetSkusResponseBody$Outbound = {
196
199
  message: string;
197
200
  success: boolean;
198
- content: Content$Outbound;
201
+ content: GetSkusContent$Outbound;
199
202
  };
200
203
 
201
204
  /** @internal */
@@ -206,7 +209,7 @@ export const GetSkusResponseBody$outboundSchema: z.ZodType<
206
209
  > = z.object({
207
210
  message: z.string(),
208
211
  success: z.boolean().default(true),
209
- content: z.lazy(() => Content$outboundSchema),
212
+ content: z.lazy(() => GetSkusContent$outboundSchema),
210
213
  });
211
214
 
212
215
  /**
@@ -37,7 +37,7 @@ export type GetUpSellResponseBody = {
37
37
  */
38
38
  message: string;
39
39
  success: boolean;
40
- content: components.ProductListResponse;
40
+ content: components.ProductList;
41
41
  };
42
42
 
43
43
  /** @internal */
@@ -121,14 +121,14 @@ export const GetUpSellResponseBody$inboundSchema: z.ZodType<
121
121
  > = z.object({
122
122
  message: z.string(),
123
123
  success: z.boolean(),
124
- content: components.ProductListResponse$inboundSchema,
124
+ content: components.ProductList$inboundSchema,
125
125
  });
126
126
 
127
127
  /** @internal */
128
128
  export type GetUpSellResponseBody$Outbound = {
129
129
  message: string;
130
130
  success: boolean;
131
- content: components.ProductListResponse$Outbound;
131
+ content: components.ProductList$Outbound;
132
132
  };
133
133
 
134
134
  /** @internal */
@@ -139,7 +139,7 @@ export const GetUpSellResponseBody$outboundSchema: z.ZodType<
139
139
  > = z.object({
140
140
  message: z.string(),
141
141
  success: z.boolean(),
142
- content: components.ProductListResponse$outboundSchema,
142
+ content: components.ProductList$outboundSchema,
143
143
  });
144
144
 
145
145
  /**
@@ -1,236 +0,0 @@
1
- import * as z from "zod";
2
- import { ClosedEnum } from "../../types/enums.js";
3
- import { Result as SafeParseResult } from "../../types/fp.js";
4
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
- import { AssociatedOption, AssociatedOption$Outbound } from "./associatedoption.js";
6
- import { ProductAttribute, ProductAttribute$Outbound } from "./productattribute.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 { ProductSubscription, ProductSubscription$Outbound } from "./productsubscription.js";
11
- import { VariantOption, VariantOption$Outbound } from "./variantoption.js";
12
- export declare const BundleProductProductType: {
13
- readonly Physical: "physical";
14
- readonly Digital: "digital";
15
- readonly Bundle: "bundle";
16
- };
17
- export type BundleProductProductType = ClosedEnum<typeof BundleProductProductType>;
18
- export declare const BundleProductBundleItemsProductType: {
19
- readonly Physical: "physical";
20
- readonly Digital: "digital";
21
- readonly Bundle: "bundle";
22
- };
23
- export type BundleProductBundleItemsProductType = ClosedEnum<typeof BundleProductBundleItemsProductType>;
24
- export type BundleProductSKU = {
25
- quantity: number;
26
- productId: string;
27
- variantId: string | null;
28
- sku: string;
29
- slug: string | null;
30
- productName: string;
31
- variantName: string | null;
32
- productType: BundleProductBundleItemsProductType;
33
- shortDescription: string | null;
34
- active: boolean;
35
- stockAvailable: boolean;
36
- /**
37
- * Indicates whether this item is associated with any active (product-specific) coupons
38
- */
39
- onOffer: boolean;
40
- onSubscription: boolean;
41
- onPromotion: boolean;
42
- categoryIds: Array<string>;
43
- tags: Array<string> | null;
44
- reviewsCount: number;
45
- reviewsRatingSum: number | null;
46
- attributes: Array<ProductAttribute>;
47
- images: Array<ProductImage>;
48
- pricing: ProductPricing;
49
- promotion: ProductPromotion | null;
50
- subscription: Array<ProductSubscription>;
51
- associatedOptions: {
52
- [k: string]: AssociatedOption;
53
- } | null;
54
- };
55
- export type BundleProduct = {
56
- /**
57
- * The ULID of the product
58
- */
59
- id: string;
60
- sku: string | null;
61
- name: string;
62
- slug: string | null;
63
- shortDescription: string | null;
64
- productType: BundleProductProductType;
65
- active: boolean;
66
- /**
67
- * Indicates whether the product has stock available
68
- */
69
- stockAvailable: boolean;
70
- /**
71
- * Indicates whether this item is associated with any active (product-specific) coupons
72
- */
73
- onOffer: boolean;
74
- /**
75
- * Indicates whether the product has any subscription plans avaialble
76
- */
77
- onSubscription: boolean;
78
- /**
79
- * Indicates whether the product is currently on promotion. When true, the `ProductPromotion` object will contain details of the promotion
80
- */
81
- onPromotion: boolean;
82
- /**
83
- * Indicates whether the product has variants
84
- */
85
- hasVariant: boolean;
86
- tags: Array<string> | null;
87
- categoryIds: Array<string>;
88
- reviewsRatingSum: number;
89
- reviewsCount: number;
90
- attributes: Array<ProductAttribute>;
91
- pricing: ProductPricing;
92
- /**
93
- * this will be used if has_variant is true, to auto set default values.
94
- */
95
- variantOptions: Array<VariantOption> | null;
96
- promotion: ProductPromotion | null;
97
- images: Array<ProductImage>;
98
- subscription: Array<ProductSubscription>;
99
- bundleItems: Array<BundleProductSKU>;
100
- };
101
- /** @internal */
102
- export declare const BundleProductProductType$inboundSchema: z.ZodNativeEnum<typeof BundleProductProductType>;
103
- /** @internal */
104
- export declare const BundleProductProductType$outboundSchema: z.ZodNativeEnum<typeof BundleProductProductType>;
105
- /**
106
- * @internal
107
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
108
- */
109
- export declare namespace BundleProductProductType$ {
110
- /** @deprecated use `BundleProductProductType$inboundSchema` instead. */
111
- const inboundSchema: z.ZodNativeEnum<{
112
- readonly Physical: "physical";
113
- readonly Digital: "digital";
114
- readonly Bundle: "bundle";
115
- }>;
116
- /** @deprecated use `BundleProductProductType$outboundSchema` instead. */
117
- const outboundSchema: z.ZodNativeEnum<{
118
- readonly Physical: "physical";
119
- readonly Digital: "digital";
120
- readonly Bundle: "bundle";
121
- }>;
122
- }
123
- /** @internal */
124
- export declare const BundleProductBundleItemsProductType$inboundSchema: z.ZodNativeEnum<typeof BundleProductBundleItemsProductType>;
125
- /** @internal */
126
- export declare const BundleProductBundleItemsProductType$outboundSchema: z.ZodNativeEnum<typeof BundleProductBundleItemsProductType>;
127
- /**
128
- * @internal
129
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
130
- */
131
- export declare namespace BundleProductBundleItemsProductType$ {
132
- /** @deprecated use `BundleProductBundleItemsProductType$inboundSchema` instead. */
133
- const inboundSchema: z.ZodNativeEnum<{
134
- readonly Physical: "physical";
135
- readonly Digital: "digital";
136
- readonly Bundle: "bundle";
137
- }>;
138
- /** @deprecated use `BundleProductBundleItemsProductType$outboundSchema` instead. */
139
- const outboundSchema: z.ZodNativeEnum<{
140
- readonly Physical: "physical";
141
- readonly Digital: "digital";
142
- readonly Bundle: "bundle";
143
- }>;
144
- }
145
- /** @internal */
146
- export declare const BundleProductSKU$inboundSchema: z.ZodType<BundleProductSKU, z.ZodTypeDef, unknown>;
147
- /** @internal */
148
- export type BundleProductSKU$Outbound = {
149
- quantity: number;
150
- product_id: string;
151
- variant_id: string | null;
152
- sku: string;
153
- slug: string | null;
154
- product_name: string;
155
- variant_name: string | null;
156
- product_type: string;
157
- short_description: string | null;
158
- active: boolean;
159
- stock_available: boolean;
160
- on_offer: boolean;
161
- on_subscription: boolean;
162
- on_promotion: boolean;
163
- category_ids: Array<string>;
164
- tags: Array<string> | null;
165
- reviews_count: number;
166
- reviews_rating_sum: number | null;
167
- attributes: Array<ProductAttribute$Outbound>;
168
- images: Array<ProductImage$Outbound>;
169
- pricing: ProductPricing$Outbound;
170
- promotion: ProductPromotion$Outbound | null;
171
- subscription: Array<ProductSubscription$Outbound>;
172
- associated_options: {
173
- [k: string]: AssociatedOption$Outbound;
174
- } | null;
175
- };
176
- /** @internal */
177
- export declare const BundleProductSKU$outboundSchema: z.ZodType<BundleProductSKU$Outbound, z.ZodTypeDef, BundleProductSKU>;
178
- /**
179
- * @internal
180
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
181
- */
182
- export declare namespace BundleProductSKU$ {
183
- /** @deprecated use `BundleProductSKU$inboundSchema` instead. */
184
- const inboundSchema: z.ZodType<BundleProductSKU, z.ZodTypeDef, unknown>;
185
- /** @deprecated use `BundleProductSKU$outboundSchema` instead. */
186
- const outboundSchema: z.ZodType<BundleProductSKU$Outbound, z.ZodTypeDef, BundleProductSKU>;
187
- /** @deprecated use `BundleProductSKU$Outbound` instead. */
188
- type Outbound = BundleProductSKU$Outbound;
189
- }
190
- export declare function bundleProductSKUToJSON(bundleProductSKU: BundleProductSKU): string;
191
- export declare function bundleProductSKUFromJSON(jsonString: string): SafeParseResult<BundleProductSKU, SDKValidationError>;
192
- /** @internal */
193
- export declare const BundleProduct$inboundSchema: z.ZodType<BundleProduct, z.ZodTypeDef, unknown>;
194
- /** @internal */
195
- export type BundleProduct$Outbound = {
196
- id: string;
197
- sku: string | null;
198
- name: string;
199
- slug: string | null;
200
- short_description: string | null;
201
- product_type: string;
202
- active: boolean;
203
- stock_available: boolean;
204
- on_offer: boolean;
205
- on_subscription: boolean;
206
- on_promotion: boolean;
207
- has_variant: boolean;
208
- tags: Array<string> | null;
209
- category_ids: Array<string>;
210
- reviews_rating_sum: number;
211
- reviews_count: number;
212
- attributes: Array<ProductAttribute$Outbound>;
213
- pricing: ProductPricing$Outbound;
214
- variant_options: Array<VariantOption$Outbound> | null;
215
- promotion: ProductPromotion$Outbound | null;
216
- images: Array<ProductImage$Outbound>;
217
- subscription: Array<ProductSubscription$Outbound>;
218
- bundle_items: Array<BundleProductSKU$Outbound>;
219
- };
220
- /** @internal */
221
- export declare const BundleProduct$outboundSchema: z.ZodType<BundleProduct$Outbound, z.ZodTypeDef, BundleProduct>;
222
- /**
223
- * @internal
224
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
225
- */
226
- export declare namespace BundleProduct$ {
227
- /** @deprecated use `BundleProduct$inboundSchema` instead. */
228
- const inboundSchema: z.ZodType<BundleProduct, z.ZodTypeDef, unknown>;
229
- /** @deprecated use `BundleProduct$outboundSchema` instead. */
230
- const outboundSchema: z.ZodType<BundleProduct$Outbound, z.ZodTypeDef, BundleProduct>;
231
- /** @deprecated use `BundleProduct$Outbound` instead. */
232
- type Outbound = BundleProduct$Outbound;
233
- }
234
- export declare function bundleProductToJSON(bundleProduct: BundleProduct): string;
235
- export declare function bundleProductFromJSON(jsonString: string): SafeParseResult<BundleProduct, SDKValidationError>;
236
- //# sourceMappingURL=bundleproduct.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bundleproduct.d.ts","sourceRoot":"","sources":["../../../src/models/components/bundleproduct.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,s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