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
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type PartialCollectAndDeliveryItemsInput = {
|
|
12
|
+
productId: string;
|
|
13
|
+
variantId: string | null;
|
|
14
|
+
quantity: number;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type PartialCollectAndDeliveryPickup = {
|
|
18
|
+
items?: Array<PartialCollectAndDeliveryItemsInput> | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type PartialCollectAndDeliveryPreferenceItemsInput = {
|
|
22
|
+
productId: string;
|
|
23
|
+
variantId: string | null;
|
|
24
|
+
quantity: number;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type PartialCollectAndDeliveryDelivery = {
|
|
28
|
+
shippingProviderId: string | null;
|
|
29
|
+
courierCompanyId?: string | null | undefined;
|
|
30
|
+
items: Array<PartialCollectAndDeliveryPreferenceItemsInput>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type PartialCollectAndDeliveryPreference = {
|
|
34
|
+
pickup: PartialCollectAndDeliveryPickup;
|
|
35
|
+
delivery: PartialCollectAndDeliveryDelivery;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @see {@link https://llm-docs.commercengine.io/schemas/PartialCollectAndDelivery} - API reference for the PartialCollectAndDelivery schema
|
|
40
|
+
*/
|
|
41
|
+
export type PartialCollectAndDeliveryInput = {
|
|
42
|
+
fulfillmentType?: "partial-collect-and-delivery" | undefined;
|
|
43
|
+
preference: PartialCollectAndDeliveryPreference;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const PartialCollectAndDeliveryItemsInput$inboundSchema: z.ZodType<
|
|
48
|
+
PartialCollectAndDeliveryItemsInput,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
unknown
|
|
51
|
+
> = z.object({
|
|
52
|
+
product_id: z.string(),
|
|
53
|
+
variant_id: z.nullable(z.string()),
|
|
54
|
+
quantity: z.number().int(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
"product_id": "productId",
|
|
58
|
+
"variant_id": "variantId",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** @internal */
|
|
63
|
+
export type PartialCollectAndDeliveryItemsInput$Outbound = {
|
|
64
|
+
product_id: string;
|
|
65
|
+
variant_id: string | null;
|
|
66
|
+
quantity: number;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const PartialCollectAndDeliveryItemsInput$outboundSchema: z.ZodType<
|
|
71
|
+
PartialCollectAndDeliveryItemsInput$Outbound,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
PartialCollectAndDeliveryItemsInput
|
|
74
|
+
> = z.object({
|
|
75
|
+
productId: z.string(),
|
|
76
|
+
variantId: z.nullable(z.string()),
|
|
77
|
+
quantity: z.number().int(),
|
|
78
|
+
}).transform((v) => {
|
|
79
|
+
return remap$(v, {
|
|
80
|
+
productId: "product_id",
|
|
81
|
+
variantId: "variant_id",
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
88
|
+
*/
|
|
89
|
+
export namespace PartialCollectAndDeliveryItemsInput$ {
|
|
90
|
+
/** @deprecated use `PartialCollectAndDeliveryItemsInput$inboundSchema` instead. */
|
|
91
|
+
export const inboundSchema =
|
|
92
|
+
PartialCollectAndDeliveryItemsInput$inboundSchema;
|
|
93
|
+
/** @deprecated use `PartialCollectAndDeliveryItemsInput$outboundSchema` instead. */
|
|
94
|
+
export const outboundSchema =
|
|
95
|
+
PartialCollectAndDeliveryItemsInput$outboundSchema;
|
|
96
|
+
/** @deprecated use `PartialCollectAndDeliveryItemsInput$Outbound` instead. */
|
|
97
|
+
export type Outbound = PartialCollectAndDeliveryItemsInput$Outbound;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function partialCollectAndDeliveryItemsInputToJSON(
|
|
101
|
+
partialCollectAndDeliveryItemsInput: PartialCollectAndDeliveryItemsInput,
|
|
102
|
+
): string {
|
|
103
|
+
return JSON.stringify(
|
|
104
|
+
PartialCollectAndDeliveryItemsInput$outboundSchema.parse(
|
|
105
|
+
partialCollectAndDeliveryItemsInput,
|
|
106
|
+
),
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function partialCollectAndDeliveryItemsInputFromJSON(
|
|
111
|
+
jsonString: string,
|
|
112
|
+
): SafeParseResult<PartialCollectAndDeliveryItemsInput, SDKValidationError> {
|
|
113
|
+
return safeParse(
|
|
114
|
+
jsonString,
|
|
115
|
+
(x) =>
|
|
116
|
+
PartialCollectAndDeliveryItemsInput$inboundSchema.parse(JSON.parse(x)),
|
|
117
|
+
`Failed to parse 'PartialCollectAndDeliveryItemsInput' from JSON`,
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** @internal */
|
|
122
|
+
export const PartialCollectAndDeliveryPickup$inboundSchema: z.ZodType<
|
|
123
|
+
PartialCollectAndDeliveryPickup,
|
|
124
|
+
z.ZodTypeDef,
|
|
125
|
+
unknown
|
|
126
|
+
> = z.object({
|
|
127
|
+
items: z.array(
|
|
128
|
+
z.lazy(() => PartialCollectAndDeliveryItemsInput$inboundSchema),
|
|
129
|
+
).optional(),
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
/** @internal */
|
|
133
|
+
export type PartialCollectAndDeliveryPickup$Outbound = {
|
|
134
|
+
items?: Array<PartialCollectAndDeliveryItemsInput$Outbound> | undefined;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/** @internal */
|
|
138
|
+
export const PartialCollectAndDeliveryPickup$outboundSchema: z.ZodType<
|
|
139
|
+
PartialCollectAndDeliveryPickup$Outbound,
|
|
140
|
+
z.ZodTypeDef,
|
|
141
|
+
PartialCollectAndDeliveryPickup
|
|
142
|
+
> = z.object({
|
|
143
|
+
items: z.array(
|
|
144
|
+
z.lazy(() => PartialCollectAndDeliveryItemsInput$outboundSchema),
|
|
145
|
+
).optional(),
|
|
146
|
+
});
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* @internal
|
|
150
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
151
|
+
*/
|
|
152
|
+
export namespace PartialCollectAndDeliveryPickup$ {
|
|
153
|
+
/** @deprecated use `PartialCollectAndDeliveryPickup$inboundSchema` instead. */
|
|
154
|
+
export const inboundSchema = PartialCollectAndDeliveryPickup$inboundSchema;
|
|
155
|
+
/** @deprecated use `PartialCollectAndDeliveryPickup$outboundSchema` instead. */
|
|
156
|
+
export const outboundSchema = PartialCollectAndDeliveryPickup$outboundSchema;
|
|
157
|
+
/** @deprecated use `PartialCollectAndDeliveryPickup$Outbound` instead. */
|
|
158
|
+
export type Outbound = PartialCollectAndDeliveryPickup$Outbound;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export function partialCollectAndDeliveryPickupToJSON(
|
|
162
|
+
partialCollectAndDeliveryPickup: PartialCollectAndDeliveryPickup,
|
|
163
|
+
): string {
|
|
164
|
+
return JSON.stringify(
|
|
165
|
+
PartialCollectAndDeliveryPickup$outboundSchema.parse(
|
|
166
|
+
partialCollectAndDeliveryPickup,
|
|
167
|
+
),
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function partialCollectAndDeliveryPickupFromJSON(
|
|
172
|
+
jsonString: string,
|
|
173
|
+
): SafeParseResult<PartialCollectAndDeliveryPickup, SDKValidationError> {
|
|
174
|
+
return safeParse(
|
|
175
|
+
jsonString,
|
|
176
|
+
(x) => PartialCollectAndDeliveryPickup$inboundSchema.parse(JSON.parse(x)),
|
|
177
|
+
`Failed to parse 'PartialCollectAndDeliveryPickup' from JSON`,
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/** @internal */
|
|
182
|
+
export const PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema:
|
|
183
|
+
z.ZodType<
|
|
184
|
+
PartialCollectAndDeliveryPreferenceItemsInput,
|
|
185
|
+
z.ZodTypeDef,
|
|
186
|
+
unknown
|
|
187
|
+
> = z.object({
|
|
188
|
+
product_id: z.string(),
|
|
189
|
+
variant_id: z.nullable(z.string()),
|
|
190
|
+
quantity: z.number().int(),
|
|
191
|
+
}).transform((v) => {
|
|
192
|
+
return remap$(v, {
|
|
193
|
+
"product_id": "productId",
|
|
194
|
+
"variant_id": "variantId",
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
/** @internal */
|
|
199
|
+
export type PartialCollectAndDeliveryPreferenceItemsInput$Outbound = {
|
|
200
|
+
product_id: string;
|
|
201
|
+
variant_id: string | null;
|
|
202
|
+
quantity: number;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/** @internal */
|
|
206
|
+
export const PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema:
|
|
207
|
+
z.ZodType<
|
|
208
|
+
PartialCollectAndDeliveryPreferenceItemsInput$Outbound,
|
|
209
|
+
z.ZodTypeDef,
|
|
210
|
+
PartialCollectAndDeliveryPreferenceItemsInput
|
|
211
|
+
> = z.object({
|
|
212
|
+
productId: z.string(),
|
|
213
|
+
variantId: z.nullable(z.string()),
|
|
214
|
+
quantity: z.number().int(),
|
|
215
|
+
}).transform((v) => {
|
|
216
|
+
return remap$(v, {
|
|
217
|
+
productId: "product_id",
|
|
218
|
+
variantId: "variant_id",
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* @internal
|
|
224
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
225
|
+
*/
|
|
226
|
+
export namespace PartialCollectAndDeliveryPreferenceItemsInput$ {
|
|
227
|
+
/** @deprecated use `PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema` instead. */
|
|
228
|
+
export const inboundSchema =
|
|
229
|
+
PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema;
|
|
230
|
+
/** @deprecated use `PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema` instead. */
|
|
231
|
+
export const outboundSchema =
|
|
232
|
+
PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema;
|
|
233
|
+
/** @deprecated use `PartialCollectAndDeliveryPreferenceItemsInput$Outbound` instead. */
|
|
234
|
+
export type Outbound = PartialCollectAndDeliveryPreferenceItemsInput$Outbound;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export function partialCollectAndDeliveryPreferenceItemsInputToJSON(
|
|
238
|
+
partialCollectAndDeliveryPreferenceItemsInput:
|
|
239
|
+
PartialCollectAndDeliveryPreferenceItemsInput,
|
|
240
|
+
): string {
|
|
241
|
+
return JSON.stringify(
|
|
242
|
+
PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema.parse(
|
|
243
|
+
partialCollectAndDeliveryPreferenceItemsInput,
|
|
244
|
+
),
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export function partialCollectAndDeliveryPreferenceItemsInputFromJSON(
|
|
249
|
+
jsonString: string,
|
|
250
|
+
): SafeParseResult<
|
|
251
|
+
PartialCollectAndDeliveryPreferenceItemsInput,
|
|
252
|
+
SDKValidationError
|
|
253
|
+
> {
|
|
254
|
+
return safeParse(
|
|
255
|
+
jsonString,
|
|
256
|
+
(x) =>
|
|
257
|
+
PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema.parse(
|
|
258
|
+
JSON.parse(x),
|
|
259
|
+
),
|
|
260
|
+
`Failed to parse 'PartialCollectAndDeliveryPreferenceItemsInput' from JSON`,
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/** @internal */
|
|
265
|
+
export const PartialCollectAndDeliveryDelivery$inboundSchema: z.ZodType<
|
|
266
|
+
PartialCollectAndDeliveryDelivery,
|
|
267
|
+
z.ZodTypeDef,
|
|
268
|
+
unknown
|
|
269
|
+
> = z.object({
|
|
270
|
+
shipping_provider_id: z.nullable(z.string()),
|
|
271
|
+
courier_company_id: z.nullable(z.string()).optional(),
|
|
272
|
+
items: z.array(
|
|
273
|
+
z.lazy(() => PartialCollectAndDeliveryPreferenceItemsInput$inboundSchema),
|
|
274
|
+
),
|
|
275
|
+
}).transform((v) => {
|
|
276
|
+
return remap$(v, {
|
|
277
|
+
"shipping_provider_id": "shippingProviderId",
|
|
278
|
+
"courier_company_id": "courierCompanyId",
|
|
279
|
+
});
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
/** @internal */
|
|
283
|
+
export type PartialCollectAndDeliveryDelivery$Outbound = {
|
|
284
|
+
shipping_provider_id: string | null;
|
|
285
|
+
courier_company_id?: string | null | undefined;
|
|
286
|
+
items: Array<PartialCollectAndDeliveryPreferenceItemsInput$Outbound>;
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
/** @internal */
|
|
290
|
+
export const PartialCollectAndDeliveryDelivery$outboundSchema: z.ZodType<
|
|
291
|
+
PartialCollectAndDeliveryDelivery$Outbound,
|
|
292
|
+
z.ZodTypeDef,
|
|
293
|
+
PartialCollectAndDeliveryDelivery
|
|
294
|
+
> = z.object({
|
|
295
|
+
shippingProviderId: z.nullable(z.string()),
|
|
296
|
+
courierCompanyId: z.nullable(z.string()).optional(),
|
|
297
|
+
items: z.array(
|
|
298
|
+
z.lazy(() => PartialCollectAndDeliveryPreferenceItemsInput$outboundSchema),
|
|
299
|
+
),
|
|
300
|
+
}).transform((v) => {
|
|
301
|
+
return remap$(v, {
|
|
302
|
+
shippingProviderId: "shipping_provider_id",
|
|
303
|
+
courierCompanyId: "courier_company_id",
|
|
304
|
+
});
|
|
305
|
+
});
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* @internal
|
|
309
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
310
|
+
*/
|
|
311
|
+
export namespace PartialCollectAndDeliveryDelivery$ {
|
|
312
|
+
/** @deprecated use `PartialCollectAndDeliveryDelivery$inboundSchema` instead. */
|
|
313
|
+
export const inboundSchema = PartialCollectAndDeliveryDelivery$inboundSchema;
|
|
314
|
+
/** @deprecated use `PartialCollectAndDeliveryDelivery$outboundSchema` instead. */
|
|
315
|
+
export const outboundSchema =
|
|
316
|
+
PartialCollectAndDeliveryDelivery$outboundSchema;
|
|
317
|
+
/** @deprecated use `PartialCollectAndDeliveryDelivery$Outbound` instead. */
|
|
318
|
+
export type Outbound = PartialCollectAndDeliveryDelivery$Outbound;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export function partialCollectAndDeliveryDeliveryToJSON(
|
|
322
|
+
partialCollectAndDeliveryDelivery: PartialCollectAndDeliveryDelivery,
|
|
323
|
+
): string {
|
|
324
|
+
return JSON.stringify(
|
|
325
|
+
PartialCollectAndDeliveryDelivery$outboundSchema.parse(
|
|
326
|
+
partialCollectAndDeliveryDelivery,
|
|
327
|
+
),
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
export function partialCollectAndDeliveryDeliveryFromJSON(
|
|
332
|
+
jsonString: string,
|
|
333
|
+
): SafeParseResult<PartialCollectAndDeliveryDelivery, SDKValidationError> {
|
|
334
|
+
return safeParse(
|
|
335
|
+
jsonString,
|
|
336
|
+
(x) => PartialCollectAndDeliveryDelivery$inboundSchema.parse(JSON.parse(x)),
|
|
337
|
+
`Failed to parse 'PartialCollectAndDeliveryDelivery' from JSON`,
|
|
338
|
+
);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/** @internal */
|
|
342
|
+
export const PartialCollectAndDeliveryPreference$inboundSchema: z.ZodType<
|
|
343
|
+
PartialCollectAndDeliveryPreference,
|
|
344
|
+
z.ZodTypeDef,
|
|
345
|
+
unknown
|
|
346
|
+
> = z.object({
|
|
347
|
+
pickup: z.lazy(() => PartialCollectAndDeliveryPickup$inboundSchema),
|
|
348
|
+
delivery: z.lazy(() => PartialCollectAndDeliveryDelivery$inboundSchema),
|
|
349
|
+
});
|
|
350
|
+
|
|
351
|
+
/** @internal */
|
|
352
|
+
export type PartialCollectAndDeliveryPreference$Outbound = {
|
|
353
|
+
pickup: PartialCollectAndDeliveryPickup$Outbound;
|
|
354
|
+
delivery: PartialCollectAndDeliveryDelivery$Outbound;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
/** @internal */
|
|
358
|
+
export const PartialCollectAndDeliveryPreference$outboundSchema: z.ZodType<
|
|
359
|
+
PartialCollectAndDeliveryPreference$Outbound,
|
|
360
|
+
z.ZodTypeDef,
|
|
361
|
+
PartialCollectAndDeliveryPreference
|
|
362
|
+
> = z.object({
|
|
363
|
+
pickup: z.lazy(() => PartialCollectAndDeliveryPickup$outboundSchema),
|
|
364
|
+
delivery: z.lazy(() => PartialCollectAndDeliveryDelivery$outboundSchema),
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
/**
|
|
368
|
+
* @internal
|
|
369
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
370
|
+
*/
|
|
371
|
+
export namespace PartialCollectAndDeliveryPreference$ {
|
|
372
|
+
/** @deprecated use `PartialCollectAndDeliveryPreference$inboundSchema` instead. */
|
|
373
|
+
export const inboundSchema =
|
|
374
|
+
PartialCollectAndDeliveryPreference$inboundSchema;
|
|
375
|
+
/** @deprecated use `PartialCollectAndDeliveryPreference$outboundSchema` instead. */
|
|
376
|
+
export const outboundSchema =
|
|
377
|
+
PartialCollectAndDeliveryPreference$outboundSchema;
|
|
378
|
+
/** @deprecated use `PartialCollectAndDeliveryPreference$Outbound` instead. */
|
|
379
|
+
export type Outbound = PartialCollectAndDeliveryPreference$Outbound;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export function partialCollectAndDeliveryPreferenceToJSON(
|
|
383
|
+
partialCollectAndDeliveryPreference: PartialCollectAndDeliveryPreference,
|
|
384
|
+
): string {
|
|
385
|
+
return JSON.stringify(
|
|
386
|
+
PartialCollectAndDeliveryPreference$outboundSchema.parse(
|
|
387
|
+
partialCollectAndDeliveryPreference,
|
|
388
|
+
),
|
|
389
|
+
);
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
export function partialCollectAndDeliveryPreferenceFromJSON(
|
|
393
|
+
jsonString: string,
|
|
394
|
+
): SafeParseResult<PartialCollectAndDeliveryPreference, SDKValidationError> {
|
|
395
|
+
return safeParse(
|
|
396
|
+
jsonString,
|
|
397
|
+
(x) =>
|
|
398
|
+
PartialCollectAndDeliveryPreference$inboundSchema.parse(JSON.parse(x)),
|
|
399
|
+
`Failed to parse 'PartialCollectAndDeliveryPreference' from JSON`,
|
|
400
|
+
);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/** @internal */
|
|
404
|
+
export const PartialCollectAndDeliveryInput$inboundSchema: z.ZodType<
|
|
405
|
+
PartialCollectAndDeliveryInput,
|
|
406
|
+
z.ZodTypeDef,
|
|
407
|
+
unknown
|
|
408
|
+
> = z.object({
|
|
409
|
+
fulfillment_type: z.literal("partial-collect-and-delivery").default(
|
|
410
|
+
"partial-collect-and-delivery",
|
|
411
|
+
).optional(),
|
|
412
|
+
preference: z.lazy(() => PartialCollectAndDeliveryPreference$inboundSchema),
|
|
413
|
+
}).transform((v) => {
|
|
414
|
+
return remap$(v, {
|
|
415
|
+
"fulfillment_type": "fulfillmentType",
|
|
416
|
+
});
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
/** @internal */
|
|
420
|
+
export type PartialCollectAndDeliveryInput$Outbound = {
|
|
421
|
+
fulfillment_type: "partial-collect-and-delivery";
|
|
422
|
+
preference: PartialCollectAndDeliveryPreference$Outbound;
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
/** @internal */
|
|
426
|
+
export const PartialCollectAndDeliveryInput$outboundSchema: z.ZodType<
|
|
427
|
+
PartialCollectAndDeliveryInput$Outbound,
|
|
428
|
+
z.ZodTypeDef,
|
|
429
|
+
PartialCollectAndDeliveryInput
|
|
430
|
+
> = z.object({
|
|
431
|
+
fulfillmentType: z.literal("partial-collect-and-delivery").default(
|
|
432
|
+
"partial-collect-and-delivery" as const,
|
|
433
|
+
),
|
|
434
|
+
preference: z.lazy(() => PartialCollectAndDeliveryPreference$outboundSchema),
|
|
435
|
+
}).transform((v) => {
|
|
436
|
+
return remap$(v, {
|
|
437
|
+
fulfillmentType: "fulfillment_type",
|
|
438
|
+
});
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* @internal
|
|
443
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
444
|
+
*/
|
|
445
|
+
export namespace PartialCollectAndDeliveryInput$ {
|
|
446
|
+
/** @deprecated use `PartialCollectAndDeliveryInput$inboundSchema` instead. */
|
|
447
|
+
export const inboundSchema = PartialCollectAndDeliveryInput$inboundSchema;
|
|
448
|
+
/** @deprecated use `PartialCollectAndDeliveryInput$outboundSchema` instead. */
|
|
449
|
+
export const outboundSchema = PartialCollectAndDeliveryInput$outboundSchema;
|
|
450
|
+
/** @deprecated use `PartialCollectAndDeliveryInput$Outbound` instead. */
|
|
451
|
+
export type Outbound = PartialCollectAndDeliveryInput$Outbound;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
export function partialCollectAndDeliveryInputToJSON(
|
|
455
|
+
partialCollectAndDeliveryInput: PartialCollectAndDeliveryInput,
|
|
456
|
+
): string {
|
|
457
|
+
return JSON.stringify(
|
|
458
|
+
PartialCollectAndDeliveryInput$outboundSchema.parse(
|
|
459
|
+
partialCollectAndDeliveryInput,
|
|
460
|
+
),
|
|
461
|
+
);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export function partialCollectAndDeliveryInputFromJSON(
|
|
465
|
+
jsonString: string,
|
|
466
|
+
): SafeParseResult<PartialCollectAndDeliveryInput, SDKValidationError> {
|
|
467
|
+
return safeParse(
|
|
468
|
+
jsonString,
|
|
469
|
+
(x) => PartialCollectAndDeliveryInput$inboundSchema.parse(JSON.parse(x)),
|
|
470
|
+
`Failed to parse 'PartialCollectAndDeliveryInput' from JSON`,
|
|
471
|
+
);
|
|
472
|
+
}
|
|
@@ -16,7 +16,7 @@ export type Type = ClosedEnum<typeof Type>;
|
|
|
16
16
|
|
|
17
17
|
export type Two = {};
|
|
18
18
|
|
|
19
|
-
export type VariantOptionValue =
|
|
19
|
+
export type VariantOptionValue = string | Two;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* @see {@link https://llm-docs.commercengine.io/schemas/VariantOption} - API reference for the VariantOption schema
|
|
@@ -48,7 +48,7 @@ export type VariantOption = {
|
|
|
48
48
|
* ]
|
|
49
49
|
* ```
|
|
50
50
|
*/
|
|
51
|
-
value: Array<
|
|
51
|
+
value: Array<string | Two>;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
/** @internal */
|
|
@@ -114,17 +114,17 @@ export const VariantOptionValue$inboundSchema: z.ZodType<
|
|
|
114
114
|
VariantOptionValue,
|
|
115
115
|
z.ZodTypeDef,
|
|
116
116
|
unknown
|
|
117
|
-
> = z.union([z.lazy(() => Two$inboundSchema)
|
|
117
|
+
> = z.union([z.string(), z.lazy(() => Two$inboundSchema)]);
|
|
118
118
|
|
|
119
119
|
/** @internal */
|
|
120
|
-
export type VariantOptionValue$Outbound = Two$Outbound
|
|
120
|
+
export type VariantOptionValue$Outbound = string | Two$Outbound;
|
|
121
121
|
|
|
122
122
|
/** @internal */
|
|
123
123
|
export const VariantOptionValue$outboundSchema: z.ZodType<
|
|
124
124
|
VariantOptionValue$Outbound,
|
|
125
125
|
z.ZodTypeDef,
|
|
126
126
|
VariantOptionValue
|
|
127
|
-
> = z.union([z.lazy(() => Two$outboundSchema)
|
|
127
|
+
> = z.union([z.string(), z.lazy(() => Two$outboundSchema)]);
|
|
128
128
|
|
|
129
129
|
/**
|
|
130
130
|
* @internal
|
|
@@ -166,7 +166,7 @@ export const VariantOption$inboundSchema: z.ZodType<
|
|
|
166
166
|
name: z.string(),
|
|
167
167
|
key: z.string(),
|
|
168
168
|
type: Type$inboundSchema,
|
|
169
|
-
value: z.array(z.union([z.lazy(() => Two$inboundSchema)
|
|
169
|
+
value: z.array(z.union([z.string(), z.lazy(() => Two$inboundSchema)])),
|
|
170
170
|
});
|
|
171
171
|
|
|
172
172
|
/** @internal */
|
|
@@ -174,7 +174,7 @@ export type VariantOption$Outbound = {
|
|
|
174
174
|
name: string;
|
|
175
175
|
key: string;
|
|
176
176
|
type: string;
|
|
177
|
-
value: Array<Two$Outbound
|
|
177
|
+
value: Array<string | Two$Outbound>;
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
/** @internal */
|
|
@@ -186,7 +186,7 @@ export const VariantOption$outboundSchema: z.ZodType<
|
|
|
186
186
|
name: z.string(),
|
|
187
187
|
key: z.string(),
|
|
188
188
|
type: Type$outboundSchema,
|
|
189
|
-
value: z.array(z.union([z.lazy(() => Two$outboundSchema)
|
|
189
|
+
value: z.array(z.union([z.string(), z.lazy(() => Two$outboundSchema)])),
|
|
190
190
|
});
|
|
191
191
|
|
|
192
192
|
/**
|
|
@@ -5,14 +5,23 @@
|
|
|
5
5
|
import * as z from "zod";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
10
|
import * as components from "../components/index.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
12
|
|
|
13
|
+
export const RecommendedFulfillmentType = {
|
|
14
|
+
CollectInStore: "collect-in-store",
|
|
15
|
+
Delivery: "delivery",
|
|
16
|
+
} as const;
|
|
17
|
+
export type RecommendedFulfillmentType = ClosedEnum<
|
|
18
|
+
typeof RecommendedFulfillmentType
|
|
19
|
+
>;
|
|
20
|
+
|
|
12
21
|
export type Summary = {
|
|
13
22
|
collectAvailable: boolean;
|
|
14
23
|
deliverAvailable: boolean;
|
|
15
|
-
recommendedFulfillmentType:
|
|
24
|
+
recommendedFulfillmentType: RecommendedFulfillmentType;
|
|
16
25
|
recommendedStore?: components.CollectInStore | undefined;
|
|
17
26
|
};
|
|
18
27
|
|
|
@@ -31,13 +40,33 @@ export type GetFulfillmentOptionsResponseBody = {
|
|
|
31
40
|
content: GetFulfillmentOptionsContent;
|
|
32
41
|
};
|
|
33
42
|
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const RecommendedFulfillmentType$inboundSchema: z.ZodNativeEnum<
|
|
45
|
+
typeof RecommendedFulfillmentType
|
|
46
|
+
> = z.nativeEnum(RecommendedFulfillmentType);
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const RecommendedFulfillmentType$outboundSchema: z.ZodNativeEnum<
|
|
50
|
+
typeof RecommendedFulfillmentType
|
|
51
|
+
> = RecommendedFulfillmentType$inboundSchema;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* @internal
|
|
55
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
+
*/
|
|
57
|
+
export namespace RecommendedFulfillmentType$ {
|
|
58
|
+
/** @deprecated use `RecommendedFulfillmentType$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = RecommendedFulfillmentType$inboundSchema;
|
|
60
|
+
/** @deprecated use `RecommendedFulfillmentType$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = RecommendedFulfillmentType$outboundSchema;
|
|
62
|
+
}
|
|
63
|
+
|
|
34
64
|
/** @internal */
|
|
35
65
|
export const Summary$inboundSchema: z.ZodType<Summary, z.ZodTypeDef, unknown> =
|
|
36
66
|
z.object({
|
|
37
67
|
collect_available: z.boolean(),
|
|
38
68
|
deliver_available: z.boolean(),
|
|
39
|
-
recommended_fulfillment_type:
|
|
40
|
-
components.FulfillmentPreference$inboundSchema,
|
|
69
|
+
recommended_fulfillment_type: RecommendedFulfillmentType$inboundSchema,
|
|
41
70
|
recommended_store: components.CollectInStore$inboundSchema.optional(),
|
|
42
71
|
}).transform((v) => {
|
|
43
72
|
return remap$(v, {
|
|
@@ -64,7 +93,7 @@ export const Summary$outboundSchema: z.ZodType<
|
|
|
64
93
|
> = z.object({
|
|
65
94
|
collectAvailable: z.boolean(),
|
|
66
95
|
deliverAvailable: z.boolean(),
|
|
67
|
-
recommendedFulfillmentType:
|
|
96
|
+
recommendedFulfillmentType: RecommendedFulfillmentType$outboundSchema,
|
|
68
97
|
recommendedStore: components.CollectInStore$outboundSchema.optional(),
|
|
69
98
|
}).transform((v) => {
|
|
70
99
|
return remap$(v, {
|
|
@@ -11,7 +11,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
11
11
|
|
|
12
12
|
export type UpdateFulfillmentPreferenceRequestBody =
|
|
13
13
|
| components.CollectInStoreFulfillment
|
|
14
|
-
| components.
|
|
14
|
+
| components.PartialCollectAndDeliveryInput
|
|
15
15
|
| components.DeliveryFulfillment;
|
|
16
16
|
|
|
17
17
|
export type UpdateFulfillmentPreferenceRequest = {
|
|
@@ -21,7 +21,7 @@ export type UpdateFulfillmentPreferenceRequest = {
|
|
|
21
21
|
id: string;
|
|
22
22
|
requestBody:
|
|
23
23
|
| components.CollectInStoreFulfillment
|
|
24
|
-
| components.
|
|
24
|
+
| components.PartialCollectAndDeliveryInput
|
|
25
25
|
| components.DeliveryFulfillment;
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -40,14 +40,14 @@ export const UpdateFulfillmentPreferenceRequestBody$inboundSchema: z.ZodType<
|
|
|
40
40
|
unknown
|
|
41
41
|
> = z.union([
|
|
42
42
|
components.CollectInStoreFulfillment$inboundSchema,
|
|
43
|
-
components.
|
|
43
|
+
components.PartialCollectAndDeliveryInput$inboundSchema,
|
|
44
44
|
components.DeliveryFulfillment$inboundSchema,
|
|
45
45
|
]);
|
|
46
46
|
|
|
47
47
|
/** @internal */
|
|
48
48
|
export type UpdateFulfillmentPreferenceRequestBody$Outbound =
|
|
49
49
|
| components.CollectInStoreFulfillment$Outbound
|
|
50
|
-
| components.
|
|
50
|
+
| components.PartialCollectAndDeliveryInput$Outbound
|
|
51
51
|
| components.DeliveryFulfillment$Outbound;
|
|
52
52
|
|
|
53
53
|
/** @internal */
|
|
@@ -57,7 +57,7 @@ export const UpdateFulfillmentPreferenceRequestBody$outboundSchema: z.ZodType<
|
|
|
57
57
|
UpdateFulfillmentPreferenceRequestBody
|
|
58
58
|
> = z.union([
|
|
59
59
|
components.CollectInStoreFulfillment$outboundSchema,
|
|
60
|
-
components.
|
|
60
|
+
components.PartialCollectAndDeliveryInput$outboundSchema,
|
|
61
61
|
components.DeliveryFulfillment$outboundSchema,
|
|
62
62
|
]);
|
|
63
63
|
|
|
@@ -107,7 +107,7 @@ export const UpdateFulfillmentPreferenceRequest$inboundSchema: z.ZodType<
|
|
|
107
107
|
id: z.string(),
|
|
108
108
|
RequestBody: z.union([
|
|
109
109
|
components.CollectInStoreFulfillment$inboundSchema,
|
|
110
|
-
components.
|
|
110
|
+
components.PartialCollectAndDeliveryInput$inboundSchema,
|
|
111
111
|
components.DeliveryFulfillment$inboundSchema,
|
|
112
112
|
]),
|
|
113
113
|
}).transform((v) => {
|
|
@@ -121,7 +121,7 @@ export type UpdateFulfillmentPreferenceRequest$Outbound = {
|
|
|
121
121
|
id: string;
|
|
122
122
|
RequestBody:
|
|
123
123
|
| components.CollectInStoreFulfillment$Outbound
|
|
124
|
-
| components.
|
|
124
|
+
| components.PartialCollectAndDeliveryInput$Outbound
|
|
125
125
|
| components.DeliveryFulfillment$Outbound;
|
|
126
126
|
};
|
|
127
127
|
|
|
@@ -134,7 +134,7 @@ export const UpdateFulfillmentPreferenceRequest$outboundSchema: z.ZodType<
|
|
|
134
134
|
id: z.string(),
|
|
135
135
|
requestBody: z.union([
|
|
136
136
|
components.CollectInStoreFulfillment$outboundSchema,
|
|
137
|
-
components.
|
|
137
|
+
components.PartialCollectAndDeliveryInput$outboundSchema,
|
|
138
138
|
components.DeliveryFulfillment$outboundSchema,
|
|
139
139
|
]),
|
|
140
140
|
}).transform((v) => {
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# CeStorefront SDK
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Public-facing API for Commerce Engine storefronts, enabling seamless shopping experiences with product browsing, cart management, checkout processing, user accounts, and order tracking. Perfect for building web, mobile, and headless commerce applications.
|
|
6
|
-
|
|
7
|
-
Commerce Engine API Reference Documentation
|
|
8
|
-
<https://llm-docs.commercengine.io>
|
|
9
|
-
|
|
10
|
-
### Available Operations
|