Skip to content

Commit 75f2d64

Browse files
Merge pull request #131 from Opteo/V21
V18 of Google Ads Node for V21 of Google Ads API
2 parents 9fef630 + d9139a7 commit 75f2d64

1,412 files changed

Lines changed: 273875 additions & 195943 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Google Ads API version
22
# This only needs changing for major versions e.g. v8 -> v9
3-
GOOGLE_ADS_VERSION=v20
3+
GOOGLE_ADS_VERSION=v21
44

55
BUNDLE=googleads-nodejs.tar.gz
66
PACKAGE_BUILD=/package/googleads-nodejs

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
<p align="center">
1212
<a href="https://developers.google.com/google-ads/api/docs/release-notes">
13-
<img src="https://img.shields.io/badge/google%20ads-v20-009688.svg?style=flat-square">
13+
<img src="https://img.shields.io/badge/google%20ads-v21-009688.svg?style=flat-square">
1414
</a>
1515
<a href="https://www.npmjs.com/package/google-ads-node">
1616
<img src="https://img.shields.io/npm/v/google-ads-node.svg?style=flat-square">

init.sh

100644100755
Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
11
#!/bin/bash
22

3+
set -e
4+
35
# install dependencies + compile proto files in sub package
46
cd package/googleads-nodejs
5-
npm install
7+
npm install
8+
9+
# get current version from Makefile and remove any old version folders
10+
CURRENT_VERSION=$(awk -F'=' '/^GOOGLE_ADS_VERSION=/ {print $2}' ../../Makefile | tr -d '[:space:]')
11+
12+
if [ -z "$CURRENT_VERSION" ]; then
13+
echo "Error: Could not determine current version from Makefile." >&2
14+
exit 1
15+
fi
16+
17+
CURRENT_VERSION_NUM=$(echo "$CURRENT_VERSION" | tr -d 'v')
18+
PREVIOUS_VERSION_NUM=$((CURRENT_VERSION_NUM - 1))
19+
PREVIOUS_VERSION="v${PREVIOUS_VERSION_NUM}"
20+
21+
echo "Searching for old version directories to remove ($PREVIOUS_VERSION)..."
22+
DIRECTORIES_TO_DELETE=$(find . -type d -name "${PREVIOUS_VERSION}")
23+
24+
if [ -z "$DIRECTORIES_TO_DELETE" ]; then
25+
echo "No old version directories found."
26+
else
27+
echo "Found and deleting the following directories:"
28+
echo "$DIRECTORIES_TO_DELETE"
29+
echo "$DIRECTORIES_TO_DELETE" | xargs rm -rf
30+
fi
631

732
# remove large auto-generated tests we don't need
8-
rm -rf build/test build/system-test
33+
rm -rf build/test build/system-test
934

1035
# copy the build up to the main package directory
1136
cp -r build ../../

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-node",
3-
"version": "17.0.1",
3+
"version": "18.0.0",
44
"description": "Google Ads API client library",
55
"main": "build/src/index.js",
66
"files": [
@@ -15,7 +15,7 @@
1515
"prepare": "sh ./init.sh"
1616
},
1717
"dependencies": {
18-
"google-gax": "^5.1.1-rc.1",
18+
"google-gax": "^5.0.1",
1919
"lru-cache": "^10.2.0"
2020
},
2121
"devDependencies": {

package/googleads-nodejs/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"asset set service",
4646
"audience insights service",
4747
"audience service",
48+
"automatically created asset removal service",
4849
"batch job service",
4950
"bidding data exclusion service",
5051
"bidding seasonality adjustment service",
@@ -138,7 +139,7 @@
138139
},
139140
"devDependencies": {
140141
"@types/mocha": "^10.0.10",
141-
"@types/node": "^22.14.1",
142+
"@types/node": "^22.15.31",
142143
"@types/sinon": "^17.0.4",
143144
"c8": "^10.1.3",
144145
"gapic-tools": "^1.0.2",
@@ -155,6 +156,6 @@
155156
"node": ">=v18"
156157
},
157158
"dependencies": {
158-
"google-gax": "^5.1.1-rc.1"
159+
"google-gax": "^5.0.1"
159160
}
160161
}

package/googleads-nodejs/protos/google/ads/googleads/v20/common/ad_asset.proto renamed to package/googleads-nodejs/protos/google/ads/googleads/v21/common/ad_asset.proto

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414

1515
syntax = "proto3";
1616

17-
package google.ads.googleads.v20.common;
17+
package google.ads.googleads.v21.common;
1818

19-
import "google/ads/googleads/v20/common/asset_policy.proto";
20-
import "google/ads/googleads/v20/enums/asset_performance_label.proto";
21-
import "google/ads/googleads/v20/enums/served_asset_field_type.proto";
19+
import "google/ads/googleads/v21/common/asset_policy.proto";
20+
import "google/ads/googleads/v21/enums/asset_performance_label.proto";
21+
import "google/ads/googleads/v21/enums/served_asset_field_type.proto";
2222

23-
option csharp_namespace = "Google.Ads.GoogleAds.V20.Common";
24-
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v20/common;common";
23+
option csharp_namespace = "Google.Ads.GoogleAds.V21.Common";
24+
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v21/common;common";
2525
option java_multiple_files = true;
2626
option java_outer_classname = "AdAssetProto";
27-
option java_package = "com.google.ads.googleads.v20.common";
27+
option java_package = "com.google.ads.googleads.v21.common";
2828
option objc_class_prefix = "GAA";
29-
option php_namespace = "Google\\Ads\\GoogleAds\\V20\\Common";
30-
option ruby_package = "Google::Ads::GoogleAds::V20::Common";
29+
option php_namespace = "Google\\Ads\\GoogleAds\\V21\\Common";
30+
option ruby_package = "Google::Ads::GoogleAds::V21::Common";
3131

3232
// Proto file describing assets used inside an ad.
3333

@@ -40,11 +40,11 @@ message AdTextAsset {
4040
// within this field. Multiple assets can be pinned to the same field. An
4141
// asset that is unpinned or pinned to a different field will not serve in a
4242
// field where some other asset has been pinned.
43-
google.ads.googleads.v20.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType
43+
google.ads.googleads.v21.enums.ServedAssetFieldTypeEnum.ServedAssetFieldType
4444
pinned_field = 2;
4545

4646
// The performance label of this text asset.
47-
google.ads.googleads.v20.enums.AssetPerformanceLabelEnum.AssetPerformanceLabel
47+
google.ads.googleads.v21.enums.AssetPerformanceLabelEnum.AssetPerformanceLabel
4848
asset_performance_label = 5;
4949

5050
// The policy summary of this text asset.

package/googleads-nodejs/protos/google/ads/googleads/v20/common/ad_type_infos.proto renamed to package/googleads-nodejs/protos/google/ads/googleads/v21/common/ad_type_infos.proto

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,25 @@
1414

1515
syntax = "proto3";
1616

17-
package google.ads.googleads.v20.common;
18-
19-
import "google/ads/googleads/v20/common/ad_asset.proto";
20-
import "google/ads/googleads/v20/enums/call_conversion_reporting_state.proto";
21-
import "google/ads/googleads/v20/enums/display_ad_format_setting.proto";
22-
import "google/ads/googleads/v20/enums/display_upload_product_type.proto";
23-
import "google/ads/googleads/v20/enums/legacy_app_install_ad_app_store.proto";
24-
import "google/ads/googleads/v20/enums/mime_type.proto";
25-
import "google/ads/googleads/v20/enums/video_thumbnail.proto";
17+
package google.ads.googleads.v21.common;
18+
19+
import "google/ads/googleads/v21/common/ad_asset.proto";
20+
import "google/ads/googleads/v21/enums/call_conversion_reporting_state.proto";
21+
import "google/ads/googleads/v21/enums/display_ad_format_setting.proto";
22+
import "google/ads/googleads/v21/enums/display_upload_product_type.proto";
23+
import "google/ads/googleads/v21/enums/legacy_app_install_ad_app_store.proto";
24+
import "google/ads/googleads/v21/enums/mime_type.proto";
25+
import "google/ads/googleads/v21/enums/video_thumbnail.proto";
2626
import "google/api/field_behavior.proto";
2727

28-
option csharp_namespace = "Google.Ads.GoogleAds.V20.Common";
29-
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v20/common;common";
28+
option csharp_namespace = "Google.Ads.GoogleAds.V21.Common";
29+
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v21/common;common";
3030
option java_multiple_files = true;
3131
option java_outer_classname = "AdTypeInfosProto";
32-
option java_package = "com.google.ads.googleads.v20.common";
32+
option java_package = "com.google.ads.googleads.v21.common";
3333
option objc_class_prefix = "GAA";
34-
option php_namespace = "Google\\Ads\\GoogleAds\\V20\\Common";
35-
option ruby_package = "Google::Ads::GoogleAds::V20::Common";
34+
option php_namespace = "Google\\Ads\\GoogleAds\\V21\\Common";
35+
option ruby_package = "Google::Ads::GoogleAds::V21::Common";
3636

3737
// Proto file containing info messages for specific ad types.
3838

@@ -121,7 +121,7 @@ message ImageAdInfo {
121121
optional string preview_image_url = 20;
122122

123123
// The mime type of the image.
124-
google.ads.googleads.v20.enums.MimeTypeEnum.MimeType mime_type = 10;
124+
google.ads.googleads.v21.enums.MimeTypeEnum.MimeType mime_type = 10;
125125

126126
// The name of the image. If the image was created from a MediaFile, this is
127127
// the MediaFile's name. If the image was created from bytes, this is empty.
@@ -212,7 +212,7 @@ message InFeedVideoAdInfo {
212212
string description2 = 3;
213213

214214
// Video thumbnail image to use.
215-
google.ads.googleads.v20.enums.VideoThumbnailEnum.VideoThumbnail thumbnail =
215+
google.ads.googleads.v21.enums.VideoThumbnailEnum.VideoThumbnail thumbnail =
216216
4;
217217
}
218218

@@ -355,7 +355,7 @@ message LegacyResponsiveDisplayAdInfo {
355355
optional string square_marketing_image = 27;
356356

357357
// Specifies which format the ad will be served in. Default is ALL_FORMATS.
358-
google.ads.googleads.v20.enums.DisplayAdFormatSettingEnum
358+
google.ads.googleads.v21.enums.DisplayAdFormatSettingEnum
359359
.DisplayAdFormatSetting format_setting = 13;
360360

361361
// Prefix before price. For example, 'as low as'.
@@ -439,7 +439,7 @@ message LegacyAppInstallAdInfo {
439439
optional string app_id = 6;
440440

441441
// The app store the mobile app is available in.
442-
google.ads.googleads.v20.enums.LegacyAppInstallAdAppStoreEnum
442+
google.ads.googleads.v21.enums.LegacyAppInstallAdAppStoreEnum
443443
.LegacyAppInstallAdAppStore app_store = 2;
444444

445445
// The headline of the ad.
@@ -521,7 +521,7 @@ message ResponsiveDisplayAdInfo {
521521
optional string promo_text = 23;
522522

523523
// Specifies which format the ad will be served in. Default is ALL_FORMATS.
524-
google.ads.googleads.v20.enums.DisplayAdFormatSettingEnum
524+
google.ads.googleads.v21.enums.DisplayAdFormatSettingEnum
525525
.DisplayAdFormatSetting format_setting = 16;
526526

527527
// Specification for various creative controls.
@@ -572,7 +572,7 @@ message LocalAdInfo {
572572
// need to be included with the ad.
573573
message DisplayUploadAdInfo {
574574
// The product type of this ad. See comments on the enum for details.
575-
google.ads.googleads.v20.enums.DisplayUploadProductTypeEnum
575+
google.ads.googleads.v21.enums.DisplayUploadProductTypeEnum
576576
.DisplayUploadProductType display_upload_product_type = 1;
577577

578578
// The asset data that makes up the ad.
@@ -651,7 +651,7 @@ message CallAdInfo {
651651

652652
// The call conversion behavior of this call ad. It can use its own call
653653
// conversion setting, inherit the account level setting, or be disabled.
654-
google.ads.googleads.v20.enums.CallConversionReportingStateEnum
654+
google.ads.googleads.v21.enums.CallConversionReportingStateEnum
655655
.CallConversionReportingState conversion_reporting_state = 10;
656656

657657
// First part of text that can be appended to the URL in the ad. Optional.

package/googleads-nodejs/protos/google/ads/googleads/v20/common/additional_application_info.proto renamed to package/googleads-nodejs/protos/google/ads/googleads/v21/common/additional_application_info.proto

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414

1515
syntax = "proto3";
1616

17-
package google.ads.googleads.v20.common;
17+
package google.ads.googleads.v21.common;
1818

19-
import "google/ads/googleads/v20/enums/application_instance.proto";
19+
import "google/ads/googleads/v21/enums/application_instance.proto";
2020

21-
option csharp_namespace = "Google.Ads.GoogleAds.V20.Common";
22-
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v20/common;common";
21+
option csharp_namespace = "Google.Ads.GoogleAds.V21.Common";
22+
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v21/common;common";
2323
option java_multiple_files = true;
2424
option java_outer_classname = "AdditionalApplicationInfoProto";
25-
option java_package = "com.google.ads.googleads.v20.common";
25+
option java_package = "com.google.ads.googleads.v21.common";
2626
option objc_class_prefix = "GAA";
27-
option php_namespace = "Google\\Ads\\GoogleAds\\V20\\Common";
28-
option ruby_package = "Google::Ads::GoogleAds::V20::Common";
27+
option php_namespace = "Google\\Ads\\GoogleAds\\V21\\Common";
28+
option ruby_package = "Google::Ads::GoogleAds::V21::Common";
2929

3030
// Proto file describing common application info proto messages.
3131

@@ -39,6 +39,6 @@ message AdditionalApplicationInfo {
3939
string application_id = 1;
4040

4141
// The instance type of the application sending the request.
42-
google.ads.googleads.v20.enums.ApplicationInstanceEnum.ApplicationInstance
42+
google.ads.googleads.v21.enums.ApplicationInstanceEnum.ApplicationInstance
4343
application_instance = 2;
4444
}

package/googleads-nodejs/protos/google/ads/googleads/v20/common/asset_policy.proto renamed to package/googleads-nodejs/protos/google/ads/googleads/v21/common/asset_policy.proto

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414

1515
syntax = "proto3";
1616

17-
package google.ads.googleads.v20.common;
17+
package google.ads.googleads.v21.common;
1818

19-
import "google/ads/googleads/v20/common/policy.proto";
20-
import "google/ads/googleads/v20/enums/asset_link_primary_status.proto";
21-
import "google/ads/googleads/v20/enums/asset_link_primary_status_reason.proto";
22-
import "google/ads/googleads/v20/enums/asset_offline_evaluation_error_reasons.proto";
23-
import "google/ads/googleads/v20/enums/policy_approval_status.proto";
24-
import "google/ads/googleads/v20/enums/policy_review_status.proto";
19+
import "google/ads/googleads/v21/common/policy.proto";
20+
import "google/ads/googleads/v21/enums/asset_link_primary_status.proto";
21+
import "google/ads/googleads/v21/enums/asset_link_primary_status_reason.proto";
22+
import "google/ads/googleads/v21/enums/asset_offline_evaluation_error_reasons.proto";
23+
import "google/ads/googleads/v21/enums/policy_approval_status.proto";
24+
import "google/ads/googleads/v21/enums/policy_review_status.proto";
2525

26-
option csharp_namespace = "Google.Ads.GoogleAds.V20.Common";
27-
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v20/common;common";
26+
option csharp_namespace = "Google.Ads.GoogleAds.V21.Common";
27+
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v21/common;common";
2828
option java_multiple_files = true;
2929
option java_outer_classname = "AssetPolicyProto";
30-
option java_package = "com.google.ads.googleads.v20.common";
30+
option java_package = "com.google.ads.googleads.v21.common";
3131
option objc_class_prefix = "GAA";
32-
option php_namespace = "Google\\Ads\\GoogleAds\\V20\\Common";
33-
option ruby_package = "Google::Ads::GoogleAds::V20::Common";
32+
option php_namespace = "Google\\Ads\\GoogleAds\\V21\\Common";
33+
option ruby_package = "Google::Ads::GoogleAds::V21::Common";
3434

3535
// Proto file describing asset policies.
3636

@@ -40,12 +40,12 @@ message AdAssetPolicySummary {
4040
repeated PolicyTopicEntry policy_topic_entries = 1;
4141

4242
// Where in the review process this asset.
43-
google.ads.googleads.v20.enums.PolicyReviewStatusEnum.PolicyReviewStatus
43+
google.ads.googleads.v21.enums.PolicyReviewStatusEnum.PolicyReviewStatus
4444
review_status = 2;
4545

4646
// The overall approval status of this asset, which is calculated based on
4747
// the status of its individual policy topic entries.
48-
google.ads.googleads.v20.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus
48+
google.ads.googleads.v21.enums.PolicyApprovalStatusEnum.PolicyApprovalStatus
4949
approval_status = 3;
5050
}
5151

@@ -58,11 +58,11 @@ message AdAssetPolicySummary {
5858
// evaluation errors which led to the asset being disapproved.
5959
message AssetLinkPrimaryStatusDetails {
6060
// Provides the reason of this PrimaryStatus.
61-
optional google.ads.googleads.v20.enums.AssetLinkPrimaryStatusReasonEnum
61+
optional google.ads.googleads.v21.enums.AssetLinkPrimaryStatusReasonEnum
6262
.AssetLinkPrimaryStatusReason reason = 1;
6363

6464
// Provides the PrimaryStatus of this status detail.
65-
optional google.ads.googleads.v20.enums.AssetLinkPrimaryStatusEnum
65+
optional google.ads.googleads.v21.enums.AssetLinkPrimaryStatusEnum
6666
.AssetLinkPrimaryStatus status = 2;
6767

6868
// Provides the details associated with the asset link primary status.
@@ -75,6 +75,6 @@ message AssetLinkPrimaryStatusDetails {
7575
// Details related to AssetLinkPrimaryStatusReasonPB.ASSET_DISAPPROVED
7676
message AssetDisapproved {
7777
// Provides the quality evaluation disapproval reason of an asset.
78-
repeated google.ads.googleads.v20.enums.AssetOfflineEvaluationErrorReasonsEnum
78+
repeated google.ads.googleads.v21.enums.AssetOfflineEvaluationErrorReasonsEnum
7979
.AssetOfflineEvaluationErrorReasons offline_evaluation_error_reasons = 1;
8080
}

0 commit comments

Comments
 (0)