Skip to content

Commit

Permalink
Merge pull request #487 from Opteo/v16
Browse files Browse the repository at this point in the history
Update to google ads API v16
  • Loading branch information
avermeil committed Mar 1, 2024
2 parents b49f93b + 81c4d50 commit 46d3b22
Show file tree
Hide file tree
Showing 9 changed files with 4,981 additions and 1,661 deletions.
4 changes: 2 additions & 2 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-v14.1.0-009688.svg?style=flat-square">
<img src="https://img.shields.io/badge/google%20ads-v16.1.0-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 @@ -384,7 +384,7 @@ const adGroupResourceName = 'customers/123/adGroups/456'
const keyword = '24 hour locksmith harlem'

const operations: MutateOperation<
resources.IAdGroupCriterion & { exempt_policy_violation_keys?: google.ads.googleads.v14.common.IPolicyViolationKey[]}
resources.IAdGroupCriterion & { exempt_policy_violation_keys?: google.ads.googleads.v16.common.IPolicyViolationKey[]}
>[] = [
{
entity: 'ad_group_criterion',
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "google-ads-api",
"version": "14.2.0",
"version": "16.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 @@ -18,9 +18,9 @@
"license": "MIT",
"dependencies": {
"@isaacs/ttlcache": "^1.2.2",
"google-ads-node": "^12.0.2",
"google-ads-node": "^13.0.0",
"google-auth-library": "^7.1.0",
"google-gax": "^4.0.3",
"google-gax": "^4.3.1",
"long": "^4.0.0"
},
"devDependencies": {
Expand Down
1,217 changes: 858 additions & 359 deletions src/protos/autogen/enums.ts

Large diffs are not rendered by default.

2,641 changes: 2,293 additions & 348 deletions src/protos/autogen/fields.ts

Large diffs are not rendered by default.

264 changes: 236 additions & 28 deletions src/protos/autogen/resourceNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,72 @@ export function ageRangeView(
return `customers/${customerId}/ageRangeViews/${adGroupId}~${criterionId}` as const;
}

/* AndroidPrivacySharedKeyGoogleAdGroup */
export type AndroidPrivacySharedKeyGoogleAdGroupResourceName =
`customers/${StrNum}/androidPrivacySharedKeyGoogleAdGroups/${StrNum}~${StrNum}~${StrNum}~${StrNum}~${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} campaignId
* @param {string | number} adGroupId
* @param {string | number} androidPrivacyInteractionType
* @param {string | number} androidPrivacyNetworkType
* @param {string | number} androidPrivacyInteractionDate
* @returns `AndroidPrivacySharedKeyGoogleAdGroupResourceName`
* @example const androidPrivacySharedKeyGoogleAdGroup: ResourceNames.AndroidPrivacySharedKeyGoogleAdGroupResourceName = ResourceNames.androidPrivacySharedKeyGoogleAdGroup(10987417, 21974834, 43949668, 87899336, 175798672, 351597344)
*/
export function androidPrivacySharedKeyGoogleAdGroup(
customerId: string | number,
campaignId: string | number,
adGroupId: string | number,
androidPrivacyInteractionType: string | number,
androidPrivacyNetworkType: string | number,
androidPrivacyInteractionDate: string | number
): AndroidPrivacySharedKeyGoogleAdGroupResourceName {
return `customers/${customerId}/androidPrivacySharedKeyGoogleAdGroups/${campaignId}~${adGroupId}~${androidPrivacyInteractionType}~${androidPrivacyNetworkType}~${androidPrivacyInteractionDate}` as const;
}

/* AndroidPrivacySharedKeyGoogleCampaign */
export type AndroidPrivacySharedKeyGoogleCampaignResourceName =
`customers/${StrNum}/androidPrivacySharedKeyGoogleCampaigns/${StrNum}~${StrNum}~${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} campaignId
* @param {string | number} androidPrivacyInteractionType
* @param {string | number} androidPrivacyInteractionDate
* @returns `AndroidPrivacySharedKeyGoogleCampaignResourceName`
* @example const androidPrivacySharedKeyGoogleCampaign: ResourceNames.AndroidPrivacySharedKeyGoogleCampaignResourceName = ResourceNames.androidPrivacySharedKeyGoogleCampaign(10987417, 21974834, 43949668, 87899336)
*/
export function androidPrivacySharedKeyGoogleCampaign(
customerId: string | number,
campaignId: string | number,
androidPrivacyInteractionType: string | number,
androidPrivacyInteractionDate: string | number
): AndroidPrivacySharedKeyGoogleCampaignResourceName {
return `customers/${customerId}/androidPrivacySharedKeyGoogleCampaigns/${campaignId}~${androidPrivacyInteractionType}~${androidPrivacyInteractionDate}` as const;
}

/* AndroidPrivacySharedKeyGoogleNetworkType */
export type AndroidPrivacySharedKeyGoogleNetworkTypeResourceName =
`customers/${StrNum}/androidPrivacySharedKeyGoogleNetworkTypes/${StrNum}~${StrNum}~${StrNum}~${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} campaignId
* @param {string | number} androidPrivacyInteractionType
* @param {string | number} androidPrivacyNetworkType
* @param {string | number} androidPrivacyInteractionDate
* @returns `AndroidPrivacySharedKeyGoogleNetworkTypeResourceName`
* @example const androidPrivacySharedKeyGoogleNetworkType: ResourceNames.AndroidPrivacySharedKeyGoogleNetworkTypeResourceName = ResourceNames.androidPrivacySharedKeyGoogleNetworkType(10987417, 21974834, 43949668, 87899336, 175798672)
*/
export function androidPrivacySharedKeyGoogleNetworkType(
customerId: string | number,
campaignId: string | number,
androidPrivacyInteractionType: string | number,
androidPrivacyNetworkType: string | number,
androidPrivacyInteractionDate: string | number
): AndroidPrivacySharedKeyGoogleNetworkTypeResourceName {
return `customers/${customerId}/androidPrivacySharedKeyGoogleNetworkTypes/${campaignId}~${androidPrivacyInteractionType}~${androidPrivacyNetworkType}~${androidPrivacyInteractionDate}` as const;
}

/* Asset */
export type AssetResourceName = `customers/${StrNum}/assets/${StrNum}`;
/**
Expand Down Expand Up @@ -609,6 +675,24 @@ export function assetGroupSignal(
return `customers/${customerId}/assetGroupSignals/${assetGroupId}~${criterionId}` as const;
}

/* AssetGroupTopCombinationView */
export type AssetGroupTopCombinationViewResourceName =
`customers/${StrNum}/assetGroupTopCombinationViews/${StrNum}~${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} assetGroupId
* @param {string | number} assetCombinationCategory
* @returns `AssetGroupTopCombinationViewResourceName`
* @example const assetGroupTopCombinationView: ResourceNames.AssetGroupTopCombinationViewResourceName = ResourceNames.assetGroupTopCombinationView(10987417, 21974834, 43949668)
*/
export function assetGroupTopCombinationView(
customerId: string | number,
assetGroupId: string | number,
assetCombinationCategory: string | number
): AssetGroupTopCombinationViewResourceName {
return `customers/${customerId}/assetGroupTopCombinationViews/${assetGroupId}~${assetCombinationCategory}` as const;
}

/* AssetSet */
export type AssetSetResourceName = `customers/${StrNum}/assetSets/${StrNum}`;
/**
Expand Down Expand Up @@ -1040,6 +1124,22 @@ export function campaignLabel(
return `customers/${customerId}/campaignLabels/${campaignId}~${labelId}` as const;
}

/* CampaignLifecycleGoal */
export type CampaignLifecycleGoalResourceName =
`customers/${StrNum}/campaignLifecycleGoals/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} campaignId
* @returns `CampaignLifecycleGoalResourceName`
* @example const campaignLifecycleGoal: ResourceNames.CampaignLifecycleGoalResourceName = ResourceNames.campaignLifecycleGoal(10987417, 21974834)
*/
export function campaignLifecycleGoal(
customerId: string | number,
campaignId: string | number
): CampaignLifecycleGoalResourceName {
return `customers/${customerId}/campaignLifecycleGoals/${campaignId}` as const;
}

/* CampaignSearchTermInsight */
export type CampaignSearchTermInsightResourceName =
`customers/${StrNum}/campaignSearchTermInsights/${StrNum}~${StrNum}`;
Expand Down Expand Up @@ -1485,6 +1585,20 @@ export function customerLabel(
return `customers/${customerId}/customerLabels/${labelId}` as const;
}

/* CustomerLifecycleGoal */
export type CustomerLifecycleGoalResourceName =
`customers/${StrNum}/customerLifecycleGoals`;
/**
* @param {string | number} customerId
* @returns `CustomerLifecycleGoalResourceName`
* @example const customerLifecycleGoal: ResourceNames.CustomerLifecycleGoalResourceName = ResourceNames.customerLifecycleGoal(10987417)
*/
export function customerLifecycleGoal(
customerId: string | number
): CustomerLifecycleGoalResourceName {
return `customers/${customerId}/customerLifecycleGoals` as const;
}

/* CustomerManagerLink */
export type CustomerManagerLinkResourceName =
`customers/${StrNum}/customerManagerLinks/${StrNum}~${StrNum}`;
Expand Down Expand Up @@ -2256,6 +2370,70 @@ export function lifeEvent(
return `customers/${customerId}/lifeEvents/${lifeEventId}` as const;
}

/* LocalServicesEmployee */
export type LocalServicesEmployeeResourceName =
`customers/${StrNum}/localServicesEmployees/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} glsEmployeeId
* @returns `LocalServicesEmployeeResourceName`
* @example const localServicesEmployee: ResourceNames.LocalServicesEmployeeResourceName = ResourceNames.localServicesEmployee(10987417, 21974834)
*/
export function localServicesEmployee(
customerId: string | number,
glsEmployeeId: string | number
): LocalServicesEmployeeResourceName {
return `customers/${customerId}/localServicesEmployees/${glsEmployeeId}` as const;
}

/* LocalServicesLead */
export type LocalServicesLeadResourceName =
`customers/${StrNum}/localServicesLeads/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} localServicesLeadId
* @returns `LocalServicesLeadResourceName`
* @example const localServicesLead: ResourceNames.LocalServicesLeadResourceName = ResourceNames.localServicesLead(10987417, 21974834)
*/
export function localServicesLead(
customerId: string | number,
localServicesLeadId: string | number
): LocalServicesLeadResourceName {
return `customers/${customerId}/localServicesLeads/${localServicesLeadId}` as const;
}

/* LocalServicesLeadConversation */
export type LocalServicesLeadConversationResourceName =
`customers/${StrNum}/localServicesLeadConversations/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} localServicesLeadConversationId
* @returns `LocalServicesLeadConversationResourceName`
* @example const localServicesLeadConversation: ResourceNames.LocalServicesLeadConversationResourceName = ResourceNames.localServicesLeadConversation(10987417, 21974834)
*/
export function localServicesLeadConversation(
customerId: string | number,
localServicesLeadConversationId: string | number
): LocalServicesLeadConversationResourceName {
return `customers/${customerId}/localServicesLeadConversations/${localServicesLeadConversationId}` as const;
}

/* LocalServicesVerificationArtifact */
export type LocalServicesVerificationArtifactResourceName =
`customers/${StrNum}/localServicesVerificationArtifacts/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} glsVerificationArtifactId
* @returns `LocalServicesVerificationArtifactResourceName`
* @example const localServicesVerificationArtifact: ResourceNames.LocalServicesVerificationArtifactResourceName = ResourceNames.localServicesVerificationArtifact(10987417, 21974834)
*/
export function localServicesVerificationArtifact(
customerId: string | number,
glsVerificationArtifactId: string | number
): LocalServicesVerificationArtifactResourceName {
return `customers/${customerId}/localServicesVerificationArtifacts/${glsVerificationArtifactId}` as const;
}

/* LocationView */
export type LocationViewResourceName =
`customers/${StrNum}/locationViews/${StrNum}~${StrNum}`;
Expand Down Expand Up @@ -2307,22 +2485,6 @@ export function mediaFile(
return `customers/${customerId}/mediaFiles/${mediaFileId}` as const;
}

/* MerchantCenterLink */
export type MerchantCenterLinkResourceName =
`customers/${StrNum}/merchantCenterLinks/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} merchantCenterId
* @returns `MerchantCenterLinkResourceName`
* @example const merchantCenterLink: ResourceNames.MerchantCenterLinkResourceName = ResourceNames.merchantCenterLink(10987417, 21974834)
*/
export function merchantCenterLink(
customerId: string | number,
merchantCenterId: string | number
): MerchantCenterLinkResourceName {
return `customers/${customerId}/merchantCenterLinks/${merchantCenterId}` as const;
}

/* MobileAppCategoryConstant */
export type MobileAppCategoryConstantResourceName =
`mobileAppCategoryConstants/${StrNum}`;
Expand Down Expand Up @@ -2351,6 +2513,22 @@ export function mobileDeviceConstant(
return `mobileDeviceConstants/${criterionId}` as const;
}

/* OfflineConversionUploadClientSummary */
export type OfflineConversionUploadClientSummaryResourceName =
`customers/${StrNum}/offlineConversionUploadClientSummaries/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} client
* @returns `OfflineConversionUploadClientSummaryResourceName`
* @example const offlineConversionUploadClientSummary: ResourceNames.OfflineConversionUploadClientSummaryResourceName = ResourceNames.offlineConversionUploadClientSummary(10987417, 21974834)
*/
export function offlineConversionUploadClientSummary(
customerId: string | number,
client: string | number
): OfflineConversionUploadClientSummaryResourceName {
return `customers/${customerId}/offlineConversionUploadClientSummaries/${client}` as const;
}

/* OfflineUserDataJob */
export type OfflineUserDataJobResourceName =
`customers/${StrNum}/offlineUserDataJobs/${StrNum}`;
Expand Down Expand Up @@ -2451,22 +2629,20 @@ export function perStoreView(
return `customers/${customerId}/perStoreViews/${placeId}` as const;
}

/* ProductBiddingCategoryConstant */
export type ProductBiddingCategoryConstantResourceName =
`productBiddingCategoryConstants/${StrNum}~${StrNum}~${StrNum}`;
/* ProductCategoryConstant */
export type ProductCategoryConstantResourceName =
`productCategoryConstants/${StrNum}~${StrNum}`;
/**
* @param {string | number} countryCode
* @param {string | number} level
* @param {string | number} id
* @returns `ProductBiddingCategoryConstantResourceName`
* @example const productBiddingCategoryConstant: ResourceNames.ProductBiddingCategoryConstantResourceName = ResourceNames.productBiddingCategoryConstant(10987417, 21974834, 43949668)
* @param {string | number} categoryId
* @returns `ProductCategoryConstantResourceName`
* @example const productCategoryConstant: ResourceNames.ProductCategoryConstantResourceName = ResourceNames.productCategoryConstant(10987417, 21974834)
*/
export function productBiddingCategoryConstant(
countryCode: string | number,
export function productCategoryConstant(
level: string | number,
id: string | number
): ProductBiddingCategoryConstantResourceName {
return `productBiddingCategoryConstants/${countryCode}~${level}~${id}` as const;
categoryId: string | number
): ProductCategoryConstantResourceName {
return `productCategoryConstants/${level}~${categoryId}` as const;
}

/* ProductGroupView */
Expand Down Expand Up @@ -2503,6 +2679,22 @@ export function productLink(
return `customers/${customerId}/productLinks/${productLinkId}` as const;
}

/* ProductLinkInvitation */
export type ProductLinkInvitationResourceName =
`customers/${StrNum}/productLinkInvitations/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} customerInvitationId
* @returns `ProductLinkInvitationResourceName`
* @example const productLinkInvitation: ResourceNames.ProductLinkInvitationResourceName = ResourceNames.productLinkInvitation(10987417, 21974834)
*/
export function productLinkInvitation(
customerId: string | number,
customerInvitationId: string | number
): ProductLinkInvitationResourceName {
return `customers/${customerId}/productLinkInvitations/${customerInvitationId}` as const;
}

/* QualifyingQuestion */
export type QualifyingQuestionResourceName = `qualifyingQuestions/${StrNum}`;
/**
Expand Down Expand Up @@ -2532,6 +2724,22 @@ export function recommendation(
return `customers/${customerId}/recommendations/${recommendationId}` as const;
}

/* RecommendationSubscription */
export type RecommendationSubscriptionResourceName =
`customers/${StrNum}/recommendationSubscriptions/${StrNum}`;
/**
* @param {string | number} customerId
* @param {string | number} recommendationType
* @returns `RecommendationSubscriptionResourceName`
* @example const recommendationSubscription: ResourceNames.RecommendationSubscriptionResourceName = ResourceNames.recommendationSubscription(10987417, 21974834)
*/
export function recommendationSubscription(
customerId: string | number,
recommendationType: string | number
): RecommendationSubscriptionResourceName {
return `customers/${customerId}/recommendationSubscriptions/${recommendationType}` as const;
}

/* RemarketingAction */
export type RemarketingActionResourceName =
`customers/${StrNum}/remarketingActions/${StrNum}`;
Expand Down
Loading

0 comments on commit 46d3b22

Please sign in to comment.