@bharatbxhipment/xhipment-models-v2 1.0.37 → 1.0.38
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/dist/schemas/call-center/call-center.interface.d.ts +15 -2
- package/dist/schemas/call-center/call-center.interface.d.ts.map +1 -1
- package/dist/schemas/call-center/call-center.model.d.ts +4 -2
- package/dist/schemas/call-center/call-center.model.d.ts.map +1 -1
- package/dist/schemas/call-center/call-center.model.js +25 -5
- package/dist/schemas/call-center/call-center.model.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,11 +3,13 @@ export interface ICallCenter {
|
|
|
3
3
|
isNewCustomer: boolean;
|
|
4
4
|
callFrom: string;
|
|
5
5
|
callTo: string;
|
|
6
|
-
status: '
|
|
6
|
+
status: 'pending' | 'completed' | 'failed';
|
|
7
|
+
callStatus: 'missed' | 'answered' | 'busy' | 'not-answered';
|
|
7
8
|
owner: string;
|
|
8
9
|
comments: string;
|
|
9
10
|
isFollowUpRequired: boolean;
|
|
10
|
-
callFlow:
|
|
11
|
+
callFlow: ICallFlow[] | null;
|
|
12
|
+
callDescription: string;
|
|
11
13
|
numberOfCallsUnanswered: number;
|
|
12
14
|
callDuration?: number;
|
|
13
15
|
callType: 'inbound' | 'outbound';
|
|
@@ -15,4 +17,15 @@ export interface ICallCenter {
|
|
|
15
17
|
lisaReferenceUrl: string;
|
|
16
18
|
externalCallId: string;
|
|
17
19
|
}
|
|
20
|
+
export interface ICallFlow {
|
|
21
|
+
step: number;
|
|
22
|
+
legId: string;
|
|
23
|
+
role: 'from' | 'to';
|
|
24
|
+
name: string | null;
|
|
25
|
+
contact: string;
|
|
26
|
+
status: 'completed' | 'pending' | 'failed';
|
|
27
|
+
group: string | null;
|
|
28
|
+
startedAt: Date;
|
|
29
|
+
endedAt: Date;
|
|
30
|
+
}
|
|
18
31
|
//# sourceMappingURL=call-center.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-center.interface.d.ts","sourceRoot":"","sources":["../../../src/schemas/call-center/call-center.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"call-center.interface.d.ts","sourceRoot":"","sources":["../../../src/schemas/call-center/call-center.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3C,UAAU,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,cAAc,CAAC;IAC5D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,uBAAuB,EAAE,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,SAAS,GAAG,UAAU,CAAC;IACjC,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAGD,MAAM,WAAW,SAAS;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC3C,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,IAAI,CAAC;IAChB,OAAO,EAAE,IAAI,CAAC;CACjB"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Schema } from "mongoose";
|
|
2
|
-
import { ICallCenter } from "./call-center.interface";
|
|
3
|
-
export declare const
|
|
2
|
+
import { ICallCenter, ICallFlow } from "./call-center.interface";
|
|
3
|
+
export declare const callFlowSchema: Schema<ICallFlow, import("mongoose").Model<ICallFlow, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ICallFlow>;
|
|
4
|
+
declare const callCenterSchema: Schema<ICallCenter, import("mongoose").Model<ICallCenter, any, any, any, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, ICallCenter>;
|
|
5
|
+
export { callCenterSchema };
|
|
4
6
|
//# sourceMappingURL=call-center.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-center.model.d.ts","sourceRoot":"","sources":["../../../src/schemas/call-center/call-center.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"call-center.model.d.ts","sourceRoot":"","sources":["../../../src/schemas/call-center/call-center.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEjE,eAAO,MAAM,cAAc,gJAYzB,CAAC;AACH,QAAA,MAAM,gBAAgB,sJAoBpB,CAAC;AAKH,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.callCenterSchema = void 0;
|
|
3
|
+
exports.callCenterSchema = exports.callFlowSchema = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
|
-
exports.
|
|
5
|
+
exports.callFlowSchema = new mongoose_1.Schema({
|
|
6
|
+
step: { type: Number },
|
|
7
|
+
legId: { type: String },
|
|
8
|
+
role: { type: String },
|
|
9
|
+
name: { type: String },
|
|
10
|
+
contact: { type: String },
|
|
11
|
+
status: { type: String },
|
|
12
|
+
group: { type: String },
|
|
13
|
+
startedAt: { type: Date },
|
|
14
|
+
endedAt: { type: Date },
|
|
15
|
+
}, {
|
|
16
|
+
_id: false,
|
|
17
|
+
});
|
|
18
|
+
const callCenterSchema = new mongoose_1.Schema({
|
|
6
19
|
time: { type: Date, required: true, default: Date.now },
|
|
7
20
|
isNewCustomer: { type: Boolean, required: true },
|
|
8
21
|
callFrom: { type: String, required: true },
|
|
9
22
|
callTo: { type: String },
|
|
10
|
-
status: { type: String },
|
|
23
|
+
status: { type: String, enum: ['pending', 'completed', 'failed'] },
|
|
11
24
|
owner: { type: String },
|
|
12
25
|
comments: { type: String },
|
|
13
26
|
isFollowUpRequired: { type: Boolean },
|
|
14
|
-
callFlow:
|
|
27
|
+
callFlow: [exports.callFlowSchema],
|
|
28
|
+
callDescription: { type: String },
|
|
15
29
|
numberOfCallsUnanswered: { type: Number },
|
|
30
|
+
callStatus: { type: String, enum: ['missed', 'answered', 'busy', 'not-answered'] },
|
|
16
31
|
callDuration: { type: Number },
|
|
17
|
-
callType: { type: String },
|
|
32
|
+
callType: { type: String, enum: ['inbound', 'outbound'] },
|
|
18
33
|
callRecordingUrl: { type: String },
|
|
19
34
|
lisaReferenceUrl: { type: String },
|
|
20
35
|
externalCallId: { type: String, required: true },
|
|
36
|
+
}, {
|
|
37
|
+
timestamps: true,
|
|
21
38
|
});
|
|
39
|
+
exports.callCenterSchema = callCenterSchema;
|
|
40
|
+
callCenterSchema.index({ externalCallId: 1 }, { unique: true });
|
|
41
|
+
callCenterSchema.index({ callStatus: 1, callType: 1 });
|
|
22
42
|
//# sourceMappingURL=call-center.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"call-center.model.js","sourceRoot":"","sources":["../../../src/schemas/call-center/call-center.model.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAGrB,QAAA,gBAAgB,GAAG,IAAI,iBAAM,CAAc;
|
|
1
|
+
{"version":3,"file":"call-center.model.js","sourceRoot":"","sources":["../../../src/schemas/call-center/call-center.model.ts"],"names":[],"mappings":";;;AAAA,uCAAkC;AAGrB,QAAA,cAAc,GAAG,IAAI,iBAAM,CAAY;IAChD,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACtB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACvB,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACtB,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACtB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACzB,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACxB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;IACvB,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IACzB,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;CAC1B,EAAE;IACC,GAAG,EAAE,KAAK;CACb,CAAC,CAAC;AACH,MAAM,gBAAgB,GAAG,IAAI,iBAAM,CAAc;IAC7C,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,GAAG,EAAE;IACvD,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE;IAChD,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC1C,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