qeai-sdk 2.0.1 → 2.0.3

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.
Files changed (148) hide show
  1. package/dist/dtos/auth/register-user.dto.js +4 -1
  2. package/dist/dtos/categories/create-category.dto.js +6 -3
  3. package/dist/dtos/categories/delete-category.dto.d.ts +1 -1
  4. package/dist/dtos/categories/delete-category.dto.js +5 -3
  5. package/dist/dtos/categories/update-category.dto.d.ts +12 -10
  6. package/dist/dtos/categories/update-category.dto.js +15 -13
  7. package/dist/dtos/chain/create-chain.dto.d.ts +14 -16
  8. package/dist/dtos/chain/create-chain.dto.js +24 -22
  9. package/dist/dtos/chain/delete-chain.dto.d.ts +6 -6
  10. package/dist/dtos/chain/delete-chain.dto.js +11 -9
  11. package/dist/dtos/chain/update-chain.dto.d.ts +30 -20
  12. package/dist/dtos/chain/update-chain.dto.js +39 -26
  13. package/dist/dtos/common/search-by-name.dto.d.ts +23 -0
  14. package/dist/dtos/common/search-by-name.dto.js +24 -1
  15. package/dist/dtos/ingredients/create-ingredient.dto.d.ts +5 -5
  16. package/dist/dtos/ingredients/create-ingredient.dto.js +9 -8
  17. package/dist/dtos/ingredients/delete-ingredient.dto.d.ts +14 -7
  18. package/dist/dtos/ingredients/delete-ingredient.dto.js +18 -9
  19. package/dist/dtos/ingredients/index.d.ts +0 -1
  20. package/dist/dtos/ingredients/index.js +0 -1
  21. package/dist/dtos/ingredients/update-ingredient.dto.d.ts +20 -11
  22. package/dist/dtos/ingredients/update-ingredient.dto.js +28 -19
  23. package/dist/dtos/orders/change-order-status.dto.d.ts +19 -10
  24. package/dist/dtos/orders/change-order-status.dto.js +27 -14
  25. package/dist/dtos/orders/create-order.dto.d.ts +33 -23
  26. package/dist/dtos/orders/create-order.dto.js +43 -31
  27. package/dist/dtos/orders/order-item.dto.d.ts +35 -18
  28. package/dist/dtos/orders/order-item.dto.js +54 -32
  29. package/dist/dtos/orders/order-pagination.dto.d.ts +1 -1
  30. package/dist/dtos/orders/order-pagination.dto.js +3 -3
  31. package/dist/dtos/orders/paid-order.dto.d.ts +16 -8
  32. package/dist/dtos/orders/paid-order.dto.js +25 -14
  33. package/dist/dtos/payments/create-payment-audit-dynamo.dto.d.ts +81 -0
  34. package/dist/dtos/payments/create-payment-audit-dynamo.dto.js +81 -0
  35. package/dist/dtos/payments/create-payment-audit-s3.dto.d.ts +81 -0
  36. package/dist/dtos/payments/create-payment-audit-s3.dto.js +81 -0
  37. package/dist/dtos/payments/index.d.ts +2 -0
  38. package/dist/dtos/payments/index.js +2 -0
  39. package/dist/dtos/payments/payment-session-item.dto.d.ts +4 -4
  40. package/dist/dtos/payments/payment-session-item.dto.js +7 -4
  41. package/dist/dtos/payments/webhook-data.dto.d.ts +1 -1
  42. package/dist/dtos/payments/webhook-data.dto.js +1 -0
  43. package/dist/dtos/products/create-product.dto.d.ts +2 -2
  44. package/dist/dtos/products/create-product.dto.js +12 -9
  45. package/dist/dtos/products/delete-product.dto.d.ts +1 -1
  46. package/dist/dtos/products/delete-product.dto.js +5 -3
  47. package/dist/dtos/products/submodules/product-image/bulk-create-product-image.dto.d.ts +3 -3
  48. package/dist/dtos/products/submodules/product-image/bulk-create-product-image.dto.js +5 -5
  49. package/dist/dtos/products/submodules/product-image/create-product-image.dto.d.ts +1 -1
  50. package/dist/dtos/products/submodules/product-image/create-product-image.dto.js +4 -4
  51. package/dist/dtos/products/submodules/product-image/update-product-image.dto.d.ts +1 -1
  52. package/dist/dtos/products/submodules/product-image/update-product-image.dto.js +4 -4
  53. package/dist/dtos/products/submodules/product-question/create-product-question.dto.d.ts +2 -2
  54. package/dist/dtos/products/submodules/product-question/create-product-question.dto.js +8 -8
  55. package/dist/dtos/products/submodules/product-question/replace-by-product-id.dto.d.ts +1 -1
  56. package/dist/dtos/products/submodules/product-question/update-product-question.dto.d.ts +1 -1
  57. package/dist/dtos/products/submodules/product-question/update-product-question.dto.js +4 -4
  58. package/dist/dtos/products/submodules/product-recipe/create-product-recipe.dto.d.ts +1 -1
  59. package/dist/dtos/products/submodules/product-recipe/create-product-recipe.dto.js +2 -2
  60. package/dist/dtos/products/submodules/product-recipe/replace-by-product-id.dto.d.ts +2 -2
  61. package/dist/dtos/products/submodules/product-recipe/replace-by-product-id.dto.js +5 -5
  62. package/dist/dtos/products/submodules/product-recipe/update-product-recipe.dto.d.ts +1 -8
  63. package/dist/dtos/products/submodules/product-recipe/update-product-recipe.dto.js +3 -16
  64. package/dist/dtos/products/submodules/product-schedule/create-product-schedule.dto.d.ts +1 -1
  65. package/dist/dtos/products/submodules/product-schedule/create-product-schedule.dto.js +2 -2
  66. package/dist/dtos/products/submodules/product-schedule/replace-by-product-id.dto.d.ts +1 -1
  67. package/dist/dtos/products/submodules/product-schedule/update-product-schedule.dto.d.ts +1 -1
  68. package/dist/dtos/products/submodules/product-schedule/update-product-schedule.dto.js +4 -4
  69. package/dist/dtos/products/submodules/product-size/create-product-size.dto.js +1 -1
  70. package/dist/dtos/products/submodules/product-size/product-size-data.dto.js +1 -1
  71. package/dist/dtos/products/submodules/product-size/update-product-size.dto.d.ts +1 -1
  72. package/dist/dtos/products/submodules/product-size/update-product-size.dto.js +2 -2
  73. package/dist/dtos/products/submodules/product-tag/index.d.ts +1 -3
  74. package/dist/dtos/products/submodules/product-tag/index.js +1 -3
  75. package/dist/dtos/products/submodules/product-tag/{remove-product-tag.dto.d.ts → product-tag.dto.d.ts} +1 -1
  76. package/dist/dtos/products/submodules/product-tag/{remove-product-tag.dto.js → product-tag.dto.js} +3 -3
  77. package/dist/dtos/products/update-product.dto.d.ts +5 -5
  78. package/dist/dtos/products/update-product.dto.js +10 -7
  79. package/dist/dtos/questions/create-question.dto.d.ts +1 -1
  80. package/dist/dtos/questions/create-question.dto.js +2 -1
  81. package/dist/dtos/questions/delete-question.dto.d.ts +1 -1
  82. package/dist/dtos/questions/delete-question.dto.js +5 -3
  83. package/dist/dtos/questions/index.d.ts +0 -1
  84. package/dist/dtos/questions/index.js +0 -1
  85. package/dist/dtos/questions/update-question.dto.d.ts +4 -4
  86. package/dist/dtos/questions/update-question.dto.js +5 -5
  87. package/dist/dtos/restaurants/create-restaurant.dto.d.ts +15 -1
  88. package/dist/dtos/restaurants/create-restaurant.dto.js +38 -2
  89. package/dist/dtos/restaurants/delete-restaurant.dto.d.ts +1 -1
  90. package/dist/dtos/restaurants/delete-restaurant.dto.js +5 -3
  91. package/dist/dtos/restaurants/update-restaurant.dto.d.ts +17 -10
  92. package/dist/dtos/restaurants/update-restaurant.dto.js +32 -16
  93. package/dist/dtos/tags/create-tag.dto.d.ts +1 -1
  94. package/dist/dtos/tags/create-tag.dto.js +5 -4
  95. package/dist/dtos/tags/delete-tag.dto.d.ts +1 -1
  96. package/dist/dtos/tags/delete-tag.dto.js +5 -3
  97. package/dist/dtos/tags/index.d.ts +0 -1
  98. package/dist/dtos/tags/index.js +0 -1
  99. package/dist/dtos/tags/update-tag.dto.d.ts +3 -3
  100. package/dist/dtos/tags/update-tag.dto.js +6 -5
  101. package/dist/dtos/translations/create-translation.dto.js +6 -1
  102. package/dist/dtos/translations/delete-translation.dto.d.ts +1 -1
  103. package/dist/dtos/translations/delete-translation.dto.js +4 -3
  104. package/dist/dtos/translations/update-translation.dto.d.ts +3 -3
  105. package/dist/dtos/translations/update-translation.dto.js +7 -4
  106. package/dist/enums/index.d.ts +0 -4
  107. package/dist/enums/index.js +0 -4
  108. package/dist/interfaces/auth/account.interface.d.ts +4 -4
  109. package/dist/interfaces/auth/user.interface.d.ts +1 -1
  110. package/dist/interfaces/categories/category.interface.d.ts +5 -5
  111. package/dist/interfaces/chains/chain.interface.d.ts +2 -2
  112. package/dist/interfaces/ingredients/ingredient.interface.d.ts +4 -4
  113. package/dist/interfaces/orders/order-item.interface.d.ts +4 -4
  114. package/dist/interfaces/orders/order.interface.d.ts +9 -9
  115. package/dist/interfaces/products/product.interface.d.ts +11 -8
  116. package/dist/interfaces/products/response/sub-resources/create-tag-response.interface.d.ts +1 -1
  117. package/dist/interfaces/products/response/sub-resources/recipe-relationship.interface.d.ts +0 -2
  118. package/dist/interfaces/questions/question.interface.d.ts +8 -6
  119. package/dist/interfaces/restaurants/restaurant.interface.d.ts +7 -7
  120. package/dist/interfaces/translations/translation.interface.d.ts +4 -4
  121. package/dist/types/currency.type.d.ts +26 -0
  122. package/dist/types/currency.type.js +18 -0
  123. package/dist/types/index.d.ts +3 -0
  124. package/dist/types/index.js +3 -0
  125. package/dist/types/order-mode.type.d.ts +12 -3
  126. package/dist/types/order-mode.type.js +16 -1
  127. package/dist/types/order-status.type.d.ts +22 -0
  128. package/dist/{enums/order-status.enum.d.ts → types/order-status.type.js} +25 -26
  129. package/dist/types/product-status.type.d.ts +25 -0
  130. package/dist/types/product-status.type.js +17 -0
  131. package/package.json +1 -1
  132. package/dist/dtos/ingredients/search-by-name.dto.d.ts +0 -18
  133. package/dist/dtos/ingredients/search-by-name.dto.js +0 -33
  134. package/dist/dtos/products/submodules/product-tag/create-product-tag.dto.d.ts +0 -24
  135. package/dist/dtos/products/submodules/product-tag/create-product-tag.dto.js +0 -46
  136. package/dist/dtos/products/submodules/product-tag/find-product-tag.dto.d.ts +0 -24
  137. package/dist/dtos/products/submodules/product-tag/find-product-tag.dto.js +0 -46
  138. package/dist/dtos/questions/search-by-name.dto.d.ts +0 -18
  139. package/dist/dtos/questions/search-by-name.dto.js +0 -33
  140. package/dist/dtos/tags/search-by-name.dto.d.ts +0 -18
  141. package/dist/dtos/tags/search-by-name.dto.js +0 -33
  142. package/dist/enums/currency.enum.d.ts +0 -21
  143. package/dist/enums/currency.enum.js +0 -22
  144. package/dist/enums/order-status.enum.js +0 -69
  145. package/dist/enums/order-type.enum.d.ts +0 -45
  146. package/dist/enums/order-type.enum.js +0 -46
  147. package/dist/enums/product-status.enum.d.ts +0 -55
  148. package/dist/enums/product-status.enum.js +0 -56
@@ -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
- id;
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, "id", void 0);
46
+ ], UpdateProductImageDto.prototype, "productImageId", void 0);
47
47
  __decorate([
48
48
  IsOptional(),
49
49
  IsString(),
@@ -1,4 +1,4 @@
1
- import { QuestionProductType } from '../../../../enums/question-product-type.enum.js';
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?: string;
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 'class-validator';
11
- import { Type } from 'class-transformer';
12
- import { QuestionProductType } from '../../../../enums/question-product-type.enum.js';
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
- IsOptional(),
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: 'Question ID is required' }),
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: 'Position must be an integer' }),
67
- Min(0, { message: 'Position must be at least 0' }),
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: 'Item type must be either QUESTION or ANSWER',
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);
@@ -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
  }
@@ -14,7 +14,7 @@ export declare class UpdateProductQuestionDto {
14
14
  *
15
15
  * @example "aa0e8400-e29b-41d4-a716-446655440006"
16
16
  */
17
- id?: string;
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,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, 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
12
  import { QuestionProductType } from '../../../../enums/question-product-type.enum.js';
13
13
  /**
@@ -25,7 +25,7 @@ export class UpdateProductQuestionDto {
25
25
  *
26
26
  * @example "aa0e8400-e29b-41d4-a716-446655440006"
27
27
  */
28
- id;
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
- IsOptional(),
46
+ IsNotEmpty(),
47
47
  IsUUID(),
48
48
  __metadata("design:type", String)
49
- ], UpdateProductQuestionDto.prototype, "id", void 0);
49
+ ], UpdateProductQuestionDto.prototype, "productQuestionId", void 0);
50
50
  __decorate([
51
51
  IsOptional(),
52
52
  IsInt({ message: 'Position must be an integer' }),
@@ -13,7 +13,7 @@ export declare class CreateProductRecipeDto {
13
13
  *
14
14
  * @example "550e8400-e29b-41d4-a716-446655440000"
15
15
  */
16
- productId?: string;
16
+ productId: string;
17
17
  /**
18
18
  * Unique identifier of the ingredient.
19
19
  * Must be a valid UUID and not be empty.
@@ -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, IsOptional } from 'class-validator';
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
- IsOptional(),
51
+ IsNotEmpty(),
52
52
  IsUUID(),
53
53
  __metadata("design:type", String)
54
54
  ], CreateProductRecipeDto.prototype, "productId", void 0);
@@ -1,4 +1,4 @@
1
- import { CreateProductRecipeDto } from './create-product-recipe.dto.js';
1
+ import { CreateProductRecipeDto } from "./create-product-recipe.dto.js";
2
2
  /**
3
3
  * DTO for replacing all product-recipe relationships.
4
4
  *
@@ -23,5 +23,5 @@ export declare class ReplaceProductRecipesByProductIdDto {
23
23
  *
24
24
  * @example [{ ingredientId: "...", quantity: 200, unit: "grams" }]
25
25
  */
26
- recipes: CreateProductRecipeDto[];
26
+ recipes: Omit<CreateProductRecipeDto, "productId">[];
27
27
  }
@@ -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, IsUUID, IsArray, ValidateNested, ArrayMinSize, } from 'class-validator';
11
- import { Type } from 'class-transformer';
12
- import { CreateProductRecipeDto } from './create-product-recipe.dto.js';
10
+ import { IsString, IsNotEmpty, IsUUID, IsArray, ValidateNested, ArrayMinSize, } from "class-validator";
11
+ import { Type } from "class-transformer";
12
+ import { CreateProductRecipeDto } from "./create-product-recipe.dto.js";
13
13
  /**
14
14
  * DTO for replacing all product-recipe relationships.
15
15
  *
@@ -38,13 +38,13 @@ export class ReplaceProductRecipesByProductIdDto {
38
38
  }
39
39
  __decorate([
40
40
  IsString(),
41
- IsNotEmpty({ message: 'Product ID is required' }),
41
+ IsNotEmpty({ message: "Product ID is required" }),
42
42
  IsUUID(),
43
43
  __metadata("design:type", String)
44
44
  ], ReplaceProductRecipesByProductIdDto.prototype, "productId", void 0);
45
45
  __decorate([
46
46
  IsArray(),
47
- ArrayMinSize(0, { message: 'Recipes array can be empty' }),
47
+ ArrayMinSize(0, { message: "Recipes array can be empty" }),
48
48
  ValidateNested({ each: true }),
49
49
  Type(() => CreateProductRecipeDto),
50
50
  __metadata("design:type", Array)
@@ -13,14 +13,7 @@ export declare class UpdateProductRecipeDto {
13
13
  *
14
14
  * @example "990e8400-e29b-41d4-a716-446655440005"
15
15
  */
16
- id?: string;
17
- /**
18
- * Optional unique identifier of the ingredient.
19
- * Must be a valid UUID if provided.
20
- *
21
- * @example "660e8400-e29b-41d4-a716-446655440001"
22
- */
23
- ingredientId?: string;
16
+ productRecipeId: string;
24
17
  /**
25
18
  * Optional quantity of the ingredient needed.
26
19
  * Must be a positive number if provided.
@@ -23,14 +23,7 @@ export class UpdateProductRecipeDto {
23
23
  *
24
24
  * @example "990e8400-e29b-41d4-a716-446655440005"
25
25
  */
26
- id;
27
- /**
28
- * Optional unique identifier of the ingredient.
29
- * Must be a valid UUID if provided.
30
- *
31
- * @example "660e8400-e29b-41d4-a716-446655440001"
32
- */
33
- ingredientId;
26
+ productRecipeId;
34
27
  /**
35
28
  * Optional quantity of the ingredient needed.
36
29
  * Must be a positive number if provided.
@@ -47,16 +40,10 @@ export class UpdateProductRecipeDto {
47
40
  }
48
41
  __decorate([
49
42
  IsString(),
50
- IsOptional(),
51
- IsUUID(),
52
- __metadata("design:type", String)
53
- ], UpdateProductRecipeDto.prototype, "id", void 0);
54
- __decorate([
55
- IsOptional(),
56
- IsString(),
43
+ IsNotEmpty(),
57
44
  IsUUID(),
58
45
  __metadata("design:type", String)
59
- ], UpdateProductRecipeDto.prototype, "ingredientId", void 0);
46
+ ], UpdateProductRecipeDto.prototype, "productRecipeId", void 0);
60
47
  __decorate([
61
48
  IsOptional(),
62
49
  IsNumber({}, { message: 'Quantity must be a number' }),
@@ -13,7 +13,7 @@ export declare class CreateProductScheduleDto {
13
13
  *
14
14
  * @example "550e8400-e29b-41d4-a716-446655440000"
15
15
  */
16
- productId?: string;
16
+ productId: string;
17
17
  /**
18
18
  * Day of week (0-6, where 0 is Sunday and 6 is Saturday).
19
19
  * Must be an integer between 0 and 6.
@@ -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, IsInt, Min, Max, Matches, IsOptional, IsUUID } from 'class-validator';
10
+ import { IsString, IsNotEmpty, IsInt, Min, Max, Matches, IsUUID } from 'class-validator';
11
11
  import { Type } from 'class-transformer';
12
12
  /**
13
13
  * DTO for creating a new product schedule.
@@ -49,7 +49,7 @@ export class CreateProductScheduleDto {
49
49
  }
50
50
  __decorate([
51
51
  IsString(),
52
- IsOptional(),
52
+ IsNotEmpty(),
53
53
  IsUUID(),
54
54
  __metadata("design:type", String)
55
55
  ], CreateProductScheduleDto.prototype, "productId", void 0);
@@ -23,5 +23,5 @@ export declare class ReplaceProductSchedulesByProductIdDto {
23
23
  *
24
24
  * @example [{ dayOfWeek: 1, startTime: "09:00", endTime: "18:00" }]
25
25
  */
26
- schedules: CreateProductScheduleDto[];
26
+ schedules: Omit<CreateProductScheduleDto, 'productId'>[];
27
27
  }
@@ -13,7 +13,7 @@ export declare class UpdateProductScheduleDto {
13
13
  *
14
14
  * @example "880e8400-e29b-41d4-a716-446655440004"
15
15
  */
16
- id?: string;
16
+ productScheduleId: string;
17
17
  /**
18
18
  * Optional day of week (0-6, where 0 is Sunday and 6 is Saturday).
19
19
  * Must be an integer between 0 and 6 if provided.
@@ -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, IsInt, Min, Max, Matches, IsUUID, } from 'class-validator';
10
+ import { IsString, IsOptional, IsInt, Min, Max, Matches, IsUUID, IsNotEmpty, } from 'class-validator';
11
11
  import { Type } from 'class-transformer';
12
12
  /**
13
13
  * DTO for updating an existing product schedule.
@@ -24,7 +24,7 @@ export class UpdateProductScheduleDto {
24
24
  *
25
25
  * @example "880e8400-e29b-41d4-a716-446655440004"
26
26
  */
27
- id;
27
+ productScheduleId;
28
28
  /**
29
29
  * Optional day of week (0-6, where 0 is Sunday and 6 is Saturday).
30
30
  * Must be an integer between 0 and 6 if provided.
@@ -49,10 +49,10 @@ export class UpdateProductScheduleDto {
49
49
  }
50
50
  __decorate([
51
51
  IsString(),
52
- IsOptional(),
52
+ IsNotEmpty(),
53
53
  IsUUID(),
54
54
  __metadata("design:type", String)
55
- ], UpdateProductScheduleDto.prototype, "id", void 0);
55
+ ], UpdateProductScheduleDto.prototype, "productScheduleId", void 0);
56
56
  __decorate([
57
57
  IsOptional(),
58
58
  IsInt({ message: 'Day of week must be an integer' }),
@@ -46,7 +46,7 @@ export class CreateProductSizeDto {
46
46
  * @example true
47
47
  * @default true
48
48
  */
49
- status;
49
+ status = true;
50
50
  }
51
51
  __decorate([
52
52
  IsString(),
@@ -39,7 +39,7 @@ export class ProductSizeDataDto {
39
39
  * @example true
40
40
  * @default true
41
41
  */
42
- status;
42
+ status = true;
43
43
  }
44
44
  __decorate([
45
45
  IsString(),
@@ -13,7 +13,7 @@ export declare class UpdateProductSizeDto {
13
13
  *
14
14
  * @example "770e8400-e29b-41d4-a716-446655440002"
15
15
  */
16
- id: string;
16
+ productSizeId: string;
17
17
  /**
18
18
  * Optional name of the size variant.
19
19
  * Maximum length of 50 characters if provided.
@@ -24,7 +24,7 @@ export class UpdateProductSizeDto {
24
24
  *
25
25
  * @example "770e8400-e29b-41d4-a716-446655440002"
26
26
  */
27
- id;
27
+ productSizeId;
28
28
  /**
29
29
  * Optional name of the size variant.
30
30
  * Maximum length of 50 characters if provided.
@@ -51,7 +51,7 @@ __decorate([
51
51
  IsNotEmpty({ message: 'Size ID is required' }),
52
52
  IsUUID(),
53
53
  __metadata("design:type", String)
54
- ], UpdateProductSizeDto.prototype, "id", void 0);
54
+ ], UpdateProductSizeDto.prototype, "productSizeId", void 0);
55
55
  __decorate([
56
56
  IsOptional(),
57
57
  IsString(),
@@ -6,7 +6,5 @@
6
6
  *
7
7
  * @since 2.0.0
8
8
  */
9
- export * from './create-product-tag.dto.js';
10
- export * from './find-product-tag.dto.js';
11
- export * from './remove-product-tag.dto.js';
9
+ export * from './product-tag.dto.js';
12
10
  export * from './replace-by-product-id.dto.js';
@@ -6,7 +6,5 @@
6
6
  *
7
7
  * @since 2.0.0
8
8
  */
9
- export * from './create-product-tag.dto.js';
10
- export * from './find-product-tag.dto.js';
11
- export * from './remove-product-tag.dto.js';
9
+ export * from './product-tag.dto.js';
12
10
  export * from './replace-by-product-id.dto.js';
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @since 2.0.0
8
8
  */
9
- export declare class RemoveProductTagDto {
9
+ export declare class ProductTagDto {
10
10
  /**
11
11
  * Unique identifier of the product.
12
12
  * Must not be empty and must be a valid UUID.
@@ -16,7 +16,7 @@ import { IsString, IsNotEmpty, IsUUID } from 'class-validator';
16
16
  *
17
17
  * @since 2.0.0
18
18
  */
19
- export class RemoveProductTagDto {
19
+ export class ProductTagDto {
20
20
  /**
21
21
  * Unique identifier of the product.
22
22
  * Must not be empty and must be a valid UUID.
@@ -37,10 +37,10 @@ __decorate([
37
37
  IsNotEmpty({ message: 'Product ID is required' }),
38
38
  IsUUID(),
39
39
  __metadata("design:type", String)
40
- ], RemoveProductTagDto.prototype, "productId", void 0);
40
+ ], ProductTagDto.prototype, "productId", void 0);
41
41
  __decorate([
42
42
  IsString(),
43
43
  IsNotEmpty({ message: 'Tag ID is required' }),
44
44
  IsUUID(),
45
45
  __metadata("design:type", String)
46
- ], RemoveProductTagDto.prototype, "tagId", void 0);
46
+ ], ProductTagDto.prototype, "tagId", void 0);
@@ -1,4 +1,4 @@
1
- import { ProductStatus } from '../../enums/product-status.enum.js';
1
+ import { type ProductStatus } from '../../types/product-status.type.js';
2
2
  /**
3
3
  * DTO for updating an existing product.
4
4
  *
@@ -22,7 +22,7 @@ export declare class UpdateProductDto {
22
22
  *
23
23
  * @example "Big Mac"
24
24
  */
25
- name: string;
25
+ name?: string;
26
26
  /**
27
27
  * Product description.
28
28
  * Optional detailed description of the product.
@@ -36,7 +36,7 @@ export declare class UpdateProductDto {
36
36
  *
37
37
  * @example 5.99
38
38
  */
39
- basePrice: number;
39
+ basePrice?: number;
40
40
  /**
41
41
  * Product status.
42
42
  * Defaults to ACTIVE if not provided.
@@ -51,12 +51,12 @@ export declare class UpdateProductDto {
51
51
  *
52
52
  * @example "550e8400-e29b-41d4-a716-446655440000"
53
53
  */
54
- id: string;
54
+ productId: string;
55
55
  /**
56
56
  * User who updated the product.
57
57
  * Must be a valid MongoDB ObjectId if provided.
58
58
  *
59
59
  * @example "507f1f77bcf86cd799439011"
60
60
  */
61
- updatedBy?: string;
61
+ updatedBy: string;
62
62
  }
@@ -7,8 +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 { IsMongoId, IsString, IsUUID, IsOptional, IsEnum, Min, IsNumber } from 'class-validator';
11
- import { ProductStatus } from '../../enums/product-status.enum.js';
10
+ import { IsMongoId, IsString, IsUUID, IsOptional, Min, IsNumber, IsNotEmpty, IsIn } from 'class-validator';
11
+ import { PRODUCT_STATUS } from '../../types/product-status.type.js';
12
12
  import { Type } from 'class-transformer';
13
13
  /**
14
14
  * DTO for updating an existing product.
@@ -55,14 +55,14 @@ export class UpdateProductDto {
55
55
  * @example ProductStatus.ACTIVE
56
56
  * @default ProductStatus.ACTIVE
57
57
  */
58
- status = ProductStatus.ACTIVE;
58
+ status = "ACTIVE";
59
59
  /**
60
60
  * Product ID to update.
61
61
  * Must be a valid UUID.
62
62
  *
63
63
  * @example "550e8400-e29b-41d4-a716-446655440000"
64
64
  */
65
- id;
65
+ productId;
66
66
  /**
67
67
  * User who updated the product.
68
68
  * Must be a valid MongoDB ObjectId if provided.
@@ -97,17 +97,20 @@ __decorate([
97
97
  ], UpdateProductDto.prototype, "basePrice", void 0);
98
98
  __decorate([
99
99
  IsOptional(),
100
- IsEnum(ProductStatus, { message: 'Status must be ACTIVE, INACTIVE, or OUT_OF_STOCK' }),
100
+ IsIn(PRODUCT_STATUS, {
101
+ message: "Status must be ACTIVE, INACTIVE, or OUT_OF_STOCK",
102
+ }),
101
103
  __metadata("design:type", String)
102
104
  ], UpdateProductDto.prototype, "status", void 0);
103
105
  __decorate([
104
106
  IsString(),
105
107
  IsUUID(),
108
+ IsNotEmpty(),
106
109
  __metadata("design:type", String)
107
- ], UpdateProductDto.prototype, "id", void 0);
110
+ ], UpdateProductDto.prototype, "productId", void 0);
108
111
  __decorate([
109
112
  IsString(),
110
113
  IsMongoId(),
111
- IsOptional(),
114
+ IsNotEmpty(),
112
115
  __metadata("design:type", String)
113
116
  ], UpdateProductDto.prototype, "updatedBy", void 0);
@@ -50,5 +50,5 @@ export declare class CreateQuestionDto {
50
50
  *
51
51
  * @example "507f1f77bcf86cd799439011"
52
52
  */
53
- createdBy?: string;
53
+ createdBy: string;
54
54
  }
@@ -86,11 +86,12 @@ __decorate([
86
86
  ], CreateQuestionDto.prototype, "max", void 0);
87
87
  __decorate([
88
88
  IsEnum(QuestionType, { message: 'Question type must be a valid QuestionType' }),
89
+ IsNotEmpty(),
89
90
  __metadata("design:type", String)
90
91
  ], CreateQuestionDto.prototype, "type", void 0);
91
92
  __decorate([
92
93
  IsString(),
93
94
  IsMongoId(),
94
- IsOptional(),
95
+ IsNotEmpty(),
95
96
  __metadata("design:type", String)
96
97
  ], CreateQuestionDto.prototype, "createdBy", void 0);
@@ -13,7 +13,7 @@ export declare class DeleteQuestionDto {
13
13
  *
14
14
  * @example "550e8400-e29b-41d4-a716-446655440000"
15
15
  */
16
- id: string;
16
+ questionId: string;
17
17
  /**
18
18
  * User who deleted the question.
19
19
  * Must be a valid MongoDB ObjectId.
@@ -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 question.
13
13
  *
@@ -23,7 +23,7 @@ export class DeleteQuestionDto {
23
23
  *
24
24
  * @example "550e8400-e29b-41d4-a716-446655440000"
25
25
  */
26
- id;
26
+ questionId;
27
27
  /**
28
28
  * User who deleted the question.
29
29
  * Must be a valid MongoDB ObjectId.
@@ -35,10 +35,12 @@ export class DeleteQuestionDto {
35
35
  __decorate([
36
36
  IsString(),
37
37
  IsUUID(),
38
+ IsNotEmpty(),
38
39
  __metadata("design:type", String)
39
- ], DeleteQuestionDto.prototype, "id", void 0);
40
+ ], DeleteQuestionDto.prototype, "questionId", void 0);
40
41
  __decorate([
41
42
  IsString(),
42
43
  IsMongoId(),
44
+ IsNotEmpty(),
43
45
  __metadata("design:type", String)
44
46
  ], DeleteQuestionDto.prototype, "deletedBy", void 0);
@@ -9,4 +9,3 @@
9
9
  export * from './create-question.dto.js';
10
10
  export * from './update-question.dto.js';
11
11
  export * from './delete-question.dto.js';
12
- export * from './search-by-name.dto.js';
@@ -9,4 +9,3 @@
9
9
  export * from './create-question.dto.js';
10
10
  export * from './update-question.dto.js';
11
11
  export * from './delete-question.dto.js';
12
- export * from './search-by-name.dto.js';
@@ -14,7 +14,7 @@ export declare class UpdateQuestionDto {
14
14
  *
15
15
  * @example "Would you like extra cheese?"
16
16
  */
17
- name: string;
17
+ name?: string;
18
18
  /**
19
19
  * Whether the question is required.
20
20
  * Defaults to false if not provided.
@@ -43,19 +43,19 @@ export declare class UpdateQuestionDto {
43
43
  *
44
44
  * @example QuestionType.SINGLE_CHOICE
45
45
  */
46
- type: QuestionType;
46
+ type?: QuestionType;
47
47
  /**
48
48
  * Question ID to update.
49
49
  * Must be a valid UUID.
50
50
  *
51
51
  * @example "550e8400-e29b-41d4-a716-446655440000"
52
52
  */
53
- id?: string;
53
+ questionId: string;
54
54
  /**
55
55
  * User who updated the question.
56
56
  * Must be a valid MongoDB ObjectId if provided.
57
57
  *
58
58
  * @example "507f1f77bcf86cd799439011"
59
59
  */
60
- updatedBy?: string;
60
+ updatedBy: string;
61
61
  }