google-ads-api 20.0.1 → 21.0.0-beta
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/build/src/customer.js +4 -1
- package/build/src/parserRest.js +19 -1
- package/build/src/protos/autogen/enums.d.ts +524 -373
- package/build/src/protos/autogen/enums.js +526 -364
- package/build/src/protos/index.d.ts +6 -6
- package/build/src/protos/index.js +5 -5
- package/build/src/service.d.ts +1 -1
- package/build/src/service.js +2 -2
- package/build/src/version.d.ts +1 -1
- package/build/src/version.js +1 -1
- package/package.json +5 -4
package/build/src/customer.js
CHANGED
|
@@ -58,7 +58,10 @@ class Customer extends serviceFactory_1.default {
|
|
|
58
58
|
// must get at least one row
|
|
59
59
|
const { gaqlQuery, requestOptions } = (0, query_1.buildQuery)({ ...options, limit: 1 });
|
|
60
60
|
// We do not allow this field in reportOptions, however it is still a valid request option
|
|
61
|
-
requestOptions.search_settings = {
|
|
61
|
+
requestOptions.search_settings = {
|
|
62
|
+
return_total_results_count: true,
|
|
63
|
+
return_summary_row: false,
|
|
64
|
+
};
|
|
62
65
|
const useHooks = false; // to avoid cacheing conflicts
|
|
63
66
|
const { totalResultsCount } = await this.querier(gaqlQuery, requestOptions, options, useHooks);
|
|
64
67
|
return totalResultsCount;
|
package/build/src/parserRest.js
CHANGED
|
@@ -53,7 +53,25 @@ const cachedValueParser = (key, parentPath, value) => {
|
|
|
53
53
|
console.warn(`No data type found for ${fullPath}`);
|
|
54
54
|
}
|
|
55
55
|
else if (typeof megaDataType === "object") {
|
|
56
|
-
|
|
56
|
+
// Special handling for FieldMask types - REST API returns them as comma-separated strings
|
|
57
|
+
if (megaDataType.paths === "STRING" && typeof value === "string") {
|
|
58
|
+
// This is a FieldMask field, convert the comma-separated string to the expected format
|
|
59
|
+
// Also convert each path from camelCase to snake_case
|
|
60
|
+
newValue = {
|
|
61
|
+
paths: value.split(",").map((p) => {
|
|
62
|
+
// Handle nested paths like "ipBlock.ipAddress"
|
|
63
|
+
return p
|
|
64
|
+
.trim()
|
|
65
|
+
.split(".")
|
|
66
|
+
.map((segment) => (0, utils_1.toSnakeCase)(segment))
|
|
67
|
+
.join(".");
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
// Normal enum handling
|
|
73
|
+
newValue = megaDataType[value];
|
|
74
|
+
}
|
|
57
75
|
}
|
|
58
76
|
else if (megaDataType === "INT64") {
|
|
59
77
|
newValue = Number(value);
|