-
Notifications
You must be signed in to change notification settings - Fork 68
/
index.d.ts
236 lines (209 loc) · 8.66 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
declare module 'react-native-adjust' {
type Environment = 'sandbox' | 'production'
type LogLevel = string
interface AdjustAttribution {
trackerToken: string
trackerName: string
network: string
campaign: string
adgroup: string
creative: string
clickLabel: string
costType: string
costAmount: number
costCurrency: string
fbInstallReferrer: string
}
interface AdjustEventTrackingSuccess {
message: string
timestamp: string
adid: string
eventToken: string
callbackId: string
jsonResponse: string
}
interface AdjustEventTrackingFailure {
message: string
timestamp: string
adid: string
eventToken: string
callbackId: string
willRetry: boolean
jsonResponse: string
}
interface AdjustSessionTrackingSuccess {
message: string
timestamp: string
adid: string
jsonResponse: string
}
interface AdjustSessionTrackingFailure {
message: string
timestamp: string
adid: string
willRetry: boolean
jsonResponse: string
}
interface AdjustDeferredDeeplink {
deeplink: string
}
interface AdjustSkanData {
conversionValue: number
coarseValue: string
lockWindow: boolean
error: string
}
interface AdjustPurchaseVerificationResult {
verificationStatus: string
code: number
message: string
}
export class AdjustConfig {
constructor(appToken: string, environment: Environment)
public setSdkPrefix(sdkPrefix: string): void
public setLogLevel(level: LogLevel): void
public disableDeferredDeeplinkOpening(): void
public setDefaultTracker(defaultTracker: string): void
public setExternalDeviceId(externalDeviceId: string): void
public enableDeviceIdsReadingOnce(): void
public enableCoppaCompliance(): void
public enableSendingInBackground(): void
public enableCostDataInAttribution(): void
public enablePlayStoreKidsCompliance(): void
public enableLinkMe(): void
public enablePreinstallTracking(): void
public setPreinstallFilePath(preinstallFilePath: string): void
public setFbAppId(fbAppId: string): void
public disableAdServices(): void
public disableIdfaReading(): void
public disableIdfvReading(): void
public disableSkanAttribution(): void
public setEventDeduplicationIdsMaxSize(eventDeduplicationIdsMaxSize: number): void
public setAttConsentWaitingInterval(attConsentWaitingInterval: number): void
public setUrlStrategy(urlStrategyDomains: string[], useSubdomains: boolean, isDataResidency: boolean): void
public setAttributionCallback(
callback: (attribution: AdjustAttribution) => void
): void
public setEventTrackingSucceededCallback(
callback: (eventSuccess: AdjustEventTrackingSuccess) => void
): void
public setEventTrackingFailedCallback(
callback: (eventFailed: AdjustEventTrackingFailure) => void
): void
public setSessionTrackingSucceededCallback(
callback: (sessionSuccess: AdjustSessionTrackingSuccess) => void
): void
public setSessionTrackingFailedCallback(
callback: (sessionFailed: AdjustSessionTrackingFailure) => void
): void
public setDeferredDeeplinkCallback(
callback: (deeplink: AdjustDeferredDeeplink) => void
): void
public setSkanUpdatedCallback(
callback: (skanData: AdjustSkanData) => 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
}
export class AdjustEvent {
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 setTransactionId(transactionId: string): void
public setCallbackId(callbackId: string): void
public setProductId(productId: string): void
public setPurchaseToken(purchaseToken: string): void
public setDeduplicationId(deduplicationId: string): void
}
export class AdjustAppStoreSubscription {
constructor(price: string, currency: string, transactionId: 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 AdjustPlayStoreSubscription {
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 AdjustThirdPartySharing {
constructor(isEnabled: boolean | null)
public addGranularOption(partnerName: string, key: string, value: string): void
public addPartnerSharingSetting(partnerName: string, key: string, value: boolean): void
}
export class AdjustAdRevenue {
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 AdjustAppStorePurchase {
constructor(productId: string, transactionId: string)
}
export class AdjustPlayStorePurchase {
constructor(productId: string, purchaseToken: string)
}
export class AdjustDeeplink {
constructor(deeplink: string)
}
export const Adjust: {
componentWillUnmount: () => void
initSdk: (adjustConfig: AdjustConfig) => void
trackEvent: (adjustEvent: AdjustEvent) => void
enable: () => void
disable: () => void
isEnabled: (callback: (enabled: boolean) => void) => void
switchToOfflineMode: () => void
switchBackToOnlineMode: () => void
setPushToken: (token: string) => void
processDeeplink: (adjustDeeplink: AdjustDeeplink) => void
trackAdRevenue: (adjustAdRevenue: AdjustAdRevenue) => void
trackAppStoreSubscription: (adjustAppStoreSubscription: AdjustAppStoreSubscription) => void
trackPlayStoreSubscription: (adjustPlayStoreSubscription: AdjustPlayStoreSubscription) => void
addGlobalCallbackParameter: (key: string, value: string) => void
addGlobalPartnerParameter: (key: string, value: string) => void
removeGlobalCallbackParameter: (key: string) => void
removeGlobalPartnerParameter: (key: string) => void
removeGlobalCallbackParameters: () => void
removeGlobalPartnerParameters: () => void
gdprForgetMe: () => 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: AdjustAttribution) => void) => void
getAmazonAdId: (callback: (adid: string) => void) => void
getSdkVersion: (callback: (sdkVersion: string) => void) => void
requestAppTrackingAuthorization: (handler: (status: number) => void) => void
updateSkanConversionValue: (conversionValue: number, coarseValue: string, lockWindow: boolean, callback: (error: string) => void) => void
getAppTrackingAuthorizationStatus: (callback: (status: number) => void) => void
trackThirdPartySharing: (adjustThirdPartySharing: AdjustThirdPartySharing) => void
trackMeasurementConsent: (measurementConsent: boolean) => void
getLastDeeplink: (callback: (lastDeeplink: string) => void) => void
verifyAppStorePurchase: (purchase: AdjustAppStorePurchase, callback: (verificationResult: AdjustPurchaseVerificationResult) => void) => void
verifyAndTrackAppStorePurchase: (adjustEvent: AdjustEvent, callback: (verificationResult: AdjustPurchaseVerificationResult) => void) => void
verifyPlayStorePurchase: (purchase: AdjustPlayStorePurchase, callback: (verificationResult: AdjustPurchaseVerificationResult) => void) => void
verifyAndTrackPlayStorePurchase: (adjustEvent: AdjustEvent, callback: (verificationResult: AdjustPurchaseVerificationResult) => void) => void
processAndResolveDeeplink: (adjustDeeplink: AdjustDeeplink, callback: (resolvedLink: string) => void) => void
}
}