hypertrack-sdk-react-native 8.2.2 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/CHANGELOG.md +29 -1
  2. package/CONTRIBUTING.md +30 -110
  3. package/LICENSE +2 -0
  4. package/README.md +20 -40
  5. package/android/build.gradle +112 -113
  6. package/android/gradle.properties +1 -1
  7. package/android/src/main/java/com/reactnativehypertracksdk/HyperTrackReactNativePlugin.kt +209 -0
  8. package/android/src/main/java/com/reactnativehypertracksdk/HyperTrackSdkPackage.kt +2 -4
  9. package/android/src/main/java/com/reactnativehypertracksdk/ReactNativeSerialization.kt +88 -0
  10. package/android/src/main/java/com/reactnativehypertracksdk/common/Geotag.kt +9 -0
  11. package/android/src/main/java/com/reactnativehypertracksdk/common/HyperTrackError.kt +28 -0
  12. package/android/src/main/java/com/reactnativehypertracksdk/common/HyperTrackSdkWrapper.kt +251 -0
  13. package/android/src/main/java/com/reactnativehypertracksdk/common/LocationError.kt +9 -0
  14. package/android/src/main/java/com/reactnativehypertracksdk/common/Result.kt +50 -0
  15. package/android/src/main/java/com/reactnativehypertracksdk/common/SdkInitParams.kt +44 -0
  16. package/android/src/main/java/com/reactnativehypertracksdk/common/SdkMethod.kt +21 -0
  17. package/android/src/main/java/com/reactnativehypertracksdk/common/Serialization.kt +203 -0
  18. package/hypertrack-sdk-react-native.podspec +1 -1
  19. package/ios/HyperTrackReactNativePlugin.m +54 -0
  20. package/ios/HyperTrackReactNativePlugin.swift +253 -0
  21. package/ios/HyperTrackSdk-Bridging-Header.h +2 -0
  22. package/ios/HyperTrackSdk.xcodeproj/project.pbxproj +8 -11
  23. package/ios/common/DictionaryDecoder.swift +28 -0
  24. package/ios/common/HyperTrackError.swift +20 -0
  25. package/ios/common/HyperTrackSDKWrapper.swift +120 -0
  26. package/ios/common/SDKInitParams.swift +13 -0
  27. package/ios/common/SDKMethod.swift +14 -0
  28. package/ios/common/Serialization.swift +268 -0
  29. package/lib/commonjs/HyperTrack/HyperTrack.js +142 -142
  30. package/lib/commonjs/HyperTrack/HyperTrack.js.map +1 -1
  31. package/lib/commonjs/HyperTrack/data_types/HyperTrackError.js +31 -0
  32. package/lib/commonjs/HyperTrack/data_types/HyperTrackError.js.map +1 -0
  33. package/lib/commonjs/HyperTrack/data_types/Location.js +2 -0
  34. package/lib/commonjs/HyperTrack/data_types/Location.js.map +1 -0
  35. package/lib/commonjs/HyperTrack/data_types/LocationError.js +6 -0
  36. package/lib/commonjs/HyperTrack/data_types/LocationError.js.map +1 -0
  37. package/lib/commonjs/HyperTrack/data_types/SdkInitParams.js +2 -0
  38. package/lib/commonjs/HyperTrack/data_types/SdkInitParams.js.map +1 -0
  39. package/lib/commonjs/HyperTrack/data_types/internal/DeviceId.js +2 -0
  40. package/lib/commonjs/HyperTrack/data_types/internal/DeviceId.js.map +1 -0
  41. package/lib/commonjs/HyperTrack/data_types/internal/DeviceName.js +2 -0
  42. package/lib/commonjs/HyperTrack/data_types/internal/DeviceName.js.map +1 -0
  43. package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js +2 -0
  44. package/lib/commonjs/HyperTrack/data_types/internal/Geotag.js.map +1 -0
  45. package/lib/commonjs/HyperTrack/data_types/internal/HyperTrackErrorInternal.js +2 -0
  46. package/lib/commonjs/HyperTrack/data_types/internal/HyperTrackErrorInternal.js.map +1 -0
  47. package/lib/commonjs/HyperTrack/data_types/internal/IsAvailable.js +2 -0
  48. package/lib/commonjs/HyperTrack/data_types/internal/IsAvailable.js.map +1 -0
  49. package/lib/commonjs/HyperTrack/data_types/internal/IsTracking.js +2 -0
  50. package/lib/commonjs/HyperTrack/data_types/internal/IsTracking.js.map +1 -0
  51. package/lib/commonjs/HyperTrack/data_types/internal/LocationErrorInternal.js +6 -0
  52. package/lib/commonjs/HyperTrack/data_types/internal/LocationErrorInternal.js.map +1 -0
  53. package/lib/commonjs/HyperTrack/data_types/internal/LocationResponse.js +6 -0
  54. package/lib/commonjs/HyperTrack/data_types/internal/LocationResponse.js.map +1 -0
  55. package/lib/commonjs/index.js +28 -17
  56. package/lib/commonjs/index.js.map +1 -1
  57. package/lib/module/HyperTrack/HyperTrack.js +141 -134
  58. package/lib/module/HyperTrack/HyperTrack.js.map +1 -1
  59. package/lib/module/HyperTrack/data_types/HyperTrackError.js +24 -0
  60. package/lib/module/HyperTrack/data_types/HyperTrackError.js.map +1 -0
  61. package/lib/module/HyperTrack/data_types/Location.js +2 -0
  62. package/lib/module/HyperTrack/data_types/Location.js.map +1 -0
  63. package/lib/module/HyperTrack/data_types/LocationError.js +2 -0
  64. package/lib/module/HyperTrack/data_types/LocationError.js.map +1 -0
  65. package/lib/module/HyperTrack/data_types/SdkInitParams.js +2 -0
  66. package/lib/module/HyperTrack/data_types/SdkInitParams.js.map +1 -0
  67. package/lib/module/HyperTrack/data_types/internal/DeviceId.js +2 -0
  68. package/lib/module/HyperTrack/data_types/internal/DeviceId.js.map +1 -0
  69. package/lib/module/HyperTrack/data_types/internal/DeviceName.js +2 -0
  70. package/lib/module/HyperTrack/data_types/internal/DeviceName.js.map +1 -0
  71. package/lib/module/HyperTrack/data_types/internal/Geotag.js +2 -0
  72. package/lib/module/HyperTrack/data_types/internal/Geotag.js.map +1 -0
  73. package/lib/module/HyperTrack/data_types/internal/HyperTrackErrorInternal.js +2 -0
  74. package/lib/module/HyperTrack/data_types/internal/HyperTrackErrorInternal.js.map +1 -0
  75. package/lib/module/HyperTrack/data_types/internal/IsAvailable.js +2 -0
  76. package/lib/module/HyperTrack/data_types/internal/IsAvailable.js.map +1 -0
  77. package/lib/module/HyperTrack/data_types/internal/IsTracking.js +2 -0
  78. package/lib/module/HyperTrack/data_types/internal/IsTracking.js.map +1 -0
  79. package/lib/module/HyperTrack/data_types/internal/LocationErrorInternal.js +2 -0
  80. package/lib/module/HyperTrack/data_types/internal/LocationErrorInternal.js.map +1 -0
  81. package/lib/module/HyperTrack/data_types/internal/LocationResponse.js +2 -0
  82. package/lib/module/HyperTrack/data_types/internal/LocationResponse.js.map +1 -0
  83. package/lib/module/index.js +4 -1
  84. package/lib/module/index.js.map +1 -1
  85. package/lib/typescript/HyperTrack/HyperTrack.d.ts +66 -100
  86. package/lib/typescript/HyperTrack/data_types/HyperTrackError.d.ts +20 -0
  87. package/lib/typescript/HyperTrack/data_types/Location.d.ts +7 -0
  88. package/lib/typescript/HyperTrack/data_types/LocationError.d.ts +8 -0
  89. package/lib/typescript/HyperTrack/data_types/SdkInitParams.d.ts +25 -0
  90. package/lib/typescript/HyperTrack/data_types/internal/DeviceId.d.ts +4 -0
  91. package/lib/typescript/HyperTrack/data_types/internal/DeviceName.d.ts +4 -0
  92. package/lib/typescript/HyperTrack/data_types/internal/Geotag.d.ts +3 -0
  93. package/lib/typescript/HyperTrack/data_types/internal/HyperTrackErrorInternal.d.ts +4 -0
  94. package/lib/typescript/HyperTrack/data_types/internal/IsAvailable.d.ts +4 -0
  95. package/lib/typescript/HyperTrack/data_types/internal/IsTracking.d.ts +4 -0
  96. package/lib/typescript/HyperTrack/data_types/internal/LocationErrorInternal.d.ts +12 -0
  97. package/lib/typescript/HyperTrack/data_types/internal/LocationResponse.d.ts +11 -0
  98. package/lib/typescript/index.d.ts +4 -1
  99. package/package.json +156 -156
  100. package/src/HyperTrack/HyperTrack.ts +164 -163
  101. package/src/HyperTrack/data_types/HyperTrackError.ts +22 -0
  102. package/src/HyperTrack/data_types/Location.ts +7 -0
  103. package/src/HyperTrack/data_types/LocationError.ts +11 -0
  104. package/src/HyperTrack/data_types/SdkInitParams.ts +28 -0
  105. package/src/HyperTrack/data_types/internal/DeviceId.ts +4 -0
  106. package/src/HyperTrack/data_types/internal/DeviceName.ts +4 -0
  107. package/src/HyperTrack/data_types/internal/Geotag.ts +3 -0
  108. package/src/HyperTrack/data_types/internal/HyperTrackErrorInternal.ts +4 -0
  109. package/src/HyperTrack/data_types/internal/IsAvailable.ts +4 -0
  110. package/src/HyperTrack/data_types/internal/IsTracking.ts +4 -0
  111. package/src/HyperTrack/data_types/internal/LocationErrorInternal.ts +14 -0
  112. package/src/HyperTrack/data_types/internal/LocationResponse.ts +14 -0
  113. package/src/index.tsx +4 -7
  114. package/android/src/main/java/com/reactnativehypertracksdk/HyperTrackModule.kt +0 -284
  115. package/ios/HyperTrack.h +0 -7
  116. package/ios/HyperTrack.m +0 -384
@@ -1 +1 @@
1
- {"version":3,"names":["HyperTrack","Location","Error","SDKError","GeotagError","LocationError"],"sources":["index.tsx"],"sourcesContent":["import HyperTrack from './HyperTrack/HyperTrack';\nexport default HyperTrack;\nexport { HyperTrack };\n\nexport {\n Location,\n Error,\n SDKError,\n GeotagError,\n LocationError,\n} from './HyperTrack/HyperTrack';\n"],"mappings":"AAAA,OAAOA,UAAP,MAAuB,yBAAvB;AACA,eAAeA,UAAf;AACA,SAASA,UAAT;AAEA,SACEC,QADF,EAEEC,KAFF,EAGEC,QAHF,EAIEC,WAJF,EAKEC,aALF,QAMO,yBANP"}
1
+ {"version":3,"names":["HyperTrack","HyperTrackError","LocationError","NotRunning","Starting","Errors","Location","SdkInitParams"],"sources":["index.tsx"],"sourcesContent":["import HyperTrack from './HyperTrack/HyperTrack';\nexport default HyperTrack;\nexport { HyperTrack };\n\nexport { HyperTrackError } from './HyperTrack/data_types/HyperTrackError';\nexport { LocationError, NotRunning, Starting, Errors } from './HyperTrack/data_types/LocationError';\nexport { Location } from './HyperTrack/data_types/Location';\nexport { SdkInitParams } from './HyperTrack/data_types/SdkInitParams'\n"],"mappings":"AAAA,OAAOA,UAAU,MAAM,yBAAyB;AAChD,eAAeA,UAAU;AACzB,SAASA,UAAU;AAEnB,SAASC,eAAe,QAAQ,yCAAyC;AACzE,SAASC,aAAa,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,MAAM,QAAQ,uCAAuC;AACnG,SAASC,QAAQ,QAAQ,kCAAkC;AAC3D,SAASC,aAAa,QAAQ,uCAAuC"}
@@ -1,110 +1,75 @@
1
- export declare enum SDKError {
2
- /**
3
- * An error that we couldn't recognize.
4
- */
5
- GENERAL = 0,
6
- /**
7
- * Publishable key is invalid. Check your key on hypertrack dashboard setup.
8
- */
9
- INVALID_PUBLISHABLE_KEY = 1,
10
- /**
11
- * Your free trial ended or account was not renewed. Check your account on hypertrack dashboard.
12
- */
13
- AUTHORIZATION_FAILED = 2,
14
- /**
15
- * Tracking won't start due to denied (or absent) permission.
16
- */
17
- PERMISSION_DENIED = 3
18
- }
19
- /**
20
- * A base interface for errors in SDK.
21
- */
22
- export declare type Error = {
23
- code: SDKError;
24
- message?: string;
25
- };
26
- /**
27
- * Interface for accessing adding geotag result.
28
- */
29
- export declare enum GeotagError {
30
- /** Expected location is not supported on this platform */
31
- PLATFORM_NOT_SUPPORTED = 0,
32
- /** Expected vs actual location difference is greater then required */
33
- LOCATION_MISMATCH = 1,
34
- /** SDK can't get actual location from OS sensors */
35
- LOCATION_NOT_AVAILABLE = 2,
36
- /** Invalid arguments */
37
- INVALID_ARGUMENTS = 3
38
- }
39
- export interface Location {
40
- location: {
41
- latitude: number;
42
- longitude: number;
43
- };
44
- }
45
- export declare enum LocationError {
46
- LOCATION_PERMISSIONS_NOT_DETERMINED = "location_permissions_not_determined",
47
- LOCATION_PERMISSIONS_CANT_BE_ASKED_IN_BACKGROUND = "location_permissions_cant_be_asked_in_background",
48
- LOCATION_PERMISSIONS_INSUFFICIENT_FOR_BACKGROUND = "location_permissions_insufficient_for_background",
49
- LOCATION_PERMISSIONS_RESTRICTED = "location_permissions_restricted",
50
- LOCATION_PERMISSIONS_REDUCED_ACCURACY = "location_permissions_reduced_accuracy",
51
- LOCATION_PERMISSIONS_DENIED = "location_permissions_denied",
52
- LOCATION_SERVICES_DISABLED = "location_services_disabled",
53
- MOTION_ACTIVITY_PERMISSIONS_NOT_DETERMINED = "motion_activity_permissions_not_determined",
54
- MOTION_ACTIVITY_PERMISSIONS_CANT_BE_ASKED_IN_BACKGROUND = "motion_activity_permissions_cant_be_asked_in_background",
55
- MOTION_ACTIVITY_PERMISSIONS_DENIED = "motion_activity_permissions_denied",
56
- MOTION_ACTIVITY_SERVICES_DISABLED = "motion_activity_services_disabled",
57
- NOT_RUNNING = "not_running",
58
- GPS_SIGNAL_LOST = "gps_signal_lost",
59
- STARTING = "starting",
60
- LOCATION_MOCKED = "location_mocked"
61
- }
1
+ import { HyperTrackError } from './data_types/HyperTrackError';
2
+ import type { Location } from './data_types/Location';
3
+ import type { LocationError } from './data_types/LocationError';
4
+ import type { SdkInitParams } from './data_types/SdkInitParams';
62
5
  export default class HyperTrack {
63
- constructor();
64
- static createInstance(publishableKey: string, automaticallyRequestPermissions?: boolean): Promise<HyperTrack>;
6
+ private constructor();
65
7
  /**
66
- * Enables debug log output. This is very verbose, so you shouldn't use this for
67
- * production build.
8
+ * Creates an SDK instance
9
+ *
10
+ * @param publishableKey publishable key provided in HyperTrack’s dashboard setup page
11
+ * @param sdkInitParams
12
+ * @returns HyperTrack instance
68
13
  */
69
- static enableDebugLogging(enable: boolean): void;
14
+ static initialize(publishableKey: string, sdkInitParams?: SdkInitParams): Promise<HyperTrack>;
70
15
  /**
71
- * Returns a string which is used by HyperTrack to uniquely identify the user.
16
+ * Returns a string that is used to uniquely identify the device
72
17
  */
73
- getDeviceID(): Promise<string>;
18
+ getDeviceId(): Promise<string>;
74
19
  /**
75
- * Device's availability for nearby search
20
+ * Reflects availability of the device for the Nearby search
76
21
  *
77
22
  * @returns true when is available or false when unavailable
78
23
  */
79
24
  isAvailable(): Promise<boolean>;
80
25
  /**
81
- * Allows you to set device availability for nearby search
26
+ * Sets the availability of the device for the Nearby search
82
27
  *
83
28
  * @param availability true when is available or false when unavailable
84
29
  */
85
- setAvailability(availability: Boolean): Promise<void>;
30
+ setAvailability(isAvailable: boolean): void;
86
31
  /**
87
- * Determine whether the SDK is tracking the movement of the user.
32
+ * Reflects the tracking intent for the device
33
+ *
88
34
  * @return {boolean} Whether the user's movement data is getting tracked or not.
89
35
  */
90
36
  isTracking(): Promise<boolean>;
91
37
  /**
92
- * Update device state from server.
38
+ * Syncs the device state with the HyperTrack servers
93
39
  */
94
- syncDeviceSettings(): void;
40
+ sync(): void;
95
41
  /**
96
- * Start or resume tracking location and activity events.
42
+ * Expresses an intent to start location tracking for the device
97
43
  */
98
44
  startTracking(): void;
99
45
  /**
100
- * Stops the SDK from listening to the user's movement updates and recording any data.
46
+ * Stops location tracking immediately
101
47
  */
102
48
  stopTracking(): void;
49
+ /**
50
+ * Reflects the current location of the user or an outage reason
51
+ */
103
52
  getLocation(): Promise<LocationError | Location>;
104
53
  /**
105
- * Listen for errors.
54
+ * Sets the name for the device
55
+ * @param {string} name
56
+ */
57
+ setName(name: string): void;
58
+ /**
59
+ * Sets the metadata for the device
60
+ * @param {Object} data - Metadata JSON
61
+ */
62
+ setMetadata(data: Object): void;
63
+ /**
64
+ * Adds a new geotag
65
+ * @param {Object} data - Geotad data JSON
66
+ * @returns current location if success or LocationError if failure
67
+ */
68
+ addGeotag(data: Object): Promise<LocationError | Location>;
69
+ /**
70
+ * Subscribe to tracking errors
106
71
  *
107
- * @param listener (errors: {code, message}) => void
72
+ * @param listener
108
73
  * @returns EmitterSubscription
109
74
  * @example
110
75
  * ```js
@@ -118,11 +83,11 @@ export default class HyperTrack {
118
83
  * subscription.remove()
119
84
  * ```
120
85
  */
121
- subscribeToErrors(listener: (errors: Error) => void): import("react-native").EmitterSubscription;
86
+ subscribeToErrors(listener: (errors: HyperTrackError[]) => void): import("react-native").EmitterSubscription;
122
87
  /**
123
- * Listen for tracking changes.
88
+ * Subscribe to tracking intent changes
124
89
  *
125
- * @param listener (isTracking: boolean) => void
90
+ * @param listener
126
91
  * @returns EmitterSubscription
127
92
  * @example
128
93
  * ```js
@@ -138,24 +103,25 @@ export default class HyperTrack {
138
103
  */
139
104
  subscribeToTracking(listener: (isTracking: boolean) => void): import("react-native").EmitterSubscription;
140
105
  /**
141
- * Send device name to HyperTrack
142
- * @param {string} name - Device name you want to see in the Dashboard.
143
- */
144
- setDeviceName(name: string): void;
145
- /**
146
- * Send metadata details to HyperTrack
147
- * @param {Object} data - Send extra device information.
148
- */
149
- setMetadata(data: Object): void;
150
- /**
151
- * @deprecated
152
- * Set a trip marker
153
- * @param {Object} _data - Include anything that can be parsed into JSON.
154
- */
155
- setTripMarker(_data: Object): void;
156
- /**
157
- * Add geotag
158
- * @param {Object} data - Include anything that can be parsed into JSON.
106
+ * Subscribe to availability changes
107
+ *
108
+ * @param listener
109
+ * @returns EmitterSubscription
110
+ * @example
111
+ * ```js
112
+ * const subscription = HyperTrack.subscribeToAvailability(isAvailable => {
113
+ * if (isAvailable) {
114
+ * // ... ready to go
115
+ * }
116
+ * })
117
+ *
118
+ * // later, to stop listening
119
+ * subscription.remove()
120
+ * ```
159
121
  */
160
- addGeotag(data: Object): Promise<LocationError | Location>;
122
+ subscribeToAvailability(listener: (isAvailable: boolean) => void): import("react-native").EmitterSubscription;
123
+ /** @ignore */
124
+ private deserializeHyperTrackErrors;
125
+ /** @ignore */
126
+ private deserializeLocationResponse;
161
127
  }
@@ -0,0 +1,20 @@
1
+ export declare enum HyperTrackError {
2
+ gpsSignalLost = "gpsSignalLost",
3
+ locationMocked = "locationMocked",
4
+ locationPermissionsDenied = "locationPermissionsDenied",
5
+ locationPermissionsInsufficientForBackground = "locationPermissionsInsufficientForBackground",
6
+ locationPermissionsNotDetermined = "locationPermissionsNotDetermined",
7
+ locationPermissionsReducedAccuracy = "locationPermissionsReducedAccuracy",
8
+ locationPermissionsProvisional = "locationPermissionsProvisional",
9
+ locationPermissionsRestricted = "locationPermissionsRestricted",
10
+ locationServicesDisabled = "locationServicesDisabled",
11
+ locationServicesUnavailable = "locationServicesUnavailable",
12
+ motionActivityPermissionsNotDetermined = "motionActivityPermissionsNotDetermined",
13
+ motionActivityPermissionsDenied = "motionActivityPermissionsDenied",
14
+ motionActivityServicesDisabled = "motionActivityServicesDisabled",
15
+ motionActivityServicesUnavailable = "motionActivityServicesUnavailable",
16
+ motionActivityPermissionsRestricted = "motionActivityPermissionsRestricted",
17
+ networkConnectionUnavailable = "networkConnectionUnavailable",
18
+ invalidPublishableKey = "invalidPublishableKey",
19
+ blockedFromRunning = "blockedFromRunning"
20
+ }
@@ -0,0 +1,7 @@
1
+ export type Location = {
2
+ type: 'location';
3
+ value: {
4
+ latitude: number;
5
+ longitude: number;
6
+ };
7
+ };
@@ -0,0 +1,8 @@
1
+ import type { HyperTrackError } from './HyperTrackError';
2
+ import type { NotRunning, Starting } from './internal/LocationErrorInternal';
3
+ export { NotRunning, Starting };
4
+ export type Errors = {
5
+ type: 'errors';
6
+ value: HyperTrackError[];
7
+ };
8
+ export type LocationError = NotRunning | Starting | Errors;
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Parameters for initializing the SDK.
3
+ */
4
+ export type SdkInitParams = {
5
+ /**
6
+ * Enable debug logging.
7
+ * @default false
8
+ */
9
+ loggingEnabled?: boolean;
10
+ /**
11
+ * Allow mock locations to pass through and don’t send mock location outage.
12
+ * @default false
13
+ */
14
+ allowMockLocations?: boolean;
15
+ /**
16
+ * Require Background location permissions while requiring permissions on Android.
17
+ * @default false
18
+ */
19
+ requireBackgroundTrackingPermission?: boolean;
20
+ /**
21
+ * Automatically request permissions on starting tracking on iOS.
22
+ * @default true
23
+ */
24
+ automaticallyRequestPermissions?: boolean;
25
+ };
@@ -0,0 +1,4 @@
1
+ export type DeviceId = {
2
+ type: 'deviceID';
3
+ value: string;
4
+ };
@@ -0,0 +1,4 @@
1
+ export type DeviceName = {
2
+ type: 'deviceName';
3
+ value: string;
4
+ };
@@ -0,0 +1,3 @@
1
+ export type Geotag = {
2
+ data: Object;
3
+ };
@@ -0,0 +1,4 @@
1
+ export type HyperTrackErrorInternal = {
2
+ type: "hyperTrackError";
3
+ value: string;
4
+ };
@@ -0,0 +1,4 @@
1
+ export type IsAvailable = {
2
+ type: 'isAvailable';
3
+ value: boolean;
4
+ };
@@ -0,0 +1,4 @@
1
+ export type IsTracking = {
2
+ type: 'isTracking';
3
+ value: boolean;
4
+ };
@@ -0,0 +1,12 @@
1
+ import type { HyperTrackErrorInternal } from './HyperTrackErrorInternal';
2
+ export type NotRunning = {
3
+ type: 'notRunning';
4
+ };
5
+ export type Starting = {
6
+ type: 'starting';
7
+ };
8
+ export type ErrorsInternal = {
9
+ type: 'errors';
10
+ value: HyperTrackErrorInternal[];
11
+ };
12
+ export type LocationErrorInternal = NotRunning | Starting | ErrorsInternal;
@@ -0,0 +1,11 @@
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,4 +1,7 @@
1
1
  import HyperTrack from './HyperTrack/HyperTrack';
2
2
  export default HyperTrack;
3
3
  export { HyperTrack };
4
- export { Location, Error, SDKError, GeotagError, LocationError, } from './HyperTrack/HyperTrack';
4
+ export { HyperTrackError } from './HyperTrack/data_types/HyperTrackError';
5
+ export { LocationError, NotRunning, Starting, Errors } from './HyperTrack/data_types/LocationError';
6
+ export { Location } from './HyperTrack/data_types/Location';
7
+ export { SdkInitParams } from './HyperTrack/data_types/SdkInitParams';