stentor-models 1.59.52 → 1.59.54
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/lib/Crm.d.ts
CHANGED
|
@@ -34,6 +34,11 @@ export interface ExternalLead {
|
|
|
34
34
|
* Optional reference ID in the 3rd party CRM or FSM
|
|
35
35
|
*/
|
|
36
36
|
refId?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Optional job type ID in the 3rd party CRM
|
|
39
|
+
* (this maybe looked up already as a side effect of the avalability request)
|
|
40
|
+
*/
|
|
41
|
+
jobTypeId?: string;
|
|
37
42
|
/**
|
|
38
43
|
* Is it abandoned (unfinished)?
|
|
39
44
|
*/
|
|
@@ -18,6 +18,10 @@ export interface CrmServiceAvailabilitySettings {
|
|
|
18
18
|
* Maximum total number of appointments a day that can be scheduled through the scheduler.
|
|
19
19
|
*/
|
|
20
20
|
maxTotalDailyAppointments?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Job types, where we only schedule a few days (3) ahead
|
|
23
|
+
*/
|
|
24
|
+
delayedJobTypes?: string[];
|
|
21
25
|
}
|
|
22
26
|
export interface CrmServiceTimeAvailability {
|
|
23
27
|
/**
|
|
@@ -101,14 +105,22 @@ export interface CrmService {
|
|
|
101
105
|
* @param options
|
|
102
106
|
*/
|
|
103
107
|
getAvailability(range: DateTimeRange, options?: CrmServiceAvailabilityOptions): Promise<CrmServiceAvailability>;
|
|
108
|
+
/**
|
|
109
|
+
* Returns the job type (id) for the free text job description (AI call usually)
|
|
110
|
+
*
|
|
111
|
+
* @param message
|
|
112
|
+
*/
|
|
113
|
+
getJobType(message: string): Promise<string>;
|
|
104
114
|
}
|
|
105
115
|
export type CrmServiceProps = CrmServiceAvailabilitySettings;
|
|
106
116
|
export declare class AbstractCrmService implements CrmService {
|
|
107
117
|
protected availableDays?: DayOfWeek[];
|
|
108
118
|
protected blockedDays?: DateTime[];
|
|
109
119
|
protected maxTotalDailyAppointments?: number | undefined;
|
|
120
|
+
protected delayedJobTypes?: string[];
|
|
110
121
|
constructor(props: CrmServiceProps);
|
|
111
122
|
send(externalLead: ExternalLead, extras?: Record<string, unknown>): Promise<CrmResponse>;
|
|
112
123
|
getAvailability(range: DateTimeRange, options?: CrmServiceAvailabilityOptions): Promise<CrmServiceAvailability>;
|
|
124
|
+
getJobType(message: string): Promise<string>;
|
|
113
125
|
update?(externalLead: ExternalLead, extras?: Record<string, unknown>): Promise<CrmResponse>;
|
|
114
126
|
}
|
|
@@ -22,6 +22,9 @@ class AbstractCrmService {
|
|
|
22
22
|
if (typeof props.maxTotalDailyAppointments === "number") {
|
|
23
23
|
this.maxTotalDailyAppointments = props.maxTotalDailyAppointments;
|
|
24
24
|
}
|
|
25
|
+
if (typeof props.delayedJobTypes) {
|
|
26
|
+
this.delayedJobTypes = props.delayedJobTypes;
|
|
27
|
+
}
|
|
25
28
|
}
|
|
26
29
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
27
30
|
send(externalLead, extras) {
|
|
@@ -36,6 +39,12 @@ class AbstractCrmService {
|
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
|
+
getJobType(message) {
|
|
43
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
44
|
+
throw new Error("Method not implemented.");
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
39
48
|
update(externalLead, extras) {
|
|
40
49
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
50
|
throw new Error("Method not implemented.");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrmService.js","sourceRoot":"","sources":["../../src/Services/CrmService.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"CrmService.js","sourceRoot":"","sources":["../../src/Services/CrmService.ts"],"names":[],"mappings":";AAAA,oCAAoC;;;;;;;;;;;;AA6HpC,MAAa,kBAAkB;IAU3B,YAAmB,KAAsB;QAErC,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;YACtB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QAC7C,CAAC;QAED,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACpB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACzC,CAAC;QAED,IAAI,OAAO,KAAK,CAAC,yBAAyB,KAAK,QAAQ,EAAE,CAAC;YACtD,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,yBAAyB,CAAC;QACrE,CAAC;QAED,IAAI,OAAO,KAAK,CAAC,eAAe,EAAE,CAAC;YAC/B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QACjD,CAAC;IACL,CAAC;IAED,6DAA6D;IAChD,IAAI,CAAC,YAA0B,EAAE,MAAgC;;YAC1E,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC/C,CAAC;KAAA;IAED,6DAA6D;IAChD,eAAe,CAAC,KAAoB,EAAE,OAAuC;;YACtF,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC/C,CAAC;KAAA;IAED,6DAA6D;IAChD,UAAU,CAAC,OAAe;;YACnC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC/C,CAAC;KAAA;IAED,6DAA6D;IAChD,MAAM,CAAE,YAA0B,EAAE,MAAgC;;YAC7E,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC/C,CAAC;KAAA;CACJ;AAhDD,gDAgDC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.59.
|
|
7
|
+
"version": "1.59.54",
|
|
8
8
|
"description": "Models for 📣 stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"typings": "lib/index",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@xapp/patterns": "2.0.2"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "f4363fb4330c7bf5c2ca90a9baa0deb6462f1076"
|
|
37
37
|
}
|