hypertrack-sdk-react-native 9.1.1 → 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 +148 -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/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 +19 -0
- 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/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 +1 -0
- 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/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 +2 -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/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 +6 -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
|
@@ -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 {
|
|
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
|
-
|
|
30
|
-
|
|
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:
|
|
59
|
-
|
|
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:
|
|
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<
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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<Location, 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(
|
|
195
|
-
|
|
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(
|
|
253
|
-
|
|
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(
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
case
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
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
|
}
|
package/src/index.tsx
CHANGED
|
@@ -3,7 +3,11 @@ export default HyperTrack;
|
|
|
3
3
|
export { HyperTrack };
|
|
4
4
|
|
|
5
5
|
export { HyperTrackError } from './HyperTrack/data_types/HyperTrackError';
|
|
6
|
-
export {
|
|
6
|
+
export {
|
|
7
|
+
NotRunning,
|
|
8
|
+
Starting,
|
|
9
|
+
} from './HyperTrack/data_types/internal/LocationErrorInternal';
|
|
7
10
|
export { LocationError, Errors } from './HyperTrack/data_types/LocationError';
|
|
8
11
|
export { Location } from './HyperTrack/data_types/Location';
|
|
9
|
-
export { SdkInitParams } from './HyperTrack/data_types/SdkInitParams'
|
|
12
|
+
export { SdkInitParams } from './HyperTrack/data_types/SdkInitParams';
|
|
13
|
+
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 +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 +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,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,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;
|