@unblu/embedded-app-component 8.18.0 → 8.19.1
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/dist/lib/web-types.json +1 -1
- package/package.json +1 -1
- package/dist/lib/index.d.ts +0 -39
- package/dist/lib/internal/internal-embedded-api.d.ts +0 -16
- package/dist/lib/internal/module/embedded-meta-module.d.ts +0 -17
- package/dist/lib/internal/module/general-module.d.ts +0 -16
- package/dist/lib/shared/api-state.d.ts +0 -8
- package/dist/lib/shared/conversation.d.ts +0 -313
- package/dist/lib/shared/internal/api-bridge.d.ts +0 -36
- package/dist/lib/shared/internal/event.d.ts +0 -6
- package/dist/lib/shared/internal/initialized-unblu-api.d.ts +0 -10
- package/dist/lib/shared/internal/initialized-unblu-element.d.ts +0 -10
- package/dist/lib/shared/internal/java-error-codes.d.ts +0 -5
- package/dist/lib/shared/internal/model/destroy-mode.d.ts +0 -4
- package/dist/lib/shared/internal/model/destroy-options.d.ts +0 -4
- package/dist/lib/shared/internal/module/agent-availability-module.d.ts +0 -14
- package/dist/lib/shared/internal/module/base-general-module.d.ts +0 -35
- package/dist/lib/shared/internal/module/conversation-module.d.ts +0 -64
- package/dist/lib/shared/internal/module/module.d.ts +0 -10
- package/dist/lib/shared/internal/unblu-floating-api.d.ts +0 -15
- package/dist/lib/shared/internal/unblu-util.d.ts +0 -76
- package/dist/lib/shared/internal/util/event-emitter.d.ts +0 -44
- package/dist/lib/shared/model/agent-availability-state.d.ts +0 -18
- package/dist/lib/shared/model/branchclient/language.d.ts +0 -14
- package/dist/lib/shared/model/branchclient/named-area-agent-availability.d.ts +0 -19
- package/dist/lib/shared/model/call-connection-state.d.ts +0 -18
- package/dist/lib/shared/model/call-state.d.ts +0 -30
- package/dist/lib/shared/model/configuration.d.ts +0 -53
- package/dist/lib/shared/model/connection-state.d.ts +0 -27
- package/dist/lib/shared/model/conversation-info.d.ts +0 -42
- package/dist/lib/shared/model/conversation-message-info.d.ts +0 -14
- package/dist/lib/shared/model/conversation-participant.d.ts +0 -15
- package/dist/lib/shared/model/conversation-participation-type.d.ts +0 -18
- package/dist/lib/shared/model/conversation-recipient-type.d.ts +0 -18
- package/dist/lib/shared/model/conversation-recipient.d.ts +0 -18
- package/dist/lib/shared/model/conversation-state.d.ts +0 -37
- package/dist/lib/shared/model/conversation-type.d.ts +0 -47
- package/dist/lib/shared/model/customaction/custom-action-invocation.d.ts +0 -27
- package/dist/lib/shared/model/customaction/custom-conversation-action-invocation.d.ts +0 -6
- package/dist/lib/shared/model/customaction/custom-message-action-invocation.d.ts +0 -16
- package/dist/lib/shared/model/customaction/custom-person-action-invocation.d.ts +0 -11
- package/dist/lib/shared/model/new-conversation-interceptor-result.d.ts +0 -14
- package/dist/lib/shared/model/new-conversation-recipient-type.d.ts +0 -10
- package/dist/lib/shared/model/new-conversation-recipient.d.ts +0 -14
- package/dist/lib/shared/model/person-info.d.ts +0 -5
- package/dist/lib/shared/new-conversation-interceptor.d.ts +0 -24
- package/dist/lib/shared/unblu-api-error.d.ts +0 -117
- package/dist/lib/unblu-embedded-api.d.ts +0 -554
- package/dist/lib/unblu-embedded-app-element.d.ts +0 -708
- package/dist/lib/view-mode.d.ts +0 -5
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { CustomActionInvocation } from "./custom-action-invocation";
|
|
2
|
-
import { PersonInfo } from "../person-info";
|
|
3
|
-
/**
|
|
4
|
-
* Custom person action invocation
|
|
5
|
-
*/
|
|
6
|
-
export interface CustomPersonActionInvocation extends CustomActionInvocation {
|
|
7
|
-
/**
|
|
8
|
-
* The person the custom action was invoked on
|
|
9
|
-
*/
|
|
10
|
-
targetPerson: PersonInfo;
|
|
11
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { NewConversationRecipient } from "./new-conversation-recipient";
|
|
2
|
-
/**
|
|
3
|
-
* The result of calling a {@link NewConversationInterceptor}.
|
|
4
|
-
*/
|
|
5
|
-
export interface NewConversationInterceptorResult {
|
|
6
|
-
/**
|
|
7
|
-
* Custom visitor data that will be stored on the conversation and can be accessed through the Web API later on. This data won't be displayed anywhere and is for API usage only.
|
|
8
|
-
*/
|
|
9
|
-
visitorData?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The team or agent recipient of the conversation. This overwrites any named area that may be set on the web page.
|
|
12
|
-
*/
|
|
13
|
-
recipient?: NewConversationRecipient;
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { NewConversationRecipientType } from "./new-conversation-recipient-type";
|
|
2
|
-
/**
|
|
3
|
-
* The recipient of a conversation
|
|
4
|
-
*/
|
|
5
|
-
export interface NewConversationRecipient {
|
|
6
|
-
/**
|
|
7
|
-
* The ID of the recipient. Depending on the recipient type, this refers either to an agent person ID or a team ID.
|
|
8
|
-
*/
|
|
9
|
-
id: string;
|
|
10
|
-
/**
|
|
11
|
-
* The recipient type
|
|
12
|
-
*/
|
|
13
|
-
recipientType: NewConversationRecipientType;
|
|
14
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { ConversationType } from "./model/conversation-type";
|
|
2
|
-
import { NewConversationRecipient } from "./model/new-conversation-recipient";
|
|
3
|
-
import { NewConversationInterceptorResult } from "./model/new-conversation-interceptor-result";
|
|
4
|
-
/**
|
|
5
|
-
* Interceptor function which is called every time a new conversation is started from the UI or JS API.
|
|
6
|
-
*
|
|
7
|
-
* Starting the conversation is deferred until the Promise returned by this interceptor resolves:
|
|
8
|
-
* - If the interceptor rejects the Promise, starting the conversation will be cancelled.
|
|
9
|
-
* - If the interceptor resolves the Promise with a String, the value of the String will be used and set as "visitorData" for the conversation created.
|
|
10
|
-
* - If the interceptor resolves the Promise with a {@link NewConversationInterceptorResult}, the values from it will be used for the "visitorData" and the "recipient" for the conversation created.
|
|
11
|
-
* - If the resolved value is undefined, the value passed into the {@link UnbluApi.startConversation} method will be used.
|
|
12
|
-
* - If the resolved value is set to null, any value passed into {@link UnbluApi.startConversation} will be discarded.
|
|
13
|
-
* - If the resolved value is neither a {@link NewConversationInterceptorResult}, nor a String, nor undefined, the conversation is started without any visitorData.
|
|
14
|
-
* - If the interceptor resolves the Promise with something other than a {@link NewConversationInterceptorResult} or a String, the conversation is started without any visitorData.
|
|
15
|
-
*
|
|
16
|
-
* Any values of {@link NewConversationInterceptorResult} that are undefined are replaced by the corresponding values passed to {@link UnbluApi.startConversation}.
|
|
17
|
-
* Any values of {@link NewConversationInterceptorResult} that are null discard the corresponding values passed to {@link UnbluApi.startConversation}.
|
|
18
|
-
*
|
|
19
|
-
* @param conversationType The type of the conversation being started.
|
|
20
|
-
* @param visitorData Optional visitorData, only present if passed to the {@link UnbluApi.startConversation} method
|
|
21
|
-
* @param recipient Optional recipient, only present if passed to the {@link UnbluApi.startConversation} method
|
|
22
|
-
* @return A Promise deferring the start of the conversation until it resolves.
|
|
23
|
-
*/
|
|
24
|
-
export type NewConversationInterceptor = (conversationType: ConversationType, visitorData?: String, recipient?: NewConversationRecipient) => Promise<String | NewConversationInterceptorResult>;
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type of an unblu error. This can be used to check what kind of error occurred.
|
|
3
|
-
*/
|
|
4
|
-
export declare enum UnbluErrorType {
|
|
5
|
-
/**
|
|
6
|
-
* Thrown if the browser is not supported by unblu.
|
|
7
|
-
*/
|
|
8
|
-
UNSUPPORTED_BROWSER = "UNSUPPORTED_BROWSER",
|
|
9
|
-
/**
|
|
10
|
-
* Thrown if the initialization of the unblu API failed due to a timeout.
|
|
11
|
-
*/
|
|
12
|
-
INITIALIZATION_TIMEOUT = "INITIALIZATION_TIMEOUT",
|
|
13
|
-
/**
|
|
14
|
-
* Thrown if the initialization is called with no existing snippet and no configuration.
|
|
15
|
-
*/
|
|
16
|
-
CONFIGURATION_MISSING = "CONFIGURATION_MISSING",
|
|
17
|
-
/**
|
|
18
|
-
* Thrown if the login against the Unblu collaboration server failed.
|
|
19
|
-
*/
|
|
20
|
-
AUTHENTICATION_FAILED = "AUTHENTICATION_FAILED",
|
|
21
|
-
/**
|
|
22
|
-
* Thrown during initialization if the snippet can't be loaded or unblu can't be initialized from the snippet.
|
|
23
|
-
*/
|
|
24
|
-
ERROR_LOADING_UNBLU = "ERROR_LOADING_UNBLU",
|
|
25
|
-
/**
|
|
26
|
-
* Thrown if the unblu JS API is not compatible with the unblu collaboration server.
|
|
27
|
-
*/
|
|
28
|
-
INCOMPATIBLE_UNBLU_VERSION = "INCOMPATIBLE_UNBLU_VERSION",
|
|
29
|
-
/**
|
|
30
|
-
* Thrown if a function call was invalid.
|
|
31
|
-
* This is usually do to an incompatibility between the unblu JS API and the unblu collaboration server.
|
|
32
|
-
*/
|
|
33
|
-
INVALID_FUNCTION_CALL = "INVALID_FUNCTION_CALL",
|
|
34
|
-
/**
|
|
35
|
-
* Thrown if the arguments passed to a function where invalid.
|
|
36
|
-
*/
|
|
37
|
-
INVALID_FUNCTION_ARGUMENTS = "INVALID_FUNCTION_ARGUMENTS",
|
|
38
|
-
/**
|
|
39
|
-
* Thrown if a called action is not permitted for the local person.
|
|
40
|
-
* The details message usually has more information about the required permissions.
|
|
41
|
-
*/
|
|
42
|
-
ACTION_NOT_GRANTED = "ACTION_NOT_GRANTED",
|
|
43
|
-
/**
|
|
44
|
-
* Thrown if an unexpected exception occurrs during a function execution.
|
|
45
|
-
*/
|
|
46
|
-
EXECUTION_EXCEPTION = "EXECUTION_EXCEPTION",
|
|
47
|
-
/**
|
|
48
|
-
* Thrown if a method is called in an invalid context. E.g. if the Object called upon was already destroyed.
|
|
49
|
-
*/
|
|
50
|
-
ILLEGAL_STATE = "ILLEGAL_STATE",
|
|
51
|
-
/**
|
|
52
|
-
* Thrown if a timeout ocurrs.
|
|
53
|
-
*/
|
|
54
|
-
TIMEOUT = "TIMEOUT"
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* General unblu JS API error class that will be thrown whenever something goes wrong.
|
|
58
|
-
*
|
|
59
|
-
* - Use the {@link UnbluApiError.type} to check what kind of error occurred.
|
|
60
|
-
* - Use the {@link UnbluApiError.detail} for human readable details.
|
|
61
|
-
*
|
|
62
|
-
* Check the documentation of {@link UnbluErrorType} for more details on the different error types.
|
|
63
|
-
*
|
|
64
|
-
* Example for the Floating API:
|
|
65
|
-
* ```ts
|
|
66
|
-
* unblu.floating.api.initialize().then(api => {
|
|
67
|
-
* // use the api
|
|
68
|
-
* }).catch(e => {
|
|
69
|
-
* if(e.type === 'INITIALIZATION_TIMEOUT') {
|
|
70
|
-
* //retry
|
|
71
|
-
* } else if(e.type === 'UNSUPPORTED_BROWSER') {
|
|
72
|
-
* // display unsupported browser dialog
|
|
73
|
-
* } else {
|
|
74
|
-
* // show generic error message
|
|
75
|
-
* }
|
|
76
|
-
* })
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* or using async / await:
|
|
80
|
-
*
|
|
81
|
-
* ```ts
|
|
82
|
-
* try {
|
|
83
|
-
* const api = await unblu.floating.api.initialize()
|
|
84
|
-
* // use the api
|
|
85
|
-
* } catch(e) {
|
|
86
|
-
* if(e.type === 'INITIALIZATION_TIMEOUT') {
|
|
87
|
-
* //retry
|
|
88
|
-
* } else if(e.type === 'UNSUPPORTED_BROWSER') {
|
|
89
|
-
* // display unsupported browser dialog
|
|
90
|
-
* } else {
|
|
91
|
-
* // show generic error message
|
|
92
|
-
* }
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* The error types may either be checked via their constant string values or via the UnbluErrorType enum:
|
|
98
|
-
*
|
|
99
|
-
* ```ts
|
|
100
|
-
* // using string constant
|
|
101
|
-
* function isTimeout(e: UnbluApiError) {
|
|
102
|
-
* return e.type === 'INITIALIZATION_TIMEOUT'
|
|
103
|
-
* }
|
|
104
|
-
* ```
|
|
105
|
-
* ```ts
|
|
106
|
-
* // using the enum
|
|
107
|
-
* function isTimeout(e: UnbluApiError) {
|
|
108
|
-
* return e.type === window.unblu.UnbluErrorType.INITIALIZATION_TIMEOUT
|
|
109
|
-
* }
|
|
110
|
-
* ```
|
|
111
|
-
*
|
|
112
|
-
*/
|
|
113
|
-
export declare class UnbluApiError extends Error {
|
|
114
|
-
type: UnbluErrorType;
|
|
115
|
-
detail: string;
|
|
116
|
-
constructor(type: UnbluErrorType, detail: string);
|
|
117
|
-
}
|