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.
Files changed (158) hide show
  1. package/esm/lib/config.d.ts +3 -3
  2. package/esm/lib/config.js +3 -3
  3. package/esm/models/components/analyticsevent.d.ts +8 -8
  4. package/esm/models/components/analyticsevent.d.ts.map +1 -1
  5. package/esm/models/components/analyticsevent.js +12 -12
  6. package/esm/models/components/analyticsevent.js.map +1 -1
  7. package/esm/models/components/associatedoption.d.ts +125 -0
  8. package/esm/models/components/associatedoption.d.ts.map +1 -0
  9. package/esm/models/components/associatedoption.js +107 -0
  10. package/esm/models/components/associatedoption.js.map +1 -0
  11. package/esm/models/components/bundleproduct.d.ts +236 -0
  12. package/esm/models/components/bundleproduct.d.ts.map +1 -0
  13. package/esm/models/components/bundleproduct.js +262 -0
  14. package/esm/models/components/bundleproduct.js.map +1 -0
  15. package/esm/models/components/bundleproductdetail.d.ts +265 -0
  16. package/esm/models/components/bundleproductdetail.d.ts.map +1 -0
  17. package/esm/models/components/bundleproductdetail.js +288 -0
  18. package/esm/models/components/bundleproductdetail.js.map +1 -0
  19. package/esm/models/components/cart.d.ts +15 -15
  20. package/esm/models/components/cart.d.ts.map +1 -1
  21. package/esm/models/components/cart.js +15 -15
  22. package/esm/models/components/cart.js.map +1 -1
  23. package/esm/models/components/discountbasedpromotion.d.ts +0 -2
  24. package/esm/models/components/discountbasedpromotion.d.ts.map +1 -1
  25. package/esm/models/components/discountbasedpromotion.js +0 -4
  26. package/esm/models/components/discountbasedpromotion.js.map +1 -1
  27. package/esm/models/components/fixedpricepromotion.d.ts +0 -2
  28. package/esm/models/components/fixedpricepromotion.d.ts.map +1 -1
  29. package/esm/models/components/fixedpricepromotion.js +0 -4
  30. package/esm/models/components/fixedpricepromotion.js.map +1 -1
  31. package/esm/models/components/freegoodspromotion.d.ts +0 -5
  32. package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
  33. package/esm/models/components/freegoodspromotion.js +0 -4
  34. package/esm/models/components/freegoodspromotion.js.map +1 -1
  35. package/esm/models/components/index.d.ts +8 -6
  36. package/esm/models/components/index.d.ts.map +1 -1
  37. package/esm/models/components/index.js +8 -6
  38. package/esm/models/components/index.js.map +1 -1
  39. package/esm/models/components/productattribute.d.ts +97 -64
  40. package/esm/models/components/productattribute.d.ts.map +1 -1
  41. package/esm/models/components/productattribute.js +67 -128
  42. package/esm/models/components/productattribute.js.map +1 -1
  43. package/esm/models/components/productcategory.d.ts +2 -2
  44. package/esm/models/components/productcategory.d.ts.map +1 -1
  45. package/esm/models/components/productcategory.js +2 -2
  46. package/esm/models/components/productcategory.js.map +1 -1
  47. package/esm/models/components/productdetail.d.ts +16 -188
  48. package/esm/models/components/productdetail.d.ts.map +1 -1
  49. package/esm/models/components/productdetail.js +26 -228
  50. package/esm/models/components/productdetail.js.map +1 -1
  51. package/esm/models/components/productlistresponse.d.ts +49 -3
  52. package/esm/models/components/productlistresponse.d.ts.map +1 -1
  53. package/esm/models/components/productlistresponse.js +65 -3
  54. package/esm/models/components/productlistresponse.js.map +1 -1
  55. package/esm/models/components/productshipping.d.ts +13 -15
  56. package/esm/models/components/productshipping.d.ts.map +1 -1
  57. package/esm/models/components/productshipping.js +14 -18
  58. package/esm/models/components/productshipping.js.map +1 -1
  59. package/esm/models/components/{promotion.d.ts → promotiondetail.d.ts} +29 -29
  60. package/esm/models/components/promotiondetail.d.ts.map +1 -0
  61. package/esm/models/components/{promotion.js → promotiondetail.js} +29 -29
  62. package/esm/models/components/promotiondetail.js.map +1 -0
  63. package/esm/models/components/seo.d.ts +6 -6
  64. package/esm/models/components/seo.d.ts.map +1 -1
  65. package/esm/models/components/seo.js +6 -19
  66. package/esm/models/components/seo.js.map +1 -1
  67. package/esm/models/components/{product.d.ts → singleproduct.d.ts} +52 -75
  68. package/esm/models/components/singleproduct.d.ts.map +1 -0
  69. package/esm/models/components/{product.js → singleproduct.js} +37 -95
  70. package/esm/models/components/singleproduct.js.map +1 -0
  71. package/esm/models/components/singleproductdetail.d.ts +159 -0
  72. package/esm/models/components/singleproductdetail.d.ts.map +1 -0
  73. package/esm/models/components/singleproductdetail.js +156 -0
  74. package/esm/models/components/singleproductdetail.js.map +1 -0
  75. package/esm/models/components/{skuinfo.d.ts → sku.d.ts} +59 -48
  76. package/esm/models/components/sku.d.ts.map +1 -0
  77. package/esm/models/components/{skuinfo.js → sku.js} +67 -57
  78. package/esm/models/components/sku.js.map +1 -0
  79. package/esm/models/components/variant.d.ts +42 -72
  80. package/esm/models/components/variant.d.ts.map +1 -1
  81. package/esm/models/components/variant.js +39 -82
  82. package/esm/models/components/variant.js.map +1 -1
  83. package/esm/models/components/variantdetail.d.ts +101 -68
  84. package/esm/models/components/variantdetail.d.ts.map +1 -1
  85. package/esm/models/components/variantdetail.js +99 -71
  86. package/esm/models/components/variantdetail.js.map +1 -1
  87. package/esm/models/components/variantoption.d.ts +118 -0
  88. package/esm/models/components/variantoption.d.ts.map +1 -0
  89. package/esm/models/components/variantoption.js +114 -0
  90. package/esm/models/components/variantoption.js.map +1 -0
  91. package/esm/models/components/volumebasedpromotion.d.ts +0 -5
  92. package/esm/models/components/volumebasedpromotion.d.ts.map +1 -1
  93. package/esm/models/components/volumebasedpromotion.js +0 -4
  94. package/esm/models/components/volumebasedpromotion.js.map +1 -1
  95. package/esm/models/operations/getpromotions.d.ts +2 -2
  96. package/esm/models/operations/getpromotions.d.ts.map +1 -1
  97. package/esm/models/operations/getpromotions.js +2 -2
  98. package/esm/models/operations/getpromotions.js.map +1 -1
  99. package/esm/models/operations/getskus.d.ts +2 -2
  100. package/esm/models/operations/getskus.d.ts.map +1 -1
  101. package/esm/models/operations/getskus.js +2 -2
  102. package/esm/models/operations/getskus.js.map +1 -1
  103. package/esm/models/operations/getwishtlist.d.ts +2 -2
  104. package/esm/models/operations/getwishtlist.d.ts.map +1 -1
  105. package/esm/models/operations/getwishtlist.js +2 -2
  106. package/esm/models/operations/getwishtlist.js.map +1 -1
  107. package/jsr.json +1 -1
  108. package/package.json +1 -1
  109. package/src/lib/config.ts +3 -3
  110. package/src/models/components/analyticsevent.ts +16 -15
  111. package/src/models/components/associatedoption.ts +217 -0
  112. package/src/models/components/bundleproduct.ts +501 -0
  113. package/src/models/components/bundleproductdetail.ts +567 -0
  114. package/src/models/components/cart.ts +24 -24
  115. package/src/models/components/discountbasedpromotion.ts +0 -6
  116. package/src/models/components/fixedpricepromotion.ts +0 -6
  117. package/src/models/components/freegoodspromotion.ts +0 -9
  118. package/src/models/components/index.ts +8 -6
  119. package/src/models/components/productattribute.ts +162 -188
  120. package/src/models/components/productcategory.ts +4 -4
  121. package/src/models/components/productdetail.ts +52 -475
  122. package/src/models/components/productlistresponse.ts +147 -9
  123. package/src/models/components/productshipping.ts +27 -33
  124. package/src/models/components/{promotion.ts → promotiondetail.ts} +47 -45
  125. package/src/models/components/seo.ts +12 -25
  126. package/src/models/components/singleproduct.ts +269 -0
  127. package/src/models/components/singleproductdetail.ts +339 -0
  128. package/src/models/components/sku.ts +252 -0
  129. package/src/models/components/variant.ts +81 -170
  130. package/src/models/components/variantdetail.ts +189 -168
  131. package/src/models/components/variantoption.ts +214 -0
  132. package/src/models/components/volumebasedpromotion.ts +0 -9
  133. package/src/models/operations/getpromotions.ts +4 -4
  134. package/src/models/operations/getskus.ts +4 -4
  135. package/src/models/operations/getwishtlist.ts +4 -4
  136. package/esm/models/components/product.d.ts.map +0 -1
  137. package/esm/models/components/product.js.map +0 -1
  138. package/esm/models/components/productbundleitem.d.ts +0 -47
  139. package/esm/models/components/productbundleitem.d.ts.map +0 -1
  140. package/esm/models/components/productbundleitem.js +0 -66
  141. package/esm/models/components/productbundleitem.js.map +0 -1
  142. package/esm/models/components/productpackaging.d.ts +0 -68
  143. package/esm/models/components/productpackaging.d.ts.map +0 -1
  144. package/esm/models/components/productpackaging.js +0 -88
  145. package/esm/models/components/productpackaging.js.map +0 -1
  146. package/esm/models/components/promotion.d.ts.map +0 -1
  147. package/esm/models/components/promotion.js.map +0 -1
  148. package/esm/models/components/saleschannel.d.ts +0 -39
  149. package/esm/models/components/saleschannel.d.ts.map +0 -1
  150. package/esm/models/components/saleschannel.js +0 -53
  151. package/esm/models/components/saleschannel.js.map +0 -1
  152. package/esm/models/components/skuinfo.d.ts.map +0 -1
  153. package/esm/models/components/skuinfo.js.map +0 -1
  154. package/src/models/components/product.ts +0 -363
  155. package/src/models/components/productbundleitem.ts +0 -127
  156. package/src/models/components/productpackaging.ts +0 -162
  157. package/src/models/components/saleschannel.ts +0 -96
  158. package/src/models/components/skuinfo.ts +0 -237
@@ -1,96 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { Result as SafeParseResult } from "../../types/fp.js";
9
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
-
11
- export type SalesChannel = {
12
- id?: string | null | undefined;
13
- name?: string | undefined;
14
- description?: string | undefined;
15
- active?: boolean | undefined;
16
- createdAt?: Date | undefined;
17
- modifiedAt?: Date | null | undefined;
18
- };
19
-
20
- /** @internal */
21
- export const SalesChannel$inboundSchema: z.ZodType<
22
- SalesChannel,
23
- z.ZodTypeDef,
24
- unknown
25
- > = z.object({
26
- id: z.nullable(z.string()).optional(),
27
- name: z.string().optional(),
28
- description: z.string().optional(),
29
- active: z.boolean().optional(),
30
- created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
31
- .optional(),
32
- modified_at: z.nullable(
33
- z.string().datetime({ offset: true }).transform(v => new Date(v)),
34
- ).optional(),
35
- }).transform((v) => {
36
- return remap$(v, {
37
- "created_at": "createdAt",
38
- "modified_at": "modifiedAt",
39
- });
40
- });
41
-
42
- /** @internal */
43
- export type SalesChannel$Outbound = {
44
- id?: string | null | undefined;
45
- name?: string | undefined;
46
- description?: string | undefined;
47
- active?: boolean | undefined;
48
- created_at?: string | undefined;
49
- modified_at?: string | null | undefined;
50
- };
51
-
52
- /** @internal */
53
- export const SalesChannel$outboundSchema: z.ZodType<
54
- SalesChannel$Outbound,
55
- z.ZodTypeDef,
56
- SalesChannel
57
- > = z.object({
58
- id: z.nullable(z.string()).optional(),
59
- name: z.string().optional(),
60
- description: z.string().optional(),
61
- active: z.boolean().optional(),
62
- createdAt: z.date().transform(v => v.toISOString()).optional(),
63
- modifiedAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
64
- }).transform((v) => {
65
- return remap$(v, {
66
- createdAt: "created_at",
67
- modifiedAt: "modified_at",
68
- });
69
- });
70
-
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 namespace SalesChannel$ {
76
- /** @deprecated use `SalesChannel$inboundSchema` instead. */
77
- export const inboundSchema = SalesChannel$inboundSchema;
78
- /** @deprecated use `SalesChannel$outboundSchema` instead. */
79
- export const outboundSchema = SalesChannel$outboundSchema;
80
- /** @deprecated use `SalesChannel$Outbound` instead. */
81
- export type Outbound = SalesChannel$Outbound;
82
- }
83
-
84
- export function salesChannelToJSON(salesChannel: SalesChannel): string {
85
- return JSON.stringify(SalesChannel$outboundSchema.parse(salesChannel));
86
- }
87
-
88
- export function salesChannelFromJSON(
89
- jsonString: string,
90
- ): SafeParseResult<SalesChannel, SDKValidationError> {
91
- return safeParse(
92
- jsonString,
93
- (x) => SalesChannel$inboundSchema.parse(JSON.parse(x)),
94
- `Failed to parse 'SalesChannel' from JSON`,
95
- );
96
- }
@@ -1,237 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
- import {
12
- ProductAttribute,
13
- ProductAttribute$inboundSchema,
14
- ProductAttribute$Outbound,
15
- ProductAttribute$outboundSchema,
16
- } from "./productattribute.js";
17
- import {
18
- ProductImage,
19
- ProductImage$inboundSchema,
20
- ProductImage$Outbound,
21
- ProductImage$outboundSchema,
22
- } from "./productimage.js";
23
- import {
24
- ProductPricing,
25
- ProductPricing$inboundSchema,
26
- ProductPricing$Outbound,
27
- ProductPricing$outboundSchema,
28
- } from "./productpricing.js";
29
- import {
30
- ProductPromotion,
31
- ProductPromotion$inboundSchema,
32
- ProductPromotion$Outbound,
33
- ProductPromotion$outboundSchema,
34
- } from "./productpromotion.js";
35
- import {
36
- ProductShipping,
37
- ProductShipping$inboundSchema,
38
- ProductShipping$Outbound,
39
- ProductShipping$outboundSchema,
40
- } from "./productshipping.js";
41
- import {
42
- ProductSubscription,
43
- ProductSubscription$inboundSchema,
44
- ProductSubscription$Outbound,
45
- ProductSubscription$outboundSchema,
46
- } from "./productsubscription.js";
47
-
48
- export const SkuInfoProductType = {
49
- Physical: "physical",
50
- Digital: "digital",
51
- Bundle: "bundle",
52
- } as const;
53
- export type SkuInfoProductType = ClosedEnum<typeof SkuInfoProductType>;
54
-
55
- export type SkuInfo = {
56
- productId?: string | undefined;
57
- productName?: string | undefined;
58
- variantId?: string | undefined;
59
- variantName?: string | undefined;
60
- productType?: SkuInfoProductType | undefined;
61
- sku?: string | undefined;
62
- stockAvailable?: boolean | undefined;
63
- isFeatured?: boolean | undefined;
64
- onOffer?: boolean | undefined;
65
- onSubscription?: boolean | undefined;
66
- onPromotion?: boolean | undefined;
67
- attributes?: Array<ProductAttribute> | undefined;
68
- images?: Array<ProductImage> | undefined;
69
- pricing?: ProductPricing | undefined;
70
- shipping?: ProductShipping | undefined;
71
- tags?: Array<string> | undefined;
72
- categoryIds?: Array<string> | undefined;
73
- reviewsRatingSum?: number | undefined;
74
- reviewsCount?: number | undefined;
75
- promotion?: Array<ProductPromotion> | undefined;
76
- subscription?: Array<ProductSubscription> | undefined;
77
- };
78
-
79
- /** @internal */
80
- export const SkuInfoProductType$inboundSchema: z.ZodNativeEnum<
81
- typeof SkuInfoProductType
82
- > = z.nativeEnum(SkuInfoProductType);
83
-
84
- /** @internal */
85
- export const SkuInfoProductType$outboundSchema: z.ZodNativeEnum<
86
- typeof SkuInfoProductType
87
- > = SkuInfoProductType$inboundSchema;
88
-
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 namespace SkuInfoProductType$ {
94
- /** @deprecated use `SkuInfoProductType$inboundSchema` instead. */
95
- export const inboundSchema = SkuInfoProductType$inboundSchema;
96
- /** @deprecated use `SkuInfoProductType$outboundSchema` instead. */
97
- export const outboundSchema = SkuInfoProductType$outboundSchema;
98
- }
99
-
100
- /** @internal */
101
- export const SkuInfo$inboundSchema: z.ZodType<SkuInfo, z.ZodTypeDef, unknown> =
102
- z.object({
103
- product_id: z.string().optional(),
104
- product_name: z.string().optional(),
105
- variant_id: z.string().optional(),
106
- variant_name: z.string().optional(),
107
- product_type: SkuInfoProductType$inboundSchema.optional(),
108
- sku: z.string().optional(),
109
- stock_available: z.boolean().default(true),
110
- is_featured: z.boolean().default(false),
111
- on_offer: z.boolean().default(false),
112
- on_subscription: z.boolean().default(false),
113
- on_promotion: z.boolean().default(false),
114
- attributes: z.array(ProductAttribute$inboundSchema).optional(),
115
- images: z.array(ProductImage$inboundSchema).optional(),
116
- pricing: ProductPricing$inboundSchema.optional(),
117
- shipping: ProductShipping$inboundSchema.optional(),
118
- tags: z.array(z.string()).optional(),
119
- category_ids: z.array(z.string()).optional(),
120
- reviews_rating_sum: z.number().optional(),
121
- reviews_count: z.number().int().optional(),
122
- promotion: z.array(ProductPromotion$inboundSchema).optional(),
123
- subscription: z.array(ProductSubscription$inboundSchema).optional(),
124
- }).transform((v) => {
125
- return remap$(v, {
126
- "product_id": "productId",
127
- "product_name": "productName",
128
- "variant_id": "variantId",
129
- "variant_name": "variantName",
130
- "product_type": "productType",
131
- "stock_available": "stockAvailable",
132
- "is_featured": "isFeatured",
133
- "on_offer": "onOffer",
134
- "on_subscription": "onSubscription",
135
- "on_promotion": "onPromotion",
136
- "category_ids": "categoryIds",
137
- "reviews_rating_sum": "reviewsRatingSum",
138
- "reviews_count": "reviewsCount",
139
- });
140
- });
141
-
142
- /** @internal */
143
- export type SkuInfo$Outbound = {
144
- product_id?: string | undefined;
145
- product_name?: string | undefined;
146
- variant_id?: string | undefined;
147
- variant_name?: string | undefined;
148
- product_type?: string | undefined;
149
- sku?: string | undefined;
150
- stock_available: boolean;
151
- is_featured: boolean;
152
- on_offer: boolean;
153
- on_subscription: boolean;
154
- on_promotion: boolean;
155
- attributes?: Array<ProductAttribute$Outbound> | undefined;
156
- images?: Array<ProductImage$Outbound> | undefined;
157
- pricing?: ProductPricing$Outbound | undefined;
158
- shipping?: ProductShipping$Outbound | undefined;
159
- tags?: Array<string> | undefined;
160
- category_ids?: Array<string> | undefined;
161
- reviews_rating_sum?: number | undefined;
162
- reviews_count?: number | undefined;
163
- promotion?: Array<ProductPromotion$Outbound> | undefined;
164
- subscription?: Array<ProductSubscription$Outbound> | undefined;
165
- };
166
-
167
- /** @internal */
168
- export const SkuInfo$outboundSchema: z.ZodType<
169
- SkuInfo$Outbound,
170
- z.ZodTypeDef,
171
- SkuInfo
172
- > = z.object({
173
- productId: z.string().optional(),
174
- productName: z.string().optional(),
175
- variantId: z.string().optional(),
176
- variantName: z.string().optional(),
177
- productType: SkuInfoProductType$outboundSchema.optional(),
178
- sku: z.string().optional(),
179
- stockAvailable: z.boolean().default(true),
180
- isFeatured: z.boolean().default(false),
181
- onOffer: z.boolean().default(false),
182
- onSubscription: z.boolean().default(false),
183
- onPromotion: z.boolean().default(false),
184
- attributes: z.array(ProductAttribute$outboundSchema).optional(),
185
- images: z.array(ProductImage$outboundSchema).optional(),
186
- pricing: ProductPricing$outboundSchema.optional(),
187
- shipping: ProductShipping$outboundSchema.optional(),
188
- tags: z.array(z.string()).optional(),
189
- categoryIds: z.array(z.string()).optional(),
190
- reviewsRatingSum: z.number().optional(),
191
- reviewsCount: z.number().int().optional(),
192
- promotion: z.array(ProductPromotion$outboundSchema).optional(),
193
- subscription: z.array(ProductSubscription$outboundSchema).optional(),
194
- }).transform((v) => {
195
- return remap$(v, {
196
- productId: "product_id",
197
- productName: "product_name",
198
- variantId: "variant_id",
199
- variantName: "variant_name",
200
- productType: "product_type",
201
- stockAvailable: "stock_available",
202
- isFeatured: "is_featured",
203
- onOffer: "on_offer",
204
- onSubscription: "on_subscription",
205
- onPromotion: "on_promotion",
206
- categoryIds: "category_ids",
207
- reviewsRatingSum: "reviews_rating_sum",
208
- reviewsCount: "reviews_count",
209
- });
210
- });
211
-
212
- /**
213
- * @internal
214
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
215
- */
216
- export namespace SkuInfo$ {
217
- /** @deprecated use `SkuInfo$inboundSchema` instead. */
218
- export const inboundSchema = SkuInfo$inboundSchema;
219
- /** @deprecated use `SkuInfo$outboundSchema` instead. */
220
- export const outboundSchema = SkuInfo$outboundSchema;
221
- /** @deprecated use `SkuInfo$Outbound` instead. */
222
- export type Outbound = SkuInfo$Outbound;
223
- }
224
-
225
- export function skuInfoToJSON(skuInfo: SkuInfo): string {
226
- return JSON.stringify(SkuInfo$outboundSchema.parse(skuInfo));
227
- }
228
-
229
- export function skuInfoFromJSON(
230
- jsonString: string,
231
- ): SafeParseResult<SkuInfo, SDKValidationError> {
232
- return safeParse(
233
- jsonString,
234
- (x) => SkuInfo$inboundSchema.parse(JSON.parse(x)),
235
- `Failed to parse 'SkuInfo' from JSON`,
236
- );
237
- }