affise-attribution-lib 1.6.33 → 1.6.35
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/README.md +83 -12
- package/affise-attribution-native.podspec +1 -1
- package/android/build.gradle +1 -1
- package/lib/commonjs/AffiseInitProperties.js +4 -1
- package/lib/commonjs/AffiseInitProperties.js.map +1 -1
- package/lib/commonjs/Export.js +15 -4
- package/lib/commonjs/Export.js.map +1 -1
- package/lib/commonjs/debug/AffiseDebug.js +49 -0
- package/lib/commonjs/debug/AffiseDebug.js.map +1 -0
- package/lib/commonjs/debug/AffiseDebugApi.js +6 -0
- package/lib/commonjs/debug/AffiseDebugApi.js.map +1 -0
- package/lib/commonjs/debug/internal.js +28 -0
- package/lib/commonjs/debug/internal.js.map +1 -0
- package/lib/commonjs/index.js +14 -138
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/module/AffiseModules.js +2 -0
- package/lib/commonjs/module/AffiseModules.js.map +1 -1
- package/lib/commonjs/module/appsflyer/AffiseAppsFlyer.js +26 -0
- package/lib/commonjs/module/appsflyer/AffiseAppsFlyer.js.map +1 -0
- package/lib/commonjs/module/appsflyer/AffiseModuleAppsFlyerApi.js +2 -0
- package/lib/commonjs/module/appsflyer/AffiseModuleAppsFlyerApi.js.map +1 -0
- package/lib/commonjs/module/attribution/AffiseAndroid.js +30 -0
- package/lib/commonjs/module/attribution/AffiseAndroid.js.map +1 -0
- package/lib/commonjs/module/attribution/AffiseAndroidApi.js +2 -0
- package/lib/commonjs/module/attribution/AffiseAndroidApi.js.map +1 -0
- package/lib/commonjs/module/attribution/AffiseIos.js +50 -0
- package/lib/commonjs/module/attribution/AffiseIos.js.map +1 -0
- package/lib/commonjs/module/attribution/AffiseIosApi.js +6 -0
- package/lib/commonjs/module/attribution/AffiseIosApi.js.map +1 -0
- package/lib/commonjs/module/attribution/AffiseModule.js +81 -0
- package/lib/commonjs/module/attribution/AffiseModule.js.map +1 -0
- package/lib/commonjs/module/attribution/AffiseModuleApi.js +6 -0
- package/lib/commonjs/module/attribution/AffiseModuleApi.js.map +1 -0
- package/lib/commonjs/module/internal.js +72 -0
- package/lib/commonjs/module/internal.js.map +1 -0
- package/lib/commonjs/module/link/AffiseLink.js +26 -0
- package/lib/commonjs/module/link/AffiseLink.js.map +1 -0
- package/lib/commonjs/module/link/AffiseModuleLinkApi.js +6 -0
- package/lib/commonjs/module/link/AffiseModuleLinkApi.js.map +1 -0
- package/lib/commonjs/module/subscription/AffiseModuleSubscriptionApi.js +6 -0
- package/lib/commonjs/module/subscription/AffiseModuleSubscriptionApi.js.map +1 -0
- package/lib/commonjs/module/subscription/AffiseSubscription.js +36 -0
- package/lib/commonjs/module/subscription/AffiseSubscription.js.map +1 -0
- package/lib/commonjs/native/AffiseApiMethod.js +1 -0
- package/lib/commonjs/native/AffiseApiMethod.js.map +1 -1
- package/lib/commonjs/native/AffiseNative.js +9 -0
- package/lib/commonjs/native/AffiseNative.js.map +1 -1
- package/lib/commonjs/native/data/DataName.js +2 -0
- package/lib/commonjs/native/data/DataName.js.map +1 -1
- package/lib/commonjs/parameters/ProviderType.js +1 -0
- package/lib/commonjs/parameters/ProviderType.js.map +1 -1
- package/lib/commonjs/settings/AffiseConfig.js +12 -0
- package/lib/commonjs/settings/AffiseConfig.js.map +1 -0
- package/lib/commonjs/settings/AffiseSettings.js +27 -5
- package/lib/commonjs/settings/AffiseSettings.js.map +1 -1
- package/lib/commonjs/settings/AffiseSettingsApi.js +6 -0
- package/lib/commonjs/settings/AffiseSettingsApi.js.map +1 -0
- package/lib/module/AffiseInitProperties.js +4 -1
- package/lib/module/AffiseInitProperties.js.map +1 -1
- package/lib/module/Export.js +2 -1
- package/lib/module/Export.js.map +1 -1
- package/lib/module/debug/AffiseDebug.js +42 -0
- package/lib/module/debug/AffiseDebug.js.map +1 -0
- package/lib/module/debug/AffiseDebugApi.js +2 -0
- package/lib/module/debug/AffiseDebugApi.js.map +1 -0
- package/lib/module/debug/internal.js +3 -0
- package/lib/module/debug/internal.js.map +1 -0
- package/lib/module/index.js +14 -139
- package/lib/module/index.js.map +1 -1
- package/lib/module/module/AffiseModules.js +2 -0
- package/lib/module/module/AffiseModules.js.map +1 -1
- package/lib/module/module/appsflyer/AffiseAppsFlyer.js +19 -0
- package/lib/module/module/appsflyer/AffiseAppsFlyer.js.map +1 -0
- package/lib/module/module/appsflyer/AffiseModuleAppsFlyerApi.js +2 -0
- package/lib/module/module/appsflyer/AffiseModuleAppsFlyerApi.js.map +1 -0
- package/lib/module/module/attribution/AffiseAndroid.js +23 -0
- package/lib/module/module/attribution/AffiseAndroid.js.map +1 -0
- package/lib/module/module/attribution/AffiseAndroidApi.js +2 -0
- package/lib/module/module/attribution/AffiseAndroidApi.js.map +1 -0
- package/lib/module/module/attribution/AffiseIos.js +43 -0
- package/lib/module/module/attribution/AffiseIos.js.map +1 -0
- package/lib/module/module/attribution/AffiseIosApi.js +2 -0
- package/lib/module/module/attribution/AffiseIosApi.js.map +1 -0
- package/lib/module/module/attribution/AffiseModule.js +74 -0
- package/lib/module/module/attribution/AffiseModule.js.map +1 -0
- package/lib/module/module/attribution/AffiseModuleApi.js +2 -0
- package/lib/module/module/attribution/AffiseModuleApi.js.map +1 -0
- package/lib/module/module/internal.js +7 -0
- package/lib/module/module/internal.js.map +1 -0
- package/lib/module/module/link/AffiseLink.js +19 -0
- package/lib/module/module/link/AffiseLink.js.map +1 -0
- package/lib/module/module/link/AffiseModuleLinkApi.js +2 -0
- package/lib/module/module/link/AffiseModuleLinkApi.js.map +1 -0
- package/lib/module/module/subscription/AffiseModuleSubscriptionApi.js +2 -0
- package/lib/module/module/subscription/AffiseModuleSubscriptionApi.js.map +1 -0
- package/lib/module/module/subscription/AffiseSubscription.js +29 -0
- package/lib/module/module/subscription/AffiseSubscription.js.map +1 -0
- package/lib/module/native/AffiseApiMethod.js +1 -0
- package/lib/module/native/AffiseApiMethod.js.map +1 -1
- package/lib/module/native/AffiseNative.js +9 -0
- package/lib/module/native/AffiseNative.js.map +1 -1
- package/lib/module/native/data/DataName.js +2 -0
- package/lib/module/native/data/DataName.js.map +1 -1
- package/lib/module/parameters/ProviderType.js +1 -0
- package/lib/module/parameters/ProviderType.js.map +1 -1
- package/lib/module/settings/AffiseConfig.js +5 -0
- package/lib/module/settings/AffiseConfig.js.map +1 -0
- package/lib/module/settings/AffiseSettings.js +29 -6
- package/lib/module/settings/AffiseSettings.js.map +1 -1
- package/lib/module/settings/AffiseSettingsApi.js +2 -0
- package/lib/module/settings/AffiseSettingsApi.js.map +1 -0
- package/lib/typescript/AffiseInitProperties.d.ts +4 -1
- package/lib/typescript/AffiseInitProperties.d.ts.map +1 -1
- package/lib/typescript/Export.d.ts +2 -1
- package/lib/typescript/Export.d.ts.map +1 -1
- package/lib/typescript/debug/AffiseDebug.d.ts +29 -0
- package/lib/typescript/debug/AffiseDebug.d.ts.map +1 -0
- package/lib/typescript/debug/AffiseDebugApi.d.ts +25 -0
- package/lib/typescript/debug/AffiseDebugApi.d.ts.map +1 -0
- package/lib/typescript/debug/internal.d.ts +3 -0
- package/lib/typescript/debug/internal.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +10 -93
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/module/AffiseModules.d.ts +2 -0
- package/lib/typescript/module/AffiseModules.d.ts.map +1 -1
- package/lib/typescript/module/appsflyer/AffiseAppsFlyer.d.ts +13 -0
- package/lib/typescript/module/appsflyer/AffiseAppsFlyer.d.ts.map +1 -0
- package/lib/typescript/module/appsflyer/AffiseModuleAppsFlyerApi.d.ts +9 -0
- package/lib/typescript/module/appsflyer/AffiseModuleAppsFlyerApi.d.ts.map +1 -0
- package/lib/typescript/module/attribution/AffiseAndroid.d.ts +12 -0
- package/lib/typescript/module/attribution/AffiseAndroid.d.ts.map +1 -0
- package/lib/typescript/module/attribution/AffiseAndroidApi.d.ts +8 -0
- package/lib/typescript/module/attribution/AffiseAndroidApi.d.ts.map +1 -0
- package/lib/typescript/module/attribution/AffiseIos.d.ts +29 -0
- package/lib/typescript/module/attribution/AffiseIos.d.ts.map +1 -0
- package/lib/typescript/module/attribution/AffiseIosApi.d.ts +25 -0
- package/lib/typescript/module/attribution/AffiseIosApi.d.ts.map +1 -0
- package/lib/typescript/module/attribution/AffiseModule.d.ts +58 -0
- package/lib/typescript/module/attribution/AffiseModule.d.ts.map +1 -0
- package/lib/typescript/module/attribution/AffiseModuleApi.d.ts +54 -0
- package/lib/typescript/module/attribution/AffiseModuleApi.d.ts.map +1 -0
- package/lib/typescript/module/internal.d.ts +7 -0
- package/lib/typescript/module/internal.d.ts.map +1 -0
- package/lib/typescript/module/link/AffiseLink.d.ts +14 -0
- package/lib/typescript/module/link/AffiseLink.d.ts.map +1 -0
- package/lib/typescript/module/link/AffiseModuleLinkApi.d.ts +10 -0
- package/lib/typescript/module/link/AffiseModuleLinkApi.d.ts.map +1 -0
- package/lib/typescript/module/subscription/AffiseModuleSubscriptionApi.d.ts +21 -0
- package/lib/typescript/module/subscription/AffiseModuleSubscriptionApi.d.ts.map +1 -0
- package/lib/typescript/module/subscription/AffiseSubscription.d.ts +25 -0
- package/lib/typescript/module/subscription/AffiseSubscription.d.ts.map +1 -0
- package/lib/typescript/native/AffiseApiMethod.d.ts +1 -0
- package/lib/typescript/native/AffiseApiMethod.d.ts.map +1 -1
- package/lib/typescript/native/AffiseNative.d.ts +1 -0
- package/lib/typescript/native/AffiseNative.d.ts.map +1 -1
- package/lib/typescript/native/data/DataName.d.ts +2 -0
- package/lib/typescript/native/data/DataName.d.ts.map +1 -1
- package/lib/typescript/parameters/ProviderType.d.ts +1 -0
- package/lib/typescript/parameters/ProviderType.d.ts.map +1 -1
- package/lib/typescript/settings/AffiseConfig.d.ts +4 -0
- package/lib/typescript/settings/AffiseConfig.d.ts.map +1 -0
- package/lib/typescript/settings/AffiseSettings.d.ts +22 -9
- package/lib/typescript/settings/AffiseSettings.d.ts.map +1 -1
- package/lib/typescript/settings/AffiseSettingsApi.d.ts +67 -0
- package/lib/typescript/settings/AffiseSettingsApi.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/AffiseInitProperties.ts +6 -1
- package/src/Export.ts +4 -3
- package/src/debug/AffiseDebug.ts +45 -0
- package/src/debug/AffiseDebugApi.ts +29 -0
- package/src/debug/internal.ts +2 -0
- package/src/index.ts +29 -152
- package/src/module/AffiseModules.ts +2 -0
- package/src/module/appsflyer/AffiseAppsFlyer.ts +19 -0
- package/src/module/appsflyer/AffiseModuleAppsFlyerApi.ts +8 -0
- package/src/module/attribution/AffiseAndroid.ts +25 -0
- package/src/module/attribution/AffiseAndroidApi.ts +8 -0
- package/src/module/attribution/AffiseIos.ts +48 -0
- package/src/module/attribution/AffiseIosApi.ts +28 -0
- package/src/module/attribution/AffiseModule.ts +86 -0
- package/src/module/attribution/AffiseModuleApi.ts +61 -0
- package/src/module/internal.ts +8 -0
- package/src/module/link/AffiseLink.ts +20 -0
- package/src/module/link/AffiseModuleLinkApi.ts +10 -0
- package/src/module/subscription/AffiseModuleSubscriptionApi.ts +22 -0
- package/src/module/subscription/AffiseSubscription.ts +34 -0
- package/src/native/AffiseApiMethod.ts +2 -0
- package/src/native/AffiseNative.ts +9 -0
- package/src/native/data/DataName.ts +3 -0
- package/src/parameters/ProviderType.ts +3 -0
- package/src/settings/AffiseConfig.ts +3 -0
- package/src/settings/AffiseSettings.ts +36 -13
- package/src/settings/AffiseSettingsApi.ts +84 -0
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import type { AffiseNative } from "../native/AffiseNative";
|
|
2
|
+
import { AffiseConfig } from "../index";
|
|
1
3
|
import type { OnInitErrorHandler } from "./OnInitErrorHandler";
|
|
2
4
|
import type { OnInitSuccessHandler } from "./OnInitSuccessHandler";
|
|
3
|
-
|
|
5
|
+
import type { AffiseSettingsApi } from "./AffiseSettingsApi";
|
|
6
|
+
export declare class AffiseSettings implements AffiseSettingsApi {
|
|
7
|
+
private native;
|
|
4
8
|
private readonly affiseAppId;
|
|
5
9
|
private readonly secretKey;
|
|
6
10
|
private isProduction;
|
|
@@ -10,44 +14,45 @@ export declare class AffiseSettings {
|
|
|
10
14
|
private domain?;
|
|
11
15
|
private onInitSuccessHandler?;
|
|
12
16
|
private onInitErrorHandler?;
|
|
17
|
+
private configValues;
|
|
13
18
|
/**
|
|
14
19
|
* Affise SDK settings
|
|
15
20
|
*
|
|
16
21
|
* @param affiseAppId - your app id
|
|
17
22
|
* @param secretKey - your SDK secretKey
|
|
18
23
|
*/
|
|
19
|
-
constructor(affiseAppId: string, secretKey: string);
|
|
24
|
+
constructor(native: AffiseNative, affiseAppId: string, secretKey: string);
|
|
20
25
|
/**
|
|
21
26
|
* Set Affise SDK for SandBox / Production
|
|
22
27
|
*
|
|
23
28
|
* @param production
|
|
24
29
|
*/
|
|
25
|
-
setProduction(production: boolean):
|
|
30
|
+
setProduction(production: boolean): AffiseSettingsApi;
|
|
26
31
|
/**
|
|
27
32
|
* Set Affise SDK server domain
|
|
28
33
|
* Trailing slash is irrelevant
|
|
29
34
|
*
|
|
30
35
|
* @param domain - server domain
|
|
31
36
|
*/
|
|
32
|
-
setDomain(domain: string):
|
|
37
|
+
setDomain(domain: string): AffiseSettingsApi;
|
|
33
38
|
/**
|
|
34
39
|
* Only for specific use case
|
|
35
40
|
*
|
|
36
41
|
* @param partParamName
|
|
37
42
|
*/
|
|
38
|
-
setPartParamName(partParamName: string):
|
|
43
|
+
setPartParamName(partParamName: string): AffiseSettingsApi;
|
|
39
44
|
/**
|
|
40
45
|
* Only for specific use case
|
|
41
46
|
*
|
|
42
47
|
* @param partParamNameToken
|
|
43
48
|
*/
|
|
44
|
-
setPartParamNameToken(partParamNameToken: string):
|
|
49
|
+
setPartParamNameToken(partParamNameToken: string): AffiseSettingsApi;
|
|
45
50
|
/**
|
|
46
51
|
* Set appToken
|
|
47
52
|
*
|
|
48
53
|
* @param appToken
|
|
49
54
|
*/
|
|
50
|
-
setAppToken(appToken: string):
|
|
55
|
+
setAppToken(appToken: string): AffiseSettingsApi;
|
|
51
56
|
/**
|
|
52
57
|
* Set list of AutoCatchingType
|
|
53
58
|
*
|
|
@@ -61,11 +66,19 @@ export declare class AffiseSettings {
|
|
|
61
66
|
/**
|
|
62
67
|
* Set OnInitSuccessHandler
|
|
63
68
|
*/
|
|
64
|
-
setOnInitSuccess(onInitSuccessHandler: OnInitSuccessHandler):
|
|
69
|
+
setOnInitSuccess(onInitSuccessHandler: OnInitSuccessHandler): AffiseSettingsApi;
|
|
65
70
|
/**
|
|
66
71
|
* Set OnInitErrorHandler
|
|
67
72
|
*/
|
|
68
|
-
setOnInitError(onInitErrorHandler: OnInitErrorHandler):
|
|
73
|
+
setOnInitError(onInitErrorHandler: OnInitErrorHandler): AffiseSettingsApi;
|
|
74
|
+
/**
|
|
75
|
+
* Set configValue
|
|
76
|
+
*/
|
|
77
|
+
setConfigValue(key: AffiseConfig, value: any): AffiseSettingsApi;
|
|
78
|
+
/**
|
|
79
|
+
* Set configValue
|
|
80
|
+
*/
|
|
81
|
+
setConfigValues(values: Record<AffiseConfig, any>): AffiseSettingsApi;
|
|
69
82
|
private getInitProperties;
|
|
70
83
|
/**
|
|
71
84
|
* Starts Affise SDK
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AffiseSettings.d.ts","sourceRoot":"","sources":["../../../src/settings/AffiseSettings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AffiseSettings.d.ts","sourceRoot":"","sources":["../../../src/settings/AffiseSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAEH,YAAY,EAEf,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,qBAAa,cAAe,YAAW,iBAAiB;IACpD,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,aAAa,CAAC,CAAuB;IAC7C,OAAO,CAAC,kBAAkB,CAAC,CAAuB;IAClD,OAAO,CAAC,QAAQ,CAAC,CAAuB;IAGxC,OAAO,CAAC,MAAM,CAAC,CAAuB;IACtC,OAAO,CAAC,oBAAoB,CAAC,CAAqC;IAClE,OAAO,CAAC,kBAAkB,CAAC,CAAmC;IAC9D,OAAO,CAAC,YAAY,CAA2B;IAE/C;;;;;OAKG;gBACS,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;IAMxE;;;;OAIG;IACH,aAAa,CAAC,UAAU,EAAE,OAAO,GAAG,iBAAiB;IAKrD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB;IAK5C;;;;OAIG;IACH,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,iBAAiB;IAK1D;;;;OAIG;IACH,qBAAqB,CAAC,kBAAkB,EAAE,MAAM,GAAG,iBAAiB;IAKpE;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB;IAKhD;;;;OAIG;IAMH;;;;OAIG;IAMH;;OAEG;IACH,gBAAgB,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,iBAAiB;IAK/E;;OAEG;IACH,cAAc,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,iBAAiB;IAIzE;;OAEG;IACH,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,GAAG,iBAAiB;IAKhE;;OAEG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,GAAG,iBAAiB;IAOrE,OAAO,CAAC,iBAAiB;IAiBzB;;OAEG;IACH,KAAK;CAGR"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { AffiseConfig } from "../index";
|
|
2
|
+
import type { OnInitErrorHandler } from "./OnInitErrorHandler";
|
|
3
|
+
import type { OnInitSuccessHandler } from "./OnInitSuccessHandler";
|
|
4
|
+
export interface AffiseSettingsApi {
|
|
5
|
+
/**
|
|
6
|
+
* Set Affise SDK for SandBox / Production
|
|
7
|
+
*
|
|
8
|
+
* @param production
|
|
9
|
+
*/
|
|
10
|
+
setProduction(production: boolean): AffiseSettingsApi;
|
|
11
|
+
/**
|
|
12
|
+
* Set Affise SDK server domain
|
|
13
|
+
* Trailing slash is irrelevant
|
|
14
|
+
*
|
|
15
|
+
* @param domain - server domain
|
|
16
|
+
*/
|
|
17
|
+
setDomain(domain: string): AffiseSettingsApi;
|
|
18
|
+
/**
|
|
19
|
+
* Only for specific use case
|
|
20
|
+
*
|
|
21
|
+
* @param partParamName
|
|
22
|
+
*/
|
|
23
|
+
setPartParamName(partParamName: string): AffiseSettingsApi;
|
|
24
|
+
/**
|
|
25
|
+
* Only for specific use case
|
|
26
|
+
*
|
|
27
|
+
* @param partParamNameToken
|
|
28
|
+
*/
|
|
29
|
+
setPartParamNameToken(partParamNameToken: string): AffiseSettingsApi;
|
|
30
|
+
/**
|
|
31
|
+
* Set appToken
|
|
32
|
+
*
|
|
33
|
+
* @param appToken
|
|
34
|
+
*/
|
|
35
|
+
setAppToken(appToken: string): AffiseSettingsApi;
|
|
36
|
+
/**
|
|
37
|
+
* Set list of AutoCatchingType
|
|
38
|
+
*
|
|
39
|
+
* @param autoCatchingClickEvents
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Set Metrics enable
|
|
43
|
+
*
|
|
44
|
+
* @param enable
|
|
45
|
+
*/
|
|
46
|
+
/**
|
|
47
|
+
* Set OnInitSuccessHandler
|
|
48
|
+
*/
|
|
49
|
+
setOnInitSuccess(onInitSuccessHandler: OnInitSuccessHandler): AffiseSettingsApi;
|
|
50
|
+
/**
|
|
51
|
+
* Set OnInitErrorHandler
|
|
52
|
+
*/
|
|
53
|
+
setOnInitError(onInitErrorHandler: OnInitErrorHandler): AffiseSettingsApi;
|
|
54
|
+
/**
|
|
55
|
+
* Set configValue
|
|
56
|
+
*/
|
|
57
|
+
setConfigValue(key: AffiseConfig, value: any): AffiseSettingsApi;
|
|
58
|
+
/**
|
|
59
|
+
* Set configValue
|
|
60
|
+
*/
|
|
61
|
+
setConfigValues(values: Record<AffiseConfig, any>): AffiseSettingsApi;
|
|
62
|
+
/**
|
|
63
|
+
* Starts Affise SDK
|
|
64
|
+
*/
|
|
65
|
+
start(): void;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=AffiseSettingsApi.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AffiseSettingsApi.d.ts","sourceRoot":"","sources":["../../../src/settings/AffiseSettingsApi.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,YAAY,EAEf,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE,MAAM,WAAW,iBAAiB;IAE9B;;;;OAIG;IACH,aAAa,CAAC,UAAU,EAAE,OAAO,GAAG,iBAAiB,CAAA;IAErD;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB,CAAA;IAE5C;;;;OAIG;IACH,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,iBAAiB,CAAA;IAE1D;;;;OAIG;IACH,qBAAqB,CAAC,kBAAkB,EAAE,MAAM,GAAG,iBAAiB,CAAA;IAEpE;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAAA;IAEhD;;;;OAIG;IAGH;;;;OAIG;IAGH;;OAEG;IACH,gBAAgB,CAAC,oBAAoB,EAAE,oBAAoB,GAAG,iBAAiB,CAAA;IAE/E;;OAEG;IACH,cAAc,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,iBAAiB,CAAA;IACzE;;OAEG;IACH,cAAc,CAAC,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,GAAG,iBAAiB,CAAA;IAEhE;;OAEG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,GAAG,CAAC,GAAG,iBAAiB,CAAA;IAErE;;OAEG;IACH,KAAK,IAAI,IAAI,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {AutoCatchingType} from "./events/AutoCatchingType";
|
|
2
|
+
import type { AffiseConfig } from "./settings/AffiseConfig";
|
|
2
3
|
import type { OnInitErrorHandler } from "./settings/OnInitErrorHandler";
|
|
3
4
|
import type { OnInitSuccessHandler } from "./settings/OnInitSuccessHandler";
|
|
4
5
|
|
|
@@ -23,6 +24,7 @@ export type AffiseInitPropertiesType = {
|
|
|
23
24
|
domain?: string | null,
|
|
24
25
|
onInitSuccessHandler?: OnInitSuccessHandler | null,
|
|
25
26
|
onInitErrorHandler?: OnInitErrorHandler | null,
|
|
27
|
+
configStrings: Record<AffiseConfig[keyof AffiseConfig & number], any> | null,
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
export class AffiseInitProperties {
|
|
@@ -37,6 +39,7 @@ export class AffiseInitProperties {
|
|
|
37
39
|
domain?: string | null = null;
|
|
38
40
|
onInitSuccessHandler?: OnInitSuccessHandler | null = null;
|
|
39
41
|
onInitErrorHandler?: OnInitErrorHandler | null = null;
|
|
42
|
+
configStrings: Record<string, any> = {};
|
|
40
43
|
|
|
41
44
|
constructor(
|
|
42
45
|
{
|
|
@@ -50,7 +53,8 @@ export class AffiseInitProperties {
|
|
|
50
53
|
// autoCatchingClickEvents,
|
|
51
54
|
domain,
|
|
52
55
|
onInitSuccessHandler,
|
|
53
|
-
onInitErrorHandler
|
|
56
|
+
onInitErrorHandler,
|
|
57
|
+
configStrings: configValues
|
|
54
58
|
}: AffiseInitPropertiesType
|
|
55
59
|
) {
|
|
56
60
|
this.affiseAppId = affiseAppId;
|
|
@@ -63,6 +67,7 @@ export class AffiseInitProperties {
|
|
|
63
67
|
this.domain = domain || null;
|
|
64
68
|
this.onInitSuccessHandler = onInitSuccessHandler || null;
|
|
65
69
|
this.onInitErrorHandler = onInitErrorHandler || null;
|
|
70
|
+
this.configStrings = configValues || {};
|
|
66
71
|
|
|
67
72
|
if (isProduction != null) {
|
|
68
73
|
this.isProduction = isProduction;
|
package/src/Export.ts
CHANGED
|
@@ -18,9 +18,10 @@ export * from './network/HttpMethod';
|
|
|
18
18
|
export * from './referrer/ReferrerKey';
|
|
19
19
|
export * from './referrer/ReferrerCallback';
|
|
20
20
|
|
|
21
|
-
export * from './settings/
|
|
22
|
-
export *
|
|
23
|
-
export *
|
|
21
|
+
export * from './settings/AffiseSettingsApi';
|
|
22
|
+
export * from './settings/AffiseConfig';
|
|
23
|
+
export * from './settings/OnInitErrorHandler';
|
|
24
|
+
export * from './settings/OnInitSuccessHandler';
|
|
24
25
|
|
|
25
26
|
export * from './skad/SKAdNetwork';
|
|
26
27
|
export * from './skad/CoarseValue';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { AffiseNative } from "../native/AffiseNative";
|
|
2
|
+
import type { DebugOnValidateCallback } from "./validate/DebugOnValidateCallback";
|
|
3
|
+
import type { DebugOnNetworkCallback } from "./network/DebugOnNetworkCallback";
|
|
4
|
+
import type { AffiseDebugApi } from "./AffiseDebugApi";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class AffiseDebug implements AffiseDebugApi {
|
|
8
|
+
private native: AffiseNative
|
|
9
|
+
|
|
10
|
+
constructor(native: AffiseNative) {
|
|
11
|
+
this.native = native
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Won't work on Production
|
|
16
|
+
*
|
|
17
|
+
* Validate credentials
|
|
18
|
+
*/
|
|
19
|
+
validate(callback: DebugOnValidateCallback) {
|
|
20
|
+
this.native.validate(callback);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Won't work on Production
|
|
25
|
+
*
|
|
26
|
+
* Show request/response data
|
|
27
|
+
*/
|
|
28
|
+
network(callback: DebugOnNetworkCallback) {
|
|
29
|
+
this.native.network(callback);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Debug get version of flutter library
|
|
34
|
+
*/
|
|
35
|
+
version(): string {
|
|
36
|
+
return "1.6.35";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Debug get version of native library Android/iOS
|
|
41
|
+
*/
|
|
42
|
+
versionNative(): Promise<string> {
|
|
43
|
+
return this.native.versionNative();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { DebugOnValidateCallback } from "./validate/DebugOnValidateCallback";
|
|
2
|
+
import type { DebugOnNetworkCallback } from "./network/DebugOnNetworkCallback";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface AffiseDebugApi {
|
|
6
|
+
/**
|
|
7
|
+
* Won't work on Production
|
|
8
|
+
*
|
|
9
|
+
* Validate credentials
|
|
10
|
+
*/
|
|
11
|
+
validate(callback: DebugOnValidateCallback): void;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Won't work on Production
|
|
15
|
+
*
|
|
16
|
+
* Show request/response data
|
|
17
|
+
*/
|
|
18
|
+
network(callback: DebugOnNetworkCallback): void;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Debug get version of flutter library
|
|
22
|
+
*/
|
|
23
|
+
version(): string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Debug get version of native library Android/iOS
|
|
27
|
+
*/
|
|
28
|
+
versionNative(): Promise<string>;
|
|
29
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -4,22 +4,28 @@ import type {
|
|
|
4
4
|
AffiseInitProperties,
|
|
5
5
|
// AutoCatchingType,
|
|
6
6
|
ReferrerKey,
|
|
7
|
-
CoarseValue,
|
|
8
7
|
AffiseModules,
|
|
9
8
|
ReferrerCallback,
|
|
10
9
|
OnKeyValueCallback,
|
|
11
|
-
ErrorCallback,
|
|
12
10
|
OnDeeplinkCallback,
|
|
13
|
-
DebugOnValidateCallback,
|
|
14
|
-
DebugOnNetworkCallback,
|
|
15
11
|
OnSendSuccessCallback,
|
|
16
12
|
OnSendFailedCallback,
|
|
17
|
-
AffiseLinkCallback,
|
|
18
|
-
AffiseResultCallback,
|
|
19
13
|
} from "./Export";
|
|
20
|
-
import {AffiseNative} from "./native/AffiseNative";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
14
|
+
import { AffiseNative } from "./native/AffiseNative";
|
|
15
|
+
import { AffiseSettings } from "./settings/AffiseSettings";
|
|
16
|
+
import type { AffiseSettingsApi } from "./Export";
|
|
17
|
+
import {
|
|
18
|
+
AffiseDebug,
|
|
19
|
+
AffiseDebugApi,
|
|
20
|
+
} from "./debug/internal";
|
|
21
|
+
import {
|
|
22
|
+
AffiseModuleApi,
|
|
23
|
+
AffiseModule,
|
|
24
|
+
AffiseIos,
|
|
25
|
+
AffiseIosApi,
|
|
26
|
+
AffiseAndroid,
|
|
27
|
+
AffiseAndroidApi
|
|
28
|
+
} from "./module/internal";
|
|
23
29
|
|
|
24
30
|
export * from "./Export";
|
|
25
31
|
|
|
@@ -37,12 +43,12 @@ export class Affise {
|
|
|
37
43
|
* @param affiseAppId - your app id
|
|
38
44
|
* @param secretKey - your SDK secretKey
|
|
39
45
|
*/
|
|
40
|
-
static settings({affiseAppId, secretKey}: { affiseAppId: string, secretKey: string }):
|
|
41
|
-
return new AffiseSettings(affiseAppId, secretKey);
|
|
46
|
+
static settings({affiseAppId, secretKey}: { affiseAppId: string, secretKey: string }): AffiseSettingsApi {
|
|
47
|
+
return new AffiseSettings(this.native, affiseAppId, secretKey);
|
|
42
48
|
}
|
|
43
49
|
|
|
44
50
|
/**
|
|
45
|
-
* Use Affise.settings({affiseAppId, secretKey}).start()
|
|
51
|
+
* @deprecated Use Affise.settings({affiseAppId, secretKey}).start()
|
|
46
52
|
* @param initProperties
|
|
47
53
|
*/
|
|
48
54
|
static start(
|
|
@@ -158,7 +164,7 @@ export class Affise {
|
|
|
158
164
|
* @param callback status response
|
|
159
165
|
*/
|
|
160
166
|
static getStatus(module: AffiseModules, callback: OnKeyValueCallback) {
|
|
161
|
-
|
|
167
|
+
this.module.getStatus(module, callback);
|
|
162
168
|
}
|
|
163
169
|
|
|
164
170
|
/**
|
|
@@ -167,7 +173,7 @@ export class Affise {
|
|
|
167
173
|
* @param module module name
|
|
168
174
|
*/
|
|
169
175
|
static moduleStart(module: AffiseModules): Promise<boolean> {
|
|
170
|
-
return
|
|
176
|
+
return this.module.moduleStart(module);
|
|
171
177
|
}
|
|
172
178
|
|
|
173
179
|
/**
|
|
@@ -175,7 +181,7 @@ export class Affise {
|
|
|
175
181
|
* Get installed modules
|
|
176
182
|
*/
|
|
177
183
|
static getModulesInstalled(): Promise<AffiseModules[]> {
|
|
178
|
-
return
|
|
184
|
+
return this.module.getModulesInstalled();
|
|
179
185
|
}
|
|
180
186
|
|
|
181
187
|
/**
|
|
@@ -241,7 +247,7 @@ export class Affise {
|
|
|
241
247
|
* Get referrer on server
|
|
242
248
|
*/
|
|
243
249
|
static getReferrerOnServer(callback: ReferrerCallback) {
|
|
244
|
-
|
|
250
|
+
this.getDeferredDeeplink(callback);
|
|
245
251
|
}
|
|
246
252
|
|
|
247
253
|
/**
|
|
@@ -249,7 +255,7 @@ export class Affise {
|
|
|
249
255
|
* Get referrer on server value
|
|
250
256
|
*/
|
|
251
257
|
static getReferrerOnServerValue(key: ReferrerKey, callback: ReferrerCallback) {
|
|
252
|
-
|
|
258
|
+
this.getDeferredDeeplinkValue(key, callback);
|
|
253
259
|
}
|
|
254
260
|
|
|
255
261
|
/**
|
|
@@ -276,139 +282,10 @@ export class Affise {
|
|
|
276
282
|
// this.native.setEnabledMetrics(enabled);
|
|
277
283
|
// }
|
|
278
284
|
|
|
279
|
-
static android =
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
static crashApplication() {
|
|
288
|
-
Affise.native.crashApplication();
|
|
289
|
-
}
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
static ios = class {
|
|
293
|
-
/**
|
|
294
|
-
* SKAd register app
|
|
295
|
-
*/
|
|
296
|
-
static registerAppForAdNetworkAttribution(completionHandler: ErrorCallback) {
|
|
297
|
-
if (Platform.OS !== 'ios') return;
|
|
298
|
-
Affise.native.registerAppForAdNetworkAttribution(completionHandler);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
/**
|
|
302
|
-
* SKAd updatePostbackConversionValue
|
|
303
|
-
*/
|
|
304
|
-
static updatePostbackConversionValue(fineValue: bigint, coarseValue: CoarseValue, completionHandler: ErrorCallback) {
|
|
305
|
-
if (Platform.OS !== 'ios') return;
|
|
306
|
-
Affise.native.updatePostbackConversionValue(fineValue, coarseValue, completionHandler);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
/**
|
|
310
|
-
* @deprecated use Affise.getDeferredDeeplink(callback)
|
|
311
|
-
* Get referrer on server
|
|
312
|
-
*/
|
|
313
|
-
static getReferrerOnServer(callback: ReferrerCallback) {
|
|
314
|
-
Affise.native.getDeferredDeeplink(callback);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* @deprecated use Affise.getDeferredDeeplinkValue(key, callback)
|
|
319
|
-
* Get referrer on server value
|
|
320
|
-
*/
|
|
321
|
-
static getReferrerOnServerValue(key: ReferrerKey, callback: ReferrerCallback) {
|
|
322
|
-
Affise.native.getDeferredDeeplinkValue(key, callback);
|
|
323
|
-
}
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
static module = class {
|
|
327
|
-
|
|
328
|
-
/**
|
|
329
|
-
* Get module status
|
|
330
|
-
* @param module module name
|
|
331
|
-
* @param callback status response
|
|
332
|
-
*/
|
|
333
|
-
static getStatus(module: AffiseModules, callback: OnKeyValueCallback) {
|
|
334
|
-
Affise.native.getStatus(module, callback);
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
/**
|
|
338
|
-
* Manual module start
|
|
339
|
-
* @param module module name
|
|
340
|
-
*/
|
|
341
|
-
static moduleStart(module: AffiseModules): Promise<boolean> {
|
|
342
|
-
return Affise.native.moduleStart(module);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* Get installed modules
|
|
347
|
-
*/
|
|
348
|
-
static getModulesInstalled(): Promise<AffiseModules[]> {
|
|
349
|
-
return Affise.native.getModulesInstalled();
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
/**
|
|
353
|
-
* Module Link url Resolve
|
|
354
|
-
* @param url url
|
|
355
|
-
* @param callback redirected url
|
|
356
|
-
*/
|
|
357
|
-
static linkResolve(url: string, callback: AffiseLinkCallback) {
|
|
358
|
-
Affise.native.linkResolve(url, callback);
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
/**
|
|
362
|
-
* Module subscription fetchProducts
|
|
363
|
-
* @param ids list of product ids
|
|
364
|
-
* @param callback result callback
|
|
365
|
-
*/
|
|
366
|
-
static fetchProducts(ids: string[], callback: AffiseResultCallback<AffiseProductsResult>) {
|
|
367
|
-
Affise.native.fetchProducts(ids, callback);
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
/**
|
|
371
|
-
* Module subscription purchase
|
|
372
|
-
* @param product product
|
|
373
|
-
* @param type product type
|
|
374
|
-
* @param callback result callback
|
|
375
|
-
*/
|
|
376
|
-
static purchase(product: AffiseProduct, type: AffiseProductType, callback: AffiseResultCallback<AffisePurchasedInfo>) {
|
|
377
|
-
Affise.native.purchase(product, type, callback);
|
|
378
|
-
}
|
|
379
|
-
};
|
|
380
|
-
|
|
381
|
-
static debug = class {
|
|
382
|
-
/**
|
|
383
|
-
* Won't work on Production
|
|
384
|
-
*
|
|
385
|
-
* Validate credentials
|
|
386
|
-
*/
|
|
387
|
-
static validate(callback: DebugOnValidateCallback) {
|
|
388
|
-
Affise.native.validate(callback);
|
|
389
|
-
}
|
|
390
|
-
|
|
391
|
-
/**
|
|
392
|
-
* Won't work on Production
|
|
393
|
-
*
|
|
394
|
-
* Show request/response data
|
|
395
|
-
*/
|
|
396
|
-
static network(callback: DebugOnNetworkCallback) {
|
|
397
|
-
Affise.native.network(callback);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* Debug get version of flutter library
|
|
402
|
-
*/
|
|
403
|
-
static version(): string {
|
|
404
|
-
return "1.6.33";
|
|
405
|
-
}
|
|
406
|
-
|
|
407
|
-
/**
|
|
408
|
-
* Debug get version of native library Android/iOS
|
|
409
|
-
*/
|
|
410
|
-
static versionNative(): Promise<string> {
|
|
411
|
-
return Affise.native.versionNative();
|
|
412
|
-
}
|
|
413
|
-
};
|
|
285
|
+
static android: AffiseAndroidApi = new AffiseAndroid(this.native);
|
|
286
|
+
static ios: AffiseIosApi = new AffiseIos(this.native);
|
|
287
|
+
|
|
288
|
+
static module: AffiseModuleApi = new AffiseModule(this.native);
|
|
289
|
+
|
|
290
|
+
static debug: AffiseDebugApi = new AffiseDebug(this.native);
|
|
414
291
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { AffiseNative } from "../../native/AffiseNative";
|
|
2
|
+
import type { AffiseModuleAppsFlyerApi } from "./AffiseModuleAppsFlyerApi";
|
|
3
|
+
|
|
4
|
+
export class AffiseAppsFlyer implements AffiseModuleAppsFlyerApi {
|
|
5
|
+
private native: AffiseNative
|
|
6
|
+
|
|
7
|
+
constructor(native: AffiseNative) {
|
|
8
|
+
this.native = native
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Send Appflyer event data to affise
|
|
13
|
+
* @param eventName event name
|
|
14
|
+
* @param eventValues event data
|
|
15
|
+
*/
|
|
16
|
+
logEvent(eventName: string, eventValues: Record<string, any>) {
|
|
17
|
+
this.native.logEvent(eventName, eventValues);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Platform } from "react-native";
|
|
2
|
+
import type { AffiseNative } from "../../native/AffiseNative";
|
|
3
|
+
import type { AffiseAndroidApi } from "./AffiseAndroidApi";
|
|
4
|
+
|
|
5
|
+
export class AffiseAndroid implements AffiseAndroidApi {
|
|
6
|
+
|
|
7
|
+
private native: AffiseNative
|
|
8
|
+
|
|
9
|
+
constructor(native: AffiseNative) {
|
|
10
|
+
this.native = native
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Erases all user data from mobile and sends [GDPREvent]
|
|
15
|
+
*/
|
|
16
|
+
forget(userData: string) {
|
|
17
|
+
if (Platform.OS !== 'android') return;
|
|
18
|
+
this.native.forget(userData);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
crashApplication() {
|
|
22
|
+
if (Platform.OS !== 'android') return;
|
|
23
|
+
this.native.crashApplication();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Platform } from "react-native";
|
|
2
|
+
import type { AffiseNative } from "../../native/AffiseNative";
|
|
3
|
+
import type { AffiseIosApi } from "./AffiseIosApi";
|
|
4
|
+
import type { ErrorCallback } from "../../callback/ErrorCallback";
|
|
5
|
+
import type { CoarseValue } from "../../skad/CoarseValue";
|
|
6
|
+
import type { ReferrerKey } from "../../referrer/ReferrerKey";
|
|
7
|
+
import type { ReferrerCallback } from "../../referrer/ReferrerCallback";
|
|
8
|
+
|
|
9
|
+
export class AffiseIos implements AffiseIosApi {
|
|
10
|
+
|
|
11
|
+
private native: AffiseNative
|
|
12
|
+
|
|
13
|
+
constructor(native: AffiseNative) {
|
|
14
|
+
this.native = native
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* SKAd register app
|
|
19
|
+
*/
|
|
20
|
+
registerAppForAdNetworkAttribution(completionHandler: ErrorCallback) {
|
|
21
|
+
if (Platform.OS !== 'ios') return;
|
|
22
|
+
this.native.registerAppForAdNetworkAttribution(completionHandler);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* SKAd updatePostbackConversionValue
|
|
27
|
+
*/
|
|
28
|
+
updatePostbackConversionValue(fineValue: bigint, coarseValue: CoarseValue, completionHandler: ErrorCallback) {
|
|
29
|
+
if (Platform.OS !== 'ios') return;
|
|
30
|
+
this.native.updatePostbackConversionValue(fineValue, coarseValue, completionHandler);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @deprecated use Affise.getDeferredDeeplink(callback)
|
|
35
|
+
* Get referrer on server
|
|
36
|
+
*/
|
|
37
|
+
getReferrerOnServer(callback: ReferrerCallback) {
|
|
38
|
+
this.native.getDeferredDeeplink(callback);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated use Affise.getDeferredDeeplinkValue(key, callback)
|
|
43
|
+
* Get referrer on server value
|
|
44
|
+
*/
|
|
45
|
+
getReferrerOnServerValue(key: ReferrerKey, callback: ReferrerCallback) {
|
|
46
|
+
this.native.getDeferredDeeplinkValue(key, callback);
|
|
47
|
+
}
|
|
48
|
+
}
|