@platform-modules/foreign-ministry 1.3.139 → 1.3.141
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.
- package/dist/data-source.js +12 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +23 -1
- package/dist/models/AppointmentApprovalModel.d.ts +22 -0
- package/dist/models/AppointmentApprovalModel.js +84 -0
- package/dist/models/AppointmentAttachmentModel.d.ts +11 -0
- package/dist/models/AppointmentAttachmentModel.js +52 -0
- package/dist/models/AppointmentAttendeeModel.d.ts +14 -0
- package/dist/models/AppointmentAttendeeModel.js +47 -0
- package/dist/models/AppointmentChatModel.d.ts +19 -0
- package/dist/models/AppointmentChatModel.js +77 -0
- package/dist/models/AppointmentRequestModel.d.ts +47 -0
- package/dist/models/AppointmentRequestModel.js +126 -0
- package/dist/models/AppointmentWorkflowModel.d.ts +17 -0
- package/dist/models/AppointmentWorkflowModel.js +62 -0
- package/dist/models/ProfileUpdateRequestsModel.d.ts +2 -0
- package/dist/models/ProfileUpdateRequestsModel.js +8 -0
- package/dist/models/UserEmploymentDetailsModel.d.ts +1 -0
- package/dist/models/UserEmploymentDetailsModel.js +4 -0
- package/dist/models/UserPersonalDetailsModel.d.ts +1 -0
- package/dist/models/UserPersonalDetailsModel.js +4 -0
- package/package.json +1 -1
- package/src/data-source.ts +387 -375
- package/src/index.ts +301 -289
- package/src/models/AppointmentApprovalModel.ts +57 -0
- package/src/models/AppointmentAttachmentModel.ts +30 -0
- package/src/models/AppointmentAttendeeModel.ts +28 -0
- package/src/models/AppointmentChatModel.ts +64 -0
- package/src/models/AppointmentRequestModel.ts +93 -0
- package/src/models/AppointmentWorkflowModel.ts +39 -0
- package/src/models/ProfileUpdateRequestsModel.ts +8 -0
- package/src/models/UserEmploymentDetailsModel.ts +4 -0
- package/src/models/UserPersonalDetailsModel.ts +4 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AppointmentApprovalStatus {
|
|
5
|
+
PENDING = 'Pending',
|
|
6
|
+
IN_PROGRESS = 'In Progress',
|
|
7
|
+
APPROVED = 'Approved',
|
|
8
|
+
REJECTED = 'Rejected',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'appointment_approvals' })
|
|
12
|
+
export class AppointmentApprovalDetails extends BaseModel {
|
|
13
|
+
@Column({ type: 'integer', nullable: false })
|
|
14
|
+
appointment_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: true })
|
|
17
|
+
service_id: number | null;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'integer', nullable: true })
|
|
20
|
+
sub_service_id: number | null;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'integer', nullable: false })
|
|
23
|
+
level: number;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'integer', nullable: true })
|
|
26
|
+
approver_role_id: number;
|
|
27
|
+
|
|
28
|
+
@Column({ type: 'integer', nullable: true })
|
|
29
|
+
department_id: number | null;
|
|
30
|
+
|
|
31
|
+
@Column({ type: 'integer', nullable: true })
|
|
32
|
+
section_id: number | null;
|
|
33
|
+
|
|
34
|
+
@Column({ type: 'integer', nullable: true })
|
|
35
|
+
approver_user_id: number | null;
|
|
36
|
+
|
|
37
|
+
@Column({ type: 'integer', nullable: true })
|
|
38
|
+
delegate_user_id: number | null;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'integer', nullable: true })
|
|
41
|
+
approved_by: number | null;
|
|
42
|
+
|
|
43
|
+
@Column({ type: 'varchar', length: 500, nullable: true, default: '' })
|
|
44
|
+
comment: string;
|
|
45
|
+
|
|
46
|
+
@Column({
|
|
47
|
+
type: 'enum',
|
|
48
|
+
enum: AppointmentApprovalStatus,
|
|
49
|
+
default: AppointmentApprovalStatus.PENDING,
|
|
50
|
+
nullable: false,
|
|
51
|
+
})
|
|
52
|
+
approval_status: AppointmentApprovalStatus;
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'boolean', default: true, nullable: false })
|
|
55
|
+
is_allowed: boolean;
|
|
56
|
+
}
|
|
57
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: 'appointment_attachments' })
|
|
5
|
+
export class AppointmentRequestAttachment extends BaseModel {
|
|
6
|
+
@Column({ type: 'integer', nullable: false })
|
|
7
|
+
appointment_id: number;
|
|
8
|
+
|
|
9
|
+
@Column({ type: 'integer', nullable: true })
|
|
10
|
+
service_id: number | null;
|
|
11
|
+
|
|
12
|
+
@Column({ type: 'integer', nullable: true })
|
|
13
|
+
sub_service_id: number | null;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
16
|
+
file_url: string;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
19
|
+
file_name: string;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 100, nullable: true })
|
|
22
|
+
file_type: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'bigint', nullable: true })
|
|
25
|
+
file_size: number | null;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'integer', nullable: true })
|
|
28
|
+
chat_id: number | null;
|
|
29
|
+
}
|
|
30
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AppointmentAttendeeStatus {
|
|
5
|
+
INVITED = 'Invited',
|
|
6
|
+
ACCEPTED = 'Accepted',
|
|
7
|
+
REJECTED = 'Rejected',
|
|
8
|
+
NO_SHOW = 'No-Show',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@Entity({ name: 'appointment_attendees' })
|
|
12
|
+
export class AppointmentAttendees extends BaseModel {
|
|
13
|
+
@Column({ type: 'integer', nullable: false })
|
|
14
|
+
attendee_id: number;
|
|
15
|
+
|
|
16
|
+
@Column({ type: 'integer', nullable: false })
|
|
17
|
+
appointment_id: number;
|
|
18
|
+
|
|
19
|
+
@Column({ type: 'enum', enum: AppointmentAttendeeStatus, default: AppointmentAttendeeStatus.INVITED, nullable: false })
|
|
20
|
+
status: AppointmentAttendeeStatus;
|
|
21
|
+
|
|
22
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
23
|
+
attendee_email: string | null;
|
|
24
|
+
|
|
25
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
26
|
+
attendee_name: string | null;
|
|
27
|
+
}
|
|
28
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AppointmentMessageType {
|
|
5
|
+
TEXT = 'text',
|
|
6
|
+
IMAGE = 'image',
|
|
7
|
+
VIDEO = 'video',
|
|
8
|
+
FILE = 'file',
|
|
9
|
+
LINK = 'link',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@Entity({ name: 'appointment_chats' })
|
|
13
|
+
export class AppointmentRequestChat extends BaseModel {
|
|
14
|
+
@Column({ type: 'integer', nullable: false })
|
|
15
|
+
appointment_id: number;
|
|
16
|
+
|
|
17
|
+
@Column({ type: 'integer', nullable: true })
|
|
18
|
+
service_id: number | null;
|
|
19
|
+
|
|
20
|
+
@Column({ type: 'integer', nullable: true })
|
|
21
|
+
sub_service_id: number | null;
|
|
22
|
+
|
|
23
|
+
@Column({ type: 'integer', nullable: false })
|
|
24
|
+
user_id: number;
|
|
25
|
+
|
|
26
|
+
@Column({ type: 'integer', nullable: true })
|
|
27
|
+
role_id: number;
|
|
28
|
+
|
|
29
|
+
@Column({ type: 'text', nullable: false })
|
|
30
|
+
message: string;
|
|
31
|
+
|
|
32
|
+
@Column({
|
|
33
|
+
type: 'enum',
|
|
34
|
+
enum: AppointmentMessageType,
|
|
35
|
+
default: AppointmentMessageType.TEXT,
|
|
36
|
+
nullable: false,
|
|
37
|
+
})
|
|
38
|
+
messageType: AppointmentMessageType;
|
|
39
|
+
|
|
40
|
+
@Column({ type: 'text', nullable: true })
|
|
41
|
+
status: string;
|
|
42
|
+
|
|
43
|
+
constructor(
|
|
44
|
+
appointment_id: number,
|
|
45
|
+
user_id: number,
|
|
46
|
+
role_id: number,
|
|
47
|
+
message: string,
|
|
48
|
+
service_id?: number,
|
|
49
|
+
sub_service_id?: number,
|
|
50
|
+
messageType?: AppointmentMessageType,
|
|
51
|
+
status?: string
|
|
52
|
+
) {
|
|
53
|
+
super();
|
|
54
|
+
this.appointment_id = appointment_id;
|
|
55
|
+
this.service_id = service_id ?? null;
|
|
56
|
+
this.sub_service_id = sub_service_id ?? null;
|
|
57
|
+
this.user_id = user_id;
|
|
58
|
+
this.role_id = role_id;
|
|
59
|
+
this.message = message;
|
|
60
|
+
this.messageType = messageType ?? AppointmentMessageType.TEXT;
|
|
61
|
+
this.status = status ?? 'Pending';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AppointmentRequestStatus {
|
|
5
|
+
PENDING = 'Pending',
|
|
6
|
+
ASSIGNED = 'Assigned',
|
|
7
|
+
IN_PROGRESS = 'In Progress',
|
|
8
|
+
APPROVED = 'Approved',
|
|
9
|
+
REJECTED = 'Rejected',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum AppointmentRequestType {
|
|
13
|
+
INTERNAL = 'Internal',
|
|
14
|
+
EXTERNAL = 'External',
|
|
15
|
+
OTHER_MINISTERS = 'Other Ministers',
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export enum AppointmentType {
|
|
19
|
+
PHYSICAL = 'Physical',
|
|
20
|
+
ONLINE = 'Online',
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export enum AppointmentYesNo {
|
|
24
|
+
YES = 'Yes',
|
|
25
|
+
NO = 'No',
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export enum AppointmentLocation {
|
|
29
|
+
EMBASSY = 'Embassy',
|
|
30
|
+
MINISTRY = 'Ministry',
|
|
31
|
+
EXTERNAL_VENUE = 'External Venue',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@Entity({ name: 'appointment_requests' })
|
|
35
|
+
export class AppointmentRequests extends BaseModel {
|
|
36
|
+
@Column({ type: 'int', nullable: true })
|
|
37
|
+
req_user_department_id: number | null;
|
|
38
|
+
|
|
39
|
+
@Column({ type: 'int', nullable: true })
|
|
40
|
+
req_user_section_id: number | null;
|
|
41
|
+
|
|
42
|
+
@Column({ type: 'int', nullable: true })
|
|
43
|
+
service_id: number | null;
|
|
44
|
+
|
|
45
|
+
@Column({ type: 'int', nullable: true })
|
|
46
|
+
sub_service_id: number | null;
|
|
47
|
+
|
|
48
|
+
@Column({ type: 'int', nullable: false })
|
|
49
|
+
user_id: number;
|
|
50
|
+
|
|
51
|
+
@Column({ type: 'int', nullable: true })
|
|
52
|
+
department_id: number | null;
|
|
53
|
+
|
|
54
|
+
@Column({ type: 'int', nullable: true })
|
|
55
|
+
receiving_department_id: number | null;
|
|
56
|
+
|
|
57
|
+
@Column({ type: 'enum', enum: AppointmentRequestType, nullable: true })
|
|
58
|
+
request_type: AppointmentRequestType | null;
|
|
59
|
+
|
|
60
|
+
@Column({ type: 'enum', enum: AppointmentType, nullable: true })
|
|
61
|
+
appointment_type: AppointmentType | null;
|
|
62
|
+
|
|
63
|
+
@Column({ type: 'date', nullable: true })
|
|
64
|
+
appointment_date: string | null;
|
|
65
|
+
|
|
66
|
+
@Column({ type: 'time', nullable: true })
|
|
67
|
+
from_time: string | null;
|
|
68
|
+
|
|
69
|
+
@Column({ type: 'time', nullable: true })
|
|
70
|
+
to_time: string | null;
|
|
71
|
+
|
|
72
|
+
@Column({ type: 'text', nullable: true })
|
|
73
|
+
comments: string | null;
|
|
74
|
+
|
|
75
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
76
|
+
person_name: string | null;
|
|
77
|
+
|
|
78
|
+
@Column({ type: 'varchar', length: 50, nullable: true })
|
|
79
|
+
contact_number: string | null;
|
|
80
|
+
|
|
81
|
+
@Column({ type: 'text', nullable: true })
|
|
82
|
+
agenda: string | null;
|
|
83
|
+
|
|
84
|
+
@Column({ type: 'enum', enum: AppointmentLocation, nullable: true })
|
|
85
|
+
appointment_location: AppointmentLocation | null;
|
|
86
|
+
|
|
87
|
+
@Column({ type: 'enum', enum: AppointmentRequestStatus, default: AppointmentRequestStatus.PENDING, nullable: false })
|
|
88
|
+
status: AppointmentRequestStatus;
|
|
89
|
+
|
|
90
|
+
@Column({ type: 'varchar', nullable: true })
|
|
91
|
+
workflow_execution_id: string | null;
|
|
92
|
+
}
|
|
93
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Column, Entity } from 'typeorm';
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
export enum AppointmentWorkFlowStatus {
|
|
5
|
+
COMPLETED = 'Completed',
|
|
6
|
+
NOT_YET_STARTED = 'Not Yet Started',
|
|
7
|
+
PENDING = 'Pending',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
@Entity({ name: 'appointment_workflows' })
|
|
11
|
+
export class AppointmentWorkFlow extends BaseModel {
|
|
12
|
+
@Column({ type: 'integer', nullable: false })
|
|
13
|
+
appointment_id: number;
|
|
14
|
+
|
|
15
|
+
@Column({ type: 'integer', nullable: true })
|
|
16
|
+
service_id: number | null;
|
|
17
|
+
|
|
18
|
+
@Column({ type: 'integer', nullable: true })
|
|
19
|
+
sub_service_id: number | null;
|
|
20
|
+
|
|
21
|
+
@Column({ type: 'varchar', length: 500, nullable: false })
|
|
22
|
+
content: string;
|
|
23
|
+
|
|
24
|
+
@Column({ type: 'enum', enum: AppointmentWorkFlowStatus, default: AppointmentWorkFlowStatus.NOT_YET_STARTED, nullable: false })
|
|
25
|
+
status: AppointmentWorkFlowStatus;
|
|
26
|
+
|
|
27
|
+
@Column({ type: 'integer', nullable: true })
|
|
28
|
+
user_id: number | null;
|
|
29
|
+
|
|
30
|
+
@Column({ type: 'integer', nullable: true })
|
|
31
|
+
role_id: number | null;
|
|
32
|
+
|
|
33
|
+
@Column({ type: 'integer', nullable: true })
|
|
34
|
+
department_id: number | null;
|
|
35
|
+
|
|
36
|
+
@Column({ type: 'integer', nullable: true })
|
|
37
|
+
section_id: number | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
@@ -303,6 +303,10 @@ export class ProfileUpdateRequests extends BaseModel {
|
|
|
303
303
|
@Column({ type: 'text', nullable: true })
|
|
304
304
|
reason_for_leaving_service: string | null;
|
|
305
305
|
|
|
306
|
+
// Contract copy (e.g., file URL or reference)
|
|
307
|
+
@Column({ type: 'text', nullable: true })
|
|
308
|
+
contract_copy: string | null;
|
|
309
|
+
|
|
306
310
|
// Experience/Activity Information (JSONB array for work experience and activities)
|
|
307
311
|
@Column({ type: 'jsonb', nullable: true })
|
|
308
312
|
experience_activity: {
|
|
@@ -333,6 +337,10 @@ export class ProfileUpdateRequests extends BaseModel {
|
|
|
333
337
|
@Column({ type: 'date', nullable: true })
|
|
334
338
|
training_course_end_date: Date | null;
|
|
335
339
|
|
|
340
|
+
// Type of study (e.g., Bachelor, Master, Diploma)
|
|
341
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
342
|
+
type_of_study: string | null;
|
|
343
|
+
|
|
336
344
|
// ========== ADDITIONAL FIELDS (missing from original model) ==========
|
|
337
345
|
// Arabic name
|
|
338
346
|
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
@@ -136,6 +136,10 @@ export class UserEmploymentDetails extends BaseModel {
|
|
|
136
136
|
@Column({ type: 'text', nullable: true })
|
|
137
137
|
reason_for_leaving_service: string | null;
|
|
138
138
|
|
|
139
|
+
// Contract copy (e.g., file URL or reference)
|
|
140
|
+
@Column({ type: 'text', nullable: true })
|
|
141
|
+
contract_copy: string | null;
|
|
142
|
+
|
|
139
143
|
// Experience/Activity Information (JSONB array for work experience and activities)
|
|
140
144
|
@Column({ type: 'jsonb', nullable: true })
|
|
141
145
|
experience_activity: {
|
|
@@ -153,4 +153,8 @@ export class UserPersonalDetails extends BaseModel {
|
|
|
153
153
|
|
|
154
154
|
@Column({ type: 'int', nullable: true })
|
|
155
155
|
education_country: number | null; // Foreign key to country_master table
|
|
156
|
+
|
|
157
|
+
// Type of study (e.g., Bachelor, Master, Diploma)
|
|
158
|
+
@Column({ type: 'varchar', length: 255, nullable: true })
|
|
159
|
+
type_of_study: string | null;
|
|
156
160
|
}
|