import { AllLayoutsMetadataResponse, CreateResponse, DeleteResponse, GetResponse, LayoutMetadataResponse, PortalRanges, ScriptsMetadataResponse, UpdateResponse } from "../client-types.js"; import { Adapter, BaseRequest, CreateOptions, DeleteOptions, FindOptions, GetOptions, LayoutMetadataOptions, ListOptions, UpdateOptions } from "./core.js"; export type ExecuteScriptOptions = BaseRequest & { script: string; scriptParam?: string; }; export type BaseFetchAdapterOptions = { server: string; db: string; }; export type GetTokenArguments = { refresh?: boolean; }; export declare class BaseFetchAdapter implements Adapter { protected server: string; protected db: string; private refreshToken; baseUrl: URL; constructor(options: BaseFetchAdapterOptions & { refreshToken?: boolean; }); protected getToken: (args?: GetTokenArguments) => Promise; protected request: (params: { url: string; body?: object; query?: Record; method?: string; retry?: boolean; portalRanges?: PortalRanges; timeout?: number; fetchOptions?: RequestInit; }) => Promise; list: (opts: ListOptions) => Promise; get: (opts: GetOptions) => Promise; find: (opts: FindOptions) => Promise; create: (opts: CreateOptions) => Promise; update: (opts: UpdateOptions) => Promise; delete: (opts: DeleteOptions) => Promise; layoutMetadata: (opts: LayoutMetadataOptions) => Promise; /** * Execute a script within the database */ executeScript: (opts: ExecuteScriptOptions) => Promise<{ scriptResult?: string | undefined; scriptError?: string | undefined; "scriptResult.prerequest"?: string | undefined; "scriptError.prerequest"?: string | undefined; "scriptResult.presort"?: string | undefined; "scriptError.presort"?: string | undefined; }>; /** * Returns a list of available layouts on the database. */ layouts: (opts?: Omit) => Promise; /** * Returns a list of available scripts on the database. */ scripts: (opts?: Omit) => Promise; /** * Set global fields for the current session */ globals: (opts: Omit & { globalFields: Record; }) => Promise>; }