UNPKG

@proofgeist/fmdapi

Version:
28 lines 1.17 kB
import type { TokenStoreDefinitions } from "../tokenStore/types.js"; import type { BaseFetchAdapterOptions, GetTokenArguments } from "./fetch-base-types.js"; import { BaseFetchAdapter } from "./fetch-base.js"; export interface FetchAdapterOptions extends BaseFetchAdapterOptions { auth: { username: string; password: string; }; tokenStore?: TokenStoreDefinitions; } export declare class FetchAdapter extends BaseFetchAdapter { private username; private password; private tokenStore; private getTokenKey; constructor(args: FetchAdapterOptions); /** * Gets a FileMaker Data API token for authentication. * * This token is **NOT** guaranteed to be valid, since it expires 15 minutes after the last use. Pass `refresh=true` to forcibly get a fresh token * * @param args.refresh - If true, forces getting a new token instead of using cached token * @internal This method is intended for internal use, you should not need to use it in most cases. */ getToken: (args?: GetTokenArguments) => Promise<string>; disconnect: () => Promise<void>; } //# sourceMappingURL=fetch.d.ts.map