From a553da76566c6ac8a77d19c69c81a26effba6907 Mon Sep 17 00:00:00 2001 From: harsh-joshi99 <129737395+harsh-joshi99@users.noreply.github.com> Date: Tue, 3 Sep 2024 16:01:20 +0530 Subject: [PATCH] Upgrade google api version to v17 (#2322) --- .../google-enhanced-conversions/__tests__/functions.test.ts | 2 +- .../src/destinations/google-enhanced-conversions/functions.ts | 2 +- .../uploadCallConversion/generated-types.ts | 4 ++-- .../google-enhanced-conversions/uploadCallConversion/index.ts | 4 ++-- .../uploadCallConversion2/generated-types.ts | 4 ++-- .../uploadCallConversion2/index.ts | 4 ++-- .../uploadClickConversion/generated-types.ts | 4 ++-- .../uploadClickConversion/index.ts | 4 ++-- .../uploadClickConversion2/generated-types.ts | 4 ++-- .../uploadClickConversion2/index.ts | 4 ++-- .../google-enhanced-conversions/userList/generated-types.ts | 4 ++-- .../google-enhanced-conversions/userList/index.ts | 4 ++-- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/__tests__/functions.test.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/__tests__/functions.test.ts index f785bbb313..c21ee5da8e 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/__tests__/functions.test.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/__tests__/functions.test.ts @@ -125,7 +125,7 @@ describe('.getConversionActionId', () => { } } nock(`https://googleads.googleapis.com`) - .post(`/v15/customers/${settings.customerId}/googleAds:searchStream`) + .post(`/v17/customers/${settings.customerId}/googleAds:searchStream`) .reply(401, errorResponse) const payload = {} diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/functions.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/functions.ts index a6a4f2c032..a2b4f5e279 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/functions.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/functions.ts @@ -27,7 +27,7 @@ import { sha256SmartHash } from '@segment/actions-core' import { RefreshTokenResponse } from '.' export const API_VERSION = 'v15' -export const CANARY_API_VERSION = 'v15' +export const CANARY_API_VERSION = 'v17' export const FLAGON_NAME = 'google-enhanced-canary-version' export class GoogleAdsError extends HTTPError { diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.ts index d9093af57f..0d571353b8 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion/generated-types.ts @@ -32,11 +32,11 @@ export interface Payload { [k: string]: unknown } /** - * This represents consent for ad user data. For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad user data. For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_user_data_consent_state?: string /** - * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_personalization_consent_state?: string /** diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion/index.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion/index.ts index 1201705b64..cc6ac1625f 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion/index.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion/index.ts @@ -76,7 +76,7 @@ const action: ActionDefinition = { ad_user_data_consent_state: { label: 'Ad User Data Consent State', description: - 'This represents consent for ad user data. For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad user data. For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', type: 'string', choices: [ { label: 'GRANTED', value: 'GRANTED' }, @@ -88,7 +88,7 @@ const action: ActionDefinition = { label: 'Ad Personalization Consent State', type: 'string', description: - 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', choices: [ { label: 'GRANTED', value: 'GRANTED' }, { label: 'DENIED', value: 'DENIED' }, diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion2/generated-types.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion2/generated-types.ts index d9093af57f..0d571353b8 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion2/generated-types.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion2/generated-types.ts @@ -32,11 +32,11 @@ export interface Payload { [k: string]: unknown } /** - * This represents consent for ad user data. For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad user data. For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_user_data_consent_state?: string /** - * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_personalization_consent_state?: string /** diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion2/index.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion2/index.ts index 861c74b3d5..ae31c7afed 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion2/index.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadCallConversion2/index.ts @@ -88,7 +88,7 @@ const action: ActionDefinition = { ad_user_data_consent_state: { label: 'Ad User Data Consent State', description: - 'This represents consent for ad user data. For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad user data. For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', type: 'string', choices: [ { label: 'GRANTED', value: 'GRANTED' }, @@ -100,7 +100,7 @@ const action: ActionDefinition = { label: 'Ad Personalization Consent State', type: 'string', description: - 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', choices: [ { label: 'GRANTED', value: 'GRANTED' }, { label: 'DENIED', value: 'DENIED' }, diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.ts index 9ad389ac53..2e3fe2c159 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion/generated-types.ts @@ -85,11 +85,11 @@ export interface Payload { [k: string]: unknown } /** - * This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_user_data_consent_state?: string /** - * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_personalization_consent_state?: string /** diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion/index.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion/index.ts index 05e5e420a3..d16d16b502 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion/index.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion/index.ts @@ -202,7 +202,7 @@ const action: ActionDefinition = { ad_user_data_consent_state: { label: 'Ad User Data Consent State', description: - 'This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', type: 'string', choices: [ { label: 'GRANTED', value: 'GRANTED' }, @@ -214,7 +214,7 @@ const action: ActionDefinition = { label: 'Ad Personalization Consent State', type: 'string', description: - 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', choices: [ { label: 'GRANTED', value: 'GRANTED' }, { label: 'DENIED', value: 'DENIED' }, diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion2/generated-types.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion2/generated-types.ts index 9ad389ac53..2e3fe2c159 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion2/generated-types.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion2/generated-types.ts @@ -85,11 +85,11 @@ export interface Payload { [k: string]: unknown } /** - * This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_user_data_consent_state?: string /** - * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_personalization_consent_state?: string /** diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion2/index.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion2/index.ts index c751859e52..83b5c46682 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion2/index.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/uploadClickConversion2/index.ts @@ -209,7 +209,7 @@ const action: ActionDefinition = { ad_user_data_consent_state: { label: 'Ad User Data Consent State', description: - 'This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', type: 'string', choices: [ { label: 'GRANTED', value: 'GRANTED' }, @@ -221,7 +221,7 @@ const action: ActionDefinition = { label: 'Ad Personalization Consent State', type: 'string', description: - 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', choices: [ { label: 'GRANTED', value: 'GRANTED' }, { label: 'DENIED', value: 'DENIED' }, diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/userList/generated-types.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/userList/generated-types.ts index 51456056a8..2bf0b4e42b 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/userList/generated-types.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/userList/generated-types.ts @@ -34,11 +34,11 @@ export interface Payload { */ mobile_advertising_id?: string /** - * This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_user_data_consent_state: string /** - * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent). + * This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent). */ ad_personalization_consent_state: string /** diff --git a/packages/destination-actions/src/destinations/google-enhanced-conversions/userList/index.ts b/packages/destination-actions/src/destinations/google-enhanced-conversions/userList/index.ts index 468e16d795..673f246b23 100644 --- a/packages/destination-actions/src/destinations/google-enhanced-conversions/userList/index.ts +++ b/packages/destination-actions/src/destinations/google-enhanced-conversions/userList/index.ts @@ -94,7 +94,7 @@ const action: ActionDefinition = { ad_user_data_consent_state: { label: 'Ad User Data Consent State', description: - 'This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad user data.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', type: 'string', choices: [ { label: 'GRANTED', value: 'GRANTED' }, @@ -107,7 +107,7 @@ const action: ActionDefinition = { label: 'Ad Personalization Consent State', type: 'string', description: - 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v15/Consent).', + 'This represents consent for ad personalization. This can only be set for OfflineUserDataJobService and UserDataService.For more information on consent, refer to [Google Ads API Consent](https://developers.google.com/google-ads/api/rest/reference/rest/v17/Consent).', choices: [ { label: 'GRANTED', value: 'GRANTED' }, { label: 'DENIED', value: 'DENIED' },