testaugnitosdk2 1.0.12
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/README.md +442 -0
- package/dist/Augnito.d.ts +130 -0
- package/dist/AugnitoMobile.d.ts +13 -0
- package/dist/api/BaseAPI.d.ts +32 -0
- package/dist/api/FactoryAPI.d.ts +25 -0
- package/dist/api/Formatting/FormattingAPI.d.ts +15 -0
- package/dist/api/Formatting/FormattingModels.d.ts +29 -0
- package/dist/api/Macros/MacrosAPI.d.ts +28 -0
- package/dist/api/Macros/MacrosModels.d.ts +32 -0
- package/dist/api/MedicineOrdering/MedicineOrderderingData.d.ts +6 -0
- package/dist/api/MedicineOrdering/MedicineOrderingAPI.d.ts +15 -0
- package/dist/api/MedicineOrdering/MedicineOrderingModels.d.ts +26 -0
- package/dist/api/Vocabulary/VocabularyAPI.d.ts +31 -0
- package/dist/api/Vocabulary/VocabularyModels.d.ts +38 -0
- package/dist/api/index.d.ts +9 -0
- package/dist/augnitosdk.js +11067 -0
- package/dist/client/MobileClient.d.ts +17 -0
- package/dist/client/NotificationClient.d.ts +25 -0
- package/dist/client/PhilipsMicClient.d.ts +17 -0
- package/dist/client/WebClient.d.ts +59 -0
- package/dist/commands/AugnitoCommands.d.ts +93 -0
- package/dist/commands/AugnitoCommandsRegex.d.ts +9 -0
- package/dist/commands/AugnitoCommandsStatic.d.ts +6 -0
- package/dist/commands/AugnitoCustomCommands.d.ts +8 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/utils/CustomCommandModel.d.ts +5 -0
- package/dist/commands/utils/TextToWordInteger.d.ts +5 -0
- package/dist/config/AugnitoConfig.d.ts +113 -0
- package/dist/config/AugnitoFormattingConfig.d.ts +10 -0
- package/dist/config/AugnitoMobileConfig.d.ts +7 -0
- package/dist/config/AugnitoVocabularyConfig.d.ts +10 -0
- package/dist/config/ConfigValidator.d.ts +15 -0
- package/dist/config/IConfiguration .d.ts +35 -0
- package/dist/config/PhilipsMicConfig.d.ts +8 -0
- package/dist/config/SDKConfig.d.ts +40 -0
- package/dist/config/SDKConfigMobile.d.ts +21 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +188 -0
- package/dist/interop/core/CommonEditorUtils.d.ts +10 -0
- package/dist/interop/core/EditorHandler.d.ts +35 -0
- package/dist/interop/core/EditorType.d.ts +8 -0
- package/dist/interop/core/PhilipsMicMode.d.ts +6 -0
- package/dist/interop/core/ProcessorFactory.d.ts +9 -0
- package/dist/interop/core/ProcessorHandler.d.ts +35 -0
- package/dist/interop/core/RichEditClientCommand.d.ts +416 -0
- package/dist/interop/core/TargetEditor.d.ts +7 -0
- package/dist/interop/index.d.ts +3 -0
- package/dist/interop/processors/BaseInteropProcessor.d.ts +10 -0
- package/dist/interop/processors/CKEditor4InteropProcessor.d.ts +14 -0
- package/dist/interop/processors/CKEditor5InteropProcessor.d.ts +17 -0
- package/dist/interop/processors/CommonContentEditableProcessor.d.ts +63 -0
- package/dist/interop/processors/DevExpressRichEditProcessor.d.ts +14 -0
- package/dist/interop/processors/GenericInteropProcessor.d.ts +11 -0
- package/dist/interop/processors/HTMLInteropProcessor.d.ts +41 -0
- package/dist/interop/processors/InteropProcessor.d.ts +11 -0
- package/dist/interop/processors/InteropProcessorCommon.d.ts +21 -0
- package/dist/interop/types/AnchoredEditorData.d.ts +4 -0
- package/dist/interop/types/CKEditorExtensions.d.ts +8 -0
- package/dist/interop/types/CommonTypes.d.ts +27 -0
- package/dist/interop/types/DynamicBadge.d.ts +5 -0
- package/dist/interop/types/DynamicSelect.d.ts +14 -0
- package/dist/recipe/ActionRecipe.d.ts +19 -0
- package/dist/recipe/index.d.ts +1 -0
- package/dist/support/AugnitoMobileSocketResponse.d.ts +19 -0
- package/dist/support/AugnitoNotificationMessage.d.ts +9 -0
- package/dist/support/AugnitoSDKErrorMessage.d.ts +7 -0
- package/dist/support/AugnitoSDKErrors.d.ts +7 -0
- package/dist/support/AugnitoSDKEvent.d.ts +11 -0
- package/dist/support/AugnitoServerStatusCode.d.ts +7 -0
- package/dist/support/AugnitoSocketResponse.d.ts +17 -0
- package/dist/support/AugnitoSource.d.ts +17 -0
- package/dist/support/AugnitoStatus.d.ts +27 -0
- package/dist/utils/AugnitoDomainUtils.d.ts +8 -0
- package/dist/utils/AugnitoUtils.d.ts +11 -0
- package/dist/utils/Guard.d.ts +11 -0
- package/dist/utils/Logger.d.ts +6 -0
- package/dist/utils/RichEditAction.d.ts +11 -0
- package/package.json +79 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SDKConfigMobile } from '../config/SDKConfigMobile';
|
|
2
|
+
import { NotificationClient } from './NotificationClient';
|
|
3
|
+
export declare class MobileClient {
|
|
4
|
+
private _config;
|
|
5
|
+
private _notificationClient;
|
|
6
|
+
private _logTag;
|
|
7
|
+
/** Callback when a mobile client is requesting to connect */
|
|
8
|
+
onConnectionRequest?: () => void;
|
|
9
|
+
/** Callback when a mobile client has scanned the QR Code */
|
|
10
|
+
onMobileScan?: () => void;
|
|
11
|
+
constructor(_config: SDKConfigMobile, _notificationClient: NotificationClient);
|
|
12
|
+
dispose(): void;
|
|
13
|
+
private onMobileScanCallback;
|
|
14
|
+
private onConnectionRequestCallback;
|
|
15
|
+
private createWebSocketForMobileMic;
|
|
16
|
+
stopMobileListening(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AugnitoAppNotification, AugnitoMobileSocketResponse } from '../support/AugnitoMobileSocketResponse';
|
|
2
|
+
import { SDKConfigMobile } from '../config/SDKConfigMobile';
|
|
3
|
+
export declare class NotificationClient {
|
|
4
|
+
private _config;
|
|
5
|
+
private _logTag;
|
|
6
|
+
/** Callback when a mobile client is requesting to connect */
|
|
7
|
+
onConnectionRequest?: (augnitoResponse: AugnitoMobileSocketResponse) => void;
|
|
8
|
+
/** Callback when a mobile client has scanned the QR Code */
|
|
9
|
+
onMobileScan?: () => void;
|
|
10
|
+
/** Callback when vocabulary has been added to the model **/
|
|
11
|
+
onVocabularyAdded?: (notification: AugnitoAppNotification) => void;
|
|
12
|
+
private _pushNotificationSocket;
|
|
13
|
+
get notificationSocket(): WebSocket | null;
|
|
14
|
+
constructor(_config: SDKConfigMobile);
|
|
15
|
+
Send(message: string): void;
|
|
16
|
+
ensureNotificationClientConnected(): void;
|
|
17
|
+
createNotificationClient(): void;
|
|
18
|
+
private createNotificationSocket;
|
|
19
|
+
closeMobileWebSocket(): boolean;
|
|
20
|
+
dispose(): void;
|
|
21
|
+
private onMobileScanCallback;
|
|
22
|
+
private onVocabularyAddedCallback;
|
|
23
|
+
private onConnectionRequestCallback;
|
|
24
|
+
getReplyMessage(JSONResponse: AugnitoMobileSocketResponse, messageType: string): string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PhilipsMicConfig } from '../config/PhilipsMicConfig';
|
|
2
|
+
export declare class PhilipsMicClient {
|
|
3
|
+
private _config;
|
|
4
|
+
private _enableLogs?;
|
|
5
|
+
private _logTag;
|
|
6
|
+
private intervalInMillis;
|
|
7
|
+
private isRecodingIsPressed;
|
|
8
|
+
private counter;
|
|
9
|
+
private WasMicStartedByPressToSpeak;
|
|
10
|
+
onPhilipsMicPressed?: (isStart: boolean | undefined) => void;
|
|
11
|
+
constructor(_config: PhilipsMicConfig, _enableLogs?: boolean | undefined);
|
|
12
|
+
getConnectedPhilipsDeviceName: (idStr: any) => string;
|
|
13
|
+
gamepadCallBack: () => void;
|
|
14
|
+
private HandlePushToTalk;
|
|
15
|
+
private CheckForRECPressed;
|
|
16
|
+
private onPhilipsMicPressedCallback;
|
|
17
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { SDKConfig } from '../config/SDKConfig';
|
|
2
|
+
import { AugnitoSource } from '../support/AugnitoSource';
|
|
3
|
+
/**
|
|
4
|
+
* Augnito Web SDK Client
|
|
5
|
+
*/
|
|
6
|
+
declare class WebClient {
|
|
7
|
+
private _logTag;
|
|
8
|
+
private _speechSocket;
|
|
9
|
+
private _isConnecting;
|
|
10
|
+
private _config;
|
|
11
|
+
constructor(config: SDKConfig);
|
|
12
|
+
isConnecting(): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the connected state
|
|
15
|
+
* @returns true, if the socket state is OPEN; otherwise false
|
|
16
|
+
*/
|
|
17
|
+
get connected(): boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves the client SDK configuration
|
|
20
|
+
* @returns The SDKConfig
|
|
21
|
+
*/
|
|
22
|
+
getConfig(): SDKConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Toggles the Speech API connection
|
|
25
|
+
* @description if already connected, it will stop the web socket; otherwise, it will start a new connection
|
|
26
|
+
*/
|
|
27
|
+
toggleListening(): void;
|
|
28
|
+
/**
|
|
29
|
+
* @description
|
|
30
|
+
* Creates Augnito Client
|
|
31
|
+
*
|
|
32
|
+
* @param {String} socketURL The URL of the socket
|
|
33
|
+
* @param {AugnitoSource} source The source of the application
|
|
34
|
+
*/
|
|
35
|
+
startListening(socketURL: string, source: AugnitoSource): void;
|
|
36
|
+
/**
|
|
37
|
+
* Stops the web socket if the connection is alive.
|
|
38
|
+
* @param alertEndOfSession If true, EndOfSession event will be fired.
|
|
39
|
+
* @returns
|
|
40
|
+
*/
|
|
41
|
+
stopListening(alertEndOfSession: boolean): void;
|
|
42
|
+
/**
|
|
43
|
+
* closes all sockets and streams
|
|
44
|
+
*/
|
|
45
|
+
dispose(): void;
|
|
46
|
+
private createWebSocket;
|
|
47
|
+
private clearAll;
|
|
48
|
+
private closeWebSocket;
|
|
49
|
+
private onPartialText;
|
|
50
|
+
private onEvent;
|
|
51
|
+
private onError;
|
|
52
|
+
private onSocketPartialResult;
|
|
53
|
+
private onSocketFinalResult;
|
|
54
|
+
private onSessionEvent;
|
|
55
|
+
private onEndOfSession;
|
|
56
|
+
private onReadyForSpeech;
|
|
57
|
+
private onMicrophoneOnError;
|
|
58
|
+
}
|
|
59
|
+
export { WebClient };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
declare enum AugnitoCommands {
|
|
2
|
+
BOLD_IT = "boldit",
|
|
3
|
+
UN_BOLD_IT = "unboldit",
|
|
4
|
+
UNDERLINE_IT = "underlineit",
|
|
5
|
+
ITALICIZE_IT = "italicizeit",
|
|
6
|
+
UNITALICIZE_IT = "unitalicizeit",
|
|
7
|
+
COPY_IT = "copyit",
|
|
8
|
+
CUT_IT = "cutit",
|
|
9
|
+
PASTE_IT = "pasteit",
|
|
10
|
+
PRESS_DELETE = "pressdelete",
|
|
11
|
+
HEADER_IT = "headerit",
|
|
12
|
+
CAPITALIZED_IT = "capitalizeit",
|
|
13
|
+
UN_CAPITALIZED_IT = "uncapitalizeit",
|
|
14
|
+
UNDO_IT = "undoit",
|
|
15
|
+
REDO_IT = "redoit",
|
|
16
|
+
SELECT_PREVIOUS_WORD = "selectpreviousword",
|
|
17
|
+
SELECT_NEXT_WORD = "selectnextword",
|
|
18
|
+
SELECT_WORD = "selectword",
|
|
19
|
+
SELECT_ALL = "selectall",
|
|
20
|
+
SELECT = "select",
|
|
21
|
+
DESELECT_IT = "deselectit",
|
|
22
|
+
GO_TO_LINE_START = "gotolinestart",
|
|
23
|
+
GO_TO_LINE_END = "gotolineend",
|
|
24
|
+
SELECT_ACTIVE_LINE = "selectactiveline",
|
|
25
|
+
SELECT_ACTIVE_PARAGRAPH = "selectactiveparagraph",
|
|
26
|
+
SELECT_ACTIVE_WORD = "selectactiveword",
|
|
27
|
+
SELECT_ACTIVE_SENTENCE = "selectactivesentence",
|
|
28
|
+
SELECT_ACTIVE_CHAR = "selectactivechar",
|
|
29
|
+
BULLET_LIST_START = "bulletliststart",
|
|
30
|
+
NUMBER_LIST_START = "numberliststart",
|
|
31
|
+
BULLET_LIST_STOP = "bulletliststop",
|
|
32
|
+
NUMBER_LIST_STOP = "numberliststop",
|
|
33
|
+
LIST_STOP = "stoplist",
|
|
34
|
+
ALIGN_LEFT = "alignleft",
|
|
35
|
+
ALIGN_RIGHT = "alignright",
|
|
36
|
+
ALIGN_CENTER = "aligncenter",
|
|
37
|
+
ALIGN_JUSTIFY = "alignjustify",
|
|
38
|
+
STOP_MIC = "stopmic",
|
|
39
|
+
GO_UP = "goup",
|
|
40
|
+
GO_DOWN = "godown",
|
|
41
|
+
GO_RIGHT = "goright",
|
|
42
|
+
GO_LEFT = "goleft",
|
|
43
|
+
TAB_SPACE_ADD = "tabspaceadd",
|
|
44
|
+
SPACE_ADD = "spaceadd",
|
|
45
|
+
BACKSPACE = "backspace",
|
|
46
|
+
START_BOLD_TEXT = "boldstart",
|
|
47
|
+
STOP_BOLD_TEXT = "boldstop",
|
|
48
|
+
GO_TO_DOCUMENT_START = "gotodocumentstart",
|
|
49
|
+
GO_TO_DOCUMENT_END = "gotodocumentend",
|
|
50
|
+
GO_TO_NEXT_PAGE = "gotonextpage",
|
|
51
|
+
GO_TO_PREVIOUS_PAGE = "gotopreviouspage",
|
|
52
|
+
OK = "ok",
|
|
53
|
+
DOCUMENT_SAVE = "documentsave",
|
|
54
|
+
DOCUMENT_PRINT = "documentprint",
|
|
55
|
+
NEW_DOCUMENT = "newdocument",
|
|
56
|
+
SELECT_PARAGRAPH = "paragraph",
|
|
57
|
+
NEXT_LINE_TEXT = "@newline@",
|
|
58
|
+
SELECT_LINE = "selectline",
|
|
59
|
+
SELECT_CHAR = "char",
|
|
60
|
+
SELECT_SENTENCE = "selectsentence",
|
|
61
|
+
DELETE = "delete",
|
|
62
|
+
GOTO = "goto",
|
|
63
|
+
DELETE_PREVIOUS_WORD = "deletepreviousword",
|
|
64
|
+
UNDERLIE_PREVIOUS_WORD = "underlinepreviousword",
|
|
65
|
+
CAPITALIZE_PREVIOUS_WORD = "capitalizepreviousword",
|
|
66
|
+
ITALICIZE_PREVIOUS_WORD = "italicizepreviousword",
|
|
67
|
+
BOLD_PREVIOUS_WORD = "boldpreviousword",
|
|
68
|
+
BOLD_LAST_LINE = "boldlastline",
|
|
69
|
+
DELETE_NEXT_WORD = "deletenextword",
|
|
70
|
+
DELETE_PREVIOUS_LINE = "deletepreviousline",
|
|
71
|
+
SELECT_PREVIOUS_LINE = "selectpreviousline",
|
|
72
|
+
BOLD_PREVIOUS_LINE = "boldpreviousline",
|
|
73
|
+
UNDERLINE_PREVIOUS_LINE = "underlinepreviousline",
|
|
74
|
+
ITALICIZE_PREVIOUS_LINE = "italicizepreviousline",
|
|
75
|
+
CAPITALIZE_PREVIOUS_LINE = "capitalizepreviousline",
|
|
76
|
+
SELECT_NEXT_LINE = "selectnextline",
|
|
77
|
+
SELECT_PREVIOUS_PARAGRAPH = "selectpreviousparagraph",
|
|
78
|
+
SELECT_NEXT_PARAGRAPH = "selectnextparagraph",
|
|
79
|
+
SETFONTSIZEN = "setfontsize",
|
|
80
|
+
INSERT_BEFORE_TEXT = "insertbefore",
|
|
81
|
+
INSERT_AFTER_TEXT = "insertafter",
|
|
82
|
+
DELETE_PREVIOUS_SENTENCE = "deleteprevioussentence",
|
|
83
|
+
SELECT_PREVIOUS_SENTENCE = "selectprevioussentence",
|
|
84
|
+
SELECT_NEXT_SENTENCE = "selectnextsentence",
|
|
85
|
+
START_CAPITAL_TEXT = "capitalizestart",
|
|
86
|
+
STOP_CAPITAL_TEXT = "capitalizestop",
|
|
87
|
+
NEXT_FIELD = "dynamicfieldnext",
|
|
88
|
+
PREVIOUS_FIELD = "dynamicfieldprevious",
|
|
89
|
+
GET_ORDER = "getorder",
|
|
90
|
+
ADD_MEDICINE = "addmedicine",
|
|
91
|
+
NUMBER = "number"
|
|
92
|
+
}
|
|
93
|
+
export { AugnitoCommands };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PrepareCommandRecipe, ActionRecipe } from '../recipe/ActionRecipe';
|
|
2
|
+
declare abstract class AugnitoCommandsRegex {
|
|
3
|
+
static prepareRecipe(command: PrepareCommandRecipe): Partial<ActionRecipe>;
|
|
4
|
+
static fillDynamicCommand(recipe: Partial<ActionRecipe>, commandText: string): Partial<ActionRecipe>;
|
|
5
|
+
static setActionCommandVariant(cmdAction: string): string;
|
|
6
|
+
static setActiveObjectType(item: string): string;
|
|
7
|
+
static setSelectObjectType(item: string): string;
|
|
8
|
+
}
|
|
9
|
+
export { AugnitoCommandsRegex };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ActionRecipe, PrepareCommandRecipe } from '../recipe/ActionRecipe';
|
|
2
|
+
declare abstract class AugnitoCommandsStatic {
|
|
3
|
+
static createGoToDocumentEndCommand(): Partial<ActionRecipe>;
|
|
4
|
+
static prepareRecipe(command: PrepareCommandRecipe): Partial<ActionRecipe>;
|
|
5
|
+
}
|
|
6
|
+
export { AugnitoCommandsStatic };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PrepareCommandRecipe, ActionRecipe } from '../recipe/ActionRecipe';
|
|
2
|
+
import { CustomCommandModel } from './utils/CustomCommandModel';
|
|
3
|
+
declare abstract class AugnitoCustomCommands {
|
|
4
|
+
static dynamicList: CustomCommandModel[] | undefined;
|
|
5
|
+
static addCommand(commandName: string, functionParam?: any, callback?: (param?: any) => void): void;
|
|
6
|
+
static prepareCustomCommandRecipe(command: PrepareCommandRecipe): Partial<ActionRecipe | null>;
|
|
7
|
+
}
|
|
8
|
+
export { AugnitoCustomCommands };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AugnitoCommands';
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { PhilipsMicMode } from '../interop';
|
|
2
|
+
import { EditorType } from '../interop/core/EditorType';
|
|
3
|
+
import { TargetEditor } from '../interop/core/TargetEditor';
|
|
4
|
+
/**
|
|
5
|
+
* Augnito Client Configuration
|
|
6
|
+
*/
|
|
7
|
+
interface AugnitoConfig {
|
|
8
|
+
/**
|
|
9
|
+
* Server configuration: India, UK, US
|
|
10
|
+
* @description Mandatory field
|
|
11
|
+
*/
|
|
12
|
+
server: string | AugnitoAPIServer;
|
|
13
|
+
/**
|
|
14
|
+
* Application's Acccount Code
|
|
15
|
+
* @description Mandatory field
|
|
16
|
+
*/
|
|
17
|
+
accountCode: string;
|
|
18
|
+
/**
|
|
19
|
+
* Application's Access Key
|
|
20
|
+
* @description Mandatory field
|
|
21
|
+
*/
|
|
22
|
+
accessKey: string;
|
|
23
|
+
/**
|
|
24
|
+
* Language Model Id
|
|
25
|
+
* @description Mandatory field
|
|
26
|
+
*/
|
|
27
|
+
lmId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Optional Field: Enables or Disables Logging system
|
|
30
|
+
* @description True if logs are enabled; Otherwise false
|
|
31
|
+
*/
|
|
32
|
+
enableLogs?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Unique identifier of the current user (from client application)
|
|
35
|
+
* @description Mandatory field
|
|
36
|
+
*/
|
|
37
|
+
userTag: string;
|
|
38
|
+
/**
|
|
39
|
+
* The name of the current Application
|
|
40
|
+
* @description Mandatory field
|
|
41
|
+
*/
|
|
42
|
+
sourceApp: string;
|
|
43
|
+
/**
|
|
44
|
+
* Optional Field: To set noise cancellation value
|
|
45
|
+
* @description default value is 1,
|
|
46
|
+
*/
|
|
47
|
+
noiseCt?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Optional Field: To be used with Augnito Mobile SDK
|
|
50
|
+
* DeviceId should be provided if mobile client is going to be created.
|
|
51
|
+
*/
|
|
52
|
+
deviceId?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Optional Field: Client application can pass an encrypted login token via this
|
|
55
|
+
* parameter which may represent user login timestamp.
|
|
56
|
+
*/
|
|
57
|
+
loginToken?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Optional Field: The client application can pass any name of component, application window, microphone
|
|
60
|
+
* identifier, etc. to tag to a speech session. This information may be used for later analysis.
|
|
61
|
+
*/
|
|
62
|
+
otherInfo?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The list of valid editors
|
|
65
|
+
*/
|
|
66
|
+
listOfControls?: TargetEditor[];
|
|
67
|
+
/**
|
|
68
|
+
* Sets the editor WYSIWYG editor
|
|
69
|
+
*/
|
|
70
|
+
editor?: EditorType;
|
|
71
|
+
/**
|
|
72
|
+
* Sets PhilipsMic push to talk or hands free mode
|
|
73
|
+
*/
|
|
74
|
+
philipsMicMode?: PhilipsMicMode;
|
|
75
|
+
/**
|
|
76
|
+
* Require early initialisation of recorder mic to start listening immediately on mic start
|
|
77
|
+
*/
|
|
78
|
+
earlyInitialiseRecorder?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Require early initialisation and streaming of audio which is dictated just before resuming mic. The value indicates interval (in seconds) of audio which needs to be streamed while resuming mic
|
|
81
|
+
*/
|
|
82
|
+
pauseStateBufferInterval?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Sets rate (in milliseconds) at which toggleListening is executed by delaying its invocation, default being 300ms
|
|
85
|
+
*/
|
|
86
|
+
debounceDelay?: number;
|
|
87
|
+
/**
|
|
88
|
+
* Sets regular speech profile
|
|
89
|
+
*/
|
|
90
|
+
switchToRegularSpeechProfile?: boolean;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Speech API Server
|
|
94
|
+
*/
|
|
95
|
+
declare enum AugnitoAPIServer {
|
|
96
|
+
/**
|
|
97
|
+
* Augnito's India Server
|
|
98
|
+
*/
|
|
99
|
+
INDIA = 0,
|
|
100
|
+
/**
|
|
101
|
+
* Augnito's United Kingdom Server
|
|
102
|
+
*/
|
|
103
|
+
UK = 1,
|
|
104
|
+
/**
|
|
105
|
+
* Augnito's United States Server
|
|
106
|
+
*/
|
|
107
|
+
US = 2,
|
|
108
|
+
/**
|
|
109
|
+
* Augnito's Saudi Arabia Server
|
|
110
|
+
*/
|
|
111
|
+
KSA = 3
|
|
112
|
+
}
|
|
113
|
+
export { AugnitoConfig, AugnitoAPIServer };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { WebClient } from '../client/WebClient';
|
|
2
|
+
import { AugnitoConfig } from './AugnitoConfig';
|
|
3
|
+
import { AugnitoMobileConfig } from './AugnitoMobileConfig';
|
|
4
|
+
/**
|
|
5
|
+
* Validates the augnito config has all the mandatory fields
|
|
6
|
+
* @param config The config sent by the client application
|
|
7
|
+
*/
|
|
8
|
+
declare const validateConfig: (config: AugnitoConfig) => AugnitoConfig;
|
|
9
|
+
/**
|
|
10
|
+
* Validates the mobile augnito config has all the mandatory fields
|
|
11
|
+
* @param webClient The AugnitoClient
|
|
12
|
+
* @param config The config sent by the client application
|
|
13
|
+
*/
|
|
14
|
+
declare const validateMobileConfig: (webClient: WebClient, config: AugnitoMobileConfig) => AugnitoMobileConfig;
|
|
15
|
+
export { validateConfig, validateMobileConfig };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents an entry point for application configuration properties
|
|
3
|
+
*/
|
|
4
|
+
export interface IConfiguration {
|
|
5
|
+
/**
|
|
6
|
+
* Sets the Language model to be used
|
|
7
|
+
* @param lmId The new language model
|
|
8
|
+
*/
|
|
9
|
+
setLmId(lmId: string): void;
|
|
10
|
+
/**
|
|
11
|
+
* Sets a custom speech url to be used to open the socket connection
|
|
12
|
+
* @param speechURL The new SpeechURL
|
|
13
|
+
*/
|
|
14
|
+
setSpeechURL(speechURL: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Sets a custom domain name to be used to open the socket connection
|
|
17
|
+
* @param domainName The new Domain Name
|
|
18
|
+
*/
|
|
19
|
+
setDomainName(domainName: string): void;
|
|
20
|
+
/**
|
|
21
|
+
* Sets the Account Code to be used
|
|
22
|
+
* @param accountCode The new Account code
|
|
23
|
+
*/
|
|
24
|
+
setAccountCode(accountCode: string): void;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the Access Key to be used
|
|
27
|
+
* @param accessKey Thew new Access Key
|
|
28
|
+
*/
|
|
29
|
+
setAccessKey(accessKey: string): void;
|
|
30
|
+
/**
|
|
31
|
+
* Enables/Disables the logs for the current instance
|
|
32
|
+
* @param enableLogs True if the logs are enabled; otherwise false
|
|
33
|
+
*/
|
|
34
|
+
setEnableLogs(enableLogs: boolean): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PhilipsMicMode } from '../interop/core/PhilipsMicMode';
|
|
2
|
+
export interface PhilipsMicConfig {
|
|
3
|
+
/**
|
|
4
|
+
* Optional Field: Enables or Disables Logging system
|
|
5
|
+
* @description True if logs are enabled; Otherwise false
|
|
6
|
+
*/
|
|
7
|
+
philipsMicMode?: PhilipsMicMode;
|
|
8
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AugnitoConfig } from './AugnitoConfig';
|
|
2
|
+
import { AugnitoSDKEvent } from '../support/AugnitoSDKEvent';
|
|
3
|
+
import { AugnitoSocketResponse } from '../support/AugnitoSocketResponse';
|
|
4
|
+
import { AugnitoSource } from '../support/AugnitoSource';
|
|
5
|
+
import { IConfiguration } from './IConfiguration ';
|
|
6
|
+
/**
|
|
7
|
+
* Augnito SDK Config
|
|
8
|
+
*/
|
|
9
|
+
export declare class SDKConfig implements IConfiguration {
|
|
10
|
+
private _config;
|
|
11
|
+
qrCode: string;
|
|
12
|
+
customSpeechURL: string | undefined;
|
|
13
|
+
readonly contentType: string;
|
|
14
|
+
readonly noiseCt: string;
|
|
15
|
+
readonly interval: number;
|
|
16
|
+
domainURL: string;
|
|
17
|
+
macroServiceURL: string;
|
|
18
|
+
pushNotificationURL: string;
|
|
19
|
+
speechMicURL: string;
|
|
20
|
+
source: AugnitoSource;
|
|
21
|
+
onSocketPartialResult?: (data: string) => void;
|
|
22
|
+
onSocketFinalResult?: (data: AugnitoSocketResponse) => void;
|
|
23
|
+
onEndOfSession?: (isConnected: boolean) => void;
|
|
24
|
+
onReadyForSpeech?: (isConnected: boolean) => void;
|
|
25
|
+
onEvent?: (e: AugnitoSDKEvent, data: string) => void;
|
|
26
|
+
onSessionEvent?: (data: AugnitoSocketResponse) => void;
|
|
27
|
+
onError?: (data: string) => void;
|
|
28
|
+
onMicrophoneOnError?: (isWebClient: boolean) => void;
|
|
29
|
+
constructor(_config: AugnitoConfig);
|
|
30
|
+
setLmId(lmId: string): void;
|
|
31
|
+
setSpeechURL(speechURL: string): void;
|
|
32
|
+
setDomainName(domainName: string): void;
|
|
33
|
+
setAccountCode(accountCode: string): void;
|
|
34
|
+
setAccessKey(accessKey: string): void;
|
|
35
|
+
setEnableLogs(enableLogs: boolean): void;
|
|
36
|
+
get clientConfig(): AugnitoConfig;
|
|
37
|
+
get enableLogs(): boolean | undefined;
|
|
38
|
+
prepareSpeechURL(): string;
|
|
39
|
+
private getQRCode;
|
|
40
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { WebClient } from '../client/WebClient';
|
|
2
|
+
import { AugnitoMobileSocketResponse } from '../support/AugnitoMobileSocketResponse';
|
|
3
|
+
import { AugnitoMobileConfig } from './AugnitoMobileConfig';
|
|
4
|
+
/**
|
|
5
|
+
* Mobile SDK Config
|
|
6
|
+
*/
|
|
7
|
+
export declare class SDKConfigMobile {
|
|
8
|
+
private _config;
|
|
9
|
+
private _webClient;
|
|
10
|
+
onMicrophoneOnError?: (isWebClient: boolean) => void;
|
|
11
|
+
constructor(_config: AugnitoMobileConfig, _webClient: WebClient);
|
|
12
|
+
get clientConfig(): AugnitoMobileConfig;
|
|
13
|
+
get enableLogs(): boolean | undefined;
|
|
14
|
+
setEnableLogs(enableLogs: boolean): void;
|
|
15
|
+
get deviceId(): string | undefined;
|
|
16
|
+
get userTag(): string;
|
|
17
|
+
startListening(JSONResponse: AugnitoMobileSocketResponse): void;
|
|
18
|
+
stopListening(): void;
|
|
19
|
+
prepareNotificationURL(): string;
|
|
20
|
+
prepareSpeechMicURL(JSONResponse: AugnitoMobileSocketResponse): string;
|
|
21
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { Augnito } from './Augnito';
|
|
2
|
+
export { AugnitoMobile } from './AugnitoMobile';
|
|
3
|
+
export { AugnitoSDKErrorMessage } from './support/AugnitoSDKErrorMessage';
|
|
4
|
+
export { AugnitoSDKError } from './support/AugnitoSDKErrors';
|
|
5
|
+
export * from './interop';
|
|
6
|
+
export * from './config/';
|
|
7
|
+
export * from './commands';
|
|
8
|
+
export * from './recipe';
|
|
9
|
+
export * from './config';
|
|
10
|
+
export * from './api';
|