@@ -24,7 +24,7 @@ import NativeSdkHelpers from './nativeSdkHelpers';
2424import CookieSyncManager , { ICookieSyncManager , IPixelConfiguration } from './cookieSyncManager' ;
2525import SessionManager , { ISessionManager } from './sessionManager' ;
2626import Ecommerce from './ecommerce' ;
27- import Store , { IntegrationAttribute , IStore } from './store' ;
27+ import Store , { IStore } from './store' ;
2828import Logger from './logger' ;
2929import Persistence from './persistence' ;
3030import Events from './events' ;
@@ -41,8 +41,8 @@ import { LocalStorageVault } from './vault';
4141import { removeExpiredIdentityCacheDates } from './identity-utils' ;
4242import IntegrationCapture from './integrationCapture' ;
4343import { IPreInit , processReadyQueue } from './pre-init-utils' ;
44- import { BaseEvent , MParticleWebSDK , SDKEventCustomFlags , SDKHelpersApi , } from './sdkRuntimeModels' ;
45- import { Callback , SDKEventAttrs , SDKEventOptions } from '@mparticle/web-sdk' ;
44+ import { BaseEvent , MParticleWebSDK , SDKHelpersApi , } from './sdkRuntimeModels' ;
45+ import { Callback , SDKEventAttrs } from '@mparticle/web-sdk' ;
4646import { IIdentity } from './identity.interfaces' ;
4747import { IEvents } from './events.interfaces' ;
4848import { IECommerce } from './ecommerce.interfaces' ;
@@ -85,29 +85,17 @@ export interface IMParticleWebSDKInstance extends MParticleWebSDK {
8585 _Store : IStore ;
8686 _ServerModel : IServerModel ;
8787
88-
89-
9088 configurePixel ( config : IPixelConfiguration ) : void ;
9189 reset ( instance : IMParticleWebSDKInstance ) : void ;
9290 ready ( f : Function ) : void ;
9391 isInitialized ( ) : boolean ;
9492 getEnvironment ( ) : valueof < typeof Constants . Environment > ;
9593 getVersion ( ) : string ;
94+ logError ( error : IErrorLogMessage , attrs ?: SDKEventAttrs ) : void ;
9695 setAppVersion ( version : string ) : void ;
9796 setAppName ( name : string ) : void ;
9897 startTrackingLocation ( callback ?: Callback ) : void ;
9998 stopTrackingLocation ( ) : void ;
100- logError ( error : IErrorLogMessage | string , attrs ?: any ) : void ;
101-
102- // TODO: Define EventInfo
103- logLink ( selector : string , eventName : string , eventType : valueof < typeof EventType > , eventInfo : any ) : void ;
104- logForm ( selector : string , eventName : string , eventType : valueof < typeof EventType > , eventInfo : any ) : void ;
105- logPageView ( eventName : string , attrs ?: SDKEventAttrs , customFlags ?: SDKEventCustomFlags , eventOptions ?: SDKEventOptions ) : void ;
106- setOptOut ( isOptingOut : boolean ) : void ;
107-
108- // QUESTION: Should integration ID be a number or a string?
109- setIntegrationAttribute ( integrationId : number , attrs : IntegrationAttribute ) : void ;
110- getIntegrationAttributes ( integrationId : number ) : IntegrationAttribute ;
11199}
112100
113101const { Messages, HTTPCodes, FeatureFlags } = Constants ;
@@ -540,8 +528,7 @@ export default function mParticleInstance(this: IMParticleWebSDKInstance, instan
540528 } ;
541529 }
542530
543- // FIXME: Replace var with const/let
544- var data : IErrorLogMessageMinified = {
531+ const data : IErrorLogMessageMinified = {
545532 m : error . message ? error . message : error as string ,
546533 s : 'Error' ,
547534 t : error . stack || null ,
@@ -557,9 +544,8 @@ export default function mParticleInstance(this: IMParticleWebSDKInstance, instan
557544 self . _Events . logEvent ( {
558545 messageType : MessageType . CrashReport ,
559546 name : error . name ? error . name : 'Error' ,
560- // data: data, // QUESTION: Is this a bug? This should be eventType
561547 eventType : EventType . Other ,
562- data : data as { [ key : string ] : string } ,
548+ data : data as SDKEventAttrs ,
563549 } ) ;
564550 } ;
565551 /**
0 commit comments