@frankieone/one-sdk 1.0.0-beta → 1.1.0-beta
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/commit.txt +2 -2
- package/dist/esm/features.config.d.ts +39 -0
- package/dist/esm/features.config.d.ts.map +1 -0
- package/dist/esm/features.config.js +38 -0
- package/dist/esm/features.config.js.map +1 -0
- package/dist/esm/modules/biometrics/vendors/Incode/index.d.ts +1 -1
- package/dist/esm/modules/biometrics/vendors/Incode/index.d.ts.map +1 -1
- package/dist/esm/modules/biometrics/vendors/Incode/index.js +15 -1
- package/dist/esm/modules/biometrics/vendors/Incode/index.js.map +1 -1
- package/dist/esm/modules/biometrics/vendors/OcrLabs/index.d.ts +1 -1
- package/dist/esm/modules/biometrics/vendors/OcrLabs/index.d.ts.map +1 -1
- package/dist/esm/modules/biometrics/vendors/OcrLabs/index.js +3 -27
- package/dist/esm/modules/biometrics/vendors/OcrLabs/index.js.map +1 -1
- package/dist/esm/modules/biometrics/vendors/Onfido/index.d.ts +1 -1
- package/dist/esm/modules/biometrics/vendors/Onfido/index.d.ts.map +1 -1
- package/dist/esm/modules/biometrics/vendors/Onfido/index.js +9 -9
- package/dist/esm/modules/biometrics/vendors/Onfido/index.js.map +1 -1
- package/dist/esm/modules/biometrics/vendors/dummy-biometrics/index.d.ts +1 -1
- package/dist/esm/modules/common/errors/{OneSDKError.d.ts → OneSDKError.class.d.ts} +1 -1
- package/dist/esm/modules/common/errors/OneSDKError.class.d.ts.map +1 -0
- package/dist/esm/modules/common/errors/{OneSDKError.js → OneSDKError.class.js} +1 -1
- package/dist/esm/modules/common/errors/OneSDKError.class.js.map +1 -0
- package/dist/esm/modules/common/index.d.ts +1 -1
- package/dist/esm/modules/common/index.d.ts.map +1 -1
- package/dist/esm/modules/common/index.js +1 -1
- package/dist/esm/modules/common/index.js.map +1 -1
- package/dist/esm/modules/common/modules/HOF.d.ts +2 -2
- package/dist/esm/modules/common/modules/HOF.js +1 -1
- package/dist/esm/modules/common/modules/error.d.ts +2 -2
- package/dist/esm/modules/common/modules/error.js +2 -2
- package/dist/esm/modules/common/modules/error.js.map +1 -1
- package/dist/esm/modules/common/modules/eventHub/index.d.ts +2 -2
- package/dist/esm/modules/common/modules/eventHub/index.d.ts.map +1 -1
- package/dist/esm/modules/common/modules/eventHub/index.js +59 -12
- package/dist/esm/modules/common/modules/eventHub/index.js.map +1 -1
- package/dist/esm/modules/common/modules/eventHub/types.d.ts +11 -8
- package/dist/esm/modules/common/modules/eventHub/types.d.ts.map +1 -1
- package/dist/esm/modules/common/modules/eventHub/windowEventHub.d.ts +13 -0
- package/dist/esm/modules/common/modules/eventHub/windowEventHub.d.ts.map +1 -0
- package/dist/esm/modules/common/modules/eventHub/windowEventHub.js +39 -0
- package/dist/esm/modules/common/modules/eventHub/windowEventHub.js.map +1 -0
- package/dist/esm/modules/common/modules/vendorLoading.d.ts +10 -10
- package/dist/esm/modules/common/modules/vendorLoading.d.ts.map +1 -1
- package/dist/esm/modules/common/modules/vendorLoading.js +2 -2
- package/dist/esm/modules/common/modules/vendorLoading.js.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/{BaseParameters.d.ts → baseParameters.types.d.ts} +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/baseParameters.types.d.ts.map +1 -0
- package/dist/esm/modules/common/types/oneSDKModules/{BaseParameters.js → baseParameters.types.js} +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/baseParameters.types.js.map +1 -0
- package/dist/esm/modules/common/types/oneSDKModules/definition.types.d.ts +15 -3
- package/dist/esm/modules/common/types/oneSDKModules/definition.types.d.ts.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/index.d.ts +2 -2
- package/dist/esm/modules/common/types/oneSDKModules/index.d.ts.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/index.js +2 -2
- package/dist/esm/modules/common/types/oneSDKModules/index.js.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/initialiseFunction.d.ts +4 -4
- package/dist/esm/modules/common/types/oneSDKModules/initialiseFunction.d.ts.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/initialiseFunction.js.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/{TypeSystem.d.ts → typeSystem.types.d.ts} +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/typeSystem.types.d.ts.map +1 -0
- package/dist/esm/modules/common/types/oneSDKModules/typeSystem.types.js +2 -0
- package/dist/esm/modules/common/types/oneSDKModules/typeSystem.types.js.map +1 -0
- package/dist/esm/modules/common/types/recipeConfiguration.types.d.ts +5 -11
- package/dist/esm/modules/common/types/recipeConfiguration.types.d.ts.map +1 -1
- package/dist/esm/modules/common/vendors/incode/index.d.ts +2 -1
- package/dist/esm/modules/common/vendors/incode/index.d.ts.map +1 -1
- package/dist/esm/modules/common/vendors/incode/index.js +2 -4
- package/dist/esm/modules/common/vendors/incode/index.js.map +1 -1
- package/dist/esm/modules/common/vendors/incode/startCamera.d.ts +1 -1
- package/dist/esm/modules/common/vendors/incode/startCamera.d.ts.map +1 -1
- package/dist/esm/modules/common/vendors/incode/startCamera.js +24 -2
- package/dist/esm/modules/common/vendors/incode/startCamera.js.map +1 -1
- package/dist/esm/modules/common/vendors/smart-ui/promisifySmartUI.d.ts +13 -0
- package/dist/esm/modules/common/vendors/smart-ui/promisifySmartUI.d.ts.map +1 -0
- package/dist/esm/modules/common/vendors/smart-ui/promisifySmartUI.js +30 -0
- package/dist/esm/modules/common/vendors/smart-ui/promisifySmartUI.js.map +1 -0
- package/dist/esm/modules/common/vendors/smart-ui/useSmartUI.d.ts +35 -0
- package/dist/esm/modules/common/vendors/smart-ui/useSmartUI.d.ts.map +1 -0
- package/dist/esm/modules/common/vendors/smart-ui/useSmartUI.js +60 -0
- package/dist/esm/modules/common/vendors/smart-ui/useSmartUI.js.map +1 -0
- package/dist/esm/modules/config/modules.d.ts +4 -2
- package/dist/esm/modules/config/modules.d.ts.map +1 -1
- package/dist/esm/modules/config/modules.js +9 -7
- package/dist/esm/modules/config/modules.js.map +1 -1
- package/dist/esm/modules/idv/actions/mount.d.ts +14 -0
- package/dist/esm/modules/idv/actions/mount.d.ts.map +1 -0
- package/dist/esm/modules/idv/actions/mount.js +67 -0
- package/dist/esm/modules/idv/actions/mount.js.map +1 -0
- package/dist/esm/modules/idv/definition.types.d.ts +2 -1
- package/dist/esm/modules/idv/definition.types.d.ts.map +1 -1
- package/dist/esm/modules/idv/{events.d.ts → events.types.d.ts} +1 -1
- package/dist/esm/modules/idv/events.types.d.ts.map +1 -0
- package/dist/esm/modules/idv/events.types.js +2 -0
- package/dist/esm/modules/idv/events.types.js.map +1 -0
- package/dist/esm/modules/idv/index.d.ts.map +1 -1
- package/dist/esm/modules/idv/index.js +19 -73
- package/dist/esm/modules/idv/index.js.map +1 -1
- package/dist/esm/modules/idv/vendors/Incode/index.d.ts +5 -6
- package/dist/esm/modules/idv/vendors/Incode/index.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/Incode/index.js +6 -5
- package/dist/esm/modules/idv/vendors/Incode/index.js.map +1 -1
- package/dist/esm/modules/idv/vendors/Mastercard/index.d.ts +5 -5
- package/dist/esm/modules/idv/vendors/Mastercard/index.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/Mastercard/index.js +11 -12
- package/dist/esm/modules/idv/vendors/Mastercard/index.js.map +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/endFlow.js +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/endFlow.js.map +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/index.d.ts +3 -2
- package/dist/esm/modules/idv/vendors/OcrLabs/index.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/startDummyFlow.d.ts +2 -2
- package/dist/esm/modules/idv/vendors/OcrLabs/startDummyFlow.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/startDummyFlow.js +2 -2
- package/dist/esm/modules/idv/vendors/OcrLabs/startDummyFlow.js.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframe.d.ts +7 -5
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframe.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframe.js +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframe.js.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframeEventListener.d.ts +11 -5
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframeEventListener.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframeEventListener.js +9 -4
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframeEventListener.js.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/defineIframeIDVWrapper.d.ts +8 -4
- package/dist/esm/modules/idv/vendors/common/iframeUtils/defineIframeIDVWrapper.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/defineIframeIDVWrapper.js +58 -46
- package/dist/esm/modules/idv/vendors/common/iframeUtils/defineIframeIDVWrapper.js.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/updateIndividualModuleState.d.ts +12 -0
- package/dist/esm/modules/idv/vendors/common/iframeUtils/updateIndividualModuleState.d.ts.map +1 -0
- package/dist/esm/modules/idv/vendors/common/iframeUtils/updateIndividualModuleState.js +34 -0
- package/dist/esm/modules/idv/vendors/common/iframeUtils/updateIndividualModuleState.js.map +1 -0
- package/dist/esm/modules/index.d.ts +7 -7
- package/dist/esm/modules/index.d.ts.map +1 -1
- package/dist/esm/modules/index.js +16 -11
- package/dist/esm/modules/index.js.map +1 -1
- package/dist/esm/modules/individual/actions/search.d.ts +3 -3
- package/dist/esm/modules/individual/actions/search.d.ts.map +1 -1
- package/dist/esm/modules/individual/actions/search.js +8 -8
- package/dist/esm/modules/individual/actions/search.js.map +1 -1
- package/dist/esm/modules/individual/actions/submit.d.ts +11 -8
- package/dist/esm/modules/individual/actions/submit.d.ts.map +1 -1
- package/dist/esm/modules/individual/actions/submit.js +41 -20
- package/dist/esm/modules/individual/actions/submit.js.map +1 -1
- package/dist/esm/modules/individual/definition.d.ts +13 -13
- package/dist/esm/modules/individual/definition.d.ts.map +1 -1
- package/dist/esm/modules/individual/index.d.ts +3 -3
- package/dist/esm/modules/individual/index.js +23 -23
- package/dist/esm/modules/meta.json +1 -1
- package/dist/esm/modules/ocr/actions/mount.d.ts +9 -4
- package/dist/esm/modules/ocr/actions/mount.d.ts.map +1 -1
- package/dist/esm/modules/ocr/actions/mount.js +54 -32
- package/dist/esm/modules/ocr/actions/mount.js.map +1 -1
- package/dist/esm/modules/ocr/actions/start.d.ts +1 -0
- package/dist/esm/modules/ocr/actions/start.d.ts.map +1 -1
- package/dist/esm/modules/ocr/actions/start.js +85 -69
- package/dist/esm/modules/ocr/actions/start.js.map +1 -1
- package/dist/esm/modules/ocr/definition.d.ts +21 -9
- package/dist/esm/modules/ocr/definition.d.ts.map +1 -1
- package/dist/esm/modules/ocr/index.d.ts.map +1 -1
- package/dist/esm/modules/ocr/index.js +6 -4
- package/dist/esm/modules/ocr/index.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/Incode/index.d.ts +13 -2
- package/dist/esm/modules/ocr/vendors/Incode/index.d.ts.map +1 -1
- package/dist/esm/modules/ocr/vendors/Incode/index.js +13 -18
- package/dist/esm/modules/ocr/vendors/Incode/index.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/Onfido/index.d.ts +13 -2
- package/dist/esm/modules/ocr/vendors/Onfido/index.d.ts.map +1 -1
- package/dist/esm/modules/ocr/vendors/Onfido/index.js +17 -20
- package/dist/esm/modules/ocr/vendors/Onfido/index.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/common/initProcess.d.ts +20 -9
- package/dist/esm/modules/ocr/vendors/common/initProcess.d.ts.map +1 -1
- package/dist/esm/modules/ocr/vendors/common/initProcess.js +52 -17
- package/dist/esm/modules/ocr/vendors/common/initProcess.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/common/mutationObserver.d.ts +2 -2
- package/dist/esm/modules/ocr/vendors/common/mutationObserver.d.ts.map +1 -1
- package/dist/esm/modules/ocr/vendors/common/mutationObserver.js +2 -2
- package/dist/esm/modules/ocr/vendors/common/mutationObserver.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/dummy-ocr/index.d.ts +13 -2
- package/dist/esm/modules/ocr/vendors/dummy-ocr/index.d.ts.map +1 -1
- package/dist/esm/modules/sdk/devTools/attachDevTools.d.ts +22 -0
- package/dist/esm/modules/sdk/devTools/attachDevTools.d.ts.map +1 -0
- package/dist/esm/modules/sdk/devTools/attachDevTools.js +38 -0
- package/dist/esm/modules/sdk/devTools/attachDevTools.js.map +1 -0
- package/dist/esm/modules/sdk/index.d.ts +2 -2
- package/dist/esm/modules/sdk/index.d.ts.map +1 -1
- package/dist/esm/modules/sdk/index.js +17 -13
- package/dist/esm/modules/sdk/index.js.map +1 -1
- package/dist/esm/modules/sdk/initialisation/componentLoader.d.ts +147 -36
- package/dist/esm/modules/sdk/initialisation/componentLoader.d.ts.map +1 -1
- package/dist/esm/modules/sdk/initialisation/componentLoader.js +14 -11
- package/dist/esm/modules/sdk/initialisation/componentLoader.js.map +1 -1
- package/dist/esm/modules/sdk/initialisation/sharedDependencies.d.ts +4 -4
- package/dist/esm/modules/sdk/initialisation/sharedDependencies.js +26 -26
- package/dist/esm/modules/sdk/initialisation/sharedDependencies.js.map +1 -1
- package/dist/esm/modules/sdk/types/oneSDKParameters.d.ts +5 -4
- package/dist/esm/modules/sdk/types/oneSDKParameters.d.ts.map +1 -1
- package/dist/esm/modules/sdk/types/oneSDKParameters.js.map +1 -1
- package/dist/esm/modules/session/SessionContext.d.ts +1 -1
- package/dist/esm/modules/session/SessionContext.js +6 -6
- package/dist/esm/modules/smart-ui/definition.d.ts +50 -0
- package/dist/esm/modules/smart-ui/definition.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/definition.js +2 -0
- package/dist/esm/modules/smart-ui/definition.js.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/i18n.json +6 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/index.d.ts +54 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/index.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/index.js +75 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/index.js.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/loadSmartUI.d.ts +9 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/loadSmartUI.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/loadSmartUI.js +42 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/loadSmartUI.js.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIEvents.types.d.ts +23 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIEvents.types.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIEvents.types.js +2 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIEvents.types.js.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIOptions.types.d.ts +76 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIOptions.types.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIOptions.types.js +2 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIOptions.types.js.map +1 -0
- package/dist/esm/modules/smart-ui/index.d.ts +4 -0
- package/dist/esm/modules/smart-ui/index.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/index.js +26 -0
- package/dist/esm/modules/smart-ui/index.js.map +1 -0
- package/dist/esm/modules/smart-ui/validateConfiguration.d.ts +6 -0
- package/dist/esm/modules/smart-ui/validateConfiguration.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/validateConfiguration.js +10 -0
- package/dist/esm/modules/smart-ui/validateConfiguration.js.map +1 -0
- package/dist/esm/modules/types.d.ts +16 -16
- package/dist/esm/modules/types.d.ts.map +1 -1
- package/dist/esm/modules/types.js +4 -4
- package/dist/esm/modules/types.js.map +1 -1
- package/dist/release.txt +2 -2
- package/dist/umd/biometrics-dummy.js +1 -1
- package/dist/umd/biometrics-incode.js +1 -1
- package/dist/umd/biometrics-incode.js.map +1 -1
- package/dist/umd/biometrics-ocrlabs.js +1 -1
- package/dist/umd/biometrics-ocrlabs.js.map +1 -1
- package/dist/umd/biometrics-onfido.js +1 -1
- package/dist/umd/biometrics-onfido.js.map +1 -1
- package/dist/umd/device-sardine.js +1 -1
- package/dist/umd/idv-incode.js +1 -1
- package/dist/umd/idv-incode.js.map +1 -1
- package/dist/umd/idv-mastercard.js +1 -1
- package/dist/umd/idv-mastercard.js.map +1 -1
- package/dist/umd/idv-ocrlabs.js +1 -1
- package/dist/umd/idv-ocrlabs.js.map +1 -1
- package/dist/umd/ocr-dummy.js +1 -1
- package/dist/umd/ocr-dummy.js.map +1 -1
- package/dist/umd/ocr-incode.js +1 -1
- package/dist/umd/ocr-incode.js.map +1 -1
- package/dist/umd/ocr-onfido.js +1 -1
- package/dist/umd/ocr-onfido.js.map +1 -1
- package/dist/umd/oneSdk.umd.js +1 -1
- package/dist/umd/oneSdk.umd.js.map +1 -1
- package/dist/umd/smartui-legacy.js +2 -0
- package/dist/umd/smartui-legacy.js.map +1 -0
- package/dist/version.txt +2 -2
- package/package.json +1 -1
- package/dist/esm/modules/common/errors/OneSDKError.d.ts.map +0 -1
- package/dist/esm/modules/common/errors/OneSDKError.js.map +0 -1
- package/dist/esm/modules/common/types/oneSDKModules/BaseParameters.d.ts.map +0 -1
- package/dist/esm/modules/common/types/oneSDKModules/BaseParameters.js.map +0 -1
- package/dist/esm/modules/common/types/oneSDKModules/TypeSystem.d.ts.map +0 -1
- package/dist/esm/modules/common/types/oneSDKModules/TypeSystem.js +0 -2
- package/dist/esm/modules/common/types/oneSDKModules/TypeSystem.js.map +0 -1
- package/dist/esm/modules/idv/events.d.ts.map +0 -1
- package/dist/esm/modules/idv/events.js +0 -2
- package/dist/esm/modules/idv/events.js.map +0 -1
- package/dist/esm/modules/ocr/vendors/common/mutation-observer.d.ts +0 -4
- package/dist/esm/modules/ocr/vendors/common/mutation-observer.d.ts.map +0 -1
- package/dist/esm/modules/ocr/vendors/common/mutation-observer.js +0 -21
- package/dist/esm/modules/ocr/vendors/common/mutation-observer.js.map +0 -1
- package/dist/esm/modules/ocr/vendors/common/status-evaluators.d.ts +0 -18
- package/dist/esm/modules/ocr/vendors/common/status-evaluators.d.ts.map +0 -1
- package/dist/esm/modules/ocr/vendors/common/status-evaluators.js +0 -11
- package/dist/esm/modules/ocr/vendors/common/status-evaluators.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { InjectedState, InstanceObject } from
|
|
2
|
-
import { Modules } from
|
|
3
|
-
type FactoryFunctions = Modules[
|
|
4
|
-
type InstantiableCategory =
|
|
1
|
+
import type { InjectedState, InstanceObject } from '@module/common/types';
|
|
2
|
+
import type { Modules } from '@module/config';
|
|
3
|
+
type FactoryFunctions = Modules['factoryFunctions'];
|
|
4
|
+
type InstantiableCategory = 'component' | 'flow';
|
|
5
5
|
/**
|
|
6
6
|
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
7
7
|
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
8
8
|
* to initialise the module.
|
|
9
9
|
*/
|
|
10
|
-
export type InjectedDependencies = Omit<InjectedState,
|
|
10
|
+
export type InjectedDependencies = Omit<InjectedState, 'moduleMeta'>;
|
|
11
11
|
/**
|
|
12
12
|
* This factory will generate another function which will
|
|
13
13
|
* 1) load a module by module name, defined in the dictionary in Configuration.ts;
|
|
@@ -18,7 +18,7 @@ export type InjectedDependencies = Omit<InjectedState, "moduleMeta">;
|
|
|
18
18
|
* @returns A function to load OneSdk modules
|
|
19
19
|
*/
|
|
20
20
|
export declare const mkModuleInstantiator: <Category extends InstantiableCategory>(globalState: InjectedDependencies) => {
|
|
21
|
-
component: import("@module/common/types").FactoryFunction<"biometrics" | "ocr" | "federation" | "device", {
|
|
21
|
+
component: import("@module/common/types").FactoryFunction<"biometrics" | "ocr" | "federation" | "device" | "smart-ui", {
|
|
22
22
|
biometrics: undefined;
|
|
23
23
|
device: {
|
|
24
24
|
activityType: "REGISTRATION" | "LOGIN" | "CRYPTO_DEPOSIT" | "CRYPTO_WITHDRAWAL" | "FIAT_DEPOSIT" | "FIAT_WITHDRAWAL";
|
|
@@ -30,6 +30,7 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
30
30
|
};
|
|
31
31
|
federation: undefined;
|
|
32
32
|
idv: undefined;
|
|
33
|
+
'smart-ui': undefined;
|
|
33
34
|
}, {
|
|
34
35
|
biometrics: InstanceObject<{
|
|
35
36
|
mount(domElementOrSelector: string | HTMLElement): void;
|
|
@@ -60,15 +61,11 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
60
61
|
}, "start" | "statuses"> & {
|
|
61
62
|
start: never;
|
|
62
63
|
statuses: typeof import("../..").IDVStatus;
|
|
63
|
-
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "
|
|
64
|
+
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "session_data_failed_loading" | "detection_failed" | "input_required" | "error"> & {
|
|
64
65
|
session_data_failed_loading: [];
|
|
65
66
|
detection_failed: [{
|
|
66
67
|
message: string;
|
|
67
|
-
payload?: Record<string, unknown>;
|
|
68
|
-
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
69
|
-
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
70
|
-
* to initialise the module.
|
|
71
|
-
*/
|
|
68
|
+
payload?: Record<string, unknown>;
|
|
72
69
|
}];
|
|
73
70
|
input_required: [info: {
|
|
74
71
|
entityId: string;
|
|
@@ -77,6 +74,31 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
77
74
|
errorStatus: import("../..").IDVStatus;
|
|
78
75
|
}>];
|
|
79
76
|
}>>;
|
|
77
|
+
'smart-ui': InstanceObject<{
|
|
78
|
+
mount: (mountElement: string | HTMLElement) => Promise<{
|
|
79
|
+
cleanup: () => void;
|
|
80
|
+
}>;
|
|
81
|
+
}, {
|
|
82
|
+
loaded: [{
|
|
83
|
+
domElement: HTMLElement;
|
|
84
|
+
implementation: string;
|
|
85
|
+
}];
|
|
86
|
+
ready: [{
|
|
87
|
+
domElement: HTMLElement;
|
|
88
|
+
}]; /**
|
|
89
|
+
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
90
|
+
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
91
|
+
* to initialise the module.
|
|
92
|
+
*/
|
|
93
|
+
results: [{
|
|
94
|
+
documents: import("../../common/shared/models/Document").Document[];
|
|
95
|
+
applicant: import("../../common/shared/models/Applicant").Applicant;
|
|
96
|
+
entityId: string;
|
|
97
|
+
}];
|
|
98
|
+
navigation: [{
|
|
99
|
+
page: string;
|
|
100
|
+
}];
|
|
101
|
+
}>;
|
|
80
102
|
}> & {
|
|
81
103
|
instances: {
|
|
82
104
|
biometrics?: {
|
|
@@ -103,6 +125,33 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
103
125
|
start: () => void;
|
|
104
126
|
}, import("../..").DeviceModuleEvents>;
|
|
105
127
|
};
|
|
128
|
+
"smart-ui"?: {
|
|
129
|
+
[instanceName: string]: InstanceObject<{
|
|
130
|
+
mount: (mountElement: string | HTMLElement) => Promise<{
|
|
131
|
+
cleanup: () => void;
|
|
132
|
+
}>;
|
|
133
|
+
}, {
|
|
134
|
+
loaded: [{
|
|
135
|
+
domElement: HTMLElement;
|
|
136
|
+
implementation: string;
|
|
137
|
+
}];
|
|
138
|
+
ready: [{
|
|
139
|
+
domElement: HTMLElement;
|
|
140
|
+
}]; /**
|
|
141
|
+
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
142
|
+
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
143
|
+
* to initialise the module.
|
|
144
|
+
*/
|
|
145
|
+
results: [{
|
|
146
|
+
documents: import("../../common/shared/models/Document").Document[];
|
|
147
|
+
applicant: import("../../common/shared/models/Applicant").Applicant;
|
|
148
|
+
entityId: string;
|
|
149
|
+
}];
|
|
150
|
+
navigation: [{
|
|
151
|
+
page: string;
|
|
152
|
+
}];
|
|
153
|
+
}>;
|
|
154
|
+
};
|
|
106
155
|
};
|
|
107
156
|
};
|
|
108
157
|
flow: import("@module/common/types").FactoryFunction<"idv", {
|
|
@@ -117,6 +166,7 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
117
166
|
};
|
|
118
167
|
federation: undefined;
|
|
119
168
|
idv: undefined;
|
|
169
|
+
'smart-ui': undefined;
|
|
120
170
|
}, {
|
|
121
171
|
biometrics: InstanceObject<{
|
|
122
172
|
mount(domElementOrSelector: string | HTMLElement): void;
|
|
@@ -147,15 +197,11 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
147
197
|
}, "start" | "statuses"> & {
|
|
148
198
|
start: never;
|
|
149
199
|
statuses: typeof import("../..").IDVStatus;
|
|
150
|
-
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "
|
|
200
|
+
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "session_data_failed_loading" | "detection_failed" | "input_required" | "error"> & {
|
|
151
201
|
session_data_failed_loading: [];
|
|
152
202
|
detection_failed: [{
|
|
153
203
|
message: string;
|
|
154
|
-
payload?: Record<string, unknown>;
|
|
155
|
-
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
156
|
-
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
157
|
-
* to initialise the module.
|
|
158
|
-
*/
|
|
204
|
+
payload?: Record<string, unknown>;
|
|
159
205
|
}];
|
|
160
206
|
input_required: [info: {
|
|
161
207
|
entityId: string;
|
|
@@ -164,6 +210,31 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
164
210
|
errorStatus: import("../..").IDVStatus;
|
|
165
211
|
}>];
|
|
166
212
|
}>>;
|
|
213
|
+
'smart-ui': InstanceObject<{
|
|
214
|
+
mount: (mountElement: string | HTMLElement) => Promise<{
|
|
215
|
+
cleanup: () => void;
|
|
216
|
+
}>;
|
|
217
|
+
}, {
|
|
218
|
+
loaded: [{
|
|
219
|
+
domElement: HTMLElement;
|
|
220
|
+
implementation: string;
|
|
221
|
+
}];
|
|
222
|
+
ready: [{
|
|
223
|
+
domElement: HTMLElement;
|
|
224
|
+
}]; /**
|
|
225
|
+
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
226
|
+
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
227
|
+
* to initialise the module.
|
|
228
|
+
*/
|
|
229
|
+
results: [{
|
|
230
|
+
documents: import("../../common/shared/models/Document").Document[];
|
|
231
|
+
applicant: import("../../common/shared/models/Applicant").Applicant;
|
|
232
|
+
entityId: string;
|
|
233
|
+
}];
|
|
234
|
+
navigation: [{
|
|
235
|
+
page: string;
|
|
236
|
+
}];
|
|
237
|
+
}>;
|
|
167
238
|
}> & {
|
|
168
239
|
instances: {
|
|
169
240
|
idv?: {
|
|
@@ -178,15 +249,11 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
178
249
|
}, "start" | "statuses"> & {
|
|
179
250
|
start: never;
|
|
180
251
|
statuses: typeof import("../..").IDVStatus;
|
|
181
|
-
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "
|
|
252
|
+
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "session_data_failed_loading" | "detection_failed" | "input_required" | "error"> & {
|
|
182
253
|
session_data_failed_loading: [];
|
|
183
254
|
detection_failed: [{
|
|
184
255
|
message: string;
|
|
185
|
-
payload?: Record<string, unknown>;
|
|
186
|
-
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
187
|
-
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
188
|
-
* to initialise the module.
|
|
189
|
-
*/
|
|
256
|
+
payload?: Record<string, unknown>;
|
|
190
257
|
}];
|
|
191
258
|
input_required: [info: {
|
|
192
259
|
entityId: string;
|
|
@@ -210,6 +277,7 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
210
277
|
};
|
|
211
278
|
federation: undefined;
|
|
212
279
|
idv: undefined;
|
|
280
|
+
'smart-ui': undefined;
|
|
213
281
|
}, {
|
|
214
282
|
biometrics: InstanceObject<{
|
|
215
283
|
mount(domElementOrSelector: string | HTMLElement): void;
|
|
@@ -240,15 +308,11 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
240
308
|
}, "start" | "statuses"> & {
|
|
241
309
|
start: never;
|
|
242
310
|
statuses: typeof import("../..").IDVStatus;
|
|
243
|
-
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "
|
|
311
|
+
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "session_data_failed_loading" | "detection_failed" | "input_required" | "error"> & {
|
|
244
312
|
session_data_failed_loading: [];
|
|
245
313
|
detection_failed: [{
|
|
246
314
|
message: string;
|
|
247
|
-
payload?: Record<string, unknown>;
|
|
248
|
-
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
249
|
-
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
250
|
-
* to initialise the module.
|
|
251
|
-
*/
|
|
315
|
+
payload?: Record<string, unknown>;
|
|
252
316
|
}];
|
|
253
317
|
input_required: [info: {
|
|
254
318
|
entityId: string;
|
|
@@ -257,6 +321,31 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
257
321
|
errorStatus: import("../..").IDVStatus;
|
|
258
322
|
}>];
|
|
259
323
|
}>>;
|
|
324
|
+
'smart-ui': InstanceObject<{
|
|
325
|
+
mount: (mountElement: string | HTMLElement) => Promise<{
|
|
326
|
+
cleanup: () => void;
|
|
327
|
+
}>;
|
|
328
|
+
}, {
|
|
329
|
+
loaded: [{
|
|
330
|
+
domElement: HTMLElement;
|
|
331
|
+
implementation: string;
|
|
332
|
+
}];
|
|
333
|
+
ready: [{
|
|
334
|
+
domElement: HTMLElement;
|
|
335
|
+
}]; /**
|
|
336
|
+
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
337
|
+
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
338
|
+
* to initialise the module.
|
|
339
|
+
*/
|
|
340
|
+
results: [{
|
|
341
|
+
documents: import("../../common/shared/models/Document").Document[];
|
|
342
|
+
applicant: import("../../common/shared/models/Applicant").Applicant;
|
|
343
|
+
entityId: string;
|
|
344
|
+
}];
|
|
345
|
+
navigation: [{
|
|
346
|
+
page: string;
|
|
347
|
+
}];
|
|
348
|
+
}>;
|
|
260
349
|
}> & {
|
|
261
350
|
instances: {
|
|
262
351
|
individual?: {
|
|
@@ -276,6 +365,7 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
276
365
|
};
|
|
277
366
|
federation: undefined;
|
|
278
367
|
idv: undefined;
|
|
368
|
+
'smart-ui': undefined;
|
|
279
369
|
}, {
|
|
280
370
|
biometrics: InstanceObject<{
|
|
281
371
|
mount(domElementOrSelector: string | HTMLElement): void;
|
|
@@ -306,15 +396,11 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
306
396
|
}, "start" | "statuses"> & {
|
|
307
397
|
start: never;
|
|
308
398
|
statuses: typeof import("../..").IDVStatus;
|
|
309
|
-
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "
|
|
399
|
+
}>, import("@types").TreeShaken<Omit<import("../../ocr").Events & import("../../biometrics").Events, "session_data_failed_loading" | "detection_failed" | "input_required" | "error"> & {
|
|
310
400
|
session_data_failed_loading: [];
|
|
311
401
|
detection_failed: [{
|
|
312
402
|
message: string;
|
|
313
|
-
payload?: Record<string, unknown>;
|
|
314
|
-
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
315
|
-
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
316
|
-
* to initialise the module.
|
|
317
|
-
*/
|
|
403
|
+
payload?: Record<string, unknown>;
|
|
318
404
|
}];
|
|
319
405
|
input_required: [info: {
|
|
320
406
|
entityId: string;
|
|
@@ -323,6 +409,31 @@ export declare const mkModuleInstantiator: <Category extends InstantiableCategor
|
|
|
323
409
|
errorStatus: import("../..").IDVStatus;
|
|
324
410
|
}>];
|
|
325
411
|
}>>;
|
|
412
|
+
'smart-ui': InstanceObject<{
|
|
413
|
+
mount: (mountElement: string | HTMLElement) => Promise<{
|
|
414
|
+
cleanup: () => void;
|
|
415
|
+
}>;
|
|
416
|
+
}, {
|
|
417
|
+
loaded: [{
|
|
418
|
+
domElement: HTMLElement;
|
|
419
|
+
implementation: string;
|
|
420
|
+
}];
|
|
421
|
+
ready: [{
|
|
422
|
+
domElement: HTMLElement;
|
|
423
|
+
}]; /**
|
|
424
|
+
* The module instantiator takes a partial InjectedState object, missing only the "moduleMeta" object (module name and instance name)
|
|
425
|
+
* Based on the options provided to the instantiator, along with the module name, it will inject moduleMeta to the existing InjectedState and use that
|
|
426
|
+
* to initialise the module.
|
|
427
|
+
*/
|
|
428
|
+
results: [{
|
|
429
|
+
documents: import("../../common/shared/models/Document").Document[];
|
|
430
|
+
applicant: import("../../common/shared/models/Applicant").Applicant;
|
|
431
|
+
entityId: string;
|
|
432
|
+
}];
|
|
433
|
+
navigation: [{
|
|
434
|
+
page: string;
|
|
435
|
+
}];
|
|
436
|
+
}>;
|
|
326
437
|
}> & {
|
|
327
438
|
instances: {
|
|
328
439
|
session?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentLoader.d.ts","sourceRoot":"","sources":["../../../../../modules/sdk/initialisation/componentLoader.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"componentLoader.d.ts","sourceRoot":"","sources":["../../../../../modules/sdk/initialisation/componentLoader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,aAAa,EACb,cAAc,EACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAI9C,KAAK,gBAAgB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAGpD,KAAK,oBAAoB,GAAG,WAAW,GAAG,MAAM,CAAC;AAEjD;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;AACrE;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,uDAClB,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAhBnC;;;;eAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAJH;;;;uBAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAJH;;;;eAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAJH;;;;eAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAJH;;;;eAIG;;;;;;;;;;;;;;;;;WAoFF,CAAC"}
|
|
@@ -9,8 +9,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import { merge } from
|
|
13
|
-
import { getInitialiser } from
|
|
12
|
+
import { merge } from '../../common';
|
|
13
|
+
import { getInitialiser } from '../../config';
|
|
14
14
|
/**
|
|
15
15
|
* This factory will generate another function which will
|
|
16
16
|
* 1) load a module by module name, defined in the dictionary in Configuration.ts;
|
|
@@ -28,11 +28,14 @@ export const mkModuleInstantiator = (globalState) => {
|
|
|
28
28
|
* @returns Module instance
|
|
29
29
|
*/
|
|
30
30
|
const moduleInstantiator = (...parameters) => {
|
|
31
|
+
var _a;
|
|
31
32
|
const [which, providedOptions] = parameters;
|
|
32
|
-
const
|
|
33
|
+
const instanceName = (_a = providedOptions === null || providedOptions === void 0 ? void 0 : providedOptions.instanceName) !== null && _a !== void 0 ? _a : 'default';
|
|
33
34
|
// Use instance name to simply load an existing instance or to generate a new one and store it under that name
|
|
34
|
-
// instance name defaults to
|
|
35
|
-
|
|
35
|
+
// instance name defaults to "default".
|
|
36
|
+
// Change: instanceName used to default to the module name itself.
|
|
37
|
+
const _b = providedOptions !== null && providedOptions !== void 0 ? providedOptions : {}, { instanceName: _ } = _b, moduleOptions = __rest(_b, ["instanceName"]);
|
|
38
|
+
const resolvedOptions = Object.assign({ instanceName }, providedOptions);
|
|
36
39
|
// if instance already exists, return it
|
|
37
40
|
const instance = retrieveInstance(which, instanceName);
|
|
38
41
|
if (instance)
|
|
@@ -41,7 +44,7 @@ export const mkModuleInstantiator = (globalState) => {
|
|
|
41
44
|
// Otherwise,
|
|
42
45
|
// 1) resolve module parameters: baseModuleOptions and moduleOptions
|
|
43
46
|
const parameters = mkModuleParameters(which, instanceName, globalState, moduleOptions);
|
|
44
|
-
globalState.globalEventHub.emit(
|
|
47
|
+
globalState.globalEventHub.emit('resolved_module_config', ...parameters);
|
|
45
48
|
const module = getInitialiser(which);
|
|
46
49
|
try {
|
|
47
50
|
// 2) Initialise module, resulting in the module context for that instance (aka a component)
|
|
@@ -52,12 +55,12 @@ export const mkModuleInstantiator = (globalState) => {
|
|
|
52
55
|
// !ATTENTION! the component's resolved options will be stored in the database,
|
|
53
56
|
// !which means that any sensitive information (PII) either shouldn't be provided here, or should be removed from the options object before emitting the event
|
|
54
57
|
// !This also applies to event COMPONENT:INIT:ERROR
|
|
55
|
-
globalState.globalEventHub.emit(
|
|
58
|
+
globalState.globalEventHub.emit('telemetry', {
|
|
56
59
|
eventName: `COMPONENT:INIT`,
|
|
57
60
|
data: { component: which, options: resolvedOptions },
|
|
58
61
|
});
|
|
59
62
|
// Since all event listeners support the "error" event, listen for any "error" events and submit them to "telemetry"
|
|
60
|
-
instance.on(
|
|
63
|
+
instance.on('error', (errorEvent) => globalState.globalEventHub.emit('telemetry', {
|
|
61
64
|
eventName: `COMPONENT:ERROR`,
|
|
62
65
|
data: { component: which },
|
|
63
66
|
error: errorEvent,
|
|
@@ -65,7 +68,7 @@ export const mkModuleInstantiator = (globalState) => {
|
|
|
65
68
|
return instance;
|
|
66
69
|
}
|
|
67
70
|
catch (error) {
|
|
68
|
-
globalState.globalEventHub.emit(
|
|
71
|
+
globalState.globalEventHub.emit('telemetry', {
|
|
69
72
|
eventName: `COMPONENT:INIT:ERROR`,
|
|
70
73
|
data: { component: which, options: resolvedOptions },
|
|
71
74
|
error,
|
|
@@ -75,14 +78,14 @@ export const mkModuleInstantiator = (globalState) => {
|
|
|
75
78
|
}
|
|
76
79
|
};
|
|
77
80
|
// the "defineProperty" below exposes the instances object and allows for easier testing
|
|
78
|
-
return Object.defineProperty(moduleInstantiator,
|
|
81
|
+
return Object.defineProperty(moduleInstantiator, 'instances', {
|
|
79
82
|
value: instanceStore,
|
|
80
83
|
enumerable: false,
|
|
81
84
|
writable: false,
|
|
82
85
|
});
|
|
83
86
|
};
|
|
84
87
|
const injectInstanceName = (moduleContext, instanceName) => {
|
|
85
|
-
return Object.defineProperty(moduleContext,
|
|
88
|
+
return Object.defineProperty(moduleContext, 'instanceName', {
|
|
86
89
|
value: instanceName,
|
|
87
90
|
enumerable: true,
|
|
88
91
|
writable: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentLoader.js","sourceRoot":"","sources":["../../../../../modules/sdk/initialisation/componentLoader.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"componentLoader.js","sourceRoot":"","sources":["../../../../../modules/sdk/initialisation/componentLoader.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAQvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAchD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,WAAiC,EACL,EAAE;IAC9B,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,oBAAoB,EAAE,CAAC;IAClF;;;;OAIG;IACH,MAAM,kBAAkB,GAAG,CACzB,GAAG,UAAwD,EAC1C,EAAE;;QAGnB,MAAM,CAAC,KAAK,EAAE,eAAe,CAAC,GAAG,UAAoC,CAAC;QACtE,MAAM,YAAY,GAAG,MAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,YAAY,mCAAI,SAAS,CAAC;QAChE,8GAA8G;QAC9G,uCAAuC;QACvC,kEAAkE;QAClE,MAAM,KAAwC,eAAe,aAAf,eAAe,cAAf,eAAe,GAAI,EAAE,EAA7D,EAAE,YAAY,EAAE,CAAC,OAA4C,EAAvC,aAAa,cAA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Y,CAAC,GAAG,QAAQ,CAAC;IACrD,CAAC,CAAC;IACF,MAAM,gBAAgB,GAAG,CACvB,UAAgB,EAChB,YAAoB,EACW,EAAE;;QACjC,OAAO,MAAC,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAG,UAAU,CAAC,0CAAG,YAAY,CAA4B,mCAAI,IAAI,CAAC;IACzF,CAAC,CAAC;IAEF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC;AAC5D,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EventHub } from
|
|
2
|
-
import { FrankieApiClient } from
|
|
3
|
-
import { ResolvedRootParameters, SharedDependencies } from
|
|
4
|
-
import { GlobalEvents } from
|
|
1
|
+
import { EventHub } from '@module/common';
|
|
2
|
+
import { FrankieApiClient } from '@module/frankie-client';
|
|
3
|
+
import { ResolvedRootParameters, SharedDependencies } from '@module/common/types';
|
|
4
|
+
import { GlobalEvents } from '../types';
|
|
5
5
|
export declare function mkSharedDependencies(oneSdkParameters: ResolvedRootParameters): Promise<SharedDependencies>;
|
|
6
6
|
export declare function registerTelemetryEvents(globalEventHub: EventHub<GlobalEvents>, frankieClient: FrankieApiClient): void;
|
|
7
7
|
//# sourceMappingURL=sharedDependencies.d.ts.map
|
|
@@ -7,15 +7,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { mkEventHub } from
|
|
11
|
-
import { TelemetryEvent } from
|
|
12
|
-
import { mkFrankieClient } from
|
|
13
|
-
import { TelemetryEventsClient } from
|
|
14
|
-
import { getInitialiser } from
|
|
15
|
-
import { version as oneSdkVersion } from
|
|
16
|
-
import { UAParser } from
|
|
17
|
-
import { OneSDKError } from
|
|
18
|
-
import { includeTelemetry } from
|
|
10
|
+
import { mkEventHub } from '../../common';
|
|
11
|
+
import { TelemetryEvent } from '../../common/shared/models/TelemetryEvent';
|
|
12
|
+
import { mkFrankieClient } from '../../frankie-client';
|
|
13
|
+
import { TelemetryEventsClient } from '../../frankie-client/clients/TelemetryEventsClient';
|
|
14
|
+
import { getInitialiser } from '../../config';
|
|
15
|
+
import { version as oneSdkVersion } from '../../meta.json';
|
|
16
|
+
import { UAParser } from 'ua-parser-js';
|
|
17
|
+
import { OneSDKError } from '../../common/errors/OneSDKError.class';
|
|
18
|
+
import { includeTelemetry } from './configurationParser';
|
|
19
19
|
export function mkSharedDependencies(oneSdkParameters) {
|
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
|
21
21
|
// Create global event hub to be passed to all OneSdk modules
|
|
@@ -26,7 +26,7 @@ export function mkSharedDependencies(oneSdkParameters) {
|
|
|
26
26
|
// Instead of emitting the event, it simply stores the calls and emit it once requested
|
|
27
27
|
// This can be used HERE, by the session module to emit warnings and telemetry events
|
|
28
28
|
// It can also be used by the function `parseConfiguration`, instead of returning an array of "warnings"
|
|
29
|
-
const sessionContext = getInitialiser(
|
|
29
|
+
const sessionContext = getInitialiser('session')(oneSdkParameters, { globalEventHub });
|
|
30
30
|
// Initialise a Frankie Client object to connect with our backend APIs
|
|
31
31
|
const frankieClient = yield mkFrankieClient({ mode, session: sessionContext });
|
|
32
32
|
// Use the already authenticated frankie client to register the "telemetry" events
|
|
@@ -49,14 +49,14 @@ export function registerTelemetryEvents(globalEventHub, frankieClient) {
|
|
|
49
49
|
const screen = window.screen;
|
|
50
50
|
const DESKTOP_MINIMUM_WIDTH = 961;
|
|
51
51
|
const screenInformation = !screen
|
|
52
|
-
?
|
|
52
|
+
? 'no screen information'
|
|
53
53
|
: {
|
|
54
54
|
height: screen.height,
|
|
55
55
|
width: screen.width,
|
|
56
56
|
availableHeight: screen.availHeight,
|
|
57
57
|
availableWidth: screen.availWidth,
|
|
58
58
|
colorDepth: screen.colorDepth,
|
|
59
|
-
orientation: (_b = (_a = screen.orientation) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b :
|
|
59
|
+
orientation: (_b = (_a = screen.orientation) === null || _a === void 0 ? void 0 : _a.type) !== null && _b !== void 0 ? _b : 'no orientation information',
|
|
60
60
|
pixelDepth: screen.pixelDepth,
|
|
61
61
|
};
|
|
62
62
|
const userAgentDetails = new UAParser().getResult();
|
|
@@ -65,20 +65,20 @@ export function registerTelemetryEvents(globalEventHub, frankieClient) {
|
|
|
65
65
|
// Desktop device type can't be inferred from UA,
|
|
66
66
|
// so whenever it's undefined infer it from the screen size
|
|
67
67
|
const fromUserAgent = userAgentDetails.device.type;
|
|
68
|
-
const fromScreenSize = typeof screenInformation ===
|
|
69
|
-
?
|
|
68
|
+
const fromScreenSize = typeof screenInformation === 'string'
|
|
69
|
+
? 'undefined'
|
|
70
70
|
: screenInformation.width >= DESKTOP_MINIMUM_WIDTH
|
|
71
|
-
?
|
|
72
|
-
:
|
|
71
|
+
? 'desktop'
|
|
72
|
+
: 'mobile';
|
|
73
73
|
return norm(fromUserAgent !== null && fromUserAgent !== void 0 ? fromUserAgent : fromScreenSize);
|
|
74
74
|
};
|
|
75
75
|
// Assemble common telemetry event payload
|
|
76
76
|
const commonEventPayload = {
|
|
77
|
-
entityId: (_c = session.entityId) !== null && _c !== void 0 ? _c :
|
|
78
|
-
customerReference: (_d = session.reference) !== null && _d !== void 0 ? _d :
|
|
79
|
-
channel: [
|
|
77
|
+
entityId: (_c = session.entityId) !== null && _c !== void 0 ? _c : 'none',
|
|
78
|
+
customerReference: (_d = session.reference) !== null && _d !== void 0 ? _d : 'none',
|
|
79
|
+
channel: ['one-sdk', frankieClient.session.appReference].filter(Boolean).join('/'),
|
|
80
80
|
customerId: session.customerID,
|
|
81
|
-
customerChildId: (_e = session.customerChildID) !== null && _e !== void 0 ? _e :
|
|
81
|
+
customerChildId: (_e = session.customerChildID) !== null && _e !== void 0 ? _e : 'none',
|
|
82
82
|
sessionId: session.sessionId,
|
|
83
83
|
version: oneSdkVersion,
|
|
84
84
|
environment: session.environment,
|
|
@@ -118,12 +118,12 @@ export function registerTelemetryEvents(globalEventHub, frankieClient) {
|
|
|
118
118
|
const telemetryClient = new TelemetryEventsClient(frankieClient);
|
|
119
119
|
// On each 'telemetry' event, submit event data to the telemetry/events endpoint
|
|
120
120
|
// Log each submission success or failure as a new event that may or may not be used by the user
|
|
121
|
-
globalEventHub.on(
|
|
121
|
+
globalEventHub.on('telemetry', (eventContents) => {
|
|
122
122
|
var _a;
|
|
123
123
|
try {
|
|
124
|
-
const eventName = typeof eventContents ===
|
|
125
|
-
const data = typeof eventContents ===
|
|
126
|
-
const error = typeof eventContents ===
|
|
124
|
+
const eventName = typeof eventContents === 'string' ? eventContents : eventContents.eventName;
|
|
125
|
+
const data = typeof eventContents === 'string' ? {} : (_a = Object.assign({}, eventContents.data)) !== null && _a !== void 0 ? _a : {};
|
|
126
|
+
const error = typeof eventContents === 'string' ? null : eventContents.error;
|
|
127
127
|
if (error) {
|
|
128
128
|
// If an Error object is passed to the telemetry event, extract only the useful and serialisable information,
|
|
129
129
|
// If the error isn't an instance of Error, attempt to serialise it
|
|
@@ -135,12 +135,12 @@ export function registerTelemetryEvents(globalEventHub, frankieClient) {
|
|
|
135
135
|
// to simply inform or warn about the result, but won't emit "error" in case this fails.
|
|
136
136
|
telemetryClient
|
|
137
137
|
.dispatch(event)
|
|
138
|
-
.then(() => globalEventHub.emit(
|
|
138
|
+
.then(() => globalEventHub.emit('info', {
|
|
139
139
|
message: "Event 'telemetry' submitted successfully",
|
|
140
140
|
payload: { eventName, data },
|
|
141
141
|
}))
|
|
142
142
|
.catch((error) => {
|
|
143
|
-
globalEventHub.emit(
|
|
143
|
+
globalEventHub.emit('warning', {
|
|
144
144
|
message: "There was a problem submitting event 'telemetry'. This doesn't impact the proper functioning of the OneSDK.",
|
|
145
145
|
payload: { eventName, data, error },
|
|
146
146
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedDependencies.js","sourceRoot":"","sources":["../../../../../modules/sdk/initialisation/sharedDependencies.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAY,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAoB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAG7F,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sharedDependencies.js","sourceRoot":"","sources":["../../../../../modules/sdk/initialisation/sharedDependencies.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAY,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAoB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,sDAAsD,CAAC;AAG7F,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAEpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,UAAgB,oBAAoB,CAAC,gBAAwC;;QACjF,6DAA6D;QAC7D,MAAM,EAAE,IAAI,EAAE,GAAG,gBAAgB,CAAC;QAElC,MAAM,cAAc,GAAG,UAAU,EAAgB,CAAC;QAClD,yEAAyE;QACzE,sJAAs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import { SimplifiedMockOptions } from
|
|
3
|
-
import { PartialDeep, SetRequired } from
|
|
1
|
+
import type { RecipeConfiguration } from '@module/common';
|
|
2
|
+
import type { SimplifiedMockOptions } from '@module/frankie-client/mocks/options/simplified/SimplifiedMockOptions.type';
|
|
3
|
+
import type { PartialDeep, SetRequired } from 'type-fest';
|
|
4
4
|
/**
|
|
5
5
|
* Different levels of configuration may be done in OneSdk. This isn't a requirement,
|
|
6
6
|
* but allows us to ensure options are consistent and compatible throughout all levels of OneSdk
|
|
@@ -33,11 +33,12 @@ import { PartialDeep, SetRequired } from "type-fest";
|
|
|
33
33
|
export type OneSdkRootParameters = {
|
|
34
34
|
recipe?: RecipeOption;
|
|
35
35
|
telemetry?: boolean;
|
|
36
|
+
devtools?: boolean;
|
|
36
37
|
} & ModeAndSessionOptions;
|
|
37
38
|
/******* Below you'll find the bits and pieces that together form the parameter object above */
|
|
38
39
|
export type PartialRecipe = PartialDeep<RecipeConfiguration>;
|
|
39
40
|
export type RecipeOption = string | PartialRecipe;
|
|
40
|
-
export type RecipeParsed = SetRequired<PartialRecipe,
|
|
41
|
+
export type RecipeParsed = SetRequired<PartialRecipe, 'name'>;
|
|
41
42
|
/**
|
|
42
43
|
* * SdkModes are the different modes in which the SDK can be initialised.
|
|
43
44
|
* TODO: Rename it to SdkMode for consistency. Any enums meant to be used as a type should be named as a singular.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oneSDKParameters.d.ts","sourceRoot":"","sources":["../../../../../modules/sdk/types/oneSDKParameters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"oneSDKParameters.d.ts","sourceRoot":"","sources":["../../../../../modules/sdk/types/oneSDKParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4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B,qJAAqJ;IACrJ,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAC7B;IACE,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;CACjC,GACD;IACE,IAAI,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAChD,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oneSDKParameters.js","sourceRoot":"","sources":["../../../../../modules/sdk/types/oneSDKParameters.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"oneSDKParameters.js","sourceRoot":"","sources":["../../../../../modules/sdk/types/oneSDKParameters.ts"],"names":[],"mappings":"AA8CA;;;;;;;;;GASG;AACH,MAAM,CAAN,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,2BAAe,CAAA;AACjB,CAAC,EAJW,QAAQ,KAAR,QAAQ,QAInB"}
|