react-native-repro 3.6.0 → 3.7.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 (28) hide show
  1. package/android/src/main/java/io/repro/android/reactbridge/ReproReactBridgeModule.java +53 -4
  2. package/index.js +41 -3
  3. package/ios/RPRReproReactBridge.m +51 -6
  4. package/package.json +1 -1
  5. package/repro-version.json +3 -3
  6. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.aar +0 -0
  7. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.aar.md5 +1 -0
  8. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.aar.sha1 +1 -0
  9. package/sdk-android/io/repro/repro-android-sdk/{5.5.1/repro-android-sdk-5.5.1.pom → 5.6.0/repro-android-sdk-5.6.0.pom} +1 -1
  10. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.pom.md5 +1 -0
  11. package/sdk-android/io/repro/repro-android-sdk/5.6.0/repro-android-sdk-5.6.0.pom.sha1 +1 -0
  12. package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml +3 -3
  13. package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml.md5 +1 -1
  14. package/sdk-android/io/repro/repro-android-sdk/maven-metadata.xml.sha1 +1 -1
  15. package/sdk-ios/Repro.xcframework/Info.plist +8 -8
  16. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Headers/RPRNewsFeedEntry.h +11 -0
  17. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Headers/Repro.h +11 -0
  18. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Info.plist +0 -0
  19. package/sdk-ios/Repro.xcframework/ios-arm64_armv7_armv7s/Repro.framework/Repro +0 -0
  20. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Headers/RPRNewsFeedEntry.h +11 -0
  21. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Headers/Repro.h +11 -0
  22. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Info.plist +0 -0
  23. package/sdk-ios/Repro.xcframework/ios-arm64_i386_x86_64-simulator/Repro.framework/Repro +0 -0
  24. package/sdk-android/io/repro/repro-android-sdk/5.5.1/repro-android-sdk-5.5.1.aar +0 -0
  25. package/sdk-android/io/repro/repro-android-sdk/5.5.1/repro-android-sdk-5.5.1.aar.md5 +0 -1
  26. package/sdk-android/io/repro/repro-android-sdk/5.5.1/repro-android-sdk-5.5.1.aar.sha1 +0 -1
  27. package/sdk-android/io/repro/repro-android-sdk/5.5.1/repro-android-sdk-5.5.1.pom.md5 +0 -1
  28. package/sdk-android/io/repro/repro-android-sdk/5.5.1/repro-android-sdk-5.5.1.pom.sha1 +0 -1
@@ -15,7 +15,9 @@ import com.facebook.react.bridge.WritableNativeArray;
15
15
  import com.facebook.react.bridge.ReadableArray;
16
16
  import com.facebook.react.bridge.Arguments;
17
17
 
18
+ import java.util.EnumSet;
18
19
  import java.util.HashMap;
20
+ import java.util.Iterator;
19
21
  import java.util.Map;
20
22
  import java.util.ArrayList;
21
23
  import java.util.List;
@@ -26,6 +28,7 @@ import java.util.Date;
26
28
  import org.json.JSONObject;
27
29
 
28
30
  import io.repro.android.Repro;
31
+ import io.repro.android.newsfeed.NewsFeedCampaignType;
29
32
  import io.repro.android.tracking.AddPaymentInfoProperties;
30
33
  import io.repro.android.tracking.AddToCartProperties;
31
34
  import io.repro.android.tracking.AddToWishlistProperties;
@@ -46,6 +49,12 @@ public class ReproReactBridgeModule extends ReactContextBaseJavaModule {
46
49
  public static final int GENDER_MALE = 1;
47
50
  public static final int GENDER_FEMALE = 2;
48
51
 
52
+ public static final int CAMPAIGN_TYPE_UNKNOWN = 0;
53
+ public static final int CAMPAIGN_TYPE_PUSH_NOTIFICATION = (1 << 0);
54
+ public static final int CAMPAIGN_TYPE_IN_APP_MESSAGE = (1 << 1);
55
+ public static final int CAMPAIGN_TYPE_WEB_MESSAGE = (1 << 2);
56
+ public static final int CAMPAIGN_TYPE_ALL = (1 << 3);
57
+
49
58
  private final ReactApplicationContext reactContext;
50
59
 
51
60
  public ReproReactBridgeModule(ReactApplicationContext reactContext) {
@@ -71,6 +80,12 @@ public class ReproReactBridgeModule extends ReactContextBaseJavaModule {
71
80
  constants.put("LOGLEVEL_WARN", Log.WARN);
72
81
  constants.put("LOGLEVEL_ERROR", Log.ERROR);
73
82
 
83
+ constants.put("CAMPAIGN_TYPE_UNKNOWN", CAMPAIGN_TYPE_UNKNOWN);
84
+ constants.put("CAMPAIGN_TYPE_PUSH_NOTIFICATION", CAMPAIGN_TYPE_PUSH_NOTIFICATION);
85
+ constants.put("CAMPAIGN_TYPE_IN_APP_MESSAGE", CAMPAIGN_TYPE_IN_APP_MESSAGE);
86
+ constants.put("CAMPAIGN_TYPE_WEB_MESSAGE", CAMPAIGN_TYPE_WEB_MESSAGE);
87
+ constants.put("CAMPAIGN_TYPE_ALL", CAMPAIGN_TYPE_ALL);
88
+
74
89
  return constants;
75
90
  }
76
91
 
@@ -347,6 +362,7 @@ public class ReproReactBridgeModule extends ReactContextBaseJavaModule {
347
362
  entryMap.putString("title", entry.title);
348
363
  entryMap.putString("summary", entry.summary);
349
364
  entryMap.putString("body", entry.body);
365
+ entryMap.putInt("campaign_type", convertCampaignTypeToInt(entry.campaignType));
350
366
 
351
367
  entryMap.putBoolean("shown", entry.shown);
352
368
  entryMap.putBoolean("read", entry.read);
@@ -363,9 +379,11 @@ public class ReproReactBridgeModule extends ReactContextBaseJavaModule {
363
379
  }
364
380
 
365
381
  @ReactMethod
366
- public void getNewsFeeds(final int limit, Callback callback) {
382
+ public void getNewsFeeds(final int limit, final int campaignType, Callback callback) {
383
+ NewsFeedCampaignType type = convertCampaignTypeFromInt(campaignType);
384
+
367
385
  try {
368
- callback.invoke(null, toWritableArray(Repro.getNewsFeeds(limit)));
386
+ callback.invoke(null, toWritableArray(Repro.getNewsFeeds(limit, type)));
369
387
  } catch (Exception e) {
370
388
  WritableMap entryMap = Arguments.createMap();
371
389
  entryMap.putString("message", e.getMessage());
@@ -374,9 +392,11 @@ public class ReproReactBridgeModule extends ReactContextBaseJavaModule {
374
392
  }
375
393
 
376
394
  @ReactMethod
377
- public void getNewsFeedsFor(final int limit, final int offsetID, Callback callback) {
395
+ public void getNewsFeedsFor(final int limit, final int offsetID, final int campaignType, Callback callback) {
396
+ NewsFeedCampaignType type = convertCampaignTypeFromInt(campaignType);
397
+
378
398
  try {
379
- callback.invoke(null, toWritableArray(Repro.getNewsFeeds(limit, offsetID)));
399
+ callback.invoke(null, toWritableArray(Repro.getNewsFeeds(limit, offsetID, type)));
380
400
  } catch (Exception e) {
381
401
  WritableMap entryMap = Arguments.createMap();
382
402
  entryMap.putString("message", e.getMessage());
@@ -402,6 +422,35 @@ public class ReproReactBridgeModule extends ReactContextBaseJavaModule {
402
422
  callback.invoke(error);
403
423
  }
404
424
  }
425
+
426
+ private NewsFeedCampaignType convertCampaignTypeFromInt(int type) {
427
+ switch (type) {
428
+ case CAMPAIGN_TYPE_PUSH_NOTIFICATION:
429
+ return NewsFeedCampaignType.PushNotification;
430
+ case CAMPAIGN_TYPE_IN_APP_MESSAGE:
431
+ return NewsFeedCampaignType.InAppMessage;
432
+ case CAMPAIGN_TYPE_WEB_MESSAGE:
433
+ return NewsFeedCampaignType.WebMessage;
434
+ case CAMPAIGN_TYPE_ALL:
435
+ return NewsFeedCampaignType.All;
436
+ }
437
+
438
+ return NewsFeedCampaignType.Unknown;
439
+ }
440
+ private int convertCampaignTypeToInt(NewsFeedCampaignType type) {
441
+ switch (type.toString()) {
442
+ case "push_notification":
443
+ return CAMPAIGN_TYPE_PUSH_NOTIFICATION;
444
+ case "in_app_message":
445
+ return CAMPAIGN_TYPE_IN_APP_MESSAGE;
446
+ case "web_message":
447
+ return CAMPAIGN_TYPE_WEB_MESSAGE;
448
+ case "all":
449
+ return CAMPAIGN_TYPE_ALL;
450
+ }
451
+
452
+ return CAMPAIGN_TYPE_UNKNOWN;
453
+ }
405
454
  }
406
455
 
407
456
 
package/index.js CHANGED
@@ -15,6 +15,7 @@ class NewsFeedEntry {
15
15
  this.title = value["title"];
16
16
  this.summary = value["summary"];
17
17
  this.body = safeString(value["body"]);
18
+ this.campaignType = value["campaign_type"];
18
19
  this.shown = value["shown"];
19
20
  this.read = value["read"];
20
21
 
@@ -27,10 +28,11 @@ class NewsFeedEntry {
27
28
  toJson() {
28
29
  return {
29
30
  "newsfeed_id": this.id,
30
- "deviceID": this.deviceID,
31
+ "device_id": this.deviceID,
31
32
  "title": this.title,
32
33
  "summary": this.summary,
33
34
  "body": this.body,
35
+ "campaign_type": this.campaignType,
34
36
  "shown": this.shown,
35
37
  "read": this.read,
36
38
  "delivered_at": this.deliveredAt,
@@ -42,7 +44,25 @@ class NewsFeedEntry {
42
44
 
43
45
  const NewsFeedModule = {
44
46
  getNewsFeeds: (limit, callback) => {
45
- NativeModules.Repro.getNewsFeeds(limit, (error, items) => {
47
+ NativeModules.Repro.getNewsFeeds(limit, NativeModules.Repro.CAMPAIGN_TYPE_PUSH_NOTIFICATION, (error, items) => {
48
+ if (!callback) return;
49
+ if (!items) {
50
+ callback(null, []);
51
+ return;
52
+ }
53
+
54
+ const newsFeeds = [];
55
+
56
+ for (const item of items) {
57
+ newsFeeds.push(new NewsFeedEntry(item));
58
+ }
59
+
60
+ callback(error, newsFeeds);
61
+ })
62
+ },
63
+
64
+ getNewsFeedsWithCampaignType: (limit, campaignType, callback) => {
65
+ NativeModules.Repro.getNewsFeeds(limit, campaignType, (error, items) => {
46
66
  if (!callback) return;
47
67
  if (!items) {
48
68
  callback(null, []);
@@ -60,7 +80,25 @@ const NewsFeedModule = {
60
80
  },
61
81
 
62
82
  getNewsFeedsFor: (limit, offsetID, callback) => {
63
- NativeModules.Repro.getNewsFeedsFor(limit, offsetID, (error, items) => {
83
+ NativeModules.Repro.getNewsFeedsFor(limit, offsetID, NativeModules.Repro.CAMPAIGN_TYPE_PUSH_NOTIFICATION, (error, items) => {
84
+ if (!callback) return;
85
+ if (!items) {
86
+ callback(null, []);
87
+ return;
88
+ }
89
+
90
+ const newsFeeds = [];
91
+
92
+ for (const item of items) {
93
+ newsFeeds.push(new NewsFeedEntry(item));
94
+ }
95
+
96
+ callback(error, newsFeeds);
97
+ })
98
+ },
99
+
100
+ getNewsFeedsWithCampaignTypeFor: (limit, offsetID, campaignType, callback) => {
101
+ NativeModules.Repro.getNewsFeedsFor(limit, offsetID, campaignType, (error, items) => {
64
102
  if (!callback) return;
65
103
  if (!items) {
66
104
  callback(null, []);
@@ -61,6 +61,15 @@ safe_value(id value)
61
61
  RPRRemoteConfigFetchStatusTimeoutReached, integerValue)
62
62
  @end
63
63
 
64
+ @implementation RCTConvert (RPRCampaignType)
65
+ RCT_ENUM_CONVERTER(RPRCampaignType, (@{
66
+ @"CAMPAIGN_TYPE_UNKNOWN" : @(RPRCampaignTypeUnknown),
67
+ @"CAMPAIGN_TYPE_PUSH_NOTIFICATION" : @(RPRCampaignTypePushNotification),
68
+ @"CAMPAIGN_TYPE_IN_APP_MESSAGE" : @(RPRCampaignTypeInAppMessage),
69
+ @"CAMPAIGN_TYPE_WEB_MESSAGE" : @(RPRCampaignTypeWebMessage)}),
70
+ RPRCampaignTypePushNotification, integerValue)
71
+ @end
72
+
64
73
  @interface RPRRemoteConfigBridge ()
65
74
 
66
75
  @property (nonatomic) RPRRemoteConfig* remoteConfig;
@@ -197,6 +206,12 @@ RCT_EXPORT_MODULE(Repro)
197
206
  @"REMOTE_CONFIG_SUCCESS" : @(RPRRemoteConfigFetchStatusSuccess),
198
207
  @"REMOTE_CONFIG_TIMEOUT_REACHED" : @(RPRRemoteConfigFetchStatusTimeoutReached),
199
208
  @"REMOTE_CONFIG_ALREADY_FETCHED" : @(RPRRemoteConfigFetchStatusAlreadyFetched),
209
+
210
+ @"CAMPAIGN_TYPE_UNKNOWN" : @(RPRCampaignTypeUnknown),
211
+ @"CAMPAIGN_TYPE_PUSH_NOTIFICATION" : @(RPRCampaignTypePushNotification),
212
+ @"CAMPAIGN_TYPE_IN_APP_MESSAGE" : @(RPRCampaignTypeInAppMessage),
213
+ @"CAMPAIGN_TYPE_WEB_MESSAGE" : @(RPRCampaignTypeWebMessage),
214
+ @"CAMPAIGN_TYPE_ALL" : @(RPRCampaignTypeAll),
200
215
  };
201
216
  };
202
217
 
@@ -452,10 +467,24 @@ RCT_EXPORT_METHOD(disableInAppMessagesOnForegroundTransition)
452
467
  [Repro disableInAppMessagesOnForegroundTransition];
453
468
  }
454
469
 
455
- RCT_EXPORT_METHOD(getNewsFeeds:(uint64_t)limit callback:(RCTResponseSenderBlock)callback)
470
+ RCT_EXPORT_METHOD(getNewsFeeds:(uint64_t)limit campaignType:(nonnull NSNumber *)type callback:(RCTResponseSenderBlock)callback)
456
471
  {
457
472
  NSError *error = nil;
458
- NSArray<RPRNewsFeedEntry *> * entries = [Repro getNewsFeeds:limit error:&error];
473
+ RPRCampaignType campaignType = RPRCampaignTypeUnknown;
474
+
475
+ if (type) {
476
+ if ([type isEqualToNumber:@(RPRCampaignTypePushNotification)]) {
477
+ campaignType = RPRCampaignTypePushNotification;
478
+ } else if ([type isEqualToNumber:@(RPRCampaignTypeInAppMessage)]) {
479
+ campaignType = RPRCampaignTypeInAppMessage;
480
+ } else if ([type isEqualToNumber:@(RPRCampaignTypeWebMessage)]) {
481
+ campaignType = RPRCampaignTypeWebMessage;
482
+ } else if ([type isEqualToNumber:@(RPRCampaignTypeAll)]) {
483
+ campaignType = RPRCampaignTypeAll;
484
+ }
485
+ }
486
+
487
+ NSArray<RPRNewsFeedEntry *> * entries = [Repro getNewsFeeds:limit campaignType:campaignType error:&error];
459
488
 
460
489
  if (error) {
461
490
  NSString *errString = [error localizedDescription];
@@ -481,11 +510,12 @@ RCT_EXPORT_METHOD(getNewsFeeds:(uint64_t)limit callback:(RCTResponseSenderBlock)
481
510
  @"title": entry.title,
482
511
  @"summary": entry.summary,
483
512
  @"body": entry.body,
513
+ @"campaign_type": @(entry.campaignType),
484
514
  @"shown": @(entry.shown),
485
515
  @"read": @(entry.read),
486
516
  @"delivered_at": formattedDateString,
487
517
  @"link_url": entry.linkUrl ? [entry.linkUrl absoluteString] : @"",
488
- @"image_url": entry.imageUrl ? [entry.imageUrl absoluteString] : @""
518
+ @"image_url": entry.imageUrl ? [entry.imageUrl absoluteString] : @"",
489
519
  };
490
520
 
491
521
  [entryJsons addObject:entryJson];
@@ -494,10 +524,24 @@ RCT_EXPORT_METHOD(getNewsFeeds:(uint64_t)limit callback:(RCTResponseSenderBlock)
494
524
  callback(@[[NSNull null], safe_value(entryJsons)]);
495
525
  }
496
526
 
497
- RCT_EXPORT_METHOD(getNewsFeedsFor:(uint64_t)limit offsetID:(uint64_t)offsetID callback:(RCTResponseSenderBlock)callback)
527
+ RCT_EXPORT_METHOD(getNewsFeedsFor:(uint64_t)limit offsetID:(uint64_t)offsetID campaignType:(nonnull NSNumber *)type callback:(RCTResponseSenderBlock)callback)
498
528
  {
499
529
  NSError *error = nil;
500
- NSArray<RPRNewsFeedEntry *> *entries = [Repro getNewsFeeds:limit offsetID:offsetID error:&error];
530
+ RPRCampaignType campaignType = RPRCampaignTypeUnknown;
531
+
532
+ if (type) {
533
+ if ([type isEqualToNumber:@(RPRCampaignTypePushNotification)]) {
534
+ campaignType = RPRCampaignTypePushNotification;
535
+ } else if ([type isEqualToNumber:@(RPRCampaignTypeInAppMessage)]) {
536
+ campaignType = RPRCampaignTypeInAppMessage;
537
+ } else if ([type isEqualToNumber:@(RPRCampaignTypeWebMessage)]) {
538
+ campaignType = RPRCampaignTypeWebMessage;
539
+ } else if ([type isEqualToNumber:@(RPRCampaignTypeAll)]) {
540
+ campaignType = RPRCampaignTypeAll;
541
+ }
542
+ }
543
+
544
+ NSArray<RPRNewsFeedEntry *> *entries = [Repro getNewsFeeds:limit offsetID:offsetID campaignType:campaignType error:&error];
501
545
 
502
546
  if (error) {
503
547
  NSString *errString = [error localizedDescription];
@@ -523,11 +567,12 @@ RCT_EXPORT_METHOD(getNewsFeedsFor:(uint64_t)limit offsetID:(uint64_t)offsetID ca
523
567
  @"title": entry.title,
524
568
  @"summary": entry.summary,
525
569
  @"body": entry.body,
570
+ @"campaign_type": @(entry.campaignType),
526
571
  @"shown": @(entry.shown),
527
572
  @"read": @(entry.read),
528
573
  @"delivered_at": formattedDateString,
529
574
  @"link_url": entry.linkUrl ? [entry.linkUrl absoluteString] : @"",
530
- @"image_url": entry.imageUrl ? [entry.imageUrl absoluteString] : @""
575
+ @"image_url": entry.imageUrl ? [entry.imageUrl absoluteString] : @"",
531
576
  };
532
577
 
533
578
  [entryJsons addObject:entryJson];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-repro",
3
- "version": "3.6.0",
3
+ "version": "3.7.0",
4
4
  "description": "Repro is a mobile analytics tool that lets you have much deeper understanding of mobile app users with play-by-play videos.",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -1,5 +1,5 @@
1
1
  {
2
- "ios-sdk": "5.7.0",
3
- "android-sdk": "5.5.1",
4
- "bridge": "3.6.0"
2
+ "ios-sdk": "5.8.0",
3
+ "android-sdk": "5.6.0",
4
+ "bridge": "3.7.0"
5
5
  }
@@ -0,0 +1 @@
1
+ 95128ff0f21c7dce392fbe7376049930
@@ -0,0 +1 @@
1
+ db014f9b390093608d5678da13c524b8f6f5ab7d
@@ -4,6 +4,6 @@
4
4
  <modelVersion>4.0.0</modelVersion>
5
5
  <groupId>io.repro</groupId>
6
6
  <artifactId>repro-android-sdk</artifactId>
7
- <version>5.5.1</version>
7
+ <version>5.6.0</version>
8
8
  <packaging>aar</packaging>
9
9
  </project>
@@ -0,0 +1 @@
1
+ 8887c317b5c45b11836fa33156a40986
@@ -0,0 +1 @@
1
+ 6320bb92fa20c8a49d146decfdc83a49a0b00da3
@@ -3,10 +3,10 @@
3
3
  <groupId>io.repro</groupId>
4
4
  <artifactId>repro-android-sdk</artifactId>
5
5
  <versioning>
6
- <release>5.5.1</release>
6
+ <release>5.6.0</release>
7
7
  <versions>
8
- <version>5.5.1</version>
8
+ <version>5.6.0</version>
9
9
  </versions>
10
- <lastUpdated>20211015085736</lastUpdated>
10
+ <lastUpdated>20211207144549</lastUpdated>
11
11
  </versioning>
12
12
  </metadata>
@@ -1 +1 @@
1
- d2d0379ca8e867ea3d1fd94ab0c5b767
1
+ 924daf8076ee56d2d816355b8cd95e8e
@@ -1 +1 @@
1
- e11aa13250c194bbdf29a75f1660cb144372b52d
1
+ 467c78928268a9e2770584753d8185648538be1d
@@ -6,33 +6,33 @@
6
6
  <array>
7
7
  <dict>
8
8
  <key>LibraryIdentifier</key>
9
- <string>ios-arm64_i386_x86_64-simulator</string>
9
+ <string>ios-arm64_armv7_armv7s</string>
10
10
  <key>LibraryPath</key>
11
11
  <string>Repro.framework</string>
12
12
  <key>SupportedArchitectures</key>
13
13
  <array>
14
14
  <string>arm64</string>
15
- <string>i386</string>
16
- <string>x86_64</string>
15
+ <string>armv7</string>
16
+ <string>armv7s</string>
17
17
  </array>
18
18
  <key>SupportedPlatform</key>
19
19
  <string>ios</string>
20
- <key>SupportedPlatformVariant</key>
21
- <string>simulator</string>
22
20
  </dict>
23
21
  <dict>
24
22
  <key>LibraryIdentifier</key>
25
- <string>ios-arm64_armv7_armv7s</string>
23
+ <string>ios-arm64_i386_x86_64-simulator</string>
26
24
  <key>LibraryPath</key>
27
25
  <string>Repro.framework</string>
28
26
  <key>SupportedArchitectures</key>
29
27
  <array>
30
28
  <string>arm64</string>
31
- <string>armv7</string>
32
- <string>armv7s</string>
29
+ <string>i386</string>
30
+ <string>x86_64</string>
33
31
  </array>
34
32
  <key>SupportedPlatform</key>
35
33
  <string>ios</string>
34
+ <key>SupportedPlatformVariant</key>
35
+ <string>simulator</string>
36
36
  </dict>
37
37
  </array>
38
38
  <key>CFBundlePackageType</key>
@@ -6,6 +6,16 @@
6
6
 
7
7
  #import <Foundation/Foundation.h>
8
8
 
9
+
10
+ typedef NS_ENUM(NSUInteger, RPRCampaignType) {
11
+ RPRCampaignTypeUnknown NS_SWIFT_NAME(unknown) = 0,
12
+
13
+ RPRCampaignTypePushNotification NS_SWIFT_NAME(pushNotification) = (1 << 0),
14
+ RPRCampaignTypeInAppMessage NS_SWIFT_NAME(inAppMessage) = (1 << 1),
15
+ RPRCampaignTypeWebMessage NS_SWIFT_NAME(webMessage) = (1 << 2),
16
+ RPRCampaignTypeAll NS_SWIFT_NAME(all) = (1 << 3),
17
+ };
18
+
9
19
  NS_ASSUME_NONNULL_BEGIN
10
20
 
11
21
  @interface RPRNewsFeedEntry : NSObject
@@ -15,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
15
25
  @property (nonatomic, readonly) NSString *title;
16
26
  @property (nonatomic, readonly) NSString *summary;
17
27
  @property (nonatomic, readonly) NSString *body;
28
+ @property (nonatomic, readonly) RPRCampaignType campaignType;
18
29
  @property (nonatomic, readonly, nullable) NSURL *linkUrl;
19
30
  @property (nonatomic, readonly, nullable) NSURL *imageUrl;
20
31
  @property (nonatomic, readonly) NSDate *deliveredAt;
@@ -144,11 +144,22 @@ NS_SWIFT_NAME(set(silverEggProdKey:));
144
144
  error:(NSError * _Nullable * _Nullable)error
145
145
  NS_SWIFT_NAME(getNewsFeeds(_:));
146
146
 
147
+ + (nullable NSArray<RPRNewsFeedEntry *> *)getNewsFeeds:(uint64_t)limit
148
+ campaignType:(RPRCampaignType)campaignType
149
+ error:(NSError * _Nullable * _Nullable)error
150
+ NS_SWIFT_NAME(getNewsFeeds(_:campaignType:));
151
+
147
152
  + (nullable NSArray<RPRNewsFeedEntry *> *)getNewsFeeds:(uint64_t)limit
148
153
  offsetID:(uint64_t)offsetID
149
154
  error:(NSError * _Nullable * _Nullable)error
150
155
  NS_SWIFT_NAME(getNewsFeeds(_:offsetID:));
151
156
 
157
+ + (nullable NSArray<RPRNewsFeedEntry *> *)getNewsFeeds:(uint64_t)limit
158
+ offsetID:(uint64_t)offsetID
159
+ campaignType:(RPRCampaignType)campaignType
160
+ error:(NSError * _Nullable * _Nullable)error
161
+ NS_SWIFT_NAME(getNewsFeeds(_:offsetID:campaignType:));
162
+
152
163
  + (BOOL)updateNewsFeeds:(nonnull NSArray<RPRNewsFeedEntry *> *)newsFeeds error:(NSError * _Nullable * _Nullable)error
153
164
  NS_SWIFT_NAME(updateNewsFeeds(_:));
154
165
 
@@ -6,6 +6,16 @@
6
6
 
7
7
  #import <Foundation/Foundation.h>
8
8
 
9
+
10
+ typedef NS_ENUM(NSUInteger, RPRCampaignType) {
11
+ RPRCampaignTypeUnknown NS_SWIFT_NAME(unknown) = 0,
12
+
13
+ RPRCampaignTypePushNotification NS_SWIFT_NAME(pushNotification) = (1 << 0),
14
+ RPRCampaignTypeInAppMessage NS_SWIFT_NAME(inAppMessage) = (1 << 1),
15
+ RPRCampaignTypeWebMessage NS_SWIFT_NAME(webMessage) = (1 << 2),
16
+ RPRCampaignTypeAll NS_SWIFT_NAME(all) = (1 << 3),
17
+ };
18
+
9
19
  NS_ASSUME_NONNULL_BEGIN
10
20
 
11
21
  @interface RPRNewsFeedEntry : NSObject
@@ -15,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
15
25
  @property (nonatomic, readonly) NSString *title;
16
26
  @property (nonatomic, readonly) NSString *summary;
17
27
  @property (nonatomic, readonly) NSString *body;
28
+ @property (nonatomic, readonly) RPRCampaignType campaignType;
18
29
  @property (nonatomic, readonly, nullable) NSURL *linkUrl;
19
30
  @property (nonatomic, readonly, nullable) NSURL *imageUrl;
20
31
  @property (nonatomic, readonly) NSDate *deliveredAt;
@@ -144,11 +144,22 @@ NS_SWIFT_NAME(set(silverEggProdKey:));
144
144
  error:(NSError * _Nullable * _Nullable)error
145
145
  NS_SWIFT_NAME(getNewsFeeds(_:));
146
146
 
147
+ + (nullable NSArray<RPRNewsFeedEntry *> *)getNewsFeeds:(uint64_t)limit
148
+ campaignType:(RPRCampaignType)campaignType
149
+ error:(NSError * _Nullable * _Nullable)error
150
+ NS_SWIFT_NAME(getNewsFeeds(_:campaignType:));
151
+
147
152
  + (nullable NSArray<RPRNewsFeedEntry *> *)getNewsFeeds:(uint64_t)limit
148
153
  offsetID:(uint64_t)offsetID
149
154
  error:(NSError * _Nullable * _Nullable)error
150
155
  NS_SWIFT_NAME(getNewsFeeds(_:offsetID:));
151
156
 
157
+ + (nullable NSArray<RPRNewsFeedEntry *> *)getNewsFeeds:(uint64_t)limit
158
+ offsetID:(uint64_t)offsetID
159
+ campaignType:(RPRCampaignType)campaignType
160
+ error:(NSError * _Nullable * _Nullable)error
161
+ NS_SWIFT_NAME(getNewsFeeds(_:offsetID:campaignType:));
162
+
152
163
  + (BOOL)updateNewsFeeds:(nonnull NSArray<RPRNewsFeedEntry *> *)newsFeeds error:(NSError * _Nullable * _Nullable)error
153
164
  NS_SWIFT_NAME(updateNewsFeeds(_:));
154
165
 
@@ -1 +0,0 @@
1
- eaf8eff60f355a6f4e4d662f6f25e292
@@ -1 +0,0 @@
1
- 6e27a0567367e9e0687a5cf0ebb3f4719357b904
@@ -1 +0,0 @@
1
- a4ec51d6719ac6f1c0a43cdf183f21cb
@@ -1 +0,0 @@
1
- 6cb1f80c4db1e63fc067dc1cca7c4f201748d2cf