tapjoy-react-native-sdk 14.3.1 → 14.5.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 (50) hide show
  1. package/android/build.gradle +3 -3
  2. package/android/gradle.properties +3 -3
  3. package/android/src/main/java/com/tapjoyreactnativesdk/TJOfferwallDiscoverNativeView.kt +2 -2
  4. package/android/src/main/java/com/tapjoyreactnativesdk/TapjoyReactNativeSdkModule.kt +57 -13
  5. package/example/Gemfile +9 -1
  6. package/example/android/app/build.gradle +3 -3
  7. package/example/android/app/src/main/java/com/tapjoyreactnativesdkexample/MainApplication.kt +2 -8
  8. package/example/android/build.gradle +5 -5
  9. package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  10. package/example/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  11. package/example/android/gradle.properties +5 -0
  12. package/example/android/gradlew +2 -3
  13. package/example/babel.config.js +0 -9
  14. package/example/ios/AppDelegate.swift +55 -0
  15. package/example/ios/Podfile +0 -1
  16. package/example/ios/TapjoyReactNativeSdkExample/Info.plist +1 -1
  17. package/example/ios/TapjoyReactNativeSdkExample.xcodeproj/project.pbxproj +5 -62
  18. package/example/metro.config.js +10 -16
  19. package/example/package.json +20 -19
  20. package/example/src/App.tsx +1 -2
  21. package/example/src/MainScreen.tsx +107 -58
  22. package/example/src/OfferwallDiscoverScreen.tsx +105 -91
  23. package/example/src/OfferwallScreen.tsx +170 -156
  24. package/example/src/Styles.ts +3 -2
  25. package/example/src/UserProperties.tsx +150 -135
  26. package/ios/TapjoyReactNativeSdk.m +4 -1
  27. package/ios/TapjoyReactNativeSdk.swift +14 -6
  28. package/lib/commonjs/TJLoggingLevel.js +8 -0
  29. package/lib/commonjs/TJVersion.js +1 -1
  30. package/lib/commonjs/Tapjoy.js +41 -1
  31. package/lib/commonjs/TapjoyEvent.js +1 -1
  32. package/lib/commonjs/index.js +2 -1
  33. package/lib/typescript/TJLoggingLevel.d.ts +7 -0
  34. package/lib/typescript/Tapjoy.d.ts +31 -0
  35. package/lib/typescript/TapjoyEvent.d.ts +1 -1
  36. package/lib/typescript/index.d.ts +4 -1
  37. package/package.json +8 -15
  38. package/src/TJLoggingLevel.ts +8 -0
  39. package/src/TJStatus.ts +1 -1
  40. package/src/TJVersion.ts +1 -1
  41. package/src/Tapjoy.ts +46 -3
  42. package/src/TapjoyEvent.ts +2 -2
  43. package/src/index.ts +4 -0
  44. package/tapjoy-react-native-sdk.podspec +1 -1
  45. package/example/ios/TapjoyReactNativeSdkExample/AppDelegate.h +0 -6
  46. package/example/ios/TapjoyReactNativeSdkExample/AppDelegate.mm +0 -31
  47. package/example/ios/TapjoyReactNativeSdkExample/main.m +0 -10
  48. package/example/ios/TapjoyReactNativeSdkExampleTests/Info.plist +0 -24
  49. package/example/ios/TapjoyReactNativeSdkExampleTests/TapjoyReactNativeSdkExampleTests.m +0 -66
  50. package/example/package-lock.json +0 -8605
@@ -3,10 +3,13 @@ import {
3
3
  View,
4
4
  TextInput,
5
5
  Text,
6
- SafeAreaView,
7
6
  ScrollView,
8
7
  Platform,
9
8
  } from 'react-native';
9
+ import {
10
+ SafeAreaProvider,
11
+ useSafeAreaInsets,
12
+ } from 'react-native-safe-area-context';
10
13
  import AsyncStorage from '@react-native-async-storage/async-storage';
11
14
  import Button from './Button';
12
15
  import styles from './Styles';
@@ -255,157 +258,169 @@ const UserProperties: React.FC = () => {
255
258
  setOptOut(item.value);
256
259
  };
257
260
 
261
+ const safeAreaInsets = useSafeAreaInsets();
262
+
258
263
  return (
259
- <ScrollView>
260
- <SafeAreaView style={styles.container}>
261
- <View style={styles.lineGap}>
262
- <Text style={styles.statusText}>{statusLabelText}</Text>
263
- </View>
264
- <View style={styles.inputContainer}>
265
- <Text style={styles.userPropertiesLabel}>User ID:</Text>
266
- <TextInput
267
- style={styles.textInput}
268
- value={userId}
269
- onChangeText={setUserId}
270
- placeholder="Enter user ID"
271
- placeholderTextColor="#888"
272
- />
273
- <Button
274
- style={styles.clearButton}
275
- onPress={handleClearInput}
276
- title={'\u2573'}
277
- />
278
- </View>
279
- <View style={styles.inputContainer}>
280
- <Text style={styles.userPropertiesLabel}>Max Level:</Text>
281
- <TextInput
282
- style={styles.textInput}
283
- value={maxLevel}
284
- keyboardType={'numeric'}
285
- onChangeText={setMaxLevel}
286
- placeholder="Enter max level"
287
- placeholderTextColor="#888"
288
- />
289
- <Button
290
- style={styles.clearButton}
291
- onPress={handleClearMaxLevel}
292
- title={'\u2573'}
293
- />
294
- </View>
295
- <View style={styles.inputContainer}>
296
- <Text style={styles.userPropertiesLabel}>User Level:</Text>
297
- <TextInput
298
- style={styles.textInput}
299
- value={userLevel}
300
- keyboardType={'numeric'}
301
- onChangeText={setUserLevel}
302
- placeholder="Enter user level"
303
- placeholderTextColor="#888"
304
- />
305
- <Button
306
- style={styles.clearButton}
307
- onPress={handleClearUserLevel}
308
- title={'\u2573'}
309
- />
310
- </View>
311
- <View style={styles.inputContainer}>
312
- <Text style={styles.userPropertiesLabel}>User Tags:</Text>
313
- <TextInput
314
- style={styles.textInput}
315
- value={userTag}
316
- onChangeText={setUserTag}
317
- placeholder="Enter user tag"
318
- placeholderTextColor="#888"
319
- />
320
- </View>
321
- <View style={styles.horizontalContainer}>
322
- <Button
323
- style={styles.buttonTag}
324
- onPress={handleAddUserTag}
325
- title={'Add'}
326
- />
327
- <Button
328
- style={styles.buttonTag}
329
- onPress={handleRemoveUserTag}
330
- title={'Remove'}
331
- />
332
- <Button
333
- style={styles.buttonTag}
334
- onPress={handleClearUserTag}
335
- title={'Clear'}
336
- />
337
- </View>
338
- <View style={styles.selectionContainer}>
339
- <View style={styles.horizontalContainer}>
340
- <Text style={styles.userPropertiesLabel}>User Segment:</Text>
341
- <SelectionMenu
342
- data={segmentData}
343
- onSelectItem={handleUserSegment}
344
- initialSelectedItem={initialUserSegmentItem}
264
+ <SafeAreaProvider>
265
+ <ScrollView>
266
+ <View style={[
267
+ styles.mainContainer,
268
+ {
269
+ paddingTop: safeAreaInsets.top,
270
+ paddingBottom: safeAreaInsets.bottom,
271
+ paddingLeft: safeAreaInsets.left,
272
+ paddingRight: safeAreaInsets.right,
273
+ },
274
+ ]}>
275
+ <View style={styles.lineGap}>
276
+ <Text style={styles.statusText}>{statusLabelText}</Text>
277
+ </View>
278
+ <View style={styles.inputContainer}>
279
+ <Text style={styles.userPropertiesLabel}>User ID:</Text>
280
+ <TextInput
281
+ style={styles.textInput}
282
+ value={userId}
283
+ onChangeText={setUserId}
284
+ placeholder="Enter user ID"
285
+ placeholderTextColor="#888"
286
+ />
287
+ <Button
288
+ style={styles.clearButton}
289
+ onPress={handleClearInput}
290
+ title={'\u2573'}
345
291
  />
346
292
  </View>
347
- </View>
348
- <View style={styles.selectionContainer}>
349
- <View style={styles.horizontalContainer}>
350
- <Text style={styles.userPropertiesLabel}>Subject To GDPR:</Text>
351
- <SelectionMenu
352
- data={statusData}
353
- onSelectItem={handleSubjectToGDPR}
354
- initialSelectedItem={initialSubjectToGDPRItem}
293
+ <View style={styles.inputContainer}>
294
+ <Text style={styles.userPropertiesLabel}>Max Level:</Text>
295
+ <TextInput
296
+ style={styles.textInput}
297
+ value={maxLevel}
298
+ keyboardType={'numeric'}
299
+ onChangeText={setMaxLevel}
300
+ placeholder="Enter max level"
301
+ placeholderTextColor="#888"
302
+ />
303
+ <Button
304
+ style={styles.clearButton}
305
+ onPress={handleClearMaxLevel}
306
+ title={'\u2573'}
355
307
  />
356
308
  </View>
357
- </View>
358
- <View style={styles.selectionContainer}>
359
- <View style={styles.horizontalContainer}>
360
- <Text style={styles.userPropertiesLabel}>Below Consent Age:</Text>
361
- <SelectionMenu
362
- data={statusData}
363
- onSelectItem={handleBelowConsentAge}
364
- initialSelectedItem={initialBelowConsentAgeItem}
309
+ <View style={styles.inputContainer}>
310
+ <Text style={styles.userPropertiesLabel}>User Level:</Text>
311
+ <TextInput
312
+ style={styles.textInput}
313
+ value={userLevel}
314
+ keyboardType={'numeric'}
315
+ onChangeText={setUserLevel}
316
+ placeholder="Enter user level"
317
+ placeholderTextColor="#888"
318
+ />
319
+ <Button
320
+ style={styles.clearButton}
321
+ onPress={handleClearUserLevel}
322
+ title={'\u2573'}
323
+ />
324
+ </View>
325
+ <View style={styles.inputContainer}>
326
+ <Text style={styles.userPropertiesLabel}>User Tags:</Text>
327
+ <TextInput
328
+ style={styles.textInput}
329
+ value={userTag}
330
+ onChangeText={setUserTag}
331
+ placeholder="Enter user tag"
332
+ placeholderTextColor="#888"
365
333
  />
366
334
  </View>
367
- </View>
368
- <View style={styles.selectionContainer}>
369
335
  <View style={styles.horizontalContainer}>
370
- <Text style={styles.userPropertiesLabel}>User Consent:</Text>
371
- <SelectionMenu
372
- data={statusData}
373
- onSelectItem={handleUserConsent}
374
- initialSelectedItem={initialUserConsentItem}
336
+ <Button
337
+ style={styles.buttonTag}
338
+ onPress={handleAddUserTag}
339
+ title={'Add'}
340
+ />
341
+ <Button
342
+ style={styles.buttonTag}
343
+ onPress={handleRemoveUserTag}
344
+ title={'Remove'}
345
+ />
346
+ <Button
347
+ style={styles.buttonTag}
348
+ onPress={handleClearUserTag}
349
+ title={'Clear'}
375
350
  />
376
351
  </View>
377
- </View>
378
- <View style={styles.inputContainer}>
379
- <Text style={styles.userPropertiesLabel}>US Privacy:</Text>
380
- <TextInput
381
- style={styles.textInput}
382
- value={USPrivacy}
383
- onChangeText={handleUSPrivacy}
384
- placeholder="E.g 1YYN"
385
- placeholderTextColor="#888"
386
- />
387
- </View>
388
- {Platform.OS === 'android' && (
389
352
  <View style={styles.selectionContainer}>
390
353
  <View style={styles.horizontalContainer}>
391
- <Text style={styles.userPropertiesLabel}>Opt Out Ad ID:</Text>
354
+ <Text style={styles.userPropertiesLabel}>User Segment:</Text>
392
355
  <SelectionMenu
393
- data={optOutAdData}
394
- onSelectItem={handleOptOut}
395
- initialSelectedItem={initialOptOutItem}
356
+ data={segmentData}
357
+ onSelectItem={handleUserSegment}
358
+ initialSelectedItem={initialUserSegmentItem}
396
359
  />
397
360
  </View>
398
361
  </View>
399
- )}
400
- <View style={styles.buttonContainer}>
401
- <Button
402
- style={styles.button}
403
- onPress={applyProperties}
404
- title={'Apply'}
405
- />
362
+ <View style={styles.selectionContainer}>
363
+ <View style={styles.horizontalContainer}>
364
+ <Text style={styles.userPropertiesLabel}>Subject To GDPR:</Text>
365
+ <SelectionMenu
366
+ data={statusData}
367
+ onSelectItem={handleSubjectToGDPR}
368
+ initialSelectedItem={initialSubjectToGDPRItem}
369
+ />
370
+ </View>
371
+ </View>
372
+ <View style={styles.selectionContainer}>
373
+ <View style={styles.horizontalContainer}>
374
+ <Text style={styles.userPropertiesLabel}>Below Consent Age:</Text>
375
+ <SelectionMenu
376
+ data={statusData}
377
+ onSelectItem={handleBelowConsentAge}
378
+ initialSelectedItem={initialBelowConsentAgeItem}
379
+ />
380
+ </View>
381
+ </View>
382
+ <View style={styles.selectionContainer}>
383
+ <View style={styles.horizontalContainer}>
384
+ <Text style={styles.userPropertiesLabel}>User Consent:</Text>
385
+ <SelectionMenu
386
+ data={statusData}
387
+ onSelectItem={handleUserConsent}
388
+ initialSelectedItem={initialUserConsentItem}
389
+ />
390
+ </View>
391
+ </View>
392
+ <View style={styles.inputContainer}>
393
+ <Text style={styles.userPropertiesLabel}>US Privacy:</Text>
394
+ <TextInput
395
+ style={styles.textInput}
396
+ value={USPrivacy}
397
+ onChangeText={handleUSPrivacy}
398
+ placeholder="E.g 1YYN"
399
+ placeholderTextColor="#888"
400
+ />
401
+ </View>
402
+ {Platform.OS === 'android' && (
403
+ <View style={styles.selectionContainer}>
404
+ <View style={styles.horizontalContainer}>
405
+ <Text style={styles.userPropertiesLabel}>Opt Out Ad ID:</Text>
406
+ <SelectionMenu
407
+ data={optOutAdData}
408
+ onSelectItem={handleOptOut}
409
+ initialSelectedItem={initialOptOutItem}
410
+ />
411
+ </View>
412
+ </View>
413
+ )}
414
+ <View style={styles.buttonContainer}>
415
+ <Button
416
+ style={styles.button}
417
+ onPress={applyProperties}
418
+ title={'Apply'}
419
+ />
420
+ </View>
406
421
  </View>
407
- </SafeAreaView>
408
- </ScrollView>
422
+ </ScrollView>
423
+ </SafeAreaProvider>
409
424
  );
410
425
  };
411
426
 
@@ -5,8 +5,11 @@
5
5
 
6
6
  #pragma mark - SDK
7
7
  RCT_EXTERN_METHOD(connect:(NSString *)sdkKey connectFlags:(NSDictionary *)connectFlags resolve:(RCTPromiseResolveBlock *)resolve reject:(RCTPromiseRejectBlock)reject)
8
- RCT_EXTERN_METHOD(setDebugEnabled:(BOOL)enabled)
8
+ RCT_EXTERN_METHOD(setLoggingLevel:(NSNumber *)loggingLevel)
9
+ RCT_EXTERN_METHOD(getLoggingLevel:(RCTPromiseResolveBlock *)resolve reject:(RCTPromiseRejectBlock)reject)
9
10
  RCT_EXTERN__BLOCKING_SYNCHRONOUS_METHOD(isConnected)
11
+ RCT_EXTERN_METHOD(setCustomParameter:(NSString *)customParameter)
12
+ RCT_EXTERN_METHOD(getCustomParameter:(RCTPromiseResolveBlock *)resolve reject:(RCTPromiseRejectBlock)reject)
10
13
  RCT_EXTERN_METHOD(setUserId:(NSString *)userId resolve:(RCTPromiseResolveBlock *)resolve reject:(RCTPromiseRejectBlock)reject)
11
14
  RCT_EXTERN_METHOD(getUserId:(RCTPromiseResolveBlock *)resolve reject:(RCTPromiseRejectBlock)reject)
12
15
  RCT_EXTERN_METHOD(setUserSegment:(nonnull NSNumber *)userSegment)
@@ -93,12 +93,12 @@ class TapjoyReactNativeSdk: RCTEventEmitter {
93
93
  NotificationCenter.default.removeObserver(self, name: NSNotification.Name(TJC_CONNECT_FAILED), object: nil)
94
94
  }
95
95
 
96
- /**
97
- Enables debug log
98
- - Parameter enabled: true for enabling and false for disabling
99
- */
100
- @objc func setDebugEnabled(_ enabled: Bool) {
101
- Tapjoy.setDebugEnabled(enabled)
96
+ @objc func setLoggingLevel(_ loggingLevel: NSNumber) {
97
+ Tapjoy.loggingLevel = TJLoggerLevel(rawValue: loggingLevel.intValue) ?? .error
98
+ }
99
+
100
+ @objc func getLoggingLevel(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
101
+ resolve(Tapjoy.loggingLevel.rawValue)
102
102
  }
103
103
 
104
104
  @objc func isConnected() -> NSNumber {
@@ -119,6 +119,14 @@ class TapjoyReactNativeSdk: RCTEventEmitter {
119
119
  resolve(Tapjoy.getUserID())
120
120
  }
121
121
 
122
+ @objc func setCustomParameter(_ customParameter: String) {
123
+ Tapjoy.sharedTapjoyConnect().customParameter = customParameter
124
+ }
125
+
126
+ @objc func getCustomParameter(_ resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
127
+ resolve(Tapjoy.sharedTapjoyConnect().customParameter)
128
+ }
129
+
122
130
  /**
123
131
  * Sets the segment of the user
124
132
  *
@@ -0,0 +1,8 @@
1
+ var TJLoggingLevel;
2
+ (function (TJLoggingLevel) {
3
+ TJLoggingLevel[TJLoggingLevel["Error"] = 0] = "Error";
4
+ TJLoggingLevel[TJLoggingLevel["Warning"] = 1] = "Warning";
5
+ TJLoggingLevel[TJLoggingLevel["Info"] = 2] = "Info";
6
+ TJLoggingLevel[TJLoggingLevel["Debug"] = 3] = "Debug";
7
+ })(TJLoggingLevel || (TJLoggingLevel = {}));
8
+ export default TJLoggingLevel;
@@ -1,4 +1,4 @@
1
- const REACT_LIBRARY_VERSION = '14.3.1';
1
+ const REACT_LIBRARY_VERSION = '14.5.0';
2
2
  const REACT_LIBRARY_VERSION_SUFFIX = '';
3
3
  export class TJVersion {
4
4
  // Returns the version of the plugin - eg: 1.0.0-alpha-rc1
@@ -1,5 +1,6 @@
1
1
  import { NativeModules, Platform, NativeEventEmitter } from 'react-native';
2
2
  import TJConnect from './TJConnect';
3
+ import TJLoggingLevel from './TJLoggingLevel';
3
4
  const LINKING_ERROR = `The package 'tapjoy-react-native-sdk' doesn't seem to be linked. Make sure: \n\n` +
4
5
  Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) +
5
6
  '- You rebuilt the app after installing the package\n' +
@@ -84,6 +85,29 @@ class Tapjoy {
84
85
  TapjoyAPI.trackPurchase(currencyCode, price);
85
86
  }
86
87
  /**
88
+ * Sets the logging level for Tapjoy.
89
+ *
90
+ * @param loggingLevel
91
+ * the logging level to set
92
+ * @see TJLoggingLevel
93
+ */
94
+ static setLoggingLevel(loggingLevel) {
95
+ TapjoyAPI.setLoggingLevel(loggingLevel);
96
+ }
97
+ ;
98
+ /**
99
+ * Gets the current logging level for Tapjoy.
100
+ *
101
+ * @return the current logging level
102
+ * @see TJLoggingLevel
103
+ */
104
+ static async getLoggingLevel() {
105
+ return await TapjoyAPI.getLoggingLevel();
106
+ }
107
+ ;
108
+ /**
109
+ * @deprecated Deprecated in 14.4.0 in favor of setLoggingLevel
110
+ *
87
111
  * Enables or disables Tapjoy logging
88
112
  *
89
113
  * @param enable
@@ -91,7 +115,7 @@ class Tapjoy {
91
115
  * logging
92
116
  */
93
117
  static setDebugEnabled(enable) {
94
- TapjoyAPI.setDebugEnabled(enable);
118
+ TapjoyAPI.setLoggingLevel(enable ? TJLoggingLevel.Debug : TJLoggingLevel.Error);
95
119
  }
96
120
  ;
97
121
  /**
@@ -208,5 +232,21 @@ class Tapjoy {
208
232
  static removeUserTag(tag) {
209
233
  TapjoyAPI.removeUserTag(tag);
210
234
  }
235
+ /**
236
+ * Assign a custom parameter associated with any following placement requests that contains an ad type. We will return this value on the currency callback.
237
+ * Only applicable for publishers who manage their own currency servers. This value does NOT get unset with each subsequent placement request.
238
+ * @param customParameter
239
+ * The custom parameter to assign to this device
240
+ */
241
+ static setCustomParameter(customParameter) {
242
+ TapjoyAPI.setCustomParameter(customParameter);
243
+ }
244
+ /**
245
+ * Returns the currently set custom parameter.
246
+ * @return the value of the currently set custom parameter.
247
+ */
248
+ static async getCustomParameter() {
249
+ return TapjoyAPI.getCustomParameter();
250
+ }
211
251
  }
212
252
  export default Tapjoy;
@@ -1 +1 @@
1
- "use strict";
1
+ export {};
@@ -5,6 +5,7 @@ import TJStatus from './TJStatus';
5
5
  import TJSegment from './TJSegment';
6
6
  import TJOfferwallDiscoverView from './TJOfferwallDiscoverView';
7
7
  import TJPurchase from './TJPurchase';
8
+ import TJLoggingLevel from './TJLoggingLevel';
8
9
  import Tapjoy from './Tapjoy';
9
- export { Tapjoy, TJPlacement, TJPrivacyPolicy, TJVersion, TJStatus, TJSegment, TJOfferwallDiscoverView, TJPurchase, };
10
+ export { Tapjoy, TJPlacement, TJPrivacyPolicy, TJVersion, TJStatus, TJSegment, TJOfferwallDiscoverView, TJPurchase, TJLoggingLevel, };
10
11
  export default Tapjoy;
@@ -0,0 +1,7 @@
1
+ declare enum TJLoggingLevel {
2
+ Error = 0,
3
+ Warning = 1,
4
+ Info = 2,
5
+ Debug = 3
6
+ }
7
+ export default TJLoggingLevel;
@@ -1,4 +1,6 @@
1
1
  import TJSegment from './TJSegment';
2
+ import TJLoggingLevel from './TJLoggingLevel';
3
+ import { TapjoyEvent } from './TapjoyEvent';
2
4
  declare class Tapjoy {
3
5
  /**
4
6
  * Connects to the Tapjoy Server.
@@ -49,6 +51,23 @@ declare class Tapjoy {
49
51
  */
50
52
  static trackPurchase(currencyCode: string, price: number): void;
51
53
  /**
54
+ * Sets the logging level for Tapjoy.
55
+ *
56
+ * @param loggingLevel
57
+ * the logging level to set
58
+ * @see TJLoggingLevel
59
+ */
60
+ static setLoggingLevel(loggingLevel: TJLoggingLevel): void;
61
+ /**
62
+ * Gets the current logging level for Tapjoy.
63
+ *
64
+ * @return the current logging level
65
+ * @see TJLoggingLevel
66
+ */
67
+ static getLoggingLevel(): Promise<any>;
68
+ /**
69
+ * @deprecated Deprecated in 14.4.0 in favor of setLoggingLevel
70
+ *
52
71
  * Enables or disables Tapjoy logging
53
72
  *
54
73
  * @param enable
@@ -144,5 +163,17 @@ declare class Tapjoy {
144
163
  * the tag to be removed
145
164
  */
146
165
  static removeUserTag(tag: string): void;
166
+ /**
167
+ * Assign a custom parameter associated with any following placement requests that contains an ad type. We will return this value on the currency callback.
168
+ * Only applicable for publishers who manage their own currency servers. This value does NOT get unset with each subsequent placement request.
169
+ * @param customParameter
170
+ * The custom parameter to assign to this device
171
+ */
172
+ static setCustomParameter(customParameter: string): void;
173
+ /**
174
+ * Returns the currently set custom parameter.
175
+ * @return the value of the currently set custom parameter.
176
+ */
177
+ static getCustomParameter(): Promise<any>;
147
178
  }
148
179
  export default Tapjoy;
@@ -1,4 +1,4 @@
1
- interface TapjoyEvent {
1
+ export interface TapjoyEvent {
2
2
  name: string;
3
3
  code: string;
4
4
  message: string;
@@ -5,6 +5,9 @@ import TJStatus from './TJStatus';
5
5
  import TJSegment from './TJSegment';
6
6
  import TJOfferwallDiscoverView from './TJOfferwallDiscoverView';
7
7
  import TJPurchase from './TJPurchase';
8
+ import TJLoggingLevel from './TJLoggingLevel';
8
9
  import Tapjoy from './Tapjoy';
9
- export { Tapjoy, TJPlacement, TJPrivacyPolicy, TJVersion, TJStatus, TJSegment, TJOfferwallDiscoverView, TJPurchase, };
10
+ import { TapjoyEvent } from './TapjoyEvent';
11
+ export { Tapjoy, TJPlacement, TJPrivacyPolicy, TJVersion, TJStatus, TJSegment, TJOfferwallDiscoverView, TJPurchase, TJLoggingLevel, };
12
+ export type { TapjoyEvent };
10
13
  export default Tapjoy;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tapjoy-react-native-sdk",
3
- "version": "14.3.1",
3
+ "version": "14.5.0",
4
4
  "description": "ReactNative Plugin for Tapjoy SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -41,21 +41,14 @@
41
41
  "CODEOWNERS"
42
42
  ],
43
43
  "scripts": {
44
- "generate-declarations": "rm -rf lib && npx tsc --outDir lib/commonjs --declarationDir lib/typescript",
45
44
  "test": "jest",
46
45
  "typecheck": "tsc --noEmit",
47
46
  "lint": "eslint \"**/*.{js,ts,tsx}\"",
48
47
  "example": "yarn --cwd example",
49
48
  "bootstrap": "yarn example && yarn install && yarn example pods",
50
49
  "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build temp package",
51
- "prepare-repo": "rm -rf temp package && mkdir temp && cd temp && git clone git@github.com:Tapjoy/react-native-sdk . && rm -rf *",
52
- "prepare-staging-repo": "rm -rf temp package && mkdir temp && cd temp && git clone git@github.com:Tapjoy/react-native-sdk-staging.git . && rm -rf *",
53
- "copy-pack": "npm pack && tar xvzf tapjoy-react-native*.tgz && cp -af ./package/* ./temp && rm tapjoy-react-native*.tgz",
54
- "push": "cd temp && git add . && export VERSION=`node -p \"require('./package.json').version\"` && git commit -m \"Release $VERSION\" && git push",
55
- "publish-npm": "yarn prepare-repo && yarn copy-pack && yarn push && cd temp && npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN && npm pkg fix && npm publish && yarn tag-branch",
56
- "publish-staging-npm": "yarn prepare-staging-repo && yarn copy-pack && yarn push && cd temp && npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN && npm pkg fix && npm publish --dry-run && yarn tag-branch",
57
50
  "doc": "typedoc --entryPointStrategy expand src/*",
58
- "tag-branch": "export VERSION=`node -p \"require('./package.json').version\"` && git tag $VERSION && git push origin $VERSION"
51
+ "postinstall": "echo 'For Android, please ensure your project’s Gradle is configured correctly. Instructions can be found at: https://dev.tapjoy.com/en/reactnative-plugin/Quickstart'"
59
52
  },
60
53
  "keywords": [
61
54
  "react-native",
@@ -77,9 +70,9 @@
77
70
  "devDependencies": {
78
71
  "@commitlint/config-conventional": "^19.5.0",
79
72
  "@react-native-community/eslint-config": "^3.2.0",
80
- "@react-native/metro-config": "^0.76.6",
73
+ "@react-native/metro-config": "^0.81.0",
81
74
  "@types/jest": "^29.5.13",
82
- "@types/react": "^18.3.10",
75
+ "@types/react": "^19.1.0",
83
76
  "commitlint": "^19.5.0",
84
77
  "del-cli": "^5.1.0",
85
78
  "eslint": "^9.11.1",
@@ -88,13 +81,13 @@
88
81
  "jest": "^29.7.0",
89
82
  "pod-install": "^0.2.2",
90
83
  "prettier": "^3.3.3",
91
- "react": "^18.3.1",
92
- "react-native": "0.76.1",
84
+ "react": "^19.1.0",
85
+ "react-native": "0.81.0",
93
86
  "typedoc": "^0.26.7",
94
- "typescript": "^5.6.2"
87
+ "typescript": "^5.8.3"
95
88
  },
96
89
  "resolutions": {
97
- "@types/react": "^18.3.10"
90
+ "@types/react": "^19.1.0"
98
91
  },
99
92
  "peerDependencies": {
100
93
  "react": "*",
@@ -0,0 +1,8 @@
1
+ enum TJLoggingLevel {
2
+ Error = 0,
3
+ Warning = 1,
4
+ Info = 2,
5
+ Debug = 3,
6
+ }
7
+
8
+ export default TJLoggingLevel;
package/src/TJStatus.ts CHANGED
@@ -4,4 +4,4 @@ enum TJStatus {
4
4
  Unknown
5
5
  }
6
6
 
7
- export default TJStatus;
7
+ export default TJStatus;
package/src/TJVersion.ts CHANGED
@@ -1,4 +1,4 @@
1
- const REACT_LIBRARY_VERSION = '14.3.1';
1
+ const REACT_LIBRARY_VERSION = '14.5.0';
2
2
  const REACT_LIBRARY_VERSION_SUFFIX = '';
3
3
 
4
4
  export class TJVersion {