stentor-models 1.60.1 → 1.60.5
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/Form/FormField.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/*! Copyright (c) 2024, XAPP AI */
|
|
2
|
+
import { DayOfWeek } from "../Services";
|
|
2
3
|
export interface AddressAutocompleteParameters {
|
|
3
4
|
/**
|
|
4
5
|
* This will look like components=country:us or components=country:us|country:ca
|
|
@@ -125,8 +126,14 @@ export interface FormCardInput extends FormInput {
|
|
|
125
126
|
align?: string;
|
|
126
127
|
}
|
|
127
128
|
export interface BusyDayDescription {
|
|
129
|
+
/**
|
|
130
|
+
* The days of the week that are available for appointments.
|
|
131
|
+
*/
|
|
132
|
+
readonly availableDays?: DayOfWeek[];
|
|
128
133
|
/**
|
|
129
134
|
* Blocks all weekends
|
|
135
|
+
*
|
|
136
|
+
* If provided, it will override the availableDays.
|
|
130
137
|
*/
|
|
131
138
|
readonly blockWeekends?: boolean;
|
|
132
139
|
/**
|
|
@@ -136,10 +143,16 @@ export interface BusyDayDescription {
|
|
|
136
143
|
* If it is a weekend and weekends are blocked, the it will be disregarded.
|
|
137
144
|
*/
|
|
138
145
|
readonly blockCurrentDay?: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* Blocks the current day until the specified time. This is in the format of HH:MM.
|
|
148
|
+
*/
|
|
149
|
+
readonly currentDayAvailableUntil?: string;
|
|
139
150
|
/**
|
|
140
151
|
* Blocks the next number of business days.
|
|
141
152
|
*
|
|
142
153
|
* One business day will bock the next business day.
|
|
154
|
+
*
|
|
155
|
+
* If this is set, it will override the availableDays, blockWeekends, and blockCurrentDay.
|
|
143
156
|
*/
|
|
144
157
|
readonly blockNextBusinessDays?: number;
|
|
145
158
|
}
|
package/lib/Form/FormStep.d.ts
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
/*! Copyright (c) 2024, XAPP AI */
|
|
2
2
|
import { FormField } from "./FormField";
|
|
3
|
+
export type FormSteps = FormStep | FormStepIFrame;
|
|
4
|
+
export interface FormStepIFrame extends FormStep {
|
|
5
|
+
/**
|
|
6
|
+
* An iframe step is a form step that is rendered as an iframe.
|
|
7
|
+
*/
|
|
8
|
+
iframe: {
|
|
9
|
+
/**
|
|
10
|
+
* The source of the iframe.
|
|
11
|
+
*/
|
|
12
|
+
src: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optional width, defaults to 100%
|
|
15
|
+
*/
|
|
16
|
+
width?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional height, defaults to 100%
|
|
19
|
+
*/
|
|
20
|
+
height?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
3
23
|
/**
|
|
4
24
|
* A step is partial form. Fields plus next/prev/submit buttons as needed.
|
|
5
25
|
* We are going through these "mini screens".
|
|
@@ -7,11 +27,34 @@ import { FormField } from "./FormField";
|
|
|
7
27
|
export interface FormStep {
|
|
8
28
|
name: string;
|
|
9
29
|
title?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The fields that are part of the form.
|
|
32
|
+
*/
|
|
10
33
|
fields: FormField[];
|
|
11
34
|
condition?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The action to take when the user clicks the next button.
|
|
37
|
+
*
|
|
38
|
+
* "next": move to the next step
|
|
39
|
+
* "submit": force "Next" instead of "Submit" (server generated next step).
|
|
40
|
+
* "omit": don't show the next button (for instance final "Thank you screen")
|
|
41
|
+
*/
|
|
12
42
|
nextAction?: "next" | "submit" | "omit";
|
|
43
|
+
/**
|
|
44
|
+
* The action to take when the user clicks the previous button.
|
|
45
|
+
*
|
|
46
|
+
* "previous": move to the previous step
|
|
47
|
+
* "submit": force "Previous" instead of "Submit" (server generated previous step).
|
|
48
|
+
* "omit": don't show the previous button (for instance first step)
|
|
49
|
+
*/
|
|
13
50
|
previousAction?: "previous" | "submit" | "omit";
|
|
51
|
+
/**
|
|
52
|
+
* The label to use for the next button, defaults to "Next".
|
|
53
|
+
*/
|
|
14
54
|
nextLabel?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The label to use for the previous button, defaults to "Previous".
|
|
57
|
+
*/
|
|
15
58
|
previousLabel?: string;
|
|
16
59
|
final?: boolean;
|
|
17
60
|
crmSubmit?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/*! Copyright (c) 2022, XAPPmedia */
|
|
2
2
|
import { CrmResponse, ExternalLead } from "../Crm";
|
|
3
3
|
import { DateTime, DateTimeRange } from "../DateTime";
|
|
4
|
+
import { BusyDayDescription } from "../Form";
|
|
4
5
|
export type DayOfWeek = "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday";
|
|
5
6
|
export interface AvailabilityClass {
|
|
6
7
|
/**
|
|
@@ -62,6 +63,10 @@ export interface CrmServiceAvailabilitySettings {
|
|
|
62
63
|
* The default availability class (when the AI cannot figure it out)
|
|
63
64
|
*/
|
|
64
65
|
defaultAvailabilityClass?: string;
|
|
66
|
+
/**
|
|
67
|
+
* The default busy days for the business. This is used when the FSM/Scheduling backend does not provide busy days
|
|
68
|
+
*/
|
|
69
|
+
defaultBusyDays?: BusyDayDescription;
|
|
65
70
|
}
|
|
66
71
|
export interface CrmServiceTimeAvailability {
|
|
67
72
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
2
3
|
/*! Copyright (c) 2022, XAPPmedia */
|
|
3
4
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
5
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -26,25 +27,21 @@ class AbstractCrmService {
|
|
|
26
27
|
this.delayedJobTypes = props.delayedJobTypes;
|
|
27
28
|
}
|
|
28
29
|
}
|
|
29
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
30
30
|
send(externalLead, extras) {
|
|
31
31
|
return __awaiter(this, void 0, void 0, function* () {
|
|
32
32
|
throw new Error("Method not implemented.");
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
36
35
|
getAvailability(range, options) {
|
|
37
36
|
return __awaiter(this, void 0, void 0, function* () {
|
|
38
37
|
throw new Error("Method not implemented.");
|
|
39
38
|
});
|
|
40
39
|
}
|
|
41
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
42
40
|
getJobType(message, externalLead) {
|
|
43
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
44
42
|
throw new Error("Method not implemented.");
|
|
45
43
|
});
|
|
46
44
|
}
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
48
45
|
update(externalLead, extras) {
|
|
49
46
|
return __awaiter(this, void 0, void 0, function* () {
|
|
50
47
|
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,sDAAsD;AACtD,oCAAoC;;;;;;;;;;;;AA4MpC,MAAa,kBAAkB;IAS7B,YAAmB,KAAsB;QACvC,IAAI,KAAK,CAAC,aAAa,EAAE,CAAC;YACxB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAC;QAC3C,CAAC;QAED,IAAI,KAAK,CAAC,WAAW,EAAE,CAAC;YACtB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACvC,CAAC;QAED,IAAI,OAAO,KAAK,CAAC,yBAAyB,KAAK,QAAQ,EAAE,CAAC;YACxD,IAAI,CAAC,yBAAyB,GAAG,KAAK,CAAC,yBAAyB,CAAC;QACnE,CAAC;QAED,IAAI,OAAO,KAAK,CAAC,eAAe,EAAE,CAAC;YACjC,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAC/C,CAAC;IACH,CAAC;IAEY,IAAI,CACf,YAA0B,EAC1B,MAAgC;;YAEhC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;KAAA;IAEY,eAAe,CAC1B,KAAoB,EACpB,OAAuC;;YAEvC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;KAAA;IAEY,UAAU,CACrB,OAAe,EACf,YAA2B;;YAE3B,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;KAAA;IAEY,MAAM,CACjB,YAA0B,EAC1B,MAAgC;;YAEhC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;QAC7C,CAAC;KAAA;CACF;AAtDD,gDAsDC"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.60.
|
|
7
|
+
"version": "1.60.5",
|
|
8
8
|
"description": "Models for 📣 stentor",
|
|
9
9
|
"types": "lib/index",
|
|
10
10
|
"typings": "lib/index",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@xapp/config": "0.2.3",
|
|
23
23
|
"rollup": "3.29.5",
|
|
24
24
|
"tslib": "2.8.1",
|
|
25
|
-
"typescript": "5.
|
|
25
|
+
"typescript": "5.8.2"
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
28
28
|
"api": "api-extractor run --local",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@xapp/patterns": "2.0.2"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "7e4b5e2deeff473ee0c38816b1cca7f431bd5ffc"
|
|
37
37
|
}
|