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
|
@@ -9,14 +9,14 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
10
|
|
|
11
11
|
export type UpiCollect = {
|
|
12
|
-
count
|
|
13
|
-
lastUsed
|
|
14
|
-
vpa
|
|
12
|
+
count: number;
|
|
13
|
+
lastUsed: string;
|
|
14
|
+
vpa: string;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
export type Metadata = {
|
|
18
18
|
mobileNumber?: string | undefined;
|
|
19
|
-
deviceId
|
|
19
|
+
deviceId: string;
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export type SubDetails = {
|
|
@@ -38,32 +38,32 @@ export type Wallet = {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export type SavedPaymentMethodMetadata = {
|
|
41
|
-
originMerchantId
|
|
41
|
+
originMerchantId: string;
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
export type Card = {
|
|
45
|
-
cardSubType
|
|
46
|
-
extendedCardType
|
|
45
|
+
cardSubType: string;
|
|
46
|
+
extendedCardType: string;
|
|
47
47
|
cardGlobalFingerprint?: string | undefined;
|
|
48
48
|
nickname?: string | undefined;
|
|
49
|
-
providerCategory
|
|
50
|
-
vaultProvider
|
|
49
|
+
providerCategory: string;
|
|
50
|
+
vaultProvider: string;
|
|
51
51
|
cardReference?: string | undefined;
|
|
52
|
-
cardType
|
|
52
|
+
cardType: string;
|
|
53
53
|
metadata?: SavedPaymentMethodMetadata | undefined;
|
|
54
54
|
cardIssuer?: string | undefined;
|
|
55
|
-
cardToken
|
|
56
|
-
cardExpMonth
|
|
55
|
+
cardToken: string;
|
|
56
|
+
cardExpMonth: string;
|
|
57
57
|
provider?: string | undefined;
|
|
58
58
|
cardSubTypeCategory?: string | undefined;
|
|
59
|
-
expired
|
|
59
|
+
expired: boolean;
|
|
60
60
|
cardFingerprint?: string | undefined;
|
|
61
|
-
tokenizeSupport
|
|
61
|
+
tokenizeSupport: boolean;
|
|
62
62
|
juspayBankCode?: string | undefined;
|
|
63
|
-
cardExpYear
|
|
64
|
-
nameOnCard
|
|
65
|
-
countryCode
|
|
66
|
-
cardNumber
|
|
63
|
+
cardExpYear: string;
|
|
64
|
+
nameOnCard: string;
|
|
65
|
+
countryCode: string;
|
|
66
|
+
cardNumber: string;
|
|
67
67
|
cardIsin?: string | undefined;
|
|
68
68
|
cardBrand?: string | undefined;
|
|
69
69
|
cardIssuerCountry?: string | undefined;
|
|
@@ -73,9 +73,9 @@ export type Card = {
|
|
|
73
73
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/SavedPaymentMethod} - API reference for the SavedPaymentMethod schema
|
|
74
74
|
*/
|
|
75
75
|
export type SavedPaymentMethod = {
|
|
76
|
-
upiCollect
|
|
77
|
-
wallet
|
|
78
|
-
card
|
|
76
|
+
upiCollect: Array<UpiCollect>;
|
|
77
|
+
wallet: Array<Wallet>;
|
|
78
|
+
card: Array<Card>;
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
/** @internal */
|
|
@@ -84,9 +84,9 @@ export const UpiCollect$inboundSchema: z.ZodType<
|
|
|
84
84
|
z.ZodTypeDef,
|
|
85
85
|
unknown
|
|
86
86
|
> = z.object({
|
|
87
|
-
count: z.number().int()
|
|
88
|
-
last_used: z.string()
|
|
89
|
-
vpa: z.string()
|
|
87
|
+
count: z.number().int(),
|
|
88
|
+
last_used: z.string(),
|
|
89
|
+
vpa: z.string(),
|
|
90
90
|
}).transform((v) => {
|
|
91
91
|
return remap$(v, {
|
|
92
92
|
"last_used": "lastUsed",
|
|
@@ -110,7 +110,7 @@ export const Metadata$inboundSchema: z.ZodType<
|
|
|
110
110
|
unknown
|
|
111
111
|
> = z.object({
|
|
112
112
|
"mobile_Number ": z.string().optional(),
|
|
113
|
-
"device_Id ": z.string()
|
|
113
|
+
"device_Id ": z.string(),
|
|
114
114
|
}).transform((v) => {
|
|
115
115
|
return remap$(v, {
|
|
116
116
|
"mobile_Number ": "mobileNumber",
|
|
@@ -197,7 +197,7 @@ export const SavedPaymentMethodMetadata$inboundSchema: z.ZodType<
|
|
|
197
197
|
z.ZodTypeDef,
|
|
198
198
|
unknown
|
|
199
199
|
> = z.object({
|
|
200
|
-
origin_merchant_id: z.string()
|
|
200
|
+
origin_merchant_id: z.string(),
|
|
201
201
|
}).transform((v) => {
|
|
202
202
|
return remap$(v, {
|
|
203
203
|
"origin_merchant_id": "originMerchantId",
|
|
@@ -217,28 +217,28 @@ export function savedPaymentMethodMetadataFromJSON(
|
|
|
217
217
|
/** @internal */
|
|
218
218
|
export const Card$inboundSchema: z.ZodType<Card, z.ZodTypeDef, unknown> = z
|
|
219
219
|
.object({
|
|
220
|
-
card_sub_type: z.string()
|
|
221
|
-
extended_card_type: z.string()
|
|
220
|
+
card_sub_type: z.string(),
|
|
221
|
+
extended_card_type: z.string(),
|
|
222
222
|
card_global_fingerprint: z.string().optional(),
|
|
223
223
|
nickname: z.string().optional(),
|
|
224
|
-
provider_category: z.string()
|
|
225
|
-
vault_provider: z.string()
|
|
224
|
+
provider_category: z.string(),
|
|
225
|
+
vault_provider: z.string(),
|
|
226
226
|
card_reference: z.string().optional(),
|
|
227
|
-
card_type: z.string()
|
|
227
|
+
card_type: z.string(),
|
|
228
228
|
metadata: z.lazy(() => SavedPaymentMethodMetadata$inboundSchema).optional(),
|
|
229
229
|
card_issuer: z.string().optional(),
|
|
230
|
-
card_token: z.string()
|
|
231
|
-
card_exp_month: z.string()
|
|
230
|
+
card_token: z.string(),
|
|
231
|
+
card_exp_month: z.string(),
|
|
232
232
|
provider: z.string().optional(),
|
|
233
233
|
card_sub_type_category: z.string().optional(),
|
|
234
|
-
expired: z.boolean()
|
|
234
|
+
expired: z.boolean(),
|
|
235
235
|
card_fingerprint: z.string().optional(),
|
|
236
|
-
tokenize_support: z.boolean()
|
|
236
|
+
tokenize_support: z.boolean(),
|
|
237
237
|
juspay_bank_code: z.string().optional(),
|
|
238
|
-
card_exp_year: z.string()
|
|
239
|
-
name_on_card: z.string()
|
|
240
|
-
country_code: z.string()
|
|
241
|
-
card_number: z.string()
|
|
238
|
+
card_exp_year: z.string(),
|
|
239
|
+
name_on_card: z.string(),
|
|
240
|
+
country_code: z.string(),
|
|
241
|
+
card_number: z.string(),
|
|
242
242
|
card_isin: z.string().optional(),
|
|
243
243
|
card_brand: z.string().optional(),
|
|
244
244
|
card_issuer_country: z.string().optional(),
|
|
@@ -284,9 +284,9 @@ export const SavedPaymentMethod$inboundSchema: z.ZodType<
|
|
|
284
284
|
z.ZodTypeDef,
|
|
285
285
|
unknown
|
|
286
286
|
> = z.object({
|
|
287
|
-
UPI_COLLECT: z.array(z.lazy(() => UpiCollect$inboundSchema))
|
|
288
|
-
WALLET: z.array(z.lazy(() => Wallet$inboundSchema))
|
|
289
|
-
CARD: z.array(z.lazy(() => Card$inboundSchema))
|
|
287
|
+
UPI_COLLECT: z.array(z.lazy(() => UpiCollect$inboundSchema)),
|
|
288
|
+
WALLET: z.array(z.lazy(() => Wallet$inboundSchema)),
|
|
289
|
+
CARD: z.array(z.lazy(() => Card$inboundSchema)),
|
|
290
290
|
}).transform((v) => {
|
|
291
291
|
return remap$(v, {
|
|
292
292
|
"UPI_COLLECT": "upiCollect",
|
|
@@ -19,7 +19,7 @@ export type SingleSelectAttribute = {
|
|
|
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: "single-select";
|
|
23
23
|
/**
|
|
24
24
|
* For single-select attributes
|
|
25
25
|
*/
|
|
@@ -35,7 +35,7 @@ export const SingleSelectAttribute$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("single-select"),
|
|
39
39
|
value: z.string(),
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -18,7 +18,7 @@ export type SingleSelectOption = {
|
|
|
18
18
|
/**
|
|
19
19
|
* The type of the associated option.
|
|
20
20
|
*/
|
|
21
|
-
type
|
|
21
|
+
type: "single-select";
|
|
22
22
|
/**
|
|
23
23
|
* The value of the associated option
|
|
24
24
|
*/
|
|
@@ -32,7 +32,7 @@ export const SingleSelectOption$inboundSchema: z.ZodType<
|
|
|
32
32
|
unknown
|
|
33
33
|
> = z.object({
|
|
34
34
|
name: z.string(),
|
|
35
|
-
type: z.literal("single-select")
|
|
35
|
+
type: z.literal("single-select"),
|
|
36
36
|
value: z.string(),
|
|
37
37
|
});
|
|
38
38
|
|
|
@@ -19,7 +19,7 @@ export type TextAttribute = {
|
|
|
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: "text";
|
|
23
23
|
/**
|
|
24
24
|
* For text attributes
|
|
25
25
|
*/
|
|
@@ -35,7 +35,7 @@ export const TextAttribute$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("text"),
|
|
39
39
|
value: z.string(),
|
|
40
40
|
});
|
|
41
41
|
|
|
@@ -5,20 +5,9 @@
|
|
|
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 VolumeBasedPromotionPromotionType = {
|
|
13
|
-
Discount: "discount",
|
|
14
|
-
VolumeBased: "volume-based",
|
|
15
|
-
FixedPrice: "fixed-price",
|
|
16
|
-
FreeGoods: "free-goods",
|
|
17
|
-
} as const;
|
|
18
|
-
export type VolumeBasedPromotionPromotionType = ClosedEnum<
|
|
19
|
-
typeof VolumeBasedPromotionPromotionType
|
|
20
|
-
>;
|
|
21
|
-
|
|
22
11
|
export type Slabs = {
|
|
23
12
|
/**
|
|
24
13
|
* The minimum quantity required to qualify for the discount.
|
|
@@ -34,15 +23,10 @@ export type Slabs = {
|
|
|
34
23
|
* @see {@link https://llm-docs.commercengine.io/storefront/schemas/VolumeBasedPromotion} - API reference for the VolumeBasedPromotion schema
|
|
35
24
|
*/
|
|
36
25
|
export type VolumeBasedPromotion = {
|
|
37
|
-
promotionType
|
|
26
|
+
promotionType: "volume-based";
|
|
38
27
|
slabs: Array<Slabs>;
|
|
39
28
|
};
|
|
40
29
|
|
|
41
|
-
/** @internal */
|
|
42
|
-
export const VolumeBasedPromotionPromotionType$inboundSchema: z.ZodNativeEnum<
|
|
43
|
-
typeof VolumeBasedPromotionPromotionType
|
|
44
|
-
> = z.nativeEnum(VolumeBasedPromotionPromotionType);
|
|
45
|
-
|
|
46
30
|
/** @internal */
|
|
47
31
|
export const Slabs$inboundSchema: z.ZodType<Slabs, z.ZodTypeDef, unknown> = z
|
|
48
32
|
.object({
|
|
@@ -71,7 +55,7 @@ export const VolumeBasedPromotion$inboundSchema: z.ZodType<
|
|
|
71
55
|
z.ZodTypeDef,
|
|
72
56
|
unknown
|
|
73
57
|
> = z.object({
|
|
74
|
-
promotion_type: z.literal("volume-based")
|
|
58
|
+
promotion_type: z.literal("volume-based"),
|
|
75
59
|
slabs: z.array(z.lazy(() => Slabs$inboundSchema)),
|
|
76
60
|
}).transform((v) => {
|
|
77
61
|
return remap$(v, {
|
|
@@ -10,7 +10,8 @@ import * as components from "../components/index.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
12
|
export type GenerateOtpRequestBody =
|
|
13
|
-
| components.GenerateOtpWithPhone
|
|
13
|
+
| (components.GenerateOtpWithPhone & { channel: "sms" })
|
|
14
|
+
| (components.GenerateOtpWithPhone & { channel: "whatsapp" })
|
|
14
15
|
| components.GenerateOtpWithEmail;
|
|
15
16
|
|
|
16
17
|
export type GenerateOtpRequest = {
|
|
@@ -19,7 +20,8 @@ export type GenerateOtpRequest = {
|
|
|
19
20
|
*/
|
|
20
21
|
xDebugMode?: boolean | undefined;
|
|
21
22
|
requestBody:
|
|
22
|
-
| components.GenerateOtpWithPhone
|
|
23
|
+
| (components.GenerateOtpWithPhone & { channel: "sms" })
|
|
24
|
+
| (components.GenerateOtpWithPhone & { channel: "whatsapp" })
|
|
23
25
|
| components.GenerateOtpWithEmail;
|
|
24
26
|
};
|
|
25
27
|
|
|
@@ -57,7 +59,8 @@ export type GenerateOtpResponseBody = {
|
|
|
57
59
|
|
|
58
60
|
/** @internal */
|
|
59
61
|
export type GenerateOtpRequestBody$Outbound =
|
|
60
|
-
| components.GenerateOtpWithPhone$Outbound
|
|
62
|
+
| (components.GenerateOtpWithPhone$Outbound & { channel: "sms" })
|
|
63
|
+
| (components.GenerateOtpWithPhone$Outbound & { channel: "whatsapp" })
|
|
61
64
|
| components.GenerateOtpWithEmail$Outbound;
|
|
62
65
|
|
|
63
66
|
/** @internal */
|
|
@@ -66,7 +69,12 @@ export const GenerateOtpRequestBody$outboundSchema: z.ZodType<
|
|
|
66
69
|
z.ZodTypeDef,
|
|
67
70
|
GenerateOtpRequestBody
|
|
68
71
|
> = z.union([
|
|
69
|
-
components.GenerateOtpWithPhone$outboundSchema
|
|
72
|
+
components.GenerateOtpWithPhone$outboundSchema.and(
|
|
73
|
+
z.object({ channel: z.literal("sms") }),
|
|
74
|
+
),
|
|
75
|
+
components.GenerateOtpWithPhone$outboundSchema.and(
|
|
76
|
+
z.object({ channel: z.literal("whatsapp") }),
|
|
77
|
+
),
|
|
70
78
|
components.GenerateOtpWithEmail$outboundSchema,
|
|
71
79
|
]);
|
|
72
80
|
|
|
@@ -82,7 +90,8 @@ export function generateOtpRequestBodyToJSON(
|
|
|
82
90
|
export type GenerateOtpRequest$Outbound = {
|
|
83
91
|
"x-debug-mode"?: boolean | undefined;
|
|
84
92
|
RequestBody:
|
|
85
|
-
| components.GenerateOtpWithPhone$Outbound
|
|
93
|
+
| (components.GenerateOtpWithPhone$Outbound & { channel: "sms" })
|
|
94
|
+
| (components.GenerateOtpWithPhone$Outbound & { channel: "whatsapp" })
|
|
86
95
|
| components.GenerateOtpWithEmail$Outbound;
|
|
87
96
|
};
|
|
88
97
|
|
|
@@ -94,7 +103,12 @@ export const GenerateOtpRequest$outboundSchema: z.ZodType<
|
|
|
94
103
|
> = z.object({
|
|
95
104
|
xDebugMode: z.boolean().optional(),
|
|
96
105
|
requestBody: z.union([
|
|
97
|
-
components.GenerateOtpWithPhone$outboundSchema
|
|
106
|
+
components.GenerateOtpWithPhone$outboundSchema.and(
|
|
107
|
+
z.object({ channel: z.literal("sms") }),
|
|
108
|
+
),
|
|
109
|
+
components.GenerateOtpWithPhone$outboundSchema.and(
|
|
110
|
+
z.object({ channel: z.literal("whatsapp") }),
|
|
111
|
+
),
|
|
98
112
|
components.GenerateOtpWithEmail$outboundSchema,
|
|
99
113
|
]),
|
|
100
114
|
}).transform((v) => {
|
|
@@ -46,7 +46,7 @@ export type Address = {
|
|
|
46
46
|
pincode: string;
|
|
47
47
|
city: string;
|
|
48
48
|
state: string;
|
|
49
|
-
country
|
|
49
|
+
country: "India";
|
|
50
50
|
/**
|
|
51
51
|
* Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
|
|
52
52
|
*/
|
|
@@ -118,7 +118,7 @@ export const Address$inboundSchema: z.ZodType<Address, z.ZodTypeDef, unknown> =
|
|
|
118
118
|
pincode: z.string(),
|
|
119
119
|
city: z.string(),
|
|
120
120
|
state: z.string(),
|
|
121
|
-
country: z.literal("India")
|
|
121
|
+
country: z.literal("India"),
|
|
122
122
|
tax_identification_number: z.nullable(z.string()),
|
|
123
123
|
business_name: z.nullable(z.string()),
|
|
124
124
|
is_phone_verified: z.boolean(),
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type GetMarketplaceProductDetailRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* This param is used to determine product pricing, promotions, and subscription rates. If a valid customer group id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer group id, the system will fall back to the default customer group id. If no data is found for the default group either, the highest applicable price will be returned.
|
|
15
|
+
*/
|
|
16
|
+
xCustomerGroupId?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Determines whether to include or exlude inventory details in response json
|
|
19
|
+
*/
|
|
20
|
+
inventory?: boolean | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The unique identifier of the product. Can be either the product ID or the slug.
|
|
23
|
+
*/
|
|
24
|
+
productIdOrSlug: string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type GetMarketplaceProductDetailContent = {
|
|
28
|
+
product: components.ProductDetail;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Success response
|
|
33
|
+
*/
|
|
34
|
+
export type GetMarketplaceProductDetailResponseBody = {
|
|
35
|
+
message: string;
|
|
36
|
+
success: boolean;
|
|
37
|
+
content: GetMarketplaceProductDetailContent;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type GetMarketplaceProductDetailRequest$Outbound = {
|
|
42
|
+
"x-customer-group-id"?: string | undefined;
|
|
43
|
+
inventory?: boolean | undefined;
|
|
44
|
+
product_id_or_slug: string;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const GetMarketplaceProductDetailRequest$outboundSchema: z.ZodType<
|
|
49
|
+
GetMarketplaceProductDetailRequest$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
GetMarketplaceProductDetailRequest
|
|
52
|
+
> = z.object({
|
|
53
|
+
xCustomerGroupId: z.string().optional(),
|
|
54
|
+
inventory: z.boolean().optional(),
|
|
55
|
+
productIdOrSlug: z.string(),
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
xCustomerGroupId: "x-customer-group-id",
|
|
59
|
+
productIdOrSlug: "product_id_or_slug",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export function getMarketplaceProductDetailRequestToJSON(
|
|
64
|
+
getMarketplaceProductDetailRequest: GetMarketplaceProductDetailRequest,
|
|
65
|
+
): string {
|
|
66
|
+
return JSON.stringify(
|
|
67
|
+
GetMarketplaceProductDetailRequest$outboundSchema.parse(
|
|
68
|
+
getMarketplaceProductDetailRequest,
|
|
69
|
+
),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** @internal */
|
|
74
|
+
export const GetMarketplaceProductDetailContent$inboundSchema: z.ZodType<
|
|
75
|
+
GetMarketplaceProductDetailContent,
|
|
76
|
+
z.ZodTypeDef,
|
|
77
|
+
unknown
|
|
78
|
+
> = z.object({
|
|
79
|
+
product: components.ProductDetail$inboundSchema,
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export function getMarketplaceProductDetailContentFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<GetMarketplaceProductDetailContent, SDKValidationError> {
|
|
85
|
+
return safeParse(
|
|
86
|
+
jsonString,
|
|
87
|
+
(x) =>
|
|
88
|
+
GetMarketplaceProductDetailContent$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'GetMarketplaceProductDetailContent' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const GetMarketplaceProductDetailResponseBody$inboundSchema: z.ZodType<
|
|
95
|
+
GetMarketplaceProductDetailResponseBody,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
unknown
|
|
98
|
+
> = z.object({
|
|
99
|
+
message: z.string(),
|
|
100
|
+
success: z.boolean(),
|
|
101
|
+
content: z.lazy(() => GetMarketplaceProductDetailContent$inboundSchema),
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export function getMarketplaceProductDetailResponseBodyFromJSON(
|
|
105
|
+
jsonString: string,
|
|
106
|
+
): SafeParseResult<
|
|
107
|
+
GetMarketplaceProductDetailResponseBody,
|
|
108
|
+
SDKValidationError
|
|
109
|
+
> {
|
|
110
|
+
return safeParse(
|
|
111
|
+
jsonString,
|
|
112
|
+
(x) =>
|
|
113
|
+
GetMarketplaceProductDetailResponseBody$inboundSchema.parse(
|
|
114
|
+
JSON.parse(x),
|
|
115
|
+
),
|
|
116
|
+
`Failed to parse 'GetMarketplaceProductDetailResponseBody' from JSON`,
|
|
117
|
+
);
|
|
118
|
+
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type GetMarketplaceVariantDetailRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* This param is used to determine product pricing, promotions, and subscription rates. If a valid customer group id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer group id, the system will fall back to the default customer group id. If no data is found for the default group either, the highest applicable price will be returned.
|
|
15
|
+
*/
|
|
16
|
+
xCustomerGroupId?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Determines whether to include or exlude inventory details in response json
|
|
19
|
+
*/
|
|
20
|
+
inventory?: boolean | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* product id
|
|
23
|
+
*/
|
|
24
|
+
productId: string;
|
|
25
|
+
/**
|
|
26
|
+
* variant id
|
|
27
|
+
*/
|
|
28
|
+
variantId: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type GetMarketplaceVariantDetailContent = {
|
|
32
|
+
variant: components.VariantDetail;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Success response
|
|
37
|
+
*/
|
|
38
|
+
export type GetMarketplaceVariantDetailResponseBody = {
|
|
39
|
+
message: string;
|
|
40
|
+
success: boolean;
|
|
41
|
+
content: GetMarketplaceVariantDetailContent;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type GetMarketplaceVariantDetailRequest$Outbound = {
|
|
46
|
+
"x-customer-group-id"?: string | undefined;
|
|
47
|
+
inventory?: boolean | undefined;
|
|
48
|
+
product_id: string;
|
|
49
|
+
variant_id: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const GetMarketplaceVariantDetailRequest$outboundSchema: z.ZodType<
|
|
54
|
+
GetMarketplaceVariantDetailRequest$Outbound,
|
|
55
|
+
z.ZodTypeDef,
|
|
56
|
+
GetMarketplaceVariantDetailRequest
|
|
57
|
+
> = z.object({
|
|
58
|
+
xCustomerGroupId: z.string().optional(),
|
|
59
|
+
inventory: z.boolean().optional(),
|
|
60
|
+
productId: z.string(),
|
|
61
|
+
variantId: z.string(),
|
|
62
|
+
}).transform((v) => {
|
|
63
|
+
return remap$(v, {
|
|
64
|
+
xCustomerGroupId: "x-customer-group-id",
|
|
65
|
+
productId: "product_id",
|
|
66
|
+
variantId: "variant_id",
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
export function getMarketplaceVariantDetailRequestToJSON(
|
|
71
|
+
getMarketplaceVariantDetailRequest: GetMarketplaceVariantDetailRequest,
|
|
72
|
+
): string {
|
|
73
|
+
return JSON.stringify(
|
|
74
|
+
GetMarketplaceVariantDetailRequest$outboundSchema.parse(
|
|
75
|
+
getMarketplaceVariantDetailRequest,
|
|
76
|
+
),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const GetMarketplaceVariantDetailContent$inboundSchema: z.ZodType<
|
|
82
|
+
GetMarketplaceVariantDetailContent,
|
|
83
|
+
z.ZodTypeDef,
|
|
84
|
+
unknown
|
|
85
|
+
> = z.object({
|
|
86
|
+
variant: components.VariantDetail$inboundSchema,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
export function getMarketplaceVariantDetailContentFromJSON(
|
|
90
|
+
jsonString: string,
|
|
91
|
+
): SafeParseResult<GetMarketplaceVariantDetailContent, SDKValidationError> {
|
|
92
|
+
return safeParse(
|
|
93
|
+
jsonString,
|
|
94
|
+
(x) =>
|
|
95
|
+
GetMarketplaceVariantDetailContent$inboundSchema.parse(JSON.parse(x)),
|
|
96
|
+
`Failed to parse 'GetMarketplaceVariantDetailContent' from JSON`,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const GetMarketplaceVariantDetailResponseBody$inboundSchema: z.ZodType<
|
|
102
|
+
GetMarketplaceVariantDetailResponseBody,
|
|
103
|
+
z.ZodTypeDef,
|
|
104
|
+
unknown
|
|
105
|
+
> = z.object({
|
|
106
|
+
message: z.string(),
|
|
107
|
+
success: z.boolean(),
|
|
108
|
+
content: z.lazy(() => GetMarketplaceVariantDetailContent$inboundSchema),
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export function getMarketplaceVariantDetailResponseBodyFromJSON(
|
|
112
|
+
jsonString: string,
|
|
113
|
+
): SafeParseResult<
|
|
114
|
+
GetMarketplaceVariantDetailResponseBody,
|
|
115
|
+
SDKValidationError
|
|
116
|
+
> {
|
|
117
|
+
return safeParse(
|
|
118
|
+
jsonString,
|
|
119
|
+
(x) =>
|
|
120
|
+
GetMarketplaceVariantDetailResponseBody$inboundSchema.parse(
|
|
121
|
+
JSON.parse(x),
|
|
122
|
+
),
|
|
123
|
+
`Failed to parse 'GetMarketplaceVariantDetailResponseBody' from JSON`,
|
|
124
|
+
);
|
|
125
|
+
}
|
|
@@ -18,6 +18,8 @@ export * from "./getanonymoustoken.js";
|
|
|
18
18
|
export * from "./getcart.js";
|
|
19
19
|
export * from "./getfulfillmentoptions.js";
|
|
20
20
|
export * from "./getloyaltydetails.js";
|
|
21
|
+
export * from "./getmarketplaceproductdetail.js";
|
|
22
|
+
export * from "./getmarketplacevariantdetail.js";
|
|
21
23
|
export * from "./getorderdetail.js";
|
|
22
24
|
export * from "./getpaymentstatus.js";
|
|
23
25
|
export * from "./getproductdetail.js";
|
|
@@ -28,6 +30,14 @@ export * from "./listaddresses.js";
|
|
|
28
30
|
export * from "./listcategories.js";
|
|
29
31
|
export * from "./listcountrypincodes.js";
|
|
30
32
|
export * from "./listcrosssellproducts.js";
|
|
33
|
+
export * from "./listmarketplacecategories.js";
|
|
34
|
+
export * from "./listmarketplacecrosssellproducts.js";
|
|
35
|
+
export * from "./listmarketplaceproductreviews.js";
|
|
36
|
+
export * from "./listmarketplaceproducts.js";
|
|
37
|
+
export * from "./listmarketplaceproductvariants.js";
|
|
38
|
+
export * from "./listmarketplacesimilarproducts.js";
|
|
39
|
+
export * from "./listmarketplaceskus.js";
|
|
40
|
+
export * from "./listmarketplaceupsellproducts.js";
|
|
31
41
|
export * from "./listorders.js";
|
|
32
42
|
export * from "./listordershipments.js";
|
|
33
43
|
export * from "./listproductreviews.js";
|
|
@@ -47,6 +57,7 @@ export * from "./refreshtoken.js";
|
|
|
47
57
|
export * from "./removecoupon.js";
|
|
48
58
|
export * from "./removeloyaltypoints.js";
|
|
49
59
|
export * from "./retryorderpayment.js";
|
|
60
|
+
export * from "./searchmarketplaceproducts.js";
|
|
50
61
|
export * from "./searchproducts.js";
|
|
51
62
|
export * from "./updateaddressdetail.js";
|
|
52
63
|
export * from "./updatecart.js";
|
|
@@ -51,7 +51,7 @@ export type Addresses = {
|
|
|
51
51
|
pincode: string;
|
|
52
52
|
city: string;
|
|
53
53
|
state: string;
|
|
54
|
-
country
|
|
54
|
+
country: "India";
|
|
55
55
|
/**
|
|
56
56
|
* Tax Identification Number (TIN/VAT/GSTIN) specific to the country of operation.
|
|
57
57
|
*/
|
|
@@ -131,7 +131,7 @@ export const Addresses$inboundSchema: z.ZodType<
|
|
|
131
131
|
pincode: z.string(),
|
|
132
132
|
city: z.string(),
|
|
133
133
|
state: z.string(),
|
|
134
|
-
country: z.literal("India")
|
|
134
|
+
country: z.literal("India"),
|
|
135
135
|
tax_identification_number: z.nullable(z.string()),
|
|
136
136
|
business_name: z.nullable(z.string()),
|
|
137
137
|
is_phone_verified: z.boolean(),
|