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
@@ -34,7 +34,7 @@ export interface Account {
34
34
  * @example "hashed_password_string"
35
35
  * @example null
36
36
  */
37
- passwordHash?: string;
37
+ passwordHash?: string | null;
38
38
  /**
39
39
  * Authentication provider for this account.
40
40
  *
@@ -51,7 +51,7 @@ export interface Account {
51
51
  * @example "google_user_sub_123456789"
52
52
  * @example null
53
53
  */
54
- providerId?: string;
54
+ providerId?: string | null;
55
55
  /**
56
56
  * Optional OAuth access token.
57
57
  * Used for OAuth providers to make authenticated requests.
@@ -60,7 +60,7 @@ export interface Account {
60
60
  * @example "ya29.a0AfH6SMB..."
61
61
  * @example null
62
62
  */
63
- accessToken?: string;
63
+ accessToken?: string | null;
64
64
  /**
65
65
  * Optional OAuth refresh token.
66
66
  * Used for OAuth providers to obtain new access tokens.
@@ -69,7 +69,7 @@ export interface Account {
69
69
  * @example "1//0gXpJ..."
70
70
  * @example null
71
71
  */
72
- refreshToken?: string;
72
+ refreshToken?: string | null;
73
73
  /**
74
74
  * Date and time when the account was created.
75
75
  *
@@ -32,7 +32,7 @@ export interface User {
32
32
  *
33
33
  * @example "https://example.com/avatars/user123.jpg"
34
34
  */
35
- avatarUrl?: string;
35
+ avatarUrl?: string | null;
36
36
  /**
37
37
  * Array of user roles for authorization.
38
38
  * Users can have multiple roles simultaneously.
@@ -28,7 +28,7 @@ export interface Category {
28
28
  * @example "All types of drinks and beverages"
29
29
  * @example "Delicious main dishes and entrees"
30
30
  */
31
- description?: string;
31
+ description?: string | null;
32
32
  /**
33
33
  * Category status (active/inactive).
34
34
  * Determines if the category is visible in menus.
@@ -54,23 +54,23 @@ export interface Category {
54
54
  *
55
55
  * @example "2024-01-20T10:30:00Z"
56
56
  */
57
- deletedAt?: Date;
57
+ deletedAt?: Date | null;
58
58
  /**
59
59
  * Optional identifier of the user who created the category.
60
60
  *
61
61
  * @example "507f1f77bcf86cd799439011"
62
62
  */
63
- createdBy?: string;
63
+ createdBy?: string | null;
64
64
  /**
65
65
  * Optional identifier of the user who last updated the category.
66
66
  *
67
67
  * @example "507f1f77bcf86cd799439012"
68
68
  */
69
- updatedBy?: string;
69
+ updatedBy?: string | null;
70
70
  /**
71
71
  * Optional identifier of the user who deleted the category.
72
72
  *
73
73
  * @example "507f1f77bcf86cd799439013"
74
74
  */
75
- deletedBy?: string;
75
+ deletedBy?: string | null;
76
76
  }
@@ -1,4 +1,4 @@
1
- import { Currency } from '../../enums/currency.enum.js';
1
+ import { CurrencyCode } from "../../types";
2
2
  /**
3
3
  * Chain interface.
4
4
  *
@@ -30,7 +30,7 @@ export interface Chain {
30
30
  * @example Currency.USD
31
31
  * @example Currency.EUR
32
32
  */
33
- currency: Currency;
33
+ currency: CurrencyCode;
34
34
  /**
35
35
  * Global tax percentage for the chain.
36
36
  * Applied across all restaurants in the chain.
@@ -57,23 +57,23 @@ export interface Ingredient {
57
57
  *
58
58
  * @example "2024-01-20T10:30:00Z"
59
59
  */
60
- deletedAt?: Date;
60
+ deletedAt?: Date | null;
61
61
  /**
62
62
  * Optional identifier of the user who created the ingredient.
63
63
  *
64
64
  * @example "507f1f77bcf86cd799439011"
65
65
  */
66
- createdBy?: string;
66
+ createdBy?: string | null;
67
67
  /**
68
68
  * Optional identifier of the user who last updated the ingredient.
69
69
  *
70
70
  * @example "507f1f77bcf86cd799439012"
71
71
  */
72
- updatedBy?: string;
72
+ updatedBy?: string | null;
73
73
  /**
74
74
  * Optional identifier of the user who deleted the ingredient.
75
75
  *
76
76
  * @example "507f1f77bcf86cd799439013"
77
77
  */
78
- deletedBy?: string;
78
+ deletedBy?: string | null;
79
79
  }
@@ -19,13 +19,13 @@ export interface OrderItem {
19
19
  * @example "Large"
20
20
  * @example "Medium"
21
21
  */
22
- sizeName?: string;
22
+ sizeName?: string | null;
23
23
  /**
24
24
  * Optional price for the size variant.
25
25
  *
26
26
  * @example 12.99
27
27
  */
28
- sizePrice?: number;
28
+ sizePrice?: number | null;
29
29
  /**
30
30
  * Current status of the order item.
31
31
  *
@@ -39,7 +39,7 @@ export interface OrderItem {
39
39
  *
40
40
  * @example "No onions, extra cheese"
41
41
  */
42
- notes?: string;
42
+ notes?: string | null;
43
43
  /**
44
44
  * Unit price for this item.
45
45
  *
@@ -66,5 +66,5 @@ export interface OrderItem {
66
66
  * @default []
67
67
  * @example [ { name: "Coke", quantity: 1, ... }, { name: "Fries", quantity: 1, ... } ]
68
68
  */
69
- childItems: OrderItem[];
69
+ childItems?: OrderItem[] | null;
70
70
  }
@@ -1,5 +1,5 @@
1
- import { OrderStatus } from '../../enums/index.js';
2
- import { OrderMode } from '../../types/index.js';
1
+ import { OrderStatus } from "../../types/index.js";
2
+ import { OrderMode } from "../../types/index.js";
3
3
  /**
4
4
  * Represents a restaurant order within the QeHay system.
5
5
  * Each order includes its metadata, payment information, state, and fulfillment mode.
@@ -53,7 +53,7 @@ export interface Order {
53
53
  * @example "2024-01-15T18:30:00Z"
54
54
  * @example null
55
55
  */
56
- paidAt?: Date;
56
+ paidAt?: Date | null;
57
57
  /**
58
58
  * Payment transaction or charge identifier from the payment provider (if paid).
59
59
  * May be null if the order is unpaid or if the payment method does not provide an external reference.
@@ -61,7 +61,7 @@ export interface Order {
61
61
  * @example "ch_1234567890abcdef"
62
62
  * @example null
63
63
  */
64
- paymentChargeId?: string;
64
+ paymentChargeId?: string | null;
65
65
  /**
66
66
  * For dine-in orders, this indicates the table number assigned.
67
67
  * For pickup or delivery orders, this will be null.
@@ -69,7 +69,7 @@ export interface Order {
69
69
  * @example "Table 5"
70
70
  * @example null
71
71
  */
72
- tableNumber?: string;
72
+ tableNumber?: string | null;
73
73
  /**
74
74
  * For pickup orders, this indicates the scheduled pick-up time.
75
75
  * For dine-in or delivery orders, this field will be null.
@@ -77,7 +77,7 @@ export interface Order {
77
77
  * @example "2024-01-15T18:30:00Z"
78
78
  * @example null
79
79
  */
80
- pickupTime?: Date;
80
+ pickupTime?: Date | null;
81
81
  /**
82
82
  * For delivery orders, this contains the delivery address.
83
83
  * For dine-in or pickup, this will be null.
@@ -85,20 +85,20 @@ export interface Order {
85
85
  * @example "123 Main St, Downtown"
86
86
  * @example null
87
87
  */
88
- deliveryAddress?: string;
88
+ deliveryAddress?: string | null;
89
89
  /**
90
90
  * Unique identifier of the customer who placed the order.
91
91
  *
92
92
  * @example "550e8400-e29b-41d4-a716-446655440000"
93
93
  */
94
- customerId: string;
94
+ customerId?: string | null;
95
95
  /**
96
96
  * Identifier for the selected payment method.
97
97
  * Can reference either a saved method or a one-time use token depending on the payment provider.
98
98
  *
99
99
  * @example "payment-method-uuid-123"
100
100
  */
101
- paymentMethodId: string;
101
+ paymentMethodId?: string | null;
102
102
  /**
103
103
  * Timestamp for when the order was created in the system.
104
104
  *
@@ -1,6 +1,8 @@
1
- import { ProductSize, ProductImage, ProductTag, ProductSchedule, ProductRecipe } from './index.js';
2
- import { ProductStatus } from '../../enums/product-status.enum.js';
1
+ import { ProductSize, ProductImage, ProductSchedule, ProductRecipe } from './index.js';
2
+ import { ProductStatus } from '../../types/product-status.type.js';
3
3
  import { Translation } from '../translations/translation.interface.js';
4
+ import { Tag } from '../tags/tag.interface.js';
5
+ import { Question } from '../questions/question.interface.js';
4
6
  /**
5
7
  * Product interface.
6
8
  *
@@ -23,7 +25,7 @@ export interface Product {
23
25
  *
24
26
  * @example "PROD-001"
25
27
  */
26
- sku?: string;
28
+ sku?: string | null;
27
29
  /**
28
30
  * Product name.
29
31
  *
@@ -35,7 +37,7 @@ export interface Product {
35
37
  *
36
38
  * @example "Two all-beef patties, special sauce, lettuce, cheese, pickles, onions on a sesame seed bun"
37
39
  */
38
- description?: string;
40
+ description?: string | null;
39
41
  /**
40
42
  * Product base price.
41
43
  *
@@ -67,19 +69,20 @@ export interface Product {
67
69
  *
68
70
  * @example "2024-01-20T10:30:00Z"
69
71
  */
70
- deletedAt?: Date;
72
+ deletedAt?: Date | null;
71
73
  /**
72
74
  * Optional identifier of the user who created the product.
73
75
  *
74
76
  * @example "507f1f77bcf86cd799439011"
75
77
  */
76
- createdBy?: string;
78
+ createdBy?: string | null;
77
79
  /**
78
80
  * Optional identifier of the user who last updated the product.
79
81
  *
80
82
  * @example "507f1f77bcf86cd799439012"
81
83
  */
82
- updatedBy?: string;
84
+ updatedBy?: string | null;
85
+ questions?: Question[];
83
86
  /**
84
87
  * Optional array of product size variants.
85
88
  * Loaded when product is fetched with size relations.
@@ -99,7 +102,7 @@ export interface Product {
99
102
  * Optional array of product tags.
100
103
  * Loaded when product is fetched with tag relations.
101
104
  */
102
- tags?: ProductTag[];
105
+ tags?: Tag[];
103
106
  /**
104
107
  * Optional array of product availability schedules.
105
108
  * Loaded when product is fetched with schedule relations.
@@ -1,4 +1,4 @@
1
1
  import { Tag } from "../../../tags/index.js";
2
2
  import { SubResourceResponse } from "./sub-resource-response.interface.js";
3
- export interface CreateTagResponse extends SubResourceResponse<Omit<Tag, "createdAt" | "updatedAt" | "deletedAt">, "tag"> {
3
+ export interface CreateTagResponse extends SubResourceResponse<Omit<Tag, "createdAt" | "updatedAt" | "deletedAt" | "createdBy" | "updatedBy" | "deletedBy">, "tag"> {
4
4
  }
@@ -1,9 +1,7 @@
1
1
  import { Ingredient } from "../../../ingredients/index.js";
2
2
  export interface RecipeRelationship {
3
- message: string;
4
3
  id: string;
5
4
  quantity: number;
6
- productId: string;
7
5
  unit: string;
8
6
  ingredient: Omit<Ingredient, "createdAt" | "updatedAt" | "deletedAt">;
9
7
  }
@@ -1,15 +1,17 @@
1
+ import { Product } from "../products/product.interface.js";
1
2
  export interface Question {
2
3
  id: string;
3
4
  name: string;
4
5
  required: boolean;
5
- min?: number;
6
- max?: number;
6
+ min?: number | null;
7
+ max?: number | null;
7
8
  type: string;
8
9
  isActive: boolean;
10
+ answers?: Product[];
9
11
  createdAt: Date;
10
12
  updatedAt: Date;
11
- deletedAt?: Date;
12
- createdBy: string;
13
- updatedBy?: string;
14
- deletedBy?: string;
13
+ deletedAt?: Date | null;
14
+ createdBy?: string | null;
15
+ updatedBy?: string | null;
16
+ deletedBy?: string | null;
15
17
  }
@@ -33,14 +33,14 @@ export interface Restaurant {
33
33
  * @example "La planicie"
34
34
  * @example "123 Main St, Downtown"
35
35
  */
36
- address?: string;
36
+ address?: string | null;
37
37
  /**
38
38
  * Optional restaurant phone number.
39
39
  *
40
40
  * @example "903406229"
41
41
  * @example "+1-555-0123"
42
42
  */
43
- phone?: string;
43
+ phone?: string | null;
44
44
  /**
45
45
  * Optional restaurant timezone.
46
46
  * Used for scheduling and availability calculations.
@@ -48,7 +48,7 @@ export interface Restaurant {
48
48
  * @example "America/Lima"
49
49
  * @example "America/New_York"
50
50
  */
51
- timezone?: string;
51
+ timezone?: string | null;
52
52
  /**
53
53
  * Restaurant status (active/inactive).
54
54
  * Determines if the restaurant is operational.
@@ -74,23 +74,23 @@ export interface Restaurant {
74
74
  *
75
75
  * @example "2025-11-20T10:30:00Z"
76
76
  */
77
- deletedAt?: Date;
77
+ deletedAt?: Date | null;
78
78
  /**
79
79
  * Optional identifier of the user who created the restaurant.
80
80
  *
81
81
  * @example "68fc713cb9a5f6ee8fb7ae4e"
82
82
  */
83
- createdBy?: string;
83
+ createdBy?: string | null;
84
84
  /**
85
85
  * Optional identifier of the user who last updated the restaurant.
86
86
  *
87
87
  * @example "68fc713cb9a5f6ee8fb7ae4f"
88
88
  */
89
- updatedBy?: string;
89
+ updatedBy?: string | null;
90
90
  /**
91
91
  * Optional identifier of the user who deleted the restaurant.
92
92
  *
93
93
  * @example "68fc713cb9a5f6ee8fb7ae4g"
94
94
  */
95
- deletedBy?: string;
95
+ deletedBy?: string | null;
96
96
  }
@@ -37,7 +37,7 @@ export interface Translation {
37
37
  *
38
38
  * @example "Dos hamburguesas de carne, salsa especial, lechuga, queso, pepinillos, cebollas en pan de sésamo"
39
39
  */
40
- description?: string;
40
+ description?: string | null;
41
41
  /**
42
42
  * Optional unique identifier of the category this translation belongs to.
43
43
  * Null if this translation is for a product or question.
@@ -45,7 +45,7 @@ export interface Translation {
45
45
  * @example "550e8400-e29b-41d4-a716-446655440000"
46
46
  * @example null
47
47
  */
48
- categoryId?: string;
48
+ categoryId?: string | null;
49
49
  /**
50
50
  * Optional unique identifier of the product this translation belongs to.
51
51
  * Null if this translation is for a category or question.
@@ -53,7 +53,7 @@ export interface Translation {
53
53
  * @example "660e8400-e29b-41d4-a716-446655440001"
54
54
  * @example null
55
55
  */
56
- productId?: string;
56
+ productId?: string | null;
57
57
  /**
58
58
  * Optional unique identifier of the question this translation belongs to.
59
59
  * Null if this translation is for a category or product.
@@ -61,7 +61,7 @@ export interface Translation {
61
61
  * @example "770e8400-e29b-41d4-a716-446655440002"
62
62
  * @example null
63
63
  */
64
- questionId?: string;
64
+ questionId?: string | null;
65
65
  /**
66
66
  * Date and time when the translation was created.
67
67
  *
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Currency code constants for the QeHay platform.
3
+ *
4
+ * This array contains all possible currency codes supported for transactions and financial records.
5
+ * Acts as the single source of truth for currency values across client, waiter, kitchen, and admin modules.
6
+ *
7
+ * - PEN: Peruvian Sol
8
+ * - USD: United States Dollar
9
+ * - EUR: Euro
10
+ * - BRL: Brazilian Real
11
+ * - COP: Colombian Peso
12
+ * - CLP: Chilean Peso
13
+ * - MXN: Mexican Peso
14
+ * - ARS: Argentine Peso
15
+ *
16
+ * @since 2.0.0
17
+ */
18
+ export declare const CURRENCIES: readonly ["PEN", "USD"];
19
+ /**
20
+ * Type representing all supported currency codes within the QeHay platform.
21
+ * @see CURRENCIES
22
+ *
23
+ * @example CurrencyCode.PEN
24
+ * @example CurrencyCode.USD
25
+ */
26
+ export type CurrencyCode = (typeof CURRENCIES)[number];
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Currency code constants for the QeHay platform.
3
+ *
4
+ * This array contains all possible currency codes supported for transactions and financial records.
5
+ * Acts as the single source of truth for currency values across client, waiter, kitchen, and admin modules.
6
+ *
7
+ * - PEN: Peruvian Sol
8
+ * - USD: United States Dollar
9
+ * - EUR: Euro
10
+ * - BRL: Brazilian Real
11
+ * - COP: Colombian Peso
12
+ * - CLP: Chilean Peso
13
+ * - MXN: Mexican Peso
14
+ * - ARS: Argentine Peso
15
+ *
16
+ * @since 2.0.0
17
+ */
18
+ export const CURRENCIES = ["PEN", "USD"];
@@ -1 +1,4 @@
1
1
  export * from './order-mode.type.js';
2
+ export * from './order-status.type.js';
3
+ export * from "./currency.type.js";
4
+ export * from "./product-status.type.js";
@@ -1 +1,4 @@
1
1
  export * from './order-mode.type.js';
2
+ export * from './order-status.type.js';
3
+ export * from "./currency.type.js";
4
+ export * from "./product-status.type.js";
@@ -1,7 +1,9 @@
1
1
  /**
2
- * OrderMode type.
2
+ * Order mode constants for the QeHay platform.
3
3
  *
4
- * Represents the available modes for creating an order in the QeHay ecosystem.
4
+ * This array contains all possible order modes for order creation in QeHay.
5
+ * Acts as the single source of truth for order mode values across client, waiter,
6
+ * kitchen, and admin modules.
5
7
  *
6
8
  * - DINE_IN: The order is placed within the restaurant. The order is created in a "CREATED" state,
7
9
  * and a QR code is generated for the waiter to scan and confirm the order.
@@ -11,4 +13,11 @@
11
13
  *
12
14
  * @since 2.0.0
13
15
  */
14
- export type OrderMode = 'DINE_IN' | 'DELIVERY' | 'PICKUP';
16
+ export declare const ORDER_MODES: readonly ["DINE_IN", "DELIVERY", "PICKUP"];
17
+ /**
18
+ * Type representing all possible modes for an order within the QeHay platform.
19
+ * @see ORDER_MODES
20
+ *
21
+ * @example OrderMode.DINE_IN
22
+ */
23
+ export type OrderMode = (typeof ORDER_MODES)[number];
@@ -1 +1,16 @@
1
- export {};
1
+ /**
2
+ * Order mode constants for the QeHay platform.
3
+ *
4
+ * This array contains all possible order modes for order creation in QeHay.
5
+ * Acts as the single source of truth for order mode values across client, waiter,
6
+ * kitchen, and admin modules.
7
+ *
8
+ * - DINE_IN: The order is placed within the restaurant. The order is created in a "CREATED" state,
9
+ * and a QR code is generated for the waiter to scan and confirm the order.
10
+ * - DELIVERY: The order is placed for home delivery. The order is created in a "CREATED" state,
11
+ * payment is processed, and the order transitions to "CONFIRMED".
12
+ * - PICKUP: The order is placed for pickup at the restaurant. Follows the DELIVERY flow regarding state and payment.
13
+ *
14
+ * @since 2.0.0
15
+ */
16
+ export const ORDER_MODES = ["DINE_IN", "DELIVERY", "PICKUP"];
@@ -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
+ ];
@@ -0,0 +1,25 @@
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 declare const PRODUCT_STATUS: readonly ["ACTIVE", "INACTIVE", "OUT_OF_STOCK"];
14
+ /**
15
+ * Type representing all possible product statuses within the QeHay platform.
16
+ * @see PRODUCT_STATUS
17
+ *
18
+ * @example
19
+ * import { ProductStatus } from './product-status.enum';
20
+ *
21
+ * function isAvailable(status: ProductStatus): boolean {
22
+ * return status === 'ACTIVE';
23
+ * }
24
+ */
25
+ export type ProductStatus = (typeof PRODUCT_STATUS)[number];