react-native-mparticle 2.7.12 → 2.8.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/SECURITY.md +9 -0
- package/android/build.gradle +65 -10
- package/android/src/main/AndroidManifestNew.xml +3 -0
- package/android/src/main/java/com/mparticle/react/MParticleModule.kt +976 -0
- package/android/src/main/java/com/mparticle/react/MParticlePackage.kt +68 -0
- package/android/src/main/java/com/mparticle/react/rokt/MPRoktModuleImpl.kt +251 -0
- package/android/src/main/java/com/mparticle/react/rokt/RoktLayoutViewManagerImpl.kt +79 -0
- package/android/src/newarch/java/com/mparticle/react/rokt/MPRoktModule.kt +130 -0
- package/android/src/newarch/java/com/mparticle/react/rokt/RoktLayoutViewManager.kt +22 -0
- package/android/src/oldarch/java/com/mparticle/react/NativeMPRoktSpec.kt +29 -0
- package/android/src/oldarch/java/com/mparticle/react/NativeMParticleSpec.kt +153 -0
- package/android/src/oldarch/java/com/mparticle/react/rokt/MPRoktModule.kt +79 -0
- package/android/src/oldarch/java/com/mparticle/react/rokt/RoktLayoutViewManager.kt +34 -0
- package/ios/RNMParticle/RNMPRokt.h +15 -0
- package/ios/RNMParticle/RNMPRokt.mm +247 -0
- package/ios/RNMParticle/RNMParticle.h +6 -1
- package/ios/RNMParticle/RNMParticle.mm +1199 -0
- package/ios/RNMParticle/RoktEventManager.h +16 -0
- package/ios/RNMParticle/RoktEventManager.m +174 -0
- package/ios/RNMParticle/RoktLayoutManager.m +22 -0
- package/ios/RNMParticle/RoktNativeLayoutComponentView.h +18 -0
- package/ios/RNMParticle/RoktNativeLayoutComponentView.mm +50 -0
- package/ios/RNMParticle.xcodeproj/project.pbxproj +29 -6
- package/js/codegenSpecs/NativeMParticle.ts +214 -0
- package/js/codegenSpecs/rokt/NativeMPRokt.ts +32 -0
- package/js/codegenSpecs/rokt/RoktLayoutNativeComponent.ts +29 -0
- package/js/index.tsx +940 -0
- package/js/rokt/rokt-layout-view.android.tsx +133 -0
- package/js/rokt/rokt-layout-view.ios.tsx +121 -0
- package/js/rokt/rokt-layout-view.tsx +15 -0
- package/js/rokt/rokt.ts +87 -0
- package/js/utils/architecture.ts +22 -0
- package/lib/codegenSpecs/NativeMParticle.d.ts +148 -0
- package/lib/codegenSpecs/NativeMParticle.js +5 -0
- package/lib/codegenSpecs/NativeMParticle.js.map +1 -0
- package/lib/codegenSpecs/rokt/NativeMPRokt.d.ts +24 -0
- package/lib/codegenSpecs/rokt/NativeMPRokt.js +5 -0
- package/lib/codegenSpecs/rokt/NativeMPRokt.js.map +1 -0
- package/lib/codegenSpecs/rokt/RoktLayoutNativeComponent.d.ts +18 -0
- package/lib/codegenSpecs/rokt/RoktLayoutNativeComponent.js +8 -0
- package/lib/codegenSpecs/rokt/RoktLayoutNativeComponent.js.map +1 -0
- package/lib/index.d.ts +410 -0
- package/lib/index.js +645 -0
- package/lib/index.js.map +1 -0
- package/lib/rokt/rokt-layout-view.android.d.ts +39 -0
- package/lib/rokt/rokt-layout-view.android.js +109 -0
- package/lib/rokt/rokt-layout-view.android.js.map +1 -0
- package/lib/rokt/rokt-layout-view.d.ts +5 -0
- package/lib/rokt/rokt-layout-view.ios.d.ts +32 -0
- package/lib/rokt/rokt-layout-view.ios.js +84 -0
- package/lib/rokt/rokt-layout-view.ios.js.map +1 -0
- package/lib/rokt/rokt-layout-view.js +12 -0
- package/lib/rokt/rokt-layout-view.js.map +1 -0
- package/lib/rokt/rokt.d.ts +40 -0
- package/lib/rokt/rokt.js +54 -0
- package/lib/rokt/rokt.js.map +1 -0
- package/lib/utils/architecture.d.ts +9 -0
- package/lib/utils/architecture.js +19 -0
- package/lib/utils/architecture.js.map +1 -0
- package/package.json +32 -10
- package/react-native-mparticle.podspec +7 -6
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/.github/dependabot.yml +0 -12
- package/.github/workflows/daily.yml +0 -19
- package/.github/workflows/dependabot-automerge.yml +0 -12
- package/.github/workflows/pull-request.yml +0 -60
- package/.github/workflows/release.yml +0 -60
- package/.github/workflows/sonarcloud.yml +0 -16
- package/android/.classpath +0 -6
- package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
- package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.5.1/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.project +0 -34
- package/android/.settings/org.eclipse.buildship.core.prefs +0 -13
- package/android/.settings/org.eclipse.jdt.core.prefs +0 -4
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +0 -6
- package/android/gradle.properties +0 -53
- package/android/gradlew +0 -160
- package/android/gradlew.bat +0 -90
- package/android/libs/java-json.jar +0 -0
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar +0 -0
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug-sources.jar.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar +0 -0
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-debug.aar.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar +0 -0
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release-sources.jar.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar +0 -0
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5-release.aar.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module +0 -204
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.module.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom +0 -44
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/0.70.5/hermes-engine-0.70.5.pom.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml +0 -13
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/hermes-engine/maven-metadata.xml.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar +0 -0
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug-sources.jar.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar +0 -0
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-debug.aar.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar +0 -0
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release-sources.jar.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar +0 -0
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5-release.aar.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module +0 -628
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.module.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom +0 -156
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/0.70.5/react-native-0.70.5.pom.sha512 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml +0 -13
- package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml.md5 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml.sha1 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml.sha256 +0 -1
- package/android/libs/react-native-android/com/facebook/react/react-native/maven-metadata.xml.sha512 +0 -1
- package/android/src/main/java/com/mparticle/react/MParticleModule.java +0 -987
- package/android/src/main/java/com/mparticle/react/MParticlePackage.java +0 -34
- package/android/src/test/java/com/mparticle/react/IdentityApiTest.java +0 -230
- package/android/src/test/java/com/mparticle/react/MParticleUserTest.java +0 -233
- package/android/src/test/java/com/mparticle/react/testutils/MockMParticleUser.java +0 -103
- package/android/src/test/java/com/mparticle/react/testutils/MockMap.java +0 -169
- package/android/src/test/java/com/mparticle/react/testutils/MockReadableArray.java +0 -53
- package/android/src/test/java/com/mparticle/react/testutils/MockWritableMap.java +0 -4
- package/android/src/test/java/com/mparticle/react/testutils/Mutable.java +0 -13
- package/ios/RNMParticle/RNMParticle.m +0 -671
- package/ios/RNMParticle.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/ios/RNMParticle.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/ios/RNMParticle.xcodeproj/project.xcworkspace/xcuserdata/bstalnaker.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/RNMParticle.xcodeproj/xcuserdata/bstalnaker.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +0 -6
- package/ios/RNMParticle.xcodeproj/xcuserdata/bstalnaker.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/js/index.js +0 -697
- package/release.sh +0 -6
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
import { Rokt, CacheConfig, IRoktConfig, ColorMode } from './rokt/rokt';
|
|
2
|
+
import RoktLayoutView, { RoktLayoutViewProps } from './rokt/rokt-layout-view';
|
|
3
|
+
import type { CallbackError, UserAttributes as NativeUserAttributes } from './codegenSpecs/NativeMParticle';
|
|
4
|
+
export interface UserAttributes extends NativeUserAttributes {
|
|
5
|
+
[key: string]: string | string[] | number | boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface UserIdentities {
|
|
8
|
+
[key: number]: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CustomAttributes {
|
|
11
|
+
[key: string]: string | number | boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface MParticleErrorResponse {
|
|
14
|
+
httpCode: number;
|
|
15
|
+
message?: string;
|
|
16
|
+
responseCode?: number;
|
|
17
|
+
mpid?: string;
|
|
18
|
+
errors?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface AttributionResult {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
export type CompletionCallback<T> = (result: T) => void;
|
|
24
|
+
export type ErrorCallback = (error: MParticleError | null) => void;
|
|
25
|
+
export type IdentityCallback = (error: MParticleError | null, userId: string | null, previousUserId?: string | null) => void;
|
|
26
|
+
export declare const EventType: {
|
|
27
|
+
readonly Navigation: 1;
|
|
28
|
+
readonly Location: 2;
|
|
29
|
+
readonly Search: 3;
|
|
30
|
+
readonly Transaction: 4;
|
|
31
|
+
readonly UserContent: 5;
|
|
32
|
+
readonly UserPreference: 6;
|
|
33
|
+
readonly Social: 7;
|
|
34
|
+
readonly Other: 8;
|
|
35
|
+
readonly Media: 9;
|
|
36
|
+
};
|
|
37
|
+
export declare const UserAttributeType: {
|
|
38
|
+
readonly FirstName: "$FirstName";
|
|
39
|
+
readonly LastName: "$LastName";
|
|
40
|
+
readonly Address: "$Address";
|
|
41
|
+
readonly State: "$State";
|
|
42
|
+
readonly City: "$City";
|
|
43
|
+
readonly Zipcode: "$Zip";
|
|
44
|
+
readonly Country: "$Country";
|
|
45
|
+
readonly Age: "$Age";
|
|
46
|
+
readonly Gender: "$Gender";
|
|
47
|
+
readonly MobileNumber: "$Mobile";
|
|
48
|
+
};
|
|
49
|
+
export declare const UserIdentityType: {
|
|
50
|
+
readonly Other: 0;
|
|
51
|
+
readonly CustomerId: 1;
|
|
52
|
+
readonly Facebook: 2;
|
|
53
|
+
readonly Twitter: 3;
|
|
54
|
+
readonly Google: 4;
|
|
55
|
+
readonly Microsoft: 5;
|
|
56
|
+
readonly Yahoo: 6;
|
|
57
|
+
readonly Email: 7;
|
|
58
|
+
readonly Alias: 8;
|
|
59
|
+
readonly FacebookCustomAudienceId: 9;
|
|
60
|
+
readonly Other2: 10;
|
|
61
|
+
readonly Other3: 11;
|
|
62
|
+
readonly Other4: 12;
|
|
63
|
+
readonly Other5: 13;
|
|
64
|
+
readonly Other6: 14;
|
|
65
|
+
readonly Other7: 15;
|
|
66
|
+
readonly Other8: 16;
|
|
67
|
+
readonly Other9: 17;
|
|
68
|
+
readonly Other10: 18;
|
|
69
|
+
readonly MobileNumber: 19;
|
|
70
|
+
readonly PhoneNumber2: 20;
|
|
71
|
+
readonly PhoneNumber3: 21;
|
|
72
|
+
readonly IOSAdvertiserId: 22;
|
|
73
|
+
readonly IOSVendorId: 23;
|
|
74
|
+
readonly PushToken: 24;
|
|
75
|
+
readonly DeviceApplicationStamp: 25;
|
|
76
|
+
};
|
|
77
|
+
export declare const ProductActionType: {
|
|
78
|
+
readonly AddToCart: 1;
|
|
79
|
+
readonly RemoveFromCart: 2;
|
|
80
|
+
readonly Checkout: 3;
|
|
81
|
+
readonly CheckoutOption: 4;
|
|
82
|
+
readonly Click: 5;
|
|
83
|
+
readonly ViewDetail: 6;
|
|
84
|
+
readonly Purchase: 7;
|
|
85
|
+
readonly Refund: 8;
|
|
86
|
+
readonly AddToWishlist: 9;
|
|
87
|
+
readonly RemoveFromWishlist: 10;
|
|
88
|
+
};
|
|
89
|
+
export declare const PromotionActionType: {
|
|
90
|
+
readonly View: 0;
|
|
91
|
+
readonly Click: 1;
|
|
92
|
+
};
|
|
93
|
+
export declare const ATTAuthStatus: {
|
|
94
|
+
readonly NotDetermined: 0;
|
|
95
|
+
readonly Restricted: 1;
|
|
96
|
+
readonly Denied: 2;
|
|
97
|
+
readonly Authorized: 3;
|
|
98
|
+
};
|
|
99
|
+
export declare const upload: () => void;
|
|
100
|
+
export declare const setUploadInterval: (uploadInterval: number) => void;
|
|
101
|
+
export declare const logEvent: (eventName: string, type?: number, attributes?: CustomAttributes | null) => void;
|
|
102
|
+
export declare const logMPEvent: (event: Event) => void;
|
|
103
|
+
export declare const logCommerceEvent: (commerceEvent: CommerceEvent) => void;
|
|
104
|
+
export declare const logScreenEvent: (screenName: string, attributes?: CustomAttributes | null, shouldUploadEvent?: boolean) => void;
|
|
105
|
+
export declare const setATTStatus: (status: number) => void;
|
|
106
|
+
export declare const setATTStatusWithCustomTimestamp: (status: number, timestamp: number) => void;
|
|
107
|
+
export declare const setOptOut: (optOut: boolean) => void;
|
|
108
|
+
export declare const getOptOut: (completion: CompletionCallback<boolean>) => void;
|
|
109
|
+
export declare const addGDPRConsentState: (newConsentState: GDPRConsent, purpose: string) => void;
|
|
110
|
+
export declare const removeGDPRConsentStateWithPurpose: (purpose: string) => void;
|
|
111
|
+
export declare const setCCPAConsentState: (newConsentState: CCPAConsent) => void;
|
|
112
|
+
export declare const removeCCPAConsentState: () => void;
|
|
113
|
+
export declare const isKitActive: (kitId: number, completion: CompletionCallback<boolean>) => void;
|
|
114
|
+
export declare const getAttributions: (completion: CompletionCallback<AttributionResult>) => void;
|
|
115
|
+
export declare const logPushRegistration: (registrationField1: string, registrationField2: string) => void;
|
|
116
|
+
export declare const getSession: (completion: CompletionCallback<string | null>) => void;
|
|
117
|
+
export declare const setLocation: (latitude: number, longitude: number) => void;
|
|
118
|
+
export declare class User {
|
|
119
|
+
readonly userId: string;
|
|
120
|
+
constructor(userId: string);
|
|
121
|
+
getMpid(): string;
|
|
122
|
+
setUserAttribute(key: string, value: string | string[] | number | boolean): void;
|
|
123
|
+
setUserAttributeArray(key: string, value: string[]): void;
|
|
124
|
+
getUserAttributes(completion: CompletionCallback<UserAttributes>): void;
|
|
125
|
+
setUserTag(value: string): void;
|
|
126
|
+
incrementUserAttribute(key: string, value: number): void;
|
|
127
|
+
removeUserAttribute(key: string): void;
|
|
128
|
+
getUserIdentities(completion: CompletionCallback<UserIdentities>): void;
|
|
129
|
+
getFirstSeen(completion: CompletionCallback<string>): void;
|
|
130
|
+
getLastSeen(completion: CompletionCallback<string>): void;
|
|
131
|
+
}
|
|
132
|
+
export declare class IdentityRequest {
|
|
133
|
+
[key: number]: string;
|
|
134
|
+
email?: string;
|
|
135
|
+
customerId?: string;
|
|
136
|
+
setEmail(email: string): this;
|
|
137
|
+
setCustomerID(customerId: string): this;
|
|
138
|
+
setUserIdentity(userIdentity: string, identityType: number): this;
|
|
139
|
+
/**
|
|
140
|
+
* @deprecated This method is deprecated and will be removed in a future version.
|
|
141
|
+
*/
|
|
142
|
+
setOnUserAlias(_onUserAlias: any): void;
|
|
143
|
+
}
|
|
144
|
+
export declare class Identity {
|
|
145
|
+
static getCurrentUser(completion: CompletionCallback<User>): void;
|
|
146
|
+
static identify(identityRequest: IdentityRequest, completion: IdentityCallback): void;
|
|
147
|
+
static login(identityRequest: IdentityRequest, completion: IdentityCallback): void;
|
|
148
|
+
static logout(identityRequest: IdentityRequest, completion: IdentityCallback): void;
|
|
149
|
+
static modify(identityRequest: IdentityRequest, completion: IdentityCallback): void;
|
|
150
|
+
static aliasUsers(aliasRequest: AliasRequest, completion: CompletionCallback<boolean>): void;
|
|
151
|
+
}
|
|
152
|
+
export declare class Impression {
|
|
153
|
+
readonly impressionListName: string;
|
|
154
|
+
readonly products: Product[];
|
|
155
|
+
constructor(impressionListName: string, products: Product[]);
|
|
156
|
+
}
|
|
157
|
+
export declare class Promotion {
|
|
158
|
+
readonly id: string;
|
|
159
|
+
readonly name: string;
|
|
160
|
+
readonly creative: string;
|
|
161
|
+
readonly position: string;
|
|
162
|
+
constructor(id: string, name: string, creative: string, position: string);
|
|
163
|
+
}
|
|
164
|
+
export declare class AliasRequest {
|
|
165
|
+
sourceMpid(mpid: string): this;
|
|
166
|
+
destinationMpid(mpid: string): this;
|
|
167
|
+
endTime(endTime: number): this;
|
|
168
|
+
startTime(startTime: number): this;
|
|
169
|
+
}
|
|
170
|
+
export declare class TransactionAttributes {
|
|
171
|
+
readonly transactionId: string;
|
|
172
|
+
affiliation?: string;
|
|
173
|
+
revenue?: number;
|
|
174
|
+
shipping?: number;
|
|
175
|
+
tax?: number;
|
|
176
|
+
couponCode?: string;
|
|
177
|
+
constructor(transactionId: string);
|
|
178
|
+
setAffiliation(affiliation: string): this;
|
|
179
|
+
setRevenue(revenue: string | number): this;
|
|
180
|
+
setShipping(shipping: string | number): this;
|
|
181
|
+
setTax(tax: string | number): this;
|
|
182
|
+
setCouponCode(couponCode: string): this;
|
|
183
|
+
}
|
|
184
|
+
export declare class Product {
|
|
185
|
+
readonly name: string;
|
|
186
|
+
readonly sku: string;
|
|
187
|
+
readonly price: number;
|
|
188
|
+
readonly quantity: number;
|
|
189
|
+
brand?: string;
|
|
190
|
+
couponCode?: string;
|
|
191
|
+
position?: number;
|
|
192
|
+
category?: string;
|
|
193
|
+
variant?: string;
|
|
194
|
+
customAttributes?: CustomAttributes;
|
|
195
|
+
constructor(name: string, sku: string, price: number, quantity?: number);
|
|
196
|
+
setBrand(brand: string): this;
|
|
197
|
+
setCouponCode(couponCode: string): this;
|
|
198
|
+
setPosition(position: number): this;
|
|
199
|
+
setCategory(category: string): this;
|
|
200
|
+
setVariant(variant: string): this;
|
|
201
|
+
setCustomAttributes(customAttributes: CustomAttributes): this;
|
|
202
|
+
}
|
|
203
|
+
export declare class GDPRConsent {
|
|
204
|
+
consented?: boolean;
|
|
205
|
+
document?: string;
|
|
206
|
+
timestamp?: number;
|
|
207
|
+
location?: string;
|
|
208
|
+
hardwareId?: string;
|
|
209
|
+
constructor(consented?: boolean, doc?: string, timestamp?: number, location?: string, hardwareId?: string);
|
|
210
|
+
setConsented(consented: boolean): this;
|
|
211
|
+
setDocument(doc: string): this;
|
|
212
|
+
setTimestamp(timestamp: number): this;
|
|
213
|
+
setLocation(location: string): this;
|
|
214
|
+
setHardwareId(hardwareId: string): this;
|
|
215
|
+
}
|
|
216
|
+
export declare class CCPAConsent {
|
|
217
|
+
consented?: boolean;
|
|
218
|
+
document?: string;
|
|
219
|
+
timestamp?: number;
|
|
220
|
+
location?: string;
|
|
221
|
+
hardwareId?: string;
|
|
222
|
+
constructor(consented?: boolean, doc?: string, timestamp?: number, location?: string, hardwareId?: string);
|
|
223
|
+
setConsented(consented: boolean): this;
|
|
224
|
+
setDocument(doc: string): this;
|
|
225
|
+
setTimestamp(timestamp: number): this;
|
|
226
|
+
setLocation(location: string): this;
|
|
227
|
+
setHardwareId(hardwareId: string): this;
|
|
228
|
+
}
|
|
229
|
+
export declare class CommerceEvent {
|
|
230
|
+
productActionType?: number;
|
|
231
|
+
promotionActionType?: number;
|
|
232
|
+
products?: Product[];
|
|
233
|
+
transactionAttributes?: TransactionAttributes;
|
|
234
|
+
promotions?: Promotion[];
|
|
235
|
+
impressions?: Impression[];
|
|
236
|
+
screenName?: string;
|
|
237
|
+
currency?: string;
|
|
238
|
+
customAttributes?: CustomAttributes;
|
|
239
|
+
checkoutOptions?: string;
|
|
240
|
+
productActionListName?: string;
|
|
241
|
+
productActionListSource?: string;
|
|
242
|
+
checkoutStep?: number;
|
|
243
|
+
nonInteractive?: boolean;
|
|
244
|
+
shouldUploadEvent?: boolean;
|
|
245
|
+
static createProductActionEvent(productActionType: number, products: Product[], transactionAttributes?: TransactionAttributes): CommerceEvent;
|
|
246
|
+
static createPromotionEvent(promotionActionType: number, promotions: Promotion[]): CommerceEvent;
|
|
247
|
+
static createImpressionEvent(impressions: Impression[]): CommerceEvent;
|
|
248
|
+
setTransactionAttributes(transactionAttributes: TransactionAttributes): this;
|
|
249
|
+
setProductActionType(productActionType: number): this;
|
|
250
|
+
setPromotionActionType(promotionActionType: number): this;
|
|
251
|
+
setProducts(products: Product[]): this;
|
|
252
|
+
setPromotions(promotions: Promotion[]): this;
|
|
253
|
+
setImpressions(impressions: Impression[]): this;
|
|
254
|
+
setScreenName(screenName: string): this;
|
|
255
|
+
setCurrency(currency: string): this;
|
|
256
|
+
setCustomAttributes(customAttributes: CustomAttributes): this;
|
|
257
|
+
setCheckoutOptions(checkoutOptions: string): this;
|
|
258
|
+
setProductActionListName(productActionListName: string): this;
|
|
259
|
+
setProductActionListSource(productActionListSource: string): this;
|
|
260
|
+
setCheckoutStep(checkoutStep: number): this;
|
|
261
|
+
setNonInteractive(nonInteractive: boolean): this;
|
|
262
|
+
setShouldUploadEvent(shouldUploadEvent: boolean): this;
|
|
263
|
+
}
|
|
264
|
+
export declare class Event {
|
|
265
|
+
category?: string;
|
|
266
|
+
duration?: number;
|
|
267
|
+
endTime?: number;
|
|
268
|
+
info?: CustomAttributes;
|
|
269
|
+
name?: string;
|
|
270
|
+
startTime?: number;
|
|
271
|
+
type?: number;
|
|
272
|
+
shouldUploadEvent?: boolean;
|
|
273
|
+
customFlags?: {
|
|
274
|
+
[key: string]: string;
|
|
275
|
+
};
|
|
276
|
+
setCategory(category: string): this;
|
|
277
|
+
setDuration(duration: number): this;
|
|
278
|
+
setEndTime(endTime: number): this;
|
|
279
|
+
setInfo(info: CustomAttributes): this;
|
|
280
|
+
setName(name: string): this;
|
|
281
|
+
setStartTime(startTime: number): this;
|
|
282
|
+
setType(type: number): this;
|
|
283
|
+
setShouldUploadEvent(shouldUploadEvent: boolean): this;
|
|
284
|
+
setCustomFlags(customFlags: {
|
|
285
|
+
[key: string]: string;
|
|
286
|
+
}): this;
|
|
287
|
+
}
|
|
288
|
+
export declare class MParticleError {
|
|
289
|
+
readonly message: string;
|
|
290
|
+
readonly code: number;
|
|
291
|
+
readonly httpCode: number;
|
|
292
|
+
readonly responseCode?: number;
|
|
293
|
+
readonly mpid?: string;
|
|
294
|
+
readonly errors?: string;
|
|
295
|
+
constructor(errorResponse: CallbackError | MParticleErrorResponse);
|
|
296
|
+
}
|
|
297
|
+
export type { IRoktConfig, ColorMode, RoktLayoutViewProps };
|
|
298
|
+
export { Rokt, CacheConfig, RoktLayoutView };
|
|
299
|
+
declare const MParticle: {
|
|
300
|
+
EventType: {
|
|
301
|
+
readonly Navigation: 1;
|
|
302
|
+
readonly Location: 2;
|
|
303
|
+
readonly Search: 3;
|
|
304
|
+
readonly Transaction: 4;
|
|
305
|
+
readonly UserContent: 5;
|
|
306
|
+
readonly UserPreference: 6;
|
|
307
|
+
readonly Social: 7;
|
|
308
|
+
readonly Other: 8;
|
|
309
|
+
readonly Media: 9;
|
|
310
|
+
};
|
|
311
|
+
UserIdentityType: {
|
|
312
|
+
readonly Other: 0;
|
|
313
|
+
readonly CustomerId: 1;
|
|
314
|
+
readonly Facebook: 2;
|
|
315
|
+
readonly Twitter: 3;
|
|
316
|
+
readonly Google: 4;
|
|
317
|
+
readonly Microsoft: 5;
|
|
318
|
+
readonly Yahoo: 6;
|
|
319
|
+
readonly Email: 7;
|
|
320
|
+
readonly Alias: 8;
|
|
321
|
+
readonly FacebookCustomAudienceId: 9;
|
|
322
|
+
readonly Other2: 10;
|
|
323
|
+
readonly Other3: 11;
|
|
324
|
+
readonly Other4: 12;
|
|
325
|
+
readonly Other5: 13;
|
|
326
|
+
readonly Other6: 14;
|
|
327
|
+
readonly Other7: 15;
|
|
328
|
+
readonly Other8: 16;
|
|
329
|
+
readonly Other9: 17;
|
|
330
|
+
readonly Other10: 18;
|
|
331
|
+
readonly MobileNumber: 19;
|
|
332
|
+
readonly PhoneNumber2: 20;
|
|
333
|
+
readonly PhoneNumber3: 21;
|
|
334
|
+
readonly IOSAdvertiserId: 22;
|
|
335
|
+
readonly IOSVendorId: 23;
|
|
336
|
+
readonly PushToken: 24;
|
|
337
|
+
readonly DeviceApplicationStamp: 25;
|
|
338
|
+
};
|
|
339
|
+
UserAttributeType: {
|
|
340
|
+
readonly FirstName: "$FirstName";
|
|
341
|
+
readonly LastName: "$LastName";
|
|
342
|
+
readonly Address: "$Address";
|
|
343
|
+
readonly State: "$State";
|
|
344
|
+
readonly City: "$City";
|
|
345
|
+
readonly Zipcode: "$Zip";
|
|
346
|
+
readonly Country: "$Country";
|
|
347
|
+
readonly Age: "$Age";
|
|
348
|
+
readonly Gender: "$Gender";
|
|
349
|
+
readonly MobileNumber: "$Mobile";
|
|
350
|
+
};
|
|
351
|
+
ProductActionType: {
|
|
352
|
+
readonly AddToCart: 1;
|
|
353
|
+
readonly RemoveFromCart: 2;
|
|
354
|
+
readonly Checkout: 3;
|
|
355
|
+
readonly CheckoutOption: 4;
|
|
356
|
+
readonly Click: 5;
|
|
357
|
+
readonly ViewDetail: 6;
|
|
358
|
+
readonly Purchase: 7;
|
|
359
|
+
readonly Refund: 8;
|
|
360
|
+
readonly AddToWishlist: 9;
|
|
361
|
+
readonly RemoveFromWishlist: 10;
|
|
362
|
+
};
|
|
363
|
+
PromotionActionType: {
|
|
364
|
+
readonly View: 0;
|
|
365
|
+
readonly Click: 1;
|
|
366
|
+
};
|
|
367
|
+
ATTAuthStatus: {
|
|
368
|
+
readonly NotDetermined: 0;
|
|
369
|
+
readonly Restricted: 1;
|
|
370
|
+
readonly Denied: 2;
|
|
371
|
+
readonly Authorized: 3;
|
|
372
|
+
};
|
|
373
|
+
Product: typeof Product;
|
|
374
|
+
Impression: typeof Impression;
|
|
375
|
+
Promotion: typeof Promotion;
|
|
376
|
+
CommerceEvent: typeof CommerceEvent;
|
|
377
|
+
TransactionAttributes: typeof TransactionAttributes;
|
|
378
|
+
IdentityRequest: typeof IdentityRequest;
|
|
379
|
+
AliasRequest: typeof AliasRequest;
|
|
380
|
+
Identity: typeof Identity;
|
|
381
|
+
User: typeof User;
|
|
382
|
+
Event: typeof Event;
|
|
383
|
+
MParticleError: typeof MParticleError;
|
|
384
|
+
GDPRConsent: typeof GDPRConsent;
|
|
385
|
+
CCPAConsent: typeof CCPAConsent;
|
|
386
|
+
Rokt: typeof Rokt;
|
|
387
|
+
CacheConfig: typeof CacheConfig;
|
|
388
|
+
RoktEventManager: any;
|
|
389
|
+
RoktLayoutView: typeof import("./rokt/rokt-layout-view.ios").RoktLayoutView | typeof import("./rokt/rokt-layout-view.android").RoktLayoutView;
|
|
390
|
+
upload: () => void;
|
|
391
|
+
setUploadInterval: (uploadInterval: number) => void;
|
|
392
|
+
logEvent: (eventName: string, type?: number, attributes?: CustomAttributes | null) => void;
|
|
393
|
+
logMPEvent: (event: Event) => void;
|
|
394
|
+
logCommerceEvent: (commerceEvent: CommerceEvent) => void;
|
|
395
|
+
logScreenEvent: (screenName: string, attributes?: CustomAttributes | null, shouldUploadEvent?: boolean) => void;
|
|
396
|
+
setATTStatus: (status: number) => void;
|
|
397
|
+
setATTStatusWithCustomTimestamp: (status: number, timestamp: number) => void;
|
|
398
|
+
setOptOut: (optOut: boolean) => void;
|
|
399
|
+
getOptOut: (completion: CompletionCallback<boolean>) => void;
|
|
400
|
+
addGDPRConsentState: (newConsentState: GDPRConsent, purpose: string) => void;
|
|
401
|
+
removeGDPRConsentStateWithPurpose: (purpose: string) => void;
|
|
402
|
+
setCCPAConsentState: (newConsentState: CCPAConsent) => void;
|
|
403
|
+
removeCCPAConsentState: () => void;
|
|
404
|
+
isKitActive: (kitId: number, completion: CompletionCallback<boolean>) => void;
|
|
405
|
+
getAttributions: (completion: CompletionCallback<AttributionResult>) => void;
|
|
406
|
+
logPushRegistration: (registrationField1: string, registrationField2: string) => void;
|
|
407
|
+
getSession: (completion: CompletionCallback<string | null>) => void;
|
|
408
|
+
setLocation: (latitude: number, longitude: number) => void;
|
|
409
|
+
};
|
|
410
|
+
export default MParticle;
|