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,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Recipe DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for managing product recipe entries
|
|
5
|
+
* in the Products microservice.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-product-recipe.dto';
|
|
10
|
+
export * from './update-product-recipe.dto';
|
|
11
|
+
export * from './replace-by-product-id.dto';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CreateProductRecipeDto } from './create-product-recipe.dto';
|
|
2
|
+
/**
|
|
3
|
+
* DTO for replacing all product-recipe relationships.
|
|
4
|
+
*
|
|
5
|
+
* Used by the Products microservice to replace all recipe entries
|
|
6
|
+
* for a product in a single operation. Existing recipes are removed
|
|
7
|
+
* and replaced with the new ones provided.
|
|
8
|
+
*
|
|
9
|
+
* @since 2.0.0
|
|
10
|
+
*/
|
|
11
|
+
export declare class ReplaceProductRecipesByProductIdDto {
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier of the product.
|
|
14
|
+
* Must be a valid UUID and not be empty.
|
|
15
|
+
*
|
|
16
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
17
|
+
*/
|
|
18
|
+
productId: string;
|
|
19
|
+
/**
|
|
20
|
+
* Array of recipes to replace existing ones.
|
|
21
|
+
* Can be empty to remove all recipes.
|
|
22
|
+
* Each recipe is validated as a ProductRecipeDataDto.
|
|
23
|
+
*
|
|
24
|
+
* @example [{ ingredientId: "...", quantity: 200, unit: "grams" }]
|
|
25
|
+
*/
|
|
26
|
+
recipes: CreateProductRecipeDto[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsNotEmpty, IsUUID, IsArray, ValidateNested, ArrayMinSize, } from 'class-validator';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
import { CreateProductRecipeDto } from './create-product-recipe.dto';
|
|
13
|
+
/**
|
|
14
|
+
* DTO for replacing all product-recipe relationships.
|
|
15
|
+
*
|
|
16
|
+
* Used by the Products microservice to replace all recipe entries
|
|
17
|
+
* for a product in a single operation. Existing recipes are removed
|
|
18
|
+
* and replaced with the new ones provided.
|
|
19
|
+
*
|
|
20
|
+
* @since 2.0.0
|
|
21
|
+
*/
|
|
22
|
+
export class ReplaceProductRecipesByProductIdDto {
|
|
23
|
+
/**
|
|
24
|
+
* Unique identifier of the product.
|
|
25
|
+
* Must be a valid UUID and not be empty.
|
|
26
|
+
*
|
|
27
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
28
|
+
*/
|
|
29
|
+
productId;
|
|
30
|
+
/**
|
|
31
|
+
* Array of recipes to replace existing ones.
|
|
32
|
+
* Can be empty to remove all recipes.
|
|
33
|
+
* Each recipe is validated as a ProductRecipeDataDto.
|
|
34
|
+
*
|
|
35
|
+
* @example [{ ingredientId: "...", quantity: 200, unit: "grams" }]
|
|
36
|
+
*/
|
|
37
|
+
recipes;
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
IsString(),
|
|
41
|
+
IsNotEmpty({ message: 'Product ID is required' }),
|
|
42
|
+
IsUUID(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], ReplaceProductRecipesByProductIdDto.prototype, "productId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
IsArray(),
|
|
47
|
+
ArrayMinSize(0, { message: 'Recipes array can be empty' }),
|
|
48
|
+
ValidateNested({ each: true }),
|
|
49
|
+
Type(() => CreateProductRecipeDto),
|
|
50
|
+
__metadata("design:type", Array)
|
|
51
|
+
], ReplaceProductRecipesByProductIdDto.prototype, "recipes", void 0);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for updating an existing product recipe entry.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to update recipe details.
|
|
5
|
+
* All fields are optional except the recipe ID.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class UpdateProductRecipeDto {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier of the recipe to update.
|
|
12
|
+
* Must be a valid UUID if provided.
|
|
13
|
+
*
|
|
14
|
+
* @example "990e8400-e29b-41d4-a716-446655440005"
|
|
15
|
+
*/
|
|
16
|
+
id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional unique identifier of the ingredient.
|
|
19
|
+
* Must be a valid UUID if provided.
|
|
20
|
+
*
|
|
21
|
+
* @example "660e8400-e29b-41d4-a716-446655440001"
|
|
22
|
+
*/
|
|
23
|
+
ingredientId?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional quantity of the ingredient needed.
|
|
26
|
+
* Must be a positive number if provided.
|
|
27
|
+
*
|
|
28
|
+
* @example 250
|
|
29
|
+
*/
|
|
30
|
+
quantity?: number;
|
|
31
|
+
/**
|
|
32
|
+
* Optional unit of measurement for the ingredient quantity.
|
|
33
|
+
*
|
|
34
|
+
* @example "ml"
|
|
35
|
+
*/
|
|
36
|
+
unit?: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsOptional, IsNumber, IsPositive, IsNotEmpty, IsUUID, } from 'class-validator';
|
|
11
|
+
/**
|
|
12
|
+
* DTO for updating an existing product recipe entry.
|
|
13
|
+
*
|
|
14
|
+
* Used by the Products microservice to update recipe details.
|
|
15
|
+
* All fields are optional except the recipe ID.
|
|
16
|
+
*
|
|
17
|
+
* @since 2.0.0
|
|
18
|
+
*/
|
|
19
|
+
export class UpdateProductRecipeDto {
|
|
20
|
+
/**
|
|
21
|
+
* Unique identifier of the recipe to update.
|
|
22
|
+
* Must be a valid UUID if provided.
|
|
23
|
+
*
|
|
24
|
+
* @example "990e8400-e29b-41d4-a716-446655440005"
|
|
25
|
+
*/
|
|
26
|
+
id;
|
|
27
|
+
/**
|
|
28
|
+
* Optional unique identifier of the ingredient.
|
|
29
|
+
* Must be a valid UUID if provided.
|
|
30
|
+
*
|
|
31
|
+
* @example "660e8400-e29b-41d4-a716-446655440001"
|
|
32
|
+
*/
|
|
33
|
+
ingredientId;
|
|
34
|
+
/**
|
|
35
|
+
* Optional quantity of the ingredient needed.
|
|
36
|
+
* Must be a positive number if provided.
|
|
37
|
+
*
|
|
38
|
+
* @example 250
|
|
39
|
+
*/
|
|
40
|
+
quantity;
|
|
41
|
+
/**
|
|
42
|
+
* Optional unit of measurement for the ingredient quantity.
|
|
43
|
+
*
|
|
44
|
+
* @example "ml"
|
|
45
|
+
*/
|
|
46
|
+
unit;
|
|
47
|
+
}
|
|
48
|
+
__decorate([
|
|
49
|
+
IsString(),
|
|
50
|
+
IsOptional(),
|
|
51
|
+
IsUUID(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], UpdateProductRecipeDto.prototype, "id", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
IsOptional(),
|
|
56
|
+
IsString(),
|
|
57
|
+
IsUUID(),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], UpdateProductRecipeDto.prototype, "ingredientId", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
IsOptional(),
|
|
62
|
+
IsNumber({}, { message: 'Quantity must be a number' }),
|
|
63
|
+
IsPositive({ message: 'Quantity must be a positive number' }),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], UpdateProductRecipeDto.prototype, "quantity", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
IsOptional(),
|
|
68
|
+
IsString(),
|
|
69
|
+
IsNotEmpty({ message: 'Unit cannot be empty if provided' }),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], UpdateProductRecipeDto.prototype, "unit", void 0);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for creating a new product schedule.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to define availability schedules
|
|
5
|
+
* for products. Schedules specify when a product is available during the week.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class CreateProductScheduleDto {
|
|
10
|
+
/**
|
|
11
|
+
* Optional unique identifier of the product.
|
|
12
|
+
* Must be a valid UUID if provided.
|
|
13
|
+
*
|
|
14
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
15
|
+
*/
|
|
16
|
+
productId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Day of week (0-6, where 0 is Sunday and 6 is Saturday).
|
|
19
|
+
* Must be an integer between 0 and 6.
|
|
20
|
+
*
|
|
21
|
+
* @example 1 (Monday)
|
|
22
|
+
*/
|
|
23
|
+
dayOfWeek: number;
|
|
24
|
+
/**
|
|
25
|
+
* Start time in HH:MM format (24-hour format).
|
|
26
|
+
* Must match the pattern HH:MM where HH is 00-23 and MM is 00-59.
|
|
27
|
+
*
|
|
28
|
+
* @example "09:00"
|
|
29
|
+
*/
|
|
30
|
+
startTime: string;
|
|
31
|
+
/**
|
|
32
|
+
* End time in HH:MM format (24-hour format).
|
|
33
|
+
* Must match the pattern HH:MM where HH is 00-23 and MM is 00-59.
|
|
34
|
+
*
|
|
35
|
+
* @example "22:00"
|
|
36
|
+
*/
|
|
37
|
+
endTime: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
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, IsInt, Min, Max, Matches, IsOptional, IsUUID } from 'class-validator';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
/**
|
|
13
|
+
* DTO for creating a new product schedule.
|
|
14
|
+
*
|
|
15
|
+
* Used by the Products microservice to define availability schedules
|
|
16
|
+
* for products. Schedules specify when a product is available during the week.
|
|
17
|
+
*
|
|
18
|
+
* @since 2.0.0
|
|
19
|
+
*/
|
|
20
|
+
export class CreateProductScheduleDto {
|
|
21
|
+
/**
|
|
22
|
+
* Optional unique identifier of the product.
|
|
23
|
+
* Must be a valid UUID if provided.
|
|
24
|
+
*
|
|
25
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
26
|
+
*/
|
|
27
|
+
productId;
|
|
28
|
+
/**
|
|
29
|
+
* Day of week (0-6, where 0 is Sunday and 6 is Saturday).
|
|
30
|
+
* Must be an integer between 0 and 6.
|
|
31
|
+
*
|
|
32
|
+
* @example 1 (Monday)
|
|
33
|
+
*/
|
|
34
|
+
dayOfWeek;
|
|
35
|
+
/**
|
|
36
|
+
* Start time in HH:MM format (24-hour format).
|
|
37
|
+
* Must match the pattern HH:MM where HH is 00-23 and MM is 00-59.
|
|
38
|
+
*
|
|
39
|
+
* @example "09:00"
|
|
40
|
+
*/
|
|
41
|
+
startTime;
|
|
42
|
+
/**
|
|
43
|
+
* End time in HH:MM format (24-hour format).
|
|
44
|
+
* Must match the pattern HH:MM where HH is 00-23 and MM is 00-59.
|
|
45
|
+
*
|
|
46
|
+
* @example "22:00"
|
|
47
|
+
*/
|
|
48
|
+
endTime;
|
|
49
|
+
}
|
|
50
|
+
__decorate([
|
|
51
|
+
IsString(),
|
|
52
|
+
IsOptional(),
|
|
53
|
+
IsUUID(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], CreateProductScheduleDto.prototype, "productId", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
IsInt({ message: 'Day of week must be an integer' }),
|
|
58
|
+
Min(0, { message: 'Day of week must be at least 0 (Sunday)' }),
|
|
59
|
+
Max(6, { message: 'Day of week must be at most 6 (Saturday)' }),
|
|
60
|
+
Type(() => Number),
|
|
61
|
+
__metadata("design:type", Number)
|
|
62
|
+
], CreateProductScheduleDto.prototype, "dayOfWeek", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
IsString(),
|
|
65
|
+
IsNotEmpty({ message: 'Start time is required' }),
|
|
66
|
+
Matches(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/, {
|
|
67
|
+
message: 'Start time must be in HH:MM format (e.g., 09:00 or 18:30)',
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], CreateProductScheduleDto.prototype, "startTime", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
IsString(),
|
|
73
|
+
IsNotEmpty({ message: 'End time is required' }),
|
|
74
|
+
Matches(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/, {
|
|
75
|
+
message: 'End time must be in HH:MM format (e.g., 09:00 or 18:30)',
|
|
76
|
+
}),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], CreateProductScheduleDto.prototype, "endTime", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Schedule DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for managing product availability schedules
|
|
5
|
+
* in the Products microservice.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-product-schedule.dto';
|
|
10
|
+
export * from './update-product-schedule.dto';
|
|
11
|
+
export * from './replace-by-product-id.dto';
|
|
12
|
+
export * from './is-available-at-time.dto';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Product Schedule DTOs.
|
|
3
|
+
*
|
|
4
|
+
* This module exports DTOs used for managing product availability schedules
|
|
5
|
+
* in the Products microservice.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export * from './create-product-schedule.dto';
|
|
10
|
+
export * from './update-product-schedule.dto';
|
|
11
|
+
export * from './replace-by-product-id.dto';
|
|
12
|
+
export * from './is-available-at-time.dto';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for checking product availability at a specific time.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to verify if a product
|
|
5
|
+
* is available for ordering at a given day and time.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class IsAvailableAtTimeDto {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier of the product.
|
|
12
|
+
* Must be a valid UUID and not be empty.
|
|
13
|
+
*
|
|
14
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
15
|
+
*/
|
|
16
|
+
productId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Day of week (0-6, where 0 is Sunday and 6 is Saturday).
|
|
19
|
+
* Must be an integer between 0 and 6.
|
|
20
|
+
*
|
|
21
|
+
* @example 1 (Monday)
|
|
22
|
+
*/
|
|
23
|
+
dayOfWeek: number;
|
|
24
|
+
/**
|
|
25
|
+
* Time to check availability in HH:MM format.
|
|
26
|
+
* Must not be empty.
|
|
27
|
+
*
|
|
28
|
+
* @example "14:30"
|
|
29
|
+
*/
|
|
30
|
+
time: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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, IsInt, Min, Max, IsUUID } from 'class-validator';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
/**
|
|
13
|
+
* DTO for checking product availability at a specific time.
|
|
14
|
+
*
|
|
15
|
+
* Used by the Products microservice to verify if a product
|
|
16
|
+
* is available for ordering at a given day and time.
|
|
17
|
+
*
|
|
18
|
+
* @since 2.0.0
|
|
19
|
+
*/
|
|
20
|
+
export class IsAvailableAtTimeDto {
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier of the product.
|
|
23
|
+
* Must be a valid UUID and not be empty.
|
|
24
|
+
*
|
|
25
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
26
|
+
*/
|
|
27
|
+
productId;
|
|
28
|
+
/**
|
|
29
|
+
* Day of week (0-6, where 0 is Sunday and 6 is Saturday).
|
|
30
|
+
* Must be an integer between 0 and 6.
|
|
31
|
+
*
|
|
32
|
+
* @example 1 (Monday)
|
|
33
|
+
*/
|
|
34
|
+
dayOfWeek;
|
|
35
|
+
/**
|
|
36
|
+
* Time to check availability in HH:MM format.
|
|
37
|
+
* Must not be empty.
|
|
38
|
+
*
|
|
39
|
+
* @example "14:30"
|
|
40
|
+
*/
|
|
41
|
+
time;
|
|
42
|
+
}
|
|
43
|
+
__decorate([
|
|
44
|
+
IsString(),
|
|
45
|
+
IsNotEmpty({ message: 'Product ID is required' }),
|
|
46
|
+
IsUUID(),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], IsAvailableAtTimeDto.prototype, "productId", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
IsInt({ message: 'Day of week must be an integer' }),
|
|
51
|
+
Min(0, { message: 'Day of week must be at least 0 (Sunday)' }),
|
|
52
|
+
Max(6, { message: 'Day of week must be at most 6 (Saturday)' }),
|
|
53
|
+
Type(() => Number),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], IsAvailableAtTimeDto.prototype, "dayOfWeek", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
IsString(),
|
|
58
|
+
IsNotEmpty({ message: 'Time is required' }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], IsAvailableAtTimeDto.prototype, "time", void 0);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CreateProductScheduleDto } from './create-product-schedule.dto';
|
|
2
|
+
/**
|
|
3
|
+
* DTO for replacing all product schedules.
|
|
4
|
+
*
|
|
5
|
+
* Used by the Products microservice to replace all schedules
|
|
6
|
+
* for a product in a single operation. Existing schedules are removed
|
|
7
|
+
* and replaced with the new ones provided.
|
|
8
|
+
*
|
|
9
|
+
* @since 2.0.0
|
|
10
|
+
*/
|
|
11
|
+
export declare class ReplaceProductSchedulesByProductIdDto {
|
|
12
|
+
/**
|
|
13
|
+
* Unique identifier of the product.
|
|
14
|
+
* Must be a valid UUID and not be empty.
|
|
15
|
+
*
|
|
16
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
17
|
+
*/
|
|
18
|
+
productId: string;
|
|
19
|
+
/**
|
|
20
|
+
* Array of schedules to replace existing ones.
|
|
21
|
+
* Can be empty to remove all schedules.
|
|
22
|
+
* Each schedule is validated as a ProductScheduleDataDto.
|
|
23
|
+
*
|
|
24
|
+
* @example [{ dayOfWeek: 1, startTime: "09:00", endTime: "18:00" }]
|
|
25
|
+
*/
|
|
26
|
+
schedules: CreateProductScheduleDto[];
|
|
27
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsNotEmpty, IsArray, ValidateNested, ArrayMinSize, IsUUID } from 'class-validator';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
import { CreateProductScheduleDto } from './create-product-schedule.dto';
|
|
13
|
+
/**
|
|
14
|
+
* DTO for replacing all product schedules.
|
|
15
|
+
*
|
|
16
|
+
* Used by the Products microservice to replace all schedules
|
|
17
|
+
* for a product in a single operation. Existing schedules are removed
|
|
18
|
+
* and replaced with the new ones provided.
|
|
19
|
+
*
|
|
20
|
+
* @since 2.0.0
|
|
21
|
+
*/
|
|
22
|
+
export class ReplaceProductSchedulesByProductIdDto {
|
|
23
|
+
/**
|
|
24
|
+
* Unique identifier of the product.
|
|
25
|
+
* Must be a valid UUID and not be empty.
|
|
26
|
+
*
|
|
27
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
28
|
+
*/
|
|
29
|
+
productId;
|
|
30
|
+
/**
|
|
31
|
+
* Array of schedules to replace existing ones.
|
|
32
|
+
* Can be empty to remove all schedules.
|
|
33
|
+
* Each schedule is validated as a ProductScheduleDataDto.
|
|
34
|
+
*
|
|
35
|
+
* @example [{ dayOfWeek: 1, startTime: "09:00", endTime: "18:00" }]
|
|
36
|
+
*/
|
|
37
|
+
schedules;
|
|
38
|
+
}
|
|
39
|
+
__decorate([
|
|
40
|
+
IsString(),
|
|
41
|
+
IsNotEmpty({ message: 'Product ID is required' }),
|
|
42
|
+
IsUUID(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], ReplaceProductSchedulesByProductIdDto.prototype, "productId", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
IsArray(),
|
|
47
|
+
ArrayMinSize(0, { message: 'Schedules array can be empty' }),
|
|
48
|
+
ValidateNested({ each: true }),
|
|
49
|
+
Type(() => CreateProductScheduleDto),
|
|
50
|
+
__metadata("design:type", Array)
|
|
51
|
+
], ReplaceProductSchedulesByProductIdDto.prototype, "schedules", void 0);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for updating an existing product schedule.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to update schedule details.
|
|
5
|
+
* All fields are optional except the schedule ID.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class UpdateProductScheduleDto {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier of the schedule to update.
|
|
12
|
+
* Must be a valid UUID if provided.
|
|
13
|
+
*
|
|
14
|
+
* @example "880e8400-e29b-41d4-a716-446655440004"
|
|
15
|
+
*/
|
|
16
|
+
id?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional day of week (0-6, where 0 is Sunday and 6 is Saturday).
|
|
19
|
+
* Must be an integer between 0 and 6 if provided.
|
|
20
|
+
*
|
|
21
|
+
* @example 1 (Monday)
|
|
22
|
+
*/
|
|
23
|
+
dayOfWeek?: number;
|
|
24
|
+
/**
|
|
25
|
+
* Optional start time in HH:MM format (24-hour format).
|
|
26
|
+
* Must match the pattern HH:MM if provided.
|
|
27
|
+
*
|
|
28
|
+
* @example "09:00"
|
|
29
|
+
*/
|
|
30
|
+
startTime?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional end time in HH:MM format (24-hour format).
|
|
33
|
+
* Must match the pattern HH:MM if provided.
|
|
34
|
+
*
|
|
35
|
+
* @example "22:00"
|
|
36
|
+
*/
|
|
37
|
+
endTime?: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
+
};
|
|
10
|
+
import { IsString, IsOptional, IsInt, Min, Max, Matches, IsUUID, } from 'class-validator';
|
|
11
|
+
import { Type } from 'class-transformer';
|
|
12
|
+
/**
|
|
13
|
+
* DTO for updating an existing product schedule.
|
|
14
|
+
*
|
|
15
|
+
* Used by the Products microservice to update schedule details.
|
|
16
|
+
* All fields are optional except the schedule ID.
|
|
17
|
+
*
|
|
18
|
+
* @since 2.0.0
|
|
19
|
+
*/
|
|
20
|
+
export class UpdateProductScheduleDto {
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier of the schedule to update.
|
|
23
|
+
* Must be a valid UUID if provided.
|
|
24
|
+
*
|
|
25
|
+
* @example "880e8400-e29b-41d4-a716-446655440004"
|
|
26
|
+
*/
|
|
27
|
+
id;
|
|
28
|
+
/**
|
|
29
|
+
* Optional day of week (0-6, where 0 is Sunday and 6 is Saturday).
|
|
30
|
+
* Must be an integer between 0 and 6 if provided.
|
|
31
|
+
*
|
|
32
|
+
* @example 1 (Monday)
|
|
33
|
+
*/
|
|
34
|
+
dayOfWeek;
|
|
35
|
+
/**
|
|
36
|
+
* Optional start time in HH:MM format (24-hour format).
|
|
37
|
+
* Must match the pattern HH:MM if provided.
|
|
38
|
+
*
|
|
39
|
+
* @example "09:00"
|
|
40
|
+
*/
|
|
41
|
+
startTime;
|
|
42
|
+
/**
|
|
43
|
+
* Optional end time in HH:MM format (24-hour format).
|
|
44
|
+
* Must match the pattern HH:MM if provided.
|
|
45
|
+
*
|
|
46
|
+
* @example "22:00"
|
|
47
|
+
*/
|
|
48
|
+
endTime;
|
|
49
|
+
}
|
|
50
|
+
__decorate([
|
|
51
|
+
IsString(),
|
|
52
|
+
IsOptional(),
|
|
53
|
+
IsUUID(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], UpdateProductScheduleDto.prototype, "id", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
IsOptional(),
|
|
58
|
+
IsInt({ message: 'Day of week must be an integer' }),
|
|
59
|
+
Min(0, { message: 'Day of week must be at least 0 (Sunday)' }),
|
|
60
|
+
Max(6, { message: 'Day of week must be at most 6 (Saturday)' }),
|
|
61
|
+
Type(() => Number),
|
|
62
|
+
__metadata("design:type", Number)
|
|
63
|
+
], UpdateProductScheduleDto.prototype, "dayOfWeek", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
IsOptional(),
|
|
66
|
+
IsString(),
|
|
67
|
+
Matches(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/, {
|
|
68
|
+
message: 'Start time must be in HH:MM format (e.g., 09:00 or 18:30)',
|
|
69
|
+
}),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], UpdateProductScheduleDto.prototype, "startTime", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
IsOptional(),
|
|
74
|
+
IsString(),
|
|
75
|
+
Matches(/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/, {
|
|
76
|
+
message: 'End time must be in HH:MM format (e.g., 09:00 or 18:30)',
|
|
77
|
+
}),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], UpdateProductScheduleDto.prototype, "endTime", void 0);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DTO for creating a new product size.
|
|
3
|
+
*
|
|
4
|
+
* Used by the Products microservice to create size variants for products.
|
|
5
|
+
* Each size variant has a name, price, and optional status.
|
|
6
|
+
*
|
|
7
|
+
* @since 2.0.0
|
|
8
|
+
*/
|
|
9
|
+
export declare class CreateProductSizeDto {
|
|
10
|
+
/**
|
|
11
|
+
* Unique identifier of the product.
|
|
12
|
+
* Must not be empty and must be a valid UUID.
|
|
13
|
+
*
|
|
14
|
+
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
15
|
+
*/
|
|
16
|
+
productId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Name of the size variant.
|
|
19
|
+
* Must not be empty and maximum length of 50 characters.
|
|
20
|
+
*
|
|
21
|
+
* @example "Large"
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Price for this size variant.
|
|
26
|
+
* Must be a positive number.
|
|
27
|
+
*
|
|
28
|
+
* @example 12.99
|
|
29
|
+
*/
|
|
30
|
+
price: number;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the size is active.
|
|
33
|
+
* Defaults to true if not provided.
|
|
34
|
+
*
|
|
35
|
+
* @example true
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
status?: boolean;
|
|
39
|
+
}
|