@platform-modules/foreign-ministry 1.3.245 → 1.3.248

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.
@@ -1,10 +1,10 @@
1
1
  import { BaseModel } from './BaseModel';
2
2
  export declare class DocumentationFile extends BaseModel {
3
- project_id: number;
3
+ project_id: number | null;
4
4
  folder_id: number;
5
5
  file_path: string;
6
6
  filename: string;
7
7
  filesize: number;
8
8
  filetype: string;
9
- constructor(project_id?: number, folder_id?: number, file_path?: string, filename?: string, filesize?: number, filetype?: string);
9
+ constructor(project_id?: number | null, folder_id?: number, file_path?: string, filename?: string, filesize?: number, filetype?: string);
10
10
  }
@@ -15,7 +15,7 @@ const BaseModel_1 = require("./BaseModel");
15
15
  let DocumentationFile = class DocumentationFile extends BaseModel_1.BaseModel {
16
16
  constructor(project_id, folder_id, file_path, filename, filesize, filetype) {
17
17
  super();
18
- this.project_id = project_id ?? 0;
18
+ this.project_id = project_id ?? null;
19
19
  this.folder_id = folder_id ?? 0;
20
20
  this.file_path = file_path ?? '';
21
21
  this.filename = filename ?? '';
@@ -26,7 +26,7 @@ let DocumentationFile = class DocumentationFile extends BaseModel_1.BaseModel {
26
26
  exports.DocumentationFile = DocumentationFile;
27
27
  __decorate([
28
28
  (0, typeorm_1.Column)({ type: 'int', nullable: true }),
29
- __metadata("design:type", Number)
29
+ __metadata("design:type", Object)
30
30
  ], DocumentationFile.prototype, "project_id", void 0);
31
31
  __decorate([
32
32
  (0, typeorm_1.Column)({ type: 'int' }),
@@ -50,5 +50,5 @@ __decorate([
50
50
  ], DocumentationFile.prototype, "filetype", void 0);
51
51
  exports.DocumentationFile = DocumentationFile = __decorate([
52
52
  (0, typeorm_1.Entity)({ name: 'documentation_files' }),
53
- __metadata("design:paramtypes", [Number, Number, String, String, Number, String])
53
+ __metadata("design:paramtypes", [Object, Number, String, String, Number, String])
54
54
  ], DocumentationFile);
@@ -1,8 +1,9 @@
1
1
  import { BaseModel } from './BaseModel';
2
2
  export declare class DocumentationFolder extends BaseModel {
3
- project_id: number;
3
+ /** Null = shared documentation folder for all projects */
4
+ project_id: number | null;
4
5
  name: string;
5
6
  parent_folder_id: number | null;
6
7
  description: string;
7
- constructor(project_id?: number, name?: string, parent_folder_id?: number | null, description?: string);
8
+ constructor(project_id?: number | null, name?: string, parent_folder_id?: number | null, description?: string);
8
9
  }
@@ -15,7 +15,7 @@ const BaseModel_1 = require("./BaseModel");
15
15
  let DocumentationFolder = class DocumentationFolder extends BaseModel_1.BaseModel {
16
16
  constructor(project_id, name, parent_folder_id, description) {
17
17
  super();
18
- this.project_id = project_id ?? 0;
18
+ this.project_id = project_id ?? null;
19
19
  this.name = name ?? '';
20
20
  this.parent_folder_id = parent_folder_id ?? null;
21
21
  this.description = description ?? '';
@@ -23,8 +23,8 @@ let DocumentationFolder = class DocumentationFolder extends BaseModel_1.BaseMode
23
23
  };
24
24
  exports.DocumentationFolder = DocumentationFolder;
25
25
  __decorate([
26
- (0, typeorm_1.Column)({ type: 'int' }),
27
- __metadata("design:type", Number)
26
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
27
+ __metadata("design:type", Object)
28
28
  ], DocumentationFolder.prototype, "project_id", void 0);
29
29
  __decorate([
30
30
  (0, typeorm_1.Column)({ type: 'varchar', length: 255 }),
@@ -40,5 +40,5 @@ __decorate([
40
40
  ], DocumentationFolder.prototype, "description", void 0);
41
41
  exports.DocumentationFolder = DocumentationFolder = __decorate([
42
42
  (0, typeorm_1.Entity)({ name: 'documentation_folders' }),
43
- __metadata("design:paramtypes", [Number, String, Object, String])
43
+ __metadata("design:paramtypes", [Object, String, Object, String])
44
44
  ], DocumentationFolder);
@@ -6,5 +6,7 @@ export declare class ProjectContacts extends BaseModel {
6
6
  email_id: string;
7
7
  name: string;
8
8
  designation: string;
9
- constructor(project_id?: number, contact_type?: string, phone_number?: string, email_id?: string, name?: string, designation?: string);
9
+ /** Optional FK to departments.id */
10
+ department_id: number | null;
11
+ constructor(project_id?: number, contact_type?: string, phone_number?: string, email_id?: string, name?: string, designation?: string, department_id?: number | null);
10
12
  }
@@ -13,7 +13,7 @@ exports.ProjectContacts = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
15
  let ProjectContacts = class ProjectContacts extends BaseModel_1.BaseModel {
16
- constructor(project_id, contact_type, phone_number, email_id, name, designation) {
16
+ constructor(project_id, contact_type, phone_number, email_id, name, designation, department_id) {
17
17
  super();
18
18
  this.project_id = project_id ?? 0;
19
19
  this.contact_type = contact_type ?? '';
@@ -21,6 +21,7 @@ let ProjectContacts = class ProjectContacts extends BaseModel_1.BaseModel {
21
21
  this.email_id = email_id ?? '';
22
22
  this.name = name ?? '';
23
23
  this.designation = designation ?? '';
24
+ this.department_id = department_id ?? null;
24
25
  }
25
26
  };
26
27
  exports.ProjectContacts = ProjectContacts;
@@ -48,7 +49,11 @@ __decorate([
48
49
  (0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
49
50
  __metadata("design:type", String)
50
51
  ], ProjectContacts.prototype, "designation", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({ type: 'int', nullable: true }),
54
+ __metadata("design:type", Object)
55
+ ], ProjectContacts.prototype, "department_id", void 0);
51
56
  exports.ProjectContacts = ProjectContacts = __decorate([
52
57
  (0, typeorm_1.Entity)({ name: 'project_contacts' }),
53
- __metadata("design:paramtypes", [Number, String, String, String, String, String])
58
+ __metadata("design:paramtypes", [Number, String, String, String, String, String, Object])
54
59
  ], ProjectContacts);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.3.245",
3
+ "version": "1.3.248",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -4,7 +4,7 @@ import { BaseModel } from './BaseModel';
4
4
  @Entity({ name: 'documentation_files' })
5
5
  export class DocumentationFile extends BaseModel {
6
6
  @Column({ type: 'int', nullable: true })
7
- project_id: number;
7
+ project_id: number | null;
8
8
 
9
9
  @Column({ type: 'int' })
10
10
  folder_id: number;
@@ -22,7 +22,7 @@ export class DocumentationFile extends BaseModel {
22
22
  filetype: string;
23
23
 
24
24
  constructor(
25
- project_id?: number,
25
+ project_id?: number | null,
26
26
  folder_id?: number,
27
27
  file_path?: string,
28
28
  filename?: string,
@@ -30,7 +30,7 @@ export class DocumentationFile extends BaseModel {
30
30
  filetype?: string
31
31
  ) {
32
32
  super();
33
- this.project_id = project_id ?? 0;
33
+ this.project_id = project_id ?? null;
34
34
  this.folder_id = folder_id ?? 0;
35
35
  this.file_path = file_path ?? '';
36
36
  this.filename = filename ?? '';
@@ -3,8 +3,9 @@ import { BaseModel } from './BaseModel';
3
3
 
4
4
  @Entity({ name: 'documentation_folders' })
5
5
  export class DocumentationFolder extends BaseModel {
6
- @Column({ type: 'int' })
7
- project_id: number;
6
+ /** Null = shared documentation folder for all projects */
7
+ @Column({ type: 'int', nullable: true })
8
+ project_id: number | null;
8
9
 
9
10
  @Column({ type: 'varchar', length: 255 })
10
11
  name: string;
@@ -15,9 +16,9 @@ export class DocumentationFolder extends BaseModel {
15
16
  @Column({ type: 'text', nullable: true })
16
17
  description: string;
17
18
 
18
- constructor(project_id?: number, name?: string, parent_folder_id?: number | null, description?: string) {
19
+ constructor(project_id?: number | null, name?: string, parent_folder_id?: number | null, description?: string) {
19
20
  super();
20
- this.project_id = project_id ?? 0;
21
+ this.project_id = project_id ?? null;
21
22
  this.name = name ?? '';
22
23
  this.parent_folder_id = parent_folder_id ?? null;
23
24
  this.description = description ?? '';
@@ -21,13 +21,18 @@ export class ProjectContacts extends BaseModel {
21
21
  @Column({ type: 'varchar', length: 255, nullable: true })
22
22
  designation: string;
23
23
 
24
+ /** Optional FK to departments.id */
25
+ @Column({ type: 'int', nullable: true })
26
+ department_id: number | null;
27
+
24
28
  constructor(
25
29
  project_id?: number,
26
30
  contact_type?: string,
27
31
  phone_number?: string,
28
32
  email_id?: string,
29
33
  name?: string,
30
- designation?: string
34
+ designation?: string,
35
+ department_id?: number | null
31
36
  ) {
32
37
  super();
33
38
  this.project_id = project_id ?? 0;
@@ -36,5 +41,6 @@ export class ProjectContacts extends BaseModel {
36
41
  this.email_id = email_id ?? '';
37
42
  this.name = name ?? '';
38
43
  this.designation = designation ?? '';
44
+ this.department_id = department_id ?? null;
39
45
  }
40
46
  }