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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ProductStatus } from '../../enums/product-status.enum.js';
|
|
2
2
|
/**
|
|
3
3
|
* DTO for updating an existing product.
|
|
4
4
|
*
|
|
@@ -8,7 +8,43 @@ declare const UpdateProductDto_base: import("@nestjs/mapped-types").MappedType<P
|
|
|
8
8
|
*
|
|
9
9
|
* @since 2.0.0
|
|
10
10
|
*/
|
|
11
|
-
export declare class UpdateProductDto
|
|
11
|
+
export declare class UpdateProductDto {
|
|
12
|
+
/**
|
|
13
|
+
* Product SKU (Stock Keeping Unit).
|
|
14
|
+
* Optional unique identifier for inventory management.
|
|
15
|
+
*
|
|
16
|
+
* @example "PROD-001"
|
|
17
|
+
*/
|
|
18
|
+
sku?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Product name.
|
|
21
|
+
* Must not be empty.
|
|
22
|
+
*
|
|
23
|
+
* @example "Big Mac"
|
|
24
|
+
*/
|
|
25
|
+
name: string;
|
|
26
|
+
/**
|
|
27
|
+
* Product description.
|
|
28
|
+
* Optional detailed description of the product.
|
|
29
|
+
*
|
|
30
|
+
* @example "Two all-beef patties, special sauce, lettuce, cheese, pickles, onions on a sesame seed bun"
|
|
31
|
+
*/
|
|
32
|
+
description?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Product base price.
|
|
35
|
+
* Must be a number with maximum 4 decimal places and minimum value of 0.
|
|
36
|
+
*
|
|
37
|
+
* @example 5.99
|
|
38
|
+
*/
|
|
39
|
+
basePrice: number;
|
|
40
|
+
/**
|
|
41
|
+
* Product status.
|
|
42
|
+
* Defaults to ACTIVE if not provided.
|
|
43
|
+
*
|
|
44
|
+
* @example ProductStatus.ACTIVE
|
|
45
|
+
* @default ProductStatus.ACTIVE
|
|
46
|
+
*/
|
|
47
|
+
status?: ProductStatus;
|
|
12
48
|
/**
|
|
13
49
|
* Product ID to update.
|
|
14
50
|
* Must be a valid UUID.
|
|
@@ -24,4 +60,3 @@ export declare class UpdateProductDto extends UpdateProductDto_base {
|
|
|
24
60
|
*/
|
|
25
61
|
updatedBy?: string;
|
|
26
62
|
}
|
|
27
|
-
export {};
|
|
@@ -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 {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { IsMongoId, IsString, IsUUID, IsOptional, IsEnum, Min, IsNumber } from 'class-validator';
|
|
11
|
+
import { ProductStatus } from '../../enums/product-status.enum.js';
|
|
12
|
+
import { Type } from 'class-transformer';
|
|
13
13
|
/**
|
|
14
14
|
* DTO for updating an existing product.
|
|
15
15
|
*
|
|
@@ -19,7 +19,43 @@ import { CreateProductDto } from './create-product.dto';
|
|
|
19
19
|
*
|
|
20
20
|
* @since 2.0.0
|
|
21
21
|
*/
|
|
22
|
-
export class UpdateProductDto
|
|
22
|
+
export class UpdateProductDto {
|
|
23
|
+
/**
|
|
24
|
+
* Product SKU (Stock Keeping Unit).
|
|
25
|
+
* Optional unique identifier for inventory management.
|
|
26
|
+
*
|
|
27
|
+
* @example "PROD-001"
|
|
28
|
+
*/
|
|
29
|
+
sku;
|
|
30
|
+
/**
|
|
31
|
+
* Product name.
|
|
32
|
+
* Must not be empty.
|
|
33
|
+
*
|
|
34
|
+
* @example "Big Mac"
|
|
35
|
+
*/
|
|
36
|
+
name;
|
|
37
|
+
/**
|
|
38
|
+
* Product description.
|
|
39
|
+
* Optional detailed description of the product.
|
|
40
|
+
*
|
|
41
|
+
* @example "Two all-beef patties, special sauce, lettuce, cheese, pickles, onions on a sesame seed bun"
|
|
42
|
+
*/
|
|
43
|
+
description;
|
|
44
|
+
/**
|
|
45
|
+
* Product base price.
|
|
46
|
+
* Must be a number with maximum 4 decimal places and minimum value of 0.
|
|
47
|
+
*
|
|
48
|
+
* @example 5.99
|
|
49
|
+
*/
|
|
50
|
+
basePrice;
|
|
51
|
+
/**
|
|
52
|
+
* Product status.
|
|
53
|
+
* Defaults to ACTIVE if not provided.
|
|
54
|
+
*
|
|
55
|
+
* @example ProductStatus.ACTIVE
|
|
56
|
+
* @default ProductStatus.ACTIVE
|
|
57
|
+
*/
|
|
58
|
+
status = ProductStatus.ACTIVE;
|
|
23
59
|
/**
|
|
24
60
|
* Product ID to update.
|
|
25
61
|
* Must be a valid UUID.
|
|
@@ -35,6 +71,35 @@ export class UpdateProductDto extends PartialType(CreateProductDto) {
|
|
|
35
71
|
*/
|
|
36
72
|
updatedBy;
|
|
37
73
|
}
|
|
74
|
+
__decorate([
|
|
75
|
+
IsOptional(),
|
|
76
|
+
IsString(),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], UpdateProductDto.prototype, "sku", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
IsOptional(),
|
|
81
|
+
IsString(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], UpdateProductDto.prototype, "name", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
IsOptional(),
|
|
86
|
+
IsString(),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], UpdateProductDto.prototype, "description", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
IsOptional(),
|
|
91
|
+
IsNumber({
|
|
92
|
+
maxDecimalPlaces: 4,
|
|
93
|
+
}, { message: 'Base price must be a number with maximum 4 decimal places' }),
|
|
94
|
+
Type(() => Number),
|
|
95
|
+
Min(0, { message: 'Base price must be greater than or equal to 0' }),
|
|
96
|
+
__metadata("design:type", Number)
|
|
97
|
+
], UpdateProductDto.prototype, "basePrice", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
IsOptional(),
|
|
100
|
+
IsEnum(ProductStatus, { message: 'Status must be ACTIVE, INACTIVE, or OUT_OF_STOCK' }),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], UpdateProductDto.prototype, "status", void 0);
|
|
38
103
|
__decorate([
|
|
39
104
|
IsString(),
|
|
40
105
|
IsUUID(),
|
|
@@ -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, IsOptional, IsBoolean, IsInt, IsEnum, Min, IsMongoId } from 'class-validator';
|
|
11
|
-
import { QuestionType } from '../../enums/question-type.enum';
|
|
11
|
+
import { QuestionType } from '../../enums/question-type.enum.js';
|
|
12
12
|
/**
|
|
13
13
|
* DTO for creating a new question.
|
|
14
14
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @since 2.0.0
|
|
8
8
|
*/
|
|
9
|
-
export * from './create-question.dto';
|
|
10
|
-
export * from './update-question.dto';
|
|
11
|
-
export * from './delete-question.dto';
|
|
12
|
-
export * from './search-by-name.dto';
|
|
9
|
+
export * from './create-question.dto.js';
|
|
10
|
+
export * from './update-question.dto.js';
|
|
11
|
+
export * from './delete-question.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-question.dto';
|
|
10
|
-
export * from './update-question.dto';
|
|
11
|
-
export * from './delete-question.dto';
|
|
12
|
-
export * from './search-by-name.dto';
|
|
9
|
+
export * from './create-question.dto.js';
|
|
10
|
+
export * from './update-question.dto.js';
|
|
11
|
+
export * from './delete-question.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 questions by name.
|
|
14
14
|
*
|
|
@@ -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,7 +7,43 @@ 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.
|
|
@@ -23,4 +59,3 @@ export declare class UpdateQuestionDto extends UpdateQuestionDto_base {
|
|
|
23
59
|
*/
|
|
24
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 } 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,7 +17,43 @@ 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.
|
|
@@ -34,6 +69,33 @@ export class UpdateQuestionDto extends PartialType(CreateQuestionDto) {
|
|
|
34
69
|
*/
|
|
35
70
|
updatedBy;
|
|
36
71
|
}
|
|
72
|
+
__decorate([
|
|
73
|
+
IsString(),
|
|
74
|
+
IsOptional(),
|
|
75
|
+
__metadata("design:type", String)
|
|
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);
|
|
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);
|
|
37
99
|
__decorate([
|
|
38
100
|
IsString(),
|
|
39
101
|
IsUUID(),
|
|
@@ -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,7 +6,47 @@ 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
|
+
* Chain ID that owns this restaurant.
|
|
12
|
+
* Must not be empty.
|
|
13
|
+
*
|
|
14
|
+
* @example "chain-uuid-123"
|
|
15
|
+
*/
|
|
16
|
+
chainId: string;
|
|
17
|
+
/**
|
|
18
|
+
* Restaurant name.
|
|
19
|
+
* Must not be empty.
|
|
20
|
+
*
|
|
21
|
+
* @example "McDonald's Downtown"
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Optional restaurant address.
|
|
26
|
+
*
|
|
27
|
+
* @example "123 Main St, Downtown"
|
|
28
|
+
*/
|
|
29
|
+
address?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Optional restaurant phone number.
|
|
32
|
+
*
|
|
33
|
+
* @example "+1-555-0123"
|
|
34
|
+
*/
|
|
35
|
+
phone?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Optional restaurant timezone.
|
|
38
|
+
*
|
|
39
|
+
* @example "America/New_York"
|
|
40
|
+
*/
|
|
41
|
+
timezone?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Restaurant status (active/inactive).
|
|
44
|
+
* Defaults to true if not provided.
|
|
45
|
+
*
|
|
46
|
+
* @example true
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
status?: boolean;
|
|
11
50
|
/**
|
|
12
51
|
* Restaurant ID to update.
|
|
13
52
|
* Must be a valid UUID.
|
|
@@ -23,4 +62,3 @@ export declare class UpdateRestaurantDto extends UpdateRestaurantDto_base {
|
|
|
23
62
|
*/
|
|
24
63
|
updatedBy?: string;
|
|
25
64
|
}
|
|
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 } from 'class-validator';
|
|
13
11
|
/**
|
|
14
12
|
* DTO for updating an existing restaurant.
|
|
15
13
|
*
|
|
@@ -18,7 +16,47 @@ 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
|
+
* Chain ID that owns this restaurant.
|
|
22
|
+
* Must not be empty.
|
|
23
|
+
*
|
|
24
|
+
* @example "chain-uuid-123"
|
|
25
|
+
*/
|
|
26
|
+
chainId;
|
|
27
|
+
/**
|
|
28
|
+
* Restaurant name.
|
|
29
|
+
* Must not be empty.
|
|
30
|
+
*
|
|
31
|
+
* @example "McDonald's Downtown"
|
|
32
|
+
*/
|
|
33
|
+
name;
|
|
34
|
+
/**
|
|
35
|
+
* Optional restaurant address.
|
|
36
|
+
*
|
|
37
|
+
* @example "123 Main St, Downtown"
|
|
38
|
+
*/
|
|
39
|
+
address;
|
|
40
|
+
/**
|
|
41
|
+
* Optional restaurant phone number.
|
|
42
|
+
*
|
|
43
|
+
* @example "+1-555-0123"
|
|
44
|
+
*/
|
|
45
|
+
phone;
|
|
46
|
+
/**
|
|
47
|
+
* Optional restaurant timezone.
|
|
48
|
+
*
|
|
49
|
+
* @example "America/New_York"
|
|
50
|
+
*/
|
|
51
|
+
timezone;
|
|
52
|
+
/**
|
|
53
|
+
* Restaurant status (active/inactive).
|
|
54
|
+
* Defaults to true if not provided.
|
|
55
|
+
*
|
|
56
|
+
* @example true
|
|
57
|
+
* @default true
|
|
58
|
+
*/
|
|
59
|
+
status = true;
|
|
22
60
|
/**
|
|
23
61
|
* Restaurant ID to update.
|
|
24
62
|
* Must be a valid UUID.
|
|
@@ -34,6 +72,36 @@ export class UpdateRestaurantDto extends PartialType(CreateRestaurantDto) {
|
|
|
34
72
|
*/
|
|
35
73
|
updatedBy;
|
|
36
74
|
}
|
|
75
|
+
__decorate([
|
|
76
|
+
IsOptional(),
|
|
77
|
+
IsString(),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], UpdateRestaurantDto.prototype, "chainId", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
IsOptional(),
|
|
82
|
+
IsString(),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], UpdateRestaurantDto.prototype, "name", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
IsOptional(),
|
|
87
|
+
IsString(),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], UpdateRestaurantDto.prototype, "address", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
IsOptional(),
|
|
92
|
+
IsString(),
|
|
93
|
+
__metadata("design:type", String)
|
|
94
|
+
], UpdateRestaurantDto.prototype, "phone", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
IsOptional(),
|
|
97
|
+
IsString(),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], UpdateRestaurantDto.prototype, "timezone", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
IsOptional(),
|
|
102
|
+
IsBoolean(),
|
|
103
|
+
__metadata("design:type", Boolean)
|
|
104
|
+
], UpdateRestaurantDto.prototype, "status", void 0);
|
|
37
105
|
__decorate([
|
|
38
106
|
IsString(),
|
|
39
107
|
IsUUID(),
|
|
@@ -6,7 +6,7 @@
|
|
|
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';
|
|
12
|
+
export * from './search-by-name.dto.js';
|
package/dist/dtos/tags/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
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';
|
|
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 tags by name.
|
|
14
14
|
*
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
declare const UpdateTagDto_base: import("@nestjs/mapped-types").MappedType<Partial<unknown>>;
|
|
2
1
|
/**
|
|
3
2
|
* DTO for updating an existing tag.
|
|
4
3
|
*
|
|
@@ -7,7 +6,14 @@ declare const UpdateTagDto_base: import("@nestjs/mapped-types").MappedType<Parti
|
|
|
7
6
|
*
|
|
8
7
|
* @since 2.0.0
|
|
9
8
|
*/
|
|
10
|
-
export declare class UpdateTagDto
|
|
9
|
+
export declare class UpdateTagDto {
|
|
10
|
+
/**
|
|
11
|
+
* Name of the tag.
|
|
12
|
+
* Must not be empty and maximum length of 50 characters.
|
|
13
|
+
*
|
|
14
|
+
* @example "vegetarian"
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
11
17
|
/**
|
|
12
18
|
* Tag ID to update.
|
|
13
19
|
* Must be a valid UUID.
|
|
@@ -23,4 +29,3 @@ export declare class UpdateTagDto extends UpdateTagDto_base {
|
|
|
23
29
|
*/
|
|
24
30
|
updatedBy?: string;
|
|
25
31
|
}
|
|
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 { CreateTagDto } from './create-tag.dto';
|
|
10
|
+
import { IsString, IsOptional, IsMongoId, IsUUID, MaxLength } from 'class-validator';
|
|
13
11
|
/**
|
|
14
12
|
* DTO for updating an existing tag.
|
|
15
13
|
*
|
|
@@ -18,7 +16,14 @@ import { CreateTagDto } from './create-tag.dto';
|
|
|
18
16
|
*
|
|
19
17
|
* @since 2.0.0
|
|
20
18
|
*/
|
|
21
|
-
export class UpdateTagDto
|
|
19
|
+
export class UpdateTagDto {
|
|
20
|
+
/**
|
|
21
|
+
* Name of the tag.
|
|
22
|
+
* Must not be empty and maximum length of 50 characters.
|
|
23
|
+
*
|
|
24
|
+
* @example "vegetarian"
|
|
25
|
+
*/
|
|
26
|
+
name;
|
|
22
27
|
/**
|
|
23
28
|
* Tag ID to update.
|
|
24
29
|
* Must be a valid UUID.
|
|
@@ -35,14 +40,20 @@ export class UpdateTagDto extends PartialType(CreateTagDto) {
|
|
|
35
40
|
updatedBy;
|
|
36
41
|
}
|
|
37
42
|
__decorate([
|
|
43
|
+
IsOptional(),
|
|
38
44
|
IsString(),
|
|
39
|
-
|
|
45
|
+
MaxLength(50, { message: 'Tag name must be at most 50 characters' }),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], UpdateTagDto.prototype, "name", void 0);
|
|
48
|
+
__decorate([
|
|
40
49
|
IsOptional(),
|
|
50
|
+
IsString(),
|
|
51
|
+
IsUUID(),
|
|
41
52
|
__metadata("design:type", String)
|
|
42
53
|
], UpdateTagDto.prototype, "id", void 0);
|
|
43
54
|
__decorate([
|
|
55
|
+
IsOptional(),
|
|
44
56
|
IsString(),
|
|
45
57
|
IsMongoId(),
|
|
46
|
-
IsOptional(),
|
|
47
58
|
__metadata("design:type", String)
|
|
48
59
|
], UpdateTagDto.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, IsEnum, IsUUID } from 'class-validator';
|
|
11
|
-
import { LanguageCode } from '../../enums/language-code.enum';
|
|
11
|
+
import { LanguageCode } from '../../enums/language-code.enum.js';
|
|
12
12
|
/**
|
|
13
13
|
* DTO for creating a translation
|
|
14
14
|
*/
|