@meetelise/chat 1.47.1 → 1.48.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.
@@ -26,6 +26,37 @@ interface PositioningOptions {
26
26
  export interface HealthcareOptions extends PositioningOptions {
27
27
  id: string;
28
28
  }
29
+ export declare type StudioWebchatMode = "host_managed_context";
30
+ export declare type StudioWebchatSessionScopeType = "building" | "building_group" | "site";
31
+ export interface StudioWebchatSessionScope {
32
+ type: StudioWebchatSessionScopeType;
33
+ key: string;
34
+ buildingSlug?: string;
35
+ siteId?: string;
36
+ buildingGroupId?: string | number;
37
+ defaultBuildingSlug?: string;
38
+ allowedBuildingSlugs?: string[];
39
+ }
40
+ export interface StudioWebchatContext {
41
+ source?: "elise_studio";
42
+ siteId?: string;
43
+ propertyId?: string | number | null;
44
+ organization?: string | null;
45
+ building?: string | null;
46
+ buildingGroupId?: string | number | null;
47
+ sessionScope?: StudioWebchatSessionScope;
48
+ path?: string;
49
+ pageId?: string;
50
+ }
51
+ export interface StudioWebchatClearContext {
52
+ source?: "elise_studio";
53
+ reason?: "no_property_for_route" | "webchat_disabled" | "ambiguous_route" | string;
54
+ preserveCache?: boolean;
55
+ }
56
+ export interface StudioWebchatOptions {
57
+ siteId: string;
58
+ mode?: StudioWebchatMode;
59
+ }
29
60
  export default class MEChat {
30
61
  static meChat: MEChatLitElement | null;
31
62
  static healthChat: HealthChatLitElement | null;
@@ -37,6 +68,11 @@ export default class MEChat {
37
68
  static brandColor: string;
38
69
  static backgroundColor: string;
39
70
  static healthcareId: string;
71
+ static activeStudioOrgSlug: string;
72
+ static activeStudioBuildingSlug: string;
73
+ static activeStudioSessionScopeKey: string;
74
+ static activeStudioOptions: Options | null;
75
+ static studioUpdateToken: number;
40
76
  static overridePlacement: {
41
77
  right?: number;
42
78
  bottom?: number;
@@ -47,13 +83,18 @@ export default class MEChat {
47
83
  static start(opts: Options, isInitialStart?: boolean): void;
48
84
  static restartConversation(): Promise<void>;
49
85
  static remove(): Promise<void>;
86
+ static removeWidget(): Promise<void>;
87
+ static handleStudioContext(opts: Options): void;
88
+ static updateStudioContext(context: StudioWebchatContext): void;
89
+ static clearStudioContext(_context?: StudioWebchatClearContext): void;
50
90
  static handleBuildingslug(meChat: MEChatLitElement, orgSlug?: string, buildingSlug?: string, originalOpts?: Options): Promise<void>;
51
91
  static handleSingleFamilyUrl(): Promise<void>;
52
92
  static calculateBuildingSlugForLogging(givenBuildingSlug: string): Promise<void>;
53
93
  }
54
94
  export interface Options {
55
- building: string;
56
- organization: string;
95
+ building?: string;
96
+ organization?: string;
97
+ studio?: StudioWebchatOptions;
57
98
  avatarSrc?: string;
58
99
  mini?: boolean;
59
100
  launcherStyles?: StyleInfo;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetelise/chat",
3
- "version": "1.47.1",
3
+ "version": "1.48.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "homepage": "https://github.com/MeetElise/chat-ui#readme",