gong-api-client
Version:
A Node.js library that automatically generates a TypeScript client for the Gong API from the OpenAPI specification
49 lines (48 loc) • 1.38 kB
TypeScript
import { downloadAndSaveGongSpec } from './downloadGongApiSpec';
import { generateGongApiClient } from './generateGongApiClient';
/**
* Configuration options for the Gong API client.
*/
export interface GongApiClientOptions {
/**
* Base URL for the Gong API.
* @default 'https://api.gong.io'
*/
baseUrl?: string;
/**
* API key for authentication.
*/
apiKey?: string;
/**
* Access key for authentication.
*/
accessKey?: string;
/**
* Path to the API specification file.
* @default 'gong-openapi.json'
*/
specFile?: string;
/**
* Directory to output the generated code.
* @default 'src/generated'
*/
outputDir?: string;
/**
* Whether to regenerate the client code.
* @default false
*/
regenerate?: boolean;
}
/**
* Initializes the Gong API client.
* @param options Configuration options for the Gong API client.
* @returns A promise that resolves when the client is initialized.
*/
export declare function initGongApiClient(options?: GongApiClientOptions): Promise<any>;
export { downloadAndSaveGongSpec, generateGongApiClient };
declare const _default: {
initGongApiClient: typeof initGongApiClient;
downloadAndSaveGongSpec: typeof downloadAndSaveGongSpec;
generateGongApiClient: typeof generateGongApiClient;
};
export default _default;