ce-storefront 0.3.9 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/docs/sdks/auth/README.md +2 -0
  2. package/docs/sdks/carts/README.md +22 -12
  3. package/docs/sdks/cestorefrontuser/README.md +30 -2
  4. package/docs/sdks/checkout/README.md +4 -0
  5. package/esm/funcs/cartsAddItem.js +1 -1
  6. package/esm/funcs/cartsAddItem.js.map +1 -1
  7. package/esm/lib/config.d.ts +2 -2
  8. package/esm/lib/config.js +2 -2
  9. package/esm/lib/config.js.map +1 -1
  10. package/esm/models/components/anonymoususer.d.ts +14 -14
  11. package/esm/models/components/anonymoususer.d.ts.map +1 -1
  12. package/esm/models/components/anonymoususer.js +14 -14
  13. package/esm/models/components/anonymoususer.js.map +1 -1
  14. package/esm/models/components/associatedoption.d.ts +4 -102
  15. package/esm/models/components/associatedoption.d.ts.map +1 -1
  16. package/esm/models/components/associatedoption.js +4 -82
  17. package/esm/models/components/associatedoption.js.map +1 -1
  18. package/esm/models/components/bundleproduct.d.ts +48 -48
  19. package/esm/models/components/bundleproduct.d.ts.map +1 -1
  20. package/esm/models/components/bundleproduct.js +46 -50
  21. package/esm/models/components/bundleproduct.js.map +1 -1
  22. package/esm/models/components/bundleproductdetail.d.ts +66 -66
  23. package/esm/models/components/bundleproductdetail.d.ts.map +1 -1
  24. package/esm/models/components/bundleproductdetail.js +62 -66
  25. package/esm/models/components/bundleproductdetail.js.map +1 -1
  26. package/esm/models/components/coloroption.d.ts +72 -0
  27. package/esm/models/components/coloroption.d.ts.map +1 -0
  28. package/esm/models/components/coloroption.js +62 -0
  29. package/esm/models/components/coloroption.js.map +1 -0
  30. package/esm/models/components/currency.d.ts +6 -6
  31. package/esm/models/components/currency.d.ts.map +1 -1
  32. package/esm/models/components/currency.js +6 -6
  33. package/esm/models/components/currency.js.map +1 -1
  34. package/esm/models/components/index.d.ts +3 -1
  35. package/esm/models/components/index.d.ts.map +1 -1
  36. package/esm/models/components/index.js +3 -1
  37. package/esm/models/components/index.js.map +1 -1
  38. package/esm/models/components/notificationpreferences.d.ts +6 -6
  39. package/esm/models/components/notificationpreferences.d.ts.map +1 -1
  40. package/esm/models/components/notificationpreferences.js +6 -6
  41. package/esm/models/components/notificationpreferences.js.map +1 -1
  42. package/esm/models/components/pagination.d.ts +8 -8
  43. package/esm/models/components/pagination.d.ts.map +1 -1
  44. package/esm/models/components/pagination.js +8 -8
  45. package/esm/models/components/pagination.js.map +1 -1
  46. package/esm/models/components/productattribute.d.ts +2 -2
  47. package/esm/models/components/productattribute.d.ts.map +1 -1
  48. package/esm/models/components/productattribute.js +2 -2
  49. package/esm/models/components/productattribute.js.map +1 -1
  50. package/esm/models/components/productcategory.d.ts +20 -20
  51. package/esm/models/components/productcategory.d.ts.map +1 -1
  52. package/esm/models/components/productcategory.js +20 -20
  53. package/esm/models/components/productcategory.js.map +1 -1
  54. package/esm/models/components/productdetail.d.ts +2 -14
  55. package/esm/models/components/productdetail.d.ts.map +1 -1
  56. package/esm/models/components/productdetail.js +4 -18
  57. package/esm/models/components/productdetail.js.map +1 -1
  58. package/esm/models/components/productimage.d.ts +14 -14
  59. package/esm/models/components/productimage.d.ts.map +1 -1
  60. package/esm/models/components/productimage.js +14 -14
  61. package/esm/models/components/productimage.js.map +1 -1
  62. package/esm/models/components/productpricing.d.ts +4 -4
  63. package/esm/models/components/productpricing.d.ts.map +1 -1
  64. package/esm/models/components/productpricing.js +4 -4
  65. package/esm/models/components/productpricing.js.map +1 -1
  66. package/esm/models/components/productshipping.d.ts +12 -12
  67. package/esm/models/components/productshipping.d.ts.map +1 -1
  68. package/esm/models/components/productshipping.js +12 -12
  69. package/esm/models/components/productshipping.js.map +1 -1
  70. package/esm/models/components/productvideo.d.ts +16 -16
  71. package/esm/models/components/productvideo.d.ts.map +1 -1
  72. package/esm/models/components/productvideo.js +16 -16
  73. package/esm/models/components/productvideo.js.map +1 -1
  74. package/esm/models/components/seo.d.ts +8 -8
  75. package/esm/models/components/seo.d.ts.map +1 -1
  76. package/esm/models/components/seo.js +8 -8
  77. package/esm/models/components/seo.js.map +1 -1
  78. package/esm/models/components/singleproduct.d.ts +18 -18
  79. package/esm/models/components/singleproduct.d.ts.map +1 -1
  80. package/esm/models/components/singleproduct.js +18 -18
  81. package/esm/models/components/singleproduct.js.map +1 -1
  82. package/esm/models/components/singleproductdetail.d.ts +36 -36
  83. package/esm/models/components/singleproductdetail.d.ts.map +1 -1
  84. package/esm/models/components/singleproductdetail.js +34 -34
  85. package/esm/models/components/singleproductdetail.js.map +1 -1
  86. package/esm/models/components/singleselectoption.d.ts +42 -0
  87. package/esm/models/components/singleselectoption.d.ts.map +1 -0
  88. package/esm/models/components/singleselectoption.js +35 -0
  89. package/esm/models/components/singleselectoption.js.map +1 -0
  90. package/esm/models/components/sku.d.ts +30 -30
  91. package/esm/models/components/sku.d.ts.map +1 -1
  92. package/esm/models/components/sku.js +28 -30
  93. package/esm/models/components/sku.js.map +1 -1
  94. package/esm/models/components/updatecartitem.d.ts +45 -0
  95. package/esm/models/components/updatecartitem.d.ts.map +1 -0
  96. package/esm/models/components/updatecartitem.js +46 -0
  97. package/esm/models/components/updatecartitem.js.map +1 -0
  98. package/esm/models/components/user.d.ts +116 -26
  99. package/esm/models/components/user.d.ts.map +1 -1
  100. package/esm/models/components/user.js +104 -30
  101. package/esm/models/components/user.js.map +1 -1
  102. package/esm/models/components/variant.d.ts +15 -12
  103. package/esm/models/components/variant.d.ts.map +1 -1
  104. package/esm/models/components/variant.js +12 -12
  105. package/esm/models/components/variant.js.map +1 -1
  106. package/esm/models/components/variantdetail.d.ts +41 -38
  107. package/esm/models/components/variantdetail.d.ts.map +1 -1
  108. package/esm/models/components/variantdetail.js +36 -36
  109. package/esm/models/components/variantdetail.js.map +1 -1
  110. package/esm/models/components/variantoption.d.ts +34 -26
  111. package/esm/models/components/variantoption.d.ts.map +1 -1
  112. package/esm/models/components/variantoption.js +32 -45
  113. package/esm/models/components/variantoption.js.map +1 -1
  114. package/esm/models/operations/getcrosssell.d.ts +6 -6
  115. package/esm/models/operations/getcrosssell.d.ts.map +1 -1
  116. package/esm/models/operations/getcrosssell.js +6 -6
  117. package/esm/models/operations/getcrosssell.js.map +1 -1
  118. package/esm/models/operations/getproductscategories.d.ts +4 -4
  119. package/esm/models/operations/getproductscategories.d.ts.map +1 -1
  120. package/esm/models/operations/getproductscategories.js +4 -4
  121. package/esm/models/operations/getproductscategories.js.map +1 -1
  122. package/esm/models/operations/getproductsidreviews.d.ts +4 -4
  123. package/esm/models/operations/getproductsidreviews.d.ts.map +1 -1
  124. package/esm/models/operations/getproductsidreviews.js +4 -4
  125. package/esm/models/operations/getproductsidreviews.js.map +1 -1
  126. package/esm/models/operations/getsimilar.d.ts +6 -6
  127. package/esm/models/operations/getsimilar.d.ts.map +1 -1
  128. package/esm/models/operations/getsimilar.js +6 -6
  129. package/esm/models/operations/getsimilar.js.map +1 -1
  130. package/esm/models/operations/getskus.d.ts +4 -4
  131. package/esm/models/operations/getskus.d.ts.map +1 -1
  132. package/esm/models/operations/getskus.js +4 -4
  133. package/esm/models/operations/getskus.js.map +1 -1
  134. package/esm/models/operations/getupsell.d.ts +6 -6
  135. package/esm/models/operations/getupsell.d.ts.map +1 -1
  136. package/esm/models/operations/getupsell.js +6 -6
  137. package/esm/models/operations/getupsell.js.map +1 -1
  138. package/esm/models/operations/postauthanonymous.d.ts +12 -12
  139. package/esm/models/operations/postauthanonymous.d.ts.map +1 -1
  140. package/esm/models/operations/postauthanonymous.js +12 -12
  141. package/esm/models/operations/postauthanonymous.js.map +1 -1
  142. package/esm/models/operations/postauthgenerateotp.d.ts +2 -2
  143. package/esm/models/operations/postauthgenerateotp.d.ts.map +1 -1
  144. package/esm/models/operations/postauthgenerateotp.js +2 -2
  145. package/esm/models/operations/postauthgenerateotp.js.map +1 -1
  146. package/esm/models/operations/postcartaddress.d.ts +8 -8
  147. package/esm/models/operations/postcartaddress.d.ts.map +1 -1
  148. package/esm/models/operations/postcartaddress.js +8 -12
  149. package/esm/models/operations/postcartaddress.js.map +1 -1
  150. package/esm/models/operations/postcartitemid.d.ts +2 -35
  151. package/esm/models/operations/postcartitemid.d.ts.map +1 -1
  152. package/esm/models/operations/postcartitemid.js +4 -49
  153. package/esm/models/operations/postcartitemid.js.map +1 -1
  154. package/esm/models/operations/postcartsid.d.ts +5 -31
  155. package/esm/models/operations/postcartsid.d.ts.map +1 -1
  156. package/esm/models/operations/postcartsid.js +2 -41
  157. package/esm/models/operations/postcartsid.js.map +1 -1
  158. package/esm/models/operations/postproductsidreviews.d.ts +4 -4
  159. package/esm/models/operations/postproductsidreviews.d.ts.map +1 -1
  160. package/esm/models/operations/postproductsidreviews.js +4 -4
  161. package/esm/models/operations/postproductsidreviews.js.map +1 -1
  162. package/jsr.json +1 -1
  163. package/package.json +1 -1
  164. package/src/funcs/cartsAddItem.ts +1 -1
  165. package/src/lib/config.ts +2 -2
  166. package/src/models/components/anonymoususer.ts +28 -28
  167. package/src/models/components/associatedoption.ts +19 -164
  168. package/src/models/components/bundleproduct.ts +92 -99
  169. package/src/models/components/bundleproductdetail.ts +124 -131
  170. package/src/models/components/coloroption.ts +144 -0
  171. package/src/models/components/currency.ts +12 -12
  172. package/src/models/components/index.ts +3 -1
  173. package/src/models/components/notificationpreferences.ts +12 -12
  174. package/src/models/components/pagination.ts +16 -16
  175. package/src/models/components/productattribute.ts +4 -4
  176. package/src/models/components/productcategory.ts +40 -40
  177. package/src/models/components/productdetail.ts +7 -37
  178. package/src/models/components/productimage.ts +28 -28
  179. package/src/models/components/productpricing.ts +8 -8
  180. package/src/models/components/productshipping.ts +24 -24
  181. package/src/models/components/productvideo.ts +32 -32
  182. package/src/models/components/seo.ts +16 -16
  183. package/src/models/components/singleproduct.ts +36 -36
  184. package/src/models/components/singleproductdetail.ts +68 -68
  185. package/src/models/components/singleselectoption.ts +83 -0
  186. package/src/models/components/sku.ts +56 -61
  187. package/src/models/components/updatecartitem.ts +93 -0
  188. package/src/models/components/user.ts +199 -56
  189. package/src/models/components/variant.ts +27 -24
  190. package/src/models/components/variantdetail.ts +75 -72
  191. package/src/models/components/variantoption.ts +54 -61
  192. package/src/models/operations/getcrosssell.ts +12 -12
  193. package/src/models/operations/getproductscategories.ts +8 -8
  194. package/src/models/operations/getproductsidreviews.ts +8 -8
  195. package/src/models/operations/getsimilar.ts +12 -12
  196. package/src/models/operations/getskus.ts +8 -8
  197. package/src/models/operations/getupsell.ts +12 -12
  198. package/src/models/operations/postauthanonymous.ts +24 -24
  199. package/src/models/operations/postauthgenerateotp.ts +4 -4
  200. package/src/models/operations/postcartaddress.ts +16 -23
  201. package/src/models/operations/postcartitemid.ts +6 -94
  202. package/src/models/operations/postcartsid.ts +7 -72
  203. package/src/models/operations/postproductsidreviews.ts +8 -8
  204. package/esm/models/components/userinput.d.ts +0 -63
  205. package/esm/models/components/userinput.d.ts.map +0 -1
  206. package/esm/models/components/userinput.js +0 -61
  207. package/esm/models/components/userinput.js.map +0 -1
  208. package/src/models/components/userinput.ts +0 -130
@@ -12,11 +12,11 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
12
  * pagination metadata structure
13
13
  */
14
14
  export type Pagination = {
15
- totalRecords?: number | undefined;
16
- totalPages?: number | undefined;
15
+ totalRecords: number;
16
+ totalPages: number;
17
17
  previousPage?: number | null | undefined;
18
- limit?: number | undefined;
19
- nextPage?: number | null | undefined;
18
+ limit: number;
19
+ nextPage: number | null;
20
20
  };
21
21
 
22
22
  /** @internal */
@@ -25,11 +25,11 @@ export const Pagination$inboundSchema: z.ZodType<
25
25
  z.ZodTypeDef,
26
26
  unknown
27
27
  > = z.object({
28
- total_records: z.number().int().optional(),
29
- total_pages: z.number().int().optional(),
28
+ total_records: z.number().int(),
29
+ total_pages: z.number().int(),
30
30
  previous_page: z.nullable(z.number().int()).optional(),
31
- limit: z.number().int().optional(),
32
- next_page: z.nullable(z.number().int()).optional(),
31
+ limit: z.number().int(),
32
+ next_page: z.nullable(z.number().int()),
33
33
  }).transform((v) => {
34
34
  return remap$(v, {
35
35
  "total_records": "totalRecords",
@@ -41,11 +41,11 @@ export const Pagination$inboundSchema: z.ZodType<
41
41
 
42
42
  /** @internal */
43
43
  export type Pagination$Outbound = {
44
- total_records?: number | undefined;
45
- total_pages?: number | undefined;
44
+ total_records: number;
45
+ total_pages: number;
46
46
  previous_page?: number | null | undefined;
47
- limit?: number | undefined;
48
- next_page?: number | null | undefined;
47
+ limit: number;
48
+ next_page: number | null;
49
49
  };
50
50
 
51
51
  /** @internal */
@@ -54,11 +54,11 @@ export const Pagination$outboundSchema: z.ZodType<
54
54
  z.ZodTypeDef,
55
55
  Pagination
56
56
  > = z.object({
57
- totalRecords: z.number().int().optional(),
58
- totalPages: z.number().int().optional(),
57
+ totalRecords: z.number().int(),
58
+ totalPages: z.number().int(),
59
59
  previousPage: z.nullable(z.number().int()).optional(),
60
- limit: z.number().int().optional(),
61
- nextPage: z.nullable(z.number().int()).optional(),
60
+ limit: z.number().int(),
61
+ nextPage: z.nullable(z.number().int()),
62
62
  }).transform((v) => {
63
63
  return remap$(v, {
64
64
  totalRecords: "total_records",
@@ -68,7 +68,7 @@ export type TextAttribute = {
68
68
  /**
69
69
  * A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
70
70
  */
71
- key?: string | undefined;
71
+ key: string;
72
72
  type?: "text" | undefined;
73
73
  /**
74
74
  * For text attributes
@@ -292,7 +292,7 @@ export const TextAttribute$inboundSchema: z.ZodType<
292
292
  > = z.object({
293
293
  id: z.string(),
294
294
  name: z.string(),
295
- key: z.string().optional(),
295
+ key: z.string(),
296
296
  type: z.literal("text").optional(),
297
297
  value: z.string(),
298
298
  });
@@ -301,7 +301,7 @@ export const TextAttribute$inboundSchema: z.ZodType<
301
301
  export type TextAttribute$Outbound = {
302
302
  id: string;
303
303
  name: string;
304
- key?: string | undefined;
304
+ key: string;
305
305
  type: "text";
306
306
  value: string;
307
307
  };
@@ -314,7 +314,7 @@ export const TextAttribute$outboundSchema: z.ZodType<
314
314
  > = z.object({
315
315
  id: z.string(),
316
316
  name: z.string(),
317
- key: z.string().optional(),
317
+ key: z.string(),
318
318
  type: z.literal("text").default("text" as const),
319
319
  value: z.string(),
320
320
  });
@@ -9,22 +9,22 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type ChildCategories = {
12
- id?: string | undefined;
13
- name?: string | undefined;
14
- description?: string | undefined;
15
- parentCategoryId?: string | null | undefined;
16
- productCount?: number | undefined;
17
- active?: boolean | undefined;
12
+ id: string;
13
+ name: string;
14
+ description: string | null;
15
+ parentCategoryId: string | null;
16
+ productCount: number;
17
+ active: boolean;
18
18
  };
19
19
 
20
20
  export type ProductCategory = {
21
21
  id: string;
22
22
  name: string;
23
- description?: string | null | undefined;
24
- parentCategoryId?: string | null | undefined;
25
- productCount?: number | undefined;
23
+ description: string | null;
24
+ parentCategoryId: string | null;
25
+ productCount: number;
26
26
  active: boolean;
27
- childCategories?: Array<ChildCategories> | null | undefined;
27
+ childCategories: Array<ChildCategories> | null;
28
28
  };
29
29
 
30
30
  /** @internal */
@@ -33,12 +33,12 @@ export const ChildCategories$inboundSchema: z.ZodType<
33
33
  z.ZodTypeDef,
34
34
  unknown
35
35
  > = z.object({
36
- id: z.string().optional(),
37
- name: z.string().optional(),
38
- description: z.string().optional(),
39
- parent_category_id: z.nullable(z.string()).optional(),
40
- product_count: z.number().int().optional(),
41
- active: z.boolean().optional(),
36
+ id: z.string(),
37
+ name: z.string(),
38
+ description: z.nullable(z.string()),
39
+ parent_category_id: z.nullable(z.string()),
40
+ product_count: z.number().int(),
41
+ active: z.boolean(),
42
42
  }).transform((v) => {
43
43
  return remap$(v, {
44
44
  "parent_category_id": "parentCategoryId",
@@ -48,12 +48,12 @@ export const ChildCategories$inboundSchema: z.ZodType<
48
48
 
49
49
  /** @internal */
50
50
  export type ChildCategories$Outbound = {
51
- id?: string | undefined;
52
- name?: string | undefined;
53
- description?: string | undefined;
54
- parent_category_id?: string | null | undefined;
55
- product_count?: number | undefined;
56
- active?: boolean | undefined;
51
+ id: string;
52
+ name: string;
53
+ description: string | null;
54
+ parent_category_id: string | null;
55
+ product_count: number;
56
+ active: boolean;
57
57
  };
58
58
 
59
59
  /** @internal */
@@ -62,12 +62,12 @@ export const ChildCategories$outboundSchema: z.ZodType<
62
62
  z.ZodTypeDef,
63
63
  ChildCategories
64
64
  > = z.object({
65
- id: z.string().optional(),
66
- name: z.string().optional(),
67
- description: z.string().optional(),
68
- parentCategoryId: z.nullable(z.string()).optional(),
69
- productCount: z.number().int().optional(),
70
- active: z.boolean().optional(),
65
+ id: z.string(),
66
+ name: z.string(),
67
+ description: z.nullable(z.string()),
68
+ parentCategoryId: z.nullable(z.string()),
69
+ productCount: z.number().int(),
70
+ active: z.boolean(),
71
71
  }).transform((v) => {
72
72
  return remap$(v, {
73
73
  parentCategoryId: "parent_category_id",
@@ -112,13 +112,13 @@ export const ProductCategory$inboundSchema: z.ZodType<
112
112
  > = z.object({
113
113
  id: z.string(),
114
114
  name: z.string(),
115
- description: z.nullable(z.string()).optional(),
116
- parent_category_id: z.nullable(z.string()).optional(),
117
- product_count: z.number().int().optional(),
115
+ description: z.nullable(z.string()),
116
+ parent_category_id: z.nullable(z.string()),
117
+ product_count: z.number().int(),
118
118
  active: z.boolean(),
119
119
  child_categories: z.nullable(
120
120
  z.array(z.lazy(() => ChildCategories$inboundSchema)),
121
- ).optional(),
121
+ ),
122
122
  }).transform((v) => {
123
123
  return remap$(v, {
124
124
  "parent_category_id": "parentCategoryId",
@@ -131,11 +131,11 @@ export const ProductCategory$inboundSchema: z.ZodType<
131
131
  export type ProductCategory$Outbound = {
132
132
  id: string;
133
133
  name: string;
134
- description?: string | null | undefined;
135
- parent_category_id?: string | null | undefined;
136
- product_count?: number | undefined;
134
+ description: string | null;
135
+ parent_category_id: string | null;
136
+ product_count: number;
137
137
  active: boolean;
138
- child_categories?: Array<ChildCategories$Outbound> | null | undefined;
138
+ child_categories: Array<ChildCategories$Outbound> | null;
139
139
  };
140
140
 
141
141
  /** @internal */
@@ -146,13 +146,13 @@ export const ProductCategory$outboundSchema: z.ZodType<
146
146
  > = z.object({
147
147
  id: z.string(),
148
148
  name: z.string(),
149
- description: z.nullable(z.string()).optional(),
150
- parentCategoryId: z.nullable(z.string()).optional(),
151
- productCount: z.number().int().optional(),
149
+ description: z.nullable(z.string()),
150
+ parentCategoryId: z.nullable(z.string()),
151
+ productCount: z.number().int(),
152
152
  active: z.boolean(),
153
153
  childCategories: z.nullable(
154
154
  z.array(z.lazy(() => ChildCategories$outboundSchema)),
155
- ).optional(),
155
+ ),
156
156
  }).transform((v) => {
157
157
  return remap$(v, {
158
158
  parentCategoryId: "parent_category_id",
@@ -19,10 +19,7 @@ import {
19
19
  SingleProductDetail$outboundSchema,
20
20
  } from "./singleproductdetail.js";
21
21
 
22
- export type ProductDetail =
23
- | (SingleProductDetail & { productType: "physical" })
24
- | (SingleProductDetail & { productType: "digital" })
25
- | (BundleProductDetail & { productType: "bundle" });
22
+ export type ProductDetail = SingleProductDetail | BundleProductDetail;
26
23
 
27
24
  /** @internal */
28
25
  export const ProductDetail$inboundSchema: z.ZodType<
@@ -30,28 +27,14 @@ export const ProductDetail$inboundSchema: z.ZodType<
30
27
  z.ZodTypeDef,
31
28
  unknown
32
29
  > = z.union([
33
- SingleProductDetail$inboundSchema.and(
34
- z.object({ product_type: z.literal("physical") }).transform((v) => ({
35
- productType: v.product_type,
36
- })),
37
- ),
38
- SingleProductDetail$inboundSchema.and(
39
- z.object({ product_type: z.literal("digital") }).transform((v) => ({
40
- productType: v.product_type,
41
- })),
42
- ),
43
- BundleProductDetail$inboundSchema.and(
44
- z.object({ product_type: z.literal("bundle") }).transform((v) => ({
45
- productType: v.product_type,
46
- })),
47
- ),
30
+ SingleProductDetail$inboundSchema,
31
+ BundleProductDetail$inboundSchema,
48
32
  ]);
49
33
 
50
34
  /** @internal */
51
35
  export type ProductDetail$Outbound =
52
- | (SingleProductDetail$Outbound & { product_type: "physical" })
53
- | (SingleProductDetail$Outbound & { product_type: "digital" })
54
- | (BundleProductDetail$Outbound & { product_type: "bundle" });
36
+ | SingleProductDetail$Outbound
37
+ | BundleProductDetail$Outbound;
55
38
 
56
39
  /** @internal */
57
40
  export const ProductDetail$outboundSchema: z.ZodType<
@@ -59,21 +42,8 @@ export const ProductDetail$outboundSchema: z.ZodType<
59
42
  z.ZodTypeDef,
60
43
  ProductDetail
61
44
  > = z.union([
62
- SingleProductDetail$outboundSchema.and(
63
- z.object({ productType: z.literal("physical") }).transform((v) => ({
64
- product_type: v.productType,
65
- })),
66
- ),
67
- SingleProductDetail$outboundSchema.and(
68
- z.object({ productType: z.literal("digital") }).transform((v) => ({
69
- product_type: v.productType,
70
- })),
71
- ),
72
- BundleProductDetail$outboundSchema.and(
73
- z.object({ productType: z.literal("bundle") }).transform((v) => ({
74
- product_type: v.productType,
75
- })),
76
- ),
45
+ SingleProductDetail$outboundSchema,
46
+ BundleProductDetail$outboundSchema,
77
47
  ]);
78
48
 
79
49
  /**
@@ -9,13 +9,13 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type ProductImage = {
12
- title?: string | null | undefined;
13
- alternateText?: string | null | undefined;
14
- sortOrder?: number | undefined;
15
- urlTiny?: string | undefined;
16
- urlThumbnail?: string | undefined;
17
- urlStandard?: string | undefined;
18
- urlZoom?: string | undefined;
12
+ title: string | null;
13
+ alternateText: string | null;
14
+ sortOrder: number;
15
+ urlTiny: string;
16
+ urlThumbnail: string;
17
+ urlStandard: string;
18
+ urlZoom: string;
19
19
  };
20
20
 
21
21
  /** @internal */
@@ -24,13 +24,13 @@ export const ProductImage$inboundSchema: z.ZodType<
24
24
  z.ZodTypeDef,
25
25
  unknown
26
26
  > = z.object({
27
- title: z.nullable(z.string()).optional(),
28
- alternate_text: z.nullable(z.string()).optional(),
29
- sort_order: z.number().int().optional(),
30
- url_tiny: z.string().optional(),
31
- url_thumbnail: z.string().optional(),
32
- url_standard: z.string().optional(),
33
- url_zoom: z.string().optional(),
27
+ title: z.nullable(z.string()),
28
+ alternate_text: z.nullable(z.string()),
29
+ sort_order: z.number().int(),
30
+ url_tiny: z.string(),
31
+ url_thumbnail: z.string(),
32
+ url_standard: z.string(),
33
+ url_zoom: z.string(),
34
34
  }).transform((v) => {
35
35
  return remap$(v, {
36
36
  "alternate_text": "alternateText",
@@ -44,13 +44,13 @@ export const ProductImage$inboundSchema: z.ZodType<
44
44
 
45
45
  /** @internal */
46
46
  export type ProductImage$Outbound = {
47
- title?: string | null | undefined;
48
- alternate_text?: string | null | undefined;
49
- sort_order?: number | undefined;
50
- url_tiny?: string | undefined;
51
- url_thumbnail?: string | undefined;
52
- url_standard?: string | undefined;
53
- url_zoom?: string | undefined;
47
+ title: string | null;
48
+ alternate_text: string | null;
49
+ sort_order: number;
50
+ url_tiny: string;
51
+ url_thumbnail: string;
52
+ url_standard: string;
53
+ url_zoom: string;
54
54
  };
55
55
 
56
56
  /** @internal */
@@ -59,13 +59,13 @@ export const ProductImage$outboundSchema: z.ZodType<
59
59
  z.ZodTypeDef,
60
60
  ProductImage
61
61
  > = z.object({
62
- title: z.nullable(z.string()).optional(),
63
- alternateText: z.nullable(z.string()).optional(),
64
- sortOrder: z.number().int().optional(),
65
- urlTiny: z.string().optional(),
66
- urlThumbnail: z.string().optional(),
67
- urlStandard: z.string().optional(),
68
- urlZoom: z.string().optional(),
62
+ title: z.nullable(z.string()),
63
+ alternateText: z.nullable(z.string()),
64
+ sortOrder: z.number().int(),
65
+ urlTiny: z.string(),
66
+ urlThumbnail: z.string(),
67
+ urlStandard: z.string(),
68
+ urlZoom: z.string(),
69
69
  }).transform((v) => {
70
70
  return remap$(v, {
71
71
  alternateText: "alternate_text",
@@ -22,9 +22,9 @@ export type ProductPricing = {
22
22
  listingPrice: number;
23
23
  sellingPrice: number;
24
24
  minOrderQuantity?: number | undefined;
25
- maxOrderQuantity?: number | null | undefined;
25
+ maxOrderQuantity: number | null;
26
26
  incrementalQuantity?: number | undefined;
27
- sellingPriceExcludingTax?: number | undefined;
27
+ sellingPriceExcludingTax: number;
28
28
  };
29
29
 
30
30
  /** @internal */
@@ -59,9 +59,9 @@ export const ProductPricing$inboundSchema: z.ZodType<
59
59
  listing_price: z.number(),
60
60
  selling_price: z.number(),
61
61
  min_order_quantity: z.number().int().default(1),
62
- max_order_quantity: z.nullable(z.number().int()).optional(),
62
+ max_order_quantity: z.nullable(z.number().int()),
63
63
  incremental_quantity: z.number().int().default(1),
64
- selling_price_excluding_tax: z.number().optional(),
64
+ selling_price_excluding_tax: z.number(),
65
65
  }).transform((v) => {
66
66
  return remap$(v, {
67
67
  "tax_type": "taxType",
@@ -85,9 +85,9 @@ export type ProductPricing$Outbound = {
85
85
  listing_price: number;
86
86
  selling_price: number;
87
87
  min_order_quantity: number;
88
- max_order_quantity?: number | null | undefined;
88
+ max_order_quantity: number | null;
89
89
  incremental_quantity: number;
90
- selling_price_excluding_tax?: number | undefined;
90
+ selling_price_excluding_tax: number;
91
91
  };
92
92
 
93
93
  /** @internal */
@@ -103,9 +103,9 @@ export const ProductPricing$outboundSchema: z.ZodType<
103
103
  listingPrice: z.number(),
104
104
  sellingPrice: z.number(),
105
105
  minOrderQuantity: z.number().int().default(1),
106
- maxOrderQuantity: z.nullable(z.number().int()).optional(),
106
+ maxOrderQuantity: z.nullable(z.number().int()),
107
107
  incrementalQuantity: z.number().int().default(1),
108
- sellingPriceExcludingTax: z.number().optional(),
108
+ sellingPriceExcludingTax: z.number(),
109
109
  }).transform((v) => {
110
110
  return remap$(v, {
111
111
  taxType: "tax_type",
@@ -9,14 +9,14 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type ProductShipping = {
12
- additionalCost?: number | null | undefined;
13
- shippingPriceIncludingTax?: boolean | undefined;
14
- availabilityDescription?: string | null | undefined;
12
+ additionalCost: number | null;
13
+ shippingPriceIncludingTax: boolean;
14
+ availabilityDescription: string | null;
15
15
  shipsInternationally?: boolean | undefined;
16
- midCode?: string | null | undefined;
16
+ midCode: string | null;
17
17
  countryOfOrigin?: string | null | undefined;
18
- taxType?: string | null | undefined;
19
- taxRate?: number | null | undefined;
18
+ taxType: string | null;
19
+ taxRate: number | null;
20
20
  };
21
21
 
22
22
  /** @internal */
@@ -25,14 +25,14 @@ export const ProductShipping$inboundSchema: z.ZodType<
25
25
  z.ZodTypeDef,
26
26
  unknown
27
27
  > = z.object({
28
- additional_cost: z.nullable(z.number()).optional(),
29
- shipping_price_including_tax: z.boolean().optional(),
30
- availability_description: z.nullable(z.string()).optional(),
28
+ additional_cost: z.nullable(z.number()),
29
+ shipping_price_including_tax: z.boolean(),
30
+ availability_description: z.nullable(z.string()),
31
31
  ships_internationally: z.boolean().default(false),
32
- mid_code: z.nullable(z.string()).optional(),
32
+ mid_code: z.nullable(z.string()),
33
33
  country_of_origin: z.nullable(z.string().default("India")),
34
- tax_type: z.nullable(z.string()).optional(),
35
- tax_rate: z.nullable(z.number()).optional(),
34
+ tax_type: z.nullable(z.string()),
35
+ tax_rate: z.nullable(z.number()),
36
36
  }).transform((v) => {
37
37
  return remap$(v, {
38
38
  "additional_cost": "additionalCost",
@@ -48,14 +48,14 @@ export const ProductShipping$inboundSchema: z.ZodType<
48
48
 
49
49
  /** @internal */
50
50
  export type ProductShipping$Outbound = {
51
- additional_cost?: number | null | undefined;
52
- shipping_price_including_tax?: boolean | undefined;
53
- availability_description?: string | null | undefined;
51
+ additional_cost: number | null;
52
+ shipping_price_including_tax: boolean;
53
+ availability_description: string | null;
54
54
  ships_internationally: boolean;
55
- mid_code?: string | null | undefined;
55
+ mid_code: string | null;
56
56
  country_of_origin: string | null;
57
- tax_type?: string | null | undefined;
58
- tax_rate?: number | null | undefined;
57
+ tax_type: string | null;
58
+ tax_rate: number | null;
59
59
  };
60
60
 
61
61
  /** @internal */
@@ -64,14 +64,14 @@ export const ProductShipping$outboundSchema: z.ZodType<
64
64
  z.ZodTypeDef,
65
65
  ProductShipping
66
66
  > = z.object({
67
- additionalCost: z.nullable(z.number()).optional(),
68
- shippingPriceIncludingTax: z.boolean().optional(),
69
- availabilityDescription: z.nullable(z.string()).optional(),
67
+ additionalCost: z.nullable(z.number()),
68
+ shippingPriceIncludingTax: z.boolean(),
69
+ availabilityDescription: z.nullable(z.string()),
70
70
  shipsInternationally: z.boolean().default(false),
71
- midCode: z.nullable(z.string()).optional(),
71
+ midCode: z.nullable(z.string()),
72
72
  countryOfOrigin: z.nullable(z.string().default("India")),
73
- taxType: z.nullable(z.string()).optional(),
74
- taxRate: z.nullable(z.number()).optional(),
73
+ taxType: z.nullable(z.string()),
74
+ taxRate: z.nullable(z.number()),
75
75
  }).transform((v) => {
76
76
  return remap$(v, {
77
77
  additionalCost: "additional_cost",
@@ -9,17 +9,17 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type ProductVideo = {
12
- title?: string | undefined;
13
- alternateText?: string | undefined;
14
- sortOrder?: number | undefined;
15
- videoPreviewUrl?: string | undefined;
16
- videoStreamHlsUrl?: string | undefined;
17
- videoStreamDashUrl?: string | undefined;
18
- imageThumbnailUrl?: string | undefined;
12
+ title: string | null;
13
+ alternateText: string | null;
14
+ sortOrder: number;
15
+ videoPreviewUrl: string;
16
+ videoStreamHlsUrl: string;
17
+ videoStreamDashUrl: string;
18
+ imageThumbnailUrl: string;
19
19
  /**
20
20
  * in seconds
21
21
  */
22
- videoDuration?: number | undefined;
22
+ videoDuration: number;
23
23
  };
24
24
 
25
25
  /** @internal */
@@ -28,14 +28,14 @@ export const ProductVideo$inboundSchema: z.ZodType<
28
28
  z.ZodTypeDef,
29
29
  unknown
30
30
  > = z.object({
31
- title: z.string().optional(),
32
- alternate_text: z.string().optional(),
33
- sort_order: z.number().int().optional(),
34
- video_preview_url: z.string().optional(),
35
- video_stream_hls_url: z.string().optional(),
36
- video_stream_dash_url: z.string().optional(),
37
- image_thumbnail_url: z.string().optional(),
38
- video_duration: z.number().int().optional(),
31
+ title: z.nullable(z.string()),
32
+ alternate_text: z.nullable(z.string()),
33
+ sort_order: z.number().int(),
34
+ video_preview_url: z.string(),
35
+ video_stream_hls_url: z.string(),
36
+ video_stream_dash_url: z.string(),
37
+ image_thumbnail_url: z.string(),
38
+ video_duration: z.number().int(),
39
39
  }).transform((v) => {
40
40
  return remap$(v, {
41
41
  "alternate_text": "alternateText",
@@ -50,14 +50,14 @@ export const ProductVideo$inboundSchema: z.ZodType<
50
50
 
51
51
  /** @internal */
52
52
  export type ProductVideo$Outbound = {
53
- title?: string | undefined;
54
- alternate_text?: string | undefined;
55
- sort_order?: number | undefined;
56
- video_preview_url?: string | undefined;
57
- video_stream_hls_url?: string | undefined;
58
- video_stream_dash_url?: string | undefined;
59
- image_thumbnail_url?: string | undefined;
60
- video_duration?: number | undefined;
53
+ title: string | null;
54
+ alternate_text: string | null;
55
+ sort_order: number;
56
+ video_preview_url: string;
57
+ video_stream_hls_url: string;
58
+ video_stream_dash_url: string;
59
+ image_thumbnail_url: string;
60
+ video_duration: number;
61
61
  };
62
62
 
63
63
  /** @internal */
@@ -66,14 +66,14 @@ export const ProductVideo$outboundSchema: z.ZodType<
66
66
  z.ZodTypeDef,
67
67
  ProductVideo
68
68
  > = z.object({
69
- title: z.string().optional(),
70
- alternateText: z.string().optional(),
71
- sortOrder: z.number().int().optional(),
72
- videoPreviewUrl: z.string().optional(),
73
- videoStreamHlsUrl: z.string().optional(),
74
- videoStreamDashUrl: z.string().optional(),
75
- imageThumbnailUrl: z.string().optional(),
76
- videoDuration: z.number().int().optional(),
69
+ title: z.nullable(z.string()),
70
+ alternateText: z.nullable(z.string()),
71
+ sortOrder: z.number().int(),
72
+ videoPreviewUrl: z.string(),
73
+ videoStreamHlsUrl: z.string(),
74
+ videoStreamDashUrl: z.string(),
75
+ imageThumbnailUrl: z.string(),
76
+ videoDuration: z.number().int(),
77
77
  }).transform((v) => {
78
78
  return remap$(v, {
79
79
  alternateText: "alternate_text",
@@ -8,36 +8,36 @@ import { Result as SafeParseResult } from "../../types/fp.js";
8
8
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type Seo = {
11
- slug?: string | undefined;
12
- title?: string | undefined;
13
- description?: string | undefined;
14
- keywords?: Array<string> | undefined;
11
+ slug: string | null;
12
+ title: string | null;
13
+ description: string | null;
14
+ keywords: Array<string> | null;
15
15
  };
16
16
 
17
17
  /** @internal */
18
18
  export const Seo$inboundSchema: z.ZodType<Seo, z.ZodTypeDef, unknown> = z
19
19
  .object({
20
- slug: z.string().optional(),
21
- title: z.string().optional(),
22
- description: z.string().optional(),
23
- keywords: z.array(z.string()).optional(),
20
+ slug: z.nullable(z.string()),
21
+ title: z.nullable(z.string()),
22
+ description: z.nullable(z.string()),
23
+ keywords: z.nullable(z.array(z.string())),
24
24
  });
25
25
 
26
26
  /** @internal */
27
27
  export type Seo$Outbound = {
28
- slug?: string | undefined;
29
- title?: string | undefined;
30
- description?: string | undefined;
31
- keywords?: Array<string> | undefined;
28
+ slug: string | null;
29
+ title: string | null;
30
+ description: string | null;
31
+ keywords: Array<string> | null;
32
32
  };
33
33
 
34
34
  /** @internal */
35
35
  export const Seo$outboundSchema: z.ZodType<Seo$Outbound, z.ZodTypeDef, Seo> = z
36
36
  .object({
37
- slug: z.string().optional(),
38
- title: z.string().optional(),
39
- description: z.string().optional(),
40
- keywords: z.array(z.string()).optional(),
37
+ slug: z.nullable(z.string()),
38
+ title: z.nullable(z.string()),
39
+ description: z.nullable(z.string()),
40
+ keywords: z.nullable(z.array(z.string())),
41
41
  });
42
42
 
43
43
  /**