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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Google Ads API version
# This only needs changing for major versions e.g. v8 -> v9
GOOGLE_ADS_VERSION=v20
GOOGLE_ADS_VERSION=v21

BUNDLE=googleads-nodejs.tar.gz
PACKAGE_BUILD=/package/googleads-nodejs
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<p align="center">
<a href="https://developers.google.com/google-ads/api/docs/release-notes">
<img src="https://img.shields.io/badge/google%20ads-v20-009688.svg?style=flat-square">
<img src="https://img.shields.io/badge/google%20ads-v21-009688.svg?style=flat-square">
</a>
<a href="https://www.npmjs.com/package/google-ads-node">
<img src="https://img.shields.io/npm/v/google-ads-node.svg?style=flat-square">
Expand Down
29 changes: 27 additions & 2 deletions init.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
#!/bin/bash

set -e

# install dependencies + compile proto files in sub package
cd package/googleads-nodejs
npm install
npm install

# get current version from Makefile and remove any old version folders
CURRENT_VERSION=$(awk -F'=' '/^GOOGLE_ADS_VERSION=/ {print $2}' ../../Makefile | tr -d '[:space:]')

if [ -z "$CURRENT_VERSION" ]; then
echo "Error: Could not determine current version from Makefile." >&2
exit 1
fi

CURRENT_VERSION_NUM=$(echo "$CURRENT_VERSION" | tr -d 'v')
PREVIOUS_VERSION_NUM=$((CURRENT_VERSION_NUM - 1))
PREVIOUS_VERSION="v${PREVIOUS_VERSION_NUM}"

echo "Searching for old version directories to remove ($PREVIOUS_VERSION)..."
DIRECTORIES_TO_DELETE=$(find . -type d -name "${PREVIOUS_VERSION}")

if [ -z "$DIRECTORIES_TO_DELETE" ]; then
echo "No old version directories found."
else
echo "Found and deleting the following directories:"
echo "$DIRECTORIES_TO_DELETE"
echo "$DIRECTORIES_TO_DELETE" | xargs rm -rf
fi

# remove large auto-generated tests we don't need
rm -rf build/test build/system-test
rm -rf build/test build/system-test

# copy the build up to the main package directory
cp -r build ../../
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-node",
"version": "17.0.1",
"version": "18.0.0",
"description": "Google Ads API client library",
"main": "build/src/index.js",
"files": [
Expand All @@ -15,7 +15,7 @@
"prepare": "sh ./init.sh"
},
"dependencies": {
"google-gax": "^5.1.1-rc.1",
"google-gax": "^5.0.1",
"lru-cache": "^10.2.0"
},
"devDependencies": {
Expand Down
5 changes: 3 additions & 2 deletions package/googleads-nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"asset set service",
"audience insights service",
"audience service",
"automatically created asset removal service",
"batch job service",
"bidding data exclusion service",
"bidding seasonality adjustment service",
Expand Down Expand Up @@ -138,7 +139,7 @@
},
"devDependencies": {
"@types/mocha": "^10.0.10",
"@types/node": "^22.14.1",
"@types/node": "^22.15.31",
"@types/sinon": "^17.0.4",
"c8": "^10.1.3",
"gapic-tools": "^1.0.2",
Expand All @@ -155,6 +156,6 @@
"node": ">=v18"
},
"dependencies": {
"google-gax": "^5.1.1-rc.1"
"google-gax": "^5.0.1"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@

syntax = "proto3";

package google.ads.googleads.v20.common;
package google.ads.googleads.v21.common;

import "google/ads/googleads/v20/common/asset_policy.proto";
import "google/ads/googleads/v20/enums/asset_performance_label.proto";
import "google/ads/googleads/v20/enums/served_asset_field_type.proto";
import "google/ads/googleads/v21/common/asset_policy.proto";
import "google/ads/googleads/v21/enums/asset_performance_label.proto";
import "google/ads/googleads/v21/enums/served_asset_field_type.proto";

option csharp_namespace = "Google.Ads.GoogleAds.V20.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v20/common;common";
option csharp_namespace = "Google.Ads.GoogleAds.V21.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v21/common;common";
option java_multiple_files = true;
option java_outer_classname = "AdAssetProto";
option java_package = "com.google.ads.googleads.v20.common";
option java_package = "com.google.ads.googleads.v21.common";
option objc_class_prefix = "GAA";
option php_namespace = "Google\\Ads\\GoogleAds\\V20\\Common";
option ruby_package = "Google::Ads::GoogleAds::V20::Common";
option php_namespace = "Google\\Ads\\GoogleAds\\V21\\Common";
option ruby_package = "Google::Ads::GoogleAds::V21::Common";

// Proto file describing assets used inside an ad.

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

// The performance label of this text asset.
google.ads.googleads.v20.enums.AssetPerformanceLabelEnum.AssetPerformanceLabel
google.ads.googleads.v21.enums.AssetPerformanceLabelEnum.AssetPerformanceLabel
asset_performance_label = 5;

// The policy summary of this text asset.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@

syntax = "proto3";

package google.ads.googleads.v20.common;

import "google/ads/googleads/v20/common/ad_asset.proto";
import "google/ads/googleads/v20/enums/call_conversion_reporting_state.proto";
import "google/ads/googleads/v20/enums/display_ad_format_setting.proto";
import "google/ads/googleads/v20/enums/display_upload_product_type.proto";
import "google/ads/googleads/v20/enums/legacy_app_install_ad_app_store.proto";
import "google/ads/googleads/v20/enums/mime_type.proto";
import "google/ads/googleads/v20/enums/video_thumbnail.proto";
package google.ads.googleads.v21.common;

import "google/ads/googleads/v21/common/ad_asset.proto";
import "google/ads/googleads/v21/enums/call_conversion_reporting_state.proto";
import "google/ads/googleads/v21/enums/display_ad_format_setting.proto";
import "google/ads/googleads/v21/enums/display_upload_product_type.proto";
import "google/ads/googleads/v21/enums/legacy_app_install_ad_app_store.proto";
import "google/ads/googleads/v21/enums/mime_type.proto";
import "google/ads/googleads/v21/enums/video_thumbnail.proto";
import "google/api/field_behavior.proto";

option csharp_namespace = "Google.Ads.GoogleAds.V20.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v20/common;common";
option csharp_namespace = "Google.Ads.GoogleAds.V21.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v21/common;common";
option java_multiple_files = true;
option java_outer_classname = "AdTypeInfosProto";
option java_package = "com.google.ads.googleads.v20.common";
option java_package = "com.google.ads.googleads.v21.common";
option objc_class_prefix = "GAA";
option php_namespace = "Google\\Ads\\GoogleAds\\V20\\Common";
option ruby_package = "Google::Ads::GoogleAds::V20::Common";
option php_namespace = "Google\\Ads\\GoogleAds\\V21\\Common";
option ruby_package = "Google::Ads::GoogleAds::V21::Common";

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

Expand Down Expand Up @@ -121,7 +121,7 @@ message ImageAdInfo {
optional string preview_image_url = 20;

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

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

// Video thumbnail image to use.
google.ads.googleads.v20.enums.VideoThumbnailEnum.VideoThumbnail thumbnail =
google.ads.googleads.v21.enums.VideoThumbnailEnum.VideoThumbnail thumbnail =
4;
}

Expand Down Expand Up @@ -355,7 +355,7 @@ message LegacyResponsiveDisplayAdInfo {
optional string square_marketing_image = 27;

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

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

// The app store the mobile app is available in.
google.ads.googleads.v20.enums.LegacyAppInstallAdAppStoreEnum
google.ads.googleads.v21.enums.LegacyAppInstallAdAppStoreEnum
.LegacyAppInstallAdAppStore app_store = 2;

// The headline of the ad.
Expand Down Expand Up @@ -521,7 +521,7 @@ message ResponsiveDisplayAdInfo {
optional string promo_text = 23;

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

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

// The asset data that makes up the ad.
Expand Down Expand Up @@ -651,7 +651,7 @@ message CallAdInfo {

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

// First part of text that can be appended to the URL in the ad. Optional.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@

syntax = "proto3";

package google.ads.googleads.v20.common;
package google.ads.googleads.v21.common;

import "google/ads/googleads/v20/enums/application_instance.proto";
import "google/ads/googleads/v21/enums/application_instance.proto";

option csharp_namespace = "Google.Ads.GoogleAds.V20.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v20/common;common";
option csharp_namespace = "Google.Ads.GoogleAds.V21.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v21/common;common";
option java_multiple_files = true;
option java_outer_classname = "AdditionalApplicationInfoProto";
option java_package = "com.google.ads.googleads.v20.common";
option java_package = "com.google.ads.googleads.v21.common";
option objc_class_prefix = "GAA";
option php_namespace = "Google\\Ads\\GoogleAds\\V20\\Common";
option ruby_package = "Google::Ads::GoogleAds::V20::Common";
option php_namespace = "Google\\Ads\\GoogleAds\\V21\\Common";
option ruby_package = "Google::Ads::GoogleAds::V21::Common";

// Proto file describing common application info proto messages.

Expand All @@ -39,6 +39,6 @@ message AdditionalApplicationInfo {
string application_id = 1;

// The instance type of the application sending the request.
google.ads.googleads.v20.enums.ApplicationInstanceEnum.ApplicationInstance
google.ads.googleads.v21.enums.ApplicationInstanceEnum.ApplicationInstance
application_instance = 2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,23 @@

syntax = "proto3";

package google.ads.googleads.v20.common;
package google.ads.googleads.v21.common;

import "google/ads/googleads/v20/common/policy.proto";
import "google/ads/googleads/v20/enums/asset_link_primary_status.proto";
import "google/ads/googleads/v20/enums/asset_link_primary_status_reason.proto";
import "google/ads/googleads/v20/enums/asset_offline_evaluation_error_reasons.proto";
import "google/ads/googleads/v20/enums/policy_approval_status.proto";
import "google/ads/googleads/v20/enums/policy_review_status.proto";
import "google/ads/googleads/v21/common/policy.proto";
import "google/ads/googleads/v21/enums/asset_link_primary_status.proto";
import "google/ads/googleads/v21/enums/asset_link_primary_status_reason.proto";
import "google/ads/googleads/v21/enums/asset_offline_evaluation_error_reasons.proto";
import "google/ads/googleads/v21/enums/policy_approval_status.proto";
import "google/ads/googleads/v21/enums/policy_review_status.proto";

option csharp_namespace = "Google.Ads.GoogleAds.V20.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v20/common;common";
option csharp_namespace = "Google.Ads.GoogleAds.V21.Common";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v21/common;common";
option java_multiple_files = true;
option java_outer_classname = "AssetPolicyProto";
option java_package = "com.google.ads.googleads.v20.common";
option java_package = "com.google.ads.googleads.v21.common";
option objc_class_prefix = "GAA";
option php_namespace = "Google\\Ads\\GoogleAds\\V20\\Common";
option ruby_package = "Google::Ads::GoogleAds::V20::Common";
option php_namespace = "Google\\Ads\\GoogleAds\\V21\\Common";
option ruby_package = "Google::Ads::GoogleAds::V21::Common";

// Proto file describing asset policies.

Expand All @@ -40,12 +40,12 @@ message AdAssetPolicySummary {
repeated PolicyTopicEntry policy_topic_entries = 1;

// Where in the review process this asset.
google.ads.googleads.v20.enums.PolicyReviewStatusEnum.PolicyReviewStatus
google.ads.googleads.v21.enums.PolicyReviewStatusEnum.PolicyReviewStatus
review_status = 2;

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

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

// Provides the PrimaryStatus of this status detail.
optional google.ads.googleads.v20.enums.AssetLinkPrimaryStatusEnum
optional google.ads.googleads.v21.enums.AssetLinkPrimaryStatusEnum
.AssetLinkPrimaryStatus status = 2;

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