@platform-modules/foreign-ministry 1.3.238 → 1.3.239

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 (34) hide show
  1. package/.env +5 -10
  2. package/dist/models/EmbassyMasterModel.d.ts +16 -0
  3. package/dist/models/EmbassyMasterModel.js +75 -0
  4. package/dist/models/ResignationTerminationApprovalModel.d.ts +1 -0
  5. package/dist/models/ResignationTerminationApprovalModel.js +4 -0
  6. package/dist/models/UserDependentsModel.d.ts +18 -0
  7. package/dist/models/UserDependentsModel.js +94 -0
  8. package/package.json +1 -1
  9. package/src/data-source.ts +510 -510
  10. package/src/index.ts +382 -382
  11. package/src/models/DiplomaticAcademyRequestModel.ts +80 -80
  12. package/src/models/FinancialWorkFlowModel.ts +15 -15
  13. package/src/models/GatePassVisitorsModel.ts +7 -7
  14. package/src/models/LMSExternalEntityTrainedPersonModel.ts +45 -45
  15. package/src/models/LanguageCourseRequestModel.ts +67 -67
  16. package/src/models/LeaveConfigModel.ts +71 -71
  17. package/src/models/MissionTravelApprovalModel.ts +101 -101
  18. package/src/models/MissionTravelAttachmentModel.ts +56 -56
  19. package/src/models/MissionTravelChatModel.ts +52 -52
  20. package/src/models/MissionTravelPersonModel.ts +105 -105
  21. package/src/models/MissionTravelWorkflowModel.ts +54 -54
  22. package/src/models/PollOptionsModel.ts +26 -26
  23. package/src/models/PollVotesModel.ts +37 -37
  24. package/src/models/PollsModel.ts +49 -49
  25. package/src/models/ProjectMilestonePhasesModel.ts +50 -50
  26. package/src/models/ProjectModel.ts +75 -75
  27. package/src/models/ResignationTerminationApprovalModel.ts +9 -6
  28. package/src/models/SectionModel.ts +35 -35
  29. package/src/models/ServicesNotificationConfigsModel.ts +55 -55
  30. package/src/models/TelephoneDirectoryModel.ts +20 -20
  31. package/dist/models/MissionTravelClassConfigModel.d.ts +0 -10
  32. package/dist/models/MissionTravelClassConfigModel.js +0 -50
  33. package/dist/models/MissionTravelPerdiemModel.d.ts +0 -10
  34. package/dist/models/MissionTravelPerdiemModel.js +0 -54
@@ -1,80 +1,80 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum DiplomaticAcademyStatus {
5
- SUBMITTED = "Submitted",
6
- PENDING = "Pending",
7
- ASSIGNED = "Assigned",
8
- IN_PROGRESS = "In Progress",
9
- APPROVED = "Approved",
10
- REJECTED = "Rejected"
11
- }
12
-
13
- @Entity({ name: 'diplomatic_academy_requests' })
14
- export class DiplomaticAcademyRequests extends BaseModel {
15
-
16
- // Common columns
17
- @Column({ type: 'int', nullable: true })
18
- req_user_department_id: number | null;
19
-
20
- @Column({ type: 'int', nullable: true })
21
- req_user_section_id: number | null;
22
-
23
- @Column({ type: 'int', nullable: true })
24
- service_id: number | null;
25
-
26
- @Column({ type: 'int', nullable: true })
27
- sub_service_id: number | null;
28
-
29
- @Column({ type: 'int', nullable: false })
30
- user_id: number;
31
-
32
- // Diplomatic Academy specific columns
33
- @Column({ type: 'varchar', length: 500, nullable: false })
34
- course_name: string;
35
-
36
- @Column({ type: 'jsonb', nullable: true })
37
- cost_details: {
38
- material_price?: number;
39
- transportation?: number;
40
- accommodation?: number;
41
- allowances?: number;
42
- food?: number;
43
- present?: number;
44
- } | null;
45
-
46
- @Column({ type: 'int', nullable: false })
47
- estimated_participants: number;
48
-
49
- @Column({ type: 'date', nullable: false })
50
- timeline_date_from: Date;
51
-
52
- @Column({ type: 'date', nullable: false })
53
- timeline_date_to: Date;
54
-
55
- @Column({ type: 'time', nullable: true })
56
- timeline_time_from: string | null;
57
-
58
- @Column({ type: 'time', nullable: true })
59
- timeline_time_to: string | null;
60
-
61
- @Column({ type: 'jsonb', nullable: false })
62
- participants_details: Array<{
63
- full_name: string;
64
- passport: string;
65
- age: number;
66
- qualifications: string;
67
- experience: string;
68
- institution: string;
69
- }>;
70
-
71
- @Column({ type: 'enum', enum: DiplomaticAcademyStatus, default: DiplomaticAcademyStatus.PENDING, nullable: false })
72
- status: DiplomaticAcademyStatus;
73
-
74
- @Column({ type: 'int', nullable: true })
75
- course_id: number | null;
76
-
77
- @Column({ type: 'varchar', nullable: true })
78
- workflow_execution_id: string | null;
79
-
80
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum DiplomaticAcademyStatus {
5
+ SUBMITTED = "Submitted",
6
+ PENDING = "Pending",
7
+ ASSIGNED = "Assigned",
8
+ IN_PROGRESS = "In Progress",
9
+ APPROVED = "Approved",
10
+ REJECTED = "Rejected"
11
+ }
12
+
13
+ @Entity({ name: 'diplomatic_academy_requests' })
14
+ export class DiplomaticAcademyRequests extends BaseModel {
15
+
16
+ // Common columns
17
+ @Column({ type: 'int', nullable: true })
18
+ req_user_department_id: number | null;
19
+
20
+ @Column({ type: 'int', nullable: true })
21
+ req_user_section_id: number | null;
22
+
23
+ @Column({ type: 'int', nullable: true })
24
+ service_id: number | null;
25
+
26
+ @Column({ type: 'int', nullable: true })
27
+ sub_service_id: number | null;
28
+
29
+ @Column({ type: 'int', nullable: false })
30
+ user_id: number;
31
+
32
+ // Diplomatic Academy specific columns
33
+ @Column({ type: 'varchar', length: 500, nullable: false })
34
+ course_name: string;
35
+
36
+ @Column({ type: 'jsonb', nullable: true })
37
+ cost_details: {
38
+ material_price?: number;
39
+ transportation?: number;
40
+ accommodation?: number;
41
+ allowances?: number;
42
+ food?: number;
43
+ present?: number;
44
+ } | null;
45
+
46
+ @Column({ type: 'int', nullable: false })
47
+ estimated_participants: number;
48
+
49
+ @Column({ type: 'date', nullable: false })
50
+ timeline_date_from: Date;
51
+
52
+ @Column({ type: 'date', nullable: false })
53
+ timeline_date_to: Date;
54
+
55
+ @Column({ type: 'time', nullable: true })
56
+ timeline_time_from: string | null;
57
+
58
+ @Column({ type: 'time', nullable: true })
59
+ timeline_time_to: string | null;
60
+
61
+ @Column({ type: 'jsonb', nullable: false })
62
+ participants_details: Array<{
63
+ full_name: string;
64
+ passport: string;
65
+ age: number;
66
+ qualifications: string;
67
+ experience: string;
68
+ institution: string;
69
+ }>;
70
+
71
+ @Column({ type: 'enum', enum: DiplomaticAcademyStatus, default: DiplomaticAcademyStatus.PENDING, nullable: false })
72
+ status: DiplomaticAcademyStatus;
73
+
74
+ @Column({ type: 'int', nullable: true })
75
+ course_id: number | null;
76
+
77
+ @Column({ type: 'varchar', nullable: true })
78
+ workflow_execution_id: string | null;
79
+
80
+ }
@@ -33,15 +33,15 @@ export class FinancialWorkFlow extends BaseModel {
33
33
  @Column({ type: 'int', nullable: true })
34
34
  approved_by_role_id: number;
35
35
 
36
- @Column({ type: 'int', nullable: true })
37
- step_order: number;
38
-
39
- @Column({ type: 'varchar', length: 50, nullable: true })
40
- action: string | null;
41
-
42
- @ManyToOne(() => FinancialRequests, fr => fr.workflows)
43
- @JoinColumn({ name: 'financial_request_id' })
44
- financialRequest?: FinancialRequests;
36
+ @Column({ type: 'int', nullable: true })
37
+ step_order: number;
38
+
39
+ @Column({ type: 'varchar', length: 50, nullable: true })
40
+ action: string | null;
41
+
42
+ @ManyToOne(() => FinancialRequests, fr => fr.workflows)
43
+ @JoinColumn({ name: 'financial_request_id' })
44
+ financialRequest?: FinancialRequests;
45
45
 
46
46
  constructor(
47
47
  financial_request_id: number,
@@ -55,10 +55,10 @@ export class FinancialWorkFlow extends BaseModel {
55
55
  this.status = status;
56
56
  this.approved_by_user_id = approved_by_user_id;
57
57
  this.content = content;
58
- this.financial_approval_id = 0;
59
- this.activity_date = new Date();
60
- this.step_order = step_order;
61
- this.action = null;
62
- }
63
- }
58
+ this.financial_approval_id = 0;
59
+ this.activity_date = new Date();
60
+ this.step_order = step_order;
61
+ this.action = null;
62
+ }
63
+ }
64
64
 
@@ -85,10 +85,10 @@ export class GatePassVisitors extends BaseModel {
85
85
  @Column({ type: 'varchar', length: 255, nullable: true })
86
86
  visiting_person_in_department: string | null; // زائر في القسم (Visiting Person in Department)
87
87
 
88
- @Column({ type: 'int', nullable: true, unique: true })
89
- serial_number: number | null;
90
-
91
- // QR Code for Gate Pass
88
+ @Column({ type: 'int', nullable: true, unique: true })
89
+ serial_number: number | null;
90
+
91
+ // QR Code for Gate Pass
92
92
  @Column({ type: 'text', nullable: true })
93
93
  qr_code_url: string | null; // QR code URL for this visitor (data URL can be 6000+ characters)
94
94
 
@@ -134,9 +134,9 @@ export class GatePassVisitors extends BaseModel {
134
134
  this.visitor_email_address = visitor_email_address;
135
135
  this.visitor_mobile_number = visitor_mobile_number;
136
136
  this.visitor_photo_url = visitor_photo_url;
137
- this.visitor_photo_file_name = visitor_photo_file_name;
138
- this.serial_number = null;
139
- this.gate_pass_generated = false;
137
+ this.visitor_photo_file_name = visitor_photo_file_name;
138
+ this.serial_number = null;
139
+ this.gate_pass_generated = false;
140
140
  this.email_sent = false;
141
141
  }
142
142
  }
@@ -1,45 +1,45 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- /**
5
- * One person/trainee per row; multiple rows per request (Request for Individual Training).
6
- */
7
- @Entity({ name: 'lms_external_entity_trained_people' })
8
- export class LMSExternalEntityTrainedPerson extends BaseModel {
9
-
10
- @Column({ type: 'int', nullable: false })
11
- request_id: number;
12
-
13
- @Column({ type: 'int', nullable: true })
14
- service_id: number | null;
15
-
16
- @Column({ type: 'int', nullable: true })
17
- sub_service_id: number | null;
18
-
19
- @Column({ type: 'varchar', length: 255, nullable: true })
20
- full_name: string | null;
21
-
22
- @Column({ type: 'varchar', length: 255, nullable: true })
23
- employee_id: string | null;
24
-
25
- @Column({ type: 'int', nullable: true })
26
- age: number | null;
27
-
28
- @Column({ type: 'varchar', length: 255, nullable: true })
29
- university: string | null;
30
-
31
- @Column({ type: 'text', nullable: true })
32
- qualification: string | null;
33
-
34
- @Column({ type: 'text', nullable: true })
35
- learning_curriculum: string | null;
36
-
37
- @Column({ type: 'varchar', length: 255, nullable: true })
38
- training_period: string | null;
39
-
40
- @Column({ type: 'boolean', default: false })
41
- is_selected: boolean;
42
-
43
- @Column({ type: 'int', default: 0 })
44
- display_order: number;
45
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ /**
5
+ * One person/trainee per row; multiple rows per request (Request for Individual Training).
6
+ */
7
+ @Entity({ name: 'lms_external_entity_trained_people' })
8
+ export class LMSExternalEntityTrainedPerson extends BaseModel {
9
+
10
+ @Column({ type: 'int', nullable: false })
11
+ request_id: number;
12
+
13
+ @Column({ type: 'int', nullable: true })
14
+ service_id: number | null;
15
+
16
+ @Column({ type: 'int', nullable: true })
17
+ sub_service_id: number | null;
18
+
19
+ @Column({ type: 'varchar', length: 255, nullable: true })
20
+ full_name: string | null;
21
+
22
+ @Column({ type: 'varchar', length: 255, nullable: true })
23
+ employee_id: string | null;
24
+
25
+ @Column({ type: 'int', nullable: true })
26
+ age: number | null;
27
+
28
+ @Column({ type: 'varchar', length: 255, nullable: true })
29
+ university: string | null;
30
+
31
+ @Column({ type: 'text', nullable: true })
32
+ qualification: string | null;
33
+
34
+ @Column({ type: 'text', nullable: true })
35
+ learning_curriculum: string | null;
36
+
37
+ @Column({ type: 'varchar', length: 255, nullable: true })
38
+ training_period: string | null;
39
+
40
+ @Column({ type: 'boolean', default: false })
41
+ is_selected: boolean;
42
+
43
+ @Column({ type: 'int', default: 0 })
44
+ display_order: number;
45
+ }
@@ -1,67 +1,67 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum LanguageCourseStatus {
5
- SUBMITTED = "Submitted",
6
- PENDING = "Pending",
7
- ASSIGNED = "Assigned",
8
- IN_PROGRESS = "In Progress",
9
- APPROVED = "Approved",
10
- REJECTED = "Rejected"
11
- }
12
-
13
- @Entity({ name: 'language_course_requests' })
14
- export class LanguageCourseRequests extends BaseModel {
15
-
16
- // Common columns
17
- @Column({ type: 'int', nullable: true })
18
- req_user_department_id: number | null;
19
-
20
- @Column({ type: 'int', nullable: true })
21
- req_user_section_id: number | null;
22
-
23
- @Column({ type: 'int', nullable: true })
24
- service_id: number | null;
25
-
26
- @Column({ type: 'int', nullable: true })
27
- sub_service_id: number | null;
28
-
29
- @Column({ type: 'int', nullable: false })
30
- user_id: number;
31
-
32
- // Language Course specific columns
33
- @Column({ type: 'varchar', length: 255, nullable: false })
34
- course_name: string;
35
-
36
- @Column({ type: 'varchar', length: 100, nullable: false })
37
- course_level: string;
38
-
39
- @Column({ type: 'varchar', length: 255, nullable: false })
40
- institution: string;
41
-
42
- @Column({ type: 'text', nullable: false })
43
- reason_of_course: string;
44
-
45
- @Column({ type: 'int', nullable: false })
46
- estimated_number_of_participants: number;
47
-
48
- // Timeline
49
- @Column({ type: 'date', nullable: false })
50
- date_from: Date;
51
-
52
- @Column({ type: 'date', nullable: false })
53
- date_to: Date;
54
-
55
- @Column({ type: 'time', nullable: false })
56
- time_from: string;
57
-
58
- @Column({ type: 'time', nullable: false })
59
- time_to: string;
60
-
61
- @Column({ type: 'enum', enum: LanguageCourseStatus, default: LanguageCourseStatus.PENDING, nullable: false })
62
- status: LanguageCourseStatus;
63
-
64
- @Column({ type: 'varchar', nullable: true })
65
- workflow_execution_id: string | null;
66
-
67
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum LanguageCourseStatus {
5
+ SUBMITTED = "Submitted",
6
+ PENDING = "Pending",
7
+ ASSIGNED = "Assigned",
8
+ IN_PROGRESS = "In Progress",
9
+ APPROVED = "Approved",
10
+ REJECTED = "Rejected"
11
+ }
12
+
13
+ @Entity({ name: 'language_course_requests' })
14
+ export class LanguageCourseRequests extends BaseModel {
15
+
16
+ // Common columns
17
+ @Column({ type: 'int', nullable: true })
18
+ req_user_department_id: number | null;
19
+
20
+ @Column({ type: 'int', nullable: true })
21
+ req_user_section_id: number | null;
22
+
23
+ @Column({ type: 'int', nullable: true })
24
+ service_id: number | null;
25
+
26
+ @Column({ type: 'int', nullable: true })
27
+ sub_service_id: number | null;
28
+
29
+ @Column({ type: 'int', nullable: false })
30
+ user_id: number;
31
+
32
+ // Language Course specific columns
33
+ @Column({ type: 'varchar', length: 255, nullable: false })
34
+ course_name: string;
35
+
36
+ @Column({ type: 'varchar', length: 100, nullable: false })
37
+ course_level: string;
38
+
39
+ @Column({ type: 'varchar', length: 255, nullable: false })
40
+ institution: string;
41
+
42
+ @Column({ type: 'text', nullable: false })
43
+ reason_of_course: string;
44
+
45
+ @Column({ type: 'int', nullable: false })
46
+ estimated_number_of_participants: number;
47
+
48
+ // Timeline
49
+ @Column({ type: 'date', nullable: false })
50
+ date_from: Date;
51
+
52
+ @Column({ type: 'date', nullable: false })
53
+ date_to: Date;
54
+
55
+ @Column({ type: 'time', nullable: false })
56
+ time_from: string;
57
+
58
+ @Column({ type: 'time', nullable: false })
59
+ time_to: string;
60
+
61
+ @Column({ type: 'enum', enum: LanguageCourseStatus, default: LanguageCourseStatus.PENDING, nullable: false })
62
+ status: LanguageCourseStatus;
63
+
64
+ @Column({ type: 'varchar', nullable: true })
65
+ workflow_execution_id: string | null;
66
+
67
+ }
@@ -1,72 +1,72 @@
1
- import { Column, Entity } from "typeorm";
2
- import { BaseModel } from './BaseModel';
3
-
4
- export enum enumFrequency {
5
- Monthly = 'Monthly',
6
- Yearly = 'Yearly',
7
- }
8
-
9
- //This model is used to store the Financial Grade declaration on the Admin Side
10
- @Entity({ name: 'leave_configuration' })
11
- export class LeaveConfiguration extends BaseModel {
12
-
13
- @Column({ type: 'varchar', nullable: true })
14
- category: string;
15
-
16
- @Column({ type: 'int', nullable: true })
17
- MandC_id: number;
18
-
19
- @Column({ type: 'int', nullable: true })
20
- leave_type_id: number;
21
-
22
- @Column({ type: 'varchar', nullable: true })
23
- frequency: enumFrequency;
24
-
25
- @Column({ type: 'varchar', nullable: true })
26
- region: string;
27
-
28
- @Column({ type: 'varchar', nullable: true })
29
- country: string;
30
-
31
- @Column({ type: 'varchar', nullable: true })
32
- location: string;
33
-
34
- @Column({ nullable: true, default: false })
35
- is_carryforward: boolean;
36
-
37
- @Column({ type: 'int', nullable: true, default: 0 })
38
- carryforward_limit: number;
39
-
40
- @Column({ type: 'date', nullable: true })
41
- from_date: Date;
42
-
43
- @Column({ type: 'date', nullable: true })
44
- to_date: Date;
45
-
46
- @Column({ type: 'varchar', nullable: true })
47
- reason: string;
48
-
49
- @Column({ type: 'int', nullable: true })
50
- emergency_balance_days: number | null;
51
-
52
- @Column({ type: 'date', nullable: true })
53
- last_credited: Date | null;
54
-
55
- constructor(category: string, MandC_id: number, leave_type_id: number, frequency: enumFrequency, region: string, country: string, location: string, is_carryforward: boolean, carryforward_limit: number, from_date: Date, to_date: Date, reason: string, emergency_balance_days?: number|null, last_credited?: Date|null) {
56
- super();
57
- this.category = category;
58
- this.MandC_id = MandC_id;
59
- this.leave_type_id = leave_type_id;
60
- this.frequency = frequency;
61
- this.region = region;
62
- this.country = country;
63
- this.location = location;
64
- this.is_carryforward = is_carryforward;
65
- this.carryforward_limit = carryforward_limit;
66
- this.from_date = from_date;
67
- this.to_date = to_date;
68
- this.reason = reason;
69
- this.emergency_balance_days = emergency_balance_days ?? null;
70
- this.last_credited = last_credited ?? null;
71
- }
1
+ import { Column, Entity } from "typeorm";
2
+ import { BaseModel } from './BaseModel';
3
+
4
+ export enum enumFrequency {
5
+ Monthly = 'Monthly',
6
+ Yearly = 'Yearly',
7
+ }
8
+
9
+ //This model is used to store the Financial Grade declaration on the Admin Side
10
+ @Entity({ name: 'leave_configuration' })
11
+ export class LeaveConfiguration extends BaseModel {
12
+
13
+ @Column({ type: 'varchar', nullable: true })
14
+ category: string;
15
+
16
+ @Column({ type: 'int', nullable: true })
17
+ MandC_id: number;
18
+
19
+ @Column({ type: 'int', nullable: true })
20
+ leave_type_id: number;
21
+
22
+ @Column({ type: 'varchar', nullable: true })
23
+ frequency: enumFrequency;
24
+
25
+ @Column({ type: 'varchar', nullable: true })
26
+ region: string;
27
+
28
+ @Column({ type: 'varchar', nullable: true })
29
+ country: string;
30
+
31
+ @Column({ type: 'varchar', nullable: true })
32
+ location: string;
33
+
34
+ @Column({ nullable: true, default: false })
35
+ is_carryforward: boolean;
36
+
37
+ @Column({ type: 'int', nullable: true, default: 0 })
38
+ carryforward_limit: number;
39
+
40
+ @Column({ type: 'date', nullable: true })
41
+ from_date: Date;
42
+
43
+ @Column({ type: 'date', nullable: true })
44
+ to_date: Date;
45
+
46
+ @Column({ type: 'varchar', nullable: true })
47
+ reason: string;
48
+
49
+ @Column({ type: 'int', nullable: true })
50
+ emergency_balance_days: number | null;
51
+
52
+ @Column({ type: 'date', nullable: true })
53
+ last_credited: Date | null;
54
+
55
+ constructor(category: string, MandC_id: number, leave_type_id: number, frequency: enumFrequency, region: string, country: string, location: string, is_carryforward: boolean, carryforward_limit: number, from_date: Date, to_date: Date, reason: string, emergency_balance_days?: number|null, last_credited?: Date|null) {
56
+ super();
57
+ this.category = category;
58
+ this.MandC_id = MandC_id;
59
+ this.leave_type_id = leave_type_id;
60
+ this.frequency = frequency;
61
+ this.region = region;
62
+ this.country = country;
63
+ this.location = location;
64
+ this.is_carryforward = is_carryforward;
65
+ this.carryforward_limit = carryforward_limit;
66
+ this.from_date = from_date;
67
+ this.to_date = to_date;
68
+ this.reason = reason;
69
+ this.emergency_balance_days = emergency_balance_days ?? null;
70
+ this.last_credited = last_credited ?? null;
71
+ }
72
72
  }