@telia-ace/knowledge-widget-bot-provider 0.0.1-alpha.50 → 0.0.1-alpha.53

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.
Files changed (56) hide show
  1. package/dist/contact-method-list.js +111 -0
  2. package/dist/contact-method-list.js.map +1 -0
  3. package/dist/contact-method.js +119 -77
  4. package/dist/contact-method.js.map +1 -1
  5. package/dist/entry-handler.d.ts +2 -0
  6. package/dist/feedback-list.js +20 -55
  7. package/dist/feedback-list.js.map +1 -1
  8. package/dist/http-client.d.ts +42 -0
  9. package/dist/index.js +5 -1173
  10. package/dist/index.js.map +1 -1
  11. package/dist/index2.js +914 -0
  12. package/dist/index2.js.map +1 -0
  13. package/dist/no-good-alternative.js +20 -7
  14. package/dist/no-good-alternative.js.map +1 -1
  15. package/dist/notification-list.js +74 -0
  16. package/dist/notification-list.js.map +1 -0
  17. package/dist/provider.d.ts +25 -0
  18. package/dist/store.d.ts +15 -0
  19. package/dist/styles.js +13 -0
  20. package/dist/styles.js.map +1 -0
  21. package/dist/types.d.ts +78 -0
  22. package/dist/ui/contact-method-list.d.ts +10 -0
  23. package/dist/ui/contact-method.d.ts +9 -0
  24. package/dist/ui/feedback-list.d.ts +1 -1
  25. package/dist/ui/notification-list.d.ts +11 -0
  26. package/dist/ui/styles.d.ts +1 -0
  27. package/dist/utils.d.ts +26 -2
  28. package/package.json +10 -10
  29. package/dist/client/chat.client.d.ts +0 -13
  30. package/dist/client/contact-method.client.d.ts +0 -35
  31. package/dist/client/http.client.d.ts +0 -26
  32. package/dist/client/middleware.client.d.ts +0 -14
  33. package/dist/contract/custom-component/contact-method-item.d.ts +0 -11
  34. package/dist/contract/custom-component/contact-method-list.d.ts +0 -8
  35. package/dist/contract/custom-component/contact-method.d.ts +0 -3
  36. package/dist/contract/custom-component/entry-context.d.ts +0 -5
  37. package/dist/contract/enum/server-entry-type.enum.d.ts +0 -7
  38. package/dist/contract/model/conversation-api-model/list.model.d.ts +0 -5
  39. package/dist/contract/model/conversation-api-model/message.model.d.ts +0 -7
  40. package/dist/contract/model/http/action.model.d.ts +0 -3
  41. package/dist/contract/model/http/client-action.model.d.ts +0 -4
  42. package/dist/contract/model/http/client-envelope.model.d.ts +0 -9
  43. package/dist/contract/model/http/connect-options.model.d.ts +0 -5
  44. package/dist/contract/model/http/global-state.model.d.ts +0 -8
  45. package/dist/contract/model/http/http-client-options.model.d.ts +0 -5
  46. package/dist/contract/model/http/server-entry.model.d.ts +0 -11
  47. package/dist/contract/model/http/server-envelope.model.d.ts +0 -10
  48. package/dist/contract/model/middleware/aggregator-state.model.d.ts +0 -4
  49. package/dist/contract/model/shared/loose-object.model.d.ts +0 -3
  50. package/dist/helper/chat.helper.d.ts +0 -8
  51. package/dist/helper/http.helper.d.ts +0 -13
  52. package/dist/helper/middleware.helper.d.ts +0 -12
  53. package/dist/helper/store.helper.d.ts +0 -23
  54. package/dist/interface/entry.interface.d.ts +0 -23
  55. package/dist/interface/middleware/paging.interface.d.ts +0 -4
  56. package/dist/interface/middleware/processor.interface.d.ts +0 -10
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- interface PropsType {
3
- contactMethod: any;
4
- type: any;
5
- expanded?: boolean;
6
- className?: any;
7
- entry?: any;
8
- embeded: boolean;
9
- }
10
- declare const ContactMethodItem: React.FC<PropsType>;
11
- export default ContactMethodItem;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- interface PropsType {
3
- embeded: boolean;
4
- contactMethodList: any;
5
- type: any;
6
- }
7
- declare const ContactMethodList: React.FC<PropsType>;
8
- export default ContactMethodList;
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- declare const ContactMethod: React.FC;
3
- export default ContactMethod;
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export declare type IEntryContext = {
3
- entryId: string | null;
4
- };
5
- export declare const EntryContext: import("react").Context<IEntryContext>;
@@ -1,7 +0,0 @@
1
- export declare enum ServerEntryTypeEnum {
2
- Widget = 0,
3
- Text = 1,
4
- Contact = 2,
5
- List = 3,
6
- Error = 4
7
- }
@@ -1,5 +0,0 @@
1
- export interface List {
2
- title?: string;
3
- body?: string;
4
- items: object;
5
- }
@@ -1,7 +0,0 @@
1
- export interface Message {
2
- id: string;
3
- message: any;
4
- entry?: any;
5
- conversationEntry?: any;
6
- isUser: boolean;
7
- }
@@ -1,3 +0,0 @@
1
- export interface Action {
2
- [label: string]: any;
3
- }
@@ -1,4 +0,0 @@
1
- export interface ClientAction {
2
- key: string;
3
- content: any;
4
- }
@@ -1,9 +0,0 @@
1
- import { LooseObject } from "../shared/loose-object.model";
2
- import { ClientAction } from "./client-action.model";
3
- export interface ClientEnvelope {
4
- command?: LooseObject;
5
- action?: ClientAction;
6
- globalState?: LooseObject;
7
- localState?: LooseObject;
8
- clientId?: string;
9
- }
@@ -1,5 +0,0 @@
1
- import { LooseObject } from "../shared/loose-object.model";
2
- export declare type ConnectOptions = {
3
- globalState?: LooseObject;
4
- command?: LooseObject;
5
- };
@@ -1,8 +0,0 @@
1
- export interface GlobalState {
2
- completedInteractionsCount: number;
3
- lastQuestion?: string;
4
- lastBotGuide: number;
5
- lastGuideTitle?: string;
6
- site: string;
7
- invincibleParameters: object;
8
- }
@@ -1,5 +0,0 @@
1
- export interface HttpClientOptions {
2
- credentials: string | undefined;
3
- clientId?: string;
4
- onError?: (error: any) => void;
5
- }
@@ -1,11 +0,0 @@
1
- import { Action } from "./action.model";
2
- export interface ServerEntry {
3
- id: string;
4
- type: string;
5
- content: any;
6
- actions: Action;
7
- tags: string[];
8
- relation: string;
9
- timestamp: string;
10
- localState: object;
11
- }
@@ -1,10 +0,0 @@
1
- import { ClientEnvelope } from "./client-envelope.model";
2
- import { GlobalState } from "./global-state.model";
3
- import { ServerEntry } from "./server-entry.model";
4
- export interface ServerEnvelope {
5
- clientId: string | undefined;
6
- entries: ServerEntry[];
7
- globalState: GlobalState;
8
- resolveCommand?: string;
9
- clientEnvelope: ClientEnvelope;
10
- }
@@ -1,4 +0,0 @@
1
- import { ServerEntry } from "../http/server-entry.model";
2
- export interface AggregatorState {
3
- [key: string]: ServerEntry;
4
- }
@@ -1,3 +0,0 @@
1
- export interface LooseObject {
2
- [key: string]: any;
3
- }
@@ -1,8 +0,0 @@
1
- export declare class ChatHelper {
2
- private static user;
3
- private static agent;
4
- static setUser(user: any): void;
5
- static setAgent(agent: any): void;
6
- static getUser(): any;
7
- static getAgent(): any;
8
- }
@@ -1,13 +0,0 @@
1
- export declare class HttpHelper {
2
- static fetchOptions: {
3
- method: string;
4
- headers: {
5
- Accept: string;
6
- 'Content-Type': string;
7
- };
8
- };
9
- static combineUrl(basePath: string, path: string): string;
10
- static managedSubdomainSuffixes: string[];
11
- static parseSubdomain: (input: string) => string;
12
- static getCredentials(): string | undefined;
13
- }
@@ -1,12 +0,0 @@
1
- import { Message } from '../contract/model/conversation-api-model/message.model';
2
- export declare class MiddlewareHelper {
3
- private static sessionMessageStorageVariable;
4
- private static container;
5
- private static widget;
6
- static setContainer(container: any): void;
7
- static setWidget(widget: any): void;
8
- static getContainer(): any;
9
- static getWidget(): any;
10
- static setEntrySessionStorage: (messages: Message[]) => Promise<void>;
11
- static getEntrySessionStorage(): Promise<any>;
12
- }
@@ -1,23 +0,0 @@
1
- import { Message } from '../contract/model/conversation-api-model/message.model';
2
- import { ClientAction } from '../contract/model/http/client-action.model';
3
- import { GlobalState } from '../contract/model/http/global-state.model';
4
- import { ServerEntry } from '../contract/model/http/server-entry.model';
5
- import { LooseObject } from '../contract/model/shared/loose-object.model';
6
- export declare class StoreHelper {
7
- private static messageStore;
8
- private static globalState;
9
- constructor();
10
- static insertOrUpdateMessageArrayStore(messageArray: Message[], entry?: any): Promise<void>;
11
- static insertMessageToStore(message: Message): void;
12
- private static updateMessageInStore;
13
- static checkIdInMessageStore(id: string): boolean;
14
- static getLocalState(action: string): LooseObject | undefined;
15
- static getGlobalState(): GlobalState;
16
- static setGlobalState(state: GlobalState): Promise<void>;
17
- static getAction(action: string): ClientAction;
18
- static getCommand(text: string): LooseObject;
19
- static getEntry(action: string): ServerEntry | undefined;
20
- static getMessage(id: string): Message | undefined;
21
- static getEntryStore(): ServerEntry[];
22
- static rehydrateState(): Promise<void>;
23
- }
@@ -1,23 +0,0 @@
1
- import { Container } from '@webprovisions/platform';
2
- import { Message } from '../contract/model/conversation-api-model/message.model';
3
- import { ServerEntry } from '../contract/model/http/server-entry.model';
4
- export default class EntryInterface {
5
- private container;
6
- private helpActionKey;
7
- private nextActionKey;
8
- private contactMethodClient;
9
- static pagingAmount: number | undefined;
10
- constructor(container: Container);
11
- transform(entry: ServerEntry, feedbackEntry?: ServerEntry): Promise<Message | undefined>;
12
- transformContactMethod(entry: ServerEntry): Promise<any>;
13
- transformArray(entryArray: ServerEntry[]): Promise<Message[]>;
14
- getUserMessage(action: string): Promise<string | undefined>;
15
- private listTransform;
16
- private getContentText;
17
- private textTransform;
18
- private getListActions;
19
- private getListType;
20
- private getTitleFromEntry;
21
- private getTitleFromList;
22
- private addFeedbackToEntry;
23
- }
@@ -1,4 +0,0 @@
1
- import { ServerEntry } from "../../contract/model/http/server-entry.model";
2
- export default class PagingInterface {
3
- process(entries: ServerEntry[]): ServerEntry[];
4
- }
@@ -1,10 +0,0 @@
1
- import { ServerEntry } from '../../contract/model/http/server-entry.model';
2
- export default class ProcessorInterface {
3
- process(entries: ServerEntry[]): ServerEntry[];
4
- processUpdate(entry: ServerEntry | undefined, updateEntryArray: ServerEntry[]): ServerEntry[];
5
- private handleActionUpdateOrInsert;
6
- private deletePaging;
7
- private delete;
8
- private merge;
9
- private moveLoader;
10
- }