import type { Store } from 'redux'; import { HttpsProxyAgent } from 'https-proxy-agent'; import type { RequestInfo, RequestInit, Response as FetchResponse } from 'node-fetch'; import type { Limit } from 'p-limit'; import { Semaphore } from 'async-mutex'; import type { ServerInfo, BuildWarning, ISession as IMystSession } from 'myst-cli'; import type { Logger } from 'myst-cli-utils'; import type { RuleId } from 'myst-common'; import type { PluginInfo } from 'myst-config'; import type { RootState } from '../store/index.js'; import type { ValidatedCurvenotePlugin, ISession, Response, TokenPair, Token, CLIConfigData, SessionOpts } from './types.js'; type JupyterSessionManager = Awaited>; export type SessionOptions = { logger?: Logger; doiLimiter?: Limit; executionSemaphore?: Semaphore; configFiles?: string[]; }; export declare class Session implements ISession { $config?: CLIConfigData; $activeTokens: TokenPair; $logger: Logger; API_URL: string; configFiles: string[]; store: Store; doiLimiter: Limit; executionSemaphore: Semaphore; plugins: ValidatedCurvenotePlugin | undefined; server: ServerInfo | undefined; proxyAgent?: HttpsProxyAgent; _shownUpgrade: boolean; _latestVersion?: string; _jupyterSessionManagerPromise?: Promise; get log(): Logger; get isAnon(): boolean; get config(): CLIConfigData; get activeTokens(): TokenPair; static create(token?: string, opts?: SessionOptions): Promise; private constructor(); setLogger(logger: Logger): void; setUserToken(token: Token): void; refreshSessionToken(opts?: { checkStatusOnFailure?: boolean; }): Promise; getHeaders(): Promise>; configure(): Promise; showUpgradeNotice(): void; _clones: ISession[]; clone(): Promise; getAllWarnings(ruleId: RuleId): (BuildWarning & { file: string; })[]; reload(): Promise; fetch(url: URL | RequestInfo, init?: RequestInit): Promise; _pluginPromise: Promise | undefined; loadPlugins(plugins: PluginInfo[]): Promise; get>(url: string, query?: Record): Response; patch>(url: string, data: Record): Promise<{ ok: boolean; status: number; json: T; }>; post>(url: string, data: Record, method?: 'post' | 'patch'): Response; sourcePath(): string; buildPath(): string; sitePath(): string; contentPath(): string; publicPath(): string; jupyterSessionManager(): Promise; private createJupyterSessionManager; dispose(): void; } export declare function anonSession(opts?: SessionOpts): Promise; export declare function getSession(opts?: SessionOpts & { hideNoTokenWarning?: boolean; }): Promise; export {}; //# sourceMappingURL=session.d.ts.map