-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.d.ts
266 lines (239 loc) · 10.2 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
declare module 'react-native-adtrace' {
type Environment = 'sandbox' | 'production'
type LogLevel = string
type UrlStrategy = string
interface AdTraceAttribution {
trackerToken: string
trackerName: string
network: string
campaign: string
adgroup: string
creative: string
clickLabel: string
adid: string
costType: string
costAmount: number
costCurrency: string
fbInstallReferrer: string
}
interface AdTraceEventTrackingSuccess {
message: string
timestamp: string
adid: string
eventToken: string
callbackId: string
jsonResponse: string
}
interface AdTraceEventTrackingFailure {
message: string
timestamp: string
adid: string
eventToken: string
callbackId: string
willRetry: boolean
jsonResponse: string
}
interface AdTraceSessionTrackingSuccess {
message: string
timestamp: string
adid: string
jsonResponse: string
}
interface AdTraceSessionTrackingFailure {
message: string
timestamp: string
adid: string
willRetry: boolean
jsonResponse: string
}
interface AdTraceUri {
uri: string
}
interface AdTraceConversionValue {
conversionValue: number
}
interface AdTraceSkad4Data {
fineValue: number
coarseValue: string
lockWindow: boolean
}
interface AdTracePurchaseVerificationInfo {
verificationStatus: string
code: number
message: string
}
export class AdTraceConfig {
constructor(appToken: string, environment: Environment)
public setLogLevel(level: LogLevel): void
public setEventBufferingEnabled(eventBufferingEnabled: boolean): void
public setProcessName(processName: string): void
public setDefaultTracker(defaultTracked: string): void
public setExternalDeviceId(externalDeviceId: string): void
public setUrlStrategy(urlStrategy: UrlStrategy): void
public setUserAgent(userAgent: string): void
public setAppSecret(
secretId: number,
info1: number,
info2: number,
info3: number,
info4: number): void
public setDelayStart(delayStart: number): void
public setSendInBackground(sendInBackground: boolean): void
public setDeviceKnown(isDeviceKnown: boolean): void
public setNeedsCost(needsCost: boolean): void
public setPreinstallTrackingEnabled(preinstallTrackingEnabled: boolean): void
public setPreinstallFilePath(preinstallFilePath: string): void
public setCoppaCompliantEnabled(coppaCompliantEnabled: boolean): void
public setPlayStoreKidsAppEnabled(playStoreKidsAppEnabled: boolean): void
public setAllowiAdInfoReading(allowiAdInfoReading: boolean): void
public setAllowAdServicesInfoReading(allowAdServicesInfoReading: boolean): void
public setAllowIdfaReading(allowIdfaReading: boolean): void
public setSdkPrefix(sdkPrefix: string): void
public setShouldLaunchDeeplink(shouldLaunchDeeplink: boolean): void
public deactivateSKAdNetworkHandling(): void
public setLinkMeEnabled(linkMeEnabled: boolean): void
public setFinalAndroidAttributionEnabled(finalAndroidAttributionEnabled: boolean): void
public setAttConsentWaitingInterval(attConsentWaitingInterval: number): void
public setReadDeviceInfoOnceEnabled(readDeviceInfoOnceEnabled: boolean): void
public setFbAppId(fbAppId: string): void
public setAttributionCallbackListener(
callback: (attribution: AdTraceAttribution) => void
): void
public setEventTrackingSucceededCallbackListener(
callback: (eventSuccess: AdTraceEventTrackingSuccess) => void
): void
public setEventTrackingFailedCallbackListener(
callback: (eventFailed: AdTraceEventTrackingFailure) => void
): void
public setSessionTrackingSucceededCallbackListener(
callback: (sessionSuccess: AdTraceSessionTrackingSuccess) => void
): void
public setSessionTrackingFailedCallbackListener(
callback: (sessionFailed: AdTraceSessionTrackingFailure) => void
): void
public setDeferredDeeplinkCallbackListener(
callback: (uri: AdTraceUri) => void
): void
public setConversionValueUpdatedCallbackListener(
callback: (conversionValue: AdTraceConversionValue) => void
): void
public setSkad4ConversionValueUpdatedCallbackListener(
callback: (skad4Data: AdTraceSkad4Data) => void
): void
static LogLevelVerbose: LogLevel
static LogLevelDebug: LogLevel
static LogLevelInfo: LogLevel
static LogLevelWarn: LogLevel
static LogLevelError: LogLevel
static LogLevelAssert: LogLevel
static LogLevelSuppress: LogLevel
static EnvironmentSandbox: Environment
static EnvironmentProduction: Environment
static UrlStrategyIR: UrlStrategy
static UrlStrategyMobi: UrlStrategy
static DataResidencyIR: UrlStrategy
static AdRevenueSourceAppLovinMAX: string
static AdRevenueSourceMopub: string
static AdRevenueSourceAdmob: string
static AdRevenueSourceIronSource: string
static AdRevenueSourceAdmost: string
static AdRevenueSourcePublisher: string
static AdRevenueSourceTopOn: string
static AdRevenueSourceAdx: string
}
export class AdTraceEvent {
constructor(eventToken: string)
public setRevenue(revenue: number, currency: string): void
public addCallbackParameter(key: string, value: string): void
public addPartnerParameter(key: string, value: string): void
public addEventParameter(key: string, value: string): void
public setTransactionId(transactionId: string): void
public setCallbackId(callbackId: string): void
public setReceipt(receipt: string): void
public setProductId(productId: string): void
public setPurchaseToken(purchaseToken: string): void
}
export class AdTraceAppStoreSubscription {
constructor(price: string, currency: string, transactionId: string, receipt: string)
public setTransactionDate(transactionDate: string): void
public setSalesRegion(salesRegion: string): void
public addCallbackParameter(key: string, value: string): void
public addPartnerParameter(key: string, value: string): void
}
export class AdTracePlayStoreSubscription {
constructor(
price: string,
currency: string,
sku: string,
orderId: string,
signature: string,
purchaseToken: string)
public setPurchaseTime(purchaseTime: string): void
public addCallbackParameter(key: string, value: string): void
public addPartnerParameter(key: string, value: string): void
}
export class AdTraceThirdPartySharing {
constructor(isEnabled: boolean)
public addGranularOption(partnerName: string, key: string, value: string): void
public addPartnerSharingSetting(partnerName: string, key: string, value: boolean): void
}
export class AdTraceAdRevenue {
constructor(source: string)
public setRevenue(revenue: number, currency: string): void
public setAdImpressionsCount(adImpressionsCount: number): void
public setAdRevenueNetwork(adRevenueNetwork: string): void
public setAdRevenueUnit(adRevenueUnit: string): void
public setAdRevenuePlacement(adRevenuePlacement: string): void
public addCallbackParameter(key: string, value: string): void
public addPartnerParameter(key: string, value: string): void
}
export class AdTraceAppStorePurchase {
constructor(receipt: string, productId: string, transactionId: string)
}
export class AdTracePlayStorePurchase {
constructor(productId: string, purchaseToken: string)
}
export const AdTrace: {
componentWillUnmount: () => void
create: (adtraceConfig: AdTraceConfig) => void
trackEvent: (adtraceEvent: AdTraceEvent) => void
setEnabled: (enabled: boolean) => void
isEnabled: (callback: (enabled: boolean) => void) => void
setOfflineMode: (enabled: boolean) => void
setPushToken: (token: string) => void
appWillOpenUrl: (url: string) => void
sendFirstPackages: () => void
trackAdRevenue: ((source: string, payload: string) => void) & ((source: AdTraceAdRevenue) => void)
trackAppStoreSubscription: (subscription: AdTraceAppStoreSubscription) => void
trackPlayStoreSubscription: (subscription: AdTracePlayStoreSubscription) => void
addSessionCallbackParameter: (key: string, value: string) => void
addSessionPartnerParameter: (key: string, value: string) => void
removeSessionCallbackParameter: (key: string) => void
removeSessionPartnerParameter: (key: string) => void
resetSessionCallbackParameters: () => void
resetSessionPartnerParameters: () => void
gdprForgetMe: () => void
disableThirdPartySharing: () => void
getIdfa: (callback: (idfa: string) => void) => void
getIdfv: (callback: (idfv: string) => void) => void
getGoogleAdId: (callback: (adid: string) => void) => void
getAdid: (callback: (adid: string) => void) => void
getAttribution: (callback: (attribution: AdTraceAttribution) => void) => void
getAmazonAdId: (callback: (adid: string) => void) => void
getSdkVersion: (callback: (sdkVersion: string) => void) => void
setReferrer: (referrer: string) => void
convertUniversalLink: (url: string, scheme: string, callback: (convertedUrl: string) => void) => void
requestTrackingAuthorizationWithCompletionHandler: (handler: (status: number) => void) => void
updateConversionValue: (conversionValue: number) => void
updateConversionValueWithErrorCallback: (conversionValue: number, callback: (error: string) => void) => void
updateConversionValueWithSkad4ErrorCallback: (conversionValue: number, coarseValue: string, lockWindow: boolean, callback: (error: string) => void) => void
getAppTrackingAuthorizationStatus: (callback: (authorizationStatus: number) => void) => void
trackThirdPartySharing: (adtraceThirdPartySharing: AdTraceThirdPartySharing) => void
trackMeasurementConsent: (measurementConsent: boolean) => void
checkForNewAttStatus: () => void
getLastDeeplink: (callback: (lastDeeplink: string) => void) => void
verifyAppStorePurchase: (purchase: AdTraceAppStorePurchase, callback: (verificationInfo: AdTracePurchaseVerificationInfo) => void) => void
verifyPlayStorePurchase: (purchase: AdTracePlayStorePurchase, callback: (verificationInfo: AdTracePurchaseVerificationInfo) => void) => void
processDeeplink: (deeplink: string, callback: (resolvedLink: string) => void) => void
}
}