qeai-sdk 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) 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 +11 -12
  8. package/dist/dtos/chain/create-chain.dto.js +15 -14
  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 +26 -16
  12. package/dist/dtos/chain/update-chain.dto.js +32 -21
  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 +1 -1
  44. package/dist/dtos/products/create-product.dto.js +2 -1
  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 +4 -4
  78. package/dist/dtos/products/update-product.dto.js +5 -4
  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 -2
  107. package/dist/enums/index.js +0 -2
  108. package/dist/interfaces/orders/order-item.interface.d.ts +4 -4
  109. package/dist/interfaces/orders/order.interface.d.ts +9 -9
  110. package/dist/types/index.d.ts +1 -0
  111. package/dist/types/index.js +1 -0
  112. package/dist/types/order-mode.type.d.ts +12 -3
  113. package/dist/types/order-mode.type.js +20 -1
  114. package/dist/types/order-status.type.d.ts +22 -0
  115. package/dist/{enums/order-status.enum.d.ts → types/order-status.type.js} +25 -26
  116. package/package.json +1 -1
  117. package/dist/dtos/ingredients/search-by-name.dto.d.ts +0 -18
  118. package/dist/dtos/ingredients/search-by-name.dto.js +0 -33
  119. package/dist/dtos/products/submodules/product-tag/create-product-tag.dto.d.ts +0 -24
  120. package/dist/dtos/products/submodules/product-tag/create-product-tag.dto.js +0 -46
  121. package/dist/dtos/products/submodules/product-tag/find-product-tag.dto.d.ts +0 -24
  122. package/dist/dtos/products/submodules/product-tag/find-product-tag.dto.js +0 -46
  123. package/dist/dtos/questions/search-by-name.dto.d.ts +0 -18
  124. package/dist/dtos/questions/search-by-name.dto.js +0 -33
  125. package/dist/dtos/tags/search-by-name.dto.d.ts +0 -18
  126. package/dist/dtos/tags/search-by-name.dto.js +0 -33
  127. package/dist/enums/order-status.enum.js +0 -69
  128. package/dist/enums/order-type.enum.d.ts +0 -45
  129. package/dist/enums/order-type.enum.js +0 -46
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Order status constants for QeHay platform.
3
+ *
4
+ * This array contains all possible states that an order can have within the QeHay ecosystem.
5
+ * It is the single source of truth for order statuses used across modules:
6
+ * - Cliente, mozo, cocina y administración.
7
+ * - Lógica de negocio (backends y microservicios)
8
+ * - Manejo de estados en UI (apps, web, admin)
9
+ * - Auditoría y event sourcing (DynamoDB, colas)
10
+ *
11
+ * @remarks
12
+ * Only extend if the QeHay workflow adds new explicit steps.
13
+ * Not to be used for payment or inventory status.
14
+ *
15
+ * @since 2.0.0
16
+ */
17
+ export declare const ORDER_STATUS: readonly ["CREATED", "PENDING_CONFIRMATION", "CONFIRMED", "COOKING", "READY", "SERVED", "READY_FOR_PICKUP", "READY_FOR_DELIVERY", "DELIVERED", "PICKED_UP", "COMPLETED", "CANCELLED"];
18
+ /**
19
+ * Type representing all possible statuses for an order within the QeHay platform.
20
+ * @see ORDER_STATUS
21
+ */
22
+ export type OrderStatus = typeof ORDER_STATUS[number];
@@ -1,68 +1,67 @@
1
1
  /**
2
- * Enumerates all possible statuses for an order within the QeHay platform.
2
+ * Order status constants for QeHay platform.
3
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)
4
+ * This array contains all possible states that an order can have within the QeHay ecosystem.
5
+ * It is the single source of truth for order statuses used across modules:
6
+ * - Cliente, mozo, cocina y administración.
7
+ * - Lógica de negocio (backends y microservicios)
8
+ * - Manejo de estados en UI (apps, web, admin)
9
+ * - Auditoría y event sourcing (DynamoDB, colas)
13
10
  *
14
11
  * @remarks
15
- * - Extend only if QeHay supports new workflow steps as needed.
16
- * - This enum is NOT for payment or inventory status.
12
+ * Only extend if the QeHay workflow adds new explicit steps.
13
+ * Not to be used for payment or inventory status.
14
+ *
15
+ * @since 2.0.0
17
16
  */
18
- export declare enum OrderStatus {
17
+ export const ORDER_STATUS = [
19
18
  /**
20
19
  * The order has been created but not yet confirmed by the waiter or payment.
21
20
  * This is the initial state for all new orders.
22
21
  */
23
- CREATED = "CREATED",
22
+ 'CREATED',
24
23
  /**
25
24
  * The order is awaiting confirmation (e.g., by waiter for in-dinner).
26
25
  */
27
- PENDING_CONFIRMATION = "PENDING_CONFIRMATION",
26
+ 'PENDING_CONFIRMATION',
28
27
  /**
29
28
  * The order was confirmed for preparation (either by payment or by waiter).
30
29
  */
31
- CONFIRMED = "CONFIRMED",
30
+ 'CONFIRMED',
32
31
  /**
33
32
  * The order is currently being prepared/cooked by the kitchen.
34
33
  */
35
- COOKING = "COOKING",
34
+ 'COOKING',
36
35
  /**
37
36
  * The order is ready and waiting for further action (serving, pickup, or delivery).
38
37
  */
39
- READY = "READY",
38
+ 'READY',
40
39
  /**
41
40
  * The order has been served to the table (for dine-in).
42
41
  */
43
- SERVED = "SERVED",
42
+ 'SERVED',
44
43
  /**
45
44
  * The order is ready for the customer to pick up at the venue.
46
45
  */
47
- READY_FOR_PICKUP = "READY_FOR_PICKUP",
46
+ 'READY_FOR_PICKUP',
48
47
  /**
49
48
  * The order is ready for delivery (awaiting delivery person pickup).
50
49
  */
51
- READY_FOR_DELIVERY = "READY_FOR_DELIVERY",
50
+ 'READY_FOR_DELIVERY',
52
51
  /**
53
52
  * The order has been delivered to the customer (for delivery).
54
53
  */
55
- DELIVERED = "DELIVERED",
54
+ 'DELIVERED',
56
55
  /**
57
56
  * The order has been picked up by the customer (for takeaway).
58
57
  */
59
- PICKED_UP = "PICKED_UP",
58
+ 'PICKED_UP',
60
59
  /**
61
60
  * The entire order process has been completed and closed.
62
61
  */
63
- COMPLETED = "COMPLETED",
62
+ 'COMPLETED',
64
63
  /**
65
64
  * The order was cancelled before completion (by user or staff).
66
65
  */
67
- CANCELLED = "CANCELLED"
68
- }
66
+ 'CANCELLED',
67
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qeai-sdk",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
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,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 = {}));