@ominity/api-typescript 0.0.1 → 0.0.3
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/FUNCTIONS.md +24 -4
- package/README.md +9 -9
- package/dist/commonjs/funcs/commerce/cartItemsCreate.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/cartItemsCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/cartItemsCreate.js +115 -0
- package/dist/commonjs/funcs/commerce/cartItemsCreate.js.map +1 -0
- package/dist/commonjs/funcs/commerce/cartItemsDelete.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/cartItemsDelete.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/cartItemsDelete.js +109 -0
- package/dist/commonjs/funcs/commerce/cartItemsDelete.js.map +1 -0
- package/dist/commonjs/funcs/commerce/cartItemsGet.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/cartItemsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/cartItemsGet.js +118 -0
- package/dist/commonjs/funcs/commerce/cartItemsGet.js.map +1 -0
- package/dist/commonjs/funcs/commerce/cartItemsList.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/cartItemsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/cartItemsList.js +132 -0
- package/dist/commonjs/funcs/commerce/cartItemsList.js.map +1 -0
- package/dist/commonjs/funcs/commerce/cartItemsUpdate.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/cartItemsUpdate.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/cartItemsUpdate.js +114 -0
- package/dist/commonjs/funcs/commerce/cartItemsUpdate.js.map +1 -0
- package/dist/commonjs/funcs/commerce/cartsCreate.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/cartsCreate.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/cartsCreate.js +114 -0
- package/dist/commonjs/funcs/commerce/cartsCreate.js.map +1 -0
- package/dist/commonjs/funcs/commerce/cartsGet.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/cartsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/cartsGet.js +117 -0
- package/dist/commonjs/funcs/commerce/cartsGet.js.map +1 -0
- package/dist/commonjs/funcs/commerce/cartsList.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/cartsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/cartsList.js +131 -0
- package/dist/commonjs/funcs/commerce/cartsList.js.map +1 -0
- package/dist/commonjs/funcs/commerce/cartsUpdate.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/cartsUpdate.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/cartsUpdate.js +113 -0
- package/dist/commonjs/funcs/commerce/cartsUpdate.js.map +1 -0
- package/dist/commonjs/funcs/commerce/categoriesGet.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/categoriesGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/categoriesGet.js +117 -0
- package/dist/commonjs/funcs/commerce/categoriesGet.js.map +1 -0
- package/dist/commonjs/funcs/commerce/categoriesList.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/categoriesList.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/categoriesList.js +131 -0
- package/dist/commonjs/funcs/commerce/categoriesList.js.map +1 -0
- package/dist/commonjs/funcs/commerce/productsGet.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/productsGet.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/productsGet.js +117 -0
- package/dist/commonjs/funcs/commerce/productsGet.js.map +1 -0
- package/dist/commonjs/funcs/commerce/productsList.d.ts +10 -0
- package/dist/commonjs/funcs/commerce/productsList.d.ts.map +1 -0
- package/dist/commonjs/funcs/commerce/productsList.js +131 -0
- package/dist/commonjs/funcs/commerce/productsList.js.map +1 -0
- package/dist/commonjs/funcs/index.d.ts +14 -0
- package/dist/commonjs/funcs/index.d.ts.map +1 -0
- package/dist/commonjs/funcs/index.js +33 -0
- package/dist/commonjs/funcs/index.js.map +1 -0
- package/dist/commonjs/hooks/ominity-hooks.d.ts.map +1 -1
- package/dist/commonjs/hooks/ominity-hooks.js +3 -0
- package/dist/commonjs/hooks/ominity-hooks.js.map +1 -1
- package/dist/commonjs/index.d.ts +3 -0
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js +3 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -2
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +4 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/models/commerce/address.d.ts +15 -0
- package/dist/commonjs/models/commerce/address.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/address.js +53 -0
- package/dist/commonjs/models/commerce/address.js.map +1 -0
- package/dist/commonjs/models/commerce/cart-item.d.ts +30 -0
- package/dist/commonjs/models/commerce/cart-item.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/cart-item.js +86 -0
- package/dist/commonjs/models/commerce/cart-item.js.map +1 -0
- package/dist/commonjs/models/commerce/cart.d.ts +65 -0
- package/dist/commonjs/models/commerce/cart.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/cart.js +109 -0
- package/dist/commonjs/models/commerce/cart.js.map +1 -0
- package/dist/commonjs/models/commerce/category.d.ts +30 -0
- package/dist/commonjs/models/commerce/category.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/category.js +89 -0
- package/dist/commonjs/models/commerce/category.js.map +1 -0
- package/dist/commonjs/models/commerce/index.d.ts +10 -0
- package/dist/commonjs/models/commerce/index.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/index.js +29 -0
- package/dist/commonjs/models/commerce/index.js.map +1 -0
- package/dist/commonjs/models/commerce/money.d.ts +11 -0
- package/dist/commonjs/models/commerce/money.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/money.js +48 -0
- package/dist/commonjs/models/commerce/money.js.map +1 -0
- package/dist/commonjs/models/commerce/product-group.d.ts +12 -0
- package/dist/commonjs/models/commerce/product-group.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/product-group.js +50 -0
- package/dist/commonjs/models/commerce/product-group.js.map +1 -0
- package/dist/commonjs/models/commerce/product-offer.d.ts +16 -0
- package/dist/commonjs/models/commerce/product-offer.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/product-offer.js +55 -0
- package/dist/commonjs/models/commerce/product-offer.js.map +1 -0
- package/dist/commonjs/models/commerce/product.d.ts +62 -0
- package/dist/commonjs/models/commerce/product.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/product.js +121 -0
- package/dist/commonjs/models/commerce/product.js.map +1 -0
- package/dist/commonjs/models/commerce/route.d.ts +13 -0
- package/dist/commonjs/models/commerce/route.d.ts.map +1 -0
- package/dist/commonjs/models/commerce/route.js +51 -0
- package/dist/commonjs/models/commerce/route.js.map +1 -0
- package/dist/commonjs/models/common/amount.d.ts +8 -0
- package/dist/commonjs/models/common/amount.d.ts.map +1 -0
- package/dist/commonjs/models/common/amount.js +46 -0
- package/dist/commonjs/models/common/amount.js.map +1 -0
- package/dist/commonjs/models/common/index.d.ts +3 -0
- package/dist/commonjs/models/common/index.d.ts.map +1 -0
- package/dist/commonjs/models/common/index.js +22 -0
- package/dist/commonjs/models/common/index.js.map +1 -0
- package/dist/commonjs/models/common/tag.d.ts +14 -0
- package/dist/commonjs/models/common/tag.d.ts.map +1 -0
- package/dist/commonjs/models/common/tag.js +53 -0
- package/dist/commonjs/models/common/tag.js.map +1 -0
- package/dist/commonjs/models/hal.d.ts +11 -0
- package/dist/commonjs/models/hal.d.ts.map +1 -0
- package/dist/commonjs/models/hal.js +48 -0
- package/dist/commonjs/models/hal.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +4 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +4 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/operations/commerce-cart-items.d.ts +60 -0
- package/dist/commonjs/models/operations/commerce-cart-items.d.ts.map +1 -0
- package/dist/commonjs/models/operations/commerce-cart-items.js +92 -0
- package/dist/commonjs/models/operations/commerce-cart-items.js.map +1 -0
- package/dist/commonjs/models/operations/commerce-carts.d.ts +75 -0
- package/dist/commonjs/models/operations/commerce-carts.d.ts.map +1 -0
- package/dist/commonjs/models/operations/commerce-carts.js +111 -0
- package/dist/commonjs/models/operations/commerce-carts.js.map +1 -0
- package/dist/commonjs/models/operations/commerce-categories.d.ts +25 -0
- package/dist/commonjs/models/operations/commerce-categories.d.ts.map +1 -0
- package/dist/commonjs/models/operations/commerce-categories.js +60 -0
- package/dist/commonjs/models/operations/commerce-categories.js.map +1 -0
- package/dist/commonjs/models/operations/commerce-products.d.ts +25 -0
- package/dist/commonjs/models/operations/commerce-products.d.ts.map +1 -0
- package/dist/commonjs/models/operations/commerce-products.js +64 -0
- package/dist/commonjs/models/operations/commerce-products.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +4 -1
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +18 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/pagination.d.ts +20 -0
- package/dist/commonjs/models/pagination.d.ts.map +1 -0
- package/dist/commonjs/models/pagination.js +103 -0
- package/dist/commonjs/models/pagination.js.map +1 -0
- package/dist/commonjs/sdk/commerce/cart-items.d.ts +29 -0
- package/dist/commonjs/sdk/commerce/cart-items.d.ts.map +1 -0
- package/dist/commonjs/sdk/commerce/cart-items.js +64 -0
- package/dist/commonjs/sdk/commerce/cart-items.js.map +1 -0
- package/dist/commonjs/sdk/commerce/carts.d.ts +25 -0
- package/dist/commonjs/sdk/commerce/carts.d.ts.map +1 -0
- package/dist/commonjs/sdk/commerce/carts.js +44 -0
- package/dist/commonjs/sdk/commerce/carts.js.map +1 -0
- package/dist/commonjs/sdk/commerce/categories.d.ts +15 -0
- package/dist/commonjs/sdk/commerce/categories.d.ts.map +1 -0
- package/dist/commonjs/sdk/commerce/categories.js +30 -0
- package/dist/commonjs/sdk/commerce/categories.js.map +1 -0
- package/dist/commonjs/sdk/commerce/index.d.ts +9 -0
- package/dist/commonjs/sdk/commerce/index.d.ts.map +1 -1
- package/dist/commonjs/sdk/commerce/index.js +12 -0
- package/dist/commonjs/sdk/commerce/index.js.map +1 -1
- package/dist/commonjs/sdk/commerce/products.d.ts +12 -1
- package/dist/commonjs/sdk/commerce/products.d.ts.map +1 -1
- package/dist/commonjs/sdk/commerce/products.js +19 -0
- package/dist/commonjs/sdk/commerce/products.js.map +1 -1
- package/dist/commonjs/sdk/modules.d.ts +9 -0
- package/dist/commonjs/sdk/modules.d.ts.map +1 -0
- package/dist/commonjs/sdk/modules.js +3 -0
- package/dist/commonjs/sdk/modules.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +8 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +16 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/commerce/cartItemsCreate.d.ts +10 -0
- package/dist/esm/funcs/commerce/cartItemsCreate.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/cartItemsCreate.js +79 -0
- package/dist/esm/funcs/commerce/cartItemsCreate.js.map +1 -0
- package/dist/esm/funcs/commerce/cartItemsDelete.d.ts +10 -0
- package/dist/esm/funcs/commerce/cartItemsDelete.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/cartItemsDelete.js +73 -0
- package/dist/esm/funcs/commerce/cartItemsDelete.js.map +1 -0
- package/dist/esm/funcs/commerce/cartItemsGet.d.ts +10 -0
- package/dist/esm/funcs/commerce/cartItemsGet.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/cartItemsGet.js +82 -0
- package/dist/esm/funcs/commerce/cartItemsGet.js.map +1 -0
- package/dist/esm/funcs/commerce/cartItemsList.d.ts +10 -0
- package/dist/esm/funcs/commerce/cartItemsList.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/cartItemsList.js +96 -0
- package/dist/esm/funcs/commerce/cartItemsList.js.map +1 -0
- package/dist/esm/funcs/commerce/cartItemsUpdate.d.ts +10 -0
- package/dist/esm/funcs/commerce/cartItemsUpdate.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/cartItemsUpdate.js +78 -0
- package/dist/esm/funcs/commerce/cartItemsUpdate.js.map +1 -0
- package/dist/esm/funcs/commerce/cartsCreate.d.ts +10 -0
- package/dist/esm/funcs/commerce/cartsCreate.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/cartsCreate.js +78 -0
- package/dist/esm/funcs/commerce/cartsCreate.js.map +1 -0
- package/dist/esm/funcs/commerce/cartsGet.d.ts +10 -0
- package/dist/esm/funcs/commerce/cartsGet.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/cartsGet.js +81 -0
- package/dist/esm/funcs/commerce/cartsGet.js.map +1 -0
- package/dist/esm/funcs/commerce/cartsList.d.ts +10 -0
- package/dist/esm/funcs/commerce/cartsList.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/cartsList.js +95 -0
- package/dist/esm/funcs/commerce/cartsList.js.map +1 -0
- package/dist/esm/funcs/commerce/cartsUpdate.d.ts +10 -0
- package/dist/esm/funcs/commerce/cartsUpdate.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/cartsUpdate.js +77 -0
- package/dist/esm/funcs/commerce/cartsUpdate.js.map +1 -0
- package/dist/esm/funcs/commerce/categoriesGet.d.ts +10 -0
- package/dist/esm/funcs/commerce/categoriesGet.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/categoriesGet.js +81 -0
- package/dist/esm/funcs/commerce/categoriesGet.js.map +1 -0
- package/dist/esm/funcs/commerce/categoriesList.d.ts +10 -0
- package/dist/esm/funcs/commerce/categoriesList.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/categoriesList.js +95 -0
- package/dist/esm/funcs/commerce/categoriesList.js.map +1 -0
- package/dist/esm/funcs/commerce/productsGet.d.ts +10 -0
- package/dist/esm/funcs/commerce/productsGet.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/productsGet.js +81 -0
- package/dist/esm/funcs/commerce/productsGet.js.map +1 -0
- package/dist/esm/funcs/commerce/productsList.d.ts +10 -0
- package/dist/esm/funcs/commerce/productsList.d.ts.map +1 -0
- package/dist/esm/funcs/commerce/productsList.js +95 -0
- package/dist/esm/funcs/commerce/productsList.js.map +1 -0
- package/dist/esm/funcs/index.d.ts +14 -0
- package/dist/esm/funcs/index.d.ts.map +1 -0
- package/dist/esm/funcs/index.js +17 -0
- package/dist/esm/funcs/index.js.map +1 -0
- package/dist/esm/hooks/ominity-hooks.d.ts.map +1 -1
- package/dist/esm/hooks/ominity-hooks.js +3 -0
- package/dist/esm/hooks/ominity-hooks.js.map +1 -1
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/config.d.ts +3 -2
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +3 -2
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/models/commerce/address.d.ts +15 -0
- package/dist/esm/models/commerce/address.d.ts.map +1 -0
- package/dist/esm/models/commerce/address.js +17 -0
- package/dist/esm/models/commerce/address.js.map +1 -0
- package/dist/esm/models/commerce/cart-item.d.ts +30 -0
- package/dist/esm/models/commerce/cart-item.d.ts.map +1 -0
- package/dist/esm/models/commerce/cart-item.js +50 -0
- package/dist/esm/models/commerce/cart-item.js.map +1 -0
- package/dist/esm/models/commerce/cart.d.ts +65 -0
- package/dist/esm/models/commerce/cart.d.ts.map +1 -0
- package/dist/esm/models/commerce/cart.js +73 -0
- package/dist/esm/models/commerce/cart.js.map +1 -0
- package/dist/esm/models/commerce/category.d.ts +30 -0
- package/dist/esm/models/commerce/category.d.ts.map +1 -0
- package/dist/esm/models/commerce/category.js +53 -0
- package/dist/esm/models/commerce/category.js.map +1 -0
- package/dist/esm/models/commerce/index.d.ts +10 -0
- package/dist/esm/models/commerce/index.d.ts.map +1 -0
- package/dist/esm/models/commerce/index.js +13 -0
- package/dist/esm/models/commerce/index.js.map +1 -0
- package/dist/esm/models/commerce/money.d.ts +11 -0
- package/dist/esm/models/commerce/money.d.ts.map +1 -0
- package/dist/esm/models/commerce/money.js +12 -0
- package/dist/esm/models/commerce/money.js.map +1 -0
- package/dist/esm/models/commerce/product-group.d.ts +12 -0
- package/dist/esm/models/commerce/product-group.d.ts.map +1 -0
- package/dist/esm/models/commerce/product-group.js +14 -0
- package/dist/esm/models/commerce/product-group.js.map +1 -0
- package/dist/esm/models/commerce/product-offer.d.ts +16 -0
- package/dist/esm/models/commerce/product-offer.d.ts.map +1 -0
- package/dist/esm/models/commerce/product-offer.js +19 -0
- package/dist/esm/models/commerce/product-offer.js.map +1 -0
- package/dist/esm/models/commerce/product.d.ts +62 -0
- package/dist/esm/models/commerce/product.d.ts.map +1 -0
- package/dist/esm/models/commerce/product.js +85 -0
- package/dist/esm/models/commerce/product.js.map +1 -0
- package/dist/esm/models/commerce/route.d.ts +13 -0
- package/dist/esm/models/commerce/route.d.ts.map +1 -0
- package/dist/esm/models/commerce/route.js +15 -0
- package/dist/esm/models/commerce/route.js.map +1 -0
- package/dist/esm/models/common/amount.d.ts +8 -0
- package/dist/esm/models/common/amount.d.ts.map +1 -0
- package/dist/esm/models/common/amount.js +10 -0
- package/dist/esm/models/common/amount.js.map +1 -0
- package/dist/esm/models/common/index.d.ts +3 -0
- package/dist/esm/models/common/index.d.ts.map +1 -0
- package/dist/esm/models/common/index.js +6 -0
- package/dist/esm/models/common/index.js.map +1 -0
- package/dist/esm/models/common/tag.d.ts +14 -0
- package/dist/esm/models/common/tag.d.ts.map +1 -0
- package/dist/esm/models/common/tag.js +17 -0
- package/dist/esm/models/common/tag.js.map +1 -0
- package/dist/esm/models/hal.d.ts +11 -0
- package/dist/esm/models/hal.d.ts.map +1 -0
- package/dist/esm/models/hal.js +12 -0
- package/dist/esm/models/hal.js.map +1 -0
- package/dist/esm/models/index.d.ts +4 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +4 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/operations/commerce-cart-items.d.ts +60 -0
- package/dist/esm/models/operations/commerce-cart-items.d.ts.map +1 -0
- package/dist/esm/models/operations/commerce-cart-items.js +56 -0
- package/dist/esm/models/operations/commerce-cart-items.js.map +1 -0
- package/dist/esm/models/operations/commerce-carts.d.ts +75 -0
- package/dist/esm/models/operations/commerce-carts.d.ts.map +1 -0
- package/dist/esm/models/operations/commerce-carts.js +75 -0
- package/dist/esm/models/operations/commerce-carts.js.map +1 -0
- package/dist/esm/models/operations/commerce-categories.d.ts +25 -0
- package/dist/esm/models/operations/commerce-categories.d.ts.map +1 -0
- package/dist/esm/models/operations/commerce-categories.js +24 -0
- package/dist/esm/models/operations/commerce-categories.js.map +1 -0
- package/dist/esm/models/operations/commerce-products.d.ts +25 -0
- package/dist/esm/models/operations/commerce-products.d.ts.map +1 -0
- package/dist/esm/models/operations/commerce-products.js +28 -0
- package/dist/esm/models/operations/commerce-products.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +4 -1
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -1
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/pagination.d.ts +20 -0
- package/dist/esm/models/pagination.d.ts.map +1 -0
- package/dist/esm/models/pagination.js +98 -0
- package/dist/esm/models/pagination.js.map +1 -0
- package/dist/esm/sdk/commerce/cart-items.d.ts +29 -0
- package/dist/esm/sdk/commerce/cart-items.d.ts.map +1 -0
- package/dist/esm/sdk/commerce/cart-items.js +60 -0
- package/dist/esm/sdk/commerce/cart-items.js.map +1 -0
- package/dist/esm/sdk/commerce/carts.d.ts +25 -0
- package/dist/esm/sdk/commerce/carts.d.ts.map +1 -0
- package/dist/esm/sdk/commerce/carts.js +40 -0
- package/dist/esm/sdk/commerce/carts.js.map +1 -0
- package/dist/esm/sdk/commerce/categories.d.ts +15 -0
- package/dist/esm/sdk/commerce/categories.d.ts.map +1 -0
- package/dist/esm/sdk/commerce/categories.js +26 -0
- package/dist/esm/sdk/commerce/categories.js.map +1 -0
- package/dist/esm/sdk/commerce/index.d.ts +9 -0
- package/dist/esm/sdk/commerce/index.d.ts.map +1 -1
- package/dist/esm/sdk/commerce/index.js +12 -0
- package/dist/esm/sdk/commerce/index.js.map +1 -1
- package/dist/esm/sdk/commerce/products.d.ts +12 -1
- package/dist/esm/sdk/commerce/products.d.ts.map +1 -1
- package/dist/esm/sdk/commerce/products.js +19 -0
- package/dist/esm/sdk/commerce/products.js.map +1 -1
- package/dist/esm/sdk/modules.d.ts +9 -0
- package/dist/esm/sdk/modules.d.ts.map +1 -0
- package/dist/esm/sdk/modules.js +2 -0
- package/dist/esm/sdk/modules.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +8 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +16 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/jsr.json +5 -7
- package/package.json +4 -2
- package/scripts/sync-version.mjs +38 -0
- package/src/funcs/commerce/cartItemsCreate.ts +162 -0
- package/src/funcs/commerce/cartItemsDelete.ts +156 -0
- package/src/funcs/commerce/cartItemsGet.ts +165 -0
- package/src/funcs/commerce/cartItemsList.ts +187 -0
- package/src/funcs/commerce/cartItemsUpdate.ts +160 -0
- package/src/funcs/commerce/cartsCreate.ts +161 -0
- package/src/funcs/commerce/cartsGet.ts +164 -0
- package/src/funcs/commerce/cartsList.ts +187 -0
- package/src/funcs/commerce/cartsUpdate.ts +159 -0
- package/src/funcs/commerce/categoriesGet.ts +164 -0
- package/src/funcs/commerce/categoriesList.ts +187 -0
- package/src/funcs/commerce/productsGet.ts +164 -0
- package/src/funcs/commerce/productsList.ts +187 -0
- package/src/funcs/index.ts +17 -0
- package/src/hooks/ominity-hooks.ts +4 -0
- package/src/index.ts +3 -0
- package/src/lib/config.ts +4 -2
- package/src/models/commerce/address.ts +30 -0
- package/src/models/commerce/cart-item.ts +83 -0
- package/src/models/commerce/cart.ts +128 -0
- package/src/models/commerce/category.ts +87 -0
- package/src/models/commerce/index.ts +13 -0
- package/src/models/commerce/money.ts +24 -0
- package/src/models/commerce/product-group.ts +23 -0
- package/src/models/commerce/product-offer.ts +31 -0
- package/src/models/commerce/product.ts +153 -0
- package/src/models/commerce/route.ts +29 -0
- package/src/models/common/amount.ts +16 -0
- package/src/models/common/index.ts +6 -0
- package/src/models/common/tag.ts +28 -0
- package/src/models/hal.ts +24 -0
- package/src/models/index.ts +4 -0
- package/src/models/operations/commerce-cart-items.ts +125 -0
- package/src/models/operations/commerce-carts.ts +158 -0
- package/src/models/operations/commerce-categories.ts +52 -0
- package/src/models/operations/commerce-products.ts +53 -0
- package/src/models/operations/index.ts +4 -2
- package/src/models/pagination.ts +146 -0
- package/src/sdk/commerce/cart-items.ts +113 -0
- package/src/sdk/commerce/carts.ts +81 -0
- package/src/sdk/commerce/categories.ts +48 -0
- package/src/sdk/commerce/index.ts +19 -0
- package/src/sdk/commerce/products.ts +43 -2
- package/src/sdk/modules.ts +16 -0
- package/src/sdk/sdk.ts +29 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Commerce product models.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { HalLinks, HalLinks$inboundSchema } from "../hal.js";
|
|
8
|
+
import { Paginated, buildPaginated } from "../pagination.js";
|
|
9
|
+
import { Category, Category$inboundSchema } from "./category.js";
|
|
10
|
+
import { ProductGroup, ProductGroup$inboundSchema } from "./product-group.js";
|
|
11
|
+
import { ProductOffer, ProductOffer$inboundSchema } from "./product-offer.js";
|
|
12
|
+
import { Route, Route$inboundSchema } from "./route.js";
|
|
13
|
+
|
|
14
|
+
export type ReviewSummary = {
|
|
15
|
+
total: number;
|
|
16
|
+
rating: number | null;
|
|
17
|
+
breakdown: unknown[];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type MeasurementValue = {
|
|
21
|
+
value: number;
|
|
22
|
+
unit: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type Measurements = {
|
|
26
|
+
height?: MeasurementValue;
|
|
27
|
+
width?: MeasurementValue;
|
|
28
|
+
depth?: MeasurementValue;
|
|
29
|
+
weight?: MeasurementValue;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type Product = {
|
|
33
|
+
resource: string;
|
|
34
|
+
id: number;
|
|
35
|
+
sku: string;
|
|
36
|
+
ean?: string | null;
|
|
37
|
+
mpn?: string | null;
|
|
38
|
+
asin?: string | null;
|
|
39
|
+
title: string;
|
|
40
|
+
shortTitle?: string | null;
|
|
41
|
+
coverImage?: string | null;
|
|
42
|
+
additionalImages?: string[];
|
|
43
|
+
shortDescription?: string | null;
|
|
44
|
+
description?: string | null;
|
|
45
|
+
bulletpoints?: string[];
|
|
46
|
+
boxContent?: string | null;
|
|
47
|
+
type?: string;
|
|
48
|
+
condition?: string;
|
|
49
|
+
categoryId?: number | null;
|
|
50
|
+
stock?: number | null;
|
|
51
|
+
isBackorderAllowed?: boolean;
|
|
52
|
+
routes?: Record<string, Route>;
|
|
53
|
+
offers?: ProductOffer[];
|
|
54
|
+
reviews?: ReviewSummary;
|
|
55
|
+
searches?: string[];
|
|
56
|
+
customFields?: unknown[];
|
|
57
|
+
publishedAt?: string | null;
|
|
58
|
+
videos?: unknown[];
|
|
59
|
+
updatedAt?: string;
|
|
60
|
+
createdAt?: string;
|
|
61
|
+
measurements?: Measurements;
|
|
62
|
+
category?: Category;
|
|
63
|
+
productGroups?: ProductGroup[];
|
|
64
|
+
links?: HalLinks;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export type ProductsListResponse = Paginated<Product>;
|
|
68
|
+
|
|
69
|
+
const MeasurementValue$inboundSchema = z.object({
|
|
70
|
+
value: z.number(),
|
|
71
|
+
unit: z.string(),
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const Measurements$inboundSchema = z.object({
|
|
75
|
+
height: MeasurementValue$inboundSchema.optional(),
|
|
76
|
+
width: MeasurementValue$inboundSchema.optional(),
|
|
77
|
+
depth: MeasurementValue$inboundSchema.optional(),
|
|
78
|
+
weight: MeasurementValue$inboundSchema.optional(),
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
const ReviewSummary$inboundSchema = z.object({
|
|
82
|
+
total: z.number(),
|
|
83
|
+
rating: z.number().nullable(),
|
|
84
|
+
breakdown: z.array(z.any()),
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
const ProductEmbedded$inboundSchema = z.object({
|
|
88
|
+
category: Category$inboundSchema.optional(),
|
|
89
|
+
product_groups: z.array(ProductGroup$inboundSchema).optional(),
|
|
90
|
+
}).loose();
|
|
91
|
+
|
|
92
|
+
/** @internal */
|
|
93
|
+
export const Product$inboundSchema: z.ZodType<Product> = z.object({
|
|
94
|
+
resource: z.string(),
|
|
95
|
+
id: z.number(),
|
|
96
|
+
sku: z.string(),
|
|
97
|
+
ean: z.string().nullable().optional(),
|
|
98
|
+
mpn: z.string().nullable().optional(),
|
|
99
|
+
asin: z.string().nullable().optional(),
|
|
100
|
+
title: z.string(),
|
|
101
|
+
shortTitle: z.string().nullable().optional(),
|
|
102
|
+
coverImage: z.string().nullable().optional(),
|
|
103
|
+
additionalImages: z.array(z.string()).optional(),
|
|
104
|
+
shortDescription: z.string().nullable().optional(),
|
|
105
|
+
description: z.string().nullable().optional(),
|
|
106
|
+
bulletpoints: z.array(z.string()).optional(),
|
|
107
|
+
boxContent: z.string().nullable().optional(),
|
|
108
|
+
type: z.string().optional(),
|
|
109
|
+
condition: z.string().optional(),
|
|
110
|
+
categoryId: z.number().nullable().optional(),
|
|
111
|
+
stock: z.number().nullable().optional(),
|
|
112
|
+
isBackorderAllowed: z.boolean().optional(),
|
|
113
|
+
routes: z.record(z.string(), Route$inboundSchema).optional(),
|
|
114
|
+
offers: z.array(ProductOffer$inboundSchema).optional(),
|
|
115
|
+
reviews: ReviewSummary$inboundSchema.optional(),
|
|
116
|
+
searches: z.array(z.string()).optional(),
|
|
117
|
+
customFields: z.array(z.any()).optional(),
|
|
118
|
+
publishedAt: z.string().nullable().optional(),
|
|
119
|
+
videos: z.array(z.any()).optional(),
|
|
120
|
+
updatedAt: z.string().optional(),
|
|
121
|
+
createdAt: z.string().optional(),
|
|
122
|
+
measurements: Measurements$inboundSchema.optional(),
|
|
123
|
+
_links: HalLinks$inboundSchema.optional(),
|
|
124
|
+
_embedded: ProductEmbedded$inboundSchema.optional(),
|
|
125
|
+
}).transform((v) => {
|
|
126
|
+
const { _embedded } = v;
|
|
127
|
+
const category = _embedded?.category;
|
|
128
|
+
const productGroups = _embedded?.product_groups;
|
|
129
|
+
|
|
130
|
+
const remapped = remap$(v, { _links: "links", _embedded: null });
|
|
131
|
+
|
|
132
|
+
if (category !== undefined) {
|
|
133
|
+
(remapped as Product).category = category;
|
|
134
|
+
}
|
|
135
|
+
if (productGroups !== undefined) {
|
|
136
|
+
(remapped as Product).productGroups = productGroups;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return remapped as Product;
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
/** @internal */
|
|
143
|
+
export const ProductsListResponse$inboundSchema: z.ZodType<
|
|
144
|
+
ProductsListResponse
|
|
145
|
+
> = z.object({
|
|
146
|
+
_embedded: z.object({
|
|
147
|
+
products: z.array(Product$inboundSchema),
|
|
148
|
+
}),
|
|
149
|
+
count: z.number(),
|
|
150
|
+
_links: HalLinks$inboundSchema.optional(),
|
|
151
|
+
}).transform((v) =>
|
|
152
|
+
buildPaginated(v._embedded.products, v.count, v._links)
|
|
153
|
+
);
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Route model.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
|
|
7
|
+
export type RouteParameters = Record<string, string | number>;
|
|
8
|
+
|
|
9
|
+
export type Route = {
|
|
10
|
+
resource: string;
|
|
11
|
+
name: string;
|
|
12
|
+
locale: string;
|
|
13
|
+
parameters: RouteParameters;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const RouteParameters$inboundSchema: z.ZodType<RouteParameters> = z
|
|
18
|
+
.record(
|
|
19
|
+
z.string(),
|
|
20
|
+
z.union([z.string(), z.number()]),
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const Route$inboundSchema: z.ZodType<Route> = z.object({
|
|
25
|
+
resource: z.string(),
|
|
26
|
+
name: z.string(),
|
|
27
|
+
locale: z.string(),
|
|
28
|
+
parameters: RouteParameters$inboundSchema,
|
|
29
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Currency amount model (string value + currency code).
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
|
|
7
|
+
export type CurrencyAmount = {
|
|
8
|
+
value: string;
|
|
9
|
+
currency: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const CurrencyAmount$inboundSchema: z.ZodType<CurrencyAmount> = z.object({
|
|
14
|
+
value: z.string(),
|
|
15
|
+
currency: z.string(),
|
|
16
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Tag model.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { HalLinks, HalLinks$inboundSchema } from "../hal.js";
|
|
8
|
+
|
|
9
|
+
export type Tag = {
|
|
10
|
+
resource: string;
|
|
11
|
+
id: number;
|
|
12
|
+
label: string;
|
|
13
|
+
color: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
createdAt: string;
|
|
16
|
+
links?: HalLinks;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const Tag$inboundSchema: z.ZodType<Tag> = z.object({
|
|
21
|
+
resource: z.string(),
|
|
22
|
+
id: z.number(),
|
|
23
|
+
label: z.string(),
|
|
24
|
+
color: z.string(),
|
|
25
|
+
updatedAt: z.string(),
|
|
26
|
+
createdAt: z.string(),
|
|
27
|
+
_links: HalLinks$inboundSchema.optional(),
|
|
28
|
+
}).transform((v) => remap$(v, { _links: "links" }) as Tag);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Shared HAL link types.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
|
|
7
|
+
export type HalLink = {
|
|
8
|
+
href: string;
|
|
9
|
+
type?: string | null | undefined;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type HalLinks = Record<string, HalLink | null | undefined>;
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const HalLink$inboundSchema: z.ZodType<HalLink> = z.object({
|
|
16
|
+
href: z.string(),
|
|
17
|
+
type: z.string().nullable().optional(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const HalLinks$inboundSchema: z.ZodType<HalLinks> = z.record(
|
|
22
|
+
z.string(),
|
|
23
|
+
z.union([HalLink$inboundSchema, z.null()]),
|
|
24
|
+
);
|
package/src/models/index.ts
CHANGED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Commerce cart items operations.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { CartItem, CartItemsListResponse } from "../commerce/cart-item.js";
|
|
7
|
+
|
|
8
|
+
export type CartItemsListParams = {
|
|
9
|
+
page?: number | undefined;
|
|
10
|
+
limit?: number | undefined;
|
|
11
|
+
include?: string | string[] | undefined;
|
|
12
|
+
filter?: Record<string, unknown> | string | undefined;
|
|
13
|
+
sort?: string | string[] | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type CartItemGetParams = {
|
|
17
|
+
include?: string | string[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type ListCartItemsRequest = CartItemsListParams & {
|
|
21
|
+
cartId: string;
|
|
22
|
+
};
|
|
23
|
+
export type ListCartItemsResponse = CartItemsListResponse;
|
|
24
|
+
|
|
25
|
+
export type GetCartItemRequest = CartItemGetParams & {
|
|
26
|
+
cartId: string;
|
|
27
|
+
itemId: string;
|
|
28
|
+
};
|
|
29
|
+
export type GetCartItemResponse = CartItem;
|
|
30
|
+
|
|
31
|
+
export type CartItemCreateInput = {
|
|
32
|
+
productId: number;
|
|
33
|
+
productOfferId?: number | undefined;
|
|
34
|
+
quantity?: number | undefined;
|
|
35
|
+
};
|
|
36
|
+
export type CartItemUpdateInput = {
|
|
37
|
+
quantity?: number | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type CreateCartItemRequest = {
|
|
41
|
+
cartId: string;
|
|
42
|
+
body: CartItemCreateInput;
|
|
43
|
+
};
|
|
44
|
+
export type CreateCartItemResponse = CartItem;
|
|
45
|
+
|
|
46
|
+
export type UpdateCartItemRequest = {
|
|
47
|
+
cartId: string;
|
|
48
|
+
itemId: string;
|
|
49
|
+
body: CartItemUpdateInput;
|
|
50
|
+
};
|
|
51
|
+
export type UpdateCartItemResponse = CartItem;
|
|
52
|
+
|
|
53
|
+
export type DeleteCartItemRequest = {
|
|
54
|
+
cartId: string;
|
|
55
|
+
itemId: string;
|
|
56
|
+
};
|
|
57
|
+
export type DeleteCartItemResponse = void;
|
|
58
|
+
|
|
59
|
+
/** @internal */
|
|
60
|
+
export const CartItemsListParams$outboundSchema: z.ZodType<CartItemsListParams> =
|
|
61
|
+
z.object({
|
|
62
|
+
page: z.number().int().optional(),
|
|
63
|
+
limit: z.number().int().optional(),
|
|
64
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
65
|
+
filter: z.union([z.string(), z.record(z.string(), z.any())]).optional(),
|
|
66
|
+
sort: z.union([z.string(), z.array(z.string())]).optional(),
|
|
67
|
+
}).loose();
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const CartItemGetParams$outboundSchema: z.ZodType<CartItemGetParams> = z
|
|
71
|
+
.object({
|
|
72
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
73
|
+
})
|
|
74
|
+
.loose();
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const ListCartItemsRequest$outboundSchema: z.ZodType<
|
|
78
|
+
ListCartItemsRequest
|
|
79
|
+
> = z.object({
|
|
80
|
+
cartId: z.string(),
|
|
81
|
+
page: z.number().int().optional(),
|
|
82
|
+
limit: z.number().int().optional(),
|
|
83
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
84
|
+
filter: z.union([z.string(), z.record(z.string(), z.any())]).optional(),
|
|
85
|
+
sort: z.union([z.string(), z.array(z.string())]).optional(),
|
|
86
|
+
}).loose();
|
|
87
|
+
|
|
88
|
+
/** @internal */
|
|
89
|
+
export const GetCartItemRequest$outboundSchema: z.ZodType<GetCartItemRequest> =
|
|
90
|
+
z.object({
|
|
91
|
+
cartId: z.string(),
|
|
92
|
+
itemId: z.string(),
|
|
93
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
94
|
+
}).loose();
|
|
95
|
+
|
|
96
|
+
/** @internal */
|
|
97
|
+
export const CreateCartItemRequest$outboundSchema: z.ZodType<
|
|
98
|
+
CreateCartItemRequest
|
|
99
|
+
> = z.object({
|
|
100
|
+
cartId: z.string(),
|
|
101
|
+
body: z.object({
|
|
102
|
+
productId: z.number(),
|
|
103
|
+
productOfferId: z.number().optional(),
|
|
104
|
+
quantity: z.number().optional(),
|
|
105
|
+
}).loose(),
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const UpdateCartItemRequest$outboundSchema: z.ZodType<
|
|
110
|
+
UpdateCartItemRequest
|
|
111
|
+
> = z.object({
|
|
112
|
+
cartId: z.string(),
|
|
113
|
+
itemId: z.string(),
|
|
114
|
+
body: z.object({
|
|
115
|
+
quantity: z.number().optional(),
|
|
116
|
+
}).loose(),
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
/** @internal */
|
|
120
|
+
export const DeleteCartItemRequest$outboundSchema: z.ZodType<
|
|
121
|
+
DeleteCartItemRequest
|
|
122
|
+
> = z.object({
|
|
123
|
+
cartId: z.string(),
|
|
124
|
+
itemId: z.string(),
|
|
125
|
+
});
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Commerce carts operations.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { Cart, CartType, CartsListResponse } from "../commerce/cart.js";
|
|
7
|
+
import { Address, Address$inboundSchema } from "../commerce/address.js";
|
|
8
|
+
|
|
9
|
+
export type CartsListParams = {
|
|
10
|
+
page?: number | undefined;
|
|
11
|
+
limit?: number | undefined;
|
|
12
|
+
include?: string | string[] | undefined;
|
|
13
|
+
filter?: Record<string, unknown> | string | undefined;
|
|
14
|
+
sort?: string | string[] | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export type CartGetParams = {
|
|
18
|
+
include?: string | string[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type ListCartsRequest = CartsListParams;
|
|
22
|
+
export type ListCartsResponse = CartsListResponse;
|
|
23
|
+
|
|
24
|
+
export type GetCartRequest = CartGetParams & {
|
|
25
|
+
id: string;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type GetCartResponse = Cart;
|
|
29
|
+
|
|
30
|
+
export type CartItemInput = {
|
|
31
|
+
id?: string | undefined;
|
|
32
|
+
productId: number;
|
|
33
|
+
productOfferId?: number | undefined;
|
|
34
|
+
quantity?: number | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export type CartCreateInput = {
|
|
38
|
+
visitorId?: number | null | undefined;
|
|
39
|
+
customerId?: number | null | undefined;
|
|
40
|
+
userId?: number | null | undefined;
|
|
41
|
+
type?: CartType | undefined;
|
|
42
|
+
email?: string | null | undefined;
|
|
43
|
+
companyName?: string | null | undefined;
|
|
44
|
+
companyVat?: string | null | undefined;
|
|
45
|
+
taxExempt?: boolean | undefined;
|
|
46
|
+
country: string;
|
|
47
|
+
currency?: string | null | undefined;
|
|
48
|
+
billingAddress?: Address | null | undefined;
|
|
49
|
+
shippingAddress?: Address | null | undefined;
|
|
50
|
+
items?: CartItemInput[] | undefined;
|
|
51
|
+
shippingMethodId?: number | null | undefined;
|
|
52
|
+
promotionCodes?: string[] | null | undefined;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export type CartUpdateInput = {
|
|
56
|
+
visitorId?: number | null | undefined;
|
|
57
|
+
customerId?: number | null | undefined;
|
|
58
|
+
userId?: number | null | undefined;
|
|
59
|
+
email?: string | null | undefined;
|
|
60
|
+
companyName?: string | null | undefined;
|
|
61
|
+
companyVat?: string | null | undefined;
|
|
62
|
+
taxExempt?: boolean | undefined;
|
|
63
|
+
country?: string | undefined;
|
|
64
|
+
currency?: string | undefined;
|
|
65
|
+
billingAddress?: Address | null | undefined;
|
|
66
|
+
shippingAddress?: Address | null | undefined;
|
|
67
|
+
items?: CartItemInput[] | undefined;
|
|
68
|
+
shippingMethodId?: number | null | undefined;
|
|
69
|
+
promotionCodes?: string[] | null | undefined;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export type CreateCartRequest = CartCreateInput;
|
|
73
|
+
export type CreateCartResponse = Cart;
|
|
74
|
+
|
|
75
|
+
export type UpdateCartRequest = {
|
|
76
|
+
id: string;
|
|
77
|
+
body: CartUpdateInput;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export type UpdateCartResponse = Cart;
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const CartsListParams$outboundSchema: z.ZodType<CartsListParams> = z
|
|
84
|
+
.object({
|
|
85
|
+
page: z.number().int().optional(),
|
|
86
|
+
limit: z.number().int().optional(),
|
|
87
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
88
|
+
filter: z.union([z.string(), z.record(z.string(), z.any())]).optional(),
|
|
89
|
+
sort: z.union([z.string(), z.array(z.string())]).optional(),
|
|
90
|
+
})
|
|
91
|
+
.loose();
|
|
92
|
+
|
|
93
|
+
/** @internal */
|
|
94
|
+
export const CartGetParams$outboundSchema: z.ZodType<CartGetParams> = z.object({
|
|
95
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
96
|
+
}).loose();
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export const GetCartRequest$outboundSchema: z.ZodType<GetCartRequest> = z.object({
|
|
100
|
+
id: z.string(),
|
|
101
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
102
|
+
}).loose();
|
|
103
|
+
|
|
104
|
+
/** @internal */
|
|
105
|
+
const CartItemInput$outboundSchema: z.ZodType<CartItemInput> = z.object({
|
|
106
|
+
id: z.string().optional(),
|
|
107
|
+
productId: z.number(),
|
|
108
|
+
productOfferId: z.number().optional(),
|
|
109
|
+
quantity: z.number().optional(),
|
|
110
|
+
}).loose();
|
|
111
|
+
|
|
112
|
+
/** @internal */
|
|
113
|
+
const CartType$outboundSchema: z.ZodType<CartType> = z.string().transform(
|
|
114
|
+
(value) => value as CartType,
|
|
115
|
+
);
|
|
116
|
+
|
|
117
|
+
export const CreateCartRequest$outboundSchema: z.ZodType<CreateCartRequest> = z
|
|
118
|
+
.object({
|
|
119
|
+
visitorId: z.number().nullable().optional(),
|
|
120
|
+
customerId: z.number().nullable().optional(),
|
|
121
|
+
userId: z.number().nullable().optional(),
|
|
122
|
+
type: CartType$outboundSchema.optional(),
|
|
123
|
+
email: z.string().nullable().optional(),
|
|
124
|
+
companyName: z.string().nullable().optional(),
|
|
125
|
+
companyVat: z.string().nullable().optional(),
|
|
126
|
+
taxExempt: z.boolean().optional(),
|
|
127
|
+
country: z.string(),
|
|
128
|
+
currency: z.string().nullable().optional(),
|
|
129
|
+
billingAddress: Address$inboundSchema.nullable().optional(),
|
|
130
|
+
shippingAddress: Address$inboundSchema.nullable().optional(),
|
|
131
|
+
items: z.array(CartItemInput$outboundSchema).optional(),
|
|
132
|
+
shippingMethodId: z.number().nullable().optional(),
|
|
133
|
+
promotionCodes: z.array(z.string()).nullable().optional(),
|
|
134
|
+
})
|
|
135
|
+
.loose()
|
|
136
|
+
.transform((v) => v as CreateCartRequest);
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const UpdateCartRequest$outboundSchema: z.ZodType<UpdateCartRequest> = z
|
|
140
|
+
.object({
|
|
141
|
+
id: z.string(),
|
|
142
|
+
body: z.object({
|
|
143
|
+
visitorId: z.number().nullable().optional(),
|
|
144
|
+
customerId: z.number().nullable().optional(),
|
|
145
|
+
userId: z.number().nullable().optional(),
|
|
146
|
+
email: z.string().nullable().optional(),
|
|
147
|
+
companyName: z.string().nullable().optional(),
|
|
148
|
+
companyVat: z.string().nullable().optional(),
|
|
149
|
+
taxExempt: z.boolean().optional(),
|
|
150
|
+
country: z.string().optional(),
|
|
151
|
+
currency: z.string().optional(),
|
|
152
|
+
billingAddress: Address$inboundSchema.nullable().optional(),
|
|
153
|
+
shippingAddress: Address$inboundSchema.nullable().optional(),
|
|
154
|
+
items: z.array(CartItemInput$outboundSchema).optional(),
|
|
155
|
+
shippingMethodId: z.number().nullable().optional(),
|
|
156
|
+
promotionCodes: z.array(z.string()).nullable().optional(),
|
|
157
|
+
}).loose(),
|
|
158
|
+
}).transform((v) => v as UpdateCartRequest);
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Commerce categories operations.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { Category, CategoriesListResponse } from "../commerce/category.js";
|
|
7
|
+
|
|
8
|
+
export type CategoriesListParams = {
|
|
9
|
+
page?: number | undefined;
|
|
10
|
+
limit?: number | undefined;
|
|
11
|
+
include?: string | string[] | undefined;
|
|
12
|
+
filter?: Record<string, unknown> | string | undefined;
|
|
13
|
+
sort?: string | string[] | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type CategoryGetParams = {
|
|
17
|
+
include?: string | string[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type ListCategoriesRequest = CategoriesListParams;
|
|
21
|
+
export type ListCategoriesResponse = CategoriesListResponse;
|
|
22
|
+
|
|
23
|
+
export type GetCategoryRequest = CategoryGetParams & {
|
|
24
|
+
id: number | string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type GetCategoryResponse = Category;
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const CategoriesListParams$outboundSchema: z.ZodType<
|
|
31
|
+
CategoriesListParams
|
|
32
|
+
> = z.object({
|
|
33
|
+
page: z.number().int().optional(),
|
|
34
|
+
limit: z.number().int().optional(),
|
|
35
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
36
|
+
filter: z.union([z.string(), z.record(z.string(), z.any())]).optional(),
|
|
37
|
+
sort: z.union([z.string(), z.array(z.string())]).optional(),
|
|
38
|
+
}).loose();
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const CategoryGetParams$outboundSchema: z.ZodType<CategoryGetParams> = z
|
|
42
|
+
.object({
|
|
43
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
44
|
+
})
|
|
45
|
+
.loose();
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const GetCategoryRequest$outboundSchema: z.ZodType<GetCategoryRequest> =
|
|
49
|
+
z.object({
|
|
50
|
+
id: z.union([z.string(), z.number()]),
|
|
51
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
52
|
+
}).loose();
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Commerce products operations.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { Product, ProductsListResponse } from "../commerce/product.js";
|
|
7
|
+
|
|
8
|
+
export type ProductsListParams = {
|
|
9
|
+
page?: number | undefined;
|
|
10
|
+
limit?: number | undefined;
|
|
11
|
+
include?: string | string[] | undefined;
|
|
12
|
+
filter?: Record<string, unknown> | string | undefined;
|
|
13
|
+
sort?: string | string[] | undefined;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type ProductGetParams = {
|
|
17
|
+
include?: string | string[] | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type ListProductsRequest = ProductsListParams;
|
|
21
|
+
export type ListProductsResponse = ProductsListResponse;
|
|
22
|
+
|
|
23
|
+
export type GetProductRequest = ProductGetParams & {
|
|
24
|
+
id: number | string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type GetProductResponse = Product;
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const ProductsListParams$outboundSchema: z.ZodType<ProductsListParams> = z
|
|
31
|
+
.object({
|
|
32
|
+
page: z.number().int().optional(),
|
|
33
|
+
limit: z.number().int().optional(),
|
|
34
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
35
|
+
filter: z.union([z.string(), z.record(z.string(), z.any())]).optional(),
|
|
36
|
+
sort: z.union([z.string(), z.array(z.string())]).optional(),
|
|
37
|
+
})
|
|
38
|
+
.loose();
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ProductGetParams$outboundSchema: z.ZodType<ProductGetParams> = z
|
|
42
|
+
.object({
|
|
43
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
44
|
+
})
|
|
45
|
+
.loose();
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const GetProductRequest$outboundSchema: z.ZodType<GetProductRequest> = z
|
|
49
|
+
.object({
|
|
50
|
+
id: z.union([z.string(), z.number()]),
|
|
51
|
+
include: z.union([z.string(), z.array(z.string())]).optional(),
|
|
52
|
+
})
|
|
53
|
+
.loose();
|