qeai-sdk 2.0.0 → 2.0.1
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/index.d.ts +14 -12
- package/dist/constants/index.js +16 -12
- package/dist/constants/product-commands.constant.d.ts +6 -0
- package/dist/constants/product-commands.constant.js +6 -0
- package/dist/constants/services-config.constant.d.ts +3 -0
- package/dist/constants/services-config.constant.js +1 -0
- package/dist/constants/translation-commands.constant.d.ts +35 -0
- package/dist/constants/translation-commands.constant.js +35 -0
- package/dist/dtos/auth/index.d.ts +2 -2
- package/dist/dtos/auth/index.js +2 -2
- package/dist/dtos/categories/index.d.ts +3 -3
- package/dist/dtos/categories/index.js +3 -3
- package/dist/dtos/categories/update-category.dto.d.ts +21 -4
- package/dist/dtos/categories/update-category.dto.js +39 -7
- package/dist/dtos/chain/create-chain.dto.d.ts +1 -1
- package/dist/dtos/chain/create-chain.dto.js +1 -1
- package/dist/dtos/chain/index.d.ts +3 -3
- package/dist/dtos/chain/index.js +3 -3
- package/dist/dtos/chain/update-chain.dto.d.ts +27 -3
- package/dist/dtos/chain/update-chain.dto.js +45 -4
- package/dist/dtos/common/index.d.ts +2 -1
- package/dist/dtos/common/index.js +2 -1
- package/dist/dtos/common/search-by-name.dto.d.ts +4 -0
- package/dist/dtos/common/search-by-name.dto.js +19 -0
- package/dist/dtos/index.d.ts +12 -12
- package/dist/dtos/index.js +12 -12
- package/dist/dtos/ingredients/index.d.ts +4 -4
- package/dist/dtos/ingredients/index.js +4 -4
- package/dist/dtos/ingredients/search-by-name.dto.d.ts +1 -1
- package/dist/dtos/ingredients/search-by-name.dto.js +1 -1
- package/dist/dtos/ingredients/update-ingredient.dto.d.ts +15 -3
- package/dist/dtos/ingredients/update-ingredient.dto.js +28 -4
- package/dist/dtos/orders/change-order-status.dto.d.ts +1 -1
- package/dist/dtos/orders/change-order-status.dto.js +1 -1
- package/dist/dtos/orders/create-order.dto.d.ts +2 -2
- package/dist/dtos/orders/create-order.dto.js +2 -2
- package/dist/dtos/orders/index.d.ts +5 -6
- package/dist/dtos/orders/index.js +5 -6
- package/dist/dtos/orders/order-pagination.dto.d.ts +2 -2
- package/dist/dtos/orders/order-pagination.dto.js +2 -2
- package/dist/dtos/payments/index.d.ts +3 -3
- package/dist/dtos/payments/index.js +3 -3
- package/dist/dtos/payments/payment-session.dto.d.ts +1 -1
- package/dist/dtos/payments/payment-session.dto.js +1 -1
- package/dist/dtos/products/create-product.dto.d.ts +1 -1
- package/dist/dtos/products/create-product.dto.js +1 -1
- package/dist/dtos/products/index.d.ts +4 -4
- package/dist/dtos/products/index.js +4 -4
- package/dist/dtos/products/submodules/index.d.ts +6 -6
- package/dist/dtos/products/submodules/index.js +6 -6
- package/dist/dtos/products/submodules/product-image/bulk-create-product-image.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-image/bulk-create-product-image.dto.js +1 -1
- package/dist/dtos/products/submodules/product-image/index.d.ts +4 -4
- package/dist/dtos/products/submodules/product-image/index.js +4 -4
- package/dist/dtos/products/submodules/product-question/create-product-question.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-question/create-product-question.dto.js +1 -1
- package/dist/dtos/products/submodules/product-question/find-by-product-id-and-type.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-question/find-by-product-id-and-type.dto.js +1 -1
- package/dist/dtos/products/submodules/product-question/index.d.ts +4 -4
- package/dist/dtos/products/submodules/product-question/index.js +4 -4
- package/dist/dtos/products/submodules/product-question/replace-by-product-id.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-question/replace-by-product-id.dto.js +1 -1
- package/dist/dtos/products/submodules/product-question/update-product-question.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-question/update-product-question.dto.js +1 -1
- package/dist/dtos/products/submodules/product-recipe/index.d.ts +3 -3
- package/dist/dtos/products/submodules/product-recipe/index.js +3 -3
- package/dist/dtos/products/submodules/product-recipe/replace-by-product-id.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-recipe/replace-by-product-id.dto.js +1 -1
- package/dist/dtos/products/submodules/product-schedule/index.d.ts +4 -4
- package/dist/dtos/products/submodules/product-schedule/index.js +4 -4
- package/dist/dtos/products/submodules/product-schedule/replace-by-product-id.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-schedule/replace-by-product-id.dto.js +1 -1
- package/dist/dtos/products/submodules/product-size/index.d.ts +4 -4
- package/dist/dtos/products/submodules/product-size/index.js +4 -4
- package/dist/dtos/products/submodules/product-size/replace-by-product-id.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-size/replace-by-product-id.dto.js +1 -1
- package/dist/dtos/products/submodules/product-tag/index.d.ts +4 -4
- package/dist/dtos/products/submodules/product-tag/index.js +4 -4
- package/dist/dtos/products/update-product.dto.d.ts +38 -3
- package/dist/dtos/products/update-product.dto.js +69 -4
- package/dist/dtos/questions/create-question.dto.d.ts +1 -1
- package/dist/dtos/questions/create-question.dto.js +1 -1
- package/dist/dtos/questions/index.d.ts +4 -4
- package/dist/dtos/questions/index.js +4 -4
- package/dist/dtos/questions/search-by-name.dto.d.ts +1 -1
- package/dist/dtos/questions/search-by-name.dto.js +1 -1
- package/dist/dtos/questions/update-question.dto.d.ts +38 -3
- package/dist/dtos/questions/update-question.dto.js +66 -4
- package/dist/dtos/restaurants/index.d.ts +3 -3
- package/dist/dtos/restaurants/index.js +3 -3
- package/dist/dtos/restaurants/update-restaurant.dto.d.ts +41 -3
- package/dist/dtos/restaurants/update-restaurant.dto.js +72 -4
- package/dist/dtos/tags/index.d.ts +4 -4
- package/dist/dtos/tags/index.js +4 -4
- package/dist/dtos/tags/search-by-name.dto.d.ts +1 -1
- package/dist/dtos/tags/search-by-name.dto.js +1 -1
- package/dist/dtos/tags/update-tag.dto.d.ts +8 -3
- package/dist/dtos/tags/update-tag.dto.js +17 -6
- package/dist/dtos/translations/create-translation.dto.d.ts +1 -1
- package/dist/dtos/translations/create-translation.dto.js +1 -1
- package/dist/dtos/translations/find-translations-by-entity.dto.d.ts +1 -1
- package/dist/dtos/translations/find-translations-by-entity.dto.js +1 -1
- package/dist/dtos/translations/index.d.ts +4 -4
- package/dist/dtos/translations/index.js +4 -4
- package/dist/dtos/translations/update-translation.dto.d.ts +32 -3
- package/dist/dtos/translations/update-translation.dto.js +64 -4
- package/dist/enums/index.d.ts +12 -12
- package/dist/enums/index.js +12 -12
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/interfaces/auth/access-user.interface.d.ts +2 -2
- package/dist/interfaces/auth/account.interface.d.ts +1 -1
- package/dist/interfaces/auth/full-token.interface.d.ts +2 -2
- package/dist/interfaces/auth/index.d.ts +9 -9
- package/dist/interfaces/auth/index.js +9 -9
- package/dist/interfaces/auth/payload-jwt.interface.d.ts +2 -2
- package/dist/interfaces/auth/responses/auth-response.interface.d.ts +3 -3
- package/dist/interfaces/auth/responses/index.d.ts +2 -2
- package/dist/interfaces/auth/responses/index.js +2 -2
- package/dist/interfaces/auth/responses/refresh-token-response.interface.d.ts +2 -2
- package/dist/interfaces/auth/user.interface.d.ts +2 -2
- package/dist/interfaces/auth/validate-user.interface.d.ts +2 -2
- package/dist/interfaces/categories/categories-list-response.interface.d.ts +3 -3
- package/dist/interfaces/categories/category-response.interface.d.ts +2 -2
- package/dist/interfaces/categories/index.d.ts +3 -3
- package/dist/interfaces/categories/index.js +3 -3
- package/dist/interfaces/chains/chain-response.interface.d.ts +2 -2
- package/dist/interfaces/chains/chain.interface.d.ts +1 -1
- package/dist/interfaces/chains/chains-list-response.interface.d.ts +3 -3
- package/dist/interfaces/chains/index.d.ts +3 -3
- package/dist/interfaces/chains/index.js +3 -3
- package/dist/interfaces/common/api-error-response.interface.d.ts +2 -2
- package/dist/interfaces/common/api-response.interface.d.ts +3 -2
- package/dist/interfaces/common/index.d.ts +5 -5
- package/dist/interfaces/common/index.js +5 -5
- package/dist/interfaces/common/rpc-error.interface.d.ts +1 -1
- package/dist/interfaces/index.d.ts +12 -12
- package/dist/interfaces/index.js +12 -12
- package/dist/interfaces/ingredients/index.d.ts +3 -3
- package/dist/interfaces/ingredients/index.js +3 -3
- package/dist/interfaces/ingredients/ingredient-response.interface.d.ts +2 -2
- package/dist/interfaces/ingredients/ingredients-list-response.interface.d.ts +3 -3
- package/dist/interfaces/orders/index.d.ts +6 -6
- package/dist/interfaces/orders/index.js +6 -6
- package/dist/interfaces/orders/order-created.interface.d.ts +3 -3
- package/dist/interfaces/orders/order-with-products.interface.d.ts +2 -2
- package/dist/interfaces/orders/order.interface.d.ts +2 -2
- package/dist/interfaces/orders/responses/change-order-status-response.interface.d.ts +2 -2
- package/dist/interfaces/orders/responses/create-order-response.interface.d.ts +2 -2
- package/dist/interfaces/orders/responses/index.d.ts +4 -4
- package/dist/interfaces/orders/responses/index.js +4 -4
- package/dist/interfaces/orders/responses/order-with-products-response.interface.d.ts +2 -2
- package/dist/interfaces/orders/responses/orders-list-response.interface.d.ts +3 -3
- package/dist/interfaces/payments/audit-storage-strategy.interface.d.ts +1 -1
- package/dist/interfaces/payments/index.d.ts +9 -9
- package/dist/interfaces/payments/index.js +9 -9
- package/dist/interfaces/payments/payment-provider.interface.d.ts +2 -2
- package/dist/interfaces/payments/responses/payment-callback-response.interface.d.ts +1 -1
- package/dist/interfaces/products/index.d.ts +8 -8
- package/dist/interfaces/products/index.js +8 -8
- package/dist/interfaces/products/product-recipe.interface.d.ts +1 -1
- package/dist/interfaces/products/product-tag.interface.d.ts +1 -1
- package/dist/interfaces/products/product.interface.d.ts +3 -3
- package/dist/interfaces/products/response/complete-product-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/index.d.ts +6 -6
- package/dist/interfaces/products/response/index.js +6 -6
- package/dist/interfaces/products/response/product-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/products-list-response.interface.d.ts +3 -3
- package/dist/interfaces/products/response/simple-product-response.interface.d.ts +1 -1
- package/dist/interfaces/products/response/sub-resources/create-tag-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/delete-sub-resource-response.interface.d.ts +1 -1
- package/dist/interfaces/products/response/sub-resources/find-product-image-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/find-product-question-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/find-product-recipe-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/find-product-schedule-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/find-product-size-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/find-product-tag-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/find-sub-resource-response.interface.d.ts +1 -1
- package/dist/interfaces/products/response/sub-resources/index.d.ts +25 -25
- package/dist/interfaces/products/response/sub-resources/index.js +25 -25
- package/dist/interfaces/products/response/sub-resources/list-product-images-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/list-product-questions-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/list-product-recipes-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/list-product-schedules-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/list-product-sizes-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/list-sub-resource-response.interface.d.ts +1 -1
- package/dist/interfaces/products/response/sub-resources/product-schedule-availability.interface.d.ts +1 -1
- package/dist/interfaces/products/response/sub-resources/question-relationship.interface.d.ts +1 -1
- package/dist/interfaces/products/response/sub-resources/recipe-relationship.interface.d.ts +1 -1
- package/dist/interfaces/products/response/sub-resources/replace-sub-products-response.interface.d.ts +1 -1
- package/dist/interfaces/products/response/sub-resources/sub-resource-response.interface.d.ts +1 -1
- package/dist/interfaces/products/response/sub-resources/write-image-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/write-question-product-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/write-recipe-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/write-schedule-response.interface.d.ts +2 -2
- package/dist/interfaces/products/response/sub-resources/write-size-response.interface.d.ts +2 -2
- package/dist/interfaces/questions/index.d.ts +3 -3
- package/dist/interfaces/questions/index.js +3 -3
- package/dist/interfaces/questions/question-response.interface.d.ts +2 -2
- package/dist/interfaces/questions/questions-list-response.interface.d.ts +3 -3
- package/dist/interfaces/restaurants/index.d.ts +3 -3
- package/dist/interfaces/restaurants/index.js +3 -3
- package/dist/interfaces/restaurants/restaurant-response.interface.d.ts +2 -2
- package/dist/interfaces/restaurants/restaurants-list-response.interface.d.ts +3 -3
- package/dist/interfaces/tags/index.d.ts +3 -3
- package/dist/interfaces/tags/index.js +3 -3
- package/dist/interfaces/tags/tag-response.interface.d.ts +2 -2
- package/dist/interfaces/tags/tags-list-response.interface.d.ts +3 -3
- package/dist/interfaces/translations/index.d.ts +3 -3
- package/dist/interfaces/translations/index.js +3 -3
- package/dist/interfaces/translations/translation-response.interface.d.ts +2 -2
- package/dist/interfaces/translations/translations-list-response.interface.d.ts +2 -2
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/tsconfig.json +1 -2
- package/tsconfig.node.json +10 -9
- package/dist/dtos/orders/update-order.dto.d.ts +0 -13
- package/dist/dtos/orders/update-order.dto.js +0 -13
|
@@ -15,15 +15,17 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @since 2.0.0
|
|
17
17
|
*/
|
|
18
|
-
export * from './auth-commands.constant';
|
|
19
|
-
export * from './category-commands.constant';
|
|
20
|
-
export * from './chain-commands.constant';
|
|
21
|
-
export * from './ingredient-commands.constant';
|
|
22
|
-
export * from './order-commands.constant';
|
|
23
|
-
export * from './payment-commands.constant';
|
|
24
|
-
export * from './payment-events.constant';
|
|
25
|
-
export * from './product-commands.constant';
|
|
26
|
-
export * from './product-events.constant';
|
|
27
|
-
export * from './question-commands.constant';
|
|
28
|
-
export * from './restaurant-commands.constant';
|
|
29
|
-
export * from './tag-commands.constant';
|
|
18
|
+
export * from './auth-commands.constant.js';
|
|
19
|
+
export * from './category-commands.constant.js';
|
|
20
|
+
export * from './chain-commands.constant.js';
|
|
21
|
+
export * from './ingredient-commands.constant.js';
|
|
22
|
+
export * from './order-commands.constant.js';
|
|
23
|
+
export * from './payment-commands.constant.js';
|
|
24
|
+
export * from './payment-events.constant.js';
|
|
25
|
+
export * from './product-commands.constant.js';
|
|
26
|
+
export * from './product-events.constant.js';
|
|
27
|
+
export * from './question-commands.constant.js';
|
|
28
|
+
export * from './restaurant-commands.constant.js';
|
|
29
|
+
export * from './tag-commands.constant.js';
|
|
30
|
+
export * from './translation-commands.constant.js';
|
|
31
|
+
export * from './services-config.constant.js';
|
package/dist/constants/index.js
CHANGED
|
@@ -16,24 +16,28 @@
|
|
|
16
16
|
* @since 2.0.0
|
|
17
17
|
*/
|
|
18
18
|
// Auth commands
|
|
19
|
-
export * from './auth-commands.constant';
|
|
19
|
+
export * from './auth-commands.constant.js';
|
|
20
20
|
// Category commands
|
|
21
|
-
export * from './category-commands.constant';
|
|
21
|
+
export * from './category-commands.constant.js';
|
|
22
22
|
// Chain commands
|
|
23
|
-
export * from './chain-commands.constant';
|
|
23
|
+
export * from './chain-commands.constant.js';
|
|
24
24
|
// Ingredient commands
|
|
25
|
-
export * from './ingredient-commands.constant';
|
|
25
|
+
export * from './ingredient-commands.constant.js';
|
|
26
26
|
// Order commands
|
|
27
|
-
export * from './order-commands.constant';
|
|
27
|
+
export * from './order-commands.constant.js';
|
|
28
28
|
// Payment commands and events
|
|
29
|
-
export * from './payment-commands.constant';
|
|
30
|
-
export * from './payment-events.constant';
|
|
29
|
+
export * from './payment-commands.constant.js';
|
|
30
|
+
export * from './payment-events.constant.js';
|
|
31
31
|
// Product commands and events
|
|
32
|
-
export * from './product-commands.constant';
|
|
33
|
-
export * from './product-events.constant';
|
|
32
|
+
export * from './product-commands.constant.js';
|
|
33
|
+
export * from './product-events.constant.js';
|
|
34
34
|
// Question commands
|
|
35
|
-
export * from './question-commands.constant';
|
|
35
|
+
export * from './question-commands.constant.js';
|
|
36
36
|
// Restaurant commands
|
|
37
|
-
export * from './restaurant-commands.constant';
|
|
37
|
+
export * from './restaurant-commands.constant.js';
|
|
38
38
|
// Tag commands
|
|
39
|
-
export * from './tag-commands.constant';
|
|
39
|
+
export * from './tag-commands.constant.js';
|
|
40
|
+
// Translation commands
|
|
41
|
+
export * from './translation-commands.constant.js';
|
|
42
|
+
// Services config
|
|
43
|
+
export * from './services-config.constant.js';
|
|
@@ -88,10 +88,16 @@ export declare const PRODUCT_COMMANDS: {
|
|
|
88
88
|
readonly IMAGE_REMOVE: "product-image.remove";
|
|
89
89
|
/** Remove all images for a product */
|
|
90
90
|
readonly IMAGE_REMOVE_BY_PRODUCT: "product-image.remove-by-product-id";
|
|
91
|
+
/** Bulk create images for a product */
|
|
92
|
+
readonly IMAGE_BULK_CREATE: "product-image.bulk-create";
|
|
93
|
+
/** Set primary image for a product */
|
|
94
|
+
readonly IMAGE_SET_PRIMARY: "product-image.set-primary";
|
|
91
95
|
/** Create a new question for a product */
|
|
92
96
|
readonly QUESTION_CREATE: "product-question.create";
|
|
93
97
|
/** Retrieve all questions for a product */
|
|
94
98
|
readonly QUESTION_FIND_BY_PRODUCT: "product-question.find-by-product-id";
|
|
99
|
+
/** Retrieve questions for a product filtered by type */
|
|
100
|
+
readonly QUESTION_FIND_BY_PRODUCT_AND_TYPE: "product-question.find-by-product-id-and-type";
|
|
95
101
|
/** Retrieve specific product question by ID */
|
|
96
102
|
readonly QUESTION_FIND_ONE: "product-question.find-one";
|
|
97
103
|
/** Replace all questions for a product */
|
|
@@ -93,11 +93,17 @@ export const PRODUCT_COMMANDS = {
|
|
|
93
93
|
IMAGE_REMOVE: 'product-image.remove',
|
|
94
94
|
/** Remove all images for a product */
|
|
95
95
|
IMAGE_REMOVE_BY_PRODUCT: 'product-image.remove-by-product-id',
|
|
96
|
+
/** Bulk create images for a product */
|
|
97
|
+
IMAGE_BULK_CREATE: 'product-image.bulk-create',
|
|
98
|
+
/** Set primary image for a product */
|
|
99
|
+
IMAGE_SET_PRIMARY: 'product-image.set-primary',
|
|
96
100
|
// === ProductQuestion ===
|
|
97
101
|
/** Create a new question for a product */
|
|
98
102
|
QUESTION_CREATE: 'product-question.create',
|
|
99
103
|
/** Retrieve all questions for a product */
|
|
100
104
|
QUESTION_FIND_BY_PRODUCT: 'product-question.find-by-product-id',
|
|
105
|
+
/** Retrieve questions for a product filtered by type */
|
|
106
|
+
QUESTION_FIND_BY_PRODUCT_AND_TYPE: 'product-question.find-by-product-id-and-type',
|
|
101
107
|
/** Retrieve specific product question by ID */
|
|
102
108
|
QUESTION_FIND_ONE: 'product-question.find-one',
|
|
103
109
|
/** Replace all questions for a product */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const SERVICES = { NATS_SERVICE: "NATS_SERVICE" };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translation service command subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all subject/message keys
|
|
5
|
+
* for commands between client(s) and the Translation microservice.
|
|
6
|
+
* Each key corresponds to a MessagePattern used for inter-service communication
|
|
7
|
+
* regarding translation management.
|
|
8
|
+
*
|
|
9
|
+
* Naming convention:
|
|
10
|
+
* - Keys use SCREAMING_SNAKE_CASE.
|
|
11
|
+
* - Subject values use kebab-case between dots, matching the entity domain ('translation').
|
|
12
|
+
*
|
|
13
|
+
* Usage examples:
|
|
14
|
+
* - TRANSLATION_COMMANDS.CREATE: Subject for creating a translation.
|
|
15
|
+
* - TRANSLATION_COMMANDS.FIND_ALL_BY_ENTITY: Subject for retrieving translations by entity.
|
|
16
|
+
* - TRANSLATION_COMMANDS.FIND_ONE: Subject for fetching a specific translation by ID.
|
|
17
|
+
* - TRANSLATION_COMMANDS.UPDATE: Subject for updating a translation.
|
|
18
|
+
* - TRANSLATION_COMMANDS.DELETE: Subject for soft deleting a translation.
|
|
19
|
+
*
|
|
20
|
+
* Centralizing these keys ensures consistency, discoverability, and maintainability.
|
|
21
|
+
*
|
|
22
|
+
* @since 2.0.0
|
|
23
|
+
*/
|
|
24
|
+
export declare const TRANSLATION_COMMANDS: {
|
|
25
|
+
/** Create a new translation */
|
|
26
|
+
readonly CREATE: "translation.create";
|
|
27
|
+
/** Retrieve all translations for a specific entity */
|
|
28
|
+
readonly FIND_ALL_BY_ENTITY: "translation.find-all-by-entity";
|
|
29
|
+
/** Retrieve a specific translation by ID */
|
|
30
|
+
readonly FIND_ONE: "translation.find-one";
|
|
31
|
+
/** Update an existing translation */
|
|
32
|
+
readonly UPDATE: "translation.update";
|
|
33
|
+
/** Soft delete a translation by ID */
|
|
34
|
+
readonly DELETE: "translation.delete";
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Translation service command subjects.
|
|
3
|
+
*
|
|
4
|
+
* Centralized constant containing all subject/message keys
|
|
5
|
+
* for commands between client(s) and the Translation microservice.
|
|
6
|
+
* Each key corresponds to a MessagePattern used for inter-service communication
|
|
7
|
+
* regarding translation management.
|
|
8
|
+
*
|
|
9
|
+
* Naming convention:
|
|
10
|
+
* - Keys use SCREAMING_SNAKE_CASE.
|
|
11
|
+
* - Subject values use kebab-case between dots, matching the entity domain ('translation').
|
|
12
|
+
*
|
|
13
|
+
* Usage examples:
|
|
14
|
+
* - TRANSLATION_COMMANDS.CREATE: Subject for creating a translation.
|
|
15
|
+
* - TRANSLATION_COMMANDS.FIND_ALL_BY_ENTITY: Subject for retrieving translations by entity.
|
|
16
|
+
* - TRANSLATION_COMMANDS.FIND_ONE: Subject for fetching a specific translation by ID.
|
|
17
|
+
* - TRANSLATION_COMMANDS.UPDATE: Subject for updating a translation.
|
|
18
|
+
* - TRANSLATION_COMMANDS.DELETE: Subject for soft deleting a translation.
|
|
19
|
+
*
|
|
20
|
+
* Centralizing these keys ensures consistency, discoverability, and maintainability.
|
|
21
|
+
*
|
|
22
|
+
* @since 2.0.0
|
|
23
|
+
*/
|
|
24
|
+
export const TRANSLATION_COMMANDS = {
|
|
25
|
+
/** Create a new translation */
|
|
26
|
+
CREATE: 'translation.create',
|
|
27
|
+
/** Retrieve all translations for a specific entity */
|
|
28
|
+
FIND_ALL_BY_ENTITY: 'translation.find-all-by-entity',
|
|
29
|
+
/** Retrieve a specific translation by ID */
|
|
30
|
+
FIND_ONE: 'translation.find-one',
|
|
31
|
+
/** Update an existing translation */
|
|
32
|
+
UPDATE: 'translation.update',
|
|
33
|
+
/** Soft delete a translation by ID */
|
|
34
|
+
DELETE: 'translation.delete',
|
|
35
|
+
};
|
package/dist/dtos/auth/index.js
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-category.dto';
|
|
10
|
-
export * from './update-category.dto';
|
|
11
|
-
export * from './delete-category.dto';
|
|
9
|
+
export * from './create-category.dto.js';
|
|
10
|
+
export * from './update-category.dto.js';
|
|
11
|
+
export * from './delete-category.dto.js';
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-category.dto';
|
|
10
|
-
export * from './update-category.dto';
|
|
11
|
-
export * from './delete-category.dto';
|
|
9
|
+
export * from './create-category.dto.js';
|
|
10
|
+
export * from './update-category.dto.js';
|
|
11
|
+
export * from './delete-category.dto.js';
|
|
@@ -1,13 +1,31 @@
|
|
|
1
|
-
declare const UpdateCategoryDto_base: import("@nestjs/mapped-types").MappedType<Partial<unknown>>;
|
|
2
1
|
/**
|
|
3
2
|
* DTO for updating an existing category.
|
|
4
3
|
*
|
|
5
|
-
*
|
|
4
|
+
* All fields are optional for partial updates.
|
|
6
5
|
* Used by the Products microservice to update category details.
|
|
7
6
|
*
|
|
8
7
|
* @since 2.0.0
|
|
9
8
|
*/
|
|
10
|
-
export declare class UpdateCategoryDto
|
|
9
|
+
export declare class UpdateCategoryDto {
|
|
10
|
+
/**
|
|
11
|
+
* Category name.
|
|
12
|
+
* Must not be empty if provided.
|
|
13
|
+
*
|
|
14
|
+
* @example "Beverages"
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional category description.
|
|
19
|
+
*
|
|
20
|
+
* @example "All types of drinks and beverages"
|
|
21
|
+
*/
|
|
22
|
+
description?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Category status (active/inactive).
|
|
25
|
+
*
|
|
26
|
+
* @example true
|
|
27
|
+
*/
|
|
28
|
+
status?: boolean;
|
|
11
29
|
/**
|
|
12
30
|
* Category ID to update.
|
|
13
31
|
* Must be a valid UUID.
|
|
@@ -23,4 +41,3 @@ export declare class UpdateCategoryDto extends UpdateCategoryDto_base {
|
|
|
23
41
|
*/
|
|
24
42
|
updatedBy?: string;
|
|
25
43
|
}
|
|
26
|
-
export {};
|
|
@@ -7,18 +7,35 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
11
|
-
import { IsString, IsOptional, IsMongoId, IsUUID } from 'class-validator';
|
|
12
|
-
import { CreateCategoryDto } from './create-category.dto';
|
|
10
|
+
import { IsString, IsOptional, IsMongoId, IsUUID, IsBoolean } from 'class-validator';
|
|
13
11
|
/**
|
|
14
12
|
* DTO for updating an existing category.
|
|
15
13
|
*
|
|
16
|
-
*
|
|
14
|
+
* All fields are optional for partial updates.
|
|
17
15
|
* Used by the Products microservice to update category details.
|
|
18
16
|
*
|
|
19
17
|
* @since 2.0.0
|
|
20
18
|
*/
|
|
21
|
-
export class UpdateCategoryDto
|
|
19
|
+
export class UpdateCategoryDto {
|
|
20
|
+
/**
|
|
21
|
+
* Category name.
|
|
22
|
+
* Must not be empty if provided.
|
|
23
|
+
*
|
|
24
|
+
* @example "Beverages"
|
|
25
|
+
*/
|
|
26
|
+
name;
|
|
27
|
+
/**
|
|
28
|
+
* Optional category description.
|
|
29
|
+
*
|
|
30
|
+
* @example "All types of drinks and beverages"
|
|
31
|
+
*/
|
|
32
|
+
description;
|
|
33
|
+
/**
|
|
34
|
+
* Category status (active/inactive).
|
|
35
|
+
*
|
|
36
|
+
* @example true
|
|
37
|
+
*/
|
|
38
|
+
status;
|
|
22
39
|
/**
|
|
23
40
|
* Category ID to update.
|
|
24
41
|
* Must be a valid UUID.
|
|
@@ -35,14 +52,29 @@ export class UpdateCategoryDto extends PartialType(CreateCategoryDto) {
|
|
|
35
52
|
updatedBy;
|
|
36
53
|
}
|
|
37
54
|
__decorate([
|
|
55
|
+
IsOptional(),
|
|
38
56
|
IsString(),
|
|
39
|
-
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], UpdateCategoryDto.prototype, "name", void 0);
|
|
59
|
+
__decorate([
|
|
40
60
|
IsOptional(),
|
|
61
|
+
IsString(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], UpdateCategoryDto.prototype, "description", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
IsOptional(),
|
|
66
|
+
IsBoolean(),
|
|
67
|
+
__metadata("design:type", Boolean)
|
|
68
|
+
], UpdateCategoryDto.prototype, "status", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
IsOptional(),
|
|
71
|
+
IsString(),
|
|
72
|
+
IsUUID(),
|
|
41
73
|
__metadata("design:type", String)
|
|
42
74
|
], UpdateCategoryDto.prototype, "id", void 0);
|
|
43
75
|
__decorate([
|
|
76
|
+
IsOptional(),
|
|
44
77
|
IsString(),
|
|
45
78
|
IsMongoId(),
|
|
46
|
-
IsOptional(),
|
|
47
79
|
__metadata("design:type", String)
|
|
48
80
|
], UpdateCategoryDto.prototype, "updatedBy", void 0);
|
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { IsString, IsOptional, IsNumber, Min, Max, IsEnum, IsMongoId } from 'class-validator';
|
|
11
|
-
import { Currency } from '../../enums/currency.enum';
|
|
11
|
+
import { Currency } from '../../enums/currency.enum.js';
|
|
12
12
|
/**
|
|
13
13
|
* DTO for creating a new chain.
|
|
14
14
|
*
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-chain.dto';
|
|
10
|
-
export * from './update-chain.dto';
|
|
11
|
-
export * from './delete-chain.dto';
|
|
9
|
+
export * from './create-chain.dto.js';
|
|
10
|
+
export * from './update-chain.dto.js';
|
|
11
|
+
export * from './delete-chain.dto.js';
|
package/dist/dtos/chain/index.js
CHANGED
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-chain.dto';
|
|
10
|
-
export * from './update-chain.dto';
|
|
11
|
-
export * from './delete-chain.dto';
|
|
9
|
+
export * from './create-chain.dto.js';
|
|
10
|
+
export * from './update-chain.dto.js';
|
|
11
|
+
export * from './delete-chain.dto.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { Currency } from "../../enums/currency.enum.js";
|
|
2
2
|
/**
|
|
3
3
|
* DTO for updating an existing chain.
|
|
4
4
|
*
|
|
@@ -7,7 +7,32 @@ declare const UpdateChainDto_base: import("@nestjs/mapped-types").MappedType<Par
|
|
|
7
7
|
*
|
|
8
8
|
* @since 2.0.0
|
|
9
9
|
*/
|
|
10
|
-
export declare class UpdateChainDto
|
|
10
|
+
export declare class UpdateChainDto {
|
|
11
|
+
/**
|
|
12
|
+
* Chain name.
|
|
13
|
+
* Must not be empty.
|
|
14
|
+
*
|
|
15
|
+
* @example "McDonald's"
|
|
16
|
+
*/
|
|
17
|
+
name?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Chain currency code.
|
|
20
|
+
* Must be a valid Currency enum value.
|
|
21
|
+
* Defaults to PEN if not provided.
|
|
22
|
+
*
|
|
23
|
+
* @example Currency.PEN
|
|
24
|
+
* @default Currency.PEN
|
|
25
|
+
*/
|
|
26
|
+
currency?: Currency;
|
|
27
|
+
/**
|
|
28
|
+
* Global tax percentage for the chain.
|
|
29
|
+
* Must be between 0 and 100 if provided.
|
|
30
|
+
* Defaults to 0 if not provided.
|
|
31
|
+
*
|
|
32
|
+
* @example 8.5
|
|
33
|
+
* @default 0.0
|
|
34
|
+
*/
|
|
35
|
+
taxPercent?: number;
|
|
11
36
|
/**
|
|
12
37
|
* Chain ID to update.
|
|
13
38
|
* Must be a valid UUID.
|
|
@@ -23,4 +48,3 @@ export declare class UpdateChainDto extends UpdateChainDto_base {
|
|
|
23
48
|
*/
|
|
24
49
|
updatedBy?: string;
|
|
25
50
|
}
|
|
26
|
-
export {};
|
|
@@ -7,9 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { CreateChainDto } from './create-chain.dto';
|
|
10
|
+
import { IsString, IsOptional, IsMongoId, IsUUID, IsNumber, Max, Min, IsEnum, } from "class-validator";
|
|
11
|
+
import { Currency } from "../../enums/currency.enum.js";
|
|
13
12
|
/**
|
|
14
13
|
* DTO for updating an existing chain.
|
|
15
14
|
*
|
|
@@ -18,7 +17,32 @@ import { CreateChainDto } from './create-chain.dto';
|
|
|
18
17
|
*
|
|
19
18
|
* @since 2.0.0
|
|
20
19
|
*/
|
|
21
|
-
export class UpdateChainDto
|
|
20
|
+
export class UpdateChainDto {
|
|
21
|
+
/**
|
|
22
|
+
* Chain name.
|
|
23
|
+
* Must not be empty.
|
|
24
|
+
*
|
|
25
|
+
* @example "McDonald's"
|
|
26
|
+
*/
|
|
27
|
+
name;
|
|
28
|
+
/**
|
|
29
|
+
* Chain currency code.
|
|
30
|
+
* Must be a valid Currency enum value.
|
|
31
|
+
* Defaults to PEN if not provided.
|
|
32
|
+
*
|
|
33
|
+
* @example Currency.PEN
|
|
34
|
+
* @default Currency.PEN
|
|
35
|
+
*/
|
|
36
|
+
currency = Currency.PEN;
|
|
37
|
+
/**
|
|
38
|
+
* Global tax percentage for the chain.
|
|
39
|
+
* Must be between 0 and 100 if provided.
|
|
40
|
+
* Defaults to 0 if not provided.
|
|
41
|
+
*
|
|
42
|
+
* @example 8.5
|
|
43
|
+
* @default 0.0
|
|
44
|
+
*/
|
|
45
|
+
taxPercent = 0.0;
|
|
22
46
|
/**
|
|
23
47
|
* Chain ID to update.
|
|
24
48
|
* Must be a valid UUID.
|
|
@@ -34,6 +58,23 @@ export class UpdateChainDto extends PartialType(CreateChainDto) {
|
|
|
34
58
|
*/
|
|
35
59
|
updatedBy;
|
|
36
60
|
}
|
|
61
|
+
__decorate([
|
|
62
|
+
IsString(),
|
|
63
|
+
IsOptional(),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], UpdateChainDto.prototype, "name", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
IsOptional(),
|
|
68
|
+
IsEnum(Currency, { message: "Currency must be a valid currency code" }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], UpdateChainDto.prototype, "currency", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
IsOptional(),
|
|
73
|
+
IsNumber({}, { message: "Tax percentage must be a number" }),
|
|
74
|
+
Min(0, { message: "Tax percentage must be at least 0" }),
|
|
75
|
+
Max(100, { message: "Tax percentage must be at most 100" }),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], UpdateChainDto.prototype, "taxPercent", void 0);
|
|
37
78
|
__decorate([
|
|
38
79
|
IsString(),
|
|
39
80
|
IsUUID(),
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { IsNotEmpty, IsString } from 'class-validator';
|
|
11
|
+
import { PaginationDto } from './pagination.dto.js';
|
|
12
|
+
export class SearchByNameDto extends PaginationDto {
|
|
13
|
+
name;
|
|
14
|
+
}
|
|
15
|
+
__decorate([
|
|
16
|
+
IsString(),
|
|
17
|
+
IsNotEmpty(),
|
|
18
|
+
__metadata("design:type", String)
|
|
19
|
+
], SearchByNameDto.prototype, "name", void 0);
|
package/dist/dtos/index.d.ts
CHANGED
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @since 2.0.0
|
|
16
16
|
*/
|
|
17
|
-
export * from "./common";
|
|
18
|
-
export * from "./auth";
|
|
19
|
-
export * from "./orders";
|
|
20
|
-
export * from "./payments";
|
|
21
|
-
export * from "./products";
|
|
22
|
-
export * from "./categories";
|
|
23
|
-
export * from "./restaurants";
|
|
24
|
-
export * from "./chain";
|
|
25
|
-
export * from "./tags";
|
|
26
|
-
export * from "./ingredients";
|
|
27
|
-
export * from "./questions";
|
|
28
|
-
export * from "./translations";
|
|
17
|
+
export * from "./common/index.js";
|
|
18
|
+
export * from "./auth/index.js";
|
|
19
|
+
export * from "./orders/index.js";
|
|
20
|
+
export * from "./payments/index.js";
|
|
21
|
+
export * from "./products/index.js";
|
|
22
|
+
export * from "./categories/index.js";
|
|
23
|
+
export * from "./restaurants/index.js";
|
|
24
|
+
export * from "./chain/index.js";
|
|
25
|
+
export * from "./tags/index.js";
|
|
26
|
+
export * from "./ingredients/index.js";
|
|
27
|
+
export * from "./questions/index.js";
|
|
28
|
+
export * from "./translations/index.js";
|
package/dist/dtos/index.js
CHANGED
|
@@ -15,26 +15,26 @@
|
|
|
15
15
|
* @since 2.0.0
|
|
16
16
|
*/
|
|
17
17
|
// Common DTOs
|
|
18
|
-
export * from "./common";
|
|
18
|
+
export * from "./common/index.js";
|
|
19
19
|
// Auth DTOs
|
|
20
|
-
export * from "./auth";
|
|
20
|
+
export * from "./auth/index.js";
|
|
21
21
|
// Order DTOs
|
|
22
|
-
export * from "./orders";
|
|
22
|
+
export * from "./orders/index.js";
|
|
23
23
|
// Payment DTOs
|
|
24
|
-
export * from "./payments";
|
|
24
|
+
export * from "./payments/index.js";
|
|
25
25
|
// Product DTOs
|
|
26
|
-
export * from "./products";
|
|
26
|
+
export * from "./products/index.js";
|
|
27
27
|
// Category DTOs
|
|
28
|
-
export * from "./categories";
|
|
28
|
+
export * from "./categories/index.js";
|
|
29
29
|
// Restaurant DTOs
|
|
30
|
-
export * from "./restaurants";
|
|
30
|
+
export * from "./restaurants/index.js";
|
|
31
31
|
// Chain DTOs
|
|
32
|
-
export * from "./chain";
|
|
32
|
+
export * from "./chain/index.js";
|
|
33
33
|
// Tag DTOs
|
|
34
|
-
export * from "./tags";
|
|
34
|
+
export * from "./tags/index.js";
|
|
35
35
|
// Ingredient DTOs
|
|
36
|
-
export * from "./ingredients";
|
|
36
|
+
export * from "./ingredients/index.js";
|
|
37
37
|
// Question DTOs
|
|
38
|
-
export * from "./questions";
|
|
38
|
+
export * from "./questions/index.js";
|
|
39
39
|
// Translations DTOs
|
|
40
|
-
export * from "./translations";
|
|
40
|
+
export * from "./translations/index.js";
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
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';
|
|
9
|
+
export * from './create-ingredient.dto.js';
|
|
10
|
+
export * from './update-ingredient.dto.js';
|
|
11
|
+
export * from './delete-ingredient.dto.js';
|
|
12
|
+
export * from './search-by-name.dto.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
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';
|
|
9
|
+
export * from './create-ingredient.dto.js';
|
|
10
|
+
export * from './update-ingredient.dto.js';
|
|
11
|
+
export * from './delete-ingredient.dto.js';
|
|
12
|
+
export * from './search-by-name.dto.js';
|
|
@@ -8,7 +8,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
8
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
9
|
};
|
|
10
10
|
import { IsString, IsNotEmpty } from 'class-validator';
|
|
11
|
-
import { PaginationDto } from '../common/pagination.dto';
|
|
11
|
+
import { PaginationDto } from '../common/pagination.dto.js';
|
|
12
12
|
/**
|
|
13
13
|
* DTO for searching ingredients by name.
|
|
14
14
|
*
|