ce-storefront 0.3.4 → 0.3.6
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 +26 -37
- package/docs/sdks/{cestorefrontpayments → cestorefrontorderspayments}/README.md +1 -1
- package/docs/sdks/customers/README.md +236 -0
- package/docs/sdks/{paymentsapijuspay → juspay}/README.md +12 -12
- package/docs/sdks/orders/README.md +80 -1
- package/docs/sdks/payments/README.md +242 -2
- package/docs/sdks/products/README.md +1 -1
- package/esm/funcs/catalogProductsGet.d.ts +1 -1
- package/esm/funcs/catalogProductsGet.js +1 -1
- package/esm/funcs/{customersAPIGetCustomersId.d.ts → customersGetCustomersId.d.ts} +2 -2
- package/esm/funcs/customersGetCustomersId.d.ts.map +1 -0
- package/esm/funcs/{customersAPIGetCustomersId.js → customersGetCustomersId.js} +2 -2
- package/esm/funcs/customersGetCustomersId.js.map +1 -0
- package/esm/funcs/{customersAPIPostCustomers.d.ts → customersPostCustomers.d.ts} +2 -2
- package/esm/funcs/customersPostCustomers.d.ts.map +1 -0
- package/esm/funcs/{customersAPIPostCustomers.js → customersPostCustomers.js} +2 -2
- package/esm/funcs/customersPostCustomers.js.map +1 -0
- package/esm/funcs/{customersAPIPutCustomersId.d.ts → customersPutCustomersId.d.ts} +2 -2
- package/esm/funcs/customersPutCustomersId.d.ts.map +1 -0
- package/esm/funcs/{customersAPIPutCustomersId.js → customersPutCustomersId.js} +2 -2
- package/esm/funcs/{customersAPIPostCustomers.js.map → customersPutCustomersId.js.map} +1 -1
- package/esm/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.d.ts → juspayGetPaymentsJuspayCustomer.d.ts} +2 -2
- package/esm/funcs/juspayGetPaymentsJuspayCustomer.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.js → juspayGetPaymentsJuspayCustomer.js} +2 -2
- package/esm/funcs/juspayGetPaymentsJuspayCustomer.js.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.d.ts → juspayPostPaymentsJuspayCreateCustomer.d.ts} +2 -2
- package/esm/funcs/juspayPostPaymentsJuspayCreateCustomer.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.js → juspayPostPaymentsJuspayCreateCustomer.js} +2 -2
- package/esm/funcs/juspayPostPaymentsJuspayCreateCustomer.js.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.d.ts → juspayPostPaymentsJuspayCreateOrder.d.ts} +2 -2
- package/esm/funcs/juspayPostPaymentsJuspayCreateOrder.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.js → juspayPostPaymentsJuspayCreateOrder.js} +2 -2
- package/esm/funcs/juspayPostPaymentsJuspayCreateOrder.js.map +1 -0
- package/esm/funcs/{ordersAPIGetOrdersIdPaymentStatus.d.ts → ordersGetOrdersIdPaymentStatus.d.ts} +2 -2
- package/esm/funcs/ordersGetOrdersIdPaymentStatus.d.ts.map +1 -0
- package/esm/funcs/{ordersAPIGetOrdersIdPaymentStatus.js → ordersGetOrdersIdPaymentStatus.js} +2 -2
- package/esm/funcs/ordersGetOrdersIdPaymentStatus.js.map +1 -0
- package/esm/funcs/paymentsGetMethods.d.ts +1 -1
- package/esm/funcs/paymentsGetMethods.d.ts.map +1 -1
- package/esm/funcs/paymentsGetMethods.js +3 -3
- package/esm/funcs/paymentsGetMethods.js.map +1 -1
- package/esm/funcs/{paymentsAPIGetPaymentsCards.d.ts → paymentsGetPaymentsCards.d.ts} +2 -2
- package/esm/funcs/paymentsGetPaymentsCards.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIGetPaymentsCards.js → paymentsGetPaymentsCards.js} +2 -2
- package/esm/funcs/paymentsGetPaymentsCards.js.map +1 -0
- package/esm/funcs/{paymentsAPIGetPaymentsVerifyVpa.d.ts → paymentsGetPaymentsVerifyVpa.d.ts} +2 -2
- package/esm/funcs/paymentsGetPaymentsVerifyVpa.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIGetPaymentsVerifyVpa.js → paymentsGetPaymentsVerifyVpa.js} +2 -2
- package/esm/funcs/paymentsGetPaymentsVerifyVpa.js.map +1 -0
- package/esm/funcs/{paymentsAPIPostPaymentsCards.d.ts → paymentsPostPaymentsCards.d.ts} +2 -2
- package/esm/funcs/paymentsPostPaymentsCards.d.ts.map +1 -0
- package/esm/funcs/{paymentsAPIPostPaymentsCards.js → paymentsPostPaymentsCards.js} +2 -2
- package/esm/funcs/paymentsPostPaymentsCards.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/models/components/analyticsevent.d.ts +8 -8
- package/esm/models/components/analyticsevent.d.ts.map +1 -1
- package/esm/models/components/analyticsevent.js +12 -12
- package/esm/models/components/analyticsevent.js.map +1 -1
- package/esm/models/components/associatedoption.d.ts +125 -0
- package/esm/models/components/associatedoption.d.ts.map +1 -0
- package/esm/models/components/associatedoption.js +107 -0
- package/esm/models/components/associatedoption.js.map +1 -0
- package/esm/models/components/cart.d.ts +16 -16
- package/esm/models/components/cart.d.ts.map +1 -1
- package/esm/models/components/cart.js +16 -16
- package/esm/models/components/cart.js.map +1 -1
- package/esm/models/components/createcustomer.d.ts +1 -1
- package/esm/models/components/createcustomer.d.ts.map +1 -1
- package/esm/models/components/createcustomer.js +1 -1
- package/esm/models/components/createcustomer.js.map +1 -1
- package/esm/models/components/{customeraddressinput.d.ts → customeraddress.d.ts} +33 -33
- package/esm/models/components/customeraddress.d.ts.map +1 -0
- package/esm/models/components/{customeraddressinput.js → customeraddress.js} +37 -37
- package/esm/models/components/customeraddress.js.map +1 -0
- package/esm/models/components/discountbasedpromotion.d.ts +0 -2
- package/esm/models/components/discountbasedpromotion.d.ts.map +1 -1
- package/esm/models/components/discountbasedpromotion.js +0 -4
- package/esm/models/components/discountbasedpromotion.js.map +1 -1
- package/esm/models/components/fixedpricepromotion.d.ts +0 -2
- package/esm/models/components/fixedpricepromotion.d.ts.map +1 -1
- package/esm/models/components/fixedpricepromotion.js +0 -4
- package/esm/models/components/fixedpricepromotion.js.map +1 -1
- package/esm/models/components/freegoodspromotion.d.ts +2 -7
- package/esm/models/components/freegoodspromotion.d.ts.map +1 -1
- package/esm/models/components/freegoodspromotion.js +2 -6
- package/esm/models/components/freegoodspromotion.js.map +1 -1
- package/esm/models/components/index.d.ts +6 -8
- package/esm/models/components/index.d.ts.map +1 -1
- package/esm/models/components/index.js +6 -8
- package/esm/models/components/index.js.map +1 -1
- package/esm/models/components/orderdetail.d.ts +1 -1
- package/esm/models/components/orderdetail.d.ts.map +1 -1
- package/esm/models/components/orderdetail.js +1 -1
- package/esm/models/components/orderdetail.js.map +1 -1
- package/esm/models/components/{productlist.d.ts → product.d.ts} +38 -78
- package/esm/models/components/product.d.ts.map +1 -0
- package/esm/models/components/{productlist.js → product.js} +37 -98
- package/esm/models/components/product.js.map +1 -0
- package/esm/models/components/productattribute.d.ts +97 -64
- package/esm/models/components/productattribute.d.ts.map +1 -1
- package/esm/models/components/productattribute.js +67 -128
- package/esm/models/components/productattribute.js.map +1 -1
- package/esm/models/components/productcategory.d.ts +2 -2
- package/esm/models/components/productcategory.d.ts.map +1 -1
- package/esm/models/components/productcategory.js +2 -2
- package/esm/models/components/productcategory.js.map +1 -1
- package/esm/models/components/productdetail.d.ts +63 -165
- package/esm/models/components/productdetail.d.ts.map +1 -1
- package/esm/models/components/productdetail.js +70 -204
- package/esm/models/components/productdetail.js.map +1 -1
- package/esm/models/components/productlistresponse.d.ts +24 -3
- package/esm/models/components/productlistresponse.d.ts.map +1 -1
- package/esm/models/components/productlistresponse.js +24 -3
- package/esm/models/components/productlistresponse.js.map +1 -1
- package/esm/models/components/productpromotion.d.ts +11 -5
- package/esm/models/components/productpromotion.d.ts.map +1 -1
- package/esm/models/components/productshipping.d.ts +0 -2
- package/esm/models/components/productshipping.d.ts.map +1 -1
- package/esm/models/components/productshipping.js +0 -4
- package/esm/models/components/productshipping.js.map +1 -1
- package/esm/models/components/{promotion.d.ts → promotiondetail.d.ts} +29 -29
- package/esm/models/components/promotiondetail.d.ts.map +1 -0
- package/esm/models/components/{promotion.js → promotiondetail.js} +29 -29
- package/esm/models/components/promotiondetail.js.map +1 -0
- package/esm/models/components/seo.d.ts +6 -6
- package/esm/models/components/seo.d.ts.map +1 -1
- package/esm/models/components/seo.js +6 -19
- package/esm/models/components/seo.js.map +1 -1
- package/esm/models/components/{skuinfo.d.ts → sku.d.ts} +56 -48
- package/esm/models/components/sku.d.ts.map +1 -0
- package/esm/models/components/{skuinfo.js → sku.js} +65 -57
- package/esm/models/components/sku.js.map +1 -0
- package/esm/models/components/variant.d.ts +13 -52
- package/esm/models/components/variant.d.ts.map +1 -1
- package/esm/models/components/variant.js +5 -55
- package/esm/models/components/variant.js.map +1 -1
- package/esm/models/components/variantdetail.d.ts +31 -60
- package/esm/models/components/variantdetail.d.ts.map +1 -1
- package/esm/models/components/variantdetail.js +20 -57
- package/esm/models/components/variantdetail.js.map +1 -1
- package/esm/models/components/variantoption.d.ts +118 -0
- package/esm/models/components/variantoption.d.ts.map +1 -0
- package/esm/models/components/variantoption.js +114 -0
- package/esm/models/components/variantoption.js.map +1 -0
- package/esm/models/components/volumebasedpromotion.d.ts +0 -5
- package/esm/models/components/volumebasedpromotion.d.ts.map +1 -1
- package/esm/models/components/volumebasedpromotion.js +0 -4
- package/esm/models/components/volumebasedpromotion.js.map +1 -1
- package/esm/models/operations/getpaymentmethods.d.ts +143 -0
- package/esm/models/operations/getpaymentmethods.d.ts.map +1 -0
- package/esm/models/operations/{getpaymentspaymentmethods.js → getpaymentmethods.js} +42 -44
- package/esm/models/operations/getpaymentmethods.js.map +1 -0
- package/esm/models/operations/getpromotions.d.ts +2 -2
- package/esm/models/operations/getpromotions.d.ts.map +1 -1
- package/esm/models/operations/getpromotions.js +2 -2
- package/esm/models/operations/getpromotions.js.map +1 -1
- package/esm/models/operations/getsimilar.d.ts +2 -27
- package/esm/models/operations/getsimilar.d.ts.map +1 -1
- package/esm/models/operations/getsimilar.js +2 -27
- package/esm/models/operations/getsimilar.js.map +1 -1
- package/esm/models/operations/getskus.d.ts +2 -2
- package/esm/models/operations/getskus.d.ts.map +1 -1
- package/esm/models/operations/getskus.js +2 -2
- package/esm/models/operations/getskus.js.map +1 -1
- package/esm/models/operations/getwishtlist.d.ts +2 -2
- package/esm/models/operations/getwishtlist.d.ts.map +1 -1
- package/esm/models/operations/getwishtlist.js +2 -2
- package/esm/models/operations/getwishtlist.js.map +1 -1
- package/esm/models/operations/index.d.ts +1 -2
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +1 -2
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/postcartitemid.d.ts +15 -15
- package/esm/models/operations/postcartitemid.d.ts.map +1 -1
- package/esm/models/operations/postcartitemid.js +15 -15
- package/esm/models/operations/postcartitemid.js.map +1 -1
- package/esm/sdk/{cestorefrontpayments.d.ts → cestorefrontorderspayments.d.ts} +2 -2
- package/esm/sdk/cestorefrontorderspayments.d.ts.map +1 -0
- package/esm/sdk/{cestorefrontpayments.js → cestorefrontorderspayments.js} +2 -2
- package/esm/sdk/cestorefrontorderspayments.js.map +1 -0
- package/esm/sdk/customers.d.ts +24 -1
- package/esm/sdk/customers.d.ts.map +1 -1
- package/esm/sdk/customers.js +31 -0
- package/esm/sdk/customers.js.map +1 -1
- package/esm/sdk/{paymentsapijuspay.d.ts → juspay.d.ts} +2 -2
- package/esm/sdk/juspay.d.ts.map +1 -0
- package/esm/sdk/{paymentsapijuspay.js → juspay.js} +8 -8
- package/esm/sdk/juspay.js.map +1 -0
- package/esm/sdk/orders.d.ts +9 -2
- package/esm/sdk/orders.d.ts.map +1 -1
- package/esm/sdk/orders.js +12 -2
- package/esm/sdk/orders.js.map +1 -1
- package/esm/sdk/payments.d.ts +23 -1
- package/esm/sdk/payments.d.ts.map +1 -1
- package/esm/sdk/payments.js +31 -0
- package/esm/sdk/payments.js.map +1 -1
- package/esm/sdk/products.d.ts +1 -1
- package/esm/sdk/products.js +1 -1
- package/esm/sdk/sdk.d.ts +3 -12
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +3 -15
- package/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/catalogProductsGet.ts +1 -1
- package/src/funcs/{customersAPIGetCustomersId.ts → customersGetCustomersId.ts} +1 -1
- package/src/funcs/{customersAPIPostCustomers.ts → customersPostCustomers.ts} +1 -1
- package/src/funcs/{customersAPIPutCustomersId.ts → customersPutCustomersId.ts} +1 -1
- package/src/funcs/{paymentsAPIJuspayGetPaymentsJuspayCustomer.ts → juspayGetPaymentsJuspayCustomer.ts} +1 -1
- package/src/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.ts → juspayPostPaymentsJuspayCreateCustomer.ts} +1 -1
- package/src/funcs/{paymentsAPIJuspayPostPaymentsJuspayCreateOrder.ts → juspayPostPaymentsJuspayCreateOrder.ts} +1 -1
- package/src/funcs/{ordersAPIGetOrdersIdPaymentStatus.ts → ordersGetOrdersIdPaymentStatus.ts} +1 -1
- package/src/funcs/paymentsGetMethods.ts +6 -7
- package/src/funcs/{paymentsAPIGetPaymentsCards.ts → paymentsGetPaymentsCards.ts} +1 -1
- package/src/funcs/{paymentsAPIGetPaymentsVerifyVpa.ts → paymentsGetPaymentsVerifyVpa.ts} +1 -1
- package/src/funcs/{paymentsAPIPostPaymentsCards.ts → paymentsPostPaymentsCards.ts} +1 -1
- package/src/lib/config.ts +3 -3
- package/src/models/components/analyticsevent.ts +16 -15
- package/src/models/components/associatedoption.ts +217 -0
- package/src/models/components/cart.ts +25 -25
- package/src/models/components/createcustomer.ts +1 -1
- package/src/models/components/discountbasedpromotion.ts +0 -6
- package/src/models/components/fixedpricepromotion.ts +0 -6
- package/src/models/components/freegoodspromotion.ts +4 -13
- package/src/models/components/index.ts +6 -8
- package/src/models/components/orderdetail.ts +1 -1
- package/src/models/components/{skuinfo.ts → product.ts} +111 -96
- package/src/models/components/productattribute.ts +162 -188
- package/src/models/components/productcategory.ts +4 -4
- package/src/models/components/productdetail.ts +143 -418
- package/src/models/components/productlistresponse.ts +55 -9
- package/src/models/components/productshipping.ts +0 -6
- package/src/models/components/{promotion.ts → promotiondetail.ts} +47 -45
- package/src/models/components/seo.ts +12 -25
- package/src/models/components/sku.ts +244 -0
- package/src/models/components/variant.ts +14 -119
- package/src/models/components/variantdetail.ts +51 -143
- package/src/models/components/variantoption.ts +214 -0
- package/src/models/components/volumebasedpromotion.ts +0 -9
- package/src/models/operations/{getpaymentspaymentmethods.ts → getpaymentmethods.ts} +68 -77
- package/src/models/operations/getpromotions.ts +4 -4
- package/src/models/operations/getsimilar.ts +4 -62
- package/src/models/operations/getskus.ts +4 -4
- package/src/models/operations/getwishtlist.ts +4 -4
- package/src/models/operations/index.ts +1 -2
- package/src/models/operations/postcartitemid.ts +27 -25
- package/src/sdk/{cestorefrontpayments.ts → cestorefrontorderspayments.ts} +1 -1
- package/src/sdk/customers.ts +58 -1
- package/src/sdk/{paymentsapijuspay.ts → juspay.ts} +7 -7
- package/src/sdk/orders.ts +22 -4
- package/src/sdk/payments.ts +57 -2
- package/src/sdk/products.ts +1 -1
- package/src/sdk/sdk.ts +4 -22
- package/docs/sdks/customersapi/README.md +0 -321
- package/docs/sdks/ordersapi/README.md +0 -86
- package/docs/sdks/paymentsapi/README.md +0 -247
- package/esm/funcs/customersAPIGetCustomersId.d.ts.map +0 -1
- package/esm/funcs/customersAPIGetCustomersId.js.map +0 -1
- package/esm/funcs/customersAPIGetRecommendedProducts.d.ts +0 -16
- package/esm/funcs/customersAPIGetRecommendedProducts.d.ts.map +0 -1
- package/esm/funcs/customersAPIGetRecommendedProducts.js +0 -80
- package/esm/funcs/customersAPIGetRecommendedProducts.js.map +0 -1
- package/esm/funcs/customersAPIPostCustomers.d.ts.map +0 -1
- package/esm/funcs/customersAPIPutCustomersId.d.ts.map +0 -1
- package/esm/funcs/customersAPIPutCustomersId.js.map +0 -1
- package/esm/funcs/ordersAPIGetOrdersIdPaymentStatus.d.ts.map +0 -1
- package/esm/funcs/ordersAPIGetOrdersIdPaymentStatus.js.map +0 -1
- package/esm/funcs/paymentsAPIGetPaymentsCards.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIGetPaymentsCards.js.map +0 -1
- package/esm/funcs/paymentsAPIGetPaymentsVerifyVpa.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIGetPaymentsVerifyVpa.js.map +0 -1
- package/esm/funcs/paymentsAPIJuspayGetPaymentsJuspayCustomer.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIJuspayGetPaymentsJuspayCustomer.js.map +0 -1
- package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateCustomer.js.map +0 -1
- package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateOrder.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIJuspayPostPaymentsJuspayCreateOrder.js.map +0 -1
- package/esm/funcs/paymentsAPIPostPaymentsCards.d.ts.map +0 -1
- package/esm/funcs/paymentsAPIPostPaymentsCards.js.map +0 -1
- package/esm/models/components/customeraddressinput.d.ts.map +0 -1
- package/esm/models/components/customeraddressinput.js.map +0 -1
- package/esm/models/components/productbundleitem.d.ts +0 -47
- package/esm/models/components/productbundleitem.d.ts.map +0 -1
- package/esm/models/components/productbundleitem.js +0 -66
- package/esm/models/components/productbundleitem.js.map +0 -1
- package/esm/models/components/productlist.d.ts.map +0 -1
- package/esm/models/components/productlist.js.map +0 -1
- package/esm/models/components/productpackaging.d.ts +0 -68
- package/esm/models/components/productpackaging.d.ts.map +0 -1
- package/esm/models/components/productpackaging.js +0 -88
- package/esm/models/components/productpackaging.js.map +0 -1
- package/esm/models/components/promotion.d.ts.map +0 -1
- package/esm/models/components/promotion.js.map +0 -1
- package/esm/models/components/recommendedproduct.d.ts +0 -155
- package/esm/models/components/recommendedproduct.d.ts.map +0 -1
- package/esm/models/components/recommendedproduct.js +0 -193
- package/esm/models/components/recommendedproduct.js.map +0 -1
- package/esm/models/components/saleschannel.d.ts +0 -39
- package/esm/models/components/saleschannel.d.ts.map +0 -1
- package/esm/models/components/saleschannel.js +0 -53
- package/esm/models/components/saleschannel.js.map +0 -1
- package/esm/models/components/skuinfo.d.ts.map +0 -1
- package/esm/models/components/skuinfo.js.map +0 -1
- package/esm/models/operations/getpaymentspaymentmethods.d.ts +0 -143
- package/esm/models/operations/getpaymentspaymentmethods.d.ts.map +0 -1
- package/esm/models/operations/getpaymentspaymentmethods.js.map +0 -1
- package/esm/models/operations/getrecommendedproducts.d.ts +0 -90
- package/esm/models/operations/getrecommendedproducts.d.ts.map +0 -1
- package/esm/models/operations/getrecommendedproducts.js +0 -87
- package/esm/models/operations/getrecommendedproducts.js.map +0 -1
- package/esm/sdk/cestorefrontpayments.d.ts.map +0 -1
- package/esm/sdk/cestorefrontpayments.js.map +0 -1
- package/esm/sdk/customersapi.d.ts +0 -34
- package/esm/sdk/customersapi.d.ts.map +0 -1
- package/esm/sdk/customersapi.js +0 -48
- package/esm/sdk/customersapi.js.map +0 -1
- package/esm/sdk/ordersapi.d.ts +0 -12
- package/esm/sdk/ordersapi.d.ts.map +0 -1
- package/esm/sdk/ordersapi.js +0 -18
- package/esm/sdk/ordersapi.js.map +0 -1
- package/esm/sdk/paymentsapi.d.ts +0 -27
- package/esm/sdk/paymentsapi.d.ts.map +0 -1
- package/esm/sdk/paymentsapi.js +0 -39
- package/esm/sdk/paymentsapi.js.map +0 -1
- package/esm/sdk/paymentsapijuspay.d.ts.map +0 -1
- package/esm/sdk/paymentsapijuspay.js.map +0 -1
- package/src/funcs/customersAPIGetRecommendedProducts.ts +0 -144
- package/src/models/components/productbundleitem.ts +0 -127
- package/src/models/components/productlist.ts +0 -368
- package/src/models/components/productpackaging.ts +0 -162
- package/src/models/components/recommendedproduct.ts +0 -385
- package/src/models/components/saleschannel.ts +0 -96
- package/src/models/operations/getrecommendedproducts.ts +0 -206
- package/src/sdk/customersapi.ts +0 -82
- package/src/sdk/ordersapi.ts +0 -27
- package/src/sdk/paymentsapi.ts +0 -64
- package/src/models/components/{customeraddressinput.ts → customeraddress.ts} +60 -60
|
@@ -13,33 +13,79 @@ import {
|
|
|
13
13
|
Pagination$outboundSchema,
|
|
14
14
|
} from "./pagination.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} from "./
|
|
16
|
+
Product,
|
|
17
|
+
Product$inboundSchema,
|
|
18
|
+
Product$Outbound,
|
|
19
|
+
Product$outboundSchema,
|
|
20
|
+
} from "./product.js";
|
|
21
|
+
|
|
22
|
+
export type Products = Array<Product>;
|
|
21
23
|
|
|
22
24
|
export type ProductListResponse = {
|
|
23
|
-
products?: Array<
|
|
25
|
+
products?: Array<Product> | undefined;
|
|
24
26
|
/**
|
|
25
27
|
* pagination metadata structure
|
|
26
28
|
*/
|
|
27
29
|
pagination?: Pagination | undefined;
|
|
28
30
|
};
|
|
29
31
|
|
|
32
|
+
/** @internal */
|
|
33
|
+
export const Products$inboundSchema: z.ZodType<
|
|
34
|
+
Products,
|
|
35
|
+
z.ZodTypeDef,
|
|
36
|
+
unknown
|
|
37
|
+
> = z.array(Product$inboundSchema);
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type Products$Outbound = Array<Product$Outbound>;
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const Products$outboundSchema: z.ZodType<
|
|
44
|
+
Products$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
Products
|
|
47
|
+
> = z.array(Product$outboundSchema);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
+
*/
|
|
53
|
+
export namespace Products$ {
|
|
54
|
+
/** @deprecated use `Products$inboundSchema` instead. */
|
|
55
|
+
export const inboundSchema = Products$inboundSchema;
|
|
56
|
+
/** @deprecated use `Products$outboundSchema` instead. */
|
|
57
|
+
export const outboundSchema = Products$outboundSchema;
|
|
58
|
+
/** @deprecated use `Products$Outbound` instead. */
|
|
59
|
+
export type Outbound = Products$Outbound;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function productsToJSON(products: Products): string {
|
|
63
|
+
return JSON.stringify(Products$outboundSchema.parse(products));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function productsFromJSON(
|
|
67
|
+
jsonString: string,
|
|
68
|
+
): SafeParseResult<Products, SDKValidationError> {
|
|
69
|
+
return safeParse(
|
|
70
|
+
jsonString,
|
|
71
|
+
(x) => Products$inboundSchema.parse(JSON.parse(x)),
|
|
72
|
+
`Failed to parse 'Products' from JSON`,
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
30
76
|
/** @internal */
|
|
31
77
|
export const ProductListResponse$inboundSchema: z.ZodType<
|
|
32
78
|
ProductListResponse,
|
|
33
79
|
z.ZodTypeDef,
|
|
34
80
|
unknown
|
|
35
81
|
> = z.object({
|
|
36
|
-
products: z.array(
|
|
82
|
+
products: z.array(Product$inboundSchema).optional(),
|
|
37
83
|
pagination: Pagination$inboundSchema.optional(),
|
|
38
84
|
});
|
|
39
85
|
|
|
40
86
|
/** @internal */
|
|
41
87
|
export type ProductListResponse$Outbound = {
|
|
42
|
-
products?: Array<
|
|
88
|
+
products?: Array<Product$Outbound> | undefined;
|
|
43
89
|
pagination?: Pagination$Outbound | undefined;
|
|
44
90
|
};
|
|
45
91
|
|
|
@@ -49,7 +95,7 @@ export const ProductListResponse$outboundSchema: z.ZodType<
|
|
|
49
95
|
z.ZodTypeDef,
|
|
50
96
|
ProductListResponse
|
|
51
97
|
> = z.object({
|
|
52
|
-
products: z.array(
|
|
98
|
+
products: z.array(Product$outboundSchema).optional(),
|
|
53
99
|
pagination: Pagination$outboundSchema.optional(),
|
|
54
100
|
});
|
|
55
101
|
|
|
@@ -15,7 +15,6 @@ export type ProductShipping = {
|
|
|
15
15
|
shipsInternationally?: boolean | undefined;
|
|
16
16
|
midCode?: string | undefined;
|
|
17
17
|
countryOfOrigin?: string | undefined;
|
|
18
|
-
taxRegion?: string | undefined;
|
|
19
18
|
taxType?: string | undefined;
|
|
20
19
|
taxRate?: number | undefined;
|
|
21
20
|
};
|
|
@@ -32,7 +31,6 @@ export const ProductShipping$inboundSchema: z.ZodType<
|
|
|
32
31
|
ships_internationally: z.boolean().optional(),
|
|
33
32
|
mid_code: z.string().optional(),
|
|
34
33
|
country_of_origin: z.string().default("India"),
|
|
35
|
-
tax_region: z.string().optional(),
|
|
36
34
|
tax_type: z.string().optional(),
|
|
37
35
|
tax_rate: z.number().optional(),
|
|
38
36
|
}).transform((v) => {
|
|
@@ -43,7 +41,6 @@ export const ProductShipping$inboundSchema: z.ZodType<
|
|
|
43
41
|
"ships_internationally": "shipsInternationally",
|
|
44
42
|
"mid_code": "midCode",
|
|
45
43
|
"country_of_origin": "countryOfOrigin",
|
|
46
|
-
"tax_region": "taxRegion",
|
|
47
44
|
"tax_type": "taxType",
|
|
48
45
|
"tax_rate": "taxRate",
|
|
49
46
|
});
|
|
@@ -57,7 +54,6 @@ export type ProductShipping$Outbound = {
|
|
|
57
54
|
ships_internationally?: boolean | undefined;
|
|
58
55
|
mid_code?: string | undefined;
|
|
59
56
|
country_of_origin: string;
|
|
60
|
-
tax_region?: string | undefined;
|
|
61
57
|
tax_type?: string | undefined;
|
|
62
58
|
tax_rate?: number | undefined;
|
|
63
59
|
};
|
|
@@ -74,7 +70,6 @@ export const ProductShipping$outboundSchema: z.ZodType<
|
|
|
74
70
|
shipsInternationally: z.boolean().optional(),
|
|
75
71
|
midCode: z.string().optional(),
|
|
76
72
|
countryOfOrigin: z.string().default("India"),
|
|
77
|
-
taxRegion: z.string().optional(),
|
|
78
73
|
taxType: z.string().optional(),
|
|
79
74
|
taxRate: z.number().optional(),
|
|
80
75
|
}).transform((v) => {
|
|
@@ -85,7 +80,6 @@ export const ProductShipping$outboundSchema: z.ZodType<
|
|
|
85
80
|
shipsInternationally: "ships_internationally",
|
|
86
81
|
midCode: "mid_code",
|
|
87
82
|
countryOfOrigin: "country_of_origin",
|
|
88
|
-
taxRegion: "tax_region",
|
|
89
83
|
taxType: "tax_type",
|
|
90
84
|
taxRate: "tax_rate",
|
|
91
85
|
});
|
|
@@ -17,18 +17,18 @@ export const PromotionType = {
|
|
|
17
17
|
} as const;
|
|
18
18
|
export type PromotionType = ClosedEnum<typeof PromotionType>;
|
|
19
19
|
|
|
20
|
-
export type
|
|
20
|
+
export type PromotionDetailDetails = {};
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* promotion model
|
|
24
24
|
*/
|
|
25
|
-
export type
|
|
25
|
+
export type PromotionDetail = {
|
|
26
26
|
id?: string | undefined;
|
|
27
27
|
name?: string | undefined;
|
|
28
28
|
description?: string | undefined;
|
|
29
29
|
promotionType?: PromotionType | undefined;
|
|
30
30
|
tags?: Array<string> | undefined;
|
|
31
|
-
details?:
|
|
31
|
+
details?: PromotionDetailDetails | undefined;
|
|
32
32
|
hasRedemptionLimit?: boolean | undefined;
|
|
33
33
|
redemptionLimit?: number | undefined;
|
|
34
34
|
redemptionCount?: number | undefined;
|
|
@@ -64,56 +64,56 @@ export namespace PromotionType$ {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
/** @internal */
|
|
67
|
-
export const
|
|
68
|
-
|
|
67
|
+
export const PromotionDetailDetails$inboundSchema: z.ZodType<
|
|
68
|
+
PromotionDetailDetails,
|
|
69
69
|
z.ZodTypeDef,
|
|
70
70
|
unknown
|
|
71
71
|
> = z.object({});
|
|
72
72
|
|
|
73
73
|
/** @internal */
|
|
74
|
-
export type
|
|
74
|
+
export type PromotionDetailDetails$Outbound = {};
|
|
75
75
|
|
|
76
76
|
/** @internal */
|
|
77
|
-
export const
|
|
78
|
-
|
|
77
|
+
export const PromotionDetailDetails$outboundSchema: z.ZodType<
|
|
78
|
+
PromotionDetailDetails$Outbound,
|
|
79
79
|
z.ZodTypeDef,
|
|
80
|
-
|
|
80
|
+
PromotionDetailDetails
|
|
81
81
|
> = z.object({});
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* @internal
|
|
85
85
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
86
86
|
*/
|
|
87
|
-
export namespace
|
|
88
|
-
/** @deprecated use `
|
|
89
|
-
export const inboundSchema =
|
|
90
|
-
/** @deprecated use `
|
|
91
|
-
export const outboundSchema =
|
|
92
|
-
/** @deprecated use `
|
|
93
|
-
export type Outbound =
|
|
87
|
+
export namespace PromotionDetailDetails$ {
|
|
88
|
+
/** @deprecated use `PromotionDetailDetails$inboundSchema` instead. */
|
|
89
|
+
export const inboundSchema = PromotionDetailDetails$inboundSchema;
|
|
90
|
+
/** @deprecated use `PromotionDetailDetails$outboundSchema` instead. */
|
|
91
|
+
export const outboundSchema = PromotionDetailDetails$outboundSchema;
|
|
92
|
+
/** @deprecated use `PromotionDetailDetails$Outbound` instead. */
|
|
93
|
+
export type Outbound = PromotionDetailDetails$Outbound;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export function
|
|
97
|
-
|
|
96
|
+
export function promotionDetailDetailsToJSON(
|
|
97
|
+
promotionDetailDetails: PromotionDetailDetails,
|
|
98
98
|
): string {
|
|
99
99
|
return JSON.stringify(
|
|
100
|
-
|
|
100
|
+
PromotionDetailDetails$outboundSchema.parse(promotionDetailDetails),
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
export function
|
|
104
|
+
export function promotionDetailDetailsFromJSON(
|
|
105
105
|
jsonString: string,
|
|
106
|
-
): SafeParseResult<
|
|
106
|
+
): SafeParseResult<PromotionDetailDetails, SDKValidationError> {
|
|
107
107
|
return safeParse(
|
|
108
108
|
jsonString,
|
|
109
|
-
(x) =>
|
|
110
|
-
`Failed to parse '
|
|
109
|
+
(x) => PromotionDetailDetails$inboundSchema.parse(JSON.parse(x)),
|
|
110
|
+
`Failed to parse 'PromotionDetailDetails' from JSON`,
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
/** @internal */
|
|
115
|
-
export const
|
|
116
|
-
|
|
115
|
+
export const PromotionDetail$inboundSchema: z.ZodType<
|
|
116
|
+
PromotionDetail,
|
|
117
117
|
z.ZodTypeDef,
|
|
118
118
|
unknown
|
|
119
119
|
> = z.object({
|
|
@@ -122,7 +122,7 @@ export const Promotion$inboundSchema: z.ZodType<
|
|
|
122
122
|
description: z.string().optional(),
|
|
123
123
|
promotion_type: PromotionType$inboundSchema.optional(),
|
|
124
124
|
tags: z.array(z.string()).optional(),
|
|
125
|
-
details: z.lazy(() =>
|
|
125
|
+
details: z.lazy(() => PromotionDetailDetails$inboundSchema).optional(),
|
|
126
126
|
has_redemption_limit: z.boolean().optional(),
|
|
127
127
|
redemption_limit: z.number().int().optional(),
|
|
128
128
|
redemption_count: z.number().int().optional(),
|
|
@@ -157,13 +157,13 @@ export const Promotion$inboundSchema: z.ZodType<
|
|
|
157
157
|
});
|
|
158
158
|
|
|
159
159
|
/** @internal */
|
|
160
|
-
export type
|
|
160
|
+
export type PromotionDetail$Outbound = {
|
|
161
161
|
id?: string | undefined;
|
|
162
162
|
name?: string | undefined;
|
|
163
163
|
description?: string | undefined;
|
|
164
164
|
promotion_type?: string | undefined;
|
|
165
165
|
tags?: Array<string> | undefined;
|
|
166
|
-
details?:
|
|
166
|
+
details?: PromotionDetailDetails$Outbound | undefined;
|
|
167
167
|
has_redemption_limit?: boolean | undefined;
|
|
168
168
|
redemption_limit?: number | undefined;
|
|
169
169
|
redemption_count?: number | undefined;
|
|
@@ -178,17 +178,17 @@ export type Promotion$Outbound = {
|
|
|
178
178
|
};
|
|
179
179
|
|
|
180
180
|
/** @internal */
|
|
181
|
-
export const
|
|
182
|
-
|
|
181
|
+
export const PromotionDetail$outboundSchema: z.ZodType<
|
|
182
|
+
PromotionDetail$Outbound,
|
|
183
183
|
z.ZodTypeDef,
|
|
184
|
-
|
|
184
|
+
PromotionDetail
|
|
185
185
|
> = z.object({
|
|
186
186
|
id: z.string().optional(),
|
|
187
187
|
name: z.string().optional(),
|
|
188
188
|
description: z.string().optional(),
|
|
189
189
|
promotionType: PromotionType$outboundSchema.optional(),
|
|
190
190
|
tags: z.array(z.string()).optional(),
|
|
191
|
-
details: z.lazy(() =>
|
|
191
|
+
details: z.lazy(() => PromotionDetailDetails$outboundSchema).optional(),
|
|
192
192
|
hasRedemptionLimit: z.boolean().optional(),
|
|
193
193
|
redemptionLimit: z.number().int().optional(),
|
|
194
194
|
redemptionCount: z.number().int().optional(),
|
|
@@ -221,25 +221,27 @@ export const Promotion$outboundSchema: z.ZodType<
|
|
|
221
221
|
* @internal
|
|
222
222
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
223
223
|
*/
|
|
224
|
-
export namespace
|
|
225
|
-
/** @deprecated use `
|
|
226
|
-
export const inboundSchema =
|
|
227
|
-
/** @deprecated use `
|
|
228
|
-
export const outboundSchema =
|
|
229
|
-
/** @deprecated use `
|
|
230
|
-
export type Outbound =
|
|
224
|
+
export namespace PromotionDetail$ {
|
|
225
|
+
/** @deprecated use `PromotionDetail$inboundSchema` instead. */
|
|
226
|
+
export const inboundSchema = PromotionDetail$inboundSchema;
|
|
227
|
+
/** @deprecated use `PromotionDetail$outboundSchema` instead. */
|
|
228
|
+
export const outboundSchema = PromotionDetail$outboundSchema;
|
|
229
|
+
/** @deprecated use `PromotionDetail$Outbound` instead. */
|
|
230
|
+
export type Outbound = PromotionDetail$Outbound;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
|
-
export function
|
|
234
|
-
|
|
233
|
+
export function promotionDetailToJSON(
|
|
234
|
+
promotionDetail: PromotionDetail,
|
|
235
|
+
): string {
|
|
236
|
+
return JSON.stringify(PromotionDetail$outboundSchema.parse(promotionDetail));
|
|
235
237
|
}
|
|
236
238
|
|
|
237
|
-
export function
|
|
239
|
+
export function promotionDetailFromJSON(
|
|
238
240
|
jsonString: string,
|
|
239
|
-
): SafeParseResult<
|
|
241
|
+
): SafeParseResult<PromotionDetail, SDKValidationError> {
|
|
240
242
|
return safeParse(
|
|
241
243
|
jsonString,
|
|
242
|
-
(x) =>
|
|
243
|
-
`Failed to parse '
|
|
244
|
+
(x) => PromotionDetail$inboundSchema.parse(JSON.parse(x)),
|
|
245
|
+
`Failed to parse 'PromotionDetail' from JSON`,
|
|
244
246
|
);
|
|
245
247
|
}
|
|
@@ -3,54 +3,41 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
9
|
|
|
11
10
|
export type Seo = {
|
|
12
|
-
metaTitle?: string | undefined;
|
|
13
|
-
metaDescription?: string | undefined;
|
|
14
|
-
metaKeywords?: Array<string> | undefined;
|
|
15
11
|
slug?: string | undefined;
|
|
12
|
+
title?: string | undefined;
|
|
13
|
+
description?: string | undefined;
|
|
14
|
+
keywords?: Array<string> | undefined;
|
|
16
15
|
};
|
|
17
16
|
|
|
18
17
|
/** @internal */
|
|
19
18
|
export const Seo$inboundSchema: z.ZodType<Seo, z.ZodTypeDef, unknown> = z
|
|
20
19
|
.object({
|
|
21
|
-
meta_title: z.string().optional(),
|
|
22
|
-
meta_description: z.string().optional(),
|
|
23
|
-
meta_keywords: z.array(z.string()).optional(),
|
|
24
20
|
slug: z.string().optional(),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"meta_description": "metaDescription",
|
|
29
|
-
"meta_keywords": "metaKeywords",
|
|
30
|
-
});
|
|
21
|
+
title: z.string().optional(),
|
|
22
|
+
description: z.string().optional(),
|
|
23
|
+
keywords: z.array(z.string()).optional(),
|
|
31
24
|
});
|
|
32
25
|
|
|
33
26
|
/** @internal */
|
|
34
27
|
export type Seo$Outbound = {
|
|
35
|
-
meta_title?: string | undefined;
|
|
36
|
-
meta_description?: string | undefined;
|
|
37
|
-
meta_keywords?: Array<string> | undefined;
|
|
38
28
|
slug?: string | undefined;
|
|
29
|
+
title?: string | undefined;
|
|
30
|
+
description?: string | undefined;
|
|
31
|
+
keywords?: Array<string> | undefined;
|
|
39
32
|
};
|
|
40
33
|
|
|
41
34
|
/** @internal */
|
|
42
35
|
export const Seo$outboundSchema: z.ZodType<Seo$Outbound, z.ZodTypeDef, Seo> = z
|
|
43
36
|
.object({
|
|
44
|
-
metaTitle: z.string().optional(),
|
|
45
|
-
metaDescription: z.string().optional(),
|
|
46
|
-
metaKeywords: z.array(z.string()).optional(),
|
|
47
37
|
slug: z.string().optional(),
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
metaDescription: "meta_description",
|
|
52
|
-
metaKeywords: "meta_keywords",
|
|
53
|
-
});
|
|
38
|
+
title: z.string().optional(),
|
|
39
|
+
description: z.string().optional(),
|
|
40
|
+
keywords: z.array(z.string()).optional(),
|
|
54
41
|
});
|
|
55
42
|
|
|
56
43
|
/**
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import {
|
|
12
|
+
AssociatedOption,
|
|
13
|
+
AssociatedOption$inboundSchema,
|
|
14
|
+
AssociatedOption$Outbound,
|
|
15
|
+
AssociatedOption$outboundSchema,
|
|
16
|
+
} from "./associatedoption.js";
|
|
17
|
+
import {
|
|
18
|
+
ProductAttribute,
|
|
19
|
+
ProductAttribute$inboundSchema,
|
|
20
|
+
ProductAttribute$Outbound,
|
|
21
|
+
ProductAttribute$outboundSchema,
|
|
22
|
+
} from "./productattribute.js";
|
|
23
|
+
import {
|
|
24
|
+
ProductImage,
|
|
25
|
+
ProductImage$inboundSchema,
|
|
26
|
+
ProductImage$Outbound,
|
|
27
|
+
ProductImage$outboundSchema,
|
|
28
|
+
} from "./productimage.js";
|
|
29
|
+
import {
|
|
30
|
+
ProductPricing,
|
|
31
|
+
ProductPricing$inboundSchema,
|
|
32
|
+
ProductPricing$Outbound,
|
|
33
|
+
ProductPricing$outboundSchema,
|
|
34
|
+
} from "./productpricing.js";
|
|
35
|
+
import {
|
|
36
|
+
ProductPromotion,
|
|
37
|
+
ProductPromotion$inboundSchema,
|
|
38
|
+
ProductPromotion$Outbound,
|
|
39
|
+
ProductPromotion$outboundSchema,
|
|
40
|
+
} from "./productpromotion.js";
|
|
41
|
+
import {
|
|
42
|
+
ProductSubscription,
|
|
43
|
+
ProductSubscription$inboundSchema,
|
|
44
|
+
ProductSubscription$Outbound,
|
|
45
|
+
ProductSubscription$outboundSchema,
|
|
46
|
+
} from "./productsubscription.js";
|
|
47
|
+
|
|
48
|
+
export const SKUProductType = {
|
|
49
|
+
Physical: "physical",
|
|
50
|
+
Digital: "digital",
|
|
51
|
+
Bundle: "bundle",
|
|
52
|
+
} as const;
|
|
53
|
+
export type SKUProductType = ClosedEnum<typeof SKUProductType>;
|
|
54
|
+
|
|
55
|
+
export type Sku = {
|
|
56
|
+
productId: string;
|
|
57
|
+
variantId?: string | null | undefined;
|
|
58
|
+
sku: string;
|
|
59
|
+
productName: string;
|
|
60
|
+
variantName?: string | null | undefined;
|
|
61
|
+
productType: SKUProductType;
|
|
62
|
+
slug?: string | undefined;
|
|
63
|
+
shortDescription?: string | undefined;
|
|
64
|
+
active?: boolean | undefined;
|
|
65
|
+
stockAvailable?: boolean | undefined;
|
|
66
|
+
onOffer?: boolean | undefined;
|
|
67
|
+
onSubscription?: boolean | undefined;
|
|
68
|
+
onPromotion?: boolean | undefined;
|
|
69
|
+
categoryIds?: Array<string> | undefined;
|
|
70
|
+
tags?: Array<string> | undefined;
|
|
71
|
+
reviewsCount?: number | undefined;
|
|
72
|
+
reviewsRatingSum?: number | undefined;
|
|
73
|
+
attributes?: Array<ProductAttribute> | undefined;
|
|
74
|
+
images?: Array<ProductImage> | undefined;
|
|
75
|
+
pricing?: ProductPricing | undefined;
|
|
76
|
+
promotion?: ProductPromotion | null | undefined;
|
|
77
|
+
subscription?: Array<ProductSubscription> | undefined;
|
|
78
|
+
associatedOptions?: { [k: string]: AssociatedOption } | undefined;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const SKUProductType$inboundSchema: z.ZodNativeEnum<
|
|
83
|
+
typeof SKUProductType
|
|
84
|
+
> = z.nativeEnum(SKUProductType);
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const SKUProductType$outboundSchema: z.ZodNativeEnum<
|
|
88
|
+
typeof SKUProductType
|
|
89
|
+
> = SKUProductType$inboundSchema;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
94
|
+
*/
|
|
95
|
+
export namespace SKUProductType$ {
|
|
96
|
+
/** @deprecated use `SKUProductType$inboundSchema` instead. */
|
|
97
|
+
export const inboundSchema = SKUProductType$inboundSchema;
|
|
98
|
+
/** @deprecated use `SKUProductType$outboundSchema` instead. */
|
|
99
|
+
export const outboundSchema = SKUProductType$outboundSchema;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** @internal */
|
|
103
|
+
export const Sku$inboundSchema: z.ZodType<Sku, z.ZodTypeDef, unknown> = z
|
|
104
|
+
.object({
|
|
105
|
+
product_id: z.string(),
|
|
106
|
+
variant_id: z.nullable(z.string()).optional(),
|
|
107
|
+
sku: z.string(),
|
|
108
|
+
product_name: z.string(),
|
|
109
|
+
variant_name: z.nullable(z.string()).optional(),
|
|
110
|
+
product_type: SKUProductType$inboundSchema,
|
|
111
|
+
slug: z.string().optional(),
|
|
112
|
+
short_description: z.string().optional(),
|
|
113
|
+
active: z.boolean().default(true),
|
|
114
|
+
stock_available: z.boolean().default(true),
|
|
115
|
+
on_offer: z.boolean().default(false),
|
|
116
|
+
on_subscription: z.boolean().default(false),
|
|
117
|
+
on_promotion: z.boolean().default(false),
|
|
118
|
+
category_ids: z.array(z.string()).optional(),
|
|
119
|
+
tags: z.array(z.string()).optional(),
|
|
120
|
+
reviews_count: z.number().int().optional(),
|
|
121
|
+
reviews_rating_sum: z.number().optional(),
|
|
122
|
+
attributes: z.array(ProductAttribute$inboundSchema).optional(),
|
|
123
|
+
images: z.array(ProductImage$inboundSchema).optional(),
|
|
124
|
+
pricing: ProductPricing$inboundSchema.optional(),
|
|
125
|
+
promotion: z.nullable(ProductPromotion$inboundSchema).optional(),
|
|
126
|
+
subscription: z.array(ProductSubscription$inboundSchema).optional(),
|
|
127
|
+
associated_options: z.record(AssociatedOption$inboundSchema).optional(),
|
|
128
|
+
}).transform((v) => {
|
|
129
|
+
return remap$(v, {
|
|
130
|
+
"product_id": "productId",
|
|
131
|
+
"variant_id": "variantId",
|
|
132
|
+
"product_name": "productName",
|
|
133
|
+
"variant_name": "variantName",
|
|
134
|
+
"product_type": "productType",
|
|
135
|
+
"short_description": "shortDescription",
|
|
136
|
+
"stock_available": "stockAvailable",
|
|
137
|
+
"on_offer": "onOffer",
|
|
138
|
+
"on_subscription": "onSubscription",
|
|
139
|
+
"on_promotion": "onPromotion",
|
|
140
|
+
"category_ids": "categoryIds",
|
|
141
|
+
"reviews_count": "reviewsCount",
|
|
142
|
+
"reviews_rating_sum": "reviewsRatingSum",
|
|
143
|
+
"associated_options": "associatedOptions",
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
/** @internal */
|
|
148
|
+
export type Sku$Outbound = {
|
|
149
|
+
product_id: string;
|
|
150
|
+
variant_id?: string | null | undefined;
|
|
151
|
+
sku: string;
|
|
152
|
+
product_name: string;
|
|
153
|
+
variant_name?: string | null | undefined;
|
|
154
|
+
product_type: string;
|
|
155
|
+
slug?: string | undefined;
|
|
156
|
+
short_description?: string | undefined;
|
|
157
|
+
active: boolean;
|
|
158
|
+
stock_available: boolean;
|
|
159
|
+
on_offer: boolean;
|
|
160
|
+
on_subscription: boolean;
|
|
161
|
+
on_promotion: boolean;
|
|
162
|
+
category_ids?: Array<string> | undefined;
|
|
163
|
+
tags?: Array<string> | undefined;
|
|
164
|
+
reviews_count?: number | undefined;
|
|
165
|
+
reviews_rating_sum?: number | undefined;
|
|
166
|
+
attributes?: Array<ProductAttribute$Outbound> | undefined;
|
|
167
|
+
images?: Array<ProductImage$Outbound> | undefined;
|
|
168
|
+
pricing?: ProductPricing$Outbound | undefined;
|
|
169
|
+
promotion?: ProductPromotion$Outbound | null | undefined;
|
|
170
|
+
subscription?: Array<ProductSubscription$Outbound> | undefined;
|
|
171
|
+
associated_options?: { [k: string]: AssociatedOption$Outbound } | undefined;
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
/** @internal */
|
|
175
|
+
export const Sku$outboundSchema: z.ZodType<Sku$Outbound, z.ZodTypeDef, Sku> = z
|
|
176
|
+
.object({
|
|
177
|
+
productId: z.string(),
|
|
178
|
+
variantId: z.nullable(z.string()).optional(),
|
|
179
|
+
sku: z.string(),
|
|
180
|
+
productName: z.string(),
|
|
181
|
+
variantName: z.nullable(z.string()).optional(),
|
|
182
|
+
productType: SKUProductType$outboundSchema,
|
|
183
|
+
slug: z.string().optional(),
|
|
184
|
+
shortDescription: z.string().optional(),
|
|
185
|
+
active: z.boolean().default(true),
|
|
186
|
+
stockAvailable: z.boolean().default(true),
|
|
187
|
+
onOffer: z.boolean().default(false),
|
|
188
|
+
onSubscription: z.boolean().default(false),
|
|
189
|
+
onPromotion: z.boolean().default(false),
|
|
190
|
+
categoryIds: z.array(z.string()).optional(),
|
|
191
|
+
tags: z.array(z.string()).optional(),
|
|
192
|
+
reviewsCount: z.number().int().optional(),
|
|
193
|
+
reviewsRatingSum: z.number().optional(),
|
|
194
|
+
attributes: z.array(ProductAttribute$outboundSchema).optional(),
|
|
195
|
+
images: z.array(ProductImage$outboundSchema).optional(),
|
|
196
|
+
pricing: ProductPricing$outboundSchema.optional(),
|
|
197
|
+
promotion: z.nullable(ProductPromotion$outboundSchema).optional(),
|
|
198
|
+
subscription: z.array(ProductSubscription$outboundSchema).optional(),
|
|
199
|
+
associatedOptions: z.record(AssociatedOption$outboundSchema).optional(),
|
|
200
|
+
}).transform((v) => {
|
|
201
|
+
return remap$(v, {
|
|
202
|
+
productId: "product_id",
|
|
203
|
+
variantId: "variant_id",
|
|
204
|
+
productName: "product_name",
|
|
205
|
+
variantName: "variant_name",
|
|
206
|
+
productType: "product_type",
|
|
207
|
+
shortDescription: "short_description",
|
|
208
|
+
stockAvailable: "stock_available",
|
|
209
|
+
onOffer: "on_offer",
|
|
210
|
+
onSubscription: "on_subscription",
|
|
211
|
+
onPromotion: "on_promotion",
|
|
212
|
+
categoryIds: "category_ids",
|
|
213
|
+
reviewsCount: "reviews_count",
|
|
214
|
+
reviewsRatingSum: "reviews_rating_sum",
|
|
215
|
+
associatedOptions: "associated_options",
|
|
216
|
+
});
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @internal
|
|
221
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
222
|
+
*/
|
|
223
|
+
export namespace Sku$ {
|
|
224
|
+
/** @deprecated use `Sku$inboundSchema` instead. */
|
|
225
|
+
export const inboundSchema = Sku$inboundSchema;
|
|
226
|
+
/** @deprecated use `Sku$outboundSchema` instead. */
|
|
227
|
+
export const outboundSchema = Sku$outboundSchema;
|
|
228
|
+
/** @deprecated use `Sku$Outbound` instead. */
|
|
229
|
+
export type Outbound = Sku$Outbound;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export function skuToJSON(sku: Sku): string {
|
|
233
|
+
return JSON.stringify(Sku$outboundSchema.parse(sku));
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function skuFromJSON(
|
|
237
|
+
jsonString: string,
|
|
238
|
+
): SafeParseResult<Sku, SDKValidationError> {
|
|
239
|
+
return safeParse(
|
|
240
|
+
jsonString,
|
|
241
|
+
(x) => Sku$inboundSchema.parse(JSON.parse(x)),
|
|
242
|
+
`Failed to parse 'Sku' from JSON`,
|
|
243
|
+
);
|
|
244
|
+
}
|