@mparticle/web-sdk 2.60.1 → 2.62.0
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/mparticle.common.js +22 -22
- package/dist/mparticle.esm.js +22 -22
- package/dist/mparticle.js +118 -173
- package/dist/types/src/apiClient.d.ts +34 -0
- package/dist/types/src/audience.d.ts +4 -0
- package/dist/types/src/audienceManager.d.ts +19 -0
- package/dist/types/src/batchUploader.d.ts +72 -0
- package/dist/types/src/configAPIClient.d.ts +68 -0
- package/dist/types/src/consent.d.ts +71 -0
- package/dist/types/src/constants.d.ts +201 -0
- package/dist/types/src/cookieConsentManager.d.ts +50 -0
- package/dist/types/src/cookieSyncManager.d.ts +34 -0
- package/dist/types/src/ecommerce.d.ts +52 -0
- package/dist/types/src/ecommerce.interfaces.d.ts +78 -0
- package/dist/types/src/events.d.ts +17 -0
- package/dist/types/src/events.interfaces.d.ts +21 -0
- package/dist/types/src/filteredMparticleUser.d.ts +8 -0
- package/dist/types/src/foregroundTimeTracker.d.ts +21 -0
- package/dist/types/src/forwarders.d.ts +26 -0
- package/dist/types/src/forwarders.interfaces.d.ts +59 -0
- package/dist/types/src/forwardingStatsUploader.d.ts +5 -0
- package/dist/types/src/helpers.d.ts +54 -0
- package/dist/types/src/identity-user-interfaces.d.ts +106 -0
- package/dist/types/src/identity-utils.d.ts +36 -0
- package/dist/types/src/identity.interfaces.d.ts +117 -0
- package/dist/types/src/identityApiClient.d.ts +14 -0
- package/dist/types/src/integrationCapture.d.ts +83 -0
- package/dist/types/src/internal-types.d.ts +20 -0
- package/dist/types/src/kitBlocking.d.ts +116 -0
- package/dist/types/src/kitFilterHelper.d.ts +15 -0
- package/dist/types/src/logger.d.ts +18 -0
- package/dist/types/src/mockBatchCreator.d.ts +7 -0
- package/dist/types/src/mp-instance.d.ts +76 -0
- package/dist/types/src/mparticle-instance-manager.d.ts +2 -0
- package/dist/types/src/nativeSdkHelpers.d.ts +12 -0
- package/dist/types/src/nativeSdkHelpers.interfaces.d.ts +10 -0
- package/dist/types/src/persistence.d.ts +44 -0
- package/dist/types/src/persistence.interfaces.d.ts +73 -0
- package/dist/types/src/polyfill.d.ts +15 -0
- package/dist/types/src/pre-init-utils.d.ts +11 -0
- package/dist/types/src/public-types.d.ts +23 -0
- package/dist/types/src/reporting/errorReportingDispatcher.d.ts +8 -0
- package/dist/types/src/reporting/loggingDispatcher.d.ts +8 -0
- package/dist/types/src/reporting/types.d.ts +37 -0
- package/dist/types/src/roktManager.d.ts +176 -0
- package/dist/types/src/sdkRuntimeModels.d.ts +319 -0
- package/dist/types/src/sdkToEventsApiConverter.d.ts +43 -0
- package/dist/types/src/serverModel.d.ts +105 -0
- package/dist/types/src/sessionManager.d.ts +16 -0
- package/dist/types/src/sideloadedKit.d.ts +30 -0
- package/dist/types/src/store.d.ts +157 -0
- package/dist/types/src/stub/mparticle.stub.d.ts +182 -0
- package/dist/types/src/types.d.ts +154 -0
- package/dist/types/src/uploaders.d.ts +21 -0
- package/dist/types/src/user-utils.d.ts +5 -0
- package/dist/types/src/utils.d.ts +82 -0
- package/dist/types/src/validators.d.ts +18 -0
- package/dist/types/src/vault.d.ts +41 -0
- package/package.json +16 -3
- package/src/apiClient.ts +1 -1
- package/src/constants.ts +0 -4
- package/src/forwarders.interfaces.ts +42 -0
- package/src/identityApiClient.ts +9 -6
- package/src/internal-types.ts +66 -0
- package/src/logger.ts +3 -12
- package/src/mp-instance.ts +28 -15
- package/src/mparticle-instance-manager.ts +6 -0
- package/src/public-types.ts +84 -0
- package/src/reporting/errorReportingDispatcher.ts +21 -0
- package/src/reporting/loggingDispatcher.ts +21 -0
- package/src/reporting/types.ts +45 -0
- package/src/roktManager.ts +32 -6
- package/src/sdkRuntimeModels.ts +3 -1
- package/src/serverModel.ts +1 -1
- package/src/store.ts +1 -3
- package/src/logging/reportingLogger.ts +0 -192
- package/src/logging/types.ts +0 -32
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { BooleanStringLowerCase, DataPlanResult, SDKEventCustomFlags, SDKInitConfig } from './sdkRuntimeModels';
|
|
2
|
+
import { Dictionary } from './utils';
|
|
3
|
+
import { IPixelConfiguration } from './cookieSyncManager';
|
|
4
|
+
import { IMParticleWebSDKInstance } from './mp-instance';
|
|
5
|
+
export interface IKitConfigs extends IKitFilterSettings {
|
|
6
|
+
name: string;
|
|
7
|
+
suffix?: string;
|
|
8
|
+
moduleId: number;
|
|
9
|
+
isDebug: boolean;
|
|
10
|
+
isVisible: boolean;
|
|
11
|
+
isDebugString: BooleanStringLowerCase;
|
|
12
|
+
hasDebugString: BooleanStringLowerCase;
|
|
13
|
+
settings: Dictionary;
|
|
14
|
+
eventSubscriptionId: number;
|
|
15
|
+
excludeAnonymousUser: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface IKitFilterSettings {
|
|
18
|
+
eventTypeFilters: number[];
|
|
19
|
+
eventNameFilters: number[];
|
|
20
|
+
screenNameFilters: number[];
|
|
21
|
+
screenAttributeFilters: number[];
|
|
22
|
+
userIdentityFilters: number[];
|
|
23
|
+
userAttributeFilters: number[];
|
|
24
|
+
attributeFilters: number[];
|
|
25
|
+
filteringEventAttributeValue?: IFilteringEventAttributeValue;
|
|
26
|
+
filteringUserAttributeValue?: IFilteringUserAttributeValue;
|
|
27
|
+
filteringConsentRuleValues?: IFilteringConsentRuleValues;
|
|
28
|
+
consentRegulationFilters: number[];
|
|
29
|
+
consentRegulationPurposeFilters: number[];
|
|
30
|
+
messageTypeFilters: number[];
|
|
31
|
+
messageTypeStateFilters: number[];
|
|
32
|
+
}
|
|
33
|
+
export interface IFilteringEventAttributeValue {
|
|
34
|
+
eventAttributeName: string;
|
|
35
|
+
eventAttributeValue: string;
|
|
36
|
+
includeOnMatch: boolean;
|
|
37
|
+
}
|
|
38
|
+
export interface IFilteringUserAttributeValue {
|
|
39
|
+
userAttributeName: string;
|
|
40
|
+
userAttributeValue: string;
|
|
41
|
+
includeOnMatch: boolean;
|
|
42
|
+
}
|
|
43
|
+
export interface IFilteringConsentRuleValues {
|
|
44
|
+
includeOnMatch: boolean;
|
|
45
|
+
values: IConsentRuleValue[];
|
|
46
|
+
}
|
|
47
|
+
export interface IConsentRuleValue {
|
|
48
|
+
consentPurpose: string;
|
|
49
|
+
hasConsented: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface IConfigResponse {
|
|
52
|
+
appName: string;
|
|
53
|
+
dataPlanResult: DataPlanResult;
|
|
54
|
+
kitConfigs: IKitConfigs[];
|
|
55
|
+
serviceUrl: string;
|
|
56
|
+
secureServiceUrl: string;
|
|
57
|
+
minWebviewBridgeVersion: number;
|
|
58
|
+
workspaceToken: string;
|
|
59
|
+
pixelConfigs: IPixelConfiguration[];
|
|
60
|
+
flags: SDKEventCustomFlags;
|
|
61
|
+
}
|
|
62
|
+
export interface IConfigAPIClient {
|
|
63
|
+
apiKey: string;
|
|
64
|
+
config: SDKInitConfig;
|
|
65
|
+
mpInstance: IMParticleWebSDKInstance;
|
|
66
|
+
getSDKConfiguration: () => Promise<IConfigResponse>;
|
|
67
|
+
}
|
|
68
|
+
export default function ConfigAPIClient(this: IConfigAPIClient, apiKey: string, config: SDKInitConfig, mpInstance: IMParticleWebSDKInstance): void;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { ConsentState, PrivacyConsentState } from '@mparticle/web-sdk';
|
|
2
|
+
import { Dictionary } from './utils';
|
|
3
|
+
import { IMParticleUser } from './identity-user-interfaces';
|
|
4
|
+
import { IMParticleWebSDKInstance } from './mp-instance';
|
|
5
|
+
declare const CCPAPurpose: "data_sale_opt_out";
|
|
6
|
+
export interface IMinifiedConsentJSONObject {
|
|
7
|
+
gdpr?: Dictionary<IPrivacyV2DTO>;
|
|
8
|
+
ccpa?: {
|
|
9
|
+
[CCPAPurpose]: IPrivacyV2DTO;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface ICreatePrivacyConsentFunction {
|
|
13
|
+
(consented: boolean, timestamp?: number, consentDocument?: string, location?: string, hardwareId?: string): PrivacyConsentState | null;
|
|
14
|
+
}
|
|
15
|
+
export interface SDKConsentApi {
|
|
16
|
+
createGDPRConsent: ICreatePrivacyConsentFunction;
|
|
17
|
+
createCCPAConsent: ICreatePrivacyConsentFunction;
|
|
18
|
+
createConsentState: (consentState?: ConsentState) => ConsentState;
|
|
19
|
+
}
|
|
20
|
+
export interface IConsentSerialization {
|
|
21
|
+
toMinifiedJsonObject: (state: ConsentState) => IMinifiedConsentJSONObject;
|
|
22
|
+
fromMinifiedJsonObject: (json: IMinifiedConsentJSONObject) => ConsentState;
|
|
23
|
+
}
|
|
24
|
+
export interface SDKConsentState extends Omit<ConsentState, 'getGDPRConsentState' | 'getCCPAConsentState'> {
|
|
25
|
+
getGDPRConsentState(): SDKGDPRConsentState;
|
|
26
|
+
getCCPAConsentState(): SDKCCPAConsentState;
|
|
27
|
+
}
|
|
28
|
+
export interface SDKConsentStateData {
|
|
29
|
+
Consented: boolean;
|
|
30
|
+
Timestamp?: number;
|
|
31
|
+
ConsentDocument?: string;
|
|
32
|
+
Location?: string;
|
|
33
|
+
HardwareId?: string;
|
|
34
|
+
}
|
|
35
|
+
export type SDKGDPRConsentState = Dictionary<SDKConsentStateData>;
|
|
36
|
+
export interface SDKCCPAConsentState extends SDKConsentStateData {
|
|
37
|
+
}
|
|
38
|
+
export interface IPrivacyV2DTO {
|
|
39
|
+
c: boolean;
|
|
40
|
+
ts: number;
|
|
41
|
+
d: string;
|
|
42
|
+
l: string;
|
|
43
|
+
h: string;
|
|
44
|
+
}
|
|
45
|
+
export type IGDPRConsentStateV2DTO = Dictionary<IPrivacyV2DTO>;
|
|
46
|
+
export interface ICCPAConsentStateV2DTO {
|
|
47
|
+
[CCPAPurpose]: IPrivacyV2DTO;
|
|
48
|
+
}
|
|
49
|
+
export interface IConsentStateV2DTO {
|
|
50
|
+
gdpr?: IGDPRConsentStateV2DTO;
|
|
51
|
+
ccpa?: ICCPAConsentStateV2DTO;
|
|
52
|
+
}
|
|
53
|
+
export interface IConsentRulesValues {
|
|
54
|
+
consentPurpose: string;
|
|
55
|
+
hasConsented: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface IConsentRules {
|
|
58
|
+
includeOnMatch: boolean;
|
|
59
|
+
values: IConsentRulesValues[];
|
|
60
|
+
}
|
|
61
|
+
export interface IConsentState extends ConsentState {
|
|
62
|
+
removeCCPAState: () => ConsentState;
|
|
63
|
+
}
|
|
64
|
+
export interface IConsent {
|
|
65
|
+
isEnabledForUserConsent: (consentRules: IConsentRules, user: IMParticleUser) => boolean;
|
|
66
|
+
createPrivacyConsent: ICreatePrivacyConsentFunction;
|
|
67
|
+
createConsentState: (consentState?: ConsentState) => ConsentState;
|
|
68
|
+
ConsentSerialization: IConsentSerialization;
|
|
69
|
+
}
|
|
70
|
+
export default function Consent(this: IConsent, mpInstance: IMParticleWebSDKInstance): void;
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
declare const Constants: {
|
|
2
|
+
readonly sdkVersion: string;
|
|
3
|
+
readonly sdkVendor: "mparticle";
|
|
4
|
+
readonly platform: "web";
|
|
5
|
+
readonly Messages: {
|
|
6
|
+
readonly DeprecationMessages: {
|
|
7
|
+
readonly MethodHasBeenDeprecated: "has been deprecated.";
|
|
8
|
+
readonly MethodMarkedForDeprecationPostfix: "is a deprecated method and will be removed in future releases.";
|
|
9
|
+
readonly AlternativeMethodPrefix: "Please use the alternate method:";
|
|
10
|
+
};
|
|
11
|
+
readonly ErrorMessages: {
|
|
12
|
+
readonly NoToken: "A token must be specified.";
|
|
13
|
+
readonly EventNameInvalidType: "Event name must be a valid string value.";
|
|
14
|
+
readonly EventDataInvalidType: "Event data must be a valid object hash.";
|
|
15
|
+
readonly LoggingDisabled: "Event logging is currently disabled.";
|
|
16
|
+
readonly CookieParseError: "Could not parse cookie";
|
|
17
|
+
readonly EventEmpty: "Event object is null or undefined, cancelling send";
|
|
18
|
+
readonly APIRequestEmpty: "APIRequest is null or undefined, cancelling send";
|
|
19
|
+
readonly NoEventType: "Event type must be specified.";
|
|
20
|
+
readonly TransactionIdRequired: "Transaction ID is required";
|
|
21
|
+
readonly TransactionRequired: "A transaction attributes object is required";
|
|
22
|
+
readonly PromotionIdRequired: "Promotion ID is required";
|
|
23
|
+
readonly BadAttribute: "Attribute value cannot be object or array";
|
|
24
|
+
readonly BadKey: "Key value cannot be object or array";
|
|
25
|
+
readonly BadLogPurchase: "Transaction attributes and a product are both required to log a purchase, https://docs.mparticle.com/?javascript#measuring-transactions";
|
|
26
|
+
readonly AudienceAPINotEnabled: "Your workspace is not enabled to retrieve user audiences.";
|
|
27
|
+
};
|
|
28
|
+
readonly InformationMessages: {
|
|
29
|
+
readonly CookieSearch: "Searching for cookie";
|
|
30
|
+
readonly CookieFound: "Cookie found, parsing values";
|
|
31
|
+
readonly CookieNotFound: "Cookies not found";
|
|
32
|
+
readonly CookieSet: "Setting cookie";
|
|
33
|
+
readonly CookieSync: "Performing cookie sync";
|
|
34
|
+
readonly SendBegin: "Starting to send event";
|
|
35
|
+
readonly SendIdentityBegin: "Starting to send event to identity server";
|
|
36
|
+
readonly SendWindowsPhone: "Sending event to Windows Phone container";
|
|
37
|
+
readonly SendIOS: "Calling iOS path: ";
|
|
38
|
+
readonly SendAndroid: "Calling Android JS interface method: ";
|
|
39
|
+
readonly SendHttp: "Sending event to mParticle HTTP service";
|
|
40
|
+
readonly SendAliasHttp: "Sending alias request to mParticle HTTP service";
|
|
41
|
+
readonly SendIdentityHttp: "Sending event to mParticle HTTP service";
|
|
42
|
+
readonly StartingNewSession: "Starting new Session";
|
|
43
|
+
readonly StartingLogEvent: "Starting to log event";
|
|
44
|
+
readonly StartingLogOptOut: "Starting to log user opt in/out";
|
|
45
|
+
readonly StartingEndSession: "Starting to end session";
|
|
46
|
+
readonly StartingInitialization: "Starting to initialize";
|
|
47
|
+
readonly StartingLogCommerceEvent: "Starting to log commerce event";
|
|
48
|
+
readonly StartingAliasRequest: "Starting to Alias MPIDs";
|
|
49
|
+
readonly LoadingConfig: "Loading configuration options";
|
|
50
|
+
readonly AbandonLogEvent: "Cannot log event, logging disabled or developer token not set";
|
|
51
|
+
readonly AbandonAliasUsers: "Cannot Alias Users, logging disabled or developer token not set";
|
|
52
|
+
readonly AbandonStartSession: "Cannot start session, logging disabled or developer token not set";
|
|
53
|
+
readonly AbandonEndSession: "Cannot end session, logging disabled or developer token not set";
|
|
54
|
+
readonly NoSessionToEnd: "Cannot end session, no active session found";
|
|
55
|
+
};
|
|
56
|
+
readonly ValidationMessages: {
|
|
57
|
+
readonly ModifyIdentityRequestUserIdentitiesPresent: "identityRequests to modify require userIdentities to be present. Request not sent to server. Please fix and try again";
|
|
58
|
+
readonly IdentityRequesetInvalidKey: "There is an invalid key on your identityRequest object. It can only contain a `userIdentities` object and a `onUserAlias` function. Request not sent to server. Please fix and try again.";
|
|
59
|
+
readonly OnUserAliasType: "The onUserAlias value must be a function.";
|
|
60
|
+
readonly UserIdentities: "The userIdentities key must be an object with keys of identityTypes and values of strings. Request not sent to server. Please fix and try again.";
|
|
61
|
+
readonly UserIdentitiesInvalidKey: "There is an invalid identity key on your `userIdentities` object within the identityRequest. Request not sent to server. Please fix and try again.";
|
|
62
|
+
readonly UserIdentitiesInvalidValues: "All user identity values must be strings or null. Request not sent to server. Please fix and try again.";
|
|
63
|
+
readonly AliasMissingMpid: "Alias Request must contain both a destinationMpid and a sourceMpid";
|
|
64
|
+
readonly AliasNonUniqueMpid: "Alias Request's destinationMpid and sourceMpid must be unique";
|
|
65
|
+
readonly AliasMissingTime: "Alias Request must have both a startTime and an endTime";
|
|
66
|
+
readonly AliasStartBeforeEndTime: "Alias Request's endTime must be later than its startTime";
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
readonly NativeSdkPaths: {
|
|
70
|
+
readonly LogEvent: "logEvent";
|
|
71
|
+
readonly SetUserTag: "setUserTag";
|
|
72
|
+
readonly RemoveUserTag: "removeUserTag";
|
|
73
|
+
readonly SetUserAttribute: "setUserAttribute";
|
|
74
|
+
readonly RemoveUserAttribute: "removeUserAttribute";
|
|
75
|
+
readonly SetSessionAttribute: "setSessionAttribute";
|
|
76
|
+
readonly AddToCart: "addToCart";
|
|
77
|
+
readonly RemoveFromCart: "removeFromCart";
|
|
78
|
+
readonly ClearCart: "clearCart";
|
|
79
|
+
readonly LogOut: "logOut";
|
|
80
|
+
readonly SetUserAttributeList: "setUserAttributeList";
|
|
81
|
+
readonly RemoveAllUserAttributes: "removeAllUserAttributes";
|
|
82
|
+
readonly GetUserAttributesLists: "getUserAttributesLists";
|
|
83
|
+
readonly GetAllUserAttributes: "getAllUserAttributes";
|
|
84
|
+
readonly Identify: "identify";
|
|
85
|
+
readonly Logout: "logout";
|
|
86
|
+
readonly Login: "login";
|
|
87
|
+
readonly Modify: "modify";
|
|
88
|
+
readonly Alias: "aliasUsers";
|
|
89
|
+
readonly Upload: "upload";
|
|
90
|
+
};
|
|
91
|
+
readonly StorageNames: {
|
|
92
|
+
readonly localStorageName: "mprtcl-api";
|
|
93
|
+
readonly localStorageNameV3: "mprtcl-v3";
|
|
94
|
+
readonly cookieName: "mprtcl-api";
|
|
95
|
+
readonly cookieNameV2: "mprtcl-v2";
|
|
96
|
+
readonly cookieNameV3: "mprtcl-v3";
|
|
97
|
+
readonly localStorageNameV4: "mprtcl-v4";
|
|
98
|
+
readonly localStorageProductsV4: "mprtcl-prodv4";
|
|
99
|
+
readonly cookieNameV4: "mprtcl-v4";
|
|
100
|
+
readonly currentStorageName: "mprtcl-v4";
|
|
101
|
+
readonly currentStorageProductsName: "mprtcl-prodv4";
|
|
102
|
+
};
|
|
103
|
+
readonly DefaultConfig: {
|
|
104
|
+
readonly cookieDomain: any;
|
|
105
|
+
readonly cookieExpiration: 365;
|
|
106
|
+
readonly logLevel: any;
|
|
107
|
+
readonly timeout: 300;
|
|
108
|
+
readonly sessionTimeout: 30;
|
|
109
|
+
readonly maxProducts: 20;
|
|
110
|
+
readonly forwarderStatsTimeout: 5000;
|
|
111
|
+
readonly integrationDelayTimeout: 5000;
|
|
112
|
+
readonly maxCookieSize: 3000;
|
|
113
|
+
readonly aliasMaxWindow: 90;
|
|
114
|
+
readonly uploadInterval: 0;
|
|
115
|
+
};
|
|
116
|
+
readonly DefaultBaseUrls: {
|
|
117
|
+
readonly v1SecureServiceUrl: "jssdks.mparticle.com/v1/JS/";
|
|
118
|
+
readonly v2SecureServiceUrl: "jssdks.mparticle.com/v2/JS/";
|
|
119
|
+
readonly v3SecureServiceUrl: "jssdks.mparticle.com/v3/JS/";
|
|
120
|
+
readonly configUrl: "jssdkcdns.mparticle.com/JS/v2/";
|
|
121
|
+
readonly identityUrl: "identity.mparticle.com/v1/";
|
|
122
|
+
readonly aliasUrl: "jssdks.mparticle.com/v1/identity/";
|
|
123
|
+
readonly userAudienceUrl: "nativesdks.mparticle.com/v1/";
|
|
124
|
+
};
|
|
125
|
+
readonly CNAMEUrlPaths: {
|
|
126
|
+
readonly v1SecureServiceUrl: "/webevents/v1/JS/";
|
|
127
|
+
readonly v2SecureServiceUrl: "/webevents/v2/JS/";
|
|
128
|
+
readonly v3SecureServiceUrl: "/webevents/v3/JS/";
|
|
129
|
+
readonly configUrl: "/tags/JS/v2/";
|
|
130
|
+
readonly identityUrl: "/identity/v1/";
|
|
131
|
+
readonly aliasUrl: "/webevents/v1/identity/";
|
|
132
|
+
};
|
|
133
|
+
readonly Base64CookieKeys: {
|
|
134
|
+
readonly csm: 1;
|
|
135
|
+
readonly sa: 1;
|
|
136
|
+
readonly ss: 1;
|
|
137
|
+
readonly lsa: 1;
|
|
138
|
+
readonly ua: 1;
|
|
139
|
+
readonly ui: 1;
|
|
140
|
+
readonly csd: 1;
|
|
141
|
+
readonly ia: 1;
|
|
142
|
+
readonly con: 1;
|
|
143
|
+
};
|
|
144
|
+
readonly SDKv2NonMPIDCookieKeys: {
|
|
145
|
+
readonly gs: 1;
|
|
146
|
+
readonly cu: 1;
|
|
147
|
+
readonly l: 1;
|
|
148
|
+
readonly globalSettings: 1;
|
|
149
|
+
readonly currentUserMPID: 1;
|
|
150
|
+
};
|
|
151
|
+
readonly HTTPCodes: {
|
|
152
|
+
readonly noHttpCoverage: -1;
|
|
153
|
+
readonly activeIdentityRequest: -2;
|
|
154
|
+
readonly activeSession: -3;
|
|
155
|
+
readonly validationIssue: -4;
|
|
156
|
+
readonly nativeIdentityRequest: -5;
|
|
157
|
+
readonly loggingDisabledOrMissingAPIKey: -6;
|
|
158
|
+
readonly tooManyRequests: 429;
|
|
159
|
+
};
|
|
160
|
+
readonly FeatureFlags: {
|
|
161
|
+
readonly ReportBatching: "reportBatching";
|
|
162
|
+
readonly EventBatchingIntervalMillis: "eventBatchingIntervalMillis";
|
|
163
|
+
readonly OfflineStorage: "offlineStorage";
|
|
164
|
+
readonly DirectUrlRouting: "directURLRouting";
|
|
165
|
+
readonly CacheIdentity: "cacheIdentity";
|
|
166
|
+
readonly AudienceAPI: "audienceAPI";
|
|
167
|
+
readonly CaptureIntegrationSpecificIds: "captureIntegrationSpecificIds";
|
|
168
|
+
readonly CaptureIntegrationSpecificIdsV2: "captureIntegrationSpecificIdsV2";
|
|
169
|
+
readonly AstBackgroundEvents: "astBackgroundEvents";
|
|
170
|
+
};
|
|
171
|
+
readonly DefaultInstance: "default_instance";
|
|
172
|
+
readonly CCPAPurpose: "data_sale_opt_out";
|
|
173
|
+
readonly IdentityMethods: {
|
|
174
|
+
readonly Modify: "modify";
|
|
175
|
+
readonly Logout: "logout";
|
|
176
|
+
readonly Login: "login";
|
|
177
|
+
readonly Identify: "identify";
|
|
178
|
+
};
|
|
179
|
+
readonly Environment: {
|
|
180
|
+
readonly Development: "development";
|
|
181
|
+
readonly Production: "production";
|
|
182
|
+
};
|
|
183
|
+
readonly CaptureIntegrationSpecificIdsV2Modes: {
|
|
184
|
+
readonly All: "all";
|
|
185
|
+
readonly None: "none";
|
|
186
|
+
readonly RoktOnly: "roktonly";
|
|
187
|
+
};
|
|
188
|
+
readonly Rokt: {
|
|
189
|
+
readonly LauncherInstanceGuidKey: "__rokt_li_guid__";
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
export default Constants;
|
|
193
|
+
export declare const ONE_DAY_IN_SECONDS: number;
|
|
194
|
+
export declare const MILLIS_IN_ONE_SEC = 1000;
|
|
195
|
+
export declare const HTTP_OK: 200;
|
|
196
|
+
export declare const HTTP_ACCEPTED: 202;
|
|
197
|
+
export declare const HTTP_BAD_REQUEST: 400;
|
|
198
|
+
export declare const HTTP_UNAUTHORIZED: 401;
|
|
199
|
+
export declare const HTTP_FORBIDDEN: 403;
|
|
200
|
+
export declare const HTTP_NOT_FOUND: 404;
|
|
201
|
+
export declare const HTTP_SERVER_ERROR: 500;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cookie consent flags control SDK behavior based on user consent preferences for Rokt integration.
|
|
3
|
+
* @see https://docs.rokt.com/developers/integration-guides/web/cookie-consent-flags/
|
|
4
|
+
*/
|
|
5
|
+
export interface ICookieConsentFlags {
|
|
6
|
+
/**
|
|
7
|
+
* When true, indicates the user has opted out of functional cookies/tracking.
|
|
8
|
+
* Default: false (functional tracking is allowed)
|
|
9
|
+
*/
|
|
10
|
+
noFunctional: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* When true, indicates the user has opted out of targeting cookies/tracking.
|
|
13
|
+
* This flag is used to block cookie syncs and other targeting-related features.
|
|
14
|
+
* Default: false (targeting is allowed)
|
|
15
|
+
*/
|
|
16
|
+
noTargeting: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ICookieConsentManager {
|
|
19
|
+
/**
|
|
20
|
+
* Targeting is allowed when noTargeting is false (default)
|
|
21
|
+
*/
|
|
22
|
+
getNoTargeting: () => boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Functional tracking is allowed when noFunctional is false (default)
|
|
25
|
+
*/
|
|
26
|
+
getNoFunctional: () => boolean;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* CookieConsentManager handles storage and access of consent flags (noFunctional, noTargeting)
|
|
30
|
+
* that are passed via launcherOptions during SDK initialization.
|
|
31
|
+
*
|
|
32
|
+
* These flags allow Rokt integration to respect user privacy choices.
|
|
33
|
+
*
|
|
34
|
+
* Default behavior: Both flags default to false, meaning all features are allowed
|
|
35
|
+
* unless explicitly opted out by the user.
|
|
36
|
+
*/
|
|
37
|
+
export default class CookieConsentManager implements ICookieConsentManager {
|
|
38
|
+
private flags;
|
|
39
|
+
constructor(flags: ICookieConsentFlags);
|
|
40
|
+
/**
|
|
41
|
+
* Returns true if third-party targeting is disabled.
|
|
42
|
+
* Targeting is allowed when noTargeting is false (default).
|
|
43
|
+
*/
|
|
44
|
+
getNoTargeting(): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Returns true if functional tracking is disabled.
|
|
47
|
+
* Functional tracking is allowed when noFunctional is false (default).
|
|
48
|
+
*/
|
|
49
|
+
getNoFunctional(): boolean;
|
|
50
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Dictionary } from './utils';
|
|
2
|
+
import { MPID } from '@mparticle/web-sdk';
|
|
3
|
+
import { IConsentRules } from './consent';
|
|
4
|
+
import { IMParticleWebSDKInstance } from './mp-instance';
|
|
5
|
+
export declare const DAYS_IN_MILLISECONDS: number;
|
|
6
|
+
export declare const PARTNER_MODULE_IDS: {
|
|
7
|
+
readonly AdobeEventForwarder: 11;
|
|
8
|
+
readonly DoubleclickDFP: 41;
|
|
9
|
+
readonly AppNexus: 50;
|
|
10
|
+
readonly Lotame: 58;
|
|
11
|
+
readonly TradeDesk: 103;
|
|
12
|
+
readonly VerizonMedia: 155;
|
|
13
|
+
readonly Rokt: 1277;
|
|
14
|
+
};
|
|
15
|
+
export type CookieSyncDates = Dictionary<number>;
|
|
16
|
+
export interface IPixelConfiguration {
|
|
17
|
+
name?: string;
|
|
18
|
+
moduleId: number;
|
|
19
|
+
esId?: number;
|
|
20
|
+
isDebug?: boolean;
|
|
21
|
+
isProduction?: boolean;
|
|
22
|
+
settings: Dictionary<string>;
|
|
23
|
+
frequencyCap: number;
|
|
24
|
+
pixelUrl: string;
|
|
25
|
+
redirectUrl: string;
|
|
26
|
+
filteringConsentRuleValues?: IConsentRules;
|
|
27
|
+
}
|
|
28
|
+
export interface ICookieSyncManager {
|
|
29
|
+
attemptCookieSync: (mpid: MPID, mpidIsNotInCookies?: boolean) => void;
|
|
30
|
+
performCookieSync: (url: string, moduleId: string, mpid: MPID, cookieSyncDates: CookieSyncDates) => void;
|
|
31
|
+
combineUrlWithRedirect: (mpid: MPID, pixelUrl: string, redirectUrl: string) => string;
|
|
32
|
+
}
|
|
33
|
+
export default function CookieSyncManager(this: ICookieSyncManager, mpInstance: IMParticleWebSDKInstance): void;
|
|
34
|
+
export declare const isLastSyncDateExpired: (frequencyCap: number, lastSyncDate?: number) => boolean;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export default function Ecommerce(mpInstance: any): void;
|
|
2
|
+
export default class Ecommerce {
|
|
3
|
+
constructor(mpInstance: any);
|
|
4
|
+
convertTransactionAttributesToProductAction: (transactionAttributes: any, productAction: any) => void;
|
|
5
|
+
getProductActionEventName: (productActionType: any) => "AddToCart" | "AddToWishlist" | "Checkout" | "CheckoutOption" | "Click" | "Purchase" | "Refund" | "RemoveFromCart" | "RemoveFromWishlist" | "ViewDetail" | "Unknown";
|
|
6
|
+
getPromotionActionEventName: (promotionActionType: any) => "Unknown" | "PromotionClick" | "PromotionView";
|
|
7
|
+
convertProductActionToEventType: (productActionType: any) => 0 | 20 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21;
|
|
8
|
+
convertPromotionActionToEventType: (promotionActionType: any) => 18 | 19;
|
|
9
|
+
generateExpandedEcommerceName: (eventName: any, plusOne: any) => string;
|
|
10
|
+
extractProductAttributes: (attributes: any, product: any) => void;
|
|
11
|
+
extractTransactionId: (attributes: any, productAction: any) => void;
|
|
12
|
+
extractActionAttributes: (attributes: any, productAction: any) => void;
|
|
13
|
+
extractPromotionAttributes: (attributes: any, promotion: any) => void;
|
|
14
|
+
buildProductList: (event: any, product: any) => any;
|
|
15
|
+
createProduct: (name: any, sku: any, price: any, quantity: any, variant: any, category: any, brand: any, position: any, couponCode: any, attributes: any) => {
|
|
16
|
+
Name: string;
|
|
17
|
+
Sku: any;
|
|
18
|
+
Price: any;
|
|
19
|
+
Quantity: any;
|
|
20
|
+
Brand: any;
|
|
21
|
+
Variant: any;
|
|
22
|
+
Category: any;
|
|
23
|
+
Position: any;
|
|
24
|
+
CouponCode: any;
|
|
25
|
+
TotalAmount: number;
|
|
26
|
+
Attributes: any;
|
|
27
|
+
};
|
|
28
|
+
createPromotion: (id: any, creative: any, name: any, position: any) => {
|
|
29
|
+
Id: any;
|
|
30
|
+
Creative: any;
|
|
31
|
+
Name: any;
|
|
32
|
+
Position: any;
|
|
33
|
+
};
|
|
34
|
+
createImpression: (name: any, product: any) => {
|
|
35
|
+
Name: string;
|
|
36
|
+
Product: any;
|
|
37
|
+
};
|
|
38
|
+
createTransactionAttributes: (id: any, affiliation: any, couponCode: any, revenue: any, shipping: any, tax: any) => {
|
|
39
|
+
Id: any;
|
|
40
|
+
Affiliation: any;
|
|
41
|
+
CouponCode: any;
|
|
42
|
+
Revenue: any;
|
|
43
|
+
Shipping: any;
|
|
44
|
+
Tax: any;
|
|
45
|
+
};
|
|
46
|
+
expandProductImpression: (commerceEvent: any) => any[];
|
|
47
|
+
expandCommerceEvent: (event: any) => any[];
|
|
48
|
+
expandPromotionAction: (commerceEvent: any) => any[];
|
|
49
|
+
expandProductAction: (commerceEvent: any) => any[];
|
|
50
|
+
createCommerceEventObject: (customFlags: any, options: any) => any;
|
|
51
|
+
sanitizeAmount: (amount: any, category: any) => any;
|
|
52
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { ProductAction, Product, Promotion, CommerceEvent } from '@mparticle/event-models';
|
|
2
|
+
import { SDKEventAttrs, SDKEventOptions, TransactionAttributes } from '@mparticle/web-sdk';
|
|
3
|
+
import { valueof } from './utils';
|
|
4
|
+
import { ProductActionType, PromotionActionType, CommerceEventType, EventType } from './types';
|
|
5
|
+
import { SDKEvent, SDKEventCustomFlags, SDKImpression, SDKProduct, SDKProductImpression, SDKPromotion } from './sdkRuntimeModels';
|
|
6
|
+
interface IECommerceShared {
|
|
7
|
+
createProduct(name: string, sku: string | number, price: string | number, quantity?: string | number, variant?: string, category?: string, brand?: string, position?: number, couponCode?: string, attributes?: SDKEventAttrs): SDKProduct | null;
|
|
8
|
+
createImpression(name: string, product: Product): SDKImpression | null;
|
|
9
|
+
createPromotion(id: string | number, creative?: string, name?: string, position?: number): SDKPromotion | null;
|
|
10
|
+
createTransactionAttributes(id: string | number, affiliation?: string, couponCode?: string, revenue?: string | number, shipping?: string | number, tax?: number): TransactionAttributes | null;
|
|
11
|
+
expandCommerceEvent(event: CommerceEvent): SDKEvent[] | null;
|
|
12
|
+
}
|
|
13
|
+
export interface SDKCart {
|
|
14
|
+
add(product: SDKProduct | SDKProduct[], logEvent?: boolean): void;
|
|
15
|
+
remove(product: SDKProduct | SDKProduct[], logEvent?: boolean): void;
|
|
16
|
+
clear(): void;
|
|
17
|
+
}
|
|
18
|
+
export interface SDKECommerceAPI extends IECommerceShared {
|
|
19
|
+
logCheckout(step: number, option?: string, attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags): void;
|
|
20
|
+
logImpression(impression: SDKProductImpression, attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags, eventOptions?: SDKEventOptions): void;
|
|
21
|
+
logProductAction(productActionType: valueof<typeof ProductActionType>, product: SDKProduct | SDKProduct[], attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags, transactionAttributes?: TransactionAttributes, eventOptions?: SDKEventOptions): void;
|
|
22
|
+
logPromotion(type: valueof<typeof PromotionActionType>, promotion: SDKPromotion, attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags, eventOptions?: SDKEventOptions): void;
|
|
23
|
+
setCurrencyCode(code: string): void;
|
|
24
|
+
Cart: SDKCart;
|
|
25
|
+
logPurchase(transactionAttributes: TransactionAttributes, product: SDKProduct | SDKProduct[], clearCart?: boolean, attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags): void;
|
|
26
|
+
logRefund(transactionAttributes: TransactionAttributes, product: SDKProduct | SDKProduct[], clearCart?: boolean, attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags): void;
|
|
27
|
+
}
|
|
28
|
+
interface ExtractedActionAttributes {
|
|
29
|
+
Affiliation?: string;
|
|
30
|
+
'Coupon Code'?: string;
|
|
31
|
+
'Total Amount'?: number;
|
|
32
|
+
'Shipping Amount'?: number;
|
|
33
|
+
'Tax Amount'?: number;
|
|
34
|
+
'Checkout Option'?: string;
|
|
35
|
+
'Checkout Step'?: number;
|
|
36
|
+
'Transaction ID'?: string;
|
|
37
|
+
}
|
|
38
|
+
interface ExtractedProductAttributes {
|
|
39
|
+
'Coupon Code'?: string;
|
|
40
|
+
Brand?: string;
|
|
41
|
+
Category?: string;
|
|
42
|
+
Name?: string;
|
|
43
|
+
Id?: string;
|
|
44
|
+
'Item Price'?: number;
|
|
45
|
+
Quantity?: number;
|
|
46
|
+
Position?: number;
|
|
47
|
+
Variant?: string;
|
|
48
|
+
'Total Product Amount': number;
|
|
49
|
+
}
|
|
50
|
+
interface ExtractedPromotionAttributes {
|
|
51
|
+
Id?: string;
|
|
52
|
+
Creative?: string;
|
|
53
|
+
Name?: string;
|
|
54
|
+
Position?: number;
|
|
55
|
+
}
|
|
56
|
+
interface ExtractedTransactionId {
|
|
57
|
+
'Transaction ID'?: string;
|
|
58
|
+
}
|
|
59
|
+
export interface IECommerce extends IECommerceShared {
|
|
60
|
+
buildProductList(event: SDKEvent, product: Product | Product[]): Product[];
|
|
61
|
+
convertProductActionToEventType(productActionType: valueof<typeof ProductActionType>): // https://go.mparticle.com/work/SQDSDKS-4801
|
|
62
|
+
typeof CommerceEventType | typeof EventType | null;
|
|
63
|
+
convertPromotionActionToEventType(promotionActionType: valueof<typeof PromotionActionType>): typeof CommerceEventType | null;
|
|
64
|
+
convertTransactionAttributesToProductAction(transactionAttributes: TransactionAttributes, productAction: ProductAction): void;
|
|
65
|
+
createCommerceEventObject(customFlags: SDKEventCustomFlags, options?: SDKEventOptions): SDKEvent | null;
|
|
66
|
+
expandProductAction(commerceEvent: CommerceEvent): SDKEvent[];
|
|
67
|
+
expandProductImpression(commerceEvent: CommerceEvent): SDKEvent[];
|
|
68
|
+
expandPromotionAction(commerceEvent: CommerceEvent): SDKEvent[];
|
|
69
|
+
extractActionAttributes(attributes: ExtractedActionAttributes, productAction: ProductAction): void;
|
|
70
|
+
extractProductAttributes(attributes: ExtractedProductAttributes, product: Product): void;
|
|
71
|
+
extractPromotionAttributes(attributes: ExtractedPromotionAttributes, promotion: Promotion): void;
|
|
72
|
+
extractTransactionId(attributes: ExtractedTransactionId, productAction: ProductAction): void;
|
|
73
|
+
generateExpandedEcommerceName(eventName: string, plusOne: boolean): string;
|
|
74
|
+
getProductActionEventName(productActionType: valueof<typeof ProductActionType>): string;
|
|
75
|
+
getPromotionActionEventName(promotionActionType: valueof<typeof PromotionActionType>): string;
|
|
76
|
+
sanitizeAmount(amount: string | number, category: string): number;
|
|
77
|
+
}
|
|
78
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default function Events(mpInstance: any): void;
|
|
2
|
+
export default class Events {
|
|
3
|
+
constructor(mpInstance: any);
|
|
4
|
+
logEvent: (event: any, options: any) => void;
|
|
5
|
+
startTracking: (callback: any) => void;
|
|
6
|
+
stopTracking: () => void;
|
|
7
|
+
logOptOut: () => void;
|
|
8
|
+
logAST: () => void;
|
|
9
|
+
logCheckoutEvent: (step: any, option: any, attrs: any, customFlags: any) => void;
|
|
10
|
+
logProductActionEvent: (productActionType: any, product: any, customAttrs: any, customFlags: any, transactionAttributes: any, options: any) => void;
|
|
11
|
+
logPurchaseEvent: (transactionAttributes: any, product: any, attrs: any, customFlags: any) => void;
|
|
12
|
+
logRefundEvent: (transactionAttributes: any, product: any, attrs: any, customFlags: any) => void;
|
|
13
|
+
logPromotionEvent: (promotionType: any, promotion: any, attrs: any, customFlags: any, eventOptions: any) => void;
|
|
14
|
+
logImpressionEvent: (impression: any, attrs: any, customFlags: any, options: any) => void;
|
|
15
|
+
logCommerceEvent: (commerceEvent: any, attrs: any, options: any) => void;
|
|
16
|
+
addEventHandler: (domEvent: any, selector: any, eventName: any, data: any, eventType: any) => void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Callback, SDKEventAttrs, SDKEventOptions, TransactionAttributes } from '@mparticle/web-sdk';
|
|
2
|
+
import { BaseEvent, SDKEvent, SDKEventCustomFlags, SDKProduct, SDKProductImpression, SDKPromotion } from './sdkRuntimeModels';
|
|
3
|
+
import { valueof } from './utils';
|
|
4
|
+
import { EventType, ProductActionType, PromotionActionType } from './types';
|
|
5
|
+
type EventHandlerFunction<T> = (element: HTMLLinkElement | HTMLFormElement) => T;
|
|
6
|
+
export interface IEvents {
|
|
7
|
+
addEventHandler(domEvent: string, selector: string | Node, eventName: EventHandlerFunction<string> | string, data: EventHandlerFunction<SDKEventAttrs> | SDKEventAttrs, eventType: valueof<typeof EventType>): void;
|
|
8
|
+
logAST(): void;
|
|
9
|
+
logCheckoutEvent(step: number, option?: string, attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags): void;
|
|
10
|
+
logCommerceEvent(commerceEvent: SDKEvent, attrs?: SDKEventAttrs, options?: SDKEventOptions): void;
|
|
11
|
+
logEvent(event: BaseEvent, eventOptions?: SDKEventOptions): void;
|
|
12
|
+
logImpressionEvent(impression: SDKProductImpression, attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags, eventOptions?: SDKEventOptions): any;
|
|
13
|
+
logOptOut(): void;
|
|
14
|
+
logProductActionEvent(productActionType: valueof<typeof ProductActionType>, product: SDKProduct | SDKProduct[], attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags, transactionAttributes?: TransactionAttributes, eventOptions?: SDKEventOptions): void;
|
|
15
|
+
logPromotionEvent(promotionType: valueof<typeof PromotionActionType>, promotion: SDKPromotion, attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags, eventOptions?: SDKEventOptions): void;
|
|
16
|
+
logPurchaseEvent(transactionAttributes: TransactionAttributes, product: SDKProduct | SDKProduct[], attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags): void;
|
|
17
|
+
logRefundEvent(transactionAttributes: TransactionAttributes, product: SDKProduct | SDKProduct[], attrs?: SDKEventAttrs, customFlags?: SDKEventCustomFlags): void;
|
|
18
|
+
startTracking(callback: Callback): void;
|
|
19
|
+
stopTracking(): void;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export default function filteredMparticleUser(mpid: any, forwarder: any, mpInstance: any, kitBlocker: any): {
|
|
2
|
+
getUserIdentities: () => {
|
|
3
|
+
userIdentities: {};
|
|
4
|
+
};
|
|
5
|
+
getMPID: () => any;
|
|
6
|
+
getUserAttributesLists: (forwarder: any) => {};
|
|
7
|
+
getAllUserAttributes: () => {};
|
|
8
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default class ForegroundTimeTracker {
|
|
2
|
+
private noFunctional;
|
|
3
|
+
private isTrackerActive;
|
|
4
|
+
private localStorageName;
|
|
5
|
+
private timerVault;
|
|
6
|
+
startTime: number;
|
|
7
|
+
totalTime: number;
|
|
8
|
+
constructor(timerKey: string, noFunctional?: boolean);
|
|
9
|
+
private addHandlers;
|
|
10
|
+
private handleVisibilityChange;
|
|
11
|
+
private handleWindowBlur;
|
|
12
|
+
private handleWindowFocus;
|
|
13
|
+
private syncAcrossTabs;
|
|
14
|
+
updateTimeInPersistence(): void;
|
|
15
|
+
private loadTimeFromStorage;
|
|
16
|
+
private startTracking;
|
|
17
|
+
private stopTracking;
|
|
18
|
+
private setTotalTime;
|
|
19
|
+
getTimeInForeground(): number;
|
|
20
|
+
resetTimer(): void;
|
|
21
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export default function Forwarders(mpInstance: any, kitBlocker: any): void;
|
|
2
|
+
export default class Forwarders {
|
|
3
|
+
constructor(mpInstance: any, kitBlocker: any);
|
|
4
|
+
forwarderStatsUploader: any;
|
|
5
|
+
initForwarders: (userIdentities: any, forwardingStatsCallback: any) => void;
|
|
6
|
+
isEnabledForUserAttributes: (filterObject: any, user: any) => boolean;
|
|
7
|
+
isEnabledForUnknownUser: (excludeAnonymousUserBoolean: any, user: any) => boolean;
|
|
8
|
+
applyToForwarders: (functionName: any, functionArgs: any) => void;
|
|
9
|
+
sendEventToForwarders: (event: any) => void;
|
|
10
|
+
handleForwarderUserAttributes: (functionNameKey: any, key: any, value: any) => void;
|
|
11
|
+
setForwarderUserIdentities: (userIdentities: any) => void;
|
|
12
|
+
setForwarderOnUserIdentified: (user: any) => void;
|
|
13
|
+
setForwarderOnIdentityComplete: (user: any, identityMethod: any) => void;
|
|
14
|
+
getForwarderStatsQueue: () => any;
|
|
15
|
+
setForwarderStatsQueue: (queue: any) => void;
|
|
16
|
+
processForwarders: (config: any, forwardingStatsCallback: any) => void;
|
|
17
|
+
processUIEnabledKits: (config: any) => void;
|
|
18
|
+
returnKitConstructors: () => {};
|
|
19
|
+
configureUIEnabledKit: (configuration: any, kits: any) => void;
|
|
20
|
+
processSideloadedKits: (mpConfig: any) => void;
|
|
21
|
+
configureSideloadedKit: (kitConstructor: any) => void;
|
|
22
|
+
returnConfiguredKit: (forwarder: any, config?: {}) => any;
|
|
23
|
+
configurePixel: (settings: any) => void;
|
|
24
|
+
processPixelConfigs: (config: any) => void;
|
|
25
|
+
sendSingleForwardingStatsToServer: (forwardingStatsData: any) => Promise<void>;
|
|
26
|
+
}
|