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
|
@@ -20,14 +20,14 @@ export declare class PaymentSessionItemDto {
|
|
|
20
20
|
*
|
|
21
21
|
* @example "Large"
|
|
22
22
|
*/
|
|
23
|
-
sizeName?: string;
|
|
23
|
+
sizeName?: string | null;
|
|
24
24
|
/**
|
|
25
25
|
* Optional price for the size variant.
|
|
26
26
|
* Must be a positive number if provided.
|
|
27
27
|
*
|
|
28
28
|
* @example 12.99
|
|
29
29
|
*/
|
|
30
|
-
sizePrice?: number;
|
|
30
|
+
sizePrice?: number | null;
|
|
31
31
|
/**
|
|
32
32
|
* Name of the product/item.
|
|
33
33
|
*
|
|
@@ -53,13 +53,13 @@ export declare class PaymentSessionItemDto {
|
|
|
53
53
|
*
|
|
54
54
|
* @example "No onions, extra cheese"
|
|
55
55
|
*/
|
|
56
|
-
notes?: string;
|
|
56
|
+
notes?: string | null;
|
|
57
57
|
/**
|
|
58
58
|
* Optional status of this item.
|
|
59
59
|
*
|
|
60
60
|
* @example "pending"
|
|
61
61
|
*/
|
|
62
|
-
itemStatus?: string;
|
|
62
|
+
itemStatus?: string | null;
|
|
63
63
|
/**
|
|
64
64
|
* Optional array of child items (for nested structures like combo meals).
|
|
65
65
|
* Each child item is validated as a PaymentSessionItemDto.
|
|
@@ -80,6 +80,7 @@ export class PaymentSessionItemDto {
|
|
|
80
80
|
childItems;
|
|
81
81
|
}
|
|
82
82
|
__decorate([
|
|
83
|
+
IsNotEmpty(),
|
|
83
84
|
IsString(),
|
|
84
85
|
IsUUID(),
|
|
85
86
|
__metadata("design:type", String)
|
|
@@ -87,13 +88,13 @@ __decorate([
|
|
|
87
88
|
__decorate([
|
|
88
89
|
IsOptional(),
|
|
89
90
|
IsString(),
|
|
90
|
-
__metadata("design:type",
|
|
91
|
+
__metadata("design:type", Object)
|
|
91
92
|
], PaymentSessionItemDto.prototype, "sizeName", void 0);
|
|
92
93
|
__decorate([
|
|
93
94
|
IsOptional(),
|
|
94
95
|
IsNumber(),
|
|
95
96
|
IsPositive(),
|
|
96
|
-
__metadata("design:type",
|
|
97
|
+
__metadata("design:type", Object)
|
|
97
98
|
], PaymentSessionItemDto.prototype, "sizePrice", void 0);
|
|
98
99
|
__decorate([
|
|
99
100
|
IsString(),
|
|
@@ -103,22 +104,24 @@ __decorate([
|
|
|
103
104
|
__decorate([
|
|
104
105
|
IsNumber(),
|
|
105
106
|
IsPositive(),
|
|
107
|
+
IsNotEmpty(),
|
|
106
108
|
__metadata("design:type", Number)
|
|
107
109
|
], PaymentSessionItemDto.prototype, "quantity", void 0);
|
|
108
110
|
__decorate([
|
|
109
111
|
IsNumber(),
|
|
110
112
|
IsPositive(),
|
|
113
|
+
IsNotEmpty(),
|
|
111
114
|
__metadata("design:type", Number)
|
|
112
115
|
], PaymentSessionItemDto.prototype, "price", void 0);
|
|
113
116
|
__decorate([
|
|
114
117
|
IsOptional(),
|
|
115
118
|
IsString(),
|
|
116
|
-
__metadata("design:type",
|
|
119
|
+
__metadata("design:type", Object)
|
|
117
120
|
], PaymentSessionItemDto.prototype, "notes", void 0);
|
|
118
121
|
__decorate([
|
|
119
122
|
IsOptional(),
|
|
120
123
|
IsString(),
|
|
121
|
-
__metadata("design:type",
|
|
124
|
+
__metadata("design:type", Object)
|
|
122
125
|
], PaymentSessionItemDto.prototype, "itemStatus", void 0);
|
|
123
126
|
__decorate([
|
|
124
127
|
IsOptional(),
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { Type } from 'class-transformer';
|
|
11
11
|
import { IsString, IsNotEmpty, IsArray, ValidateNested, IsOptional, IsNumber, IsEmail, IsPositive, } from 'class-validator';
|
|
12
|
-
import { PaymentSessionItemDto } from './payment-session-item.dto';
|
|
12
|
+
import { PaymentSessionItemDto } from './payment-session-item.dto.js';
|
|
13
13
|
/**
|
|
14
14
|
* DTO for creating a payment session.
|
|
15
15
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProductStatus } from '../../enums';
|
|
1
|
+
import { ProductStatus } from '../../enums/product-status.enum.js';
|
|
2
2
|
/**
|
|
3
3
|
* DTO for creating a new product.
|
|
4
4
|
*
|
|
@@ -50,5 +50,5 @@ export declare class CreateProductDto {
|
|
|
50
50
|
*
|
|
51
51
|
* @example "507f1f77bcf86cd799439011"
|
|
52
52
|
*/
|
|
53
|
-
createdBy
|
|
53
|
+
createdBy: string;
|
|
54
54
|
}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { IsString, IsNotEmpty, IsNumber, Min, IsOptional, IsEnum, IsMongoId } from 'class-validator';
|
|
11
11
|
import { Type } from 'class-transformer';
|
|
12
|
-
import { ProductStatus } from '../../enums';
|
|
12
|
+
import { ProductStatus } from '../../enums/product-status.enum.js';
|
|
13
13
|
/**
|
|
14
14
|
* DTO for creating a new product.
|
|
15
15
|
*
|
|
@@ -79,6 +79,7 @@ __decorate([
|
|
|
79
79
|
__metadata("design:type", String)
|
|
80
80
|
], CreateProductDto.prototype, "description", void 0);
|
|
81
81
|
__decorate([
|
|
82
|
+
IsNotEmpty(),
|
|
82
83
|
IsNumber({
|
|
83
84
|
maxDecimalPlaces: 4,
|
|
84
85
|
}, { message: 'Base price must be a number with maximum 4 decimal places' }),
|
|
@@ -94,6 +95,6 @@ __decorate([
|
|
|
94
95
|
__decorate([
|
|
95
96
|
IsString(),
|
|
96
97
|
IsMongoId(),
|
|
97
|
-
|
|
98
|
+
IsNotEmpty(),
|
|
98
99
|
__metadata("design:type", String)
|
|
99
100
|
], CreateProductDto.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 { IsMongoId, IsString, IsUUID } from 'class-validator';
|
|
10
|
+
import { IsMongoId, IsNotEmpty, IsString, IsUUID } from 'class-validator';
|
|
11
11
|
/**
|
|
12
12
|
* DTO for deleting a product.
|
|
13
13
|
*
|
|
@@ -23,7 +23,7 @@ export class DeleteProductDto {
|
|
|
23
23
|
*
|
|
24
24
|
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
productId;
|
|
27
27
|
/**
|
|
28
28
|
* User who deleted the product.
|
|
29
29
|
* Must be a valid MongoDB ObjectId.
|
|
@@ -35,10 +35,12 @@ export class DeleteProductDto {
|
|
|
35
35
|
__decorate([
|
|
36
36
|
IsString(),
|
|
37
37
|
IsUUID(),
|
|
38
|
+
IsNotEmpty(),
|
|
38
39
|
__metadata("design:type", String)
|
|
39
|
-
], DeleteProductDto.prototype, "
|
|
40
|
+
], DeleteProductDto.prototype, "productId", void 0);
|
|
40
41
|
__decorate([
|
|
41
42
|
IsString(),
|
|
42
43
|
IsMongoId(),
|
|
44
|
+
IsNotEmpty(),
|
|
43
45
|
__metadata("design:type", String)
|
|
44
46
|
], DeleteProductDto.prototype, "deletedBy", void 0);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from "./create-product.dto";
|
|
10
|
-
export * from "./update-product.dto";
|
|
11
|
-
export * from "./delete-product.dto";
|
|
12
|
-
export * from "./submodules";
|
|
9
|
+
export * from "./create-product.dto.js";
|
|
10
|
+
export * from "./update-product.dto.js";
|
|
11
|
+
export * from "./delete-product.dto.js";
|
|
12
|
+
export * from "./submodules/index.js";
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from "./create-product.dto";
|
|
10
|
-
export * from "./update-product.dto";
|
|
11
|
-
export * from "./delete-product.dto";
|
|
9
|
+
export * from "./create-product.dto.js";
|
|
10
|
+
export * from "./update-product.dto.js";
|
|
11
|
+
export * from "./delete-product.dto.js";
|
|
12
12
|
// Submodules
|
|
13
|
-
export * from "./submodules";
|
|
13
|
+
export * from "./submodules/index.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from "./product-tag";
|
|
2
|
-
export * from "./product-size";
|
|
3
|
-
export * from "./product-image";
|
|
4
|
-
export * from "./product-schedule";
|
|
5
|
-
export * from "./product-recipe";
|
|
6
|
-
export * from "./product-question";
|
|
1
|
+
export * from "./product-tag/index.js";
|
|
2
|
+
export * from "./product-size/index.js";
|
|
3
|
+
export * from "./product-image/index.js";
|
|
4
|
+
export * from "./product-schedule/index.js";
|
|
5
|
+
export * from "./product-recipe/index.js";
|
|
6
|
+
export * from "./product-question/index.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Submodules
|
|
2
|
-
export * from "./product-tag";
|
|
3
|
-
export * from "./product-size";
|
|
4
|
-
export * from "./product-image";
|
|
5
|
-
export * from "./product-schedule";
|
|
6
|
-
export * from "./product-recipe";
|
|
7
|
-
export * from "./product-question";
|
|
2
|
+
export * from "./product-tag/index.js";
|
|
3
|
+
export * from "./product-size/index.js";
|
|
4
|
+
export * from "./product-image/index.js";
|
|
5
|
+
export * from "./product-schedule/index.js";
|
|
6
|
+
export * from "./product-recipe/index.js";
|
|
7
|
+
export * from "./product-question/index.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateProductImageDto } from
|
|
1
|
+
import { CreateProductImageDto } from "./create-product-image.dto.js";
|
|
2
2
|
/**
|
|
3
3
|
* DTO for bulk creating product images.
|
|
4
4
|
*
|
|
@@ -14,7 +14,7 @@ export declare class BulkCreateProductImageDto {
|
|
|
14
14
|
*
|
|
15
15
|
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
16
16
|
*/
|
|
17
|
-
productId
|
|
17
|
+
productId: string;
|
|
18
18
|
/**
|
|
19
19
|
* Array of images to create.
|
|
20
20
|
* Must contain at least one image.
|
|
@@ -22,5 +22,5 @@ export declare class BulkCreateProductImageDto {
|
|
|
22
22
|
*
|
|
23
23
|
* @example [{ url: "https://example.com/image1.jpg", isPrimary: true }]
|
|
24
24
|
*/
|
|
25
|
-
images: CreateProductImageDto[];
|
|
25
|
+
images: Omit<CreateProductImageDto, "productId">[];
|
|
26
26
|
}
|
|
@@ -7,9 +7,9 @@ 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, IsArray, ValidateNested, ArrayMinSize,
|
|
11
|
-
import { Type } from
|
|
12
|
-
import { CreateProductImageDto } from
|
|
10
|
+
import { IsString, IsNotEmpty, IsArray, ValidateNested, ArrayMinSize, IsUUID, } from "class-validator";
|
|
11
|
+
import { Type } from "class-transformer";
|
|
12
|
+
import { CreateProductImageDto } from "./create-product-image.dto.js";
|
|
13
13
|
/**
|
|
14
14
|
* DTO for bulk creating product images.
|
|
15
15
|
*
|
|
@@ -37,13 +37,13 @@ export class BulkCreateProductImageDto {
|
|
|
37
37
|
}
|
|
38
38
|
__decorate([
|
|
39
39
|
IsString(),
|
|
40
|
-
|
|
40
|
+
IsNotEmpty(),
|
|
41
41
|
IsUUID(),
|
|
42
42
|
__metadata("design:type", String)
|
|
43
43
|
], BulkCreateProductImageDto.prototype, "productId", void 0);
|
|
44
44
|
__decorate([
|
|
45
45
|
IsArray(),
|
|
46
|
-
ArrayMinSize(1, { message:
|
|
46
|
+
ArrayMinSize(1, { message: "At least one image is required" }),
|
|
47
47
|
ValidateNested({ each: true }),
|
|
48
48
|
Type(() => CreateProductImageDto),
|
|
49
49
|
__metadata("design:type", Array)
|
|
@@ -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, IsOptional, IsBoolean, IsUrl, IsUUID } from
|
|
10
|
+
import { IsString, IsNotEmpty, IsOptional, IsBoolean, IsUrl, IsUUID, } from "class-validator";
|
|
11
11
|
/**
|
|
12
12
|
* DTO for creating a new product image.
|
|
13
13
|
*
|
|
@@ -42,14 +42,14 @@ export class CreateProductImageDto {
|
|
|
42
42
|
}
|
|
43
43
|
__decorate([
|
|
44
44
|
IsString(),
|
|
45
|
-
|
|
45
|
+
IsNotEmpty(),
|
|
46
46
|
IsUUID(),
|
|
47
47
|
__metadata("design:type", String)
|
|
48
48
|
], CreateProductImageDto.prototype, "productId", void 0);
|
|
49
49
|
__decorate([
|
|
50
50
|
IsString(),
|
|
51
|
-
IsNotEmpty({ message:
|
|
52
|
-
IsUrl({}, { message:
|
|
51
|
+
IsNotEmpty({ message: "Image URL is required" }),
|
|
52
|
+
IsUrl({}, { message: "Image URL must be a valid URL" }),
|
|
53
53
|
__metadata("design:type", String)
|
|
54
54
|
], CreateProductImageDto.prototype, "url", void 0);
|
|
55
55
|
__decorate([
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-product-image.dto';
|
|
10
|
-
export * from './update-product-image.dto';
|
|
11
|
-
export * from './bulk-create-product-image.dto';
|
|
12
|
-
export * from './set-primary-image.dto';
|
|
9
|
+
export * from './create-product-image.dto.js';
|
|
10
|
+
export * from './update-product-image.dto.js';
|
|
11
|
+
export * from './bulk-create-product-image.dto.js';
|
|
12
|
+
export * from './set-primary-image.dto.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-product-image.dto';
|
|
10
|
-
export * from './update-product-image.dto';
|
|
11
|
-
export * from './bulk-create-product-image.dto';
|
|
12
|
-
export * from './set-primary-image.dto';
|
|
9
|
+
export * from './create-product-image.dto.js';
|
|
10
|
+
export * from './update-product-image.dto.js';
|
|
11
|
+
export * from './bulk-create-product-image.dto.js';
|
|
12
|
+
export * from './set-primary-image.dto.js';
|
|
@@ -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, IsUrl, IsUUID } from 'class-validator';
|
|
10
|
+
import { IsString, IsOptional, IsBoolean, IsUrl, IsUUID, IsNotEmpty } from 'class-validator';
|
|
11
11
|
/**
|
|
12
12
|
* DTO for updating an existing product image.
|
|
13
13
|
*
|
|
@@ -23,7 +23,7 @@ export class UpdateProductImageDto {
|
|
|
23
23
|
*
|
|
24
24
|
* @example "770e8400-e29b-41d4-a716-446655440003"
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
productImageId;
|
|
27
27
|
/**
|
|
28
28
|
* Optional image URL.
|
|
29
29
|
* Must be a valid URL format if provided.
|
|
@@ -39,11 +39,11 @@ export class UpdateProductImageDto {
|
|
|
39
39
|
isPrimary;
|
|
40
40
|
}
|
|
41
41
|
__decorate([
|
|
42
|
+
IsNotEmpty(),
|
|
42
43
|
IsString(),
|
|
43
|
-
IsOptional(),
|
|
44
44
|
IsUUID(),
|
|
45
45
|
__metadata("design:type", String)
|
|
46
|
-
], UpdateProductImageDto.prototype, "
|
|
46
|
+
], UpdateProductImageDto.prototype, "productImageId", void 0);
|
|
47
47
|
__decorate([
|
|
48
48
|
IsOptional(),
|
|
49
49
|
IsString(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QuestionProductType } from
|
|
1
|
+
import { QuestionProductType } from "../../../../enums/question-product-type.enum.js";
|
|
2
2
|
/**
|
|
3
3
|
* DTO for creating a new product-question relationship.
|
|
4
4
|
*
|
|
@@ -14,7 +14,7 @@ export declare class CreateProductQuestionDto {
|
|
|
14
14
|
*
|
|
15
15
|
* @example "550e8400-e29b-41d4-a716-446655440000"
|
|
16
16
|
*/
|
|
17
|
-
productId
|
|
17
|
+
productId: string;
|
|
18
18
|
/**
|
|
19
19
|
* Unique identifier of the question.
|
|
20
20
|
* Must be a valid UUID and not be empty.
|
|
@@ -7,9 +7,9 @@ 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, IsOptional, IsInt, IsEnum, Min, IsUUID } from
|
|
11
|
-
import { Type } from
|
|
12
|
-
import { QuestionProductType } from
|
|
10
|
+
import { IsString, IsNotEmpty, IsOptional, IsInt, IsEnum, Min, IsUUID, } from "class-validator";
|
|
11
|
+
import { Type } from "class-transformer";
|
|
12
|
+
import { QuestionProductType } from "../../../../enums/question-product-type.enum.js";
|
|
13
13
|
/**
|
|
14
14
|
* DTO for creating a new product-question relationship.
|
|
15
15
|
*
|
|
@@ -52,25 +52,25 @@ export class CreateProductQuestionDto {
|
|
|
52
52
|
__decorate([
|
|
53
53
|
IsUUID(),
|
|
54
54
|
IsString(),
|
|
55
|
-
|
|
55
|
+
IsNotEmpty(),
|
|
56
56
|
__metadata("design:type", String)
|
|
57
57
|
], CreateProductQuestionDto.prototype, "productId", void 0);
|
|
58
58
|
__decorate([
|
|
59
59
|
IsUUID(),
|
|
60
60
|
IsString(),
|
|
61
|
-
IsNotEmpty({ message:
|
|
61
|
+
IsNotEmpty({ message: "Question ID is required" }),
|
|
62
62
|
__metadata("design:type", String)
|
|
63
63
|
], CreateProductQuestionDto.prototype, "questionId", void 0);
|
|
64
64
|
__decorate([
|
|
65
65
|
IsOptional(),
|
|
66
|
-
IsInt({ message:
|
|
67
|
-
Min(0, { message:
|
|
66
|
+
IsInt({ message: "Position must be an integer" }),
|
|
67
|
+
Min(0, { message: "Position must be at least 0" }),
|
|
68
68
|
Type(() => Number),
|
|
69
69
|
__metadata("design:type", Number)
|
|
70
70
|
], CreateProductQuestionDto.prototype, "position", void 0);
|
|
71
71
|
__decorate([
|
|
72
72
|
IsEnum(QuestionProductType, {
|
|
73
|
-
message:
|
|
73
|
+
message: "Item type must be either QUESTION or ANSWER",
|
|
74
74
|
}),
|
|
75
75
|
__metadata("design:type", String)
|
|
76
76
|
], CreateProductQuestionDto.prototype, "itemType", 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, IsNotEmpty, IsUUID, IsEnum } from 'class-validator';
|
|
11
|
-
import { QuestionProductType } from '../../../../enums';
|
|
11
|
+
import { QuestionProductType } from '../../../../enums/question-product-type.enum.js';
|
|
12
12
|
/**
|
|
13
13
|
* DTO for finding product questions by product ID and type.
|
|
14
14
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-product-question.dto';
|
|
10
|
-
export * from './update-product-question.dto';
|
|
11
|
-
export * from './replace-by-product-id.dto';
|
|
12
|
-
export * from './find-by-product-id-and-type.dto';
|
|
9
|
+
export * from './create-product-question.dto.js';
|
|
10
|
+
export * from './update-product-question.dto.js';
|
|
11
|
+
export * from './replace-by-product-id.dto.js';
|
|
12
|
+
export * from './find-by-product-id-and-type.dto.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-product-question.dto';
|
|
10
|
-
export * from './update-product-question.dto';
|
|
11
|
-
export * from './replace-by-product-id.dto';
|
|
12
|
-
export * from './find-by-product-id-and-type.dto';
|
|
9
|
+
export * from './create-product-question.dto.js';
|
|
10
|
+
export * from './update-product-question.dto.js';
|
|
11
|
+
export * from './replace-by-product-id.dto.js';
|
|
12
|
+
export * from './find-by-product-id-and-type.dto.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateProductQuestionDto } from './create-product-question.dto';
|
|
1
|
+
import { CreateProductQuestionDto } from './create-product-question.dto.js';
|
|
2
2
|
/**
|
|
3
3
|
* DTO for replacing all product-question relationships.
|
|
4
4
|
*
|
|
@@ -23,5 +23,5 @@ export declare class ReplaceProductQuestionsByProductIdDto {
|
|
|
23
23
|
*
|
|
24
24
|
* @example [{ questionId: "...", position: 1, itemType: QuestionProductType.QUESTION }]
|
|
25
25
|
*/
|
|
26
|
-
questions: CreateProductQuestionDto[];
|
|
26
|
+
questions: Omit<CreateProductQuestionDto, 'productId'>[];
|
|
27
27
|
}
|
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { IsString, IsNotEmpty, IsUUID, IsArray, ValidateNested, ArrayMinSize, } from 'class-validator';
|
|
11
11
|
import { Type } from 'class-transformer';
|
|
12
|
-
import { CreateProductQuestionDto } from './create-product-question.dto';
|
|
12
|
+
import { CreateProductQuestionDto } from './create-product-question.dto.js';
|
|
13
13
|
/**
|
|
14
14
|
* DTO for replacing all product-question relationships.
|
|
15
15
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { QuestionProductType } from '../../../../enums';
|
|
1
|
+
import { QuestionProductType } from '../../../../enums/question-product-type.enum.js';
|
|
2
2
|
/**
|
|
3
3
|
* DTO for updating an existing product-question relationship.
|
|
4
4
|
*
|
|
@@ -14,7 +14,7 @@ export declare class UpdateProductQuestionDto {
|
|
|
14
14
|
*
|
|
15
15
|
* @example "aa0e8400-e29b-41d4-a716-446655440006"
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
productQuestionId: string;
|
|
18
18
|
/**
|
|
19
19
|
* Optional position/order of the question.
|
|
20
20
|
* Used to control the display order. Must be a non-negative integer if provided.
|
|
@@ -7,9 +7,9 @@ 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, IsInt, IsEnum, Min, IsUUID } from 'class-validator';
|
|
10
|
+
import { IsString, IsOptional, IsInt, IsEnum, Min, IsUUID, IsNotEmpty } from 'class-validator';
|
|
11
11
|
import { Type } from 'class-transformer';
|
|
12
|
-
import { QuestionProductType } from '../../../../enums';
|
|
12
|
+
import { QuestionProductType } from '../../../../enums/question-product-type.enum.js';
|
|
13
13
|
/**
|
|
14
14
|
* DTO for updating an existing product-question relationship.
|
|
15
15
|
*
|
|
@@ -25,7 +25,7 @@ export class UpdateProductQuestionDto {
|
|
|
25
25
|
*
|
|
26
26
|
* @example "aa0e8400-e29b-41d4-a716-446655440006"
|
|
27
27
|
*/
|
|
28
|
-
|
|
28
|
+
productQuestionId;
|
|
29
29
|
/**
|
|
30
30
|
* Optional position/order of the question.
|
|
31
31
|
* Used to control the display order. Must be a non-negative integer if provided.
|
|
@@ -43,10 +43,10 @@ export class UpdateProductQuestionDto {
|
|
|
43
43
|
}
|
|
44
44
|
__decorate([
|
|
45
45
|
IsString(),
|
|
46
|
-
|
|
46
|
+
IsNotEmpty(),
|
|
47
47
|
IsUUID(),
|
|
48
48
|
__metadata("design:type", String)
|
|
49
|
-
], UpdateProductQuestionDto.prototype, "
|
|
49
|
+
], UpdateProductQuestionDto.prototype, "productQuestionId", void 0);
|
|
50
50
|
__decorate([
|
|
51
51
|
IsOptional(),
|
|
52
52
|
IsInt({ message: 'Position must be an integer' }),
|
|
@@ -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, IsNumber, IsPositive, IsUUID
|
|
10
|
+
import { IsString, IsNotEmpty, IsNumber, IsPositive, IsUUID } from 'class-validator';
|
|
11
11
|
/**
|
|
12
12
|
* DTO for creating a new product recipe entry.
|
|
13
13
|
*
|
|
@@ -48,7 +48,7 @@ export class CreateProductRecipeDto {
|
|
|
48
48
|
}
|
|
49
49
|
__decorate([
|
|
50
50
|
IsString(),
|
|
51
|
-
|
|
51
|
+
IsNotEmpty(),
|
|
52
52
|
IsUUID(),
|
|
53
53
|
__metadata("design:type", String)
|
|
54
54
|
], CreateProductRecipeDto.prototype, "productId", void 0);
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-product-recipe.dto';
|
|
10
|
-
export * from './update-product-recipe.dto';
|
|
11
|
-
export * from './replace-by-product-id.dto';
|
|
9
|
+
export * from './create-product-recipe.dto.js';
|
|
10
|
+
export * from './update-product-recipe.dto.js';
|
|
11
|
+
export * from './replace-by-product-id.dto.js';
|
|
@@ -6,6 +6,6 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-product-recipe.dto';
|
|
10
|
-
export * from './update-product-recipe.dto';
|
|
11
|
-
export * from './replace-by-product-id.dto';
|
|
9
|
+
export * from './create-product-recipe.dto.js';
|
|
10
|
+
export * from './update-product-recipe.dto.js';
|
|
11
|
+
export * from './replace-by-product-id.dto.js';
|