@platform-modules/civil-aviation-authority 1.0.47 → 1.0.49
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/.env +2 -2
- package/dist/data-source.js +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/models/ITServicesTypesModel.d.ts +5 -0
- package/dist/models/ITServicesTypesModel.js +29 -0
- package/dist/models/contactInfoModel.d.ts +18 -0
- package/dist/models/contactInfoModel.js +80 -0
- package/dist/models/user.d.ts +1 -5
- package/dist/models/user.js +2 -22
- package/package.json +1 -1
- package/src/data-source.ts +3 -1
- package/src/index.ts +1 -0
- package/src/models/contactInfoModel.ts +60 -0
- package/src/models/user.ts +1 -21
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -26,6 +26,7 @@ const WorkflowTaskNames_1 = require("./models/WorkflowTaskNames");
|
|
|
26
26
|
const DirectorateModel_1 = require("./models/DirectorateModel");
|
|
27
27
|
const PositionModel_1 = require("./models/PositionModel");
|
|
28
28
|
const serviceBookmarksModel_1 = require("./models/serviceBookmarksModel");
|
|
29
|
+
const contactInfoModel_1 = require("./models/contactInfoModel");
|
|
29
30
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
30
31
|
type: 'postgres',
|
|
31
32
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -55,6 +56,7 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
55
56
|
WorkflowTaskNames_1.WorkflowTaskNames,
|
|
56
57
|
DirectorateModel_1.Directorate,
|
|
57
58
|
PositionModel_1.Position,
|
|
58
|
-
serviceBookmarksModel_1.ServiceBookmarks
|
|
59
|
+
serviceBookmarksModel_1.ServiceBookmarks,
|
|
60
|
+
contactInfoModel_1.ContactInfo
|
|
59
61
|
],
|
|
60
62
|
});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -35,3 +35,4 @@ __exportStar(require("./models/WorkflowTaskNames"), exports);
|
|
|
35
35
|
__exportStar(require("./models/DirectorateModel"), exports);
|
|
36
36
|
__exportStar(require("./models/PositionModel"), exports);
|
|
37
37
|
__exportStar(require("./models/serviceBookmarksModel"), exports);
|
|
38
|
+
__exportStar(require("./models/contactInfoModel"), exports);
|
|
@@ -0,0 +1,29 @@
|
|
|
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.ITServicesTypes = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ITServicesTypes = class ITServicesTypes extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.ITServicesTypes = ITServicesTypes;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ nullable: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ITServicesTypes.prototype, "name", void 0);
|
|
26
|
+
exports.ITServicesTypes = ITServicesTypes = __decorate([
|
|
27
|
+
(0, typeorm_1.Entity)({ name: 'IT_Services_Types' }),
|
|
28
|
+
__metadata("design:paramtypes", [String])
|
|
29
|
+
], ITServicesTypes);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
export declare class ContactInfo extends BaseModel {
|
|
3
|
+
id: number;
|
|
4
|
+
category: "CAA" | "Embassy";
|
|
5
|
+
name: string;
|
|
6
|
+
business_email: string;
|
|
7
|
+
business_phone: string;
|
|
8
|
+
extension_number: string;
|
|
9
|
+
fax_number: string;
|
|
10
|
+
location: string;
|
|
11
|
+
street: string;
|
|
12
|
+
city: string;
|
|
13
|
+
state: string;
|
|
14
|
+
zip_code: string;
|
|
15
|
+
country: string;
|
|
16
|
+
photo_url: string;
|
|
17
|
+
department_id: number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
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.ContactInfo = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let ContactInfo = class ContactInfo extends BaseModel_1.BaseModel {
|
|
16
|
+
};
|
|
17
|
+
exports.ContactInfo = ContactInfo;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
20
|
+
__metadata("design:type", Number)
|
|
21
|
+
], ContactInfo.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ type: "enum", enum: ["CAA", "Embassy"], nullable: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ContactInfo.prototype, "category", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ContactInfo.prototype, "name", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: false }),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ContactInfo.prototype, "business_email", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: false }),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ContactInfo.prototype, "business_phone", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 10, nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ContactInfo.prototype, "extension_number", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], ContactInfo.prototype, "fax_number", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], ContactInfo.prototype, "location", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 255, nullable: true }),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], ContactInfo.prototype, "street", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], ContactInfo.prototype, "city", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], ContactInfo.prototype, "state", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 20, nullable: true }),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], ContactInfo.prototype, "zip_code", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 100, nullable: true }),
|
|
68
|
+
__metadata("design:type", String)
|
|
69
|
+
], ContactInfo.prototype, "country", void 0);
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, typeorm_1.Column)({ type: "varchar", length: 500, nullable: true }),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], ContactInfo.prototype, "photo_url", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], ContactInfo.prototype, "department_id", void 0);
|
|
78
|
+
exports.ContactInfo = ContactInfo = __decorate([
|
|
79
|
+
(0, typeorm_1.Entity)({ name: "contact_info" })
|
|
80
|
+
], ContactInfo);
|
package/dist/models/user.d.ts
CHANGED
|
@@ -31,9 +31,5 @@ export declare class User extends BaseModel {
|
|
|
31
31
|
supervisor_emp_id?: number;
|
|
32
32
|
supervisor_emp_name?: string;
|
|
33
33
|
is_admin?: boolean;
|
|
34
|
-
|
|
35
|
-
personal_email?: string;
|
|
36
|
-
extension_number?: number;
|
|
37
|
-
diplomatic_name?: string;
|
|
38
|
-
constructor(employee_id?: number, civil_employee_id?: number, employee_name?: string, employee_arabic_name?: string, person_type?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, qualification?: string, marital_status?: string, nationality?: string, email?: string, blood_type?: string, national_id?: number, manpower_id?: number, mobile?: string, office_number?: string, department?: number, category?: string, directorate?: string, section?: number, position?: number, arabic_position?: string, grade?: number, location?: string, supervisor_emp_id?: number, supervisor_emp_name?: string, passport_number?: string, personal_email?: string, extension_number?: number, diplomatic_name?: string);
|
|
34
|
+
constructor(employee_id?: number, civil_employee_id?: number, employee_name?: string, employee_arabic_name?: string, person_type?: string, date_of_birth?: string, region_of_birth?: string, country_of_birth?: string, date_of_joining?: string, last_promotion_date?: string, gender?: string, qualification?: string, marital_status?: string, nationality?: string, email?: string, blood_type?: string, national_id?: number, manpower_id?: number, mobile?: string, office_number?: string, department?: number, category?: string, directorate?: string, section?: number, position?: number, arabic_position?: string, grade?: number, location?: string, supervisor_emp_id?: number, supervisor_emp_name?: string);
|
|
39
35
|
}
|
package/dist/models/user.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.User = void 0;
|
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
15
|
let User = class User extends BaseModel_1.BaseModel {
|
|
16
|
-
constructor(employee_id, civil_employee_id, employee_name, employee_arabic_name, person_type, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, qualification, marital_status, nationality, email, blood_type, national_id, manpower_id, mobile, office_number, department, category, directorate, section, position, arabic_position, grade, location, supervisor_emp_id, supervisor_emp_name
|
|
16
|
+
constructor(employee_id, civil_employee_id, employee_name, employee_arabic_name, person_type, date_of_birth, region_of_birth, country_of_birth, date_of_joining, last_promotion_date, gender, qualification, marital_status, nationality, email, blood_type, national_id, manpower_id, mobile, office_number, department, category, directorate, section, position, arabic_position, grade, location, supervisor_emp_id, supervisor_emp_name) {
|
|
17
17
|
super();
|
|
18
18
|
this.employee_id = employee_id;
|
|
19
19
|
this.civil_employee_id = civil_employee_id;
|
|
@@ -45,10 +45,6 @@ let User = class User extends BaseModel_1.BaseModel {
|
|
|
45
45
|
this.location = location;
|
|
46
46
|
this.supervisor_emp_id = supervisor_emp_id;
|
|
47
47
|
this.supervisor_emp_name = supervisor_emp_name;
|
|
48
|
-
this.passport_number = passport_number;
|
|
49
|
-
this.personal_email = personal_email;
|
|
50
|
-
this.extension_number = extension_number;
|
|
51
|
-
this.diplomatic_name = diplomatic_name;
|
|
52
48
|
}
|
|
53
49
|
};
|
|
54
50
|
exports.User = User;
|
|
@@ -176,23 +172,7 @@ __decorate([
|
|
|
176
172
|
(0, typeorm_1.Column)({ nullable: true, default: false }),
|
|
177
173
|
__metadata("design:type", Boolean)
|
|
178
174
|
], User.prototype, "is_admin", void 0);
|
|
179
|
-
__decorate([
|
|
180
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
181
|
-
__metadata("design:type", String)
|
|
182
|
-
], User.prototype, "passport_number", void 0);
|
|
183
|
-
__decorate([
|
|
184
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
185
|
-
__metadata("design:type", String)
|
|
186
|
-
], User.prototype, "personal_email", void 0);
|
|
187
|
-
__decorate([
|
|
188
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
189
|
-
__metadata("design:type", Number)
|
|
190
|
-
], User.prototype, "extension_number", void 0);
|
|
191
|
-
__decorate([
|
|
192
|
-
(0, typeorm_1.Column)({ nullable: true }),
|
|
193
|
-
__metadata("design:type", String)
|
|
194
|
-
], User.prototype, "diplomatic_name", void 0);
|
|
195
175
|
exports.User = User = __decorate([
|
|
196
176
|
(0, typeorm_1.Entity)({ name: 'users' }),
|
|
197
|
-
__metadata("design:paramtypes", [Number, Number, String, String, String, String, String, String, String, String, String, String, String, String, String, String, Number, Number, String, String, Number, String, String, Number, Number, String, Number, String, Number, String
|
|
177
|
+
__metadata("design:paramtypes", [Number, Number, String, String, String, String, String, String, String, String, String, String, String, String, String, String, Number, Number, String, String, Number, String, String, Number, Number, String, Number, String, Number, String])
|
|
198
178
|
], User);
|
package/package.json
CHANGED
package/src/data-source.ts
CHANGED
|
@@ -23,6 +23,7 @@ import { WorkflowTaskNames } from './models/WorkflowTaskNames';
|
|
|
23
23
|
import { Directorate } from './models/DirectorateModel';
|
|
24
24
|
import { Position } from './models/PositionModel';
|
|
25
25
|
import { ServiceBookmarks } from './models/serviceBookmarksModel';
|
|
26
|
+
import { ContactInfo } from './models/contactInfoModel';
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
|
|
@@ -55,6 +56,7 @@ export const AppDataSource = new DataSource({
|
|
|
55
56
|
WorkflowTaskNames,
|
|
56
57
|
Directorate,
|
|
57
58
|
Position,
|
|
58
|
-
ServiceBookmarks
|
|
59
|
+
ServiceBookmarks,
|
|
60
|
+
ContactInfo
|
|
59
61
|
],
|
|
60
62
|
});
|
package/src/index.ts
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";
|
|
2
|
+
import { BaseModel } from './BaseModel';
|
|
3
|
+
|
|
4
|
+
@Entity({ name: "contact_info" })
|
|
5
|
+
export class ContactInfo extends BaseModel {
|
|
6
|
+
@PrimaryGeneratedColumn()
|
|
7
|
+
id: number;
|
|
8
|
+
|
|
9
|
+
// General Information
|
|
10
|
+
@Column({ type: "enum", enum: ["CAA", "Embassy"], nullable: false })
|
|
11
|
+
category: "CAA" | "Embassy"; // Mandatory
|
|
12
|
+
|
|
13
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
14
|
+
name: string;
|
|
15
|
+
|
|
16
|
+
// Email & Contact Information
|
|
17
|
+
@Column({ type: "varchar", length: 255, nullable: false })
|
|
18
|
+
business_email: string; // Mandatory
|
|
19
|
+
|
|
20
|
+
@Column({ type: "varchar", length: 20, nullable: false })
|
|
21
|
+
business_phone: string; // Mandatory
|
|
22
|
+
|
|
23
|
+
@Column({ type: "varchar", length: 10, nullable: true })
|
|
24
|
+
extension_number: string; // Conditional
|
|
25
|
+
|
|
26
|
+
@Column({ type: "varchar", length: 20, nullable: true })
|
|
27
|
+
fax_number: string; // Optional
|
|
28
|
+
|
|
29
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
30
|
+
location: string; // Optional
|
|
31
|
+
|
|
32
|
+
// @Column({ type: "varchar", length: 255, nullable: true })
|
|
33
|
+
// website: string; // Optional
|
|
34
|
+
|
|
35
|
+
// @Column({ type: "varchar", length: 255, nullable: true })
|
|
36
|
+
// blog: string; // Optional
|
|
37
|
+
|
|
38
|
+
// Business Postal Address Information
|
|
39
|
+
@Column({ type: "varchar", length: 255, nullable: true })
|
|
40
|
+
street: string;
|
|
41
|
+
|
|
42
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
43
|
+
city: string;
|
|
44
|
+
|
|
45
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
46
|
+
state: string;
|
|
47
|
+
|
|
48
|
+
@Column({ type: "varchar", length: 20, nullable: true })
|
|
49
|
+
zip_code: string;
|
|
50
|
+
|
|
51
|
+
@Column({ type: "varchar", length: 100, nullable: true })
|
|
52
|
+
country: string;
|
|
53
|
+
|
|
54
|
+
// Photo
|
|
55
|
+
@Column({ type: "varchar", length: 500, nullable: true })
|
|
56
|
+
photo_url: string;
|
|
57
|
+
|
|
58
|
+
@Column({ nullable: true })
|
|
59
|
+
department_id: number;
|
|
60
|
+
}
|
package/src/models/user.ts
CHANGED
|
@@ -97,18 +97,6 @@ export class User extends BaseModel {
|
|
|
97
97
|
@Column({ nullable: true , default: false})
|
|
98
98
|
is_admin?: boolean;
|
|
99
99
|
|
|
100
|
-
@Column({ nullable: true })
|
|
101
|
-
passport_number?: string;
|
|
102
|
-
|
|
103
|
-
@Column({ nullable: true })
|
|
104
|
-
personal_email?: string;
|
|
105
|
-
|
|
106
|
-
@Column({ nullable: true })
|
|
107
|
-
extension_number?: number;
|
|
108
|
-
|
|
109
|
-
@Column({ nullable: true })
|
|
110
|
-
diplomatic_name?: string;
|
|
111
|
-
|
|
112
100
|
constructor(
|
|
113
101
|
employee_id?: number,
|
|
114
102
|
civil_employee_id?: number,
|
|
@@ -139,11 +127,7 @@ export class User extends BaseModel {
|
|
|
139
127
|
grade?: number,
|
|
140
128
|
location?: string,
|
|
141
129
|
supervisor_emp_id?: number,
|
|
142
|
-
supervisor_emp_name?: string
|
|
143
|
-
passport_number?: string,
|
|
144
|
-
personal_email?: string,
|
|
145
|
-
extension_number?: number,
|
|
146
|
-
diplomatic_name?: string
|
|
130
|
+
supervisor_emp_name?: string
|
|
147
131
|
) {
|
|
148
132
|
super();
|
|
149
133
|
this.employee_id = employee_id;
|
|
@@ -176,9 +160,5 @@ export class User extends BaseModel {
|
|
|
176
160
|
this.location = location;
|
|
177
161
|
this.supervisor_emp_id = supervisor_emp_id;
|
|
178
162
|
this.supervisor_emp_name = supervisor_emp_name;
|
|
179
|
-
this.passport_number = passport_number;
|
|
180
|
-
this.personal_email = personal_email;
|
|
181
|
-
this.extension_number = extension_number;
|
|
182
|
-
this.diplomatic_name = diplomatic_name;
|
|
183
163
|
}
|
|
184
164
|
}
|