orbitx-core-models 11.64.0 → 11.67.0
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.
|
@@ -19,6 +19,10 @@ export interface IUser extends mongoose.Document {
|
|
|
19
19
|
createdAt?: Date;
|
|
20
20
|
updatedAt?: Date;
|
|
21
21
|
hubspotIntegration?: IHubspotIntegration;
|
|
22
|
+
salesforceIntegration?: ISalesforceIntegration;
|
|
23
|
+
zohoIntegration?: IZohoIntegration;
|
|
24
|
+
slackIntegration?: ISlackIntegration;
|
|
25
|
+
googleChatIntegration?: IGoogleChatIntegration;
|
|
22
26
|
comparePassword(inputPassword: string): Promise<boolean>;
|
|
23
27
|
}
|
|
24
28
|
export interface IHubspotIntegration {
|
|
@@ -31,4 +35,36 @@ export interface IHubspotIntegration {
|
|
|
31
35
|
accountName?: string;
|
|
32
36
|
lastSyncedAt?: Date;
|
|
33
37
|
}
|
|
38
|
+
export interface ISalesforceIntegration {
|
|
39
|
+
isConnected: boolean;
|
|
40
|
+
isSyncActive: boolean;
|
|
41
|
+
accessToken?: string;
|
|
42
|
+
refreshToken?: string;
|
|
43
|
+
instanceUrl?: string;
|
|
44
|
+
lastSyncedAt?: Date;
|
|
45
|
+
}
|
|
46
|
+
export interface IZohoIntegration {
|
|
47
|
+
isConnected: boolean;
|
|
48
|
+
isSyncActive: boolean;
|
|
49
|
+
accessToken?: string;
|
|
50
|
+
refreshToken?: string;
|
|
51
|
+
apiDomain?: string;
|
|
52
|
+
dc?: string;
|
|
53
|
+
lastSyncedAt?: Date;
|
|
54
|
+
}
|
|
55
|
+
export interface ISlackIntegration {
|
|
56
|
+
isConnected: boolean;
|
|
57
|
+
isSyncActive: boolean;
|
|
58
|
+
accessToken?: string;
|
|
59
|
+
teamId?: string;
|
|
60
|
+
channelName?: string;
|
|
61
|
+
channelId?: string;
|
|
62
|
+
lastSyncedAt?: Date;
|
|
63
|
+
}
|
|
64
|
+
export interface IGoogleChatIntegration {
|
|
65
|
+
isConnected: boolean;
|
|
66
|
+
isSyncActive: boolean;
|
|
67
|
+
webhookUrl?: string;
|
|
68
|
+
lastSyncedAt?: Date;
|
|
69
|
+
}
|
|
34
70
|
//# sourceMappingURL=user.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.interface.d.ts","sourceRoot":"","sources":["../../src/interfaces/user.interface.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,UAAU,CAAC;AAEhC,MAAM,WAAW,KAAM,SAAQ,QAAQ,CAAC,QAAQ;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,EACA,MAAM,GACN,iBAAiB,GACjB,aAAa,GACb,OAAO,GACP,YAAY,GACZ,iBAAiB,GACjB,SAAS,CAAC;IACd,SAAS,EAAE,SAAS,GAAG,SAAS,GAAG,WAAW,CAAC;IAC/C,KAAK,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC;IAClC,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,kBAAkB,CAAC,EAAE,mBAAmB,CAAC;IACzC,eAAe,CAAC,aAAa,EAAE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iB;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,IAAI,CAAC;CACrB"}
|
|
@@ -64,12 +64,12 @@ const chatSchema = new mongoose_1.Schema({
|
|
|
64
64
|
// ─────────────────────────────────────────────
|
|
65
65
|
currentOwnerId: {
|
|
66
66
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
67
|
-
ref: "
|
|
67
|
+
ref: "Agent",
|
|
68
68
|
index: true,
|
|
69
69
|
},
|
|
70
70
|
landedTo: {
|
|
71
71
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
72
|
-
ref: "
|
|
72
|
+
ref: "Agent",
|
|
73
73
|
index: true
|
|
74
74
|
},
|
|
75
75
|
ownershipType: {
|
|
@@ -84,7 +84,7 @@ const chatSchema = new mongoose_1.Schema({
|
|
|
84
84
|
{
|
|
85
85
|
userId: {
|
|
86
86
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
87
|
-
ref: "
|
|
87
|
+
ref: "Agent",
|
|
88
88
|
required: true,
|
|
89
89
|
},
|
|
90
90
|
role: {
|
|
@@ -107,12 +107,12 @@ const chatSchema = new mongoose_1.Schema({
|
|
|
107
107
|
{
|
|
108
108
|
requesterId: {
|
|
109
109
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
110
|
-
ref: "
|
|
110
|
+
ref: "Agent",
|
|
111
111
|
required: true,
|
|
112
112
|
},
|
|
113
113
|
targetId: {
|
|
114
114
|
type: mongoose_1.Schema.Types.ObjectId,
|
|
115
|
-
ref: "
|
|
115
|
+
ref: "Agent",
|
|
116
116
|
},
|
|
117
117
|
status: {
|
|
118
118
|
type: String,
|
|
@@ -128,8 +128,8 @@ const chatSchema = new mongoose_1.Schema({
|
|
|
128
128
|
// ─────────────────────────────────────────────
|
|
129
129
|
transferHistory: [
|
|
130
130
|
{
|
|
131
|
-
fromUserId: { type: mongoose_1.Schema.Types.ObjectId, ref: "
|
|
132
|
-
toUserId: { type: mongoose_1.Schema.Types.ObjectId, ref: "
|
|
131
|
+
fromUserId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Agent" },
|
|
132
|
+
toUserId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Agent" },
|
|
133
133
|
type: {
|
|
134
134
|
type: String,
|
|
135
135
|
enum: ["AGENT_TO_AGENT", "OXP_TO_CLIENT", "CLIENT_TAKEOVER"],
|
|
@@ -191,7 +191,7 @@ const chatSchema = new mongoose_1.Schema({
|
|
|
191
191
|
// ─────────────────────────────────────────────
|
|
192
192
|
pickedUpAt: Date,
|
|
193
193
|
endedAt: Date,
|
|
194
|
-
endedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "
|
|
194
|
+
endedBy: { type: mongoose_1.Schema.Types.ObjectId, ref: "Agent" },
|
|
195
195
|
appointmentSet: { type: Boolean, default: false },
|
|
196
196
|
// ─────────────────────────────────────────────
|
|
197
197
|
// RELATIONS (LEAN)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"user.model.d.ts","sourceRoot":"","sources":["../../src/models/user.model.ts"],"names":[],"mappings":"AAAA,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAoMrD,eAAO,MAAM,IAAI;;;;OAA4C,CAAC"}
|
|
@@ -86,6 +86,50 @@ const userSchema = new mongoose_1.Schema({
|
|
|
86
86
|
lastSyncedAt: { type: Date, default: null }
|
|
87
87
|
},
|
|
88
88
|
// ─────────────────────────────────────────────
|
|
89
|
+
// SALESFORCE INTEGRATION
|
|
90
|
+
// ─────────────────────────────────────────────
|
|
91
|
+
salesforceIntegration: {
|
|
92
|
+
isConnected: { type: Boolean, default: false },
|
|
93
|
+
isSyncActive: { type: Boolean, default: false },
|
|
94
|
+
accessToken: String,
|
|
95
|
+
refreshToken: String,
|
|
96
|
+
instanceUrl: String,
|
|
97
|
+
lastSyncedAt: Date
|
|
98
|
+
},
|
|
99
|
+
// ─────────────────────────────────────────────
|
|
100
|
+
// ZOHO INTEGRATION
|
|
101
|
+
// ─────────────────────────────────────────────
|
|
102
|
+
zohoIntegration: {
|
|
103
|
+
isConnected: { type: Boolean, default: false },
|
|
104
|
+
isSyncActive: { type: Boolean, default: false },
|
|
105
|
+
accessToken: String,
|
|
106
|
+
refreshToken: String,
|
|
107
|
+
apiDomain: String,
|
|
108
|
+
dc: String,
|
|
109
|
+
lastSyncedAt: Date
|
|
110
|
+
},
|
|
111
|
+
// ─────────────────────────────────────────────
|
|
112
|
+
// SLACK INTEGRATION
|
|
113
|
+
// ─────────────────────────────────────────────
|
|
114
|
+
slackIntegration: {
|
|
115
|
+
isConnected: { type: Boolean, default: false },
|
|
116
|
+
isSyncActive: { type: Boolean, default: false },
|
|
117
|
+
accessToken: String,
|
|
118
|
+
teamId: String,
|
|
119
|
+
channelName: String,
|
|
120
|
+
channelId: String,
|
|
121
|
+
lastSyncedAt: Date
|
|
122
|
+
},
|
|
123
|
+
// ─────────────────────────────────────────────
|
|
124
|
+
// GOOGLE CHAT INTEGRATION
|
|
125
|
+
// ─────────────────────────────────────────────
|
|
126
|
+
googleChatIntegration: {
|
|
127
|
+
isConnected: { type: Boolean, default: false },
|
|
128
|
+
isSyncActive: { type: Boolean, default: false },
|
|
129
|
+
webhookUrl: String,
|
|
130
|
+
lastSyncedAt: Date
|
|
131
|
+
},
|
|
132
|
+
// ─────────────────────────────────────────────
|
|
89
133
|
// MULTI-TENANT OWNERSHIP
|
|
90
134
|
// ─────────────────────────────────────────────
|
|
91
135
|
ownerType: {
|