@contentpass/react-native-contentpass-cmp-onetrust 0.1.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.
Files changed (68) hide show
  1. package/lib/commonjs/OnetrustCmpAdapter.js +138 -0
  2. package/lib/commonjs/OnetrustCmpAdapter.js.map +1 -0
  3. package/lib/commonjs/index.js +17 -0
  4. package/lib/commonjs/index.js.map +1 -0
  5. package/lib/commonjs/package.json +1 -0
  6. package/lib/commonjs/purposes.js +58 -0
  7. package/lib/commonjs/purposes.js.map +1 -0
  8. package/lib/commonjs/purposes.test.js +242 -0
  9. package/lib/commonjs/purposes.test.js.map +1 -0
  10. package/lib/commonjs/react-native-onetrust-cmp.d.js +2 -0
  11. package/lib/commonjs/react-native-onetrust-cmp.d.js.map +1 -0
  12. package/lib/commonjs/types.js +2 -0
  13. package/lib/commonjs/types.js.map +1 -0
  14. package/lib/module/OnetrustCmpAdapter.js +132 -0
  15. package/lib/module/OnetrustCmpAdapter.js.map +1 -0
  16. package/lib/module/index.js +6 -0
  17. package/lib/module/index.js.map +1 -0
  18. package/lib/module/purposes.js +54 -0
  19. package/lib/module/purposes.js.map +1 -0
  20. package/lib/module/purposes.test.js +242 -0
  21. package/lib/module/purposes.test.js.map +1 -0
  22. package/lib/module/react-native-onetrust-cmp.d.js +2 -0
  23. package/lib/module/react-native-onetrust-cmp.d.js.map +1 -0
  24. package/lib/module/types.js +2 -0
  25. package/lib/module/types.js.map +1 -0
  26. package/lib/typescript/react-native-contentpass/src/Contentpass.d.ts +41 -0
  27. package/lib/typescript/react-native-contentpass/src/Contentpass.d.ts.map +1 -0
  28. package/lib/typescript/react-native-contentpass/src/OidcAuthStateStorage.d.ts +15 -0
  29. package/lib/typescript/react-native-contentpass/src/OidcAuthStateStorage.d.ts.map +1 -0
  30. package/lib/typescript/react-native-contentpass/src/consts/oidcConsts.d.ts +4 -0
  31. package/lib/typescript/react-native-contentpass/src/consts/oidcConsts.d.ts.map +1 -0
  32. package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/fetchContentpassToken.d.ts +6 -0
  33. package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/fetchContentpassToken.d.ts.map +1 -0
  34. package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/parseContentpassToken.d.ts +17 -0
  35. package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/parseContentpassToken.d.ts.map +1 -0
  36. package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/validateSubscription.d.ts +2 -0
  37. package/lib/typescript/react-native-contentpass/src/contentpassTokenUtils/validateSubscription.d.ts.map +1 -0
  38. package/lib/typescript/react-native-contentpass/src/countImpressionUtils/sendPageViewEvent.d.ts +8 -0
  39. package/lib/typescript/react-native-contentpass/src/countImpressionUtils/sendPageViewEvent.d.ts.map +1 -0
  40. package/lib/typescript/react-native-contentpass/src/countImpressionUtils/sendStats.d.ts +11 -0
  41. package/lib/typescript/react-native-contentpass/src/countImpressionUtils/sendStats.d.ts.map +1 -0
  42. package/lib/typescript/react-native-contentpass/src/index.d.ts +12 -0
  43. package/lib/typescript/react-native-contentpass/src/index.d.ts.map +1 -0
  44. package/lib/typescript/react-native-contentpass/src/logger.d.ts +8 -0
  45. package/lib/typescript/react-native-contentpass/src/logger.d.ts.map +1 -0
  46. package/lib/typescript/react-native-contentpass/src/sdkContext/ContentpassSdkProvider.d.ts +9 -0
  47. package/lib/typescript/react-native-contentpass/src/sdkContext/ContentpassSdkProvider.d.ts.map +1 -0
  48. package/lib/typescript/react-native-contentpass/src/sdkContext/useContentpassSdk.d.ts +3 -0
  49. package/lib/typescript/react-native-contentpass/src/sdkContext/useContentpassSdk.d.ts.map +1 -0
  50. package/lib/typescript/react-native-contentpass/src/sentryIntegration.d.ts +11 -0
  51. package/lib/typescript/react-native-contentpass/src/sentryIntegration.d.ts.map +1 -0
  52. package/lib/typescript/react-native-contentpass/src/types/CmpAdapter.d.ts +14 -0
  53. package/lib/typescript/react-native-contentpass/src/types/CmpAdapter.d.ts.map +1 -0
  54. package/lib/typescript/react-native-contentpass/src/types/ContentpassConfig.d.ts +11 -0
  55. package/lib/typescript/react-native-contentpass/src/types/ContentpassConfig.d.ts.map +1 -0
  56. package/lib/typescript/react-native-contentpass/src/types/ContentpassState.d.ts +28 -0
  57. package/lib/typescript/react-native-contentpass/src/types/ContentpassState.d.ts.map +1 -0
  58. package/lib/typescript/react-native-contentpass/src/types/RefreshTokenStrategy.d.ts +6 -0
  59. package/lib/typescript/react-native-contentpass/src/types/RefreshTokenStrategy.d.ts.map +1 -0
  60. package/lib/typescript/react-native-contentpass-cmp-onetrust/src/OnetrustCmpAdapter.d.ts +30 -0
  61. package/lib/typescript/react-native-contentpass-cmp-onetrust/src/OnetrustCmpAdapter.d.ts.map +1 -0
  62. package/lib/typescript/react-native-contentpass-cmp-onetrust/src/index.d.ts +4 -0
  63. package/lib/typescript/react-native-contentpass-cmp-onetrust/src/index.d.ts.map +1 -0
  64. package/lib/typescript/react-native-contentpass-cmp-onetrust/src/purposes.d.ts +3 -0
  65. package/lib/typescript/react-native-contentpass-cmp-onetrust/src/purposes.d.ts.map +1 -0
  66. package/lib/typescript/react-native-contentpass-cmp-onetrust/src/types.d.ts +101 -0
  67. package/lib/typescript/react-native-contentpass-cmp-onetrust/src/types.d.ts.map +1 -0
  68. package/package.json +88 -0
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ import OnetrustCmpAdapter, { createOnetrustCmpAdapter } from './OnetrustCmpAdapter';
4
+ export default OnetrustCmpAdapter;
5
+ export { createOnetrustCmpAdapter };
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["OnetrustCmpAdapter","createOnetrustCmpAdapter"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,OAAOA,kBAAkB,IACvBC,wBAAwB,QACnB,sBAAsB;AAE7B,eAAeD,kBAAkB;AAEjC,SAASC,wBAAwB","ignoreList":[]}
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ const TYPE_MAP = {
4
+ IAB2_PURPOSE: {
5
+ groupIdPrefix: 'IABV2_',
6
+ resultPrefix: ''
7
+ },
8
+ IAB2V2_PURPOSE: {
9
+ groupIdPrefix: 'IAB2V2_',
10
+ resultPrefix: ''
11
+ },
12
+ IAB2_SPL_PURPOSE: {
13
+ groupIdPrefix: 'ISPV2_',
14
+ resultPrefix: 's'
15
+ },
16
+ IAB2V2_SPL_PURPOSE: {
17
+ groupIdPrefix: 'ISP2V2_',
18
+ resultPrefix: 's'
19
+ },
20
+ IAB2_FEATURE: {
21
+ groupIdPrefix: 'IFEV2_',
22
+ resultPrefix: 'f'
23
+ },
24
+ IAB2V2_FEATURE: {
25
+ groupIdPrefix: 'IFE2V2_',
26
+ resultPrefix: 'f'
27
+ },
28
+ IAB2_SPL_FEATURE: {
29
+ groupIdPrefix: 'ISFV2_',
30
+ resultPrefix: 'sf'
31
+ },
32
+ IAB2V2_SPL_FEATURE: {
33
+ groupIdPrefix: 'ISF2V2_',
34
+ resultPrefix: 'sf'
35
+ }
36
+ };
37
+ export function getTcfPurposes(purposes) {
38
+ const results = [];
39
+ const visit = purpose => {
40
+ const mapped = TYPE_MAP[purpose.type];
41
+ if (mapped && purpose.groupId?.startsWith(mapped.groupIdPrefix)) {
42
+ const key = purpose.groupId.substring(mapped.groupIdPrefix.length);
43
+ if (key) {
44
+ results.push(`${mapped.resultPrefix}${key}`);
45
+ }
46
+ }
47
+ if (purpose.children?.length) {
48
+ purpose.children.forEach(visit);
49
+ }
50
+ };
51
+ purposes.forEach(visit);
52
+ return results;
53
+ }
54
+ //# sourceMappingURL=purposes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["TYPE_MAP","IAB2_PURPOSE","groupIdPrefix","resultPrefix","IAB2V2_PURPOSE","IAB2_SPL_PURPOSE","IAB2V2_SPL_PURPOSE","IAB2_FEATURE","IAB2V2_FEATURE","IAB2_SPL_FEATURE","IAB2V2_SPL_FEATURE","getTcfPurposes","purposes","results","visit","purpose","mapped","type","groupId","startsWith","key","substring","length","push","children","forEach"],"sourceRoot":"../../src","sources":["purposes.ts"],"mappings":";;AAEA,MAAMA,QAAQ,GAAG;EACfC,YAAY,EAAE;IACZC,aAAa,EAAE,QAAQ;IACvBC,YAAY,EAAE;EAChB,CAAC;EACDC,cAAc,EAAE;IACdF,aAAa,EAAE,SAAS;IACxBC,YAAY,EAAE;EAChB,CAAC;EACDE,gBAAgB,EAAE;IAChBH,aAAa,EAAE,QAAQ;IACvBC,YAAY,EAAE;EAChB,CAAC;EACDG,kBAAkB,EAAE;IAClBJ,aAAa,EAAE,SAAS;IACxBC,YAAY,EAAE;EAChB,CAAC;EACDI,YAAY,EAAE;IACZL,aAAa,EAAE,QAAQ;IACvBC,YAAY,EAAE;EAChB,CAAC;EACDK,cAAc,EAAE;IACdN,aAAa,EAAE,SAAS;IACxBC,YAAY,EAAE;EAChB,CAAC;EACDM,gBAAgB,EAAE;IAChBP,aAAa,EAAE,QAAQ;IACvBC,YAAY,EAAE;EAChB,CAAC;EACDO,kBAAkB,EAAE;IAClBR,aAAa,EAAE,SAAS;IACxBC,YAAY,EAAE;EAChB;AACF,CAAC;AAED,OAAO,SAASQ,cAAcA,CAACC,QAAmB,EAAY;EAC5D,MAAMC,OAAiB,GAAG,EAAE;EAE5B,MAAMC,KAAK,GAAIC,OAAgB,IAAK;IAClC,MAAMC,MAAM,GAAGhB,QAAQ,CAACe,OAAO,CAACE,IAAI,CAA0B;IAC9D,IAAID,MAAM,IAAID,OAAO,CAACG,OAAO,EAAEC,UAAU,CAACH,MAAM,CAACd,aAAa,CAAC,EAAE;MAC/D,MAAMkB,GAAG,GAAGL,OAAO,CAACG,OAAO,CAACG,SAAS,CAACL,MAAM,CAACd,aAAa,CAACoB,MAAM,CAAC;MAClE,IAAIF,GAAG,EAAE;QACPP,OAAO,CAACU,IAAI,CAAC,GAAGP,MAAM,CAACb,YAAY,GAAGiB,GAAG,EAAE,CAAC;MAC9C;IACF;IAEA,IAAIL,OAAO,CAACS,QAAQ,EAAEF,MAAM,EAAE;MAC5BP,OAAO,CAACS,QAAQ,CAACC,OAAO,CAACX,KAAK,CAAC;IACjC;EACF,CAAC;EAEDF,QAAQ,CAACa,OAAO,CAACX,KAAK,CAAC;EAEvB,OAAOD,OAAO;AAChB","ignoreList":[]}
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+
3
+ import { getTcfPurposes } from './purposes';
4
+ const makePurpose = overrides => ({
5
+ purposeId: '',
6
+ descriptionLegal: '',
7
+ legIntStatus: 0,
8
+ vendorsLinkedInfo: '',
9
+ parent: '',
10
+ consentStatus: 0,
11
+ firstPartyCookies: [],
12
+ iabIllustrations: [],
13
+ showSDKListLink: false,
14
+ generalVendorsIds: [],
15
+ groupDescription: '',
16
+ children: [],
17
+ groupName: '',
18
+ isIabPurpose: true,
19
+ consentToggleStatus: 0,
20
+ ...overrides
21
+ });
22
+ describe('getTcfPurposes', () => {
23
+ it('should return an empty array when given no purposes', () => {
24
+ expect(getTcfPurposes([])).toEqual([]);
25
+ });
26
+
27
+ // --- IAB2_PURPOSE ---
28
+
29
+ it('should extract key from IAB2_PURPOSE with IABV2_ prefix', () => {
30
+ const purposes = [makePurpose({
31
+ type: 'IAB2_PURPOSE',
32
+ groupId: 'IABV2_1'
33
+ })];
34
+ expect(getTcfPurposes(purposes)).toEqual(['1']);
35
+ });
36
+ it('should not add a resultPrefix for IAB2_PURPOSE', () => {
37
+ const purposes = [makePurpose({
38
+ type: 'IAB2_PURPOSE',
39
+ groupId: 'IABV2_42'
40
+ })];
41
+ expect(getTcfPurposes(purposes)).toEqual(['42']);
42
+ });
43
+
44
+ // --- IAB2V2_PURPOSE ---
45
+
46
+ it('should extract key from IAB2V2_PURPOSE with IAB2V2_ prefix', () => {
47
+ const purposes = [makePurpose({
48
+ type: 'IAB2V2_PURPOSE',
49
+ groupId: 'IAB2V2_3'
50
+ })];
51
+ expect(getTcfPurposes(purposes)).toEqual(['3']);
52
+ });
53
+
54
+ // --- IAB2_SPL_PURPOSE ---
55
+
56
+ it('should prefix result with "s" for IAB2_SPL_PURPOSE', () => {
57
+ const purposes = [makePurpose({
58
+ type: 'IAB2_SPL_PURPOSE',
59
+ groupId: 'ISPV2_5'
60
+ })];
61
+ expect(getTcfPurposes(purposes)).toEqual(['s5']);
62
+ });
63
+
64
+ // --- IAB2V2_SPL_PURPOSE ---
65
+
66
+ it('should prefix result with "s" for IAB2V2_SPL_PURPOSE', () => {
67
+ const purposes = [makePurpose({
68
+ type: 'IAB2V2_SPL_PURPOSE',
69
+ groupId: 'ISP2V2_7'
70
+ })];
71
+ expect(getTcfPurposes(purposes)).toEqual(['s7']);
72
+ });
73
+
74
+ // --- IAB2_FEATURE ---
75
+
76
+ it('should prefix result with "f" for IAB2_FEATURE', () => {
77
+ const purposes = [makePurpose({
78
+ type: 'IAB2_FEATURE',
79
+ groupId: 'IFEV2_2'
80
+ })];
81
+ expect(getTcfPurposes(purposes)).toEqual(['f2']);
82
+ });
83
+
84
+ // --- IAB2V2_FEATURE ---
85
+
86
+ it('should prefix result with "f" for IAB2V2_FEATURE', () => {
87
+ const purposes = [makePurpose({
88
+ type: 'IAB2V2_FEATURE',
89
+ groupId: 'IFE2V2_9'
90
+ })];
91
+ expect(getTcfPurposes(purposes)).toEqual(['f9']);
92
+ });
93
+
94
+ // --- IAB2_SPL_FEATURE ---
95
+
96
+ it('should prefix result with "sf" for IAB2_SPL_FEATURE', () => {
97
+ const purposes = [makePurpose({
98
+ type: 'IAB2_SPL_FEATURE',
99
+ groupId: 'ISFV2_4'
100
+ })];
101
+ expect(getTcfPurposes(purposes)).toEqual(['sf4']);
102
+ });
103
+
104
+ // --- IAB2V2_SPL_FEATURE ---
105
+
106
+ it('should prefix result with "sf" for IAB2V2_SPL_FEATURE', () => {
107
+ const purposes = [makePurpose({
108
+ type: 'IAB2V2_SPL_FEATURE',
109
+ groupId: 'ISF2V2_6'
110
+ })];
111
+ expect(getTcfPurposes(purposes)).toEqual(['sf6']);
112
+ });
113
+
114
+ // --- filtering & edge cases ---
115
+
116
+ it('should ignore purposes with an unknown type', () => {
117
+ const purposes = [makePurpose({
118
+ type: 'UNKNOWN_TYPE',
119
+ groupId: 'IABV2_1'
120
+ })];
121
+ expect(getTcfPurposes(purposes)).toEqual([]);
122
+ });
123
+ it('should ignore purposes whose groupId does not start with the expected prefix', () => {
124
+ const purposes = [makePurpose({
125
+ type: 'IAB2_PURPOSE',
126
+ groupId: 'WRONG_1'
127
+ })];
128
+ expect(getTcfPurposes(purposes)).toEqual([]);
129
+ });
130
+ it('should ignore purposes where groupId equals the prefix exactly (empty key)', () => {
131
+ const purposes = [makePurpose({
132
+ type: 'IAB2_PURPOSE',
133
+ groupId: 'IABV2_'
134
+ })];
135
+ expect(getTcfPurposes(purposes)).toEqual([]);
136
+ });
137
+ it('should ignore purposes with an undefined groupId', () => {
138
+ const purposes = [makePurpose({
139
+ type: 'IAB2_PURPOSE',
140
+ groupId: undefined
141
+ })];
142
+ expect(getTcfPurposes(purposes)).toEqual([]);
143
+ });
144
+
145
+ // --- multiple purposes ---
146
+
147
+ it('should collect results from multiple top-level purposes', () => {
148
+ const purposes = [makePurpose({
149
+ type: 'IAB2_PURPOSE',
150
+ groupId: 'IABV2_1'
151
+ }), makePurpose({
152
+ type: 'IAB2_FEATURE',
153
+ groupId: 'IFEV2_2'
154
+ }), makePurpose({
155
+ type: 'IAB2_SPL_PURPOSE',
156
+ groupId: 'ISPV2_3'
157
+ })];
158
+ expect(getTcfPurposes(purposes)).toEqual(['1', 'f2', 's3']);
159
+ });
160
+ it('should skip non-matching purposes while collecting matching ones', () => {
161
+ const purposes = [makePurpose({
162
+ type: 'IAB2_PURPOSE',
163
+ groupId: 'IABV2_1'
164
+ }), makePurpose({
165
+ type: 'UNKNOWN_TYPE',
166
+ groupId: 'IABV2_99'
167
+ }), makePurpose({
168
+ type: 'IAB2_FEATURE',
169
+ groupId: 'IFEV2_2'
170
+ })];
171
+ expect(getTcfPurposes(purposes)).toEqual(['1', 'f2']);
172
+ });
173
+
174
+ // --- nested children ---
175
+
176
+ it('should recursively visit children and collect their results', () => {
177
+ const purposes = [makePurpose({
178
+ type: 'IAB2_PURPOSE',
179
+ groupId: 'IABV2_1',
180
+ children: [makePurpose({
181
+ type: 'IAB2_PURPOSE',
182
+ groupId: 'IABV2_2'
183
+ }), makePurpose({
184
+ type: 'IAB2_FEATURE',
185
+ groupId: 'IFEV2_3'
186
+ })]
187
+ })];
188
+ expect(getTcfPurposes(purposes)).toEqual(['1', '2', 'f3']);
189
+ });
190
+ it('should handle deeply nested children', () => {
191
+ const purposes = [makePurpose({
192
+ type: 'IAB2_PURPOSE',
193
+ groupId: 'IABV2_1',
194
+ children: [makePurpose({
195
+ type: 'IAB2_PURPOSE',
196
+ groupId: 'IABV2_2',
197
+ children: [makePurpose({
198
+ type: 'IAB2_SPL_FEATURE',
199
+ groupId: 'ISFV2_10'
200
+ })]
201
+ })]
202
+ })];
203
+ expect(getTcfPurposes(purposes)).toEqual(['1', '2', 'sf10']);
204
+ });
205
+ it('should collect children even when the parent does not match', () => {
206
+ const purposes = [makePurpose({
207
+ type: 'UNKNOWN_TYPE',
208
+ groupId: 'WHATEVER',
209
+ children: [makePurpose({
210
+ type: 'IAB2_PURPOSE',
211
+ groupId: 'IABV2_5'
212
+ })]
213
+ })];
214
+ expect(getTcfPurposes(purposes)).toEqual(['5']);
215
+ });
216
+ it('should handle children being an empty array', () => {
217
+ const purposes = [makePurpose({
218
+ type: 'IAB2_PURPOSE',
219
+ groupId: 'IABV2_1',
220
+ children: []
221
+ })];
222
+ expect(getTcfPurposes(purposes)).toEqual(['1']);
223
+ });
224
+
225
+ // --- groupId key extraction ---
226
+
227
+ it('should preserve multi-character keys after the prefix', () => {
228
+ const purposes = [makePurpose({
229
+ type: 'IAB2_PURPOSE',
230
+ groupId: 'IABV2_123'
231
+ })];
232
+ expect(getTcfPurposes(purposes)).toEqual(['123']);
233
+ });
234
+ it('should preserve non-numeric keys after the prefix', () => {
235
+ const purposes = [makePurpose({
236
+ type: 'IAB2_PURPOSE',
237
+ groupId: 'IABV2_abc'
238
+ })];
239
+ expect(getTcfPurposes(purposes)).toEqual(['abc']);
240
+ });
241
+ });
242
+ //# sourceMappingURL=purposes.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getTcfPurposes","makePurpose","overrides","purposeId","descriptionLegal","legIntStatus","vendorsLinkedInfo","parent","consentStatus","firstPartyCookies","iabIllustrations","showSDKListLink","generalVendorsIds","groupDescription","children","groupName","isIabPurpose","consentToggleStatus","describe","it","expect","toEqual","purposes","type","groupId","undefined"],"sourceRoot":"../../src","sources":["purposes.test.ts"],"mappings":";;AACA,SAASA,cAAc,QAAQ,YAAY;AAE3C,MAAMC,WAAW,GACfC,SAA+D,KAClD;EACbC,SAAS,EAAE,EAAE;EACbC,gBAAgB,EAAE,EAAE;EACpBC,YAAY,EAAE,CAAC;EACfC,iBAAiB,EAAE,EAAE;EACrBC,MAAM,EAAE,EAAE;EACVC,aAAa,EAAE,CAAC;EAChBC,iBAAiB,EAAE,EAAE;EACrBC,gBAAgB,EAAE,EAAE;EACpBC,eAAe,EAAE,KAAK;EACtBC,iBAAiB,EAAE,EAAE;EACrBC,gBAAgB,EAAE,EAAE;EACpBC,QAAQ,EAAE,EAAE;EACZC,SAAS,EAAE,EAAE;EACbC,YAAY,EAAE,IAAI;EAClBC,mBAAmB,EAAE,CAAC;EACtB,GAAGf;AACL,CAAC,CAAC;AAEFgB,QAAQ,CAAC,gBAAgB,EAAE,MAAM;EAC/BC,EAAE,CAAC,qDAAqD,EAAE,MAAM;IAC9DC,MAAM,CAACpB,cAAc,CAAC,EAAE,CAAC,CAAC,CAACqB,OAAO,CAAC,EAAE,CAAC;EACxC,CAAC,CAAC;;EAEF;;EAEAF,EAAE,CAAC,yDAAyD,EAAE,MAAM;IAClE,MAAMG,QAAQ,GAAG,CACfrB,WAAW,CAAC;MAAEsB,IAAI,EAAE,cAAc;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,cAAc;MAAEC,OAAO,EAAE;IAAY,CAAC,CAAC,CAC5D;IAEDJ,MAAM,CAACpB,cAAc,CAACsB,QAAQ,CAAC,CAAC,CAACD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;EACnD,CAAC,CAAC;EAEFF,EAAE,CAAC,mDAAmD,EAAE,MAAM;IAC5D,MAAMG,QAAQ,GAAG,CACfrB,WAAW,CAAC;MAAEsB,IAAI,EAAE,cAAc;MAAEC,OAAO,EAAE;IAAY,CAAC,CAAC,CAC5D;IAEDJ,MAAM,CAACpB,cAAc,CAACsB,QAAQ,CAAC,CAAC,CAACD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC;EACnD,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=react-native-onetrust-cmp.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["react-native-onetrust-cmp.d.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ import { type ContentpassState } from './types/ContentpassState';
2
+ import type { ContentpassConfig } from './types/ContentpassConfig';
3
+ export type ContentpassObserver = (state: ContentpassState) => void;
4
+ interface ContentpassInterface {
5
+ authenticate: (route?: 'login' | 'signup') => Promise<void>;
6
+ countImpression: () => Promise<void>;
7
+ event: (eventCategory: string, eventAction: string, eventLabel?: string, samplingRate?: number) => Promise<void>;
8
+ logout: () => Promise<void>;
9
+ registerObserver: (observer: ContentpassObserver) => void;
10
+ recoverFromError: () => Promise<void>;
11
+ unregisterObserver: (observer: ContentpassObserver) => void;
12
+ }
13
+ export default class Contentpass implements ContentpassInterface {
14
+ private authStateStorage;
15
+ private readonly config;
16
+ private readonly samplingRate;
17
+ private instanceId;
18
+ private contentpassState;
19
+ private contentpassStateObservers;
20
+ private oidcAuthState;
21
+ private refreshTimer;
22
+ constructor(config: ContentpassConfig);
23
+ authenticate: (route?: "login" | "signup") => Promise<void>;
24
+ event: (eventCategory: string, eventAction: string, eventLabel?: string, samplingRate?: number) => Promise<void>;
25
+ registerObserver(observer: ContentpassObserver): void;
26
+ unregisterObserver(observer: ContentpassObserver): void;
27
+ logout: () => Promise<void>;
28
+ recoverFromError: () => Promise<void>;
29
+ countImpression: () => Promise<void>;
30
+ private countPaidImpressionWhenUserHasValidSub;
31
+ private countSampledImpression;
32
+ private initialiseAuthState;
33
+ private onNewAuthState;
34
+ private setupRefreshTimer;
35
+ private refreshToken;
36
+ private onRefreshTokenError;
37
+ private changeContentpassState;
38
+ private hasValidSubscriptionAndAccessToken;
39
+ }
40
+ export {};
41
+ //# sourceMappingURL=Contentpass.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Contentpass.d.ts","sourceRoot":"","sources":["../../../../../react-native-contentpass/src/Contentpass.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,gBAAgB,EAEtB,MAAM,0BAA0B,CAAC;AAUlC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAQnE,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAEpE,UAAU,oBAAoB;IAC5B,YAAY,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,KAAK,EAAE,CACL,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,EACnB,YAAY,CAAC,EAAE,MAAM,KAClB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,MAAM,EAAE,MAAM,O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0,0 +1,15 @@
1
+ export type OidcAuthState = {
2
+ accessToken: string;
3
+ accessTokenExpirationDate: string;
4
+ idToken: string;
5
+ refreshToken: string | null;
6
+ tokenType: string;
7
+ };
8
+ export default class OidcAuthStateStorage {
9
+ private readonly key;
10
+ constructor(clientId: string);
11
+ storeOidcAuthState(authState: OidcAuthState): Promise<void>;
12
+ getOidcAuthState(): Promise<OidcAuthState | undefined>;
13
+ clearOidcAuthState(): Promise<void>;
14
+ }
15
+ //# sourceMappingURL=OidcAuthStateStorage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OidcAuthStateStorage.d.ts","sourceRoot":"","sources":["../../../../../react-native-contentpass/src/OidcAuthStateStorage.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,yBAAyB,EAAE,MAAM,CAAC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,oBAAoB;IACvC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAET,QAAQ,EAAE,MAAM;IAIf,kBAAkB,CAAC,SAAS,EAAE,aAAa;IAI3C,gBAAgB,IAAI,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAMtD,kBAAkB;CAShC"}
@@ -0,0 +1,4 @@
1
+ export declare const SCOPES: string[];
2
+ export declare const TOKEN_ENDPOINT = "/auth/oidc/token";
3
+ export declare const REFRESH_TOKEN_RETRIES = 6;
4
+ //# sourceMappingURL=oidcConsts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"oidcConsts.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/consts/oidcConsts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM,UAA8C,CAAC;AAClE,eAAO,MAAM,cAAc,qBAAqB,CAAC;AACjD,eAAO,MAAM,qBAAqB,IAAI,CAAC"}
@@ -0,0 +1,6 @@
1
+ export default function fetchContentpassToken({ idToken, propertyId, issuer, }: {
2
+ idToken: string;
3
+ propertyId: string;
4
+ issuer: string;
5
+ }): Promise<any>;
6
+ //# sourceMappingURL=fetchContentpassToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchContentpassToken.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/contentpassTokenUtils/fetchContentpassToken.ts"],"names":[],"mappings":"AAEA,wBAA8B,qBAAqB,CAAC,EAClD,OAAO,EACP,UAAU,EACV,MAAM,GACP,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB,gBAsBA"}
@@ -0,0 +1,17 @@
1
+ type ParsedToken = {
2
+ body: {
3
+ aud: string;
4
+ auth: boolean;
5
+ exp: number;
6
+ iat: number;
7
+ plans: string[];
8
+ type: string;
9
+ };
10
+ header: {
11
+ alg: string;
12
+ kid: string;
13
+ };
14
+ };
15
+ export default function parseContentpassToken(contentpassToken: string): ParsedToken;
16
+ export {};
17
+ //# sourceMappingURL=parseContentpassToken.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseContentpassToken.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/contentpassTokenUtils/parseContentpassToken.ts"],"names":[],"mappings":"AAAA,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,OAAO,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,EAAE;QACN,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;CACH,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,gBAAgB,EAAE,MAAM,GACvB,WAAW,CAab"}
@@ -0,0 +1,2 @@
1
+ export default function validateSubscription(contentpassToken: string): boolean;
2
+ //# sourceMappingURL=validateSubscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateSubscription.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/contentpassTokenUtils/validateSubscription.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,gBAAgB,EAAE,MAAM,WAQpE"}
@@ -0,0 +1,8 @@
1
+ type HitEndpointArgs = {
2
+ propertyId: string;
3
+ impressionId: string;
4
+ accessToken: string;
5
+ };
6
+ export default function sendPageViewEvent(apiUrl: string, payload: HitEndpointArgs): Promise<Response>;
7
+ export {};
8
+ //# sourceMappingURL=sendPageViewEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendPageViewEvent.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/countImpressionUtils/sendPageViewEvent.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,wBAA8B,iBAAiB,CAC7C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,eAAe,qBAkBzB"}
@@ -0,0 +1,11 @@
1
+ type StatsPayload = {
2
+ ea: string;
3
+ ec: string;
4
+ el?: string;
5
+ cpabid: string;
6
+ cppid: string;
7
+ cpsr: number;
8
+ };
9
+ export default function sendStats(apiUrl: string, payload: StatsPayload): Promise<Response>;
10
+ export {};
11
+ //# sourceMappingURL=sendStats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sendStats.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/countImpressionUtils/sendStats.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,wBAA8B,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,qBAc5E"}
@@ -0,0 +1,12 @@
1
+ import type { ContentpassState, ErrorState, AuthenticatedState, InitialisingState, UnauthenticatedState } from './types/ContentpassState';
2
+ import { ContentpassStateType } from './types/ContentpassState';
3
+ import type { ContentpassConfig } from './types/ContentpassConfig';
4
+ import type { CmpAdapter } from './types/CmpAdapter';
5
+ declare const FOOBAR = 123;
6
+ export { FOOBAR };
7
+ import { type default as Contentpass, type ContentpassObserver } from './Contentpass';
8
+ import { ContentpassSdkProvider } from './sdkContext/ContentpassSdkProvider';
9
+ import { default as useContentpassSdk } from './sdkContext/useContentpassSdk';
10
+ export { ContentpassStateType, ContentpassSdkProvider, useContentpassSdk };
11
+ export type { Contentpass, ContentpassState, ErrorState, AuthenticatedState, InitialisingState, UnauthenticatedState, ContentpassConfig, CmpAdapter, ContentpassObserver, };
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../react-native-contentpass/src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,QAAA,MAAM,MAAM,MAAM,CAAC;AAEnB,OAAO,EAAE,MAAM,EAAE,CAAC;AAElB,OAAO,EACL,KAAK,OAAO,IAAI,WAAW,EAC3B,KAAK,mBAAmB,EACzB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,CAAC;AAC3E,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,mBAAmB,GACpB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { logger, type transportFunctionType } from 'react-native-logs';
2
+ import type { Severity } from './types/ContentpassConfig';
3
+ import type { ConsoleTransportOptions } from 'react-native-logs/dist/transports/consoleTransport';
4
+ type Logger = ReturnType<typeof logger.createLogger<transportFunctionType<ConsoleTransportOptions>>>;
5
+ declare const log: Logger;
6
+ export declare const enableLogger: (severity: Severity) => void;
7
+ export default log;
8
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../../../react-native-contentpass/src/logger.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oDAAoD,CAAC;AAElG,KAAK,MAAM,GAAG,UAAU,CACtB,OAAO,MAAM,CAAC,YAAY,CAAC,qBAAqB,CAAC,uBAAuB,CAAC,CAAC,CAC3E,CAAC;AAEF,QAAA,MAAM,GAAG,EAAE,MAWT,CAAC;AAEH,eAAO,MAAM,YAAY,GAAI,UAAU,QAAQ,SAK9C,CAAC;AAEF,eAAe,GAAG,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { ContentpassConfig } from '../types/ContentpassConfig';
3
+ import Contentpass from '../Contentpass';
4
+ export declare const contentpassSdkContext: React.Context<Contentpass | undefined>;
5
+ export declare const ContentpassSdkProvider: ({ children, contentpassConfig, }: {
6
+ children: React.ReactNode;
7
+ contentpassConfig: ContentpassConfig;
8
+ }) => import("react/jsx-runtime").JSX.Element | null;
9
+ //# sourceMappingURL=ContentpassSdkProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentpassSdkProvider.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/sdkContext/ContentpassSdkProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,eAAO,MAAM,qBAAqB,wCAEjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,kCAGpC;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,iBAAiB,EAAE,iBAAiB,CAAC;CACtC,mDAoBA,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare const useContentpassSdk: () => import("..").Contentpass;
2
+ export default useContentpassSdk;
3
+ //# sourceMappingURL=useContentpassSdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useContentpassSdk.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/sdkContext/useContentpassSdk.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,iBAAiB,gCAUtB,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,11 @@
1
+ type InitSentryArgs = {
2
+ propertyId: string;
3
+ };
4
+ export declare const initSentry: (args: InitSentryArgs) => void;
5
+ type ReportErrorOptions = {
6
+ msg?: string;
7
+ };
8
+ export declare const reportError: (err: Error, { msg }?: ReportErrorOptions) => void;
9
+ export declare const __internal_reset_sentry_scope: () => void;
10
+ export {};
11
+ //# sourceMappingURL=sentryIntegration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sentryIntegration.d.ts","sourceRoot":"","sources":["../../../../../react-native-contentpass/src/sentryIntegration.ts"],"names":[],"mappings":"AAiCA,KAAK,cAAc,GAAG;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAIF,eAAO,MAAM,UAAU,GAAI,MAAM,cAAc,SAqB9C,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,KAAK,KAAK,EAAE,UAAS,kBAAuB,SAevE,CAAC;AAEF,eAAO,MAAM,6BAA6B,YAEzC,CAAC"}
@@ -0,0 +1,14 @@
1
+ export type CmpAdapter = {
2
+ acceptAll: () => Promise<void>;
3
+ denyAll: () => Promise<void>;
4
+ getCustomPurposes?: (supportedLanguages: string[]) => Promise<Map<string, string>>;
5
+ getNumberOfVendors: () => Promise<number>;
6
+ getRequiredPurposes: () => Promise<string[]>;
7
+ hasFullConsent: () => Promise<boolean>;
8
+ onConsentStatusChange: (callback: (fullConsent: boolean) => void) => void;
9
+ onAdapterEvent?: (eventName: string, callback: (data?: any) => void) => () => void;
10
+ onEvent?: (callback: (eventName: string, data?: any) => void) => () => void;
11
+ showSecondLayer: (view: 'vendor' | 'purpose') => Promise<void>;
12
+ waitForInit: () => Promise<void>;
13
+ };
14
+ //# sourceMappingURL=CmpAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CmpAdapter.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/types/CmpAdapter.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,SAAS,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,iBAAiB,CAAC,EAAE,CAClB,kBAAkB,EAAE,MAAM,EAAE,KACzB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAClC,kBAAkB,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,mBAAmB,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7C,cAAc,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACvC,qBAAqB,EAAE,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,IAAI,KAAK,IAAI,CAAC;IAC1E,cAAc,CAAC,EAAE,CACf,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,KAC3B,MAAM,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IAC5E,eAAe,EAAE,CAAC,IAAI,EAAE,QAAQ,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/D,WAAW,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAClC,CAAC"}
@@ -0,0 +1,11 @@
1
+ export type Severity = 'debug' | 'info' | 'warn' | 'error';
2
+ export type ContentpassConfig = {
3
+ propertyId: string;
4
+ planId: string;
5
+ redirectUrl: string;
6
+ issuer: string;
7
+ apiUrl: string;
8
+ samplingRate?: number;
9
+ logLevel?: Severity;
10
+ };
11
+ //# sourceMappingURL=ContentpassConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentpassConfig.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/types/ContentpassConfig.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE3D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB,CAAC"}
@@ -0,0 +1,28 @@
1
+ export declare enum ContentpassStateType {
2
+ INITIALISING = "INITIALISING",
3
+ UNAUTHENTICATED = "UNAUTHENTICATED",
4
+ AUTHENTICATED = "AUTHENTICATED",
5
+ ERROR = "ERROR"
6
+ }
7
+ export type InitialisingState = {
8
+ state: ContentpassStateType.INITIALISING;
9
+ hasValidSubscription?: never;
10
+ error?: never;
11
+ };
12
+ export type UnauthenticatedState = {
13
+ state: ContentpassStateType.UNAUTHENTICATED;
14
+ hasValidSubscription: false;
15
+ error?: never;
16
+ };
17
+ export type AuthenticatedState = {
18
+ state: ContentpassStateType.AUTHENTICATED;
19
+ hasValidSubscription: boolean;
20
+ error?: never;
21
+ };
22
+ export type ErrorState = {
23
+ state: ContentpassStateType.ERROR;
24
+ hasValidSubscription?: never;
25
+ error: unknown;
26
+ };
27
+ export type ContentpassState = InitialisingState | UnauthenticatedState | AuthenticatedState | ErrorState;
28
+ //# sourceMappingURL=ContentpassState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContentpassState.d.ts","sourceRoot":"","sources":["../../../../../../react-native-contentpass/src/types/ContentpassState.ts"],"names":[],"mappings":"AAEA,oBAAY,oBAAoB;IAC9B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,aAAa,kBAAkB;IAC/B,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,oBAAoB,CAAC,YAAY,CAAC;IACzC,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,oBAAoB,CAAC,eAAe,CAAC;IAC5C,oBAAoB,EAAE,KAAK,CAAC;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC;IAC1C,oBAAoB,EAAE,OAAO,CAAC;IAC9B,KAAK,CAAC,EAAE,KAAK,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,oBAAoB,CAAC,KAAK,CAAC;IAClC,oBAAoB,CAAC,EAAE,KAAK,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GACxB,iBAAiB,GACjB,oBAAoB,GACpB,kBAAkB,GAClB,UAAU,CAAC"}