cm-sdk-react-native-v3 3.5.3 → 3.6.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 (28) hide show
  1. package/README.md +13 -1
  2. package/android/build.gradle +5 -5
  3. package/android/gradle.properties +3 -3
  4. package/android/src/main/java/com/cmsdkreactnativev3/CmSdkReactNativeV3Module.kt +43 -139
  5. package/android/src/main/java/com/cmsdkreactnativev3/CmSdkReactNativeV3Package.kt +24 -4
  6. package/ios/CmSdkReactNativeV3-Bridging-Header.h +4 -0
  7. package/ios/CmSdkReactNativeV3.mm +42 -76
  8. package/ios/CmSdkReactNativeV3.swift +37 -120
  9. package/lib/commonjs/NativeCmSdkReactNativeV3.js +11 -0
  10. package/lib/commonjs/NativeCmSdkReactNativeV3.js.map +1 -0
  11. package/lib/commonjs/index.js +108 -36
  12. package/lib/commonjs/index.js.map +1 -1
  13. package/lib/module/NativeCmSdkReactNativeV3.js +10 -0
  14. package/lib/module/NativeCmSdkReactNativeV3.js.map +1 -0
  15. package/lib/module/index.js +86 -34
  16. package/lib/module/index.js.map +1 -1
  17. package/lib/typescript/commonjs/src/NativeCmSdkReactNativeV3.d.ts +68 -0
  18. package/lib/typescript/commonjs/src/NativeCmSdkReactNativeV3.d.ts.map +1 -0
  19. package/lib/typescript/commonjs/src/index.d.ts +25 -32
  20. package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
  21. package/lib/typescript/module/src/NativeCmSdkReactNativeV3.d.ts +68 -0
  22. package/lib/typescript/module/src/NativeCmSdkReactNativeV3.d.ts.map +1 -0
  23. package/lib/typescript/module/src/index.d.ts +25 -32
  24. package/lib/typescript/module/src/index.d.ts.map +1 -1
  25. package/package.json +8 -2
  26. package/react-native-cm-sdk-react-native-v3.podspec +1 -1
  27. package/src/NativeCmSdkReactNativeV3.ts +92 -0
  28. package/src/index.tsx +125 -39
@@ -1,15 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  import { NativeModules, Platform, NativeEventEmitter } from 'react-native';
4
+ import NativeCmSdkReactNativeV3 from "./NativeCmSdkReactNativeV3.js";
4
5
  const LINKING_ERROR = `The package 'react-native-cm-sdk-react-native-v3' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
5
6
  ios: "- You have run 'pod install'\n",
6
7
  default: ''
7
8
  }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n';
8
- const CmSdkReactNativeV3 = NativeModules.CmSdkReactNativeV3 ? NativeModules.CmSdkReactNativeV3 : new Proxy({}, {
9
+
10
+ // Use TurboModule if available (New Architecture), fallback to legacy NativeModules
11
+ const CmSdkReactNativeV3 = NativeCmSdkReactNativeV3 ?? (NativeModules.CmSdkReactNativeV3 ? NativeModules.CmSdkReactNativeV3 : new Proxy({}, {
9
12
  get() {
10
13
  throw new Error(LINKING_ERROR);
11
14
  }
12
- });
15
+ }));
16
+ export const isTurboModuleEnabled = NativeCmSdkReactNativeV3 != null;
13
17
  const eventEmitter = new NativeEventEmitter(CmSdkReactNativeV3);
14
18
  export const addConsentListener = callback => {
15
19
  return eventEmitter.addListener('didReceiveConsent', event => {
@@ -32,45 +36,93 @@ export const addClickLinkListener = callback => {
32
36
  callback(event.url);
33
37
  });
34
38
  };
39
+ export const addATTStatusChangeListener = callback => {
40
+ return eventEmitter.addListener('didChangeATTStatus', callback);
41
+ };
35
42
 
36
43
  // Core configuration methods
37
- export const setUrlConfig = CmSdkReactNativeV3.setUrlConfig;
38
- export const setWebViewConfig = CmSdkReactNativeV3.setWebViewConfig;
44
+ export const setUrlConfig = config => {
45
+ return CmSdkReactNativeV3.setUrlConfig(config);
46
+ };
47
+ export const setWebViewConfig = config => {
48
+ return CmSdkReactNativeV3.setWebViewConfig(config);
49
+ };
50
+ export const setATTStatus = status => {
51
+ return CmSdkReactNativeV3.setATTStatus(status);
52
+ };
39
53
 
40
- // Main interaction methods (new API)
41
- export const checkAndOpen = CmSdkReactNativeV3.checkAndOpen;
42
- export const forceOpen = CmSdkReactNativeV3.forceOpen;
43
- export const jumpToSettings = CmSdkReactNativeV3.jumpToSettings;
54
+ // Main interaction methods
55
+ export const checkAndOpen = jumpToSettings => {
56
+ return CmSdkReactNativeV3.checkAndOpen(jumpToSettings);
57
+ };
58
+ export const forceOpen = jumpToSettings => {
59
+ return CmSdkReactNativeV3.forceOpen(jumpToSettings);
60
+ };
44
61
 
45
62
  // Consent status methods
46
- export const getUserStatus = CmSdkReactNativeV3.getUserStatus;
47
- export const getStatusForPurpose = CmSdkReactNativeV3.getStatusForPurpose;
48
- export const getStatusForVendor = CmSdkReactNativeV3.getStatusForVendor;
49
- export const getGoogleConsentModeStatus = CmSdkReactNativeV3.getGoogleConsentModeStatus;
50
- export const exportCMPInfo = CmSdkReactNativeV3.exportCMPInfo;
51
- export const importCMPInfo = CmSdkReactNativeV3.importCMPInfo;
52
- export const resetConsentManagementData = CmSdkReactNativeV3.resetConsentManagementData;
63
+ export const getUserStatus = () => {
64
+ return CmSdkReactNativeV3.getUserStatus();
65
+ };
66
+ export const getStatusForPurpose = purposeId => {
67
+ return CmSdkReactNativeV3.getStatusForPurpose(purposeId);
68
+ };
69
+ export const getStatusForVendor = vendorId => {
70
+ return CmSdkReactNativeV3.getStatusForVendor(vendorId);
71
+ };
72
+ export const getGoogleConsentModeStatus = () => {
73
+ return CmSdkReactNativeV3.getGoogleConsentModeStatus();
74
+ };
75
+ export const exportCMPInfo = () => {
76
+ return CmSdkReactNativeV3.exportCMPInfo();
77
+ };
78
+ export const importCMPInfo = cmpString => {
79
+ return CmSdkReactNativeV3.importCMPInfo(cmpString);
80
+ };
81
+ export const resetConsentManagementData = () => {
82
+ return CmSdkReactNativeV3.resetConsentManagementData();
83
+ };
53
84
 
54
85
  // Consent modification methods
55
- export const acceptVendors = CmSdkReactNativeV3.acceptVendors;
56
- export const rejectVendors = CmSdkReactNativeV3.rejectVendors;
57
- export const acceptPurposes = CmSdkReactNativeV3.acceptPurposes;
58
- export const rejectPurposes = CmSdkReactNativeV3.rejectPurposes;
59
- export const rejectAll = CmSdkReactNativeV3.rejectAll;
60
- export const acceptAll = CmSdkReactNativeV3.acceptAll;
86
+ export const acceptVendors = vendors => {
87
+ return CmSdkReactNativeV3.acceptVendors(vendors);
88
+ };
89
+ export const rejectVendors = vendors => {
90
+ return CmSdkReactNativeV3.rejectVendors(vendors);
91
+ };
92
+ export const acceptPurposes = (purposes, updatePurpose) => {
93
+ return CmSdkReactNativeV3.acceptPurposes(purposes, updatePurpose);
94
+ };
95
+ export const rejectPurposes = (purposes, updateVendor) => {
96
+ return CmSdkReactNativeV3.rejectPurposes(purposes, updateVendor);
97
+ };
98
+ export const rejectAll = () => {
99
+ return CmSdkReactNativeV3.rejectAll();
100
+ };
101
+ export const acceptAll = () => {
102
+ return CmSdkReactNativeV3.acceptAll();
103
+ };
104
+
105
+ // Helper function to check if New Architecture is enabled
106
+ export const isNewArchitectureEnabled = () => {
107
+ // Check multiple indicators for New Architecture
108
+ // 1. Check if our module was loaded via TurboModuleRegistry
109
+ if (NativeCmSdkReactNativeV3 != null) {
110
+ return true;
111
+ }
112
+
113
+ // 2. Check for bridgeless mode (official RN flag)
114
+ if (global.RN$Bridgeless === true) {
115
+ return true;
116
+ }
117
+
118
+ // 3. Check for TurboModule interop flag
119
+ if (global.RN$TurboInterop === true) {
120
+ return true;
121
+ }
122
+ return false;
123
+ };
124
+
125
+ // Re-export types for consumer convenience
61
126
 
62
- // Deprecated methods (kept for backward compatibility)
63
- export const checkWithServerAndOpenIfNecessary = CmSdkReactNativeV3.checkWithServerAndOpenIfNecessary;
64
- export const openConsentLayer = CmSdkReactNativeV3.openConsentLayer;
65
- export const checkIfConsentIsRequired = CmSdkReactNativeV3.checkIfConsentIsRequired;
66
- export const hasUserChoice = CmSdkReactNativeV3.hasUserChoice;
67
- export const hasPurposeConsent = CmSdkReactNativeV3.hasPurposeConsent;
68
- export const hasVendorConsent = CmSdkReactNativeV3.hasVendorConsent;
69
- export const getAllPurposesIDs = CmSdkReactNativeV3.getAllPurposesIDs;
70
- export const getEnabledPurposesIDs = CmSdkReactNativeV3.getEnabledPurposesIDs;
71
- export const getDisabledPurposesIDs = CmSdkReactNativeV3.getDisabledPurposesIDs;
72
- export const getAllVendorsIDs = CmSdkReactNativeV3.getAllVendorsIDs;
73
- export const getEnabledVendorsIDs = CmSdkReactNativeV3.getEnabledVendorsIDs;
74
- export const getDisabledVendorsIDs = CmSdkReactNativeV3.getDisabledVendorsIDs;
75
127
  export default CmSdkReactNativeV3;
76
128
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NativeModules","Platform","NativeEventEmitter","LINKING_ERROR","select","ios","default","CmSdkReactNativeV3","Proxy","get","Error","eventEmitter","addConsentListener","callback","addListener","event","consent","jsonObject","addShowConsentLayerListener","addCloseConsentLayerListener","addErrorListener","error","addClickLinkListener","url","setUrlConfig","setWebViewConfig","checkAndOpen","forceOpen","jumpToSettings","getUserStatus","getStatusForPurpose","getStatusForVendor","getGoogleConsentModeStatus","exportCMPInfo","importCMPInfo","resetConsentManagementData","acceptVendors","rejectVendors","acceptPurposes","rejectPurposes","rejectAll","acceptAll","checkWithServerAndOpenIfNecessary","openConsentLayer","checkIfConsentIsRequired","hasUserChoice","hasPurposeConsent","hasVendorConsent","getAllPurposesIDs","getEnabledPurposesIDs","getDisabledPurposesIDs","getAllVendorsIDs","getEnabledVendorsIDs","getDisabledVendorsIDs"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,EAAEC,kBAAkB,QAAQ,cAAc;AAE1E,MAAMC,aAAa,GACjB,8FAA8F,GAC9FF,QAAQ,CAACG,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;AAEjC,MAAMC,kBAAkB,GAAGP,aAAa,CAACO,kBAAkB,GACvDP,aAAa,CAACO,kBAAkB,GAChC,IAAIC,KAAK,C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,GAAGzC,kBAAkB,CAACyC,iBAAiB;AACrE,OAAO,MAAMC,qBAAqB,GAAG1C,kBAAkB,CAAC0C,qBAAqB;AAC7E,OAAO,MAAMC,sBAAsB,GAAG3C,kBAAkB,CAAC2C,sBAAsB;AAC/E,OAAO,MAAMC,gBAAgB,GAAG5C,kBAAkB,CAAC4C,gBAAgB;AACnE,OAAO,MAAMC,oBAAoB,GAAG7C,kBAAkB,CAAC6C,oBAAoB;AAC3E,OAAO,MAAMC,qBAAqB,GAAG9C,kBAAkB,CAAC8C,qBAAqB;AAE7E,eAAe9C,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["NativeModules","Platform","NativeEventEmitter","NativeCmSdkReactNativeV3","LINKING_ERROR","select","ios","default","CmSdkReactNativeV3","Proxy","get","Error","isTurboModuleEnabled","eventEmitter","addConsentListener","callback","addListener","event","consent","jsonObject","addShowConsentLayerListener","addCloseConsentLayerListener","addErrorListener","error","addClickLinkListener","url","addATTStatusChangeListener","setUrlConfig","config","setWebViewConfig","setATTStatus","status","checkAndOpen","jumpToSettings","forceOpen","getUserStatus","getStatusForPurpose","purposeId","getStatusForVendor","vendorId","getGoogleConsentModeStatus","exportCMPInfo","importCMPInfo","cmpString","resetConsentManagementData","acceptVendors","vendors","rejectVendors","acceptPurposes","purposes","updatePurpose","rejectPurposes","updateVendor","rejectAll","acceptAll","isNewArchitectureEnabled","global","RN$Bridgeless","RN$TurboInterop"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,EAAEC,kBAAkB,QAAQ,cAAc;AAC1E,OAAOC,wBAAwB,MASxB,+BAA4B;AAEnC,MAAMC,aAAa,GACjB,8FAA8F,GAC9FH,QAAQ,CAACI,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,+BAA+B;;AAEjC;AACA,MAAMC,kBAAkB,GAAGL,wBAAwB,K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AAYA,eAAelD,kBAAkB","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export type ConsentReceivedEvent = {
3
+ consent: string;
4
+ jsonObject: Object;
5
+ };
6
+ export type ErrorEvent = {
7
+ error: string;
8
+ };
9
+ export type LinkClickEvent = {
10
+ url: string;
11
+ };
12
+ export type ATTStatusChangeEvent = {
13
+ oldStatus: number;
14
+ newStatus: number;
15
+ lastUpdated: number;
16
+ };
17
+ export type UrlConfig = {
18
+ id: string;
19
+ domain: string;
20
+ language: string;
21
+ appName: string;
22
+ noHash?: boolean;
23
+ };
24
+ export type WebViewConfig = {
25
+ position?: string;
26
+ cornerRadius?: number;
27
+ respectsSafeArea?: boolean;
28
+ allowsOrientationChanges?: boolean;
29
+ backgroundStyle?: {
30
+ type?: string;
31
+ color?: string;
32
+ opacity?: number;
33
+ };
34
+ };
35
+ export type UserStatus = {
36
+ status: string;
37
+ vendors: Object;
38
+ purposes: Object;
39
+ tcf: string;
40
+ addtlConsent: string;
41
+ regulation: string;
42
+ };
43
+ export type GoogleConsentModeStatus = Object;
44
+ export interface Spec extends TurboModule {
45
+ setUrlConfig(config: UrlConfig): Promise<void>;
46
+ setWebViewConfig(config: WebViewConfig): Promise<void>;
47
+ setATTStatus(status: number): Promise<void>;
48
+ checkAndOpen(jumpToSettings: boolean): Promise<boolean>;
49
+ forceOpen(jumpToSettings: boolean): Promise<boolean>;
50
+ getUserStatus(): Promise<UserStatus>;
51
+ getStatusForPurpose(purposeId: string): Promise<string>;
52
+ getStatusForVendor(vendorId: string): Promise<string>;
53
+ getGoogleConsentModeStatus(): Promise<GoogleConsentModeStatus>;
54
+ exportCMPInfo(): Promise<string>;
55
+ importCMPInfo(cmpString: string): Promise<boolean>;
56
+ resetConsentManagementData(): Promise<boolean>;
57
+ acceptVendors(vendors: string[]): Promise<boolean>;
58
+ rejectVendors(vendors: string[]): Promise<boolean>;
59
+ acceptPurposes(purposes: string[], updatePurpose: boolean): Promise<boolean>;
60
+ rejectPurposes(purposes: string[], updateVendor: boolean): Promise<boolean>;
61
+ rejectAll(): Promise<boolean>;
62
+ acceptAll(): Promise<boolean>;
63
+ addListener(eventName: string): void;
64
+ removeListeners(count: number): void;
65
+ }
66
+ declare const _default: Spec;
67
+ export default _default;
68
+ //# sourceMappingURL=NativeCmSdkReactNativeV3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeCmSdkReactNativeV3.d.ts","sourceRoot":"","sources":["../../../../src/NativeCmSdkReactNativeV3.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAIhD,MAAM,MAAM,oBAAoB,GAAG;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,K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G,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7E,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5E,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAG9B,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;;AAED,wBAA4E"}
@@ -1,38 +1,31 @@
1
- declare const CmSdkReactNativeV3: any;
2
- export declare const addConsentListener: (callback: (consent: string, jsonObject: any) => void) => import("react-native").EmitterSubscription;
1
+ import { type ConsentReceivedEvent, type ErrorEvent, type LinkClickEvent, type ATTStatusChangeEvent, type UrlConfig, type WebViewConfig, type UserStatus, type GoogleConsentModeStatus } from './NativeCmSdkReactNativeV3';
2
+ declare const CmSdkReactNativeV3: import("./NativeCmSdkReactNativeV3").Spec;
3
+ export declare const isTurboModuleEnabled: boolean;
4
+ export declare const addConsentListener: (callback: (consent: string, jsonObject: Object) => void) => import("react-native").EmitterSubscription;
3
5
  export declare const addShowConsentLayerListener: (callback: () => void) => import("react-native").EmitterSubscription;
4
6
  export declare const addCloseConsentLayerListener: (callback: () => void) => import("react-native").EmitterSubscription;
5
7
  export declare const addErrorListener: (callback: (error: string) => void) => import("react-native").EmitterSubscription;
6
8
  export declare const addClickLinkListener: (callback: (url: string) => void) => import("react-native").EmitterSubscription;
7
- export declare const setUrlConfig: any;
8
- export declare const setWebViewConfig: any;
9
- export declare const checkAndOpen: any;
10
- export declare const forceOpen: any;
11
- export declare const jumpToSettings: any;
12
- export declare const getUserStatus: any;
13
- export declare const getStatusForPurpose: any;
14
- export declare const getStatusForVendor: any;
15
- export declare const getGoogleConsentModeStatus: any;
16
- export declare const exportCMPInfo: any;
17
- export declare const importCMPInfo: any;
18
- export declare const resetConsentManagementData: any;
19
- export declare const acceptVendors: any;
20
- export declare const rejectVendors: any;
21
- export declare const acceptPurposes: any;
22
- export declare const rejectPurposes: any;
23
- export declare const rejectAll: any;
24
- export declare const acceptAll: any;
25
- export declare const checkWithServerAndOpenIfNecessary: any;
26
- export declare const openConsentLayer: any;
27
- export declare const checkIfConsentIsRequired: any;
28
- export declare const hasUserChoice: any;
29
- export declare const hasPurposeConsent: any;
30
- export declare const hasVendorConsent: any;
31
- export declare const getAllPurposesIDs: any;
32
- export declare const getEnabledPurposesIDs: any;
33
- export declare const getDisabledPurposesIDs: any;
34
- export declare const getAllVendorsIDs: any;
35
- export declare const getEnabledVendorsIDs: any;
36
- export declare const getDisabledVendorsIDs: any;
9
+ export declare const addATTStatusChangeListener: (callback: (event: ATTStatusChangeEvent) => void) => import("react-native").EmitterSubscription;
10
+ export declare const setUrlConfig: (config: UrlConfig) => Promise<void>;
11
+ export declare const setWebViewConfig: (config: WebViewConfig) => Promise<void>;
12
+ export declare const setATTStatus: (status: number) => Promise<void>;
13
+ export declare const checkAndOpen: (jumpToSettings: boolean) => Promise<boolean>;
14
+ export declare const forceOpen: (jumpToSettings: boolean) => Promise<boolean>;
15
+ export declare const getUserStatus: () => Promise<UserStatus>;
16
+ export declare const getStatusForPurpose: (purposeId: string) => Promise<string>;
17
+ export declare const getStatusForVendor: (vendorId: string) => Promise<string>;
18
+ export declare const getGoogleConsentModeStatus: () => Promise<GoogleConsentModeStatus>;
19
+ export declare const exportCMPInfo: () => Promise<string>;
20
+ export declare const importCMPInfo: (cmpString: string) => Promise<boolean>;
21
+ export declare const resetConsentManagementData: () => Promise<boolean>;
22
+ export declare const acceptVendors: (vendors: string[]) => Promise<boolean>;
23
+ export declare const rejectVendors: (vendors: string[]) => Promise<boolean>;
24
+ export declare const acceptPurposes: (purposes: string[], updatePurpose: boolean) => Promise<boolean>;
25
+ export declare const rejectPurposes: (purposes: string[], updateVendor: boolean) => Promise<boolean>;
26
+ export declare const rejectAll: () => Promise<boolean>;
27
+ export declare const acceptAll: () => Promise<boolean>;
28
+ export declare const isNewArchitectureEnabled: () => boolean;
29
+ export type { ConsentReceivedEvent, ErrorEvent, LinkClickEvent, ATTStatusChangeEvent, UrlConfig, WebViewConfig, UserStatus, GoogleConsentModeStatus, };
37
30
  export default CmSdkReactNativeV3;
38
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,kBAAkB,KASnB,CAAC;AAIN,eAAO,MAAM,kBAAkB,GAC7B,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,IAAI,+CAKrD,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,UAAU,MAAM,IAAI,+CAE/D,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,UAAU,MAAM,IAAI,+CAEhE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,UAAU,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,+CAIjE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,+CAInE,CAAC;AAGF,eAAO,MAAM,YAAY,KAAkC,CAAC;AAC5D,eAAO,MAAM,gBAAgB,KAAsC,CAAC;AAGpE,eAAO,MAAM,YAAY,KAAkC,CAAC;AAC5D,eAAO,MAAM,SAAS,KAA+B,CAAC;AACtD,eAAO,MAAM,cAAc,KAAoC,CAAC;AAGhE,eAAO,MAAM,aAAa,KAAmC,CAAC;AAC9D,eAAO,MAAM,mBAAmB,KAAyC,CAAC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uB,CAE5E,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,OAAO,CAAC,MAAM,CAE9C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,KAAG,OAAO,CAAC,OAAO,CAEhE,CAAC;AAEF,eAAO,MAAM,0BAA0B,QAAO,OAAO,CAAC,OAAO,CAE5D,CAAC;AAGF,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,EAAE,KAAG,OAAO,CAAC,OAAO,CAEhE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,EAAE,KAAG,OAAO,CAAC,OAAO,CAEhE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,EAAE,eAAe,OAAO,KAAG,OAAO,CAAC,OAAO,CAE1F,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,EAAE,cAAc,OAAO,KAAG,OAAO,CAAC,OAAO,CAEzF,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAAO,CAAC,OAAO,CAE3C,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAAO,CAAC,OAAO,CAE3C,CAAC;AAGF,eAAO,MAAM,wBAAwB,QAAO,OAkB3C,CAAC;AAGF,YAAY,EACV,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,GACxB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,68 @@
1
+ import type { TurboModule } from 'react-native';
2
+ export type ConsentReceivedEvent = {
3
+ consent: string;
4
+ jsonObject: Object;
5
+ };
6
+ export type ErrorEvent = {
7
+ error: string;
8
+ };
9
+ export type LinkClickEvent = {
10
+ url: string;
11
+ };
12
+ export type ATTStatusChangeEvent = {
13
+ oldStatus: number;
14
+ newStatus: number;
15
+ lastUpdated: number;
16
+ };
17
+ export type UrlConfig = {
18
+ id: string;
19
+ domain: string;
20
+ language: string;
21
+ appName: string;
22
+ noHash?: boolean;
23
+ };
24
+ export type WebViewConfig = {
25
+ position?: string;
26
+ cornerRadius?: number;
27
+ respectsSafeArea?: boolean;
28
+ allowsOrientationChanges?: boolean;
29
+ backgroundStyle?: {
30
+ type?: string;
31
+ color?: string;
32
+ opacity?: number;
33
+ };
34
+ };
35
+ export type UserStatus = {
36
+ status: string;
37
+ vendors: Object;
38
+ purposes: Object;
39
+ tcf: string;
40
+ addtlConsent: string;
41
+ regulation: string;
42
+ };
43
+ export type GoogleConsentModeStatus = Object;
44
+ export interface Spec extends TurboModule {
45
+ setUrlConfig(config: UrlConfig): Promise<void>;
46
+ setWebViewConfig(config: WebViewConfig): Promise<void>;
47
+ setATTStatus(status: number): Promise<void>;
48
+ checkAndOpen(jumpToSettings: boolean): Promise<boolean>;
49
+ forceOpen(jumpToSettings: boolean): Promise<boolean>;
50
+ getUserStatus(): Promise<UserStatus>;
51
+ getStatusForPurpose(purposeId: string): Promise<string>;
52
+ getStatusForVendor(vendorId: string): Promise<string>;
53
+ getGoogleConsentModeStatus(): Promise<GoogleConsentModeStatus>;
54
+ exportCMPInfo(): Promise<string>;
55
+ importCMPInfo(cmpString: string): Promise<boolean>;
56
+ resetConsentManagementData(): Promise<boolean>;
57
+ acceptVendors(vendors: string[]): Promise<boolean>;
58
+ rejectVendors(vendors: string[]): Promise<boolean>;
59
+ acceptPurposes(purposes: string[], updatePurpose: boolean): Promise<boolean>;
60
+ rejectPurposes(purposes: string[], updateVendor: boolean): Promise<boolean>;
61
+ rejectAll(): Promise<boolean>;
62
+ acceptAll(): Promise<boolean>;
63
+ addListener(eventName: string): void;
64
+ removeListeners(count: number): void;
65
+ }
66
+ declare const _default: Spec;
67
+ export default _default;
68
+ //# sourceMappingURL=NativeCmSdkReactNativeV3.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeCmSdkReactNativeV3.d.ts","sourceRoot":"","sources":["../../../../src/NativeCmSdkReactNativeV3.ts"],"names":[],"mappings":"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C,OAAO,CAAC,CAAC;IAC9B,SAAS,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAG9B,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;;AAED,wBAA4E"}
@@ -1,38 +1,31 @@
1
- declare const CmSdkReactNativeV3: any;
2
- export declare const addConsentListener: (callback: (consent: string, jsonObject: any) => void) => import("react-native").EmitterSubscription;
1
+ import { type ConsentReceivedEvent, type ErrorEvent, type LinkClickEvent, type ATTStatusChangeEvent, type UrlConfig, type WebViewConfig, type UserStatus, type GoogleConsentModeStatus } from './NativeCmSdkReactNativeV3';
2
+ declare const CmSdkReactNativeV3: import("./NativeCmSdkReactNativeV3").Spec;
3
+ export declare const isTurboModuleEnabled: boolean;
4
+ export declare const addConsentListener: (callback: (consent: string, jsonObject: Object) => void) => import("react-native").EmitterSubscription;
3
5
  export declare const addShowConsentLayerListener: (callback: () => void) => import("react-native").EmitterSubscription;
4
6
  export declare const addCloseConsentLayerListener: (callback: () => void) => import("react-native").EmitterSubscription;
5
7
  export declare const addErrorListener: (callback: (error: string) => void) => import("react-native").EmitterSubscription;
6
8
  export declare const addClickLinkListener: (callback: (url: string) => void) => import("react-native").EmitterSubscription;
7
- export declare const setUrlConfig: any;
8
- export declare const setWebViewConfig: any;
9
- export declare const checkAndOpen: any;
10
- export declare const forceOpen: any;
11
- export declare const jumpToSettings: any;
12
- export declare const getUserStatus: any;
13
- export declare const getStatusForPurpose: any;
14
- export declare const getStatusForVendor: any;
15
- export declare const getGoogleConsentModeStatus: any;
16
- export declare const exportCMPInfo: any;
17
- export declare const importCMPInfo: any;
18
- export declare const resetConsentManagementData: any;
19
- export declare const acceptVendors: any;
20
- export declare const rejectVendors: any;
21
- export declare const acceptPurposes: any;
22
- export declare const rejectPurposes: any;
23
- export declare const rejectAll: any;
24
- export declare const acceptAll: any;
25
- export declare const checkWithServerAndOpenIfNecessary: any;
26
- export declare const openConsentLayer: any;
27
- export declare const checkIfConsentIsRequired: any;
28
- export declare const hasUserChoice: any;
29
- export declare const hasPurposeConsent: any;
30
- export declare const hasVendorConsent: any;
31
- export declare const getAllPurposesIDs: any;
32
- export declare const getEnabledPurposesIDs: any;
33
- export declare const getDisabledPurposesIDs: any;
34
- export declare const getAllVendorsIDs: any;
35
- export declare const getEnabledVendorsIDs: any;
36
- export declare const getDisabledVendorsIDs: any;
9
+ export declare const addATTStatusChangeListener: (callback: (event: ATTStatusChangeEvent) => void) => import("react-native").EmitterSubscription;
10
+ export declare const setUrlConfig: (config: UrlConfig) => Promise<void>;
11
+ export declare const setWebViewConfig: (config: WebViewConfig) => Promise<void>;
12
+ export declare const setATTStatus: (status: number) => Promise<void>;
13
+ export declare const checkAndOpen: (jumpToSettings: boolean) => Promise<boolean>;
14
+ export declare const forceOpen: (jumpToSettings: boolean) => Promise<boolean>;
15
+ export declare const getUserStatus: () => Promise<UserStatus>;
16
+ export declare const getStatusForPurpose: (purposeId: string) => Promise<string>;
17
+ export declare const getStatusForVendor: (vendorId: string) => Promise<string>;
18
+ export declare const getGoogleConsentModeStatus: () => Promise<GoogleConsentModeStatus>;
19
+ export declare const exportCMPInfo: () => Promise<string>;
20
+ export declare const importCMPInfo: (cmpString: string) => Promise<boolean>;
21
+ export declare const resetConsentManagementData: () => Promise<boolean>;
22
+ export declare const acceptVendors: (vendors: string[]) => Promise<boolean>;
23
+ export declare const rejectVendors: (vendors: string[]) => Promise<boolean>;
24
+ export declare const acceptPurposes: (purposes: string[], updatePurpose: boolean) => Promise<boolean>;
25
+ export declare const rejectPurposes: (purposes: string[], updateVendor: boolean) => Promise<boolean>;
26
+ export declare const rejectAll: () => Promise<boolean>;
27
+ export declare const acceptAll: () => Promise<boolean>;
28
+ export declare const isNewArchitectureEnabled: () => boolean;
29
+ export type { ConsentReceivedEvent, ErrorEvent, LinkClickEvent, ATTStatusChangeEvent, UrlConfig, WebViewConfig, UserStatus, GoogleConsentModeStatus, };
37
30
  export default CmSdkReactNativeV3;
38
31
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"AAQA,QAAA,MAAM,kBAAkB,KASnB,CAAC;AAIN,eAAO,MAAM,kBAAkB,GAC7B,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,IAAI,+CAKrD,CAAC;AAEF,eAAO,MAAM,2BAA2B,GAAI,UAAU,MAAM,IAAI,+CAE/D,CAAC;AAEF,eAAO,MAAM,4BAA4B,GAAI,UAAU,MAAM,IAAI,+CAEhE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,UAAU,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,+CAIjE,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,+CAInE,CAAC;AAGF,eAAO,MAAM,YAAY,KAAkC,CAAC;AAC5D,eAAO,MAAM,gBAAgB,KAAsC,CAAC;AAGpE,eAAO,MAAM,YAAY,KAAkC,CAAC;AAC5D,eAAO,MAAM,SAAS,KAA+B,CAAC;AACtD,eAAO,MAAM,cAAc,KAAoC,CAAC;AAGhE,eAAO,MAAM,aAAa,KAAmC,CAAC;AAC9D,eAAO,MAAM,mBAAmB,KAAyC,CAAC;AAC1E,eAAO,MAAM,kBAAkB,KAAwC,CAAC;AACxE,eAAO,MAAM,0BAA0B,KAAgD,CAAC;AACxF,eAAO,MAAM,aAAa,KAAmC,CAAC;AAC9D,eAAO,MAAM,aAAa,KAAmC,CAAC;AAC9D,eAAO,MAAM,0BAA0B,KAAgD,CAAC;AAGxF,eAAO,MAAM,aAAa,KAAmC,CAAC;AAC9D,eAAO,MAAM,aAAa,KAAmC,CAAC;AAC9D,eAAO,MAAM,cAAc,KAAoC,CAAC;AAChE,eAAO,MAAM,cAAc,KAAoC,CA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,EAAE,KAAG,OAAO,CAAC,OAAO,CAEhE,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,EAAE,eAAe,OAAO,KAAG,OAAO,CAAC,OAAO,CAE1F,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,MAAM,EAAE,EAAE,cAAc,OAAO,KAAG,OAAO,CAAC,OAAO,CAEzF,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAAO,CAAC,OAAO,CAE3C,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,OAAO,CAAC,OAAO,CAE3C,CAAC;AAGF,eAAO,MAAM,wBAAwB,QAAO,OAkB3C,CAAC;AAGF,YAAY,EACV,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,oBAAoB,EACpB,SAAS,EACT,aAAa,EACb,UAAU,EACV,uBAAuB,GACxB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-sdk-react-native-v3",
3
- "version": "3.5.3",
3
+ "version": "3.6.1",
4
4
  "description": "Consent Management React Native Library by consentmanager.net",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",
@@ -65,13 +65,14 @@
65
65
  "@react-native/eslint-config": "^0.73.1",
66
66
  "@types/jest": "^29.5.5",
67
67
  "@types/react": "^18.2.44",
68
+ "babel-plugin-module-resolver": "^5.0.2",
68
69
  "del-cli": "^5.1.0",
69
70
  "eslint": "^8.51.0",
70
71
  "eslint-config-prettier": "^9.0.0",
71
72
  "jest": "^29.7.0",
72
73
  "prettier": "^3.0.3",
73
74
  "react": "18.3.1",
74
- "react-native": "0.75.4",
75
+ "react-native": "0.81.5",
75
76
  "react-native-builder-bob": "^0.30.2",
76
77
  "typescript": "^5.2.2"
77
78
  },
@@ -175,5 +176,10 @@
175
176
  "type": "module-legacy",
176
177
  "languages": "kotlin-swift",
177
178
  "version": "0.41.2"
179
+ },
180
+ "codegenConfig": {
181
+ "name": "CmSdkReactNativeV3Spec",
182
+ "type": "modules",
183
+ "jsSrcsDir": "src"
178
184
  }
179
185
  }
@@ -15,7 +15,7 @@ Pod::Spec.new do |s|
15
15
  s.source = { :git => "https://github.com/iubenda/cm-sdk-react-native-v3.git", :tag => "#{s.version}" }
16
16
 
17
17
  s.source_files = "ios/**/*.{h,m,mm,swift}"
18
- s.dependency "cm-sdk-ios-v3", "3.5.2"
18
+ s.dependency "cm-sdk-ios-v3", "3.6.0"
19
19
 
20
20
  # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0.
21
21
  # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79.
@@ -0,0 +1,92 @@
1
+ import type { TurboModule } from 'react-native';
2
+ import { TurboModuleRegistry } from 'react-native';
3
+
4
+ // Event payload types for better TypeScript support
5
+ export type ConsentReceivedEvent = {
6
+ consent: string;
7
+ jsonObject: Object;
8
+ };
9
+
10
+ export type ErrorEvent = {
11
+ error: string;
12
+ };
13
+
14
+ export type LinkClickEvent = {
15
+ url: string;
16
+ };
17
+
18
+ export type ATTStatusChangeEvent = {
19
+ oldStatus: number;
20
+ newStatus: number;
21
+ lastUpdated: number;
22
+ };
23
+
24
+ // Additional type definitions for better TypeScript support
25
+ export type UrlConfig = {
26
+ id: string;
27
+ domain: string;
28
+ language: string;
29
+ appName: string;
30
+ noHash?: boolean;
31
+ };
32
+
33
+ export type WebViewConfig = {
34
+ position?: string;
35
+ cornerRadius?: number;
36
+ respectsSafeArea?: boolean;
37
+ allowsOrientationChanges?: boolean;
38
+ backgroundStyle?: {
39
+ type?: string;
40
+ color?: string;
41
+ opacity?: number;
42
+ };
43
+ };
44
+
45
+ export type UserStatus = {
46
+ status: string;
47
+ vendors: Object;
48
+ purposes: Object;
49
+ tcf: string;
50
+ addtlConsent: string;
51
+ regulation: string;
52
+ };
53
+
54
+ export type GoogleConsentModeStatus = Object;
55
+
56
+ export interface Spec extends TurboModule {
57
+ // Configuration methods
58
+ setUrlConfig(config: UrlConfig): Promise<void>;
59
+
60
+ setWebViewConfig(config: WebViewConfig): Promise<void>;
61
+
62
+ // iOS-only ATT status method
63
+ setATTStatus(status: number): Promise<void>;
64
+
65
+ // Main interaction methods
66
+ checkAndOpen(jumpToSettings: boolean): Promise<boolean>;
67
+ forceOpen(jumpToSettings: boolean): Promise<boolean>;
68
+
69
+ // Consent status methods
70
+ getUserStatus(): Promise<UserStatus>;
71
+
72
+ getStatusForPurpose(purposeId: string): Promise<string>;
73
+ getStatusForVendor(vendorId: string): Promise<string>;
74
+ getGoogleConsentModeStatus(): Promise<GoogleConsentModeStatus>;
75
+ exportCMPInfo(): Promise<string>;
76
+ importCMPInfo(cmpString: string): Promise<boolean>;
77
+ resetConsentManagementData(): Promise<boolean>;
78
+
79
+ // Consent modification methods
80
+ acceptVendors(vendors: string[]): Promise<boolean>;
81
+ rejectVendors(vendors: string[]): Promise<boolean>;
82
+ acceptPurposes(purposes: string[], updatePurpose: boolean): Promise<boolean>;
83
+ rejectPurposes(purposes: string[], updateVendor: boolean): Promise<boolean>;
84
+ rejectAll(): Promise<boolean>;
85
+ acceptAll(): Promise<boolean>;
86
+
87
+ // Event emitter methods (required for TurboModule)
88
+ addListener(eventName: string): void;
89
+ removeListeners(count: number): void;
90
+ }
91
+
92
+ export default TurboModuleRegistry.getEnforcing<Spec>('CmSdkReactNativeV3');