qeai-sdk 2.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/dist/constants/auth-commands.constant.d.ts +25 -0
- package/dist/constants/auth-commands.constant.js +25 -0
- package/dist/constants/category-commands.constant.d.ts +35 -0
- package/dist/constants/category-commands.constant.js +35 -0
- package/dist/constants/chain-commands.constant.d.ts +35 -0
- package/dist/constants/chain-commands.constant.js +35 -0
- package/dist/constants/index.d.ts +29 -0
- package/dist/constants/index.js +39 -0
- package/dist/constants/ingredient-commands.constant.d.ts +38 -0
- package/dist/constants/ingredient-commands.constant.js +38 -0
- package/dist/constants/order-commands.constant.d.ts +34 -0
- package/dist/constants/order-commands.constant.js +34 -0
- package/dist/constants/payment-commands.constant.d.ts +31 -0
- package/dist/constants/payment-commands.constant.js +31 -0
- package/dist/constants/payment-events.constant.d.ts +17 -0
- package/dist/constants/payment-events.constant.js +17 -0
- package/dist/constants/product-commands.constant.d.ts +119 -0
- package/dist/constants/product-commands.constant.js +126 -0
- package/dist/constants/product-events.constant.d.ts +32 -0
- package/dist/constants/product-events.constant.js +32 -0
- package/dist/constants/question-commands.constant.d.ts +43 -0
- package/dist/constants/question-commands.constant.js +43 -0
- package/dist/constants/restaurant-commands.constant.d.ts +33 -0
- package/dist/constants/restaurant-commands.constant.js +33 -0
- package/dist/constants/tag-commands.constant.d.ts +44 -0
- package/dist/constants/tag-commands.constant.js +44 -0
- package/dist/dtos/auth/index.d.ts +10 -0
- package/dist/dtos/auth/index.js +10 -0
- package/dist/dtos/auth/login-user.dto.d.ts +24 -0
- package/dist/dtos/auth/login-user.dto.js +44 -0
- package/dist/dtos/auth/register-user.dto.d.ts +30 -0
- package/dist/dtos/auth/register-user.dto.js +56 -0
- package/dist/dtos/categories/create-category.dto.d.ts +38 -0
- package/dist/dtos/categories/create-category.dto.js +69 -0
- package/dist/dtos/categories/delete-category.dto.d.ts +24 -0
- package/dist/dtos/categories/delete-category.dto.js +44 -0
- package/dist/dtos/categories/index.d.ts +11 -0
- package/dist/dtos/categories/index.js +11 -0
- package/dist/dtos/categories/update-category.dto.d.ts +26 -0
- package/dist/dtos/categories/update-category.dto.js +48 -0
- package/dist/dtos/chain/create-chain.dto.d.ts +43 -0
- package/dist/dtos/chain/create-chain.dto.js +75 -0
- package/dist/dtos/chain/delete-chain.dto.d.ts +24 -0
- package/dist/dtos/chain/delete-chain.dto.js +44 -0
- package/dist/dtos/chain/index.d.ts +11 -0
- package/dist/dtos/chain/index.js +11 -0
- package/dist/dtos/chain/update-chain.dto.d.ts +26 -0
- package/dist/dtos/chain/update-chain.dto.js +48 -0
- package/dist/dtos/common/index.d.ts +9 -0
- package/dist/dtos/common/index.js +9 -0
- package/dist/dtos/common/pagination.dto.d.ts +27 -0
- package/dist/dtos/common/pagination.dto.js +50 -0
- package/dist/dtos/index.d.ts +28 -0
- package/dist/dtos/index.js +40 -0
- package/dist/dtos/ingredients/create-ingredient.dto.d.ts +31 -0
- package/dist/dtos/ingredients/create-ingredient.dto.js +58 -0
- package/dist/dtos/ingredients/delete-ingredient.dto.d.ts +24 -0
- package/dist/dtos/ingredients/delete-ingredient.dto.js +44 -0
- package/dist/dtos/ingredients/index.d.ts +12 -0
- package/dist/dtos/ingredients/index.js +12 -0
- package/dist/dtos/ingredients/search-by-name.dto.d.ts +18 -0
- package/dist/dtos/ingredients/search-by-name.dto.js +33 -0
- package/dist/dtos/ingredients/update-ingredient.dto.d.ts +26 -0
- package/dist/dtos/ingredients/update-ingredient.dto.js +48 -0
- package/dist/dtos/orders/change-order-status.dto.d.ts +25 -0
- package/dist/dtos/orders/change-order-status.dto.js +43 -0
- package/dist/dtos/orders/create-order.dto.d.ts +62 -0
- package/dist/dtos/orders/create-order.dto.js +111 -0
- package/dist/dtos/orders/index.d.ts +14 -0
- package/dist/dtos/orders/index.js +14 -0
- package/dist/dtos/orders/order-item.dto.d.ts +65 -0
- package/dist/dtos/orders/order-item.dto.js +120 -0
- package/dist/dtos/orders/order-pagination.dto.d.ts +19 -0
- package/dist/dtos/orders/order-pagination.dto.js +34 -0
- package/dist/dtos/orders/paid-order.dto.d.ts +30 -0
- package/dist/dtos/orders/paid-order.dto.js +54 -0
- package/dist/dtos/orders/update-order.dto.d.ts +13 -0
- package/dist/dtos/orders/update-order.dto.js +13 -0
- package/dist/dtos/payments/index.d.ts +11 -0
- package/dist/dtos/payments/index.js +11 -0
- package/dist/dtos/payments/payment-session-item.dto.d.ts +70 -0
- package/dist/dtos/payments/payment-session-item.dto.js +129 -0
- package/dist/dtos/payments/payment-session.dto.d.ts +63 -0
- package/dist/dtos/payments/payment-session.dto.js +111 -0
- package/dist/dtos/payments/webhook-data.dto.d.ts +39 -0
- package/dist/dtos/payments/webhook-data.dto.js +68 -0
- package/dist/dtos/products/create-product.dto.d.ts +54 -0
- package/dist/dtos/products/create-product.dto.js +99 -0
- package/dist/dtos/products/delete-product.dto.d.ts +24 -0
- package/dist/dtos/products/delete-product.dto.js +44 -0
- package/dist/dtos/products/index.d.ts +12 -0
- package/dist/dtos/products/index.js +13 -0
- package/dist/dtos/products/submodules/index.d.ts +6 -0
- package/dist/dtos/products/submodules/index.js +7 -0
- package/dist/dtos/products/submodules/product-image/bulk-create-product-image.dto.d.ts +26 -0
- package/dist/dtos/products/submodules/product-image/bulk-create-product-image.dto.js +50 -0
- package/dist/dtos/products/submodules/product-image/create-product-image.dto.d.ts +32 -0
- package/dist/dtos/products/submodules/product-image/create-product-image.dto.js +59 -0
- package/dist/dtos/products/submodules/product-image/index.d.ts +12 -0
- package/dist/dtos/products/submodules/product-image/index.js +12 -0
- package/dist/dtos/products/submodules/product-image/set-primary-image.dto.d.ts +24 -0
- package/dist/dtos/products/submodules/product-image/set-primary-image.dto.js +46 -0
- package/dist/dtos/products/submodules/product-image/update-product-image.dto.d.ts +30 -0
- package/dist/dtos/products/submodules/product-image/update-product-image.dto.js +57 -0
- package/dist/dtos/products/submodules/product-question/create-product-question.dto.d.ts +40 -0
- package/dist/dtos/products/submodules/product-question/create-product-question.dto.js +76 -0
- package/dist/dtos/products/submodules/product-question/find-by-product-id-and-type.dto.d.ts +25 -0
- package/dist/dtos/products/submodules/product-question/find-by-product-id-and-type.dto.js +47 -0
- package/dist/dtos/products/submodules/product-question/index.d.ts +12 -0
- package/dist/dtos/products/submodules/product-question/index.js +12 -0
- package/dist/dtos/products/submodules/product-question/replace-by-product-id.dto.d.ts +27 -0
- package/dist/dtos/products/submodules/product-question/replace-by-product-id.dto.js +51 -0
- package/dist/dtos/products/submodules/product-question/update-product-question.dto.d.ts +32 -0
- package/dist/dtos/products/submodules/product-question/update-product-question.dto.js +63 -0
- package/dist/dtos/products/submodules/product-recipe/create-product-recipe.dto.d.ts +38 -0
- package/dist/dtos/products/submodules/product-recipe/create-product-recipe.dto.js +70 -0
- package/dist/dtos/products/submodules/product-recipe/index.d.ts +11 -0
- package/dist/dtos/products/submodules/product-recipe/index.js +11 -0
- package/dist/dtos/products/submodules/product-recipe/replace-by-product-id.dto.d.ts +27 -0
- package/dist/dtos/products/submodules/product-recipe/replace-by-product-id.dto.js +51 -0
- package/dist/dtos/products/submodules/product-recipe/update-product-recipe.dto.d.ts +37 -0
- package/dist/dtos/products/submodules/product-recipe/update-product-recipe.dto.js +71 -0
- package/dist/dtos/products/submodules/product-schedule/create-product-schedule.dto.d.ts +38 -0
- package/dist/dtos/products/submodules/product-schedule/create-product-schedule.dto.js +78 -0
- package/dist/dtos/products/submodules/product-schedule/index.d.ts +12 -0
- package/dist/dtos/products/submodules/product-schedule/index.js +12 -0
- package/dist/dtos/products/submodules/product-schedule/is-available-at-time.dto.d.ts +31 -0
- package/dist/dtos/products/submodules/product-schedule/is-available-at-time.dto.js +60 -0
- package/dist/dtos/products/submodules/product-schedule/replace-by-product-id.dto.d.ts +27 -0
- package/dist/dtos/products/submodules/product-schedule/replace-by-product-id.dto.js +51 -0
- package/dist/dtos/products/submodules/product-schedule/update-product-schedule.dto.d.ts +38 -0
- package/dist/dtos/products/submodules/product-schedule/update-product-schedule.dto.js +79 -0
- package/dist/dtos/products/submodules/product-size/create-product-size.dto.d.ts +39 -0
- package/dist/dtos/products/submodules/product-size/create-product-size.dto.js +73 -0
- package/dist/dtos/products/submodules/product-size/index.d.ts +12 -0
- package/dist/dtos/products/submodules/product-size/index.js +12 -0
- package/dist/dtos/products/submodules/product-size/product-size-data.dto.d.ts +32 -0
- package/dist/dtos/products/submodules/product-size/product-size-data.dto.js +60 -0
- package/dist/dtos/products/submodules/product-size/replace-by-product-id.dto.d.ts +27 -0
- package/dist/dtos/products/submodules/product-size/replace-by-product-id.dto.js +51 -0
- package/dist/dtos/products/submodules/product-size/update-product-size.dto.d.ts +37 -0
- package/dist/dtos/products/submodules/product-size/update-product-size.dto.js +72 -0
- package/dist/dtos/products/submodules/product-tag/create-product-tag.dto.d.ts +24 -0
- package/dist/dtos/products/submodules/product-tag/create-product-tag.dto.js +46 -0
- package/dist/dtos/products/submodules/product-tag/find-product-tag.dto.d.ts +24 -0
- package/dist/dtos/products/submodules/product-tag/find-product-tag.dto.js +46 -0
- package/dist/dtos/products/submodules/product-tag/index.d.ts +12 -0
- package/dist/dtos/products/submodules/product-tag/index.js +12 -0
- package/dist/dtos/products/submodules/product-tag/remove-product-tag.dto.d.ts +24 -0
- package/dist/dtos/products/submodules/product-tag/remove-product-tag.dto.js +46 -0
- package/dist/dtos/products/submodules/product-tag/replace-by-product-id.dto.d.ts +26 -0
- package/dist/dtos/products/submodules/product-tag/replace-by-product-id.dto.js +48 -0
- package/dist/dtos/products/update-product.dto.d.ts +27 -0
- package/dist/dtos/products/update-product.dto.js +48 -0
- package/dist/dtos/questions/create-question.dto.d.ts +54 -0
- package/dist/dtos/questions/create-question.dto.js +96 -0
- package/dist/dtos/questions/delete-question.dto.d.ts +24 -0
- package/dist/dtos/questions/delete-question.dto.js +44 -0
- package/dist/dtos/questions/index.d.ts +12 -0
- package/dist/dtos/questions/index.js +12 -0
- package/dist/dtos/questions/search-by-name.dto.d.ts +18 -0
- package/dist/dtos/questions/search-by-name.dto.js +33 -0
- package/dist/dtos/questions/update-question.dto.d.ts +26 -0
- package/dist/dtos/questions/update-question.dto.js +48 -0
- package/dist/dtos/restaurants/create-restaurant.dto.d.ts +57 -0
- package/dist/dtos/restaurants/create-restaurant.dto.js +100 -0
- package/dist/dtos/restaurants/delete-restaurant.dto.d.ts +24 -0
- package/dist/dtos/restaurants/delete-restaurant.dto.js +44 -0
- package/dist/dtos/restaurants/index.d.ts +11 -0
- package/dist/dtos/restaurants/index.js +11 -0
- package/dist/dtos/restaurants/update-restaurant.dto.d.ts +26 -0
- package/dist/dtos/restaurants/update-restaurant.dto.js +48 -0
- package/dist/dtos/tags/create-tag.dto.d.ts +24 -0
- package/dist/dtos/tags/create-tag.dto.js +46 -0
- package/dist/dtos/tags/delete-tag.dto.d.ts +24 -0
- package/dist/dtos/tags/delete-tag.dto.js +44 -0
- package/dist/dtos/tags/index.d.ts +12 -0
- package/dist/dtos/tags/index.js +12 -0
- package/dist/dtos/tags/search-by-name.dto.d.ts +18 -0
- package/dist/dtos/tags/search-by-name.dto.js +33 -0
- package/dist/dtos/tags/update-tag.dto.d.ts +26 -0
- package/dist/dtos/tags/update-tag.dto.js +48 -0
- package/dist/dtos/translations/create-translation.dto.d.ts +36 -0
- package/dist/dtos/translations/create-translation.dto.js +74 -0
- package/dist/dtos/translations/delete-translation.dto.d.ts +10 -0
- package/dist/dtos/translations/delete-translation.dto.js +25 -0
- package/dist/dtos/translations/find-translations-by-entity.dto.d.ts +16 -0
- package/dist/dtos/translations/find-translations-by-entity.dto.js +35 -0
- package/dist/dtos/translations/index.d.ts +4 -0
- package/dist/dtos/translations/index.js +4 -0
- package/dist/dtos/translations/update-translation.dto.d.ts +12 -0
- package/dist/dtos/translations/update-translation.dto.js +27 -0
- package/dist/enums/auth-provider.enum.d.ts +68 -0
- package/dist/enums/auth-provider.enum.js +69 -0
- package/dist/enums/currency.enum.d.ts +21 -0
- package/dist/enums/currency.enum.js +22 -0
- package/dist/enums/http-status-code.enum.d.ts +78 -0
- package/dist/enums/http-status-code.enum.js +84 -0
- package/dist/enums/http-status-text.enum.d.ts +91 -0
- package/dist/enums/http-status-text.enum.js +92 -0
- package/dist/enums/index.d.ts +12 -0
- package/dist/enums/index.js +12 -0
- package/dist/enums/language-code.enum.d.ts +19 -0
- package/dist/enums/language-code.enum.js +20 -0
- package/dist/enums/order-status.enum.d.ts +68 -0
- package/dist/enums/order-status.enum.js +69 -0
- package/dist/enums/order-type.enum.d.ts +45 -0
- package/dist/enums/order-type.enum.js +46 -0
- package/dist/enums/product-status.enum.d.ts +55 -0
- package/dist/enums/product-status.enum.js +56 -0
- package/dist/enums/question-product-type.enum.d.ts +37 -0
- package/dist/enums/question-product-type.enum.js +38 -0
- package/dist/enums/question-type.enum.d.ts +52 -0
- package/dist/enums/question-type.enum.js +53 -0
- package/dist/enums/role.enum.d.ts +67 -0
- package/dist/enums/role.enum.js +68 -0
- package/dist/enums/translation-entity-type.enum.d.ts +42 -0
- package/dist/enums/translation-entity-type.enum.js +43 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5 -0
- package/dist/interfaces/auth/access-token.interface.d.ts +24 -0
- package/dist/interfaces/auth/access-token.interface.js +1 -0
- package/dist/interfaces/auth/access-user.interface.d.ts +17 -0
- package/dist/interfaces/auth/access-user.interface.js +1 -0
- package/dist/interfaces/auth/account.interface.d.ts +85 -0
- package/dist/interfaces/auth/account.interface.js +1 -0
- package/dist/interfaces/auth/full-token.interface.d.ts +12 -0
- package/dist/interfaces/auth/full-token.interface.js +1 -0
- package/dist/interfaces/auth/index.d.ts +17 -0
- package/dist/interfaces/auth/index.js +18 -0
- package/dist/interfaces/auth/payload-jwt.interface.d.ts +39 -0
- package/dist/interfaces/auth/payload-jwt.interface.js +1 -0
- package/dist/interfaces/auth/refresh-token.interface.d.ts +25 -0
- package/dist/interfaces/auth/refresh-token.interface.js +1 -0
- package/dist/interfaces/auth/responses/auth-response.interface.d.ts +37 -0
- package/dist/interfaces/auth/responses/auth-response.interface.js +1 -0
- package/dist/interfaces/auth/responses/index.d.ts +2 -0
- package/dist/interfaces/auth/responses/index.js +2 -0
- package/dist/interfaces/auth/responses/refresh-token-response.interface.d.ts +29 -0
- package/dist/interfaces/auth/responses/refresh-token-response.interface.js +1 -0
- package/dist/interfaces/auth/user.interface.d.ts +53 -0
- package/dist/interfaces/auth/user.interface.js +1 -0
- package/dist/interfaces/auth/validate-user.interface.d.ts +36 -0
- package/dist/interfaces/auth/validate-user.interface.js +1 -0
- package/dist/interfaces/categories/categories-list-response.interface.d.ts +17 -0
- package/dist/interfaces/categories/categories-list-response.interface.js +1 -0
- package/dist/interfaces/categories/category-response.interface.d.ts +16 -0
- package/dist/interfaces/categories/category-response.interface.js +1 -0
- package/dist/interfaces/categories/category.interface.d.ts +76 -0
- package/dist/interfaces/categories/category.interface.js +1 -0
- package/dist/interfaces/categories/index.d.ts +11 -0
- package/dist/interfaces/categories/index.js +11 -0
- package/dist/interfaces/chains/chain-response.interface.d.ts +16 -0
- package/dist/interfaces/chains/chain-response.interface.js +1 -0
- package/dist/interfaces/chains/chain.interface.d.ts +79 -0
- package/dist/interfaces/chains/chain.interface.js +1 -0
- package/dist/interfaces/chains/chains-list-response.interface.d.ts +17 -0
- package/dist/interfaces/chains/chains-list-response.interface.js +1 -0
- package/dist/interfaces/chains/index.d.ts +11 -0
- package/dist/interfaces/chains/index.js +11 -0
- package/dist/interfaces/common/api-error-response.interface.d.ts +26 -0
- package/dist/interfaces/common/api-error-response.interface.js +1 -0
- package/dist/interfaces/common/api-error.interface.d.ts +43 -0
- package/dist/interfaces/common/api-error.interface.js +1 -0
- package/dist/interfaces/common/api-pagination-response.interface.d.ts +9 -0
- package/dist/interfaces/common/api-pagination-response.interface.js +1 -0
- package/dist/interfaces/common/api-response.interface.d.ts +36 -0
- package/dist/interfaces/common/api-response.interface.js +1 -0
- package/dist/interfaces/common/index.d.ts +13 -0
- package/dist/interfaces/common/index.js +13 -0
- package/dist/interfaces/common/rpc-error.interface.d.ts +36 -0
- package/dist/interfaces/common/rpc-error.interface.js +1 -0
- package/dist/interfaces/index.d.ts +30 -0
- package/dist/interfaces/index.js +42 -0
- package/dist/interfaces/ingredients/index.d.ts +11 -0
- package/dist/interfaces/ingredients/index.js +11 -0
- package/dist/interfaces/ingredients/ingredient-response.interface.d.ts +16 -0
- package/dist/interfaces/ingredients/ingredient-response.interface.js +1 -0
- package/dist/interfaces/ingredients/ingredient.interface.d.ts +79 -0
- package/dist/interfaces/ingredients/ingredient.interface.js +1 -0
- package/dist/interfaces/ingredients/ingredients-list-response.interface.d.ts +17 -0
- package/dist/interfaces/ingredients/ingredients-list-response.interface.js +1 -0
- package/dist/interfaces/orders/index.d.ts +14 -0
- package/dist/interfaces/orders/index.js +15 -0
- package/dist/interfaces/orders/order-created.interface.d.ts +46 -0
- package/dist/interfaces/orders/order-created.interface.js +1 -0
- package/dist/interfaces/orders/order-creation-strategy.interface.d.ts +17 -0
- package/dist/interfaces/orders/order-creation-strategy.interface.js +1 -0
- package/dist/interfaces/orders/order-item.interface.d.ts +70 -0
- package/dist/interfaces/orders/order-item.interface.js +1 -0
- package/dist/interfaces/orders/order-with-products.interface.d.ts +34 -0
- package/dist/interfaces/orders/order-with-products.interface.js +1 -0
- package/dist/interfaces/orders/order.interface.d.ts +114 -0
- package/dist/interfaces/orders/order.interface.js +1 -0
- package/dist/interfaces/orders/responses/change-order-status-response.interface.d.ts +5 -0
- package/dist/interfaces/orders/responses/change-order-status-response.interface.js +1 -0
- package/dist/interfaces/orders/responses/create-order-response.interface.d.ts +7 -0
- package/dist/interfaces/orders/responses/create-order-response.interface.js +1 -0
- package/dist/interfaces/orders/responses/index.d.ts +4 -0
- package/dist/interfaces/orders/responses/index.js +4 -0
- package/dist/interfaces/orders/responses/order-with-products-response.interface.d.ts +5 -0
- package/dist/interfaces/orders/responses/order-with-products-response.interface.js +1 -0
- package/dist/interfaces/orders/responses/orders-list-response.interface.d.ts +6 -0
- package/dist/interfaces/orders/responses/orders-list-response.interface.js +1 -0
- package/dist/interfaces/payments/audit-storage-strategy.interface.d.ts +19 -0
- package/dist/interfaces/payments/audit-storage-strategy.interface.js +1 -0
- package/dist/interfaces/payments/culqi-session-response.interface.d.ts +7 -0
- package/dist/interfaces/payments/culqi-session-response.interface.js +1 -0
- package/dist/interfaces/payments/index.d.ts +17 -0
- package/dist/interfaces/payments/index.js +18 -0
- package/dist/interfaces/payments/payment-audit-data.interface.d.ts +81 -0
- package/dist/interfaces/payments/payment-audit-data.interface.js +1 -0
- package/dist/interfaces/payments/payment-method-config.interface.d.ts +86 -0
- package/dist/interfaces/payments/payment-method-config.interface.js +1 -0
- package/dist/interfaces/payments/payment-provider.interface.d.ts +27 -0
- package/dist/interfaces/payments/payment-provider.interface.js +1 -0
- package/dist/interfaces/payments/payment-session-item.interface.d.ts +30 -0
- package/dist/interfaces/payments/payment-session-item.interface.js +1 -0
- package/dist/interfaces/payments/payment-succeeded-payload.interface.d.ts +29 -0
- package/dist/interfaces/payments/payment-succeeded-payload.interface.js +1 -0
- package/dist/interfaces/payments/responses/payment-callback-response.interface.d.ts +8 -0
- package/dist/interfaces/payments/responses/payment-callback-response.interface.js +1 -0
- package/dist/interfaces/payments/stripe-session-response.interface.d.ts +29 -0
- package/dist/interfaces/payments/stripe-session-response.interface.js +1 -0
- package/dist/interfaces/products/index.d.ts +16 -0
- package/dist/interfaces/products/index.js +17 -0
- package/dist/interfaces/products/product-image.interface.d.ts +55 -0
- package/dist/interfaces/products/product-image.interface.js +1 -0
- package/dist/interfaces/products/product-recipe.interface.d.ts +50 -0
- package/dist/interfaces/products/product-recipe.interface.js +1 -0
- package/dist/interfaces/products/product-schedule.interface.d.ts +45 -0
- package/dist/interfaces/products/product-schedule.interface.js +1 -0
- package/dist/interfaces/products/product-size.interface.d.ts +62 -0
- package/dist/interfaces/products/product-size.interface.js +1 -0
- package/dist/interfaces/products/product-tag.interface.d.ts +28 -0
- package/dist/interfaces/products/product-tag.interface.js +1 -0
- package/dist/interfaces/products/product-translation.interface.d.ts +43 -0
- package/dist/interfaces/products/product-translation.interface.js +1 -0
- package/dist/interfaces/products/product.interface.d.ts +113 -0
- package/dist/interfaces/products/product.interface.js +1 -0
- package/dist/interfaces/products/response/complete-product-response.interface.d.ts +5 -0
- package/dist/interfaces/products/response/complete-product-response.interface.js +1 -0
- package/dist/interfaces/products/response/index.d.ts +6 -0
- package/dist/interfaces/products/response/index.js +6 -0
- package/dist/interfaces/products/response/product-response.interface.d.ts +5 -0
- package/dist/interfaces/products/response/product-response.interface.js +1 -0
- package/dist/interfaces/products/response/products-list-response.interface.d.ts +6 -0
- package/dist/interfaces/products/response/products-list-response.interface.js +1 -0
- package/dist/interfaces/products/response/simple-product-response.interface.d.ts +3 -0
- package/dist/interfaces/products/response/simple-product-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/create-tag-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/create-tag-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/delete-sub-resource-response.interface.d.ts +9 -0
- package/dist/interfaces/products/response/sub-resources/delete-sub-resource-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/find-product-image-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/find-product-image-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/find-product-question-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/find-product-question-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/find-product-recipe-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/find-product-recipe-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/find-product-schedule-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/find-product-schedule-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/find-product-size-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/find-product-size-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/find-product-tag-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/find-product-tag-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/find-sub-resource-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/find-sub-resource-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/index.d.ts +25 -0
- package/dist/interfaces/products/response/sub-resources/index.js +25 -0
- package/dist/interfaces/products/response/sub-resources/list-product-images-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/list-product-images-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/list-product-questions-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/list-product-questions-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/list-product-recipes-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/list-product-recipes-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/list-product-schedules-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/list-product-schedules-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/list-product-sizes-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/list-product-sizes-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/list-sub-resource-response.interface.d.ts +8 -0
- package/dist/interfaces/products/response/sub-resources/list-sub-resource-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/product-schedule-availability.interface.d.ts +7 -0
- package/dist/interfaces/products/response/sub-resources/product-schedule-availability.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/question-relationship.interface.d.ts +7 -0
- package/dist/interfaces/products/response/sub-resources/question-relationship.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/recipe-relationship.interface.d.ts +9 -0
- package/dist/interfaces/products/response/sub-resources/recipe-relationship.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/replace-sub-products-response.interface.d.ts +9 -0
- package/dist/interfaces/products/response/sub-resources/replace-sub-products-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/sub-resource-response.interface.d.ts +10 -0
- package/dist/interfaces/products/response/sub-resources/sub-resource-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/write-image-response.interface.d.ts +12 -0
- package/dist/interfaces/products/response/sub-resources/write-image-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/write-question-product-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/write-question-product-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/write-recipe-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/write-recipe-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/write-schedule-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/write-schedule-response.interface.js +1 -0
- package/dist/interfaces/products/response/sub-resources/write-size-response.interface.d.ts +4 -0
- package/dist/interfaces/products/response/sub-resources/write-size-response.interface.js +1 -0
- package/dist/interfaces/questions/index.d.ts +3 -0
- package/dist/interfaces/questions/index.js +3 -0
- package/dist/interfaces/questions/question-response.interface.d.ts +16 -0
- package/dist/interfaces/questions/question-response.interface.js +1 -0
- package/dist/interfaces/questions/question.interface.d.ts +15 -0
- package/dist/interfaces/questions/question.interface.js +1 -0
- package/dist/interfaces/questions/questions-list-response.interface.d.ts +17 -0
- package/dist/interfaces/questions/questions-list-response.interface.js +1 -0
- package/dist/interfaces/restaurants/index.d.ts +11 -0
- package/dist/interfaces/restaurants/index.js +11 -0
- package/dist/interfaces/restaurants/restaurant-response.interface.d.ts +16 -0
- package/dist/interfaces/restaurants/restaurant-response.interface.js +1 -0
- package/dist/interfaces/restaurants/restaurant.interface.d.ts +96 -0
- package/dist/interfaces/restaurants/restaurant.interface.js +1 -0
- package/dist/interfaces/restaurants/restaurants-list-response.interface.d.ts +17 -0
- package/dist/interfaces/restaurants/restaurants-list-response.interface.js +1 -0
- package/dist/interfaces/tags/index.d.ts +11 -0
- package/dist/interfaces/tags/index.js +11 -0
- package/dist/interfaces/tags/tag-response.interface.d.ts +16 -0
- package/dist/interfaces/tags/tag-response.interface.js +1 -0
- package/dist/interfaces/tags/tag.interface.d.ts +64 -0
- package/dist/interfaces/tags/tag.interface.js +1 -0
- package/dist/interfaces/tags/tags-list-response.interface.d.ts +17 -0
- package/dist/interfaces/tags/tags-list-response.interface.js +1 -0
- package/dist/interfaces/translations/index.d.ts +11 -0
- package/dist/interfaces/translations/index.js +11 -0
- package/dist/interfaces/translations/translation-response.interface.d.ts +16 -0
- package/dist/interfaces/translations/translation-response.interface.js +1 -0
- package/dist/interfaces/translations/translation.interface.d.ts +77 -0
- package/dist/interfaces/translations/translation.interface.js +1 -0
- package/dist/interfaces/translations/translations-list-response.interface.d.ts +16 -0
- package/dist/interfaces/translations/translations-list-response.interface.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/order-mode.type.d.ts +14 -0
- package/dist/types/order-mode.type.js +1 -0
- package/package.json +27 -0
- package/tsconfig.json +25 -0
- package/tsconfig.node.json +9 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for setting the primary image of a product.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to designate which image
|
|
5
|
+
* should be displayed as the main product image.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class SetPrimaryImageDto {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier of the product.
|
|
12
|
+
* Must be a valid UUID and not be empty.
|
|
13
|
+
*
|
|
14
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
15
|
+
*/
|
|
16
|
+
productId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Unique identifier of the image to set as primary.
|
|
19
|
+
* Must be a valid UUID and not be empty.
|
|
20
|
+
*
|
|
21
|
+
* @example "770e8400-e29b-41d4-a716-446655440003"
|
|
22
|
+
*/
|
|
23
|
+
imageId: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsNotEmpty, IsUUID } from 'class-validator';
|
|
11
|
+
/**
|
|
12
|
+
* DTO for setting the primary image of a product.
|
|
13
|
+
*
|
|
14
|
+
* Used by the Products microservice to designate which image
|
|
15
|
+
* should be displayed as the main product image.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
*/
|
|
19
|
+
export class SetPrimaryImageDto {
|
|
20
|
+
/**
|
|
21
|
+
* Unique identifier of the product.
|
|
22
|
+
* Must be a valid UUID and not be empty.
|
|
23
|
+
*
|
|
24
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
25
|
+
*/
|
|
26
|
+
productId;
|
|
27
|
+
/**
|
|
28
|
+
* Unique identifier of the image to set as primary.
|
|
29
|
+
* Must be a valid UUID and not be empty.
|
|
30
|
+
*
|
|
31
|
+
* @example "770e8400-e29b-41d4-a716-446655440003"
|
|
32
|
+
*/
|
|
33
|
+
imageId;
|
|
34
|
+
}
|
|
35
|
+
__decorate([
|
|
36
|
+
IsString(),
|
|
37
|
+
IsNotEmpty({ message: 'Product ID is required' }),
|
|
38
|
+
IsUUID(),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], SetPrimaryImageDto.prototype, "productId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
IsString(),
|
|
43
|
+
IsNotEmpty({ message: 'Image ID is required' }),
|
|
44
|
+
IsUUID(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], SetPrimaryImageDto.prototype, "imageId", void 0);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for updating an existing product image.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to update image details.
|
|
5
|
+
* All fields are optional except the image ID.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class UpdateProductImageDto {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier of the image to update.
|
|
12
|
+
* Must be a valid UUID if provided.
|
|
13
|
+
*
|
|
14
|
+
* @example "770e8400-e29b-41d4-a716-446655440003"
|
|
15
|
+
*/
|
|
16
|
+
id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional image URL.
|
|
19
|
+
* Must be a valid URL format if provided.
|
|
20
|
+
*
|
|
21
|
+
* @example "https://example.com/images/product-123-updated.jpg"
|
|
22
|
+
*/
|
|
23
|
+
url?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional flag indicating whether this is the primary image.
|
|
26
|
+
*
|
|
27
|
+
* @example true
|
|
28
|
+
*/
|
|
29
|
+
isPrimary?: boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsOptional, IsBoolean, IsUrl, IsUUID } from 'class-validator';
|
|
11
|
+
/**
|
|
12
|
+
* DTO for updating an existing product image.
|
|
13
|
+
*
|
|
14
|
+
* Used by the Products microservice to update image details.
|
|
15
|
+
* All fields are optional except the image ID.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
*/
|
|
19
|
+
export class UpdateProductImageDto {
|
|
20
|
+
/**
|
|
21
|
+
* Unique identifier of the image to update.
|
|
22
|
+
* Must be a valid UUID if provided.
|
|
23
|
+
*
|
|
24
|
+
* @example "770e8400-e29b-41d4-a716-446655440003"
|
|
25
|
+
*/
|
|
26
|
+
id;
|
|
27
|
+
/**
|
|
28
|
+
* Optional image URL.
|
|
29
|
+
* Must be a valid URL format if provided.
|
|
30
|
+
*
|
|
31
|
+
* @example "https://example.com/images/product-123-updated.jpg"
|
|
32
|
+
*/
|
|
33
|
+
url;
|
|
34
|
+
/**
|
|
35
|
+
* Optional flag indicating whether this is the primary image.
|
|
36
|
+
*
|
|
37
|
+
* @example true
|
|
38
|
+
*/
|
|
39
|
+
isPrimary;
|
|
40
|
+
}
|
|
41
|
+
__decorate([
|
|
42
|
+
IsString(),
|
|
43
|
+
IsOptional(),
|
|
44
|
+
IsUUID(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], UpdateProductImageDto.prototype, "id", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
IsOptional(),
|
|
49
|
+
IsString(),
|
|
50
|
+
IsUrl({}, { message: 'Image URL must be a valid URL' }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], UpdateProductImageDto.prototype, "url", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
IsOptional(),
|
|
55
|
+
IsBoolean(),
|
|
56
|
+
__metadata("design:type", Boolean)
|
|
57
|
+
], UpdateProductImageDto.prototype, "isPrimary", void 0);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { QuestionProductType } from '../../../../enums';
|
|
2
|
+
/**
|
|
3
|
+
* DTO for creating a new product-question relationship.
|
|
4
|
+
*
|
|
5
|
+
* Used by the Products microservice to associate questions with products.
|
|
6
|
+
* Questions can be used for customization, surveys, or product details.
|
|
7
|
+
*
|
|
8
|
+
* @since 2.0.0
|
|
9
|
+
*/
|
|
10
|
+
export declare class CreateProductQuestionDto {
|
|
11
|
+
/**
|
|
12
|
+
* Optional unique identifier of the product.
|
|
13
|
+
* Must be a valid UUID if provided.
|
|
14
|
+
*
|
|
15
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
16
|
+
*/
|
|
17
|
+
productId?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Unique identifier of the question.
|
|
20
|
+
* Must be a valid UUID and not be empty.
|
|
21
|
+
*
|
|
22
|
+
* @example "770e8400-e29b-41d4-a716-446655440003"
|
|
23
|
+
*/
|
|
24
|
+
questionId: string;
|
|
25
|
+
/**
|
|
26
|
+
* Optional position/order of the question.
|
|
27
|
+
* Used to control the display order. Must be a non-negative integer if provided.
|
|
28
|
+
*
|
|
29
|
+
* @example 1
|
|
30
|
+
* @default 0
|
|
31
|
+
*/
|
|
32
|
+
position?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Type of the question-product relationship.
|
|
35
|
+
* Must be a valid QuestionProductType enum value.
|
|
36
|
+
*
|
|
37
|
+
* @example QuestionProductType.QUESTION
|
|
38
|
+
*/
|
|
39
|
+
itemType: QuestionProductType;
|
|
40
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsNotEmpty, IsOptional, IsInt, IsEnum, Min, IsUUID } from 'class-validator';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
import { QuestionProductType } from '../../../../enums';
|
|
13
|
+
/**
|
|
14
|
+
* DTO for creating a new product-question relationship.
|
|
15
|
+
*
|
|
16
|
+
* Used by the Products microservice to associate questions with products.
|
|
17
|
+
* Questions can be used for customization, surveys, or product details.
|
|
18
|
+
*
|
|
19
|
+
* @since 2.0.0
|
|
20
|
+
*/
|
|
21
|
+
export class CreateProductQuestionDto {
|
|
22
|
+
/**
|
|
23
|
+
* Optional unique identifier of the product.
|
|
24
|
+
* Must be a valid UUID if provided.
|
|
25
|
+
*
|
|
26
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
27
|
+
*/
|
|
28
|
+
productId;
|
|
29
|
+
/**
|
|
30
|
+
* Unique identifier of the question.
|
|
31
|
+
* Must be a valid UUID and not be empty.
|
|
32
|
+
*
|
|
33
|
+
* @example "770e8400-e29b-41d4-a716-446655440003"
|
|
34
|
+
*/
|
|
35
|
+
questionId;
|
|
36
|
+
/**
|
|
37
|
+
* Optional position/order of the question.
|
|
38
|
+
* Used to control the display order. Must be a non-negative integer if provided.
|
|
39
|
+
*
|
|
40
|
+
* @example 1
|
|
41
|
+
* @default 0
|
|
42
|
+
*/
|
|
43
|
+
position;
|
|
44
|
+
/**
|
|
45
|
+
* Type of the question-product relationship.
|
|
46
|
+
* Must be a valid QuestionProductType enum value.
|
|
47
|
+
*
|
|
48
|
+
* @example QuestionProductType.QUESTION
|
|
49
|
+
*/
|
|
50
|
+
itemType;
|
|
51
|
+
}
|
|
52
|
+
__decorate([
|
|
53
|
+
IsUUID(),
|
|
54
|
+
IsString(),
|
|
55
|
+
IsOptional(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], CreateProductQuestionDto.prototype, "productId", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
IsUUID(),
|
|
60
|
+
IsString(),
|
|
61
|
+
IsNotEmpty({ message: 'Question ID is required' }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], CreateProductQuestionDto.prototype, "questionId", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
IsOptional(),
|
|
66
|
+
IsInt({ message: 'Position must be an integer' }),
|
|
67
|
+
Min(0, { message: 'Position must be at least 0' }),
|
|
68
|
+
Type(() => Number),
|
|
69
|
+
__metadata("design:type", Number)
|
|
70
|
+
], CreateProductQuestionDto.prototype, "position", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
IsEnum(QuestionProductType, {
|
|
73
|
+
message: 'Item type must be either QUESTION or ANSWER',
|
|
74
|
+
}),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], CreateProductQuestionDto.prototype, "itemType", void 0);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { QuestionProductType } from '../../../../enums';
|
|
2
|
+
/**
|
|
3
|
+
* DTO for finding product questions by product ID and type.
|
|
4
|
+
*
|
|
5
|
+
* Used by the Products microservice to retrieve question associations
|
|
6
|
+
* filtered by product ID and question type (QUESTION or ANSWER).
|
|
7
|
+
*
|
|
8
|
+
* @since 2.0.0
|
|
9
|
+
*/
|
|
10
|
+
export declare class FindProductQuestionByProductIdAndTypeDto {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier of the product.
|
|
13
|
+
* Must be a valid UUID and not be empty.
|
|
14
|
+
*
|
|
15
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
16
|
+
*/
|
|
17
|
+
productId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Type of the question-product relationship.
|
|
20
|
+
* Must be a valid QuestionProductType enum value.
|
|
21
|
+
*
|
|
22
|
+
* @example QuestionProductType.QUESTION
|
|
23
|
+
*/
|
|
24
|
+
type: QuestionProductType;
|
|
25
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsNotEmpty, IsUUID, IsEnum } from 'class-validator';
|
|
11
|
+
import { QuestionProductType } from '../../../../enums';
|
|
12
|
+
/**
|
|
13
|
+
* DTO for finding product questions by product ID and type.
|
|
14
|
+
*
|
|
15
|
+
* Used by the Products microservice to retrieve question associations
|
|
16
|
+
* filtered by product ID and question type (QUESTION or ANSWER).
|
|
17
|
+
*
|
|
18
|
+
* @since 2.0.0
|
|
19
|
+
*/
|
|
20
|
+
export class FindProductQuestionByProductIdAndTypeDto {
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier of the product.
|
|
23
|
+
* Must be a valid UUID and not be empty.
|
|
24
|
+
*
|
|
25
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
26
|
+
*/
|
|
27
|
+
productId;
|
|
28
|
+
/**
|
|
29
|
+
* Type of the question-product relationship.
|
|
30
|
+
* Must be a valid QuestionProductType enum value.
|
|
31
|
+
*
|
|
32
|
+
* @example QuestionProductType.QUESTION
|
|
33
|
+
*/
|
|
34
|
+
type;
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
IsString(),
|
|
38
|
+
IsNotEmpty({ message: 'Product ID is required' }),
|
|
39
|
+
IsUUID(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], FindProductQuestionByProductIdAndTypeDto.prototype, "productId", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
IsEnum(QuestionProductType, {
|
|
44
|
+
message: 'Type must be either QUESTION or ANSWER',
|
|
45
|
+
}),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], FindProductQuestionByProductIdAndTypeDto.prototype, "type", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Question DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for managing product-question relationships
|
|
5
|
+
* in the Products microservice.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-product-question.dto';
|
|
10
|
+
export * from './update-product-question.dto';
|
|
11
|
+
export * from './replace-by-product-id.dto';
|
|
12
|
+
export * from './find-by-product-id-and-type.dto';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Question DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for managing product-question relationships
|
|
5
|
+
* in the Products microservice.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-product-question.dto';
|
|
10
|
+
export * from './update-product-question.dto';
|
|
11
|
+
export * from './replace-by-product-id.dto';
|
|
12
|
+
export * from './find-by-product-id-and-type.dto';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CreateProductQuestionDto } from './create-product-question.dto';
|
|
2
|
+
/**
|
|
3
|
+
* DTO for replacing all product-question relationships.
|
|
4
|
+
*
|
|
5
|
+
* Used by the Products microservice to replace all question associations
|
|
6
|
+
* for a product in a single operation. Existing associations are removed
|
|
7
|
+
* and replaced with the new ones provided.
|
|
8
|
+
*
|
|
9
|
+
* @since 2.0.0
|
|
10
|
+
*/
|
|
11
|
+
export declare class ReplaceProductQuestionsByProductIdDto {
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier of the product.
|
|
14
|
+
* Must be a valid UUID and not be empty.
|
|
15
|
+
*
|
|
16
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
17
|
+
*/
|
|
18
|
+
productId: string;
|
|
19
|
+
/**
|
|
20
|
+
* Array of question associations to replace existing ones.
|
|
21
|
+
* Can be empty to remove all associations.
|
|
22
|
+
* Each association is validated as a ProductQuestionDataDto.
|
|
23
|
+
*
|
|
24
|
+
* @example [{ questionId: "...", position: 1, itemType: QuestionProductType.QUESTION }]
|
|
25
|
+
*/
|
|
26
|
+
questions: CreateProductQuestionDto[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsNotEmpty, IsUUID, IsArray, ValidateNested, ArrayMinSize, } from 'class-validator';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
import { CreateProductQuestionDto } from './create-product-question.dto';
|
|
13
|
+
/**
|
|
14
|
+
* DTO for replacing all product-question relationships.
|
|
15
|
+
*
|
|
16
|
+
* Used by the Products microservice to replace all question associations
|
|
17
|
+
* for a product in a single operation. Existing associations are removed
|
|
18
|
+
* and replaced with the new ones provided.
|
|
19
|
+
*
|
|
20
|
+
* @since 2.0.0
|
|
21
|
+
*/
|
|
22
|
+
export class ReplaceProductQuestionsByProductIdDto {
|
|
23
|
+
/**
|
|
24
|
+
* Unique identifier of the product.
|
|
25
|
+
* Must be a valid UUID and not be empty.
|
|
26
|
+
*
|
|
27
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
28
|
+
*/
|
|
29
|
+
productId;
|
|
30
|
+
/**
|
|
31
|
+
* Array of question associations to replace existing ones.
|
|
32
|
+
* Can be empty to remove all associations.
|
|
33
|
+
* Each association is validated as a ProductQuestionDataDto.
|
|
34
|
+
*
|
|
35
|
+
* @example [{ questionId: "...", position: 1, itemType: QuestionProductType.QUESTION }]
|
|
36
|
+
*/
|
|
37
|
+
questions;
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
IsString(),
|
|
41
|
+
IsNotEmpty({ message: 'Product ID is required' }),
|
|
42
|
+
IsUUID(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], ReplaceProductQuestionsByProductIdDto.prototype, "productId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
IsArray(),
|
|
47
|
+
ArrayMinSize(0, { message: 'Questions array can be empty' }),
|
|
48
|
+
ValidateNested({ each: true }),
|
|
49
|
+
Type(() => CreateProductQuestionDto),
|
|
50
|
+
__metadata("design:type", Array)
|
|
51
|
+
], ReplaceProductQuestionsByProductIdDto.prototype, "questions", void 0);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { QuestionProductType } from '../../../../enums';
|
|
2
|
+
/**
|
|
3
|
+
* DTO for updating an existing product-question relationship.
|
|
4
|
+
*
|
|
5
|
+
* Used by the Products microservice to update question association details.
|
|
6
|
+
* All fields are optional except the relationship ID.
|
|
7
|
+
*
|
|
8
|
+
* @since 2.0.0
|
|
9
|
+
*/
|
|
10
|
+
export declare class UpdateProductQuestionDto {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier of the relationship to update.
|
|
13
|
+
* Must be a valid UUID if provided.
|
|
14
|
+
*
|
|
15
|
+
* @example "aa0e8400-e29b-41d4-a716-446655440006"
|
|
16
|
+
*/
|
|
17
|
+
id?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Optional position/order of the question.
|
|
20
|
+
* Used to control the display order. Must be a non-negative integer if provided.
|
|
21
|
+
*
|
|
22
|
+
* @example 2
|
|
23
|
+
*/
|
|
24
|
+
position?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Optional type of the question-product relationship.
|
|
27
|
+
* Must be a valid QuestionProductType enum value if provided.
|
|
28
|
+
*
|
|
29
|
+
* @example QuestionProductType.ANSWER
|
|
30
|
+
*/
|
|
31
|
+
itemType?: QuestionProductType;
|
|
32
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsOptional, IsInt, IsEnum, Min, IsUUID } from 'class-validator';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
import { QuestionProductType } from '../../../../enums';
|
|
13
|
+
/**
|
|
14
|
+
* DTO for updating an existing product-question relationship.
|
|
15
|
+
*
|
|
16
|
+
* Used by the Products microservice to update question association details.
|
|
17
|
+
* All fields are optional except the relationship ID.
|
|
18
|
+
*
|
|
19
|
+
* @since 2.0.0
|
|
20
|
+
*/
|
|
21
|
+
export class UpdateProductQuestionDto {
|
|
22
|
+
/**
|
|
23
|
+
* Unique identifier of the relationship to update.
|
|
24
|
+
* Must be a valid UUID if provided.
|
|
25
|
+
*
|
|
26
|
+
* @example "aa0e8400-e29b-41d4-a716-446655440006"
|
|
27
|
+
*/
|
|
28
|
+
id;
|
|
29
|
+
/**
|
|
30
|
+
* Optional position/order of the question.
|
|
31
|
+
* Used to control the display order. Must be a non-negative integer if provided.
|
|
32
|
+
*
|
|
33
|
+
* @example 2
|
|
34
|
+
*/
|
|
35
|
+
position;
|
|
36
|
+
/**
|
|
37
|
+
* Optional type of the question-product relationship.
|
|
38
|
+
* Must be a valid QuestionProductType enum value if provided.
|
|
39
|
+
*
|
|
40
|
+
* @example QuestionProductType.ANSWER
|
|
41
|
+
*/
|
|
42
|
+
itemType;
|
|
43
|
+
}
|
|
44
|
+
__decorate([
|
|
45
|
+
IsString(),
|
|
46
|
+
IsOptional(),
|
|
47
|
+
IsUUID(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], UpdateProductQuestionDto.prototype, "id", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
IsOptional(),
|
|
52
|
+
IsInt({ message: 'Position must be an integer' }),
|
|
53
|
+
Min(0, { message: 'Position must be at least 0' }),
|
|
54
|
+
Type(() => Number),
|
|
55
|
+
__metadata("design:type", Number)
|
|
56
|
+
], UpdateProductQuestionDto.prototype, "position", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
IsOptional(),
|
|
59
|
+
IsEnum(QuestionProductType, {
|
|
60
|
+
message: 'Item type must be either QUESTION or ANSWER',
|
|
61
|
+
}),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], UpdateProductQuestionDto.prototype, "itemType", void 0);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for creating a new product recipe entry.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to create recipe associations for products.
|
|
5
|
+
* Recipes define the ingredients and quantities needed to prepare a product.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class CreateProductRecipeDto {
|
|
10
|
+
/**
|
|
11
|
+
* Optional unique identifier of the product.
|
|
12
|
+
* Must be a valid UUID if provided.
|
|
13
|
+
*
|
|
14
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
15
|
+
*/
|
|
16
|
+
productId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Unique identifier of the ingredient.
|
|
19
|
+
* Must be a valid UUID and not be empty.
|
|
20
|
+
*
|
|
21
|
+
* @example "660e8400-e29b-41d4-a716-446655440001"
|
|
22
|
+
*/
|
|
23
|
+
ingredientId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Quantity of the ingredient needed.
|
|
26
|
+
* Must be a positive number.
|
|
27
|
+
*
|
|
28
|
+
* @example 200
|
|
29
|
+
*/
|
|
30
|
+
quantity: number;
|
|
31
|
+
/**
|
|
32
|
+
* Unit of measurement for the ingredient quantity.
|
|
33
|
+
* Must not be empty.
|
|
34
|
+
*
|
|
35
|
+
* @example "grams"
|
|
36
|
+
*/
|
|
37
|
+
unit: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsNotEmpty, IsNumber, IsPositive, IsUUID, IsOptional } from 'class-validator';
|
|
11
|
+
/**
|
|
12
|
+
* DTO for creating a new product recipe entry.
|
|
13
|
+
*
|
|
14
|
+
* Used by the Products microservice to create recipe associations for products.
|
|
15
|
+
* Recipes define the ingredients and quantities needed to prepare a product.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
*/
|
|
19
|
+
export class CreateProductRecipeDto {
|
|
20
|
+
/**
|
|
21
|
+
* Optional unique identifier of the product.
|
|
22
|
+
* Must be a valid UUID if provided.
|
|
23
|
+
*
|
|
24
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
25
|
+
*/
|
|
26
|
+
productId;
|
|
27
|
+
/**
|
|
28
|
+
* Unique identifier of the ingredient.
|
|
29
|
+
* Must be a valid UUID and not be empty.
|
|
30
|
+
*
|
|
31
|
+
* @example "660e8400-e29b-41d4-a716-446655440001"
|
|
32
|
+
*/
|
|
33
|
+
ingredientId;
|
|
34
|
+
/**
|
|
35
|
+
* Quantity of the ingredient needed.
|
|
36
|
+
* Must be a positive number.
|
|
37
|
+
*
|
|
38
|
+
* @example 200
|
|
39
|
+
*/
|
|
40
|
+
quantity;
|
|
41
|
+
/**
|
|
42
|
+
* Unit of measurement for the ingredient quantity.
|
|
43
|
+
* Must not be empty.
|
|
44
|
+
*
|
|
45
|
+
* @example "grams"
|
|
46
|
+
*/
|
|
47
|
+
unit;
|
|
48
|
+
}
|
|
49
|
+
__decorate([
|
|
50
|
+
IsString(),
|
|
51
|
+
IsOptional(),
|
|
52
|
+
IsUUID(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], CreateProductRecipeDto.prototype, "productId", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
IsString(),
|
|
57
|
+
IsNotEmpty({ message: 'Ingredient ID is required' }),
|
|
58
|
+
IsUUID(),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], CreateProductRecipeDto.prototype, "ingredientId", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
IsNumber({}, { message: 'Quantity must be a number' }),
|
|
63
|
+
IsPositive({ message: 'Quantity must be a positive number' }),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], CreateProductRecipeDto.prototype, "quantity", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
IsString(),
|
|
68
|
+
IsNotEmpty({ message: 'Unit is required' }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], CreateProductRecipeDto.prototype, "unit", void 0);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Recipe DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for managing product recipe entries
|
|
5
|
+
* in the Products microservice.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-product-recipe.dto';
|
|
10
|
+
export * from './update-product-recipe.dto';
|
|
11
|
+
export * from './replace-by-product-id.dto';
|