google-ads-api-types
v0.21.1
Published
TypeScript types and gRPC bindings for Google Ads API v21, generated from protobufs
Maintainers
Readme
google-ads-api-types
TypeScript types and gRPC bindings for Google Ads API v21, generated from official Google protobufs.
Installation
npm install google-ads-api-typesUsage
import { Campaign } from 'google-ads-api-types/google/ads/googleads/v21/resources/campaign.js';
import { CampaignStatusEnum_CampaignStatus } from 'google-ads-api-types/google/ads/googleads/v21/enums/campaign_status.js';Building
The compiled output is not committed to the repository. To generate it:
# Install dependencies (needs protoc installed on your system)
npm install
# Compile protobufs -> TypeScript -> JavaScript + .d.ts
npm run compilePrerequisites
protoc(Protocol Buffers compiler) must be installed- On macOS:
brew install protobuf - On Ubuntu:
apt-get install protobuf-compiler
Publishing
npm run compile
npm publishThe prepublishOnly script ensures compilation runs before publishing.
What's Generated
dist/google/ads/googleads/v21/common/- Common typesdist/google/ads/googleads/v21/enums/- Enum definitionsdist/google/ads/googleads/v21/errors/- Error typesdist/google/ads/googleads/v21/resources/- Resource types (Campaign, AdGroup, etc.)dist/google/ads/googleads/v21/services/- gRPC service definitions
