11/**
22 * Typescript Definition Sync with v5.1.1
33 **/
4- import { InAppPurchaseValidationResult } from ".. /models/in_app_purchase_validation_result" ;
5- import SubscriptionValidationResult from ".. /models/subscription_validation_result" ;
4+ import InAppPurchaseValidationResult from "./PurchaseConnector /models/in_app_purchase_validation_result" ;
5+ import SubscriptionValidationResult from "./PurchaseConnector /models/subscription_validation_result" ;
66import {
77 OnResponse ,
88 OnFailure ,
99 OnReceivePurchaseRevenueValidationInfo ,
10- } from ".. /utils/connector_callbacks" ;
10+ } from "./PurchaseConnector /utils/connector_callbacks" ;
1111
1212declare module "react-native-appsflyer" {
1313 type Response < T > = void | Promise < T > ;
@@ -151,21 +151,17 @@ declare module "react-native-appsflyer" {
151151 hasConsentForDataUsage ?: boolean ,
152152 hasConsentForAdsPersonalization ?: boolean ,
153153 hasConsentForAdStorage ?: boolean
154- ) { }
154+ ) ;
155155
156156 /**
157157 * @deprecated since version 6.16.2. Use the AppsFlyerConsent constructor instead for more flexibility with optional booleans.
158158 */
159- static forGDPRUser ( hasConsentForDataUsage : boolean , hasConsentForAdsPersonalization : boolean ) : AppsFlyerConsent {
160- return new AppsFlyerConsent ( true , hasConsentForDataUsage , hasConsentForAdsPersonalization ) ;
161- }
159+ static forGDPRUser ( hasConsentForDataUsage : boolean , hasConsentForAdsPersonalization : boolean ) : AppsFlyerConsent ;
162160
163161 /**
164162 * @deprecated since version 6.16.2. Use the AppsFlyerConsent constructor instead for more flexibility with optional booleans.
165163 */
166- static forNonGDPRUser ( ) : AppsFlyerConsent {
167- return new AppsFlyerConsent ( false ) ;
168- }
164+ static forNonGDPRUser ( ) : AppsFlyerConsent ;
169165 }
170166
171167 /**
@@ -201,15 +197,15 @@ declare module "react-native-appsflyer" {
201197 mediationNetwork : MEDIATION_NETWORK ;
202198 currencyIso4217Code : string ;
203199 revenue : number ;
204- additionalParameters ?: StringMap ;
200+ additionalParameters ?: { [ key : string ] : any } ;
205201 }
206202
207203 /**
208204 * PurchaseConnector
209205 */
210- export const StoreKitVersion = {
211- SK1 : "SK1" ,
212- SK2 : "SK2" ,
206+ export const StoreKitVersion : {
207+ readonly SK1 : "SK1" ;
208+ readonly SK2 : "SK2" ;
213209 } ;
214210
215211 export interface PurchaseConnectorConfig {
@@ -264,13 +260,13 @@ declare module "react-native-appsflyer" {
264260 callback : ( data :OnResponse < SubscriptionValidationResult > ) => any
265261 ) : ( ) => void ;
266262 onSubscriptionValidationResultFailure (
267- callback : ( data :onFailure ) => any
263+ callback : ( data :OnFailure ) => any
268264 ) : ( ) => void ;
269265 onInAppValidationResultSuccess (
270266 callback : ( data :OnResponse < InAppPurchaseValidationResult > ) => any
271267 ) : ( ) => void ;
272268 onInAppValidationResultFailure (
273- callback : ( data :onFailure ) => any
269+ callback : ( data :OnFailure ) => any
274270 ) : ( ) => void ;
275271
276272 setSubscriptionPurchaseEventDataSource : ( dataSource : SubscriptionPurchaseEventDataSource ) => void ;
@@ -397,7 +393,7 @@ declare module "react-native-appsflyer" {
397393 ) : void ;
398394 startSdk ( ) : void ;
399395 enableTCFDataCollection ( enabled : boolean ) : void ;
400- setConsentData ( consentData : AppsFlyerConsentType ) : void ;
396+ setConsentData ( consentData : AppsFlyerConsent ) : void ;
401397 logAdRevenue ( adRevenueData : AFAdRevenueData ) : void ;
402398 /**
403399 * For iOS Only
@@ -420,3 +416,14 @@ declare module "react-native-appsflyer" {
420416
421417 export default appsFlyer ;
422418}
419+
420+ // Explicit ambient declarations for ESLint compatibility
421+ // ESLint's import resolver doesn't recognize exports inside 'declare module' blocks.
422+ // These top-level declarations allow ESLint to detect the exports.
423+ declare const StoreKitVersion : { readonly SK1 : "SK1" ; readonly SK2 : "SK2" } ;
424+ declare const AppsFlyerPurchaseConnector : any ; // Type is defined in declare module above
425+ declare const AppsFlyerPurchaseConnectorConfig : any ; // Type is defined in declare module above
426+ declare const appsFlyer : any ; // Type is defined in declare module above
427+
428+ export { StoreKitVersion , AppsFlyerPurchaseConnector , AppsFlyerPurchaseConnectorConfig } ;
429+ export { appsFlyer as default } ;
0 commit comments