uneeq-js 2.45.0 → 2.46.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/dist/index.js +7 -7
- package/dist/src/service/locale-detector.d.ts +14 -0
- package/dist/src/service/uneeq-local-storage.d.ts +9 -0
- package/dist/src/types/MessageTypes.d.ts +8 -0
- package/dist/src/types/UneeqOptions.d.ts +0 -2
- package/dist/src/uneeq.d.ts +4 -5
- package/dist/umd/index.js +275 -126
- package/package.json +1 -1
- package/readme.md +9 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { UneeqOptions } from '../types/types';
|
|
2
|
+
export declare class LocaleDetector {
|
|
3
|
+
/**
|
|
4
|
+
* Validates that one or more colon-separated locales is supplied
|
|
5
|
+
* If none supplied, detects the user's browser language preferences
|
|
6
|
+
*
|
|
7
|
+
* @param UneeqOptions
|
|
8
|
+
* @returns a colon separated string of locales (language tags)
|
|
9
|
+
*/
|
|
10
|
+
static validateOrDetectSpeechLocales(options: UneeqOptions): string;
|
|
11
|
+
private static defaultLocale;
|
|
12
|
+
private static localesRegEx;
|
|
13
|
+
private static localeMappings;
|
|
14
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare class UneeqLocalStorage {
|
|
2
|
+
private localStorageAvailable?;
|
|
3
|
+
constructor();
|
|
4
|
+
get available(): boolean;
|
|
5
|
+
setItemSafely(key: string, value: string): void;
|
|
6
|
+
getItemSafely(key: string): any;
|
|
7
|
+
removeItemSafely(key: string): void;
|
|
8
|
+
private checkIfLocalStorageAvailable;
|
|
9
|
+
}
|
|
@@ -16,6 +16,7 @@ export declare enum UneeqMessageType {
|
|
|
16
16
|
AvatarAvailable = "AvatarAvailable",
|
|
17
17
|
AvatarUnavailable = "AvatarUnavailable",
|
|
18
18
|
ConnectionLost = "ConnectionLost",
|
|
19
|
+
ResumeSessionUnavailable = "ResumeSessionUnavailable",
|
|
19
20
|
ServiceUnavailable = "ServiceUnavailable",
|
|
20
21
|
OnlineStatusUpdate = "OnlineStatusUpdate",
|
|
21
22
|
MicActivityNotSupported = "MicActivityNotSupported",
|
|
@@ -190,6 +191,13 @@ export declare class ConnectionLostMessage implements UneeqMessage {
|
|
|
190
191
|
uneeqMessageType: UneeqMessageType;
|
|
191
192
|
constructor(connectionState: PublishSubscribeState);
|
|
192
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Resume Session Unavailable
|
|
196
|
+
*/
|
|
197
|
+
export declare class ResumeSessionUnavailable implements UneeqMessage {
|
|
198
|
+
uneeqMessageType: UneeqMessageType;
|
|
199
|
+
constructor();
|
|
200
|
+
}
|
|
193
201
|
/**
|
|
194
202
|
* The avatar's answer to a question
|
|
195
203
|
*/
|
|
@@ -70,8 +70,6 @@ export interface UneeqOptions {
|
|
|
70
70
|
* The locales are specified in the BCP-47 format e.g "en-US".
|
|
71
71
|
* The first locale is considered the primary locale.
|
|
72
72
|
* Locales should be separated with a colon e.g "en-US:en-GB:en-AU".
|
|
73
|
-
*
|
|
74
|
-
* Note: this is ignored if using the VOICE_ACTIVITY voiceInputMode mode.
|
|
75
73
|
*/
|
|
76
74
|
speechToTextLocales?: string;
|
|
77
75
|
}
|
package/dist/src/uneeq.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ export declare class Uneeq {
|
|
|
9
9
|
get sessionId(): string | null;
|
|
10
10
|
static onDataMessage: (msg: any) => void;
|
|
11
11
|
static onStatMessage: (stats: any) => void;
|
|
12
|
-
private static localesRegEx;
|
|
13
12
|
ready: BehaviorSubject<boolean>;
|
|
14
13
|
version: string;
|
|
15
14
|
private messages;
|
|
@@ -33,6 +32,7 @@ export declare class Uneeq {
|
|
|
33
32
|
private streamManager;
|
|
34
33
|
private digitalHumanVideoElement;
|
|
35
34
|
private sessionWasResumed;
|
|
35
|
+
private uneeqLocalStorage;
|
|
36
36
|
constructor(options: UneeqOptions);
|
|
37
37
|
setLoggerEnabled(enabled: boolean): void;
|
|
38
38
|
/**
|
|
@@ -153,9 +153,8 @@ export declare class Uneeq {
|
|
|
153
153
|
private initOnlineStatusUpdateMessages;
|
|
154
154
|
private initPromMetricsListener;
|
|
155
155
|
/**
|
|
156
|
-
*
|
|
157
|
-
*
|
|
158
|
-
* @returns locales if valid, empty string otherwise
|
|
156
|
+
* Check if resume session functionality is available (localStorage is available)
|
|
157
|
+
* Warn implementer if unavailable
|
|
159
158
|
*/
|
|
160
|
-
private
|
|
159
|
+
private checkIfResumeSessionIsAvailable;
|
|
161
160
|
}
|