google-ads-api 13.0.0 → 14.1.0-beta-0
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.
- package/README.md +1 -7
- package/build/src/customer.d.ts +6 -6
- package/build/src/customer.js +1 -2
- package/build/src/protos/autogen/enums.d.ts +463 -314
- package/build/src/protos/autogen/enums.js +464 -307
- package/build/src/protos/autogen/fields.d.ts +176 -162
- package/build/src/protos/autogen/fields.js +8 -3
- package/build/src/protos/autogen/resourceNames.d.ts +25 -13
- package/build/src/protos/autogen/resourceNames.js +34 -18
- package/build/src/protos/autogen/serviceFactory.d.ts +166 -168
- package/build/src/protos/autogen/serviceFactory.js +292 -404
- package/build/src/protos/index.d.ts +6 -6
- package/build/src/protos/index.js +5 -5
- package/build/src/query.d.ts +8 -8
- package/build/src/service.d.ts +0 -1
- package/build/src/service.js +18 -3
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
</p>
|
|
8
8
|
<p align="center">
|
|
9
9
|
<a href="https://developers.google.com/google-ads/api/docs/release-notes">
|
|
10
|
-
<img src="https://img.shields.io/badge/google%20ads-
|
|
10
|
+
<img src="https://img.shields.io/badge/google%20ads-v14.1.0-009688.svg?style=flat-square">
|
|
11
11
|
</a>
|
|
12
12
|
<a href="https://www.npmjs.com/package/google-ads-api">
|
|
13
13
|
<img src="https://img.shields.io/npm/v/google-ads-api.svg?style=flat-square">
|
|
@@ -30,12 +30,6 @@
|
|
|
30
30
|
- Typescript definitions for all resources, enums, errors and services
|
|
31
31
|
- Provides all API functionality
|
|
32
32
|
|
|
33
|
-
> The Google Ads API is the new replacement to the AdWords API. Google will deprecate the AdWords API on the 27th of April, 2022.
|
|
34
|
-
|
|
35
|
-
# Hiring
|
|
36
|
-
|
|
37
|
-
We're currently hiring full-stack engineers at [Opteo](https://opteo.com)! If you're interested in working on this library and other exciting projects, say hello at [louis@opteo.com](mailto:louis@opteo.com)
|
|
38
|
-
|
|
39
33
|
# Installation
|
|
40
34
|
|
|
41
35
|
```bash
|
package/build/src/customer.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare class Customer extends ServiceFactory {
|
|
|
10
10
|
@description Single query using a raw GAQL string.
|
|
11
11
|
@hooks onQueryStart, onQueryError, onQueryEnd
|
|
12
12
|
*/
|
|
13
|
-
query<T = services.IGoogleAdsRow[]>(gaqlQuery: string, requestOptions?: RequestOptions): Promise<T>;
|
|
13
|
+
query<T = services.IGoogleAdsRow[]>(gaqlQuery: string, requestOptions?: Readonly<RequestOptions>): Promise<T>;
|
|
14
14
|
/**
|
|
15
15
|
@description Stream query using a raw GAQL string. If a generic type is provided, it must be the type of a single row.
|
|
16
16
|
If a summary row is requested then this will be the last emitted row of the stream.
|
|
@@ -19,18 +19,18 @@ export declare class Customer extends ServiceFactory {
|
|
|
19
19
|
const stream = queryStream<T>(gaqlQuery)
|
|
20
20
|
for await (const row of stream) { ... }
|
|
21
21
|
*/
|
|
22
|
-
queryStream<T = services.IGoogleAdsRow>(gaqlQuery: string, requestOptions?: RequestOptions): AsyncGenerator<T>;
|
|
22
|
+
queryStream<T = services.IGoogleAdsRow>(gaqlQuery: string, requestOptions?: Readonly<RequestOptions>): AsyncGenerator<T>;
|
|
23
23
|
/**
|
|
24
24
|
@description Single query using ReportOptions.
|
|
25
25
|
If a summary row is requested then this will be the first row of the results.
|
|
26
26
|
@hooks onQueryStart, onQueryError, onQueryEnd
|
|
27
27
|
*/
|
|
28
|
-
report<T = services.IGoogleAdsRow[]>(options: ReportOptions): Promise<T>;
|
|
28
|
+
report<T = services.IGoogleAdsRow[]>(options: Readonly<ReportOptions>): Promise<T>;
|
|
29
29
|
/**
|
|
30
30
|
@description Get the total row count of a report.
|
|
31
31
|
@hooks none
|
|
32
32
|
*/
|
|
33
|
-
reportCount(options: ReportOptions): Promise<number | undefined>;
|
|
33
|
+
reportCount(options: Readonly<ReportOptions>): Promise<number | undefined>;
|
|
34
34
|
/**
|
|
35
35
|
@description Stream query using ReportOptions. If a generic type is provided, it must be the type of a single row.
|
|
36
36
|
If a summary row is requested then this will be the last emitted row of the stream.
|
|
@@ -39,7 +39,7 @@ export declare class Customer extends ServiceFactory {
|
|
|
39
39
|
const stream = reportStream<T>(reportOptions)
|
|
40
40
|
for await (const row of stream) { ... }
|
|
41
41
|
*/
|
|
42
|
-
reportStream<T = services.IGoogleAdsRow>(reportOptions: ReportOptions): AsyncGenerator<T>;
|
|
42
|
+
reportStream<T = services.IGoogleAdsRow>(reportOptions: Readonly<ReportOptions>): AsyncGenerator<T>;
|
|
43
43
|
/**
|
|
44
44
|
@description Retreive the raw stream using ReportOptions.
|
|
45
45
|
@hooks onStreamStart
|
|
@@ -49,7 +49,7 @@ export declare class Customer extends ServiceFactory {
|
|
|
49
49
|
stream.on('error', (error) => { ... })
|
|
50
50
|
stream.on('end', () => { ... })
|
|
51
51
|
*/
|
|
52
|
-
reportStreamRaw(reportOptions: ReportOptions): Promise<CancellableStream | void>;
|
|
52
|
+
reportStreamRaw(reportOptions: Readonly<ReportOptions>): Promise<CancellableStream | void>;
|
|
53
53
|
private search;
|
|
54
54
|
private paginatedSearch;
|
|
55
55
|
private querier;
|
package/build/src/customer.js
CHANGED
|
@@ -49,8 +49,7 @@ class Customer extends serviceFactory_1.default {
|
|
|
49
49
|
@hooks none
|
|
50
50
|
*/
|
|
51
51
|
async reportCount(options) {
|
|
52
|
-
options
|
|
53
|
-
const { gaqlQuery, requestOptions } = (0, query_1.buildQuery)(options);
|
|
52
|
+
const { gaqlQuery, requestOptions } = (0, query_1.buildQuery)({ ...options, limit: 1 }); // must get at least one row
|
|
54
53
|
// @ts-expect-error we do not allow this field in reportOptions, however it is still a valid request option
|
|
55
54
|
requestOptions.return_total_results_count = true;
|
|
56
55
|
const useHooks = false; // to avoid cacheing conflicts
|