hypertrack-sdk-react-native 9.1.1 → 9.2.2

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 (96) hide show
  1. package/CHANGELOG.md +166 -3
  2. package/CONTRIBUTING.md +8 -5
  3. package/README.md +3 -3
  4. package/android/.gradle/7.2/dependencies-accessors/dependencies-accessors.lock +0 -0
  5. package/android/.gradle/7.2/dependencies-accessors/gc.properties +0 -0
  6. package/android/.gradle/7.2/executionHistory/executionHistory.lock +0 -0
  7. package/android/.gradle/7.2/fileChanges/last-build.bin +0 -0
  8. package/android/.gradle/7.2/fileHashes/fileHashes.bin +0 -0
  9. package/android/.gradle/7.2/fileHashes/fileHashes.lock +0 -0
  10. package/android/.gradle/7.2/gc.properties +0 -0
  11. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  12. package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
  13. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  14. package/android/.gradle/checksums/checksums.lock +0 -0
  15. package/android/.gradle/checksums/md5-checksums.bin +0 -0
  16. package/android/.gradle/checksums/sha1-checksums.bin +0 -0
  17. package/android/.gradle/vcs-1/gc.properties +0 -0
  18. package/android/.idea/compiler.xml +6 -0
  19. package/android/.idea/gradle.xml +19 -0
  20. package/android/.idea/jarRepositories.xml +35 -0
  21. package/android/.idea/kotlinc.xml +6 -0
  22. package/android/.idea/misc.xml +9 -0
  23. package/android/.idea/vcs.xml +6 -0
  24. package/android/local.properties +8 -0
  25. package/android/src/main/java/com/reactnativehypertracksdk/HyperTrackReactNativePlugin.kt +4 -4
  26. package/android/src/main/java/com/reactnativehypertracksdk/ReactNativeSerialization.kt +16 -17
  27. package/android/src/main/java/com/reactnativehypertracksdk/common/GeotagData.kt +13 -0
  28. package/android/src/main/java/com/reactnativehypertracksdk/common/HyperTrackSdkWrapper.kt +45 -19
  29. package/android/src/main/java/com/reactnativehypertracksdk/common/Serialization.kt +115 -40
  30. package/hypertrack-sdk-react-native.podspec +1 -1
  31. package/ios/common/GeotagData.swift +11 -0
  32. package/ios/common/HyperTrackSDKWrapper.swift +9 -4
  33. package/ios/common/Serialization.swift +140 -61
  34. package/lib/commonjs/HyperTrack/HyperTrack.js +90 -22
  35. package/lib/commonjs/HyperTrack/HyperTrack.js.map +1 -1
  36. package/lib/commonjs/HyperTrack/data_types/HyperTrackError.js +4 -4
  37. package/lib/commonjs/HyperTrack/data_types/HyperTrackError.js.map +1 -1
  38. package/lib/commonjs/HyperTrack/data_types/Location.js.map +1 -1
  39. package/lib/commonjs/HyperTrack/data_types/LocationWithDeviation.js +6 -0
  40. package/lib/commonjs/HyperTrack/data_types/LocationWithDeviation.js.map +1 -0
  41. package/lib/commonjs/HyperTrack/data_types/Result.js +2 -0
  42. package/lib/commonjs/HyperTrack/data_types/Result.js.map +1 -0
  43. package/lib/commonjs/HyperTrack/data_types/internal/{LocationResponse.js → GeotagData.js} +1 -1
  44. package/lib/commonjs/HyperTrack/data_types/internal/GeotagData.js.map +1 -0
  45. package/lib/commonjs/HyperTrack/data_types/internal/LocationInternal.js +2 -0
  46. package/lib/commonjs/HyperTrack/data_types/internal/LocationInternal.js.map +1 -0
  47. package/lib/commonjs/HyperTrack/data_types/internal/LocationWithDeviationInternal.js +6 -0
  48. package/lib/commonjs/HyperTrack/data_types/internal/LocationWithDeviationInternal.js.map +1 -0
  49. package/lib/commonjs/index.js +26 -0
  50. package/lib/commonjs/index.js.map +1 -1
  51. package/lib/module/HyperTrack/HyperTrack.js +90 -22
  52. package/lib/module/HyperTrack/HyperTrack.js.map +1 -1
  53. package/lib/module/HyperTrack/data_types/HyperTrackError.js +3 -3
  54. package/lib/module/HyperTrack/data_types/HyperTrackError.js.map +1 -1
  55. package/lib/module/HyperTrack/data_types/Location.js.map +1 -1
  56. package/lib/module/HyperTrack/data_types/LocationWithDeviation.js +2 -0
  57. package/lib/module/HyperTrack/data_types/LocationWithDeviation.js.map +1 -0
  58. package/lib/module/HyperTrack/data_types/Result.js +2 -0
  59. package/lib/module/HyperTrack/data_types/Result.js.map +1 -0
  60. package/lib/module/HyperTrack/data_types/internal/GeotagData.js +2 -0
  61. package/lib/module/HyperTrack/data_types/internal/GeotagData.js.map +1 -0
  62. package/lib/module/HyperTrack/data_types/internal/LocationInternal.js +2 -0
  63. package/lib/module/HyperTrack/data_types/internal/LocationInternal.js.map +1 -0
  64. package/lib/module/HyperTrack/data_types/internal/LocationWithDeviationInternal.js +2 -0
  65. package/lib/module/HyperTrack/data_types/internal/LocationWithDeviationInternal.js.map +1 -0
  66. package/lib/module/index.js +2 -0
  67. package/lib/module/index.js.map +1 -1
  68. package/lib/typescript/HyperTrack/HyperTrack.d.ts +18 -1
  69. package/lib/typescript/HyperTrack/data_types/Location.d.ts +2 -5
  70. package/lib/typescript/HyperTrack/data_types/LocationWithDeviation.d.ts +5 -0
  71. package/lib/typescript/HyperTrack/data_types/Result.d.ts +9 -0
  72. package/lib/typescript/HyperTrack/data_types/internal/GeotagData.d.ts +5 -0
  73. package/lib/typescript/HyperTrack/data_types/internal/LocationInternal.d.ts +7 -0
  74. package/lib/typescript/HyperTrack/data_types/internal/LocationWithDeviationInternal.d.ts +8 -0
  75. package/lib/typescript/index.d.ts +3 -1
  76. package/package.json +1 -1
  77. package/src/HyperTrack/HyperTrack.ts +160 -46
  78. package/src/HyperTrack/data_types/Location.ts +2 -5
  79. package/src/HyperTrack/data_types/LocationWithDeviation.ts +6 -0
  80. package/src/HyperTrack/data_types/Result.ts +11 -0
  81. package/src/HyperTrack/data_types/internal/GeotagData.ts +6 -0
  82. package/src/HyperTrack/data_types/internal/LocationInternal.ts +7 -0
  83. package/src/HyperTrack/data_types/internal/LocationWithDeviationInternal.ts +9 -0
  84. package/src/index.tsx +7 -2
  85. package/android/src/main/java/com/reactnativehypertracksdk/common/Geotag.kt +0 -9
  86. package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js +0 -2
  87. package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js.map +0 -1
  88. package/lib/commonjs/HyperTrack/data_types/internal/LocationResponse.js.map +0 -1
  89. package/lib/module/HyperTrack/data_types/internal/Geotag.js +0 -2
  90. package/lib/module/HyperTrack/data_types/internal/Geotag.js.map +0 -1
  91. package/lib/module/HyperTrack/data_types/internal/LocationResponse.js +0 -2
  92. package/lib/module/HyperTrack/data_types/internal/LocationResponse.js.map +0 -1
  93. package/lib/typescript/HyperTrack/data_types/internal/Geotag.d.ts +0 -3
  94. package/lib/typescript/HyperTrack/data_types/internal/LocationResponse.d.ts +0 -11
  95. package/src/HyperTrack/data_types/internal/Geotag.ts +0 -3
  96. package/src/HyperTrack/data_types/internal/LocationResponse.ts +0 -14
@@ -2,14 +2,18 @@ import { NativeModules, Platform, NativeEventEmitter } from 'react-native';
2
2
  import { HyperTrackError } from './data_types/HyperTrackError';
3
3
  import type { IsAvailable } from './data_types/internal/IsAvailable';
4
4
  import type { IsTracking } from './data_types/internal/IsTracking';
5
- import type { LocationResponse } from './data_types/internal/LocationResponse';
6
5
  import type { Location } from './data_types/Location';
7
6
  import type { LocationError } from './data_types/LocationError';
8
7
  import type { SdkInitParams } from './data_types/SdkInitParams';
9
8
  import type { DeviceId } from './data_types/internal/DeviceId';
10
- import type { Geotag } from './data_types/internal/Geotag';
9
+ import type { GeotagData } from './data_types/internal/GeotagData';
11
10
  import type { DeviceName } from './data_types/internal/DeviceName';
12
11
  import type { HyperTrackErrorInternal } from './data_types/internal/HyperTrackErrorInternal';
12
+ import type { Result } from './data_types/Result';
13
+ import type { LocationWithDeviation } from './data_types/LocationWithDeviation';
14
+ import type { LocationErrorInternal } from './data_types/internal/LocationErrorInternal';
15
+ import type { LocationInternal } from './data_types/internal/LocationInternal';
16
+ import type { LocationWithDeviationInternal } from './data_types/internal/LocationWithDeviationInternal';
13
17
 
14
18
  const EVENT_TRACKING = 'onTrackingChanged';
15
19
  const EVENT_AVAILABILITY = 'onAvailabilityChanged';
@@ -24,13 +28,13 @@ const LINKING_ERROR =
24
28
  const HyperTrackSdk = NativeModules.HyperTrackReactNativePlugin
25
29
  ? NativeModules.HyperTrackReactNativePlugin
26
30
  : new Proxy(
27
- {},
28
- {
29
- get() {
30
- throw new Error(LINKING_ERROR);
31
- },
32
- }
33
- );
31
+ {},
32
+ {
33
+ get() {
34
+ throw new Error(LINKING_ERROR);
35
+ },
36
+ }
37
+ );
34
38
 
35
39
  const EventEmitter = new NativeEventEmitter(HyperTrackSdk);
36
40
 
@@ -41,7 +45,7 @@ export default class HyperTrack {
41
45
 
42
46
  /**
43
47
  * Creates an SDK instance
44
- *
48
+ *
45
49
  * @param publishableKey publishable key provided in HyperTrack’s dashboard setup page
46
50
  * @param sdkInitParams
47
51
  * @returns HyperTrack instance
@@ -55,8 +59,10 @@ export default class HyperTrack {
55
59
  publishableKey,
56
60
  loggingEnabled: sdkInitParams.loggingEnabled ?? false,
57
61
  allowMockLocations: sdkInitParams.allowMockLocations ?? false,
58
- requireBackgroundTrackingPermission: sdkInitParams.requireBackgroundTrackingPermission ?? false,
59
- automaticallyRequestPermissions: sdkInitParams.automaticallyRequestPermissions ?? true,
62
+ requireBackgroundTrackingPermission:
63
+ sdkInitParams.requireBackgroundTrackingPermission ?? false,
64
+ automaticallyRequestPermissions:
65
+ sdkInitParams.automaticallyRequestPermissions ?? true,
60
66
  });
61
67
  return new HyperTrack();
62
68
  } catch (error: any) {
@@ -92,13 +98,13 @@ export default class HyperTrack {
92
98
  setAvailability(isAvailable: boolean) {
93
99
  HyperTrackSdk.setAvailability({
94
100
  type: 'isAvailable',
95
- value: isAvailable
101
+ value: isAvailable,
96
102
  } as IsAvailable);
97
103
  }
98
104
 
99
105
  /**
100
106
  * Reflects the tracking intent for the device
101
- *
107
+ *
102
108
  * @return {boolean} Whether the user's movement data is getting tracked or not.
103
109
  */
104
110
  isTracking(): Promise<boolean> {
@@ -133,7 +139,7 @@ export default class HyperTrack {
133
139
  */
134
140
  getLocation(): Promise<LocationError | Location> {
135
141
  return HyperTrackSdk.getLocation().then(
136
- (locationResponse: LocationResponse) => {
142
+ (locationResponse: Result<LocationInternal, LocationErrorInternal>) => {
137
143
  return this.deserializeLocationResponse(locationResponse);
138
144
  }
139
145
  );
@@ -146,8 +152,8 @@ export default class HyperTrack {
146
152
  setName(name: string) {
147
153
  HyperTrackSdk.setName({
148
154
  type: 'deviceName',
149
- value: name
150
- } as DeviceName)
155
+ value: name,
156
+ } as DeviceName);
151
157
  }
152
158
 
153
159
  /**
@@ -160,17 +166,66 @@ export default class HyperTrack {
160
166
 
161
167
  /**
162
168
  * Adds a new geotag
169
+ *
163
170
  * @param {Object} data - Geotad data JSON
164
171
  * @returns current location if success or LocationError if failure
165
172
  */
166
- addGeotag(data: Object): Promise<LocationError | Location> {
167
- return HyperTrackSdk.addGeotag({
168
- data
169
- } as Geotag).then(
170
- (locationResponse: LocationResponse) => {
171
- return this.deserializeLocationResponse(locationResponse);
172
- }
173
- );
173
+ async addGeotag(data: Object): Promise<Result<Location, LocationError>>;
174
+
175
+ /**
176
+ * Adds a new geotag with expected location
177
+ *
178
+ * @param {Object} data - Geotad data JSON
179
+ * @param {Location} expectedLocation - Expected location
180
+ * @returns location with deviation if success or LocationError if failure
181
+ */
182
+ async addGeotag(
183
+ data: Object,
184
+ expectedLocation: Location
185
+ ): Promise<Result<LocationWithDeviation, LocationError>>;
186
+
187
+ async addGeotag(
188
+ ...args: any[]
189
+ ): Promise<Result<Location | LocationWithDeviation, LocationError>> {
190
+ if (args.length === 1 && typeof args[0] === 'object') {
191
+ return HyperTrackSdk.addGeotag({
192
+ data: args[0],
193
+ expectedLocation: undefined,
194
+ } as GeotagData).then(
195
+ (locationResponse: Result<LocationInternal, LocationErrorInternal>) => {
196
+ return this.deserializeLocationResponse(locationResponse);
197
+ }
198
+ );
199
+ } else if (
200
+ args.length === 2 &&
201
+ typeof args[0] === 'object' &&
202
+ this.isLocation(args[1])
203
+ ) {
204
+ let expectedLocation = args[1] as Location;
205
+ return HyperTrackSdk.addGeotag({
206
+ data: args[0],
207
+ expectedLocation: {
208
+ type: 'location',
209
+ value: {
210
+ latitude: expectedLocation.latitude,
211
+ longitude: expectedLocation.longitude,
212
+ },
213
+ } as LocationInternal,
214
+ } as GeotagData).then(
215
+ (
216
+ locationResponse: Result<
217
+ LocationWithDeviationInternal,
218
+ LocationErrorInternal
219
+ >
220
+ ) => {
221
+ return this.deserializeLocationWithDeviationResponse(
222
+ locationResponse
223
+ );
224
+ }
225
+ );
226
+ } else {
227
+ throw new Error('Invalid arguments');
228
+ }
174
229
  }
175
230
 
176
231
  /**
@@ -191,9 +246,12 @@ export default class HyperTrack {
191
246
  * ```
192
247
  */
193
248
  subscribeToErrors(listener: (errors: HyperTrackError[]) => void) {
194
- return EventEmitter.addListener(EVENT_ERROR, (rawErrors: HyperTrackErrorInternal[]) => {
195
- listener(this.deserializeHyperTrackErrors(rawErrors))
196
- });
249
+ return EventEmitter.addListener(
250
+ EVENT_ERROR,
251
+ (rawErrors: HyperTrackErrorInternal[]) => {
252
+ listener(this.deserializeHyperTrackErrors(rawErrors));
253
+ }
254
+ );
197
255
  }
198
256
 
199
257
  /**
@@ -249,26 +307,82 @@ export default class HyperTrack {
249
307
  }
250
308
 
251
309
  /** @ignore */
252
- private deserializeHyperTrackErrors(errors: HyperTrackErrorInternal[]): HyperTrackError[] {
253
- return errors.map((error: HyperTrackErrorInternal) => HyperTrackError[error.value as keyof typeof HyperTrackError])
310
+ private deserializeHyperTrackErrors(
311
+ errors: HyperTrackErrorInternal[]
312
+ ): HyperTrackError[] {
313
+ return errors.map(
314
+ (error: HyperTrackErrorInternal) =>
315
+ HyperTrackError[error.value as keyof typeof HyperTrackError]
316
+ );
254
317
  }
255
318
 
256
319
  /** @ignore */
257
- private deserializeLocationResponse(response: LocationResponse): Location | LocationError {
258
- switch(response.type) {
259
- case "success":
260
- return response.value
261
- case "failure":
262
- switch(response.value.type) {
263
- case "notRunning":
264
- case "starting":
265
- return response.value
266
- case "errors":
267
- return {
268
- type: "errors",
269
- value: this.deserializeHyperTrackErrors(response.value.value)
270
- }
271
- }
272
- };
320
+ private deserializeLocationResponse(
321
+ response: Result<LocationInternal, LocationErrorInternal>
322
+ ): Result<Location, LocationError> {
323
+ switch (response.type) {
324
+ case 'success':
325
+ return {
326
+ type: 'success',
327
+ value: response.value.value,
328
+ };
329
+ case 'failure':
330
+ return {
331
+ type: 'failure',
332
+ value: this.deserializeLocationError(response.value),
333
+ };
334
+ }
335
+ }
336
+
337
+ /** @ignore */
338
+ private deserializeLocationWithDeviationResponse(
339
+ response: Result<LocationWithDeviationInternal, LocationErrorInternal>
340
+ ): Result<LocationWithDeviation, LocationError> {
341
+ switch (response.type) {
342
+ case 'success':
343
+ const locationWithDeviationInternal: LocationWithDeviationInternal =
344
+ response.value;
345
+ const locationInternal: LocationInternal =
346
+ locationWithDeviationInternal.value.location;
347
+
348
+ return {
349
+ type: 'success',
350
+ value: {
351
+ location: locationInternal.value,
352
+ deviation: locationWithDeviationInternal.value.deviation,
353
+ } as LocationWithDeviation,
354
+ };
355
+ case 'failure':
356
+ return {
357
+ type: 'failure',
358
+ value: this.deserializeLocationError(response.value),
359
+ };
360
+ }
361
+ }
362
+
363
+ /** @ignore */
364
+ private deserializeLocationError(
365
+ locationError: LocationErrorInternal
366
+ ): LocationError {
367
+ switch (locationError.type) {
368
+ case 'notRunning':
369
+ case 'starting':
370
+ return locationError;
371
+ case 'errors':
372
+ return {
373
+ type: 'errors',
374
+ value: this.deserializeHyperTrackErrors(locationError.value),
375
+ };
376
+ }
377
+ }
378
+
379
+ /** @ignore */
380
+ private isLocation(obj: Location): obj is Location {
381
+ return (
382
+ 'latitude' in obj &&
383
+ typeof obj.latitude == 'number' &&
384
+ 'longitude' in obj &&
385
+ typeof obj.longitude == 'number'
386
+ );
273
387
  }
274
388
  }
@@ -1,7 +1,4 @@
1
1
  export type Location = {
2
- type: 'location';
3
- value: {
4
- latitude: number;
5
- longitude: number;
6
- };
2
+ latitude: number;
3
+ longitude: number;
7
4
  };
@@ -0,0 +1,6 @@
1
+ import type { Location } from './Location';
2
+
3
+ export type LocationWithDeviation = {
4
+ location: Location;
5
+ deviation: number;
6
+ };
@@ -0,0 +1,11 @@
1
+ export type Success<S> = {
2
+ type: 'success';
3
+ value: S;
4
+ };
5
+
6
+ export type Failure<F> = {
7
+ type: 'failure';
8
+ value: F;
9
+ };
10
+
11
+ export type Result<S, F> = Success<S> | Failure<F>;
@@ -0,0 +1,6 @@
1
+ import type { LocationInternal } from './LocationInternal';
2
+
3
+ export type GeotagData = {
4
+ data: Object;
5
+ expectedLocation?: LocationInternal;
6
+ };
@@ -0,0 +1,7 @@
1
+ export type LocationInternal = {
2
+ type: 'location';
3
+ value: {
4
+ latitude: number;
5
+ longitude: number;
6
+ };
7
+ };
@@ -0,0 +1,9 @@
1
+ import type { LocationInternal } from './LocationInternal';
2
+
3
+ export type LocationWithDeviationInternal = {
4
+ type: 'locationWithDeviation';
5
+ value: {
6
+ location: LocationInternal;
7
+ deviation: number;
8
+ };
9
+ };
package/src/index.tsx CHANGED
@@ -3,7 +3,12 @@ export default HyperTrack;
3
3
  export { HyperTrack };
4
4
 
5
5
  export { HyperTrackError } from './HyperTrack/data_types/HyperTrackError';
6
- export { NotRunning, Starting } from './HyperTrack/data_types/internal/LocationErrorInternal';
6
+ export {
7
+ NotRunning,
8
+ Starting,
9
+ } from './HyperTrack/data_types/internal/LocationErrorInternal';
7
10
  export { LocationError, Errors } from './HyperTrack/data_types/LocationError';
11
+ export { LocationWithDeviation } from './HyperTrack/data_types/LocationWithDeviation';
8
12
  export { Location } from './HyperTrack/data_types/Location';
9
- export { SdkInitParams } from './HyperTrack/data_types/SdkInitParams'
13
+ export { SdkInitParams } from './HyperTrack/data_types/SdkInitParams';
14
+ export { Result, Success, Failure } from './HyperTrack/data_types/Result';
@@ -1,9 +0,0 @@
1
- package com.reactnativehypertracksdk.common
2
-
3
- /**
4
- * The data that represents geotag to create. Now it contains only payload data but
5
- * can have other params like expectedLocation in future
6
- *
7
- * @param data Geotag payload
8
- */
9
- internal data class Geotag(val data: Map<String, Any?>)
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=Geotag.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["Geotag.ts"],"sourcesContent":["export type Geotag = {\n data: Object\n}\n"],"mappings":""}
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["LocationResponse.ts"],"sourcesContent":["import type { Location } from '../Location';\nimport type { LocationErrorInternal } from './LocationErrorInternal';\n\nexport type LocationSuccess = {\n type: 'success';\n value: Location;\n};\n\nexport type LocationFailure = {\n type: 'failure';\n value: LocationErrorInternal;\n};\n\nexport type LocationResponse = LocationSuccess | LocationFailure;\n"],"mappings":""}
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=Geotag.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["Geotag.ts"],"sourcesContent":["export type Geotag = {\n data: Object\n}\n"],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=LocationResponse.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["LocationResponse.ts"],"sourcesContent":["import type { Location } from '../Location';\nimport type { LocationErrorInternal } from './LocationErrorInternal';\n\nexport type LocationSuccess = {\n type: 'success';\n value: Location;\n};\n\nexport type LocationFailure = {\n type: 'failure';\n value: LocationErrorInternal;\n};\n\nexport type LocationResponse = LocationSuccess | LocationFailure;\n"],"mappings":""}
@@ -1,3 +0,0 @@
1
- export type Geotag = {
2
- data: Object;
3
- };
@@ -1,11 +0,0 @@
1
- import type { Location } from '../Location';
2
- import type { LocationErrorInternal } from './LocationErrorInternal';
3
- export type LocationSuccess = {
4
- type: 'success';
5
- value: Location;
6
- };
7
- export type LocationFailure = {
8
- type: 'failure';
9
- value: LocationErrorInternal;
10
- };
11
- export type LocationResponse = LocationSuccess | LocationFailure;
@@ -1,3 +0,0 @@
1
- export type Geotag = {
2
- data: Object
3
- }
@@ -1,14 +0,0 @@
1
- import type { Location } from '../Location';
2
- import type { LocationErrorInternal } from './LocationErrorInternal';
3
-
4
- export type LocationSuccess = {
5
- type: 'success';
6
- value: Location;
7
- };
8
-
9
- export type LocationFailure = {
10
- type: 'failure';
11
- value: LocationErrorInternal;
12
- };
13
-
14
- export type LocationResponse = LocationSuccess | LocationFailure;