@platform-modules/foreign-ministry 1.1.29 → 1.1.30

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,4 +1,5 @@
1
1
  import { BaseModel } from './BaseModel';
2
+ import { EarlyCheckoutApprovalStatus } from './EarlyCheckoutApprovalModel';
2
3
  export declare enum EarlyCheckoutMessageType {
3
4
  TEXT = "text",
4
5
  IMAGE = "image",
@@ -11,6 +12,9 @@ export declare class EarlyCheckoutRequestChat extends BaseModel {
11
12
  service_id: number | null;
12
13
  sub_service_id: number | null;
13
14
  user_id: number;
15
+ role_id: number;
14
16
  message: string;
15
17
  messageType: EarlyCheckoutMessageType;
18
+ status: EarlyCheckoutApprovalStatus;
19
+ constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: EarlyCheckoutMessageType, status?: EarlyCheckoutApprovalStatus);
16
20
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.EarlyCheckoutRequestChat = exports.EarlyCheckoutMessageType = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
+ const EarlyCheckoutApprovalModel_1 = require("./EarlyCheckoutApprovalModel");
15
16
  var EarlyCheckoutMessageType;
16
17
  (function (EarlyCheckoutMessageType) {
17
18
  EarlyCheckoutMessageType["TEXT"] = "text";
@@ -21,6 +22,17 @@ var EarlyCheckoutMessageType;
21
22
  EarlyCheckoutMessageType["LINK"] = "link";
22
23
  })(EarlyCheckoutMessageType || (exports.EarlyCheckoutMessageType = EarlyCheckoutMessageType = {}));
23
24
  let EarlyCheckoutRequestChat = class EarlyCheckoutRequestChat extends BaseModel_1.BaseModel {
25
+ constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
26
+ super();
27
+ this.request_id = request_id;
28
+ this.service_id = service_id || null;
29
+ this.sub_service_id = sub_service_id || null;
30
+ this.user_id = user_id;
31
+ this.role_id = role_id;
32
+ this.message = message;
33
+ this.messageType = messageType || EarlyCheckoutMessageType.TEXT;
34
+ this.status = status || EarlyCheckoutApprovalModel_1.EarlyCheckoutApprovalStatus.PENDING;
35
+ }
24
36
  };
25
37
  exports.EarlyCheckoutRequestChat = EarlyCheckoutRequestChat;
26
38
  __decorate([
@@ -39,14 +51,28 @@ __decorate([
39
51
  (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
40
52
  __metadata("design:type", Number)
41
53
  ], EarlyCheckoutRequestChat.prototype, "user_id", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
56
+ __metadata("design:type", Number)
57
+ ], EarlyCheckoutRequestChat.prototype, "role_id", void 0);
42
58
  __decorate([
43
59
  (0, typeorm_1.Column)({ type: 'text', nullable: false }),
44
60
  __metadata("design:type", String)
45
61
  ], EarlyCheckoutRequestChat.prototype, "message", void 0);
46
62
  __decorate([
47
- (0, typeorm_1.Column)({ type: 'enum', enum: EarlyCheckoutMessageType, default: EarlyCheckoutMessageType.TEXT, nullable: false }),
63
+ (0, typeorm_1.Column)({
64
+ type: 'enum',
65
+ enum: EarlyCheckoutMessageType,
66
+ default: EarlyCheckoutMessageType.TEXT,
67
+ nullable: false
68
+ }),
48
69
  __metadata("design:type", String)
49
70
  ], EarlyCheckoutRequestChat.prototype, "messageType", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.Column)({ type: 'enum', enum: EarlyCheckoutApprovalModel_1.EarlyCheckoutApprovalStatus, default: EarlyCheckoutApprovalModel_1.EarlyCheckoutApprovalStatus.PENDING, nullable: false }),
73
+ __metadata("design:type", String)
74
+ ], EarlyCheckoutRequestChat.prototype, "status", void 0);
50
75
  exports.EarlyCheckoutRequestChat = EarlyCheckoutRequestChat = __decorate([
51
- (0, typeorm_1.Entity)({ name: 'early_checkout_chats' })
76
+ (0, typeorm_1.Entity)({ name: 'early_checkout_chats' }),
77
+ __metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
52
78
  ], EarlyCheckoutRequestChat);
@@ -69,7 +69,7 @@ __decorate([
69
69
  __metadata("design:type", Date)
70
70
  ], ReimbursementRequests.prototype, "payment_date", void 0);
71
71
  __decorate([
72
- (0, typeorm_1.Column)({ type: 'varchar', nullable: false }),
72
+ (0, typeorm_1.Column)({ type: 'varchar', nullable: true }),
73
73
  __metadata("design:type", String)
74
74
  ], ReimbursementRequests.prototype, "currency", void 0);
75
75
  __decorate([
@@ -1,4 +1,5 @@
1
1
  import { BaseModel } from './BaseModel';
2
+ import { StayAfterHoursApprovalStatus } from './StayAfterHoursApprovalModel';
2
3
  export declare enum StayAfterHoursMessageType {
3
4
  TEXT = "text",
4
5
  IMAGE = "image",
@@ -11,6 +12,9 @@ export declare class StayAfterHoursRequestChat extends BaseModel {
11
12
  service_id: number | null;
12
13
  sub_service_id: number | null;
13
14
  user_id: number;
15
+ role_id: number;
14
16
  message: string;
15
17
  messageType: StayAfterHoursMessageType;
18
+ status: StayAfterHoursApprovalStatus;
19
+ constructor(request_id: number, user_id: number, role_id: number, message: string, service_id?: number, sub_service_id?: number, messageType?: StayAfterHoursMessageType, status?: StayAfterHoursApprovalStatus);
16
20
  }
@@ -12,6 +12,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.StayAfterHoursRequestChat = exports.StayAfterHoursMessageType = void 0;
13
13
  const typeorm_1 = require("typeorm");
14
14
  const BaseModel_1 = require("./BaseModel");
15
+ const StayAfterHoursApprovalModel_1 = require("./StayAfterHoursApprovalModel");
15
16
  var StayAfterHoursMessageType;
16
17
  (function (StayAfterHoursMessageType) {
17
18
  StayAfterHoursMessageType["TEXT"] = "text";
@@ -21,6 +22,17 @@ var StayAfterHoursMessageType;
21
22
  StayAfterHoursMessageType["LINK"] = "link";
22
23
  })(StayAfterHoursMessageType || (exports.StayAfterHoursMessageType = StayAfterHoursMessageType = {}));
23
24
  let StayAfterHoursRequestChat = class StayAfterHoursRequestChat extends BaseModel_1.BaseModel {
25
+ constructor(request_id, user_id, role_id, message, service_id, sub_service_id, messageType, status) {
26
+ super();
27
+ this.request_id = request_id;
28
+ this.service_id = service_id || null;
29
+ this.sub_service_id = sub_service_id || null;
30
+ this.user_id = user_id;
31
+ this.role_id = role_id;
32
+ this.message = message;
33
+ this.messageType = messageType || StayAfterHoursMessageType.TEXT;
34
+ this.status = status || StayAfterHoursApprovalModel_1.StayAfterHoursApprovalStatus.PENDING;
35
+ }
24
36
  };
25
37
  exports.StayAfterHoursRequestChat = StayAfterHoursRequestChat;
26
38
  __decorate([
@@ -39,14 +51,28 @@ __decorate([
39
51
  (0, typeorm_1.Column)({ type: 'integer', nullable: false }),
40
52
  __metadata("design:type", Number)
41
53
  ], StayAfterHoursRequestChat.prototype, "user_id", void 0);
54
+ __decorate([
55
+ (0, typeorm_1.Column)({ type: 'integer', nullable: true }),
56
+ __metadata("design:type", Number)
57
+ ], StayAfterHoursRequestChat.prototype, "role_id", void 0);
42
58
  __decorate([
43
59
  (0, typeorm_1.Column)({ type: 'text', nullable: false }),
44
60
  __metadata("design:type", String)
45
61
  ], StayAfterHoursRequestChat.prototype, "message", void 0);
46
62
  __decorate([
47
- (0, typeorm_1.Column)({ type: 'enum', enum: StayAfterHoursMessageType, default: StayAfterHoursMessageType.TEXT, nullable: false }),
63
+ (0, typeorm_1.Column)({
64
+ type: 'enum',
65
+ enum: StayAfterHoursMessageType,
66
+ default: StayAfterHoursMessageType.TEXT,
67
+ nullable: false
68
+ }),
48
69
  __metadata("design:type", String)
49
70
  ], StayAfterHoursRequestChat.prototype, "messageType", void 0);
71
+ __decorate([
72
+ (0, typeorm_1.Column)({ type: 'enum', enum: StayAfterHoursApprovalModel_1.StayAfterHoursApprovalStatus, default: StayAfterHoursApprovalModel_1.StayAfterHoursApprovalStatus.PENDING, nullable: false }),
73
+ __metadata("design:type", String)
74
+ ], StayAfterHoursRequestChat.prototype, "status", void 0);
50
75
  exports.StayAfterHoursRequestChat = StayAfterHoursRequestChat = __decorate([
51
- (0, typeorm_1.Entity)({ name: 'stay_after_hours_chats' })
76
+ (0, typeorm_1.Entity)({ name: 'stay_after_hours_chats' }),
77
+ __metadata("design:paramtypes", [Number, Number, Number, String, Number, Number, String, String])
52
78
  ], StayAfterHoursRequestChat);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platform-modules/foreign-ministry",
3
- "version": "1.1.29",
3
+ "version": "1.1.30",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -1,5 +1,6 @@
1
1
  import { Column, Entity } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
+ import { EarlyCheckoutApprovalStatus } from './EarlyCheckoutApprovalModel';
3
4
 
4
5
  export enum EarlyCheckoutMessageType {
5
6
  TEXT = "text",
@@ -24,11 +25,43 @@ export class EarlyCheckoutRequestChat extends BaseModel {
24
25
  @Column({ type: 'integer', nullable: false })
25
26
  user_id: number;
26
27
 
28
+ @Column({ type: 'integer', nullable: true })
29
+ role_id: number;
30
+
27
31
  @Column({ type: 'text', nullable: false })
28
32
  message: string;
29
33
 
30
- @Column({ type: 'enum', enum: EarlyCheckoutMessageType, default: EarlyCheckoutMessageType.TEXT, nullable: false })
34
+ @Column({
35
+ type: 'enum',
36
+ enum: EarlyCheckoutMessageType,
37
+ default: EarlyCheckoutMessageType.TEXT,
38
+ nullable: false
39
+ })
31
40
  messageType: EarlyCheckoutMessageType;
41
+
42
+ @Column({ type: 'enum', enum: EarlyCheckoutApprovalStatus, default: EarlyCheckoutApprovalStatus.PENDING, nullable: false })
43
+ status: EarlyCheckoutApprovalStatus;
44
+
45
+ constructor(
46
+ request_id: number,
47
+ user_id: number,
48
+ role_id: number,
49
+ message: string,
50
+ service_id?: number,
51
+ sub_service_id?: number,
52
+ messageType?: EarlyCheckoutMessageType,
53
+ status?: EarlyCheckoutApprovalStatus
54
+ ) {
55
+ super();
56
+ this.request_id = request_id;
57
+ this.service_id = service_id || null;
58
+ this.sub_service_id = sub_service_id || null;
59
+ this.user_id = user_id;
60
+ this.role_id = role_id;
61
+ this.message = message;
62
+ this.messageType = messageType || EarlyCheckoutMessageType.TEXT;
63
+ this.status = status || EarlyCheckoutApprovalStatus.PENDING;
64
+ }
32
65
  }
33
66
 
34
67
 
@@ -34,7 +34,7 @@ export class ReimbursementRequests extends BaseModel {
34
34
  @Column({ type: 'date', nullable: true })
35
35
  payment_date: Date;
36
36
 
37
- @Column({ type: 'varchar', nullable: false })
37
+ @Column({ type: 'varchar', nullable: true })
38
38
  currency : string;
39
39
 
40
40
  @ManyToOne(() => FinancialRequests, fr => fr.reimbursementRequests)
@@ -1,5 +1,6 @@
1
1
  import { Column, Entity } from "typeorm";
2
2
  import { BaseModel } from './BaseModel';
3
+ import { StayAfterHoursApprovalStatus } from './StayAfterHoursApprovalModel';
3
4
 
4
5
  export enum StayAfterHoursMessageType {
5
6
  TEXT = "text",
@@ -24,10 +25,42 @@ export class StayAfterHoursRequestChat extends BaseModel {
24
25
  @Column({ type: 'integer', nullable: false })
25
26
  user_id: number;
26
27
 
28
+ @Column({ type: 'integer', nullable: true })
29
+ role_id: number;
30
+
27
31
  @Column({ type: 'text', nullable: false })
28
32
  message: string;
29
33
 
30
- @Column({ type: 'enum', enum: StayAfterHoursMessageType, default: StayAfterHoursMessageType.TEXT, nullable: false })
34
+ @Column({
35
+ type: 'enum',
36
+ enum: StayAfterHoursMessageType,
37
+ default: StayAfterHoursMessageType.TEXT,
38
+ nullable: false
39
+ })
31
40
  messageType: StayAfterHoursMessageType;
41
+
42
+ @Column({ type: 'enum', enum: StayAfterHoursApprovalStatus, default: StayAfterHoursApprovalStatus.PENDING, nullable: false })
43
+ status: StayAfterHoursApprovalStatus;
44
+
45
+ constructor(
46
+ request_id: number,
47
+ user_id: number,
48
+ role_id: number,
49
+ message: string,
50
+ service_id?: number,
51
+ sub_service_id?: number,
52
+ messageType?: StayAfterHoursMessageType,
53
+ status?: StayAfterHoursApprovalStatus
54
+ ) {
55
+ super();
56
+ this.request_id = request_id;
57
+ this.service_id = service_id || null;
58
+ this.sub_service_id = sub_service_id || null;
59
+ this.user_id = user_id;
60
+ this.role_id = role_id;
61
+ this.message = message;
62
+ this.messageType = messageType || StayAfterHoursMessageType.TEXT;
63
+ this.status = status || StayAfterHoursApprovalStatus.PENDING;
64
+ }
32
65
  }
33
66