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,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized DTOs for the QeHay platform.
|
|
3
|
+
*
|
|
4
|
+
* This module exports all DTOs organized by domain for use across
|
|
5
|
+
* all microservices and the client gateway.
|
|
6
|
+
*
|
|
7
|
+
* Usage examples:
|
|
8
|
+
* - import { CreateOrderDto, OrderItemDto } from 'looroh-sdk-qhay-interfaces';
|
|
9
|
+
* - import { CreateProductDto, UpdateProductDto } from 'looroh-sdk-qhay-interfaces';
|
|
10
|
+
* - import { PaymentSessionDto } from 'looroh-sdk-qhay-interfaces';
|
|
11
|
+
*
|
|
12
|
+
* All DTOs include validation decorators from class-validator and
|
|
13
|
+
* are properly documented for API documentation generation.
|
|
14
|
+
*
|
|
15
|
+
* @since 2.0.0
|
|
16
|
+
*/
|
|
17
|
+
// Common DTOs
|
|
18
|
+
export * from "./common";
|
|
19
|
+
// Auth DTOs
|
|
20
|
+
export * from "./auth";
|
|
21
|
+
// Order DTOs
|
|
22
|
+
export * from "./orders";
|
|
23
|
+
// Payment DTOs
|
|
24
|
+
export * from "./payments";
|
|
25
|
+
// Product DTOs
|
|
26
|
+
export * from "./products";
|
|
27
|
+
// Category DTOs
|
|
28
|
+
export * from "./categories";
|
|
29
|
+
// Restaurant DTOs
|
|
30
|
+
export * from "./restaurants";
|
|
31
|
+
// Chain DTOs
|
|
32
|
+
export * from "./chain";
|
|
33
|
+
// Tag DTOs
|
|
34
|
+
export * from "./tags";
|
|
35
|
+
// Ingredient DTOs
|
|
36
|
+
export * from "./ingredients";
|
|
37
|
+
// Question DTOs
|
|
38
|
+
export * from "./questions";
|
|
39
|
+
// Translations DTOs
|
|
40
|
+
export * from "./translations";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for creating a new ingredient.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to create new ingredients.
|
|
5
|
+
* Ingredients are used in recipes and inventory management.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class CreateIngredientDto {
|
|
10
|
+
/**
|
|
11
|
+
* Name of the ingredient.
|
|
12
|
+
* Must not be empty and maximum length of 100 characters.
|
|
13
|
+
*
|
|
14
|
+
* @example "Tomato"
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* Unit of measurement for the ingredient.
|
|
19
|
+
* Must not be empty and maximum length of 20 characters.
|
|
20
|
+
*
|
|
21
|
+
* @example "kg"
|
|
22
|
+
*/
|
|
23
|
+
unit: string;
|
|
24
|
+
/**
|
|
25
|
+
* User who created the ingredient.
|
|
26
|
+
* Must be a valid MongoDB ObjectId.
|
|
27
|
+
*
|
|
28
|
+
* @example "507f1f77bcf86cd799439011"
|
|
29
|
+
*/
|
|
30
|
+
createdBy: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
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, MaxLength, IsMongoId } from 'class-validator';
|
|
11
|
+
/**
|
|
12
|
+
* DTO for creating a new ingredient.
|
|
13
|
+
*
|
|
14
|
+
* Used by the Products microservice to create new ingredients.
|
|
15
|
+
* Ingredients are used in recipes and inventory management.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
*/
|
|
19
|
+
export class CreateIngredientDto {
|
|
20
|
+
/**
|
|
21
|
+
* Name of the ingredient.
|
|
22
|
+
* Must not be empty and maximum length of 100 characters.
|
|
23
|
+
*
|
|
24
|
+
* @example "Tomato"
|
|
25
|
+
*/
|
|
26
|
+
name;
|
|
27
|
+
/**
|
|
28
|
+
* Unit of measurement for the ingredient.
|
|
29
|
+
* Must not be empty and maximum length of 20 characters.
|
|
30
|
+
*
|
|
31
|
+
* @example "kg"
|
|
32
|
+
*/
|
|
33
|
+
unit;
|
|
34
|
+
/**
|
|
35
|
+
* User who created the ingredient.
|
|
36
|
+
* Must be a valid MongoDB ObjectId.
|
|
37
|
+
*
|
|
38
|
+
* @example "507f1f77bcf86cd799439011"
|
|
39
|
+
*/
|
|
40
|
+
createdBy;
|
|
41
|
+
}
|
|
42
|
+
__decorate([
|
|
43
|
+
IsString(),
|
|
44
|
+
IsNotEmpty({ message: 'Ingredient name is required' }),
|
|
45
|
+
MaxLength(100, { message: 'Ingredient name must be at most 100 characters' }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], CreateIngredientDto.prototype, "name", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
IsString(),
|
|
50
|
+
IsNotEmpty({ message: 'Unit is required' }),
|
|
51
|
+
MaxLength(20, { message: 'Unit must be at most 20 characters' }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], CreateIngredientDto.prototype, "unit", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
IsString(),
|
|
56
|
+
IsMongoId(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], CreateIngredientDto.prototype, "createdBy", void 0);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for deleting an ingredient.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to soft-delete ingredients.
|
|
5
|
+
* Includes ingredient ID and user who performed the deletion.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class DeleteIngredientDto {
|
|
10
|
+
/**
|
|
11
|
+
* Ingredient ID to delete.
|
|
12
|
+
* Must be a valid UUID.
|
|
13
|
+
*
|
|
14
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* User who deleted the ingredient.
|
|
19
|
+
* Must be a valid MongoDB ObjectId.
|
|
20
|
+
*
|
|
21
|
+
* @example "507f1f77bcf86cd799439011"
|
|
22
|
+
*/
|
|
23
|
+
deletedBy: 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 { IsString, IsMongoId, IsUUID } from 'class-validator';
|
|
11
|
+
/**
|
|
12
|
+
* DTO for deleting an ingredient.
|
|
13
|
+
*
|
|
14
|
+
* Used by the Products microservice to soft-delete ingredients.
|
|
15
|
+
* Includes ingredient ID and user who performed the deletion.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
*/
|
|
19
|
+
export class DeleteIngredientDto {
|
|
20
|
+
/**
|
|
21
|
+
* Ingredient ID to delete.
|
|
22
|
+
* Must be a valid UUID.
|
|
23
|
+
*
|
|
24
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
25
|
+
*/
|
|
26
|
+
id;
|
|
27
|
+
/**
|
|
28
|
+
* User who deleted the ingredient.
|
|
29
|
+
* Must be a valid MongoDB ObjectId.
|
|
30
|
+
*
|
|
31
|
+
* @example "507f1f77bcf86cd799439011"
|
|
32
|
+
*/
|
|
33
|
+
deletedBy;
|
|
34
|
+
}
|
|
35
|
+
__decorate([
|
|
36
|
+
IsString(),
|
|
37
|
+
IsUUID(),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], DeleteIngredientDto.prototype, "id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
IsString(),
|
|
42
|
+
IsMongoId(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], DeleteIngredientDto.prototype, "deletedBy", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ingredient DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for ingredient management
|
|
5
|
+
* in the Products microservice.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-ingredient.dto';
|
|
10
|
+
export * from './update-ingredient.dto';
|
|
11
|
+
export * from './delete-ingredient.dto';
|
|
12
|
+
export * from './search-by-name.dto';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Ingredient DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for ingredient management
|
|
5
|
+
* in the Products microservice.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-ingredient.dto';
|
|
10
|
+
export * from './update-ingredient.dto';
|
|
11
|
+
export * from './delete-ingredient.dto';
|
|
12
|
+
export * from './search-by-name.dto';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { PaginationDto } from '../common/pagination.dto';
|
|
2
|
+
/**
|
|
3
|
+
* DTO for searching ingredients by name.
|
|
4
|
+
*
|
|
5
|
+
* Extends PaginationDto to include name search functionality.
|
|
6
|
+
* Used by the Products microservice to search ingredients by name with pagination.
|
|
7
|
+
*
|
|
8
|
+
* @since 2.0.0
|
|
9
|
+
*/
|
|
10
|
+
export declare class SearchIngredientByNameDto extends PaginationDto {
|
|
11
|
+
/**
|
|
12
|
+
* Search term for ingredient name.
|
|
13
|
+
* Must not be empty.
|
|
14
|
+
*
|
|
15
|
+
* @example "tomato"
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 } from 'class-validator';
|
|
11
|
+
import { PaginationDto } from '../common/pagination.dto';
|
|
12
|
+
/**
|
|
13
|
+
* DTO for searching ingredients by name.
|
|
14
|
+
*
|
|
15
|
+
* Extends PaginationDto to include name search functionality.
|
|
16
|
+
* Used by the Products microservice to search ingredients by name with pagination.
|
|
17
|
+
*
|
|
18
|
+
* @since 2.0.0
|
|
19
|
+
*/
|
|
20
|
+
export class SearchIngredientByNameDto extends PaginationDto {
|
|
21
|
+
/**
|
|
22
|
+
* Search term for ingredient name.
|
|
23
|
+
* Must not be empty.
|
|
24
|
+
*
|
|
25
|
+
* @example "tomato"
|
|
26
|
+
*/
|
|
27
|
+
name;
|
|
28
|
+
}
|
|
29
|
+
__decorate([
|
|
30
|
+
IsString(),
|
|
31
|
+
IsNotEmpty({ message: 'Search term is required' }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], SearchIngredientByNameDto.prototype, "name", void 0);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
declare const UpdateIngredientDto_base: import("@nestjs/mapped-types").MappedType<Partial<unknown>>;
|
|
2
|
+
/**
|
|
3
|
+
* DTO for updating an existing ingredient.
|
|
4
|
+
*
|
|
5
|
+
* Extends CreateIngredientDto with all fields optional.
|
|
6
|
+
* Used by the Products microservice to update ingredient details.
|
|
7
|
+
*
|
|
8
|
+
* @since 2.0.0
|
|
9
|
+
*/
|
|
10
|
+
export declare class UpdateIngredientDto extends UpdateIngredientDto_base {
|
|
11
|
+
/**
|
|
12
|
+
* Ingredient ID to update.
|
|
13
|
+
* Must be a valid UUID.
|
|
14
|
+
*
|
|
15
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
16
|
+
*/
|
|
17
|
+
id?: string;
|
|
18
|
+
/**
|
|
19
|
+
* User who updated the ingredient.
|
|
20
|
+
* Must be a valid MongoDB ObjectId if provided.
|
|
21
|
+
*
|
|
22
|
+
* @example "507f1f77bcf86cd799439011"
|
|
23
|
+
*/
|
|
24
|
+
updatedBy?: string;
|
|
25
|
+
}
|
|
26
|
+
export {};
|
|
@@ -0,0 +1,48 @@
|
|
|
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 { PartialType } from '@nestjs/mapped-types';
|
|
11
|
+
import { IsString, IsOptional, IsMongoId, IsUUID } from 'class-validator';
|
|
12
|
+
import { CreateIngredientDto } from './create-ingredient.dto';
|
|
13
|
+
/**
|
|
14
|
+
* DTO for updating an existing ingredient.
|
|
15
|
+
*
|
|
16
|
+
* Extends CreateIngredientDto with all fields optional.
|
|
17
|
+
* Used by the Products microservice to update ingredient details.
|
|
18
|
+
*
|
|
19
|
+
* @since 2.0.0
|
|
20
|
+
*/
|
|
21
|
+
export class UpdateIngredientDto extends PartialType(CreateIngredientDto) {
|
|
22
|
+
/**
|
|
23
|
+
* Ingredient ID to update.
|
|
24
|
+
* Must be a valid UUID.
|
|
25
|
+
*
|
|
26
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
27
|
+
*/
|
|
28
|
+
id;
|
|
29
|
+
/**
|
|
30
|
+
* User who updated the ingredient.
|
|
31
|
+
* Must be a valid MongoDB ObjectId if provided.
|
|
32
|
+
*
|
|
33
|
+
* @example "507f1f77bcf86cd799439011"
|
|
34
|
+
*/
|
|
35
|
+
updatedBy;
|
|
36
|
+
}
|
|
37
|
+
__decorate([
|
|
38
|
+
IsString(),
|
|
39
|
+
IsUUID(),
|
|
40
|
+
IsOptional(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], UpdateIngredientDto.prototype, "id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
IsString(),
|
|
45
|
+
IsMongoId(),
|
|
46
|
+
IsOptional(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], UpdateIngredientDto.prototype, "updatedBy", void 0);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OrderStatus } from '../../enums/order-status.enum';
|
|
2
|
+
/**
|
|
3
|
+
* DTO for changing an order's status.
|
|
4
|
+
*
|
|
5
|
+
* Used by the Orders microservice to update the status of an existing order.
|
|
6
|
+
* Validates the order ID and new status value.
|
|
7
|
+
*
|
|
8
|
+
* @since 2.0.0
|
|
9
|
+
*/
|
|
10
|
+
export declare class ChangeOrderStatusDto {
|
|
11
|
+
/**
|
|
12
|
+
* Unique identifier of the order to update.
|
|
13
|
+
* Must be a valid UUID version 4.
|
|
14
|
+
*
|
|
15
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* New status for the order.
|
|
20
|
+
* Must be a valid OrderStatus enum value.
|
|
21
|
+
*
|
|
22
|
+
* @example OrderStatus.CONFIRMED
|
|
23
|
+
*/
|
|
24
|
+
status: OrderStatus;
|
|
25
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { IsEnum, IsUUID } from 'class-validator';
|
|
11
|
+
import { OrderStatus } from '../../enums/order-status.enum';
|
|
12
|
+
/**
|
|
13
|
+
* DTO for changing an order's status.
|
|
14
|
+
*
|
|
15
|
+
* Used by the Orders microservice to update the status of an existing order.
|
|
16
|
+
* Validates the order ID and new status value.
|
|
17
|
+
*
|
|
18
|
+
* @since 2.0.0
|
|
19
|
+
*/
|
|
20
|
+
export class ChangeOrderStatusDto {
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier of the order to update.
|
|
23
|
+
* Must be a valid UUID version 4.
|
|
24
|
+
*
|
|
25
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
26
|
+
*/
|
|
27
|
+
id;
|
|
28
|
+
/**
|
|
29
|
+
* New status for the order.
|
|
30
|
+
* Must be a valid OrderStatus enum value.
|
|
31
|
+
*
|
|
32
|
+
* @example OrderStatus.CONFIRMED
|
|
33
|
+
*/
|
|
34
|
+
status;
|
|
35
|
+
}
|
|
36
|
+
__decorate([
|
|
37
|
+
IsUUID(4, { message: 'Order ID must be a valid UUID' }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], ChangeOrderStatusDto.prototype, "id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
IsEnum(OrderStatus, { message: 'Status must be a valid order status' }),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], ChangeOrderStatusDto.prototype, "status", void 0);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { OrderItemDto } from './order-item.dto';
|
|
2
|
+
import { OrderType } from '../../enums/order-type.enum';
|
|
3
|
+
/**
|
|
4
|
+
* DTO for creating a new order.
|
|
5
|
+
*
|
|
6
|
+
* Used by the Orders microservice to create new orders with items,
|
|
7
|
+
* order type, and optional delivery/pickup information.
|
|
8
|
+
* Validates the order structure and required fields based on order type.
|
|
9
|
+
*
|
|
10
|
+
* @since 2.0.0
|
|
11
|
+
*/
|
|
12
|
+
export declare class CreateOrderDto {
|
|
13
|
+
/**
|
|
14
|
+
* Array of items in the order.
|
|
15
|
+
* Must contain at least one item.
|
|
16
|
+
* Each item is validated as an OrderItemDto.
|
|
17
|
+
*
|
|
18
|
+
* @example [{ productId: "...", quantity: 2, price: 19.98 }]
|
|
19
|
+
*/
|
|
20
|
+
items: OrderItemDto[];
|
|
21
|
+
/**
|
|
22
|
+
* Type of order (DINE_IN, PICKUP, or DELIVERY).
|
|
23
|
+
* Determines the fulfillment flow and required fields.
|
|
24
|
+
*
|
|
25
|
+
* @example OrderType.DELIVERY
|
|
26
|
+
*/
|
|
27
|
+
mode: OrderType;
|
|
28
|
+
/**
|
|
29
|
+
* Optional table identifier for dine-in orders.
|
|
30
|
+
* Must be at least 2 characters long if provided.
|
|
31
|
+
*
|
|
32
|
+
* @example "Table 5"
|
|
33
|
+
*/
|
|
34
|
+
tableId?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Optional delivery address for delivery orders.
|
|
37
|
+
*
|
|
38
|
+
* @example "123 Main St, Downtown"
|
|
39
|
+
*/
|
|
40
|
+
deliveryAddress?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Optional pickup time for pickup orders.
|
|
43
|
+
* Must be a valid ISO date string if provided.
|
|
44
|
+
*
|
|
45
|
+
* @example "2024-01-15T18:30:00Z"
|
|
46
|
+
*/
|
|
47
|
+
pickupTime?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Payment method identifier.
|
|
50
|
+
* Required for orders that require payment before confirmation.
|
|
51
|
+
*
|
|
52
|
+
* @example "payment-method-uuid-123"
|
|
53
|
+
*/
|
|
54
|
+
paymentMethodId: string;
|
|
55
|
+
/**
|
|
56
|
+
* Optional user identifier who created the order.
|
|
57
|
+
* Must be a valid MongoDB ObjectId if provided.
|
|
58
|
+
*
|
|
59
|
+
* @example "507f1f77bcf86cd799439011"
|
|
60
|
+
*/
|
|
61
|
+
userId?: string;
|
|
62
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
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 { Type } from 'class-transformer';
|
|
11
|
+
import { IsArray, ArrayMinSize, ValidateNested, IsEnum, IsString, IsOptional, MinLength, IsMongoId, IsNotEmpty, IsDateString, } from 'class-validator';
|
|
12
|
+
import { OrderItemDto } from './order-item.dto';
|
|
13
|
+
import { OrderType } from '../../enums/order-type.enum';
|
|
14
|
+
/**
|
|
15
|
+
* DTO for creating a new order.
|
|
16
|
+
*
|
|
17
|
+
* Used by the Orders microservice to create new orders with items,
|
|
18
|
+
* order type, and optional delivery/pickup information.
|
|
19
|
+
* Validates the order structure and required fields based on order type.
|
|
20
|
+
*
|
|
21
|
+
* @since 2.0.0
|
|
22
|
+
*/
|
|
23
|
+
export class CreateOrderDto {
|
|
24
|
+
/**
|
|
25
|
+
* Array of items in the order.
|
|
26
|
+
* Must contain at least one item.
|
|
27
|
+
* Each item is validated as an OrderItemDto.
|
|
28
|
+
*
|
|
29
|
+
* @example [{ productId: "...", quantity: 2, price: 19.98 }]
|
|
30
|
+
*/
|
|
31
|
+
items;
|
|
32
|
+
/**
|
|
33
|
+
* Type of order (DINE_IN, PICKUP, or DELIVERY).
|
|
34
|
+
* Determines the fulfillment flow and required fields.
|
|
35
|
+
*
|
|
36
|
+
* @example OrderType.DELIVERY
|
|
37
|
+
*/
|
|
38
|
+
mode;
|
|
39
|
+
/**
|
|
40
|
+
* Optional table identifier for dine-in orders.
|
|
41
|
+
* Must be at least 2 characters long if provided.
|
|
42
|
+
*
|
|
43
|
+
* @example "Table 5"
|
|
44
|
+
*/
|
|
45
|
+
tableId;
|
|
46
|
+
/**
|
|
47
|
+
* Optional delivery address for delivery orders.
|
|
48
|
+
*
|
|
49
|
+
* @example "123 Main St, Downtown"
|
|
50
|
+
*/
|
|
51
|
+
deliveryAddress;
|
|
52
|
+
/**
|
|
53
|
+
* Optional pickup time for pickup orders.
|
|
54
|
+
* Must be a valid ISO date string if provided.
|
|
55
|
+
*
|
|
56
|
+
* @example "2024-01-15T18:30:00Z"
|
|
57
|
+
*/
|
|
58
|
+
pickupTime;
|
|
59
|
+
/**
|
|
60
|
+
* Payment method identifier.
|
|
61
|
+
* Required for orders that require payment before confirmation.
|
|
62
|
+
*
|
|
63
|
+
* @example "payment-method-uuid-123"
|
|
64
|
+
*/
|
|
65
|
+
paymentMethodId;
|
|
66
|
+
/**
|
|
67
|
+
* Optional user identifier who created the order.
|
|
68
|
+
* Must be a valid MongoDB ObjectId if provided.
|
|
69
|
+
*
|
|
70
|
+
* @example "507f1f77bcf86cd799439011"
|
|
71
|
+
*/
|
|
72
|
+
userId;
|
|
73
|
+
}
|
|
74
|
+
__decorate([
|
|
75
|
+
IsArray(),
|
|
76
|
+
ArrayMinSize(1, { message: 'Order must contain at least one item' }),
|
|
77
|
+
ValidateNested({ each: true }),
|
|
78
|
+
Type(() => OrderItemDto),
|
|
79
|
+
__metadata("design:type", Array)
|
|
80
|
+
], CreateOrderDto.prototype, "items", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
IsEnum(OrderType, { message: 'Order type must be DINE_IN, PICKUP, or DELIVERY' }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], CreateOrderDto.prototype, "mode", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
IsString(),
|
|
87
|
+
MinLength(2),
|
|
88
|
+
IsOptional(),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], CreateOrderDto.prototype, "tableId", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
IsString(),
|
|
93
|
+
IsOptional(),
|
|
94
|
+
__metadata("design:type", String)
|
|
95
|
+
], CreateOrderDto.prototype, "deliveryAddress", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
IsDateString(),
|
|
98
|
+
IsOptional(),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], CreateOrderDto.prototype, "pickupTime", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
IsString(),
|
|
103
|
+
IsNotEmpty({ message: 'Payment method ID is required' }),
|
|
104
|
+
__metadata("design:type", String)
|
|
105
|
+
], CreateOrderDto.prototype, "paymentMethodId", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
IsString(),
|
|
108
|
+
IsMongoId(),
|
|
109
|
+
IsOptional(),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], CreateOrderDto.prototype, "userId", void 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for order management
|
|
5
|
+
* in the Orders microservice and Client Gateway.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-order.dto';
|
|
10
|
+
export * from './update-order.dto';
|
|
11
|
+
export * from './order-item.dto';
|
|
12
|
+
export * from './change-order-status.dto';
|
|
13
|
+
export * from './order-pagination.dto';
|
|
14
|
+
export * from './paid-order.dto';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Order DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for order management
|
|
5
|
+
* in the Orders microservice and Client Gateway.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-order.dto';
|
|
10
|
+
export * from './update-order.dto';
|
|
11
|
+
export * from './order-item.dto';
|
|
12
|
+
export * from './change-order-status.dto';
|
|
13
|
+
export * from './order-pagination.dto';
|
|
14
|
+
export * from './paid-order.dto';
|