diff --git a/src/nativeSdkHelpers.interfaces.ts b/src/nativeSdkHelpers.interfaces.ts new file mode 100644 index 00000000..1d5a2ec0 --- /dev/null +++ b/src/nativeSdkHelpers.interfaces.ts @@ -0,0 +1,13 @@ +export interface INativeSdkHelpers { + initializeSessionAttributes: (apiKey: string) => void; + isBridgeV2Available: (bridgeName: string) => boolean; + isWebviewEnabled: ( + requiredWebviewBridgeName: string, + minWebviewBridgeVersion: number + ) => boolean; + isBridgeV1Available: () => boolean; + sendToNative: (path: string, value: string) => void; + sendViaBridgeV1: (path: string, value: string) => void; + sendViaIframeToIOS: (path: string, value: string) => void; + sendViaBridgeV2: (path: string, value: string, requiredWebviewBridgeName: boolean) => void; +} diff --git a/src/sdkRuntimeModels.ts b/src/sdkRuntimeModels.ts index 9f6c5a9c..16110538 100644 --- a/src/sdkRuntimeModels.ts +++ b/src/sdkRuntimeModels.ts @@ -31,6 +31,7 @@ import { } from './identity-user-interfaces'; import { IIdentityType } from './types.interfaces'; import IntegrationCapture from './integrationCapture'; +import { INativeSdkHelpers } from './nativeSdkHelpers.interfaces'; import { ICookieSyncManager } from './cookieSyncManager.interfaces'; // TODO: Resolve this with version in @mparticle/web-sdk @@ -169,7 +170,7 @@ export interface MParticleWebSDK { _SessionManager: ISessionManager; _Consent: SDKConsentApi; Consent: SDKConsentApi; - _NativeSdkHelpers: any; // TODO: Set up API + _NativeSdkHelpers: INativeSdkHelpers; _Persistence: IPersistence; _preInit: any; // TODO: Set up API _instances?: Dictionary;