import { AAD_OAUTH, ADFS_OAUTH, CDF_OAUTH, CUSTOM, OIDC_AUTHORIZATION_CODE_FLOW } from "@cognite/sdk-core"; export interface ClientLoginOptions { appId: string; baseUrl?: string; } export interface ClientOptions { appId: string; baseUrl?: string; } export declare type WellsAuthFlowType = AAD_OAUTH | CDF_OAUTH | ADFS_OAUTH | OIDC_AUTHORIZATION_CODE_FLOW | CUSTOM; export declare type RefreshMethod = (args?: any) => Promise; export interface CogniteProject { /** * Cognite project to login into */ project: string; } export interface ApiKeyLogin extends CogniteProject { /** * A Cognite issued api-key */ apiKey: string; } export interface TokenLogin extends CogniteProject { /** * authentication alternative 1. * Provide optional cached access token to skip the authentication flow (client.authenticate will still override this). */ accessToken?: string; /** * authentication alternative 2. * When the token expires, this custom method will be called to provide a new token */ tokenRefreshCallback?: RefreshMethod; /** * authentication alternative 3. * When the token expires, this custom method will be called to provide a new token */ authenticationFlow?: WellsAuthFlowType; } /** @hidden */ export interface Tokens { accessToken: string; idToken: string; } export declare type WithTokens = (tokens: Tokens) => void; /** @hidden */ export declare function bearerTokenString(token: string): string; /** @hidden */ export declare function isUsingBrowser(): boolean; /** @hidden */ export declare function isUsingSSL(): boolean; export declare function accessWellsApi(api: T | undefined): T; export declare const getTokenWithCogniteClient: (flow: WellsAuthFlowType) => Promise;