grm-shared-library 1.0.153 → 1.0.155

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 (120) hide show
  1. package/dist/kafka/client-ids.d.ts +2 -0
  2. package/dist/kafka/client-ids.js +3 -1
  3. package/dist/kafka/interfaces/otp-payload.d.ts +6 -4
  4. package/dist/kafka/interfaces/password-reset-payload.d.ts +7 -0
  5. package/dist/kafka/interfaces/password-reset-payload.js +2 -0
  6. package/dist/kafka/interfaces/user-created-payload.d.ts +13 -0
  7. package/dist/kafka/interfaces/user-created-payload.js +2 -0
  8. package/dist/kafka/interfaces/user-registered-payload.d.ts +9 -0
  9. package/dist/kafka/interfaces/user-registered-payload.js +2 -0
  10. package/dist/kafka/topics/index.d.ts +13 -0
  11. package/dist/kafka/topics/index.js +20 -0
  12. package/dist/kafka/topics/topics.d.ts +13 -0
  13. package/dist/kafka/topics/topics.js +20 -0
  14. package/dist/modules/auth/dtos/set-password.dto.d.ts +4 -0
  15. package/dist/modules/auth/dtos/set-password.dto.js +33 -0
  16. package/dist/modules/common/constants/service.const.d.ts +16 -0
  17. package/dist/modules/common/constants/service.const.js +4 -0
  18. package/dist/modules/common/constants/service_names.const.d.ts +8 -0
  19. package/dist/modules/common/constants/service_names.const.js +11 -0
  20. package/dist/modules/incident/dtos/action/create-incident-action.dto.d.ts +1 -0
  21. package/dist/modules/incident/dtos/action/create-incident-action.dto.js +5 -0
  22. package/dist/modules/incident/dtos/assignment/create-incident-assignment.dto.d.ts +8 -0
  23. package/dist/modules/incident/dtos/assignment/create-incident-assignment.dto.js +47 -0
  24. package/dist/modules/incident/dtos/assignment/incident-assignment.dto.d.ts +7 -0
  25. package/dist/modules/incident/dtos/assignment/incident-assignment.dto.js +28 -0
  26. package/dist/modules/incident/dtos/assignment/update-incident-assignment.dto.d.ts +5 -0
  27. package/dist/modules/incident/dtos/assignment/update-incident-assignment.dto.js +8 -0
  28. package/dist/modules/incident/dtos/incident/incident.dto.d.ts +2 -0
  29. package/dist/modules/incident/dtos/incident/incident.dto.js +9 -1
  30. package/dist/modules/incident/index.d.ts +4 -0
  31. package/dist/modules/incident/index.js +4 -0
  32. package/dist/modules/incident/intefaces/incident-action.d.ts +1 -0
  33. package/dist/modules/incident/intefaces/incident-assignment.d.ts +9 -0
  34. package/dist/modules/incident/intefaces/incident-assignment.js +2 -0
  35. package/dist/modules/incident/intefaces/incident.d.ts +2 -0
  36. package/dist/modules/organization/dtos/contact-person.dto.d.ts +6 -0
  37. package/dist/modules/organization/dtos/contact-person.dto.js +38 -0
  38. package/dist/modules/organization/interfaces/partner.d.ts +17 -0
  39. package/dist/modules/organization/interfaces/partner.js +2 -0
  40. package/dist/modules/partner/dtos/create-partner.dto.d.ts +16 -0
  41. package/dist/modules/partner/dtos/create-partner.dto.js +85 -0
  42. package/dist/modules/partner/dtos/update-partner.dto.d.ts +5 -0
  43. package/dist/modules/partner/dtos/update-partner.dto.js +8 -0
  44. package/dist/modules/partner/enums/partner-status.enum.d.ts +7 -0
  45. package/dist/modules/partner/enums/partner-status.enum.js +11 -0
  46. package/dist/modules/partner/index.d.ts +4 -0
  47. package/dist/modules/partner/index.js +20 -0
  48. package/dist/modules/partner/interfaces/partner.d.ts +20 -0
  49. package/dist/modules/partner/interfaces/partner.js +2 -0
  50. package/dist/modules/response-unit/enums/ambulance-vehicle-type.enum.d.ts +8 -0
  51. package/dist/modules/response-unit/enums/ambulance-vehicle-type.enum.js +12 -0
  52. package/dist/modules/response-unit/enums/fire-vehicle-type.enum.d.ts +8 -0
  53. package/dist/modules/response-unit/enums/fire-vehicle-type.enum.js +12 -0
  54. package/dist/modules/response-unit/enums/person-unit-category.enum.d.ts +10 -0
  55. package/dist/modules/response-unit/enums/person-unit-category.enum.js +14 -0
  56. package/dist/modules/response-unit/enums/person-unit-status.enum.d.ts +7 -0
  57. package/dist/modules/response-unit/enums/person-unit-status.enum.js +11 -0
  58. package/dist/modules/response-unit/enums/response-unit-type.enum.d.ts +5 -0
  59. package/dist/modules/response-unit/enums/response-unit-type.enum.js +9 -0
  60. package/dist/modules/response-unit/enums/road-rescue-vehicle-type.enum.d.ts +6 -0
  61. package/dist/modules/response-unit/enums/road-rescue-vehicle-type.enum.js +10 -0
  62. package/dist/modules/response-unit/enums/security-vehicle-type.enum.d.ts +7 -0
  63. package/dist/modules/response-unit/enums/security-vehicle-type.enum.js +11 -0
  64. package/dist/modules/response-unit/enums/vehicle-unit-ownership.enum.d.ts +7 -0
  65. package/dist/modules/response-unit/enums/vehicle-unit-ownership.enum.js +11 -0
  66. package/dist/modules/response-unit/enums/vehicle-unit-status.enum.d.ts +5 -0
  67. package/dist/modules/response-unit/enums/vehicle-unit-status.enum.js +9 -0
  68. package/dist/modules/response-unit/enums/vehicle-unit-type.enum.d.ts +6 -0
  69. package/dist/modules/response-unit/enums/vehicle-unit-type.enum.js +10 -0
  70. package/dist/modules/response-unit/interfaces/ambulance-vehicle.d.ts +5 -0
  71. package/dist/modules/response-unit/interfaces/ambulance-vehicle.js +2 -0
  72. package/dist/modules/response-unit/interfaces/fire-vehicle.d.ts +5 -0
  73. package/dist/modules/response-unit/interfaces/fire-vehicle.js +2 -0
  74. package/dist/modules/response-unit/interfaces/person-unit.d.ts +11 -0
  75. package/dist/modules/response-unit/interfaces/person-unit.js +2 -0
  76. package/dist/modules/response-unit/interfaces/response-unit.d.ts +16 -0
  77. package/dist/modules/response-unit/interfaces/response-unit.js +2 -0
  78. package/dist/modules/response-unit/interfaces/road-rescue-vehicle.d.ts +5 -0
  79. package/dist/modules/response-unit/interfaces/road-rescue-vehicle.js +2 -0
  80. package/dist/modules/response-unit/interfaces/security-vehicle.d.ts +5 -0
  81. package/dist/modules/response-unit/interfaces/security-vehicle.js +2 -0
  82. package/dist/modules/response-unit/interfaces/team-unit.d.ts +7 -0
  83. package/dist/modules/response-unit/interfaces/team-unit.js +2 -0
  84. package/dist/modules/response-unit/interfaces/vehicle-unit-crew.d.ts +8 -0
  85. package/dist/modules/response-unit/interfaces/vehicle-unit-crew.js +2 -0
  86. package/dist/modules/response-unit/interfaces/vehicle-unit-device.d.ts +15 -0
  87. package/dist/modules/response-unit/interfaces/vehicle-unit-device.js +2 -0
  88. package/dist/modules/response-unit/interfaces/vehicle-unit.d.ts +22 -0
  89. package/dist/modules/response-unit/interfaces/vehicle-unit.js +2 -0
  90. package/dist/modules/role/data/permissions.data.d.ts +2 -0
  91. package/dist/modules/role/data/permissions.data.js +52 -0
  92. package/dist/modules/role/dtos/create-permission.dto.d.ts +4 -0
  93. package/dist/modules/role/dtos/create-permission.dto.js +27 -0
  94. package/dist/modules/role/dtos/update-permission.dto.d.ts +5 -0
  95. package/dist/modules/role/dtos/update-permission.dto.js +8 -0
  96. package/dist/modules/role/dtos/update-role.dto.d.ts +5 -0
  97. package/dist/modules/role/dtos/update-role.dto.js +8 -0
  98. package/dist/modules/role/enums/permission-actions.enum.d.ts +22 -0
  99. package/dist/modules/role/enums/permission-actions.enum.js +31 -0
  100. package/dist/modules/role/enums/permissions-moudule.enum.d.ts +7 -0
  101. package/dist/modules/role/enums/permissions-moudule.enum.js +11 -0
  102. package/dist/modules/role/interfaces/permission.d.ts +4 -0
  103. package/dist/modules/role/interfaces/permission.js +2 -0
  104. package/dist/modules/role/permission/data/permissions.data.d.ts +2 -0
  105. package/dist/modules/role/permission/data/permissions.data.js +52 -0
  106. package/dist/modules/role/permission/dtos/create-permission.dto.d.ts +4 -0
  107. package/dist/modules/role/permission/dtos/create-permission.dto.js +27 -0
  108. package/dist/modules/role/permission/dtos/update-permission.dto.d.ts +5 -0
  109. package/dist/modules/role/permission/dtos/update-permission.dto.js +8 -0
  110. package/dist/modules/role/permission/enums/permission-actions.enum.d.ts +22 -0
  111. package/dist/modules/role/permission/enums/permission-actions.enum.js +31 -0
  112. package/dist/modules/role/permission/enums/permissions-moudule.enum.d.ts +7 -0
  113. package/dist/modules/role/permission/enums/permissions-moudule.enum.js +11 -0
  114. package/dist/modules/role/permission/interfaces/permission.d.ts +5 -0
  115. package/dist/modules/role/permission/interfaces/permission.js +2 -0
  116. package/dist/modules/user/dtos/user-response.dto.d.ts +18 -0
  117. package/dist/modules/user/dtos/user-response.dto.js +76 -0
  118. package/dist/modules/user/enums/user-role.enum.d.ts +4 -0
  119. package/dist/modules/user/enums/user-role.enum.js +8 -0
  120. package/package.json +1 -1
@@ -3,4 +3,6 @@ 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;
6
8
  };
@@ -5,5 +5,7 @@ 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'
8
+ EMAIL_SERVICE: 'email-service',
9
+ INCIDENT_SERVICE: 'incident-service',
10
+ NOTIFICATION_SERVICE: 'notification-service',
9
11
  };
@@ -1,9 +1,11 @@
1
1
  export interface OTPPayload {
2
- userId: number;
3
- token: string;
4
- otp: string;
5
- otpExpiresAt: Date;
2
+ firstName: string;
3
+ lastName: string;
6
4
  email: string;
7
5
  phoneNumber: string;
6
+ verificationToken: string;
7
+ verificationTokenExpiresAt: Date;
8
+ otp: string;
9
+ otpExpiresAt: Date;
8
10
  attributes: Record<string, any>;
9
11
  }
@@ -0,0 +1,7 @@
1
+ export interface PasswordResetPayload {
2
+ firstName: string;
3
+ lastName: string;
4
+ email: string;
5
+ ipAddress: string;
6
+ address: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,13 @@
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
+ };
@@ -0,0 +1,20 @@
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
+ };
@@ -0,0 +1,13 @@
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
+ };
@@ -0,0 +1,20 @@
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
+ };
@@ -0,0 +1,4 @@
1
+ export declare class SetPasswordDto {
2
+ password: string;
3
+ confirmPassword: string;
4
+ }
@@ -0,0 +1,33 @@
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);
@@ -23,4 +23,20 @@ export declare const SERVICE_CONSTS: {
23
23
  name: string;
24
24
  port: number;
25
25
  };
26
+ WORKFLOW_MANAGER_SERVICE: {
27
+ name: string;
28
+ port: number;
29
+ };
30
+ DMS_SERVICE: {
31
+ name: string;
32
+ port: number;
33
+ };
34
+ GIS_SERVICE: {
35
+ name: string;
36
+ port: number;
37
+ };
38
+ REPORTS_SERVICE: {
39
+ name: string;
40
+ port: number;
41
+ };
26
42
  };
@@ -8,4 +8,8 @@ exports.SERVICE_CONSTS = {
8
8
  EMAIL_SERVICE: { name: 'email-service', port: 3003 },
9
9
  INCIDENT_SERVICE: { name: 'incident-service', port: 3004 },
10
10
  NOTIFICATION_SERVICE: { name: 'notification-service', port: 3005 },
11
+ WORKFLOW_MANAGER_SERVICE: { name: 'workflow-manager-service', port: 3006 },
12
+ DMS_SERVICE: { name: 'dms-service', port: 3007 },
13
+ GIS_SERVICE: { name: 'gis-service', port: 3008 },
14
+ REPORTS_SERVICE: { name: 'reports-service', port: 3009 }
11
15
  };
@@ -0,0 +1,8 @@
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
+ };
@@ -0,0 +1,11 @@
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
+ };
@@ -2,5 +2,6 @@ export declare class CreateIncidentActionDto {
2
2
  incidentId: number;
3
3
  userId?: number;
4
4
  action: string;
5
+ comments?: string;
5
6
  timestamp: Date;
6
7
  }
@@ -29,6 +29,11 @@ __decorate([
29
29
  (0, class_validator_1.IsNotEmpty)(),
30
30
  __metadata("design:type", String)
31
31
  ], CreateIncidentActionDto.prototype, "action", void 0);
32
+ __decorate([
33
+ (0, class_validator_1.IsString)(),
34
+ (0, class_validator_1.IsOptional)(),
35
+ __metadata("design:type", String)
36
+ ], CreateIncidentActionDto.prototype, "comments", void 0);
32
37
  __decorate([
33
38
  (0, class_validator_1.IsDate)(),
34
39
  (0, class_validator_1.IsNotEmpty)(),
@@ -0,0 +1,8 @@
1
+ export declare class CreateIncidentAssignmentDto {
2
+ incidentId: number;
3
+ comments?: string;
4
+ assignerId: number;
5
+ assigneeId?: number;
6
+ assigneeControlCentreId: number;
7
+ timestamp: Date;
8
+ }
@@ -0,0 +1,47 @@
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.CreateIncidentAssignmentDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ class CreateIncidentAssignmentDto {
15
+ }
16
+ exports.CreateIncidentAssignmentDto = CreateIncidentAssignmentDto;
17
+ __decorate([
18
+ (0, class_validator_1.IsNumber)(),
19
+ (0, class_validator_1.IsNotEmpty)(),
20
+ __metadata("design:type", Number)
21
+ ], CreateIncidentAssignmentDto.prototype, "incidentId", void 0);
22
+ __decorate([
23
+ (0, class_validator_1.IsString)(),
24
+ (0, class_validator_1.IsOptional)(),
25
+ (0, class_validator_1.MaxLength)(2000),
26
+ __metadata("design:type", String)
27
+ ], CreateIncidentAssignmentDto.prototype, "comments", void 0);
28
+ __decorate([
29
+ (0, class_validator_1.IsNumber)(),
30
+ (0, class_validator_1.IsNotEmpty)(),
31
+ __metadata("design:type", Number)
32
+ ], CreateIncidentAssignmentDto.prototype, "assignerId", void 0);
33
+ __decorate([
34
+ (0, class_validator_1.IsNumber)(),
35
+ (0, class_validator_1.IsOptional)(),
36
+ __metadata("design:type", Number)
37
+ ], CreateIncidentAssignmentDto.prototype, "assigneeId", void 0);
38
+ __decorate([
39
+ (0, class_validator_1.IsNumber)(),
40
+ (0, class_validator_1.IsNotEmpty)(),
41
+ __metadata("design:type", Number)
42
+ ], CreateIncidentAssignmentDto.prototype, "assigneeControlCentreId", void 0);
43
+ __decorate([
44
+ (0, class_validator_1.IsDate)(),
45
+ (0, class_validator_1.IsNotEmpty)(),
46
+ __metadata("design:type", Date)
47
+ ], CreateIncidentAssignmentDto.prototype, "timestamp", void 0);
@@ -0,0 +1,7 @@
1
+ import { CreateIncidentActionDto } from "../action/create-incident-action.dto";
2
+ declare const IncidentAssignmentDto_base: import("@nestjs/mapped-types").MappedType<Omit<CreateIncidentActionDto, "timestamp">>;
3
+ export declare class IncidentAssignmentDto extends IncidentAssignmentDto_base {
4
+ id: number;
5
+ timestamp: string;
6
+ }
7
+ export {};
@@ -0,0 +1,28 @@
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.IncidentAssignmentDto = void 0;
13
+ const mapped_types_1 = require("@nestjs/mapped-types");
14
+ const create_incident_action_dto_1 = require("../action/create-incident-action.dto");
15
+ const class_validator_1 = require("class-validator");
16
+ class IncidentAssignmentDto extends (0, mapped_types_1.OmitType)(create_incident_action_dto_1.CreateIncidentActionDto, ['timestamp']) {
17
+ }
18
+ exports.IncidentAssignmentDto = IncidentAssignmentDto;
19
+ __decorate([
20
+ (0, class_validator_1.IsNumber)(),
21
+ (0, class_validator_1.IsNotEmpty)(),
22
+ __metadata("design:type", Number)
23
+ ], IncidentAssignmentDto.prototype, "id", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsDateString)(),
26
+ (0, class_validator_1.IsNotEmpty)(),
27
+ __metadata("design:type", String)
28
+ ], IncidentAssignmentDto.prototype, "timestamp", void 0);
@@ -0,0 +1,5 @@
1
+ import { CreateIncidentAssignmentDto } from "./create-incident-assignment.dto";
2
+ declare const UpdateIncidentAssignmentDto_base: import("@nestjs/mapped-types").MappedType<Partial<CreateIncidentAssignmentDto>>;
3
+ export declare class UpdateIncidentAssignmentDto extends UpdateIncidentAssignmentDto_base {
4
+ }
5
+ export {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateIncidentAssignmentDto = void 0;
4
+ const mapped_types_1 = require("@nestjs/mapped-types");
5
+ const create_incident_assignment_dto_1 = require("./create-incident-assignment.dto");
6
+ class UpdateIncidentAssignmentDto extends (0, mapped_types_1.PartialType)(create_incident_assignment_dto_1.CreateIncidentAssignmentDto) {
7
+ }
8
+ exports.UpdateIncidentAssignmentDto = UpdateIncidentAssignmentDto;
@@ -2,11 +2,13 @@ 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
4
  import { IncidentActionDto } from "../action/incident-action.dto";
5
+ import { IncidentAssignmentDto } from "../assignment/incident-assignment.dto";
5
6
  export declare class IncidentDto extends CreateIncidentDto {
6
7
  id: number;
7
8
  category?: CreateIncidentCategoryDto;
8
9
  type?: CreateIncidentTypeDto;
9
10
  actions?: IncidentActionDto[];
11
+ assignments?: IncidentAssignmentDto[];
10
12
  createdAt: string;
11
13
  updatedAt: string;
12
14
  }
@@ -16,6 +16,7 @@ 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
18
  const incident_action_dto_1 = require("../action/incident-action.dto");
19
+ const incident_assignment_dto_1 = require("../assignment/incident-assignment.dto");
19
20
  class IncidentDto extends create_incident_dto_1.CreateIncidentDto {
20
21
  }
21
22
  exports.IncidentDto = IncidentDto;
@@ -37,12 +38,19 @@ __decorate([
37
38
  __metadata("design:type", create_incident_type_dto_1.CreateIncidentTypeDto)
38
39
  ], IncidentDto.prototype, "type", void 0);
39
40
  __decorate([
40
- (0, class_validator_1.IsOptional)(),
41
41
  (0, class_validator_1.IsArray)(),
42
+ (0, class_validator_1.IsOptional)(),
42
43
  (0, class_validator_1.ValidateNested)({ each: true }),
43
44
  (0, class_transformer_1.Type)(() => incident_action_dto_1.IncidentActionDto),
44
45
  __metadata("design:type", Array)
45
46
  ], IncidentDto.prototype, "actions", void 0);
47
+ __decorate([
48
+ (0, class_validator_1.IsArray)(),
49
+ (0, class_validator_1.IsOptional)(),
50
+ (0, class_validator_1.ValidateNested)({ each: true }),
51
+ (0, class_transformer_1.Type)(() => incident_assignment_dto_1.IncidentAssignmentDto),
52
+ __metadata("design:type", Array)
53
+ ], IncidentDto.prototype, "assignments", void 0);
46
54
  __decorate([
47
55
  (0, class_validator_1.IsDateString)(),
48
56
  (0, class_validator_1.IsNotEmpty)(),
@@ -11,6 +11,9 @@ export * from './dtos/incident/update-incident.dto';
11
11
  export * from './dtos/reporter/incident-reporter.dto';
12
12
  export * from './dtos/type/create-incident-type.dto';
13
13
  export * from './dtos/type/update-incident-type.dto';
14
+ export * from './dtos/assignment/incident-assignment.dto';
15
+ export * from './dtos/assignment/create-incident-assignment.dto';
16
+ export * from './dtos/assignment/update-incident-assignment.dto';
14
17
  export * from './enums/incident-app-id.enum';
15
18
  export * from './enums/incident-channel.enum';
16
19
  export * from './enums/incident-class.enum';
@@ -22,3 +25,4 @@ export * from './intefaces/incident-attachment';
22
25
  export * from './intefaces/incident-category';
23
26
  export * from './intefaces/incident-reporter';
24
27
  export * from './intefaces/incident-type';
28
+ export * from './intefaces/incident-assignment';
@@ -28,6 +28,9 @@ __exportStar(require("./dtos/incident/update-incident.dto"), exports);
28
28
  __exportStar(require("./dtos/reporter/incident-reporter.dto"), exports);
29
29
  __exportStar(require("./dtos/type/create-incident-type.dto"), exports);
30
30
  __exportStar(require("./dtos/type/update-incident-type.dto"), exports);
31
+ __exportStar(require("./dtos/assignment/incident-assignment.dto"), exports);
32
+ __exportStar(require("./dtos/assignment/create-incident-assignment.dto"), exports);
33
+ __exportStar(require("./dtos/assignment/update-incident-assignment.dto"), exports);
31
34
  //enums
32
35
  __exportStar(require("./enums/incident-app-id.enum"), exports);
33
36
  __exportStar(require("./enums/incident-channel.enum"), exports);
@@ -41,3 +44,4 @@ __exportStar(require("./intefaces/incident-attachment"), exports);
41
44
  __exportStar(require("./intefaces/incident-category"), exports);
42
45
  __exportStar(require("./intefaces/incident-reporter"), exports);
43
46
  __exportStar(require("./intefaces/incident-type"), exports);
47
+ __exportStar(require("./intefaces/incident-assignment"), exports);
@@ -3,5 +3,6 @@ export interface IncidentAction {
3
3
  incidentId: number;
4
4
  userId?: number;
5
5
  action: string;
6
+ comments?: string;
6
7
  timestamp: string;
7
8
  }
@@ -0,0 +1,9 @@
1
+ export interface IncidentAssignment {
2
+ id?: number;
3
+ incidentId: number;
4
+ comments?: string;
5
+ assignerId: number;
6
+ assigneeId?: number;
7
+ assigneeControlCentreId: number;
8
+ timestamp: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -5,6 +5,7 @@ import { IncidentClass } from "../enums/incident-class.enum";
5
5
  import { IncidentPriority } from "../enums/incident-priority.enum";
6
6
  import { IncidentStatus } from "../enums/incident-status.enum";
7
7
  import { IncidentAction } from "./incident-action";
8
+ import { IncidentAssignment } from "./incident-assignment";
8
9
  import { IncidentCategory } from "./incident-category";
9
10
  import { IncidentReporter } from "./incident-reporter";
10
11
  import { IncidentType } from "./incident-type";
@@ -29,4 +30,5 @@ export interface Incident {
29
30
  category?: IncidentCategory;
30
31
  type?: IncidentType;
31
32
  actions?: IncidentAction[];
33
+ assignments?: IncidentAssignment[];
32
34
  }
@@ -0,0 +1,6 @@
1
+ export declare class ContactPersonDto {
2
+ name: string;
3
+ phoneNumber: string;
4
+ email: string;
5
+ designation: string;
6
+ }
@@ -0,0 +1,38 @@
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.ContactPersonDto = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ const case_decorators_1 = require("../../../decorators/case-decorators");
15
+ class ContactPersonDto {
16
+ }
17
+ exports.ContactPersonDto = ContactPersonDto;
18
+ __decorate([
19
+ (0, class_validator_1.IsString)(),
20
+ (0, case_decorators_1.SentenceCase)(),
21
+ (0, class_validator_1.IsNotEmpty)(),
22
+ __metadata("design:type", String)
23
+ ], ContactPersonDto.prototype, "name", void 0);
24
+ __decorate([
25
+ (0, class_validator_1.IsPhoneNumber)(),
26
+ (0, class_validator_1.IsNotEmpty)(),
27
+ __metadata("design:type", String)
28
+ ], ContactPersonDto.prototype, "phoneNumber", void 0);
29
+ __decorate([
30
+ (0, class_validator_1.IsEmail)(),
31
+ (0, class_validator_1.IsNotEmpty)(),
32
+ __metadata("design:type", String)
33
+ ], ContactPersonDto.prototype, "email", void 0);
34
+ __decorate([
35
+ (0, class_validator_1.IsString)(),
36
+ (0, class_validator_1.IsNotEmpty)(),
37
+ __metadata("design:type", String)
38
+ ], ContactPersonDto.prototype, "designation", void 0);
@@ -0,0 +1,17 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,16 @@
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
+ }