@globalfishingwatch/api-client
Advanced tools
Comparing version 1.1.0 to 1.1.1
import { UserData } from './types'; | ||
export declare const USER_TOKEN_STORAGE_KEY = "GFW_API_USER_TOKEN"; | ||
export declare const USER_REFRESH_TOKEN_STORAGE_KEY = "GFW_API_USER_REFRESH_TOKEN"; | ||
interface UserTokens { | ||
token: string; | ||
refreshToken: string; | ||
} | ||
interface LibConfig { | ||
@@ -53,10 +57,12 @@ debug?: boolean; | ||
getToken(): string; | ||
private setToken; | ||
setToken(token: string): void; | ||
getRefreshToken(): string; | ||
private setRefreshToken; | ||
private getTokensWithAccessToken; | ||
private getTokenWithRefreshToken; | ||
setRefreshToken(refreshToken: string): void; | ||
getTokensWithAccessToken(accessToken: string): Promise<UserTokens>; | ||
getTokenWithRefreshToken(refreshToken: string): Promise<{ | ||
token: string; | ||
}>; | ||
fetch<T>(url: string, options?: FetchOptions): Promise<T>; | ||
download(downloadUrl: string, fileName?: string): Promise<boolean>; | ||
private _internalFetch; | ||
_internalFetch<T>(url: string, options?: FetchOptions, refreshRetries?: number, waitLogin?: boolean): Promise<T>; | ||
fetchUser(): Promise<UserData>; | ||
@@ -63,0 +69,0 @@ login(params: LoginParams): Promise<UserData>; |
{ | ||
"name": "@globalfishingwatch/api-client", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "", | ||
@@ -37,3 +37,3 @@ "author": "satellitestudio <contact@satellitestud.io>", | ||
}, | ||
"gitHead": "ab695c0e6d464f329330520935e63d5022f93a9f" | ||
"gitHead": "10c3825a90f584a1c240e6f3c1a77dece200a650" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
47852
152
4