@sentiance-react-native/core 6.20.0-rc.3 → 6.20.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.
@@ -5,7 +5,7 @@ sentiance_sdk_env_var_version = ENV["SENTIANCE_RN_IOS_SDK_VERSION"]
5
5
 
6
6
  Pod::Spec.new do |s|
7
7
  s.name = "RNSentianceCore"
8
- s.version = "6.20.0-rc.3"
8
+ s.version = "6.20.0"
9
9
  s.summary = "RNSentianceCore"
10
10
  s.description = <<-DESC
11
11
  RNSentianceCore
@@ -51,10 +51,6 @@ typedef NS_ENUM(NSInteger, UIBackgroundRefreshStatus);
51
51
  - (NSSet<NSString*> *)convertIntegerTransmittableDataTypes:(NSArray<NSNumber*>*)intDataTypes;
52
52
  - (NSSet<NSNumber*> *)convertStringTransmittableDataTypes:(NSArray<NSString*>*)stringDataTypes;
53
53
  - (NSDictionary *)convertDrivingInsights:(SENTDrivingInsights *)drivingInsights;
54
- - (NSArray *)convertHarshDrivingEvents:(NSArray<SENTHarshDrivingEvent*> *)harshDrivingEvents;
55
- - (NSArray *)convertPhoneUsageEvents:(NSArray<SENTPhoneUsageEvent*> *)phoneUsageEvents;
56
- - (NSArray *)convertCallWhileMovingEvents:(NSArray<SENTCallWhileMovingEvent*> *)callWhileMovingEvents;
57
- - (NSArray *)convertSpeedingEvents:(NSArray<SENTSpeedingEvent*> *)speedingEvents;
58
54
  - (NSMutableDictionary*)convertEvent:(SENTTimelineEvent*)event;
59
55
  - (NSError *)convertSmartGeofencesRefreshError:(SENTSmartGeofencesRefreshError *)refreshError;
60
56
  - (NSString *)stringifySmartGeofencesDetectionMode:(SENTSmartGeofenceDetectionMode)detectionMode;
@@ -1246,65 +1246,6 @@ static NSString * const SmartGeofencesErrorDomain = @"com.sentiance.SmartGeofenc
1246
1246
  return dict;
1247
1247
  }
1248
1248
 
1249
- - (NSArray<NSDictionary<NSString *, id> *> *)convertHarshDrivingEvents:(NSArray<SENTHarshDrivingEvent*> *)harshDrivingEvents {
1250
- NSMutableArray <NSDictionary<NSString *, NSNumber *> *> *array = [[NSMutableArray alloc] init];
1251
- for (SENTHarshDrivingEvent *event in harshDrivingEvents) {
1252
- [array addObject:[self convertHarshDrivingEvent:event]];
1253
- }
1254
- return array;
1255
- }
1256
-
1257
- - (NSDictionary<NSString *, id> *)convertHarshDrivingEvent:(SENTHarshDrivingEvent *)harshDrivingEvent {
1258
- NSMutableDictionary<NSString *, id> *dict = [self convertDrivingEvent:harshDrivingEvent];
1259
- dict[@"magnitude"] = @(harshDrivingEvent.magnitude);
1260
- dict[@"confidence"] = @(harshDrivingEvent.confidence);
1261
- dict[@"type"] = [self stringifyHarshEventType:harshDrivingEvent.type];
1262
- return dict;
1263
- }
1264
-
1265
- - (NSArray<NSDictionary<NSString *, id> *> *)convertPhoneUsageEvents:(NSArray<SENTPhoneUsageEvent*> *)phoneUsageEvents {
1266
- NSMutableArray <NSDictionary<NSString *, NSNumber *> *> *array = [[NSMutableArray alloc] init];
1267
- for (SENTPhoneUsageEvent *event in phoneUsageEvents) {
1268
- [array addObject:[self convertPhoneUsageEvent:event]];
1269
- }
1270
- return array;
1271
- }
1272
-
1273
- - (NSDictionary<NSString *, id> *)convertPhoneUsageEvent:(SENTPhoneUsageEvent *)phoneUsageEvent {
1274
- return [self convertDrivingEvent:phoneUsageEvent];
1275
- }
1276
-
1277
- - (NSArray<NSDictionary<NSString *, id> *> *)convertCallWhileMovingEvents:(NSArray<SENTCallWhileMovingEvent*> *)callWhileMovingEvents {
1278
- NSMutableArray <NSDictionary<NSString *, NSNumber *> *> *array = [[NSMutableArray alloc] init];
1279
- for (SENTCallWhileMovingEvent *event in callWhileMovingEvents) {
1280
- [array addObject:[self convertCallWhileMovingEvent:event]];
1281
- }
1282
- return array;
1283
- }
1284
-
1285
- - (NSDictionary<NSString *, id> *)convertCallWhileMovingEvent:(SENTCallWhileMovingEvent *)callWhileMovingEvent {
1286
- NSMutableDictionary<NSString *, id> *dict = [self convertDrivingEvent:callWhileMovingEvent];
1287
- if (callWhileMovingEvent.minTraveledSpeedInMps != nil) {
1288
- dict[@"minTravelledSpeedInMps"] = callWhileMovingEvent.minTraveledSpeedInMps;
1289
- }
1290
- if (callWhileMovingEvent.maxTraveledSpeedInMps != nil) {
1291
- dict[@"maxTravelledSpeedInMps"] = callWhileMovingEvent.maxTraveledSpeedInMps;
1292
- }
1293
- return dict;
1294
- }
1295
-
1296
- - (NSArray<NSDictionary<NSString *, id> *> *)convertSpeedingEvents:(NSArray<SENTSpeedingEvent*> *)speedingEvents {
1297
- NSMutableArray <NSDictionary<NSString *, NSNumber *> *> *array = [[NSMutableArray alloc] init];
1298
- for (SENTSpeedingEvent *event in speedingEvents) {
1299
- [array addObject:[self convertSpeedingEvent:event]];
1300
- }
1301
- return array;
1302
- }
1303
-
1304
- - (NSDictionary<NSString *, id> *)convertSpeedingEvent:(SENTSpeedingEvent *)speedingEvent {
1305
- return [self convertDrivingEvent:speedingEvent];
1306
- }
1307
-
1308
1249
  - (NSMutableDictionary<NSString *, id> *)convertDrivingEvent:(SENTDrivingEvent *)drivingEvent {
1309
1250
  NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
1310
1251
  dict[@"startTime"] = [drivingEvent.startDate description];
@@ -1069,38 +1069,6 @@ RCT_EXPORT_METHOD(getDrivingInsights:(NSString*)transportId resolver:(RCTPromise
1069
1069
  resolve([self convertDrivingInsights:drivingInsights]);
1070
1070
  }
1071
1071
 
1072
- RCT_EXPORT_METHOD(getHarshDrivingEvents:(NSString*)transportId resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
1073
- {
1074
- REJECT_IF_SDK_NOT_INITIALIZED(reject);
1075
-
1076
- NSArray<SENTHarshDrivingEvent *> *harshDrivingEvents = [[Sentiance sharedInstance] getHarshDrivingEventsForTransportId:transportId];
1077
- resolve([self convertHarshDrivingEvents:harshDrivingEvents]);
1078
- }
1079
-
1080
- RCT_EXPORT_METHOD(getPhoneUsageEvents:(NSString*)transportId resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
1081
- {
1082
- REJECT_IF_SDK_NOT_INITIALIZED(reject);
1083
-
1084
- NSArray<SENTPhoneUsageEvent *> *phoneUsageEvents = [[Sentiance sharedInstance] getPhoneUsageEventsForTransportId:transportId];
1085
- resolve([self convertPhoneUsageEvents:phoneUsageEvents]);
1086
- }
1087
-
1088
- RCT_EXPORT_METHOD(getCallWhileMovingEvents:(NSString*)transportId resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
1089
- {
1090
- REJECT_IF_SDK_NOT_INITIALIZED(reject);
1091
-
1092
- NSArray<SENTCallWhileMovingEvent *> *callWhileMovingEvents = [[Sentiance sharedInstance] getCallsWhileMovingEventsForTransportId:transportId];
1093
- resolve([self convertCallWhileMovingEvents:callWhileMovingEvents]);
1094
- }
1095
-
1096
- RCT_EXPORT_METHOD(getSpeedingEvents:(NSString*)transportId resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
1097
- {
1098
- REJECT_IF_SDK_NOT_INITIALIZED(reject);
1099
-
1100
- NSArray<SENTSpeedingEvent *> *speedingEvents = [[Sentiance sharedInstance] getSpeedingEventsForTransportId:transportId];
1101
- resolve([self convertSpeedingEvents:speedingEvents]);
1102
- }
1103
-
1104
1072
  RCT_EXPORT_METHOD(getAverageOverallSafetyScore:(NSDictionary *)params resolver:(RCTPromiseResolveBlock)resolve rejecter:(RCTPromiseRejectBlock)reject)
1105
1073
  {
1106
1074
  REJECT_IF_SDK_NOT_INITIALIZED(reject);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentiance-react-native/core",
3
- "version": "6.20.0-rc.3",
3
+ "version": "6.20.0",
4
4
  "description": "The Sentiance Core library",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -27,10 +27,10 @@
27
27
  "targetSdk": 34,
28
28
  "compileSdk": 34,
29
29
  "buildTools": "34.0.0",
30
- "sentiance": "6.20.0-rc2"
30
+ "sentiance": "6.20.+"
31
31
  },
32
32
  "ios": {
33
- "sentiance": "6.20.0-rc2"
33
+ "sentiance": "~> 6.20.0"
34
34
  }
35
35
  }
36
36
  }