qeai-sdk 2.0.0 → 2.0.2
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/auth/register-user.dto.js +4 -1
- package/dist/dtos/categories/create-category.dto.js +6 -3
- package/dist/dtos/categories/delete-category.dto.d.ts +1 -1
- package/dist/dtos/categories/delete-category.dto.js +5 -3
- 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 +30 -11
- package/dist/dtos/categories/update-category.dto.js +48 -14
- package/dist/dtos/chain/create-chain.dto.d.ts +12 -13
- package/dist/dtos/chain/create-chain.dto.js +16 -15
- package/dist/dtos/chain/delete-chain.dto.d.ts +6 -6
- package/dist/dtos/chain/delete-chain.dto.js +11 -9
- 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 +45 -11
- package/dist/dtos/chain/update-chain.dto.js +67 -15
- 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 +27 -0
- package/dist/dtos/{tags → common}/search-by-name.dto.js +18 -9
- package/dist/dtos/index.d.ts +12 -12
- package/dist/dtos/index.js +12 -12
- package/dist/dtos/ingredients/create-ingredient.dto.d.ts +5 -5
- package/dist/dtos/ingredients/create-ingredient.dto.js +9 -8
- package/dist/dtos/ingredients/delete-ingredient.dto.d.ts +14 -7
- package/dist/dtos/ingredients/delete-ingredient.dto.js +18 -9
- package/dist/dtos/ingredients/index.d.ts +3 -4
- package/dist/dtos/ingredients/index.js +3 -4
- package/dist/dtos/ingredients/update-ingredient.dto.d.ts +32 -11
- package/dist/dtos/ingredients/update-ingredient.dto.js +48 -15
- package/dist/dtos/orders/change-order-status.dto.d.ts +19 -10
- package/dist/dtos/orders/change-order-status.dto.js +27 -14
- package/dist/dtos/orders/create-order.dto.d.ts +34 -24
- package/dist/dtos/orders/create-order.dto.js +44 -32
- package/dist/dtos/orders/index.d.ts +5 -6
- package/dist/dtos/orders/index.js +5 -6
- package/dist/dtos/orders/order-item.dto.d.ts +35 -18
- package/dist/dtos/orders/order-item.dto.js +54 -32
- package/dist/dtos/orders/order-pagination.dto.d.ts +2 -2
- package/dist/dtos/orders/order-pagination.dto.js +4 -4
- package/dist/dtos/orders/paid-order.dto.d.ts +16 -8
- package/dist/dtos/orders/paid-order.dto.js +25 -14
- package/dist/dtos/payments/create-payment-audit-dynamo.dto.d.ts +81 -0
- package/dist/dtos/payments/create-payment-audit-dynamo.dto.js +81 -0
- package/dist/dtos/payments/create-payment-audit-s3.dto.d.ts +81 -0
- package/dist/dtos/payments/create-payment-audit-s3.dto.js +81 -0
- package/dist/dtos/payments/index.d.ts +5 -3
- package/dist/dtos/payments/index.js +5 -3
- package/dist/dtos/payments/payment-session-item.dto.d.ts +4 -4
- package/dist/dtos/payments/payment-session-item.dto.js +7 -4
- package/dist/dtos/payments/payment-session.dto.d.ts +1 -1
- package/dist/dtos/payments/payment-session.dto.js +1 -1
- package/dist/dtos/payments/webhook-data.dto.d.ts +1 -1
- package/dist/dtos/payments/webhook-data.dto.js +1 -0
- package/dist/dtos/products/create-product.dto.d.ts +2 -2
- package/dist/dtos/products/create-product.dto.js +3 -2
- package/dist/dtos/products/delete-product.dto.d.ts +1 -1
- package/dist/dtos/products/delete-product.dto.js +5 -3
- 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 +3 -3
- package/dist/dtos/products/submodules/product-image/bulk-create-product-image.dto.js +5 -5
- package/dist/dtos/products/submodules/product-image/create-product-image.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-image/create-product-image.dto.js +4 -4
- 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-image/update-product-image.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-image/update-product-image.dto.js +4 -4
- package/dist/dtos/products/submodules/product-question/create-product-question.dto.d.ts +2 -2
- package/dist/dtos/products/submodules/product-question/create-product-question.dto.js +8 -8
- 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 +2 -2
- 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 +2 -2
- package/dist/dtos/products/submodules/product-question/update-product-question.dto.js +5 -5
- package/dist/dtos/products/submodules/product-recipe/create-product-recipe.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-recipe/create-product-recipe.dto.js +2 -2
- 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 +2 -2
- package/dist/dtos/products/submodules/product-recipe/replace-by-product-id.dto.js +5 -5
- package/dist/dtos/products/submodules/product-recipe/update-product-recipe.dto.d.ts +1 -8
- package/dist/dtos/products/submodules/product-recipe/update-product-recipe.dto.js +3 -16
- package/dist/dtos/products/submodules/product-schedule/create-product-schedule.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-schedule/create-product-schedule.dto.js +2 -2
- 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 +2 -2
- package/dist/dtos/products/submodules/product-schedule/replace-by-product-id.dto.js +1 -1
- package/dist/dtos/products/submodules/product-schedule/update-product-schedule.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-schedule/update-product-schedule.dto.js +4 -4
- package/dist/dtos/products/submodules/product-size/create-product-size.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/product-size-data.dto.js +1 -1
- 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-size/update-product-size.dto.d.ts +1 -1
- package/dist/dtos/products/submodules/product-size/update-product-size.dto.js +2 -2
- package/dist/dtos/products/submodules/product-tag/index.d.ts +2 -4
- package/dist/dtos/products/submodules/product-tag/index.js +2 -4
- package/dist/dtos/products/submodules/product-tag/{remove-product-tag.dto.d.ts → product-tag.dto.d.ts} +1 -1
- package/dist/dtos/products/submodules/product-tag/{remove-product-tag.dto.js → product-tag.dto.js} +3 -3
- package/dist/dtos/products/update-product.dto.d.ts +40 -5
- package/dist/dtos/products/update-product.dto.js +73 -7
- package/dist/dtos/questions/create-question.dto.d.ts +2 -2
- package/dist/dtos/questions/create-question.dto.js +3 -2
- package/dist/dtos/questions/delete-question.dto.d.ts +1 -1
- package/dist/dtos/questions/delete-question.dto.js +5 -3
- package/dist/dtos/questions/index.d.ts +3 -4
- package/dist/dtos/questions/index.js +3 -4
- package/dist/dtos/questions/update-question.dto.d.ts +40 -5
- package/dist/dtos/questions/update-question.dto.js +70 -8
- package/dist/dtos/restaurants/create-restaurant.dto.d.ts +15 -1
- package/dist/dtos/restaurants/create-restaurant.dto.js +38 -2
- package/dist/dtos/restaurants/delete-restaurant.dto.d.ts +1 -1
- package/dist/dtos/restaurants/delete-restaurant.dto.js +5 -3
- 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 +50 -5
- package/dist/dtos/restaurants/update-restaurant.dto.js +92 -8
- package/dist/dtos/tags/create-tag.dto.d.ts +1 -1
- package/dist/dtos/tags/create-tag.dto.js +5 -4
- package/dist/dtos/tags/delete-tag.dto.d.ts +1 -1
- package/dist/dtos/tags/delete-tag.dto.js +5 -3
- package/dist/dtos/tags/index.d.ts +3 -4
- package/dist/dtos/tags/index.js +3 -4
- package/dist/dtos/tags/update-tag.dto.d.ts +10 -5
- package/dist/dtos/tags/update-tag.dto.js +20 -8
- package/dist/dtos/translations/create-translation.dto.d.ts +1 -1
- package/dist/dtos/translations/create-translation.dto.js +7 -2
- package/dist/dtos/translations/delete-translation.dto.d.ts +1 -1
- package/dist/dtos/translations/delete-translation.dto.js +4 -3
- 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 +33 -4
- package/dist/dtos/translations/update-translation.dto.js +69 -6
- package/dist/enums/index.d.ts +10 -12
- package/dist/enums/index.js +10 -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-item.interface.d.ts +4 -4
- package/dist/interfaces/orders/order-with-products.interface.d.ts +2 -2
- package/dist/interfaces/orders/order.interface.d.ts +9 -9
- 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 +2 -1
- package/dist/types/index.js +2 -1
- package/dist/types/order-mode.type.d.ts +12 -3
- package/dist/types/order-mode.type.js +20 -1
- package/dist/types/order-status.type.d.ts +22 -0
- package/dist/{enums/order-status.enum.d.ts → types/order-status.type.js} +25 -26
- package/package.json +1 -1
- package/tsconfig.json +1 -2
- package/tsconfig.node.json +10 -9
- package/dist/dtos/ingredients/search-by-name.dto.d.ts +0 -18
- package/dist/dtos/ingredients/search-by-name.dto.js +0 -33
- package/dist/dtos/orders/update-order.dto.d.ts +0 -13
- package/dist/dtos/orders/update-order.dto.js +0 -13
- package/dist/dtos/products/submodules/product-tag/create-product-tag.dto.d.ts +0 -24
- package/dist/dtos/products/submodules/product-tag/create-product-tag.dto.js +0 -46
- package/dist/dtos/products/submodules/product-tag/find-product-tag.dto.d.ts +0 -24
- package/dist/dtos/products/submodules/product-tag/find-product-tag.dto.js +0 -46
- package/dist/dtos/questions/search-by-name.dto.d.ts +0 -18
- package/dist/dtos/questions/search-by-name.dto.js +0 -33
- package/dist/dtos/tags/search-by-name.dto.d.ts +0 -18
- package/dist/enums/order-status.enum.js +0 -69
- package/dist/enums/order-type.enum.d.ts +0 -45
- package/dist/enums/order-type.enum.js +0 -46
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { QuestionType } from '../../enums/question-type.enum.js';
|
|
2
2
|
/**
|
|
3
3
|
* DTO for updating an existing question.
|
|
4
4
|
*
|
|
@@ -7,20 +7,55 @@ declare const UpdateQuestionDto_base: import("@nestjs/mapped-types").MappedType<
|
|
|
7
7
|
*
|
|
8
8
|
* @since 2.0.0
|
|
9
9
|
*/
|
|
10
|
-
export declare class UpdateQuestionDto
|
|
10
|
+
export declare class UpdateQuestionDto {
|
|
11
|
+
/**
|
|
12
|
+
* Question text/name.
|
|
13
|
+
* Must not be empty.
|
|
14
|
+
*
|
|
15
|
+
* @example "Would you like extra cheese?"
|
|
16
|
+
*/
|
|
17
|
+
name?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Whether the question is required.
|
|
20
|
+
* Defaults to false if not provided.
|
|
21
|
+
*
|
|
22
|
+
* @example true
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
required?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Minimum value for numeric questions.
|
|
28
|
+
* Must be a non-negative integer if provided.
|
|
29
|
+
*
|
|
30
|
+
* @example 0
|
|
31
|
+
*/
|
|
32
|
+
min?: number;
|
|
33
|
+
/**
|
|
34
|
+
* Maximum value for numeric questions.
|
|
35
|
+
* Must be a positive integer if provided.
|
|
36
|
+
*
|
|
37
|
+
* @example 10
|
|
38
|
+
*/
|
|
39
|
+
max?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Type of question.
|
|
42
|
+
* Must be a valid QuestionType enum value.
|
|
43
|
+
*
|
|
44
|
+
* @example QuestionType.SINGLE_CHOICE
|
|
45
|
+
*/
|
|
46
|
+
type?: QuestionType;
|
|
11
47
|
/**
|
|
12
48
|
* Question ID to update.
|
|
13
49
|
* Must be a valid UUID.
|
|
14
50
|
*
|
|
15
51
|
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
16
52
|
*/
|
|
17
|
-
|
|
53
|
+
questionId: string;
|
|
18
54
|
/**
|
|
19
55
|
* User who updated the question.
|
|
20
56
|
* Must be a valid MongoDB ObjectId if provided.
|
|
21
57
|
*
|
|
22
58
|
* @example "507f1f77bcf86cd799439011"
|
|
23
59
|
*/
|
|
24
|
-
updatedBy
|
|
60
|
+
updatedBy: string;
|
|
25
61
|
}
|
|
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 { CreateQuestionDto } from './create-question.dto';
|
|
10
|
+
import { IsString, IsOptional, IsMongoId, IsUUID, IsEnum, IsInt, Min, IsBoolean, IsNotEmpty } from 'class-validator';
|
|
11
|
+
import { QuestionType } from '../../enums/question-type.enum.js';
|
|
13
12
|
/**
|
|
14
13
|
* DTO for updating an existing question.
|
|
15
14
|
*
|
|
@@ -18,14 +17,50 @@ import { CreateQuestionDto } from './create-question.dto';
|
|
|
18
17
|
*
|
|
19
18
|
* @since 2.0.0
|
|
20
19
|
*/
|
|
21
|
-
export class UpdateQuestionDto
|
|
20
|
+
export class UpdateQuestionDto {
|
|
21
|
+
/**
|
|
22
|
+
* Question text/name.
|
|
23
|
+
* Must not be empty.
|
|
24
|
+
*
|
|
25
|
+
* @example "Would you like extra cheese?"
|
|
26
|
+
*/
|
|
27
|
+
name;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the question is required.
|
|
30
|
+
* Defaults to false if not provided.
|
|
31
|
+
*
|
|
32
|
+
* @example true
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
required;
|
|
36
|
+
/**
|
|
37
|
+
* Minimum value for numeric questions.
|
|
38
|
+
* Must be a non-negative integer if provided.
|
|
39
|
+
*
|
|
40
|
+
* @example 0
|
|
41
|
+
*/
|
|
42
|
+
min;
|
|
43
|
+
/**
|
|
44
|
+
* Maximum value for numeric questions.
|
|
45
|
+
* Must be a positive integer if provided.
|
|
46
|
+
*
|
|
47
|
+
* @example 10
|
|
48
|
+
*/
|
|
49
|
+
max;
|
|
50
|
+
/**
|
|
51
|
+
* Type of question.
|
|
52
|
+
* Must be a valid QuestionType enum value.
|
|
53
|
+
*
|
|
54
|
+
* @example QuestionType.SINGLE_CHOICE
|
|
55
|
+
*/
|
|
56
|
+
type;
|
|
22
57
|
/**
|
|
23
58
|
* Question ID to update.
|
|
24
59
|
* Must be a valid UUID.
|
|
25
60
|
*
|
|
26
61
|
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
27
62
|
*/
|
|
28
|
-
|
|
63
|
+
questionId;
|
|
29
64
|
/**
|
|
30
65
|
* User who updated the question.
|
|
31
66
|
* Must be a valid MongoDB ObjectId if provided.
|
|
@@ -36,13 +71,40 @@ export class UpdateQuestionDto extends PartialType(CreateQuestionDto) {
|
|
|
36
71
|
}
|
|
37
72
|
__decorate([
|
|
38
73
|
IsString(),
|
|
39
|
-
IsUUID(),
|
|
40
74
|
IsOptional(),
|
|
41
75
|
__metadata("design:type", String)
|
|
42
|
-
], UpdateQuestionDto.prototype, "
|
|
76
|
+
], UpdateQuestionDto.prototype, "name", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
IsOptional(),
|
|
79
|
+
IsBoolean(),
|
|
80
|
+
__metadata("design:type", Boolean)
|
|
81
|
+
], UpdateQuestionDto.prototype, "required", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
IsOptional(),
|
|
84
|
+
IsInt({ message: 'Minimum value must be an integer' }),
|
|
85
|
+
Min(0, { message: 'Minimum value must be at least 0' }),
|
|
86
|
+
__metadata("design:type", Number)
|
|
87
|
+
], UpdateQuestionDto.prototype, "min", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
IsOptional(),
|
|
90
|
+
IsInt({ message: 'Maximum value must be an integer' }),
|
|
91
|
+
Min(1, { message: 'Maximum value must be at least 1' }),
|
|
92
|
+
__metadata("design:type", Number)
|
|
93
|
+
], UpdateQuestionDto.prototype, "max", void 0);
|
|
43
94
|
__decorate([
|
|
95
|
+
IsOptional(),
|
|
96
|
+
IsEnum(QuestionType, { message: 'Question type must be a valid QuestionType' }),
|
|
97
|
+
__metadata("design:type", String)
|
|
98
|
+
], UpdateQuestionDto.prototype, "type", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
IsNotEmpty(),
|
|
101
|
+
IsString(),
|
|
102
|
+
IsUUID(),
|
|
103
|
+
__metadata("design:type", String)
|
|
104
|
+
], UpdateQuestionDto.prototype, "questionId", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
IsNotEmpty(),
|
|
44
107
|
IsString(),
|
|
45
108
|
IsMongoId(),
|
|
46
|
-
IsOptional(),
|
|
47
109
|
__metadata("design:type", String)
|
|
48
110
|
], UpdateQuestionDto.prototype, "updatedBy", void 0);
|
|
@@ -26,7 +26,21 @@ export declare class CreateRestaurantDto {
|
|
|
26
26
|
*
|
|
27
27
|
* @example "123 Main St, Downtown"
|
|
28
28
|
*/
|
|
29
|
-
address
|
|
29
|
+
address: string;
|
|
30
|
+
/**
|
|
31
|
+
* Latitude of the restaurant.
|
|
32
|
+
* Must be a valid number between -90 and 90.
|
|
33
|
+
*
|
|
34
|
+
* @example -12.04318
|
|
35
|
+
*/
|
|
36
|
+
latitude: string;
|
|
37
|
+
/**
|
|
38
|
+
* Longitude of the restaurant.
|
|
39
|
+
* Must be a valid number between -180 and 180.
|
|
40
|
+
*
|
|
41
|
+
* @example -77.02824
|
|
42
|
+
*/
|
|
43
|
+
longitude: string;
|
|
30
44
|
/**
|
|
31
45
|
* Optional restaurant phone number.
|
|
32
46
|
*
|
|
@@ -7,7 +7,7 @@ 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 { IsString, IsOptional, IsBoolean, IsMongoId } from
|
|
10
|
+
import { IsString, IsOptional, IsBoolean, IsMongoId, IsNotEmpty, IsUUID, MinLength, MaxLength, IsPhoneNumber, IsTimeZone, IsLongitude, IsLatitude, } from "class-validator";
|
|
11
11
|
/**
|
|
12
12
|
* DTO for creating a new restaurant.
|
|
13
13
|
*
|
|
@@ -37,6 +37,20 @@ export class CreateRestaurantDto {
|
|
|
37
37
|
* @example "123 Main St, Downtown"
|
|
38
38
|
*/
|
|
39
39
|
address;
|
|
40
|
+
/**
|
|
41
|
+
* Latitude of the restaurant.
|
|
42
|
+
* Must be a valid number between -90 and 90.
|
|
43
|
+
*
|
|
44
|
+
* @example -12.04318
|
|
45
|
+
*/
|
|
46
|
+
latitude;
|
|
47
|
+
/**
|
|
48
|
+
* Longitude of the restaurant.
|
|
49
|
+
* Must be a valid number between -180 and 180.
|
|
50
|
+
*
|
|
51
|
+
* @example -77.02824
|
|
52
|
+
*/
|
|
53
|
+
longitude;
|
|
40
54
|
/**
|
|
41
55
|
* Optional restaurant phone number.
|
|
42
56
|
*
|
|
@@ -67,25 +81,46 @@ export class CreateRestaurantDto {
|
|
|
67
81
|
}
|
|
68
82
|
__decorate([
|
|
69
83
|
IsString(),
|
|
84
|
+
IsNotEmpty(),
|
|
85
|
+
IsUUID(),
|
|
70
86
|
__metadata("design:type", String)
|
|
71
87
|
], CreateRestaurantDto.prototype, "chainId", void 0);
|
|
72
88
|
__decorate([
|
|
73
89
|
IsString(),
|
|
90
|
+
IsNotEmpty(),
|
|
91
|
+
MinLength(3),
|
|
92
|
+
MaxLength(25),
|
|
74
93
|
__metadata("design:type", String)
|
|
75
94
|
], CreateRestaurantDto.prototype, "name", void 0);
|
|
76
95
|
__decorate([
|
|
77
|
-
IsOptional(),
|
|
78
96
|
IsString(),
|
|
97
|
+
IsNotEmpty(),
|
|
98
|
+
MaxLength(200),
|
|
99
|
+
MinLength(5),
|
|
79
100
|
__metadata("design:type", String)
|
|
80
101
|
], CreateRestaurantDto.prototype, "address", void 0);
|
|
102
|
+
__decorate([
|
|
103
|
+
IsNotEmpty({ message: "Latitude is required" }),
|
|
104
|
+
IsString({ message: "Latitude must be a string" }),
|
|
105
|
+
IsLatitude(),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], CreateRestaurantDto.prototype, "latitude", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
IsNotEmpty({ message: "Longitude is required" }),
|
|
110
|
+
IsString({ message: "Longitude must be a string" }),
|
|
111
|
+
IsLongitude(),
|
|
112
|
+
__metadata("design:type", String)
|
|
113
|
+
], CreateRestaurantDto.prototype, "longitude", void 0);
|
|
81
114
|
__decorate([
|
|
82
115
|
IsOptional(),
|
|
83
116
|
IsString(),
|
|
117
|
+
IsPhoneNumber("PE"),
|
|
84
118
|
__metadata("design:type", String)
|
|
85
119
|
], CreateRestaurantDto.prototype, "phone", void 0);
|
|
86
120
|
__decorate([
|
|
87
121
|
IsOptional(),
|
|
88
122
|
IsString(),
|
|
123
|
+
IsTimeZone(),
|
|
89
124
|
__metadata("design:type", String)
|
|
90
125
|
], CreateRestaurantDto.prototype, "timezone", void 0);
|
|
91
126
|
__decorate([
|
|
@@ -96,5 +131,6 @@ __decorate([
|
|
|
96
131
|
__decorate([
|
|
97
132
|
IsString(),
|
|
98
133
|
IsMongoId(),
|
|
134
|
+
IsNotEmpty(),
|
|
99
135
|
__metadata("design:type", String)
|
|
100
136
|
], CreateRestaurantDto.prototype, "createdBy", void 0);
|
|
@@ -7,7 +7,7 @@ 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 { IsString, IsMongoId, IsUUID } from
|
|
10
|
+
import { IsString, IsMongoId, IsUUID, IsNotEmpty } from "class-validator";
|
|
11
11
|
/**
|
|
12
12
|
* DTO for deleting a restaurant.
|
|
13
13
|
*
|
|
@@ -23,7 +23,7 @@ export class DeleteRestaurantDto {
|
|
|
23
23
|
*
|
|
24
24
|
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
restaurantId;
|
|
27
27
|
/**
|
|
28
28
|
* User who deleted the restaurant.
|
|
29
29
|
* Must be a valid MongoDB ObjectId.
|
|
@@ -35,10 +35,12 @@ export class DeleteRestaurantDto {
|
|
|
35
35
|
__decorate([
|
|
36
36
|
IsString(),
|
|
37
37
|
IsUUID(),
|
|
38
|
+
IsNotEmpty(),
|
|
38
39
|
__metadata("design:type", String)
|
|
39
|
-
], DeleteRestaurantDto.prototype, "
|
|
40
|
+
], DeleteRestaurantDto.prototype, "restaurantId", void 0);
|
|
40
41
|
__decorate([
|
|
41
42
|
IsString(),
|
|
43
|
+
IsNotEmpty(),
|
|
42
44
|
IsMongoId(),
|
|
43
45
|
__metadata("design:type", String)
|
|
44
46
|
], DeleteRestaurantDto.prototype, "deletedBy", void 0);
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-restaurant.dto';
|
|
10
|
-
export * from './update-restaurant.dto';
|
|
11
|
-
export * from './delete-restaurant.dto';
|
|
9
|
+
export * from './create-restaurant.dto.js';
|
|
10
|
+
export * from './update-restaurant.dto.js';
|
|
11
|
+
export * from './delete-restaurant.dto.js';
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-restaurant.dto';
|
|
10
|
-
export * from './update-restaurant.dto';
|
|
11
|
-
export * from './delete-restaurant.dto';
|
|
9
|
+
export * from './create-restaurant.dto.js';
|
|
10
|
+
export * from './update-restaurant.dto.js';
|
|
11
|
+
export * from './delete-restaurant.dto.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
declare const UpdateRestaurantDto_base: import("@nestjs/mapped-types").MappedType<Partial<unknown>>;
|
|
2
1
|
/**
|
|
3
2
|
* DTO for updating an existing restaurant.
|
|
4
3
|
*
|
|
@@ -7,20 +6,66 @@ declare const UpdateRestaurantDto_base: import("@nestjs/mapped-types").MappedTyp
|
|
|
7
6
|
*
|
|
8
7
|
* @since 2.0.0
|
|
9
8
|
*/
|
|
10
|
-
export declare class UpdateRestaurantDto
|
|
9
|
+
export declare class UpdateRestaurantDto {
|
|
10
|
+
/**
|
|
11
|
+
* Restaurant name.
|
|
12
|
+
* Must not be empty.
|
|
13
|
+
*
|
|
14
|
+
* @example "McDonald's Downtown"
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional restaurant address.
|
|
19
|
+
*
|
|
20
|
+
* @example "123 Main St, Downtown"
|
|
21
|
+
*/
|
|
22
|
+
address?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Latitude of the restaurant.
|
|
25
|
+
* Must be a valid number between -90 and 90.
|
|
26
|
+
*
|
|
27
|
+
* @example -12.04318
|
|
28
|
+
*/
|
|
29
|
+
latitude?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Longitude of the restaurant.
|
|
32
|
+
* Must be a valid number between -180 and 180.
|
|
33
|
+
*
|
|
34
|
+
* @example -77.02824
|
|
35
|
+
*/
|
|
36
|
+
longitude?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Optional restaurant phone number.
|
|
39
|
+
*
|
|
40
|
+
* @example "+1-555-0123"
|
|
41
|
+
*/
|
|
42
|
+
phone?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Optional restaurant timezone.
|
|
45
|
+
*
|
|
46
|
+
* @example "America/New_York"
|
|
47
|
+
*/
|
|
48
|
+
timezone?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Restaurant status (active/inactive).
|
|
51
|
+
* Defaults to true if not provided.
|
|
52
|
+
*
|
|
53
|
+
* @example true
|
|
54
|
+
* @default true
|
|
55
|
+
*/
|
|
56
|
+
status?: boolean;
|
|
11
57
|
/**
|
|
12
58
|
* Restaurant ID to update.
|
|
13
59
|
* Must be a valid UUID.
|
|
14
60
|
*
|
|
15
61
|
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
16
62
|
*/
|
|
17
|
-
|
|
63
|
+
restaurantId: string;
|
|
18
64
|
/**
|
|
19
65
|
* User who updated the restaurant.
|
|
20
66
|
* Must be a valid MongoDB ObjectId if provided.
|
|
21
67
|
*
|
|
22
68
|
* @example "507f1f77bcf86cd799439011"
|
|
23
69
|
*/
|
|
24
|
-
updatedBy
|
|
70
|
+
updatedBy: string;
|
|
25
71
|
}
|
|
26
|
-
export {};
|
|
@@ -7,9 +7,7 @@ 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 { CreateRestaurantDto } from './create-restaurant.dto';
|
|
10
|
+
import { IsString, IsOptional, IsMongoId, IsUUID, IsBoolean, IsLatitude, IsLongitude, IsPhoneNumber, IsTimeZone, IsNotEmpty, } from "class-validator";
|
|
13
11
|
/**
|
|
14
12
|
* DTO for updating an existing restaurant.
|
|
15
13
|
*
|
|
@@ -18,14 +16,61 @@ import { CreateRestaurantDto } from './create-restaurant.dto';
|
|
|
18
16
|
*
|
|
19
17
|
* @since 2.0.0
|
|
20
18
|
*/
|
|
21
|
-
export class UpdateRestaurantDto
|
|
19
|
+
export class UpdateRestaurantDto {
|
|
20
|
+
/**
|
|
21
|
+
* Restaurant name.
|
|
22
|
+
* Must not be empty.
|
|
23
|
+
*
|
|
24
|
+
* @example "McDonald's Downtown"
|
|
25
|
+
*/
|
|
26
|
+
name;
|
|
27
|
+
/**
|
|
28
|
+
* Optional restaurant address.
|
|
29
|
+
*
|
|
30
|
+
* @example "123 Main St, Downtown"
|
|
31
|
+
*/
|
|
32
|
+
address;
|
|
33
|
+
/**
|
|
34
|
+
* Latitude of the restaurant.
|
|
35
|
+
* Must be a valid number between -90 and 90.
|
|
36
|
+
*
|
|
37
|
+
* @example -12.04318
|
|
38
|
+
*/
|
|
39
|
+
latitude;
|
|
40
|
+
/**
|
|
41
|
+
* Longitude of the restaurant.
|
|
42
|
+
* Must be a valid number between -180 and 180.
|
|
43
|
+
*
|
|
44
|
+
* @example -77.02824
|
|
45
|
+
*/
|
|
46
|
+
longitude;
|
|
47
|
+
/**
|
|
48
|
+
* Optional restaurant phone number.
|
|
49
|
+
*
|
|
50
|
+
* @example "+1-555-0123"
|
|
51
|
+
*/
|
|
52
|
+
phone;
|
|
53
|
+
/**
|
|
54
|
+
* Optional restaurant timezone.
|
|
55
|
+
*
|
|
56
|
+
* @example "America/New_York"
|
|
57
|
+
*/
|
|
58
|
+
timezone;
|
|
59
|
+
/**
|
|
60
|
+
* Restaurant status (active/inactive).
|
|
61
|
+
* Defaults to true if not provided.
|
|
62
|
+
*
|
|
63
|
+
* @example true
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
status = true;
|
|
22
67
|
/**
|
|
23
68
|
* Restaurant ID to update.
|
|
24
69
|
* Must be a valid UUID.
|
|
25
70
|
*
|
|
26
71
|
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
27
72
|
*/
|
|
28
|
-
|
|
73
|
+
restaurantId;
|
|
29
74
|
/**
|
|
30
75
|
* User who updated the restaurant.
|
|
31
76
|
* Must be a valid MongoDB ObjectId if provided.
|
|
@@ -35,14 +80,53 @@ export class UpdateRestaurantDto extends PartialType(CreateRestaurantDto) {
|
|
|
35
80
|
updatedBy;
|
|
36
81
|
}
|
|
37
82
|
__decorate([
|
|
83
|
+
IsOptional(),
|
|
38
84
|
IsString(),
|
|
39
|
-
|
|
85
|
+
__metadata("design:type", String)
|
|
86
|
+
], UpdateRestaurantDto.prototype, "name", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
IsOptional(),
|
|
89
|
+
IsString(),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], UpdateRestaurantDto.prototype, "address", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
IsOptional(),
|
|
94
|
+
IsString({ message: "Latitude must be a string" }),
|
|
95
|
+
IsLatitude(),
|
|
96
|
+
__metadata("design:type", String)
|
|
97
|
+
], UpdateRestaurantDto.prototype, "latitude", void 0);
|
|
98
|
+
__decorate([
|
|
40
99
|
IsOptional(),
|
|
100
|
+
IsString({ message: "Longitude must be a string" }),
|
|
101
|
+
IsLongitude(),
|
|
41
102
|
__metadata("design:type", String)
|
|
42
|
-
], UpdateRestaurantDto.prototype, "
|
|
103
|
+
], UpdateRestaurantDto.prototype, "longitude", void 0);
|
|
43
104
|
__decorate([
|
|
105
|
+
IsOptional(),
|
|
44
106
|
IsString(),
|
|
45
|
-
|
|
107
|
+
IsPhoneNumber('PE'),
|
|
108
|
+
__metadata("design:type", String)
|
|
109
|
+
], UpdateRestaurantDto.prototype, "phone", void 0);
|
|
110
|
+
__decorate([
|
|
46
111
|
IsOptional(),
|
|
112
|
+
IsString(),
|
|
113
|
+
IsTimeZone(),
|
|
114
|
+
__metadata("design:type", String)
|
|
115
|
+
], UpdateRestaurantDto.prototype, "timezone", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
IsOptional(),
|
|
118
|
+
IsBoolean(),
|
|
119
|
+
__metadata("design:type", Boolean)
|
|
120
|
+
], UpdateRestaurantDto.prototype, "status", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
IsString(),
|
|
123
|
+
IsUUID(),
|
|
124
|
+
IsNotEmpty(),
|
|
125
|
+
__metadata("design:type", String)
|
|
126
|
+
], UpdateRestaurantDto.prototype, "restaurantId", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
IsString(),
|
|
129
|
+
IsMongoId(),
|
|
130
|
+
IsNotEmpty(),
|
|
47
131
|
__metadata("design:type", String)
|
|
48
132
|
], UpdateRestaurantDto.prototype, "updatedBy", void 0);
|
|
@@ -7,7 +7,7 @@ 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 { IsString, IsNotEmpty,
|
|
10
|
+
import { IsString, IsNotEmpty, MaxLength, IsMongoId, MinLength, } from "class-validator";
|
|
11
11
|
/**
|
|
12
12
|
* DTO for creating a new tag.
|
|
13
13
|
*
|
|
@@ -34,12 +34,13 @@ export class CreateTagDto {
|
|
|
34
34
|
}
|
|
35
35
|
__decorate([
|
|
36
36
|
IsString(),
|
|
37
|
-
IsNotEmpty({ message:
|
|
38
|
-
MaxLength(50, { message:
|
|
37
|
+
IsNotEmpty({ message: "Tag name is required" }),
|
|
38
|
+
MaxLength(50, { message: "Tag name must be at most 50 characters" }),
|
|
39
|
+
MinLength(3),
|
|
39
40
|
__metadata("design:type", String)
|
|
40
41
|
], CreateTagDto.prototype, "name", void 0);
|
|
41
42
|
__decorate([
|
|
42
|
-
|
|
43
|
+
IsNotEmpty(),
|
|
43
44
|
IsString(),
|
|
44
45
|
IsMongoId(),
|
|
45
46
|
__metadata("design:type", String)
|
|
@@ -7,7 +7,7 @@ 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 { IsString, IsMongoId, IsUUID } from 'class-validator';
|
|
10
|
+
import { IsString, IsMongoId, IsUUID, IsNotEmpty } from 'class-validator';
|
|
11
11
|
/**
|
|
12
12
|
* DTO for deleting a tag.
|
|
13
13
|
*
|
|
@@ -23,7 +23,7 @@ export class DeleteTagDto {
|
|
|
23
23
|
*
|
|
24
24
|
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
tagId;
|
|
27
27
|
/**
|
|
28
28
|
* User who deleted the tag.
|
|
29
29
|
* Must be a valid MongoDB ObjectId.
|
|
@@ -35,10 +35,12 @@ export class DeleteTagDto {
|
|
|
35
35
|
__decorate([
|
|
36
36
|
IsString(),
|
|
37
37
|
IsUUID(),
|
|
38
|
+
IsNotEmpty(),
|
|
38
39
|
__metadata("design:type", String)
|
|
39
|
-
], DeleteTagDto.prototype, "
|
|
40
|
+
], DeleteTagDto.prototype, "tagId", void 0);
|
|
40
41
|
__decorate([
|
|
41
42
|
IsString(),
|
|
42
43
|
IsMongoId(),
|
|
44
|
+
IsNotEmpty(),
|
|
43
45
|
__metadata("design:type", String)
|
|
44
46
|
], DeleteTagDto.prototype, "deletedBy", void 0);
|
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-tag.dto';
|
|
10
|
-
export * from './update-tag.dto';
|
|
11
|
-
export * from './delete-tag.dto';
|
|
12
|
-
export * from './search-by-name.dto';
|
|
9
|
+
export * from './create-tag.dto.js';
|
|
10
|
+
export * from './update-tag.dto.js';
|
|
11
|
+
export * from './delete-tag.dto.js';
|
package/dist/dtos/tags/index.js
CHANGED
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-tag.dto';
|
|
10
|
-
export * from './update-tag.dto';
|
|
11
|
-
export * from './delete-tag.dto';
|
|
12
|
-
export * from './search-by-name.dto';
|
|
9
|
+
export * from './create-tag.dto.js';
|
|
10
|
+
export * from './update-tag.dto.js';
|
|
11
|
+
export * from './delete-tag.dto.js';
|