ce-storefront 0.4.8 → 0.5.0

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 (97) hide show
  1. package/docs/sdks/auth/README.md +6 -30
  2. package/docs/sdks/carts/README.md +14 -10
  3. package/docs/sdks/catalog/README.md +0 -6
  4. package/docs/sdks/checkout/README.md +54 -14
  5. package/docs/sdks/customers/README.md +24 -0
  6. package/esm/funcs/checkoutCreateCheckoutAddress.d.ts +1 -1
  7. package/esm/funcs/checkoutCreateCheckoutAddress.js +1 -1
  8. package/esm/lib/config.d.ts +3 -3
  9. package/esm/lib/config.js +3 -3
  10. package/esm/lib/retries.js +0 -1
  11. package/esm/lib/retries.js.map +1 -1
  12. package/esm/models/components/cart.d.ts +64 -86
  13. package/esm/models/components/cart.d.ts.map +1 -1
  14. package/esm/models/components/cart.js +68 -95
  15. package/esm/models/components/cart.js.map +1 -1
  16. package/esm/models/components/cartitem.d.ts +111 -61
  17. package/esm/models/components/cartitem.d.ts.map +1 -1
  18. package/esm/models/components/cartitem.js +111 -59
  19. package/esm/models/components/cartitem.js.map +1 -1
  20. package/esm/models/components/customeraddress.d.ts +20 -20
  21. package/esm/models/components/customeraddress.d.ts.map +1 -1
  22. package/esm/models/components/customeraddress.js +20 -18
  23. package/esm/models/components/customeraddress.js.map +1 -1
  24. package/esm/models/components/customeraddressinput.d.ts +14 -14
  25. package/esm/models/components/customeraddressinput.d.ts.map +1 -1
  26. package/esm/models/components/customeraddressinput.js +14 -12
  27. package/esm/models/components/customeraddressinput.js.map +1 -1
  28. package/esm/models/components/productpricing.js +1 -1
  29. package/esm/models/components/productpricing.js.map +1 -1
  30. package/esm/models/operations/applycoupon.d.ts +8 -8
  31. package/esm/models/operations/applycoupon.d.ts.map +1 -1
  32. package/esm/models/operations/applycoupon.js +8 -8
  33. package/esm/models/operations/applycoupon.js.map +1 -1
  34. package/esm/models/operations/createaddress.d.ts +14 -14
  35. package/esm/models/operations/createaddress.d.ts.map +1 -1
  36. package/esm/models/operations/createaddress.js +14 -12
  37. package/esm/models/operations/createaddress.js.map +1 -1
  38. package/esm/models/operations/createcart.d.ts +10 -13
  39. package/esm/models/operations/createcart.d.ts.map +1 -1
  40. package/esm/models/operations/createcart.js +10 -10
  41. package/esm/models/operations/createcart.js.map +1 -1
  42. package/esm/models/operations/createcheckoutaddress.d.ts +8 -8
  43. package/esm/models/operations/createcheckoutaddress.d.ts.map +1 -1
  44. package/esm/models/operations/createcheckoutaddress.js +8 -8
  45. package/esm/models/operations/createcheckoutaddress.js.map +1 -1
  46. package/esm/models/operations/deletecart.d.ts +2 -2
  47. package/esm/models/operations/deletecart.d.ts.map +1 -1
  48. package/esm/models/operations/deletecart.js +2 -2
  49. package/esm/models/operations/deletecart.js.map +1 -1
  50. package/esm/models/operations/getaddressdetail.d.ts +20 -20
  51. package/esm/models/operations/getaddressdetail.d.ts.map +1 -1
  52. package/esm/models/operations/getaddressdetail.js +20 -18
  53. package/esm/models/operations/getaddressdetail.js.map +1 -1
  54. package/esm/models/operations/getcart.d.ts +4 -4
  55. package/esm/models/operations/getcart.d.ts.map +1 -1
  56. package/esm/models/operations/getcart.js +4 -4
  57. package/esm/models/operations/getcart.js.map +1 -1
  58. package/esm/models/operations/listaddresses.d.ts +20 -20
  59. package/esm/models/operations/listaddresses.d.ts.map +1 -1
  60. package/esm/models/operations/listaddresses.js +20 -18
  61. package/esm/models/operations/listaddresses.js.map +1 -1
  62. package/esm/models/operations/removecoupon.d.ts +8 -8
  63. package/esm/models/operations/removecoupon.d.ts.map +1 -1
  64. package/esm/models/operations/removecoupon.js +8 -8
  65. package/esm/models/operations/removecoupon.js.map +1 -1
  66. package/esm/models/operations/updateaddressdetail.d.ts +14 -14
  67. package/esm/models/operations/updateaddressdetail.d.ts.map +1 -1
  68. package/esm/models/operations/updateaddressdetail.js +14 -12
  69. package/esm/models/operations/updateaddressdetail.js.map +1 -1
  70. package/esm/models/operations/updatecart.d.ts +4 -4
  71. package/esm/models/operations/updatecart.d.ts.map +1 -1
  72. package/esm/models/operations/updatecart.js +4 -4
  73. package/esm/models/operations/updatecart.js.map +1 -1
  74. package/esm/sdk/checkout.d.ts +1 -1
  75. package/esm/sdk/checkout.js +1 -1
  76. package/jsr.json +1 -1
  77. package/package.json +6 -7
  78. package/src/funcs/checkoutCreateCheckoutAddress.ts +1 -1
  79. package/src/lib/config.ts +3 -3
  80. package/src/lib/retries.ts +0 -1
  81. package/src/models/components/cart.ts +128 -185
  82. package/src/models/components/cartitem.ts +206 -120
  83. package/src/models/components/customeraddress.ts +40 -38
  84. package/src/models/components/customeraddressinput.ts +28 -26
  85. package/src/models/components/productpricing.ts +1 -1
  86. package/src/models/operations/applycoupon.ts +16 -16
  87. package/src/models/operations/createaddress.ts +28 -26
  88. package/src/models/operations/createcart.ts +20 -23
  89. package/src/models/operations/createcheckoutaddress.ts +16 -16
  90. package/src/models/operations/deletecart.ts +4 -4
  91. package/src/models/operations/getaddressdetail.ts +40 -38
  92. package/src/models/operations/getcart.ts +8 -8
  93. package/src/models/operations/listaddresses.ts +40 -38
  94. package/src/models/operations/removecoupon.ts +16 -16
  95. package/src/models/operations/updateaddressdetail.ts +28 -26
  96. package/src/models/operations/updatecart.ts +8 -8
  97. package/src/sdk/checkout.ts +1 -1
@@ -10,33 +10,33 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  export type CustomerAddressInput = {
12
12
  firstName: string;
13
- lastName?: string | undefined;
13
+ lastName: string;
14
14
  /**
15
15
  * Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
16
16
  *
17
17
  * @remarks
18
18
  */
19
- countryCode?: string | undefined;
19
+ countryCode: string;
20
20
  /**
21
21
  * 10 digit phone number without country code.
22
22
  */
23
23
  phone: string;
24
24
  email: string;
25
25
  addressLine1: string;
26
- addressLine2?: string | null | undefined;
27
- landmark?: string | null | undefined;
26
+ addressLine2: string | null;
27
+ landmark: string | null;
28
28
  pincode: string;
29
29
  city: string;
30
30
  state: string;
31
31
  country?: "India" | undefined;
32
32
  /**
33
- * Use in shipping details only.
33
+ * Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
34
34
  */
35
- gstin?: string | null | undefined;
35
+ taxIdentificationNumber: string | null;
36
36
  /**
37
- * Use in shipping details only.
37
+ * Use in billing & shipping details only.
38
38
  */
39
- businessName?: string | null | undefined;
39
+ businessName: string | null;
40
40
  };
41
41
 
42
42
  /** @internal */
@@ -46,19 +46,19 @@ export const CustomerAddressInput$inboundSchema: z.ZodType<
46
46
  unknown
47
47
  > = z.object({
48
48
  first_name: z.string(),
49
- last_name: z.string().optional(),
50
- country_code: z.string().optional(),
49
+ last_name: z.string(),
50
+ country_code: z.string(),
51
51
  phone: z.string(),
52
52
  email: z.string(),
53
53
  address_line1: z.string(),
54
- address_line2: z.nullable(z.string()).optional(),
55
- landmark: z.nullable(z.string()).optional(),
54
+ address_line2: z.nullable(z.string()),
55
+ landmark: z.nullable(z.string()),
56
56
  pincode: z.string(),
57
57
  city: z.string(),
58
58
  state: z.string(),
59
59
  country: z.literal("India").optional(),
60
- gstin: z.nullable(z.string()).optional(),
61
- business_name: z.nullable(z.string()).optional(),
60
+ tax_identification_number: z.nullable(z.string()),
61
+ business_name: z.nullable(z.string()),
62
62
  }).transform((v) => {
63
63
  return remap$(v, {
64
64
  "first_name": "firstName",
@@ -66,6 +66,7 @@ export const CustomerAddressInput$inboundSchema: z.ZodType<
66
66
  "country_code": "countryCode",
67
67
  "address_line1": "addressLine1",
68
68
  "address_line2": "addressLine2",
69
+ "tax_identification_number": "taxIdentificationNumber",
69
70
  "business_name": "businessName",
70
71
  });
71
72
  });
@@ -73,19 +74,19 @@ export const CustomerAddressInput$inboundSchema: z.ZodType<
73
74
  /** @internal */
74
75
  export type CustomerAddressInput$Outbound = {
75
76
  first_name: string;
76
- last_name?: string | undefined;
77
- country_code?: string | undefined;
77
+ last_name: string;
78
+ country_code: string;
78
79
  phone: string;
79
80
  email: string;
80
81
  address_line1: string;
81
- address_line2?: string | null | undefined;
82
- landmark?: string | null | undefined;
82
+ address_line2: string | null;
83
+ landmark: string | null;
83
84
  pincode: string;
84
85
  city: string;
85
86
  state: string;
86
87
  country: "India";
87
- gstin?: string | null | undefined;
88
- business_name?: string | null | undefined;
88
+ tax_identification_number: string | null;
89
+ business_name: string | null;
89
90
  };
90
91
 
91
92
  /** @internal */
@@ -95,19 +96,19 @@ export const CustomerAddressInput$outboundSchema: z.ZodType<
95
96
  CustomerAddressInput
96
97
  > = z.object({
97
98
  firstName: z.string(),
98
- lastName: z.string().optional(),
99
- countryCode: z.string().optional(),
99
+ lastName: z.string(),
100
+ countryCode: z.string(),
100
101
  phone: z.string(),
101
102
  email: z.string(),
102
103
  addressLine1: z.string(),
103
- addressLine2: z.nullable(z.string()).optional(),
104
- landmark: z.nullable(z.string()).optional(),
104
+ addressLine2: z.nullable(z.string()),
105
+ landmark: z.nullable(z.string()),
105
106
  pincode: z.string(),
106
107
  city: z.string(),
107
108
  state: z.string(),
108
109
  country: z.literal("India").default("India" as const),
109
- gstin: z.nullable(z.string()).optional(),
110
- businessName: z.nullable(z.string()).optional(),
110
+ taxIdentificationNumber: z.nullable(z.string()),
111
+ businessName: z.nullable(z.string()),
111
112
  }).transform((v) => {
112
113
  return remap$(v, {
113
114
  firstName: "first_name",
@@ -115,6 +116,7 @@ export const CustomerAddressInput$outboundSchema: z.ZodType<
115
116
  countryCode: "country_code",
116
117
  addressLine1: "address_line1",
117
118
  addressLine2: "address_line2",
119
+ taxIdentificationNumber: "tax_identification_number",
118
120
  businessName: "business_name",
119
121
  });
120
122
  });
@@ -28,7 +28,7 @@ export const ProductPricing$inboundSchema: z.ZodType<
28
28
  unknown
29
29
  > = z.object({
30
30
  currency: z.string(),
31
- tax_type: z.literal("GST").optional(),
31
+ tax_type: z.literal("GST").default("GST"),
32
32
  tax_rate: z.number(),
33
33
  price_including_tax: z.boolean(),
34
34
  listing_price: z.number(),
@@ -29,16 +29,16 @@ export type ApplyCouponContent = {
29
29
  /**
30
30
  * This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
31
31
  */
32
- cart?: components.Cart | undefined;
32
+ cart: components.Cart;
33
33
  };
34
34
 
35
35
  /**
36
36
  * OK
37
37
  */
38
38
  export type ApplyCouponResponseBody = {
39
- message?: string | undefined;
40
- success?: boolean | undefined;
41
- content?: ApplyCouponContent | undefined;
39
+ message: string;
40
+ success: boolean;
41
+ content: ApplyCouponContent;
42
42
  };
43
43
 
44
44
  /** @internal */
@@ -114,12 +114,12 @@ export const ApplyCouponContent$inboundSchema: z.ZodType<
114
114
  z.ZodTypeDef,
115
115
  unknown
116
116
  > = z.object({
117
- cart: components.Cart$inboundSchema.optional(),
117
+ cart: components.Cart$inboundSchema,
118
118
  });
119
119
 
120
120
  /** @internal */
121
121
  export type ApplyCouponContent$Outbound = {
122
- cart?: components.Cart$Outbound | undefined;
122
+ cart: components.Cart$Outbound;
123
123
  };
124
124
 
125
125
  /** @internal */
@@ -128,7 +128,7 @@ export const ApplyCouponContent$outboundSchema: z.ZodType<
128
128
  z.ZodTypeDef,
129
129
  ApplyCouponContent
130
130
  > = z.object({
131
- cart: components.Cart$outboundSchema.optional(),
131
+ cart: components.Cart$outboundSchema,
132
132
  });
133
133
 
134
134
  /**
@@ -168,16 +168,16 @@ export const ApplyCouponResponseBody$inboundSchema: z.ZodType<
168
168
  z.ZodTypeDef,
169
169
  unknown
170
170
  > = z.object({
171
- message: z.string().optional(),
172
- success: z.boolean().optional(),
173
- content: z.lazy(() => ApplyCouponContent$inboundSchema).optional(),
171
+ message: z.string(),
172
+ success: z.boolean(),
173
+ content: z.lazy(() => ApplyCouponContent$inboundSchema),
174
174
  });
175
175
 
176
176
  /** @internal */
177
177
  export type ApplyCouponResponseBody$Outbound = {
178
- message?: string | undefined;
179
- success?: boolean | undefined;
180
- content?: ApplyCouponContent$Outbound | undefined;
178
+ message: string;
179
+ success: boolean;
180
+ content: ApplyCouponContent$Outbound;
181
181
  };
182
182
 
183
183
  /** @internal */
@@ -186,9 +186,9 @@ export const ApplyCouponResponseBody$outboundSchema: z.ZodType<
186
186
  z.ZodTypeDef,
187
187
  ApplyCouponResponseBody
188
188
  > = z.object({
189
- message: z.string().optional(),
190
- success: z.boolean().optional(),
191
- content: z.lazy(() => ApplyCouponContent$outboundSchema).optional(),
189
+ message: z.string(),
190
+ success: z.boolean(),
191
+ content: z.lazy(() => ApplyCouponContent$outboundSchema),
192
192
  });
193
193
 
194
194
  /**
@@ -25,33 +25,33 @@ export const CreateAddressServerList = [
25
25
  */
26
26
  export type CreateAddressRequestBody = {
27
27
  firstName: string;
28
- lastName?: string | undefined;
28
+ lastName: string;
29
29
  /**
30
30
  * Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
31
31
  *
32
32
  * @remarks
33
33
  */
34
- countryCode?: string | undefined;
34
+ countryCode: string;
35
35
  /**
36
36
  * 10 digit phone number without country code.
37
37
  */
38
38
  phone: string;
39
39
  email: string;
40
40
  addressLine1: string;
41
- addressLine2?: string | null | undefined;
42
- landmark?: string | null | undefined;
41
+ addressLine2: string | null;
42
+ landmark: string | null;
43
43
  pincode: string;
44
44
  city: string;
45
45
  state: string;
46
46
  country?: "India" | undefined;
47
47
  /**
48
- * Use in shipping details only.
48
+ * Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
49
49
  */
50
- gstin?: string | null | undefined;
50
+ taxIdentificationNumber: string | null;
51
51
  /**
52
- * Use in shipping details only.
52
+ * Use in billing & shipping details only.
53
53
  */
54
- businessName?: string | null | undefined;
54
+ businessName: string | null;
55
55
  isDefaultBilling?: boolean | undefined;
56
56
  isDefaultShipping?: boolean | undefined;
57
57
  };
@@ -87,19 +87,19 @@ export const CreateAddressRequestBody$inboundSchema: z.ZodType<
87
87
  unknown
88
88
  > = z.object({
89
89
  first_name: z.string(),
90
- last_name: z.string().optional(),
91
- country_code: z.string().optional(),
90
+ last_name: z.string(),
91
+ country_code: z.string(),
92
92
  phone: z.string(),
93
93
  email: z.string(),
94
94
  address_line1: z.string(),
95
- address_line2: z.nullable(z.string()).optional(),
96
- landmark: z.nullable(z.string()).optional(),
95
+ address_line2: z.nullable(z.string()),
96
+ landmark: z.nullable(z.string()),
97
97
  pincode: z.string(),
98
98
  city: z.string(),
99
99
  state: z.string(),
100
100
  country: z.literal("India").optional(),
101
- gstin: z.nullable(z.string()).optional(),
102
- business_name: z.nullable(z.string()).optional(),
101
+ tax_identification_number: z.nullable(z.string()),
102
+ business_name: z.nullable(z.string()),
103
103
  is_default_billing: z.boolean().optional(),
104
104
  is_default_shipping: z.boolean().optional(),
105
105
  }).transform((v) => {
@@ -109,6 +109,7 @@ export const CreateAddressRequestBody$inboundSchema: z.ZodType<
109
109
  "country_code": "countryCode",
110
110
  "address_line1": "addressLine1",
111
111
  "address_line2": "addressLine2",
112
+ "tax_identification_number": "taxIdentificationNumber",
112
113
  "business_name": "businessName",
113
114
  "is_default_billing": "isDefaultBilling",
114
115
  "is_default_shipping": "isDefaultShipping",
@@ -118,19 +119,19 @@ export const CreateAddressRequestBody$inboundSchema: z.ZodType<
118
119
  /** @internal */
119
120
  export type CreateAddressRequestBody$Outbound = {
120
121
  first_name: string;
121
- last_name?: string | undefined;
122
- country_code?: string | undefined;
122
+ last_name: string;
123
+ country_code: string;
123
124
  phone: string;
124
125
  email: string;
125
126
  address_line1: string;
126
- address_line2?: string | null | undefined;
127
- landmark?: string | null | undefined;
127
+ address_line2: string | null;
128
+ landmark: string | null;
128
129
  pincode: string;
129
130
  city: string;
130
131
  state: string;
131
132
  country: "India";
132
- gstin?: string | null | undefined;
133
- business_name?: string | null | undefined;
133
+ tax_identification_number: string | null;
134
+ business_name: string | null;
134
135
  is_default_billing?: boolean | undefined;
135
136
  is_default_shipping?: boolean | undefined;
136
137
  };
@@ -142,19 +143,19 @@ export const CreateAddressRequestBody$outboundSchema: z.ZodType<
142
143
  CreateAddressRequestBody
143
144
  > = z.object({
144
145
  firstName: z.string(),
145
- lastName: z.string().optional(),
146
- countryCode: z.string().optional(),
146
+ lastName: z.string(),
147
+ countryCode: z.string(),
147
148
  phone: z.string(),
148
149
  email: z.string(),
149
150
  addressLine1: z.string(),
150
- addressLine2: z.nullable(z.string()).optional(),
151
- landmark: z.nullable(z.string()).optional(),
151
+ addressLine2: z.nullable(z.string()),
152
+ landmark: z.nullable(z.string()),
152
153
  pincode: z.string(),
153
154
  city: z.string(),
154
155
  state: z.string(),
155
156
  country: z.literal("India").default("India" as const),
156
- gstin: z.nullable(z.string()).optional(),
157
- businessName: z.nullable(z.string()).optional(),
157
+ taxIdentificationNumber: z.nullable(z.string()),
158
+ businessName: z.nullable(z.string()),
158
159
  isDefaultBilling: z.boolean().optional(),
159
160
  isDefaultShipping: z.boolean().optional(),
160
161
  }).transform((v) => {
@@ -164,6 +165,7 @@ export const CreateAddressRequestBody$outboundSchema: z.ZodType<
164
165
  countryCode: "country_code",
165
166
  addressLine1: "address_line1",
166
167
  addressLine2: "address_line2",
168
+ taxIdentificationNumber: "tax_identification_number",
167
169
  businessName: "business_name",
168
170
  isDefaultBilling: "is_default_billing",
169
171
  isDefaultShipping: "is_default_shipping",
@@ -20,26 +20,23 @@ export const CreateCartServerList = [
20
20
  ] as const;
21
21
 
22
22
  export type CreateCartRequestBody = {
23
- /**
24
- * Schema for updating a cart item, including adding, removing, or adjusting the quantity of a product or variant.
25
- */
26
- items: components.UpdateCartItem;
23
+ items: Array<components.UpdateCartItem>;
27
24
  };
28
25
 
29
26
  export type CreateCartContent = {
30
27
  /**
31
28
  * This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
32
29
  */
33
- cart?: components.Cart | undefined;
30
+ cart: components.Cart;
34
31
  };
35
32
 
36
33
  /**
37
34
  * OK
38
35
  */
39
36
  export type CreateCartResponseBody = {
40
- message?: string | undefined;
41
- success?: boolean | undefined;
42
- content?: CreateCartContent | undefined;
37
+ message: string;
38
+ success: boolean;
39
+ content: CreateCartContent;
43
40
  };
44
41
 
45
42
  /** @internal */
@@ -48,12 +45,12 @@ export const CreateCartRequestBody$inboundSchema: z.ZodType<
48
45
  z.ZodTypeDef,
49
46
  unknown
50
47
  > = z.object({
51
- items: components.UpdateCartItem$inboundSchema,
48
+ items: z.array(components.UpdateCartItem$inboundSchema),
52
49
  });
53
50
 
54
51
  /** @internal */
55
52
  export type CreateCartRequestBody$Outbound = {
56
- items: components.UpdateCartItem$Outbound;
53
+ items: Array<components.UpdateCartItem$Outbound>;
57
54
  };
58
55
 
59
56
  /** @internal */
@@ -62,7 +59,7 @@ export const CreateCartRequestBody$outboundSchema: z.ZodType<
62
59
  z.ZodTypeDef,
63
60
  CreateCartRequestBody
64
61
  > = z.object({
65
- items: components.UpdateCartItem$outboundSchema,
62
+ items: z.array(components.UpdateCartItem$outboundSchema),
66
63
  });
67
64
 
68
65
  /**
@@ -102,12 +99,12 @@ export const CreateCartContent$inboundSchema: z.ZodType<
102
99
  z.ZodTypeDef,
103
100
  unknown
104
101
  > = z.object({
105
- cart: components.Cart$inboundSchema.optional(),
102
+ cart: components.Cart$inboundSchema,
106
103
  });
107
104
 
108
105
  /** @internal */
109
106
  export type CreateCartContent$Outbound = {
110
- cart?: components.Cart$Outbound | undefined;
107
+ cart: components.Cart$Outbound;
111
108
  };
112
109
 
113
110
  /** @internal */
@@ -116,7 +113,7 @@ export const CreateCartContent$outboundSchema: z.ZodType<
116
113
  z.ZodTypeDef,
117
114
  CreateCartContent
118
115
  > = z.object({
119
- cart: components.Cart$outboundSchema.optional(),
116
+ cart: components.Cart$outboundSchema,
120
117
  });
121
118
 
122
119
  /**
@@ -156,16 +153,16 @@ export const CreateCartResponseBody$inboundSchema: z.ZodType<
156
153
  z.ZodTypeDef,
157
154
  unknown
158
155
  > = z.object({
159
- message: z.string().optional(),
160
- success: z.boolean().optional(),
161
- content: z.lazy(() => CreateCartContent$inboundSchema).optional(),
156
+ message: z.string(),
157
+ success: z.boolean(),
158
+ content: z.lazy(() => CreateCartContent$inboundSchema),
162
159
  });
163
160
 
164
161
  /** @internal */
165
162
  export type CreateCartResponseBody$Outbound = {
166
- message?: string | undefined;
167
- success?: boolean | undefined;
168
- content?: CreateCartContent$Outbound | undefined;
163
+ message: string;
164
+ success: boolean;
165
+ content: CreateCartContent$Outbound;
169
166
  };
170
167
 
171
168
  /** @internal */
@@ -174,9 +171,9 @@ export const CreateCartResponseBody$outboundSchema: z.ZodType<
174
171
  z.ZodTypeDef,
175
172
  CreateCartResponseBody
176
173
  > = z.object({
177
- message: z.string().optional(),
178
- success: z.boolean().optional(),
179
- content: z.lazy(() => CreateCartContent$outboundSchema).optional(),
174
+ message: z.string(),
175
+ success: z.boolean(),
176
+ content: z.lazy(() => CreateCartContent$outboundSchema),
180
177
  });
181
178
 
182
179
  /**
@@ -47,16 +47,16 @@ export type CreateCheckoutAddressContent = {
47
47
  /**
48
48
  * This cart model is structured to capture a wide range of details, facilitating accurate representation and management of user shopping carts in an e-commerce platform.
49
49
  */
50
- cart?: components.Cart | undefined;
50
+ cart: components.Cart;
51
51
  };
52
52
 
53
53
  /**
54
54
  * OK
55
55
  */
56
56
  export type CreateCheckoutAddressResponseBody = {
57
- message?: string | undefined;
58
- success?: boolean | undefined;
59
- content?: CreateCheckoutAddressContent | undefined;
57
+ message: string;
58
+ success: boolean;
59
+ content: CreateCheckoutAddressContent;
60
60
  };
61
61
 
62
62
  /** @internal */
@@ -259,12 +259,12 @@ export const CreateCheckoutAddressContent$inboundSchema: z.ZodType<
259
259
  z.ZodTypeDef,
260
260
  unknown
261
261
  > = z.object({
262
- cart: components.Cart$inboundSchema.optional(),
262
+ cart: components.Cart$inboundSchema,
263
263
  });
264
264
 
265
265
  /** @internal */
266
266
  export type CreateCheckoutAddressContent$Outbound = {
267
- cart?: components.Cart$Outbound | undefined;
267
+ cart: components.Cart$Outbound;
268
268
  };
269
269
 
270
270
  /** @internal */
@@ -273,7 +273,7 @@ export const CreateCheckoutAddressContent$outboundSchema: z.ZodType<
273
273
  z.ZodTypeDef,
274
274
  CreateCheckoutAddressContent
275
275
  > = z.object({
276
- cart: components.Cart$outboundSchema.optional(),
276
+ cart: components.Cart$outboundSchema,
277
277
  });
278
278
 
279
279
  /**
@@ -315,16 +315,16 @@ export const CreateCheckoutAddressResponseBody$inboundSchema: z.ZodType<
315
315
  z.ZodTypeDef,
316
316
  unknown
317
317
  > = z.object({
318
- message: z.string().optional(),
319
- success: z.boolean().optional(),
320
- content: z.lazy(() => CreateCheckoutAddressContent$inboundSchema).optional(),
318
+ message: z.string(),
319
+ success: z.boolean(),
320
+ content: z.lazy(() => CreateCheckoutAddressContent$inboundSchema),
321
321
  });
322
322
 
323
323
  /** @internal */
324
324
  export type CreateCheckoutAddressResponseBody$Outbound = {
325
- message?: string | undefined;
326
- success?: boolean | undefined;
327
- content?: CreateCheckoutAddressContent$Outbound | undefined;
325
+ message: string;
326
+ success: boolean;
327
+ content: CreateCheckoutAddressContent$Outbound;
328
328
  };
329
329
 
330
330
  /** @internal */
@@ -333,9 +333,9 @@ export const CreateCheckoutAddressResponseBody$outboundSchema: z.ZodType<
333
333
  z.ZodTypeDef,
334
334
  CreateCheckoutAddressResponseBody
335
335
  > = z.object({
336
- message: z.string().optional(),
337
- success: z.boolean().optional(),
338
- content: z.lazy(() => CreateCheckoutAddressContent$outboundSchema).optional(),
336
+ message: z.string(),
337
+ success: z.boolean(),
338
+ content: z.lazy(() => CreateCheckoutAddressContent$outboundSchema),
339
339
  });
340
340
 
341
341
  /**
@@ -30,7 +30,7 @@ export type DeleteCartRequest = {
30
30
  * OK
31
31
  */
32
32
  export type DeleteCartResponseBody = {
33
- message?: string | undefined;
33
+ message: string;
34
34
  success?: boolean | undefined;
35
35
  };
36
36
 
@@ -102,13 +102,13 @@ export const DeleteCartResponseBody$inboundSchema: z.ZodType<
102
102
  z.ZodTypeDef,
103
103
  unknown
104
104
  > = z.object({
105
- message: z.string().optional(),
105
+ message: z.string(),
106
106
  success: z.boolean().default(true),
107
107
  });
108
108
 
109
109
  /** @internal */
110
110
  export type DeleteCartResponseBody$Outbound = {
111
- message?: string | undefined;
111
+ message: string;
112
112
  success: boolean;
113
113
  };
114
114
 
@@ -118,7 +118,7 @@ export const DeleteCartResponseBody$outboundSchema: z.ZodType<
118
118
  z.ZodTypeDef,
119
119
  DeleteCartResponseBody
120
120
  > = z.object({
121
- message: z.string().optional(),
121
+ message: z.string(),
122
122
  success: z.boolean().default(true),
123
123
  });
124
124