@telia-ace/widget-conversation-flamingo 1.1.52-rc.1 → 1.1.52-rc.2
Sign up to get free protection for your applications and to get access to all the features.
- package/chat-session.d.ts +31 -0
- package/{conversation-session.d.ts → conversation-feed.d.ts} +3 -6
- package/conversation-platform.d.ts +1 -6
- package/conversation.d.ts +19 -12
- package/index.d.ts +1 -1
- package/index.js +834 -1
- package/index.mjs +4681 -9
- package/models/conversation-entry.d.ts +1 -0
- package/models/conversation-provider.d.ts +8 -3
- package/package.json +2 -3
- package/session-service.d.ts +21 -0
- package/state-machine.d.ts +21 -0
- package/uuid.d.ts +1 -0
- package/conversation-036b72c8.js +0 -810
- package/conversation-83e12020.mjs +0 -3006
- package/index-b1ff7a55.js +0 -3
- package/index-eaede34b.mjs +0 -1199
- package/models/conversation-session-state.d.ts +0 -21
@@ -9,6 +9,7 @@ export declare class ConversationEntry {
|
|
9
9
|
didUpdate: Subject<ConversationEntry>;
|
10
10
|
actions$: Subject<ConversationEntryAction>;
|
11
11
|
remove$: Subject<void>;
|
12
|
+
id: string;
|
12
13
|
constructor(type: ConversationMessageType, sender: ConversationMessageSender, messages: ConversationMessageGroup[]);
|
13
14
|
update(content: ConversationMessage[]): void;
|
14
15
|
setStatus(status: ConversationEntry['status']): void;
|
@@ -1,20 +1,23 @@
|
|
1
|
+
import { Subject } from 'rxjs';
|
1
2
|
import { ConversationMessageType } from '../types';
|
2
3
|
import { ConversationEntry } from './conversation-entry';
|
3
4
|
import { Agent } from './agent';
|
4
5
|
import { User } from './user';
|
5
|
-
import { ConversationSessionState } from './conversation-session-state';
|
6
6
|
import { System } from './system';
|
7
|
+
import Conversation from '../conversation';
|
7
8
|
type UserSubmitEvent = {
|
8
9
|
text: string;
|
9
10
|
};
|
10
11
|
export declare class ConversationProvider {
|
11
12
|
name: string;
|
12
|
-
|
13
|
+
component: Conversation;
|
13
14
|
private print$;
|
14
15
|
private typingState$;
|
15
16
|
private complete$;
|
16
17
|
protected system: System;
|
17
|
-
|
18
|
+
rehydrate$: Subject<void>;
|
19
|
+
saveToCurrentSession$: Subject<any>;
|
20
|
+
constructor(name: string, component: Conversation);
|
18
21
|
connect(_conversationOptions?: Record<string, any>): void;
|
19
22
|
disconnected(): void;
|
20
23
|
onUserSubmit(action: UserSubmitEvent): void;
|
@@ -30,5 +33,7 @@ export declare class ConversationProvider {
|
|
30
33
|
playNotification(): void;
|
31
34
|
onComplete: () => import("rxjs").Observable<void>;
|
32
35
|
complete(): void;
|
36
|
+
save(data: any): void;
|
37
|
+
rehydrate(_data: Record<string, any>): Promise<void>;
|
33
38
|
}
|
34
39
|
export {};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@telia-ace/widget-conversation-flamingo",
|
3
|
-
"version": "1.1.52-rc.
|
3
|
+
"version": "1.1.52-rc.2",
|
4
4
|
"publishConfig": {
|
5
5
|
"registry": "https://registry.npmjs.org"
|
6
6
|
},
|
@@ -9,8 +9,7 @@
|
|
9
9
|
"@lit-labs/motion": "^1.0.4",
|
10
10
|
"@teliads/icons": "^8.4.0",
|
11
11
|
"@teliads/components": "^22.1.1",
|
12
|
-
"@telia-ace/widget-core-flamingo": "1.1.52-rc.
|
13
|
-
"uuid": "^9.0.1",
|
12
|
+
"@telia-ace/widget-core-flamingo": "1.1.52-rc.2",
|
14
13
|
"lit-html": "^3.0.2",
|
15
14
|
"rxjs": "^7.8.1"
|
16
15
|
},
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { StorageService } from '@telia-ace/widget-core-flamingo';
|
2
|
+
import { Observable } from 'rxjs';
|
3
|
+
import Conversation from './conversation';
|
4
|
+
import { ChatSession } from './chat-session';
|
5
|
+
export declare class SessionService {
|
6
|
+
private component;
|
7
|
+
private currentSession$;
|
8
|
+
private sessions;
|
9
|
+
private storage;
|
10
|
+
constructor(component: Conversation);
|
11
|
+
loadFromStorage(): void;
|
12
|
+
startSession(): void;
|
13
|
+
setStorageService(storage: StorageService): void;
|
14
|
+
currentSession(): Observable<ChatSession | null>;
|
15
|
+
private _getStoredSessions;
|
16
|
+
private _setSession;
|
17
|
+
private _saveSession;
|
18
|
+
private save;
|
19
|
+
private _createNewSession;
|
20
|
+
private _getInitialProviderKey;
|
21
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
2
|
+
import { StorageService } from '@telia-ace/widget-core-flamingo';
|
3
|
+
import { Conversation } from './conversation';
|
4
|
+
import { ConversationEntry } from './models/conversation-entry';
|
5
|
+
import { ChatSession } from './chat-session';
|
6
|
+
export declare class StateMachine {
|
7
|
+
private state$;
|
8
|
+
private component;
|
9
|
+
private sessionService;
|
10
|
+
private entries$;
|
11
|
+
private session$;
|
12
|
+
private isTyping$;
|
13
|
+
constructor(state$: BehaviorSubject<'waiting' | 'init' | 'rehydrating' | 'connected'>, component: Conversation);
|
14
|
+
setStorage(storage: StorageService): void;
|
15
|
+
session: () => Observable<ChatSession | null>;
|
16
|
+
isTyping: () => Observable<boolean>;
|
17
|
+
entries: () => Observable<ConversationEntry[]>;
|
18
|
+
private initialize;
|
19
|
+
private rehydrate;
|
20
|
+
private connected;
|
21
|
+
}
|
package/uuid.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export declare const uuid: () => `${string}-${string}-${string}-${string}-${string}`;
|