Skip to content

Commit

Permalink
Merge branch 'develop' into fix/add-ns-cluster-labels-openfaas
Browse files Browse the repository at this point in the history
  • Loading branch information
kanishkkatara authored Aug 27, 2024
2 parents 3d43771 + f58d386 commit a7a72eb
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 37 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { getMappingConfig } = require('../../util');

const BASE_ENDPOINT = 'https://googleads.googleapis.com/v15/customers';
const API_VERSION = 'v17';

const BASE_ENDPOINT = 'https://googleads.googleapis.com/v17/customers';

const CONFIG_CATEGORIES = {
TRACK_CONFIG: { type: 'track', name: 'trackConfig' },
Expand All @@ -17,4 +19,5 @@ module.exports = {
hashAttributes,
CONVERSION_ACTION_ID_CACHE_TTL,
destType: 'google_adwords_enhanced_conversions',
API_VERSION,
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
generateProxyV1Payload,
} from '../../../testUtils';
import { ProxyV1TestData } from '../../../testTypes';
import { API_VERSION } from '../../../../../src/v0/destinations/google_adwords_enhanced_conversions/config';

const headers = {
Authorization: 'Bearer abcd1234',
Expand Down Expand Up @@ -82,8 +83,7 @@ export const testScenariosForV0API = [
request: {
body: generateProxyV0Payload({
...commonRequestParameters,
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567899:uploadConversionAdjustments`,
}),
method: 'POST',
},
Expand Down Expand Up @@ -138,8 +138,7 @@ export const testScenariosForV0API = [
customerId: '1234567888',
destination: 'google_adwords_enhanced_conversions',
},
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567888:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567888:uploadConversionAdjustments`,
}),
method: 'POST',
},
Expand Down Expand Up @@ -203,8 +202,7 @@ export const testScenariosForV1API: ProxyV1TestData[] = [
body: generateProxyV1Payload(
{
...commonRequestParameters,
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567899:uploadConversionAdjustments`,
},
[generateMetadata(1)],
),
Expand Down Expand Up @@ -251,8 +249,7 @@ export const testScenariosForV1API: ProxyV1TestData[] = [
customerId: '1234567888',
destination: 'google_adwords_enhanced_conversions',
},
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567888:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567888:uploadConversionAdjustments`,
},
[generateMetadata(1)],
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ProxyV1TestData } from '../../../testTypes';
import { API_VERSION } from '../../../../../src/v0/destinations/google_adwords_enhanced_conversions/config';
import {
generateProxyV1Payload,
generateProxyV0Payload,
Expand Down Expand Up @@ -83,8 +83,7 @@ export const v0oauthScenarios = [
request: {
body: generateProxyV0Payload({
...commonRequestParameters,
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`,
}),
method: 'POST',
},
Expand Down Expand Up @@ -137,8 +136,7 @@ export const v0oauthScenarios = [
customerId: '1234567910',
destination: 'google_adwords_enhanced_conversions',
},
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567910/googleAds:searchStream',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567910/googleAds:searchStream`,
}),
method: 'POST',
},
Expand Down Expand Up @@ -192,8 +190,7 @@ export const v1oauthScenarios = [
request: {
body: generateProxyV1Payload({
...commonRequestParameters,
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`,
}),
method: 'POST',
},
Expand Down Expand Up @@ -244,8 +241,7 @@ export const v1oauthScenarios = [
customerId: '1234567910',
destination: 'google_adwords_enhanced_conversions',
},
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567910/googleAds:searchStream',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567910/googleAds:searchStream`,
}),
method: 'POST',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { API_VERSION } from '../../../../src/v0/destinations/google_adwords_enhanced_conversions/config';
export const networkCallsData = [
{
httpReq: {
url: 'https://googleads.googleapis.com/v15/customers/1234567890/googleAds:searchStream',
url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890/googleAds:searchStream`,
data: {
query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`,
},
Expand Down Expand Up @@ -29,7 +30,7 @@ export const networkCallsData = [
},
{
httpReq: {
url: 'https://googleads.googleapis.com/v15/customers/1234567899/googleAds:searchStream',
url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567899/googleAds:searchStream`,
data: {
query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`,
},
Expand Down Expand Up @@ -59,7 +60,7 @@ export const networkCallsData = [
},
{
httpReq: {
url: 'https://googleads.googleapis.com/v15/customers/1234567899:uploadConversionAdjustments',
url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567899:uploadConversionAdjustments`,
data: {
conversionAdjustments: [
{
Expand Down Expand Up @@ -123,7 +124,7 @@ export const networkCallsData = [
},
{
httpReq: {
url: 'https://googleads.googleapis.com/v15/customers/1234567891/googleAds:searchStream',
url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567891/googleAds:searchStream`,
data: {
query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`,
},
Expand Down Expand Up @@ -153,7 +154,7 @@ export const networkCallsData = [
},
{
httpReq: {
url: 'https://googleads.googleapis.com/v15/customers/1234567891:uploadConversionAdjustments',
url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567891:uploadConversionAdjustments`,
data: {
conversionAdjustments: [
{
Expand Down Expand Up @@ -214,7 +215,7 @@ export const networkCallsData = [
},
{
httpReq: {
url: 'https://googleads.googleapis.com/v15/customers/1234567891:uploadClickConversions',
url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567891:uploadClickConversions`,
data: {
conversionAdjustments: [
{
Expand Down Expand Up @@ -275,7 +276,7 @@ export const networkCallsData = [
},
{
httpReq: {
url: 'https://googleads.googleapis.com/v15/customers/1234567888/googleAds:searchStream',
url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567888/googleAds:searchStream`,
data: {
query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`,
},
Expand Down Expand Up @@ -305,7 +306,7 @@ export const networkCallsData = [
},
{
httpReq: {
url: 'https://googleads.googleapis.com/v15/customers/1234567888:uploadConversionAdjustments',
url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567888:uploadConversionAdjustments`,
data: {
conversionAdjustments: [
{
Expand Down Expand Up @@ -382,7 +383,7 @@ export const networkCallsData = [
},
{
httpReq: {
url: 'https://googleads.googleapis.com/v15/customers/1234567910/googleAds:searchStream',
url: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567910/googleAds:searchStream`,
data: {
query: `SELECT conversion_action.id FROM conversion_action WHERE conversion_action.name = 'Product Added'`,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { API_VERSION } from '../../../../../src/v0/destinations/google_adwords_enhanced_conversions/config';
export const data = [
{
name: 'google_adwords_enhanced_conversions',
Expand Down Expand Up @@ -128,8 +129,7 @@ export const data = [
version: '1',
type: 'REST',
method: 'POST',
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`,
headers: {
Authorization: 'Bearer abcd1234',
'Content-Type': 'application/json',
Expand Down Expand Up @@ -616,8 +616,7 @@ export const data = [
version: '1',
type: 'REST',
method: 'POST',
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`,
headers: {
Authorization: 'Bearer abcd1234',
'Content-Type': 'application/json',
Expand Down Expand Up @@ -1328,8 +1327,7 @@ export const data = [
version: '1',
type: 'REST',
method: 'POST',
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`,
headers: {
Authorization: 'Bearer abcd1234',
'Content-Type': 'application/json',
Expand Down Expand Up @@ -1519,8 +1517,7 @@ export const data = [
version: '1',
type: 'REST',
method: 'POST',
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`,
headers: {
Authorization: 'Bearer abcd1234',
'Content-Type': 'application/json',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { API_VERSION } from '../../../../../src/v0/destinations/google_adwords_enhanced_conversions/config';

const events = [
{
metadata: {
Expand Down Expand Up @@ -357,8 +359,7 @@ export const data = [
version: '1',
type: 'REST',
method: 'POST',
endpoint:
'https://googleads.googleapis.com/v15/customers/1234567890:uploadConversionAdjustments',
endpoint: `https://googleads.googleapis.com/${API_VERSION}/customers/1234567890:uploadConversionAdjustments`,
headers: {
Authorization: 'Bearer abcd1234',
'Content-Type': 'application/json',
Expand Down

0 comments on commit a7a72eb

Please sign in to comment.