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
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Product status code constants for the QeHay platform.
3
+ *
4
+ * This array contains all possible status codes supported for products and inventory management.
5
+ * Serves as a single source of truth for product availability across client, waiter, kitchen, and admin modules.
6
+ *
7
+ * - ACTIVE: Product is active and available for ordering.
8
+ * - INACTIVE: Product is inactive and not available for ordering.
9
+ * - OUT_OF_STOCK: Product is temporarily out of stock and cannot be ordered.
10
+ *
11
+ * @since 2.0.0
12
+ */
13
+ export const PRODUCT_STATUS = [
14
+ 'ACTIVE',
15
+ 'INACTIVE',
16
+ 'OUT_OF_STOCK',
17
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qeai-sdk",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "In this version we have added the interfaces for the qhay sdk",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -1,18 +0,0 @@
1
- import { PaginationDto } from '../common/pagination.dto.js';
2
- /**
3
- * DTO for searching ingredients by name.
4
- *
5
- * Extends PaginationDto to include name search functionality.
6
- * Used by the Products microservice to search ingredients by name with pagination.
7
- *
8
- * @since 2.0.0
9
- */
10
- export declare class SearchIngredientByNameDto extends PaginationDto {
11
- /**
12
- * Search term for ingredient name.
13
- * Must not be empty.
14
- *
15
- * @example "tomato"
16
- */
17
- name: string;
18
- }
@@ -1,33 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { IsString, IsNotEmpty } from 'class-validator';
11
- import { PaginationDto } from '../common/pagination.dto.js';
12
- /**
13
- * DTO for searching ingredients by name.
14
- *
15
- * Extends PaginationDto to include name search functionality.
16
- * Used by the Products microservice to search ingredients by name with pagination.
17
- *
18
- * @since 2.0.0
19
- */
20
- export class SearchIngredientByNameDto extends PaginationDto {
21
- /**
22
- * Search term for ingredient name.
23
- * Must not be empty.
24
- *
25
- * @example "tomato"
26
- */
27
- name;
28
- }
29
- __decorate([
30
- IsString(),
31
- IsNotEmpty({ message: 'Search term is required' }),
32
- __metadata("design:type", String)
33
- ], SearchIngredientByNameDto.prototype, "name", void 0);
@@ -1,24 +0,0 @@
1
- /**
2
- * DTO for creating a product-tag relationship.
3
- *
4
- * Used by the Products microservice to associate a tag with a product.
5
- * Establishes a many-to-many relationship between products and tags.
6
- *
7
- * @since 2.0.0
8
- */
9
- export declare class CreateProductTagDto {
10
- /**
11
- * Unique identifier of the product.
12
- * Must not be empty.
13
- *
14
- * @example "550e8400-e29b-41d4-a716-446655440000"
15
- */
16
- productId: string;
17
- /**
18
- * Unique identifier of the tag.
19
- * Must not be empty.
20
- *
21
- * @example "660e8400-e29b-41d4-a716-446655440001"
22
- */
23
- tagId: string;
24
- }
@@ -1,46 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { IsString, IsNotEmpty, IsUUID } from 'class-validator';
11
- /**
12
- * DTO for creating a product-tag relationship.
13
- *
14
- * Used by the Products microservice to associate a tag with a product.
15
- * Establishes a many-to-many relationship between products and tags.
16
- *
17
- * @since 2.0.0
18
- */
19
- export class CreateProductTagDto {
20
- /**
21
- * Unique identifier of the product.
22
- * Must not be empty.
23
- *
24
- * @example "550e8400-e29b-41d4-a716-446655440000"
25
- */
26
- productId;
27
- /**
28
- * Unique identifier of the tag.
29
- * Must not be empty.
30
- *
31
- * @example "660e8400-e29b-41d4-a716-446655440001"
32
- */
33
- tagId;
34
- }
35
- __decorate([
36
- IsString(),
37
- IsNotEmpty({ message: 'Product ID is required' }),
38
- IsUUID(),
39
- __metadata("design:type", String)
40
- ], CreateProductTagDto.prototype, "productId", void 0);
41
- __decorate([
42
- IsString(),
43
- IsNotEmpty({ message: 'Tag ID is required' }),
44
- IsUUID(),
45
- __metadata("design:type", String)
46
- ], CreateProductTagDto.prototype, "tagId", void 0);
@@ -1,24 +0,0 @@
1
- /**
2
- * DTO for finding a product-tag relationship by IDs.
3
- *
4
- * Used by the Products microservice to retrieve a specific
5
- * product-tag relationship using product and tag identifiers.
6
- *
7
- * @since 2.0.0
8
- */
9
- export declare class FindProductTagDto {
10
- /**
11
- * Unique identifier of the product.
12
- * Must not be empty and must be a valid UUID.
13
- *
14
- * @example "550e8400-e29b-41d4-a716-446655440000"
15
- */
16
- productId: string;
17
- /**
18
- * Unique identifier of the tag.
19
- * Must not be empty and must be a valid UUID.
20
- *
21
- * @example "660e8400-e29b-41d4-a716-446655440001"
22
- */
23
- tagId: string;
24
- }
@@ -1,46 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { IsString, IsNotEmpty, IsUUID } from 'class-validator';
11
- /**
12
- * DTO for finding a product-tag relationship by IDs.
13
- *
14
- * Used by the Products microservice to retrieve a specific
15
- * product-tag relationship using product and tag identifiers.
16
- *
17
- * @since 2.0.0
18
- */
19
- export class FindProductTagDto {
20
- /**
21
- * Unique identifier of the product.
22
- * Must not be empty and must be a valid UUID.
23
- *
24
- * @example "550e8400-e29b-41d4-a716-446655440000"
25
- */
26
- productId;
27
- /**
28
- * Unique identifier of the tag.
29
- * Must not be empty and must be a valid UUID.
30
- *
31
- * @example "660e8400-e29b-41d4-a716-446655440001"
32
- */
33
- tagId;
34
- }
35
- __decorate([
36
- IsString(),
37
- IsNotEmpty({ message: 'Product ID is required' }),
38
- IsUUID(),
39
- __metadata("design:type", String)
40
- ], FindProductTagDto.prototype, "productId", void 0);
41
- __decorate([
42
- IsString(),
43
- IsNotEmpty({ message: 'Tag ID is required' }),
44
- IsUUID(),
45
- __metadata("design:type", String)
46
- ], FindProductTagDto.prototype, "tagId", void 0);
@@ -1,18 +0,0 @@
1
- import { PaginationDto } from '../common/pagination.dto.js';
2
- /**
3
- * DTO for searching questions by name.
4
- *
5
- * Extends PaginationDto to include name search functionality.
6
- * Used by the Products microservice to search questions by name with pagination.
7
- *
8
- * @since 2.0.0
9
- */
10
- export declare class SearchQuestionByNameDto extends PaginationDto {
11
- /**
12
- * Search term for question name.
13
- * Must not be empty.
14
- *
15
- * @example "cheese"
16
- */
17
- name: string;
18
- }
@@ -1,33 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { IsString, IsNotEmpty } from 'class-validator';
11
- import { PaginationDto } from '../common/pagination.dto.js';
12
- /**
13
- * DTO for searching questions by name.
14
- *
15
- * Extends PaginationDto to include name search functionality.
16
- * Used by the Products microservice to search questions by name with pagination.
17
- *
18
- * @since 2.0.0
19
- */
20
- export class SearchQuestionByNameDto extends PaginationDto {
21
- /**
22
- * Search term for question name.
23
- * Must not be empty.
24
- *
25
- * @example "cheese"
26
- */
27
- name;
28
- }
29
- __decorate([
30
- IsString(),
31
- IsNotEmpty({ message: 'Search term is required' }),
32
- __metadata("design:type", String)
33
- ], SearchQuestionByNameDto.prototype, "name", void 0);
@@ -1,18 +0,0 @@
1
- import { PaginationDto } from '../common/pagination.dto.js';
2
- /**
3
- * DTO for searching tags by name.
4
- *
5
- * Extends PaginationDto to include name search functionality.
6
- * Used by the Products microservice to search tags by name with pagination.
7
- *
8
- * @since 2.0.0
9
- */
10
- export declare class SearchTagByNameDto extends PaginationDto {
11
- /**
12
- * Search term for tag name.
13
- * Must not be empty.
14
- *
15
- * @example "vegetarian"
16
- */
17
- name: string;
18
- }
@@ -1,33 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- var __metadata = (this && this.__metadata) || function (k, v) {
8
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
- };
10
- import { IsString, IsNotEmpty } from 'class-validator';
11
- import { PaginationDto } from '../common/pagination.dto.js';
12
- /**
13
- * DTO for searching tags by name.
14
- *
15
- * Extends PaginationDto to include name search functionality.
16
- * Used by the Products microservice to search tags by name with pagination.
17
- *
18
- * @since 2.0.0
19
- */
20
- export class SearchTagByNameDto extends PaginationDto {
21
- /**
22
- * Search term for tag name.
23
- * Must not be empty.
24
- *
25
- * @example "vegetarian"
26
- */
27
- name;
28
- }
29
- __decorate([
30
- IsString(),
31
- IsNotEmpty({ message: 'Search term is required' }),
32
- __metadata("design:type", String)
33
- ], SearchTagByNameDto.prototype, "name", void 0);
@@ -1,21 +0,0 @@
1
- /**
2
- * Enumerates all supported currency codes for transactions and financial records across the QeHay platform.
3
- *
4
- * @enum Currency
5
- * @since 2.0.0
6
- *
7
- * @remarks
8
- * This enum adheres to the ISO 4217 international standard for currency codes.
9
- * It ensures consistent and type-safe usage of currency identifiers throughout the system.
10
- * Extend this enumeration when adding support for new currencies across product, payment, or report modules.
11
- */
12
- export declare enum Currency {
13
- PEN = "PEN",// Peruvian Sol
14
- USD = "USD",// United States Dollar
15
- EUR = "EUR",// Euro
16
- BRL = "BRL",// Brazilian Real
17
- COP = "COP",// Colombian Peso
18
- CLP = "CLP",// Chilean Peso
19
- MXN = "MXN",// Mexican Peso
20
- ARS = "ARS"
21
- }
@@ -1,22 +0,0 @@
1
- /**
2
- * Enumerates all supported currency codes for transactions and financial records across the QeHay platform.
3
- *
4
- * @enum Currency
5
- * @since 2.0.0
6
- *
7
- * @remarks
8
- * This enum adheres to the ISO 4217 international standard for currency codes.
9
- * It ensures consistent and type-safe usage of currency identifiers throughout the system.
10
- * Extend this enumeration when adding support for new currencies across product, payment, or report modules.
11
- */
12
- export var Currency;
13
- (function (Currency) {
14
- Currency["PEN"] = "PEN";
15
- Currency["USD"] = "USD";
16
- Currency["EUR"] = "EUR";
17
- Currency["BRL"] = "BRL";
18
- Currency["COP"] = "COP";
19
- Currency["CLP"] = "CLP";
20
- Currency["MXN"] = "MXN";
21
- Currency["ARS"] = "ARS";
22
- })(Currency || (Currency = {}));
@@ -1,69 +0,0 @@
1
- /**
2
- * Enumerates all possible statuses for an order within the QeHay platform.
3
- *
4
- * @enum OrderStatus
5
- * @since 2.0.0
6
- *
7
- * @description
8
- * This enum standardizes order status representation across all modules (client, mozo, cocina, administración).
9
- * It supports state transitions from creation through delivery or cancellation, ensuring consistency for:
10
- * - Business logic processing (backends and microservices)
11
- * - UI state handling (apps, web, admin)
12
- * - Event sourcing and auditing (DynamoDB, queues)
13
- *
14
- * @remarks
15
- * - Extend only if QeHay supports new workflow steps as needed.
16
- * - This enum is NOT for payment or inventory status.
17
- */
18
- export var OrderStatus;
19
- (function (OrderStatus) {
20
- /**
21
- * The order has been created but not yet confirmed by the waiter or payment.
22
- * This is the initial state for all new orders.
23
- */
24
- OrderStatus["CREATED"] = "CREATED";
25
- /**
26
- * The order is awaiting confirmation (e.g., by waiter for in-dinner).
27
- */
28
- OrderStatus["PENDING_CONFIRMATION"] = "PENDING_CONFIRMATION";
29
- /**
30
- * The order was confirmed for preparation (either by payment or by waiter).
31
- */
32
- OrderStatus["CONFIRMED"] = "CONFIRMED";
33
- /**
34
- * The order is currently being prepared/cooked by the kitchen.
35
- */
36
- OrderStatus["COOKING"] = "COOKING";
37
- /**
38
- * The order is ready and waiting for further action (serving, pickup, or delivery).
39
- */
40
- OrderStatus["READY"] = "READY";
41
- /**
42
- * The order has been served to the table (for dine-in).
43
- */
44
- OrderStatus["SERVED"] = "SERVED";
45
- /**
46
- * The order is ready for the customer to pick up at the venue.
47
- */
48
- OrderStatus["READY_FOR_PICKUP"] = "READY_FOR_PICKUP";
49
- /**
50
- * The order is ready for delivery (awaiting delivery person pickup).
51
- */
52
- OrderStatus["READY_FOR_DELIVERY"] = "READY_FOR_DELIVERY";
53
- /**
54
- * The order has been delivered to the customer (for delivery).
55
- */
56
- OrderStatus["DELIVERED"] = "DELIVERED";
57
- /**
58
- * The order has been picked up by the customer (for takeaway).
59
- */
60
- OrderStatus["PICKED_UP"] = "PICKED_UP";
61
- /**
62
- * The entire order process has been completed and closed.
63
- */
64
- OrderStatus["COMPLETED"] = "COMPLETED";
65
- /**
66
- * The order was cancelled before completion (by user or staff).
67
- */
68
- OrderStatus["CANCELLED"] = "CANCELLED";
69
- })(OrderStatus || (OrderStatus = {}));
@@ -1,45 +0,0 @@
1
- /**
2
- * Enumerates all possible order types within the QeHay platform.
3
- *
4
- * @enum OrderType
5
- * @since 2.0.0
6
- *
7
- * @description
8
- * This enum standardizes the representation of order modalities across all modules (client, mozo, cocina, administración).
9
- * Use this to determine business logic, UI flows, and validations according to the intended order fulfillment type.
10
- *
11
- * @remarks
12
- * - Always use this enum for serialization, communication, and API contracts related to order creation or querying.
13
- * - Maps directly to the "OrderType" in database schema and cross-service contracts.
14
- * - Extend cautiously if QeHay enables new ways to fulfil an order.
15
- *
16
- * @property DINE_IN Order to be consumed at the restaurant. Initiated by the client, confirmed by the waiter with a QR scan.
17
- * @property PICKUP Order prepared for collection by the customer at the restaurant.
18
- * @property DELIVERY Order delivered to the customer at a specified address.
19
- *
20
- * @example
21
- * ```
22
- * import { OrderType } from './order-type.enum';
23
- *
24
- * function isLocalOrder(type: OrderType): boolean {
25
- * return type === OrderType.DINE_IN || type === OrderType.PICKUP;
26
- * }
27
- * ```
28
- */
29
- export declare enum OrderType {
30
- /**
31
- * Order to be consumed at the restaurant (in-dinner, mesa).
32
- * Created by the client, confirmed by waiter after QR scan.
33
- */
34
- DINE_IN = "DINE_IN",
35
- /**
36
- * Order will be picked up by the customer at the venue.
37
- * Created by client, paid online, prepared for takeaway.
38
- */
39
- PICKUP = "PICKUP",
40
- /**
41
- * Order will be delivered to the customer at their specified location.
42
- * Created and paid online, handed to delivery when ready.
43
- */
44
- DELIVERY = "DELIVERY"
45
- }
@@ -1,46 +0,0 @@
1
- /**
2
- * Enumerates all possible order types within the QeHay platform.
3
- *
4
- * @enum OrderType
5
- * @since 2.0.0
6
- *
7
- * @description
8
- * This enum standardizes the representation of order modalities across all modules (client, mozo, cocina, administración).
9
- * Use this to determine business logic, UI flows, and validations according to the intended order fulfillment type.
10
- *
11
- * @remarks
12
- * - Always use this enum for serialization, communication, and API contracts related to order creation or querying.
13
- * - Maps directly to the "OrderType" in database schema and cross-service contracts.
14
- * - Extend cautiously if QeHay enables new ways to fulfil an order.
15
- *
16
- * @property DINE_IN Order to be consumed at the restaurant. Initiated by the client, confirmed by the waiter with a QR scan.
17
- * @property PICKUP Order prepared for collection by the customer at the restaurant.
18
- * @property DELIVERY Order delivered to the customer at a specified address.
19
- *
20
- * @example
21
- * ```
22
- * import { OrderType } from './order-type.enum';
23
- *
24
- * function isLocalOrder(type: OrderType): boolean {
25
- * return type === OrderType.DINE_IN || type === OrderType.PICKUP;
26
- * }
27
- * ```
28
- */
29
- export var OrderType;
30
- (function (OrderType) {
31
- /**
32
- * Order to be consumed at the restaurant (in-dinner, mesa).
33
- * Created by the client, confirmed by waiter after QR scan.
34
- */
35
- OrderType["DINE_IN"] = "DINE_IN";
36
- /**
37
- * Order will be picked up by the customer at the venue.
38
- * Created by client, paid online, prepared for takeaway.
39
- */
40
- OrderType["PICKUP"] = "PICKUP";
41
- /**
42
- * Order will be delivered to the customer at their specified location.
43
- * Created and paid online, handed to delivery when ready.
44
- */
45
- OrderType["DELIVERY"] = "DELIVERY";
46
- })(OrderType || (OrderType = {}));
@@ -1,55 +0,0 @@
1
- /**
2
- * Enumerates all possible statuses for a product within the QeHay platform.
3
- *
4
- * @enum ProductStatus
5
- * @since 2.0.0
6
- *
7
- * @description
8
- * This enum standardizes product status representation across all modules.
9
- * It defines the availability and operational state of products,
10
- * used for inventory management, ordering, and display logic.
11
- *
12
- * @remarks
13
- * - Used in both DTOs and interfaces for consistency.
14
- * - Status affects product visibility and orderability.
15
- * - Products can transition between statuses based on stock and availability.
16
- *
17
- * @property ACTIVE Product is active and available for ordering.
18
- * @property INACTIVE Product is inactive and not available for ordering.
19
- * @property OUT_OF_STOCK Product is temporarily out of stock.
20
- *
21
- * @example
22
- * ```
23
- * import { ProductStatus } from './product-status.enum';
24
- *
25
- * function isAvailable(status: ProductStatus): boolean {
26
- * return status === ProductStatus.ACTIVE;
27
- * }
28
- * ```
29
- */
30
- export declare enum ProductStatus {
31
- /**
32
- * Product is active and available for ordering.
33
- * This is the default status for new products.
34
- * Product appears in menus and can be ordered.
35
- *
36
- * @example ProductStatus.ACTIVE
37
- */
38
- ACTIVE = "ACTIVE",
39
- /**
40
- * Product is inactive and not available for ordering.
41
- * Product does not appear in menus and cannot be ordered.
42
- * Used for temporarily disabled products or seasonal items.
43
- *
44
- * @example ProductStatus.INACTIVE
45
- */
46
- INACTIVE = "INACTIVE",
47
- /**
48
- * Product is temporarily out of stock.
49
- * Product may appear in menus but cannot be ordered.
50
- * Used when product is unavailable but expected to return.
51
- *
52
- * @example ProductStatus.OUT_OF_STOCK
53
- */
54
- OUT_OF_STOCK = "OUT_OF_STOCK"
55
- }
@@ -1,56 +0,0 @@
1
- /**
2
- * Enumerates all possible statuses for a product within the QeHay platform.
3
- *
4
- * @enum ProductStatus
5
- * @since 2.0.0
6
- *
7
- * @description
8
- * This enum standardizes product status representation across all modules.
9
- * It defines the availability and operational state of products,
10
- * used for inventory management, ordering, and display logic.
11
- *
12
- * @remarks
13
- * - Used in both DTOs and interfaces for consistency.
14
- * - Status affects product visibility and orderability.
15
- * - Products can transition between statuses based on stock and availability.
16
- *
17
- * @property ACTIVE Product is active and available for ordering.
18
- * @property INACTIVE Product is inactive and not available for ordering.
19
- * @property OUT_OF_STOCK Product is temporarily out of stock.
20
- *
21
- * @example
22
- * ```
23
- * import { ProductStatus } from './product-status.enum';
24
- *
25
- * function isAvailable(status: ProductStatus): boolean {
26
- * return status === ProductStatus.ACTIVE;
27
- * }
28
- * ```
29
- */
30
- export var ProductStatus;
31
- (function (ProductStatus) {
32
- /**
33
- * Product is active and available for ordering.
34
- * This is the default status for new products.
35
- * Product appears in menus and can be ordered.
36
- *
37
- * @example ProductStatus.ACTIVE
38
- */
39
- ProductStatus["ACTIVE"] = "ACTIVE";
40
- /**
41
- * Product is inactive and not available for ordering.
42
- * Product does not appear in menus and cannot be ordered.
43
- * Used for temporarily disabled products or seasonal items.
44
- *
45
- * @example ProductStatus.INACTIVE
46
- */
47
- ProductStatus["INACTIVE"] = "INACTIVE";
48
- /**
49
- * Product is temporarily out of stock.
50
- * Product may appear in menus but cannot be ordered.
51
- * Used when product is unavailable but expected to return.
52
- *
53
- * @example ProductStatus.OUT_OF_STOCK
54
- */
55
- ProductStatus["OUT_OF_STOCK"] = "OUT_OF_STOCK";
56
- })(ProductStatus || (ProductStatus = {}));