stentor-models 1.52.33 → 1.53.1

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
@@ -1,29 +1,14 @@
1
1
  /*! Copyright (c) 2022, XAPPmedia */
2
+ import { Message } from "./Message";
2
3
  export interface LeadFormField {
3
4
  name: string;
4
5
  value: string;
5
6
  }
6
- export interface CrmTranscriptAttributes {
7
- [attribute: string]: unknown;
8
- }
9
- /**
10
- * Transcript representation of the session. The input/output is an easily readable, simplified representation
11
- * of the visitor/bot "chat". This is usually emailed or sent to a CRM system or customer service for a quick overview.
12
- * That is why input an output are strings.
13
- */
14
- export interface CrmTranscriptExchange {
15
- input: string;
16
- output: string;
17
- attributes?: CrmTranscriptAttributes;
18
- }
19
- export interface CrmTranscript {
20
- items: CrmTranscriptExchange[];
21
- }
22
7
  export interface ExternalLead {
23
8
  fields: LeadFormField[];
24
9
  source?: string;
25
10
  company?: string;
26
- transcript?: CrmTranscript[];
11
+ transcript?: Message[];
27
12
  }
28
13
  export interface CrmResponse {
29
14
  status: "Success" | "Failure";
package/lib/Crm.js CHANGED
@@ -1,4 +1,3 @@
1
1
  "use strict";
2
- /*! Copyright (c) 2022, XAPPmedia */
3
2
  Object.defineProperty(exports, "__esModule", { value: true });
4
3
  //# sourceMappingURL=Crm.js.map
package/lib/Crm.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Crm.js","sourceRoot":"","sources":["../src/Crm.ts"],"names":[],"mappings":";AAAA,oCAAoC"}
1
+ {"version":3,"file":"Crm.js","sourceRoot":"","sources":["../src/Crm.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ /*! Copyright (c) 2022, XAPPmedia */
2
+ import { ResponseOutput } from "./Response";
3
+ import { UserProfile } from "./UserProfile";
4
+ export interface Message {
5
+ /**
6
+ * The time the message was created
7
+ */
8
+ createdTime: string;
9
+ /**
10
+ * Who the message is from
11
+ */
12
+ from?: UserProfile;
13
+ /**
14
+ * Who the message is two, it can be to multiple recipients.
15
+ */
16
+ to?: UserProfile[];
17
+ /**
18
+ * A simple version of the message. It will not include displays or SSML if the original message includes it.
19
+ */
20
+ message: string;
21
+ /**
22
+ * Optional, more detailed information about the message
23
+ */
24
+ response?: ResponseOutput;
25
+ /**
26
+ * Optional, additional attributes that can exist on the message.
27
+ *
28
+ * Useful to pass additional context.
29
+ */
30
+ attributes?: object;
31
+ }
package/lib/Message.js ADDED
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ /*! Copyright (c) 2022, XAPPmedia */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ //# sourceMappingURL=Message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Message.js","sourceRoot":"","sources":["../src/Message.ts"],"names":[],"mappings":";AAAA,oCAAoC"}
@@ -27,6 +27,10 @@ export interface BaseRequest {
27
27
  * pulls content or paths for this key instead of for the request.
28
28
  */
29
29
  overrideKey?: string;
30
+ /**
31
+ * When the message was created, an ISO-8601 compatible date time string
32
+ */
33
+ createdTime?: string;
30
34
  /**
31
35
  * ID for the user making the request.
32
36
  */
@@ -100,6 +104,12 @@ export interface BaseRequest {
100
104
  * Currently only Google and Dialogflow perform health checks.
101
105
  */
102
106
  isHealthCheck?: boolean;
107
+ /**
108
+ * Optional request attributes to be passed through on the request.
109
+ *
110
+ * If the channel supports it, it will be populated.
111
+ */
112
+ attributes?: object;
103
113
  }
104
114
  export interface ApiAccessData {
105
115
  apiBaseUrl: string;
@@ -1,9 +1,20 @@
1
1
  /*! Copyright (c) 2019, XAPPmedia */
2
+ import { Message } from "../Message";
2
3
  /**
3
4
  * Lets make it simple and versatile
4
5
  */
5
6
  export interface SessionStoreData {
7
+ /**
8
+ * ID for the session storage, typically the session ID.
9
+ */
6
10
  id: string;
11
+ /**
12
+ * Optional transcript of the session that can be used for reporting purposes.
13
+ */
14
+ transcript?: Message[];
15
+ /**
16
+ * The data store that is modified.
17
+ */
7
18
  data: {
8
19
  [key: string]: any;
9
20
  };
@@ -29,4 +40,8 @@ export interface SessionStore {
29
40
  * @returns The session storage
30
41
  */
31
42
  getStore(): any;
43
+ /**
44
+ * Returns the transcript of the session.
45
+ */
46
+ transcript?(): Message[];
32
47
  }
@@ -1,5 +1,9 @@
1
1
  /*! Copyright (c) 2019, XAPPmedia */
2
2
  export interface UserProfile {
3
+ /**
4
+ * Unique userId
5
+ */
6
+ id: string;
3
7
  /**
4
8
  * The first name, or given name, of the user.
5
9
  */
package/lib/index.d.ts CHANGED
@@ -22,6 +22,7 @@ export * from "./Location";
22
22
  export * from "./Logic";
23
23
  export * from "./Match";
24
24
  export * from "./Media";
25
+ export * from "./Message";
25
26
  export * from "./NLU";
26
27
  export * from "./Path";
27
28
  export * from "./Pii";
package/lib/index.js CHANGED
@@ -38,6 +38,7 @@ __exportStar(require("./Location"), exports);
38
38
  __exportStar(require("./Logic"), exports);
39
39
  __exportStar(require("./Match"), exports);
40
40
  __exportStar(require("./Media"), exports);
41
+ __exportStar(require("./Message"), exports);
41
42
  __exportStar(require("./NLU"), exports);
42
43
  __exportStar(require("./Path"), exports);
43
44
  __exportStar(require("./Pii"), exports);
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oCAAoC;AACpC,2CAAyB;AACzB,wCAAsB;AACtB,4CAA0B;AAC1B,gDAA8B;AAC9B,4CAA0B;AAC1B,+CAA6B;AAC7B,wCAAsB;AACtB,6CAA2B;AAC3B,sDAAoC;AACpC,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB;AACxB,wCAAsB;AACtB,yCAAuB;AACvB,wCAAsB;AACtB,4CAA0B;AAC1B,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,6CAA2B;AAC3B,yCAAuB;AACvB,wCAAsB;AACtB,4CAA0B;AAC1B,+CAA6B;AAC7B,6CAA2B;AAC3B,gDAA8B;AAC9B,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oCAAoC;AACpC,2CAAyB;AACzB,wCAAsB;AACtB,4CAA0B;AAC1B,gDAA8B;AAC9B,4CAA0B;AAC1B,+CAA6B;AAC7B,wCAAsB;AACtB,6CAA2B;AAC3B,sDAAoC;AACpC,2CAAyB;AACzB,4CAA0B;AAC1B,0CAAwB;AACxB,2CAAyB;AACzB,2CAAyB;AACzB,4CAA0B;AAC1B,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,2CAAyB;AACzB,6CAA2B;AAC3B,0CAAwB;AACxB,0CAAwB;AACxB,0CAAwB;AACxB,4CAA0B;AAC1B,wCAAsB;AACtB,yCAAuB;AACvB,wCAAsB;AACtB,4CAA0B;AAC1B,mDAAiC;AACjC,6CAA2B;AAC3B,4CAA0B;AAC1B,6CAA2B;AAC3B,yCAAuB;AACvB,wCAAsB;AACtB,4CAA0B;AAC1B,+CAA6B;AAC7B,6CAA2B;AAC3B,gDAA8B;AAC9B,kDAAgC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.52.33",
7
+ "version": "1.53.1",
8
8
  "description": "Models for 📣 stentor",
9
9
  "types": "lib/index",
10
10
  "typings": "lib/index",
@@ -20,7 +20,7 @@
20
20
  "@microsoft/api-extractor": "7.19.4",
21
21
  "@rollup/plugin-typescript": "8.3.1",
22
22
  "@xapp/config": "0.2.3",
23
- "rollup": "2.69.0",
23
+ "rollup": "2.70.0",
24
24
  "tslib": "2.3.1",
25
25
  "typescript": "4.6.2"
26
26
  },
@@ -33,5 +33,5 @@
33
33
  "dependencies": {
34
34
  "@xapp/patterns": "1.40.63"
35
35
  },
36
- "gitHead": "de6d2332824f8892015770cd832b6a4577f0afb0"
36
+ "gitHead": "7aad19c222a8e75e78399ee9903b9ed6fc26c2cc"
37
37
  }