hevy-shared 1.0.874 → 1.0.875
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/built/API/APIClient.d.ts
CHANGED
|
@@ -120,6 +120,7 @@ export declare class HevyAPIClient<UserContext = never> {
|
|
|
120
120
|
legacyAuthToken: string | null;
|
|
121
121
|
}): Promise<void>;
|
|
122
122
|
clearAuthToken(): Promise<void>;
|
|
123
|
+
get isAuthenticated(): boolean;
|
|
123
124
|
attachErrorHandler(onError: HTTPErrorHandler<{
|
|
124
125
|
willRetry: boolean;
|
|
125
126
|
isTokenRefreshedAfterRequest: boolean;
|
package/built/API/APIClient.js
CHANGED
|
@@ -215,6 +215,15 @@ class HevyAPIClient {
|
|
|
215
215
|
this._lastTokenRefresh = undefined;
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
|
+
get isAuthenticated() {
|
|
219
|
+
if (this._authTokenFactory.type === 'value' &&
|
|
220
|
+
this._authTokenFactory.value === null) {
|
|
221
|
+
return false;
|
|
222
|
+
}
|
|
223
|
+
else {
|
|
224
|
+
return true;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
218
227
|
attachErrorHandler(onError) {
|
|
219
228
|
this._errorHandlers.push(onError);
|
|
220
229
|
}
|