Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/nativeSdkHelpers.interfaces.ts
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 2 additions & 1 deletion src/sdkRuntimeModels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<MParticleWebSDK>;
Expand Down