UNPKG

nodejs-google-adwords

Version:
50 lines (49 loc) 1.53 kB
import { IOAuthCredential, SoapService, IHttpService } from '../core'; import { IServiceMap } from './registry'; import { IReportService } from './ReportService'; interface IAdWordsServiceOpts { clientCustomerId?: string; developerToken: string; clientId: string; clientSecret: string; userAgent: string; validateOnly?: boolean; partialFailure?: boolean; credentials: IOAuthCredential; } interface IServiceOpts { verbose: boolean; validateOnly: boolean; partialFailure: boolean; version: string; gzip: boolean; clientCustomerId?: string; } interface IServiceDeps { soapService: typeof SoapService; httpService: IHttpService; reportService: IReportService; } declare class AdWordsService { static readonly namespace: string; static readonly version: string; static readonly suffix: string; private registryService; private authService; private verbose; private soapHeader; constructor(options: IAdWordsServiceOpts); setVerbose(verbose: boolean): void; /** * get each google adwords service: CampaignService, AdGroupService, BudgetService etc... * * @author dulin * @template K * @param {K} key * @param {Partial<IServiceOpts & IServiceDeps>} [options] * @returns {IServiceMap[K]} * @memberof AdWordsService */ getService<K extends keyof IServiceMap>(key: K, options?: Partial<IServiceOpts & IServiceDeps>): IServiceMap[K]; } export { AdWordsService, IAdWordsServiceOpts };