Skip to content

Commit

Permalink
Replace missing types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexs-mparticle committed Dec 20, 2023
1 parent 52b0b1f commit b3c3bf7
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions src/forwarders.interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
import { MParticleUser, SDKEvent, SDKEventCustomFlags, SDKUserIdentity } from './sdkRuntimeModels';
import {
MParticleUser,
SDKEvent,
SDKEventCustomFlags,
SDKUserIdentity,
} from './sdkRuntimeModels';
import { Dictionary } from './utils';
import { IKitConfigs } from './configAPIClient';
import { UserAttributes } from './persistence.interfaces';
import { IdentityApiData } from '@mparticle/web-sdk';

// TODO: Create Distinct MPForwarder and Kit interfaces
export type Kit = Dictionary;
export type MPForwarder = Dictionary;

// The state of the kit when accessed via window.KitName via CDN
// or imported as an NPM package
export interface UnregisteredKit {
Expand Down Expand Up @@ -32,11 +41,24 @@ export interface ConfiguredKit
appVersion: string,
appName: string,
customFlags: SDKEventCustomFlags,
clientId: string): string;
onIdentifyComplete(user: MParticleUser, filteredIdentityRequest: IdentityApiData): string | KitMappedMethodFailure;
onLoginComplete(user: MParticleUser, filteredIdentityRequest: IdentityApiData): string | KitMappedMethodFailure;
onLogoutComplete(user: MParticleUser, filteredIdentityRequest: IdentityApiData): string | KitMappedMethodFailure;
onModifyComplete(user: MParticleUser, filteredIdentityRequest: IdentityApiData): string | KitMappedMethodFailure;
clientId: string
): string;
onIdentifyComplete(
user: MParticleUser,
filteredIdentityRequest: IdentityApiData
): string | KitMappedMethodFailure;
onLoginComplete(
user: MParticleUser,
filteredIdentityRequest: IdentityApiData
): string | KitMappedMethodFailure;
onLogoutComplete(
user: MParticleUser,
filteredIdentityRequest: IdentityApiData
): string | KitMappedMethodFailure;
onModifyComplete(
user: MParticleUser,
filteredIdentityRequest: IdentityApiData
): string | KitMappedMethodFailure;
onUserIdentified(user: MParticleUser): string | KitMappedMethodFailure;
process(event: SDKEvent): string;
setOptOut(isOptingOut: boolean): string | KitMappedMethodFailure;
Expand Down

0 comments on commit b3c3bf7

Please sign in to comment.