grm-shared-library 1.0.229 → 1.0.231

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 (189) hide show
  1. package/dist/decorators/case-decorators.js +7 -12
  2. package/dist/exceptions/custom-exception/custom-rpc.exception.js +5 -9
  3. package/dist/exceptions/enums/error-codes.enum.js +1 -4
  4. package/dist/exceptions/error-logger/error-logger.js +2 -6
  5. package/dist/exceptions/filters/all-exceptions.filter.js +17 -20
  6. package/dist/exceptions/filters/http-exceptions.filter.js +10 -13
  7. package/dist/exceptions/index.js +7 -23
  8. package/dist/exceptions/interfaces/error-context.js +1 -2
  9. package/dist/exceptions/interfaces/error-response.js +1 -2
  10. package/dist/index.js +18 -34
  11. package/dist/interfaces/i-request-with-user.js +1 -2
  12. package/dist/interfaces/jwt-payload.js +1 -2
  13. package/dist/interfaces/server-message.js +1 -2
  14. package/dist/interfaces/validated-user.js +1 -2
  15. package/dist/kafka/dtos/otp/create-otp-payload.dto.js +25 -29
  16. package/dist/kafka/dtos/otp/otp-payload.dto.js +10 -14
  17. package/dist/kafka/dtos/password/password-reset-payload.dto.js +13 -17
  18. package/dist/kafka/dtos/user/create-user-created-payload.dto.js +27 -31
  19. package/dist/kafka/dtos/user/create-user-registered-payload.dto.js +14 -18
  20. package/dist/kafka/dtos/user/user-created-payload.dto.js +10 -14
  21. package/dist/kafka/dtos/user/user-registered-payload.dto.js +6 -10
  22. package/dist/kafka/index.js +8 -24
  23. package/dist/kafka/topics.js +1 -4
  24. package/dist/modules/auth/dtos/change-password.dto.js +17 -21
  25. package/dist/modules/auth/dtos/forgot-password.dto.js +4 -8
  26. package/dist/modules/auth/dtos/login.dto.js +9 -13
  27. package/dist/modules/auth/dtos/refresh-token.dto.js +4 -8
  28. package/dist/modules/auth/dtos/register.dto.js +43 -47
  29. package/dist/modules/auth/dtos/resend-otp.dto.js +7 -11
  30. package/dist/modules/auth/dtos/reset-password.dto.js +15 -19
  31. package/dist/modules/auth/dtos/verify-otp.dto.js +6 -10
  32. package/dist/modules/auth/enums/otp-action.js +2 -5
  33. package/dist/modules/auth/index.d.ts +1 -0
  34. package/dist/modules/auth/index.js +12 -26
  35. package/dist/modules/auth/interfaces/login-response.js +1 -2
  36. package/dist/modules/auth/interfaces/register-response.js +1 -2
  37. package/dist/modules/auth/validators/match.decorator.js +3 -6
  38. package/dist/modules/common/constants/password-regex.const.js +1 -5
  39. package/dist/modules/common/constants/service.const.js +1 -4
  40. package/dist/modules/common/dtos/contact-person.dto.js +12 -16
  41. package/dist/modules/common/dtos/map-address.dto.js +20 -24
  42. package/dist/modules/common/dtos/map-location.dto.js +10 -14
  43. package/dist/modules/common/index.js +7 -23
  44. package/dist/modules/common/interfaces/contact-person.js +1 -2
  45. package/dist/modules/common/interfaces/map-address.js +1 -2
  46. package/dist/modules/common/interfaces/map-location.js +1 -2
  47. package/dist/modules/control-centre/dtos/create-control-centre.dto.js +29 -33
  48. package/dist/modules/control-centre/dtos/update-control-centre.dto.js +3 -7
  49. package/dist/modules/control-centre/enums/control-centre.enum.js +2 -5
  50. package/dist/modules/control-centre/index.js +4 -20
  51. package/dist/modules/control-centre/interfaces/control-centre.js +1 -2
  52. package/dist/modules/email/index.js +1 -17
  53. package/dist/modules/email/interfaces/user-created.js +1 -2
  54. package/dist/modules/incident/dtos/action/create-incident-action.dto.js +13 -17
  55. package/dist/modules/incident/dtos/action/incident-action.dto.js +8 -12
  56. package/dist/modules/incident/dtos/action/update-inident-action.dto.js +3 -7
  57. package/dist/modules/incident/dtos/assignment/create-incident-assignment.dto.js +14 -18
  58. package/dist/modules/incident/dtos/assignment/incident-assignment.dto.js +8 -12
  59. package/dist/modules/incident/dtos/assignment/update-incident-assignment.dto.js +3 -7
  60. package/dist/modules/incident/dtos/attachment/create-incident-attachment.dto.js +12 -16
  61. package/dist/modules/incident/dtos/attachment/update-incident-attachment.dto.js +3 -7
  62. package/dist/modules/incident/dtos/category/create-incident-category.dto.js +10 -14
  63. package/dist/modules/incident/dtos/category/update-incident-category.dto.js +3 -7
  64. package/dist/modules/incident/dtos/incident/create-incident.dto.js +53 -57
  65. package/dist/modules/incident/dtos/incident/incident.dto.js +37 -41
  66. package/dist/modules/incident/dtos/incident/update-incident.dto.js +3 -7
  67. package/dist/modules/incident/dtos/reporter/create-incident-reporter.dto.js +12 -16
  68. package/dist/modules/incident/dtos/reporter/incident-reporter.dto.js +10 -14
  69. package/dist/modules/incident/dtos/reporter/update-incident-reporter.dto.js +3 -7
  70. package/dist/modules/incident/dtos/response-unit-assignment/create-incident-response-unit-assignment.dto.js +16 -20
  71. package/dist/modules/incident/dtos/response-unit-assignment/incident-response-unit-assignment.dto.js +3 -7
  72. package/dist/modules/incident/dtos/response-unit-assignment/update-incident-response-unit-assignment.dto.js +8 -12
  73. package/dist/modules/incident/dtos/type/create-incident-type.dto.js +12 -16
  74. package/dist/modules/incident/dtos/type/update-incident-type.dto.js +3 -7
  75. package/dist/modules/incident/enums/incident-actions.enum.js +2 -5
  76. package/dist/modules/incident/enums/incident-app-id.enum.js +2 -5
  77. package/dist/modules/incident/enums/incident-channel.enum.js +2 -5
  78. package/dist/modules/incident/enums/incident-class.enum.js +2 -5
  79. package/dist/modules/incident/enums/incident-priority.enum.js +2 -5
  80. package/dist/modules/incident/enums/incident-status.enum.js +2 -5
  81. package/dist/modules/incident/enums/incident-workflow-queue-name.enum.js +2 -5
  82. package/dist/modules/incident/index.js +37 -53
  83. package/dist/modules/incident/intefaces/incident-action.js +1 -2
  84. package/dist/modules/incident/intefaces/incident-assignment.js +1 -2
  85. package/dist/modules/incident/intefaces/incident-attachment.js +1 -2
  86. package/dist/modules/incident/intefaces/incident-category.js +1 -2
  87. package/dist/modules/incident/intefaces/incident-reporter.js +1 -2
  88. package/dist/modules/incident/intefaces/incident-response-unit-assignment.js +1 -2
  89. package/dist/modules/incident/intefaces/incident-type.js +1 -2
  90. package/dist/modules/incident/intefaces/incident.js +1 -2
  91. package/dist/modules/organization/dtos/create-organization.dto.js +41 -45
  92. package/dist/modules/organization/dtos/organization-sla.dto.js +12 -16
  93. package/dist/modules/organization/dtos/update-organization.dto.js +3 -7
  94. package/dist/modules/organization/enums/org-status.enum.js +2 -5
  95. package/dist/modules/organization/enums/org-type.enum.js +2 -5
  96. package/dist/modules/organization/index.d.ts +1 -0
  97. package/dist/modules/organization/index.js +10 -22
  98. package/dist/modules/organization/interfaces/organization-sla.js +1 -2
  99. package/dist/modules/organization/interfaces/organization.js +1 -2
  100. package/dist/modules/permission/data/permissions.data.js +28 -31
  101. package/dist/modules/permission/dtos/create-permission.dto.js +7 -11
  102. package/dist/modules/permission/dtos/update-permission.dto.js +3 -7
  103. package/dist/modules/permission/enums/permission-actions.enum.js +2 -5
  104. package/dist/modules/permission/enums/permissions-moudule.enum.js +2 -5
  105. package/dist/modules/permission/index.js +6 -22
  106. package/dist/modules/permission/interfaces/permission.js +1 -2
  107. package/dist/modules/response-unit/dtos/person-unit/base-person-unit.dto.js +15 -19
  108. package/dist/modules/response-unit/dtos/person-unit/create-person-unit.dto.js +3 -7
  109. package/dist/modules/response-unit/dtos/person-unit/person-unit.dto.js +2 -6
  110. package/dist/modules/response-unit/dtos/person-unit/update-person-unit.dto.js +3 -7
  111. package/dist/modules/response-unit/dtos/response-unit/base-response-unit.dto.js +25 -29
  112. package/dist/modules/response-unit/dtos/response-unit/create-response-unit.dto.js +3 -7
  113. package/dist/modules/response-unit/dtos/response-unit/response-unit.dto.js +2 -6
  114. package/dist/modules/response-unit/dtos/response-unit/station.dto.js +8 -12
  115. package/dist/modules/response-unit/dtos/response-unit/update-response-unit.dto.js +3 -7
  116. package/dist/modules/response-unit/dtos/team-unit/base-team-unit.dto.js +10 -14
  117. package/dist/modules/response-unit/dtos/team-unit/create-team-unit.dto.js +3 -7
  118. package/dist/modules/response-unit/dtos/team-unit/crew/create-team-unit-crew.dto.js +3 -7
  119. package/dist/modules/response-unit/dtos/team-unit/crew/team-unit-crew.dto.js +14 -18
  120. package/dist/modules/response-unit/dtos/team-unit/crew/update-team-unit-crew.dto.js +3 -7
  121. package/dist/modules/response-unit/dtos/team-unit/team-unit.dto.js +2 -6
  122. package/dist/modules/response-unit/dtos/team-unit/update-team-unit.dto.js +3 -7
  123. package/dist/modules/response-unit/dtos/vehicle-unit/base-vehicle-unit.dto.js +27 -31
  124. package/dist/modules/response-unit/dtos/vehicle-unit/create-vehicle-unit.dto.js +3 -7
  125. package/dist/modules/response-unit/dtos/vehicle-unit/crew/create-vehicle-unit-crew.dto.js +3 -7
  126. package/dist/modules/response-unit/dtos/vehicle-unit/crew/update-vehicle-unit-crew.dto.js +11 -15
  127. package/dist/modules/response-unit/dtos/vehicle-unit/crew/vehicle-unit-crew.dto.js +19 -23
  128. package/dist/modules/response-unit/dtos/vehicle-unit/device/create-vehicle-unit-device.dto.js +3 -7
  129. package/dist/modules/response-unit/dtos/vehicle-unit/device/update-vehicle-unit-device.dto.js +3 -7
  130. package/dist/modules/response-unit/dtos/vehicle-unit/device/vehicle-unit-device.dto.js +23 -27
  131. package/dist/modules/response-unit/dtos/vehicle-unit/update-vehicle-unit.dto.js +3 -7
  132. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/ambulance-vehicle/ambulance-vehicle.dto.js +2 -6
  133. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/ambulance-vehicle/base-ambulance-vehicle.dto.js +6 -10
  134. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/ambulance-vehicle/create-ambulance-vehicle.dto.js +3 -7
  135. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/ambulance-vehicle/update-ambulance-vehicle.dto.js +3 -7
  136. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/fire-vehicle/base-fire-vehicle.dto.js +6 -10
  137. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/fire-vehicle/create-fire-vehicle.dto.js +3 -7
  138. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/fire-vehicle/fire-vehicle.dto.js +2 -6
  139. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/fire-vehicle/update-fire-vehicle.dto.js +3 -7
  140. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/road-rescue-vehicle/base-road-rescue-vehicle.dto.js +5 -9
  141. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/road-rescue-vehicle/create-road-rescue-vehicle.dto.js +3 -7
  142. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/road-rescue-vehicle/road-rescue-vehicle.dto.js +2 -6
  143. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/road-rescue-vehicle/update-road-rescue-vehicle.dto.js +3 -7
  144. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/security-vehicle/base-security-vehicle.dto.js +5 -9
  145. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/security-vehicle/create-security-vehicle.dto.js +3 -7
  146. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/security-vehicle/security-vehicle.dto.js +2 -6
  147. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-type/security-vehicle/update-security-vehicle.dto.js +3 -7
  148. package/dist/modules/response-unit/dtos/vehicle-unit/vehicle-unit.dto.js +2 -6
  149. package/dist/modules/response-unit/enums/person-unit/person-unit-category.enum.js +2 -5
  150. package/dist/modules/response-unit/enums/person-unit/person-unit-status.enum.js +2 -5
  151. package/dist/modules/response-unit/enums/response-unit/response-unit-type.enum.js +2 -5
  152. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-crew/ambulance-vehicle-role.enum.js +2 -5
  153. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-crew/fire-vehicle-role.enum.js +2 -5
  154. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-crew/road-rescue-vehicle-role.enum.js +2 -5
  155. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-crew/security-vehicle-role.enum.js +2 -5
  156. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-type/ambulance-vehicle-type.enum.js +2 -5
  157. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-type/fire-vehicle-type.enum.js +2 -5
  158. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-type/road-rescue-vehicle-type.enum.js +2 -5
  159. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-type/security-vehicle-type.enum.js +2 -5
  160. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-unit-ownership.enum.js +2 -5
  161. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-unit-status.enum.js +2 -5
  162. package/dist/modules/response-unit/enums/vehicle-unit/vehicle-unit-type.enum.js +2 -5
  163. package/dist/modules/response-unit/index.js +67 -83
  164. package/dist/modules/response-unit/interfaces/person-unit/person-unit.js +1 -2
  165. package/dist/modules/response-unit/interfaces/response-unit/response-unit.js +1 -2
  166. package/dist/modules/response-unit/interfaces/team-unit/team-unit-crew.js +1 -2
  167. package/dist/modules/response-unit/interfaces/team-unit/team-unit.js +1 -2
  168. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-type/ambulance-vehicle.js +1 -2
  169. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-type/fire-vehicle.js +1 -2
  170. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-type/road-rescue-vehicle.js +1 -2
  171. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-type/security-vehicle.js +1 -2
  172. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-unit-crew.js +1 -2
  173. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-unit-device.js +1 -2
  174. package/dist/modules/response-unit/interfaces/vehicle-unit/vehicle-unit.js +1 -2
  175. package/dist/modules/response-unit/validators/valid-vehicle-role.decorator.js +16 -19
  176. package/dist/modules/role/data/roles.data.js +62 -65
  177. package/dist/modules/role/dtos/create-role.dto.js +10 -14
  178. package/dist/modules/role/dtos/update-tole.dto.js +3 -7
  179. package/dist/modules/role/enums/role.enum.js +2 -5
  180. package/dist/modules/role/index.js +5 -21
  181. package/dist/modules/role/interfaces/role.js +1 -2
  182. package/dist/modules/user/dtos/create-user.dto.js +41 -45
  183. package/dist/modules/user/dtos/update-user.dto.js +3 -7
  184. package/dist/modules/user/enums/user-status.enum.js +2 -5
  185. package/dist/modules/user/index.js +4 -20
  186. package/dist/modules/user/interfaces/user.js +1 -2
  187. package/dist/modules/workflow/index.js +1 -17
  188. package/dist/modules/workflow/interfaces/workflow-query-info.js +1 -2
  189. package/package.json +3 -1
@@ -1,11 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SentenceCase = SentenceCase;
4
- exports.UpperCase = UpperCase;
5
- exports.LowerCase = LowerCase;
6
- const class_transformer_1 = require("class-transformer");
7
- function SentenceCase() {
8
- return (0, class_transformer_1.Transform)(({ value }) => {
1
+ import { Transform } from 'class-transformer';
2
+ export function SentenceCase() {
3
+ return Transform(({ value }) => {
9
4
  if (typeof value !== 'string') {
10
5
  return value;
11
6
  }
@@ -15,14 +10,14 @@ function SentenceCase() {
15
10
  .join(' ');
16
11
  });
17
12
  }
18
- function UpperCase() {
19
- return (0, class_transformer_1.Transform)(({ value }) => {
13
+ export function UpperCase() {
14
+ return Transform(({ value }) => {
20
15
  if (typeof value !== 'string') {
21
16
  return value;
22
17
  }
23
18
  return value.toUpperCase();
24
19
  });
25
20
  }
26
- function LowerCase() {
27
- return (0, class_transformer_1.Transform)(({ value }) => typeof value === "string" ? value.toLowerCase() : value);
21
+ export function LowerCase() {
22
+ return Transform(({ value }) => typeof value === "string" ? value.toLowerCase() : value);
28
23
  }
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CustomRpcException = void 0;
4
- const microservices_1 = require("@nestjs/microservices");
5
- const error_codes_enum_1 = require("../enums/error-codes.enum");
6
- class CustomRpcException extends microservices_1.RpcException {
1
+ import { RpcException } from "@nestjs/microservices";
2
+ import { ErrorCodes } from "../enums/error-codes.enum";
3
+ export class CustomRpcException extends RpcException {
7
4
  constructor(message, code, details, context) {
8
5
  const errorResponse = {
9
6
  message,
@@ -15,10 +12,10 @@ class CustomRpcException extends microservices_1.RpcException {
15
12
  super(errorResponse);
16
13
  }
17
14
  static fromError(message, error, context) {
18
- return new CustomRpcException(message, error_codes_enum_1.ErrorCodes.INTERNAL_SERVER_ERROR, error.message, context);
15
+ return new CustomRpcException(message, ErrorCodes.INTERNAL_SERVER_ERROR, error.message, context);
19
16
  }
20
17
  static fromDBError(message, error, context) {
21
- return new CustomRpcException(message, error_codes_enum_1.ErrorCodes.DATABASE_ERROR, error.message, context);
18
+ return new CustomRpcException(message, ErrorCodes.DATABASE_ERROR, error.message, context);
22
19
  }
23
20
  getErrorResponse() {
24
21
  return this.getError();
@@ -27,4 +24,3 @@ class CustomRpcException extends microservices_1.RpcException {
27
24
  return this.getErrorResponse().context;
28
25
  }
29
26
  }
30
- exports.CustomRpcException = CustomRpcException;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ErrorCodes = void 0;
4
- exports.ErrorCodes = {
1
+ export const ErrorCodes = {
5
2
  INTERNAL_SERVER_ERROR: 'INTERNAL_SERVER_ERROR',
6
3
  DATABASE_ERROR: 'DATABASE_ERROR',
7
4
  UNKNOWN_ERROR: 'UNKNOWN_ERROR',
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.logError = void 0;
4
- const Sentry = require("@sentry/node");
5
- const logError = async (error, context) => {
1
+ import * as Sentry from '@sentry/node';
2
+ export const logError = async (error, context) => {
6
3
  Sentry.withScope(scope => {
7
4
  if (context) {
8
5
  scope.setTag('service', context.service);
@@ -21,4 +18,3 @@ const logError = async (error, context) => {
21
18
  });
22
19
  await Sentry.flush(2000);
23
20
  };
24
- exports.logError = logError;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -6,28 +5,26 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
6
  };
8
7
  var AllExceptionsFilter_1;
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.AllExceptionsFilter = void 0;
11
- const common_1 = require("@nestjs/common");
12
- const rxjs_1 = require("rxjs");
13
- const microservices_1 = require("@nestjs/microservices");
14
- const custom_rpc_exception_1 = require("../custom-exception/custom-rpc.exception");
15
- const error_codes_enum_1 = require("../enums/error-codes.enum");
16
- const error_logger_1 = require("../error-logger/error-logger");
8
+ import { Catch, Logger } from '@nestjs/common';
9
+ import { throwError } from 'rxjs';
10
+ import { RpcException } from '@nestjs/microservices';
11
+ import { CustomRpcException } from '../custom-exception/custom-rpc.exception';
12
+ import { ErrorCodes } from '../enums/error-codes.enum';
13
+ import { logError } from '../error-logger/error-logger';
17
14
  let AllExceptionsFilter = AllExceptionsFilter_1 = class AllExceptionsFilter {
18
15
  constructor() {
19
- this.logger = new common_1.Logger(AllExceptionsFilter_1.name);
16
+ this.logger = new Logger(AllExceptionsFilter_1.name);
20
17
  }
21
18
  catch(exception, host) {
22
19
  var _a, _b, _c, _d, _e, _f;
23
20
  let customException;
24
- if (exception instanceof custom_rpc_exception_1.CustomRpcException) {
21
+ if (exception instanceof CustomRpcException) {
25
22
  customException = exception;
26
23
  }
27
- else if (exception instanceof microservices_1.RpcException) {
24
+ else if (exception instanceof RpcException) {
28
25
  const errorResponse = exception.getError();
29
26
  if (typeof errorResponse === 'string') {
30
- customException = new custom_rpc_exception_1.CustomRpcException(errorResponse, error_codes_enum_1.ErrorCodes.UNKNOWN_ERROR, 'An unexpected error occurred', {
27
+ customException = new CustomRpcException(errorResponse, ErrorCodes.UNKNOWN_ERROR, 'An unexpected error occurred', {
31
28
  service: 'unknown service',
32
29
  method: (_a = host.getArgByIndex(1)) === null || _a === void 0 ? void 0 : _a.pattern,
33
30
  payload: (_b = host.getArgByIndex(1)) === null || _b === void 0 ? void 0 : _b.data
@@ -35,7 +32,7 @@ let AllExceptionsFilter = AllExceptionsFilter_1 = class AllExceptionsFilter {
35
32
  }
36
33
  else {
37
34
  const error = errorResponse;
38
- customException = new custom_rpc_exception_1.CustomRpcException(error.message || 'Unknown error', error.code || error_codes_enum_1.ErrorCodes.UNKNOWN_ERROR, error.details || undefined, error.context || {
35
+ customException = new CustomRpcException(error.message || 'Unknown error', error.code || ErrorCodes.UNKNOWN_ERROR, error.details || undefined, error.context || {
39
36
  service: 'unknown service',
40
37
  method: (_c = host.getArgByIndex(1)) === null || _c === void 0 ? void 0 : _c.pattern,
41
38
  payload: (_d = host.getArgByIndex(1)) === null || _d === void 0 ? void 0 : _d.data
@@ -48,15 +45,15 @@ let AllExceptionsFilter = AllExceptionsFilter_1 = class AllExceptionsFilter {
48
45
  method: (_e = host.getArgByIndex(1)) === null || _e === void 0 ? void 0 : _e.pattern,
49
46
  payload: (_f = host.getArgByIndex(1)) === null || _f === void 0 ? void 0 : _f.data
50
47
  };
51
- customException = custom_rpc_exception_1.CustomRpcException.fromError('An unknown Error occured', exception, context);
48
+ customException = CustomRpcException.fromError('An unknown Error occured', exception, context);
52
49
  }
53
50
  this.logger.error(customException.getErrorResponse().message, customException.getErrorResponse().details);
54
- (0, error_logger_1.logError)(exception, customException.getContext()); // Log to Sentry
51
+ logError(exception, customException.getContext()); // Log to Sentry
55
52
  const responseError = { ...customException.getErrorResponse() };
56
- return (0, rxjs_1.throwError)(() => responseError);
53
+ return throwError(() => responseError);
57
54
  }
58
55
  };
59
- exports.AllExceptionsFilter = AllExceptionsFilter;
60
- exports.AllExceptionsFilter = AllExceptionsFilter = AllExceptionsFilter_1 = __decorate([
61
- (0, common_1.Catch)()
56
+ AllExceptionsFilter = AllExceptionsFilter_1 = __decorate([
57
+ Catch()
62
58
  ], AllExceptionsFilter);
59
+ export { AllExceptionsFilter };
@@ -1,31 +1,28 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
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;
6
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
6
  };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.HttpExceptionFilter = void 0;
10
- const common_1 = require("@nestjs/common");
11
- const error_codes_enum_1 = require("../enums/error-codes.enum");
12
- const error_logger_1 = require("../error-logger/error-logger");
7
+ import { Catch, HttpException, HttpStatus } from "@nestjs/common";
8
+ import { ErrorCodes } from "../enums/error-codes.enum";
9
+ import { logError } from "../error-logger/error-logger";
13
10
  let HttpExceptionFilter = class HttpExceptionFilter {
14
11
  catch(exception, host) {
15
12
  const ctx = host.switchToHttp();
16
13
  const response = ctx.getResponse();
17
14
  const request = ctx.getRequest();
18
- let status = common_1.HttpStatus.INTERNAL_SERVER_ERROR;
15
+ let status = HttpStatus.INTERNAL_SERVER_ERROR;
19
16
  let errorResponse = {
20
17
  message: 'Internal server error',
21
- code: error_codes_enum_1.ErrorCodes.UNKNOWN_ERROR,
18
+ code: ErrorCodes.UNKNOWN_ERROR,
22
19
  timestamp: new Date().toISOString()
23
20
  };
24
- if (exception instanceof common_1.HttpException) {
21
+ if (exception instanceof HttpException) {
25
22
  status = exception.getStatus();
26
23
  errorResponse = exception.getResponse();
27
24
  }
28
- (0, error_logger_1.logError)(exception, errorResponse.context || {}); // Log to Sentry
25
+ logError(exception, errorResponse.context || {}); // Log to Sentry
29
26
  response.status(status).json({
30
27
  ...errorResponse,
31
28
  path: request.url,
@@ -33,7 +30,7 @@ let HttpExceptionFilter = class HttpExceptionFilter {
33
30
  });
34
31
  }
35
32
  };
36
- exports.HttpExceptionFilter = HttpExceptionFilter;
37
- exports.HttpExceptionFilter = HttpExceptionFilter = __decorate([
38
- (0, common_1.Catch)()
33
+ HttpExceptionFilter = __decorate([
34
+ Catch()
39
35
  ], HttpExceptionFilter);
36
+ export { HttpExceptionFilter };
@@ -1,23 +1,7 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./custom-exception/custom-rpc.exception"), exports);
18
- __exportStar(require("./enums/error-codes.enum"), exports);
19
- __exportStar(require("./error-logger/error-logger"), exports);
20
- __exportStar(require("./filters/all-exceptions.filter"), exports);
21
- __exportStar(require("./filters/http-exceptions.filter"), exports);
22
- __exportStar(require("./interfaces/error-context"), exports);
23
- __exportStar(require("./interfaces/error-response"), exports);
1
+ export * from './custom-exception/custom-rpc.exception';
2
+ export * from './enums/error-codes.enum';
3
+ export * from './error-logger/error-logger';
4
+ export * from './filters/all-exceptions.filter';
5
+ export * from './filters/http-exceptions.filter';
6
+ export * from './interfaces/error-context';
7
+ export * from './interfaces/error-response';
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/dist/index.js CHANGED
@@ -1,39 +1,23 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
1
  // Modules
18
- __exportStar(require("./modules/auth/index"), exports);
19
- __exportStar(require("./modules/organization/index"), exports);
20
- __exportStar(require("./modules/common/index"), exports);
21
- __exportStar(require("./modules/permission/index"), exports);
22
- __exportStar(require("./modules/role/index"), exports);
23
- __exportStar(require("./modules/user/index"), exports);
24
- __exportStar(require("./modules/control-centre/index"), exports);
25
- __exportStar(require("./modules/email/index"), exports);
26
- __exportStar(require("./modules/response-unit/index"), exports);
27
- __exportStar(require("./modules/incident/index"), exports);
28
- __exportStar(require("./modules/workflow/index"), exports);
2
+ export * from './modules/auth/index';
3
+ export * from './modules/organization/index';
4
+ export * from './modules/common/index';
5
+ export * from './modules/permission/index';
6
+ export * from './modules/role/index';
7
+ export * from './modules/user/index';
8
+ export * from './modules/control-centre/index';
9
+ export * from './modules/email/index';
10
+ export * from './modules/response-unit/index';
11
+ export * from './modules/incident/index';
12
+ export * from './modules/workflow/index';
29
13
  // Interfaces
30
- __exportStar(require("./interfaces/server-message"), exports);
31
- __exportStar(require("./interfaces/i-request-with-user"), exports);
32
- __exportStar(require("./interfaces/validated-user"), exports);
33
- __exportStar(require("./interfaces/jwt-payload"), exports);
14
+ export * from './interfaces/server-message';
15
+ export * from './interfaces/i-request-with-user';
16
+ export * from './interfaces/validated-user';
17
+ export * from './interfaces/jwt-payload';
34
18
  // Kafka
35
- __exportStar(require("./kafka/index"), exports);
19
+ export * from './kafka/index';
36
20
  // Utilities
37
- __exportStar(require("./decorators/case-decorators"), exports);
21
+ export * from './decorators/case-decorators';
38
22
  // Exceptions
39
- __exportStar(require("./exceptions/index"), exports);
23
+ export * from './exceptions/index';
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,65 +7,62 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CreateOTPPayloadDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const otp_action_1 = require("../../../modules/auth/enums/otp-action");
15
- class CreateOTPPayloadDto {
10
+ import { IsDate, IsEmail, IsNotEmpty, IsObject, IsOptional, IsPhoneNumber, IsString } from "class-validator";
11
+ import { OtpAction } from "../../../modules/auth/enums/otp-action";
12
+ export class CreateOTPPayloadDto {
16
13
  }
17
- exports.CreateOTPPayloadDto = CreateOTPPayloadDto;
18
14
  __decorate([
19
- (0, class_validator_1.IsString)(),
20
- (0, class_validator_1.IsNotEmpty)(),
15
+ IsString(),
16
+ IsNotEmpty(),
21
17
  __metadata("design:type", String)
22
18
  ], CreateOTPPayloadDto.prototype, "name", void 0);
23
19
  __decorate([
24
- (0, class_validator_1.IsEmail)(),
25
- (0, class_validator_1.IsNotEmpty)(),
20
+ IsEmail(),
21
+ IsNotEmpty(),
26
22
  __metadata("design:type", String)
27
23
  ], CreateOTPPayloadDto.prototype, "email", void 0);
28
24
  __decorate([
29
- (0, class_validator_1.IsPhoneNumber)(),
30
- (0, class_validator_1.IsOptional)(),
25
+ IsPhoneNumber(),
26
+ IsOptional(),
31
27
  __metadata("design:type", String)
32
28
  ], CreateOTPPayloadDto.prototype, "phoneNumber", void 0);
33
29
  __decorate([
34
- (0, class_validator_1.IsString)(),
35
- (0, class_validator_1.IsOptional)(),
30
+ IsString(),
31
+ IsOptional(),
36
32
  __metadata("design:type", String)
37
33
  ], CreateOTPPayloadDto.prototype, "role", void 0);
38
34
  __decorate([
39
- (0, class_validator_1.IsString)(),
40
- (0, class_validator_1.IsNotEmpty)(),
35
+ IsString(),
36
+ IsNotEmpty(),
41
37
  __metadata("design:type", String)
42
38
  ], CreateOTPPayloadDto.prototype, "verificationToken", void 0);
43
39
  __decorate([
44
- (0, class_validator_1.IsDate)(),
45
- (0, class_validator_1.IsOptional)(),
40
+ IsDate(),
41
+ IsOptional(),
46
42
  __metadata("design:type", Date)
47
43
  ], CreateOTPPayloadDto.prototype, "verificationTokenExpiresAt", void 0);
48
44
  __decorate([
49
- (0, class_validator_1.IsString)(),
50
- (0, class_validator_1.IsNotEmpty)(),
45
+ IsString(),
46
+ IsNotEmpty(),
51
47
  __metadata("design:type", String)
52
48
  ], CreateOTPPayloadDto.prototype, "otp", void 0);
53
49
  __decorate([
54
- (0, class_validator_1.IsDate)(),
55
- (0, class_validator_1.IsOptional)(),
50
+ IsDate(),
51
+ IsOptional(),
56
52
  __metadata("design:type", Date)
57
53
  ], CreateOTPPayloadDto.prototype, "otpExpiresAt", void 0);
58
54
  __decorate([
59
- (0, class_validator_1.IsString)(),
60
- (0, class_validator_1.IsOptional)(),
55
+ IsString(),
56
+ IsOptional(),
61
57
  __metadata("design:type", String)
62
58
  ], CreateOTPPayloadDto.prototype, "otpExpirationDescription", void 0);
63
59
  __decorate([
64
- (0, class_validator_1.IsString)(),
65
- (0, class_validator_1.IsNotEmpty)(),
60
+ IsString(),
61
+ IsNotEmpty(),
66
62
  __metadata("design:type", String)
67
63
  ], CreateOTPPayloadDto.prototype, "action", void 0);
68
64
  __decorate([
69
- (0, class_validator_1.IsObject)(),
70
- (0, class_validator_1.IsOptional)(),
65
+ IsObject(),
66
+ IsOptional(),
71
67
  __metadata("design:type", Object)
72
68
  ], CreateOTPPayloadDto.prototype, "attributes", void 0);
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,26 +7,23 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.OTPPayloadDto = void 0;
13
- const mapped_types_1 = require("@nestjs/mapped-types");
14
- const create_otp_payload_dto_1 = require("./create-otp-payload.dto");
15
- const class_validator_1 = require("class-validator");
16
- class OTPPayloadDto extends (0, mapped_types_1.OmitType)(create_otp_payload_dto_1.CreateOTPPayloadDto, ['verificationTokenExpiresAt', 'otpExpiresAt', 'action']) {
10
+ import { OmitType } from "@nestjs/mapped-types";
11
+ import { CreateOTPPayloadDto } from "./create-otp-payload.dto";
12
+ import { IsNotEmpty, IsOptional, IsString } from "class-validator";
13
+ export class OTPPayloadDto extends OmitType(CreateOTPPayloadDto, ['verificationTokenExpiresAt', 'otpExpiresAt', 'action']) {
17
14
  }
18
- exports.OTPPayloadDto = OTPPayloadDto;
19
15
  __decorate([
20
- (0, class_validator_1.IsString)(),
21
- (0, class_validator_1.IsOptional)(),
16
+ IsString(),
17
+ IsOptional(),
22
18
  __metadata("design:type", String)
23
19
  ], OTPPayloadDto.prototype, "verificationTokenExpiresAt", void 0);
24
20
  __decorate([
25
- (0, class_validator_1.IsString)(),
26
- (0, class_validator_1.IsNotEmpty)(),
21
+ IsString(),
22
+ IsNotEmpty(),
27
23
  __metadata("design:type", String)
28
24
  ], OTPPayloadDto.prototype, "otpExpiresAt", void 0);
29
25
  __decorate([
30
- (0, class_validator_1.IsString)(),
31
- (0, class_validator_1.IsNotEmpty)(),
26
+ IsString(),
27
+ IsNotEmpty(),
32
28
  __metadata("design:type", String)
33
29
  ], OTPPayloadDto.prototype, "action", void 0);
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,32 +7,29 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.PasswordResetPayloadDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const class_transformer_1 = require("class-transformer");
15
- class PasswordResetPayloadDto {
10
+ import { IsEmail, IsIP, IsNotEmpty, IsOptional, IsString } from "class-validator";
11
+ import { Transform } from "class-transformer";
12
+ export class PasswordResetPayloadDto {
16
13
  }
17
- exports.PasswordResetPayloadDto = PasswordResetPayloadDto;
18
14
  __decorate([
19
- (0, class_validator_1.IsString)(),
20
- (0, class_validator_1.IsNotEmpty)(),
15
+ IsString(),
16
+ IsNotEmpty(),
21
17
  __metadata("design:type", String)
22
18
  ], PasswordResetPayloadDto.prototype, "name", void 0);
23
19
  __decorate([
24
- (0, class_validator_1.IsEmail)(),
25
- (0, class_validator_1.IsNotEmpty)(),
20
+ IsEmail(),
21
+ IsNotEmpty(),
26
22
  __metadata("design:type", String)
27
23
  ], PasswordResetPayloadDto.prototype, "email", void 0);
28
24
  __decorate([
29
- (0, class_validator_1.IsOptional)(),
30
- (0, class_validator_1.IsIP)(),
31
- (0, class_transformer_1.Transform)(({ value }) => value === "" ? undefined : value),
25
+ IsOptional(),
26
+ IsIP(),
27
+ Transform(({ value }) => value === "" ? undefined : value),
32
28
  __metadata("design:type", String)
33
29
  ], PasswordResetPayloadDto.prototype, "ipAddress", void 0);
34
30
  __decorate([
35
- (0, class_validator_1.IsOptional)(),
36
- (0, class_validator_1.IsString)(),
37
- (0, class_transformer_1.Transform)(({ value }) => value === "" ? undefined : value),
31
+ IsOptional(),
32
+ IsString(),
33
+ Transform(({ value }) => value === "" ? undefined : value),
38
34
  __metadata("design:type", String)
39
35
  ], PasswordResetPayloadDto.prototype, "address", void 0);
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -8,70 +7,67 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
8
7
  var __metadata = (this && this.__metadata) || function (k, v) {
9
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
9
  };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.CreateUserCreatedPayloadDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- class CreateUserCreatedPayloadDto {
10
+ import { ArrayNotEmpty, IsArray, IsDate, IsEmail, IsNotEmpty, IsNumber, IsObject, IsOptional, IsPhoneNumber, IsString } from "class-validator";
11
+ export class CreateUserCreatedPayloadDto {
15
12
  }
16
- exports.CreateUserCreatedPayloadDto = CreateUserCreatedPayloadDto;
17
13
  __decorate([
18
- (0, class_validator_1.IsNumber)(),
19
- (0, class_validator_1.IsNotEmpty)(),
14
+ IsNumber(),
15
+ IsNotEmpty(),
20
16
  __metadata("design:type", Number)
21
17
  ], CreateUserCreatedPayloadDto.prototype, "id", void 0);
22
18
  __decorate([
23
- (0, class_validator_1.IsString)(),
24
- (0, class_validator_1.IsNotEmpty)(),
19
+ IsString(),
20
+ IsNotEmpty(),
25
21
  __metadata("design:type", String)
26
22
  ], CreateUserCreatedPayloadDto.prototype, "firstName", void 0);
27
23
  __decorate([
28
- (0, class_validator_1.IsString)(),
29
- (0, class_validator_1.IsOptional)(),
24
+ IsString(),
25
+ IsOptional(),
30
26
  __metadata("design:type", String)
31
27
  ], CreateUserCreatedPayloadDto.prototype, "lastName", void 0);
32
28
  __decorate([
33
- (0, class_validator_1.IsEmail)(),
34
- (0, class_validator_1.IsNotEmpty)(),
29
+ IsEmail(),
30
+ IsNotEmpty(),
35
31
  __metadata("design:type", String)
36
32
  ], CreateUserCreatedPayloadDto.prototype, "email", void 0);
37
33
  __decorate([
38
- (0, class_validator_1.IsPhoneNumber)(),
39
- (0, class_validator_1.IsOptional)(),
34
+ IsPhoneNumber(),
35
+ IsOptional(),
40
36
  __metadata("design:type", String)
41
37
  ], CreateUserCreatedPayloadDto.prototype, "phoneNumber", void 0);
42
38
  __decorate([
43
- (0, class_validator_1.IsArray)(),
44
- (0, class_validator_1.ArrayNotEmpty)(),
45
- (0, class_validator_1.IsString)({ each: true }),
39
+ IsArray(),
40
+ ArrayNotEmpty(),
41
+ IsString({ each: true }),
46
42
  __metadata("design:type", Array)
47
43
  ], CreateUserCreatedPayloadDto.prototype, "roles", void 0);
48
44
  __decorate([
49
- (0, class_validator_1.IsString)(),
50
- (0, class_validator_1.IsOptional)(),
45
+ IsString(),
46
+ IsOptional(),
51
47
  __metadata("design:type", String)
52
48
  ], CreateUserCreatedPayloadDto.prototype, "otp", void 0);
53
49
  __decorate([
54
- (0, class_validator_1.IsDate)(),
55
- (0, class_validator_1.IsOptional)(),
50
+ IsDate(),
51
+ IsOptional(),
56
52
  __metadata("design:type", Date)
57
53
  ], CreateUserCreatedPayloadDto.prototype, "otpExpiresAt", void 0);
58
54
  __decorate([
59
- (0, class_validator_1.IsString)(),
60
- (0, class_validator_1.IsOptional)(),
55
+ IsString(),
56
+ IsOptional(),
61
57
  __metadata("design:type", String)
62
58
  ], CreateUserCreatedPayloadDto.prototype, "verificationToken", void 0);
63
59
  __decorate([
64
- (0, class_validator_1.IsString)(),
65
- (0, class_validator_1.IsOptional)(),
60
+ IsString(),
61
+ IsOptional(),
66
62
  __metadata("design:type", Date)
67
63
  ], CreateUserCreatedPayloadDto.prototype, "verificationTokenExpiresAt", void 0);
68
64
  __decorate([
69
- (0, class_validator_1.IsDate)(),
70
- (0, class_validator_1.IsNotEmpty)(),
65
+ IsDate(),
66
+ IsNotEmpty(),
71
67
  __metadata("design:type", Date)
72
68
  ], CreateUserCreatedPayloadDto.prototype, "createdAt", void 0);
73
69
  __decorate([
74
- (0, class_validator_1.IsObject)(),
75
- (0, class_validator_1.IsOptional)(),
70
+ IsObject(),
71
+ IsOptional(),
76
72
  __metadata("design:type", Object)
77
73
  ], CreateUserCreatedPayloadDto.prototype, "attributes", void 0);