@teez-sdk/teez-b2c-api 3.0.0 → 4.0.0
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/LICENSE +21 -0
- package/README.md +228 -114
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/api/auth/check-token/index.d.cts +2 -0
- package/dist/api/auth/check-token/index.d.mts +2 -0
- package/dist/api/auth/check-token/operation.cjs +25 -0
- package/dist/api/auth/check-token/operation.cjs.map +1 -0
- package/dist/api/auth/check-token/operation.d.cts +44 -0
- package/dist/api/auth/check-token/operation.d.mts +44 -0
- package/dist/api/auth/check-token/operation.mjs +25 -0
- package/dist/api/auth/check-token/operation.mjs.map +1 -0
- package/dist/api/auth/check-token/responses.cjs +19 -0
- package/dist/api/auth/check-token/responses.cjs.map +1 -0
- package/dist/api/auth/check-token/responses.mjs +17 -0
- package/dist/api/auth/check-token/responses.mjs.map +1 -0
- package/dist/api/auth/check-token/types.d.cts +17 -0
- package/dist/api/auth/check-token/types.d.mts +17 -0
- package/dist/api/auth/index.d.cts +7 -0
- package/dist/api/auth/index.d.mts +7 -0
- package/dist/api/auth/login/index.d.cts +2 -0
- package/dist/api/auth/login/index.d.mts +2 -0
- package/dist/api/auth/login/operation.cjs +27 -0
- package/dist/api/auth/login/operation.cjs.map +1 -0
- package/dist/api/auth/login/operation.d.cts +34 -0
- package/dist/api/auth/login/operation.d.mts +34 -0
- package/dist/api/auth/login/operation.mjs +27 -0
- package/dist/api/auth/login/operation.mjs.map +1 -0
- package/dist/api/auth/login/request.cjs +9 -0
- package/dist/api/auth/login/request.cjs.map +1 -0
- package/dist/api/auth/login/request.mjs +7 -0
- package/dist/api/auth/login/request.mjs.map +1 -0
- package/dist/api/auth/login/types.d.cts +17 -0
- package/dist/api/auth/login/types.d.mts +17 -0
- package/dist/api/auth/operations.cjs +13 -0
- package/dist/api/auth/operations.cjs.map +1 -0
- package/dist/api/auth/operations.d.cts +118 -0
- package/dist/api/auth/operations.d.mts +118 -0
- package/dist/api/auth/operations.mjs +13 -0
- package/dist/api/auth/operations.mjs.map +1 -0
- package/dist/api/auth/verify/index.d.cts +2 -0
- package/dist/api/auth/verify/index.d.mts +2 -0
- package/dist/api/auth/verify/operation.cjs +27 -0
- package/dist/api/auth/verify/operation.cjs.map +1 -0
- package/dist/api/auth/verify/operation.d.cts +54 -0
- package/dist/api/auth/verify/operation.d.mts +54 -0
- package/dist/api/auth/verify/operation.mjs +27 -0
- package/dist/api/auth/verify/operation.mjs.map +1 -0
- package/dist/api/auth/verify/request.cjs +12 -0
- package/dist/api/auth/verify/request.cjs.map +1 -0
- package/dist/api/auth/verify/request.mjs +10 -0
- package/dist/api/auth/verify/request.mjs.map +1 -0
- package/dist/api/auth/verify/responses.cjs +19 -0
- package/dist/api/auth/verify/responses.cjs.map +1 -0
- package/dist/api/auth/verify/responses.mjs +17 -0
- package/dist/api/auth/verify/responses.mjs.map +1 -0
- package/dist/api/auth/verify/types.d.cts +17 -0
- package/dist/api/auth/verify/types.d.mts +17 -0
- package/dist/api/banners/index.d.cts +3 -0
- package/dist/api/banners/index.d.mts +3 -0
- package/dist/api/banners/list/index.d.cts +2 -0
- package/dist/api/banners/list/index.d.mts +2 -0
- package/dist/api/banners/list/operation.cjs +23 -0
- package/dist/api/banners/list/operation.cjs.map +1 -0
- package/dist/api/banners/list/operation.d.cts +71 -0
- package/dist/api/banners/list/operation.d.mts +71 -0
- package/dist/api/banners/list/operation.mjs +23 -0
- package/dist/api/banners/list/operation.mjs.map +1 -0
- package/dist/api/banners/list/request.cjs +9 -0
- package/dist/api/banners/list/request.cjs.map +1 -0
- package/dist/api/banners/list/request.mjs +7 -0
- package/dist/api/banners/list/request.mjs.map +1 -0
- package/dist/api/banners/list/responses.cjs +30 -0
- package/dist/api/banners/list/responses.cjs.map +1 -0
- package/dist/api/banners/list/responses.mjs +28 -0
- package/dist/api/banners/list/responses.mjs.map +1 -0
- package/dist/api/banners/list/types.d.cts +17 -0
- package/dist/api/banners/list/types.d.mts +17 -0
- package/dist/api/banners/operations.cjs +6 -0
- package/dist/api/banners/operations.cjs.map +1 -0
- package/dist/api/banners/operations.d.cts +73 -0
- package/dist/api/banners/operations.d.mts +73 -0
- package/dist/api/banners/operations.mjs +7 -0
- package/dist/api/banners/operations.mjs.map +1 -0
- package/dist/api/categories/get/index.d.cts +2 -0
- package/dist/api/categories/get/index.d.mts +2 -0
- package/dist/api/categories/get/operation.cjs +25 -0
- package/dist/api/categories/get/operation.cjs.map +1 -0
- package/dist/api/categories/get/operation.d.cts +31 -0
- package/dist/api/categories/get/operation.d.mts +31 -0
- package/dist/api/categories/get/operation.mjs +25 -0
- package/dist/api/categories/get/operation.mjs.map +1 -0
- package/dist/api/categories/get/request.cjs +9 -0
- package/dist/api/categories/get/request.cjs.map +1 -0
- package/dist/api/categories/get/request.mjs +7 -0
- package/dist/api/categories/get/request.mjs.map +1 -0
- package/dist/api/categories/get/responses.cjs +22 -0
- package/dist/api/categories/get/responses.cjs.map +1 -0
- package/dist/api/categories/get/responses.d.cts +22 -0
- package/dist/api/categories/get/responses.d.mts +22 -0
- package/dist/api/categories/get/responses.mjs +20 -0
- package/dist/api/categories/get/responses.mjs.map +1 -0
- package/dist/api/categories/get/types.d.cts +17 -0
- package/dist/api/categories/get/types.d.mts +17 -0
- package/dist/api/categories/get-parents/index.d.cts +2 -0
- package/dist/api/categories/get-parents/index.d.mts +2 -0
- package/dist/api/categories/get-parents/operation.cjs +23 -0
- package/dist/api/categories/get-parents/operation.cjs.map +1 -0
- package/dist/api/categories/get-parents/operation.d.cts +29 -0
- package/dist/api/categories/get-parents/operation.d.mts +29 -0
- package/dist/api/categories/get-parents/operation.mjs +23 -0
- package/dist/api/categories/get-parents/operation.mjs.map +1 -0
- package/dist/api/categories/get-parents/request.cjs +12 -0
- package/dist/api/categories/get-parents/request.cjs.map +1 -0
- package/dist/api/categories/get-parents/request.mjs +10 -0
- package/dist/api/categories/get-parents/request.mjs.map +1 -0
- package/dist/api/categories/get-parents/responses.cjs +20 -0
- package/dist/api/categories/get-parents/responses.cjs.map +1 -0
- package/dist/api/categories/get-parents/responses.d.cts +18 -0
- package/dist/api/categories/get-parents/responses.d.mts +18 -0
- package/dist/api/categories/get-parents/responses.mjs +18 -0
- package/dist/api/categories/get-parents/responses.mjs.map +1 -0
- package/dist/api/categories/get-parents/types.d.cts +17 -0
- package/dist/api/categories/get-parents/types.d.mts +17 -0
- package/dist/api/categories/index.d.cts +7 -0
- package/dist/api/categories/index.d.mts +7 -0
- package/dist/api/categories/list/index.d.cts +2 -0
- package/dist/api/categories/list/index.d.mts +2 -0
- package/dist/api/categories/list/operation.cjs +21 -0
- package/dist/api/categories/list/operation.cjs.map +1 -0
- package/dist/api/categories/list/operation.d.cts +40 -0
- package/dist/api/categories/list/operation.d.mts +40 -0
- package/dist/api/categories/list/operation.mjs +21 -0
- package/dist/api/categories/list/operation.mjs.map +1 -0
- package/dist/api/categories/list/responses.cjs +17 -0
- package/dist/api/categories/list/responses.cjs.map +1 -0
- package/dist/api/categories/list/responses.mjs +15 -0
- package/dist/api/categories/list/responses.mjs.map +1 -0
- package/dist/api/categories/list/types.d.cts +17 -0
- package/dist/api/categories/list/types.d.mts +17 -0
- package/dist/api/categories/operations.cjs +13 -0
- package/dist/api/categories/operations.cjs.map +1 -0
- package/dist/api/categories/operations.d.cts +86 -0
- package/dist/api/categories/operations.d.mts +86 -0
- package/dist/api/categories/operations.mjs +13 -0
- package/dist/api/categories/operations.mjs.map +1 -0
- package/dist/api/collections/get/index.d.cts +2 -0
- package/dist/api/collections/get/index.d.mts +2 -0
- package/dist/api/collections/get/operation.cjs +25 -0
- package/dist/api/collections/get/operation.cjs.map +1 -0
- package/dist/api/collections/get/operation.d.cts +44 -0
- package/dist/api/collections/get/operation.d.mts +44 -0
- package/dist/api/collections/get/operation.mjs +25 -0
- package/dist/api/collections/get/operation.mjs.map +1 -0
- package/dist/api/collections/get/request.cjs +9 -0
- package/dist/api/collections/get/request.cjs.map +1 -0
- package/dist/api/collections/get/request.mjs +7 -0
- package/dist/api/collections/get/request.mjs.map +1 -0
- package/dist/api/collections/get/responses.cjs +17 -0
- package/dist/api/collections/get/responses.cjs.map +1 -0
- package/dist/api/collections/get/responses.mjs +15 -0
- package/dist/api/collections/get/responses.mjs.map +1 -0
- package/dist/api/collections/get/types.d.cts +17 -0
- package/dist/api/collections/get/types.d.mts +17 -0
- package/dist/api/collections/get-skus/index.d.cts +2 -0
- package/dist/api/collections/get-skus/index.d.mts +2 -0
- package/dist/api/collections/get-skus/operation.cjs +23 -0
- package/dist/api/collections/get-skus/operation.cjs.map +1 -0
- package/dist/api/collections/get-skus/operation.d.cts +241 -0
- package/dist/api/collections/get-skus/operation.d.mts +241 -0
- package/dist/api/collections/get-skus/operation.mjs +23 -0
- package/dist/api/collections/get-skus/operation.mjs.map +1 -0
- package/dist/api/collections/get-skus/request.cjs +22 -0
- package/dist/api/collections/get-skus/request.cjs.map +1 -0
- package/dist/api/collections/get-skus/request.mjs +20 -0
- package/dist/api/collections/get-skus/request.mjs.map +1 -0
- package/dist/api/collections/get-skus/responses.cjs +41 -0
- package/dist/api/collections/get-skus/responses.cjs.map +1 -0
- package/dist/api/collections/get-skus/responses.mjs +39 -0
- package/dist/api/collections/get-skus/responses.mjs.map +1 -0
- package/dist/api/collections/get-skus/types.d.cts +17 -0
- package/dist/api/collections/get-skus/types.d.mts +17 -0
- package/dist/api/collections/index.d.cts +7 -0
- package/dist/api/collections/index.d.mts +7 -0
- package/dist/api/collections/list/index.d.cts +2 -0
- package/dist/api/collections/list/index.d.mts +2 -0
- package/dist/api/collections/list/operation.cjs +23 -0
- package/dist/api/collections/list/operation.cjs.map +1 -0
- package/dist/api/collections/list/operation.d.cts +44 -0
- package/dist/api/collections/list/operation.d.mts +44 -0
- package/dist/api/collections/list/operation.mjs +23 -0
- package/dist/api/collections/list/operation.mjs.map +1 -0
- package/dist/api/collections/list/request.cjs +12 -0
- package/dist/api/collections/list/request.cjs.map +1 -0
- package/dist/api/collections/list/request.mjs +10 -0
- package/dist/api/collections/list/request.mjs.map +1 -0
- package/dist/api/collections/list/responses.cjs +16 -0
- package/dist/api/collections/list/responses.cjs.map +1 -0
- package/dist/api/collections/list/responses.mjs +14 -0
- package/dist/api/collections/list/responses.mjs.map +1 -0
- package/dist/api/collections/list/types.d.cts +17 -0
- package/dist/api/collections/list/types.d.mts +17 -0
- package/dist/api/collections/operations.cjs +13 -0
- package/dist/api/collections/operations.cjs.map +1 -0
- package/dist/api/collections/operations.d.cts +314 -0
- package/dist/api/collections/operations.d.mts +314 -0
- package/dist/api/collections/operations.mjs +13 -0
- package/dist/api/collections/operations.mjs.map +1 -0
- package/dist/api/favorites/add/index.d.cts +2 -0
- package/dist/api/favorites/add/index.d.mts +2 -0
- package/dist/api/favorites/add/operation.cjs +27 -0
- package/dist/api/favorites/add/operation.cjs.map +1 -0
- package/dist/api/favorites/add/operation.d.cts +30 -0
- package/dist/api/favorites/add/operation.d.mts +30 -0
- package/dist/api/favorites/add/operation.mjs +27 -0
- package/dist/api/favorites/add/operation.mjs.map +1 -0
- package/dist/api/favorites/add/request.cjs +9 -0
- package/dist/api/favorites/add/request.cjs.map +1 -0
- package/dist/api/favorites/add/request.mjs +7 -0
- package/dist/api/favorites/add/request.mjs.map +1 -0
- package/dist/api/favorites/add/types.d.cts +17 -0
- package/dist/api/favorites/add/types.d.mts +17 -0
- package/dist/api/favorites/get-ids/index.d.cts +2 -0
- package/dist/api/favorites/get-ids/index.d.mts +2 -0
- package/dist/api/favorites/get-ids/operation.cjs +25 -0
- package/dist/api/favorites/get-ids/operation.cjs.map +1 -0
- package/dist/api/favorites/get-ids/operation.d.cts +30 -0
- package/dist/api/favorites/get-ids/operation.d.mts +30 -0
- package/dist/api/favorites/get-ids/operation.mjs +25 -0
- package/dist/api/favorites/get-ids/operation.mjs.map +1 -0
- package/dist/api/favorites/get-ids/responses.cjs +9 -0
- package/dist/api/favorites/get-ids/responses.cjs.map +1 -0
- package/dist/api/favorites/get-ids/responses.mjs +7 -0
- package/dist/api/favorites/get-ids/responses.mjs.map +1 -0
- package/dist/api/favorites/get-ids/types.d.cts +17 -0
- package/dist/api/favorites/get-ids/types.d.mts +17 -0
- package/dist/api/favorites/index.d.cts +7 -0
- package/dist/api/favorites/index.d.mts +7 -0
- package/dist/api/favorites/operations.cjs +13 -0
- package/dist/api/favorites/operations.cjs.map +1 -0
- package/dist/api/favorites/operations.d.cts +76 -0
- package/dist/api/favorites/operations.d.mts +76 -0
- package/dist/api/favorites/operations.mjs +13 -0
- package/dist/api/favorites/operations.mjs.map +1 -0
- package/dist/api/favorites/remove/index.d.cts +2 -0
- package/dist/api/favorites/remove/index.d.mts +2 -0
- package/dist/api/favorites/remove/operation.cjs +27 -0
- package/dist/api/favorites/remove/operation.cjs.map +1 -0
- package/dist/api/favorites/remove/operation.d.cts +30 -0
- package/dist/api/favorites/remove/operation.d.mts +30 -0
- package/dist/api/favorites/remove/operation.mjs +27 -0
- package/dist/api/favorites/remove/operation.mjs.map +1 -0
- package/dist/api/favorites/remove/request.cjs +9 -0
- package/dist/api/favorites/remove/request.cjs.map +1 -0
- package/dist/api/favorites/remove/request.mjs +7 -0
- package/dist/api/favorites/remove/request.mjs.map +1 -0
- package/dist/api/favorites/remove/types.d.cts +17 -0
- package/dist/api/favorites/remove/types.d.mts +17 -0
- package/dist/api/feature-flags/index.d.cts +3 -0
- package/dist/api/feature-flags/index.d.mts +3 -0
- package/dist/api/feature-flags/list/index.d.cts +2 -0
- package/dist/api/feature-flags/list/index.d.mts +2 -0
- package/dist/api/feature-flags/list/operation.cjs +21 -0
- package/dist/api/feature-flags/list/operation.cjs.map +1 -0
- package/dist/api/feature-flags/list/operation.d.cts +28 -0
- package/dist/api/feature-flags/list/operation.d.mts +28 -0
- package/dist/api/feature-flags/list/operation.mjs +21 -0
- package/dist/api/feature-flags/list/operation.mjs.map +1 -0
- package/dist/api/feature-flags/list/responses.cjs +13 -0
- package/dist/api/feature-flags/list/responses.cjs.map +1 -0
- package/dist/api/feature-flags/list/responses.mjs +11 -0
- package/dist/api/feature-flags/list/responses.mjs.map +1 -0
- package/dist/api/feature-flags/list/types.d.cts +17 -0
- package/dist/api/feature-flags/list/types.d.mts +17 -0
- package/dist/api/feature-flags/operations.cjs +6 -0
- package/dist/api/feature-flags/operations.cjs.map +1 -0
- package/dist/api/feature-flags/operations.d.cts +30 -0
- package/dist/api/feature-flags/operations.d.mts +30 -0
- package/dist/api/feature-flags/operations.mjs +7 -0
- package/dist/api/feature-flags/operations.mjs.map +1 -0
- package/dist/api/products/autocomplete/index.d.cts +2 -0
- package/dist/api/products/autocomplete/index.d.mts +2 -0
- package/dist/api/products/autocomplete/operation.cjs +23 -0
- package/dist/api/products/autocomplete/operation.cjs.map +1 -0
- package/dist/api/products/autocomplete/operation.d.cts +35 -0
- package/dist/api/products/autocomplete/operation.d.mts +35 -0
- package/dist/api/products/autocomplete/operation.mjs +23 -0
- package/dist/api/products/autocomplete/operation.mjs.map +1 -0
- package/dist/api/products/autocomplete/request.cjs +9 -0
- package/dist/api/products/autocomplete/request.cjs.map +1 -0
- package/dist/api/products/autocomplete/request.mjs +7 -0
- package/dist/api/products/autocomplete/request.mjs.map +1 -0
- package/dist/api/products/autocomplete/responses.cjs +13 -0
- package/dist/api/products/autocomplete/responses.cjs.map +1 -0
- package/dist/api/products/autocomplete/responses.mjs +11 -0
- package/dist/api/products/autocomplete/responses.mjs.map +1 -0
- package/dist/api/products/autocomplete/types.d.cts +17 -0
- package/dist/api/products/autocomplete/types.d.mts +17 -0
- package/dist/api/products/get-reviews/index.d.cts +2 -0
- package/dist/api/products/get-reviews/index.d.mts +2 -0
- package/dist/api/products/get-reviews/operation.cjs +26 -0
- package/dist/api/products/get-reviews/operation.cjs.map +1 -0
- package/dist/api/products/get-reviews/operation.d.cts +85 -0
- package/dist/api/products/get-reviews/operation.d.mts +85 -0
- package/dist/api/products/get-reviews/operation.mjs +26 -0
- package/dist/api/products/get-reviews/operation.mjs.map +1 -0
- package/dist/api/products/get-reviews/request.cjs +14 -0
- package/dist/api/products/get-reviews/request.cjs.map +1 -0
- package/dist/api/products/get-reviews/request.mjs +11 -0
- package/dist/api/products/get-reviews/request.mjs.map +1 -0
- package/dist/api/products/get-reviews/responses.cjs +20 -0
- package/dist/api/products/get-reviews/responses.cjs.map +1 -0
- package/dist/api/products/get-reviews/responses.mjs +18 -0
- package/dist/api/products/get-reviews/responses.mjs.map +1 -0
- package/dist/api/products/get-reviews/types.d.cts +17 -0
- package/dist/api/products/get-reviews/types.d.mts +17 -0
- package/dist/api/products/get-sort-options/index.d.cts +2 -0
- package/dist/api/products/get-sort-options/index.d.mts +2 -0
- package/dist/api/products/get-sort-options/operation.cjs +23 -0
- package/dist/api/products/get-sort-options/operation.cjs.map +1 -0
- package/dist/api/products/get-sort-options/operation.d.cts +37 -0
- package/dist/api/products/get-sort-options/operation.d.mts +37 -0
- package/dist/api/products/get-sort-options/operation.mjs +23 -0
- package/dist/api/products/get-sort-options/operation.mjs.map +1 -0
- package/dist/api/products/get-sort-options/request.cjs +12 -0
- package/dist/api/products/get-sort-options/request.cjs.map +1 -0
- package/dist/api/products/get-sort-options/request.mjs +10 -0
- package/dist/api/products/get-sort-options/request.mjs.map +1 -0
- package/dist/api/products/get-sort-options/responses.cjs +21 -0
- package/dist/api/products/get-sort-options/responses.cjs.map +1 -0
- package/dist/api/products/get-sort-options/responses.mjs +19 -0
- package/dist/api/products/get-sort-options/responses.mjs.map +1 -0
- package/dist/api/products/get-sort-options/types.d.cts +17 -0
- package/dist/api/products/get-sort-options/types.d.mts +17 -0
- package/dist/api/products/index.d.cts +9 -0
- package/dist/api/products/index.d.mts +9 -0
- package/dist/api/products/list/index.d.cts +2 -0
- package/dist/api/products/list/index.d.mts +2 -0
- package/dist/api/products/list/operation.cjs +23 -0
- package/dist/api/products/list/operation.cjs.map +1 -0
- package/dist/api/products/list/operation.d.cts +287 -0
- package/dist/api/products/list/operation.d.mts +287 -0
- package/dist/api/products/list/operation.mjs +23 -0
- package/dist/api/products/list/operation.mjs.map +1 -0
- package/dist/api/products/list/request.cjs +27 -0
- package/dist/api/products/list/request.cjs.map +1 -0
- package/dist/api/products/list/request.mjs +25 -0
- package/dist/api/products/list/request.mjs.map +1 -0
- package/dist/api/products/list/responses.cjs +49 -0
- package/dist/api/products/list/responses.cjs.map +1 -0
- package/dist/api/products/list/responses.mjs +47 -0
- package/dist/api/products/list/responses.mjs.map +1 -0
- package/dist/api/products/list/types.d.cts +17 -0
- package/dist/api/products/list/types.d.mts +17 -0
- package/dist/api/products/operations.cjs +15 -0
- package/dist/api/products/operations.cjs.map +1 -0
- package/dist/api/products/operations.d.cts +422 -0
- package/dist/api/products/operations.d.mts +422 -0
- package/dist/api/products/operations.mjs +15 -0
- package/dist/api/products/operations.mjs.map +1 -0
- package/dist/api/promo/index.d.cts +3 -0
- package/dist/api/promo/index.d.mts +3 -0
- package/dist/api/promo/list/index.d.cts +2 -0
- package/dist/api/promo/list/index.d.mts +2 -0
- package/dist/api/promo/list/operation.cjs +21 -0
- package/dist/api/promo/list/operation.cjs.map +1 -0
- package/dist/api/promo/list/operation.d.cts +41 -0
- package/dist/api/promo/list/operation.d.mts +41 -0
- package/dist/api/promo/list/operation.mjs +21 -0
- package/dist/api/promo/list/operation.mjs.map +1 -0
- package/dist/api/promo/list/responses.cjs +18 -0
- package/dist/api/promo/list/responses.cjs.map +1 -0
- package/dist/api/promo/list/responses.mjs +16 -0
- package/dist/api/promo/list/responses.mjs.map +1 -0
- package/dist/api/promo/list/types.d.cts +17 -0
- package/dist/api/promo/list/types.d.mts +17 -0
- package/dist/api/promo/operations.cjs +6 -0
- package/dist/api/promo/operations.cjs.map +1 -0
- package/dist/api/promo/operations.d.cts +43 -0
- package/dist/api/promo/operations.d.mts +43 -0
- package/dist/api/promo/operations.mjs +7 -0
- package/dist/api/promo/operations.mjs.map +1 -0
- package/dist/api/promocodes/index.d.cts +3 -0
- package/dist/api/promocodes/index.d.mts +3 -0
- package/dist/api/promocodes/operations.cjs +6 -0
- package/dist/api/promocodes/operations.cjs.map +1 -0
- package/dist/api/promocodes/operations.d.cts +106 -0
- package/dist/api/promocodes/operations.d.mts +106 -0
- package/dist/api/promocodes/operations.mjs +7 -0
- package/dist/api/promocodes/operations.mjs.map +1 -0
- package/dist/api/promocodes/validate/index.d.cts +2 -0
- package/dist/api/promocodes/validate/index.d.mts +2 -0
- package/dist/api/promocodes/validate/operation.cjs +27 -0
- package/dist/api/promocodes/validate/operation.cjs.map +1 -0
- package/dist/api/promocodes/validate/operation.d.cts +104 -0
- package/dist/api/promocodes/validate/operation.d.mts +104 -0
- package/dist/api/promocodes/validate/operation.mjs +27 -0
- package/dist/api/promocodes/validate/operation.mjs.map +1 -0
- package/dist/api/promocodes/validate/request.cjs +21 -0
- package/dist/api/promocodes/validate/request.cjs.map +1 -0
- package/dist/api/promocodes/validate/request.mjs +19 -0
- package/dist/api/promocodes/validate/request.mjs.map +1 -0
- package/dist/api/promocodes/validate/responses.cjs +27 -0
- package/dist/api/promocodes/validate/responses.cjs.map +1 -0
- package/dist/api/promocodes/validate/responses.mjs +25 -0
- package/dist/api/promocodes/validate/responses.mjs.map +1 -0
- package/dist/api/promocodes/validate/types.d.cts +17 -0
- package/dist/api/promocodes/validate/types.d.mts +17 -0
- package/dist/api/shops/get/index.d.cts +2 -0
- package/dist/api/shops/get/index.d.mts +2 -0
- package/dist/api/shops/get/operation.cjs +25 -0
- package/dist/api/shops/get/operation.cjs.map +1 -0
- package/dist/api/shops/get/operation.d.cts +95 -0
- package/dist/api/shops/get/operation.d.mts +95 -0
- package/dist/api/shops/get/operation.mjs +25 -0
- package/dist/api/shops/get/operation.mjs.map +1 -0
- package/dist/api/shops/get/request.cjs +9 -0
- package/dist/api/shops/get/request.cjs.map +1 -0
- package/dist/api/shops/get/request.mjs +7 -0
- package/dist/api/shops/get/request.mjs.map +1 -0
- package/dist/api/shops/get/responses.cjs +34 -0
- package/dist/api/shops/get/responses.cjs.map +1 -0
- package/dist/api/shops/get/responses.mjs +32 -0
- package/dist/api/shops/get/responses.mjs.map +1 -0
- package/dist/api/shops/get/types.d.cts +17 -0
- package/dist/api/shops/get/types.d.mts +17 -0
- package/dist/api/shops/get-monobrand/index.d.cts +2 -0
- package/dist/api/shops/get-monobrand/index.d.mts +2 -0
- package/dist/api/shops/get-monobrand/operation.cjs +23 -0
- package/dist/api/shops/get-monobrand/operation.cjs.map +1 -0
- package/dist/api/shops/get-monobrand/operation.d.cts +56 -0
- package/dist/api/shops/get-monobrand/operation.d.mts +56 -0
- package/dist/api/shops/get-monobrand/operation.mjs +23 -0
- package/dist/api/shops/get-monobrand/operation.mjs.map +1 -0
- package/dist/api/shops/get-monobrand/request.cjs +13 -0
- package/dist/api/shops/get-monobrand/request.cjs.map +1 -0
- package/dist/api/shops/get-monobrand/request.mjs +11 -0
- package/dist/api/shops/get-monobrand/request.mjs.map +1 -0
- package/dist/api/shops/get-monobrand/responses.cjs +17 -0
- package/dist/api/shops/get-monobrand/responses.cjs.map +1 -0
- package/dist/api/shops/get-monobrand/responses.mjs +15 -0
- package/dist/api/shops/get-monobrand/responses.mjs.map +1 -0
- package/dist/api/shops/get-monobrand/types.d.cts +17 -0
- package/dist/api/shops/get-monobrand/types.d.mts +17 -0
- package/dist/api/shops/get-products/index.d.cts +2 -0
- package/dist/api/shops/get-products/index.d.mts +2 -0
- package/dist/api/shops/get-products/operation.cjs +26 -0
- package/dist/api/shops/get-products/operation.cjs.map +1 -0
- package/dist/api/shops/get-products/operation.d.cts +266 -0
- package/dist/api/shops/get-products/operation.d.mts +266 -0
- package/dist/api/shops/get-products/operation.mjs +26 -0
- package/dist/api/shops/get-products/operation.mjs.map +1 -0
- package/dist/api/shops/get-products/request.cjs +27 -0
- package/dist/api/shops/get-products/request.cjs.map +1 -0
- package/dist/api/shops/get-products/request.mjs +24 -0
- package/dist/api/shops/get-products/request.mjs.map +1 -0
- package/dist/api/shops/get-products/responses.cjs +43 -0
- package/dist/api/shops/get-products/responses.cjs.map +1 -0
- package/dist/api/shops/get-products/responses.mjs +41 -0
- package/dist/api/shops/get-products/responses.mjs.map +1 -0
- package/dist/api/shops/get-products/types.d.cts +17 -0
- package/dist/api/shops/get-products/types.d.mts +17 -0
- package/dist/api/shops/index.d.cts +7 -0
- package/dist/api/shops/index.d.mts +7 -0
- package/dist/api/shops/operations.cjs +13 -0
- package/dist/api/shops/operations.cjs.map +1 -0
- package/dist/api/shops/operations.d.cts +402 -0
- package/dist/api/shops/operations.d.mts +402 -0
- package/dist/api/shops/operations.mjs +13 -0
- package/dist/api/shops/operations.mjs.map +1 -0
- package/dist/api/sku/get/index.d.cts +2 -0
- package/dist/api/sku/get/index.d.mts +2 -0
- package/dist/api/sku/get/operation.cjs +25 -0
- package/dist/api/sku/get/operation.cjs.map +1 -0
- package/dist/api/sku/get/operation.d.cts +275 -0
- package/dist/api/sku/get/operation.d.mts +275 -0
- package/dist/api/sku/get/operation.mjs +25 -0
- package/dist/api/sku/get/operation.mjs.map +1 -0
- package/dist/api/sku/get/request.cjs +9 -0
- package/dist/api/sku/get/request.cjs.map +1 -0
- package/dist/api/sku/get/request.mjs +7 -0
- package/dist/api/sku/get/request.mjs.map +1 -0
- package/dist/api/sku/get/responses.cjs +89 -0
- package/dist/api/sku/get/responses.cjs.map +1 -0
- package/dist/api/sku/get/responses.mjs +87 -0
- package/dist/api/sku/get/responses.mjs.map +1 -0
- package/dist/api/sku/get/types.d.cts +17 -0
- package/dist/api/sku/get/types.d.mts +17 -0
- package/dist/api/sku/get-collections/index.d.cts +2 -0
- package/dist/api/sku/get-collections/index.d.mts +2 -0
- package/dist/api/sku/get-collections/operation.cjs +25 -0
- package/dist/api/sku/get-collections/operation.cjs.map +1 -0
- package/dist/api/sku/get-collections/operation.d.cts +51 -0
- package/dist/api/sku/get-collections/operation.d.mts +51 -0
- package/dist/api/sku/get-collections/operation.mjs +25 -0
- package/dist/api/sku/get-collections/operation.mjs.map +1 -0
- package/dist/api/sku/get-collections/request.cjs +9 -0
- package/dist/api/sku/get-collections/request.cjs.map +1 -0
- package/dist/api/sku/get-collections/request.mjs +7 -0
- package/dist/api/sku/get-collections/request.mjs.map +1 -0
- package/dist/api/sku/get-collections/responses.cjs +17 -0
- package/dist/api/sku/get-collections/responses.cjs.map +1 -0
- package/dist/api/sku/get-collections/responses.mjs +15 -0
- package/dist/api/sku/get-collections/responses.mjs.map +1 -0
- package/dist/api/sku/get-collections/types.d.cts +17 -0
- package/dist/api/sku/get-collections/types.d.mts +17 -0
- package/dist/api/sku/get-review-available/index.d.cts +2 -0
- package/dist/api/sku/get-review-available/index.d.mts +2 -0
- package/dist/api/sku/get-review-available/operation.cjs +29 -0
- package/dist/api/sku/get-review-available/operation.cjs.map +1 -0
- package/dist/api/sku/get-review-available/operation.d.cts +43 -0
- package/dist/api/sku/get-review-available/operation.d.mts +43 -0
- package/dist/api/sku/get-review-available/operation.mjs +29 -0
- package/dist/api/sku/get-review-available/operation.mjs.map +1 -0
- package/dist/api/sku/get-review-available/request.cjs +9 -0
- package/dist/api/sku/get-review-available/request.cjs.map +1 -0
- package/dist/api/sku/get-review-available/request.mjs +7 -0
- package/dist/api/sku/get-review-available/request.mjs.map +1 -0
- package/dist/api/sku/get-review-available/responses.cjs +12 -0
- package/dist/api/sku/get-review-available/responses.cjs.map +1 -0
- package/dist/api/sku/get-review-available/responses.mjs +10 -0
- package/dist/api/sku/get-review-available/responses.mjs.map +1 -0
- package/dist/api/sku/get-review-available/types.d.cts +17 -0
- package/dist/api/sku/get-review-available/types.d.mts +17 -0
- package/dist/api/sku/get-similar/index.d.cts +2 -0
- package/dist/api/sku/get-similar/index.d.mts +2 -0
- package/dist/api/sku/get-similar/operation.cjs +23 -0
- package/dist/api/sku/get-similar/operation.cjs.map +1 -0
- package/dist/api/sku/get-similar/operation.d.cts +109 -0
- package/dist/api/sku/get-similar/operation.d.mts +109 -0
- package/dist/api/sku/get-similar/operation.mjs +23 -0
- package/dist/api/sku/get-similar/operation.mjs.map +1 -0
- package/dist/api/sku/get-similar/request.cjs +13 -0
- package/dist/api/sku/get-similar/request.cjs.map +1 -0
- package/dist/api/sku/get-similar/request.mjs +11 -0
- package/dist/api/sku/get-similar/request.mjs.map +1 -0
- package/dist/api/sku/get-similar/responses.cjs +31 -0
- package/dist/api/sku/get-similar/responses.cjs.map +1 -0
- package/dist/api/sku/get-similar/responses.mjs +29 -0
- package/dist/api/sku/get-similar/responses.mjs.map +1 -0
- package/dist/api/sku/get-similar/types.d.cts +17 -0
- package/dist/api/sku/get-similar/types.d.mts +17 -0
- package/dist/api/sku/index.d.cts +9 -0
- package/dist/api/sku/index.d.mts +9 -0
- package/dist/api/sku/operations.cjs +15 -0
- package/dist/api/sku/operations.cjs.map +1 -0
- package/dist/api/sku/operations.d.cts +455 -0
- package/dist/api/sku/operations.d.mts +455 -0
- package/dist/api/sku/operations.mjs +15 -0
- package/dist/api/sku/operations.mjs.map +1 -0
- package/dist/api/users/index.d.cts +5 -0
- package/dist/api/users/index.d.mts +5 -0
- package/dist/api/users/operations.cjs +11 -0
- package/dist/api/users/operations.cjs.map +1 -0
- package/dist/api/users/operations.d.cts +96 -0
- package/dist/api/users/operations.d.mts +96 -0
- package/dist/api/users/operations.mjs +11 -0
- package/dist/api/users/operations.mjs.map +1 -0
- package/dist/api/users/register-device/index.d.cts +2 -0
- package/dist/api/users/register-device/index.d.mts +2 -0
- package/dist/api/users/register-device/operation.cjs +28 -0
- package/dist/api/users/register-device/operation.cjs.map +1 -0
- package/dist/api/users/register-device/operation.d.cts +61 -0
- package/dist/api/users/register-device/operation.d.mts +61 -0
- package/dist/api/users/register-device/operation.mjs +28 -0
- package/dist/api/users/register-device/operation.mjs.map +1 -0
- package/dist/api/users/register-device/request.cjs +14 -0
- package/dist/api/users/register-device/request.cjs.map +1 -0
- package/dist/api/users/register-device/request.mjs +12 -0
- package/dist/api/users/register-device/request.mjs.map +1 -0
- package/dist/api/users/register-device/types.d.cts +17 -0
- package/dist/api/users/register-device/types.d.mts +17 -0
- package/dist/api/users/update-language/index.d.cts +2 -0
- package/dist/api/users/update-language/index.d.mts +2 -0
- package/dist/api/users/update-language/operation.cjs +27 -0
- package/dist/api/users/update-language/operation.cjs.map +1 -0
- package/dist/api/users/update-language/operation.d.cts +41 -0
- package/dist/api/users/update-language/operation.d.mts +41 -0
- package/dist/api/users/update-language/operation.mjs +27 -0
- package/dist/api/users/update-language/operation.mjs.map +1 -0
- package/dist/api/users/update-language/request.cjs +11 -0
- package/dist/api/users/update-language/request.cjs.map +1 -0
- package/dist/api/users/update-language/request.mjs +8 -0
- package/dist/api/users/update-language/request.mjs.map +1 -0
- package/dist/api/users/update-language/responses.cjs +14 -0
- package/dist/api/users/update-language/responses.cjs.map +1 -0
- package/dist/api/users/update-language/responses.mjs +12 -0
- package/dist/api/users/update-language/responses.mjs.map +1 -0
- package/dist/api/users/update-language/types.d.cts +17 -0
- package/dist/api/users/update-language/types.d.mts +17 -0
- package/dist/config/defaults.cjs +12 -0
- package/dist/config/defaults.cjs.map +1 -0
- package/dist/config/defaults.d.cts +10 -0
- package/dist/config/defaults.d.mts +10 -0
- package/dist/config/defaults.mjs +9 -0
- package/dist/config/defaults.mjs.map +1 -0
- package/dist/config/headers.cjs +17 -0
- package/dist/config/headers.cjs.map +1 -0
- package/dist/config/headers.d.cts +8 -0
- package/dist/config/headers.d.mts +8 -0
- package/dist/config/headers.mjs +16 -0
- package/dist/config/headers.mjs.map +1 -0
- package/dist/config/resolve.cjs +28 -0
- package/dist/config/resolve.cjs.map +1 -0
- package/dist/config/resolve.d.cts +8 -0
- package/dist/config/resolve.d.mts +8 -0
- package/dist/config/resolve.mjs +27 -0
- package/dist/config/resolve.mjs.map +1 -0
- package/dist/config/types.d.cts +25 -0
- package/dist/config/types.d.mts +25 -0
- package/dist/contracts/api-error-response.cjs +12 -0
- package/dist/contracts/api-error-response.cjs.map +1 -0
- package/dist/contracts/api-error-response.d.cts +13 -0
- package/dist/contracts/api-error-response.d.mts +13 -0
- package/dist/contracts/api-error-response.mjs +10 -0
- package/dist/contracts/api-error-response.mjs.map +1 -0
- package/dist/contracts/filters/category.cjs +21 -0
- package/dist/contracts/filters/category.cjs.map +1 -0
- package/dist/contracts/filters/category.d.cts +37 -0
- package/dist/contracts/filters/category.d.mts +37 -0
- package/dist/contracts/filters/category.mjs +17 -0
- package/dist/contracts/filters/category.mjs.map +1 -0
- package/dist/contracts/filters/filter.cjs +11 -0
- package/dist/contracts/filters/filter.cjs.map +1 -0
- package/dist/contracts/filters/filter.d.cts +67 -0
- package/dist/contracts/filters/filter.d.mts +67 -0
- package/dist/contracts/filters/filter.mjs +9 -0
- package/dist/contracts/filters/filter.mjs.map +1 -0
- package/dist/contracts/filters/range.cjs +21 -0
- package/dist/contracts/filters/range.cjs.map +1 -0
- package/dist/contracts/filters/range.d.cts +37 -0
- package/dist/contracts/filters/range.d.mts +37 -0
- package/dist/contracts/filters/range.mjs +17 -0
- package/dist/contracts/filters/range.mjs.map +1 -0
- package/dist/contracts/pagination.cjs +17 -0
- package/dist/contracts/pagination.cjs.map +1 -0
- package/dist/contracts/pagination.d.cts +27 -0
- package/dist/contracts/pagination.d.mts +27 -0
- package/dist/contracts/pagination.mjs +15 -0
- package/dist/contracts/pagination.mjs.map +1 -0
- package/dist/errors/teez-api-error.cjs +26 -0
- package/dist/errors/teez-api-error.cjs.map +1 -0
- package/dist/errors/teez-api-error.d.cts +35 -0
- package/dist/errors/teez-api-error.d.mts +35 -0
- package/dist/errors/teez-api-error.mjs +26 -0
- package/dist/errors/teez-api-error.mjs.map +1 -0
- package/dist/errors/teez-error.cjs +8 -0
- package/dist/errors/teez-error.cjs.map +1 -0
- package/dist/errors/teez-error.d.cts +7 -0
- package/dist/errors/teez-error.d.mts +7 -0
- package/dist/errors/teez-error.mjs +8 -0
- package/dist/errors/teez-error.mjs.map +1 -0
- package/dist/errors/teez-network-error.cjs +18 -0
- package/dist/errors/teez-network-error.cjs.map +1 -0
- package/dist/errors/teez-network-error.d.cts +23 -0
- package/dist/errors/teez-network-error.d.mts +23 -0
- package/dist/errors/teez-network-error.mjs +18 -0
- package/dist/errors/teez-network-error.mjs.map +1 -0
- package/dist/errors/teez-timeout-error.cjs +20 -0
- package/dist/errors/teez-timeout-error.cjs.map +1 -0
- package/dist/errors/teez-timeout-error.d.cts +26 -0
- package/dist/errors/teez-timeout-error.d.mts +26 -0
- package/dist/errors/teez-timeout-error.mjs +20 -0
- package/dist/errors/teez-timeout-error.mjs.map +1 -0
- package/dist/errors/teez-validation-error.cjs +16 -0
- package/dist/errors/teez-validation-error.cjs.map +1 -0
- package/dist/errors/teez-validation-error.d.cts +25 -0
- package/dist/errors/teez-validation-error.d.mts +25 -0
- package/dist/errors/teez-validation-error.mjs +16 -0
- package/dist/errors/teez-validation-error.mjs.map +1 -0
- package/dist/http-operation/api-error.cjs +15 -0
- package/dist/http-operation/api-error.cjs.map +1 -0
- package/dist/http-operation/api-error.d.cts +15 -0
- package/dist/http-operation/api-error.d.mts +15 -0
- package/dist/http-operation/api-error.mjs +14 -0
- package/dist/http-operation/api-error.mjs.map +1 -0
- package/dist/http-operation/define.cjs +33 -0
- package/dist/http-operation/define.cjs.map +1 -0
- package/dist/http-operation/define.d.cts +7 -0
- package/dist/http-operation/define.d.mts +7 -0
- package/dist/http-operation/define.mjs +33 -0
- package/dist/http-operation/define.mjs.map +1 -0
- package/dist/http-operation/flattenability.cjs +24 -0
- package/dist/http-operation/flattenability.cjs.map +1 -0
- package/dist/http-operation/flattenability.d.cts +7 -0
- package/dist/http-operation/flattenability.d.mts +7 -0
- package/dist/http-operation/flattenability.mjs +24 -0
- package/dist/http-operation/flattenability.mjs.map +1 -0
- package/dist/http-operation/inference.d.cts +63 -0
- package/dist/http-operation/inference.d.mts +63 -0
- package/dist/http-operation/response-helpers.cjs +20 -0
- package/dist/http-operation/response-helpers.cjs.map +1 -0
- package/dist/http-operation/response-helpers.d.cts +15 -0
- package/dist/http-operation/response-helpers.d.mts +15 -0
- package/dist/http-operation/response-helpers.mjs +19 -0
- package/dist/http-operation/response-helpers.mjs.map +1 -0
- package/dist/http-operation/status.cjs +8 -0
- package/dist/http-operation/status.cjs.map +1 -0
- package/dist/http-operation/status.d.cts +6 -0
- package/dist/http-operation/status.d.mts +6 -0
- package/dist/http-operation/status.mjs +8 -0
- package/dist/http-operation/status.mjs.map +1 -0
- package/dist/http-operation/types.d.cts +92 -0
- package/dist/http-operation/types.d.mts +92 -0
- package/dist/http-operation/validation.cjs +32 -0
- package/dist/http-operation/validation.cjs.map +1 -0
- package/dist/http-operation/validation.mjs +31 -0
- package/dist/http-operation/validation.mjs.map +1 -0
- package/dist/index.cjs +147 -1875
- package/dist/index.d.cts +100 -5571
- package/dist/index.d.mts +100 -5571
- package/dist/index.mjs +66 -1753
- package/dist/language.cjs +6 -0
- package/dist/language.cjs.map +1 -0
- package/dist/language.d.cts +6 -0
- package/dist/language.d.mts +6 -0
- package/dist/language.mjs +6 -0
- package/dist/language.mjs.map +1 -0
- package/dist/registry.cjs +44 -0
- package/dist/registry.cjs.map +1 -0
- package/dist/registry.d.cts +4198 -0
- package/dist/registry.d.mts +4198 -0
- package/dist/registry.mjs +41 -0
- package/dist/registry.mjs.map +1 -0
- package/dist/schema/nullish.cjs +11 -0
- package/dist/schema/nullish.cjs.map +1 -0
- package/dist/schema/nullish.d.cts +11 -0
- package/dist/schema/nullish.d.mts +11 -0
- package/dist/schema/nullish.mjs +9 -0
- package/dist/schema/nullish.mjs.map +1 -0
- package/dist/schema/object-schema.cjs +12 -0
- package/dist/schema/object-schema.cjs.map +1 -0
- package/dist/schema/object-schema.d.cts +10 -0
- package/dist/schema/object-schema.d.mts +10 -0
- package/dist/schema/object-schema.mjs +11 -0
- package/dist/schema/object-schema.mjs.map +1 -0
- package/dist/schema/types.d.cts +7 -0
- package/dist/schema/types.d.mts +7 -0
- package/dist/sdk/create-client.cjs +20 -0
- package/dist/sdk/create-client.cjs.map +1 -0
- package/dist/sdk/create-client.d.cts +11 -0
- package/dist/sdk/create-client.d.mts +11 -0
- package/dist/sdk/create-client.mjs +19 -0
- package/dist/sdk/create-client.mjs.map +1 -0
- package/dist/sdk/flat-request.cjs +25 -0
- package/dist/sdk/flat-request.cjs.map +1 -0
- package/dist/sdk/flat-request.mjs +25 -0
- package/dist/sdk/flat-request.mjs.map +1 -0
- package/dist/sdk/operation-entry.cjs +30 -0
- package/dist/sdk/operation-entry.cjs.map +1 -0
- package/dist/sdk/operation-entry.mjs +30 -0
- package/dist/sdk/operation-entry.mjs.map +1 -0
- package/dist/sdk/runtime.cjs +15 -0
- package/dist/sdk/runtime.cjs.map +1 -0
- package/dist/sdk/runtime.d.cts +8 -0
- package/dist/sdk/runtime.d.mts +8 -0
- package/dist/sdk/runtime.mjs +15 -0
- package/dist/sdk/runtime.mjs.map +1 -0
- package/dist/sdk/types.d.cts +15 -0
- package/dist/sdk/types.d.mts +15 -0
- package/dist/transport/headers.cjs +12 -0
- package/dist/transport/headers.cjs.map +1 -0
- package/dist/transport/headers.mjs +12 -0
- package/dist/transport/headers.mjs.map +1 -0
- package/dist/transport/http-client.cjs +109 -0
- package/dist/transport/http-client.cjs.map +1 -0
- package/dist/transport/http-client.mjs +109 -0
- package/dist/transport/http-client.mjs.map +1 -0
- package/dist/transport/parsing.cjs +43 -0
- package/dist/transport/parsing.cjs.map +1 -0
- package/dist/transport/parsing.mjs +38 -0
- package/dist/transport/parsing.mjs.map +1 -0
- package/dist/transport/path.cjs +11 -0
- package/dist/transport/path.cjs.map +1 -0
- package/dist/transport/path.mjs +11 -0
- package/dist/transport/path.mjs.map +1 -0
- package/dist/transport/query.cjs +21 -0
- package/dist/transport/query.cjs.map +1 -0
- package/dist/transport/query.mjs +21 -0
- package/dist/transport/query.mjs.map +1 -0
- package/dist/transport/response-body.cjs +17 -0
- package/dist/transport/response-body.cjs.map +1 -0
- package/dist/transport/response-body.mjs +17 -0
- package/dist/transport/response-body.mjs.map +1 -0
- package/dist/transport/types.d.cts +6 -0
- package/dist/transport/types.d.mts +6 -0
- package/dist/type-utils/simplify.d.cts +5 -0
- package/dist/type-utils/simplify.d.mts +5 -0
- package/package.json +45 -34
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,1753 +1,66 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
* @example
|
|
68
|
-
* const response = await client.auth.verify({
|
|
69
|
-
* phone: "+77071234567",
|
|
70
|
-
* otpCode: "2610"
|
|
71
|
-
* });
|
|
72
|
-
*/
|
|
73
|
-
verify(params) {
|
|
74
|
-
return this.http.post({
|
|
75
|
-
path: "/auth/verify",
|
|
76
|
-
body: params
|
|
77
|
-
}, AuthApiVerifyResponseSchema);
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Validates the current JWT token and retrieves user information.
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* const response = await client.auth.checkToken();
|
|
84
|
-
*/
|
|
85
|
-
checkToken(params = {}) {
|
|
86
|
-
return this.http.get({
|
|
87
|
-
path: "/auth/check-token",
|
|
88
|
-
params
|
|
89
|
-
}, AuthApiCheckTokenResponseSchema);
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
//#endregion
|
|
94
|
-
//#region src/api/banners/schemas.ts
|
|
95
|
-
/**
|
|
96
|
-
* Type literal for banner image resource type
|
|
97
|
-
*/
|
|
98
|
-
const BannerImageTypeSchema = z.literal("network");
|
|
99
|
-
/**
|
|
100
|
-
* Schema for a banner image.
|
|
101
|
-
*/
|
|
102
|
-
const BannersApiImageSchema = z.object({
|
|
103
|
-
type: BannerImageTypeSchema,
|
|
104
|
-
url: z.string()
|
|
105
|
-
});
|
|
106
|
-
/**
|
|
107
|
-
* Type union for banner action types
|
|
108
|
-
*/
|
|
109
|
-
const BannerActionTypesSchema = z.union([
|
|
110
|
-
z.literal("url"),
|
|
111
|
-
z.literal("path"),
|
|
112
|
-
z.literal("key")
|
|
113
|
-
]);
|
|
114
|
-
/**
|
|
115
|
-
* Schema for a banner action.
|
|
116
|
-
*/
|
|
117
|
-
const BannersApiActionSchema = z.object({
|
|
118
|
-
type: BannerActionTypesSchema,
|
|
119
|
-
value: z.string(),
|
|
120
|
-
analyticsKey: z.nullish(z.string())
|
|
121
|
-
});
|
|
122
|
-
/**
|
|
123
|
-
* Schema for a banner item containing an image and an action.
|
|
124
|
-
*/
|
|
125
|
-
const BannersApiBannerItemSchema = z.object({
|
|
126
|
-
image: BannersApiImageSchema,
|
|
127
|
-
action: BannersApiActionSchema
|
|
128
|
-
});
|
|
129
|
-
/**
|
|
130
|
-
* Response schema for the list of banners.
|
|
131
|
-
*/
|
|
132
|
-
const BannersApiListResponseSchema = z.array(BannersApiBannerItemSchema);
|
|
133
|
-
|
|
134
|
-
//#endregion
|
|
135
|
-
//#region src/api/banners/api.ts
|
|
136
|
-
/**
|
|
137
|
-
* API for retrieving promotional and informational banners.
|
|
138
|
-
*/
|
|
139
|
-
var BannersApi = class {
|
|
140
|
-
/**
|
|
141
|
-
* Initializes a new instance of the BannersApi.
|
|
142
|
-
*
|
|
143
|
-
* @param http HTTP client instance.
|
|
144
|
-
*/
|
|
145
|
-
constructor(http) {
|
|
146
|
-
this.http = http;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Retrieves a list of active banners.
|
|
150
|
-
*
|
|
151
|
-
* @example
|
|
152
|
-
* const banners = await client.banners.list();
|
|
153
|
-
*/
|
|
154
|
-
list(params = {}) {
|
|
155
|
-
return this.http.get({
|
|
156
|
-
path: "/api/v3/banners",
|
|
157
|
-
params
|
|
158
|
-
}, BannersApiListResponseSchema);
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region src/api/categories/schemas.ts
|
|
164
|
-
/**
|
|
165
|
-
* Schema for a category list item.
|
|
166
|
-
*/
|
|
167
|
-
const CategoriesApiListResponseItemSchema = z.object({
|
|
168
|
-
id: z.number(),
|
|
169
|
-
name: z.string(),
|
|
170
|
-
level: z.number(),
|
|
171
|
-
parentId: z.number(),
|
|
172
|
-
hasSubcategories: z.boolean(),
|
|
173
|
-
isAdult: z.boolean()
|
|
174
|
-
});
|
|
175
|
-
/**
|
|
176
|
-
* Response schema for the list of categories.
|
|
177
|
-
*/
|
|
178
|
-
const CategoriesApiListResponseSchema = z.array(CategoriesApiListResponseItemSchema);
|
|
179
|
-
/**
|
|
180
|
-
* Response schema for getting a specific category by ID.
|
|
181
|
-
*/
|
|
182
|
-
const CategoriesApiGetResponseSchema = z.object({
|
|
183
|
-
id: z.number(),
|
|
184
|
-
name: z.string(),
|
|
185
|
-
level: z.number(),
|
|
186
|
-
parentId: z.number(),
|
|
187
|
-
hasSubcategories: z.boolean(),
|
|
188
|
-
isAdult: z.boolean(),
|
|
189
|
-
get subcategories() {
|
|
190
|
-
return z.nullish(z.array(CategoriesApiGetResponseSchema));
|
|
191
|
-
}
|
|
192
|
-
});
|
|
193
|
-
/**
|
|
194
|
-
* Schema for a parent category item with nesting.
|
|
195
|
-
*/
|
|
196
|
-
const CategoriesApiGetParentsResponseItemSchema = z.object({
|
|
197
|
-
id: z.number(),
|
|
198
|
-
name: z.string(),
|
|
199
|
-
level: z.number(),
|
|
200
|
-
hasSubcategories: z.boolean(),
|
|
201
|
-
get subcategories() {
|
|
202
|
-
return z.nullish(z.array(CategoriesApiGetParentsResponseItemSchema));
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
/**
|
|
206
|
-
* Response schema for getting parent categories.
|
|
207
|
-
*/
|
|
208
|
-
const CategoriesApiGetParentsResponseSchema = z.array(CategoriesApiGetParentsResponseItemSchema);
|
|
209
|
-
|
|
210
|
-
//#endregion
|
|
211
|
-
//#region src/api/categories/api.ts
|
|
212
|
-
/**
|
|
213
|
-
* API for retrieving product category information.
|
|
214
|
-
*/
|
|
215
|
-
var CategoriesApi = class {
|
|
216
|
-
/**
|
|
217
|
-
* Initializes a new instance of the CategoriesApi.
|
|
218
|
-
*
|
|
219
|
-
* @param http HTTP client instance.
|
|
220
|
-
*/
|
|
221
|
-
constructor(http) {
|
|
222
|
-
this.http = http;
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* Retrieves a list of all categories.
|
|
226
|
-
*
|
|
227
|
-
* @example
|
|
228
|
-
* const categories = await client.categories.list();
|
|
229
|
-
*/
|
|
230
|
-
list(params = {}) {
|
|
231
|
-
return this.http.get({
|
|
232
|
-
path: "/categories",
|
|
233
|
-
params
|
|
234
|
-
}, CategoriesApiListResponseSchema);
|
|
235
|
-
}
|
|
236
|
-
/**
|
|
237
|
-
* Retrieves detailed information about a specific category by its ID.
|
|
238
|
-
*
|
|
239
|
-
* @example
|
|
240
|
-
* const category = await client.categories.get({
|
|
241
|
-
* categoryId: 1234
|
|
242
|
-
* });
|
|
243
|
-
*/
|
|
244
|
-
get(params) {
|
|
245
|
-
return this.http.get({
|
|
246
|
-
path: `/categories/${params.categoryId}`,
|
|
247
|
-
params
|
|
248
|
-
}, CategoriesApiGetResponseSchema);
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Retrieves parent categories for specific category IDs.
|
|
252
|
-
*
|
|
253
|
-
* @example
|
|
254
|
-
* const parents = await client.categories.getParents({
|
|
255
|
-
* categoryId: [123, 456]
|
|
256
|
-
* });
|
|
257
|
-
*/
|
|
258
|
-
getParents(params) {
|
|
259
|
-
return this.http.get({
|
|
260
|
-
path: "/api/v1/categories/parents",
|
|
261
|
-
params
|
|
262
|
-
}, CategoriesApiGetParentsResponseSchema);
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
|
|
266
|
-
//#endregion
|
|
267
|
-
//#region src/common/schemas.ts
|
|
268
|
-
/**
|
|
269
|
-
* Schema for range filter options (e.g., price slider).
|
|
270
|
-
* Common schema used by multiple APIs.
|
|
271
|
-
*/
|
|
272
|
-
const RangeFilterOptionSchema = z.object({
|
|
273
|
-
min: z.number(),
|
|
274
|
-
max: z.number()
|
|
275
|
-
});
|
|
276
|
-
/**
|
|
277
|
-
* Type literal for range-based filters
|
|
278
|
-
*/
|
|
279
|
-
const RangeTypeSchema = z.literal("range");
|
|
280
|
-
/**
|
|
281
|
-
* Schema for range filters (e.g., price slider).
|
|
282
|
-
* Use this in discriminatedUnion-based filter schemas.
|
|
283
|
-
*/
|
|
284
|
-
const RangeFilterSchema = z.object({
|
|
285
|
-
type: RangeTypeSchema,
|
|
286
|
-
name: z.string(),
|
|
287
|
-
code: z.string(),
|
|
288
|
-
options: z.array(RangeFilterOptionSchema)
|
|
289
|
-
});
|
|
290
|
-
/**
|
|
291
|
-
* Schema for category/brand filter options.
|
|
292
|
-
* Common schema used by multiple APIs.
|
|
293
|
-
*/
|
|
294
|
-
const CategoryFilterOptionSchema = z.object({
|
|
295
|
-
label: z.string(),
|
|
296
|
-
value: z.number()
|
|
297
|
-
});
|
|
298
|
-
/**
|
|
299
|
-
* Type union for category filter types
|
|
300
|
-
*/
|
|
301
|
-
const CategoryFilterTypesSchema = z.union([z.literal("category"), z.literal("alphabetic_search_list")]);
|
|
302
|
-
/**
|
|
303
|
-
* Schema for category/brand filters.
|
|
304
|
-
* Use this in discriminatedUnion-based filter schemas.
|
|
305
|
-
*/
|
|
306
|
-
const CategoryFilterSchema = z.object({
|
|
307
|
-
type: CategoryFilterTypesSchema,
|
|
308
|
-
name: z.string(),
|
|
309
|
-
code: z.string(),
|
|
310
|
-
options: z.array(CategoryFilterOptionSchema)
|
|
311
|
-
});
|
|
312
|
-
/**
|
|
313
|
-
* Union filter schema that can be either range or category filter.
|
|
314
|
-
* This is the recommended pattern for type-safe filters.
|
|
315
|
-
*/
|
|
316
|
-
const FilterSchema = z.discriminatedUnion("type", [RangeFilterSchema, CategoryFilterSchema]);
|
|
317
|
-
|
|
318
|
-
//#endregion
|
|
319
|
-
//#region src/api/collections/schemas.ts
|
|
320
|
-
/**
|
|
321
|
-
* Type literal for collections stock availability type
|
|
322
|
-
*/
|
|
323
|
-
const CollectionsStockAvailabilityTypeSchema = z.literal("stock");
|
|
324
|
-
/**
|
|
325
|
-
* Schema for stock availability information.
|
|
326
|
-
*/
|
|
327
|
-
const CollectionsApiStockAvailabilitySchema = z.object({
|
|
328
|
-
type: CollectionsStockAvailabilityTypeSchema,
|
|
329
|
-
svg: z.nullish(z.string()),
|
|
330
|
-
text: z.string(),
|
|
331
|
-
maxQty: z.number(),
|
|
332
|
-
maxQtyReason: z.string()
|
|
333
|
-
});
|
|
334
|
-
/**
|
|
335
|
-
* Schema for a SKU item within a collection.
|
|
336
|
-
*/
|
|
337
|
-
const CollectionsApiSkuItemSchema = z.object({
|
|
338
|
-
productId: z.number(),
|
|
339
|
-
skuId: z.number(),
|
|
340
|
-
imageUrl: z.string(),
|
|
341
|
-
name: z.string(),
|
|
342
|
-
shortDescription: z.string(),
|
|
343
|
-
thumbnailUrl: z.string(),
|
|
344
|
-
originalPrice: z.number(),
|
|
345
|
-
price: z.number(),
|
|
346
|
-
qty: z.number(),
|
|
347
|
-
stockAvailability: z.nullish(CollectionsApiStockAvailabilitySchema),
|
|
348
|
-
isPromo: z.boolean(),
|
|
349
|
-
promoName: z.string(),
|
|
350
|
-
qtyPurchasedInfo: z.nullish(z.string()),
|
|
351
|
-
rating: z.nullish(z.number()),
|
|
352
|
-
scoreQuantity: z.nullish(z.number())
|
|
353
|
-
});
|
|
354
|
-
/**
|
|
355
|
-
* Response schema for getting SKUs from a collection.
|
|
356
|
-
*/
|
|
357
|
-
const CollectionsApiGetSkusResponseSchema = z.object({
|
|
358
|
-
filters: z.array(FilterSchema),
|
|
359
|
-
items: z.array(CollectionsApiSkuItemSchema),
|
|
360
|
-
pageNumber: z.number(),
|
|
361
|
-
totalPages: z.number(),
|
|
362
|
-
totalCount: z.number(),
|
|
363
|
-
hasPreviousPage: z.boolean(),
|
|
364
|
-
hasNextPage: z.boolean()
|
|
365
|
-
});
|
|
366
|
-
/**
|
|
367
|
-
* Schema for a collection list item.
|
|
368
|
-
*/
|
|
369
|
-
const CollectionsApiListItemSchema = z.object({
|
|
370
|
-
id: z.number(),
|
|
371
|
-
icon: z.nullish(z.string()),
|
|
372
|
-
name: z.string(),
|
|
373
|
-
priority: z.number()
|
|
374
|
-
});
|
|
375
|
-
/**
|
|
376
|
-
* Response schema for the list of collections.
|
|
377
|
-
*/
|
|
378
|
-
const CollectionsApiListResponseSchema = z.array(CollectionsApiListItemSchema);
|
|
379
|
-
/**
|
|
380
|
-
* Type literal for collection type identifier
|
|
381
|
-
*/
|
|
382
|
-
const CollectionTypeSchema = z.literal("Collection");
|
|
383
|
-
/**
|
|
384
|
-
* Response schema for getting a specific collection by ID.
|
|
385
|
-
*/
|
|
386
|
-
const CollectionsApiGetResponseSchema = z.object({
|
|
387
|
-
type: CollectionTypeSchema,
|
|
388
|
-
id: z.number(),
|
|
389
|
-
cover: z.string(),
|
|
390
|
-
description: z.string(),
|
|
391
|
-
name: z.string(),
|
|
392
|
-
priority: z.number()
|
|
393
|
-
});
|
|
394
|
-
|
|
395
|
-
//#endregion
|
|
396
|
-
//#region src/api/collections/api.ts
|
|
397
|
-
/**
|
|
398
|
-
* API for retrieving curated collections of products.
|
|
399
|
-
*/
|
|
400
|
-
var CollectionsApi = class {
|
|
401
|
-
/**
|
|
402
|
-
* Initializes a new instance of the CollectionsApi.
|
|
403
|
-
*
|
|
404
|
-
* @param http HTTP client instance.
|
|
405
|
-
*/
|
|
406
|
-
constructor(http) {
|
|
407
|
-
this.http = http;
|
|
408
|
-
}
|
|
409
|
-
/**
|
|
410
|
-
* Retrieves a list of SKUs belonging to a specific collection with pagination and sorting.
|
|
411
|
-
*
|
|
412
|
-
* @example
|
|
413
|
-
* const skus = await client.collections.getSkus({
|
|
414
|
-
* collectionId: 123,
|
|
415
|
-
* pageSize: 10
|
|
416
|
-
* });
|
|
417
|
-
*/
|
|
418
|
-
getSkus(params) {
|
|
419
|
-
return this.http.get({
|
|
420
|
-
path: "/api/v2/collections/skus",
|
|
421
|
-
params
|
|
422
|
-
}, CollectionsApiGetSkusResponseSchema);
|
|
423
|
-
}
|
|
424
|
-
/**
|
|
425
|
-
* Retrieves a list of all collections.
|
|
426
|
-
*
|
|
427
|
-
* @example
|
|
428
|
-
* const collections = await client.collections.list();
|
|
429
|
-
*/
|
|
430
|
-
list(params = {}) {
|
|
431
|
-
return this.http.get({
|
|
432
|
-
path: "/collections",
|
|
433
|
-
params
|
|
434
|
-
}, CollectionsApiListResponseSchema);
|
|
435
|
-
}
|
|
436
|
-
/**
|
|
437
|
-
* Retrieves detailed information about a specific collection by its ID.
|
|
438
|
-
*
|
|
439
|
-
* @example
|
|
440
|
-
* const collection = await client.collections.get({
|
|
441
|
-
* collectionId: 123
|
|
442
|
-
* });
|
|
443
|
-
*/
|
|
444
|
-
get(params) {
|
|
445
|
-
return this.http.get({
|
|
446
|
-
path: `/collections/${params.collectionId}`,
|
|
447
|
-
params
|
|
448
|
-
}, CollectionsApiGetResponseSchema);
|
|
449
|
-
}
|
|
450
|
-
};
|
|
451
|
-
|
|
452
|
-
//#endregion
|
|
453
|
-
//#region src/api/favorites/schemas.ts
|
|
454
|
-
/**
|
|
455
|
-
* Schema for a product badge.
|
|
456
|
-
*/
|
|
457
|
-
const FavoritesApiBadgeSchema = z.object({
|
|
458
|
-
label: z.string(),
|
|
459
|
-
backgroundColor: z.nullish(z.number()),
|
|
460
|
-
textColor: z.number()
|
|
461
|
-
});
|
|
462
|
-
/**
|
|
463
|
-
* Type literal for stock availability type
|
|
464
|
-
*/
|
|
465
|
-
const FavoritesStockAvailabilityTypeSchema = z.literal("stock");
|
|
466
|
-
/**
|
|
467
|
-
* Schema for stock availability information.
|
|
468
|
-
*/
|
|
469
|
-
const FavoritesApiStockAvailabilitySchema = z.object({
|
|
470
|
-
type: FavoritesStockAvailabilityTypeSchema,
|
|
471
|
-
svg: z.nullish(z.string()),
|
|
472
|
-
text: z.string(),
|
|
473
|
-
maxQty: z.number(),
|
|
474
|
-
maxQtyReason: z.string()
|
|
475
|
-
});
|
|
476
|
-
/**
|
|
477
|
-
* Schema for a favorited item (SKU).
|
|
478
|
-
*/
|
|
479
|
-
const FavoritesApiItemSchema = z.object({
|
|
480
|
-
productId: z.number(),
|
|
481
|
-
skuId: z.number(),
|
|
482
|
-
imageUrl: z.string(),
|
|
483
|
-
name: z.string(),
|
|
484
|
-
shortDescription: z.string(),
|
|
485
|
-
thumbnailUrl: z.string(),
|
|
486
|
-
originalPrice: z.number(),
|
|
487
|
-
price: z.number(),
|
|
488
|
-
qty: z.number(),
|
|
489
|
-
stockAvailability: z.nullish(FavoritesApiStockAvailabilitySchema),
|
|
490
|
-
isPromo: z.boolean(),
|
|
491
|
-
promoName: z.nullish(z.string()),
|
|
492
|
-
promocodes: z.array(z.string()),
|
|
493
|
-
qtyPurchasedInfo: z.nullish(z.string()),
|
|
494
|
-
rating: z.nullish(z.number()),
|
|
495
|
-
scoreQuantity: z.nullish(z.number()),
|
|
496
|
-
badge: z.nullish(FavoritesApiBadgeSchema),
|
|
497
|
-
moderationStatus: z.number()
|
|
498
|
-
});
|
|
499
|
-
/**
|
|
500
|
-
* Response schema for the favorites list.
|
|
501
|
-
*/
|
|
502
|
-
const FavoritesApiListResponseSchema = z.object({ items: z.array(FavoritesApiItemSchema) });
|
|
503
|
-
/**
|
|
504
|
-
* Response schema for retrieving favorite SKU IDs.
|
|
505
|
-
*/
|
|
506
|
-
const FavoritesApiGetIdsResponseSchema = z.object({ skuIds: z.array(z.number()) });
|
|
507
|
-
/**
|
|
508
|
-
* Response schema for adding a SKU to favorites.
|
|
509
|
-
*/
|
|
510
|
-
const FavoritesApiAddResponseSchema = z.nullish(z.null());
|
|
511
|
-
/**
|
|
512
|
-
* Response schema for removing a SKU from favorites.
|
|
513
|
-
*/
|
|
514
|
-
const FavoritesApiRemoveResponseSchema = z.nullish(z.null());
|
|
515
|
-
|
|
516
|
-
//#endregion
|
|
517
|
-
//#region src/api/favorites/api.ts
|
|
518
|
-
/**
|
|
519
|
-
* API for managing user favorites.
|
|
520
|
-
*/
|
|
521
|
-
var FavoritesApi = class {
|
|
522
|
-
/**
|
|
523
|
-
* Initializes a new instance of the FavoritesApi.
|
|
524
|
-
*
|
|
525
|
-
* @param http HTTP client instance.
|
|
526
|
-
*/
|
|
527
|
-
constructor(http) {
|
|
528
|
-
this.http = http;
|
|
529
|
-
}
|
|
530
|
-
/**
|
|
531
|
-
* Retrieves a paginated list of favorited items.
|
|
532
|
-
*
|
|
533
|
-
* @example
|
|
534
|
-
* const favorites = await client.favorites.list({
|
|
535
|
-
* pageNumber: 1,
|
|
536
|
-
* pageSize: 20
|
|
537
|
-
* });
|
|
538
|
-
*/
|
|
539
|
-
list(params = {}) {
|
|
540
|
-
return this.http.get({
|
|
541
|
-
path: "/api/v1/favorites",
|
|
542
|
-
params
|
|
543
|
-
}, FavoritesApiListResponseSchema);
|
|
544
|
-
}
|
|
545
|
-
/**
|
|
546
|
-
* Retrieves the list of IDs of favorited SKUs.
|
|
547
|
-
*
|
|
548
|
-
* @example
|
|
549
|
-
* const { skuIds } = await client.favorites.getIds();
|
|
550
|
-
*/
|
|
551
|
-
getIds(params = {}) {
|
|
552
|
-
return this.http.get({
|
|
553
|
-
path: "/api/v1/favorites/ids",
|
|
554
|
-
params
|
|
555
|
-
}, FavoritesApiGetIdsResponseSchema);
|
|
556
|
-
}
|
|
557
|
-
/**
|
|
558
|
-
* Adds SKUs to favorites.
|
|
559
|
-
*
|
|
560
|
-
* @example
|
|
561
|
-
* await client.favorites.add({ skuIds: [12345, 67890] });
|
|
562
|
-
*/
|
|
563
|
-
add(params) {
|
|
564
|
-
return this.http.post({
|
|
565
|
-
path: "/api/v1/favorites",
|
|
566
|
-
body: params.skuIds
|
|
567
|
-
}, FavoritesApiAddResponseSchema);
|
|
568
|
-
}
|
|
569
|
-
/**
|
|
570
|
-
* Removes SKUs from favorites.
|
|
571
|
-
*
|
|
572
|
-
* @example
|
|
573
|
-
* await client.favorites.remove({ skuIds: [12345, 67890] });
|
|
574
|
-
*/
|
|
575
|
-
remove(params) {
|
|
576
|
-
return this.http.delete({
|
|
577
|
-
path: "/api/v1/favorites",
|
|
578
|
-
body: params.skuIds
|
|
579
|
-
}, FavoritesApiRemoveResponseSchema);
|
|
580
|
-
}
|
|
581
|
-
};
|
|
582
|
-
|
|
583
|
-
//#endregion
|
|
584
|
-
//#region src/api/feature-flags/schemas.ts
|
|
585
|
-
/**
|
|
586
|
-
* Schema for a feature flag item.
|
|
587
|
-
*/
|
|
588
|
-
const FeatureFlagsApiItemSchema = z.object({
|
|
589
|
-
name: z.string(),
|
|
590
|
-
isActive: z.boolean()
|
|
591
|
-
});
|
|
592
|
-
/**
|
|
593
|
-
* Response schema for the list of feature flags.
|
|
594
|
-
*/
|
|
595
|
-
const FeatureFlagsApiListResponseSchema = z.array(FeatureFlagsApiItemSchema);
|
|
596
|
-
|
|
597
|
-
//#endregion
|
|
598
|
-
//#region src/api/feature-flags/api.ts
|
|
599
|
-
/**
|
|
600
|
-
* API for retrieving feature flags configuration.
|
|
601
|
-
*/
|
|
602
|
-
var FeatureFlagsApi = class {
|
|
603
|
-
/**
|
|
604
|
-
* Initializes a new instance of the FeatureFlagsApi.
|
|
605
|
-
*
|
|
606
|
-
* @param http HTTP client instance.
|
|
607
|
-
*/
|
|
608
|
-
constructor(http) {
|
|
609
|
-
this.http = http;
|
|
610
|
-
}
|
|
611
|
-
/**
|
|
612
|
-
* Retrieves all active feature flags.
|
|
613
|
-
*
|
|
614
|
-
* @example
|
|
615
|
-
* const flags = await client.featureFlags.list();
|
|
616
|
-
*/
|
|
617
|
-
list(params = {}) {
|
|
618
|
-
return this.http.get({
|
|
619
|
-
path: "/api/v1/feature-flags",
|
|
620
|
-
params
|
|
621
|
-
}, FeatureFlagsApiListResponseSchema);
|
|
622
|
-
}
|
|
623
|
-
};
|
|
624
|
-
|
|
625
|
-
//#endregion
|
|
626
|
-
//#region src/api/products/schemas.ts
|
|
627
|
-
/**
|
|
628
|
-
* Type union for product sort keys
|
|
629
|
-
*/
|
|
630
|
-
const ProductSortKeySchema = z.union([
|
|
631
|
-
z.literal("byRelevance"),
|
|
632
|
-
z.literal("popularity"),
|
|
633
|
-
z.literal("highestRated"),
|
|
634
|
-
z.literal("new"),
|
|
635
|
-
z.literal("price"),
|
|
636
|
-
z.literal("priceDesc")
|
|
637
|
-
]);
|
|
638
|
-
/**
|
|
639
|
-
* Schema for a sort option.
|
|
640
|
-
*/
|
|
641
|
-
const ProductsApiSortOptionSchema = z.object({
|
|
642
|
-
key: ProductSortKeySchema,
|
|
643
|
-
name: z.string()
|
|
644
|
-
});
|
|
645
|
-
/**
|
|
646
|
-
* Response schema for available sort options.
|
|
647
|
-
*/
|
|
648
|
-
const ProductsApiGetSortOptionsResponseSchema = z.array(ProductsApiSortOptionSchema);
|
|
649
|
-
/**
|
|
650
|
-
* Schema for a product review item.
|
|
651
|
-
*/
|
|
652
|
-
const ProductsApiReviewItemSchema = z.object({
|
|
653
|
-
author: z.string(),
|
|
654
|
-
reviewText: z.string(),
|
|
655
|
-
scoreValue: z.number(),
|
|
656
|
-
attributes: z.record(z.string(), z.string()),
|
|
657
|
-
createdAt: z.string()
|
|
658
|
-
});
|
|
659
|
-
/**
|
|
660
|
-
* Response schema for product reviews.
|
|
661
|
-
*/
|
|
662
|
-
const ProductsApiGetReviewsResponseSchema = z.object({
|
|
663
|
-
items: z.array(ProductsApiReviewItemSchema),
|
|
664
|
-
pageNumber: z.number(),
|
|
665
|
-
totalPages: z.number(),
|
|
666
|
-
totalCount: z.number(),
|
|
667
|
-
hasPreviousPage: z.boolean(),
|
|
668
|
-
hasNextPage: z.boolean()
|
|
669
|
-
});
|
|
670
|
-
/**
|
|
671
|
-
* Schema for a product badge.
|
|
672
|
-
*/
|
|
673
|
-
const ProductsApiBadgeSchema = z.object({
|
|
674
|
-
label: z.string(),
|
|
675
|
-
textColor: z.number(),
|
|
676
|
-
backgroundColor: z.nullish(z.number())
|
|
677
|
-
});
|
|
678
|
-
/**
|
|
679
|
-
* Type literal for products stock availability type
|
|
680
|
-
*/
|
|
681
|
-
const ProductsStockAvailabilityTypeSchema = z.literal("stock");
|
|
682
|
-
/**
|
|
683
|
-
* Schema for stock availability information.
|
|
684
|
-
*/
|
|
685
|
-
const ProductsApiStockAvailabilitySchema = z.object({
|
|
686
|
-
type: ProductsStockAvailabilityTypeSchema,
|
|
687
|
-
svg: z.nullish(z.string()),
|
|
688
|
-
text: z.string(),
|
|
689
|
-
maxQty: z.number(),
|
|
690
|
-
maxQtyReason: z.string()
|
|
691
|
-
});
|
|
692
|
-
/**
|
|
693
|
-
* Schema for a product item.
|
|
694
|
-
*/
|
|
695
|
-
const ProductsApiProductItemSchema = z.object({
|
|
696
|
-
productId: z.number(),
|
|
697
|
-
skuId: z.number(),
|
|
698
|
-
imageUrl: z.string(),
|
|
699
|
-
name: z.string(),
|
|
700
|
-
shortDescription: z.string(),
|
|
701
|
-
thumbnailUrl: z.string(),
|
|
702
|
-
originalPrice: z.number(),
|
|
703
|
-
price: z.number(),
|
|
704
|
-
qty: z.number(),
|
|
705
|
-
stockAvailability: z.nullish(ProductsApiStockAvailabilitySchema),
|
|
706
|
-
isPromo: z.boolean(),
|
|
707
|
-
promoName: z.nullish(z.string()),
|
|
708
|
-
promocodes: z.array(z.string()),
|
|
709
|
-
qtyPurchasedInfo: z.nullish(z.string()),
|
|
710
|
-
rating: z.nullish(z.number()),
|
|
711
|
-
scoreQuantity: z.nullish(z.number()),
|
|
712
|
-
badge: z.nullish(ProductsApiBadgeSchema),
|
|
713
|
-
moderationStatus: z.number()
|
|
714
|
-
});
|
|
715
|
-
/**
|
|
716
|
-
* Response schema for the product list.
|
|
717
|
-
*/
|
|
718
|
-
const ProductsApiListResponseSchema = z.object({
|
|
719
|
-
filters: z.array(FilterSchema),
|
|
720
|
-
items: z.array(ProductsApiProductItemSchema),
|
|
721
|
-
pageNumber: z.number(),
|
|
722
|
-
totalPages: z.number(),
|
|
723
|
-
totalCount: z.number(),
|
|
724
|
-
hasPreviousPage: z.boolean(),
|
|
725
|
-
hasNextPage: z.boolean()
|
|
726
|
-
});
|
|
727
|
-
|
|
728
|
-
//#endregion
|
|
729
|
-
//#region src/api/products/api.ts
|
|
730
|
-
/**
|
|
731
|
-
* API for retrieving product listings, details, and reviews.
|
|
732
|
-
*/
|
|
733
|
-
var ProductsApi = class {
|
|
734
|
-
/**
|
|
735
|
-
* Initializes a new instance of the ProductsApi.
|
|
736
|
-
*
|
|
737
|
-
* @param http HTTP client instance.
|
|
738
|
-
*/
|
|
739
|
-
constructor(http) {
|
|
740
|
-
this.http = http;
|
|
741
|
-
}
|
|
742
|
-
/**
|
|
743
|
-
* Retrieves available sorting options for product lists.
|
|
744
|
-
*
|
|
745
|
-
* @example
|
|
746
|
-
* const sortOptions = await client.products.getSortOptions();
|
|
747
|
-
*/
|
|
748
|
-
getSortOptions(params = {}) {
|
|
749
|
-
return this.http.get({
|
|
750
|
-
path: "/api/product/sort-options",
|
|
751
|
-
params
|
|
752
|
-
}, ProductsApiGetSortOptionsResponseSchema);
|
|
753
|
-
}
|
|
754
|
-
/**
|
|
755
|
-
* Retrieves a list of products with optional filtering and pagination.
|
|
756
|
-
*
|
|
757
|
-
* @example
|
|
758
|
-
* const products = await client.products.list({
|
|
759
|
-
* pageSize: 20,
|
|
760
|
-
* pageNumber: 1
|
|
761
|
-
* });
|
|
762
|
-
*/
|
|
763
|
-
list(params = {}) {
|
|
764
|
-
return this.http.get({
|
|
765
|
-
path: "/api/v2/product",
|
|
766
|
-
params
|
|
767
|
-
}, ProductsApiListResponseSchema);
|
|
768
|
-
}
|
|
769
|
-
/**
|
|
770
|
-
* Retrieves reviews for a specific product.
|
|
771
|
-
*
|
|
772
|
-
* @example
|
|
773
|
-
* const reviews = await client.products.getReviews({
|
|
774
|
-
* productId: 12345
|
|
775
|
-
* });
|
|
776
|
-
*/
|
|
777
|
-
getReviews(params) {
|
|
778
|
-
return this.http.get({
|
|
779
|
-
path: `/api/v1/product/${params.productId}/review`,
|
|
780
|
-
params
|
|
781
|
-
}, ProductsApiGetReviewsResponseSchema);
|
|
782
|
-
}
|
|
783
|
-
};
|
|
784
|
-
|
|
785
|
-
//#endregion
|
|
786
|
-
//#region src/api/promo/schemas.ts
|
|
787
|
-
/**
|
|
788
|
-
* Schema for a promotion item.
|
|
789
|
-
*/
|
|
790
|
-
const PromoApiItemSchema = z.object({
|
|
791
|
-
id: z.number(),
|
|
792
|
-
name: z.string(),
|
|
793
|
-
description: z.nullish(z.string()),
|
|
794
|
-
svgUrl: z.nullish(z.string()),
|
|
795
|
-
startDate: z.string(),
|
|
796
|
-
endDate: z.string()
|
|
797
|
-
});
|
|
798
|
-
/**
|
|
799
|
-
* Response schema for the list of promotions.
|
|
800
|
-
*/
|
|
801
|
-
const PromoApiListResponseSchema = z.array(PromoApiItemSchema);
|
|
802
|
-
|
|
803
|
-
//#endregion
|
|
804
|
-
//#region src/api/promo/api.ts
|
|
805
|
-
/**
|
|
806
|
-
* API for retrieving active promotions.
|
|
807
|
-
*/
|
|
808
|
-
var PromoApi = class {
|
|
809
|
-
/**
|
|
810
|
-
* Initializes a new instance of the PromoApi.
|
|
811
|
-
*
|
|
812
|
-
* @param http HTTP client instance.
|
|
813
|
-
*/
|
|
814
|
-
constructor(http) {
|
|
815
|
-
this.http = http;
|
|
816
|
-
}
|
|
817
|
-
/**
|
|
818
|
-
* Retrieves a list of all active promotions.
|
|
819
|
-
*
|
|
820
|
-
* @example
|
|
821
|
-
* const promos = await client.promo.list();
|
|
822
|
-
*/
|
|
823
|
-
list(params = {}) {
|
|
824
|
-
return this.http.get({
|
|
825
|
-
path: "/api/promo",
|
|
826
|
-
params
|
|
827
|
-
}, PromoApiListResponseSchema);
|
|
828
|
-
}
|
|
829
|
-
};
|
|
830
|
-
|
|
831
|
-
//#endregion
|
|
832
|
-
//#region src/api/shops/schemas.ts
|
|
833
|
-
/**
|
|
834
|
-
* Schema for shop contact information.
|
|
835
|
-
*/
|
|
836
|
-
const ShopsApiContactInfoSchema = z.object({
|
|
837
|
-
bin: z.string(),
|
|
838
|
-
daysSinceRegistration: z.number(),
|
|
839
|
-
legalType: z.number()
|
|
840
|
-
});
|
|
841
|
-
/**
|
|
842
|
-
* Schema for a shop tag.
|
|
843
|
-
*/
|
|
844
|
-
const ShopsApiTagSchema = z.object({
|
|
845
|
-
description: z.string(),
|
|
846
|
-
icon: z.string(),
|
|
847
|
-
name: z.string(),
|
|
848
|
-
svg: z.string(),
|
|
849
|
-
code: z.string()
|
|
850
|
-
});
|
|
851
|
-
/**
|
|
852
|
-
* Response schema for getting a specific shop by ID.
|
|
853
|
-
*/
|
|
854
|
-
const ShopsApiGetResponseSchema = z.object({
|
|
855
|
-
id: z.number(),
|
|
856
|
-
banner: z.nullish(z.string()),
|
|
857
|
-
description: z.string(),
|
|
858
|
-
logo: z.nullish(z.string()),
|
|
859
|
-
name: z.string(),
|
|
860
|
-
qtyPurchasedInfo: z.nullish(z.string()),
|
|
861
|
-
rating: z.nullish(z.number()),
|
|
862
|
-
totalReviews: z.nullish(z.number()),
|
|
863
|
-
contactInfo: ShopsApiContactInfoSchema,
|
|
864
|
-
isMonobrand: z.boolean(),
|
|
865
|
-
tag: ShopsApiTagSchema
|
|
866
|
-
});
|
|
867
|
-
/**
|
|
868
|
-
* Schema for a shop item in a list.
|
|
869
|
-
*/
|
|
870
|
-
const ShopsApiShopItemSchema = z.object({
|
|
871
|
-
id: z.number(),
|
|
872
|
-
icon: z.string()
|
|
873
|
-
});
|
|
874
|
-
/**
|
|
875
|
-
* Response schema for the monobrand shop list.
|
|
876
|
-
*/
|
|
877
|
-
const ShopsApiGetMonobrandResponseSchema = z.object({
|
|
878
|
-
items: z.array(ShopsApiShopItemSchema),
|
|
879
|
-
pageNumber: z.number(),
|
|
880
|
-
totalPages: z.number(),
|
|
881
|
-
totalCount: z.number(),
|
|
882
|
-
hasPreviousPage: z.boolean(),
|
|
883
|
-
hasNextPage: z.boolean()
|
|
884
|
-
});
|
|
885
|
-
/**
|
|
886
|
-
* Type literal for shops stock availability type
|
|
887
|
-
*/
|
|
888
|
-
const ShopsStockAvailabilityTypeSchema = z.literal("stock");
|
|
889
|
-
/**
|
|
890
|
-
* Schema for stock availability information.
|
|
891
|
-
*/
|
|
892
|
-
const ShopsApiStockAvailabilitySchema = z.object({
|
|
893
|
-
type: ShopsStockAvailabilityTypeSchema,
|
|
894
|
-
svg: z.nullish(z.string()),
|
|
895
|
-
text: z.string(),
|
|
896
|
-
maxQty: z.number(),
|
|
897
|
-
maxQtyReason: z.string()
|
|
898
|
-
});
|
|
899
|
-
/**
|
|
900
|
-
* Schema for a product item in a shop.
|
|
901
|
-
*/
|
|
902
|
-
const ShopsApiProductItemSchema = z.object({
|
|
903
|
-
productId: z.number(),
|
|
904
|
-
skuId: z.number(),
|
|
905
|
-
imageUrl: z.string(),
|
|
906
|
-
name: z.string(),
|
|
907
|
-
shortDescription: z.string(),
|
|
908
|
-
thumbnailUrl: z.string(),
|
|
909
|
-
originalPrice: z.number(),
|
|
910
|
-
price: z.number(),
|
|
911
|
-
inStock: z.boolean(),
|
|
912
|
-
qty: z.number(),
|
|
913
|
-
stockAvailability: z.nullish(ShopsApiStockAvailabilitySchema),
|
|
914
|
-
isPromo: z.boolean(),
|
|
915
|
-
promoName: z.string(),
|
|
916
|
-
qtyPurchasedInfo: z.nullish(z.string()),
|
|
917
|
-
rating: z.nullish(z.number()),
|
|
918
|
-
scoreQuantity: z.nullish(z.number()),
|
|
919
|
-
moderationStatus: z.number()
|
|
920
|
-
});
|
|
921
|
-
/**
|
|
922
|
-
* Response schema for products from a specific shop.
|
|
923
|
-
*/
|
|
924
|
-
const ShopsApiGetProductsResponseSchema = z.object({
|
|
925
|
-
filters: z.array(FilterSchema),
|
|
926
|
-
items: z.array(ShopsApiProductItemSchema),
|
|
927
|
-
pageNumber: z.number(),
|
|
928
|
-
totalPages: z.number(),
|
|
929
|
-
totalCount: z.number(),
|
|
930
|
-
hasPreviousPage: z.boolean(),
|
|
931
|
-
hasNextPage: z.boolean()
|
|
932
|
-
});
|
|
933
|
-
|
|
934
|
-
//#endregion
|
|
935
|
-
//#region src/api/shops/api.ts
|
|
936
|
-
/**
|
|
937
|
-
* API for interacting with shop-related endpoints.
|
|
938
|
-
*/
|
|
939
|
-
var ShopsApi = class {
|
|
940
|
-
/**
|
|
941
|
-
* Initializes a new instance of the ShopsApi.
|
|
942
|
-
*
|
|
943
|
-
* @param http HTTP client instance.
|
|
944
|
-
*/
|
|
945
|
-
constructor(http) {
|
|
946
|
-
this.http = http;
|
|
947
|
-
}
|
|
948
|
-
/**
|
|
949
|
-
* Retrieves details of a specific shop.
|
|
950
|
-
*
|
|
951
|
-
* @example
|
|
952
|
-
* const shop = await client.shops.get({
|
|
953
|
-
* shopId: 123
|
|
954
|
-
* });
|
|
955
|
-
*/
|
|
956
|
-
get(params) {
|
|
957
|
-
return this.http.get({
|
|
958
|
-
path: `/api/v1/shops/${params.shopId}`,
|
|
959
|
-
params
|
|
960
|
-
}, ShopsApiGetResponseSchema);
|
|
961
|
-
}
|
|
962
|
-
/**
|
|
963
|
-
* Retrieves monobrand shop details.
|
|
964
|
-
*
|
|
965
|
-
* @example
|
|
966
|
-
* const monobrand = await client.shops.getMonobrand();
|
|
967
|
-
*/
|
|
968
|
-
getMonobrand(params = {}) {
|
|
969
|
-
return this.http.get({
|
|
970
|
-
path: "/api/v1/shops/monobrand",
|
|
971
|
-
params
|
|
972
|
-
}, ShopsApiGetMonobrandResponseSchema);
|
|
973
|
-
}
|
|
974
|
-
/**
|
|
975
|
-
* Retrieves products for a specific shop.
|
|
976
|
-
*
|
|
977
|
-
* @example
|
|
978
|
-
* const shopProducts = await client.shops.getProducts({
|
|
979
|
-
* shopId: 123,
|
|
980
|
-
* pageSize: 10
|
|
981
|
-
* });
|
|
982
|
-
*/
|
|
983
|
-
getProducts(params) {
|
|
984
|
-
return this.http.get({
|
|
985
|
-
path: `/api/v2/shops/${params.shopId}/products`,
|
|
986
|
-
params
|
|
987
|
-
}, ShopsApiGetProductsResponseSchema);
|
|
988
|
-
}
|
|
989
|
-
};
|
|
990
|
-
|
|
991
|
-
//#endregion
|
|
992
|
-
//#region src/api/sku/schemas.ts
|
|
993
|
-
/**
|
|
994
|
-
* Schema for installment payment information.
|
|
995
|
-
*/
|
|
996
|
-
const SkuApiInstallmentSchema = z.object({
|
|
997
|
-
installmentSvg: z.string(),
|
|
998
|
-
installmentTerm: z.string()
|
|
999
|
-
});
|
|
1000
|
-
/**
|
|
1001
|
-
* Schema for shop details associated with a SKU.
|
|
1002
|
-
*/
|
|
1003
|
-
const SkuApiShopSchema = z.object({
|
|
1004
|
-
id: z.number(),
|
|
1005
|
-
logo: z.nullish(z.string()),
|
|
1006
|
-
name: z.string(),
|
|
1007
|
-
photo: z.string(),
|
|
1008
|
-
url: z.string(),
|
|
1009
|
-
isInstallment: z.boolean(),
|
|
1010
|
-
qtyPurchasedInfo: z.nullish(z.string()),
|
|
1011
|
-
rating: z.nullish(z.number()),
|
|
1012
|
-
daysSinceRegistration: z.number(),
|
|
1013
|
-
isMonobrand: z.boolean()
|
|
1014
|
-
});
|
|
1015
|
-
/**
|
|
1016
|
-
* Schema for brand information.
|
|
1017
|
-
*/
|
|
1018
|
-
const SkuApiBrandSchema = z.object({
|
|
1019
|
-
id: z.number(),
|
|
1020
|
-
name: z.string()
|
|
1021
|
-
});
|
|
1022
|
-
/**
|
|
1023
|
-
* Schema for a category item.
|
|
1024
|
-
*/
|
|
1025
|
-
const SkuApiCategorySchema = z.object({
|
|
1026
|
-
id: z.number(),
|
|
1027
|
-
name: z.string(),
|
|
1028
|
-
isPrimary: z.boolean()
|
|
1029
|
-
});
|
|
1030
|
-
/**
|
|
1031
|
-
* Schema for an attribute property value.
|
|
1032
|
-
*/
|
|
1033
|
-
const SkuApiAttributePropertyValueSchema = z.object({
|
|
1034
|
-
name: z.string(),
|
|
1035
|
-
photo: z.string()
|
|
1036
|
-
});
|
|
1037
|
-
/**
|
|
1038
|
-
* Schema for a product attribute.
|
|
1039
|
-
*/
|
|
1040
|
-
const SkuApiAttributePropertySchema = z.object({
|
|
1041
|
-
name: z.string(),
|
|
1042
|
-
value: SkuApiAttributePropertyValueSchema
|
|
1043
|
-
});
|
|
1044
|
-
/**
|
|
1045
|
-
* Schema for SKU attributes configuration.
|
|
1046
|
-
*/
|
|
1047
|
-
const SkuApiAttributeSchema = z.object({
|
|
1048
|
-
skuId: z.number(),
|
|
1049
|
-
quantity: z.number(),
|
|
1050
|
-
attributeProperties: z.array(SkuApiAttributePropertySchema)
|
|
1051
|
-
});
|
|
1052
|
-
/**
|
|
1053
|
-
* Schema for a product tag.
|
|
1054
|
-
*/
|
|
1055
|
-
const SkuApiTagSchema = z.object({
|
|
1056
|
-
type: z.string(),
|
|
1057
|
-
name: z.string(),
|
|
1058
|
-
svg: z.string(),
|
|
1059
|
-
value: z.nullish(z.string())
|
|
1060
|
-
});
|
|
1061
|
-
/**
|
|
1062
|
-
* Type literal for SKU stock availability type
|
|
1063
|
-
*/
|
|
1064
|
-
const SkuStockAvailabilityTypeSchema = z.literal("stock");
|
|
1065
|
-
/**
|
|
1066
|
-
* Schema for stock availability information.
|
|
1067
|
-
*/
|
|
1068
|
-
const SkuApiStockAvailabilitySchema = z.object({
|
|
1069
|
-
type: SkuStockAvailabilityTypeSchema,
|
|
1070
|
-
svg: z.nullish(z.string()),
|
|
1071
|
-
text: z.string(),
|
|
1072
|
-
maxQty: z.number(),
|
|
1073
|
-
maxQtyReason: z.string()
|
|
1074
|
-
});
|
|
1075
|
-
/**
|
|
1076
|
-
* Response schema for getting a specific SKU by ID.
|
|
1077
|
-
*/
|
|
1078
|
-
const SkuApiGetResponseSchema = z.object({
|
|
1079
|
-
productId: z.number(),
|
|
1080
|
-
skuId: z.number(),
|
|
1081
|
-
description: z.string(),
|
|
1082
|
-
name: z.string(),
|
|
1083
|
-
photos: z.array(z.string()),
|
|
1084
|
-
shortDescription: z.string(),
|
|
1085
|
-
discount: z.number(),
|
|
1086
|
-
originalPrice: z.number(),
|
|
1087
|
-
percentDiscount: z.number(),
|
|
1088
|
-
price: z.number(),
|
|
1089
|
-
qty: z.number(),
|
|
1090
|
-
stockAvailability: z.nullish(SkuApiStockAvailabilitySchema),
|
|
1091
|
-
installment: z.nullish(SkuApiInstallmentSchema),
|
|
1092
|
-
isPromo: z.boolean(),
|
|
1093
|
-
promoName: z.string(),
|
|
1094
|
-
promocodes: z.array(z.string()),
|
|
1095
|
-
qtyPurchasedInfo: z.nullish(z.string()),
|
|
1096
|
-
rating: z.nullish(z.number()),
|
|
1097
|
-
scoreQuantity: z.nullish(z.number()),
|
|
1098
|
-
textReviewQuantity: z.nullish(z.number()),
|
|
1099
|
-
brand: z.nullish(SkuApiBrandSchema),
|
|
1100
|
-
categories: z.array(SkuApiCategorySchema),
|
|
1101
|
-
shop: SkuApiShopSchema,
|
|
1102
|
-
additionalInfo: z.record(z.string(), z.string()),
|
|
1103
|
-
attributes: z.array(SkuApiAttributeSchema),
|
|
1104
|
-
tags: z.array(SkuApiTagSchema)
|
|
1105
|
-
});
|
|
1106
|
-
/**
|
|
1107
|
-
* Schema for a similar product item.
|
|
1108
|
-
*/
|
|
1109
|
-
const SkuApiSimilarItemSchema = z.object({
|
|
1110
|
-
productId: z.number(),
|
|
1111
|
-
skuId: z.number(),
|
|
1112
|
-
imageUrl: z.string(),
|
|
1113
|
-
name: z.string(),
|
|
1114
|
-
shortDescription: z.string(),
|
|
1115
|
-
thumbnailUrl: z.string(),
|
|
1116
|
-
originalPrice: z.number(),
|
|
1117
|
-
price: z.number(),
|
|
1118
|
-
qty: z.number(),
|
|
1119
|
-
isPromo: z.boolean(),
|
|
1120
|
-
promoName: z.string(),
|
|
1121
|
-
qtyPurchasedInfo: z.nullish(z.string()),
|
|
1122
|
-
rating: z.nullish(z.number()),
|
|
1123
|
-
scoreQuantity: z.nullish(z.number()),
|
|
1124
|
-
moderationStatus: z.number()
|
|
1125
|
-
});
|
|
1126
|
-
/**
|
|
1127
|
-
* Response schema for similar SKUs.
|
|
1128
|
-
*/
|
|
1129
|
-
const SkuApiGetSimilarResponseSchema = z.object({
|
|
1130
|
-
items: z.array(SkuApiSimilarItemSchema),
|
|
1131
|
-
pageNumber: z.number(),
|
|
1132
|
-
totalPages: z.number(),
|
|
1133
|
-
totalCount: z.number(),
|
|
1134
|
-
hasPreviousPage: z.boolean(),
|
|
1135
|
-
hasNextPage: z.boolean()
|
|
1136
|
-
});
|
|
1137
|
-
/**
|
|
1138
|
-
* Schema for a collection item.
|
|
1139
|
-
*/
|
|
1140
|
-
const SkuApiCollectionItemSchema = z.object({
|
|
1141
|
-
id: z.number(),
|
|
1142
|
-
cover: z.string(),
|
|
1143
|
-
icon: z.string(),
|
|
1144
|
-
name: z.string(),
|
|
1145
|
-
quantity: z.number(),
|
|
1146
|
-
priority: z.number()
|
|
1147
|
-
});
|
|
1148
|
-
/**
|
|
1149
|
-
* Response schema for SKU collections.
|
|
1150
|
-
*/
|
|
1151
|
-
const SkuApiGetCollectionsResponseSchema = z.array(SkuApiCollectionItemSchema);
|
|
1152
|
-
/**
|
|
1153
|
-
* Response schema for review availability check.
|
|
1154
|
-
*/
|
|
1155
|
-
const SkuApiGetReviewAvailableResponseSchema = z.object({
|
|
1156
|
-
description: z.string(),
|
|
1157
|
-
message: z.string()
|
|
1158
|
-
});
|
|
1159
|
-
|
|
1160
|
-
//#endregion
|
|
1161
|
-
//#region src/api/sku/api.ts
|
|
1162
|
-
/**
|
|
1163
|
-
* API for interacting with SKU-related endpoints.
|
|
1164
|
-
*/
|
|
1165
|
-
var SkuApi = class {
|
|
1166
|
-
/**
|
|
1167
|
-
* Initializes a new instance of the SkuApi.
|
|
1168
|
-
*
|
|
1169
|
-
* @param http HTTP client instance.
|
|
1170
|
-
*/
|
|
1171
|
-
constructor(http) {
|
|
1172
|
-
this.http = http;
|
|
1173
|
-
}
|
|
1174
|
-
/**
|
|
1175
|
-
* Retrieves details of a specific SKU.
|
|
1176
|
-
*
|
|
1177
|
-
* @example
|
|
1178
|
-
* const sku = await client.sku.get({
|
|
1179
|
-
* skuId: 123
|
|
1180
|
-
* });
|
|
1181
|
-
*/
|
|
1182
|
-
get(params) {
|
|
1183
|
-
return this.http.get({
|
|
1184
|
-
path: `/api/v2/sku/${params.skuId}`,
|
|
1185
|
-
params
|
|
1186
|
-
}, SkuApiGetResponseSchema);
|
|
1187
|
-
}
|
|
1188
|
-
/**
|
|
1189
|
-
* Retrieves similar SKUs.
|
|
1190
|
-
*
|
|
1191
|
-
* @example
|
|
1192
|
-
* const similar = await client.sku.getSimilar({
|
|
1193
|
-
* skuId: 123
|
|
1194
|
-
* });
|
|
1195
|
-
*/
|
|
1196
|
-
getSimilar(params) {
|
|
1197
|
-
return this.http.get({
|
|
1198
|
-
path: "/api/v2/sku/similar-skus",
|
|
1199
|
-
params
|
|
1200
|
-
}, SkuApiGetSimilarResponseSchema);
|
|
1201
|
-
}
|
|
1202
|
-
/**
|
|
1203
|
-
* Retrieves collections associated with a SKU.
|
|
1204
|
-
*
|
|
1205
|
-
* @example
|
|
1206
|
-
* const collections = await client.sku.getCollections({
|
|
1207
|
-
* skuId: 123
|
|
1208
|
-
* });
|
|
1209
|
-
*/
|
|
1210
|
-
getCollections(params) {
|
|
1211
|
-
return this.http.get({
|
|
1212
|
-
path: `/sku/${params.skuId}/collections`,
|
|
1213
|
-
params
|
|
1214
|
-
}, SkuApiGetCollectionsResponseSchema);
|
|
1215
|
-
}
|
|
1216
|
-
/**
|
|
1217
|
-
* Checks if a review is available for a SKU.
|
|
1218
|
-
*
|
|
1219
|
-
* @example
|
|
1220
|
-
* const isAvailable = await client.sku.getReviewAvailable({
|
|
1221
|
-
* skuId: 123
|
|
1222
|
-
* });
|
|
1223
|
-
*/
|
|
1224
|
-
getReviewAvailable(params) {
|
|
1225
|
-
return this.http.get({
|
|
1226
|
-
path: `/sku/${params.skuId}/review-available`,
|
|
1227
|
-
params
|
|
1228
|
-
}, SkuApiGetReviewAvailableResponseSchema);
|
|
1229
|
-
}
|
|
1230
|
-
};
|
|
1231
|
-
|
|
1232
|
-
//#endregion
|
|
1233
|
-
//#region src/api/users/schemas.ts
|
|
1234
|
-
/**
|
|
1235
|
-
* Supported language enum for user preference
|
|
1236
|
-
*/
|
|
1237
|
-
const UsersApiLanguageEnumSchema = z.enum(["ru", "kk"]);
|
|
1238
|
-
/**
|
|
1239
|
-
* Response schema for language update
|
|
1240
|
-
*/
|
|
1241
|
-
const UsersApiUpdateLanguageResponseSchema = z.object({
|
|
1242
|
-
language: UsersApiLanguageEnumSchema,
|
|
1243
|
-
title: z.string(),
|
|
1244
|
-
message: z.string()
|
|
1245
|
-
});
|
|
1246
|
-
/**
|
|
1247
|
-
* Response schema for device registration
|
|
1248
|
-
*/
|
|
1249
|
-
const UsersApiRegisterDeviceResponseSchema = z.nullish(z.null());
|
|
1250
|
-
|
|
1251
|
-
//#endregion
|
|
1252
|
-
//#region src/api/users/api.ts
|
|
1253
|
-
/**
|
|
1254
|
-
* API for user management operations.
|
|
1255
|
-
*/
|
|
1256
|
-
var UsersApi = class {
|
|
1257
|
-
/**
|
|
1258
|
-
* Initializes a new instance of the UsersApi.
|
|
1259
|
-
*
|
|
1260
|
-
* @param http HTTP client instance.
|
|
1261
|
-
*/
|
|
1262
|
-
constructor(http) {
|
|
1263
|
-
this.http = http;
|
|
1264
|
-
}
|
|
1265
|
-
/**
|
|
1266
|
-
* Updates the user's preferred language.
|
|
1267
|
-
*
|
|
1268
|
-
* @example
|
|
1269
|
-
* await client.users.updateLanguage({
|
|
1270
|
-
* language: "ru"
|
|
1271
|
-
* });
|
|
1272
|
-
*/
|
|
1273
|
-
updateLanguage(params) {
|
|
1274
|
-
return this.http.patch({
|
|
1275
|
-
path: "/api/v1/users/me/language",
|
|
1276
|
-
body: params
|
|
1277
|
-
}, UsersApiUpdateLanguageResponseSchema);
|
|
1278
|
-
}
|
|
1279
|
-
/**
|
|
1280
|
-
* Registers device identity for analytics tracking.
|
|
1281
|
-
*
|
|
1282
|
-
* @example
|
|
1283
|
-
* await client.users.registerDevice({
|
|
1284
|
-
* deviceIdentity: {
|
|
1285
|
-
* sdkInformation: [
|
|
1286
|
-
* {
|
|
1287
|
-
* type: "Appsflyer",
|
|
1288
|
-
* deviceId: "1765694307025-6267413661002574019"
|
|
1289
|
-
* }
|
|
1290
|
-
* ]
|
|
1291
|
-
* }
|
|
1292
|
-
* });
|
|
1293
|
-
*/
|
|
1294
|
-
registerDevice(params) {
|
|
1295
|
-
return this.http.post({
|
|
1296
|
-
path: "/api/v1/device-identities",
|
|
1297
|
-
body: params
|
|
1298
|
-
}, UsersApiRegisterDeviceResponseSchema);
|
|
1299
|
-
}
|
|
1300
|
-
};
|
|
1301
|
-
|
|
1302
|
-
//#endregion
|
|
1303
|
-
//#region src/common/constants.ts
|
|
1304
|
-
/**
|
|
1305
|
-
* The default base URL for the Teez B2C API.
|
|
1306
|
-
*/
|
|
1307
|
-
const BASE_URL = "https://b2c-api.teez.kz";
|
|
1308
|
-
/**
|
|
1309
|
-
* Supported languages for the API.
|
|
1310
|
-
*/
|
|
1311
|
-
const LANGUAGES = {
|
|
1312
|
-
RU: "ru",
|
|
1313
|
-
KZ: "kz"
|
|
1314
|
-
};
|
|
1315
|
-
/**
|
|
1316
|
-
* Default application version code.
|
|
1317
|
-
*/
|
|
1318
|
-
const DEFAULT_APP_VERSION = "200";
|
|
1319
|
-
|
|
1320
|
-
//#endregion
|
|
1321
|
-
//#region src/utils/merge-headers.ts
|
|
1322
|
-
/**
|
|
1323
|
-
* Merges base headers with new ones (overrides).
|
|
1324
|
-
* Returns a new Headers instance without mutating the original source.
|
|
1325
|
-
*/
|
|
1326
|
-
function mergeHeaders(base, overrides) {
|
|
1327
|
-
const result = new Headers(base);
|
|
1328
|
-
if (overrides != void 0) new Headers(overrides).forEach((value, key) => {
|
|
1329
|
-
result.set(key, value);
|
|
1330
|
-
});
|
|
1331
|
-
return result;
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
//#endregion
|
|
1335
|
-
//#region src/config.ts
|
|
1336
|
-
/**
|
|
1337
|
-
* Default configuration values.
|
|
1338
|
-
*/
|
|
1339
|
-
const DEFAULT_CONFIG = {
|
|
1340
|
-
baseUrl: BASE_URL,
|
|
1341
|
-
appVersion: DEFAULT_APP_VERSION,
|
|
1342
|
-
language: "ru",
|
|
1343
|
-
timeout: 3e4,
|
|
1344
|
-
headers: new Headers()
|
|
1345
|
-
};
|
|
1346
|
-
/**
|
|
1347
|
-
* Merges user configuration with defaults.
|
|
1348
|
-
*/
|
|
1349
|
-
function resolveConfig(config) {
|
|
1350
|
-
const headers = mergeHeaders(DEFAULT_CONFIG.headers, config?.headers);
|
|
1351
|
-
return {
|
|
1352
|
-
baseUrl: config?.baseUrl ?? DEFAULT_CONFIG.baseUrl,
|
|
1353
|
-
token: config?.token,
|
|
1354
|
-
appVersion: config?.appVersion ?? DEFAULT_CONFIG.appVersion,
|
|
1355
|
-
language: config?.language ?? DEFAULT_CONFIG.language,
|
|
1356
|
-
timeout: config?.timeout ?? DEFAULT_CONFIG.timeout,
|
|
1357
|
-
headers
|
|
1358
|
-
};
|
|
1359
|
-
}
|
|
1360
|
-
/**
|
|
1361
|
-
* Builds a standard user-agent string for the Teez client.
|
|
1362
|
-
*/
|
|
1363
|
-
function buildUserAgent(appVersion) {
|
|
1364
|
-
return `android;kz.teez.customer;${appVersion}`;
|
|
1365
|
-
}
|
|
1366
|
-
/**
|
|
1367
|
-
* Builds the headers object for API requests based on configuration.
|
|
1368
|
-
*/
|
|
1369
|
-
function buildHeaders(config) {
|
|
1370
|
-
const headers = new Headers(config.headers);
|
|
1371
|
-
headers.set("Accept-Language", config.language);
|
|
1372
|
-
headers.set("User-Agent", buildUserAgent(config.appVersion));
|
|
1373
|
-
headers.set("X-App-Version", config.appVersion);
|
|
1374
|
-
if (config.token != void 0) headers.set("Authorization", `Bearer ${config.token}`);
|
|
1375
|
-
return headers;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
//#endregion
|
|
1379
|
-
//#region src/errors/teez-error.ts
|
|
1380
|
-
/**
|
|
1381
|
-
* Base error class for all SDK-related errors.
|
|
1382
|
-
*/
|
|
1383
|
-
var TeezError = class extends Error {
|
|
1384
|
-
name = "TeezError";
|
|
1385
|
-
};
|
|
1386
|
-
|
|
1387
|
-
//#endregion
|
|
1388
|
-
//#region src/errors/teez-api-error.ts
|
|
1389
|
-
/**
|
|
1390
|
-
* Error thrown when the API response indicates a failure (4xx or 5xx status).
|
|
1391
|
-
*/
|
|
1392
|
-
var TeezApiError = class extends TeezError {
|
|
1393
|
-
name = "TeezApiError";
|
|
1394
|
-
/**
|
|
1395
|
-
* URL of the request that failed.
|
|
1396
|
-
*/
|
|
1397
|
-
url;
|
|
1398
|
-
/**
|
|
1399
|
-
* HTTP status code.
|
|
1400
|
-
*/
|
|
1401
|
-
status;
|
|
1402
|
-
/**
|
|
1403
|
-
* HTTP status text.
|
|
1404
|
-
*/
|
|
1405
|
-
statusText;
|
|
1406
|
-
/**
|
|
1407
|
-
* Response body, if available.
|
|
1408
|
-
*/
|
|
1409
|
-
body;
|
|
1410
|
-
constructor(message, { url, status, statusText, body, ...errorOptions }) {
|
|
1411
|
-
super(message, errorOptions);
|
|
1412
|
-
this.url = url;
|
|
1413
|
-
this.status = status;
|
|
1414
|
-
this.statusText = statusText;
|
|
1415
|
-
this.body = body;
|
|
1416
|
-
}
|
|
1417
|
-
/**
|
|
1418
|
-
* Checks if the status code is a client error (4xx).
|
|
1419
|
-
*/
|
|
1420
|
-
get isClientError() {
|
|
1421
|
-
return this.status >= 400 && this.status < 500;
|
|
1422
|
-
}
|
|
1423
|
-
/**
|
|
1424
|
-
* Checks if the status code is a server error (5xx).
|
|
1425
|
-
*/
|
|
1426
|
-
get isServerError() {
|
|
1427
|
-
return this.status >= 500;
|
|
1428
|
-
}
|
|
1429
|
-
/**
|
|
1430
|
-
* Checks if the status code indicates a Not Found error (404).
|
|
1431
|
-
*/
|
|
1432
|
-
get isNotFound() {
|
|
1433
|
-
return this.status === 404;
|
|
1434
|
-
}
|
|
1435
|
-
};
|
|
1436
|
-
|
|
1437
|
-
//#endregion
|
|
1438
|
-
//#region src/errors/teez-network-error.ts
|
|
1439
|
-
/**
|
|
1440
|
-
* Error thrown when a network request fails (e.g., DNS resolution, connection refused).
|
|
1441
|
-
*/
|
|
1442
|
-
var TeezNetworkError = class extends TeezError {
|
|
1443
|
-
name = "TeezNetworkError";
|
|
1444
|
-
/**
|
|
1445
|
-
* URL of the request that failed.
|
|
1446
|
-
*/
|
|
1447
|
-
url;
|
|
1448
|
-
constructor(message, { url, ...errorOptions }) {
|
|
1449
|
-
super(message, errorOptions);
|
|
1450
|
-
this.url = url;
|
|
1451
|
-
}
|
|
1452
|
-
};
|
|
1453
|
-
|
|
1454
|
-
//#endregion
|
|
1455
|
-
//#region src/errors/teez-timeout-error.ts
|
|
1456
|
-
/**
|
|
1457
|
-
* Error thrown when an API request times out.
|
|
1458
|
-
*/
|
|
1459
|
-
var TeezTimeoutError = class extends TeezError {
|
|
1460
|
-
name = "TeezTimeoutError";
|
|
1461
|
-
/**
|
|
1462
|
-
* URL of the request that timed out.
|
|
1463
|
-
*/
|
|
1464
|
-
url;
|
|
1465
|
-
/**
|
|
1466
|
-
* Timeout duration in milliseconds.
|
|
1467
|
-
*/
|
|
1468
|
-
timeout;
|
|
1469
|
-
constructor(message, { url, timeout, ...errorOptions }) {
|
|
1470
|
-
super(message, errorOptions);
|
|
1471
|
-
this.url = url;
|
|
1472
|
-
this.timeout = timeout;
|
|
1473
|
-
}
|
|
1474
|
-
};
|
|
1475
|
-
|
|
1476
|
-
//#endregion
|
|
1477
|
-
//#region src/errors/teez-validation-error.ts
|
|
1478
|
-
/**
|
|
1479
|
-
* Error thrown when validation fails.
|
|
1480
|
-
*/
|
|
1481
|
-
var TeezValidationError = class extends TeezError {
|
|
1482
|
-
name = "TeezValidationError";
|
|
1483
|
-
/**
|
|
1484
|
-
* List of standardized validation issues.
|
|
1485
|
-
*/
|
|
1486
|
-
issues;
|
|
1487
|
-
/**
|
|
1488
|
-
* The raw data that failed validation.
|
|
1489
|
-
*/
|
|
1490
|
-
data;
|
|
1491
|
-
constructor(message, { issues, data, ...errorOptions }) {
|
|
1492
|
-
super(message, errorOptions);
|
|
1493
|
-
this.issues = issues;
|
|
1494
|
-
this.data = data;
|
|
1495
|
-
}
|
|
1496
|
-
};
|
|
1497
|
-
|
|
1498
|
-
//#endregion
|
|
1499
|
-
//#region src/http/helpers.ts
|
|
1500
|
-
/**
|
|
1501
|
-
* Constructs a full URL with query parameters.
|
|
1502
|
-
*/
|
|
1503
|
-
function buildUrl(path, baseUrl, queryParams) {
|
|
1504
|
-
const url = new URL(path, baseUrl);
|
|
1505
|
-
if (queryParams != void 0) for (const [key, value] of Object.entries(queryParams)) {
|
|
1506
|
-
if (value == void 0) continue;
|
|
1507
|
-
if (Array.isArray(value)) for (const item of value) url.searchParams.append(key, String(item));
|
|
1508
|
-
else url.searchParams.set(key, String(value));
|
|
1509
|
-
}
|
|
1510
|
-
return url;
|
|
1511
|
-
}
|
|
1512
|
-
/**
|
|
1513
|
-
* Converts Zod ZodError to abstract ValidationIssue[].
|
|
1514
|
-
*/
|
|
1515
|
-
function toValidationIssues(error) {
|
|
1516
|
-
return error.issues.map((issue) => ({
|
|
1517
|
-
code: issue.code,
|
|
1518
|
-
path: issue.path,
|
|
1519
|
-
message: issue.message
|
|
1520
|
-
}));
|
|
1521
|
-
}
|
|
1522
|
-
/**
|
|
1523
|
-
* Validates and parses the API response data against a schema.
|
|
1524
|
-
*/
|
|
1525
|
-
function parseResponse(schema, data) {
|
|
1526
|
-
const result = safeParse(schema, data);
|
|
1527
|
-
if (!result.success) throw new TeezValidationError("Response validation failed", {
|
|
1528
|
-
issues: toValidationIssues(result.error),
|
|
1529
|
-
data
|
|
1530
|
-
});
|
|
1531
|
-
return result.data;
|
|
1532
|
-
}
|
|
1533
|
-
|
|
1534
|
-
//#endregion
|
|
1535
|
-
//#region src/http/client.ts
|
|
1536
|
-
/**
|
|
1537
|
-
* Internal HTTP client for making API requests.
|
|
1538
|
-
*/
|
|
1539
|
-
var HttpClient = class {
|
|
1540
|
-
/**
|
|
1541
|
-
* Client configuration.
|
|
1542
|
-
*/
|
|
1543
|
-
config;
|
|
1544
|
-
/**
|
|
1545
|
-
* Headers to include in all requests.
|
|
1546
|
-
*/
|
|
1547
|
-
headers;
|
|
1548
|
-
/**
|
|
1549
|
-
* Initializes a new instance of the HttpClient.
|
|
1550
|
-
*/
|
|
1551
|
-
constructor(config) {
|
|
1552
|
-
this.config = config;
|
|
1553
|
-
this.headers = buildHeaders(config);
|
|
1554
|
-
}
|
|
1555
|
-
/**
|
|
1556
|
-
* Implementation of request method.
|
|
1557
|
-
*/
|
|
1558
|
-
async request({ path, params, headers: headersRaw, body: bodyRaw, ...options }, schema) {
|
|
1559
|
-
const url = buildUrl(path, this.config.baseUrl, params);
|
|
1560
|
-
const headers = mergeHeaders(this.headers, headersRaw);
|
|
1561
|
-
let body;
|
|
1562
|
-
if (bodyRaw !== void 0) {
|
|
1563
|
-
body = JSON.stringify(bodyRaw);
|
|
1564
|
-
if (!headers.has("Content-Type")) headers.set("Content-Type", "application/json");
|
|
1565
|
-
}
|
|
1566
|
-
const controller = new AbortController();
|
|
1567
|
-
const timeoutId = setTimeout(() => {
|
|
1568
|
-
controller.abort();
|
|
1569
|
-
}, this.config.timeout);
|
|
1570
|
-
try {
|
|
1571
|
-
const response = await fetch(url, {
|
|
1572
|
-
...options,
|
|
1573
|
-
headers,
|
|
1574
|
-
body,
|
|
1575
|
-
signal: controller.signal
|
|
1576
|
-
});
|
|
1577
|
-
if (!response.ok) {
|
|
1578
|
-
let errorBody;
|
|
1579
|
-
try {
|
|
1580
|
-
errorBody = await response.json();
|
|
1581
|
-
} catch {
|
|
1582
|
-
errorBody = await response.text().catch(() => void 0);
|
|
1583
|
-
}
|
|
1584
|
-
throw new TeezApiError(`API request failed: ${response.status} ${response.statusText}`, {
|
|
1585
|
-
url,
|
|
1586
|
-
status: response.status,
|
|
1587
|
-
statusText: response.statusText,
|
|
1588
|
-
body: errorBody
|
|
1589
|
-
});
|
|
1590
|
-
}
|
|
1591
|
-
if (response.status === 204) return;
|
|
1592
|
-
const data = await response.json();
|
|
1593
|
-
return schema != void 0 ? parseResponse(schema, data) : data;
|
|
1594
|
-
} catch (error) {
|
|
1595
|
-
if (error instanceof TeezError) throw error;
|
|
1596
|
-
if (error instanceof DOMException && error.name === "AbortError") throw new TeezTimeoutError(`Request timed out after ${this.config.timeout}ms`, {
|
|
1597
|
-
url,
|
|
1598
|
-
timeout: this.config.timeout,
|
|
1599
|
-
cause: error
|
|
1600
|
-
});
|
|
1601
|
-
throw new TeezNetworkError(`Network request failed`, {
|
|
1602
|
-
url,
|
|
1603
|
-
cause: error
|
|
1604
|
-
});
|
|
1605
|
-
} finally {
|
|
1606
|
-
clearTimeout(timeoutId);
|
|
1607
|
-
}
|
|
1608
|
-
}
|
|
1609
|
-
/**
|
|
1610
|
-
* Implementation of GET method.
|
|
1611
|
-
*/
|
|
1612
|
-
get(options, schema) {
|
|
1613
|
-
return schema != void 0 ? this.request({
|
|
1614
|
-
...options,
|
|
1615
|
-
method: "GET"
|
|
1616
|
-
}, schema) : this.request({
|
|
1617
|
-
...options,
|
|
1618
|
-
method: "GET"
|
|
1619
|
-
});
|
|
1620
|
-
}
|
|
1621
|
-
/**
|
|
1622
|
-
* Implementation of POST method.
|
|
1623
|
-
*/
|
|
1624
|
-
post(options, schema) {
|
|
1625
|
-
return schema != void 0 ? this.request({
|
|
1626
|
-
...options,
|
|
1627
|
-
method: "POST"
|
|
1628
|
-
}, schema) : this.request({
|
|
1629
|
-
...options,
|
|
1630
|
-
method: "POST"
|
|
1631
|
-
});
|
|
1632
|
-
}
|
|
1633
|
-
/**
|
|
1634
|
-
* Implementation of PATCH method.
|
|
1635
|
-
*/
|
|
1636
|
-
patch(options, schema) {
|
|
1637
|
-
return schema != void 0 ? this.request({
|
|
1638
|
-
...options,
|
|
1639
|
-
method: "PATCH"
|
|
1640
|
-
}, schema) : this.request({
|
|
1641
|
-
...options,
|
|
1642
|
-
method: "PATCH"
|
|
1643
|
-
});
|
|
1644
|
-
}
|
|
1645
|
-
/**
|
|
1646
|
-
* Implementation of DELETE method.
|
|
1647
|
-
*/
|
|
1648
|
-
delete(options, schema) {
|
|
1649
|
-
return schema != void 0 ? this.request({
|
|
1650
|
-
...options,
|
|
1651
|
-
method: "DELETE"
|
|
1652
|
-
}, schema) : this.request({
|
|
1653
|
-
...options,
|
|
1654
|
-
method: "DELETE"
|
|
1655
|
-
});
|
|
1656
|
-
}
|
|
1657
|
-
};
|
|
1658
|
-
|
|
1659
|
-
//#endregion
|
|
1660
|
-
//#region src/client.ts
|
|
1661
|
-
/**
|
|
1662
|
-
* Main client for interacting with the Teez B2C API.
|
|
1663
|
-
*
|
|
1664
|
-
* @example
|
|
1665
|
-
* const client = new TeezClient({
|
|
1666
|
-
* language: "ru",
|
|
1667
|
-
* timeout: 10000
|
|
1668
|
-
* });
|
|
1669
|
-
*/
|
|
1670
|
-
var TeezClient = class {
|
|
1671
|
-
/**
|
|
1672
|
-
* Configuration used by the client.
|
|
1673
|
-
*/
|
|
1674
|
-
config;
|
|
1675
|
-
/**
|
|
1676
|
-
* HTTP client for making requests.
|
|
1677
|
-
*/
|
|
1678
|
-
http;
|
|
1679
|
-
/**
|
|
1680
|
-
* API for authentication operations.
|
|
1681
|
-
*/
|
|
1682
|
-
auth;
|
|
1683
|
-
/**
|
|
1684
|
-
* API for retrieving banners.
|
|
1685
|
-
*/
|
|
1686
|
-
banners;
|
|
1687
|
-
/**
|
|
1688
|
-
* API for retrieving categories.
|
|
1689
|
-
*/
|
|
1690
|
-
categories;
|
|
1691
|
-
/**
|
|
1692
|
-
* API for retrieving collections.
|
|
1693
|
-
*/
|
|
1694
|
-
collections;
|
|
1695
|
-
/**
|
|
1696
|
-
* API for managing user favorites.
|
|
1697
|
-
*/
|
|
1698
|
-
favorites;
|
|
1699
|
-
/**
|
|
1700
|
-
* API for retrieving feature flags.
|
|
1701
|
-
*/
|
|
1702
|
-
featureFlags;
|
|
1703
|
-
/**
|
|
1704
|
-
* API for retrieving products.
|
|
1705
|
-
*/
|
|
1706
|
-
products;
|
|
1707
|
-
/**
|
|
1708
|
-
* API for retrieving promotions.
|
|
1709
|
-
*/
|
|
1710
|
-
promo;
|
|
1711
|
-
/**
|
|
1712
|
-
* API for retrieving shops.
|
|
1713
|
-
*/
|
|
1714
|
-
shops;
|
|
1715
|
-
/**
|
|
1716
|
-
* API for retrieving SKU details.
|
|
1717
|
-
*/
|
|
1718
|
-
sku;
|
|
1719
|
-
/**
|
|
1720
|
-
* API for user management operations.
|
|
1721
|
-
*/
|
|
1722
|
-
users;
|
|
1723
|
-
/**
|
|
1724
|
-
* Initializes a new instance of the TeezClient.
|
|
1725
|
-
*
|
|
1726
|
-
* @param config Optional client configuration.
|
|
1727
|
-
*/
|
|
1728
|
-
constructor(config) {
|
|
1729
|
-
this.config = resolveConfig(config);
|
|
1730
|
-
this.http = new HttpClient(this.config);
|
|
1731
|
-
this.auth = new AuthApi(this.http);
|
|
1732
|
-
this.banners = new BannersApi(this.http);
|
|
1733
|
-
this.categories = new CategoriesApi(this.http);
|
|
1734
|
-
this.collections = new CollectionsApi(this.http);
|
|
1735
|
-
this.favorites = new FavoritesApi(this.http);
|
|
1736
|
-
this.featureFlags = new FeatureFlagsApi(this.http);
|
|
1737
|
-
this.products = new ProductsApi(this.http);
|
|
1738
|
-
this.promo = new PromoApi(this.http);
|
|
1739
|
-
this.shops = new ShopsApi(this.http);
|
|
1740
|
-
this.sku = new SkuApi(this.http);
|
|
1741
|
-
this.users = new UsersApi(this.http);
|
|
1742
|
-
}
|
|
1743
|
-
/**
|
|
1744
|
-
* Returns the current client configuration.
|
|
1745
|
-
*/
|
|
1746
|
-
getConfig() {
|
|
1747
|
-
return this.config;
|
|
1748
|
-
}
|
|
1749
|
-
};
|
|
1750
|
-
|
|
1751
|
-
//#endregion
|
|
1752
|
-
export { AuthApi, AuthApiCheckTokenResponseSchema, AuthApiLoginResponseSchema, AuthApiVerifyResponseSchema, BASE_URL, BannerActionTypesSchema, BannerImageTypeSchema, BannersApi, BannersApiActionSchema, BannersApiBannerItemSchema, BannersApiImageSchema, BannersApiListResponseSchema, CategoriesApi, CategoriesApiGetParentsResponseItemSchema, CategoriesApiGetParentsResponseSchema, CategoriesApiGetResponseSchema, CategoriesApiListResponseItemSchema, CategoriesApiListResponseSchema, CollectionTypeSchema, CollectionsApi, CollectionsApiGetResponseSchema, CollectionsApiGetSkusResponseSchema, CollectionsApiListItemSchema, CollectionsApiListResponseSchema, CollectionsApiSkuItemSchema, CollectionsApiStockAvailabilitySchema, CollectionsStockAvailabilityTypeSchema, DEFAULT_APP_VERSION, DEFAULT_CONFIG, FavoritesApi, FavoritesApiAddResponseSchema, FavoritesApiBadgeSchema, FavoritesApiGetIdsResponseSchema, FavoritesApiItemSchema, FavoritesApiListResponseSchema, FavoritesApiRemoveResponseSchema, FavoritesApiStockAvailabilitySchema, FavoritesStockAvailabilityTypeSchema, FeatureFlagsApi, FeatureFlagsApiItemSchema, FeatureFlagsApiListResponseSchema, LANGUAGES, ProductSortKeySchema, ProductsApi, ProductsApiBadgeSchema, ProductsApiGetReviewsResponseSchema, ProductsApiGetSortOptionsResponseSchema, ProductsApiListResponseSchema, ProductsApiProductItemSchema, ProductsApiReviewItemSchema, ProductsApiSortOptionSchema, ProductsApiStockAvailabilitySchema, ProductsStockAvailabilityTypeSchema, PromoApi, PromoApiItemSchema, PromoApiListResponseSchema, ShopsApi, ShopsApiContactInfoSchema, ShopsApiGetMonobrandResponseSchema, ShopsApiGetProductsResponseSchema, ShopsApiGetResponseSchema, ShopsApiProductItemSchema, ShopsApiShopItemSchema, ShopsApiStockAvailabilitySchema, ShopsApiTagSchema, ShopsStockAvailabilityTypeSchema, SkuApi, SkuApiAttributePropertySchema, SkuApiAttributePropertyValueSchema, SkuApiAttributeSchema, SkuApiBrandSchema, SkuApiCategorySchema, SkuApiCollectionItemSchema, SkuApiGetCollectionsResponseSchema, SkuApiGetResponseSchema, SkuApiGetReviewAvailableResponseSchema, SkuApiGetSimilarResponseSchema, SkuApiInstallmentSchema, SkuApiShopSchema, SkuApiSimilarItemSchema, SkuApiStockAvailabilitySchema, SkuApiTagSchema, SkuStockAvailabilityTypeSchema, TeezApiError, TeezClient, TeezError, TeezNetworkError, TeezTimeoutError, TeezValidationError, UsersApi, UsersApiLanguageEnumSchema, UsersApiRegisterDeviceResponseSchema, UsersApiUpdateLanguageResponseSchema, buildHeaders, buildUserAgent, resolveConfig };
|
|
1753
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
import { apiErrorResponseSchema } from "./contracts/api-error-response.mjs";
|
|
2
|
+
import { getObjectSchemaKeys, isObjectSchema } from "./schema/object-schema.mjs";
|
|
3
|
+
import { isHttpSuccessStatus } from "./http-operation/status.mjs";
|
|
4
|
+
import { defineHttpOperation } from "./http-operation/define.mjs";
|
|
5
|
+
import { emptyResponse, response } from "./http-operation/response-helpers.mjs";
|
|
6
|
+
import { authLoginOperation } from "./api/auth/login/operation.mjs";
|
|
7
|
+
import { nullishToUndefined } from "./schema/nullish.mjs";
|
|
8
|
+
import { authVerifyOperation } from "./api/auth/verify/operation.mjs";
|
|
9
|
+
import { authCheckTokenOperation } from "./api/auth/check-token/operation.mjs";
|
|
10
|
+
import { authOperations } from "./api/auth/operations.mjs";
|
|
11
|
+
import { bannersListOperation } from "./api/banners/list/operation.mjs";
|
|
12
|
+
import { bannersOperations } from "./api/banners/operations.mjs";
|
|
13
|
+
import { categoriesListOperation } from "./api/categories/list/operation.mjs";
|
|
14
|
+
import { categoriesGetOperation } from "./api/categories/get/operation.mjs";
|
|
15
|
+
import { categoriesGetParentsOperation } from "./api/categories/get-parents/operation.mjs";
|
|
16
|
+
import { categoriesOperations } from "./api/categories/operations.mjs";
|
|
17
|
+
import { categoryFilterOptionSchema, categoryFilterSchema, categoryFilterTypesSchema } from "./contracts/filters/category.mjs";
|
|
18
|
+
import { rangeFilterOptionSchema, rangeFilterSchema, rangeTypeSchema } from "./contracts/filters/range.mjs";
|
|
19
|
+
import { filterSchema } from "./contracts/filters/filter.mjs";
|
|
20
|
+
import { createPaginationFields } from "./contracts/pagination.mjs";
|
|
21
|
+
import { collectionsGetSkusOperation } from "./api/collections/get-skus/operation.mjs";
|
|
22
|
+
import { collectionsListOperation } from "./api/collections/list/operation.mjs";
|
|
23
|
+
import { collectionsGetOperation } from "./api/collections/get/operation.mjs";
|
|
24
|
+
import { collectionsOperations } from "./api/collections/operations.mjs";
|
|
25
|
+
import { favoritesGetIdsOperation } from "./api/favorites/get-ids/operation.mjs";
|
|
26
|
+
import { favoritesAddOperation } from "./api/favorites/add/operation.mjs";
|
|
27
|
+
import { favoritesRemoveOperation } from "./api/favorites/remove/operation.mjs";
|
|
28
|
+
import { favoritesOperations } from "./api/favorites/operations.mjs";
|
|
29
|
+
import { featureFlagsListOperation } from "./api/feature-flags/list/operation.mjs";
|
|
30
|
+
import { featureFlagsOperations } from "./api/feature-flags/operations.mjs";
|
|
31
|
+
import { productsAutocompleteOperation } from "./api/products/autocomplete/operation.mjs";
|
|
32
|
+
import { productsGetSortOptionsOperation } from "./api/products/get-sort-options/operation.mjs";
|
|
33
|
+
import { productsListOperation } from "./api/products/list/operation.mjs";
|
|
34
|
+
import { productsGetReviewsOperation } from "./api/products/get-reviews/operation.mjs";
|
|
35
|
+
import { productsOperations } from "./api/products/operations.mjs";
|
|
36
|
+
import { promoListOperation } from "./api/promo/list/operation.mjs";
|
|
37
|
+
import { promoOperations } from "./api/promo/operations.mjs";
|
|
38
|
+
import { promocodesValidateOperation } from "./api/promocodes/validate/operation.mjs";
|
|
39
|
+
import { promocodesOperations } from "./api/promocodes/operations.mjs";
|
|
40
|
+
import { shopsGetOperation } from "./api/shops/get/operation.mjs";
|
|
41
|
+
import { shopsGetMonobrandOperation } from "./api/shops/get-monobrand/operation.mjs";
|
|
42
|
+
import { shopsGetProductsOperation } from "./api/shops/get-products/operation.mjs";
|
|
43
|
+
import { shopsOperations } from "./api/shops/operations.mjs";
|
|
44
|
+
import { skuGetOperation } from "./api/sku/get/operation.mjs";
|
|
45
|
+
import { skuGetSimilarOperation } from "./api/sku/get-similar/operation.mjs";
|
|
46
|
+
import { skuGetCollectionsOperation } from "./api/sku/get-collections/operation.mjs";
|
|
47
|
+
import { skuGetReviewAvailableOperation } from "./api/sku/get-review-available/operation.mjs";
|
|
48
|
+
import { skuOperations } from "./api/sku/operations.mjs";
|
|
49
|
+
import { usersUpdateLanguageOperation } from "./api/users/update-language/operation.mjs";
|
|
50
|
+
import { usersRegisterDeviceOperation } from "./api/users/register-device/operation.mjs";
|
|
51
|
+
import { usersOperations } from "./api/users/operations.mjs";
|
|
52
|
+
import { getTeezOperation, teezOperationList, teezOperations, teezOperationsByName } from "./registry.mjs";
|
|
53
|
+
import { isHttpOperationFlattenable } from "./http-operation/flattenability.mjs";
|
|
54
|
+
import { defaultAppVersion, defaultBaseUrl, defaultLanguage, defaultTimeoutMs } from "./config/defaults.mjs";
|
|
55
|
+
import { defaultConfig, resolveConfig } from "./config/resolve.mjs";
|
|
56
|
+
import { buildHeaders, buildUserAgent } from "./config/headers.mjs";
|
|
57
|
+
import { TeezError } from "./errors/teez-error.mjs";
|
|
58
|
+
import { TeezApiError } from "./errors/teez-api-error.mjs";
|
|
59
|
+
import { TeezNetworkError } from "./errors/teez-network-error.mjs";
|
|
60
|
+
import { TeezTimeoutError } from "./errors/teez-timeout-error.mjs";
|
|
61
|
+
import { TeezValidationError } from "./errors/teez-validation-error.mjs";
|
|
62
|
+
import { createRuntime } from "./sdk/runtime.mjs";
|
|
63
|
+
import { createTeezClient, createTeezClientFromOperations } from "./sdk/create-client.mjs";
|
|
64
|
+
import { supportedLanguages } from "./language.mjs";
|
|
65
|
+
import { getOperationApiError, isOperationApiError } from "./http-operation/api-error.mjs";
|
|
66
|
+
export { TeezApiError, TeezError, TeezNetworkError, TeezTimeoutError, TeezValidationError, apiErrorResponseSchema, authCheckTokenOperation, authLoginOperation, authOperations, authVerifyOperation, bannersListOperation, bannersOperations, buildHeaders, buildUserAgent, categoriesGetOperation, categoriesGetParentsOperation, categoriesListOperation, categoriesOperations, categoryFilterOptionSchema, categoryFilterSchema, categoryFilterTypesSchema, collectionsGetOperation, collectionsGetSkusOperation, collectionsListOperation, collectionsOperations, createPaginationFields, createRuntime, createTeezClient, createTeezClientFromOperations, defaultAppVersion, defaultBaseUrl, defaultConfig, defaultLanguage, defaultTimeoutMs, defineHttpOperation, emptyResponse, favoritesAddOperation, favoritesGetIdsOperation, favoritesOperations, favoritesRemoveOperation, featureFlagsListOperation, featureFlagsOperations, filterSchema, getObjectSchemaKeys, getOperationApiError, getTeezOperation, isHttpOperationFlattenable, isHttpSuccessStatus, isObjectSchema, isOperationApiError, nullishToUndefined, productsAutocompleteOperation, productsGetReviewsOperation, productsGetSortOptionsOperation, productsListOperation, productsOperations, promoListOperation, promoOperations, promocodesOperations, promocodesValidateOperation, rangeFilterOptionSchema, rangeFilterSchema, rangeTypeSchema, resolveConfig, response, shopsGetMonobrandOperation, shopsGetOperation, shopsGetProductsOperation, shopsOperations, skuGetCollectionsOperation, skuGetOperation, skuGetReviewAvailableOperation, skuGetSimilarOperation, skuOperations, supportedLanguages, teezOperationList, teezOperations, teezOperationsByName, usersOperations, usersRegisterDeviceOperation, usersUpdateLanguageOperation };
|