hypertrack-sdk-react-native 9.1.0 → 9.2.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.
- package/CHANGELOG.md +153 -3
- package/README.md +3 -3
- package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
- package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.2/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/android/.gradle/checksums/checksums.lock +0 -0
- package/android/.gradle/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/compiler.xml +6 -0
- package/android/.idea/gradle.xml +19 -0
- package/android/.idea/jarRepositories.xml +35 -0
- package/android/.idea/kotlinc.xml +6 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/local.properties +8 -0
- package/android/src/main/java/com/reactnativehypertracksdk/HyperTrackReactNativePlugin.kt +4 -4
- package/android/src/main/java/com/reactnativehypertracksdk/ReactNativeSerialization.kt +16 -17
- package/android/src/main/java/com/reactnativehypertracksdk/common/GeotagData.kt +13 -0
- package/android/src/main/java/com/reactnativehypertracksdk/common/HyperTrackSdkWrapper.kt +45 -19
- package/android/src/main/java/com/reactnativehypertracksdk/common/Serialization.kt +115 -40
- package/hypertrack-sdk-react-native.podspec +1 -1
- package/ios/common/GeotagData.swift +11 -0
- package/ios/common/HyperTrackSDKWrapper.swift +9 -4
- package/ios/common/Serialization.swift +140 -61
- package/lib/commonjs/HyperTrack/HyperTrack.js +90 -22
- package/lib/commonjs/HyperTrack/HyperTrack.js.map +1 -1
- package/lib/commonjs/HyperTrack/data_types/HyperTrackError.js +4 -4
- package/lib/commonjs/HyperTrack/data_types/HyperTrackError.js.map +1 -1
- package/lib/commonjs/HyperTrack/data_types/Location.js.map +1 -1
- package/lib/commonjs/HyperTrack/data_types/LocationError.js.map +1 -1
- package/lib/commonjs/HyperTrack/data_types/LocationWithDeviation.js +6 -0
- package/lib/commonjs/HyperTrack/data_types/LocationWithDeviation.js.map +1 -0
- package/lib/commonjs/HyperTrack/data_types/Result.js +2 -0
- package/lib/commonjs/HyperTrack/data_types/Result.js.map +1 -0
- package/lib/commonjs/HyperTrack/data_types/internal/{LocationResponse.js → GeotagData.js} +1 -1
- package/lib/commonjs/HyperTrack/data_types/internal/GeotagData.js.map +1 -0
- package/lib/commonjs/HyperTrack/data_types/internal/LocationInternal.js +2 -0
- package/lib/commonjs/HyperTrack/data_types/internal/LocationInternal.js.map +1 -0
- package/lib/commonjs/HyperTrack/data_types/internal/LocationWithDeviationInternal.js +6 -0
- package/lib/commonjs/HyperTrack/data_types/internal/LocationWithDeviationInternal.js.map +1 -0
- package/lib/commonjs/index.js +22 -2
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/HyperTrack/HyperTrack.js +90 -22
- package/lib/module/HyperTrack/HyperTrack.js.map +1 -1
- package/lib/module/HyperTrack/data_types/HyperTrackError.js +3 -3
- package/lib/module/HyperTrack/data_types/HyperTrackError.js.map +1 -1
- package/lib/module/HyperTrack/data_types/Location.js.map +1 -1
- package/lib/module/HyperTrack/data_types/LocationError.js.map +1 -1
- package/lib/module/HyperTrack/data_types/LocationWithDeviation.js +2 -0
- package/lib/module/HyperTrack/data_types/LocationWithDeviation.js.map +1 -0
- package/lib/module/HyperTrack/data_types/Result.js +2 -0
- package/lib/module/HyperTrack/data_types/Result.js.map +1 -0
- package/lib/module/HyperTrack/data_types/internal/GeotagData.js +2 -0
- package/lib/module/HyperTrack/data_types/internal/GeotagData.js.map +1 -0
- package/lib/module/HyperTrack/data_types/internal/LocationInternal.js +2 -0
- package/lib/module/HyperTrack/data_types/internal/LocationInternal.js.map +1 -0
- package/lib/module/HyperTrack/data_types/internal/LocationWithDeviationInternal.js +2 -0
- package/lib/module/HyperTrack/data_types/internal/LocationWithDeviationInternal.js.map +1 -0
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/HyperTrack/HyperTrack.d.ts +17 -1
- package/lib/typescript/HyperTrack/data_types/Location.d.ts +2 -5
- package/lib/typescript/HyperTrack/data_types/LocationError.d.ts +0 -1
- package/lib/typescript/HyperTrack/data_types/LocationWithDeviation.d.ts +5 -0
- package/lib/typescript/HyperTrack/data_types/Result.d.ts +9 -0
- package/lib/typescript/HyperTrack/data_types/internal/GeotagData.d.ts +5 -0
- package/lib/typescript/HyperTrack/data_types/internal/LocationInternal.d.ts +7 -0
- package/lib/typescript/HyperTrack/data_types/internal/LocationWithDeviationInternal.d.ts +8 -0
- package/lib/typescript/index.d.ts +3 -1
- package/package.json +1 -1
- package/src/HyperTrack/HyperTrack.ts +160 -46
- package/src/HyperTrack/data_types/Location.ts +2 -5
- package/src/HyperTrack/data_types/LocationError.ts +0 -2
- package/src/HyperTrack/data_types/LocationWithDeviation.ts +6 -0
- package/src/HyperTrack/data_types/Result.ts +11 -0
- package/src/HyperTrack/data_types/internal/GeotagData.ts +6 -0
- package/src/HyperTrack/data_types/internal/LocationInternal.ts +7 -0
- package/src/HyperTrack/data_types/internal/LocationWithDeviationInternal.ts +9 -0
- package/src/index.tsx +7 -2
- package/android/src/main/java/com/reactnativehypertracksdk/common/Geotag.kt +0 -9
- package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js +0 -2
- package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js.map +0 -1
- package/lib/commonjs/HyperTrack/data_types/internal/LocationResponse.js.map +0 -1
- package/lib/module/HyperTrack/data_types/internal/Geotag.js +0 -2
- package/lib/module/HyperTrack/data_types/internal/Geotag.js.map +0 -1
- package/lib/module/HyperTrack/data_types/internal/LocationResponse.js +0 -2
- package/lib/module/HyperTrack/data_types/internal/LocationResponse.js.map +0 -1
- package/lib/typescript/HyperTrack/data_types/internal/Geotag.d.ts +0 -3
- package/lib/typescript/HyperTrack/data_types/internal/LocationResponse.d.ts +0 -11
- package/src/HyperTrack/data_types/internal/Geotag.ts +0 -3
- package/src/HyperTrack/data_types/internal/LocationResponse.ts +0 -14
package/lib/commonjs/index.js
CHANGED
|
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "Errors", {
|
|
|
9
9
|
return _LocationError.Errors;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "Failure", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _Result.Failure;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
Object.defineProperty(exports, "HyperTrack", {
|
|
13
19
|
enumerable: true,
|
|
14
20
|
get: function () {
|
|
@@ -36,7 +42,13 @@ Object.defineProperty(exports, "LocationError", {
|
|
|
36
42
|
Object.defineProperty(exports, "NotRunning", {
|
|
37
43
|
enumerable: true,
|
|
38
44
|
get: function () {
|
|
39
|
-
return
|
|
45
|
+
return _LocationErrorInternal.NotRunning;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "Result", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _Result.Result;
|
|
40
52
|
}
|
|
41
53
|
});
|
|
42
54
|
Object.defineProperty(exports, "SdkInitParams", {
|
|
@@ -48,15 +60,23 @@ Object.defineProperty(exports, "SdkInitParams", {
|
|
|
48
60
|
Object.defineProperty(exports, "Starting", {
|
|
49
61
|
enumerable: true,
|
|
50
62
|
get: function () {
|
|
51
|
-
return
|
|
63
|
+
return _LocationErrorInternal.Starting;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "Success", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _Result.Success;
|
|
52
70
|
}
|
|
53
71
|
});
|
|
54
72
|
exports.default = void 0;
|
|
55
73
|
var _HyperTrack = _interopRequireDefault(require("./HyperTrack/HyperTrack"));
|
|
56
74
|
var _HyperTrackError = require("./HyperTrack/data_types/HyperTrackError");
|
|
75
|
+
var _LocationErrorInternal = require("./HyperTrack/data_types/internal/LocationErrorInternal");
|
|
57
76
|
var _LocationError = require("./HyperTrack/data_types/LocationError");
|
|
58
77
|
var _Location = require("./HyperTrack/data_types/Location");
|
|
59
78
|
var _SdkInitParams = require("./HyperTrack/data_types/SdkInitParams");
|
|
79
|
+
var _Result = require("./HyperTrack/data_types/Result");
|
|
60
80
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
61
81
|
var _default = _HyperTrack.default;
|
|
62
82
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HyperTrack"],"sources":["index.tsx"],"sourcesContent":["import HyperTrack from './HyperTrack/HyperTrack';\nexport default HyperTrack;\nexport { HyperTrack };\n\nexport { HyperTrackError } from './HyperTrack/data_types/HyperTrackError';\nexport {
|
|
1
|
+
{"version":3,"names":["_HyperTrack","_interopRequireDefault","require","_HyperTrackError","_LocationErrorInternal","_LocationError","_Location","_SdkInitParams","_Result","obj","__esModule","default","_default","HyperTrack","exports"],"sources":["index.tsx"],"sourcesContent":["import HyperTrack from './HyperTrack/HyperTrack';\nexport default HyperTrack;\nexport { HyperTrack };\n\nexport { HyperTrackError } from './HyperTrack/data_types/HyperTrackError';\nexport {\n NotRunning,\n Starting,\n} from './HyperTrack/data_types/internal/LocationErrorInternal';\nexport { LocationError, Errors } from './HyperTrack/data_types/LocationError';\nexport { Location } from './HyperTrack/data_types/Location';\nexport { SdkInitParams } from './HyperTrack/data_types/SdkInitParams';\nexport { Result, Success, Failure } from './HyperTrack/data_types/Result';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAIA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA0E,SAAAD,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAX3DC,mBAAU;AAAAC,OAAA,CAAAH,OAAA,GAAAC,QAAA"}
|
|
@@ -20,7 +20,7 @@ export default class HyperTrack {
|
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
22
|
* Creates an SDK instance
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
24
|
* @param publishableKey publishable key provided in HyperTrack’s dashboard setup page
|
|
25
25
|
* @param sdkInitParams
|
|
26
26
|
* @returns HyperTrack instance
|
|
@@ -71,7 +71,7 @@ export default class HyperTrack {
|
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
73
|
* Reflects the tracking intent for the device
|
|
74
|
-
*
|
|
74
|
+
*
|
|
75
75
|
* @return {boolean} Whether the user's movement data is getting tracked or not.
|
|
76
76
|
*/
|
|
77
77
|
isTracking() {
|
|
@@ -129,15 +129,47 @@ export default class HyperTrack {
|
|
|
129
129
|
|
|
130
130
|
/**
|
|
131
131
|
* Adds a new geotag
|
|
132
|
+
*
|
|
132
133
|
* @param {Object} data - Geotad data JSON
|
|
133
134
|
* @returns current location if success or LocationError if failure
|
|
134
135
|
*/
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Adds a new geotag with expected location
|
|
139
|
+
*
|
|
140
|
+
* @param {Object} data - Geotad data JSON
|
|
141
|
+
* @param {Location} expectedLocation - Expected location
|
|
142
|
+
* @returns location with deviation if success or LocationError if failure
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
async addGeotag() {
|
|
146
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
147
|
+
args[_key] = arguments[_key];
|
|
148
|
+
}
|
|
149
|
+
if (args.length === 1 && typeof args[0] === 'object') {
|
|
150
|
+
return HyperTrackSdk.addGeotag({
|
|
151
|
+
data: args[0],
|
|
152
|
+
expectedLocation: undefined
|
|
153
|
+
}).then(locationResponse => {
|
|
154
|
+
return this.deserializeLocationResponse(locationResponse);
|
|
155
|
+
});
|
|
156
|
+
} else if (args.length === 2 && typeof args[0] === 'object' && this.isLocation(args[1])) {
|
|
157
|
+
let expectedLocation = args[1];
|
|
158
|
+
return HyperTrackSdk.addGeotag({
|
|
159
|
+
data: args[0],
|
|
160
|
+
expectedLocation: {
|
|
161
|
+
type: 'location',
|
|
162
|
+
value: {
|
|
163
|
+
latitude: expectedLocation.latitude,
|
|
164
|
+
longitude: expectedLocation.longitude
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}).then(locationResponse => {
|
|
168
|
+
return this.deserializeLocationWithDeviationResponse(locationResponse);
|
|
169
|
+
});
|
|
170
|
+
} else {
|
|
171
|
+
throw new Error('Invalid arguments');
|
|
172
|
+
}
|
|
141
173
|
}
|
|
142
174
|
|
|
143
175
|
/**
|
|
@@ -217,21 +249,57 @@ export default class HyperTrack {
|
|
|
217
249
|
/** @ignore */
|
|
218
250
|
deserializeLocationResponse(response) {
|
|
219
251
|
switch (response.type) {
|
|
220
|
-
case
|
|
221
|
-
return
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
252
|
+
case 'success':
|
|
253
|
+
return {
|
|
254
|
+
type: 'success',
|
|
255
|
+
value: response.value.value
|
|
256
|
+
};
|
|
257
|
+
case 'failure':
|
|
258
|
+
return {
|
|
259
|
+
type: 'failure',
|
|
260
|
+
value: this.deserializeLocationError(response.value)
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/** @ignore */
|
|
266
|
+
deserializeLocationWithDeviationResponse(response) {
|
|
267
|
+
switch (response.type) {
|
|
268
|
+
case 'success':
|
|
269
|
+
const locationWithDeviationInternal = response.value;
|
|
270
|
+
const locationInternal = locationWithDeviationInternal.value.location;
|
|
271
|
+
return {
|
|
272
|
+
type: 'success',
|
|
273
|
+
value: {
|
|
274
|
+
location: locationInternal.value,
|
|
275
|
+
deviation: locationWithDeviationInternal.value.deviation
|
|
276
|
+
}
|
|
277
|
+
};
|
|
278
|
+
case 'failure':
|
|
279
|
+
return {
|
|
280
|
+
type: 'failure',
|
|
281
|
+
value: this.deserializeLocationError(response.value)
|
|
282
|
+
};
|
|
233
283
|
}
|
|
234
|
-
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/** @ignore */
|
|
287
|
+
deserializeLocationError(locationError) {
|
|
288
|
+
switch (locationError.type) {
|
|
289
|
+
case 'notRunning':
|
|
290
|
+
case 'starting':
|
|
291
|
+
return locationError;
|
|
292
|
+
case 'errors':
|
|
293
|
+
return {
|
|
294
|
+
type: 'errors',
|
|
295
|
+
value: this.deserializeHyperTrackErrors(locationError.value)
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/** @ignore */
|
|
301
|
+
isLocation(obj) {
|
|
302
|
+
return 'latitude' in obj && typeof obj.latitude == 'number' && 'longitude' in obj && typeof obj.longitude == 'number';
|
|
235
303
|
}
|
|
236
304
|
}
|
|
237
305
|
//# sourceMappingURL=HyperTrack.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeModules","Platform","NativeEventEmitter","HyperTrackError","EVENT_TRACKING","EVENT_AVAILABILITY","EVENT_ERROR","LINKING_ERROR","select","ios","default","HyperTrackSdk","HyperTrackReactNativePlugin","Proxy","get","Error","EventEmitter","HyperTrack","constructor","initialize","publishableKey","sdkInitParams","initializeSdk","loggingEnabled","allowMockLocations","requireBackgroundTrackingPermission","automaticallyRequestPermissions","error","message","getDeviceId","then","deviceId","value","isAvailable","setAvailability","type","isTracking","sync","startTracking","stopTracking","getLocation","locationResponse","deserializeLocationResponse","setName","name","setMetadata","data","addGeotag","subscribeToErrors","listener","addListener","rawErrors","deserializeHyperTrackErrors","subscribeToTracking","subscribeToAvailability","errors","map","response"],"sources":["HyperTrack.ts"],"sourcesContent":["import { NativeModules, Platform, NativeEventEmitter } from 'react-native';\nimport { HyperTrackError } from './data_types/HyperTrackError';\nimport type { IsAvailable } from './data_types/internal/IsAvailable';\nimport type { IsTracking } from './data_types/internal/IsTracking';\nimport type { LocationResponse } from './data_types/internal/LocationResponse';\nimport type { Location } from './data_types/Location';\nimport type { LocationError } from './data_types/LocationError';\nimport type { SdkInitParams } from './data_types/SdkInitParams';\nimport type { DeviceId } from './data_types/internal/DeviceId';\nimport type { Geotag } from './data_types/internal/Geotag';\nimport type { DeviceName } from './data_types/internal/DeviceName';\nimport type { HyperTrackErrorInternal } from './data_types/internal/HyperTrackErrorInternal';\n\nconst EVENT_TRACKING = 'onTrackingChanged';\nconst EVENT_AVAILABILITY = 'onAvailabilityChanged';\nconst EVENT_ERROR = 'onError';\n\nconst LINKING_ERROR =\n `The package 'hypertrack-sdk-react-native' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst HyperTrackSdk = NativeModules.HyperTrackReactNativePlugin\n ? NativeModules.HyperTrackReactNativePlugin\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nconst EventEmitter = new NativeEventEmitter(HyperTrackSdk);\n\nexport default class HyperTrack {\n private constructor() {\n return this;\n }\n\n /**\n * Creates an SDK instance\n * \n * @param publishableKey publishable key provided in HyperTrack’s dashboard setup page\n * @param sdkInitParams\n * @returns HyperTrack instance\n */\n static async initialize(\n publishableKey: string,\n sdkInitParams: SdkInitParams = {}\n ): Promise<HyperTrack> {\n try {\n await HyperTrackSdk.initializeSdk({\n publishableKey,\n loggingEnabled: sdkInitParams.loggingEnabled ?? false,\n allowMockLocations: sdkInitParams.allowMockLocations ?? false,\n requireBackgroundTrackingPermission: sdkInitParams.requireBackgroundTrackingPermission ?? false,\n automaticallyRequestPermissions: sdkInitParams.automaticallyRequestPermissions ?? true,\n });\n return new HyperTrack();\n } catch (error: any) {\n throw new Error(error.message);\n }\n }\n\n /**\n * Returns a string that is used to uniquely identify the device\n */\n getDeviceId(): Promise<string> {\n return HyperTrackSdk.getDeviceId().then(\n (deviceId: DeviceId) => deviceId.value\n );\n }\n\n /**\n * Reflects availability of the device for the Nearby search\n *\n * @returns true when is available or false when unavailable\n */\n isAvailable(): Promise<boolean> {\n return HyperTrackSdk.isAvailable().then(\n (isAvailable: IsAvailable) => isAvailable.value\n );\n }\n\n /**\n * Sets the availability of the device for the Nearby search\n *\n * @param availability true when is available or false when unavailable\n */\n setAvailability(isAvailable: boolean) {\n HyperTrackSdk.setAvailability({\n type: 'isAvailable',\n value: isAvailable\n } as IsAvailable);\n }\n\n /**\n * Reflects the tracking intent for the device\n * \n * @return {boolean} Whether the user's movement data is getting tracked or not.\n */\n isTracking(): Promise<boolean> {\n return HyperTrackSdk.isTracking().then(\n (isTracking: IsTracking) => isTracking.value\n );\n }\n\n /**\n * Syncs the device state with the HyperTrack servers\n */\n sync() {\n HyperTrackSdk.sync();\n }\n\n /**\n * Expresses an intent to start location tracking for the device\n */\n startTracking() {\n HyperTrackSdk.startTracking();\n }\n\n /**\n * Stops location tracking immediately\n */\n stopTracking() {\n HyperTrackSdk.stopTracking();\n }\n\n /**\n * Reflects the current location of the user or an outage reason\n */\n getLocation(): Promise<LocationError | Location> {\n return HyperTrackSdk.getLocation().then(\n (locationResponse: LocationResponse) => {\n return this.deserializeLocationResponse(locationResponse);\n }\n );\n }\n\n /**\n * Sets the name for the device\n * @param {string} name\n */\n setName(name: string) {\n HyperTrackSdk.setName({\n type: 'deviceName',\n value: name\n } as DeviceName)\n }\n\n /**\n * Sets the metadata for the device\n * @param {Object} data - Metadata JSON\n */\n setMetadata(data: Object) {\n HyperTrackSdk.setMetadata(data);\n }\n\n /**\n * Adds a new geotag\n * @param {Object} data - Geotad data JSON\n * @returns current location if success or LocationError if failure\n */\n addGeotag(data: Object): Promise<LocationError | Location> {\n return HyperTrackSdk.addGeotag({\n data\n } as Geotag).then(\n (locationResponse: LocationResponse) => {\n return this.deserializeLocationResponse(locationResponse);\n }\n );\n }\n\n /**\n * Subscribe to tracking errors\n *\n * @param listener\n * @returns EmitterSubscription\n * @example\n * ```js\n * const subscription = HyperTrack.subscribeToErrors(errors => {\n * errors.forEach(error => {\n * // ... error\n * })\n * })\n *\n * // later, to stop listening\n * subscription.remove()\n * ```\n */\n subscribeToErrors(listener: (errors: HyperTrackError[]) => void) {\n return EventEmitter.addListener(EVENT_ERROR, (rawErrors: HyperTrackErrorInternal[]) => {\n listener(this.deserializeHyperTrackErrors(rawErrors))\n });\n }\n\n /**\n * Subscribe to tracking intent changes\n *\n * @param listener\n * @returns EmitterSubscription\n * @example\n * ```js\n * const subscription = HyperTrack.subscribeToTracking(isTracking => {\n * if (isTracking) {\n * // ... ready to go\n * }\n * })\n *\n * // later, to stop listening\n * subscription.remove()\n * ```\n */\n subscribeToTracking(listener: (isTracking: boolean) => void) {\n return EventEmitter.addListener(\n EVENT_TRACKING,\n (isTracking: IsTracking) => {\n listener(isTracking.value);\n }\n );\n }\n\n /**\n * Subscribe to availability changes\n *\n * @param listener\n * @returns EmitterSubscription\n * @example\n * ```js\n * const subscription = HyperTrack.subscribeToAvailability(isAvailable => {\n * if (isAvailable) {\n * // ... ready to go\n * }\n * })\n *\n * // later, to stop listening\n * subscription.remove()\n * ```\n */\n subscribeToAvailability(listener: (isAvailable: boolean) => void) {\n return EventEmitter.addListener(\n EVENT_AVAILABILITY,\n (isAvailable: IsAvailable) => {\n listener(isAvailable.value);\n }\n );\n }\n\n /** @ignore */\n private deserializeHyperTrackErrors(errors: HyperTrackErrorInternal[]): HyperTrackError[] {\n return errors.map((error: HyperTrackErrorInternal) => HyperTrackError[error.value as keyof typeof HyperTrackError])\n }\n\n /** @ignore */\n private deserializeLocationResponse(response: LocationResponse): Location | LocationError {\n switch(response.type) {\n case \"success\":\n return response.value\n case \"failure\":\n switch(response.value.type) {\n case \"notRunning\":\n case \"starting\":\n return response.value\n case \"errors\":\n return {\n type: \"errors\",\n value: this.deserializeHyperTrackErrors(response.value.value)\n }\n }\n };\n }\n}\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,EAAEC,kBAAkB,QAAQ,cAAc;AAC1E,SAASC,eAAe,QAAQ,8BAA8B;AAY9D,MAAMC,cAAc,GAAG,mBAAmB;AAC1C,MAAMC,kBAAkB,GAAG,uBAAuB;AAClD,MAAMC,WAAW,GAAG,SAAS;AAE7B,MAAMC,aAAa,GAChB,sFAAqF,GACtFN,QAAQ,CAACO,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,6CAA6C;AAE/C,MAAMC,aAAa,GAAGX,aAAa,CAACY,2BAA2B,GAC3DZ,aAAa,CAACY,2BAA2B,GACzC,IAAIC,KAAK,CACT,CAAC,CAAC,EACF;EACEC,GAAG,GAAG;IACJ,MAAM,IAAIC,KAAK,CAACR,aAAa,CAAC;EAChC;AACF,CAAC,CACF;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A;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEE,mBAAmB,CAACJ,QAAuC,EAAE;IAC3D,OAAOjC,YAAY,CAACkC,WAAW,CAC7B9C,cAAc,EACbgC,UAAsB,IAAK;MAC1Ba,QAAQ,CAACb,UAAU,CAACJ,KAAK,CAAC;IAC5B,CAAC,CACF;EACH;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACEsB,uBAAuB,CAACL,QAAwC,EAAE;IAChE,OAAOjC,YAAY,CAACkC,WAAW,CAC7B7C,kBAAkB,EACjB4B,WAAwB,IAAK;MAC5BgB,QAAQ,CAAChB,WAAW,CAACD,KAAK,CAAC;IAC7B,CAAC,CACF;EACH;;EAEA;EACQoB,2BAA2B,CAACG,MAAiC,EAAqB;IACxF,OAAOA,MAAM,CAACC,GAAG,CAAE7B,KAA8B,IAAKxB,eAAe,CAACwB,KAAK,CAACK,KAAK,CAAiC,CAAC;EACrH;;EAEA;EACQU,2BAA2B,CAACe,QAA0B,EAA4B;IACxF,QAAOA,QAAQ,CAACtB,IAAI;MAClB,KAAK,SAAS;QACZ,OAAOsB,QAAQ,CAACzB,KAAK;MACvB,KAAK,SAAS;QACZ,QAAOyB,QAAQ,CAACzB,KAAK,CAACG,IAAI;UACxB,KAAK,YAAY;UACjB,KAAK,UAAU;YACb,OAAOsB,QAAQ,CAACzB,KAAK;UACvB,KAAK,QAAQ;YACX,OAAO;cACLG,IAAI,EAAE,QAAQ;cACdH,KAAK,EAAE,IAAI,CAACoB,2BAA2B,CAACK,QAAQ,CAACzB,KAAK,CAACA,KAAK;YAC9D,CAAC;QAAA;IACJ;IACJ;EACH;AACF"}
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","NativeEventEmitter","HyperTrackError","EVENT_TRACKING","EVENT_AVAILABILITY","EVENT_ERROR","LINKING_ERROR","select","ios","default","HyperTrackSdk","HyperTrackReactNativePlugin","Proxy","get","Error","EventEmitter","HyperTrack","constructor","initialize","publishableKey","sdkInitParams","arguments","length","undefined","initializeSdk","loggingEnabled","allowMockLocations","requireBackgroundTrackingPermission","automaticallyRequestPermissions","error","message","getDeviceId","then","deviceId","value","isAvailable","setAvailability","type","isTracking","sync","startTracking","stopTracking","getLocation","locationResponse","deserializeLocationResponse","setName","name","setMetadata","data","addGeotag","_len","args","Array","_key","expectedLocation","isLocation","latitude","longitude","deserializeLocationWithDeviationResponse","subscribeToErrors","listener","addListener","rawErrors","deserializeHyperTrackErrors","subscribeToTracking","subscribeToAvailability","errors","map","response","deserializeLocationError","locationWithDeviationInternal","locationInternal","location","deviation","locationError","obj"],"sources":["HyperTrack.ts"],"sourcesContent":["import { NativeModules, Platform, NativeEventEmitter } from 'react-native';\nimport { HyperTrackError } from './data_types/HyperTrackError';\nimport type { IsAvailable } from './data_types/internal/IsAvailable';\nimport type { IsTracking } from './data_types/internal/IsTracking';\nimport type { Location } from './data_types/Location';\nimport type { LocationError } from './data_types/LocationError';\nimport type { SdkInitParams } from './data_types/SdkInitParams';\nimport type { DeviceId } from './data_types/internal/DeviceId';\nimport type { GeotagData } from './data_types/internal/GeotagData';\nimport type { DeviceName } from './data_types/internal/DeviceName';\nimport type { HyperTrackErrorInternal } from './data_types/internal/HyperTrackErrorInternal';\nimport type { Result } from './data_types/Result';\nimport type { LocationWithDeviation } from './data_types/LocationWithDeviation';\nimport type { LocationErrorInternal } from './data_types/internal/LocationErrorInternal';\nimport type { LocationInternal } from './data_types/internal/LocationInternal';\nimport type { LocationWithDeviationInternal } from './data_types/internal/LocationWithDeviationInternal';\n\nconst EVENT_TRACKING = 'onTrackingChanged';\nconst EVENT_AVAILABILITY = 'onAvailabilityChanged';\nconst EVENT_ERROR = 'onError';\n\nconst LINKING_ERROR =\n `The package 'hypertrack-sdk-react-native' doesn't seem to be linked. Make sure: \\n\\n` +\n Platform.select({ ios: \"- You have run 'pod install'\\n\", default: '' }) +\n '- You rebuilt the app after installing the package\\n' +\n '- You are not using Expo managed workflow\\n';\n\nconst HyperTrackSdk = NativeModules.HyperTrackReactNativePlugin\n ? NativeModules.HyperTrackReactNativePlugin\n : new Proxy(\n {},\n {\n get() {\n throw new Error(LINKING_ERROR);\n },\n }\n );\n\nconst EventEmitter = new NativeEventEmitter(HyperTrackSdk);\n\nexport default class HyperTrack {\n private constructor() {\n return this;\n }\n\n /**\n * Creates an SDK instance\n *\n * @param publishableKey publishable key provided in HyperTrack’s dashboard setup page\n * @param sdkInitParams\n * @returns HyperTrack instance\n */\n static async initialize(\n publishableKey: string,\n sdkInitParams: SdkInitParams = {}\n ): Promise<HyperTrack> {\n try {\n await HyperTrackSdk.initializeSdk({\n publishableKey,\n loggingEnabled: sdkInitParams.loggingEnabled ?? false,\n allowMockLocations: sdkInitParams.allowMockLocations ?? false,\n requireBackgroundTrackingPermission:\n sdkInitParams.requireBackgroundTrackingPermission ?? false,\n automaticallyRequestPermissions:\n sdkInitParams.automaticallyRequestPermissions ?? true,\n });\n return new HyperTrack();\n } catch (error: any) {\n throw new Error(error.message);\n }\n }\n\n /**\n * Returns a string that is used to uniquely identify the device\n */\n getDeviceId(): Promise<string> {\n return HyperTrackSdk.getDeviceId().then(\n (deviceId: DeviceId) => deviceId.value\n );\n }\n\n /**\n * Reflects availability of the device for the Nearby search\n *\n * @returns true when is available or false when unavailable\n */\n isAvailable(): Promise<boolean> {\n return HyperTrackSdk.isAvailable().then(\n (isAvailable: IsAvailable) => isAvailable.value\n );\n }\n\n /**\n * Sets the availability of the device for the Nearby search\n *\n * @param availability true when is available or false when unavailable\n */\n setAvailability(isAvailable: boolean) {\n HyperTrackSdk.setAvailability({\n type: 'isAvailable',\n value: isAvailable,\n } as IsAvailable);\n }\n\n /**\n * Reflects the tracking intent for the device\n *\n * @return {boolean} Whether the user's movement data is getting tracked or not.\n */\n isTracking(): Promise<boolean> {\n return HyperTrackSdk.isTracking().then(\n (isTracking: IsTracking) => isTracking.value\n );\n }\n\n /**\n * Syncs the device state with the HyperTrack servers\n */\n sync() {\n HyperTrackSdk.sync();\n }\n\n /**\n * Expresses an intent to start location tracking for the device\n */\n startTracking() {\n HyperTrackSdk.startTracking();\n }\n\n /**\n * Stops location tracking immediately\n */\n stopTracking() {\n HyperTrackSdk.stopTracking();\n }\n\n /**\n * Reflects the current location of the user or an outage reason\n */\n getLocation(): Promise<LocationError | Location> {\n return HyperTrackSdk.getLocation().then(\n (locationResponse: Result<LocationInternal, LocationErrorInternal>) => {\n return this.deserializeLocationResponse(locationResponse);\n }\n );\n }\n\n /**\n * Sets the name for the device\n * @param {string} name\n */\n setName(name: string) {\n HyperTrackSdk.setName({\n type: 'deviceName',\n value: name,\n } as DeviceName);\n }\n\n /**\n * Sets the metadata for the device\n * @param {Object} data - Metadata JSON\n */\n setMetadata(data: Object) {\n HyperTrackSdk.setMetadata(data);\n }\n\n /**\n * Adds a new geotag\n *\n * @param {Object} data - Geotad data JSON\n * @returns current location if success or LocationError if failure\n */\n async addGeotag(data: Object): Promise<Result<Location, LocationError>>;\n\n /**\n * Adds a new geotag with expected location\n *\n * @param {Object} data - Geotad data JSON\n * @param {Location} expectedLocation - Expected location\n * @returns location with deviation if success or LocationError if failure\n */\n async addGeotag(\n data: Object,\n expectedLocation: Location\n ): Promise<Result<Location, LocationError>>;\n\n async addGeotag(\n ...args: any[]\n ): Promise<Result<Location | LocationWithDeviation, LocationError>> {\n if (args.length === 1 && typeof args[0] === 'object') {\n return HyperTrackSdk.addGeotag({\n data: args[0],\n expectedLocation: undefined,\n } as GeotagData).then(\n (locationResponse: Result<LocationInternal, LocationErrorInternal>) => {\n return this.deserializeLocationResponse(locationResponse);\n }\n );\n } else if (\n args.length === 2 &&\n typeof args[0] === 'object' &&\n this.isLocation(args[1])\n ) {\n let expectedLocation = args[1] as Location;\n return HyperTrackSdk.addGeotag({\n data: args[0],\n expectedLocation: {\n type: 'location',\n value: {\n latitude: expectedLocation.latitude,\n longitude: expectedLocation.longitude,\n },\n } as LocationInternal,\n } as GeotagData).then(\n (\n locationResponse: Result<\n LocationWithDeviationInternal,\n LocationErrorInternal\n >\n ) => {\n return this.deserializeLocationWithDeviationResponse(\n locationResponse\n );\n }\n );\n } else {\n throw new Error('Invalid arguments');\n }\n }\n\n /**\n * Subscribe to tracking errors\n *\n * @param listener\n * @returns EmitterSubscription\n * @example\n * ```js\n * const subscription = HyperTrack.subscribeToErrors(errors => {\n * errors.forEach(error => {\n * // ... error\n * })\n * })\n *\n * // later, to stop listening\n * subscription.remove()\n * ```\n */\n subscribeToErrors(listener: (errors: HyperTrackError[]) => void) {\n return EventEmitter.addListener(\n EVENT_ERROR,\n (rawErrors: HyperTrackErrorInternal[]) => {\n listener(this.deserializeHyperTrackErrors(rawErrors));\n }\n );\n }\n\n /**\n * Subscribe to tracking intent changes\n *\n * @param listener\n * @returns EmitterSubscription\n * @example\n * ```js\n * const subscription = HyperTrack.subscribeToTracking(isTracking => {\n * if (isTracking) {\n * // ... ready to go\n * }\n * })\n *\n * // later, to stop listening\n * subscription.remove()\n * ```\n */\n subscribeToTracking(listener: (isTracking: boolean) => void) {\n return EventEmitter.addListener(\n EVENT_TRACKING,\n (isTracking: IsTracking) => {\n listener(isTracking.value);\n }\n );\n }\n\n /**\n * Subscribe to availability changes\n *\n * @param listener\n * @returns EmitterSubscription\n * @example\n * ```js\n * const subscription = HyperTrack.subscribeToAvailability(isAvailable => {\n * if (isAvailable) {\n * // ... ready to go\n * }\n * })\n *\n * // later, to stop listening\n * subscription.remove()\n * ```\n */\n subscribeToAvailability(listener: (isAvailable: boolean) => void) {\n return EventEmitter.addListener(\n EVENT_AVAILABILITY,\n (isAvailable: IsAvailable) => {\n listener(isAvailable.value);\n }\n );\n }\n\n /** @ignore */\n private deserializeHyperTrackErrors(\n errors: HyperTrackErrorInternal[]\n ): HyperTrackError[] {\n return errors.map(\n (error: HyperTrackErrorInternal) =>\n HyperTrackError[error.value as keyof typeof HyperTrackError]\n );\n }\n\n /** @ignore */\n private deserializeLocationResponse(\n response: Result<LocationInternal, LocationErrorInternal>\n ): Result<Location, LocationError> {\n switch (response.type) {\n case 'success':\n return {\n type: 'success',\n value: response.value.value,\n };\n case 'failure':\n return {\n type: 'failure',\n value: this.deserializeLocationError(response.value),\n };\n }\n }\n\n /** @ignore */\n private deserializeLocationWithDeviationResponse(\n response: Result<LocationWithDeviationInternal, LocationErrorInternal>\n ): Result<LocationWithDeviation, LocationError> {\n switch (response.type) {\n case 'success':\n const locationWithDeviationInternal: LocationWithDeviationInternal =\n response.value;\n const locationInternal: LocationInternal =\n locationWithDeviationInternal.value.location;\n\n return {\n type: 'success',\n value: {\n location: locationInternal.value,\n deviation: locationWithDeviationInternal.value.deviation,\n } as LocationWithDeviation,\n };\n case 'failure':\n return {\n type: 'failure',\n value: this.deserializeLocationError(response.value),\n };\n }\n }\n\n /** @ignore */\n private deserializeLocationError(\n locationError: LocationErrorInternal\n ): LocationError {\n switch (locationError.type) {\n case 'notRunning':\n case 'starting':\n return locationError;\n case 'errors':\n return {\n type: 'errors',\n value: this.deserializeHyperTrackErrors(locationError.value),\n };\n }\n }\n\n /** @ignore */\n private isLocation(obj: Location): obj is Location {\n return (\n 'latitude' in obj &&\n typeof obj.latitude == 'number' &&\n 'longitude' in obj &&\n typeof obj.longitude == 'number'\n );\n }\n}\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,QAAQ,EAAEC,kBAAkB,QAAQ,cAAc;AAC1E,SAASC,eAAe,QAAQ,8BAA8B;AAgB9D,MAAMC,cAAc,GAAG,mBAAmB;AAC1C,MAAMC,kBAAkB,GAAG,uBAAuB;AAClD,MAAMC,WAAW,GAAG,SAAS;AAE7B,MAAMC,aAAa,GAChB,sFAAqF,GACtFN,QAAQ,CAACO,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,6CAA6C;AAE/C,MAAMC,aAAa,GAAGX,a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9CU,QAAsE,EACxB;IAC9C,QAAQA,QAAQ,CAAC/B,IAAI;MACnB,KAAK,SAAS;QACZ,MAAMiC,6BAA4D,GAChEF,QAAQ,CAAClC,KAAK;QAChB,MAAMqC,gBAAkC,GACtCD,6BAA6B,CAACpC,KAAK,CAACsC,QAAQ;QAE9C,OAAO;UACLnC,IAAI,EAAE,SAAS;UACfH,KAAK,EAAE;YACLsC,QAAQ,EAAED,gBAAgB,CAACrC,KAAK;YAChCuC,SAAS,EAAEH,6BAA6B,CAACpC,KAAK,CAACuC;UACjD;QACF,CAAC;MACH,KAAK,SAAS;QACZ,OAAO;UACLpC,IAAI,EAAE,SAAS;UACfH,KAAK,EAAE,IAAI,CAACmC,wBAAwB,CAACD,QAAQ,CAAClC,KAAK;QACrD,CAAC;IACL;EACF;;EAEA;EACQmC,wBAAwBA,CAC9BK,aAAoC,EACrB;IACf,QAAQA,aAAa,CAACrC,IAAI;MACxB,KAAK,YAAY;MACjB,KAAK,UAAU;QACb,OAAOqC,aAAa;MACtB,KAAK,QAAQ;QACX,OAAO;UACLrC,IAAI,EAAE,QAAQ;UACdH,KAAK,EAAE,IAAI,CAAC6B,2BAA2B,CAACW,aAAa,CAACxC,KAAK;QAC7D,CAAC;IACL;EACF;;EAEA;EACQqB,UAAUA,CAACoB,GAAa,EAAmB;IACjD,OACE,UAAU,IAAIA,GAAG,IACjB,OAAOA,GAAG,CAACnB,QAAQ,IAAI,QAAQ,IAC/B,WAAW,IAAImB,GAAG,IAClB,OAAOA,GAAG,CAAClB,SAAS,IAAI,QAAQ;EAEpC;AACF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// enum naming convention is ignored to make datatype sync
|
|
2
2
|
// across platforms easier
|
|
3
|
-
export let HyperTrackError
|
|
4
|
-
(function (HyperTrackError) {
|
|
3
|
+
export let HyperTrackError = /*#__PURE__*/function (HyperTrackError) {
|
|
5
4
|
HyperTrackError["gpsSignalLost"] = "gpsSignalLost";
|
|
6
5
|
HyperTrackError["locationMocked"] = "locationMocked";
|
|
7
6
|
HyperTrackError["locationPermissionsDenied"] = "locationPermissionsDenied";
|
|
@@ -20,5 +19,6 @@ export let HyperTrackError;
|
|
|
20
19
|
HyperTrackError["networkConnectionUnavailable"] = "networkConnectionUnavailable";
|
|
21
20
|
HyperTrackError["invalidPublishableKey"] = "invalidPublishableKey";
|
|
22
21
|
HyperTrackError["blockedFromRunning"] = "blockedFromRunning";
|
|
23
|
-
|
|
22
|
+
return HyperTrackError;
|
|
23
|
+
}({});
|
|
24
24
|
//# sourceMappingURL=HyperTrackError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HyperTrackError"],"sources":["HyperTrackError.ts"],"sourcesContent":["// enum naming convention is ignored to make datatype sync\n// across platforms easier\nexport enum HyperTrackError {\n gpsSignalLost = \"gpsSignalLost\",\n locationMocked = \"locationMocked\",\n locationPermissionsDenied = \"locationPermissionsDenied\",\n locationPermissionsInsufficientForBackground = \"locationPermissionsInsufficientForBackground\",\n locationPermissionsNotDetermined = \"locationPermissionsNotDetermined\",\n locationPermissionsReducedAccuracy = \"locationPermissionsReducedAccuracy\",\n locationPermissionsProvisional = \"locationPermissionsProvisional\",\n locationPermissionsRestricted = \"locationPermissionsRestricted\",\n locationServicesDisabled = \"locationServicesDisabled\",\n locationServicesUnavailable = \"locationServicesUnavailable\",\n motionActivityPermissionsNotDetermined = \"motionActivityPermissionsNotDetermined\",\n motionActivityPermissionsDenied = \"motionActivityPermissionsDenied\",\n motionActivityServicesDisabled = \"motionActivityServicesDisabled\",\n motionActivityServicesUnavailable = \"motionActivityServicesUnavailable\",\n motionActivityPermissionsRestricted = \"motionActivityPermissionsRestricted\",\n networkConnectionUnavailable = \"networkConnectionUnavailable\",\n invalidPublishableKey = \"invalidPublishableKey\",\n blockedFromRunning = \"blockedFromRunning\"\n}\n"],"mappings":"AAAA;AACA;AACA,WAAYA,eAAe
|
|
1
|
+
{"version":3,"names":["HyperTrackError"],"sources":["HyperTrackError.ts"],"sourcesContent":["// enum naming convention is ignored to make datatype sync\n// across platforms easier\nexport enum HyperTrackError {\n gpsSignalLost = \"gpsSignalLost\",\n locationMocked = \"locationMocked\",\n locationPermissionsDenied = \"locationPermissionsDenied\",\n locationPermissionsInsufficientForBackground = \"locationPermissionsInsufficientForBackground\",\n locationPermissionsNotDetermined = \"locationPermissionsNotDetermined\",\n locationPermissionsReducedAccuracy = \"locationPermissionsReducedAccuracy\",\n locationPermissionsProvisional = \"locationPermissionsProvisional\",\n locationPermissionsRestricted = \"locationPermissionsRestricted\",\n locationServicesDisabled = \"locationServicesDisabled\",\n locationServicesUnavailable = \"locationServicesUnavailable\",\n motionActivityPermissionsNotDetermined = \"motionActivityPermissionsNotDetermined\",\n motionActivityPermissionsDenied = \"motionActivityPermissionsDenied\",\n motionActivityServicesDisabled = \"motionActivityServicesDisabled\",\n motionActivityServicesUnavailable = \"motionActivityServicesUnavailable\",\n motionActivityPermissionsRestricted = \"motionActivityPermissionsRestricted\",\n networkConnectionUnavailable = \"networkConnectionUnavailable\",\n invalidPublishableKey = \"invalidPublishableKey\",\n blockedFromRunning = \"blockedFromRunning\"\n}\n"],"mappings":"AAAA;AACA;AACA,WAAYA,eAAe,0BAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAfA,eAAe;EAAA,OAAfA,eAAe;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["Location.ts"],"sourcesContent":["export type Location = {\n
|
|
1
|
+
{"version":3,"names":[],"sources":["Location.ts"],"sourcesContent":["export type Location = {\n latitude: number;\n longitude: number;\n};\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["LocationError.ts"],"sourcesContent":["import type { HyperTrackError } from './HyperTrackError';\nimport type { NotRunning, Starting } from './internal/LocationErrorInternal';\n\nexport
|
|
1
|
+
{"version":3,"names":[],"sources":["LocationError.ts"],"sourcesContent":["import type { HyperTrackError } from './HyperTrackError';\nimport type { NotRunning, Starting } from './internal/LocationErrorInternal';\n\nexport type Errors = {\n type: 'errors';\n value: HyperTrackError[];\n};\n\nexport type LocationError = NotRunning | Starting | Errors;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["LocationWithDeviation.ts"],"sourcesContent":["import type { Location } from './Location';\n\nexport type LocationWithDeviation = {\n location: Location;\n deviation: number;\n};\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["Result.ts"],"sourcesContent":["export type Success<S> = {\n type: 'success';\n value: S;\n};\n\nexport type Failure<F> = {\n type: 'failure';\n value: F;\n};\n\nexport type Result<S, F> = Success<S> | Failure<F>;\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["GeotagData.ts"],"sourcesContent":["import type { LocationInternal } from './LocationInternal';\n\nexport type GeotagData = {\n data: Object;\n expectedLocation?: LocationInternal;\n};\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["LocationInternal.ts"],"sourcesContent":["export type LocationInternal = {\n type: 'location';\n value: {\n latitude: number;\n longitude: number;\n };\n};\n"],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["LocationWithDeviationInternal.ts"],"sourcesContent":["import type { LocationInternal } from './LocationInternal';\n\nexport type LocationWithDeviationInternal = {\n type: 'locationWithDeviation';\n value: {\n location: LocationInternal;\n deviation: number;\n };\n};\n"],"mappings":""}
|
package/lib/module/index.js
CHANGED
|
@@ -2,7 +2,9 @@ import HyperTrack from './HyperTrack/HyperTrack';
|
|
|
2
2
|
export default HyperTrack;
|
|
3
3
|
export { HyperTrack };
|
|
4
4
|
export { HyperTrackError } from './HyperTrack/data_types/HyperTrackError';
|
|
5
|
-
export {
|
|
5
|
+
export { NotRunning, Starting } from './HyperTrack/data_types/internal/LocationErrorInternal';
|
|
6
|
+
export { LocationError, Errors } from './HyperTrack/data_types/LocationError';
|
|
6
7
|
export { Location } from './HyperTrack/data_types/Location';
|
|
7
8
|
export { SdkInitParams } from './HyperTrack/data_types/SdkInitParams';
|
|
9
|
+
export { Result, Success, Failure } from './HyperTrack/data_types/Result';
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HyperTrack","HyperTrackError","
|
|
1
|
+
{"version":3,"names":["HyperTrack","HyperTrackError","NotRunning","Starting","LocationError","Errors","Location","SdkInitParams","Result","Success","Failure"],"sources":["index.tsx"],"sourcesContent":["import HyperTrack from './HyperTrack/HyperTrack';\nexport default HyperTrack;\nexport { HyperTrack };\n\nexport { HyperTrackError } from './HyperTrack/data_types/HyperTrackError';\nexport {\n NotRunning,\n Starting,\n} from './HyperTrack/data_types/internal/LocationErrorInternal';\nexport { LocationError, Errors } from './HyperTrack/data_types/LocationError';\nexport { Location } from './HyperTrack/data_types/Location';\nexport { SdkInitParams } from './HyperTrack/data_types/SdkInitParams';\nexport { Result, Success, Failure } from './HyperTrack/data_types/Result';\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,yBAAyB;AAChD,eAAeA,UAAU;AACzB,SAASA,UAAU;AAEnB,SAASC,eAAe,QAAQ,yCAAyC;AACzE,SACEC,UAAU,EACVC,QAAQ,QACH,wDAAwD;AAC/D,SAASC,aAAa,EAAEC,MAAM,QAAQ,uCAAuC;AAC7E,SAASC,QAAQ,QAAQ,kCAAkC;AAC3D,SAASC,aAAa,QAAQ,uCAAuC;AACrE,SAASC,MAAM,EAAEC,OAAO,EAAEC,OAAO,QAAQ,gCAAgC"}
|
|
@@ -2,6 +2,7 @@ import { HyperTrackError } from './data_types/HyperTrackError';
|
|
|
2
2
|
import type { Location } from './data_types/Location';
|
|
3
3
|
import type { LocationError } from './data_types/LocationError';
|
|
4
4
|
import type { SdkInitParams } from './data_types/SdkInitParams';
|
|
5
|
+
import type { Result } from './data_types/Result';
|
|
5
6
|
export default class HyperTrack {
|
|
6
7
|
private constructor();
|
|
7
8
|
/**
|
|
@@ -62,10 +63,19 @@ export default class HyperTrack {
|
|
|
62
63
|
setMetadata(data: Object): void;
|
|
63
64
|
/**
|
|
64
65
|
* Adds a new geotag
|
|
66
|
+
*
|
|
65
67
|
* @param {Object} data - Geotad data JSON
|
|
66
68
|
* @returns current location if success or LocationError if failure
|
|
67
69
|
*/
|
|
68
|
-
addGeotag(data: Object): Promise<LocationError
|
|
70
|
+
addGeotag(data: Object): Promise<Result<Location, LocationError>>;
|
|
71
|
+
/**
|
|
72
|
+
* Adds a new geotag with expected location
|
|
73
|
+
*
|
|
74
|
+
* @param {Object} data - Geotad data JSON
|
|
75
|
+
* @param {Location} expectedLocation - Expected location
|
|
76
|
+
* @returns location with deviation if success or LocationError if failure
|
|
77
|
+
*/
|
|
78
|
+
addGeotag(data: Object, expectedLocation: Location): Promise<Result<Location, LocationError>>;
|
|
69
79
|
/**
|
|
70
80
|
* Subscribe to tracking errors
|
|
71
81
|
*
|
|
@@ -124,4 +134,10 @@ export default class HyperTrack {
|
|
|
124
134
|
private deserializeHyperTrackErrors;
|
|
125
135
|
/** @ignore */
|
|
126
136
|
private deserializeLocationResponse;
|
|
137
|
+
/** @ignore */
|
|
138
|
+
private deserializeLocationWithDeviationResponse;
|
|
139
|
+
/** @ignore */
|
|
140
|
+
private deserializeLocationError;
|
|
141
|
+
/** @ignore */
|
|
142
|
+
private isLocation;
|
|
127
143
|
}
|
|
@@ -2,6 +2,8 @@ import HyperTrack from './HyperTrack/HyperTrack';
|
|
|
2
2
|
export default HyperTrack;
|
|
3
3
|
export { HyperTrack };
|
|
4
4
|
export { HyperTrackError } from './HyperTrack/data_types/HyperTrackError';
|
|
5
|
-
export {
|
|
5
|
+
export { NotRunning, Starting, } from './HyperTrack/data_types/internal/LocationErrorInternal';
|
|
6
|
+
export { LocationError, Errors } from './HyperTrack/data_types/LocationError';
|
|
6
7
|
export { Location } from './HyperTrack/data_types/Location';
|
|
7
8
|
export { SdkInitParams } from './HyperTrack/data_types/SdkInitParams';
|
|
9
|
+
export { Result, Success, Failure } from './HyperTrack/data_types/Result';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hypertrack-sdk-react-native",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.2.0",
|
|
4
4
|
"description": "React Native HyperTrack SDK is a wrapper around native iOS and Android SDKs that allows to integrate HyperTrack into React Native apps.",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|