@adshift/react-native-plugin 1.0.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/AdShiftReactNativePlugin.podspec +30 -0
- package/LICENSE +45 -0
- package/README.md +810 -0
- package/android/build.gradle +80 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/adshift/reactnativeplugin/AdShiftReactNativePluginModule.kt +420 -0
- package/android/src/main/java/com/adshift/reactnativeplugin/AdShiftReactNativePluginPackage.kt +33 -0
- package/ios/AdShiftReactNativePlugin.h +24 -0
- package/ios/AdShiftReactNativePlugin.mm +258 -0
- package/ios/AdShiftReactNativePluginHelper.swift +413 -0
- package/lib/module/Adshift.js +468 -0
- package/lib/module/Adshift.js.map +1 -0
- package/lib/module/NativeAdShiftReactNativePlugin.js +18 -0
- package/lib/module/NativeAdShiftReactNativePlugin.js.map +1 -0
- package/lib/module/index.js +57 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/types/AdshiftConfig.js +44 -0
- package/lib/module/types/AdshiftConfig.js.map +1 -0
- package/lib/module/types/AdshiftConsent.js +101 -0
- package/lib/module/types/AdshiftConsent.js.map +1 -0
- package/lib/module/types/AdshiftDeepLink.js +121 -0
- package/lib/module/types/AdshiftDeepLink.js.map +1 -0
- package/lib/module/types/AdshiftEventType.js +108 -0
- package/lib/module/types/AdshiftEventType.js.map +1 -0
- package/lib/module/types/index.js +10 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/Adshift.d.ts +335 -0
- package/lib/typescript/src/Adshift.d.ts.map +1 -0
- package/lib/typescript/src/NativeAdShiftReactNativePlugin.d.ts +143 -0
- package/lib/typescript/src/NativeAdShiftReactNativePlugin.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +47 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/types/AdshiftConfig.d.ts +74 -0
- package/lib/typescript/src/types/AdshiftConfig.d.ts.map +1 -0
- package/lib/typescript/src/types/AdshiftConsent.d.ts +88 -0
- package/lib/typescript/src/types/AdshiftConsent.d.ts.map +1 -0
- package/lib/typescript/src/types/AdshiftDeepLink.d.ts +93 -0
- package/lib/typescript/src/types/AdshiftDeepLink.d.ts.map +1 -0
- package/lib/typescript/src/types/AdshiftEventType.d.ts +87 -0
- package/lib/typescript/src/types/AdshiftEventType.d.ts.map +1 -0
- package/lib/typescript/src/types/index.d.ts +5 -0
- package/lib/typescript/src/types/index.d.ts.map +1 -0
- package/package.json +143 -0
- package/src/Adshift.ts +539 -0
- package/src/NativeAdShiftReactNativePlugin.ts +177 -0
- package/src/index.tsx +68 -0
- package/src/types/AdshiftConfig.ts +108 -0
- package/src/types/AdshiftConsent.ts +127 -0
- package/src/types/AdshiftDeepLink.ts +194 -0
- package/src/types/AdshiftEventType.ts +135 -0
- package/src/types/index.ts +7 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User consent data for GDPR/DMA compliance.
|
|
3
|
+
*
|
|
4
|
+
* @example
|
|
5
|
+
* ```typescript
|
|
6
|
+
* // For GDPR users who accepted all
|
|
7
|
+
* const consent = AdshiftConsent.forGDPRUser({
|
|
8
|
+
* hasConsentForDataUsage: true,
|
|
9
|
+
* hasConsentForAdsPersonalization: true,
|
|
10
|
+
* hasConsentForAdStorage: true,
|
|
11
|
+
* });
|
|
12
|
+
*
|
|
13
|
+
* // For non-GDPR users
|
|
14
|
+
* const consent = AdshiftConsent.forNonGDPRUser();
|
|
15
|
+
*
|
|
16
|
+
* await Adshift.setConsentData(consent);
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface AdshiftConsent {
|
|
20
|
+
/**
|
|
21
|
+
* Whether the user is subject to GDPR.
|
|
22
|
+
*/
|
|
23
|
+
isUserSubjectToGDPR: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Whether user has consented to data usage.
|
|
26
|
+
*/
|
|
27
|
+
hasConsentForDataUsage: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Whether user has consented to ads personalization.
|
|
30
|
+
*/
|
|
31
|
+
hasConsentForAdsPersonalization: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether user has consented to ad storage.
|
|
34
|
+
*/
|
|
35
|
+
hasConsentForAdStorage: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Helper functions for creating AdshiftConsent objects.
|
|
39
|
+
*/
|
|
40
|
+
export declare const AdshiftConsent: {
|
|
41
|
+
/**
|
|
42
|
+
* Creates consent for a user subject to GDPR.
|
|
43
|
+
*
|
|
44
|
+
* Use this when user is in a GDPR region and has provided explicit consent.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const consent = AdshiftConsent.forGDPRUser({
|
|
49
|
+
* hasConsentForDataUsage: true,
|
|
50
|
+
* hasConsentForAdsPersonalization: true,
|
|
51
|
+
* hasConsentForAdStorage: true,
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
forGDPRUser(options: {
|
|
56
|
+
hasConsentForDataUsage: boolean;
|
|
57
|
+
hasConsentForAdsPersonalization: boolean;
|
|
58
|
+
hasConsentForAdStorage: boolean;
|
|
59
|
+
}): AdshiftConsent;
|
|
60
|
+
/**
|
|
61
|
+
* Creates consent for a user NOT subject to GDPR.
|
|
62
|
+
*
|
|
63
|
+
* Use this when user is in a non-GDPR region (e.g., US, Asia).
|
|
64
|
+
* All consent flags are set to true by default.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* const consent = AdshiftConsent.forNonGDPRUser();
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
forNonGDPRUser(): AdshiftConsent;
|
|
72
|
+
/**
|
|
73
|
+
* Determines whether consent is granted for tracking.
|
|
74
|
+
*
|
|
75
|
+
* If user is not subject to GDPR, consent is assumed granted.
|
|
76
|
+
* If subject to GDPR, both data usage and ad storage must be granted.
|
|
77
|
+
*/
|
|
78
|
+
isConsentGranted(consent: AdshiftConsent): boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Creates consent from a plain object (native bridge response).
|
|
81
|
+
*/
|
|
82
|
+
fromMap(map: Record<string, unknown>): AdshiftConsent;
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Converts AdshiftConsent to a plain object for native bridge communication.
|
|
86
|
+
*/
|
|
87
|
+
export declare function consentToMap(consent: AdshiftConsent): Record<string, boolean>;
|
|
88
|
+
//# sourceMappingURL=AdshiftConsent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdshiftConsent.d.ts","sourceRoot":"","sources":["../../../../src/types/AdshiftConsent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,mBAAmB,EAAE,OAAO,CAAC;IAE7B;;OAEG;IACH,sBAAsB,EAAE,OAAO,CAAC;IAEhC;;OAEG;IACH,+BAA+B,EAAE,OAAO,CAAC;IAEzC;;OAEG;IACH,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED;;GAEG;AACH,eAAO,MAAM,cAAc;IACzB;;;;;;;;;;;;;OAaG;yBACkB;QACnB,sBAAsB,EAAE,OAAO,CAAC;QAChC,+BAA+B,EAAE,OAAO,CAAC;QACzC,sBAAsB,EAAE,OAAO,CAAC;KACjC,GAAG,cAAc;IASlB;;;;;;;;;;OAUG;sBACe,cAAc;IAShC;;;;;OAKG;8BACuB,cAAc,GAAG,OAAO;IAKlD;;OAEG;iBACU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,cAAc;CAStD,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAO7E"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Status of a deep link resolution.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum AdshiftDeepLinkStatus {
|
|
5
|
+
/** Deep link was found and resolved successfully. */
|
|
6
|
+
Found = "found",
|
|
7
|
+
/** No deep link was found (e.g., organic install). */
|
|
8
|
+
NotFound = "notFound",
|
|
9
|
+
/** Error occurred while resolving deep link. */
|
|
10
|
+
Error = "error"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Response from deep link handling.
|
|
14
|
+
*
|
|
15
|
+
* Contains the resolved deep link URL, parameters, and status.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* const deepLink = await Adshift.handleDeepLink(url);
|
|
20
|
+
* if (deepLink.status === AdshiftDeepLinkStatus.Found) {
|
|
21
|
+
* const productId = deepLink.params?.['product_id'];
|
|
22
|
+
* // Navigate to product
|
|
23
|
+
* }
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export interface AdshiftDeepLink {
|
|
27
|
+
/** The deep link URL string. */
|
|
28
|
+
deepLink?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Standardized resolved value for routing.
|
|
31
|
+
* This is the main routing value extracted from the deep link.
|
|
32
|
+
*/
|
|
33
|
+
deepLinkValue?: string;
|
|
34
|
+
/** Query parameters extracted from the deep link. */
|
|
35
|
+
params?: Record<string, unknown>;
|
|
36
|
+
/**
|
|
37
|
+
* Whether this is a deferred deep link.
|
|
38
|
+
*
|
|
39
|
+
* Deferred deep links are resolved after app install,
|
|
40
|
+
* typically from ad campaigns.
|
|
41
|
+
*/
|
|
42
|
+
isDeferred: boolean;
|
|
43
|
+
/** Status of the deep link resolution. */
|
|
44
|
+
status: AdshiftDeepLinkStatus;
|
|
45
|
+
/** Error message if status is Error. */
|
|
46
|
+
errorMessage?: string;
|
|
47
|
+
/** Custom sub-parameter 1. */
|
|
48
|
+
deepLinkSub1?: string;
|
|
49
|
+
/** Custom sub-parameter 2. */
|
|
50
|
+
deepLinkSub2?: string;
|
|
51
|
+
/** Custom sub-parameter 3. */
|
|
52
|
+
deepLinkSub3?: string;
|
|
53
|
+
/** Custom sub-parameter 4. */
|
|
54
|
+
deepLinkSub4?: string;
|
|
55
|
+
/** Custom sub-parameter 5. */
|
|
56
|
+
deepLinkSub5?: string;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Helper functions for creating AdshiftDeepLink objects.
|
|
60
|
+
*/
|
|
61
|
+
export declare const AdshiftDeepLink: {
|
|
62
|
+
/**
|
|
63
|
+
* Creates a successful deep link response.
|
|
64
|
+
*/
|
|
65
|
+
found(options: {
|
|
66
|
+
deepLink: string;
|
|
67
|
+
deepLinkValue?: string;
|
|
68
|
+
params?: Record<string, unknown>;
|
|
69
|
+
isDeferred?: boolean;
|
|
70
|
+
deepLinkSub1?: string;
|
|
71
|
+
deepLinkSub2?: string;
|
|
72
|
+
deepLinkSub3?: string;
|
|
73
|
+
deepLinkSub4?: string;
|
|
74
|
+
deepLinkSub5?: string;
|
|
75
|
+
}): AdshiftDeepLink;
|
|
76
|
+
/**
|
|
77
|
+
* Creates a "not found" deep link response.
|
|
78
|
+
*/
|
|
79
|
+
notFound(): AdshiftDeepLink;
|
|
80
|
+
/**
|
|
81
|
+
* Creates an error deep link response.
|
|
82
|
+
*/
|
|
83
|
+
error(message: string): AdshiftDeepLink;
|
|
84
|
+
/**
|
|
85
|
+
* Creates deep link from a plain object (native bridge response).
|
|
86
|
+
*/
|
|
87
|
+
fromMap(map: Record<string, unknown>): AdshiftDeepLink;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Converts AdshiftDeepLink to a plain object for native bridge communication.
|
|
91
|
+
*/
|
|
92
|
+
export declare function deepLinkToMap(deepLink: AdshiftDeepLink): Record<string, unknown>;
|
|
93
|
+
//# sourceMappingURL=AdshiftDeepLink.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdshiftDeepLink.d.ts","sourceRoot":"","sources":["../../../../src/types/AdshiftDeepLink.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,qBAAqB;IAC/B,qDAAqD;IACrD,KAAK,UAAU;IAEf,sDAAsD;IACtD,QAAQ,aAAa;IAErB,gDAAgD;IAChD,KAAK,UAAU;CAChB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC9B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,qDAAqD;IACrD,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB,0CAA0C;IAC1C,MAAM,EAAE,qBAAqB,CAAC;IAE9B,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IAItB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,eAAO,MAAM,eAAe;IAC1B;;OAEG;mBACY;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACjC,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GAAG,eAAe;IAenB;;OAEG;gBACS,eAAe;IAO3B;;OAEG;mBACY,MAAM,GAAG,eAAe;IAQvC;;OAEG;iBACU,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,eAAe;CA2CvD,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAC3B,QAAQ,EAAE,eAAe,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAczB"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Predefined event types for AdShift SDK.
|
|
3
|
+
*
|
|
4
|
+
* Use these constants for consistent event naming across your app.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```typescript
|
|
8
|
+
* await Adshift.trackEvent(AdshiftEventType.AddToCart, {
|
|
9
|
+
* product_id: 'SKU123',
|
|
10
|
+
* price: 29.99,
|
|
11
|
+
* });
|
|
12
|
+
* ```
|
|
13
|
+
*
|
|
14
|
+
* You can also use custom event names as strings:
|
|
15
|
+
* ```typescript
|
|
16
|
+
* await Adshift.trackEvent('custom_event_name');
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare const AdshiftEventType: {
|
|
20
|
+
/** User added item to cart. */
|
|
21
|
+
readonly AddToCart: "as_add_to_cart";
|
|
22
|
+
/** User added item to wishlist. */
|
|
23
|
+
readonly AddToWishList: "as_add_to_wishlist";
|
|
24
|
+
/** User added payment info. */
|
|
25
|
+
readonly AddPaymentInfo: "as_add_payment_info";
|
|
26
|
+
/** User initiated checkout. */
|
|
27
|
+
readonly InitiatedCheckout: "as_initiated_checkout";
|
|
28
|
+
/** User completed a purchase. */
|
|
29
|
+
readonly Purchase: "as_purchase";
|
|
30
|
+
/** User viewed content/product. */
|
|
31
|
+
readonly ContentView: "as_content_view";
|
|
32
|
+
/** User viewed a list of items. */
|
|
33
|
+
readonly ListView: "as_list_view";
|
|
34
|
+
/** User searched. */
|
|
35
|
+
readonly Search: "as_search";
|
|
36
|
+
/** User completed registration. */
|
|
37
|
+
readonly CompleteRegistration: "as_complete_registration";
|
|
38
|
+
/** User logged in. */
|
|
39
|
+
readonly Login: "as_login";
|
|
40
|
+
/** User completed tutorial. */
|
|
41
|
+
readonly TutorialCompletion: "as_tutorial_completion";
|
|
42
|
+
/** User subscribed. */
|
|
43
|
+
readonly Subscribe: "as_subscribe";
|
|
44
|
+
/** User started a trial. */
|
|
45
|
+
readonly StartTrial: "as_start_trial";
|
|
46
|
+
/** User achieved a level. */
|
|
47
|
+
readonly LevelAchieved: "as_level_achieved";
|
|
48
|
+
/** User unlocked an achievement. */
|
|
49
|
+
readonly AchievementUnlocked: "as_achievement_unlocked";
|
|
50
|
+
/** User spent credits/currency. */
|
|
51
|
+
readonly SpentCredit: "as_spent_credits";
|
|
52
|
+
/** User rated the app/content. */
|
|
53
|
+
readonly Rate: "as_rate";
|
|
54
|
+
/** User shared content. */
|
|
55
|
+
readonly Share: "as_share";
|
|
56
|
+
/** User invited others. */
|
|
57
|
+
readonly Invite: "as_invite";
|
|
58
|
+
/** User re-engaged with the app. */
|
|
59
|
+
readonly ReEngage: "as_re_engage";
|
|
60
|
+
/** User updated the app. */
|
|
61
|
+
readonly Update: "as_update";
|
|
62
|
+
/** User opened from push notification. */
|
|
63
|
+
readonly OpenedFromPushNotification: "as_opened_from_push_notification";
|
|
64
|
+
/** User made a travel booking. */
|
|
65
|
+
readonly TravelBooking: "as_travel_booking";
|
|
66
|
+
/** User clicked an ad. */
|
|
67
|
+
readonly AdClick: "as_ad_click";
|
|
68
|
+
/** User viewed an ad. */
|
|
69
|
+
readonly AdView: "as_ad_view";
|
|
70
|
+
/** User location changed. */
|
|
71
|
+
readonly LocationChanged: "as_location_changed";
|
|
72
|
+
/** User location coordinates updated. */
|
|
73
|
+
readonly LocationCoordinates: "as_location_coordinates";
|
|
74
|
+
/** Order ID event. */
|
|
75
|
+
readonly OrderId: "as_order_id";
|
|
76
|
+
/** Customer segment event. */
|
|
77
|
+
readonly CustomerSegment: "as_customer_segment";
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Type representing all predefined event type values.
|
|
81
|
+
*/
|
|
82
|
+
export type AdshiftEventTypeValue = (typeof AdshiftEventType)[keyof typeof AdshiftEventType];
|
|
83
|
+
/**
|
|
84
|
+
* Returns all predefined event types as an array.
|
|
85
|
+
*/
|
|
86
|
+
export declare function getAllEventTypes(): string[];
|
|
87
|
+
//# sourceMappingURL=AdshiftEventType.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AdshiftEventType.d.ts","sourceRoot":"","sources":["../../../../src/types/AdshiftEventType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,gBAAgB;IAG3B,+BAA+B;;IAG/B,mCAAmC;;IAGnC,+BAA+B;;IAG/B,+BAA+B;;IAG/B,iCAAiC;;IAGjC,mCAAmC;;IAGnC,mCAAmC;;IAGnC,qBAAqB;;IAKrB,mCAAmC;;IAGnC,sBAAsB;;IAGtB,+BAA+B;;IAG/B,uBAAuB;;IAGvB,4BAA4B;;IAK5B,6BAA6B;;IAG7B,oCAAoC;;IAGpC,mCAAmC;;IAKnC,kCAAkC;;IAGlC,2BAA2B;;IAG3B,2BAA2B;;IAG3B,oCAAoC;;IAGpC,4BAA4B;;IAG5B,0CAA0C;;IAK1C,kCAAkC;;IAKlC,0BAA0B;;IAG1B,yBAAyB;;IAKzB,6BAA6B;;IAG7B,yCAAyC;;IAKzC,sBAAsB;;IAGtB,8BAA8B;;CAEtB,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAE3D;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,EAAE,CAE3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAGA,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@adshift/react-native-plugin",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "AdShift SDK for React Native - Mobile Attribution, Event Tracking, SKAdNetwork 4.0+, Deep Linking and GDPR/TCF 2.2 Compliance",
|
|
5
|
+
"main": "./lib/module/index.js",
|
|
6
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"source": "./src/index.tsx",
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
23
|
+
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
29
|
+
"!**/__tests__",
|
|
30
|
+
"!**/__fixtures__",
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"example": "yarn workspace @adshift/react-native-plugin-example",
|
|
36
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
37
|
+
"prepare": "bob build",
|
|
38
|
+
"build": "bob build",
|
|
39
|
+
"typecheck": "tsc",
|
|
40
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
41
|
+
"test": "jest",
|
|
42
|
+
"test:coverage": "jest --coverage"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"react-native",
|
|
46
|
+
"ios",
|
|
47
|
+
"android",
|
|
48
|
+
"adshift",
|
|
49
|
+
"attribution",
|
|
50
|
+
"analytics",
|
|
51
|
+
"mobile-attribution",
|
|
52
|
+
"skadnetwork",
|
|
53
|
+
"skan",
|
|
54
|
+
"deep-linking",
|
|
55
|
+
"deferred-deep-links",
|
|
56
|
+
"gdpr",
|
|
57
|
+
"tcf",
|
|
58
|
+
"tracking",
|
|
59
|
+
"mmp"
|
|
60
|
+
],
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+https://github.com/AdShift/react_native_plugin.git"
|
|
64
|
+
},
|
|
65
|
+
"author": "AdShift <support@adshift.com> (https://adshift.com)",
|
|
66
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/AdShift/react_native_plugin/issues"
|
|
69
|
+
},
|
|
70
|
+
"homepage": "https://dev.adshift.com/docs/react-native-sdk",
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"registry": "https://registry.npmjs.org/"
|
|
73
|
+
},
|
|
74
|
+
"devDependencies": {
|
|
75
|
+
"@eslint/compat": "^1.3.2",
|
|
76
|
+
"@eslint/eslintrc": "^3.3.1",
|
|
77
|
+
"@eslint/js": "^9.35.0",
|
|
78
|
+
"@react-native/babel-preset": "0.83.0",
|
|
79
|
+
"@react-native/eslint-config": "0.83.0",
|
|
80
|
+
"@types/jest": "^29.5.0",
|
|
81
|
+
"@types/react": "^19.2.0",
|
|
82
|
+
"del-cli": "^6.0.0",
|
|
83
|
+
"eslint": "^9.35.0",
|
|
84
|
+
"eslint-config-prettier": "^10.1.8",
|
|
85
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
86
|
+
"jest": "^29.7.0",
|
|
87
|
+
"prettier": "^2.8.8",
|
|
88
|
+
"react": "19.2.0",
|
|
89
|
+
"react-native": "0.83.0",
|
|
90
|
+
"react-native-builder-bob": "^0.40.17",
|
|
91
|
+
"turbo": "^2.5.6",
|
|
92
|
+
"typescript": "^5.9.2"
|
|
93
|
+
},
|
|
94
|
+
"peerDependencies": {
|
|
95
|
+
"react": ">=18.2.0",
|
|
96
|
+
"react-native": ">=0.82.0"
|
|
97
|
+
},
|
|
98
|
+
"workspaces": [
|
|
99
|
+
"example"
|
|
100
|
+
],
|
|
101
|
+
"packageManager": "yarn@4.11.0",
|
|
102
|
+
"react-native-builder-bob": {
|
|
103
|
+
"source": "src",
|
|
104
|
+
"output": "lib",
|
|
105
|
+
"targets": [
|
|
106
|
+
[
|
|
107
|
+
"module",
|
|
108
|
+
{
|
|
109
|
+
"esm": true
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
[
|
|
113
|
+
"typescript",
|
|
114
|
+
{
|
|
115
|
+
"project": "tsconfig.build.json"
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"codegenConfig": {
|
|
121
|
+
"name": "AdShiftReactNativePluginSpec",
|
|
122
|
+
"type": "modules",
|
|
123
|
+
"jsSrcsDir": "src",
|
|
124
|
+
"android": {
|
|
125
|
+
"javaPackageName": "com.adshift.reactnativeplugin"
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
"prettier": {
|
|
129
|
+
"quoteProps": "consistent",
|
|
130
|
+
"singleQuote": true,
|
|
131
|
+
"tabWidth": 2,
|
|
132
|
+
"trailingComma": "es5",
|
|
133
|
+
"useTabs": false
|
|
134
|
+
},
|
|
135
|
+
"create-react-native-library": {
|
|
136
|
+
"type": "turbo-module",
|
|
137
|
+
"languages": "kotlin-objc",
|
|
138
|
+
"tools": [
|
|
139
|
+
"eslint"
|
|
140
|
+
],
|
|
141
|
+
"version": "0.56.0"
|
|
142
|
+
}
|
|
143
|
+
}
|