google-ads-api 19.0.4-rest-beta → 19.1.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,6 @@ export interface ClientOptions {
7
7
  client_secret: string;
8
8
  developer_token: string;
9
9
  disable_parsing?: boolean;
10
- max_reporting_rows?: number;
11
10
  }
12
11
  export declare class Client {
13
12
  private readonly options;
@@ -4,7 +4,6 @@ exports.Client = void 0;
4
4
  const customer_1 = require("./customer");
5
5
  const service_1 = require("./service");
6
6
  class Client {
7
- options;
8
7
  constructor(options) {
9
8
  this.options = options;
10
9
  }
@@ -52,10 +52,8 @@ export declare class Customer extends ServiceFactory {
52
52
  reportStreamRaw(reportOptions: Readonly<ReportOptions>): Promise<CancellableStream | void>;
53
53
  private search;
54
54
  private paginatedSearch;
55
- private useStreamToImitateRegularSearch;
56
55
  private querier;
57
56
  private streamer;
58
- private handleStreamError;
59
57
  /**
60
58
  * @description Creates, updates, or removes resources. This method supports atomic transactions
61
59
  * with multiple types of resources. For example, you can atomically create a campaign and a
@@ -64,8 +62,4 @@ export declare class Customer extends ServiceFactory {
64
62
  */
65
63
  mutateResources<T>(mutations: MutateOperation<T>[], mutateOptions?: MutateOptions): Promise<services.MutateGoogleAdsResponse>;
66
64
  private get googleAdsFields();
67
- private prepareGoogleAdsServicePostRequestArgs;
68
- private decamelizeKeysIfNeeded;
69
- private gaqlQueryStringIncludesLimit;
70
- private generateTooManyRowsError;
71
65
  }
@@ -4,19 +4,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.Customer = void 0;
7
- const axios_1 = __importDefault(require("axios"));
8
- const stream_chain_1 = require("stream-chain");
9
- const stream_json_1 = require("stream-json");
10
- const StreamArray_1 = require("stream-json/streamers/StreamArray");
11
- const parserRest_1 = require("./parserRest");
12
- const protos_1 = require("./protos");
7
+ const parser_1 = require("./parser");
13
8
  const serviceFactory_1 = __importDefault(require("./protos/autogen/serviceFactory"));
14
9
  const query_1 = require("./query");
15
- const version_1 = require("./version");
16
- const ROWS_PER_STREAMED_CHUNK = 10_000; // From experience, this is what can be expected from the API.
10
+ const utils_1 = require("./utils");
17
11
  class Customer extends serviceFactory_1.default {
18
12
  constructor(clientOptions, customerOptions, hooks) {
19
- super(clientOptions, customerOptions, hooks ?? {});
13
+ super(clientOptions, customerOptions, hooks !== null && hooks !== void 0 ? hooks : {});
20
14
  }
21
15
  /**
22
16
  @description Single query using a raw GAQL string.
@@ -118,124 +112,39 @@ class Customer extends serviceFactory_1.default {
118
112
  });
119
113
  }
120
114
  async search(gaqlQuery, requestOptions) {
121
- const accessToken = await this.getAccessToken();
122
- try {
123
- const rawResponse = await (0, axios_1.default)(this.prepareGoogleAdsServicePostRequestArgs("search", accessToken, {
124
- data: {
125
- query: gaqlQuery,
126
- ...requestOptions,
127
- },
128
- }));
129
- const searchResponse = rawResponse.data;
130
- const results = searchResponse.results ?? [];
131
- const response = results.map((row) => this.decamelizeKeysIfNeeded(row));
132
- const summaryRow = this.decamelizeKeysIfNeeded(searchResponse.summaryRow);
133
- const nextPageToken = searchResponse.nextPageToken;
134
- const totalResultsCount = searchResponse.totalResultsCount
135
- ? +searchResponse.totalResultsCount
136
- : undefined;
137
- return { response, nextPageToken, totalResultsCount, summaryRow };
138
- }
139
- catch (e) {
140
- if (e.response?.data.error.details[0]) {
141
- throw new protos_1.errors.GoogleAdsFailure(this.decamelizeKeysIfNeeded(e.response.data.error.details[0]));
142
- }
143
- throw e;
115
+ const { service, request } = this.buildSearchRequestAndService(gaqlQuery, requestOptions);
116
+ const searchResponse = await service.search(request, {
117
+ otherArgs: { headers: this.callHeaders },
118
+ autoPaginate: false, // autoPaginate doesn't work
119
+ });
120
+ const response = searchResponse[0];
121
+ const summaryRow = searchResponse[2].summary_row;
122
+ const nextPageToken = searchResponse[2].next_page_token;
123
+ const totalResultsCount = searchResponse[2].total_results_count
124
+ ? +searchResponse[2].total_results_count
125
+ : undefined;
126
+ if (summaryRow) {
127
+ response.unshift(summaryRow);
144
128
  }
129
+ return { response, nextPageToken, totalResultsCount };
145
130
  }
146
- async paginatedSearch(gaqlQuery, requestOptions) {
147
- /*
148
- When possible, use the searchStream method to avoid the overhead of pagination.
149
- */
150
- if (requestOptions.page_size === undefined &&
151
- requestOptions.search_settings === undefined // If search_settings is set, we can't use searchStream.
152
- ) {
153
- // If no pagination or summary options are set, we can use the non-paginated search method.
154
- const { response } = await this.useStreamToImitateRegularSearch(gaqlQuery, requestOptions);
155
- return { response };
156
- }
131
+ async paginatedSearch(gaqlQuery, requestOptions, parser) {
157
132
  const response = [];
158
133
  let nextPageToken = undefined;
159
134
  const initialSearch = await this.search(gaqlQuery, requestOptions);
160
- let totalResultsCount = initialSearch.totalResultsCount;
161
- // Sometimes (when no results?) the totalResultsCount field is not included in the response.
162
- // In this case, we set it to 0.
163
- if (requestOptions.search_settings?.return_total_results_count &&
164
- initialSearch.totalResultsCount === undefined) {
165
- totalResultsCount = 0;
166
- }
167
- let summaryRow = initialSearch.summaryRow;
168
- response.push(...initialSearch.response);
135
+ const totalResultsCount = initialSearch.totalResultsCount;
136
+ response.push(...parser(initialSearch.response));
169
137
  nextPageToken = initialSearch.nextPageToken;
170
138
  while (nextPageToken) {
171
139
  const nextSearch = await this.search(gaqlQuery, {
172
140
  ...requestOptions,
173
141
  page_token: nextPageToken,
174
142
  });
175
- response.push(...nextSearch.response);
143
+ response.push(...parser(nextSearch.response));
176
144
  nextPageToken = nextSearch.nextPageToken;
177
- if (nextSearch.summaryRow) {
178
- summaryRow = nextSearch.summaryRow;
179
- }
180
- }
181
- if (summaryRow) {
182
- response.unshift(summaryRow);
183
145
  }
184
146
  return { response, totalResultsCount };
185
147
  }
186
- // Google's searchStream method is faster than search, but it does not support all features.
187
- // When report() is called, we use searchStream if possible, otherwise we use paginatedSearch.
188
- // Note that just like `paginatedSearch`, this method accumulates results in memory. Use
189
- // `reportStream` for a more memory-efficient alternative (at the cost of more CPU usage).
190
- async useStreamToImitateRegularSearch(gaqlQuery, requestOptions) {
191
- const accessToken = await this.getAccessToken();
192
- try {
193
- const args = this.prepareGoogleAdsServicePostRequestArgs("searchStream", accessToken, {
194
- responseType: "stream",
195
- data: {
196
- query: gaqlQuery,
197
- ...requestOptions,
198
- },
199
- });
200
- const response = await (0, axios_1.default)(args);
201
- const stream = response.data;
202
- const buffers = [];
203
- let rowCount = -ROWS_PER_STREAMED_CHUNK;
204
- for await (const data of stream) {
205
- if (this.clientOptions.max_reporting_rows &&
206
- !this.gaqlQueryStringIncludesLimit(gaqlQuery)) {
207
- // This is a quick-and-dirty way to count rows, but it's good enough for our purposes.
208
- // We want to avoid using a proper JSON streamer here for performance reasons.
209
- if (data.toString("utf-8").includes(`results":`)) {
210
- rowCount += ROWS_PER_STREAMED_CHUNK;
211
- }
212
- if (rowCount > this.clientOptions.max_reporting_rows) {
213
- throw this.generateTooManyRowsError();
214
- }
215
- }
216
- buffers.push(data);
217
- }
218
- const asString = Buffer.concat(buffers).toString("utf-8");
219
- const accumulator = [];
220
- let foundSummaryRow;
221
- for (const { results, summaryRow } of JSON.parse(asString)) {
222
- if (summaryRow) {
223
- foundSummaryRow = this.decamelizeKeysIfNeeded(summaryRow);
224
- }
225
- accumulator.push(...(results ?? []).map((row) => {
226
- return this.decamelizeKeysIfNeeded(row);
227
- }));
228
- if (foundSummaryRow) {
229
- accumulator.unshift(foundSummaryRow);
230
- }
231
- }
232
- return { response: accumulator };
233
- }
234
- catch (e) {
235
- await this.handleStreamError(e);
236
- throw e; // The line above should always throw.
237
- }
238
- }
239
148
  async querier(gaqlQuery, requestOptions = {}, reportOptions, useHooks = true) {
240
149
  const baseHookArguments = {
241
150
  credentials: this.credentials,
@@ -262,7 +171,14 @@ class Customer extends serviceFactory_1.default {
262
171
  }
263
172
  }
264
173
  try {
265
- const { response, totalResultsCount } = await this.paginatedSearch(gaqlQuery, requestOptions);
174
+ const parsingWapper = (rows) => {
175
+ return this.clientOptions.disable_parsing
176
+ ? rows
177
+ : reportOptions
178
+ ? (0, parser_1.parse)({ results: rows, reportOptions })
179
+ : (0, parser_1.parse)({ results: rows, gaqlString: gaqlQuery });
180
+ };
181
+ const { response, totalResultsCount } = await this.paginatedSearch(gaqlQuery, requestOptions, parsingWapper);
266
182
  if (this.hooks.onQueryEnd && useHooks) {
267
183
  const queryResolution = { resolved: false };
268
184
  await this.hooks.onQueryEnd({
@@ -314,81 +230,58 @@ class Customer extends serviceFactory_1.default {
314
230
  return;
315
231
  }
316
232
  }
233
+ const { service, request } = this.buildSearchStreamRequestAndService(gaqlQuery, requestOptions);
234
+ const stream = service.searchStream(request, {
235
+ otherArgs: { headers: this.callHeaders },
236
+ });
237
+ let streamFinished = false;
238
+ const accumulator = [];
239
+ let nextChunk = (0, utils_1.createNextChunkArrivedPromise)();
240
+ stream.on("data", (chunk) => {
241
+ const results = chunk.summary_row ? [chunk.summary_row] : chunk.results;
242
+ const parsedResponse = this.clientOptions.disable_parsing
243
+ ? results
244
+ : reportOptions
245
+ ? (0, parser_1.parse)({ results, reportOptions })
246
+ : (0, parser_1.parse)({ results, gaqlString: gaqlQuery });
247
+ accumulator.push(...parsedResponse);
248
+ nextChunk.resolve();
249
+ nextChunk = (0, utils_1.createNextChunkArrivedPromise)();
250
+ });
251
+ stream.on("error", (searchError) => {
252
+ nextChunk.reject(searchError);
253
+ });
254
+ stream.on("end", () => {
255
+ streamFinished = true;
256
+ nextChunk.resolve();
257
+ });
317
258
  try {
318
- const accessToken = await this.getAccessToken();
319
- const args = this.prepareGoogleAdsServicePostRequestArgs("searchStream", accessToken, {
320
- responseType: "stream",
321
- data: {
322
- query: gaqlQuery,
323
- ...requestOptions,
324
- },
325
- });
326
- const response = await (0, axios_1.default)(args);
327
- const stream = response.data;
328
- // The options below help to make the stream less CPU intensive.
329
- const parser = new stream_json_1.Parser({
330
- streamValues: false,
331
- streamKeys: false,
332
- packValues: true,
333
- packKeys: true,
334
- });
335
- const pipeline = (0, stream_chain_1.chain)([stream, parser, (0, StreamArray_1.streamArray)()]);
336
- let count = 0;
337
- for await (const data of pipeline) {
338
- const results = data.value.results ??
339
- (data.value.summaryRow ? [data.value.summaryRow] : undefined) ??
340
- [];
341
- count += results.length;
342
- if (this.clientOptions.max_reporting_rows &&
343
- count > this.clientOptions.max_reporting_rows &&
344
- !this.gaqlQueryStringIncludesLimit(gaqlQuery)) {
345
- throw this.generateTooManyRowsError();
259
+ while (!streamFinished || accumulator.length) {
260
+ if (accumulator.length > 0) {
261
+ const item = accumulator.shift();
262
+ if (item === undefined) {
263
+ throw new Error("UNDEFINED_STREAM_ERROR");
264
+ }
265
+ yield item;
346
266
  }
347
- for (const row of results) {
348
- const parsed = this.decamelizeKeysIfNeeded(row);
349
- yield parsed;
267
+ else {
268
+ await nextChunk.newPromise;
350
269
  }
351
270
  }
352
- return;
353
271
  }
354
- catch (e) {
355
- try {
356
- await this.handleStreamError(e);
357
- }
358
- catch (_e) {
359
- if (this.hooks.onStreamError) {
360
- await this.hooks.onStreamError({
361
- ...baseHookArguments,
362
- error: _e,
363
- });
364
- }
365
- throw _e;
272
+ catch (searchError) {
273
+ const googleAdsError = this.getGoogleAdsError(searchError);
274
+ if (this.hooks.onStreamError) {
275
+ await this.hooks.onStreamError({
276
+ ...baseHookArguments,
277
+ error: googleAdsError,
278
+ });
366
279
  }
280
+ throw googleAdsError;
367
281
  }
368
- }
369
- async handleStreamError(e) {
370
- if (!e?.response?.data) {
371
- throw e;
282
+ finally {
283
+ stream.destroy();
372
284
  }
373
- // The error is a stream, so some effort is required to parse it.
374
- const stream = e.response.data;
375
- const pipeline = (0, stream_chain_1.chain)([stream, (0, stream_json_1.parser)(), (0, StreamArray_1.streamArray)()]);
376
- const defaultErrorMessage = "Unknown GoogleAdsFailure";
377
- let googleAdsFailure = new Error(defaultErrorMessage);
378
- // Only throw the first error.
379
- pipeline.once("data", (data) => {
380
- if (data?.value?.error?.details?.[0]) {
381
- googleAdsFailure = new protos_1.errors.GoogleAdsFailure(this.decamelizeKeysIfNeeded(data.value.error.details[0]));
382
- }
383
- else {
384
- googleAdsFailure = new Error(data?.value?.error?.message ?? defaultErrorMessage, { cause: data?.value?.error ?? data?.value });
385
- }
386
- });
387
- // Must always reject.
388
- await new Promise((_, reject) => {
389
- pipeline.on("end", () => reject(googleAdsFailure));
390
- pipeline.on("error", (err) => reject(err));
391
- });
392
285
  }
393
286
  /**
394
287
  * @description Creates, updates, or removes resources. This method supports atomic transactions
@@ -468,28 +361,5 @@ class Customer extends serviceFactory_1.default {
468
361
  },
469
362
  };
470
363
  }
471
- prepareGoogleAdsServicePostRequestArgs(functionName, accessToken, extra) {
472
- return {
473
- method: "POST",
474
- url: `https://googleads.googleapis.com/${version_1.googleAdsVersion}/customers/${this.customerOptions.customer_id}/googleAds:${functionName}`,
475
- headers: {
476
- Authorization: `Bearer ${accessToken}`,
477
- ...this.callHeaders,
478
- },
479
- ...extra,
480
- };
481
- }
482
- decamelizeKeysIfNeeded(input) {
483
- if (this.clientOptions.disable_parsing) {
484
- return input;
485
- }
486
- return (0, parserRest_1.decamelizeKeys)(input);
487
- }
488
- gaqlQueryStringIncludesLimit(gaqlQuery) {
489
- return gaqlQuery.toLowerCase().includes("limit ");
490
- }
491
- generateTooManyRowsError() {
492
- return new Error(`Exceeded the maximum number of rows set by "max_reporting_rows" (${this.clientOptions.max_reporting_rows}).`);
493
- }
494
364
  }
495
365
  exports.Customer = Customer;
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  Object.defineProperty(exports, "__esModule", { value: true });
26
36
  exports.Customer = exports.ResourceNames = exports.parse = exports.toMicros = exports.fromMicros = exports.protobuf = exports.longrunning = exports.services = exports.resources = exports.errors = exports.fields = exports.enums = exports.common = exports.GoogleAdsApi = void 0;
27
37
  // Core library client
@@ -973,7 +973,8 @@ export declare namespace enums {
973
973
  enum TargetFrequencyTimeUnit {
974
974
  UNSPECIFIED = 0,// UNSPECIFIED
975
975
  UNKNOWN = 1,// UNKNOWN
976
- WEEKLY = 2
976
+ WEEKLY = 2,// WEEKLY
977
+ MONTHLY = 3
977
978
  }
978
979
  /**
979
980
  * @name TargetImpressionShareLocationEnum.TargetImpressionShareLocation
@@ -1020,7 +1021,8 @@ export declare namespace enums {
1020
1021
  VIDEO_SEQUENCE = 17,// VIDEO_SEQUENCE
1021
1022
  APP_CAMPAIGN_FOR_PRE_REGISTRATION = 18,// APP_CAMPAIGN_FOR_PRE_REGISTRATION
1022
1023
  VIDEO_REACH_TARGET_FREQUENCY = 19,// VIDEO_REACH_TARGET_FREQUENCY
1023
- TRAVEL_ACTIVITIES = 20
1024
+ TRAVEL_ACTIVITIES = 20,// TRAVEL_ACTIVITIES
1025
+ YOUTUBE_AUDIO = 22
1024
1026
  }
1025
1027
  /**
1026
1028
  * @name AdvertisingChannelTypeEnum.AdvertisingChannelType
@@ -2155,7 +2157,8 @@ export declare namespace enums {
2155
2157
  VIDEO_RESPONSIVE = 16,// VIDEO_RESPONSIVE
2156
2158
  VIDEO_EFFICIENT_REACH = 17,// VIDEO_EFFICIENT_REACH
2157
2159
  SMART_CAMPAIGN_ADS = 18,// SMART_CAMPAIGN_ADS
2158
- TRAVEL_ADS = 19
2160
+ TRAVEL_ADS = 19,// TRAVEL_ADS
2161
+ YOUTUBE_AUDIO = 20
2159
2162
  }
2160
2163
  /**
2161
2164
  * @name AdServingOptimizationStatusEnum.AdServingOptimizationStatus
@@ -2184,6 +2187,15 @@ export declare namespace enums {
2184
2187
  GOOD = 6,// GOOD
2185
2188
  EXCELLENT = 7
2186
2189
  }
2190
+ /**
2191
+ * @name AdStrengthActionItemTypeEnum.AdStrengthActionItemType
2192
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/AdStrengthActionItemTypeEnum.AdStrengthActionItemType
2193
+ */
2194
+ enum AdStrengthActionItemType {
2195
+ UNSPECIFIED = 0,// UNSPECIFIED
2196
+ UNKNOWN = 1,// UNKNOWN
2197
+ ADD_ASSET = 2
2198
+ }
2187
2199
  /**
2188
2200
  * @name AdTypeEnum.AdType
2189
2201
  * @link https://developers.google.com/google-ads/api/reference/rpc/v19/AdTypeEnum.AdType
@@ -2221,7 +2233,8 @@ export declare namespace enums {
2221
2233
  DEMAND_GEN_CAROUSEL_AD = 41,// DEMAND_GEN_CAROUSEL_AD
2222
2234
  TRAVEL_AD = 37,// TRAVEL_AD
2223
2235
  DEMAND_GEN_VIDEO_RESPONSIVE_AD = 42,// DEMAND_GEN_VIDEO_RESPONSIVE_AD
2224
- DEMAND_GEN_PRODUCT_AD = 39
2236
+ DEMAND_GEN_PRODUCT_AD = 39,// DEMAND_GEN_PRODUCT_AD
2237
+ YOUTUBE_AUDIO_AD = 44
2225
2238
  }
2226
2239
  /**
2227
2240
  * @name AndroidPrivacyInteractionTypeEnum.AndroidPrivacyInteractionType
@@ -2307,6 +2320,17 @@ export declare namespace enums {
2307
2320
  GENERATE_LANDING_PAGE_PREVIEW = 5,// GENERATE_LANDING_PAGE_PREVIEW
2308
2321
  GENERATE_ENHANCED_YOUTUBE_VIDEOS = 6
2309
2322
  }
2323
+ /**
2324
+ * @name AssetCoverageVideoAspectRatioRequirementEnum.AssetCoverageVideoAspectRatioRequirement
2325
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/AssetCoverageVideoAspectRatioRequirementEnum.AssetCoverageVideoAspectRatioRequirement
2326
+ */
2327
+ enum AssetCoverageVideoAspectRatioRequirement {
2328
+ UNSPECIFIED = 0,// UNSPECIFIED
2329
+ UNKNOWN = 1,// UNKNOWN
2330
+ HORIZONTAL = 2,// HORIZONTAL
2331
+ SQUARE = 3,// SQUARE
2332
+ VERTICAL = 4
2333
+ }
2310
2334
  /**
2311
2335
  * @name AssetFieldTypeEnum.AssetFieldType
2312
2336
  * @link https://developers.google.com/google-ads/api/reference/rpc/v19/AssetFieldTypeEnum.AssetFieldType
@@ -2342,7 +2366,8 @@ export declare namespace enums {
2342
2366
  BUSINESS_LOGO = 27,// BUSINESS_LOGO
2343
2367
  HOTEL_PROPERTY = 28,// HOTEL_PROPERTY
2344
2368
  DEMAND_GEN_CAROUSEL_CARD = 30,// DEMAND_GEN_CAROUSEL_CARD
2345
- BUSINESS_MESSAGE = 31
2369
+ BUSINESS_MESSAGE = 31,// BUSINESS_MESSAGE
2370
+ TALL_PORTRAIT_MARKETING_IMAGE = 32
2346
2371
  }
2347
2372
  /**
2348
2373
  * @name AssetGroupPrimaryStatusEnum.AssetGroupPrimaryStatus
@@ -2976,6 +3001,7 @@ export declare namespace enums {
2976
3001
  AD_GROUP_CRITERION = 5,// AD_GROUP_CRITERION
2977
3002
  CAMPAIGN = 6,// CAMPAIGN
2978
3003
  CAMPAIGN_CRITERION = 7,// CAMPAIGN_CRITERION
3004
+ CAMPAIGN_BUDGET = 8,// CAMPAIGN_BUDGET
2979
3005
  FEED = 9,// FEED
2980
3006
  FEED_ITEM = 10,// FEED_ITEM
2981
3007
  AD_GROUP_FEED = 11,// AD_GROUP_FEED
@@ -2988,7 +3014,9 @@ export declare namespace enums {
2988
3014
  CAMPAIGN_ASSET = 18,// CAMPAIGN_ASSET
2989
3015
  AD_GROUP_ASSET = 19,// AD_GROUP_ASSET
2990
3016
  COMBINED_AUDIENCE = 20,// COMBINED_AUDIENCE
2991
- ASSET_GROUP = 21
3017
+ ASSET_GROUP = 21,// ASSET_GROUP
3018
+ ASSET_SET = 22,// ASSET_SET
3019
+ CAMPAIGN_ASSET_SET = 23
2992
3020
  }
2993
3021
  /**
2994
3022
  * @name CombinedAudienceStatusEnum.CombinedAudienceStatus
@@ -3091,6 +3119,16 @@ export declare namespace enums {
3091
3119
  ENABLED = 3,// ENABLED
3092
3120
  PAUSED = 4
3093
3121
  }
3122
+ /**
3123
+ * @name ConversionCustomerTypeEnum.ConversionCustomerType
3124
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/ConversionCustomerTypeEnum.ConversionCustomerType
3125
+ */
3126
+ enum ConversionCustomerType {
3127
+ UNSPECIFIED = 0,// UNSPECIFIED
3128
+ UNKNOWN = 1,// UNKNOWN
3129
+ NEW = 2,// NEW
3130
+ RETURNING = 3
3131
+ }
3094
3132
  /**
3095
3133
  * @name ConversionEnvironmentEnum.ConversionEnvironment
3096
3134
  * @link https://developers.google.com/google-ads/api/reference/rpc/v19/ConversionEnvironmentEnum.ConversionEnvironment
@@ -3374,6 +3412,26 @@ export declare namespace enums {
3374
3412
  UNKNOWN = 1,// UNKNOWN
3375
3413
  VIDEO = 2
3376
3414
  }
3415
+ /**
3416
+ * @name DemandGenChannelConfigEnum.DemandGenChannelConfig
3417
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/DemandGenChannelConfigEnum.DemandGenChannelConfig
3418
+ */
3419
+ enum DemandGenChannelConfig {
3420
+ UNSPECIFIED = 0,// UNSPECIFIED
3421
+ UNKNOWN = 1,// UNKNOWN
3422
+ CHANNEL_STRATEGY = 2,// CHANNEL_STRATEGY
3423
+ SELECTED_CHANNELS = 3
3424
+ }
3425
+ /**
3426
+ * @name DemandGenChannelStrategyEnum.DemandGenChannelStrategy
3427
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/DemandGenChannelStrategyEnum.DemandGenChannelStrategy
3428
+ */
3429
+ enum DemandGenChannelStrategy {
3430
+ UNSPECIFIED = 0,// UNSPECIFIED
3431
+ UNKNOWN = 1,// UNKNOWN
3432
+ ALL_CHANNELS = 2,// ALL_CHANNELS
3433
+ ALL_OWNED_AND_OPERATED_CHANNELS = 3
3434
+ }
3377
3435
  /**
3378
3436
  * @name DistanceBucketEnum.DistanceBucket
3379
3437
  * @link https://developers.google.com/google-ads/api/reference/rpc/v19/DistanceBucketEnum.DistanceBucket
@@ -3815,6 +3873,18 @@ export declare namespace enums {
3815
3873
  NON_FINAL = 14,// NON_FINAL
3816
3874
  OTHER = 15
3817
3875
  }
3876
+ /**
3877
+ * @name LocalServicesLeadCreditIssuanceDecisionEnum.LocalServicesLeadCreditIssuanceDecision
3878
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/LocalServicesLeadCreditIssuanceDecisionEnum.LocalServicesLeadCreditIssuanceDecision
3879
+ */
3880
+ enum LocalServicesLeadCreditIssuanceDecision {
3881
+ UNSPECIFIED = 0,// UNSPECIFIED
3882
+ UNKNOWN = 1,// UNKNOWN
3883
+ SUCCESS_NOT_REACHED_THRESHOLD = 2,// SUCCESS_NOT_REACHED_THRESHOLD
3884
+ SUCCESS_REACHED_THRESHOLD = 3,// SUCCESS_REACHED_THRESHOLD
3885
+ FAIL_OVER_THRESHOLD = 4,// FAIL_OVER_THRESHOLD
3886
+ FAIL_NOT_ELIGIBLE = 5
3887
+ }
3818
3888
  /**
3819
3889
  * @name LocalServicesCreditStateEnum.LocalServicesCreditState
3820
3890
  * @link https://developers.google.com/google-ads/api/reference/rpc/v19/LocalServicesCreditStateEnum.LocalServicesCreditState
@@ -3841,6 +3911,47 @@ export declare namespace enums {
3841
3911
  CONSUMER_DECLINED = 8,// CONSUMER_DECLINED
3842
3912
  WIPED_OUT = 9
3843
3913
  }
3914
+ /**
3915
+ * @name LocalServicesLeadSurveyAnswerEnum.LocalServicesLeadSurveyAnswer
3916
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/LocalServicesLeadSurveyAnswerEnum.LocalServicesLeadSurveyAnswer
3917
+ */
3918
+ enum LocalServicesLeadSurveyAnswer {
3919
+ UNSPECIFIED = 0,// UNSPECIFIED
3920
+ UNKNOWN = 1,// UNKNOWN
3921
+ VERY_SATISFIED = 2,// VERY_SATISFIED
3922
+ SATISFIED = 3,// SATISFIED
3923
+ NEUTRAL = 4,// NEUTRAL
3924
+ DISSATISFIED = 5,// DISSATISFIED
3925
+ VERY_DISSATISFIED = 6
3926
+ }
3927
+ /**
3928
+ * @name LocalServicesLeadSurveyDissatisfiedReasonEnum.LocalServicesLeadSurveyDissatisfiedReason
3929
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/LocalServicesLeadSurveyDissatisfiedReasonEnum.LocalServicesLeadSurveyDissatisfiedReason
3930
+ */
3931
+ enum LocalServicesLeadSurveyDissatisfiedReason {
3932
+ UNSPECIFIED = 0,// UNSPECIFIED
3933
+ UNKNOWN = 1,// UNKNOWN
3934
+ OTHER_DISSATISFIED_REASON = 2,// OTHER_DISSATISFIED_REASON
3935
+ GEO_MISMATCH = 3,// GEO_MISMATCH
3936
+ JOB_TYPE_MISMATCH = 4,// JOB_TYPE_MISMATCH
3937
+ NOT_READY_TO_BOOK = 5,// NOT_READY_TO_BOOK
3938
+ SPAM = 6,// SPAM
3939
+ DUPLICATE = 7,// DUPLICATE
3940
+ SOLICITATION = 8
3941
+ }
3942
+ /**
3943
+ * @name LocalServicesLeadSurveySatisfiedReasonEnum.LocalServicesLeadSurveySatisfiedReason
3944
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/LocalServicesLeadSurveySatisfiedReasonEnum.LocalServicesLeadSurveySatisfiedReason
3945
+ */
3946
+ enum LocalServicesLeadSurveySatisfiedReason {
3947
+ UNSPECIFIED = 0,// UNSPECIFIED
3948
+ UNKNOWN = 1,// UNKNOWN
3949
+ OTHER_SATISFIED_REASON = 2,// OTHER_SATISFIED_REASON
3950
+ BOOKED_CUSTOMER = 3,// BOOKED_CUSTOMER
3951
+ LIKELY_BOOKED_CUSTOMER = 4,// LIKELY_BOOKED_CUSTOMER
3952
+ SERVICE_RELATED = 5,// SERVICE_RELATED
3953
+ HIGH_VALUE_SERVICE = 6
3954
+ }
3844
3955
  /**
3845
3956
  * @name LocalServicesLeadTypeEnum.LocalServicesLeadType
3846
3957
  * @link https://developers.google.com/google-ads/api/reference/rpc/v19/LocalServicesLeadTypeEnum.LocalServicesLeadType
@@ -4211,6 +4322,18 @@ export declare namespace enums {
4211
4322
  AGE_RANGE_55_65_UP = 21,// AGE_RANGE_55_65_UP
4212
4323
  AGE_RANGE_65_UP = 503006
4213
4324
  }
4325
+ /**
4326
+ * @name ReachPlanConversionRateModelEnum.ReachPlanConversionRateModel
4327
+ * @link https://developers.google.com/google-ads/api/reference/rpc/v19/ReachPlanConversionRateModelEnum.ReachPlanConversionRateModel
4328
+ */
4329
+ enum ReachPlanConversionRateModel {
4330
+ UNSPECIFIED = 0,// UNSPECIFIED
4331
+ UNKNOWN = 1,// UNKNOWN
4332
+ CUSTOMER_HISTORY = 2,// CUSTOMER_HISTORY
4333
+ INVENTORY_AGGRESSIVE = 3,// INVENTORY_AGGRESSIVE
4334
+ INVENTORY_CONSERVATIVE = 4,// INVENTORY_CONSERVATIVE
4335
+ INVENTORY_MEDIAN = 5
4336
+ }
4214
4337
  /**
4215
4338
  * @name ReachPlanNetworkEnum.ReachPlanNetwork
4216
4339
  * @link https://developers.google.com/google-ads/api/reference/rpc/v19/ReachPlanNetworkEnum.ReachPlanNetwork
@@ -4229,6 +4352,8 @@ export declare namespace enums {
4229
4352
  enum ReachPlanSurface {
4230
4353
  UNSPECIFIED = 0,// UNSPECIFIED
4231
4354
  UNKNOWN = 1,// UNKNOWN
4355
+ DISCOVER_FEED = 7,// DISCOVER_FEED
4356
+ GMAIL = 8,// GMAIL
4232
4357
  IN_FEED = 2,// IN_FEED
4233
4358
  IN_STREAM_BUMPER = 3,// IN_STREAM_BUMPER
4234
4359
  IN_STREAM_NON_SKIPPABLE = 4,// IN_STREAM_NON_SKIPPABLE