stentor-models 1.58.38 → 1.58.59
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 +21 -0
- package/lib/Services/CrmService.d.ts +5 -1
- package/package.json +2 -2
package/lib/Crm.d.ts
CHANGED
|
@@ -5,12 +5,33 @@ export interface LeadFormField {
|
|
|
5
5
|
value: string;
|
|
6
6
|
}
|
|
7
7
|
export interface ExternalLead {
|
|
8
|
+
/**
|
|
9
|
+
* Fields such as name and email
|
|
10
|
+
*/
|
|
8
11
|
fields: LeadFormField[];
|
|
9
12
|
source?: string;
|
|
10
13
|
company?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Transcript of the conversation
|
|
16
|
+
*
|
|
17
|
+
*/
|
|
11
18
|
transcript?: Message[];
|
|
19
|
+
/**
|
|
20
|
+
* Optional reference ID
|
|
21
|
+
*/
|
|
22
|
+
refId?: string;
|
|
12
23
|
}
|
|
13
24
|
export interface CrmResponse {
|
|
25
|
+
/**
|
|
26
|
+
* Was the lead creation request successful
|
|
27
|
+
*/
|
|
14
28
|
status: "Success" | "Failure";
|
|
29
|
+
/**
|
|
30
|
+
* Potentially helpful message if there was a failure
|
|
31
|
+
*/
|
|
15
32
|
message?: string;
|
|
33
|
+
/**
|
|
34
|
+
* A reference to the lead in the CRM
|
|
35
|
+
*/
|
|
36
|
+
refId?: string;
|
|
16
37
|
}
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
import { CrmResponse, ExternalLead } from "../Crm";
|
|
3
3
|
export interface CrmService {
|
|
4
4
|
/**
|
|
5
|
-
* Send
|
|
5
|
+
* Send information about a lead to the CRM.
|
|
6
|
+
*
|
|
7
|
+
* This can be used to either create a lead or append data to an existing lead.
|
|
8
|
+
*
|
|
9
|
+
* The existing lead can be determined by the refId on the ExternalLead information or by attempting to match data such as email or phone number.
|
|
6
10
|
*
|
|
7
11
|
* @param externalLead Lead information
|
|
8
12
|
* @param extras Optional additional metadata to pass to the CRM
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"version": "1.58.
|
|
7
|
+
"version": "1.58.59",
|
|
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.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "5fa53a917406762b7a45499494f63352b3575133"
|
|
37
37
|
}
|