@xapp/stentor-chat-widget 1.51.0 → 1.53.0

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/UserInfo.d.ts CHANGED
@@ -1,5 +1,25 @@
1
+ export interface ChatUserInfo extends UserInfo {
2
+ /**
3
+ * Users name
4
+ */
5
+ readonly display_name?: string;
6
+ /**
7
+ * The token that is received after a login
8
+ */
9
+ token?: string;
10
+ /**
11
+ * If the user is typing or not
12
+ */
13
+ typing?: boolean;
14
+ }
1
15
  export interface UserInfo {
16
+ /**
17
+ * URL to the user's avatar.
18
+ */
2
19
  readonly avatarPath?: string;
3
20
  readonly nick: string;
21
+ /**
22
+ * Display name
23
+ */
4
24
  readonly displayName?: string;
5
25
  }
@@ -1,11 +1,12 @@
1
1
  /*! Copyright (c) 2021, XAPPmedia */
2
2
  import { Response } from "stentor-models";
3
3
  import { WidgetTheme } from "./WidgetTheme";
4
+ import { ChatUserInfo } from "./UserInfo";
4
5
  export interface CtaConfig {
5
6
  readonly message: string;
6
7
  readonly timeout: number;
7
8
  }
8
- export declare type ServerType = "direct" | "websocket" | "local";
9
+ export declare type ServerType = "direct" | "websocket" | "local" | "websocketraw";
9
10
  /**
10
11
  * @deprecated Use connection property
11
12
  */
@@ -54,6 +55,11 @@ export interface WidgetEnv extends WidgetEnvDeprecated {
54
55
  * The avatar URL
55
56
  */
56
57
  readonly avatarUrl?: string;
58
+ /**
59
+ * Optional default agent information.
60
+ * @beta
61
+ */
62
+ readonly agent?: ChatUserInfo;
57
63
  /**
58
64
  * Optional ID that will be used for the user. If not prevent
59
65
  */
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "1.51.0",
7
+ "version": "1.53.0",
8
8
  "description": "Chat Widget channel for stentor",
9
9
  "types": "lib/index",
10
10
  "main": "lib/index",
@@ -23,13 +23,13 @@
23
23
  "mocha": "9.2.2",
24
24
  "sinon": "13.0.2",
25
25
  "sinon-chai": "3.7.0",
26
- "stentor-models": "1.56.64",
26
+ "stentor-models": "1.57.23",
27
27
  "ts-node": "10.9.1",
28
28
  "typescript": "4.7.4"
29
29
  },
30
30
  "dependencies": {
31
- "stentor-constants": "1.56.64",
32
- "stentor-guards": "1.56.64"
31
+ "stentor-constants": "1.57.23",
32
+ "stentor-guards": "1.57.23"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "stentor-models": "1.x"
@@ -38,5 +38,5 @@
38
38
  "build": "tsc -d true -p .",
39
39
  "clean": "rm -rf ./lib/*"
40
40
  },
41
- "gitHead": "d314fdeeef894c66ae6bcf577762374934d93028"
41
+ "gitHead": "790e52d7da2ada2f92ec27d2c02d5d73c96c5ab8"
42
42
  }