ce-storefront 0.12.5 → 0.13.1
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/auth/README.md +20 -13
- package/docs/sdks/carts/README.md +8 -3
- package/docs/sdks/catalog/README.md +6 -3
- package/docs/sdks/common/README.md +6 -3
- package/docs/sdks/customers/README.md +12 -6
- package/docs/sdks/orders/README.md +6 -3
- package/docs/sdks/shipping/README.md +15 -6
- package/esm/funcs/authGenerateOtp.d.ts +2 -1
- package/esm/funcs/authGenerateOtp.d.ts.map +1 -1
- package/esm/funcs/authGenerateOtp.js +8 -2
- package/esm/funcs/authGenerateOtp.js.map +1 -1
- package/esm/funcs/authGetAnonymousToken.js +2 -0
- package/esm/funcs/authGetAnonymousToken.js.map +1 -1
- package/esm/funcs/authGetUserDetail.js +2 -0
- package/esm/funcs/authGetUserDetail.js.map +1 -1
- package/esm/funcs/authLoginWithEmail.js +2 -0
- package/esm/funcs/authLoginWithEmail.js.map +1 -1
- package/esm/funcs/authLoginWithPhone.js +2 -0
- package/esm/funcs/authLoginWithPhone.js.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts +2 -1
- package/esm/funcs/authLoginWithWhatsapp.d.ts.map +1 -1
- package/esm/funcs/authLoginWithWhatsapp.js +8 -2
- package/esm/funcs/authLoginWithWhatsapp.js.map +1 -1
- package/esm/funcs/authLogout.d.ts +2 -1
- package/esm/funcs/authLogout.d.ts.map +1 -1
- package/esm/funcs/authLogout.js +8 -2
- package/esm/funcs/authLogout.js.map +1 -1
- package/esm/funcs/authRefreshToken.js +2 -0
- package/esm/funcs/authRefreshToken.js.map +1 -1
- package/esm/funcs/authUpdateUser.js +2 -0
- package/esm/funcs/authUpdateUser.js.map +1 -1
- package/esm/funcs/authVerifyOtp.js +2 -0
- package/esm/funcs/authVerifyOtp.js.map +1 -1
- package/esm/funcs/cartsAddShippingMethod.js +2 -0
- package/esm/funcs/cartsAddShippingMethod.js.map +1 -1
- package/esm/funcs/cartsApplyCoupon.js +2 -0
- package/esm/funcs/cartsApplyCoupon.js.map +1 -1
- package/esm/funcs/cartsCreateCart.d.ts +2 -1
- package/esm/funcs/cartsCreateCart.d.ts.map +1 -1
- package/esm/funcs/cartsCreateCart.js +8 -2
- package/esm/funcs/cartsCreateCart.js.map +1 -1
- package/esm/funcs/cartsCreateCartAddress.js +2 -0
- package/esm/funcs/cartsCreateCartAddress.js.map +1 -1
- package/esm/funcs/cartsDeleteCart.js +2 -0
- package/esm/funcs/cartsDeleteCart.js.map +1 -1
- package/esm/funcs/cartsGetCart.js +2 -0
- package/esm/funcs/cartsGetCart.js.map +1 -1
- package/esm/funcs/cartsGetUserCart.js +2 -0
- package/esm/funcs/cartsGetUserCart.js.map +1 -1
- package/esm/funcs/cartsRedeemLoyaltyPoints.js +2 -0
- package/esm/funcs/cartsRedeemLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveCoupon.js +2 -0
- package/esm/funcs/cartsRemoveCoupon.js.map +1 -1
- package/esm/funcs/cartsRemoveLoyaltyPoints.js +2 -0
- package/esm/funcs/cartsRemoveLoyaltyPoints.js.map +1 -1
- package/esm/funcs/cartsRemoveUserCart.js +2 -0
- package/esm/funcs/cartsRemoveUserCart.js.map +1 -1
- package/esm/funcs/cartsUpdateCart.js +2 -0
- package/esm/funcs/cartsUpdateCart.js.map +1 -1
- package/esm/funcs/catalogGetProductDetail.js +2 -0
- package/esm/funcs/catalogGetProductDetail.js.map +1 -1
- package/esm/funcs/catalogGetVariantDetail.js +2 -0
- package/esm/funcs/catalogGetVariantDetail.js.map +1 -1
- package/esm/funcs/catalogListCategories.d.ts +2 -1
- package/esm/funcs/catalogListCategories.d.ts.map +1 -1
- package/esm/funcs/catalogListCategories.js +8 -2
- package/esm/funcs/catalogListCategories.js.map +1 -1
- package/esm/funcs/catalogListCrosssellProducts.js +2 -0
- package/esm/funcs/catalogListCrosssellProducts.js.map +1 -1
- package/esm/funcs/catalogListProductReviews.js +2 -0
- package/esm/funcs/catalogListProductReviews.js.map +1 -1
- package/esm/funcs/catalogListProductVariants.js +2 -0
- package/esm/funcs/catalogListProductVariants.js.map +1 -1
- package/esm/funcs/catalogListProducts.js +2 -0
- package/esm/funcs/catalogListProducts.js.map +1 -1
- package/esm/funcs/catalogListSimilarProducts.js +2 -0
- package/esm/funcs/catalogListSimilarProducts.js.map +1 -1
- package/esm/funcs/catalogListSkus.js +2 -0
- package/esm/funcs/catalogListSkus.js.map +1 -1
- package/esm/funcs/catalogListUpsellProducts.js +2 -0
- package/esm/funcs/catalogListUpsellProducts.js.map +1 -1
- package/esm/funcs/catalogSearchProducts.js +2 -0
- package/esm/funcs/catalogSearchProducts.js.map +1 -1
- package/esm/funcs/commonListCountryPincodes.d.ts +2 -1
- package/esm/funcs/commonListCountryPincodes.d.ts.map +1 -1
- package/esm/funcs/commonListCountryPincodes.js +8 -2
- package/esm/funcs/commonListCountryPincodes.js.map +1 -1
- package/esm/funcs/customersCreateAddress.js +2 -0
- package/esm/funcs/customersCreateAddress.js.map +1 -1
- package/esm/funcs/customersDeleteAddress.js +2 -0
- package/esm/funcs/customersDeleteAddress.js.map +1 -1
- package/esm/funcs/customersGetAddressDetail.js +2 -0
- package/esm/funcs/customersGetAddressDetail.js.map +1 -1
- package/esm/funcs/customersGetLoyaltyDetails.js +2 -0
- package/esm/funcs/customersGetLoyaltyDetails.js.map +1 -1
- package/esm/funcs/customersListAddresses.d.ts +2 -1
- package/esm/funcs/customersListAddresses.d.ts.map +1 -1
- package/esm/funcs/customersListAddresses.js +8 -2
- package/esm/funcs/customersListAddresses.js.map +1 -1
- package/esm/funcs/customersListUserReviews.d.ts +2 -1
- package/esm/funcs/customersListUserReviews.d.ts.map +1 -1
- package/esm/funcs/customersListUserReviews.js +8 -2
- package/esm/funcs/customersListUserReviews.js.map +1 -1
- package/esm/funcs/customersUpdateAddressDetail.js +2 -0
- package/esm/funcs/customersUpdateAddressDetail.js.map +1 -1
- package/esm/funcs/ordersCancelOrder.js +2 -0
- package/esm/funcs/ordersCancelOrder.js.map +1 -1
- package/esm/funcs/ordersCreateOrder.js +2 -0
- package/esm/funcs/ordersCreateOrder.js.map +1 -1
- package/esm/funcs/ordersGetOrderDetail.js +2 -0
- package/esm/funcs/ordersGetOrderDetail.js.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.d.ts +2 -1
- package/esm/funcs/ordersGetPaymentStatus.d.ts.map +1 -1
- package/esm/funcs/ordersGetPaymentStatus.js +8 -2
- package/esm/funcs/ordersGetPaymentStatus.js.map +1 -1
- package/esm/funcs/ordersListOrderShipments.js +2 -0
- package/esm/funcs/ordersListOrderShipments.js.map +1 -1
- package/esm/funcs/ordersListOrders.js +2 -0
- package/esm/funcs/ordersListOrders.js.map +1 -1
- package/esm/funcs/ordersRetryOrderPayment.js +2 -0
- package/esm/funcs/ordersRetryOrderPayment.js.map +1 -1
- package/esm/funcs/shippingShippingMethods.d.ts +3 -1
- package/esm/funcs/shippingShippingMethods.d.ts.map +1 -1
- package/esm/funcs/shippingShippingMethods.js +11 -6
- package/esm/funcs/shippingShippingMethods.js.map +1 -1
- package/esm/hooks/types.d.ts +2 -0
- package/esm/hooks/types.d.ts.map +1 -1
- package/esm/lib/config.d.ts +7 -3
- package/esm/lib/config.d.ts.map +1 -1
- package/esm/lib/config.js +3 -3
- package/esm/lib/config.js.map +1 -1
- package/esm/lib/sdks.d.ts +1 -0
- package/esm/lib/sdks.d.ts.map +1 -1
- package/esm/lib/sdks.js +3 -3
- package/esm/lib/sdks.js.map +1 -1
- package/esm/models/components/appliedcoupon.d.ts +85 -0
- package/esm/models/components/appliedcoupon.d.ts.map +1 -0
- package/esm/models/components/appliedcoupon.js +87 -0
- package/esm/models/components/appliedcoupon.js.map +1 -0
- package/esm/models/components/appliedpromotion.d.ts +83 -0
- package/esm/models/components/appliedpromotion.d.ts.map +1 -0
- package/esm/models/components/appliedpromotion.js +90 -0
- package/esm/models/components/appliedpromotion.js.map +1 -0
- package/esm/models/components/cart.d.ts +6 -153
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +6 -161
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/discountbasedpromotion.d.ts +31 -0
- package/esm/models/components/discountbasedpromotion.d.ts.map +1 -1
- package/esm/models/components/discountbasedpromotion.js +21 -0
- package/esm/models/components/discountbasedpromotion.js.map +1 -1
- package/esm/models/components/fixedpricepromotion.d.ts +34 -2
- package/esm/models/components/fixedpricepromotion.d.ts.map +1 -1
- package/esm/models/components/fixedpricepromotion.js +23 -2
- package/esm/models/components/fixedpricepromotion.js.map +1 -1
- package/esm/models/components/freegoodspromotion.d.ts +32 -0
- package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
- package/esm/models/components/freegoodspromotion.js +21 -0
- package/esm/models/components/freegoodspromotion.js.map +1 -1
- package/esm/models/components/generateotpwithemail.d.ts +65 -0
- package/esm/models/components/generateotpwithemail.d.ts.map +1 -0
- package/esm/models/components/generateotpwithemail.js +65 -0
- package/esm/models/components/generateotpwithemail.js.map +1 -0
- package/esm/models/components/generateotpwithphone.d.ts +98 -0
- package/esm/models/components/generateotpwithphone.d.ts.map +1 -0
- package/esm/models/components/generateotpwithphone.js +90 -0
- package/esm/models/components/generateotpwithphone.js.map +1 -0
- package/esm/models/components/index.d.ts +4 -0
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +4 -0
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/item.d.ts +8 -0
- package/esm/models/components/item.d.ts.map +1 -1
- package/esm/models/components/item.js +5 -0
- package/esm/models/components/item.js.map +1 -1
- package/esm/models/components/order.d.ts +6 -181
- package/esm/models/components/order.d.ts.map +1 -1
- package/esm/models/components/order.js +6 -185
- package/esm/models/components/order.js.map +1 -1
- package/esm/models/components/orderdetail.d.ts +6 -181
- package/esm/models/components/orderdetail.d.ts.map +1 -1
- package/esm/models/components/orderdetail.js +6 -185
- package/esm/models/components/orderdetail.js.map +1 -1
- package/esm/models/components/product.d.ts +5 -0
- package/esm/models/components/product.d.ts.map +1 -1
- package/esm/models/components/product.js +2 -0
- package/esm/models/components/product.js.map +1 -1
- package/esm/models/components/productbundleitem.d.ts +8 -0
- package/esm/models/components/productbundleitem.d.ts.map +1 -1
- package/esm/models/components/productbundleitem.js +5 -0
- package/esm/models/components/productbundleitem.js.map +1 -1
- package/esm/models/components/productdetail.d.ts +5 -0
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +2 -0
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/components/productpromotion.d.ts +2 -14
- package/esm/models/components/productpromotion.d.ts.map +1 -1
- package/esm/models/components/productshipping.d.ts +8 -16
- package/esm/models/components/productshipping.d.ts.map +1 -1
- package/esm/models/components/productshipping.js +12 -28
- package/esm/models/components/productshipping.js.map +1 -1
- package/esm/models/components/variant.d.ts +5 -0
- package/esm/models/components/variant.d.ts.map +1 -1
- package/esm/models/components/variant.js +2 -0
- package/esm/models/components/variant.js.map +1 -1
- package/esm/models/components/variantdetail.d.ts +5 -0
- package/esm/models/components/variantdetail.d.ts.map +1 -1
- package/esm/models/components/variantdetail.js +2 -0
- package/esm/models/components/variantdetail.js.map +1 -1
- package/esm/models/components/volumebasedpromotion.d.ts +34 -2
- package/esm/models/components/volumebasedpromotion.d.ts.map +1 -1
- package/esm/models/components/volumebasedpromotion.js +23 -2
- package/esm/models/components/volumebasedpromotion.js.map +1 -1
- package/esm/models/operations/generateotp.d.ts +3 -104
- package/esm/models/operations/generateotp.d.ts.map +1 -1
- package/esm/models/operations/generateotp.js +9 -72
- package/esm/models/operations/generateotp.js.map +1 -1
- package/esm/models/operations/getshippingmethods.d.ts +0 -21
- package/esm/models/operations/getshippingmethods.d.ts.map +1 -1
- package/esm/models/operations/getshippingmethods.js +0 -21
- package/esm/models/operations/getshippingmethods.js.map +1 -1
- package/esm/models/operations/updateshippingmethod.d.ts +9 -33
- package/esm/models/operations/updateshippingmethod.d.ts.map +1 -1
- package/esm/models/operations/updateshippingmethod.js +6 -27
- package/esm/models/operations/updateshippingmethod.js.map +1 -1
- package/esm/sdk/shipping.d.ts +2 -1
- package/esm/sdk/shipping.d.ts.map +1 -1
- package/esm/sdk/shipping.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/authGenerateOtp.ts +17 -2
- package/src/funcs/authGetAnonymousToken.ts +2 -0
- package/src/funcs/authGetUserDetail.ts +2 -0
- package/src/funcs/authLoginWithEmail.ts +2 -0
- package/src/funcs/authLoginWithPhone.ts +2 -0
- package/src/funcs/authLoginWithWhatsapp.ts +17 -2
- package/src/funcs/authLogout.ts +21 -2
- package/src/funcs/authRefreshToken.ts +2 -0
- package/src/funcs/authUpdateUser.ts +2 -0
- package/src/funcs/authVerifyOtp.ts +2 -0
- package/src/funcs/cartsAddShippingMethod.ts +2 -0
- package/src/funcs/cartsApplyCoupon.ts +2 -0
- package/src/funcs/cartsCreateCart.ts +21 -2
- package/src/funcs/cartsCreateCartAddress.ts +2 -0
- package/src/funcs/cartsDeleteCart.ts +2 -0
- package/src/funcs/cartsGetCart.ts +2 -0
- package/src/funcs/cartsGetUserCart.ts +2 -0
- package/src/funcs/cartsRedeemLoyaltyPoints.ts +2 -0
- package/src/funcs/cartsRemoveCoupon.ts +2 -0
- package/src/funcs/cartsRemoveLoyaltyPoints.ts +2 -0
- package/src/funcs/cartsRemoveUserCart.ts +2 -0
- package/src/funcs/cartsUpdateCart.ts +2 -0
- package/src/funcs/catalogGetProductDetail.ts +2 -0
- package/src/funcs/catalogGetVariantDetail.ts +2 -0
- package/src/funcs/catalogListCategories.ts +21 -2
- package/src/funcs/catalogListCrosssellProducts.ts +2 -0
- package/src/funcs/catalogListProductReviews.ts +2 -0
- package/src/funcs/catalogListProductVariants.ts +2 -0
- package/src/funcs/catalogListProducts.ts +2 -0
- package/src/funcs/catalogListSimilarProducts.ts +2 -0
- package/src/funcs/catalogListSkus.ts +2 -0
- package/src/funcs/catalogListUpsellProducts.ts +2 -0
- package/src/funcs/catalogSearchProducts.ts +2 -0
- package/src/funcs/commonListCountryPincodes.ts +21 -2
- package/src/funcs/customersCreateAddress.ts +2 -0
- package/src/funcs/customersDeleteAddress.ts +2 -0
- package/src/funcs/customersGetAddressDetail.ts +2 -0
- package/src/funcs/customersGetLoyaltyDetails.ts +2 -0
- package/src/funcs/customersListAddresses.ts +21 -2
- package/src/funcs/customersListUserReviews.ts +21 -2
- package/src/funcs/customersUpdateAddressDetail.ts +2 -0
- package/src/funcs/ordersCancelOrder.ts +2 -0
- package/src/funcs/ordersCreateOrder.ts +2 -0
- package/src/funcs/ordersGetOrderDetail.ts +2 -0
- package/src/funcs/ordersGetPaymentStatus.ts +21 -2
- package/src/funcs/ordersListOrderShipments.ts +2 -0
- package/src/funcs/ordersListOrders.ts +2 -0
- package/src/funcs/ordersRetryOrderPayment.ts +2 -0
- package/src/funcs/shippingShippingMethods.ts +26 -10
- package/src/hooks/types.ts +2 -0
- package/src/lib/config.ts +7 -3
- package/src/lib/sdks.ts +10 -4
- package/src/models/components/appliedcoupon.ts +139 -0
- package/src/models/components/appliedpromotion.ts +155 -0
- package/src/models/components/cart.ts +20 -265
- package/src/models/components/discountbasedpromotion.ts +30 -1
- package/src/models/components/fixedpricepromotion.ts +36 -4
- package/src/models/components/freegoodspromotion.ts +33 -1
- package/src/models/components/generateotpwithemail.ts +115 -0
- package/src/models/components/generateotpwithphone.ts +148 -0
- package/src/models/components/index.ts +4 -0
- package/src/models/components/item.ts +17 -0
- package/src/models/components/order.ts +20 -310
- package/src/models/components/orderdetail.ts +20 -319
- package/src/models/components/product.ts +7 -0
- package/src/models/components/productbundleitem.ts +17 -0
- package/src/models/components/productdetail.ts +7 -0
- package/src/models/components/productshipping.ts +20 -44
- package/src/models/components/variant.ts +7 -0
- package/src/models/components/variantdetail.ts +7 -0
- package/src/models/components/volumebasedpromotion.ts +37 -4
- package/src/models/operations/generateotp.ts +15 -118
- package/src/models/operations/getshippingmethods.ts +0 -54
- package/src/models/operations/updateshippingmethod.ts +15 -69
- package/src/sdk/shipping.ts +2 -1
|
@@ -8,6 +8,18 @@ import { safeParse } from "../../lib/schemas.js";
|
|
|
8
8
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
AppliedCoupon,
|
|
13
|
+
AppliedCoupon$inboundSchema,
|
|
14
|
+
AppliedCoupon$Outbound,
|
|
15
|
+
AppliedCoupon$outboundSchema,
|
|
16
|
+
} from "./appliedcoupon.js";
|
|
17
|
+
import {
|
|
18
|
+
AppliedPromotion,
|
|
19
|
+
AppliedPromotion$inboundSchema,
|
|
20
|
+
AppliedPromotion$Outbound,
|
|
21
|
+
AppliedPromotion$outboundSchema,
|
|
22
|
+
} from "./appliedpromotion.js";
|
|
11
23
|
import {
|
|
12
24
|
CustomerAddress,
|
|
13
25
|
CustomerAddress$inboundSchema,
|
|
@@ -56,56 +68,6 @@ export type OrderDetailPaymentStatus = ClosedEnum<
|
|
|
56
68
|
typeof OrderDetailPaymentStatus
|
|
57
69
|
>;
|
|
58
70
|
|
|
59
|
-
export const OrderDetailPromotionType = {
|
|
60
|
-
Discount: "discount",
|
|
61
|
-
FreeGoods: "free-goods",
|
|
62
|
-
FreeShipping: "free-shipping",
|
|
63
|
-
BuyXGetY: "buy-x-get-y",
|
|
64
|
-
VolumeBased: "volume-based",
|
|
65
|
-
} as const;
|
|
66
|
-
export type OrderDetailPromotionType = ClosedEnum<
|
|
67
|
-
typeof OrderDetailPromotionType
|
|
68
|
-
>;
|
|
69
|
-
|
|
70
|
-
export const OrderDetailScope = {
|
|
71
|
-
Catalog: "catalog",
|
|
72
|
-
Global: "global",
|
|
73
|
-
} as const;
|
|
74
|
-
export type OrderDetailScope = ClosedEnum<typeof OrderDetailScope>;
|
|
75
|
-
|
|
76
|
-
export type OrderDetailAppliedPromotions = {
|
|
77
|
-
promotionId: string;
|
|
78
|
-
promotionType: OrderDetailPromotionType;
|
|
79
|
-
savings: number;
|
|
80
|
-
productId: string | null;
|
|
81
|
-
productName: string | null;
|
|
82
|
-
variantId: string | null;
|
|
83
|
-
variantName: string | null;
|
|
84
|
-
scope: OrderDetailScope;
|
|
85
|
-
appliedSequence: number;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
export const OrderDetailCouponType = {
|
|
89
|
-
Discount: "discount",
|
|
90
|
-
FreeGoods: "free-goods",
|
|
91
|
-
FixedPrice: "fixed-price",
|
|
92
|
-
FreeShipping: "free-shipping",
|
|
93
|
-
BuyXGetY: "buy-x-get-y",
|
|
94
|
-
VolumeBased: "volume-based",
|
|
95
|
-
AcceleratedRewards: "accelerated-rewards",
|
|
96
|
-
} as const;
|
|
97
|
-
export type OrderDetailCouponType = ClosedEnum<typeof OrderDetailCouponType>;
|
|
98
|
-
|
|
99
|
-
export type OrderDetailAppliedCoupons = {
|
|
100
|
-
couponId: string;
|
|
101
|
-
couponType: OrderDetailCouponType;
|
|
102
|
-
savings: number;
|
|
103
|
-
productId: string | null;
|
|
104
|
-
productName: string | null;
|
|
105
|
-
variantId: string | null;
|
|
106
|
-
variantName: string | null;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
71
|
export type OrderDetailCurrency = {
|
|
110
72
|
name?: string | undefined;
|
|
111
73
|
code?: string | undefined;
|
|
@@ -167,11 +129,11 @@ export type OrderDetail = {
|
|
|
167
129
|
/**
|
|
168
130
|
* Information about the promotional offers that have been applied to the cart.
|
|
169
131
|
*/
|
|
170
|
-
appliedPromotions: Array<
|
|
132
|
+
appliedPromotions: Array<AppliedPromotion>;
|
|
171
133
|
/**
|
|
172
134
|
* This key provides details about the savings in cart after coupon have been applied to the cart.
|
|
173
135
|
*/
|
|
174
|
-
appliedCoupons: Array<
|
|
136
|
+
appliedCoupons: Array<AppliedCoupon>;
|
|
175
137
|
promotionSavings?: number | undefined;
|
|
176
138
|
couponSavings?: number | undefined;
|
|
177
139
|
otherSavings?: number | undefined;
|
|
@@ -259,259 +221,6 @@ export namespace OrderDetailPaymentStatus$ {
|
|
|
259
221
|
export const outboundSchema = OrderDetailPaymentStatus$outboundSchema;
|
|
260
222
|
}
|
|
261
223
|
|
|
262
|
-
/** @internal */
|
|
263
|
-
export const OrderDetailPromotionType$inboundSchema: z.ZodNativeEnum<
|
|
264
|
-
typeof OrderDetailPromotionType
|
|
265
|
-
> = z.nativeEnum(OrderDetailPromotionType);
|
|
266
|
-
|
|
267
|
-
/** @internal */
|
|
268
|
-
export const OrderDetailPromotionType$outboundSchema: z.ZodNativeEnum<
|
|
269
|
-
typeof OrderDetailPromotionType
|
|
270
|
-
> = OrderDetailPromotionType$inboundSchema;
|
|
271
|
-
|
|
272
|
-
/**
|
|
273
|
-
* @internal
|
|
274
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
275
|
-
*/
|
|
276
|
-
export namespace OrderDetailPromotionType$ {
|
|
277
|
-
/** @deprecated use `OrderDetailPromotionType$inboundSchema` instead. */
|
|
278
|
-
export const inboundSchema = OrderDetailPromotionType$inboundSchema;
|
|
279
|
-
/** @deprecated use `OrderDetailPromotionType$outboundSchema` instead. */
|
|
280
|
-
export const outboundSchema = OrderDetailPromotionType$outboundSchema;
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
/** @internal */
|
|
284
|
-
export const OrderDetailScope$inboundSchema: z.ZodNativeEnum<
|
|
285
|
-
typeof OrderDetailScope
|
|
286
|
-
> = z.nativeEnum(OrderDetailScope);
|
|
287
|
-
|
|
288
|
-
/** @internal */
|
|
289
|
-
export const OrderDetailScope$outboundSchema: z.ZodNativeEnum<
|
|
290
|
-
typeof OrderDetailScope
|
|
291
|
-
> = OrderDetailScope$inboundSchema;
|
|
292
|
-
|
|
293
|
-
/**
|
|
294
|
-
* @internal
|
|
295
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
296
|
-
*/
|
|
297
|
-
export namespace OrderDetailScope$ {
|
|
298
|
-
/** @deprecated use `OrderDetailScope$inboundSchema` instead. */
|
|
299
|
-
export const inboundSchema = OrderDetailScope$inboundSchema;
|
|
300
|
-
/** @deprecated use `OrderDetailScope$outboundSchema` instead. */
|
|
301
|
-
export const outboundSchema = OrderDetailScope$outboundSchema;
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
/** @internal */
|
|
305
|
-
export const OrderDetailAppliedPromotions$inboundSchema: z.ZodType<
|
|
306
|
-
OrderDetailAppliedPromotions,
|
|
307
|
-
z.ZodTypeDef,
|
|
308
|
-
unknown
|
|
309
|
-
> = z.object({
|
|
310
|
-
promotion_id: z.string(),
|
|
311
|
-
promotion_type: OrderDetailPromotionType$inboundSchema,
|
|
312
|
-
savings: z.number(),
|
|
313
|
-
product_id: z.nullable(z.string()),
|
|
314
|
-
product_name: z.nullable(z.string()),
|
|
315
|
-
variant_id: z.nullable(z.string()),
|
|
316
|
-
variant_name: z.nullable(z.string()),
|
|
317
|
-
scope: OrderDetailScope$inboundSchema,
|
|
318
|
-
applied_sequence: z.number().int(),
|
|
319
|
-
}).transform((v) => {
|
|
320
|
-
return remap$(v, {
|
|
321
|
-
"promotion_id": "promotionId",
|
|
322
|
-
"promotion_type": "promotionType",
|
|
323
|
-
"product_id": "productId",
|
|
324
|
-
"product_name": "productName",
|
|
325
|
-
"variant_id": "variantId",
|
|
326
|
-
"variant_name": "variantName",
|
|
327
|
-
"applied_sequence": "appliedSequence",
|
|
328
|
-
});
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
/** @internal */
|
|
332
|
-
export type OrderDetailAppliedPromotions$Outbound = {
|
|
333
|
-
promotion_id: string;
|
|
334
|
-
promotion_type: string;
|
|
335
|
-
savings: number;
|
|
336
|
-
product_id: string | null;
|
|
337
|
-
product_name: string | null;
|
|
338
|
-
variant_id: string | null;
|
|
339
|
-
variant_name: string | null;
|
|
340
|
-
scope: string;
|
|
341
|
-
applied_sequence: number;
|
|
342
|
-
};
|
|
343
|
-
|
|
344
|
-
/** @internal */
|
|
345
|
-
export const OrderDetailAppliedPromotions$outboundSchema: z.ZodType<
|
|
346
|
-
OrderDetailAppliedPromotions$Outbound,
|
|
347
|
-
z.ZodTypeDef,
|
|
348
|
-
OrderDetailAppliedPromotions
|
|
349
|
-
> = z.object({
|
|
350
|
-
promotionId: z.string(),
|
|
351
|
-
promotionType: OrderDetailPromotionType$outboundSchema,
|
|
352
|
-
savings: z.number(),
|
|
353
|
-
productId: z.nullable(z.string()),
|
|
354
|
-
productName: z.nullable(z.string()),
|
|
355
|
-
variantId: z.nullable(z.string()),
|
|
356
|
-
variantName: z.nullable(z.string()),
|
|
357
|
-
scope: OrderDetailScope$outboundSchema,
|
|
358
|
-
appliedSequence: z.number().int(),
|
|
359
|
-
}).transform((v) => {
|
|
360
|
-
return remap$(v, {
|
|
361
|
-
promotionId: "promotion_id",
|
|
362
|
-
promotionType: "promotion_type",
|
|
363
|
-
productId: "product_id",
|
|
364
|
-
productName: "product_name",
|
|
365
|
-
variantId: "variant_id",
|
|
366
|
-
variantName: "variant_name",
|
|
367
|
-
appliedSequence: "applied_sequence",
|
|
368
|
-
});
|
|
369
|
-
});
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* @internal
|
|
373
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
374
|
-
*/
|
|
375
|
-
export namespace OrderDetailAppliedPromotions$ {
|
|
376
|
-
/** @deprecated use `OrderDetailAppliedPromotions$inboundSchema` instead. */
|
|
377
|
-
export const inboundSchema = OrderDetailAppliedPromotions$inboundSchema;
|
|
378
|
-
/** @deprecated use `OrderDetailAppliedPromotions$outboundSchema` instead. */
|
|
379
|
-
export const outboundSchema = OrderDetailAppliedPromotions$outboundSchema;
|
|
380
|
-
/** @deprecated use `OrderDetailAppliedPromotions$Outbound` instead. */
|
|
381
|
-
export type Outbound = OrderDetailAppliedPromotions$Outbound;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
export function orderDetailAppliedPromotionsToJSON(
|
|
385
|
-
orderDetailAppliedPromotions: OrderDetailAppliedPromotions,
|
|
386
|
-
): string {
|
|
387
|
-
return JSON.stringify(
|
|
388
|
-
OrderDetailAppliedPromotions$outboundSchema.parse(
|
|
389
|
-
orderDetailAppliedPromotions,
|
|
390
|
-
),
|
|
391
|
-
);
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
export function orderDetailAppliedPromotionsFromJSON(
|
|
395
|
-
jsonString: string,
|
|
396
|
-
): SafeParseResult<OrderDetailAppliedPromotions, SDKValidationError> {
|
|
397
|
-
return safeParse(
|
|
398
|
-
jsonString,
|
|
399
|
-
(x) => OrderDetailAppliedPromotions$inboundSchema.parse(JSON.parse(x)),
|
|
400
|
-
`Failed to parse 'OrderDetailAppliedPromotions' from JSON`,
|
|
401
|
-
);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
/** @internal */
|
|
405
|
-
export const OrderDetailCouponType$inboundSchema: z.ZodNativeEnum<
|
|
406
|
-
typeof OrderDetailCouponType
|
|
407
|
-
> = z.nativeEnum(OrderDetailCouponType);
|
|
408
|
-
|
|
409
|
-
/** @internal */
|
|
410
|
-
export const OrderDetailCouponType$outboundSchema: z.ZodNativeEnum<
|
|
411
|
-
typeof OrderDetailCouponType
|
|
412
|
-
> = OrderDetailCouponType$inboundSchema;
|
|
413
|
-
|
|
414
|
-
/**
|
|
415
|
-
* @internal
|
|
416
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
417
|
-
*/
|
|
418
|
-
export namespace OrderDetailCouponType$ {
|
|
419
|
-
/** @deprecated use `OrderDetailCouponType$inboundSchema` instead. */
|
|
420
|
-
export const inboundSchema = OrderDetailCouponType$inboundSchema;
|
|
421
|
-
/** @deprecated use `OrderDetailCouponType$outboundSchema` instead. */
|
|
422
|
-
export const outboundSchema = OrderDetailCouponType$outboundSchema;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
/** @internal */
|
|
426
|
-
export const OrderDetailAppliedCoupons$inboundSchema: z.ZodType<
|
|
427
|
-
OrderDetailAppliedCoupons,
|
|
428
|
-
z.ZodTypeDef,
|
|
429
|
-
unknown
|
|
430
|
-
> = z.object({
|
|
431
|
-
coupon_id: z.string(),
|
|
432
|
-
coupon_type: OrderDetailCouponType$inboundSchema,
|
|
433
|
-
savings: z.number(),
|
|
434
|
-
product_id: z.nullable(z.string()),
|
|
435
|
-
product_name: z.nullable(z.string()),
|
|
436
|
-
variant_id: z.nullable(z.string()),
|
|
437
|
-
variant_name: z.nullable(z.string()),
|
|
438
|
-
}).transform((v) => {
|
|
439
|
-
return remap$(v, {
|
|
440
|
-
"coupon_id": "couponId",
|
|
441
|
-
"coupon_type": "couponType",
|
|
442
|
-
"product_id": "productId",
|
|
443
|
-
"product_name": "productName",
|
|
444
|
-
"variant_id": "variantId",
|
|
445
|
-
"variant_name": "variantName",
|
|
446
|
-
});
|
|
447
|
-
});
|
|
448
|
-
|
|
449
|
-
/** @internal */
|
|
450
|
-
export type OrderDetailAppliedCoupons$Outbound = {
|
|
451
|
-
coupon_id: string;
|
|
452
|
-
coupon_type: string;
|
|
453
|
-
savings: number;
|
|
454
|
-
product_id: string | null;
|
|
455
|
-
product_name: string | null;
|
|
456
|
-
variant_id: string | null;
|
|
457
|
-
variant_name: string | null;
|
|
458
|
-
};
|
|
459
|
-
|
|
460
|
-
/** @internal */
|
|
461
|
-
export const OrderDetailAppliedCoupons$outboundSchema: z.ZodType<
|
|
462
|
-
OrderDetailAppliedCoupons$Outbound,
|
|
463
|
-
z.ZodTypeDef,
|
|
464
|
-
OrderDetailAppliedCoupons
|
|
465
|
-
> = z.object({
|
|
466
|
-
couponId: z.string(),
|
|
467
|
-
couponType: OrderDetailCouponType$outboundSchema,
|
|
468
|
-
savings: z.number(),
|
|
469
|
-
productId: z.nullable(z.string()),
|
|
470
|
-
productName: z.nullable(z.string()),
|
|
471
|
-
variantId: z.nullable(z.string()),
|
|
472
|
-
variantName: z.nullable(z.string()),
|
|
473
|
-
}).transform((v) => {
|
|
474
|
-
return remap$(v, {
|
|
475
|
-
couponId: "coupon_id",
|
|
476
|
-
couponType: "coupon_type",
|
|
477
|
-
productId: "product_id",
|
|
478
|
-
productName: "product_name",
|
|
479
|
-
variantId: "variant_id",
|
|
480
|
-
variantName: "variant_name",
|
|
481
|
-
});
|
|
482
|
-
});
|
|
483
|
-
|
|
484
|
-
/**
|
|
485
|
-
* @internal
|
|
486
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
487
|
-
*/
|
|
488
|
-
export namespace OrderDetailAppliedCoupons$ {
|
|
489
|
-
/** @deprecated use `OrderDetailAppliedCoupons$inboundSchema` instead. */
|
|
490
|
-
export const inboundSchema = OrderDetailAppliedCoupons$inboundSchema;
|
|
491
|
-
/** @deprecated use `OrderDetailAppliedCoupons$outboundSchema` instead. */
|
|
492
|
-
export const outboundSchema = OrderDetailAppliedCoupons$outboundSchema;
|
|
493
|
-
/** @deprecated use `OrderDetailAppliedCoupons$Outbound` instead. */
|
|
494
|
-
export type Outbound = OrderDetailAppliedCoupons$Outbound;
|
|
495
|
-
}
|
|
496
|
-
|
|
497
|
-
export function orderDetailAppliedCouponsToJSON(
|
|
498
|
-
orderDetailAppliedCoupons: OrderDetailAppliedCoupons,
|
|
499
|
-
): string {
|
|
500
|
-
return JSON.stringify(
|
|
501
|
-
OrderDetailAppliedCoupons$outboundSchema.parse(orderDetailAppliedCoupons),
|
|
502
|
-
);
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
export function orderDetailAppliedCouponsFromJSON(
|
|
506
|
-
jsonString: string,
|
|
507
|
-
): SafeParseResult<OrderDetailAppliedCoupons, SDKValidationError> {
|
|
508
|
-
return safeParse(
|
|
509
|
-
jsonString,
|
|
510
|
-
(x) => OrderDetailAppliedCoupons$inboundSchema.parse(JSON.parse(x)),
|
|
511
|
-
`Failed to parse 'OrderDetailAppliedCoupons' from JSON`,
|
|
512
|
-
);
|
|
513
|
-
}
|
|
514
|
-
|
|
515
224
|
/** @internal */
|
|
516
225
|
export const OrderDetailCurrency$inboundSchema: z.ZodType<
|
|
517
226
|
OrderDetailCurrency,
|
|
@@ -700,12 +409,8 @@ export const OrderDetail$inboundSchema: z.ZodType<
|
|
|
700
409
|
is_coupon_applied: z.boolean().optional(),
|
|
701
410
|
coupon_code: z.nullable(z.string()).optional(),
|
|
702
411
|
coupon_discount_amount: z.nullable(z.number()).optional(),
|
|
703
|
-
applied_promotions: z.array(
|
|
704
|
-
|
|
705
|
-
),
|
|
706
|
-
applied_coupons: z.array(
|
|
707
|
-
z.lazy(() => OrderDetailAppliedCoupons$inboundSchema),
|
|
708
|
-
),
|
|
412
|
+
applied_promotions: z.array(AppliedPromotion$inboundSchema),
|
|
413
|
+
applied_coupons: z.array(AppliedCoupon$inboundSchema),
|
|
709
414
|
promotion_savings: z.number().optional(),
|
|
710
415
|
coupon_savings: z.number().optional(),
|
|
711
416
|
other_savings: z.number().optional(),
|
|
@@ -815,8 +520,8 @@ export type OrderDetail$Outbound = {
|
|
|
815
520
|
is_coupon_applied?: boolean | undefined;
|
|
816
521
|
coupon_code?: string | null | undefined;
|
|
817
522
|
coupon_discount_amount?: number | null | undefined;
|
|
818
|
-
applied_promotions: Array<
|
|
819
|
-
applied_coupons: Array<
|
|
523
|
+
applied_promotions: Array<AppliedPromotion$Outbound>;
|
|
524
|
+
applied_coupons: Array<AppliedCoupon$Outbound>;
|
|
820
525
|
promotion_savings?: number | undefined;
|
|
821
526
|
coupon_savings?: number | undefined;
|
|
822
527
|
other_savings?: number | undefined;
|
|
@@ -877,12 +582,8 @@ export const OrderDetail$outboundSchema: z.ZodType<
|
|
|
877
582
|
isCouponApplied: z.boolean().optional(),
|
|
878
583
|
couponCode: z.nullable(z.string()).optional(),
|
|
879
584
|
couponDiscountAmount: z.nullable(z.number()).optional(),
|
|
880
|
-
appliedPromotions: z.array(
|
|
881
|
-
|
|
882
|
-
),
|
|
883
|
-
appliedCoupons: z.array(
|
|
884
|
-
z.lazy(() => OrderDetailAppliedCoupons$outboundSchema),
|
|
885
|
-
),
|
|
585
|
+
appliedPromotions: z.array(AppliedPromotion$outboundSchema),
|
|
586
|
+
appliedCoupons: z.array(AppliedCoupon$outboundSchema),
|
|
886
587
|
promotionSavings: z.number().optional(),
|
|
887
588
|
couponSavings: z.number().optional(),
|
|
888
589
|
otherSavings: z.number().optional(),
|
|
@@ -79,6 +79,10 @@ export type Product = {
|
|
|
79
79
|
* Indicates whether the product has stock available
|
|
80
80
|
*/
|
|
81
81
|
stockAvailable: boolean;
|
|
82
|
+
/**
|
|
83
|
+
* Indicates whether the item is being fulfilled as a backorder. When true, the item is not currently in stock and will ship later once inventory is available. This may result in the order being split into multiple shipments, with delays for the backordered portion.
|
|
84
|
+
*/
|
|
85
|
+
backorder?: boolean | undefined;
|
|
82
86
|
/**
|
|
83
87
|
* Indicates whether this item is associated with any active (product-specific) coupons
|
|
84
88
|
*/
|
|
@@ -142,6 +146,7 @@ export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
|
142
146
|
product_type: ProductType$inboundSchema,
|
|
143
147
|
active: z.boolean(),
|
|
144
148
|
stock_available: z.boolean(),
|
|
149
|
+
backorder: z.boolean().optional(),
|
|
145
150
|
on_offer: z.boolean(),
|
|
146
151
|
on_subscription: z.boolean(),
|
|
147
152
|
on_promotion: z.boolean(),
|
|
@@ -185,6 +190,7 @@ export type Product$Outbound = {
|
|
|
185
190
|
product_type: string;
|
|
186
191
|
active: boolean;
|
|
187
192
|
stock_available: boolean;
|
|
193
|
+
backorder?: boolean | undefined;
|
|
188
194
|
on_offer: boolean;
|
|
189
195
|
on_subscription: boolean;
|
|
190
196
|
on_promotion: boolean;
|
|
@@ -217,6 +223,7 @@ export const Product$outboundSchema: z.ZodType<
|
|
|
217
223
|
productType: ProductType$outboundSchema,
|
|
218
224
|
active: z.boolean(),
|
|
219
225
|
stockAvailable: z.boolean(),
|
|
226
|
+
backorder: z.boolean().optional(),
|
|
220
227
|
onOffer: z.boolean(),
|
|
221
228
|
onSubscription: z.boolean(),
|
|
222
229
|
onPromotion: z.boolean(),
|
|
@@ -38,6 +38,12 @@ import {
|
|
|
38
38
|
ProductPromotion$Outbound,
|
|
39
39
|
ProductPromotion$outboundSchema,
|
|
40
40
|
} from "./productpromotion.js";
|
|
41
|
+
import {
|
|
42
|
+
ProductShipping,
|
|
43
|
+
ProductShipping$inboundSchema,
|
|
44
|
+
ProductShipping$Outbound,
|
|
45
|
+
ProductShipping$outboundSchema,
|
|
46
|
+
} from "./productshipping.js";
|
|
41
47
|
import {
|
|
42
48
|
ProductSubscription,
|
|
43
49
|
ProductSubscription$inboundSchema,
|
|
@@ -66,6 +72,10 @@ export type ProductBundleItem = {
|
|
|
66
72
|
shortDescription: string | null;
|
|
67
73
|
active: boolean;
|
|
68
74
|
stockAvailable: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Indicates whether the item is being fulfilled as a backorder. When true, the item is not currently in stock and will ship later once inventory is available. This may result in the order being split into multiple shipments, with delays for the backordered portion.
|
|
77
|
+
*/
|
|
78
|
+
backorder?: boolean | undefined;
|
|
69
79
|
/**
|
|
70
80
|
* Indicates whether this item is associated with any active (product-specific) coupons
|
|
71
81
|
*/
|
|
@@ -82,6 +92,7 @@ export type ProductBundleItem = {
|
|
|
82
92
|
promotion: ProductPromotion | null;
|
|
83
93
|
subscription: Array<ProductSubscription>;
|
|
84
94
|
associatedOptions: { [k: string]: AssociatedOption } | null;
|
|
95
|
+
shipping?: ProductShipping | null | undefined;
|
|
85
96
|
};
|
|
86
97
|
|
|
87
98
|
/** @internal */
|
|
@@ -122,6 +133,7 @@ export const ProductBundleItem$inboundSchema: z.ZodType<
|
|
|
122
133
|
short_description: z.nullable(z.string()),
|
|
123
134
|
active: z.boolean(),
|
|
124
135
|
stock_available: z.boolean(),
|
|
136
|
+
backorder: z.boolean().optional(),
|
|
125
137
|
on_offer: z.boolean(),
|
|
126
138
|
on_subscription: z.boolean(),
|
|
127
139
|
on_promotion: z.boolean(),
|
|
@@ -135,6 +147,7 @@ export const ProductBundleItem$inboundSchema: z.ZodType<
|
|
|
135
147
|
promotion: z.nullable(ProductPromotion$inboundSchema),
|
|
136
148
|
subscription: z.array(ProductSubscription$inboundSchema),
|
|
137
149
|
associated_options: z.nullable(z.record(AssociatedOption$inboundSchema)),
|
|
150
|
+
shipping: z.nullable(ProductShipping$inboundSchema).optional(),
|
|
138
151
|
}).transform((v) => {
|
|
139
152
|
return remap$(v, {
|
|
140
153
|
"product_id": "productId",
|
|
@@ -167,6 +180,7 @@ export type ProductBundleItem$Outbound = {
|
|
|
167
180
|
short_description: string | null;
|
|
168
181
|
active: boolean;
|
|
169
182
|
stock_available: boolean;
|
|
183
|
+
backorder?: boolean | undefined;
|
|
170
184
|
on_offer: boolean;
|
|
171
185
|
on_subscription: boolean;
|
|
172
186
|
on_promotion: boolean;
|
|
@@ -180,6 +194,7 @@ export type ProductBundleItem$Outbound = {
|
|
|
180
194
|
promotion: ProductPromotion$Outbound | null;
|
|
181
195
|
subscription: Array<ProductSubscription$Outbound>;
|
|
182
196
|
associated_options: { [k: string]: AssociatedOption$Outbound } | null;
|
|
197
|
+
shipping?: ProductShipping$Outbound | null | undefined;
|
|
183
198
|
};
|
|
184
199
|
|
|
185
200
|
/** @internal */
|
|
@@ -199,6 +214,7 @@ export const ProductBundleItem$outboundSchema: z.ZodType<
|
|
|
199
214
|
shortDescription: z.nullable(z.string()),
|
|
200
215
|
active: z.boolean(),
|
|
201
216
|
stockAvailable: z.boolean(),
|
|
217
|
+
backorder: z.boolean().optional(),
|
|
202
218
|
onOffer: z.boolean(),
|
|
203
219
|
onSubscription: z.boolean(),
|
|
204
220
|
onPromotion: z.boolean(),
|
|
@@ -212,6 +228,7 @@ export const ProductBundleItem$outboundSchema: z.ZodType<
|
|
|
212
228
|
promotion: z.nullable(ProductPromotion$outboundSchema),
|
|
213
229
|
subscription: z.array(ProductSubscription$outboundSchema),
|
|
214
230
|
associatedOptions: z.nullable(z.record(AssociatedOption$outboundSchema)),
|
|
231
|
+
shipping: z.nullable(ProductShipping$outboundSchema).optional(),
|
|
215
232
|
}).transform((v) => {
|
|
216
233
|
return remap$(v, {
|
|
217
234
|
productId: "product_id",
|
|
@@ -99,6 +99,10 @@ export type ProductDetail = {
|
|
|
99
99
|
* Indicates whether the product has stock available
|
|
100
100
|
*/
|
|
101
101
|
stockAvailable: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Indicates whether the item is being fulfilled as a backorder. When true, the item is not currently in stock and will ship later once inventory is available. This may result in the order being split into multiple shipments, with delays for the backordered portion.
|
|
104
|
+
*/
|
|
105
|
+
backorder?: boolean | undefined;
|
|
102
106
|
/**
|
|
103
107
|
* Indicates whether this item is associated with any active (product-specific) coupons
|
|
104
108
|
*/
|
|
@@ -181,6 +185,7 @@ export const ProductDetail$inboundSchema: z.ZodType<
|
|
|
181
185
|
product_type: ProductDetailProductType$inboundSchema,
|
|
182
186
|
active: z.boolean(),
|
|
183
187
|
stock_available: z.boolean(),
|
|
188
|
+
backorder: z.boolean().optional(),
|
|
184
189
|
on_offer: z.boolean(),
|
|
185
190
|
on_subscription: z.boolean(),
|
|
186
191
|
on_promotion: z.boolean(),
|
|
@@ -235,6 +240,7 @@ export type ProductDetail$Outbound = {
|
|
|
235
240
|
product_type: string;
|
|
236
241
|
active: boolean;
|
|
237
242
|
stock_available: boolean;
|
|
243
|
+
backorder?: boolean | undefined;
|
|
238
244
|
on_offer: boolean;
|
|
239
245
|
on_subscription: boolean;
|
|
240
246
|
on_promotion: boolean;
|
|
@@ -275,6 +281,7 @@ export const ProductDetail$outboundSchema: z.ZodType<
|
|
|
275
281
|
productType: ProductDetailProductType$outboundSchema,
|
|
276
282
|
active: z.boolean(),
|
|
277
283
|
stockAvailable: z.boolean(),
|
|
284
|
+
backorder: z.boolean().optional(),
|
|
278
285
|
onOffer: z.boolean(),
|
|
279
286
|
onSubscription: z.boolean(),
|
|
280
287
|
onPromotion: z.boolean(),
|
|
@@ -9,14 +9,10 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
export type ProductShipping = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
midCode: string | null;
|
|
17
|
-
countryOfOrigin?: string | null | undefined;
|
|
18
|
-
taxType: string | null;
|
|
19
|
-
taxRate: number | null;
|
|
12
|
+
handlingChargesIncludingTax: number;
|
|
13
|
+
handlingChargesExcludingTax: number;
|
|
14
|
+
taxType: string;
|
|
15
|
+
taxRate: number;
|
|
20
16
|
};
|
|
21
17
|
|
|
22
18
|
/** @internal */
|
|
@@ -25,22 +21,14 @@ export const ProductShipping$inboundSchema: z.ZodType<
|
|
|
25
21
|
z.ZodTypeDef,
|
|
26
22
|
unknown
|
|
27
23
|
> = z.object({
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
mid_code: z.nullable(z.string()),
|
|
33
|
-
country_of_origin: z.nullable(z.string().default("India")),
|
|
34
|
-
tax_type: z.nullable(z.string()),
|
|
35
|
-
tax_rate: z.nullable(z.number()),
|
|
24
|
+
handling_charges_including_tax: z.number(),
|
|
25
|
+
handling_charges_excluding_tax: z.number(),
|
|
26
|
+
tax_type: z.string(),
|
|
27
|
+
tax_rate: z.number(),
|
|
36
28
|
}).transform((v) => {
|
|
37
29
|
return remap$(v, {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"availability_description": "availabilityDescription",
|
|
41
|
-
"ships_internationally": "shipsInternationally",
|
|
42
|
-
"mid_code": "midCode",
|
|
43
|
-
"country_of_origin": "countryOfOrigin",
|
|
30
|
+
"handling_charges_including_tax": "handlingChargesIncludingTax",
|
|
31
|
+
"handling_charges_excluding_tax": "handlingChargesExcludingTax",
|
|
44
32
|
"tax_type": "taxType",
|
|
45
33
|
"tax_rate": "taxRate",
|
|
46
34
|
});
|
|
@@ -48,14 +36,10 @@ export const ProductShipping$inboundSchema: z.ZodType<
|
|
|
48
36
|
|
|
49
37
|
/** @internal */
|
|
50
38
|
export type ProductShipping$Outbound = {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
mid_code: string | null;
|
|
56
|
-
country_of_origin: string | null;
|
|
57
|
-
tax_type: string | null;
|
|
58
|
-
tax_rate: number | null;
|
|
39
|
+
handling_charges_including_tax: number;
|
|
40
|
+
handling_charges_excluding_tax: number;
|
|
41
|
+
tax_type: string;
|
|
42
|
+
tax_rate: number;
|
|
59
43
|
};
|
|
60
44
|
|
|
61
45
|
/** @internal */
|
|
@@ -64,22 +48,14 @@ export const ProductShipping$outboundSchema: z.ZodType<
|
|
|
64
48
|
z.ZodTypeDef,
|
|
65
49
|
ProductShipping
|
|
66
50
|
> = z.object({
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
midCode: z.nullable(z.string()),
|
|
72
|
-
countryOfOrigin: z.nullable(z.string().default("India")),
|
|
73
|
-
taxType: z.nullable(z.string()),
|
|
74
|
-
taxRate: z.nullable(z.number()),
|
|
51
|
+
handlingChargesIncludingTax: z.number(),
|
|
52
|
+
handlingChargesExcludingTax: z.number(),
|
|
53
|
+
taxType: z.string(),
|
|
54
|
+
taxRate: z.number(),
|
|
75
55
|
}).transform((v) => {
|
|
76
56
|
return remap$(v, {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
availabilityDescription: "availability_description",
|
|
80
|
-
shipsInternationally: "ships_internationally",
|
|
81
|
-
midCode: "mid_code",
|
|
82
|
-
countryOfOrigin: "country_of_origin",
|
|
57
|
+
handlingChargesIncludingTax: "handling_charges_including_tax",
|
|
58
|
+
handlingChargesExcludingTax: "handling_charges_excluding_tax",
|
|
83
59
|
taxType: "tax_type",
|
|
84
60
|
taxRate: "tax_rate",
|
|
85
61
|
});
|
|
@@ -63,6 +63,10 @@ export type Variant = {
|
|
|
63
63
|
shortDescription: string | null;
|
|
64
64
|
active: boolean;
|
|
65
65
|
stockAvailable: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Indicates whether the item is being fulfilled as a backorder. When true, the item is not currently in stock and will ship later once inventory is available. This may result in the order being split into multiple shipments, with delays for the backordered portion.
|
|
68
|
+
*/
|
|
69
|
+
backorder?: boolean | undefined;
|
|
66
70
|
/**
|
|
67
71
|
* Indicates whether this item is associated with any active (product-specific) coupons
|
|
68
72
|
*/
|
|
@@ -95,6 +99,7 @@ export const Variant$inboundSchema: z.ZodType<Variant, z.ZodTypeDef, unknown> =
|
|
|
95
99
|
short_description: z.nullable(z.string()),
|
|
96
100
|
active: z.boolean(),
|
|
97
101
|
stock_available: z.boolean(),
|
|
102
|
+
backorder: z.boolean().optional(),
|
|
98
103
|
on_offer: z.boolean(),
|
|
99
104
|
on_promotion: z.boolean(),
|
|
100
105
|
on_subscription: z.boolean(),
|
|
@@ -129,6 +134,7 @@ export type Variant$Outbound = {
|
|
|
129
134
|
short_description: string | null;
|
|
130
135
|
active: boolean;
|
|
131
136
|
stock_available: boolean;
|
|
137
|
+
backorder?: boolean | undefined;
|
|
132
138
|
on_offer: boolean;
|
|
133
139
|
on_promotion: boolean;
|
|
134
140
|
on_subscription: boolean;
|
|
@@ -155,6 +161,7 @@ export const Variant$outboundSchema: z.ZodType<
|
|
|
155
161
|
shortDescription: z.nullable(z.string()),
|
|
156
162
|
active: z.boolean(),
|
|
157
163
|
stockAvailable: z.boolean(),
|
|
164
|
+
backorder: z.boolean().optional(),
|
|
158
165
|
onOffer: z.boolean(),
|
|
159
166
|
onPromotion: z.boolean(),
|
|
160
167
|
onSubscription: z.boolean(),
|