@telia-ace/widget-conversational-hub 1.1.2
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/connection-interface.d.ts +29 -0
- package/connection.d.ts +21 -0
- package/dialog.d.ts +28 -0
- package/index-5087564d.mjs +335 -0
- package/index-6dd00f59.js +1 -0
- package/index.d.ts +2 -0
- package/index.js +160 -0
- package/index.mjs +3961 -0
- package/package.json +18 -0
- package/plugin.d.ts +3 -0
- package/provider.d.ts +24 -0
- package/types.d.ts +16 -0
- package/utils.d.ts +6 -0
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@telia-ace/widget-conversational-hub",
|
|
3
|
+
"private": false,
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public",
|
|
6
|
+
"registry": "https://registry.npmjs.org"
|
|
7
|
+
},
|
|
8
|
+
"version": "1.1.2",
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"@telia-ace/widget-conversation-flamingo": "1.1.2",
|
|
11
|
+
"@webprovisions/platform": "^1.1.3",
|
|
12
|
+
"@telia-ace/widget-core": "^1.0.27",
|
|
13
|
+
"@telia-ace/widget-utilities": "^1.0.16"
|
|
14
|
+
},
|
|
15
|
+
"main": "./index.js",
|
|
16
|
+
"module": "./index.mjs",
|
|
17
|
+
"typings": "./index.d.ts"
|
|
18
|
+
}
|
package/plugin.d.ts
ADDED
package/provider.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentNodeController } from '@telia-ace/widget-core';
|
|
2
|
+
import { Container } from '@webprovisions/platform';
|
|
3
|
+
import { MessageGroup } from './types';
|
|
4
|
+
import ConversationProvider from 'libs/conversation/src/conversation-provider';
|
|
5
|
+
declare class WebConnectorV2Provider {
|
|
6
|
+
private container;
|
|
7
|
+
private conversation;
|
|
8
|
+
private agent;
|
|
9
|
+
private user;
|
|
10
|
+
private groups;
|
|
11
|
+
private convOpen;
|
|
12
|
+
private dialog;
|
|
13
|
+
constructor(container: Container, conversation: ConversationProvider, component: ComponentNodeController);
|
|
14
|
+
onInput(action: string | {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
actionKey: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
}): Promise<void>;
|
|
19
|
+
private printUserMessage;
|
|
20
|
+
private onDialogMessage;
|
|
21
|
+
onMessagesReceived(groups: MessageGroup[]): Promise<void>;
|
|
22
|
+
onMessageSend(message: string): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
export default WebConnectorV2Provider;
|
package/types.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ConversationEntry, ConversationMessageListItemType } from '@telia-ace/widget-conversation-flamingo';
|
|
2
|
+
export interface MessageGroup {
|
|
3
|
+
id: string;
|
|
4
|
+
isUser: boolean;
|
|
5
|
+
items: MessageGroupItem[];
|
|
6
|
+
writer?: ConversationEntry;
|
|
7
|
+
meta: Record<string, any>;
|
|
8
|
+
}
|
|
9
|
+
export interface MessageGroupItem {
|
|
10
|
+
id: string;
|
|
11
|
+
groupId: string;
|
|
12
|
+
isUser: boolean;
|
|
13
|
+
message: [ConversationMessageListItemType | CustomMessageTypes, any];
|
|
14
|
+
}
|
|
15
|
+
export declare enum CustomMessageTypes {
|
|
16
|
+
}
|
package/utils.d.ts
ADDED