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,126 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product service command subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant with all subject/message keys
|
|
5
|
+
* for commands between client(s) and the Product microservice.
|
|
6
|
+
* This includes core product commands and those for product submodules
|
|
7
|
+
* such as tag, size, schedule, image, question, and recipe management.
|
|
8
|
+
*
|
|
9
|
+
* Each key corresponds to a MessagePattern handled somewhere in the Product service.
|
|
10
|
+
*
|
|
11
|
+
* Usage examples:
|
|
12
|
+
* - PRODUCT_COMMANDS.CREATE: Subject for creating a product.
|
|
13
|
+
* - PRODUCT_COMMANDS.TAG_CREATE: Subject for creating a product-tag relationship.
|
|
14
|
+
* - PRODUCT_COMMANDS.SIZE_FIND_ALL: Subject for listing all sizes for a product.
|
|
15
|
+
* - PRODUCT_COMMANDS.SCHEDULE_REMOVE_BY_PRODUCT: Subject for deleting all schedules for a product.
|
|
16
|
+
* - etc.
|
|
17
|
+
*
|
|
18
|
+
* Keeping these values centralized ensures consistency, discoverability and maintainability across the codebase.
|
|
19
|
+
*
|
|
20
|
+
* @since 2.0.0
|
|
21
|
+
*/
|
|
22
|
+
export const PRODUCT_COMMANDS = {
|
|
23
|
+
// === Product core ===
|
|
24
|
+
/** Create a new product */
|
|
25
|
+
CREATE: 'product.create',
|
|
26
|
+
/** Retrieve all products with pagination support */
|
|
27
|
+
FIND_ALL: 'product.find-all',
|
|
28
|
+
/** Retrieve a specific product by ID */
|
|
29
|
+
FIND_ONE: 'product.find-one',
|
|
30
|
+
/** Update a product by ID */
|
|
31
|
+
UPDATE: 'product.update',
|
|
32
|
+
/** Soft delete a product (mark as inactive) */
|
|
33
|
+
DELETE: 'product.delete',
|
|
34
|
+
/** Validate a list of product IDs */
|
|
35
|
+
VALIDATE_PRODUCTS: 'product.validate-products',
|
|
36
|
+
// === ProductTag ===
|
|
37
|
+
/** Create relationship between product and tag */
|
|
38
|
+
TAG_CREATE: 'product-tag.create',
|
|
39
|
+
/** Retrieve all tags for a product */
|
|
40
|
+
TAG_FIND_BY_PRODUCT: 'product-tag.find-by-product-id',
|
|
41
|
+
/** Retrieve a specific tag for a product */
|
|
42
|
+
TAG_FIND_ONE: 'product-tag.find-one',
|
|
43
|
+
/** Replace all tags for a product */
|
|
44
|
+
TAG_REPLACE_BY_PRODUCT: 'product-tag.replace-by-product-id',
|
|
45
|
+
/** Remove relationship between product and tag */
|
|
46
|
+
TAG_REMOVE: 'product-tag.remove',
|
|
47
|
+
/** Remove all tag relationships for a product */
|
|
48
|
+
TAG_REMOVE_BY_PRODUCT: 'product-tag.remove-by-product-id',
|
|
49
|
+
// === ProductSize ===
|
|
50
|
+
/** Create a new product size */
|
|
51
|
+
SIZE_CREATE: 'product-size.create',
|
|
52
|
+
/** Retrieve all sizes for a product */
|
|
53
|
+
SIZE_FIND_BY_PRODUCT: 'product-size.find-by-product-id',
|
|
54
|
+
/** Retrieve specific size for a product by size ID */
|
|
55
|
+
SIZE_FIND_ONE: 'product-size.find-one',
|
|
56
|
+
/** Replace all sizes for a product */
|
|
57
|
+
SIZE_REPLACE_BY_PRODUCT: 'product-size.replace-by-product-id',
|
|
58
|
+
/** Update a size by ID */
|
|
59
|
+
SIZE_UPDATE: 'product-size.update',
|
|
60
|
+
/** Remove size by ID */
|
|
61
|
+
SIZE_REMOVE: 'product-size.remove',
|
|
62
|
+
/** Remove all sizes for a product */
|
|
63
|
+
SIZE_REMOVE_BY_PRODUCT: 'product-size.remove-by-product-id',
|
|
64
|
+
// === ProductSchedule ===
|
|
65
|
+
/** Create a new schedule for a product */
|
|
66
|
+
SCHEDULE_CREATE: 'product-schedule.create',
|
|
67
|
+
/** Retrieve all schedules for a product */
|
|
68
|
+
SCHEDULE_FIND_BY_PRODUCT: 'product-schedule.find-by-product-id',
|
|
69
|
+
/** Replace all schedules for a product */
|
|
70
|
+
SCHEDULE_REPLACE_BY_PRODUCT: 'product-schedule.replace-by-product-id',
|
|
71
|
+
/** Check if a product is available at a specific time */
|
|
72
|
+
SCHEDULE_IS_AVAILABLE_AT_TIME: 'product-schedule.is-available-at-time',
|
|
73
|
+
/** Retrieve specific product schedule by ID */
|
|
74
|
+
SCHEDULE_FIND_ONE: 'product-schedule.find-one',
|
|
75
|
+
/** Update a product schedule by ID */
|
|
76
|
+
SCHEDULE_UPDATE: 'product-schedule.update',
|
|
77
|
+
/** Remove a product schedule by ID */
|
|
78
|
+
SCHEDULE_REMOVE: 'product-schedule.remove',
|
|
79
|
+
/** Remove all schedules for a product */
|
|
80
|
+
SCHEDULE_REMOVE_BY_PRODUCT: 'product-schedule.remove-by-product-id',
|
|
81
|
+
// === ProductImage (preservando patrón aunque no se brindó el controlador) ===
|
|
82
|
+
/** Create a new image for a product */
|
|
83
|
+
IMAGE_CREATE: 'product-image.create',
|
|
84
|
+
/** Retrieve all images for a product */
|
|
85
|
+
IMAGE_FIND_BY_PRODUCT: 'product-image.find-by-product-id',
|
|
86
|
+
/** Retrieve specific image for a product by ID */
|
|
87
|
+
IMAGE_FIND_ONE: 'product-image.find-one',
|
|
88
|
+
/** Replace all images for a product */
|
|
89
|
+
IMAGE_REPLACE_BY_PRODUCT: 'product-image.replace-by-product-id',
|
|
90
|
+
/** Update a product image by ID */
|
|
91
|
+
IMAGE_UPDATE: 'product-image.update',
|
|
92
|
+
/** Remove a product image by ID */
|
|
93
|
+
IMAGE_REMOVE: 'product-image.remove',
|
|
94
|
+
/** Remove all images for a product */
|
|
95
|
+
IMAGE_REMOVE_BY_PRODUCT: 'product-image.remove-by-product-id',
|
|
96
|
+
// === ProductQuestion ===
|
|
97
|
+
/** Create a new question for a product */
|
|
98
|
+
QUESTION_CREATE: 'product-question.create',
|
|
99
|
+
/** Retrieve all questions for a product */
|
|
100
|
+
QUESTION_FIND_BY_PRODUCT: 'product-question.find-by-product-id',
|
|
101
|
+
/** Retrieve specific product question by ID */
|
|
102
|
+
QUESTION_FIND_ONE: 'product-question.find-one',
|
|
103
|
+
/** Replace all questions for a product */
|
|
104
|
+
QUESTION_REPLACE_BY_PRODUCT: 'product-question.replace-by-product-id',
|
|
105
|
+
/** Update a product question by ID */
|
|
106
|
+
QUESTION_UPDATE: 'product-question.update',
|
|
107
|
+
/** Remove a product question by ID */
|
|
108
|
+
QUESTION_REMOVE: 'product-question.remove',
|
|
109
|
+
/** Remove all product questions for a product */
|
|
110
|
+
QUESTION_REMOVE_BY_PRODUCT: 'product-question.remove-by-product-id',
|
|
111
|
+
// === ProductRecipe ===
|
|
112
|
+
/** Create a new recipe for a product */
|
|
113
|
+
RECIPE_CREATE: 'product-recipe.create',
|
|
114
|
+
/** Retrieve all recipes for a product */
|
|
115
|
+
RECIPE_FIND_BY_PRODUCT: 'product-recipe.find-by-product-id',
|
|
116
|
+
/** Retrieve specific product recipe by ID */
|
|
117
|
+
RECIPE_FIND_ONE: 'product-recipe.find-one',
|
|
118
|
+
/** Replace all recipes for a product */
|
|
119
|
+
RECIPE_REPLACE_BY_PRODUCT: 'product-recipe.replace-by-product-id',
|
|
120
|
+
/** Update a product recipe by ID */
|
|
121
|
+
RECIPE_UPDATE: 'product-recipe.update',
|
|
122
|
+
/** Remove a product recipe by ID */
|
|
123
|
+
RECIPE_REMOVE: 'product-recipe.remove',
|
|
124
|
+
/** Remove all recipes for a product */
|
|
125
|
+
RECIPE_REMOVE_BY_PRODUCT: 'product-recipe.remove-by-product-id',
|
|
126
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product-related event subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all event subject names
|
|
5
|
+
* that represent domain events emitted by the Product microservice.
|
|
6
|
+
*
|
|
7
|
+
* These event subjects are used in the distributed system (e.g., with NATS or other brokers)
|
|
8
|
+
* to notify other services or subsystems when significant actions occur on products or their
|
|
9
|
+
* submodules (such as creation of recipes, sizes, or tags).
|
|
10
|
+
*
|
|
11
|
+
* Usage examples:
|
|
12
|
+
* - PRODUCT_EVENTS.CREATED: Emitted when a new product is created.
|
|
13
|
+
* - PRODUCT_EVENTS.RECIPE_CREATED: Emitted when a new recipe is associated with a product.
|
|
14
|
+
* - PRODUCT_EVENTS.TAG_CREATED: Emitted when a new tag is associated with a product.
|
|
15
|
+
*
|
|
16
|
+
* Keeping these values centralized ensures consistency, discoverability, and maintainability.
|
|
17
|
+
*
|
|
18
|
+
* @since 2.0.0
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export declare const PRODUCT_EVENTS: {
|
|
22
|
+
/** Emitted when a new product is created */
|
|
23
|
+
readonly CREATED: "product.created";
|
|
24
|
+
/** Emitted when a product is updated */
|
|
25
|
+
readonly UPDATED: "product.updated";
|
|
26
|
+
/** Emitted when a recipe is created for a product */
|
|
27
|
+
readonly RECIPE_CREATED: "product-recipe.created";
|
|
28
|
+
/** Emitted when a new size is created for a product */
|
|
29
|
+
readonly SIZE_CREATED: "product-size.created";
|
|
30
|
+
/** Emitted when a new tag is created for a product */
|
|
31
|
+
readonly TAG_CREATED: "product-tag.created";
|
|
32
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product-related event subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all event subject names
|
|
5
|
+
* that represent domain events emitted by the Product microservice.
|
|
6
|
+
*
|
|
7
|
+
* These event subjects are used in the distributed system (e.g., with NATS or other brokers)
|
|
8
|
+
* to notify other services or subsystems when significant actions occur on products or their
|
|
9
|
+
* submodules (such as creation of recipes, sizes, or tags).
|
|
10
|
+
*
|
|
11
|
+
* Usage examples:
|
|
12
|
+
* - PRODUCT_EVENTS.CREATED: Emitted when a new product is created.
|
|
13
|
+
* - PRODUCT_EVENTS.RECIPE_CREATED: Emitted when a new recipe is associated with a product.
|
|
14
|
+
* - PRODUCT_EVENTS.TAG_CREATED: Emitted when a new tag is associated with a product.
|
|
15
|
+
*
|
|
16
|
+
* Keeping these values centralized ensures consistency, discoverability, and maintainability.
|
|
17
|
+
*
|
|
18
|
+
* @since 2.0.0
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export const PRODUCT_EVENTS = {
|
|
22
|
+
/** Emitted when a new product is created */
|
|
23
|
+
CREATED: "product.created",
|
|
24
|
+
/** Emitted when a product is updated */
|
|
25
|
+
UPDATED: "product.updated",
|
|
26
|
+
/** Emitted when a recipe is created for a product */
|
|
27
|
+
RECIPE_CREATED: "product-recipe.created",
|
|
28
|
+
/** Emitted when a new size is created for a product */
|
|
29
|
+
SIZE_CREATED: "product-size.created",
|
|
30
|
+
/** Emitted when a new tag is created for a product */
|
|
31
|
+
TAG_CREATED: "product-tag.created",
|
|
32
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Question service command subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all subject/message keys handled by the Question microservice.
|
|
5
|
+
* Each key corresponds to a MessagePattern used for inter-service communication related to question management
|
|
6
|
+
* in product and menu modules.
|
|
7
|
+
*
|
|
8
|
+
* Naming convention:
|
|
9
|
+
* - Keys use SCREAMING_SNAKE_CASE.
|
|
10
|
+
* - Subject values use kebab-case between dots, matching the entity domain ('question').
|
|
11
|
+
*
|
|
12
|
+
* Usage examples:
|
|
13
|
+
* - QUESTION_COMMANDS.CREATE: Subject for creating a question.
|
|
14
|
+
* - QUESTION_COMMANDS.FIND_ALL: Subject for retrieving all questions.
|
|
15
|
+
* - QUESTION_COMMANDS.FIND_ONE: Subject for fetching a specific question by ID.
|
|
16
|
+
* - QUESTION_COMMANDS.SEARCH_BY_NAME: Subject for searching questions by name.
|
|
17
|
+
* - QUESTION_COMMANDS.FIND_BY_TYPE: Subject for retrieving questions by their type.
|
|
18
|
+
* - QUESTION_COMMANDS.FIND_BY_PRODUCT_ID: Subject for retrieving questions associated to a certain product.
|
|
19
|
+
* - QUESTION_COMMANDS.UPDATE: Subject for updating a question.
|
|
20
|
+
* - QUESTION_COMMANDS.REMOVE: Subject for soft-deleting a question.
|
|
21
|
+
*
|
|
22
|
+
* Centralizing these subjects ensures consistency, discoverability, and maintainability.
|
|
23
|
+
*
|
|
24
|
+
* @since 2.0.0
|
|
25
|
+
*/
|
|
26
|
+
export declare const QUESTION_COMMANDS: {
|
|
27
|
+
/** Create a new question */
|
|
28
|
+
readonly CREATE: "question.create";
|
|
29
|
+
/** Retrieve all questions with pagination */
|
|
30
|
+
readonly FIND_ALL: "question.find-all";
|
|
31
|
+
/** Retrieve a specific question by ID */
|
|
32
|
+
readonly FIND_ONE: "question.find-one";
|
|
33
|
+
/** Search questions by name */
|
|
34
|
+
readonly SEARCH_BY_NAME: "question.search-by-name";
|
|
35
|
+
/** Retrieve questions filtered by type */
|
|
36
|
+
readonly FIND_BY_TYPE: "question.find-by-type";
|
|
37
|
+
/** Retrieve questions associated with a specific product */
|
|
38
|
+
readonly FIND_BY_PRODUCT_ID: "question.find-by-product-id";
|
|
39
|
+
/** Update an existing question */
|
|
40
|
+
readonly UPDATE: "question.update";
|
|
41
|
+
/** Soft delete a question by ID */
|
|
42
|
+
readonly REMOVE: "question.remove";
|
|
43
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Question service command subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all subject/message keys handled by the Question microservice.
|
|
5
|
+
* Each key corresponds to a MessagePattern used for inter-service communication related to question management
|
|
6
|
+
* in product and menu modules.
|
|
7
|
+
*
|
|
8
|
+
* Naming convention:
|
|
9
|
+
* - Keys use SCREAMING_SNAKE_CASE.
|
|
10
|
+
* - Subject values use kebab-case between dots, matching the entity domain ('question').
|
|
11
|
+
*
|
|
12
|
+
* Usage examples:
|
|
13
|
+
* - QUESTION_COMMANDS.CREATE: Subject for creating a question.
|
|
14
|
+
* - QUESTION_COMMANDS.FIND_ALL: Subject for retrieving all questions.
|
|
15
|
+
* - QUESTION_COMMANDS.FIND_ONE: Subject for fetching a specific question by ID.
|
|
16
|
+
* - QUESTION_COMMANDS.SEARCH_BY_NAME: Subject for searching questions by name.
|
|
17
|
+
* - QUESTION_COMMANDS.FIND_BY_TYPE: Subject for retrieving questions by their type.
|
|
18
|
+
* - QUESTION_COMMANDS.FIND_BY_PRODUCT_ID: Subject for retrieving questions associated to a certain product.
|
|
19
|
+
* - QUESTION_COMMANDS.UPDATE: Subject for updating a question.
|
|
20
|
+
* - QUESTION_COMMANDS.REMOVE: Subject for soft-deleting a question.
|
|
21
|
+
*
|
|
22
|
+
* Centralizing these subjects ensures consistency, discoverability, and maintainability.
|
|
23
|
+
*
|
|
24
|
+
* @since 2.0.0
|
|
25
|
+
*/
|
|
26
|
+
export const QUESTION_COMMANDS = {
|
|
27
|
+
/** Create a new question */
|
|
28
|
+
CREATE: 'question.create',
|
|
29
|
+
/** Retrieve all questions with pagination */
|
|
30
|
+
FIND_ALL: 'question.find-all',
|
|
31
|
+
/** Retrieve a specific question by ID */
|
|
32
|
+
FIND_ONE: 'question.find-one',
|
|
33
|
+
/** Search questions by name */
|
|
34
|
+
SEARCH_BY_NAME: 'question.search-by-name',
|
|
35
|
+
/** Retrieve questions filtered by type */
|
|
36
|
+
FIND_BY_TYPE: 'question.find-by-type',
|
|
37
|
+
/** Retrieve questions associated with a specific product */
|
|
38
|
+
FIND_BY_PRODUCT_ID: 'question.find-by-product-id',
|
|
39
|
+
/** Update an existing question */
|
|
40
|
+
UPDATE: 'question.update',
|
|
41
|
+
/** Soft delete a question by ID */
|
|
42
|
+
REMOVE: 'question.remove',
|
|
43
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Restaurant service command subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all subject/message keys handled by the Restaurant microservice.
|
|
5
|
+
* Each key corresponds to a MessagePattern used for inter-service communication related to restaurant management.
|
|
6
|
+
*
|
|
7
|
+
* Naming convention:
|
|
8
|
+
* - Keys use SCREAMING_SNAKE_CASE.
|
|
9
|
+
* - Subject values use kebab-case between dots, matching the 'restaurant' entity domain.
|
|
10
|
+
*
|
|
11
|
+
* Usage examples:
|
|
12
|
+
* - RESTAURANT_COMMANDS.CREATE: Subject for creating a restaurant.
|
|
13
|
+
* - RESTAURANT_COMMANDS.FIND_ALL: Subject for retrieving all restaurants with pagination.
|
|
14
|
+
* - RESTAURANT_COMMANDS.FIND_ONE: Subject for retrieving a restaurant by ID.
|
|
15
|
+
* - RESTAURANT_COMMANDS.UPDATE: Subject for updating a restaurant.
|
|
16
|
+
* - RESTAURANT_COMMANDS.DELETE: Subject for soft deleting a restaurant by ID.
|
|
17
|
+
*
|
|
18
|
+
* Centralizing these subjects ensures consistency, discoverability, and maintainability across the codebase.
|
|
19
|
+
*
|
|
20
|
+
* @since 2.0.0
|
|
21
|
+
*/
|
|
22
|
+
export declare const RESTAURANT_COMMANDS: {
|
|
23
|
+
/** Create a new restaurant */
|
|
24
|
+
readonly CREATE: "restaurant.create";
|
|
25
|
+
/** Retrieve all restaurants with pagination support */
|
|
26
|
+
readonly FIND_ALL: "restaurant.find-all";
|
|
27
|
+
/** Retrieve a specific restaurant by ID */
|
|
28
|
+
readonly FIND_ONE: "restaurant.find-one";
|
|
29
|
+
/** Update a restaurant by ID */
|
|
30
|
+
readonly UPDATE: "restaurant.update";
|
|
31
|
+
/** Soft delete a restaurant (mark as inactive) by ID */
|
|
32
|
+
readonly DELETE: "restaurant.delete";
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Restaurant service command subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all subject/message keys handled by the Restaurant microservice.
|
|
5
|
+
* Each key corresponds to a MessagePattern used for inter-service communication related to restaurant management.
|
|
6
|
+
*
|
|
7
|
+
* Naming convention:
|
|
8
|
+
* - Keys use SCREAMING_SNAKE_CASE.
|
|
9
|
+
* - Subject values use kebab-case between dots, matching the 'restaurant' entity domain.
|
|
10
|
+
*
|
|
11
|
+
* Usage examples:
|
|
12
|
+
* - RESTAURANT_COMMANDS.CREATE: Subject for creating a restaurant.
|
|
13
|
+
* - RESTAURANT_COMMANDS.FIND_ALL: Subject for retrieving all restaurants with pagination.
|
|
14
|
+
* - RESTAURANT_COMMANDS.FIND_ONE: Subject for retrieving a restaurant by ID.
|
|
15
|
+
* - RESTAURANT_COMMANDS.UPDATE: Subject for updating a restaurant.
|
|
16
|
+
* - RESTAURANT_COMMANDS.DELETE: Subject for soft deleting a restaurant by ID.
|
|
17
|
+
*
|
|
18
|
+
* Centralizing these subjects ensures consistency, discoverability, and maintainability across the codebase.
|
|
19
|
+
*
|
|
20
|
+
* @since 2.0.0
|
|
21
|
+
*/
|
|
22
|
+
export const RESTAURANT_COMMANDS = {
|
|
23
|
+
/** Create a new restaurant */
|
|
24
|
+
CREATE: 'restaurant.create',
|
|
25
|
+
/** Retrieve all restaurants with pagination support */
|
|
26
|
+
FIND_ALL: 'restaurant.find-all',
|
|
27
|
+
/** Retrieve a specific restaurant by ID */
|
|
28
|
+
FIND_ONE: 'restaurant.find-one',
|
|
29
|
+
/** Update a restaurant by ID */
|
|
30
|
+
UPDATE: 'restaurant.update',
|
|
31
|
+
/** Soft delete a restaurant (mark as inactive) by ID */
|
|
32
|
+
DELETE: 'restaurant.delete',
|
|
33
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag service command subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all subject/message keys
|
|
5
|
+
* for commands between client(s) and the Tag microservice.
|
|
6
|
+
* Each key corresponds to a MessagePattern used for inter-service communication
|
|
7
|
+
* regarding tag management.
|
|
8
|
+
*
|
|
9
|
+
* Naming convention:
|
|
10
|
+
* - Keys use SCREAMING_SNAKE_CASE.
|
|
11
|
+
* - Subject values use kebab-case between dots, matching the entity domain ('tag').
|
|
12
|
+
*
|
|
13
|
+
* Usage examples:
|
|
14
|
+
* - TAG_COMMANDS.CREATE: Subject for creating a tag.
|
|
15
|
+
* - TAG_COMMANDS.FIND_ALL: Subject for listing all tags (with pagination).
|
|
16
|
+
* - TAG_COMMANDS.SEARCH_BY_NAME: Subject for searching tags by name.
|
|
17
|
+
* - TAG_COMMANDS.GET_MOST_USED: Subject for retrieving the most used tags.
|
|
18
|
+
* - TAG_COMMANDS.FIND_BY_PRODUCT_ID: Subject for retrieving tags associated to a product.
|
|
19
|
+
* - TAG_COMMANDS.FIND_ONE: Subject for fetching a tag by ID.
|
|
20
|
+
* - TAG_COMMANDS.UPDATE: Subject for updating a tag.
|
|
21
|
+
* - TAG_COMMANDS.REMOVE: Subject for soft deleting a tag by ID.
|
|
22
|
+
*
|
|
23
|
+
* Centralizing these keys ensures consistency, discoverability, and maintainability.
|
|
24
|
+
*
|
|
25
|
+
* @since 2.0.0
|
|
26
|
+
*/
|
|
27
|
+
export declare const TAG_COMMANDS: {
|
|
28
|
+
/** Create a new tag */
|
|
29
|
+
readonly CREATE: "tag.create";
|
|
30
|
+
/** Retrieve all tags with pagination support */
|
|
31
|
+
readonly FIND_ALL: "tag.find-all";
|
|
32
|
+
/** Search tags by name */
|
|
33
|
+
readonly SEARCH_BY_NAME: "tag.search-by-name";
|
|
34
|
+
/** Get most used tags */
|
|
35
|
+
readonly GET_MOST_USED: "tag.get-most-used";
|
|
36
|
+
/** Retrieve tags associated with a specific product */
|
|
37
|
+
readonly FIND_BY_PRODUCT_ID: "tag.find-by-product-id";
|
|
38
|
+
/** Retrieve a specific tag by ID */
|
|
39
|
+
readonly FIND_ONE: "tag.find-one";
|
|
40
|
+
/** Update an existing tag */
|
|
41
|
+
readonly UPDATE: "tag.update";
|
|
42
|
+
/** Soft delete a tag by ID */
|
|
43
|
+
readonly REMOVE: "tag.remove";
|
|
44
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tag service command subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all subject/message keys
|
|
5
|
+
* for commands between client(s) and the Tag microservice.
|
|
6
|
+
* Each key corresponds to a MessagePattern used for inter-service communication
|
|
7
|
+
* regarding tag management.
|
|
8
|
+
*
|
|
9
|
+
* Naming convention:
|
|
10
|
+
* - Keys use SCREAMING_SNAKE_CASE.
|
|
11
|
+
* - Subject values use kebab-case between dots, matching the entity domain ('tag').
|
|
12
|
+
*
|
|
13
|
+
* Usage examples:
|
|
14
|
+
* - TAG_COMMANDS.CREATE: Subject for creating a tag.
|
|
15
|
+
* - TAG_COMMANDS.FIND_ALL: Subject for listing all tags (with pagination).
|
|
16
|
+
* - TAG_COMMANDS.SEARCH_BY_NAME: Subject for searching tags by name.
|
|
17
|
+
* - TAG_COMMANDS.GET_MOST_USED: Subject for retrieving the most used tags.
|
|
18
|
+
* - TAG_COMMANDS.FIND_BY_PRODUCT_ID: Subject for retrieving tags associated to a product.
|
|
19
|
+
* - TAG_COMMANDS.FIND_ONE: Subject for fetching a tag by ID.
|
|
20
|
+
* - TAG_COMMANDS.UPDATE: Subject for updating a tag.
|
|
21
|
+
* - TAG_COMMANDS.REMOVE: Subject for soft deleting a tag by ID.
|
|
22
|
+
*
|
|
23
|
+
* Centralizing these keys ensures consistency, discoverability, and maintainability.
|
|
24
|
+
*
|
|
25
|
+
* @since 2.0.0
|
|
26
|
+
*/
|
|
27
|
+
export const TAG_COMMANDS = {
|
|
28
|
+
/** Create a new tag */
|
|
29
|
+
CREATE: 'tag.create',
|
|
30
|
+
/** Retrieve all tags with pagination support */
|
|
31
|
+
FIND_ALL: 'tag.find-all',
|
|
32
|
+
/** Search tags by name */
|
|
33
|
+
SEARCH_BY_NAME: 'tag.search-by-name',
|
|
34
|
+
/** Get most used tags */
|
|
35
|
+
GET_MOST_USED: 'tag.get-most-used',
|
|
36
|
+
/** Retrieve tags associated with a specific product */
|
|
37
|
+
FIND_BY_PRODUCT_ID: 'tag.find-by-product-id',
|
|
38
|
+
/** Retrieve a specific tag by ID */
|
|
39
|
+
FIND_ONE: 'tag.find-one',
|
|
40
|
+
/** Update an existing tag */
|
|
41
|
+
UPDATE: 'tag.update',
|
|
42
|
+
/** Soft delete a tag by ID */
|
|
43
|
+
REMOVE: 'tag.remove',
|
|
44
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for user login requests.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Auth microservice to authenticate users.
|
|
5
|
+
* Validates email and password for authentication.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class LoginUserDto {
|
|
10
|
+
/**
|
|
11
|
+
* User's email address.
|
|
12
|
+
* Must be a valid email format.
|
|
13
|
+
*
|
|
14
|
+
* @example "john.doe@example.com"
|
|
15
|
+
*/
|
|
16
|
+
email: string;
|
|
17
|
+
/**
|
|
18
|
+
* User's password.
|
|
19
|
+
* Must be at least 6 characters long.
|
|
20
|
+
*
|
|
21
|
+
* @example "SecurePass123!"
|
|
22
|
+
*/
|
|
23
|
+
password: string;
|
|
24
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
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 { IsEmail, IsString, MinLength } from 'class-validator';
|
|
11
|
+
/**
|
|
12
|
+
* DTO for user login requests.
|
|
13
|
+
*
|
|
14
|
+
* Used by the Auth microservice to authenticate users.
|
|
15
|
+
* Validates email and password for authentication.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
*/
|
|
19
|
+
export class LoginUserDto {
|
|
20
|
+
/**
|
|
21
|
+
* User's email address.
|
|
22
|
+
* Must be a valid email format.
|
|
23
|
+
*
|
|
24
|
+
* @example "john.doe@example.com"
|
|
25
|
+
*/
|
|
26
|
+
email;
|
|
27
|
+
/**
|
|
28
|
+
* User's password.
|
|
29
|
+
* Must be at least 6 characters long.
|
|
30
|
+
*
|
|
31
|
+
* @example "SecurePass123!"
|
|
32
|
+
*/
|
|
33
|
+
password;
|
|
34
|
+
}
|
|
35
|
+
__decorate([
|
|
36
|
+
IsString(),
|
|
37
|
+
IsEmail(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], LoginUserDto.prototype, "email", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
IsString(),
|
|
42
|
+
MinLength(6),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], LoginUserDto.prototype, "password", void 0);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for user registration requests.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Auth microservice to handle new user registrations.
|
|
5
|
+
* Validates user input for creating new accounts with email and password.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class RegisterUserDto {
|
|
10
|
+
/**
|
|
11
|
+
* User's full name.
|
|
12
|
+
*
|
|
13
|
+
* @example "John Doe"
|
|
14
|
+
*/
|
|
15
|
+
name: string;
|
|
16
|
+
/**
|
|
17
|
+
* User's email address.
|
|
18
|
+
* Must be a valid email format.
|
|
19
|
+
*
|
|
20
|
+
* @example "john.doe@example.com"
|
|
21
|
+
*/
|
|
22
|
+
email: string;
|
|
23
|
+
/**
|
|
24
|
+
* User's password.
|
|
25
|
+
* Must be a strong password with minimum 8 characters.
|
|
26
|
+
*
|
|
27
|
+
* @example "SecurePass123!"
|
|
28
|
+
*/
|
|
29
|
+
password: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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 { IsEmail, IsString, IsStrongPassword } from 'class-validator';
|
|
11
|
+
/**
|
|
12
|
+
* DTO for user registration requests.
|
|
13
|
+
*
|
|
14
|
+
* Used by the Auth microservice to handle new user registrations.
|
|
15
|
+
* Validates user input for creating new accounts with email and password.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
*/
|
|
19
|
+
export class RegisterUserDto {
|
|
20
|
+
/**
|
|
21
|
+
* User's full name.
|
|
22
|
+
*
|
|
23
|
+
* @example "John Doe"
|
|
24
|
+
*/
|
|
25
|
+
name;
|
|
26
|
+
/**
|
|
27
|
+
* User's email address.
|
|
28
|
+
* Must be a valid email format.
|
|
29
|
+
*
|
|
30
|
+
* @example "john.doe@example.com"
|
|
31
|
+
*/
|
|
32
|
+
email;
|
|
33
|
+
/**
|
|
34
|
+
* User's password.
|
|
35
|
+
* Must be a strong password with minimum 8 characters.
|
|
36
|
+
*
|
|
37
|
+
* @example "SecurePass123!"
|
|
38
|
+
*/
|
|
39
|
+
password;
|
|
40
|
+
}
|
|
41
|
+
__decorate([
|
|
42
|
+
IsString(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], RegisterUserDto.prototype, "name", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
IsString(),
|
|
47
|
+
IsEmail(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], RegisterUserDto.prototype, "email", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
IsString(),
|
|
52
|
+
IsStrongPassword({
|
|
53
|
+
minLength: 8,
|
|
54
|
+
}),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], RegisterUserDto.prototype, "password", void 0);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for creating a new category.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to create new product categories.
|
|
5
|
+
* Categories organize products and help customers navigate the menu.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class CreateCategoryDto {
|
|
10
|
+
/**
|
|
11
|
+
* Category name.
|
|
12
|
+
* Must not be empty.
|
|
13
|
+
*
|
|
14
|
+
* @example "Beverages"
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional category description.
|
|
19
|
+
*
|
|
20
|
+
* @example "All types of drinks and beverages"
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Category status (active/inactive).
|
|
25
|
+
* Defaults to true if not provided.
|
|
26
|
+
*
|
|
27
|
+
* @example true
|
|
28
|
+
* @default true
|
|
29
|
+
*/
|
|
30
|
+
status?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* User who created the category.
|
|
33
|
+
* Must be a valid MongoDB ObjectId.
|
|
34
|
+
*
|
|
35
|
+
* @example "507f1f77bcf86cd799439011"
|
|
36
|
+
*/
|
|
37
|
+
createdBy: string;
|
|
38
|
+
}
|