@tableau/taco-toolkit
Version:
Tableau Connector Toolkit
27 lines (26 loc) • 884 B
TypeScript
import type { AuthResult } from '../../../../shared/types/auth-result';
import type { HandlerInput } from '../../../../shared/types/handler-input';
import type { SecretsType } from '../../../../shared/types/secrets-type';
export interface FetchOptions {
authResult?: AuthResult;
handlerInput: HandlerInput;
secrets?: SecretsType;
}
/**
* An abstract class for implementing fetcher functionality that asynchronously retrieves data.
*
* @example
* ```ts
* class MyFetcher extends Fetcher {
* async *fetch(options: FetchOptions): AsyncGenerator {
* // Implementation to asynchronously retrieve data using the provided options.
* }
* }
* ```
*/
export declare abstract class Fetcher {
/**
* The method to implement the fetching logic to retrieve data using the provided options.
*/
abstract fetch(options: FetchOptions): AsyncGenerator;
}