@platform-modules/foreign-ministry 1.0.65 → 1.0.67
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 +12 -6
- package/dist/index.d.ts +6 -3
- package/dist/index.js +6 -3
- package/dist/models/ConversationParticipantsV2Model.d.ts +15 -0
- package/dist/models/ConversationParticipantsV2Model.js +69 -0
- package/dist/models/ConversationsV2Model.d.ts +15 -0
- package/dist/models/ConversationsV2Model.js +57 -0
- package/dist/models/HelpContentMappedCategoriesModel.d.ts +6 -0
- package/dist/models/HelpContentMappedCategoriesModel.js +34 -0
- package/dist/models/HelpContentMappedTagsModel.d.ts +6 -0
- package/dist/models/HelpContentMappedTagsModel.js +34 -0
- package/dist/models/HelpContentTagsModel.d.ts +5 -0
- package/dist/models/HelpContentTagsModel.js +29 -0
- package/dist/models/MessageReadStatusModel.d.ts +11 -0
- package/dist/models/MessageReadStatusModel.js +51 -0
- package/dist/models/MessagesV2Model.d.ts +24 -0
- package/dist/models/MessagesV2Model.js +89 -0
- package/dist/models/questionTagsModel.d.ts +6 -0
- package/dist/models/{UserShiftModel.js → questionTagsModel.js} +13 -13
- package/dist/models/role.d.ts +2 -7
- package/dist/models/role.js +6 -1
- package/dist/models/roleRightsModel.d.ts +17 -0
- package/dist/models/roleRightsModel.js +49 -0
- package/dist/models/userRolesModel.d.ts +17 -0
- package/dist/models/userRolesModel.js +49 -0
- package/package.json +1 -1
- package/src/data-source.ts +12 -6
- package/src/index.ts +6 -3
- package/src/models/ConversationParticipantsV2Model.ts +48 -0
- package/src/models/ConversationsV2Model.ts +41 -0
- package/src/models/MessageReadStatusModel.ts +34 -0
- package/src/models/MessagesV2Model.ts +66 -0
- package/src/models/role.ts +5 -7
- package/src/models/roleRightsModel.ts +35 -0
- package/src/models/userRolesModel.ts +35 -0
- package/dist/models/AttendanceModel.d.ts +0 -19
- package/dist/models/AttendanceModel.js +0 -77
- package/dist/models/LeaveApprovalDetailsModel.d.ts +0 -13
- package/dist/models/LeaveApprovalDetailsModel.js +0 -51
- package/dist/models/LeaveApprovalMatrixModel.d.ts +0 -7
- package/dist/models/LeaveApprovalMatrixModel.js +0 -40
- package/dist/models/ShifttimesModel.d.ts +0 -11
- package/dist/models/ShifttimesModel.js +0 -59
- package/dist/models/UserShiftModel.d.ts +0 -6
- package/src/models/AttendanceModel.ts +0 -64
- package/src/models/ShifttimesModel.ts +0 -46
- package/src/models/UserShiftModel.ts +0 -18
package/.env
CHANGED
package/dist/data-source.js
CHANGED
|
@@ -42,9 +42,12 @@ const HelpContentModel_1 = require("./models/HelpContentModel");
|
|
|
42
42
|
const HelpContentCategoryModel_1 = require("./models/HelpContentCategoryModel");
|
|
43
43
|
const HelpContentAttachmentModel_1 = require("./models/HelpContentAttachmentModel");
|
|
44
44
|
const contactInfoModel_1 = require("./models/contactInfoModel");
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
45
|
+
const ConversationsV2Model_1 = require("./models/ConversationsV2Model");
|
|
46
|
+
const ConversationParticipantsV2Model_1 = require("./models/ConversationParticipantsV2Model");
|
|
47
|
+
const MessagesV2Model_1 = require("./models/MessagesV2Model");
|
|
48
|
+
const MessageReadStatusModel_1 = require("./models/MessageReadStatusModel");
|
|
49
|
+
const userRolesModel_1 = require("./models/userRolesModel");
|
|
50
|
+
const roleRightsModel_1 = require("./models/roleRightsModel");
|
|
48
51
|
exports.AppDataSource = new typeorm_1.DataSource({
|
|
49
52
|
type: 'postgres',
|
|
50
53
|
host: process.env.DB_HOST || 'localhost',
|
|
@@ -92,8 +95,11 @@ exports.AppDataSource = new typeorm_1.DataSource({
|
|
|
92
95
|
HelpContentCategoryModel_1.HelpContentCategories,
|
|
93
96
|
HelpContentAttachmentModel_1.HelpContentAttachments,
|
|
94
97
|
contactInfoModel_1.ContactInfo,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
ConversationsV2Model_1.ConversationsV2,
|
|
99
|
+
ConversationParticipantsV2Model_1.ConversationParticipantsV2,
|
|
100
|
+
MessagesV2Model_1.MessagesV2,
|
|
101
|
+
MessageReadStatusModel_1.MessageReadStatus,
|
|
102
|
+
userRolesModel_1.UserRole,
|
|
103
|
+
roleRightsModel_1.RoleRights
|
|
98
104
|
],
|
|
99
105
|
});
|
package/dist/index.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export * from './models/FaqsReactionsModel';
|
|
|
22
22
|
export * from './models/ConversationModel';
|
|
23
23
|
export * from './models/ConversationParticipantModel';
|
|
24
24
|
export * from './models/MessageModel';
|
|
25
|
+
export * from './models/ConversationsV2Model';
|
|
26
|
+
export * from './models/ConversationParticipantsV2Model';
|
|
27
|
+
export * from './models/MessagesV2Model';
|
|
28
|
+
export * from './models/MessageReadStatusModel';
|
|
25
29
|
export * from './models/FMServices';
|
|
26
30
|
export * from './models/FMSubservices';
|
|
27
31
|
export * from './models/serviceBookmarksModel';
|
|
@@ -34,7 +38,6 @@ export * from './models/PostReactionsModel';
|
|
|
34
38
|
export * from './models/HelpContentModel';
|
|
35
39
|
export * from './models/HelpContentCategoryModel';
|
|
36
40
|
export * from './models/HelpContentAttachmentModel';
|
|
37
|
-
export * from './models/ShifttimesModel';
|
|
38
|
-
export * from './models/AttendanceModel';
|
|
39
41
|
export * from './models/contactInfoModel';
|
|
40
|
-
export * from './models/
|
|
42
|
+
export * from './models/userRolesModel';
|
|
43
|
+
export * from './models/roleRightsModel';
|
package/dist/index.js
CHANGED
|
@@ -38,6 +38,10 @@ __exportStar(require("./models/FaqsReactionsModel"), exports);
|
|
|
38
38
|
__exportStar(require("./models/ConversationModel"), exports);
|
|
39
39
|
__exportStar(require("./models/ConversationParticipantModel"), exports);
|
|
40
40
|
__exportStar(require("./models/MessageModel"), exports);
|
|
41
|
+
__exportStar(require("./models/ConversationsV2Model"), exports);
|
|
42
|
+
__exportStar(require("./models/ConversationParticipantsV2Model"), exports);
|
|
43
|
+
__exportStar(require("./models/MessagesV2Model"), exports);
|
|
44
|
+
__exportStar(require("./models/MessageReadStatusModel"), exports);
|
|
41
45
|
__exportStar(require("./models/FMServices"), exports);
|
|
42
46
|
__exportStar(require("./models/FMSubservices"), exports);
|
|
43
47
|
__exportStar(require("./models/serviceBookmarksModel"), exports);
|
|
@@ -50,7 +54,6 @@ __exportStar(require("./models/PostReactionsModel"), exports);
|
|
|
50
54
|
__exportStar(require("./models/HelpContentModel"), exports);
|
|
51
55
|
__exportStar(require("./models/HelpContentCategoryModel"), exports);
|
|
52
56
|
__exportStar(require("./models/HelpContentAttachmentModel"), exports);
|
|
53
|
-
__exportStar(require("./models/ShifttimesModel"), exports);
|
|
54
|
-
__exportStar(require("./models/AttendanceModel"), exports);
|
|
55
57
|
__exportStar(require("./models/contactInfoModel"), exports);
|
|
56
|
-
__exportStar(require("./models/
|
|
58
|
+
__exportStar(require("./models/userRolesModel"), exports);
|
|
59
|
+
__exportStar(require("./models/roleRightsModel"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { ConversationsV2 } from './ConversationsV2Model';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
export declare class ConversationParticipantsV2 extends BaseModel {
|
|
5
|
+
conversation_id: number;
|
|
6
|
+
user_id: number;
|
|
7
|
+
joined_at: Date;
|
|
8
|
+
left_at?: Date;
|
|
9
|
+
is_admin: boolean;
|
|
10
|
+
unread_count: number;
|
|
11
|
+
last_read_at?: Date;
|
|
12
|
+
conversation?: ConversationsV2;
|
|
13
|
+
user?: User;
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
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.ConversationParticipantsV2 = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const ConversationsV2Model_1 = require("./ConversationsV2Model");
|
|
16
|
+
const user_1 = require("./user");
|
|
17
|
+
let ConversationParticipantsV2 = class ConversationParticipantsV2 extends BaseModel_1.BaseModel {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.conversation_id = 0;
|
|
21
|
+
this.user_id = 0;
|
|
22
|
+
this.joined_at = new Date();
|
|
23
|
+
this.is_admin = false;
|
|
24
|
+
this.unread_count = 0;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
exports.ConversationParticipantsV2 = ConversationParticipantsV2;
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], ConversationParticipantsV2.prototype, "conversation_id", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
34
|
+
__metadata("design:type", Number)
|
|
35
|
+
], ConversationParticipantsV2.prototype, "user_id", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
38
|
+
__metadata("design:type", Date)
|
|
39
|
+
], ConversationParticipantsV2.prototype, "joined_at", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
42
|
+
__metadata("design:type", Date)
|
|
43
|
+
], ConversationParticipantsV2.prototype, "left_at", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, typeorm_1.Column)({ type: 'boolean', default: false }),
|
|
46
|
+
__metadata("design:type", Boolean)
|
|
47
|
+
], ConversationParticipantsV2.prototype, "is_admin", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, typeorm_1.Column)({ type: 'int', default: 0 }),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], ConversationParticipantsV2.prototype, "unread_count", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ type: 'timestamp', nullable: true }),
|
|
54
|
+
__metadata("design:type", Date)
|
|
55
|
+
], ConversationParticipantsV2.prototype, "last_read_at", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.ManyToOne)(() => ConversationsV2Model_1.ConversationsV2, conversation => conversation.participants),
|
|
58
|
+
(0, typeorm_1.JoinColumn)({ name: 'conversation_id' }),
|
|
59
|
+
__metadata("design:type", ConversationsV2Model_1.ConversationsV2)
|
|
60
|
+
], ConversationParticipantsV2.prototype, "conversation", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.ManyToOne)(() => user_1.User),
|
|
63
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
64
|
+
__metadata("design:type", user_1.User)
|
|
65
|
+
], ConversationParticipantsV2.prototype, "user", void 0);
|
|
66
|
+
exports.ConversationParticipantsV2 = ConversationParticipantsV2 = __decorate([
|
|
67
|
+
(0, typeorm_1.Entity)({ name: 'conversation_participants_v2' }),
|
|
68
|
+
__metadata("design:paramtypes", [])
|
|
69
|
+
], ConversationParticipantsV2);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { ConversationParticipantsV2 } from './ConversationParticipantsV2Model';
|
|
3
|
+
import { MessagesV2 } from './MessagesV2Model';
|
|
4
|
+
export declare enum ConversationTypeV2 {
|
|
5
|
+
DIRECT = "direct",
|
|
6
|
+
GROUP = "group"
|
|
7
|
+
}
|
|
8
|
+
export declare class ConversationsV2 extends BaseModel {
|
|
9
|
+
conversation_type: ConversationTypeV2;
|
|
10
|
+
conversation_name?: string;
|
|
11
|
+
last_message_at: Date;
|
|
12
|
+
participants?: ConversationParticipantsV2[];
|
|
13
|
+
messages?: MessagesV2[];
|
|
14
|
+
constructor();
|
|
15
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.ConversationsV2 = exports.ConversationTypeV2 = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const ConversationParticipantsV2Model_1 = require("./ConversationParticipantsV2Model");
|
|
16
|
+
const MessagesV2Model_1 = require("./MessagesV2Model");
|
|
17
|
+
var ConversationTypeV2;
|
|
18
|
+
(function (ConversationTypeV2) {
|
|
19
|
+
ConversationTypeV2["DIRECT"] = "direct";
|
|
20
|
+
ConversationTypeV2["GROUP"] = "group";
|
|
21
|
+
})(ConversationTypeV2 || (exports.ConversationTypeV2 = ConversationTypeV2 = {}));
|
|
22
|
+
let ConversationsV2 = class ConversationsV2 extends BaseModel_1.BaseModel {
|
|
23
|
+
constructor() {
|
|
24
|
+
super();
|
|
25
|
+
this.conversation_type = ConversationTypeV2.DIRECT;
|
|
26
|
+
this.last_message_at = new Date();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.ConversationsV2 = ConversationsV2;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({
|
|
32
|
+
type: 'enum',
|
|
33
|
+
enum: ConversationTypeV2,
|
|
34
|
+
default: ConversationTypeV2.DIRECT
|
|
35
|
+
}),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ConversationsV2.prototype, "conversation_type", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ConversationsV2.prototype, "conversation_name", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
44
|
+
__metadata("design:type", Date)
|
|
45
|
+
], ConversationsV2.prototype, "last_message_at", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.OneToMany)(() => ConversationParticipantsV2Model_1.ConversationParticipantsV2, participant => participant.conversation),
|
|
48
|
+
__metadata("design:type", Array)
|
|
49
|
+
], ConversationsV2.prototype, "participants", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, typeorm_1.OneToMany)(() => MessagesV2Model_1.MessagesV2, message => message.conversation),
|
|
52
|
+
__metadata("design:type", Array)
|
|
53
|
+
], ConversationsV2.prototype, "messages", void 0);
|
|
54
|
+
exports.ConversationsV2 = ConversationsV2 = __decorate([
|
|
55
|
+
(0, typeorm_1.Entity)({ name: 'conversations_v2' }),
|
|
56
|
+
__metadata("design:paramtypes", [])
|
|
57
|
+
], ConversationsV2);
|
|
@@ -0,0 +1,34 @@
|
|
|
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.HelpContentMappedCategories = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpContentMappedCategories = class HelpContentMappedCategories extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(help_content_category_Id, help_content_Id) {
|
|
17
|
+
super();
|
|
18
|
+
this.help_content_category_Id = help_content_category_Id,
|
|
19
|
+
this.help_content_Id = help_content_Id;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.HelpContentMappedCategories = HelpContentMappedCategories;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], HelpContentMappedCategories.prototype, "help_content_category_Id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], HelpContentMappedCategories.prototype, "help_content_Id", void 0);
|
|
31
|
+
exports.HelpContentMappedCategories = HelpContentMappedCategories = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'help_content_mapped_categories' }),
|
|
33
|
+
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
+
], HelpContentMappedCategories);
|
|
@@ -0,0 +1,34 @@
|
|
|
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.HelpContentMappedTags = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpContentMappedTags = class HelpContentMappedTags extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(help_content_tag_Id, help_content_Id) {
|
|
17
|
+
super();
|
|
18
|
+
this.help_content_tag_Id = help_content_tag_Id,
|
|
19
|
+
this.help_content_Id = help_content_Id;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.HelpContentMappedTags = HelpContentMappedTags;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], HelpContentMappedTags.prototype, "help_content_tag_Id", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
|
+
__metadata("design:type", Number)
|
|
30
|
+
], HelpContentMappedTags.prototype, "help_content_Id", void 0);
|
|
31
|
+
exports.HelpContentMappedTags = HelpContentMappedTags = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'help_content_mapped_tags' }),
|
|
33
|
+
__metadata("design:paramtypes", [Number, Number])
|
|
34
|
+
], HelpContentMappedTags);
|
|
@@ -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.HelpContentTags = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
let HelpContentTags = class HelpContentTags extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name) {
|
|
17
|
+
super();
|
|
18
|
+
this.name = name;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.HelpContentTags = HelpContentTags;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], HelpContentTags.prototype, "name", void 0);
|
|
26
|
+
exports.HelpContentTags = HelpContentTags = __decorate([
|
|
27
|
+
(0, typeorm_1.Entity)({ name: 'help_content_tags' }),
|
|
28
|
+
__metadata("design:paramtypes", [String])
|
|
29
|
+
], HelpContentTags);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { MessagesV2 } from './MessagesV2Model';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
export declare class MessageReadStatus extends BaseModel {
|
|
5
|
+
message_id: number;
|
|
6
|
+
user_id: number;
|
|
7
|
+
read_at: Date;
|
|
8
|
+
message?: MessagesV2;
|
|
9
|
+
user?: User;
|
|
10
|
+
constructor();
|
|
11
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
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.MessageReadStatus = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const MessagesV2Model_1 = require("./MessagesV2Model");
|
|
16
|
+
const user_1 = require("./user");
|
|
17
|
+
let MessageReadStatus = class MessageReadStatus extends BaseModel_1.BaseModel {
|
|
18
|
+
constructor() {
|
|
19
|
+
super();
|
|
20
|
+
this.message_id = 0;
|
|
21
|
+
this.user_id = 0;
|
|
22
|
+
this.read_at = new Date();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
exports.MessageReadStatus = MessageReadStatus;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], MessageReadStatus.prototype, "message_id", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], MessageReadStatus.prototype, "user_id", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' }),
|
|
36
|
+
__metadata("design:type", Date)
|
|
37
|
+
], MessageReadStatus.prototype, "read_at", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.ManyToOne)(() => MessagesV2Model_1.MessagesV2, message => message.readStatuses),
|
|
40
|
+
(0, typeorm_1.JoinColumn)({ name: 'message_id' }),
|
|
41
|
+
__metadata("design:type", MessagesV2Model_1.MessagesV2)
|
|
42
|
+
], MessageReadStatus.prototype, "message", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.ManyToOne)(() => user_1.User),
|
|
45
|
+
(0, typeorm_1.JoinColumn)({ name: 'user_id' }),
|
|
46
|
+
__metadata("design:type", user_1.User)
|
|
47
|
+
], MessageReadStatus.prototype, "user", void 0);
|
|
48
|
+
exports.MessageReadStatus = MessageReadStatus = __decorate([
|
|
49
|
+
(0, typeorm_1.Entity)({ name: 'message_read_status' }),
|
|
50
|
+
__metadata("design:paramtypes", [])
|
|
51
|
+
], MessageReadStatus);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseModel } from './BaseModel';
|
|
2
|
+
import { ConversationsV2 } from './ConversationsV2Model';
|
|
3
|
+
import { User } from './user';
|
|
4
|
+
import { MessageReadStatus } from './MessageReadStatusModel';
|
|
5
|
+
export declare enum MessageTypeV2 {
|
|
6
|
+
TEXT = "text",
|
|
7
|
+
IMAGE = "image",
|
|
8
|
+
FILE = "file",
|
|
9
|
+
VIDEO = "video"
|
|
10
|
+
}
|
|
11
|
+
export declare class MessagesV2 extends BaseModel {
|
|
12
|
+
conversation_id: number;
|
|
13
|
+
sender_id: number;
|
|
14
|
+
message_type: MessageTypeV2;
|
|
15
|
+
content: string;
|
|
16
|
+
attachment_url?: string;
|
|
17
|
+
attachment_name?: string;
|
|
18
|
+
reply_to_message_id?: number;
|
|
19
|
+
conversation?: ConversationsV2;
|
|
20
|
+
sender?: User;
|
|
21
|
+
replyToMessage?: MessagesV2;
|
|
22
|
+
readStatuses?: MessageReadStatus[];
|
|
23
|
+
constructor();
|
|
24
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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.MessagesV2 = exports.MessageTypeV2 = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const BaseModel_1 = require("./BaseModel");
|
|
15
|
+
const ConversationsV2Model_1 = require("./ConversationsV2Model");
|
|
16
|
+
const user_1 = require("./user");
|
|
17
|
+
const MessageReadStatusModel_1 = require("./MessageReadStatusModel");
|
|
18
|
+
var MessageTypeV2;
|
|
19
|
+
(function (MessageTypeV2) {
|
|
20
|
+
MessageTypeV2["TEXT"] = "text";
|
|
21
|
+
MessageTypeV2["IMAGE"] = "image";
|
|
22
|
+
MessageTypeV2["FILE"] = "file";
|
|
23
|
+
MessageTypeV2["VIDEO"] = "video";
|
|
24
|
+
})(MessageTypeV2 || (exports.MessageTypeV2 = MessageTypeV2 = {}));
|
|
25
|
+
let MessagesV2 = class MessagesV2 extends BaseModel_1.BaseModel {
|
|
26
|
+
constructor() {
|
|
27
|
+
super();
|
|
28
|
+
this.conversation_id = 0;
|
|
29
|
+
this.sender_id = 0;
|
|
30
|
+
this.message_type = MessageTypeV2.TEXT;
|
|
31
|
+
this.content = '';
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
exports.MessagesV2 = MessagesV2;
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], MessagesV2.prototype, "conversation_id", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: false }),
|
|
41
|
+
__metadata("design:type", Number)
|
|
42
|
+
], MessagesV2.prototype, "sender_id", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)({
|
|
45
|
+
type: 'enum',
|
|
46
|
+
enum: MessageTypeV2,
|
|
47
|
+
default: MessageTypeV2.TEXT
|
|
48
|
+
}),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], MessagesV2.prototype, "message_type", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ type: 'text', nullable: false }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], MessagesV2.prototype, "content", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 500, nullable: true }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], MessagesV2.prototype, "attachment_url", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ type: 'varchar', length: 255, nullable: true }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], MessagesV2.prototype, "attachment_name", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
65
|
+
__metadata("design:type", Number)
|
|
66
|
+
], MessagesV2.prototype, "reply_to_message_id", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.ManyToOne)(() => ConversationsV2Model_1.ConversationsV2, conversation => conversation.messages),
|
|
69
|
+
(0, typeorm_1.JoinColumn)({ name: 'conversation_id' }),
|
|
70
|
+
__metadata("design:type", ConversationsV2Model_1.ConversationsV2)
|
|
71
|
+
], MessagesV2.prototype, "conversation", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, typeorm_1.ManyToOne)(() => user_1.User),
|
|
74
|
+
(0, typeorm_1.JoinColumn)({ name: 'sender_id' }),
|
|
75
|
+
__metadata("design:type", user_1.User)
|
|
76
|
+
], MessagesV2.prototype, "sender", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.ManyToOne)(() => MessagesV2, { nullable: true }),
|
|
79
|
+
(0, typeorm_1.JoinColumn)({ name: 'reply_to_message_id' }),
|
|
80
|
+
__metadata("design:type", MessagesV2)
|
|
81
|
+
], MessagesV2.prototype, "replyToMessage", void 0);
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, typeorm_1.OneToMany)(() => MessageReadStatusModel_1.MessageReadStatus, readStatus => readStatus.message),
|
|
84
|
+
__metadata("design:type", Array)
|
|
85
|
+
], MessagesV2.prototype, "readStatuses", void 0);
|
|
86
|
+
exports.MessagesV2 = MessagesV2 = __decorate([
|
|
87
|
+
(0, typeorm_1.Entity)({ name: 'messages_v2' }),
|
|
88
|
+
__metadata("design:paramtypes", [])
|
|
89
|
+
], MessagesV2);
|
|
@@ -9,26 +9,26 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
12
|
+
exports.QuestionTags = void 0;
|
|
13
13
|
const typeorm_1 = require("typeorm");
|
|
14
14
|
const BaseModel_1 = require("./BaseModel");
|
|
15
|
-
let
|
|
16
|
-
constructor(
|
|
15
|
+
let QuestionTags = class QuestionTags extends BaseModel_1.BaseModel {
|
|
16
|
+
constructor(name, question_Id) {
|
|
17
17
|
super();
|
|
18
|
-
this.
|
|
19
|
-
|
|
18
|
+
this.name = name,
|
|
19
|
+
this.question_Id = question_Id;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
exports.
|
|
22
|
+
exports.QuestionTags = QuestionTags;
|
|
23
23
|
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)({
|
|
24
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
25
25
|
__metadata("design:type", String)
|
|
26
|
-
],
|
|
26
|
+
], QuestionTags.prototype, "name", void 0);
|
|
27
27
|
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)({
|
|
28
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
29
29
|
__metadata("design:type", Number)
|
|
30
|
-
],
|
|
31
|
-
exports.
|
|
32
|
-
(0, typeorm_1.Entity)({ name: '
|
|
30
|
+
], QuestionTags.prototype, "question_Id", void 0);
|
|
31
|
+
exports.QuestionTags = QuestionTags = __decorate([
|
|
32
|
+
(0, typeorm_1.Entity)({ name: 'question_tags' }),
|
|
33
33
|
__metadata("design:paramtypes", [String, Number])
|
|
34
|
-
],
|
|
34
|
+
], QuestionTags);
|
package/dist/models/role.d.ts
CHANGED
|
@@ -9,14 +9,9 @@ Role
|
|
|
9
9
|
Userrole Information will store
|
|
10
10
|
*/
|
|
11
11
|
import { BaseModel } from './BaseModel';
|
|
12
|
-
export interface Irole {
|
|
13
|
-
name: string;
|
|
14
|
-
id?: number;
|
|
15
|
-
is_deleted?: boolean;
|
|
16
|
-
created_by?: number;
|
|
17
|
-
}
|
|
18
12
|
export declare class Role extends BaseModel {
|
|
19
13
|
name: string;
|
|
14
|
+
department_id: number;
|
|
20
15
|
is_deleted?: boolean;
|
|
21
|
-
constructor(name: string, is_deleted: boolean,
|
|
16
|
+
constructor(name: string, is_deleted: boolean, department_id: number);
|
|
22
17
|
}
|
package/dist/models/role.js
CHANGED
|
@@ -23,9 +23,10 @@ exports.Role = void 0;
|
|
|
23
23
|
const typeorm_1 = require("typeorm");
|
|
24
24
|
const BaseModel_1 = require("./BaseModel");
|
|
25
25
|
let Role = class Role extends BaseModel_1.BaseModel {
|
|
26
|
-
constructor(name, is_deleted,
|
|
26
|
+
constructor(name, is_deleted, department_id) {
|
|
27
27
|
super();
|
|
28
28
|
this.name = name;
|
|
29
|
+
this.department_id = department_id;
|
|
29
30
|
this.is_deleted = is_deleted;
|
|
30
31
|
}
|
|
31
32
|
};
|
|
@@ -34,6 +35,10 @@ __decorate([
|
|
|
34
35
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
35
36
|
__metadata("design:type", String)
|
|
36
37
|
], Role.prototype, "name", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, typeorm_1.Column)({ type: 'bigint', nullable: true }),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], Role.prototype, "department_id", void 0);
|
|
37
42
|
__decorate([
|
|
38
43
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
39
44
|
__metadata("design:type", Boolean)
|