@telia-ace/ace-chat-flamingo 1.1.123-rc.42 → 1.1.123-rc.44
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/client.d.ts +15 -7
- package/engine.d.ts +8 -27
- package/index.js +733 -661
- package/index.mjs +4433 -4207
- package/package.json +3 -3
- package/provider.d.ts +32 -46
- package/services/auth-service.d.ts +19 -0
- package/services/dialog-service.d.ts +25 -0
- package/services/dialog.service.d.ts +25 -0
- package/services/header-menu-service.d.ts +10 -0
- package/services/video-service.d.ts +17 -0
- package/types.d.ts +12 -1
- package/ui/chat-unavailable-card.d.ts +7 -0
- package/ui/entrance-closed-dialog.d.ts +0 -1
package/client.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ChatReadItem } from './types';
|
|
2
|
-
export type
|
|
2
|
+
export type ChatEngineResponse = {
|
|
3
3
|
dataObjects: ChatReadItem[];
|
|
4
4
|
maxObjectId: number;
|
|
5
5
|
};
|
|
6
6
|
export type VideoChatMode = 'enabled' | 'disabled' | 'requested';
|
|
7
7
|
export declare class Client {
|
|
8
8
|
private readonly endpoint;
|
|
9
|
-
private readonly timeout?;
|
|
10
9
|
private readonly protocolVersion;
|
|
10
|
+
private readonly timeout;
|
|
11
11
|
private penStatusTimer;
|
|
12
12
|
private penStatusJustSent;
|
|
13
|
-
constructor(endpoint: string
|
|
13
|
+
constructor(endpoint: string);
|
|
14
14
|
chatJoin(payload: {
|
|
15
15
|
uid: string;
|
|
16
16
|
customerName: string;
|
|
@@ -41,7 +41,7 @@ export declare class Client {
|
|
|
41
41
|
instance: string;
|
|
42
42
|
entrance: string;
|
|
43
43
|
maxObjectId: number;
|
|
44
|
-
}): Promise<
|
|
44
|
+
}): Promise<ChatEngineResponse>;
|
|
45
45
|
sendPenStatusOn(payload: {
|
|
46
46
|
uid: string;
|
|
47
47
|
instance: string;
|
|
@@ -56,7 +56,7 @@ export declare class Client {
|
|
|
56
56
|
instance: string;
|
|
57
57
|
clockstamp: string;
|
|
58
58
|
message: string;
|
|
59
|
-
}): Promise<
|
|
59
|
+
}): Promise<ChatEngineResponse>;
|
|
60
60
|
chatQuit(payload: {
|
|
61
61
|
uid: string;
|
|
62
62
|
instance: string;
|
|
@@ -64,12 +64,20 @@ export declare class Client {
|
|
|
64
64
|
chatCheckSession(payload: {
|
|
65
65
|
uid: string;
|
|
66
66
|
instance: string;
|
|
67
|
-
}): Promise<
|
|
67
|
+
}): Promise<ChatEngineResponse | null>;
|
|
68
68
|
chatEmailSession(payload: {
|
|
69
69
|
uid: string;
|
|
70
70
|
instance: string;
|
|
71
71
|
emailAddress: string;
|
|
72
|
-
}): Promise<
|
|
72
|
+
}): Promise<ChatEngineResponse>;
|
|
73
|
+
isOpenEntrance(payload: {
|
|
74
|
+
uid: string;
|
|
75
|
+
instance: string;
|
|
76
|
+
entrance: string;
|
|
77
|
+
}): Promise<{
|
|
78
|
+
open: boolean;
|
|
79
|
+
result: string;
|
|
80
|
+
}>;
|
|
73
81
|
private sendRequest;
|
|
74
82
|
static removeTrailingSlashes(text: string): string;
|
|
75
83
|
}
|
package/engine.d.ts
CHANGED
|
@@ -1,32 +1,12 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { EngineAction } from './types';
|
|
3
|
-
import {
|
|
2
|
+
import { EngineAction, EngineConfig } from './types';
|
|
3
|
+
import { ChatEngineResponse } from './client';
|
|
4
4
|
type ReceiveMessage = {
|
|
5
5
|
text: string;
|
|
6
6
|
source: string;
|
|
7
7
|
invitationNo?: string;
|
|
8
8
|
alias?: string;
|
|
9
9
|
};
|
|
10
|
-
export type EngineConfig = {
|
|
11
|
-
engineTimeout: number;
|
|
12
|
-
instance: string;
|
|
13
|
-
engineUrl: string;
|
|
14
|
-
webApiUrl: string;
|
|
15
|
-
protocolVersion: string;
|
|
16
|
-
includeConversationHistory: boolean;
|
|
17
|
-
writeInQueue: boolean;
|
|
18
|
-
notifyWithSound: boolean;
|
|
19
|
-
queueMessageInterval: number;
|
|
20
|
-
entrance: string;
|
|
21
|
-
defaultErrand: string;
|
|
22
|
-
videoChatMode: string;
|
|
23
|
-
errorMessage?: string;
|
|
24
|
-
shouldUseAuth: boolean;
|
|
25
|
-
idHubUrl: string;
|
|
26
|
-
idHubCustomerKey: string;
|
|
27
|
-
idHubEidType: string;
|
|
28
|
-
idHubOrgKey: string;
|
|
29
|
-
};
|
|
30
10
|
export declare class Engine {
|
|
31
11
|
config: EngineConfig;
|
|
32
12
|
private readonly client;
|
|
@@ -40,7 +20,7 @@ export declare class Engine {
|
|
|
40
20
|
chatJoin(payload: {
|
|
41
21
|
customerName: string;
|
|
42
22
|
invitationUid: string;
|
|
43
|
-
}): Observable<
|
|
23
|
+
}): Observable<ChatEngineResponse>;
|
|
44
24
|
chatRequest(payload: {
|
|
45
25
|
customerName: string;
|
|
46
26
|
customerEmailAddress: string;
|
|
@@ -48,16 +28,17 @@ export declare class Engine {
|
|
|
48
28
|
customData: Record<string, any>;
|
|
49
29
|
errand: string;
|
|
50
30
|
authToken?: string;
|
|
51
|
-
}): Observable<
|
|
52
|
-
reconnect(): Observable<
|
|
53
|
-
poll(): Observable<
|
|
31
|
+
}): Observable<ChatEngineResponse>;
|
|
32
|
+
reconnect(): Observable<ChatEngineResponse>;
|
|
33
|
+
poll(): Observable<ChatEngineResponse>;
|
|
54
34
|
chatWrite(message: string): Promise<void>;
|
|
55
35
|
sendPenStatusOn(key: string): void;
|
|
56
36
|
videoPrepared(result: string): Promise<void>;
|
|
57
37
|
chatQuit(): Promise<void>;
|
|
58
38
|
chatEmailSession(emailAddress: string): Promise<void>;
|
|
39
|
+
isOpenEntrance(entrance: string): Promise<boolean>;
|
|
59
40
|
private processMessages;
|
|
60
41
|
getChatStatus(): Promise<"finished" | "noSession" | "active">;
|
|
61
|
-
rehydrate(): Promise<
|
|
42
|
+
rehydrate(): Promise<ChatEngineResponse | null>;
|
|
62
43
|
}
|
|
63
44
|
export {};
|