@proofkit/fmdapi
Version:
FileMaker Data API client
28 lines (27 loc) • 1.12 kB
TypeScript
import { TokenStoreDefinitions } from '../tokenStore/types.js';
import { 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>;
}