ce-storefront 0.20.1 → 0.21.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/README.md +35 -10
- package/esm/funcs/marketplaceGetProductDetail.d.ts +20 -0
- package/esm/funcs/marketplaceGetProductDetail.d.ts.map +1 -0
- package/esm/funcs/marketplaceGetProductDetail.js +91 -0
- package/esm/funcs/marketplaceGetProductDetail.js.map +1 -0
- package/esm/funcs/marketplaceGetVariantDetail.d.ts +20 -0
- package/esm/funcs/marketplaceGetVariantDetail.d.ts.map +1 -0
- package/esm/funcs/marketplaceGetVariantDetail.js +98 -0
- package/esm/funcs/marketplaceGetVariantDetail.js.map +1 -0
- package/esm/funcs/marketplaceListCategories.d.ts +20 -0
- package/esm/funcs/marketplaceListCategories.d.ts.map +1 -0
- package/esm/funcs/marketplaceListCategories.js +91 -0
- package/esm/funcs/marketplaceListCategories.js.map +1 -0
- package/esm/funcs/marketplaceListCrosssellProducts.d.ts +20 -0
- package/esm/funcs/marketplaceListCrosssellProducts.d.ts.map +1 -0
- package/esm/funcs/marketplaceListCrosssellProducts.js +91 -0
- package/esm/funcs/marketplaceListCrosssellProducts.js.map +1 -0
- package/esm/funcs/marketplaceListProductReviews.d.ts +20 -0
- package/esm/funcs/marketplaceListProductReviews.d.ts.map +1 -0
- package/esm/funcs/marketplaceListProductReviews.js +97 -0
- package/esm/funcs/marketplaceListProductReviews.js.map +1 -0
- package/esm/funcs/marketplaceListProductVariants.d.ts +20 -0
- package/esm/funcs/marketplaceListProductVariants.d.ts.map +1 -0
- package/esm/funcs/marketplaceListProductVariants.js +94 -0
- package/esm/funcs/marketplaceListProductVariants.js.map +1 -0
- package/esm/funcs/marketplaceListProducts.d.ts +20 -0
- package/esm/funcs/marketplaceListProducts.d.ts.map +1 -0
- package/esm/funcs/marketplaceListProducts.js +93 -0
- package/esm/funcs/marketplaceListProducts.js.map +1 -0
- package/esm/funcs/marketplaceListSimilarProducts.d.ts +20 -0
- package/esm/funcs/marketplaceListSimilarProducts.d.ts.map +1 -0
- package/esm/funcs/marketplaceListSimilarProducts.js +91 -0
- package/esm/funcs/marketplaceListSimilarProducts.js.map +1 -0
- package/esm/funcs/marketplaceListSkus.d.ts +20 -0
- package/esm/funcs/marketplaceListSkus.d.ts.map +1 -0
- package/esm/funcs/marketplaceListSkus.js +93 -0
- package/esm/funcs/marketplaceListSkus.js.map +1 -0
- package/esm/funcs/marketplaceListUpsellProducts.d.ts +20 -0
- package/esm/funcs/marketplaceListUpsellProducts.d.ts.map +1 -0
- package/esm/funcs/marketplaceListUpsellProducts.js +91 -0
- package/esm/funcs/marketplaceListUpsellProducts.js.map +1 -0
- package/esm/funcs/marketplaceSearchProducts.d.ts +20 -0
- package/esm/funcs/marketplaceSearchProducts.d.ts.map +1 -0
- package/esm/funcs/marketplaceSearchProducts.js +85 -0
- package/esm/funcs/marketplaceSearchProducts.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.d.ts +1 -0
- package/esm/lib/encodings.d.ts.map +1 -1
- package/esm/lib/encodings.js +12 -1
- package/esm/lib/encodings.js.map +1 -1
- package/esm/models/components/booleanattribute.d.ts +1 -1
- package/esm/models/components/booleanattribute.d.ts.map +1 -1
- package/esm/models/components/booleanattribute.js +1 -1
- package/esm/models/components/booleanattribute.js.map +1 -1
- package/esm/models/components/collectinstorefulfillment.d.ts +1 -1
- package/esm/models/components/collectinstorefulfillment.d.ts.map +1 -1
- package/esm/models/components/collectinstorefulfillment.js +1 -2
- package/esm/models/components/collectinstorefulfillment.js.map +1 -1
- package/esm/models/components/collectinstorefulfillmentinput.d.ts +1 -1
- package/esm/models/components/collectinstorefulfillmentinput.d.ts.map +1 -1
- package/esm/models/components/colorattribute.d.ts +1 -1
- package/esm/models/components/colorattribute.d.ts.map +1 -1
- package/esm/models/components/colorattribute.js +1 -1
- package/esm/models/components/colorattribute.js.map +1 -1
- package/esm/models/components/coloroption.d.ts +1 -1
- package/esm/models/components/coloroption.d.ts.map +1 -1
- package/esm/models/components/coloroption.js +1 -1
- package/esm/models/components/coloroption.js.map +1 -1
- package/esm/models/components/customeraddress.d.ts +1 -1
- package/esm/models/components/customeraddress.d.ts.map +1 -1
- package/esm/models/components/customeraddress.js +1 -1
- package/esm/models/components/customeraddress.js.map +1 -1
- package/esm/models/components/customeraddressinput.d.ts +1 -1
- package/esm/models/components/customeraddressinput.d.ts.map +1 -1
- package/esm/models/components/dateattribute.d.ts +1 -1
- package/esm/models/components/dateattribute.js +1 -1
- package/esm/models/components/dateattribute.js.map +1 -1
- package/esm/models/components/deliveryfulfillment.d.ts +1 -1
- package/esm/models/components/deliveryfulfillment.d.ts.map +1 -1
- package/esm/models/components/deliveryfulfillment.js +1 -1
- package/esm/models/components/deliveryfulfillment.js.map +1 -1
- package/esm/models/components/deliveryfulfillmentinput.d.ts +1 -1
- package/esm/models/components/deliveryfulfillmentinput.d.ts.map +1 -1
- package/esm/models/components/discountbasedpromotion.d.ts +1 -10
- package/esm/models/components/discountbasedpromotion.d.ts.map +1 -1
- package/esm/models/components/discountbasedpromotion.js +1 -9
- package/esm/models/components/discountbasedpromotion.js.map +1 -1
- package/esm/models/components/fixedpricepromotion.d.ts +1 -11
- package/esm/models/components/fixedpricepromotion.d.ts.map +1 -1
- package/esm/models/components/fixedpricepromotion.js +1 -9
- package/esm/models/components/fixedpricepromotion.js.map +1 -1
- package/esm/models/components/freegoodspromotion.d.ts +1 -11
- package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
- package/esm/models/components/freegoodspromotion.js +1 -9
- package/esm/models/components/freegoodspromotion.js.map +1 -1
- package/esm/models/components/fulfillmentpreference.d.ts +1 -7
- package/esm/models/components/fulfillmentpreference.d.ts.map +1 -1
- package/esm/models/components/fulfillmentpreference.js +3 -6
- package/esm/models/components/fulfillmentpreference.js.map +1 -1
- package/esm/models/components/fulfillmentpreferenceinput.d.ts +2 -14
- package/esm/models/components/fulfillmentpreferenceinput.d.ts.map +1 -1
- package/esm/models/components/fulfillmentpreferenceinput.js +3 -6
- package/esm/models/components/fulfillmentpreferenceinput.js.map +1 -1
- package/esm/models/components/generateotpwithemail.d.ts +1 -1
- package/esm/models/components/generateotpwithemail.d.ts.map +1 -1
- package/esm/models/components/juspayhypercheckout.d.ts +1 -1
- package/esm/models/components/juspayhypercheckout.d.ts.map +1 -1
- package/esm/models/components/juspayhypercheckoutresponse.d.ts.map +1 -1
- package/esm/models/components/juspayhypercheckoutresponse.js +2 -3
- package/esm/models/components/juspayhypercheckoutresponse.js.map +1 -1
- package/esm/models/components/juspaynetbanking.d.ts +2 -2
- package/esm/models/components/juspaynetbanking.d.ts.map +1 -1
- package/esm/models/components/juspaynewcard.d.ts +3 -3
- package/esm/models/components/juspaynewcard.d.ts.map +1 -1
- package/esm/models/components/juspaysavedcardtoken.d.ts +3 -3
- package/esm/models/components/juspaysavedcardtoken.d.ts.map +1 -1
- package/esm/models/components/juspayupicollect.d.ts +3 -3
- package/esm/models/components/juspayupicollect.d.ts.map +1 -1
- package/esm/models/components/juspayupiintent.d.ts +3 -3
- package/esm/models/components/juspayupiintent.d.ts.map +1 -1
- package/esm/models/components/multiselectattribute.d.ts +1 -1
- package/esm/models/components/multiselectattribute.d.ts.map +1 -1
- package/esm/models/components/multiselectattribute.js +1 -1
- package/esm/models/components/multiselectattribute.js.map +1 -1
- package/esm/models/components/numberattribute.d.ts +1 -1
- package/esm/models/components/numberattribute.d.ts.map +1 -1
- package/esm/models/components/numberattribute.js +1 -1
- package/esm/models/components/numberattribute.js.map +1 -1
- package/esm/models/components/partialcollectanddelivery.d.ts +1 -1
- package/esm/models/components/partialcollectanddelivery.d.ts.map +1 -1
- package/esm/models/components/partialcollectanddelivery.js +1 -1
- package/esm/models/components/partialcollectanddelivery.js.map +1 -1
- package/esm/models/components/partialcollectanddeliveryinput.d.ts +1 -1
- package/esm/models/components/partialcollectanddeliveryinput.d.ts.map +1 -1
- package/esm/models/components/payupaymentinfo.js +3 -3
- package/esm/models/components/payupaymentinfo.js.map +1 -1
- package/esm/models/components/productattribute.d.ts +1 -15
- package/esm/models/components/productattribute.d.ts.map +1 -1
- package/esm/models/components/productattribute.js +7 -15
- package/esm/models/components/productattribute.js.map +1 -1
- package/esm/models/components/productpromotion.d.ts +2 -18
- package/esm/models/components/productpromotion.d.ts.map +1 -1
- package/esm/models/components/productpromotion.js +8 -20
- package/esm/models/components/productpromotion.js.map +1 -1
- package/esm/models/components/savedpaymentmethod.d.ts +21 -21
- package/esm/models/components/savedpaymentmethod.d.ts.map +1 -1
- package/esm/models/components/savedpaymentmethod.js +21 -21
- package/esm/models/components/savedpaymentmethod.js.map +1 -1
- package/esm/models/components/singleselectattribute.d.ts +1 -1
- package/esm/models/components/singleselectattribute.d.ts.map +1 -1
- package/esm/models/components/singleselectattribute.js +1 -1
- package/esm/models/components/singleselectattribute.js.map +1 -1
- package/esm/models/components/singleselectoption.d.ts +1 -1
- package/esm/models/components/singleselectoption.d.ts.map +1 -1
- package/esm/models/components/singleselectoption.js +1 -1
- package/esm/models/components/singleselectoption.js.map +1 -1
- package/esm/models/components/textattribute.d.ts +1 -1
- package/esm/models/components/textattribute.js +1 -1
- package/esm/models/components/textattribute.js.map +1 -1
- package/esm/models/components/volumebasedpromotion.d.ts +1 -11
- package/esm/models/components/volumebasedpromotion.d.ts.map +1 -1
- package/esm/models/components/volumebasedpromotion.js +1 -9
- package/esm/models/components/volumebasedpromotion.js.map +1 -1
- package/esm/models/operations/createaddress.d.ts +1 -1
- package/esm/models/operations/createaddress.d.ts.map +1 -1
- package/esm/models/operations/generateotp.d.ts +20 -4
- package/esm/models/operations/generateotp.d.ts.map +1 -1
- package/esm/models/operations/generateotp.js +4 -2
- package/esm/models/operations/generateotp.js.map +1 -1
- package/esm/models/operations/getaddressdetail.d.ts +1 -1
- package/esm/models/operations/getaddressdetail.d.ts.map +1 -1
- package/esm/models/operations/getaddressdetail.js +1 -1
- package/esm/models/operations/getaddressdetail.js.map +1 -1
- package/esm/models/operations/getmarketplaceproductdetail.d.ts +45 -0
- package/esm/models/operations/getmarketplaceproductdetail.d.ts.map +1 -0
- package/esm/models/operations/getmarketplaceproductdetail.js +38 -0
- package/esm/models/operations/getmarketplaceproductdetail.js.map +1 -0
- package/esm/models/operations/getmarketplacevariantdetail.d.ts +50 -0
- package/esm/models/operations/getmarketplacevariantdetail.d.ts.map +1 -0
- package/esm/models/operations/getmarketplacevariantdetail.js +40 -0
- package/esm/models/operations/getmarketplacevariantdetail.js.map +1 -0
- package/esm/models/operations/index.d.ts +11 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +11 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/listaddresses.d.ts +1 -1
- package/esm/models/operations/listaddresses.d.ts.map +1 -1
- package/esm/models/operations/listaddresses.js +1 -1
- package/esm/models/operations/listaddresses.js.map +1 -1
- package/esm/models/operations/listmarketplacecategories.d.ts +59 -0
- package/esm/models/operations/listmarketplacecategories.d.ts.map +1 -0
- package/esm/models/operations/listmarketplacecategories.js +43 -0
- package/esm/models/operations/listmarketplacecategories.js.map +1 -0
- package/esm/models/operations/listmarketplacecrosssellproducts.d.ts +59 -0
- package/esm/models/operations/listmarketplacecrosssellproducts.d.ts.map +1 -0
- package/esm/models/operations/listmarketplacecrosssellproducts.js +42 -0
- package/esm/models/operations/listmarketplacecrosssellproducts.js.map +1 -0
- package/esm/models/operations/listmarketplaceproductreviews.d.ts +65 -0
- package/esm/models/operations/listmarketplaceproductreviews.d.ts.map +1 -0
- package/esm/models/operations/listmarketplaceproductreviews.js +48 -0
- package/esm/models/operations/listmarketplaceproductreviews.js.map +1 -0
- package/esm/models/operations/listmarketplaceproducts.d.ts +69 -0
- package/esm/models/operations/listmarketplaceproducts.d.ts.map +1 -0
- package/esm/models/operations/listmarketplaceproducts.js +45 -0
- package/esm/models/operations/listmarketplaceproducts.js.map +1 -0
- package/esm/models/operations/listmarketplaceproductvariants.d.ts +45 -0
- package/esm/models/operations/listmarketplaceproductvariants.d.ts.map +1 -0
- package/esm/models/operations/listmarketplaceproductvariants.js +38 -0
- package/esm/models/operations/listmarketplaceproductvariants.js.map +1 -0
- package/esm/models/operations/listmarketplacesimilarproducts.d.ts +59 -0
- package/esm/models/operations/listmarketplacesimilarproducts.d.ts.map +1 -0
- package/esm/models/operations/listmarketplacesimilarproducts.js +42 -0
- package/esm/models/operations/listmarketplacesimilarproducts.js.map +1 -0
- package/esm/models/operations/listmarketplaceskus.d.ts +69 -0
- package/esm/models/operations/listmarketplaceskus.d.ts.map +1 -0
- package/esm/models/operations/listmarketplaceskus.js +44 -0
- package/esm/models/operations/listmarketplaceskus.js.map +1 -0
- package/esm/models/operations/listmarketplaceupsellproducts.d.ts +62 -0
- package/esm/models/operations/listmarketplaceupsellproducts.d.ts.map +1 -0
- package/esm/models/operations/listmarketplaceupsellproducts.js +42 -0
- package/esm/models/operations/listmarketplaceupsellproducts.js.map +1 -0
- package/esm/models/operations/loginwithwhatsapp.d.ts +1 -1
- package/esm/models/operations/loginwithwhatsapp.d.ts.map +1 -1
- package/esm/models/operations/loginwithwhatsapp.js +1 -1
- package/esm/models/operations/loginwithwhatsapp.js.map +1 -1
- package/esm/models/operations/searchmarketplaceproducts.d.ts +56 -0
- package/esm/models/operations/searchmarketplaceproducts.d.ts.map +1 -0
- package/esm/models/operations/searchmarketplaceproducts.js +53 -0
- package/esm/models/operations/searchmarketplaceproducts.js.map +1 -0
- package/esm/models/operations/searchproducts.d.ts +4 -4
- package/esm/models/operations/searchproducts.d.ts.map +1 -1
- package/esm/models/operations/searchproducts.js +4 -4
- package/esm/models/operations/searchproducts.js.map +1 -1
- package/esm/models/operations/updateaddressdetail.d.ts +1 -1
- package/esm/models/operations/updateaddressdetail.d.ts.map +1 -1
- package/esm/sdk/marketplace.d.ts +104 -0
- package/esm/sdk/marketplace.d.ts.map +1 -0
- package/esm/sdk/marketplace.js +140 -0
- package/esm/sdk/marketplace.js.map +1 -0
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +4 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/types/enums.d.ts +8 -11
- package/esm/types/enums.d.ts.map +1 -1
- package/esm/types/enums.js +22 -2
- package/esm/types/enums.js.map +1 -1
- package/esm/types/index.d.ts +2 -2
- package/esm/types/index.d.ts.map +1 -1
- package/esm/types/index.js +1 -1
- package/esm/types/index.js.map +1 -1
- package/esm/types/unrecognized.d.ts +16 -0
- package/esm/types/unrecognized.d.ts.map +1 -0
- package/esm/types/unrecognized.js +31 -0
- package/esm/types/unrecognized.js.map +1 -0
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/marketplaceGetProductDetail.ts +198 -0
- package/src/funcs/marketplaceGetVariantDetail.ts +201 -0
- package/src/funcs/marketplaceListCategories.ts +188 -0
- package/src/funcs/marketplaceListCrosssellProducts.ts +193 -0
- package/src/funcs/marketplaceListProductReviews.ts +198 -0
- package/src/funcs/marketplaceListProductVariants.ts +199 -0
- package/src/funcs/marketplaceListProducts.ts +190 -0
- package/src/funcs/marketplaceListSimilarProducts.ts +193 -0
- package/src/funcs/marketplaceListSkus.ts +190 -0
- package/src/funcs/marketplaceListUpsellProducts.ts +193 -0
- package/src/funcs/marketplaceSearchProducts.ts +177 -0
- package/src/lib/config.ts +3 -3
- package/src/lib/encodings.ts +17 -3
- package/src/models/components/booleanattribute.ts +2 -2
- package/src/models/components/collectinstorefulfillment.ts +2 -3
- package/src/models/components/collectinstorefulfillmentinput.ts +1 -1
- package/src/models/components/colorattribute.ts +2 -2
- package/src/models/components/coloroption.ts +2 -2
- package/src/models/components/customeraddress.ts +2 -2
- package/src/models/components/customeraddressinput.ts +1 -1
- package/src/models/components/dateattribute.ts +2 -2
- package/src/models/components/deliveryfulfillment.ts +2 -2
- package/src/models/components/deliveryfulfillmentinput.ts +1 -1
- package/src/models/components/discountbasedpromotion.ts +2 -17
- package/src/models/components/fixedpricepromotion.ts +2 -18
- package/src/models/components/freegoodspromotion.ts +2 -18
- package/src/models/components/fulfillmentpreference.ts +6 -19
- package/src/models/components/fulfillmentpreferenceinput.ts +9 -26
- package/src/models/components/generateotpwithemail.ts +1 -1
- package/src/models/components/juspayhypercheckout.ts +1 -1
- package/src/models/components/juspayhypercheckoutresponse.ts +2 -3
- package/src/models/components/juspaynetbanking.ts +2 -2
- package/src/models/components/juspaynewcard.ts +3 -3
- package/src/models/components/juspaysavedcardtoken.ts +3 -3
- package/src/models/components/juspayupicollect.ts +3 -3
- package/src/models/components/juspayupiintent.ts +3 -3
- package/src/models/components/multiselectattribute.ts +2 -2
- package/src/models/components/numberattribute.ts +2 -2
- package/src/models/components/partialcollectanddelivery.ts +2 -4
- package/src/models/components/partialcollectanddeliveryinput.ts +1 -1
- package/src/models/components/payupaymentinfo.ts +3 -3
- package/src/models/components/productattribute.ts +14 -36
- package/src/models/components/productpromotion.ts +16 -48
- package/src/models/components/savedpaymentmethod.ts +42 -42
- package/src/models/components/singleselectattribute.ts +2 -2
- package/src/models/components/singleselectoption.ts +2 -2
- package/src/models/components/textattribute.ts +2 -2
- package/src/models/components/volumebasedpromotion.ts +2 -18
- package/src/models/operations/createaddress.ts +1 -1
- package/src/models/operations/generateotp.ts +20 -6
- package/src/models/operations/getaddressdetail.ts +2 -2
- package/src/models/operations/getmarketplaceproductdetail.ts +118 -0
- package/src/models/operations/getmarketplacevariantdetail.ts +125 -0
- package/src/models/operations/index.ts +11 -0
- package/src/models/operations/listaddresses.ts +2 -2
- package/src/models/operations/listmarketplacecategories.ts +131 -0
- package/src/models/operations/listmarketplacecrosssellproducts.ts +145 -0
- package/src/models/operations/listmarketplaceproductreviews.ts +148 -0
- package/src/models/operations/listmarketplaceproducts.ts +143 -0
- package/src/models/operations/listmarketplaceproductvariants.ts +118 -0
- package/src/models/operations/listmarketplacesimilarproducts.ts +136 -0
- package/src/models/operations/listmarketplaceskus.ts +139 -0
- package/src/models/operations/listmarketplaceupsellproducts.ts +139 -0
- package/src/models/operations/loginwithwhatsapp.ts +2 -2
- package/src/models/operations/searchmarketplaceproducts.ts +142 -0
- package/src/models/operations/searchproducts.ts +9 -9
- package/src/models/operations/updateaddressdetail.ts +1 -1
- package/src/sdk/marketplace.ts +229 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/types/enums.ts +38 -9
- package/src/types/index.ts +2 -2
- package/src/types/unrecognized.ts +35 -0
- package/tsconfig.json +1 -2
|
@@ -5,25 +5,14 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
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";
|
|
9
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
10
|
|
|
12
|
-
export const FreeGoodsPromotionPromotionType = {
|
|
13
|
-
Discount: "discount",
|
|
14
|
-
VolumeBased: "volume-based",
|
|
15
|
-
FixedPrice: "fixed-price",
|
|
16
|
-
FreeGoods: "free-goods",
|
|
17
|
-
} as const;
|
|
18
|
-
export type FreeGoodsPromotionPromotionType = ClosedEnum<
|
|
19
|
-
typeof FreeGoodsPromotionPromotionType
|
|
20
|
-
>;
|
|
21
|
-
|
|
22
11
|
/**
|
|
23
12
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/FreeGoodsPromotion} - API reference for the FreeGoodsPromotion schema
|
|
24
13
|
*/
|
|
25
14
|
export type FreeGoodsPromotion = {
|
|
26
|
-
promotionType
|
|
15
|
+
promotionType: "free-goods";
|
|
27
16
|
/**
|
|
28
17
|
* The quantity of items a customer must buy to receive free goods.
|
|
29
18
|
*/
|
|
@@ -34,18 +23,13 @@ export type FreeGoodsPromotion = {
|
|
|
34
23
|
getQuantity: number;
|
|
35
24
|
};
|
|
36
25
|
|
|
37
|
-
/** @internal */
|
|
38
|
-
export const FreeGoodsPromotionPromotionType$inboundSchema: z.ZodNativeEnum<
|
|
39
|
-
typeof FreeGoodsPromotionPromotionType
|
|
40
|
-
> = z.nativeEnum(FreeGoodsPromotionPromotionType);
|
|
41
|
-
|
|
42
26
|
/** @internal */
|
|
43
27
|
export const FreeGoodsPromotion$inboundSchema: z.ZodType<
|
|
44
28
|
FreeGoodsPromotion,
|
|
45
29
|
z.ZodTypeDef,
|
|
46
30
|
unknown
|
|
47
31
|
> = z.object({
|
|
48
|
-
promotion_type: z.literal("free-goods")
|
|
32
|
+
promotion_type: z.literal("free-goods"),
|
|
49
33
|
buy_quantity: z.number().int(),
|
|
50
34
|
get_quantity: z.number().int(),
|
|
51
35
|
}).transform((v) => {
|
|
@@ -23,11 +23,9 @@ import {
|
|
|
23
23
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/FulfillmentPreference} - API reference for the FulfillmentPreference schema
|
|
24
24
|
*/
|
|
25
25
|
export type FulfillmentPreference =
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| (CollectInStoreFulfillment & { fulfillmentType: "collect-in-store" })
|
|
30
|
-
| (DeliveryFulfillment & { fulfillmentType: "delivery" });
|
|
26
|
+
| CollectInStoreFulfillment
|
|
27
|
+
| DeliveryFulfillment
|
|
28
|
+
| PartialCollectAndDelivery;
|
|
31
29
|
|
|
32
30
|
/** @internal */
|
|
33
31
|
export const FulfillmentPreference$inboundSchema: z.ZodType<
|
|
@@ -35,20 +33,9 @@ export const FulfillmentPreference$inboundSchema: z.ZodType<
|
|
|
35
33
|
z.ZodTypeDef,
|
|
36
34
|
unknown
|
|
37
35
|
> = z.union([
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
),
|
|
42
|
-
CollectInStoreFulfillment$inboundSchema.and(
|
|
43
|
-
z.object({ fulfillment_type: z.literal("collect-in-store") }).transform((
|
|
44
|
-
v,
|
|
45
|
-
) => ({ fulfillmentType: v.fulfillment_type })),
|
|
46
|
-
),
|
|
47
|
-
DeliveryFulfillment$inboundSchema.and(
|
|
48
|
-
z.object({ fulfillment_type: z.literal("delivery") }).transform((v) => ({
|
|
49
|
-
fulfillmentType: v.fulfillment_type,
|
|
50
|
-
})),
|
|
51
|
-
),
|
|
36
|
+
CollectInStoreFulfillment$inboundSchema,
|
|
37
|
+
DeliveryFulfillment$inboundSchema,
|
|
38
|
+
PartialCollectAndDelivery$inboundSchema,
|
|
52
39
|
]);
|
|
53
40
|
|
|
54
41
|
export function fulfillmentPreferenceFromJSON(
|
|
@@ -23,21 +23,15 @@ import {
|
|
|
23
23
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/FulfillmentPreference} - API reference for the FulfillmentPreference schema
|
|
24
24
|
*/
|
|
25
25
|
export type FulfillmentPreferenceInput =
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| (CollectInStoreFulfillmentInput & { fulfillmentType: "collect-in-store" })
|
|
30
|
-
| (DeliveryFulfillmentInput & { fulfillmentType: "delivery" });
|
|
26
|
+
| CollectInStoreFulfillmentInput
|
|
27
|
+
| DeliveryFulfillmentInput
|
|
28
|
+
| PartialCollectAndDeliveryInput;
|
|
31
29
|
|
|
32
30
|
/** @internal */
|
|
33
31
|
export type FulfillmentPreferenceInput$Outbound =
|
|
34
|
-
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
| (CollectInStoreFulfillmentInput$Outbound & {
|
|
38
|
-
fulfillment_type: "collect-in-store";
|
|
39
|
-
})
|
|
40
|
-
| (DeliveryFulfillmentInput$Outbound & { fulfillment_type: "delivery" });
|
|
32
|
+
| CollectInStoreFulfillmentInput$Outbound
|
|
33
|
+
| DeliveryFulfillmentInput$Outbound
|
|
34
|
+
| PartialCollectAndDeliveryInput$Outbound;
|
|
41
35
|
|
|
42
36
|
/** @internal */
|
|
43
37
|
export const FulfillmentPreferenceInput$outboundSchema: z.ZodType<
|
|
@@ -45,20 +39,9 @@ export const FulfillmentPreferenceInput$outboundSchema: z.ZodType<
|
|
|
45
39
|
z.ZodTypeDef,
|
|
46
40
|
FulfillmentPreferenceInput
|
|
47
41
|
> = z.union([
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
),
|
|
52
|
-
CollectInStoreFulfillmentInput$outboundSchema.and(
|
|
53
|
-
z.object({ fulfillmentType: z.literal("collect-in-store") }).transform((
|
|
54
|
-
v,
|
|
55
|
-
) => ({ fulfillment_type: v.fulfillmentType })),
|
|
56
|
-
),
|
|
57
|
-
DeliveryFulfillmentInput$outboundSchema.and(
|
|
58
|
-
z.object({ fulfillmentType: z.literal("delivery") }).transform((v) => ({
|
|
59
|
-
fulfillment_type: v.fulfillmentType,
|
|
60
|
-
})),
|
|
61
|
-
),
|
|
42
|
+
CollectInStoreFulfillmentInput$outboundSchema,
|
|
43
|
+
DeliveryFulfillmentInput$outboundSchema,
|
|
44
|
+
PartialCollectAndDeliveryInput$outboundSchema,
|
|
62
45
|
]);
|
|
63
46
|
|
|
64
47
|
export function fulfillmentPreferenceInputToJSON(
|
|
@@ -20,7 +20,7 @@ export type GenerateOtpWithEmailOtpAction = ClosedEnum<
|
|
|
20
20
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/GenerateOtpWithEmail} - API reference for the GenerateOtpWithEmail schema
|
|
21
21
|
*/
|
|
22
22
|
export type GenerateOtpWithEmail = {
|
|
23
|
-
channel
|
|
23
|
+
channel: "email";
|
|
24
24
|
email: string;
|
|
25
25
|
otpAction: GenerateOtpWithEmailOtpAction;
|
|
26
26
|
};
|
|
@@ -16,7 +16,7 @@ export type Action = ClosedEnum<typeof Action>;
|
|
|
16
16
|
*/
|
|
17
17
|
export type JusPayHyperCheckout = {
|
|
18
18
|
paymentProviderSlug: string;
|
|
19
|
-
integrationType
|
|
19
|
+
integrationType: "hyper-checkout";
|
|
20
20
|
gatewayReferenceId: string;
|
|
21
21
|
returnUrl: string;
|
|
22
22
|
action: Action;
|
|
@@ -158,12 +158,11 @@ export const Payload$inboundSchema: z.ZodType<Payload, z.ZodTypeDef, unknown> =
|
|
|
158
158
|
customerEmail: z.string().optional(),
|
|
159
159
|
currency: z.string().optional(),
|
|
160
160
|
description: z.string().optional(),
|
|
161
|
-
"options.createMandate": z.literal("REQUIRED").
|
|
162
|
-
.optional(),
|
|
161
|
+
"options.createMandate": z.literal("REQUIRED").optional(),
|
|
163
162
|
"mandate.maxAmount": z.string().optional(),
|
|
164
163
|
"mandate.start_date ": z.string().optional(),
|
|
165
164
|
"mandate.end_date ": z.string().optional(),
|
|
166
|
-
"mandate.frequency": z.literal("MONTHLY").
|
|
165
|
+
"mandate.frequency": z.literal("MONTHLY").optional(),
|
|
167
166
|
"mandate.rule_value ": MandateRuleValue$inboundSchema.optional(),
|
|
168
167
|
}).transform((v) => {
|
|
169
168
|
return remap$(v, {
|
|
@@ -10,12 +10,12 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
10
10
|
*/
|
|
11
11
|
export type JuspayNetBanking = {
|
|
12
12
|
paymentProviderSlug: string;
|
|
13
|
-
integrationType
|
|
13
|
+
integrationType: "express-checkout";
|
|
14
14
|
gatewayReferenceId: string;
|
|
15
15
|
returnUrl: string;
|
|
16
16
|
redirectAfterPayment?: boolean | undefined;
|
|
17
17
|
getClientAuthToken?: boolean | undefined;
|
|
18
|
-
paymentMethodType
|
|
18
|
+
paymentMethodType: "NB";
|
|
19
19
|
paymentMethod: string;
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -17,14 +17,14 @@ export type PaymentMethod = ClosedEnum<typeof PaymentMethod>;
|
|
|
17
17
|
*/
|
|
18
18
|
export type JusPayNewCard = {
|
|
19
19
|
paymentProviderSlug: string;
|
|
20
|
-
integrationType
|
|
20
|
+
integrationType: "express-checkout";
|
|
21
21
|
gatewayReferenceId: string;
|
|
22
22
|
returnUrl: string;
|
|
23
23
|
redirectAfterPayment?: boolean | undefined;
|
|
24
24
|
getClientAuthToken?: boolean | undefined;
|
|
25
|
-
authType
|
|
25
|
+
authType: "OTP";
|
|
26
26
|
saveToLocker: boolean;
|
|
27
|
-
paymentMethodType
|
|
27
|
+
paymentMethodType: "CARD";
|
|
28
28
|
paymentMethod: PaymentMethod;
|
|
29
29
|
cardNumber: string;
|
|
30
30
|
cardExpMonth: string;
|
|
@@ -19,14 +19,14 @@ export type JusPaySavedCardTokenPaymentMethod = ClosedEnum<
|
|
|
19
19
|
*/
|
|
20
20
|
export type JusPaySavedCardToken = {
|
|
21
21
|
paymentProviderSlug: string;
|
|
22
|
-
integrationType
|
|
22
|
+
integrationType: "express-checkout";
|
|
23
23
|
gatewayReferenceId: string;
|
|
24
24
|
returnUrl: string;
|
|
25
25
|
redirectAfterPayment?: boolean | undefined;
|
|
26
26
|
getClientAuthToken?: boolean | undefined;
|
|
27
|
-
authType
|
|
27
|
+
authType: "OTP";
|
|
28
28
|
saveToLocker: boolean;
|
|
29
|
-
paymentMethodType
|
|
29
|
+
paymentMethodType: "CARD";
|
|
30
30
|
paymentMethod: JusPaySavedCardTokenPaymentMethod;
|
|
31
31
|
cardToken: string;
|
|
32
32
|
cardSecurityCode: string;
|
|
@@ -10,13 +10,13 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
10
10
|
*/
|
|
11
11
|
export type JuspayUpiCollect = {
|
|
12
12
|
paymentProviderSlug: string;
|
|
13
|
-
integrationType
|
|
13
|
+
integrationType: "express-checkout";
|
|
14
14
|
gatewayReferenceId: string;
|
|
15
15
|
returnUrl: string;
|
|
16
16
|
redirectAfterPayment?: boolean | undefined;
|
|
17
17
|
getClientAuthToken?: boolean | undefined;
|
|
18
|
-
paymentMethodType
|
|
19
|
-
paymentMethod
|
|
18
|
+
paymentMethodType: "UPI";
|
|
19
|
+
paymentMethod: "UPI_COLLECT";
|
|
20
20
|
upiVpa: string;
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -10,13 +10,13 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
10
10
|
*/
|
|
11
11
|
export type JuspayUpiIntent = {
|
|
12
12
|
paymentProviderSlug: string;
|
|
13
|
-
integrationType
|
|
13
|
+
integrationType: "express-checkout";
|
|
14
14
|
gatewayReferenceId: string;
|
|
15
15
|
returnUrl: string;
|
|
16
16
|
redirectAfterPayment?: boolean | undefined;
|
|
17
17
|
getClientAuthToken?: boolean | undefined;
|
|
18
|
-
paymentMethodType
|
|
19
|
-
paymentMethod
|
|
18
|
+
paymentMethodType: "UPI";
|
|
19
|
+
paymentMethod: "UPI_PAY";
|
|
20
20
|
sdkParams: boolean;
|
|
21
21
|
upiApp: string;
|
|
22
22
|
};
|
|
@@ -19,7 +19,7 @@ export type MultiSelectAttribute = {
|
|
|
19
19
|
* A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
|
|
20
20
|
*/
|
|
21
21
|
key: string;
|
|
22
|
-
type:
|
|
22
|
+
type: "multi-select";
|
|
23
23
|
/**
|
|
24
24
|
* For multi-select attributes
|
|
25
25
|
*/
|
|
@@ -35,7 +35,7 @@ export const MultiSelectAttribute$inboundSchema: z.ZodType<
|
|
|
35
35
|
id: z.string(),
|
|
36
36
|
name: z.string(),
|
|
37
37
|
key: z.string(),
|
|
38
|
-
type: z.
|
|
38
|
+
type: z.literal("multi-select"),
|
|
39
39
|
value: z.array(z.string()),
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -19,7 +19,7 @@ export type NumberAttribute = {
|
|
|
19
19
|
* A lookup safe version of the name that is lowercased and spaces are replaced with underscores. For instance, if name is `Product Type`, key will be `product_type`
|
|
20
20
|
*/
|
|
21
21
|
key: string;
|
|
22
|
-
type:
|
|
22
|
+
type: "number";
|
|
23
23
|
/**
|
|
24
24
|
* For numeric attributes
|
|
25
25
|
*/
|
|
@@ -35,7 +35,7 @@ export const NumberAttribute$inboundSchema: z.ZodType<
|
|
|
35
35
|
id: z.string(),
|
|
36
36
|
name: z.string(),
|
|
37
37
|
key: z.string(),
|
|
38
|
-
type: z.
|
|
38
|
+
type: z.literal("number"),
|
|
39
39
|
value: z.number(),
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -39,7 +39,7 @@ export type Delivery = {
|
|
|
39
39
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/PartialCollectAndDelivery} - API reference for the PartialCollectAndDelivery schema
|
|
40
40
|
*/
|
|
41
41
|
export type PartialCollectAndDelivery = {
|
|
42
|
-
fulfillmentType
|
|
42
|
+
fulfillmentType: "partial-collect-and-delivery";
|
|
43
43
|
preferenceType?: PartialCollectAndDeliveryPreferenceType | undefined;
|
|
44
44
|
collectInStore: PartialCollectAndDeliveryCollectInStore;
|
|
45
45
|
delivery: Delivery;
|
|
@@ -118,9 +118,7 @@ export const PartialCollectAndDelivery$inboundSchema: z.ZodType<
|
|
|
118
118
|
z.ZodTypeDef,
|
|
119
119
|
unknown
|
|
120
120
|
> = z.object({
|
|
121
|
-
fulfillment_type: z.literal("partial-collect-and-delivery")
|
|
122
|
-
"partial-collect-and-delivery",
|
|
123
|
-
).optional(),
|
|
121
|
+
fulfillment_type: z.literal("partial-collect-and-delivery"),
|
|
124
122
|
preference_type: PartialCollectAndDeliveryPreferenceType$inboundSchema
|
|
125
123
|
.optional(),
|
|
126
124
|
"collect-in-store": z.lazy(() =>
|
|
@@ -25,7 +25,7 @@ export type PartialCollectAndDeliveryDelivery = {
|
|
|
25
25
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/PartialCollectAndDelivery} - API reference for the PartialCollectAndDelivery schema
|
|
26
26
|
*/
|
|
27
27
|
export type PartialCollectAndDeliveryInput = {
|
|
28
|
-
fulfillmentType
|
|
28
|
+
fulfillmentType: "partial-collect-and-delivery";
|
|
29
29
|
collectInStore: PartialCollectAndDeliveryCollectInStoreInput;
|
|
30
30
|
delivery: PartialCollectAndDeliveryDelivery;
|
|
31
31
|
};
|
|
@@ -84,8 +84,8 @@ export const SiDetails$inboundSchema: z.ZodType<
|
|
|
84
84
|
unknown
|
|
85
85
|
> = z.object({
|
|
86
86
|
billingAmount: z.number().optional(),
|
|
87
|
-
billingCurrency: z.literal("INR").
|
|
88
|
-
billingCycle: z.literal("MONTHLY").
|
|
87
|
+
billingCurrency: z.literal("INR").optional(),
|
|
88
|
+
billingCycle: z.literal("MONTHLY").optional(),
|
|
89
89
|
billingInterval: z.number().int().optional(),
|
|
90
90
|
paymentStartDate: z.string().transform(v => new RFCDate(v)).optional(),
|
|
91
91
|
paymentEndDate: z.string().transform(v => new RFCDate(v)).optional(),
|
|
@@ -115,7 +115,7 @@ export const PayuPaymentInfo$inboundSchema: z.ZodType<
|
|
|
115
115
|
lastname: z.string().optional(),
|
|
116
116
|
email: z.string().optional(),
|
|
117
117
|
phone: z.string().optional(),
|
|
118
|
-
si: z.literal(1).
|
|
118
|
+
si: z.literal(1).optional(),
|
|
119
119
|
si_details: z.lazy(() => SiDetails$inboundSchema).optional(),
|
|
120
120
|
furl: z.string().optional(),
|
|
121
121
|
surl: z.string().optional(),
|
|
@@ -33,13 +33,13 @@ import { TextAttribute, TextAttribute$inboundSchema } from "./textattribute.js";
|
|
|
33
33
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/ProductAttribute} - API reference for the ProductAttribute schema
|
|
34
34
|
*/
|
|
35
35
|
export type ProductAttribute =
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
|
|
|
42
|
-
|
|
|
36
|
+
| ColorAttribute
|
|
37
|
+
| SingleSelectAttribute
|
|
38
|
+
| MultiSelectAttribute
|
|
39
|
+
| TextAttribute
|
|
40
|
+
| DateAttribute
|
|
41
|
+
| NumberAttribute
|
|
42
|
+
| BooleanAttribute;
|
|
43
43
|
|
|
44
44
|
/** @internal */
|
|
45
45
|
export const ProductAttribute$inboundSchema: z.ZodType<
|
|
@@ -47,35 +47,13 @@ export const ProductAttribute$inboundSchema: z.ZodType<
|
|
|
47
47
|
z.ZodTypeDef,
|
|
48
48
|
unknown
|
|
49
49
|
> = z.union([
|
|
50
|
-
ColorAttribute$inboundSchema
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
),
|
|
58
|
-
MultiSelectAttribute$inboundSchema.and(
|
|
59
|
-
z.object({ type: z.literal("multi-select") }).transform((v) => ({
|
|
60
|
-
type: v.type,
|
|
61
|
-
})),
|
|
62
|
-
),
|
|
63
|
-
TextAttribute$inboundSchema.and(
|
|
64
|
-
z.object({ type: z.literal("text") }).transform((v) => ({ type: v.type })),
|
|
65
|
-
),
|
|
66
|
-
DateAttribute$inboundSchema.and(
|
|
67
|
-
z.object({ type: z.literal("date") }).transform((v) => ({ type: v.type })),
|
|
68
|
-
),
|
|
69
|
-
NumberAttribute$inboundSchema.and(
|
|
70
|
-
z.object({ type: z.literal("number") }).transform((v) => ({
|
|
71
|
-
type: v.type,
|
|
72
|
-
})),
|
|
73
|
-
),
|
|
74
|
-
BooleanAttribute$inboundSchema.and(
|
|
75
|
-
z.object({ type: z.literal("boolean") }).transform((v) => ({
|
|
76
|
-
type: v.type,
|
|
77
|
-
})),
|
|
78
|
-
),
|
|
50
|
+
ColorAttribute$inboundSchema,
|
|
51
|
+
SingleSelectAttribute$inboundSchema,
|
|
52
|
+
MultiSelectAttribute$inboundSchema,
|
|
53
|
+
TextAttribute$inboundSchema,
|
|
54
|
+
DateAttribute$inboundSchema,
|
|
55
|
+
NumberAttribute$inboundSchema,
|
|
56
|
+
BooleanAttribute$inboundSchema,
|
|
79
57
|
]);
|
|
80
58
|
|
|
81
59
|
export function productAttributeFromJSON(
|
|
@@ -25,10 +25,10 @@ import {
|
|
|
25
25
|
} from "./volumebasedpromotion.js";
|
|
26
26
|
|
|
27
27
|
export type Details =
|
|
28
|
-
|
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
|
28
|
+
| DiscountBasedPromotion
|
|
29
|
+
| FixedPricePromotion
|
|
30
|
+
| VolumeBasedPromotion
|
|
31
|
+
| FreeGoodsPromotion;
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/ProductPromotion} - API reference for the ProductPromotion schema
|
|
@@ -38,35 +38,19 @@ export type ProductPromotion = {
|
|
|
38
38
|
startsAt: Date;
|
|
39
39
|
expiresAt: Date | null;
|
|
40
40
|
details:
|
|
41
|
-
|
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
41
|
+
| DiscountBasedPromotion
|
|
42
|
+
| FixedPricePromotion
|
|
43
|
+
| VolumeBasedPromotion
|
|
44
|
+
| FreeGoodsPromotion;
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
/** @internal */
|
|
48
48
|
export const Details$inboundSchema: z.ZodType<Details, z.ZodTypeDef, unknown> =
|
|
49
49
|
z.union([
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
),
|
|
55
|
-
DiscountBasedPromotion$inboundSchema.and(
|
|
56
|
-
z.object({ promotion_type: z.literal("discount") }).transform((v) => ({
|
|
57
|
-
promotionType: v.promotion_type,
|
|
58
|
-
})),
|
|
59
|
-
),
|
|
60
|
-
FixedPricePromotion$inboundSchema.and(
|
|
61
|
-
z.object({ promotion_type: z.literal("fixed-price") }).transform((v) => ({
|
|
62
|
-
promotionType: v.promotion_type,
|
|
63
|
-
})),
|
|
64
|
-
),
|
|
65
|
-
VolumeBasedPromotion$inboundSchema.and(
|
|
66
|
-
z.object({ promotion_type: z.literal("volume-based") }).transform((
|
|
67
|
-
v,
|
|
68
|
-
) => ({ promotionType: v.promotion_type })),
|
|
69
|
-
),
|
|
50
|
+
DiscountBasedPromotion$inboundSchema,
|
|
51
|
+
FixedPricePromotion$inboundSchema,
|
|
52
|
+
VolumeBasedPromotion$inboundSchema,
|
|
53
|
+
FreeGoodsPromotion$inboundSchema,
|
|
70
54
|
]);
|
|
71
55
|
|
|
72
56
|
export function detailsFromJSON(
|
|
@@ -91,26 +75,10 @@ export const ProductPromotion$inboundSchema: z.ZodType<
|
|
|
91
75
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
92
76
|
),
|
|
93
77
|
details: z.union([
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
),
|
|
99
|
-
DiscountBasedPromotion$inboundSchema.and(
|
|
100
|
-
z.object({ promotion_type: z.literal("discount") }).transform((v) => ({
|
|
101
|
-
promotionType: v.promotion_type,
|
|
102
|
-
})),
|
|
103
|
-
),
|
|
104
|
-
FixedPricePromotion$inboundSchema.and(
|
|
105
|
-
z.object({ promotion_type: z.literal("fixed-price") }).transform((v) => ({
|
|
106
|
-
promotionType: v.promotion_type,
|
|
107
|
-
})),
|
|
108
|
-
),
|
|
109
|
-
VolumeBasedPromotion$inboundSchema.and(
|
|
110
|
-
z.object({ promotion_type: z.literal("volume-based") }).transform((
|
|
111
|
-
v,
|
|
112
|
-
) => ({ promotionType: v.promotion_type })),
|
|
113
|
-
),
|
|
78
|
+
DiscountBasedPromotion$inboundSchema,
|
|
79
|
+
FixedPricePromotion$inboundSchema,
|
|
80
|
+
VolumeBasedPromotion$inboundSchema,
|
|
81
|
+
FreeGoodsPromotion$inboundSchema,
|
|
114
82
|
]),
|
|
115
83
|
}).transform((v) => {
|
|
116
84
|
return remap$(v, {
|