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,81 @@
1
+ export declare class CreatePaymentAuditDynamoDto {
2
+ /**
3
+ * Unique identifier for the audited transaction.
4
+ * Should be globally unique per transaction.
5
+ *
6
+ * @example "txn_123abc456"
7
+ */
8
+ transactionId: string;
9
+ /**
10
+ * ISO 8601 timestamp indicating when the payment event occurred.
11
+ *
12
+ * @example "2024-06-01T12:00:00.000Z"
13
+ */
14
+ timestamp: string;
15
+ /**
16
+ * Unique identifier of the related order.
17
+ *
18
+ * @example "order_789xyz"
19
+ */
20
+ orderId: string;
21
+ /**
22
+ * Name of the payment provider (e.g., "stripe", "culqi").
23
+ *
24
+ * @example "stripe"
25
+ */
26
+ provider: string;
27
+ /**
28
+ * Name or path of the API endpoint called (e.g., "/charges").
29
+ *
30
+ * @example "/charges"
31
+ */
32
+ endpoint: string;
33
+ /**
34
+ * HTTP method used for the audited request.
35
+ *
36
+ * @example "POST"
37
+ */
38
+ method: string;
39
+ /**
40
+ * HTTP response status code from the provider (e.g., 200, 500).
41
+ *
42
+ * @example 200
43
+ */
44
+ statusCode: number;
45
+ /**
46
+ * Status of the operation/audit (e.g., "success", "error").
47
+ *
48
+ * @example "success"
49
+ */
50
+ status: string;
51
+ /**
52
+ * Processing time for the audited action, in milliseconds.
53
+ *
54
+ * @example 845
55
+ */
56
+ durationMs: number;
57
+ /**
58
+ * (Optional) IP address from which the request originated.
59
+ *
60
+ * @example "192.168.0.1"
61
+ */
62
+ ipAddress?: string;
63
+ /**
64
+ * URL of the external log or audit file, if available (e.g., S3 presigned url).
65
+ *
66
+ * @example "https://s3.amazonaws.com/bucket/audit/txn_123.json"
67
+ */
68
+ logUrl: string;
69
+ /**
70
+ * ISO 8601 timestamp indicating when the audit record was created.
71
+ *
72
+ * @example "2024-06-01T12:01:00.000Z"
73
+ */
74
+ createdAt: string;
75
+ /**
76
+ * ISO 8601 timestamp indicating the last update to the audit record.
77
+ *
78
+ * @example "2024-06-01T12:05:30.000Z"
79
+ */
80
+ updatedAt: string;
81
+ }
@@ -0,0 +1,81 @@
1
+ export class CreatePaymentAuditDynamoDto {
2
+ /**
3
+ * Unique identifier for the audited transaction.
4
+ * Should be globally unique per transaction.
5
+ *
6
+ * @example "txn_123abc456"
7
+ */
8
+ transactionId;
9
+ /**
10
+ * ISO 8601 timestamp indicating when the payment event occurred.
11
+ *
12
+ * @example "2024-06-01T12:00:00.000Z"
13
+ */
14
+ timestamp;
15
+ /**
16
+ * Unique identifier of the related order.
17
+ *
18
+ * @example "order_789xyz"
19
+ */
20
+ orderId;
21
+ /**
22
+ * Name of the payment provider (e.g., "stripe", "culqi").
23
+ *
24
+ * @example "stripe"
25
+ */
26
+ provider;
27
+ /**
28
+ * Name or path of the API endpoint called (e.g., "/charges").
29
+ *
30
+ * @example "/charges"
31
+ */
32
+ endpoint;
33
+ /**
34
+ * HTTP method used for the audited request.
35
+ *
36
+ * @example "POST"
37
+ */
38
+ method;
39
+ /**
40
+ * HTTP response status code from the provider (e.g., 200, 500).
41
+ *
42
+ * @example 200
43
+ */
44
+ statusCode;
45
+ /**
46
+ * Status of the operation/audit (e.g., "success", "error").
47
+ *
48
+ * @example "success"
49
+ */
50
+ status;
51
+ /**
52
+ * Processing time for the audited action, in milliseconds.
53
+ *
54
+ * @example 845
55
+ */
56
+ durationMs;
57
+ /**
58
+ * (Optional) IP address from which the request originated.
59
+ *
60
+ * @example "192.168.0.1"
61
+ */
62
+ ipAddress;
63
+ /**
64
+ * URL of the external log or audit file, if available (e.g., S3 presigned url).
65
+ *
66
+ * @example "https://s3.amazonaws.com/bucket/audit/txn_123.json"
67
+ */
68
+ logUrl;
69
+ /**
70
+ * ISO 8601 timestamp indicating when the audit record was created.
71
+ *
72
+ * @example "2024-06-01T12:01:00.000Z"
73
+ */
74
+ createdAt;
75
+ /**
76
+ * ISO 8601 timestamp indicating the last update to the audit record.
77
+ *
78
+ * @example "2024-06-01T12:05:30.000Z"
79
+ */
80
+ updatedAt;
81
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * DTO for storing payment audit records in S3.
3
+ *
4
+ * Encapsulates all relevant information of a payment transaction
5
+ * to be stored in S3 for logging, compliance, and traceability.
6
+ *
7
+ * Follows Clean Code, SOLID, and best practices for maintainability and extensibility.
8
+ *
9
+ * @since 2.0.0
10
+ */
11
+ export declare class CreatePaymentAudiS3tDto {
12
+ /**
13
+ * Unique identifier for the audited transaction.
14
+ * Should be globally unique per transaction.
15
+ *
16
+ * @example "txn_123abc456"
17
+ */
18
+ transactionId: string;
19
+ /**
20
+ * Unique identifier of the associated order.
21
+ *
22
+ * @example "order_789xyz"
23
+ */
24
+ orderId: string;
25
+ /**
26
+ * Name of the payment provider (e.g., "stripe", "culqi").
27
+ *
28
+ * @example "stripe"
29
+ */
30
+ provider: string;
31
+ /**
32
+ * API endpoint called during the payment operation (e.g., "/charges").
33
+ *
34
+ * @example "/charges"
35
+ */
36
+ endpoint: string;
37
+ /**
38
+ * HTTP method used (e.g., "POST", "GET").
39
+ *
40
+ * @example "POST"
41
+ */
42
+ method: string;
43
+ /**
44
+ * HTTP response status code from the provider (e.g., 200, 500).
45
+ *
46
+ * @example 200
47
+ */
48
+ statusCode: number;
49
+ /**
50
+ * Status of the audited operation (e.g., "success", "error").
51
+ *
52
+ * @example "success"
53
+ */
54
+ status: string;
55
+ /**
56
+ * Total execution time of the audited operation, in milliseconds.
57
+ *
58
+ * @example 523
59
+ */
60
+ durationMs: number;
61
+ /**
62
+ * (Optional) IP address from which the request originated.
63
+ *
64
+ * @example "192.168.1.10"
65
+ */
66
+ ipAddress?: string;
67
+ /**
68
+ * Payload sent in the audited request.
69
+ * Must be a serializable object.
70
+ *
71
+ * @example { amount: 19.99, currency: "PEN" }
72
+ */
73
+ requestBody: Record<string, any>;
74
+ /**
75
+ * Payload received in the audited response.
76
+ * Must be a serializable object.
77
+ *
78
+ * @example { providerResponse: ..., result: ... }
79
+ */
80
+ responseBody: Record<string, any>;
81
+ }
@@ -0,0 +1,81 @@
1
+ /**
2
+ * DTO for storing payment audit records in S3.
3
+ *
4
+ * Encapsulates all relevant information of a payment transaction
5
+ * to be stored in S3 for logging, compliance, and traceability.
6
+ *
7
+ * Follows Clean Code, SOLID, and best practices for maintainability and extensibility.
8
+ *
9
+ * @since 2.0.0
10
+ */
11
+ export class CreatePaymentAudiS3tDto {
12
+ /**
13
+ * Unique identifier for the audited transaction.
14
+ * Should be globally unique per transaction.
15
+ *
16
+ * @example "txn_123abc456"
17
+ */
18
+ transactionId;
19
+ /**
20
+ * Unique identifier of the associated order.
21
+ *
22
+ * @example "order_789xyz"
23
+ */
24
+ orderId;
25
+ /**
26
+ * Name of the payment provider (e.g., "stripe", "culqi").
27
+ *
28
+ * @example "stripe"
29
+ */
30
+ provider;
31
+ /**
32
+ * API endpoint called during the payment operation (e.g., "/charges").
33
+ *
34
+ * @example "/charges"
35
+ */
36
+ endpoint;
37
+ /**
38
+ * HTTP method used (e.g., "POST", "GET").
39
+ *
40
+ * @example "POST"
41
+ */
42
+ method;
43
+ /**
44
+ * HTTP response status code from the provider (e.g., 200, 500).
45
+ *
46
+ * @example 200
47
+ */
48
+ statusCode;
49
+ /**
50
+ * Status of the audited operation (e.g., "success", "error").
51
+ *
52
+ * @example "success"
53
+ */
54
+ status;
55
+ /**
56
+ * Total execution time of the audited operation, in milliseconds.
57
+ *
58
+ * @example 523
59
+ */
60
+ durationMs;
61
+ /**
62
+ * (Optional) IP address from which the request originated.
63
+ *
64
+ * @example "192.168.1.10"
65
+ */
66
+ ipAddress;
67
+ /**
68
+ * Payload sent in the audited request.
69
+ * Must be a serializable object.
70
+ *
71
+ * @example { amount: 19.99, currency: "PEN" }
72
+ */
73
+ requestBody;
74
+ /**
75
+ * Payload received in the audited response.
76
+ * Must be a serializable object.
77
+ *
78
+ * @example { providerResponse: ..., result: ... }
79
+ */
80
+ responseBody;
81
+ }
@@ -9,3 +9,5 @@
9
9
  export * from './payment-session.dto.js';
10
10
  export * from './payment-session-item.dto.js';
11
11
  export * from './webhook-data.dto.js';
12
+ export * from './create-payment-audit-dynamo.dto.js';
13
+ export * from './create-payment-audit-s3.dto.js';
@@ -9,3 +9,5 @@
9
9
  export * from './payment-session.dto.js';
10
10
  export * from './payment-session-item.dto.js';
11
11
  export * from './webhook-data.dto.js';
12
+ export * from './create-payment-audit-dynamo.dto.js';
13
+ export * from './create-payment-audit-s3.dto.js';
@@ -20,14 +20,14 @@ export declare class PaymentSessionItemDto {
20
20
  *
21
21
  * @example "Large"
22
22
  */
23
- sizeName?: string;
23
+ sizeName?: string | null;
24
24
  /**
25
25
  * Optional price for the size variant.
26
26
  * Must be a positive number if provided.
27
27
  *
28
28
  * @example 12.99
29
29
  */
30
- sizePrice?: number;
30
+ sizePrice?: number | null;
31
31
  /**
32
32
  * Name of the product/item.
33
33
  *
@@ -53,13 +53,13 @@ export declare class PaymentSessionItemDto {
53
53
  *
54
54
  * @example "No onions, extra cheese"
55
55
  */
56
- notes?: string;
56
+ notes?: string | null;
57
57
  /**
58
58
  * Optional status of this item.
59
59
  *
60
60
  * @example "pending"
61
61
  */
62
- itemStatus?: string;
62
+ itemStatus?: string | null;
63
63
  /**
64
64
  * Optional array of child items (for nested structures like combo meals).
65
65
  * Each child item is validated as a PaymentSessionItemDto.
@@ -80,6 +80,7 @@ export class PaymentSessionItemDto {
80
80
  childItems;
81
81
  }
82
82
  __decorate([
83
+ IsNotEmpty(),
83
84
  IsString(),
84
85
  IsUUID(),
85
86
  __metadata("design:type", String)
@@ -87,13 +88,13 @@ __decorate([
87
88
  __decorate([
88
89
  IsOptional(),
89
90
  IsString(),
90
- __metadata("design:type", String)
91
+ __metadata("design:type", Object)
91
92
  ], PaymentSessionItemDto.prototype, "sizeName", void 0);
92
93
  __decorate([
93
94
  IsOptional(),
94
95
  IsNumber(),
95
96
  IsPositive(),
96
- __metadata("design:type", Number)
97
+ __metadata("design:type", Object)
97
98
  ], PaymentSessionItemDto.prototype, "sizePrice", void 0);
98
99
  __decorate([
99
100
  IsString(),
@@ -103,22 +104,24 @@ __decorate([
103
104
  __decorate([
104
105
  IsNumber(),
105
106
  IsPositive(),
107
+ IsNotEmpty(),
106
108
  __metadata("design:type", Number)
107
109
  ], PaymentSessionItemDto.prototype, "quantity", void 0);
108
110
  __decorate([
109
111
  IsNumber(),
110
112
  IsPositive(),
113
+ IsNotEmpty(),
111
114
  __metadata("design:type", Number)
112
115
  ], PaymentSessionItemDto.prototype, "price", void 0);
113
116
  __decorate([
114
117
  IsOptional(),
115
118
  IsString(),
116
- __metadata("design:type", String)
119
+ __metadata("design:type", Object)
117
120
  ], PaymentSessionItemDto.prototype, "notes", void 0);
118
121
  __decorate([
119
122
  IsOptional(),
120
123
  IsString(),
121
- __metadata("design:type", String)
124
+ __metadata("design:type", Object)
122
125
  ], PaymentSessionItemDto.prototype, "itemStatus", void 0);
123
126
  __decorate([
124
127
  IsOptional(),
@@ -35,5 +35,5 @@ export declare class WebhookDataDto {
35
35
  *
36
36
  * @example { "x-stripe-signature": "t=1234567890,v1=abc123..." }
37
37
  */
38
- headers?: Record<string, string>;
38
+ headers?: Record<string, string | string[] | undefined>;
39
39
  }
@@ -49,6 +49,7 @@ export class WebhookDataDto {
49
49
  }
50
50
  __decorate([
51
51
  IsString(),
52
+ IsNotEmpty(),
52
53
  __metadata("design:type", String)
53
54
  ], WebhookDataDto.prototype, "rawBody", void 0);
54
55
  __decorate([
@@ -1,4 +1,4 @@
1
- import { ProductStatus } from '../../enums/product-status.enum.js';
1
+ import { type ProductStatus } from "../../types/product-status.type.js";
2
2
  /**
3
3
  * DTO for creating a new product.
4
4
  *
@@ -50,5 +50,5 @@ export declare class CreateProductDto {
50
50
  *
51
51
  * @example "507f1f77bcf86cd799439011"
52
52
  */
53
- createdBy?: string;
53
+ createdBy: string;
54
54
  }
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { IsString, IsNotEmpty, IsNumber, Min, IsOptional, IsEnum, IsMongoId } from 'class-validator';
11
- import { Type } from 'class-transformer';
12
- import { ProductStatus } from '../../enums/product-status.enum.js';
10
+ import { IsString, IsNotEmpty, IsNumber, Min, IsOptional, IsMongoId, IsIn, } from "class-validator";
11
+ import { Type } from "class-transformer";
12
+ import { PRODUCT_STATUS, } from "../../types/product-status.type.js";
13
13
  /**
14
14
  * DTO for creating a new product.
15
15
  *
@@ -54,7 +54,7 @@ export class CreateProductDto {
54
54
  * @example ProductStatus.ACTIVE
55
55
  * @default ProductStatus.ACTIVE
56
56
  */
57
- status = ProductStatus.ACTIVE;
57
+ status = "ACTIVE";
58
58
  /**
59
59
  * User who created the product.
60
60
  * Must be a valid MongoDB ObjectId.
@@ -70,7 +70,7 @@ __decorate([
70
70
  ], CreateProductDto.prototype, "sku", void 0);
71
71
  __decorate([
72
72
  IsString(),
73
- IsNotEmpty({ message: 'Product name is required' }),
73
+ IsNotEmpty({ message: "Product name is required" }),
74
74
  __metadata("design:type", String)
75
75
  ], CreateProductDto.prototype, "name", void 0);
76
76
  __decorate([
@@ -79,21 +79,24 @@ __decorate([
79
79
  __metadata("design:type", String)
80
80
  ], CreateProductDto.prototype, "description", void 0);
81
81
  __decorate([
82
+ IsNotEmpty(),
82
83
  IsNumber({
83
84
  maxDecimalPlaces: 4,
84
- }, { message: 'Base price must be a number with maximum 4 decimal places' }),
85
+ }, { message: "Base price must be a number with maximum 4 decimal places" }),
85
86
  Type(() => Number),
86
- Min(0, { message: 'Base price must be greater than or equal to 0' }),
87
+ Min(0, { message: "Base price must be greater than or equal to 0" }),
87
88
  __metadata("design:type", Number)
88
89
  ], CreateProductDto.prototype, "basePrice", void 0);
89
90
  __decorate([
90
91
  IsOptional(),
91
- IsEnum(ProductStatus, { message: 'Status must be ACTIVE, INACTIVE, or OUT_OF_STOCK' }),
92
+ IsIn(PRODUCT_STATUS, {
93
+ message: "Status must be ACTIVE, INACTIVE, or OUT_OF_STOCK",
94
+ }),
92
95
  __metadata("design:type", String)
93
96
  ], CreateProductDto.prototype, "status", void 0);
94
97
  __decorate([
95
98
  IsString(),
96
99
  IsMongoId(),
97
- IsOptional(),
100
+ IsNotEmpty(),
98
101
  __metadata("design:type", String)
99
102
  ], CreateProductDto.prototype, "createdBy", void 0);
@@ -13,7 +13,7 @@ export declare class DeleteProductDto {
13
13
  *
14
14
  * @example "550e8400-e29b-41d4-a716-446655440000"
15
15
  */
16
- id: string;
16
+ productId: string;
17
17
  /**
18
18
  * User who deleted the product.
19
19
  * Must be a valid MongoDB ObjectId.
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { IsMongoId, IsString, IsUUID } from 'class-validator';
10
+ import { IsMongoId, IsNotEmpty, IsString, IsUUID } from 'class-validator';
11
11
  /**
12
12
  * DTO for deleting a product.
13
13
  *
@@ -23,7 +23,7 @@ export class DeleteProductDto {
23
23
  *
24
24
  * @example "550e8400-e29b-41d4-a716-446655440000"
25
25
  */
26
- id;
26
+ productId;
27
27
  /**
28
28
  * User who deleted the product.
29
29
  * Must be a valid MongoDB ObjectId.
@@ -35,10 +35,12 @@ export class DeleteProductDto {
35
35
  __decorate([
36
36
  IsString(),
37
37
  IsUUID(),
38
+ IsNotEmpty(),
38
39
  __metadata("design:type", String)
39
- ], DeleteProductDto.prototype, "id", void 0);
40
+ ], DeleteProductDto.prototype, "productId", void 0);
40
41
  __decorate([
41
42
  IsString(),
42
43
  IsMongoId(),
44
+ IsNotEmpty(),
43
45
  __metadata("design:type", String)
44
46
  ], DeleteProductDto.prototype, "deletedBy", void 0);
@@ -1,4 +1,4 @@
1
- import { CreateProductImageDto } from './create-product-image.dto.js';
1
+ import { CreateProductImageDto } from "./create-product-image.dto.js";
2
2
  /**
3
3
  * DTO for bulk creating product images.
4
4
  *
@@ -14,7 +14,7 @@ export declare class BulkCreateProductImageDto {
14
14
  *
15
15
  * @example "550e8400-e29b-41d4-a716-446655440000"
16
16
  */
17
- productId?: string;
17
+ productId: string;
18
18
  /**
19
19
  * Array of images to create.
20
20
  * Must contain at least one image.
@@ -22,5 +22,5 @@ export declare class BulkCreateProductImageDto {
22
22
  *
23
23
  * @example [{ url: "https://example.com/image1.jpg", isPrimary: true }]
24
24
  */
25
- images: CreateProductImageDto[];
25
+ images: Omit<CreateProductImageDto, "productId">[];
26
26
  }
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { IsString, IsArray, ValidateNested, ArrayMinSize, IsOptional, IsUUID, } from 'class-validator';
11
- import { Type } from 'class-transformer';
12
- import { CreateProductImageDto } from './create-product-image.dto.js';
10
+ import { IsString, IsNotEmpty, IsArray, ValidateNested, ArrayMinSize, IsUUID, } from "class-validator";
11
+ import { Type } from "class-transformer";
12
+ import { CreateProductImageDto } from "./create-product-image.dto.js";
13
13
  /**
14
14
  * DTO for bulk creating product images.
15
15
  *
@@ -37,13 +37,13 @@ export class BulkCreateProductImageDto {
37
37
  }
38
38
  __decorate([
39
39
  IsString(),
40
- IsOptional(),
40
+ IsNotEmpty(),
41
41
  IsUUID(),
42
42
  __metadata("design:type", String)
43
43
  ], BulkCreateProductImageDto.prototype, "productId", void 0);
44
44
  __decorate([
45
45
  IsArray(),
46
- ArrayMinSize(1, { message: 'At least one image is required' }),
46
+ ArrayMinSize(1, { message: "At least one image is required" }),
47
47
  ValidateNested({ each: true }),
48
48
  Type(() => CreateProductImageDto),
49
49
  __metadata("design:type", Array)
@@ -13,7 +13,7 @@ export declare class CreateProductImageDto {
13
13
  *
14
14
  * @example "550e8400-e29b-41d4-a716-446655440000"
15
15
  */
16
- productId?: string;
16
+ productId: string;
17
17
  /**
18
18
  * Image URL.
19
19
  * Must be a valid URL format and not be empty.
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
7
7
  var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
- import { IsString, IsNotEmpty, IsOptional, IsBoolean, IsUrl, IsUUID } from 'class-validator';
10
+ import { IsString, IsNotEmpty, IsOptional, IsBoolean, IsUrl, IsUUID, } from "class-validator";
11
11
  /**
12
12
  * DTO for creating a new product image.
13
13
  *
@@ -42,14 +42,14 @@ export class CreateProductImageDto {
42
42
  }
43
43
  __decorate([
44
44
  IsString(),
45
- IsOptional(),
45
+ IsNotEmpty(),
46
46
  IsUUID(),
47
47
  __metadata("design:type", String)
48
48
  ], CreateProductImageDto.prototype, "productId", void 0);
49
49
  __decorate([
50
50
  IsString(),
51
- IsNotEmpty({ message: 'Image URL is required' }),
52
- IsUrl({}, { message: 'Image URL must be a valid URL' }),
51
+ IsNotEmpty({ message: "Image URL is required" }),
52
+ IsUrl({}, { message: "Image URL must be a valid URL" }),
53
53
  __metadata("design:type", String)
54
54
  ], CreateProductImageDto.prototype, "url", void 0);
55
55
  __decorate([
@@ -13,7 +13,7 @@ export declare class UpdateProductImageDto {
13
13
  *
14
14
  * @example "770e8400-e29b-41d4-a716-446655440003"
15
15
  */
16
- id?: string;
16
+ productImageId: string;
17
17
  /**
18
18
  * Optional image URL.
19
19
  * Must be a valid URL format if provided.