Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

### 23.0.0

### Version Upgrade

- Upgraded google-ads-api version to v23. Refer to Google Ads release notes [here](https://developers.google.com/google-ads/api/docs/release-notes) for changes.
- Upgraded google-ads-node dependency to v23.0.0 (now aligned with Google Ads API versioning)

### 22.0.0

### Version Upgrade
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</p>
<p align="center">
<a href="https://developers.google.com/google-ads/api/docs/release-notes">
<img src="https://img.shields.io/badge/google%20ads-v22-009688.svg?style=flat-square">
<img src="https://img.shields.io/badge/google%20ads-v23-009688.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/google-ads-api">
<img src="https://img.shields.io/npm/v/google-ads-api.svg?style=flat-square">
Expand Down Expand Up @@ -93,7 +93,7 @@ const customer = client.Customer({

## List accessible customers

This is a special client method for listing the accessible customers for a given refresh token, and is equivalent to [CustomerService.listAccessibleCustomers](https://developers.google.com/google-ads/api/reference/rpc/v22/CustomerService#listaccessiblecustomers). It returns the resource names of available customer accounts.
This is a special client method for listing the accessible customers for a given refresh token, and is equivalent to [CustomerService.listAccessibleCustomers](https://developers.google.com/google-ads/api/reference/rpc/v23/CustomerService#listaccessiblecustomers). It returns the resource names of available customer accounts.

```ts
const client = new GoogleAdsApi({
Expand Down Expand Up @@ -385,7 +385,7 @@ const keyword = "24 hour locksmith harlem";

const operations: MutateOperation<
resources.IAdGroupCriterion & {
exempt_policy_violation_keys?: google.ads.googleads.v22.common.IPolicyViolationKey[];
exempt_policy_violation_keys?: google.ads.googleads.v23.common.IPolicyViolationKey[];
}
>[] = [
{
Expand Down Expand Up @@ -671,9 +671,9 @@ const customer = client.Customer(

## Error handling

All errors, apart from GRPC specific cases (such as a connection problem or timeout, [see more here](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)), are instances of a [GoogleAdsFailure](https://developers.google.com/google-ads/api/reference/rpc/v22/GoogleAdsFailure).
All errors, apart from GRPC specific cases (such as a connection problem or timeout, [see more here](https://github.com/grpc/grpc/blob/master/doc/statuscodes.md)), are instances of a [GoogleAdsFailure](https://developers.google.com/google-ads/api/reference/rpc/v23/GoogleAdsFailure).

You can find a list of all error types for a specific version in [the official documentation](https://developers.google.com/google-ads/api/reference/rpc/v22/AccessInvitationErrorEnum.AccessInvitationError), as well as more information about [handling errors here](https://developers.google.com/google-ads/api/docs/best-practices/error-types).
You can find a list of all error types for a specific version in [the official documentation](https://developers.google.com/google-ads/api/reference/rpc/v23/AccessInvitationErrorEnum.AccessInvitationError), as well as more information about [handling errors here](https://developers.google.com/google-ads/api/docs/best-practices/error-types).

```ts
import { errors } from "google-ads-api";
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-ads-api",
"version": "22.0.0",
"version": "23.0.0",
"description": "Google Ads API Client Library for Node.js",
"repository": "https://github.com/Opteo/google-ads-api",
"main": "build/src/index.js",
Expand All @@ -21,7 +21,7 @@
"@isaacs/ttlcache": "^1.2.2",
"axios": "^1.6.7",
"circ-json": "^1.0.4",
"google-ads-node": "19.0.0",
"google-ads-node": "23.0.0",
"google-auth-library": "^9.15.1",
"google-gax": "^5.0.6",
"long": "^4.0.0",
Expand Down
861 changes: 498 additions & 363 deletions src/protos/autogen/enums.ts

Large diffs are not rendered by default.

1,535 changes: 1,125 additions & 410 deletions src/protos/autogen/fields.ts

Large diffs are not rendered by default.

32 changes: 32 additions & 0 deletions src/protos/autogen/resourceNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,22 @@ export function androidPrivacySharedKeyGoogleNetworkType(
return `customers/${customerId}/androidPrivacySharedKeyGoogleNetworkTypes/${campaignId}~${androidPrivacyInteractionType}~${androidPrivacyNetworkType}~${androidPrivacyInteractionDate}` as const;
}

/* AppliedIncentive */
export type AppliedIncentiveResourceName =
`customers/${StrNum}/appliedIncentives/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} couponCode
* @returns `AppliedIncentiveResourceName`
* @example const appliedIncentive: ResourceNames.AppliedIncentiveResourceName = ResourceNames.appliedIncentive(10987417, 21974834)
*/
export function appliedIncentive(
customerId: string | number,
couponCode: string | number
): AppliedIncentiveResourceName {
return `customers/${customerId}/appliedIncentives/${couponCode}` as const;
}

/* Asset */
export type AssetResourceName = `customers/${StrNum}/assets/${StrNum}`;
/**
Expand Down Expand Up @@ -2450,6 +2466,22 @@ export function managedPlacementView(
return `customers/${customerId}/managedPlacementViews/${adGroupId}~${criterionId}` as const;
}

/* MatchedLocationInterestView */
export type MatchedLocationInterestViewResourceName =
`customers/${StrNum}/matchedLocationInterestViews/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} countryCriterionId
* @returns `MatchedLocationInterestViewResourceName`
* @example const matchedLocationInterestView: ResourceNames.MatchedLocationInterestViewResourceName = ResourceNames.matchedLocationInterestView(10987417, 21974834)
*/
export function matchedLocationInterestView(
customerId: string | number,
countryCriterionId: string | number
): MatchedLocationInterestViewResourceName {
return `customers/${customerId}/matchedLocationInterestViews/${countryCriterionId}` as const;
}

/* MediaFile */
export type MediaFileResourceName = `customers/${StrNum}/mediaFiles/${StrNum}`;
/**
Expand Down
Loading
Loading