Skip to content

Commit 4f7d7bf

Browse files
Merge pull request #531 from Opteo/v23
Upgrade to Google Ads API v23
2 parents 20f79bb + 315b1e4 commit 4f7d7bf

10 files changed

Lines changed: 2457 additions & 1064 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
### 23.0.0
4+
5+
### Version Upgrade
6+
7+
- 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.
8+
- Upgraded google-ads-node dependency to v23.0.0 (now aligned with Google Ads API versioning)
9+
310
### 22.0.0
411

512
### Version Upgrade

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</p>
88
<p align="center">
99
<a href="https://developers.google.com/google-ads/api/docs/release-notes">
10-
<img src="https://img.shields.io/badge/google%20ads-v22-009688.svg?style=flat-square">
10+
<img src="https://img.shields.io/badge/google%20ads-v23-009688.svg?style=flat-square">
1111
</a>
1212
<a href="https://www.npmjs.com/package/google-ads-api">
1313
<img src="https://img.shields.io/npm/v/google-ads-api.svg?style=flat-square">
@@ -93,7 +93,7 @@ const customer = client.Customer({
9393

9494
## List accessible customers
9595

96-
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.
96+
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.
9797

9898
```ts
9999
const client = new GoogleAdsApi({
@@ -385,7 +385,7 @@ const keyword = "24 hour locksmith harlem";
385385

386386
const operations: MutateOperation<
387387
resources.IAdGroupCriterion & {
388-
exempt_policy_violation_keys?: google.ads.googleads.v22.common.IPolicyViolationKey[];
388+
exempt_policy_violation_keys?: google.ads.googleads.v23.common.IPolicyViolationKey[];
389389
}
390390
>[] = [
391391
{
@@ -671,9 +671,9 @@ const customer = client.Customer(
671671

672672
## Error handling
673673

674-
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).
674+
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).
675675

676-
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).
676+
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).
677677

678678
```ts
679679
import { errors } from "google-ads-api";

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "google-ads-api",
3-
"version": "22.0.0",
3+
"version": "23.0.0",
44
"description": "Google Ads API Client Library for Node.js",
55
"repository": "https://github.com/Opteo/google-ads-api",
66
"main": "build/src/index.js",
@@ -21,7 +21,7 @@
2121
"@isaacs/ttlcache": "^1.2.2",
2222
"axios": "^1.6.7",
2323
"circ-json": "^1.0.4",
24-
"google-ads-node": "19.0.0",
24+
"google-ads-node": "23.0.0",
2525
"google-auth-library": "^9.15.1",
2626
"google-gax": "^5.0.6",
2727
"long": "^4.0.0",

src/protos/autogen/enums.ts

Lines changed: 498 additions & 363 deletions
Large diffs are not rendered by default.

src/protos/autogen/fields.ts

Lines changed: 1125 additions & 410 deletions
Large diffs are not rendered by default.

src/protos/autogen/resourceNames.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,22 @@ export function androidPrivacySharedKeyGoogleNetworkType(
540540
return `customers/${customerId}/androidPrivacySharedKeyGoogleNetworkTypes/${campaignId}~${androidPrivacyInteractionType}~${androidPrivacyNetworkType}~${androidPrivacyInteractionDate}` as const;
541541
}
542542

543+
/* AppliedIncentive */
544+
export type AppliedIncentiveResourceName =
545+
`customers/${StrNum}/appliedIncentives/${StrNum}`;
546+
/**
547+
* @param {string | number} customerId
548+
* @param {string | number} couponCode
549+
* @returns `AppliedIncentiveResourceName`
550+
* @example const appliedIncentive: ResourceNames.AppliedIncentiveResourceName = ResourceNames.appliedIncentive(10987417, 21974834)
551+
*/
552+
export function appliedIncentive(
553+
customerId: string | number,
554+
couponCode: string | number
555+
): AppliedIncentiveResourceName {
556+
return `customers/${customerId}/appliedIncentives/${couponCode}` as const;
557+
}
558+
543559
/* Asset */
544560
export type AssetResourceName = `customers/${StrNum}/assets/${StrNum}`;
545561
/**
@@ -2450,6 +2466,22 @@ export function managedPlacementView(
24502466
return `customers/${customerId}/managedPlacementViews/${adGroupId}~${criterionId}` as const;
24512467
}
24522468

2469+
/* MatchedLocationInterestView */
2470+
export type MatchedLocationInterestViewResourceName =
2471+
`customers/${StrNum}/matchedLocationInterestViews/${StrNum}`;
2472+
/**
2473+
* @param {string | number} customerId
2474+
* @param {string | number} countryCriterionId
2475+
* @returns `MatchedLocationInterestViewResourceName`
2476+
* @example const matchedLocationInterestView: ResourceNames.MatchedLocationInterestViewResourceName = ResourceNames.matchedLocationInterestView(10987417, 21974834)
2477+
*/
2478+
export function matchedLocationInterestView(
2479+
customerId: string | number,
2480+
countryCriterionId: string | number
2481+
): MatchedLocationInterestViewResourceName {
2482+
return `customers/${customerId}/matchedLocationInterestViews/${countryCriterionId}` as const;
2483+
}
2484+
24532485
/* MediaFile */
24542486
export type MediaFileResourceName = `customers/${StrNum}/mediaFiles/${StrNum}`;
24552487
/**

0 commit comments

Comments
 (0)