cloudx-react-native 2.0.0-beta.1

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.
Files changed (171) hide show
  1. package/LICENSE +57 -0
  2. package/README.md +1258 -0
  3. package/android/build.gradle +78 -0
  4. package/android/gradle.properties +7 -0
  5. package/android/src/main/AndroidManifest.xml +7 -0
  6. package/android/src/main/java/com/cloudxreactnative/CloudXAdViewEvent.kt +15 -0
  7. package/android/src/main/java/com/cloudxreactnative/CloudXBannerViewManagerImpl.kt +472 -0
  8. package/android/src/main/java/com/cloudxreactnative/CloudXReactNativeModuleImpl.kt +861 -0
  9. package/android/src/newarch/com/cloudxreactnative/CloudXBannerViewManager.kt +90 -0
  10. package/android/src/newarch/com/cloudxreactnative/CloudXReactNativeModule.kt +73 -0
  11. package/android/src/newarch/com/cloudxreactnative/CloudXReactNativePackage.kt +37 -0
  12. package/android/src/oldarch/com/cloudxreactnative/CloudXBannerViewManager.kt +76 -0
  13. package/android/src/oldarch/com/cloudxreactnative/CloudXReactNativeModule.kt +73 -0
  14. package/android/src/oldarch/com/cloudxreactnative/CloudXReactNativePackage.kt +16 -0
  15. package/cloudx-react-native.podspec +46 -0
  16. package/ios/AppTrackingTransparency.h +13 -0
  17. package/ios/AppTrackingTransparency.mm +59 -0
  18. package/ios/RNCloudXBannerView.h +51 -0
  19. package/ios/RNCloudXBannerView.mm +633 -0
  20. package/ios/RNCloudXBannerViewManager.h +11 -0
  21. package/ios/RNCloudXBannerViewManager.mm +60 -0
  22. package/ios/RNCloudXModule.h +30 -0
  23. package/ios/RNCloudXModule.mm +1088 -0
  24. package/lib/commonjs/AdView.js +151 -0
  25. package/lib/commonjs/AdView.js.map +1 -0
  26. package/lib/commonjs/AppTrackingTransparency.js +62 -0
  27. package/lib/commonjs/AppTrackingTransparency.js.map +1 -0
  28. package/lib/commonjs/BannerAd.js +117 -0
  29. package/lib/commonjs/BannerAd.js.map +1 -0
  30. package/lib/commonjs/CloudX.js +49 -0
  31. package/lib/commonjs/CloudX.js.map +1 -0
  32. package/lib/commonjs/ErrorCode.js +116 -0
  33. package/lib/commonjs/ErrorCode.js.map +1 -0
  34. package/lib/commonjs/EventEmitter.js +44 -0
  35. package/lib/commonjs/EventEmitter.js.map +1 -0
  36. package/lib/commonjs/InterstitialAd.js +94 -0
  37. package/lib/commonjs/InterstitialAd.js.map +1 -0
  38. package/lib/commonjs/MRecAd.js +117 -0
  39. package/lib/commonjs/MRecAd.js.map +1 -0
  40. package/lib/commonjs/RewardedAd.js +103 -0
  41. package/lib/commonjs/RewardedAd.js.map +1 -0
  42. package/lib/commonjs/hooks.js +239 -0
  43. package/lib/commonjs/hooks.js.map +1 -0
  44. package/lib/commonjs/index.js +144 -0
  45. package/lib/commonjs/index.js.map +1 -0
  46. package/lib/commonjs/specs/CloudXAdViewNativeComponent.js +26 -0
  47. package/lib/commonjs/specs/CloudXAdViewNativeComponent.js.map +1 -0
  48. package/lib/commonjs/specs/NativeCloudXModule.js +18 -0
  49. package/lib/commonjs/specs/NativeCloudXModule.js.map +1 -0
  50. package/lib/commonjs/types/AdEvent.js +6 -0
  51. package/lib/commonjs/types/AdEvent.js.map +1 -0
  52. package/lib/commonjs/types/AdInfo.js +6 -0
  53. package/lib/commonjs/types/AdInfo.js.map +1 -0
  54. package/lib/commonjs/types/BannerAd.js +6 -0
  55. package/lib/commonjs/types/BannerAd.js.map +1 -0
  56. package/lib/commonjs/types/CloudX.js +6 -0
  57. package/lib/commonjs/types/CloudX.js.map +1 -0
  58. package/lib/commonjs/types/Configuration.js +2 -0
  59. package/lib/commonjs/types/Configuration.js.map +1 -0
  60. package/lib/commonjs/types/FullscreenAd.js +6 -0
  61. package/lib/commonjs/types/FullscreenAd.js.map +1 -0
  62. package/lib/commonjs/types/RewardedAd.js +6 -0
  63. package/lib/commonjs/types/RewardedAd.js.map +1 -0
  64. package/lib/commonjs/types/index.js +2 -0
  65. package/lib/commonjs/types/index.js.map +1 -0
  66. package/lib/module/AdView.js +144 -0
  67. package/lib/module/AdView.js.map +1 -0
  68. package/lib/module/AppTrackingTransparency.js +55 -0
  69. package/lib/module/AppTrackingTransparency.js.map +1 -0
  70. package/lib/module/BannerAd.js +110 -0
  71. package/lib/module/BannerAd.js.map +1 -0
  72. package/lib/module/CloudX.js +42 -0
  73. package/lib/module/CloudX.js.map +1 -0
  74. package/lib/module/ErrorCode.js +110 -0
  75. package/lib/module/ErrorCode.js.map +1 -0
  76. package/lib/module/EventEmitter.js +35 -0
  77. package/lib/module/EventEmitter.js.map +1 -0
  78. package/lib/module/InterstitialAd.js +87 -0
  79. package/lib/module/InterstitialAd.js.map +1 -0
  80. package/lib/module/MRecAd.js +110 -0
  81. package/lib/module/MRecAd.js.map +1 -0
  82. package/lib/module/RewardedAd.js +96 -0
  83. package/lib/module/RewardedAd.js.map +1 -0
  84. package/lib/module/hooks.js +230 -0
  85. package/lib/module/hooks.js.map +1 -0
  86. package/lib/module/index.js +33 -0
  87. package/lib/module/index.js.map +1 -0
  88. package/lib/module/specs/CloudXAdViewNativeComponent.js +20 -0
  89. package/lib/module/specs/CloudXAdViewNativeComponent.js.map +1 -0
  90. package/lib/module/specs/NativeCloudXModule.js +14 -0
  91. package/lib/module/specs/NativeCloudXModule.js.map +1 -0
  92. package/lib/module/types/AdEvent.js +2 -0
  93. package/lib/module/types/AdEvent.js.map +1 -0
  94. package/lib/module/types/AdInfo.js +2 -0
  95. package/lib/module/types/AdInfo.js.map +1 -0
  96. package/lib/module/types/BannerAd.js +2 -0
  97. package/lib/module/types/BannerAd.js.map +1 -0
  98. package/lib/module/types/CloudX.js +2 -0
  99. package/lib/module/types/CloudX.js.map +1 -0
  100. package/lib/module/types/Configuration.js +2 -0
  101. package/lib/module/types/Configuration.js.map +1 -0
  102. package/lib/module/types/FullscreenAd.js +2 -0
  103. package/lib/module/types/FullscreenAd.js.map +1 -0
  104. package/lib/module/types/RewardedAd.js +2 -0
  105. package/lib/module/types/RewardedAd.js.map +1 -0
  106. package/lib/module/types/index.js +2 -0
  107. package/lib/module/types/index.js.map +1 -0
  108. package/lib/typescript/src/AdView.d.ts +69 -0
  109. package/lib/typescript/src/AdView.d.ts.map +1 -0
  110. package/lib/typescript/src/AppTrackingTransparency.d.ts +28 -0
  111. package/lib/typescript/src/AppTrackingTransparency.d.ts.map +1 -0
  112. package/lib/typescript/src/BannerAd.d.ts +4 -0
  113. package/lib/typescript/src/BannerAd.d.ts.map +1 -0
  114. package/lib/typescript/src/CloudX.d.ts +4 -0
  115. package/lib/typescript/src/CloudX.d.ts.map +1 -0
  116. package/lib/typescript/src/ErrorCode.d.ts +102 -0
  117. package/lib/typescript/src/ErrorCode.d.ts.map +1 -0
  118. package/lib/typescript/src/EventEmitter.d.ts +16 -0
  119. package/lib/typescript/src/EventEmitter.d.ts.map +1 -0
  120. package/lib/typescript/src/InterstitialAd.d.ts +4 -0
  121. package/lib/typescript/src/InterstitialAd.d.ts.map +1 -0
  122. package/lib/typescript/src/MRecAd.d.ts +4 -0
  123. package/lib/typescript/src/MRecAd.d.ts.map +1 -0
  124. package/lib/typescript/src/RewardedAd.d.ts +4 -0
  125. package/lib/typescript/src/RewardedAd.d.ts.map +1 -0
  126. package/lib/typescript/src/hooks.d.ts +50 -0
  127. package/lib/typescript/src/hooks.d.ts.map +1 -0
  128. package/lib/typescript/src/index.d.ts +23 -0
  129. package/lib/typescript/src/index.d.ts.map +1 -0
  130. package/lib/typescript/src/specs/CloudXAdViewNativeComponent.d.ts +61 -0
  131. package/lib/typescript/src/specs/CloudXAdViewNativeComponent.d.ts.map +1 -0
  132. package/lib/typescript/src/specs/NativeCloudXModule.d.ts +106 -0
  133. package/lib/typescript/src/specs/NativeCloudXModule.d.ts.map +1 -0
  134. package/lib/typescript/src/types/AdEvent.d.ts +10 -0
  135. package/lib/typescript/src/types/AdEvent.d.ts.map +1 -0
  136. package/lib/typescript/src/types/AdInfo.d.ts +48 -0
  137. package/lib/typescript/src/types/AdInfo.d.ts.map +1 -0
  138. package/lib/typescript/src/types/BannerAd.d.ts +39 -0
  139. package/lib/typescript/src/types/BannerAd.d.ts.map +1 -0
  140. package/lib/typescript/src/types/CloudX.d.ts +25 -0
  141. package/lib/typescript/src/types/CloudX.d.ts.map +1 -0
  142. package/lib/typescript/src/types/Configuration.d.ts +10 -0
  143. package/lib/typescript/src/types/Configuration.d.ts.map +1 -0
  144. package/lib/typescript/src/types/FullscreenAd.d.ts +29 -0
  145. package/lib/typescript/src/types/FullscreenAd.d.ts.map +1 -0
  146. package/lib/typescript/src/types/RewardedAd.d.ts +10 -0
  147. package/lib/typescript/src/types/RewardedAd.d.ts.map +1 -0
  148. package/lib/typescript/src/types/index.d.ts +8 -0
  149. package/lib/typescript/src/types/index.d.ts.map +1 -0
  150. package/package.json +78 -0
  151. package/src/AdView.tsx +213 -0
  152. package/src/AppTrackingTransparency.ts +56 -0
  153. package/src/BannerAd.ts +133 -0
  154. package/src/CloudX.ts +55 -0
  155. package/src/ErrorCode.ts +157 -0
  156. package/src/EventEmitter.ts +38 -0
  157. package/src/InterstitialAd.ts +103 -0
  158. package/src/MRecAd.ts +133 -0
  159. package/src/RewardedAd.ts +113 -0
  160. package/src/hooks.ts +292 -0
  161. package/src/index.ts +50 -0
  162. package/src/specs/CloudXAdViewNativeComponent.ts +82 -0
  163. package/src/specs/NativeCloudXModule.ts +162 -0
  164. package/src/types/AdEvent.ts +11 -0
  165. package/src/types/AdInfo.ts +60 -0
  166. package/src/types/BannerAd.ts +59 -0
  167. package/src/types/CloudX.ts +33 -0
  168. package/src/types/Configuration.ts +10 -0
  169. package/src/types/FullscreenAd.ts +39 -0
  170. package/src/types/RewardedAd.ts +10 -0
  171. package/src/types/index.ts +7 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InterstitialAd.d.ts","sourceRoot":"","sources":["../../../src/InterstitialAd.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AA8E7D,eAAO,MAAM,cAAc,EAAE,gBAoB5B,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { MRecAdType } from './types/BannerAd';
2
+ export declare const MRecAd: MRecAdType;
3
+ export default MRecAd;
4
+ //# sourceMappingURL=MRecAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MRecAd.d.ts","sourceRoot":"","sources":["../../../src/MRecAd.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAsB,MAAM,kBAAkB,CAAC;AAsGvE,eAAO,MAAM,MAAM,EAAE,UA0BpB,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { RewardedAdType } from './types/RewardedAd';
2
+ export declare const RewardedAd: RewardedAdType;
3
+ export default RewardedAd;
4
+ //# sourceMappingURL=RewardedAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RewardedAd.d.ts","sourceRoot":"","sources":["../../../src/RewardedAd.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAsFzD,eAAO,MAAM,UAAU,EAAE,cAsBxB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * React Hooks for CloudX SDK.
3
+ *
4
+ * Provides declarative hooks for managing fullscreen and banner ad lifecycles.
5
+ * These are a CloudX-specific convenience layer on top of the static module APIs.
6
+ */
7
+ export type InterstitialHookResult = {
8
+ isLoaded: boolean;
9
+ isLoading: boolean;
10
+ error: string | null;
11
+ load: () => void;
12
+ show: (placement?: string | null, customData?: string | null) => void;
13
+ destroy: () => void;
14
+ };
15
+ /**
16
+ * Hook for managing an interstitial ad lifecycle.
17
+ *
18
+ * @param adUnitId - The ad unit identifier.
19
+ */
20
+ export declare function useCloudXInterstitial(adUnitId: string): InterstitialHookResult;
21
+ export type RewardedHookResult = {
22
+ isLoaded: boolean;
23
+ isLoading: boolean;
24
+ error: string | null;
25
+ rewardEarned: boolean;
26
+ load: () => void;
27
+ show: (placement?: string | null, customData?: string | null) => void;
28
+ destroy: () => void;
29
+ };
30
+ /**
31
+ * Hook for managing a rewarded ad lifecycle.
32
+ *
33
+ * @param adUnitId - The ad unit identifier.
34
+ */
35
+ export declare function useCloudXRewarded(adUnitId: string): RewardedHookResult;
36
+ export type BannerHookResult = {
37
+ isLoaded: boolean;
38
+ error: string | null;
39
+ };
40
+ /**
41
+ * Hook for listening to programmatic banner ad state.
42
+ *
43
+ * Subscribes to module-level banner events for a given adUnitId.
44
+ * Use with the programmatic BannerAd.createAd() API.
45
+ * For the <AdView> component, use its callback props (onAdLoaded, etc.) directly.
46
+ *
47
+ * @param adUnitId - The ad unit identifier.
48
+ */
49
+ export declare function useCloudXBanner(adUnitId: string): BannerHookResult;
50
+ //# sourceMappingURL=hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../../src/hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2BH,MAAM,MAAM,sBAAsB,GAAG;IACjC,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACtE,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,sBAAsB,CA+E9E;AAMD,MAAM,MAAM,kBAAkB,GAAG;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,EAAE,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACtE,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,kBAAkB,CA0FtE;AAMD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAmClE"}
@@ -0,0 +1,23 @@
1
+ export { default, CloudX } from './CloudX';
2
+ export { default as NativeCloudXModule } from './specs/NativeCloudXModule';
3
+ export { InterstitialAd } from './InterstitialAd';
4
+ export { RewardedAd } from './RewardedAd';
5
+ export { BannerAd } from './BannerAd';
6
+ export { MRecAd } from './MRecAd';
7
+ export { AdView, AdFormat, AdViewPosition } from './AdView';
8
+ export type { AdViewProps, AdViewHandler } from './AdView';
9
+ export { ErrorCode } from './ErrorCode';
10
+ export { requestTrackingAuthorization, getTrackingAuthorizationStatus, ATTStatus } from './AppTrackingTransparency';
11
+ export { useCloudXInterstitial, useCloudXRewarded, useCloudXBanner } from './hooks';
12
+ export type { InterstitialHookResult, RewardedHookResult, BannerHookResult } from './hooks';
13
+ export type { AdInfo, AdLoadFailedInfo, AdDisplayFailedInfo, AdRewardInfo, Configuration, CloudXType, FullscreenAdType, RewardedAdType, BannerAdType, MRecAdType, AdViewPositionType, } from './types';
14
+ export declare const LogLevel: {
15
+ readonly VERBOSE: "verbose";
16
+ readonly DEBUG: "debug";
17
+ readonly INFO: "info";
18
+ readonly WARN: "warn";
19
+ readonly ERROR: "error";
20
+ readonly NONE: "none";
21
+ };
22
+ export type LogLevel = (typeof LogLevel)[keyof typeof LogLevel];
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAG3E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG3D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,OAAO,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGpH,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACpF,YAAY,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG5F,YAAY,EACR,MAAM,EACN,gBAAgB,EAChB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,kBAAkB,GACrB,MAAM,SAAS,CAAC;AAGjB,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC"}
@@ -0,0 +1,61 @@
1
+ import type { HostComponent, ViewProps } from 'react-native';
2
+ import type { DirectEventHandler, Int32, Double } from 'react-native/Libraries/Types/CodegenTypes';
3
+ /**
4
+ * Ad info event payload from native.
5
+ */
6
+ export type AdInfoEvent = Readonly<{
7
+ adUnitId: string;
8
+ adFormat: string;
9
+ networkName: string;
10
+ networkPlacement: string;
11
+ placement: string;
12
+ revenue: Double;
13
+ }>;
14
+ /**
15
+ * Ad error event payload from native.
16
+ */
17
+ export type AdErrorEvent = Readonly<{
18
+ adUnitId: string;
19
+ code: Int32;
20
+ message: string;
21
+ }>;
22
+ /**
23
+ * Props for CloudXAdView native component.
24
+ */
25
+ export interface NativeProps extends ViewProps {
26
+ /** The ad unit ID. */
27
+ adUnitId?: string | null;
28
+ /** The ad format: "BANNER" or "MREC". */
29
+ adFormat?: string | null;
30
+ /** Placement name. */
31
+ placement?: string | null;
32
+ /** Custom data string. */
33
+ customData?: string | null;
34
+ /** Whether to automatically refresh the ad. */
35
+ autoRefresh?: boolean;
36
+ /** Whether to load the ad on mount. */
37
+ loadOnMount?: boolean;
38
+ /** Position for programmatic window-level placement (e.g. "TOP_CENTER", "BOTTOM_CENTER"). */
39
+ adPosition?: string | null;
40
+ /** Called when ad is loaded. */
41
+ onAdLoaded?: DirectEventHandler<AdInfoEvent>;
42
+ /** Called when ad fails to load. */
43
+ onAdLoadFailed?: DirectEventHandler<AdErrorEvent>;
44
+ /** Called when ad is clicked. */
45
+ onAdClicked?: DirectEventHandler<AdInfoEvent>;
46
+ /** Called when ad expands. */
47
+ onAdExpanded?: DirectEventHandler<AdInfoEvent>;
48
+ /** Called when ad collapses. */
49
+ onAdCollapsed?: DirectEventHandler<AdInfoEvent>;
50
+ /** Called when ad revenue is paid. */
51
+ onAdRevenuePaid?: DirectEventHandler<AdInfoEvent>;
52
+ }
53
+ type NativeComponentType = HostComponent<NativeProps>;
54
+ interface NativeCommands {
55
+ loadAd: (viewRef: React.ElementRef<NativeComponentType>) => void;
56
+ destroy: (viewRef: React.ElementRef<NativeComponentType>) => void;
57
+ }
58
+ export declare const Commands: NativeCommands;
59
+ declare const _default: NativeComponentType;
60
+ export default _default;
61
+ //# sourceMappingURL=CloudXAdViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudXAdViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/specs/CloudXAdViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AAInG;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,QAAQ,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,SAAS;IAC1C,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzB,sBAAsB;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,+CAA+C;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,uCAAuC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,6FAA6F;IAC7F,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,gCAAgC;IAChC,UAAU,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAE7C,oCAAoC;IACpC,cAAc,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAElD,iCAAiC;IACjC,WAAW,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAE9C,8BAA8B;IAC9B,YAAY,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAE/C,gCAAgC;IAChC,aAAa,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAEhD,sCAAsC;IACtC,eAAe,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;CACrD;AAED,KAAK,mBAAmB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;AAEtD,UAAU,cAAc;IACpB,MAAM,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;IACjE,OAAO,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,mBAAmB,CAAC,KAAK,IAAI,CAAC;CACrE;AAED,eAAO,MAAM,QAAQ,gBAEnB,CAAC;wBAEmE,mBAAmB;AAAzF,wBAA0F"}
@@ -0,0 +1,106 @@
1
+ import type { TurboModule } from 'react-native';
2
+ /**
3
+ * TurboModule spec for the CloudX native module.
4
+ *
5
+ * This spec defines every native method exposed to JavaScript.
6
+ * Codegen uses this to produce type-safe native bindings.
7
+ *
8
+ * All methods correspond 1-to-1 with public APIs in the native iOS SDK
9
+ * (CloudXCore 2.1.0-beta) and the native Android SDK.
10
+ */
11
+ export interface Spec extends TurboModule {
12
+ addListener(eventName: string): void;
13
+ removeListeners(count: number): void;
14
+ initialize(pluginVersion: string, appKey: string): Promise<Object>;
15
+ isInitialized(): Promise<boolean>;
16
+ isTablet(): Promise<boolean>;
17
+ getVersion(): Promise<string>;
18
+ setMinLogLevel(level: string): void;
19
+ setVisualDebuggingEnabled(enabled: boolean): void;
20
+ setHashedUserID(hashedUserID: string): void;
21
+ setUserKeyValue(key: string, value: string): void;
22
+ setAppKeyValue(key: string, value: string): void;
23
+ clearAllKeyValues(): void;
24
+ createBanner(adUnitId: string, position: string): void;
25
+ createBannerWithOffsets(adUnitId: string, position: string, xOffset: number, yOffset: number): void;
26
+ showBanner(adUnitId: string): void;
27
+ hideBanner(adUnitId: string): void;
28
+ destroyBanner(adUnitId: string): void;
29
+ setBannerPlacement(adUnitId: string, placement: string | null): void;
30
+ setBannerCustomData(adUnitId: string, customData: string | null): void;
31
+ startBannerAutoRefresh(adUnitId: string): void;
32
+ stopBannerAutoRefresh(adUnitId: string): void;
33
+ updateBannerPosition(adUnitId: string, position: string): void;
34
+ updateBannerOffsets(adUnitId: string, xOffset: number, yOffset: number): void;
35
+ setBannerBackgroundColor(adUnitId: string, hexColorString: string): void;
36
+ createMRec(adUnitId: string, position: string): void;
37
+ createMRecWithOffsets(adUnitId: string, position: string, xOffset: number, yOffset: number): void;
38
+ showMRec(adUnitId: string): void;
39
+ hideMRec(adUnitId: string): void;
40
+ destroyMRec(adUnitId: string): void;
41
+ setMRecPlacement(adUnitId: string, placement: string | null): void;
42
+ setMRecCustomData(adUnitId: string, customData: string | null): void;
43
+ startMRecAutoRefresh(adUnitId: string): void;
44
+ stopMRecAutoRefresh(adUnitId: string): void;
45
+ updateMRecPosition(adUnitId: string, position: string): void;
46
+ updateMRecOffsets(adUnitId: string, xOffset: number, yOffset: number): void;
47
+ setMRecBackgroundColor(adUnitId: string, hexColorString: string): void;
48
+ loadInterstitial(adUnitId: string): void;
49
+ isInterstitialReady(adUnitId: string): Promise<boolean>;
50
+ showInterstitial(adUnitId: string, placement?: string | null, customData?: string | null): void;
51
+ destroyInterstitial(adUnitId: string): void;
52
+ loadRewarded(adUnitId: string): void;
53
+ isRewardedReady(adUnitId: string): Promise<boolean>;
54
+ showRewarded(adUnitId: string, placement?: string | null, customData?: string | null): void;
55
+ destroyRewarded(adUnitId: string): void;
56
+ getConstants(): {
57
+ ON_BANNER_AD_LOADED_EVENT: string;
58
+ ON_BANNER_AD_LOAD_FAILED_EVENT: string;
59
+ ON_BANNER_AD_CLICKED_EVENT: string;
60
+ ON_BANNER_AD_EXPANDED_EVENT: string;
61
+ ON_BANNER_AD_COLLAPSED_EVENT: string;
62
+ ON_BANNER_AD_REVENUE_PAID: string;
63
+ ON_MREC_AD_LOADED_EVENT: string;
64
+ ON_MREC_AD_LOAD_FAILED_EVENT: string;
65
+ ON_MREC_AD_CLICKED_EVENT: string;
66
+ ON_MREC_AD_EXPANDED_EVENT: string;
67
+ ON_MREC_AD_COLLAPSED_EVENT: string;
68
+ ON_MREC_AD_REVENUE_PAID: string;
69
+ ON_INTERSTITIAL_LOADED_EVENT: string;
70
+ ON_INTERSTITIAL_LOAD_FAILED_EVENT: string;
71
+ ON_INTERSTITIAL_CLICKED_EVENT: string;
72
+ ON_INTERSTITIAL_DISPLAYED_EVENT: string;
73
+ ON_INTERSTITIAL_DISPLAY_FAILED_EVENT: string;
74
+ ON_INTERSTITIAL_HIDDEN_EVENT: string;
75
+ ON_INTERSTITIAL_AD_REVENUE_PAID: string;
76
+ ON_REWARDED_AD_LOADED_EVENT: string;
77
+ ON_REWARDED_AD_LOAD_FAILED_EVENT: string;
78
+ ON_REWARDED_AD_CLICKED_EVENT: string;
79
+ ON_REWARDED_AD_DISPLAYED_EVENT: string;
80
+ ON_REWARDED_AD_DISPLAY_FAILED_EVENT: string;
81
+ ON_REWARDED_AD_HIDDEN_EVENT: string;
82
+ ON_REWARDED_AD_RECEIVED_REWARD_EVENT: string;
83
+ ON_REWARDED_AD_REVENUE_PAID: string;
84
+ TOP_LEFT_POSITION: string;
85
+ TOP_CENTER_POSITION: string;
86
+ TOP_RIGHT_POSITION: string;
87
+ CENTER_LEFT_POSITION: string;
88
+ CENTERED_POSITION: string;
89
+ CENTER_RIGHT_POSITION: string;
90
+ BOTTOM_LEFT_POSITION: string;
91
+ BOTTOM_CENTER_POSITION: string;
92
+ BOTTOM_RIGHT_POSITION: string;
93
+ ERROR_CODE_INTERNAL_ERROR: number;
94
+ ERROR_CODE_NETWORK_ERROR: number;
95
+ ERROR_CODE_NETWORK_TIMEOUT: number;
96
+ ERROR_CODE_NO_FILL: number;
97
+ ERROR_CODE_AD_NOT_READY: number;
98
+ ERROR_CODE_AD_ALREADY_SHOWING: number;
99
+ ERROR_CODE_INVALID_AD_UNIT: number;
100
+ ERROR_CODE_NOT_INITIALIZED: number;
101
+ ERROR_CODE_NO_CONNECTION: number;
102
+ };
103
+ }
104
+ declare const _default: Spec;
105
+ export default _default;
106
+ //# sourceMappingURL=NativeCloudXModule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeCloudXModule.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeCloudXModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD;;;;;;;;GAQG;AACH,MAAM,WAAW,IAAK,SAAQ,WAAW;IAKrC,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAMrC,UAAU,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IACnE,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAClC,QAAQ,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAM9B,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IAMlD,eAAe,CAAC,YAAY,EAAE,MAA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AGpC,iBAAiB,EAAE,MAAM,CAAC;QAC1B,mBAAmB,EAAE,MAAM,CAAC;QAC5B,kBAAkB,EAAE,MAAM,CAAC;QAC3B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,iBAAiB,EAAE,MAAM,CAAC;QAC1B,qBAAqB,EAAE,MAAM,CAAC;QAC9B,oBAAoB,EAAE,MAAM,CAAC;QAC7B,sBAAsB,EAAE,MAAM,CAAC;QAC/B,qBAAqB,EAAE,MAAM,CAAC;QAG9B,yBAAyB,EAAE,MAAM,CAAC;QAClC,wBAAwB,EAAE,MAAM,CAAC;QACjC,0BAA0B,EAAE,MAAM,CAAC;QACnC,kBAAkB,EAAE,MAAM,CAAC;QAC3B,uBAAuB,EAAE,MAAM,CAAC;QAChC,6BAA6B,EAAE,MAAM,CAAC;QACtC,0BAA0B,EAAE,MAAM,CAAC;QACnC,0BAA0B,EAAE,MAAM,CAAC;QACnC,wBAAwB,EAAE,MAAM,CAAC;KACpC,CAAC;CACL;;AAED,wBAAsE"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Represents any ad event object emitted by the native module.
3
+ */
4
+ import type { AdInfo, AdLoadFailedInfo, AdDisplayFailedInfo, AdRewardInfo } from './AdInfo';
5
+ export type AdEventObject = AdInfo | AdLoadFailedInfo | AdDisplayFailedInfo | AdRewardInfo;
6
+ /**
7
+ * Generic ad event listener callback type.
8
+ */
9
+ export type AdEventListener<T extends AdEventObject = AdEventObject> = (event: T) => void;
10
+ //# sourceMappingURL=AdEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdEvent.d.ts","sourceRoot":"","sources":["../../../../src/types/AdEvent.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE5F,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,gBAAgB,GAAG,mBAAmB,GAAG,YAAY,CAAC;AAE3F;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC"}
@@ -0,0 +1,48 @@
1
+ import type { ErrorCode } from '../ErrorCode';
2
+ /**
3
+ * Represents a successfully loaded ad served by CloudX.
4
+ */
5
+ export type AdInfo = {
6
+ /** The ad unit ID for this ad. */
7
+ adUnitId: string;
8
+ /** The format of the ad (e.g., "BANNER", "MREC", "INTERSTITIAL", "REWARDED"). */
9
+ adFormat: string;
10
+ /** The name of the ad network that served the ad. */
11
+ networkName: string;
12
+ /** The name of the placement as configured on the ad network side. */
13
+ networkPlacement?: string | null;
14
+ /** The custom placement name defined in your integration. */
15
+ placement?: string | null;
16
+ /** The revenue generated from the ad impression, in USD. Defaults to 0. */
17
+ revenue: number;
18
+ };
19
+ /**
20
+ * Represents a failure when attempting to load an ad.
21
+ */
22
+ export type AdLoadFailedInfo = {
23
+ /** The ad unit ID for which the load failed. */
24
+ adUnitId: string;
25
+ /** CloudX error code. */
26
+ code: ErrorCode;
27
+ /** Descriptive error message. */
28
+ message?: string | null;
29
+ };
30
+ /**
31
+ * Represents an error that occurred when displaying an ad.
32
+ */
33
+ export type AdDisplayFailedInfo = AdInfo & {
34
+ /** CloudX error code. */
35
+ code: ErrorCode;
36
+ /** Descriptive error message. */
37
+ message?: string | null;
38
+ };
39
+ /**
40
+ * Represents a successful reward event from a rewarded ad.
41
+ */
42
+ export type AdRewardInfo = AdInfo & {
43
+ /** The label of the reward. */
44
+ rewardLabel?: string | null;
45
+ /** The reward amount. */
46
+ rewardAmount: number;
47
+ };
48
+ //# sourceMappingURL=AdInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdInfo.d.ts","sourceRoot":"","sources":["../../../../src/types/AdInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,MAAM,GAAG;IACjB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAC;IAEjB,iFAAiF;IACjF,QAAQ,EAAE,MAAM,CAAC;IAEjB,qDAAqD;IACrD,WAAW,EAAE,MAAM,CAAC;IAEpB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjC,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE1B,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC3B,gDAAgD;IAChD,QAAQ,EAAE,MAAM,CAAC;IAEjB,yBAAyB;IACzB,IAAI,EAAE,SAAS,CAAC;IAEhB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG;IACvC,yBAAyB;IACzB,IAAI,EAAE,SAAS,CAAC;IAEhB,iCAAiC;IACjC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAChC,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B,yBAAyB;IACzB,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC"}
@@ -0,0 +1,39 @@
1
+ import type { AdInfo, AdLoadFailedInfo } from './AdInfo';
2
+ /**
3
+ * Position constants for programmatic banner placement.
4
+ */
5
+ export type AdViewPositionType = 'top_left' | 'top_center' | 'top_right' | 'center_left' | 'centered' | 'center_right' | 'bottom_left' | 'bottom_center' | 'bottom_right';
6
+ /**
7
+ * Programmatic banner ad interface.
8
+ */
9
+ export type BannerAdType = {
10
+ createAd(adUnitId: string, position: AdViewPositionType): void;
11
+ createAdWithOffsets(adUnitId: string, position: AdViewPositionType, xOffset: number, yOffset: number): void;
12
+ destroyAd(adUnitId: string): void;
13
+ showAd(adUnitId: string): void;
14
+ hideAd(adUnitId: string): void;
15
+ updatePosition(adUnitId: string, position: AdViewPositionType): void;
16
+ updateOffsets(adUnitId: string, xOffset: number, yOffset: number): void;
17
+ setBackgroundColor(adUnitId: string, hexColorString: string): void;
18
+ setPlacement(adUnitId: string, placement: string | null): void;
19
+ setCustomData(adUnitId: string, customData: string | null): void;
20
+ startAutoRefresh(adUnitId: string): void;
21
+ stopAutoRefresh(adUnitId: string): void;
22
+ addAdLoadedEventListener(listener: (adInfo: AdInfo) => void): void;
23
+ removeAdLoadedEventListener(): void;
24
+ addAdLoadFailedEventListener(listener: (errorInfo: AdLoadFailedInfo) => void): void;
25
+ removeAdLoadFailedEventListener(): void;
26
+ addAdClickedEventListener(listener: (adInfo: AdInfo) => void): void;
27
+ removeAdClickedEventListener(): void;
28
+ addAdExpandedEventListener(listener: (adInfo: AdInfo) => void): void;
29
+ removeAdExpandedEventListener(): void;
30
+ addAdCollapsedEventListener(listener: (adInfo: AdInfo) => void): void;
31
+ removeAdCollapsedEventListener(): void;
32
+ addAdRevenuePaidListener(listener: (adInfo: AdInfo) => void): void;
33
+ removeAdRevenuePaidListener(): void;
34
+ };
35
+ /**
36
+ * MREC ad type is identical to Banner in terms of API surface.
37
+ */
38
+ export type MRecAdType = BannerAdType;
39
+ //# sourceMappingURL=BannerAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BannerAd.d.ts","sourceRoot":"","sources":["../../../../src/types/BannerAd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GACxB,UAAU,GACV,YAAY,GACZ,WAAW,GACX,aAAa,GACb,UAAU,GACV,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,CAAC;AAErB;;GAEG;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ExC,yBAAyB,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IACpE,4BAA4B,IAAI,IAAI,CAAC;IAErC,0BAA0B,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IACrE,6BAA6B,IAAI,IAAI,CAAC;IAEtC,2BAA2B,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IACtE,8BAA8B,IAAI,IAAI,CAAC;IAEvC,wBAAwB,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;IACnE,2BAA2B,IAAI,IAAI,CAAC;CACvC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { Configuration } from './Configuration';
2
+ /**
3
+ * Main CloudX SDK module interface.
4
+ */
5
+ export type CloudXType = {
6
+ /** Initializes the CloudX SDK with the given app key. */
7
+ initialize(appKey: string): Promise<Configuration>;
8
+ /** Returns whether the SDK has been initialized. */
9
+ isInitialized(): Promise<boolean>;
10
+ /** Returns the native SDK version string. */
11
+ getVersion(): Promise<string>;
12
+ /** Sets the minimum log level for CloudX SDK logging. */
13
+ setMinLogLevel(level: string): void;
14
+ /** Sets a hashed user ID for targeting. */
15
+ setHashedUserID(hashedUserID: string): void;
16
+ /** Sets a user-level key-value pair for targeting. */
17
+ setUserKeyValue(key: string, value: string): void;
18
+ /** Sets an app-level key-value pair for targeting. */
19
+ setAppKeyValue(key: string, value: string): void;
20
+ /** Clears all targeting key-values. */
21
+ clearAllKeyValues(): void;
22
+ /** Enables or disables visual debugging overlay (iOS only; no-op on Android). */
23
+ setVisualDebuggingEnabled(enabled: boolean): void;
24
+ };
25
+ //# sourceMappingURL=CloudX.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudX.d.ts","sourceRoot":"","sources":["../../../../src/types/CloudX.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,yDAAyD;IACzD,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAEnD,oDAAoD;IACpD,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAElC,6CAA6C;IAC7C,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAE9B,yDAAyD;IACzD,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpC,2CAA2C;IAC3C,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5C,sDAAsD;IACtD,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAElD,sDAAsD;IACtD,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEjD,uCAAuC;IACvC,iBAAiB,IAAI,IAAI,CAAC;IAE1B,iFAAiF;IACjF,yBAAyB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;CACrD,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * SDK configuration returned after successful initialization.
3
+ */
4
+ export type Configuration = {
5
+ /** Whether initialization was successful. */
6
+ success: boolean;
7
+ /** Optional message with additional details. */
8
+ message?: string | null;
9
+ };
10
+ //# sourceMappingURL=Configuration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Configuration.d.ts","sourceRoot":"","sources":["../../../../src/types/Configuration.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,6CAA6C;IAC7C,OAAO,EAAE,OAAO,CAAC;IAEjB,gDAAgD;IAChD,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CAAC"}
@@ -0,0 +1,29 @@
1
+ import type { AdDisplayFailedInfo, AdInfo, AdLoadFailedInfo } from './AdInfo';
2
+ /**
3
+ * Shared interface for fullscreen ad types (Interstitial, Rewarded).
4
+ */
5
+ export type FullscreenAdType = {
6
+ /** Returns whether an ad is ready to display. */
7
+ isAdReady(adUnitId: string): Promise<boolean>;
8
+ /** Loads an ad for the given ad unit. */
9
+ loadAd(adUnitId: string): void;
10
+ /** Shows a previously loaded ad. */
11
+ showAd(adUnitId: string, placement?: string | null, customData?: string | null): void;
12
+ /** Destroys the ad instance and frees resources. */
13
+ destroyAd(adUnitId: string): void;
14
+ addAdLoadedEventListener(listener: (adInfo: AdInfo) => void): void;
15
+ removeAdLoadedEventListener(): void;
16
+ addAdLoadFailedEventListener(listener: (errorInfo: AdLoadFailedInfo) => void): void;
17
+ removeAdLoadFailedEventListener(): void;
18
+ addAdClickedEventListener(listener: (adInfo: AdInfo) => void): void;
19
+ removeAdClickedEventListener(): void;
20
+ addAdDisplayedEventListener(listener: (adInfo: AdInfo) => void): void;
21
+ removeAdDisplayedEventListener(): void;
22
+ addAdFailedToDisplayEventListener(listener: (errorInfo: AdDisplayFailedInfo) => void): void;
23
+ removeAdFailedToDisplayEventListener(): void;
24
+ addAdHiddenEventListener(listener: (adInfo: AdInfo) => void): void;
25
+ removeAdHiddenEventListener(): void;
26
+ addAdRevenuePaidListener(listener: (adInfo: AdInfo) => void): void;
27
+ removeAdRevenuePaidListener(): void;
28
+ };
29
+ //# sourceMappingURL=FullscreenAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FullscreenAd.d.ts","sourceRoot":"","sources":["../../../../src/types/FullscreenAd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE9E;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG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I,CAAC;CACvC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { AdRewardInfo } from './AdInfo';
2
+ import type { FullscreenAdType } from './FullscreenAd';
3
+ /**
4
+ * Rewarded ad interface, extending fullscreen ad with reward listener.
5
+ */
6
+ export type RewardedAdType = FullscreenAdType & {
7
+ addAdReceivedRewardEventListener(listener: (rewardInfo: AdRewardInfo) => void): void;
8
+ removeAdReceivedRewardEventListener(): void;
9
+ };
10
+ //# sourceMappingURL=RewardedAd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RewardedAd.d.ts","sourceRoot":"","sources":["../../../../src/types/RewardedAd.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG;IAC5C,gCAAgC,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,KAAK,IAAI,GAAG,IAAI,CAAC;IACrF,mCAAmC,IAAI,IAAI,CAAC;CAC/C,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type { AdInfo, AdLoadFailedInfo, AdDisplayFailedInfo, AdRewardInfo } from './AdInfo';
2
+ export type { Configuration } from './Configuration';
3
+ export type { CloudXType } from './CloudX';
4
+ export type { FullscreenAdType } from './FullscreenAd';
5
+ export type { RewardedAdType } from './RewardedAd';
6
+ export type { BannerAdType, MRecAdType, AdViewPositionType } from './BannerAd';
7
+ export type { AdEventObject, AdEventListener } from './AdEvent';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,MAAM,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC5F,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,YAAY,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC/E,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC"}
package/package.json ADDED
@@ -0,0 +1,78 @@
1
+ {
2
+ "name": "cloudx-react-native",
3
+ "version": "2.0.0-beta.1",
4
+ "description": "React Native wrapper for CloudX SDK (iOS & Android)",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/src/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cloudx-react-native.podspec",
16
+ "!**/__tests__",
17
+ "!**/__fixtures__",
18
+ "!**/__mocks__",
19
+ "!lib/typescript/example"
20
+ ],
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/cloudx-io/cloudx-react-native.git"
24
+ },
25
+ "scripts": {
26
+ "prepare": "bob build",
27
+ "typescript": "tsc --noEmit",
28
+ "lint": "eslint \"src/**/*.{ts,tsx}\"",
29
+ "clean": "rm -rf lib"
30
+ },
31
+ "keywords": [
32
+ "react-native",
33
+ "cloudx",
34
+ "ads",
35
+ "monetization",
36
+ "banner",
37
+ "interstitial",
38
+ "rewarded"
39
+ ],
40
+ "author": "CloudX",
41
+ "license": "Elastic-2.0",
42
+ "peerDependencies": {
43
+ "react": "*",
44
+ "react-native": "*"
45
+ },
46
+ "devDependencies": {
47
+ "@types/react": "^18.0.0",
48
+ "react": "^18.0.0",
49
+ "react-native": "^0.76.0",
50
+ "react-native-builder-bob": "^0.20.4",
51
+ "typescript": "^5.2.2"
52
+ },
53
+ "codegenConfig": {
54
+ "name": "RNCloudXSpec",
55
+ "type": "all",
56
+ "jsSrcsDir": "./src/specs",
57
+ "ios": {
58
+ "_comment": "modulesProvider maps JS TurboModule names to native ObjC classes. Required for RN 0.82+ so RCTAppDependencyProvider can discover and register the module at runtime.",
59
+ "modulesProvider": {
60
+ "CloudXModule": "RNCloudXModule"
61
+ }
62
+ }
63
+ },
64
+ "react-native-builder-bob": {
65
+ "source": "src",
66
+ "output": "lib",
67
+ "targets": [
68
+ "commonjs",
69
+ "module",
70
+ [
71
+ "typescript",
72
+ {
73
+ "project": "tsconfig.build.json"
74
+ }
75
+ ]
76
+ ]
77
+ }
78
+ }