ce-storefront 0.15.31 → 0.16.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.
- package/README.md +0 -1
- package/RUNTIMES.md +6 -6
- package/esm/funcs/authGenerateOtp.js +1 -1
- package/esm/funcs/authGenerateOtp.js.map +1 -1
- package/esm/funcs/authGetUserDetail.js +1 -1
- package/esm/funcs/authGetUserDetail.js.map +1 -1
- package/esm/funcs/authLoginWithEmail.js +1 -1
- package/esm/funcs/authLoginWithEmail.js.map +1 -1
- package/esm/funcs/authLoginWithPhone.js +1 -1
- package/esm/funcs/authLoginWithPhone.js.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
- package/esm/funcs/authLogout.js +1 -1
- package/esm/funcs/authLogout.js.map +1 -1
- package/esm/funcs/authRefreshToken.js +1 -1
- package/esm/funcs/authRefreshToken.js.map +1 -1
- package/esm/funcs/authUpdateUser.js +1 -1
- package/esm/funcs/authUpdateUser.js.map +1 -1
- package/esm/funcs/authVerifyOtp.js +1 -1
- package/esm/funcs/authVerifyOtp.js.map +1 -1
- package/esm/funcs/cartsAddShippingMethod.js +1 -1
- package/esm/funcs/cartsAddShippingMethod.js.map +1 -1
- package/esm/funcs/cartsApplyCoupon.js +1 -1
- package/esm/funcs/cartsApplyCoupon.js.map +1 -1
- package/esm/funcs/cartsCreateCart.js +1 -1
- package/esm/funcs/cartsCreateCart.js.map +1 -1
- package/esm/funcs/cartsCreateCartAddress.js +1 -1
- package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
- package/esm/funcs/cartsDeleteCart.js +1 -1
- package/esm/funcs/cartsDeleteCart.js.map +1 -1
- package/esm/funcs/cartsGetCart.js +1 -1
- package/esm/funcs/cartsGetCart.js.map +1 -1
- package/esm/funcs/cartsGetUserCart.js +1 -1
- package/esm/funcs/cartsGetUserCart.js.map +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.js +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveCoupon.js +1 -1
- package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.js +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveUserCart.js +1 -1
- package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
- package/esm/funcs/cartsUpdateCart.js +1 -1
- package/esm/funcs/cartsUpdateCart.js.map +1 -1
- package/esm/funcs/cartsUpdateFulfillmentPreference.js +1 -1
- package/esm/funcs/cartsUpdateFulfillmentPreference.js.map +1 -1
- package/esm/funcs/catalogGetProductDetail.js +1 -1
- package/esm/funcs/catalogGetProductDetail.js.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.js +1 -1
- package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
- package/esm/funcs/catalogListCategories.js +1 -1
- package/esm/funcs/catalogListCategories.js.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
- package/esm/funcs/catalogListProductReviews.js +1 -1
- package/esm/funcs/catalogListProductReviews.js.map +1 -1
- package/esm/funcs/catalogListProductVariants.js +1 -1
- package/esm/funcs/catalogListProductVariants.js.map +1 -1
- package/esm/funcs/catalogListProducts.js +1 -1
- package/esm/funcs/catalogListProducts.js.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.js +1 -1
- package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
- package/esm/funcs/catalogListSkus.js +1 -1
- package/esm/funcs/catalogListSkus.js.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.js +1 -1
- package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
- package/esm/funcs/catalogSearchProducts.js +1 -1
- package/esm/funcs/catalogSearchProducts.js.map +1 -1
- package/esm/funcs/commonListCountryPincodes.js +1 -1
- package/esm/funcs/commonListCountryPincodes.js.map +1 -1
- package/esm/funcs/customersCreateAddress.js +1 -1
- package/esm/funcs/customersCreateAddress.js.map +1 -1
- package/esm/funcs/customersDeleteAddress.js +1 -1
- package/esm/funcs/customersDeleteAddress.js.map +1 -1
- package/esm/funcs/customersGetAddressDetail.js +1 -1
- package/esm/funcs/customersGetAddressDetail.js.map +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.js +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -1
- package/esm/funcs/customersListAddresses.js +1 -1
- package/esm/funcs/customersListAddresses.js.map +1 -1
- package/esm/funcs/customersListUserReviews.js +1 -1
- package/esm/funcs/customersListUserReviews.js.map +1 -1
- package/esm/funcs/customersUpdateAddressDetail.js +1 -1
- package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
- package/esm/funcs/ordersCancelOrder.js +1 -1
- package/esm/funcs/ordersCancelOrder.js.map +1 -1
- package/esm/funcs/ordersCreateOrder.js +1 -1
- package/esm/funcs/ordersCreateOrder.js.map +1 -1
- package/esm/funcs/ordersGetOrderDetail.js +1 -1
- package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
- package/esm/funcs/ordersListOrderShipments.js +1 -1
- package/esm/funcs/ordersListOrderShipments.js.map +1 -1
- package/esm/funcs/ordersListOrders.js +1 -1
- package/esm/funcs/ordersListOrders.js.map +1 -1
- package/esm/funcs/ordersRetryOrderPayment.js +1 -1
- package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
- package/esm/funcs/shippingCheckServiceability.js +1 -1
- package/esm/funcs/shippingCheckServiceability.js.map +1 -1
- package/esm/funcs/shippingFulfillmentOptions.js +1 -1
- package/esm/funcs/shippingFulfillmentOptions.js.map +1 -1
- package/esm/funcs/shippingShippingMethods.js +1 -1
- package/esm/funcs/shippingShippingMethods.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/models/components/cart.d.ts +6 -0
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +10 -0
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/deliveryfulfillment.d.ts +8 -0
- package/esm/models/components/deliveryfulfillment.d.ts.map +1 -1
- package/esm/models/components/deliveryfulfillment.js +16 -0
- package/esm/models/components/deliveryfulfillment.js.map +1 -1
- package/esm/models/components/fulfillmentpreference.d.ts +16 -19
- package/esm/models/components/fulfillmentpreference.d.ts.map +1 -1
- package/esm/models/components/fulfillmentpreference.js +20 -9
- package/esm/models/components/fulfillmentpreference.js.map +1 -1
- package/esm/models/components/fulfillmenttype.d.ts +37 -0
- package/esm/models/components/fulfillmenttype.d.ts.map +1 -0
- package/esm/models/components/fulfillmenttype.js +28 -0
- package/esm/models/components/fulfillmenttype.js.map +1 -0
- package/esm/models/components/index.d.ts +2 -0
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +2 -0
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/order.d.ts +6 -0
- package/esm/models/components/order.d.ts.map +1 -1
- package/esm/models/components/order.js +10 -0
- package/esm/models/components/order.js.map +1 -1
- package/esm/models/components/orderdetail.d.ts +6 -0
- package/esm/models/components/orderdetail.d.ts.map +1 -1
- package/esm/models/components/orderdetail.js +10 -0
- package/esm/models/components/orderdetail.js.map +1 -1
- package/esm/models/components/partialcollectanddelivery.d.ts +91 -28
- package/esm/models/components/partialcollectanddelivery.d.ts.map +1 -1
- package/esm/models/components/partialcollectanddelivery.js +112 -34
- package/esm/models/components/partialcollectanddelivery.js.map +1 -1
- package/esm/models/components/partialcollectanddeliveryinput.d.ts +173 -0
- package/esm/models/components/partialcollectanddeliveryinput.d.ts.map +1 -0
- package/esm/models/components/partialcollectanddeliveryinput.js +211 -0
- package/esm/models/components/partialcollectanddeliveryinput.js.map +1 -0
- package/esm/models/components/variantoption.d.ts +4 -4
- package/esm/models/components/variantoption.d.ts.map +1 -1
- package/esm/models/components/variantoption.js +4 -4
- package/esm/models/components/variantoption.js.map +1 -1
- package/esm/models/operations/getfulfillmentoptions.d.ts +27 -1
- package/esm/models/operations/getfulfillmentoptions.d.ts.map +1 -1
- package/esm/models/operations/getfulfillmentoptions.js +21 -2
- package/esm/models/operations/getfulfillmentoptions.js.map +1 -1
- package/esm/models/operations/updatefulfillmentpreference.d.ts +4 -4
- package/esm/models/operations/updatefulfillmentpreference.d.ts.map +1 -1
- package/esm/models/operations/updatefulfillmentpreference.js +4 -4
- package/esm/models/operations/updatefulfillmentpreference.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authGenerateOtp.ts +1 -1
- package/src/funcs/authGetUserDetail.ts +1 -1
- package/src/funcs/authLoginWithEmail.ts +1 -1
- package/src/funcs/authLoginWithPhone.ts +1 -1
- package/src/funcs/authLoginWithWhatsapp.ts +1 -1
- package/src/funcs/authLogout.ts +1 -1
- package/src/funcs/authRefreshToken.ts +1 -1
- package/src/funcs/authUpdateUser.ts +1 -1
- package/src/funcs/authVerifyOtp.ts +1 -1
- package/src/funcs/cartsAddShippingMethod.ts +1 -1
- package/src/funcs/cartsApplyCoupon.ts +1 -1
- package/src/funcs/cartsCreateCart.ts +1 -1
- package/src/funcs/cartsCreateCartAddress.ts +1 -1
- package/src/funcs/cartsDeleteCart.ts +1 -1
- package/src/funcs/cartsGetCart.ts +1 -1
- package/src/funcs/cartsGetUserCart.ts +1 -1
- package/src/funcs/cartsRedeemLoyaltyPoints.ts +1 -1
- package/src/funcs/cartsRemoveCoupon.ts +1 -1
- package/src/funcs/cartsRemoveLoyaltyPoints.ts +1 -1
- package/src/funcs/cartsRemoveUserCart.ts +1 -1
- package/src/funcs/cartsUpdateCart.ts +1 -1
- package/src/funcs/cartsUpdateFulfillmentPreference.ts +1 -1
- package/src/funcs/catalogGetProductDetail.ts +1 -1
- package/src/funcs/catalogGetVariantDetail.ts +1 -1
- package/src/funcs/catalogListCategories.ts +1 -1
- package/src/funcs/catalogListCrosssellProducts.ts +1 -1
- package/src/funcs/catalogListProductReviews.ts +1 -1
- package/src/funcs/catalogListProductVariants.ts +1 -1
- package/src/funcs/catalogListProducts.ts +1 -1
- package/src/funcs/catalogListSimilarProducts.ts +1 -1
- package/src/funcs/catalogListSkus.ts +1 -1
- package/src/funcs/catalogListUpsellProducts.ts +1 -1
- package/src/funcs/catalogSearchProducts.ts +1 -1
- package/src/funcs/commonListCountryPincodes.ts +1 -1
- package/src/funcs/customersCreateAddress.ts +1 -1
- package/src/funcs/customersDeleteAddress.ts +1 -1
- package/src/funcs/customersGetAddressDetail.ts +1 -1
- package/src/funcs/customersGetLoyaltyDetails.ts +1 -1
- package/src/funcs/customersListAddresses.ts +1 -1
- package/src/funcs/customersListUserReviews.ts +1 -1
- package/src/funcs/customersUpdateAddressDetail.ts +1 -1
- package/src/funcs/ordersCancelOrder.ts +1 -1
- package/src/funcs/ordersCreateOrder.ts +1 -1
- package/src/funcs/ordersGetOrderDetail.ts +1 -1
- package/src/funcs/ordersGetPaymentStatus.ts +1 -1
- package/src/funcs/ordersListOrderShipments.ts +1 -1
- package/src/funcs/ordersListOrders.ts +1 -1
- package/src/funcs/ordersRetryOrderPayment.ts +1 -1
- package/src/funcs/shippingCheckServiceability.ts +1 -1
- package/src/funcs/shippingFulfillmentOptions.ts +1 -1
- package/src/funcs/shippingShippingMethods.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/cart.ts +23 -0
- package/src/models/components/deliveryfulfillment.ts +24 -0
- package/src/models/components/fulfillmentpreference.ts +69 -15
- package/src/models/components/fulfillmenttype.ts +40 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/order.ts +23 -0
- package/src/models/components/orderdetail.ts +23 -0
- package/src/models/components/partialcollectanddelivery.ts +210 -63
- package/src/models/components/partialcollectanddeliveryinput.ts +472 -0
- package/src/models/components/variantoption.ts +8 -8
- package/src/models/operations/getfulfillmentoptions.ts +33 -4
- package/src/models/operations/updatefulfillmentpreference.ts +8 -8
- package/docs/sdks/cestorefront/README.md +0 -10
|
@@ -7,29 +7,38 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
CustomerAddressInput,
|
|
12
|
-
CustomerAddressInput$inboundSchema,
|
|
13
|
-
CustomerAddressInput$Outbound,
|
|
14
|
-
CustomerAddressInput$outboundSchema,
|
|
15
|
-
} from "./customeraddressinput.js";
|
|
16
10
|
|
|
17
|
-
export type
|
|
11
|
+
export type Items = {
|
|
18
12
|
productId: string;
|
|
13
|
+
productName: string;
|
|
19
14
|
variantId: string | null;
|
|
15
|
+
variantName: string | null;
|
|
20
16
|
quantity: number;
|
|
21
17
|
};
|
|
22
18
|
|
|
23
|
-
export type
|
|
19
|
+
export type Pickup = {
|
|
20
|
+
items?: Array<Items> | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type PartialCollectAndDeliveryItems = {
|
|
24
24
|
productId: string;
|
|
25
|
+
productName: string;
|
|
25
26
|
variantId: string | null;
|
|
27
|
+
variantName: string | null;
|
|
26
28
|
quantity: number;
|
|
27
29
|
};
|
|
28
30
|
|
|
29
|
-
export type
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
export type Delivery = {
|
|
32
|
+
shippingProviderId: string | null;
|
|
33
|
+
shippingProviderName: string | null;
|
|
34
|
+
courierCompanyId?: string | null | undefined;
|
|
35
|
+
courierCompanyName?: string | null | undefined;
|
|
36
|
+
items: Array<PartialCollectAndDeliveryItems>;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type Preference = {
|
|
40
|
+
pickup: Pickup;
|
|
41
|
+
delivery: Delivery;
|
|
33
42
|
};
|
|
34
43
|
|
|
35
44
|
/**
|
|
@@ -37,43 +46,100 @@ export type Preferences = {
|
|
|
37
46
|
*/
|
|
38
47
|
export type PartialCollectAndDelivery = {
|
|
39
48
|
fulfillmentType?: "partial-collect-and-delivery" | undefined;
|
|
40
|
-
|
|
49
|
+
preference: Preference;
|
|
41
50
|
};
|
|
42
51
|
|
|
43
52
|
/** @internal */
|
|
44
|
-
export const
|
|
53
|
+
export const Items$inboundSchema: z.ZodType<Items, z.ZodTypeDef, unknown> = z
|
|
45
54
|
.object({
|
|
46
55
|
product_id: z.string(),
|
|
56
|
+
product_name: z.string(),
|
|
47
57
|
variant_id: z.nullable(z.string()),
|
|
58
|
+
variant_name: z.nullable(z.string()),
|
|
48
59
|
quantity: z.number().int(),
|
|
49
60
|
}).transform((v) => {
|
|
50
61
|
return remap$(v, {
|
|
51
62
|
"product_id": "productId",
|
|
63
|
+
"product_name": "productName",
|
|
52
64
|
"variant_id": "variantId",
|
|
65
|
+
"variant_name": "variantName",
|
|
53
66
|
});
|
|
54
67
|
});
|
|
55
68
|
|
|
56
69
|
/** @internal */
|
|
57
|
-
export type
|
|
70
|
+
export type Items$Outbound = {
|
|
58
71
|
product_id: string;
|
|
72
|
+
product_name: string;
|
|
59
73
|
variant_id: string | null;
|
|
74
|
+
variant_name: string | null;
|
|
60
75
|
quantity: number;
|
|
61
76
|
};
|
|
62
77
|
|
|
63
78
|
/** @internal */
|
|
64
|
-
export const
|
|
65
|
-
|
|
79
|
+
export const Items$outboundSchema: z.ZodType<
|
|
80
|
+
Items$Outbound,
|
|
66
81
|
z.ZodTypeDef,
|
|
67
|
-
|
|
82
|
+
Items
|
|
68
83
|
> = z.object({
|
|
69
84
|
productId: z.string(),
|
|
85
|
+
productName: z.string(),
|
|
70
86
|
variantId: z.nullable(z.string()),
|
|
87
|
+
variantName: z.nullable(z.string()),
|
|
71
88
|
quantity: z.number().int(),
|
|
72
89
|
}).transform((v) => {
|
|
73
90
|
return remap$(v, {
|
|
74
91
|
productId: "product_id",
|
|
92
|
+
productName: "product_name",
|
|
75
93
|
variantId: "variant_id",
|
|
94
|
+
variantName: "variant_name",
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* @internal
|
|
100
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
101
|
+
*/
|
|
102
|
+
export namespace Items$ {
|
|
103
|
+
/** @deprecated use `Items$inboundSchema` instead. */
|
|
104
|
+
export const inboundSchema = Items$inboundSchema;
|
|
105
|
+
/** @deprecated use `Items$outboundSchema` instead. */
|
|
106
|
+
export const outboundSchema = Items$outboundSchema;
|
|
107
|
+
/** @deprecated use `Items$Outbound` instead. */
|
|
108
|
+
export type Outbound = Items$Outbound;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function itemsToJSON(items: Items): string {
|
|
112
|
+
return JSON.stringify(Items$outboundSchema.parse(items));
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function itemsFromJSON(
|
|
116
|
+
jsonString: string,
|
|
117
|
+
): SafeParseResult<Items, SDKValidationError> {
|
|
118
|
+
return safeParse(
|
|
119
|
+
jsonString,
|
|
120
|
+
(x) => Items$inboundSchema.parse(JSON.parse(x)),
|
|
121
|
+
`Failed to parse 'Items' from JSON`,
|
|
122
|
+
);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const Pickup$inboundSchema: z.ZodType<Pickup, z.ZodTypeDef, unknown> = z
|
|
127
|
+
.object({
|
|
128
|
+
items: z.array(z.lazy(() => Items$inboundSchema)).optional(),
|
|
76
129
|
});
|
|
130
|
+
|
|
131
|
+
/** @internal */
|
|
132
|
+
export type Pickup$Outbound = {
|
|
133
|
+
items?: Array<Items$Outbound> | undefined;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/** @internal */
|
|
137
|
+
export const Pickup$outboundSchema: z.ZodType<
|
|
138
|
+
Pickup$Outbound,
|
|
139
|
+
z.ZodTypeDef,
|
|
140
|
+
Pickup
|
|
141
|
+
> = z.object({
|
|
142
|
+
items: z.array(z.lazy(() => Items$outboundSchema)).optional(),
|
|
77
143
|
});
|
|
78
144
|
|
|
79
145
|
/**
|
|
@@ -104,41 +170,133 @@ export function pickupFromJSON(
|
|
|
104
170
|
}
|
|
105
171
|
|
|
106
172
|
/** @internal */
|
|
107
|
-
export const
|
|
108
|
-
|
|
173
|
+
export const PartialCollectAndDeliveryItems$inboundSchema: z.ZodType<
|
|
174
|
+
PartialCollectAndDeliveryItems,
|
|
109
175
|
z.ZodTypeDef,
|
|
110
176
|
unknown
|
|
111
177
|
> = z.object({
|
|
112
178
|
product_id: z.string(),
|
|
179
|
+
product_name: z.string(),
|
|
113
180
|
variant_id: z.nullable(z.string()),
|
|
181
|
+
variant_name: z.nullable(z.string()),
|
|
114
182
|
quantity: z.number().int(),
|
|
115
183
|
}).transform((v) => {
|
|
116
184
|
return remap$(v, {
|
|
117
185
|
"product_id": "productId",
|
|
186
|
+
"product_name": "productName",
|
|
118
187
|
"variant_id": "variantId",
|
|
188
|
+
"variant_name": "variantName",
|
|
119
189
|
});
|
|
120
190
|
});
|
|
121
191
|
|
|
122
192
|
/** @internal */
|
|
123
|
-
export type
|
|
193
|
+
export type PartialCollectAndDeliveryItems$Outbound = {
|
|
124
194
|
product_id: string;
|
|
195
|
+
product_name: string;
|
|
125
196
|
variant_id: string | null;
|
|
197
|
+
variant_name: string | null;
|
|
126
198
|
quantity: number;
|
|
127
199
|
};
|
|
128
200
|
|
|
129
201
|
/** @internal */
|
|
130
|
-
export const
|
|
131
|
-
|
|
202
|
+
export const PartialCollectAndDeliveryItems$outboundSchema: z.ZodType<
|
|
203
|
+
PartialCollectAndDeliveryItems$Outbound,
|
|
132
204
|
z.ZodTypeDef,
|
|
133
|
-
|
|
205
|
+
PartialCollectAndDeliveryItems
|
|
134
206
|
> = z.object({
|
|
135
207
|
productId: z.string(),
|
|
208
|
+
productName: z.string(),
|
|
136
209
|
variantId: z.nullable(z.string()),
|
|
210
|
+
variantName: z.nullable(z.string()),
|
|
137
211
|
quantity: z.number().int(),
|
|
138
212
|
}).transform((v) => {
|
|
139
213
|
return remap$(v, {
|
|
140
214
|
productId: "product_id",
|
|
215
|
+
productName: "product_name",
|
|
141
216
|
variantId: "variant_id",
|
|
217
|
+
variantName: "variant_name",
|
|
218
|
+
});
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @internal
|
|
223
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
224
|
+
*/
|
|
225
|
+
export namespace PartialCollectAndDeliveryItems$ {
|
|
226
|
+
/** @deprecated use `PartialCollectAndDeliveryItems$inboundSchema` instead. */
|
|
227
|
+
export const inboundSchema = PartialCollectAndDeliveryItems$inboundSchema;
|
|
228
|
+
/** @deprecated use `PartialCollectAndDeliveryItems$outboundSchema` instead. */
|
|
229
|
+
export const outboundSchema = PartialCollectAndDeliveryItems$outboundSchema;
|
|
230
|
+
/** @deprecated use `PartialCollectAndDeliveryItems$Outbound` instead. */
|
|
231
|
+
export type Outbound = PartialCollectAndDeliveryItems$Outbound;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export function partialCollectAndDeliveryItemsToJSON(
|
|
235
|
+
partialCollectAndDeliveryItems: PartialCollectAndDeliveryItems,
|
|
236
|
+
): string {
|
|
237
|
+
return JSON.stringify(
|
|
238
|
+
PartialCollectAndDeliveryItems$outboundSchema.parse(
|
|
239
|
+
partialCollectAndDeliveryItems,
|
|
240
|
+
),
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export function partialCollectAndDeliveryItemsFromJSON(
|
|
245
|
+
jsonString: string,
|
|
246
|
+
): SafeParseResult<PartialCollectAndDeliveryItems, SDKValidationError> {
|
|
247
|
+
return safeParse(
|
|
248
|
+
jsonString,
|
|
249
|
+
(x) => PartialCollectAndDeliveryItems$inboundSchema.parse(JSON.parse(x)),
|
|
250
|
+
`Failed to parse 'PartialCollectAndDeliveryItems' from JSON`,
|
|
251
|
+
);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/** @internal */
|
|
255
|
+
export const Delivery$inboundSchema: z.ZodType<
|
|
256
|
+
Delivery,
|
|
257
|
+
z.ZodTypeDef,
|
|
258
|
+
unknown
|
|
259
|
+
> = z.object({
|
|
260
|
+
shipping_provider_id: z.nullable(z.string()),
|
|
261
|
+
shipping_provider_name: z.nullable(z.string()),
|
|
262
|
+
courier_company_id: z.nullable(z.string()).optional(),
|
|
263
|
+
courier_company_name: z.nullable(z.string()).optional(),
|
|
264
|
+
items: z.array(z.lazy(() => PartialCollectAndDeliveryItems$inboundSchema)),
|
|
265
|
+
}).transform((v) => {
|
|
266
|
+
return remap$(v, {
|
|
267
|
+
"shipping_provider_id": "shippingProviderId",
|
|
268
|
+
"shipping_provider_name": "shippingProviderName",
|
|
269
|
+
"courier_company_id": "courierCompanyId",
|
|
270
|
+
"courier_company_name": "courierCompanyName",
|
|
271
|
+
});
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
/** @internal */
|
|
275
|
+
export type Delivery$Outbound = {
|
|
276
|
+
shipping_provider_id: string | null;
|
|
277
|
+
shipping_provider_name: string | null;
|
|
278
|
+
courier_company_id?: string | null | undefined;
|
|
279
|
+
courier_company_name?: string | null | undefined;
|
|
280
|
+
items: Array<PartialCollectAndDeliveryItems$Outbound>;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
/** @internal */
|
|
284
|
+
export const Delivery$outboundSchema: z.ZodType<
|
|
285
|
+
Delivery$Outbound,
|
|
286
|
+
z.ZodTypeDef,
|
|
287
|
+
Delivery
|
|
288
|
+
> = z.object({
|
|
289
|
+
shippingProviderId: z.nullable(z.string()),
|
|
290
|
+
shippingProviderName: z.nullable(z.string()),
|
|
291
|
+
courierCompanyId: z.nullable(z.string()).optional(),
|
|
292
|
+
courierCompanyName: z.nullable(z.string()).optional(),
|
|
293
|
+
items: z.array(z.lazy(() => PartialCollectAndDeliveryItems$outboundSchema)),
|
|
294
|
+
}).transform((v) => {
|
|
295
|
+
return remap$(v, {
|
|
296
|
+
shippingProviderId: "shipping_provider_id",
|
|
297
|
+
shippingProviderName: "shipping_provider_name",
|
|
298
|
+
courierCompanyId: "courier_company_id",
|
|
299
|
+
courierCompanyName: "courier_company_name",
|
|
142
300
|
});
|
|
143
301
|
});
|
|
144
302
|
|
|
@@ -170,66 +328,55 @@ export function deliveryFromJSON(
|
|
|
170
328
|
}
|
|
171
329
|
|
|
172
330
|
/** @internal */
|
|
173
|
-
export const
|
|
174
|
-
|
|
331
|
+
export const Preference$inboundSchema: z.ZodType<
|
|
332
|
+
Preference,
|
|
175
333
|
z.ZodTypeDef,
|
|
176
334
|
unknown
|
|
177
335
|
> = z.object({
|
|
178
|
-
pickup: z.
|
|
179
|
-
delivery: z.
|
|
180
|
-
shipping_address: z.nullable(CustomerAddressInput$inboundSchema),
|
|
181
|
-
}).transform((v) => {
|
|
182
|
-
return remap$(v, {
|
|
183
|
-
"shipping_address": "shippingAddress",
|
|
184
|
-
});
|
|
336
|
+
pickup: z.lazy(() => Pickup$inboundSchema),
|
|
337
|
+
delivery: z.lazy(() => Delivery$inboundSchema),
|
|
185
338
|
});
|
|
186
339
|
|
|
187
340
|
/** @internal */
|
|
188
|
-
export type
|
|
189
|
-
pickup:
|
|
190
|
-
delivery:
|
|
191
|
-
shipping_address: CustomerAddressInput$Outbound | null;
|
|
341
|
+
export type Preference$Outbound = {
|
|
342
|
+
pickup: Pickup$Outbound;
|
|
343
|
+
delivery: Delivery$Outbound;
|
|
192
344
|
};
|
|
193
345
|
|
|
194
346
|
/** @internal */
|
|
195
|
-
export const
|
|
196
|
-
|
|
347
|
+
export const Preference$outboundSchema: z.ZodType<
|
|
348
|
+
Preference$Outbound,
|
|
197
349
|
z.ZodTypeDef,
|
|
198
|
-
|
|
350
|
+
Preference
|
|
199
351
|
> = z.object({
|
|
200
|
-
pickup: z.
|
|
201
|
-
delivery: z.
|
|
202
|
-
shippingAddress: z.nullable(CustomerAddressInput$outboundSchema),
|
|
203
|
-
}).transform((v) => {
|
|
204
|
-
return remap$(v, {
|
|
205
|
-
shippingAddress: "shipping_address",
|
|
206
|
-
});
|
|
352
|
+
pickup: z.lazy(() => Pickup$outboundSchema),
|
|
353
|
+
delivery: z.lazy(() => Delivery$outboundSchema),
|
|
207
354
|
});
|
|
208
355
|
|
|
209
356
|
/**
|
|
210
357
|
* @internal
|
|
211
358
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
212
359
|
*/
|
|
213
|
-
export namespace
|
|
214
|
-
/** @deprecated use `
|
|
215
|
-
export const inboundSchema =
|
|
216
|
-
/** @deprecated use `
|
|
217
|
-
export const outboundSchema =
|
|
218
|
-
/** @deprecated use `
|
|
219
|
-
export type Outbound =
|
|
360
|
+
export namespace Preference$ {
|
|
361
|
+
/** @deprecated use `Preference$inboundSchema` instead. */
|
|
362
|
+
export const inboundSchema = Preference$inboundSchema;
|
|
363
|
+
/** @deprecated use `Preference$outboundSchema` instead. */
|
|
364
|
+
export const outboundSchema = Preference$outboundSchema;
|
|
365
|
+
/** @deprecated use `Preference$Outbound` instead. */
|
|
366
|
+
export type Outbound = Preference$Outbound;
|
|
220
367
|
}
|
|
221
368
|
|
|
222
|
-
export function
|
|
223
|
-
return JSON.stringify(
|
|
369
|
+
export function preferenceToJSON(preference: Preference): string {
|
|
370
|
+
return JSON.stringify(Preference$outboundSchema.parse(preference));
|
|
224
371
|
}
|
|
225
372
|
|
|
226
|
-
export function
|
|
373
|
+
export function preferenceFromJSON(
|
|
227
374
|
jsonString: string,
|
|
228
|
-
): SafeParseResult<
|
|
375
|
+
): SafeParseResult<Preference, SDKValidationError> {
|
|
229
376
|
return safeParse(
|
|
230
377
|
jsonString,
|
|
231
|
-
(x) =>
|
|
232
|
-
`Failed to parse '
|
|
378
|
+
(x) => Preference$inboundSchema.parse(JSON.parse(x)),
|
|
379
|
+
`Failed to parse 'Preference' from JSON`,
|
|
233
380
|
);
|
|
234
381
|
}
|
|
235
382
|
|
|
@@ -242,7 +389,7 @@ export const PartialCollectAndDelivery$inboundSchema: z.ZodType<
|
|
|
242
389
|
fulfillment_type: z.literal("partial-collect-and-delivery").default(
|
|
243
390
|
"partial-collect-and-delivery",
|
|
244
391
|
).optional(),
|
|
245
|
-
|
|
392
|
+
preference: z.lazy(() => Preference$inboundSchema),
|
|
246
393
|
}).transform((v) => {
|
|
247
394
|
return remap$(v, {
|
|
248
395
|
"fulfillment_type": "fulfillmentType",
|
|
@@ -252,7 +399,7 @@ export const PartialCollectAndDelivery$inboundSchema: z.ZodType<
|
|
|
252
399
|
/** @internal */
|
|
253
400
|
export type PartialCollectAndDelivery$Outbound = {
|
|
254
401
|
fulfillment_type: "partial-collect-and-delivery";
|
|
255
|
-
|
|
402
|
+
preference: Preference$Outbound;
|
|
256
403
|
};
|
|
257
404
|
|
|
258
405
|
/** @internal */
|
|
@@ -264,7 +411,7 @@ export const PartialCollectAndDelivery$outboundSchema: z.ZodType<
|
|
|
264
411
|
fulfillmentType: z.literal("partial-collect-and-delivery").default(
|
|
265
412
|
"partial-collect-and-delivery" as const,
|
|
266
413
|
),
|
|
267
|
-
|
|
414
|
+
preference: z.lazy(() => Preference$outboundSchema),
|
|
268
415
|
}).transform((v) => {
|
|
269
416
|
return remap$(v, {
|
|
270
417
|
fulfillmentType: "fulfillment_type",
|