UNPKG

@proofkit/fmodata

Version:
46 lines (45 loc) 1.49 kB
import { FFetchOptions } from '@fetchkit/ffetch'; import { Auth, ExecutionContext, Result } from '../types.js'; import { Database } from './database.js'; import { TableOccurrence } from './table-occurrence.js'; export declare class FMServerConnection implements ExecutionContext { private fetchClient; private serverUrl; private auth; private useEntityIds; constructor(config: { serverUrl: string; auth: Auth; fetchClientOptions?: FFetchOptions; }); /** * @internal * Sets whether to use FileMaker entity IDs (FMFID/FMTID) in requests */ _setUseEntityIds(useEntityIds: boolean): void; /** * @internal * Gets whether to use FileMaker entity IDs (FMFID/FMTID) in requests */ _getUseEntityIds(): boolean; /** * @internal * Gets the base URL for OData requests */ _getBaseUrl(): string; /** * @internal */ _makeRequest<T>(url: string, options?: RequestInit & FFetchOptions & { useEntityIds?: boolean; }): Promise<Result<T>>; database<const Occurrences extends readonly TableOccurrence<any, any, any, any>[]>(name: string, config?: { occurrences?: Occurrences | undefined; useEntityIds?: boolean; }): Database<Occurrences>; /** * Lists all available databases from the FileMaker OData service. * @returns Promise resolving to an array of database names */ listDatabaseNames(): Promise<string[]>; }