grm-shared-library 1.0.150 → 1.0.152

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 (114) hide show
  1. package/dist/kafka/client-ids.d.ts +0 -2
  2. package/dist/kafka/client-ids.js +1 -3
  3. package/dist/kafka/interfaces/otp-payload.d.ts +4 -6
  4. package/dist/kafka/topics.d.ts +1 -0
  5. package/dist/kafka/topics.js +1 -0
  6. package/dist/modules/incident/dtos/action/create-incident-action.dto.d.ts +6 -0
  7. package/dist/modules/{organization/dtos/contact-person.dto.js → incident/dtos/action/create-incident-action.dto.js} +15 -17
  8. package/dist/modules/incident/dtos/action/incident-action.dto.d.ts +6 -5
  9. package/dist/modules/incident/dtos/action/incident-action.dto.js +5 -13
  10. package/dist/modules/incident/dtos/action/update-inident-action.dto.d.ts +5 -0
  11. package/dist/modules/incident/dtos/action/update-inident-action.dto.js +8 -0
  12. package/dist/modules/incident/dtos/incident/incident.dto.d.ts +4 -4
  13. package/dist/modules/incident/dtos/incident/incident.dto.js +14 -11
  14. package/dist/modules/incident/index.d.ts +2 -0
  15. package/dist/modules/incident/index.js +2 -0
  16. package/dist/modules/incident/intefaces/incident-action.d.ts +0 -2
  17. package/package.json +43 -43
  18. package/dist/kafka/interfaces/password-reset-payload.d.ts +0 -7
  19. package/dist/kafka/interfaces/password-reset-payload.js +0 -2
  20. package/dist/kafka/interfaces/user-created-payload.d.ts +0 -13
  21. package/dist/kafka/interfaces/user-created-payload.js +0 -2
  22. package/dist/kafka/interfaces/user-registered-payload.d.ts +0 -9
  23. package/dist/kafka/interfaces/user-registered-payload.js +0 -2
  24. package/dist/kafka/topics/index.d.ts +0 -13
  25. package/dist/kafka/topics/index.js +0 -20
  26. package/dist/kafka/topics/topics.d.ts +0 -13
  27. package/dist/kafka/topics/topics.js +0 -20
  28. package/dist/modules/auth/dtos/set-password.dto.d.ts +0 -4
  29. package/dist/modules/auth/dtos/set-password.dto.js +0 -33
  30. package/dist/modules/common/constants/service_names.const.d.ts +0 -8
  31. package/dist/modules/common/constants/service_names.const.js +0 -11
  32. package/dist/modules/organization/dtos/contact-person.dto.d.ts +0 -6
  33. package/dist/modules/organization/interfaces/partner.d.ts +0 -17
  34. package/dist/modules/organization/interfaces/partner.js +0 -2
  35. package/dist/modules/partner/dtos/create-partner.dto.d.ts +0 -16
  36. package/dist/modules/partner/dtos/create-partner.dto.js +0 -85
  37. package/dist/modules/partner/dtos/update-partner.dto.d.ts +0 -5
  38. package/dist/modules/partner/dtos/update-partner.dto.js +0 -8
  39. package/dist/modules/partner/enums/partner-status.enum.d.ts +0 -7
  40. package/dist/modules/partner/enums/partner-status.enum.js +0 -11
  41. package/dist/modules/partner/index.d.ts +0 -4
  42. package/dist/modules/partner/index.js +0 -20
  43. package/dist/modules/partner/interfaces/partner.d.ts +0 -20
  44. package/dist/modules/partner/interfaces/partner.js +0 -2
  45. package/dist/modules/response-unit/enums/ambulance-vehicle-type.enum.d.ts +0 -8
  46. package/dist/modules/response-unit/enums/ambulance-vehicle-type.enum.js +0 -12
  47. package/dist/modules/response-unit/enums/fire-vehicle-type.enum.d.ts +0 -8
  48. package/dist/modules/response-unit/enums/fire-vehicle-type.enum.js +0 -12
  49. package/dist/modules/response-unit/enums/person-unit-category.enum.d.ts +0 -10
  50. package/dist/modules/response-unit/enums/person-unit-category.enum.js +0 -14
  51. package/dist/modules/response-unit/enums/person-unit-status.enum.d.ts +0 -7
  52. package/dist/modules/response-unit/enums/person-unit-status.enum.js +0 -11
  53. package/dist/modules/response-unit/enums/response-unit-type.enum.d.ts +0 -5
  54. package/dist/modules/response-unit/enums/response-unit-type.enum.js +0 -9
  55. package/dist/modules/response-unit/enums/road-rescue-vehicle-type.enum.d.ts +0 -6
  56. package/dist/modules/response-unit/enums/road-rescue-vehicle-type.enum.js +0 -10
  57. package/dist/modules/response-unit/enums/security-vehicle-type.enum.d.ts +0 -7
  58. package/dist/modules/response-unit/enums/security-vehicle-type.enum.js +0 -11
  59. package/dist/modules/response-unit/enums/vehicle-unit-ownership.enum.d.ts +0 -7
  60. package/dist/modules/response-unit/enums/vehicle-unit-ownership.enum.js +0 -11
  61. package/dist/modules/response-unit/enums/vehicle-unit-status.enum.d.ts +0 -5
  62. package/dist/modules/response-unit/enums/vehicle-unit-status.enum.js +0 -9
  63. package/dist/modules/response-unit/enums/vehicle-unit-type.enum.d.ts +0 -6
  64. package/dist/modules/response-unit/enums/vehicle-unit-type.enum.js +0 -10
  65. package/dist/modules/response-unit/interfaces/ambulance-vehicle.d.ts +0 -5
  66. package/dist/modules/response-unit/interfaces/ambulance-vehicle.js +0 -2
  67. package/dist/modules/response-unit/interfaces/fire-vehicle.d.ts +0 -5
  68. package/dist/modules/response-unit/interfaces/fire-vehicle.js +0 -2
  69. package/dist/modules/response-unit/interfaces/person-unit.d.ts +0 -11
  70. package/dist/modules/response-unit/interfaces/person-unit.js +0 -2
  71. package/dist/modules/response-unit/interfaces/response-unit.d.ts +0 -16
  72. package/dist/modules/response-unit/interfaces/response-unit.js +0 -2
  73. package/dist/modules/response-unit/interfaces/road-rescue-vehicle.d.ts +0 -5
  74. package/dist/modules/response-unit/interfaces/road-rescue-vehicle.js +0 -2
  75. package/dist/modules/response-unit/interfaces/security-vehicle.d.ts +0 -5
  76. package/dist/modules/response-unit/interfaces/security-vehicle.js +0 -2
  77. package/dist/modules/response-unit/interfaces/team-unit.d.ts +0 -7
  78. package/dist/modules/response-unit/interfaces/team-unit.js +0 -2
  79. package/dist/modules/response-unit/interfaces/vehicle-unit-crew.d.ts +0 -8
  80. package/dist/modules/response-unit/interfaces/vehicle-unit-crew.js +0 -2
  81. package/dist/modules/response-unit/interfaces/vehicle-unit-device.d.ts +0 -15
  82. package/dist/modules/response-unit/interfaces/vehicle-unit-device.js +0 -2
  83. package/dist/modules/response-unit/interfaces/vehicle-unit.d.ts +0 -22
  84. package/dist/modules/response-unit/interfaces/vehicle-unit.js +0 -2
  85. package/dist/modules/role/data/permissions.data.d.ts +0 -2
  86. package/dist/modules/role/data/permissions.data.js +0 -52
  87. package/dist/modules/role/dtos/create-permission.dto.d.ts +0 -4
  88. package/dist/modules/role/dtos/create-permission.dto.js +0 -27
  89. package/dist/modules/role/dtos/update-permission.dto.d.ts +0 -5
  90. package/dist/modules/role/dtos/update-permission.dto.js +0 -8
  91. package/dist/modules/role/dtos/update-role.dto.d.ts +0 -5
  92. package/dist/modules/role/dtos/update-role.dto.js +0 -8
  93. package/dist/modules/role/enums/permission-actions.enum.d.ts +0 -22
  94. package/dist/modules/role/enums/permission-actions.enum.js +0 -31
  95. package/dist/modules/role/enums/permissions-moudule.enum.d.ts +0 -7
  96. package/dist/modules/role/enums/permissions-moudule.enum.js +0 -11
  97. package/dist/modules/role/interfaces/permission.d.ts +0 -4
  98. package/dist/modules/role/interfaces/permission.js +0 -2
  99. package/dist/modules/role/permission/data/permissions.data.d.ts +0 -2
  100. package/dist/modules/role/permission/data/permissions.data.js +0 -52
  101. package/dist/modules/role/permission/dtos/create-permission.dto.d.ts +0 -4
  102. package/dist/modules/role/permission/dtos/create-permission.dto.js +0 -27
  103. package/dist/modules/role/permission/dtos/update-permission.dto.d.ts +0 -5
  104. package/dist/modules/role/permission/dtos/update-permission.dto.js +0 -8
  105. package/dist/modules/role/permission/enums/permission-actions.enum.d.ts +0 -22
  106. package/dist/modules/role/permission/enums/permission-actions.enum.js +0 -31
  107. package/dist/modules/role/permission/enums/permissions-moudule.enum.d.ts +0 -7
  108. package/dist/modules/role/permission/enums/permissions-moudule.enum.js +0 -11
  109. package/dist/modules/role/permission/interfaces/permission.d.ts +0 -5
  110. package/dist/modules/role/permission/interfaces/permission.js +0 -2
  111. package/dist/modules/user/dtos/user-response.dto.d.ts +0 -18
  112. package/dist/modules/user/dtos/user-response.dto.js +0 -76
  113. package/dist/modules/user/enums/user-role.enum.d.ts +0 -4
  114. package/dist/modules/user/enums/user-role.enum.js +0 -8
@@ -3,6 +3,4 @@ export declare const CLIENT_IDS: {
3
3
  AUTH_SERVICE: string;
4
4
  ORGANIZATION_SERVICE: string;
5
5
  EMAIL_SERVICE: string;
6
- INCIDENT_SERVICE: string;
7
- NOTIFICATION_SERVICE: string;
8
6
  };
@@ -5,7 +5,5 @@ exports.CLIENT_IDS = {
5
5
  API_GATEWAY: 'api-gateway',
6
6
  AUTH_SERVICE: 'auth-service',
7
7
  ORGANIZATION_SERVICE: 'organization-service',
8
- EMAIL_SERVICE: 'email-service',
9
- INCIDENT_SERVICE: 'incident-service',
10
- NOTIFICATION_SERVICE: 'notification-service',
8
+ EMAIL_SERVICE: 'email-service'
11
9
  };
@@ -1,11 +1,9 @@
1
1
  export interface OTPPayload {
2
- firstName: string;
3
- lastName: string;
4
- email: string;
5
- phoneNumber: string;
6
- verificationToken: string;
7
- verificationTokenExpiresAt: Date;
2
+ userId: number;
3
+ token: string;
8
4
  otp: string;
9
5
  otpExpiresAt: Date;
6
+ email: string;
7
+ phoneNumber: string;
10
8
  attributes: Record<string, any>;
11
9
  }
@@ -12,4 +12,5 @@ export declare const KAFKA_TOPICS: {
12
12
  OTP_REQUESTED: string;
13
13
  PASSWORD_RESET: string;
14
14
  INCIDENT_CREATED: string;
15
+ INCIDENT_UPDATED: string;
15
16
  };
@@ -21,4 +21,5 @@ exports.KAFKA_TOPICS = {
21
21
  PASSWORD_RESET: 'password.reset',
22
22
  // Incident
23
23
  INCIDENT_CREATED: 'incident.created',
24
+ INCIDENT_UPDATED: 'incident.updated'
24
25
  };
@@ -0,0 +1,6 @@
1
+ export declare class CreateIncidentActionDto {
2
+ incidentId: number;
3
+ userId?: number;
4
+ action: string;
5
+ timestamp: Date;
6
+ }
@@ -9,30 +9,28 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.ContactPersonDto = void 0;
12
+ exports.CreateIncidentActionDto = void 0;
13
13
  const class_validator_1 = require("class-validator");
14
- const case_decorators_1 = require("../../../decorators/case-decorators");
15
- class ContactPersonDto {
14
+ class CreateIncidentActionDto {
16
15
  }
17
- exports.ContactPersonDto = ContactPersonDto;
16
+ exports.CreateIncidentActionDto = CreateIncidentActionDto;
18
17
  __decorate([
19
- (0, class_validator_1.IsString)(),
20
- (0, case_decorators_1.SentenceCase)(),
18
+ (0, class_validator_1.IsNumber)(),
21
19
  (0, class_validator_1.IsNotEmpty)(),
22
- __metadata("design:type", String)
23
- ], ContactPersonDto.prototype, "name", void 0);
20
+ __metadata("design:type", Number)
21
+ ], CreateIncidentActionDto.prototype, "incidentId", void 0);
24
22
  __decorate([
25
- (0, class_validator_1.IsPhoneNumber)(),
26
- (0, class_validator_1.IsNotEmpty)(),
27
- __metadata("design:type", String)
28
- ], ContactPersonDto.prototype, "phoneNumber", void 0);
23
+ (0, class_validator_1.IsNumber)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ __metadata("design:type", Number)
26
+ ], CreateIncidentActionDto.prototype, "userId", void 0);
29
27
  __decorate([
30
- (0, class_validator_1.IsEmail)(),
28
+ (0, class_validator_1.IsString)(),
31
29
  (0, class_validator_1.IsNotEmpty)(),
32
30
  __metadata("design:type", String)
33
- ], ContactPersonDto.prototype, "email", void 0);
31
+ ], CreateIncidentActionDto.prototype, "action", void 0);
34
32
  __decorate([
35
- (0, class_validator_1.IsString)(),
33
+ (0, class_validator_1.IsDate)(),
36
34
  (0, class_validator_1.IsNotEmpty)(),
37
- __metadata("design:type", String)
38
- ], ContactPersonDto.prototype, "designation", void 0);
35
+ __metadata("design:type", Date)
36
+ ], CreateIncidentActionDto.prototype, "timestamp", void 0);
@@ -1,6 +1,7 @@
1
- export declare class IncidentActionDto {
2
- incidentId: number;
3
- userId?: number;
4
- action: string;
5
- timestamp: Date;
1
+ import { CreateIncidentActionDto } from "./create-incident-action.dto";
2
+ declare const IncidentActionDto_base: import("@nestjs/mapped-types").MappedType<Omit<CreateIncidentActionDto, "timestamp">>;
3
+ export declare class IncidentActionDto extends IncidentActionDto_base {
4
+ id: number;
5
+ timestamp: string;
6
6
  }
7
+ export {};
@@ -10,27 +10,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.IncidentActionDto = void 0;
13
+ const mapped_types_1 = require("@nestjs/mapped-types");
14
+ const create_incident_action_dto_1 = require("./create-incident-action.dto");
13
15
  const class_validator_1 = require("class-validator");
14
- class IncidentActionDto {
16
+ class IncidentActionDto extends (0, mapped_types_1.OmitType)(create_incident_action_dto_1.CreateIncidentActionDto, ['timestamp']) {
15
17
  }
16
18
  exports.IncidentActionDto = IncidentActionDto;
17
19
  __decorate([
18
20
  (0, class_validator_1.IsNumber)(),
19
21
  (0, class_validator_1.IsNotEmpty)(),
20
22
  __metadata("design:type", Number)
21
- ], IncidentActionDto.prototype, "incidentId", void 0);
23
+ ], IncidentActionDto.prototype, "id", void 0);
22
24
  __decorate([
23
- (0, class_validator_1.IsNumber)(),
24
- (0, class_validator_1.IsOptional)(),
25
- __metadata("design:type", Number)
26
- ], IncidentActionDto.prototype, "userId", void 0);
27
- __decorate([
28
- (0, class_validator_1.IsString)(),
25
+ (0, class_validator_1.IsDateString)(),
29
26
  (0, class_validator_1.IsNotEmpty)(),
30
27
  __metadata("design:type", String)
31
- ], IncidentActionDto.prototype, "action", void 0);
32
- __decorate([
33
- (0, class_validator_1.IsDate)(),
34
- (0, class_validator_1.IsNotEmpty)(),
35
- __metadata("design:type", Date)
36
28
  ], IncidentActionDto.prototype, "timestamp", void 0);
@@ -0,0 +1,5 @@
1
+ import { CreateIncidentActionDto } from "./create-incident-action.dto";
2
+ declare const UpdateIncidentActionDto_base: import("@nestjs/mapped-types").MappedType<Partial<CreateIncidentActionDto>>;
3
+ export declare class UpdateIncidentActionDto extends UpdateIncidentActionDto_base {
4
+ }
5
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateIncidentActionDto = void 0;
4
+ const mapped_types_1 = require("@nestjs/mapped-types");
5
+ const create_incident_action_dto_1 = require("./create-incident-action.dto");
6
+ class UpdateIncidentActionDto extends (0, mapped_types_1.PartialType)(create_incident_action_dto_1.CreateIncidentActionDto) {
7
+ }
8
+ exports.UpdateIncidentActionDto = UpdateIncidentActionDto;
@@ -1,12 +1,12 @@
1
1
  import { CreateIncidentDto } from "./create-incident.dto";
2
2
  import { CreateIncidentCategoryDto } from "../category/create-incident-category.dto";
3
3
  import { CreateIncidentTypeDto } from "../type/create-incident-type.dto";
4
- import { IncidentAction } from "../../intefaces/incident-action";
4
+ import { IncidentActionDto } from "../action/incident-action.dto";
5
5
  export declare class IncidentDto extends CreateIncidentDto {
6
6
  id: number;
7
- createdAt: string;
8
- updatedAt: string;
9
7
  category?: CreateIncidentCategoryDto;
10
8
  type?: CreateIncidentTypeDto;
11
- actions?: IncidentAction[];
9
+ actions?: IncidentActionDto[];
10
+ createdAt: string;
11
+ updatedAt: string;
12
12
  }
@@ -15,6 +15,7 @@ const create_incident_dto_1 = require("./create-incident.dto");
15
15
  const class_transformer_1 = require("class-transformer");
16
16
  const create_incident_category_dto_1 = require("../category/create-incident-category.dto");
17
17
  const create_incident_type_dto_1 = require("../type/create-incident-type.dto");
18
+ const incident_action_dto_1 = require("../action/incident-action.dto");
18
19
  class IncidentDto extends create_incident_dto_1.CreateIncidentDto {
19
20
  }
20
21
  exports.IncidentDto = IncidentDto;
@@ -23,16 +24,6 @@ __decorate([
23
24
  (0, class_validator_1.IsNotEmpty)(),
24
25
  __metadata("design:type", Number)
25
26
  ], IncidentDto.prototype, "id", void 0);
26
- __decorate([
27
- (0, class_validator_1.IsDateString)(),
28
- (0, class_validator_1.IsNotEmpty)(),
29
- __metadata("design:type", String)
30
- ], IncidentDto.prototype, "createdAt", void 0);
31
- __decorate([
32
- (0, class_validator_1.IsDateString)(),
33
- (0, class_validator_1.IsNotEmpty)(),
34
- __metadata("design:type", String)
35
- ], IncidentDto.prototype, "updatedAt", void 0);
36
27
  __decorate([
37
28
  (0, class_validator_1.ValidateNested)(),
38
29
  (0, class_transformer_1.Type)(() => create_incident_category_dto_1.CreateIncidentCategoryDto),
@@ -46,7 +37,19 @@ __decorate([
46
37
  __metadata("design:type", create_incident_type_dto_1.CreateIncidentTypeDto)
47
38
  ], IncidentDto.prototype, "type", void 0);
48
39
  __decorate([
49
- (0, class_validator_1.IsArray)(),
50
40
  (0, class_validator_1.IsOptional)(),
41
+ (0, class_validator_1.IsArray)(),
42
+ (0, class_validator_1.ValidateNested)({ each: true }),
43
+ (0, class_transformer_1.Type)(() => incident_action_dto_1.IncidentActionDto),
51
44
  __metadata("design:type", Array)
52
45
  ], IncidentDto.prototype, "actions", void 0);
46
+ __decorate([
47
+ (0, class_validator_1.IsDateString)(),
48
+ (0, class_validator_1.IsNotEmpty)(),
49
+ __metadata("design:type", String)
50
+ ], IncidentDto.prototype, "createdAt", void 0);
51
+ __decorate([
52
+ (0, class_validator_1.IsDateString)(),
53
+ (0, class_validator_1.IsNotEmpty)(),
54
+ __metadata("design:type", String)
55
+ ], IncidentDto.prototype, "updatedAt", void 0);
@@ -1,4 +1,6 @@
1
1
  export * from './dtos/action/incident-action.dto';
2
+ export * from './dtos/action/create-incident-action.dto';
3
+ export * from './dtos/action/update-inident-action.dto';
2
4
  export * from './dtos/attachment/create-incident-attachment.dto';
3
5
  export * from './dtos/attachment/update-incident-attachment.dto';
4
6
  export * from './dtos/category/create-incident-category.dto';
@@ -16,6 +16,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  // Dtos
18
18
  __exportStar(require("./dtos/action/incident-action.dto"), exports);
19
+ __exportStar(require("./dtos/action/create-incident-action.dto"), exports);
20
+ __exportStar(require("./dtos/action/update-inident-action.dto"), exports);
19
21
  __exportStar(require("./dtos/attachment/create-incident-attachment.dto"), exports);
20
22
  __exportStar(require("./dtos/attachment/update-incident-attachment.dto"), exports);
21
23
  __exportStar(require("./dtos/category/create-incident-category.dto"), exports);
@@ -4,6 +4,4 @@ export interface IncidentAction {
4
4
  userId?: number;
5
5
  action: string;
6
6
  timestamp: string;
7
- createdAt?: string;
8
- updatedAt?: string;
9
7
  }
package/package.json CHANGED
@@ -1,43 +1,43 @@
1
- {
2
- "name": "grm-shared-library",
3
- "version": "1.0.150",
4
- "main": "dist/index.js",
5
- "types": "dist/index.d.ts",
6
- "files": [
7
- "dist/**/*"
8
- ],
9
- "scripts": {
10
- "build": "tsc",
11
- "test": "echo \"Error: no test specified\" && exit 1"
12
- },
13
- "keywords": [],
14
- "author": "",
15
- "license": "ISC",
16
- "description": "",
17
- "publishConfig": {
18
- "access": "public"
19
- },
20
- "devDependencies": {
21
- "@types/node": "^22.10.5",
22
- "typescript": "^5.7.3"
23
- },
24
- "dependencies": {
25
- "@nestjs/common": "^11.0.6",
26
- "@nestjs/core": "^11.0.6",
27
- "@nestjs/mapped-types": "^2.0.6",
28
- "@nestjs/microservices": "^11.0.6",
29
- "@sentry/node": "^8.52.0",
30
- "class-transformer": "^0.5.1",
31
- "class-validator": "^0.14.1",
32
- "rxjs": "^7.8.1"
33
- },
34
- "peerDependencies": {
35
- "@nestjs/common": "^11.0.0",
36
- "@nestjs/core": "^11.0.0",
37
- "@nestjs/microservices": "^11.0.0",
38
- "@sentry/node": "^8.0.0",
39
- "rxjs": "^7.8.0",
40
- "class-transformer": "^0.5.0",
41
- "class-validator": "^0.14.0"
42
- }
43
- }
1
+ {
2
+ "name": "grm-shared-library",
3
+ "version": "1.0.152",
4
+ "main": "dist/index.js",
5
+ "types": "dist/index.d.ts",
6
+ "files": [
7
+ "dist/**/*"
8
+ ],
9
+ "scripts": {
10
+ "build": "tsc",
11
+ "test": "echo \"Error: no test specified\" && exit 1"
12
+ },
13
+ "keywords": [],
14
+ "author": "",
15
+ "license": "ISC",
16
+ "description": "",
17
+ "publishConfig": {
18
+ "access": "public"
19
+ },
20
+ "devDependencies": {
21
+ "@types/node": "^22.10.5",
22
+ "typescript": "^5.7.3"
23
+ },
24
+ "dependencies": {
25
+ "@nestjs/common": "^11.0.6",
26
+ "@nestjs/core": "^11.0.6",
27
+ "@nestjs/mapped-types": "^2.0.6",
28
+ "@nestjs/microservices": "^11.0.6",
29
+ "@sentry/node": "^8.52.0",
30
+ "class-transformer": "^0.5.1",
31
+ "class-validator": "^0.14.1",
32
+ "rxjs": "^7.8.1"
33
+ },
34
+ "peerDependencies": {
35
+ "@nestjs/common": "^11.0.0",
36
+ "@nestjs/core": "^11.0.0",
37
+ "@nestjs/microservices": "^11.0.0",
38
+ "@sentry/node": "^8.0.0",
39
+ "rxjs": "^7.8.0",
40
+ "class-transformer": "^0.5.0",
41
+ "class-validator": "^0.14.0"
42
+ }
43
+ }
@@ -1,7 +0,0 @@
1
- export interface PasswordResetPayload {
2
- firstName: string;
3
- lastName: string;
4
- email: string;
5
- ipAddress: string;
6
- address: string;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +0,0 @@
1
- export interface UserCreatedPayload {
2
- id: number;
3
- firstName: string;
4
- lastName: string;
5
- email: string;
6
- phoneNumber: string;
7
- roles: string[];
8
- otp: string;
9
- otpExpiresAt: Date;
10
- verificationToken: string;
11
- createdAt: Date;
12
- attributes: Record<string, any>;
13
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +0,0 @@
1
- export interface UserRegisteredPayload {
2
- id: number;
3
- firstName: string;
4
- lastName: string;
5
- email: string;
6
- phoneNumber: string;
7
- createdAt: Date;
8
- attributes: Record<string, any>;
9
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,13 +0,0 @@
1
- export declare const KAFKA_TOPICS: {
2
- USER_REGISTERED: string;
3
- USER_LOGGED_IN: string;
4
- USER_LOGGED_OUT: string;
5
- USER_CREATED: string;
6
- USER_UPDATED: string;
7
- USER_DELETED: string;
8
- ORG_CREATED: string;
9
- ORG_UPDATED: string;
10
- ORG_DELETED: string;
11
- OTP_VALIDATED: string;
12
- OTP_REQUESTED: string;
13
- };
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KAFKA_TOPICS = void 0;
4
- exports.KAFKA_TOPICS = {
5
- // Auth
6
- USER_REGISTERED: 'user.registered',
7
- USER_LOGGED_IN: 'user.logged.in',
8
- USER_LOGGED_OUT: 'user.logged.out',
9
- // User
10
- USER_CREATED: 'user.created',
11
- USER_UPDATED: 'user.updated',
12
- USER_DELETED: 'user.deleted',
13
- // Org
14
- ORG_CREATED: 'org.created',
15
- ORG_UPDATED: 'org.updated',
16
- ORG_DELETED: 'org.deleted',
17
- // OTP
18
- OTP_VALIDATED: 'otp.validated',
19
- OTP_REQUESTED: 'otp.requested'
20
- };
@@ -1,13 +0,0 @@
1
- export declare const KAFKA_TOPICS: {
2
- USER_REGISTERED: string;
3
- USER_LOGGED_IN: string;
4
- USER_LOGGED_OUT: string;
5
- USER_CREATED: string;
6
- USER_UPDATED: string;
7
- USER_DELETED: string;
8
- ORG_CREATED: string;
9
- ORG_UPDATED: string;
10
- ORG_DELETED: string;
11
- OTP_VALIDATED: string;
12
- OTP_REQUESTED: string;
13
- };
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KAFKA_TOPICS = void 0;
4
- exports.KAFKA_TOPICS = {
5
- // Auth
6
- USER_REGISTERED: 'user.registered',
7
- USER_LOGGED_IN: 'user.logged.in',
8
- USER_LOGGED_OUT: 'user.logged.out',
9
- // User
10
- USER_CREATED: 'user.created',
11
- USER_UPDATED: 'user.updated',
12
- USER_DELETED: 'user.deleted',
13
- // Org
14
- ORG_CREATED: 'org.created',
15
- ORG_UPDATED: 'org.updated',
16
- ORG_DELETED: 'org.deleted',
17
- // OTP
18
- OTP_VALIDATED: 'otp.validated',
19
- OTP_REQUESTED: 'otp.requested'
20
- };
@@ -1,4 +0,0 @@
1
- export declare class SetPasswordDto {
2
- password: string;
3
- confirmPassword: string;
4
- }
@@ -1,33 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- 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
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.SetPasswordDto = void 0;
13
- const class_validator_1 = require("class-validator");
14
- const match_decorator_1 = require("../validators/match.decorator");
15
- const password_regex_const_1 = require("../../common/constants/password-regex.const");
16
- class SetPasswordDto {
17
- }
18
- exports.SetPasswordDto = SetPasswordDto;
19
- __decorate([
20
- (0, class_validator_1.IsString)(),
21
- (0, class_validator_1.IsNotEmpty)(),
22
- (0, class_validator_1.MinLength)(8),
23
- (0, class_validator_1.Matches)(password_regex_const_1.PASSWORD_REGEX, { message: password_regex_const_1.PASSWORD_ERROR_MESSAGE }),
24
- __metadata("design:type", String)
25
- ], SetPasswordDto.prototype, "password", void 0);
26
- __decorate([
27
- (0, class_validator_1.IsString)(),
28
- (0, class_validator_1.IsNotEmpty)(),
29
- (0, class_validator_1.MinLength)(8),
30
- (0, class_validator_1.Matches)(password_regex_const_1.PASSWORD_REGEX, { message: password_regex_const_1.PASSWORD_ERROR_MESSAGE }),
31
- (0, match_decorator_1.Match)('password', { message: 'Passwords do not match' }),
32
- __metadata("design:type", String)
33
- ], SetPasswordDto.prototype, "confirmPassword", void 0);
@@ -1,8 +0,0 @@
1
- export declare const SERVICE_NAMES: {
2
- API_GATEWAY: string;
3
- AUTH_SERVICE: string;
4
- ORGANIZATION_SERVICE: string;
5
- EMAIL_SERVICE: string;
6
- INCIDENT_SERVICE: string;
7
- NOTIFICATION_SERVICE: string;
8
- };
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SERVICE_NAMES = void 0;
4
- exports.SERVICE_NAMES = {
5
- API_GATEWAY: 'api-gateway',
6
- AUTH_SERVICE: 'auth-service',
7
- ORGANIZATION_SERVICE: 'organization-service',
8
- EMAIL_SERVICE: 'email-service',
9
- INCIDENT_SERVICE: 'incident-service',
10
- NOTIFICATION_SERVICE: 'notification-service',
11
- };
@@ -1,6 +0,0 @@
1
- export declare class ContactPersonDto {
2
- name: string;
3
- phoneNumber: string;
4
- email: string;
5
- designation: string;
6
- }
@@ -1,17 +0,0 @@
1
- import { MapAddressDto } from "../../common";
2
- import { Organization } from "./organization";
3
- export interface Partner {
4
- id?: number;
5
- name: string;
6
- phoneNumber?: string;
7
- email?: string;
8
- physicalAddress: MapAddressDto;
9
- website: string;
10
- type: string;
11
- description?: string;
12
- status: string;
13
- logo?: string;
14
- organization: Organization;
15
- createdAt?: Date;
16
- updatedAt?: Date;
17
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,16 +0,0 @@
1
- import { MapAddressDto } from "../../common/dtos/map-address.dto";
2
- import { ContactPersonDto } from "../../common/dtos/contact-person.dto";
3
- export declare class CreatePartnerDto {
4
- organizationId: number;
5
- name: string;
6
- phoneNumber?: string;
7
- email?: string;
8
- physicalAddress: MapAddressDto;
9
- website: string;
10
- type: string;
11
- description?: string;
12
- status: string;
13
- logo?: string;
14
- contactPerson: ContactPersonDto;
15
- controlCentreIds?: number[];
16
- }