ce-storefront 0.4.8 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/sdks/carts/README.md +28 -20
- package/docs/sdks/checkout/README.md +54 -14
- package/docs/sdks/customers/README.md +24 -0
- package/esm/funcs/cartsUpdateCart.js +1 -1
- package/esm/funcs/cartsUpdateCart.js.map +1 -1
- package/esm/funcs/checkoutCreateCheckoutAddress.d.ts +1 -1
- package/esm/funcs/checkoutCreateCheckoutAddress.js +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/retries.js +0 -1
- package/esm/lib/retries.js.map +1 -1
- package/esm/models/components/cart.d.ts +64 -86
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +68 -95
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/cartitem.d.ts +111 -61
- package/esm/models/components/cartitem.d.ts.map +1 -1
- package/esm/models/components/cartitem.js +111 -59
- package/esm/models/components/cartitem.js.map +1 -1
- package/esm/models/components/customeraddress.d.ts +20 -20
- package/esm/models/components/customeraddress.d.ts.map +1 -1
- package/esm/models/components/customeraddress.js +20 -18
- package/esm/models/components/customeraddress.js.map +1 -1
- package/esm/models/components/customeraddressinput.d.ts +14 -14
- package/esm/models/components/customeraddressinput.d.ts.map +1 -1
- package/esm/models/components/customeraddressinput.js +14 -12
- package/esm/models/components/customeraddressinput.js.map +1 -1
- package/esm/models/components/productpricing.js +1 -1
- package/esm/models/components/productpricing.js.map +1 -1
- package/esm/models/operations/applycoupon.d.ts +8 -8
- package/esm/models/operations/applycoupon.d.ts.map +1 -1
- package/esm/models/operations/applycoupon.js +8 -8
- package/esm/models/operations/applycoupon.js.map +1 -1
- package/esm/models/operations/createaddress.d.ts +14 -14
- package/esm/models/operations/createaddress.d.ts.map +1 -1
- package/esm/models/operations/createaddress.js +14 -12
- package/esm/models/operations/createaddress.js.map +1 -1
- package/esm/models/operations/createcart.d.ts +2 -5
- package/esm/models/operations/createcart.d.ts.map +1 -1
- package/esm/models/operations/createcart.js +2 -2
- package/esm/models/operations/createcart.js.map +1 -1
- package/esm/models/operations/getaddressdetail.d.ts +20 -20
- package/esm/models/operations/getaddressdetail.d.ts.map +1 -1
- package/esm/models/operations/getaddressdetail.js +20 -18
- package/esm/models/operations/getaddressdetail.js.map +1 -1
- package/esm/models/operations/listaddresses.d.ts +20 -20
- package/esm/models/operations/listaddresses.d.ts.map +1 -1
- package/esm/models/operations/listaddresses.js +20 -18
- package/esm/models/operations/listaddresses.js.map +1 -1
- package/esm/models/operations/removecoupon.d.ts +8 -8
- package/esm/models/operations/removecoupon.d.ts.map +1 -1
- package/esm/models/operations/removecoupon.js +8 -8
- package/esm/models/operations/removecoupon.js.map +1 -1
- package/esm/models/operations/updateaddressdetail.d.ts +14 -14
- package/esm/models/operations/updateaddressdetail.d.ts.map +1 -1
- package/esm/models/operations/updateaddressdetail.js +14 -12
- package/esm/models/operations/updateaddressdetail.js.map +1 -1
- package/esm/models/operations/updatecart.d.ts +2 -2
- package/esm/models/operations/updatecart.d.ts.map +1 -1
- package/esm/models/operations/updatecart.js +4 -4
- package/esm/models/operations/updatecart.js.map +1 -1
- package/esm/sdk/checkout.d.ts +1 -1
- package/esm/sdk/checkout.js +1 -1
- package/jsr.json +1 -1
- package/package.json +6 -7
- package/src/funcs/cartsUpdateCart.ts +1 -1
- package/src/funcs/checkoutCreateCheckoutAddress.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/retries.ts +0 -1
- package/src/models/components/cart.ts +128 -185
- package/src/models/components/cartitem.ts +206 -120
- package/src/models/components/customeraddress.ts +40 -38
- package/src/models/components/customeraddressinput.ts +28 -26
- package/src/models/components/productpricing.ts +1 -1
- package/src/models/operations/applycoupon.ts +16 -16
- package/src/models/operations/createaddress.ts +28 -26
- package/src/models/operations/createcart.ts +4 -7
- package/src/models/operations/getaddressdetail.ts +40 -38
- package/src/models/operations/listaddresses.ts +40 -38
- package/src/models/operations/removecoupon.ts +16 -16
- package/src/models/operations/updateaddressdetail.ts +28 -26
- package/src/models/operations/updatecart.ts +6 -6
- 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
|
|
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
|
|
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
|
|
27
|
-
landmark
|
|
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
|
-
*
|
|
33
|
+
* Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
|
|
34
34
|
*/
|
|
35
|
-
|
|
35
|
+
taxIdentificationNumber: string | null;
|
|
36
36
|
/**
|
|
37
|
-
* Use in shipping details only.
|
|
37
|
+
* Use in billing & shipping details only.
|
|
38
38
|
*/
|
|
39
|
-
businessName
|
|
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()
|
|
50
|
-
country_code: z.string()
|
|
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())
|
|
55
|
-
landmark: z.nullable(z.string())
|
|
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
|
-
|
|
61
|
-
business_name: z.nullable(z.string())
|
|
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
|
|
77
|
-
country_code
|
|
77
|
+
last_name: string;
|
|
78
|
+
country_code: string;
|
|
78
79
|
phone: string;
|
|
79
80
|
email: string;
|
|
80
81
|
address_line1: string;
|
|
81
|
-
address_line2
|
|
82
|
-
landmark
|
|
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
|
-
|
|
88
|
-
business_name
|
|
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()
|
|
99
|
-
countryCode: z.string()
|
|
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())
|
|
104
|
-
landmark: z.nullable(z.string())
|
|
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
|
-
|
|
110
|
-
businessName: z.nullable(z.string())
|
|
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").
|
|
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
|
|
32
|
+
cart: components.Cart;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
36
|
* OK
|
|
37
37
|
*/
|
|
38
38
|
export type ApplyCouponResponseBody = {
|
|
39
|
-
message
|
|
40
|
-
success
|
|
41
|
-
content
|
|
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
|
|
117
|
+
cart: components.Cart$inboundSchema,
|
|
118
118
|
});
|
|
119
119
|
|
|
120
120
|
/** @internal */
|
|
121
121
|
export type ApplyCouponContent$Outbound = {
|
|
122
|
-
cart
|
|
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
|
|
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()
|
|
172
|
-
success: z.boolean()
|
|
173
|
-
content: z.lazy(() => ApplyCouponContent$inboundSchema)
|
|
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
|
|
179
|
-
success
|
|
180
|
-
content
|
|
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()
|
|
190
|
-
success: z.boolean()
|
|
191
|
-
content: z.lazy(() => ApplyCouponContent$outboundSchema)
|
|
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
|
|
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
|
|
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
|
|
42
|
-
landmark
|
|
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
|
-
*
|
|
48
|
+
* Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
|
|
49
49
|
*/
|
|
50
|
-
|
|
50
|
+
taxIdentificationNumber: string | null;
|
|
51
51
|
/**
|
|
52
|
-
* Use in shipping details only.
|
|
52
|
+
* Use in billing & shipping details only.
|
|
53
53
|
*/
|
|
54
|
-
businessName
|
|
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()
|
|
91
|
-
country_code: z.string()
|
|
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())
|
|
96
|
-
landmark: z.nullable(z.string())
|
|
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
|
-
|
|
102
|
-
business_name: z.nullable(z.string())
|
|
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
|
|
122
|
-
country_code
|
|
122
|
+
last_name: string;
|
|
123
|
+
country_code: string;
|
|
123
124
|
phone: string;
|
|
124
125
|
email: string;
|
|
125
126
|
address_line1: string;
|
|
126
|
-
address_line2
|
|
127
|
-
landmark
|
|
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
|
-
|
|
133
|
-
business_name
|
|
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()
|
|
146
|
-
countryCode: z.string()
|
|
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())
|
|
151
|
-
landmark: z.nullable(z.string())
|
|
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
|
-
|
|
157
|
-
businessName: z.nullable(z.string())
|
|
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,10 +20,7 @@ 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 = {
|
|
@@ -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
|
/**
|
|
@@ -31,37 +31,37 @@ export type GetAddressDetailRequest = {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
export type GetAddressDetailAddress = {
|
|
34
|
-
id
|
|
34
|
+
id: string;
|
|
35
35
|
firstName: string;
|
|
36
|
-
lastName
|
|
36
|
+
lastName: string;
|
|
37
37
|
/**
|
|
38
38
|
* Two-letter code begin with a plus sign prefix that identifies different countries. By default it will be +91 if not provided.
|
|
39
39
|
*
|
|
40
40
|
* @remarks
|
|
41
41
|
*/
|
|
42
|
-
countryCode
|
|
42
|
+
countryCode: string;
|
|
43
43
|
/**
|
|
44
44
|
* 10 digit phone number without country code.
|
|
45
45
|
*/
|
|
46
46
|
phone: string;
|
|
47
47
|
email: string;
|
|
48
48
|
addressLine1: string;
|
|
49
|
-
addressLine2
|
|
50
|
-
landmark
|
|
49
|
+
addressLine2: string | null;
|
|
50
|
+
landmark: string | null;
|
|
51
51
|
pincode: string;
|
|
52
52
|
city: string;
|
|
53
53
|
state: string;
|
|
54
54
|
country?: "India" | undefined;
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
|
|
57
57
|
*/
|
|
58
|
-
|
|
58
|
+
taxIdentificationNumber: string | null;
|
|
59
59
|
/**
|
|
60
|
-
* Use in shipping details only.
|
|
60
|
+
* Use in billing & shipping details only.
|
|
61
61
|
*/
|
|
62
|
-
businessName
|
|
63
|
-
isPhoneVerified
|
|
64
|
-
isEmailVerified
|
|
62
|
+
businessName: string | null;
|
|
63
|
+
isPhoneVerified: boolean;
|
|
64
|
+
isEmailVerified: boolean;
|
|
65
65
|
isDefaultBilling?: boolean | undefined;
|
|
66
66
|
isDefaultShipping?: boolean | undefined;
|
|
67
67
|
};
|
|
@@ -152,23 +152,23 @@ export const GetAddressDetailAddress$inboundSchema: z.ZodType<
|
|
|
152
152
|
z.ZodTypeDef,
|
|
153
153
|
unknown
|
|
154
154
|
> = z.object({
|
|
155
|
-
id: z.string()
|
|
155
|
+
id: z.string(),
|
|
156
156
|
first_name: z.string(),
|
|
157
|
-
last_name: z.string()
|
|
158
|
-
country_code: z.string()
|
|
157
|
+
last_name: z.string(),
|
|
158
|
+
country_code: z.string(),
|
|
159
159
|
phone: z.string(),
|
|
160
160
|
email: z.string(),
|
|
161
161
|
address_line1: z.string(),
|
|
162
|
-
address_line2: z.nullable(z.string())
|
|
163
|
-
landmark: z.nullable(z.string())
|
|
162
|
+
address_line2: z.nullable(z.string()),
|
|
163
|
+
landmark: z.nullable(z.string()),
|
|
164
164
|
pincode: z.string(),
|
|
165
165
|
city: z.string(),
|
|
166
166
|
state: z.string(),
|
|
167
167
|
country: z.literal("India").optional(),
|
|
168
|
-
|
|
169
|
-
business_name: z.nullable(z.string())
|
|
170
|
-
is_phone_verified: z.boolean()
|
|
171
|
-
is_email_verified: z.boolean()
|
|
168
|
+
tax_identification_number: z.nullable(z.string()),
|
|
169
|
+
business_name: z.nullable(z.string()),
|
|
170
|
+
is_phone_verified: z.boolean(),
|
|
171
|
+
is_email_verified: z.boolean(),
|
|
172
172
|
is_default_billing: z.boolean().optional(),
|
|
173
173
|
is_default_shipping: z.boolean().optional(),
|
|
174
174
|
}).transform((v) => {
|
|
@@ -178,6 +178,7 @@ export const GetAddressDetailAddress$inboundSchema: z.ZodType<
|
|
|
178
178
|
"country_code": "countryCode",
|
|
179
179
|
"address_line1": "addressLine1",
|
|
180
180
|
"address_line2": "addressLine2",
|
|
181
|
+
"tax_identification_number": "taxIdentificationNumber",
|
|
181
182
|
"business_name": "businessName",
|
|
182
183
|
"is_phone_verified": "isPhoneVerified",
|
|
183
184
|
"is_email_verified": "isEmailVerified",
|
|
@@ -188,23 +189,23 @@ export const GetAddressDetailAddress$inboundSchema: z.ZodType<
|
|
|
188
189
|
|
|
189
190
|
/** @internal */
|
|
190
191
|
export type GetAddressDetailAddress$Outbound = {
|
|
191
|
-
id
|
|
192
|
+
id: string;
|
|
192
193
|
first_name: string;
|
|
193
|
-
last_name
|
|
194
|
-
country_code
|
|
194
|
+
last_name: string;
|
|
195
|
+
country_code: string;
|
|
195
196
|
phone: string;
|
|
196
197
|
email: string;
|
|
197
198
|
address_line1: string;
|
|
198
|
-
address_line2
|
|
199
|
-
landmark
|
|
199
|
+
address_line2: string | null;
|
|
200
|
+
landmark: string | null;
|
|
200
201
|
pincode: string;
|
|
201
202
|
city: string;
|
|
202
203
|
state: string;
|
|
203
204
|
country: "India";
|
|
204
|
-
|
|
205
|
-
business_name
|
|
206
|
-
is_phone_verified
|
|
207
|
-
is_email_verified
|
|
205
|
+
tax_identification_number: string | null;
|
|
206
|
+
business_name: string | null;
|
|
207
|
+
is_phone_verified: boolean;
|
|
208
|
+
is_email_verified: boolean;
|
|
208
209
|
is_default_billing?: boolean | undefined;
|
|
209
210
|
is_default_shipping?: boolean | undefined;
|
|
210
211
|
};
|
|
@@ -215,23 +216,23 @@ export const GetAddressDetailAddress$outboundSchema: z.ZodType<
|
|
|
215
216
|
z.ZodTypeDef,
|
|
216
217
|
GetAddressDetailAddress
|
|
217
218
|
> = z.object({
|
|
218
|
-
id: z.string()
|
|
219
|
+
id: z.string(),
|
|
219
220
|
firstName: z.string(),
|
|
220
|
-
lastName: z.string()
|
|
221
|
-
countryCode: z.string()
|
|
221
|
+
lastName: z.string(),
|
|
222
|
+
countryCode: z.string(),
|
|
222
223
|
phone: z.string(),
|
|
223
224
|
email: z.string(),
|
|
224
225
|
addressLine1: z.string(),
|
|
225
|
-
addressLine2: z.nullable(z.string())
|
|
226
|
-
landmark: z.nullable(z.string())
|
|
226
|
+
addressLine2: z.nullable(z.string()),
|
|
227
|
+
landmark: z.nullable(z.string()),
|
|
227
228
|
pincode: z.string(),
|
|
228
229
|
city: z.string(),
|
|
229
230
|
state: z.string(),
|
|
230
231
|
country: z.literal("India").default("India" as const),
|
|
231
|
-
|
|
232
|
-
businessName: z.nullable(z.string())
|
|
233
|
-
isPhoneVerified: z.boolean()
|
|
234
|
-
isEmailVerified: z.boolean()
|
|
232
|
+
taxIdentificationNumber: z.nullable(z.string()),
|
|
233
|
+
businessName: z.nullable(z.string()),
|
|
234
|
+
isPhoneVerified: z.boolean(),
|
|
235
|
+
isEmailVerified: z.boolean(),
|
|
235
236
|
isDefaultBilling: z.boolean().optional(),
|
|
236
237
|
isDefaultShipping: z.boolean().optional(),
|
|
237
238
|
}).transform((v) => {
|
|
@@ -241,6 +242,7 @@ export const GetAddressDetailAddress$outboundSchema: z.ZodType<
|
|
|
241
242
|
countryCode: "country_code",
|
|
242
243
|
addressLine1: "address_line1",
|
|
243
244
|
addressLine2: "address_line2",
|
|
245
|
+
taxIdentificationNumber: "tax_identification_number",
|
|
244
246
|
businessName: "business_name",
|
|
245
247
|
isPhoneVerified: "is_phone_verified",
|
|
246
248
|
isEmailVerified: "is_email_verified",
|