import { AppsApiInterface, AssetsApiInterface, BackupsApiInterface, ContentsApiInterface, DiagnosticsApiInterface, EventConsumersApiInterface, FetchAPI, HistoryApiInterface, LanguagesApiInterface, Middleware, NewsApiInterface, PingApiInterface, PlansApiInterface, RulesApiInterface, SchemasApiInterface, SearchApiInterface, StatisticsApiInterface, TeamsApiInterface, TemplatesApiInterface, TranslationsApiInterface, UserManagementApiInterface, UsersApiInterface } from "../generated"; export interface SquidexOptions { /** * The name of the app. */ appName: string; /** * The secret of the client. */ clientId: string; /** * The secret of the client. */ clientSecret: string; /** * Custom headers to be added to each request. */ customHeaders?: Record; /** * The URL to your Squidex installation (cloud by default). */ url?: string; /** * A custom fetcher for normal requests. */ fetcher?: FetchAPI; /** * A function to create a new fetcher based on the default fetcher. */ middleware?: Middleware; /** * The timeout in milliseconds. */ timeout?: number; /** * The store for tokens. By default it is in memory. */ tokenStore?: TokenStore; } export interface TokenStore { get(): Token | undefined; set(token: Token): void; clear(): void; } export interface Token { accessToken: string; expiresIn: number; expiresAt: number; } export declare class SquidexClients { readonly clientOptions: SquidexOptions; private readonly configuration; private readonly tokenStore; private readonly tokenApi; private appsApi?; private assetsApi?; private backupsApi?; private contentsApi?; private diagnosticsApi?; private eventConsumersApi?; private historyApi?; private languagesApi?; private newsApi?; private pingApi?; private plansApi?; private rulesApi?; private schemasApi?; private searchApi?; private statisticsApi?; private teamsApi?; private templatesApi?; private translationsApi?; private usersApi?; private userManagementApi?; get apps(): AppsApiInterface; get assets(): AssetsApiInterface; get backups(): BackupsApiInterface; get contents(): ContentsApiInterface; get diagnostics(): DiagnosticsApiInterface; get eventConsumers(): EventConsumersApiInterface; get history(): HistoryApiInterface; get languages(): LanguagesApiInterface; get news(): NewsApiInterface; get ping(): PingApiInterface; get plans(): PlansApiInterface; get rules(): RulesApiInterface; get schemas(): SchemasApiInterface; get search(): SearchApiInterface; get statistics(): StatisticsApiInterface; get teams(): TeamsApiInterface; get templates(): TemplatesApiInterface; get translations(): TranslationsApiInterface; get users(): UsersApiInterface; get userManagement(): UserManagementApiInterface; /** * The current app name. */ get appName(): string; /** * The current client ID. */ get clientId(): string; /** * The current client secret. */ get clientSecret(): string; /** * The current URL to the Squidex installation. */ get url(): string; constructor(clientOptions: SquidexOptions); /** * Clears the current token in case it has been expired. */ clearToken(): void; /** * Get an access token from the token store. If it doesn't exist, request it and save it to the token store */ getToken(): Promise; } export declare class InMemoryTokenStore implements TokenStore { private token; get(): Token | undefined; set(token: Token): void; clear(): void; } export declare class StorageTokenStore implements TokenStore { readonly store: Storage; readonly key: string; constructor(store?: Storage, key?: string); get(): Token | undefined; set(token: Token): void; clear(): void; }