nodejs-google-adwords
Version:
Google Ads API Client Library for Node.js
39 lines (38 loc) • 1.48 kB
TypeScript
import { IHttpService } from '../../core';
import { IReportDefinition } from '../ReportDefinitionService/ReportDefinition';
interface IReportServiceOpts {
httpService: IHttpService;
}
interface IReportDownloadOptions {
json: boolean;
skipReportHeader: boolean;
skipColumnHeader: boolean;
skipReportSummary: boolean;
useRawEnumValues: boolean;
includeZeroImpressions: boolean;
}
interface IReport {
'report-name': any[];
'data-range': any[];
table: any[];
}
interface IReportService {
reportDownload(reportDefinition: IReportDefinition, options?: Partial<IReportDownloadOptions>): Promise<IReport | string>;
setVerbose(verbose: boolean): void;
}
interface IClientReportService {
get(reportDefinition: Partial<IReportDefinition>): ReturnType<IReportService['reportDownload']>;
setOptions(options: Partial<IReportDownloadOptions>): void;
getOptions(): Partial<IReportDownloadOptions> | undefined;
}
declare class ReportService implements IReportService {
static readonly URL: string;
private verbose;
private httpService;
constructor(options: IReportServiceOpts);
setVerbose(verbose: boolean): void;
reportDownload(reportDefinition: IReportDefinition, options?: Partial<IReportDownloadOptions>): Promise<IReport | string>;
private buildObjectToXML;
private xmlParse;
}
export { ReportService, IReportServiceOpts, IReportDownloadOptions, IReport, IReportService, IClientReportService };