@google-analytics/data 4.9.0 → 4.10.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/CHANGELOG.md +7 -0
- package/build/protos/google/analytics/data/v1alpha/analytics_data_api.proto +4 -0
- package/build/protos/google/analytics/data/v1alpha/data.proto +20 -0
- package/build/protos/protos.d.ts +17 -0
- package/build/protos/protos.js +89 -0
- package/build/protos/protos.json +23 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.10.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.9.0...data-v4.10.0) (2024-10-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* [analytics-data] add `SamplingLevel` type to Data API v1alpha ([#5759](https://github.com/googleapis/google-cloud-node/issues/5759)) ([96bb1b5](https://github.com/googleapis/google-cloud-node/commit/96bb1b51a7d1481cb16d2d9ca6bc984b3258688d))
|
|
9
|
+
|
|
3
10
|
## [4.9.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.8.0...data-v4.9.0) (2024-09-24)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1086,6 +1086,10 @@ message ReportTask {
|
|
|
1086
1086
|
// the `eventName` dimension and `eventCount` metric will not have a row
|
|
1087
1087
|
// containing eventName: "purchase" and eventCount: 0.
|
|
1088
1088
|
bool keep_empty_rows = 13 [(google.api.field_behavior) = OPTIONAL];
|
|
1089
|
+
|
|
1090
|
+
// Optional. The report's sampling level.
|
|
1091
|
+
optional SamplingLevel sampling_level = 14
|
|
1092
|
+
[(google.api.field_behavior) = OPTIONAL];
|
|
1089
1093
|
}
|
|
1090
1094
|
|
|
1091
1095
|
// The report metadata for a specific report task.
|
|
@@ -1573,3 +1573,23 @@ enum RestrictedMetricType {
|
|
|
1573
1573
|
// Revenue metrics such as `purchaseRevenue`.
|
|
1574
1574
|
REVENUE_DATA = 2;
|
|
1575
1575
|
}
|
|
1576
|
+
|
|
1577
|
+
// Categories of sampling levels for the requests.
|
|
1578
|
+
enum SamplingLevel {
|
|
1579
|
+
// Unspecified type.
|
|
1580
|
+
SAMPLING_LEVEL_UNSPECIFIED = 0;
|
|
1581
|
+
|
|
1582
|
+
// Applies a sampling level of 10 million to standard properties and
|
|
1583
|
+
// 100 million to Google Analytics 360 properties.
|
|
1584
|
+
LOW = 1;
|
|
1585
|
+
|
|
1586
|
+
// Exclusive to Google Analytics 360 properties with a sampling level of 1
|
|
1587
|
+
// billion.
|
|
1588
|
+
MEDIUM = 2;
|
|
1589
|
+
|
|
1590
|
+
// Exclusive to Google Analytics 360 properties. Unsampled explorations are
|
|
1591
|
+
// more accurate and can reveal insights that aren't visible in standard
|
|
1592
|
+
// explorations. To learn more, see
|
|
1593
|
+
// https://support.google.com/analytics/answer/10896953.
|
|
1594
|
+
UNSAMPLED = 3;
|
|
1595
|
+
}
|
package/build/protos/protos.d.ts
CHANGED
|
@@ -7608,6 +7608,9 @@ export namespace google {
|
|
|
7608
7608
|
|
|
7609
7609
|
/** ReportDefinition keepEmptyRows */
|
|
7610
7610
|
keepEmptyRows?: (boolean|null);
|
|
7611
|
+
|
|
7612
|
+
/** ReportDefinition samplingLevel */
|
|
7613
|
+
samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null);
|
|
7611
7614
|
}
|
|
7612
7615
|
|
|
7613
7616
|
/** Represents a ReportDefinition. */
|
|
@@ -7655,6 +7658,12 @@ export namespace google {
|
|
|
7655
7658
|
/** ReportDefinition keepEmptyRows. */
|
|
7656
7659
|
public keepEmptyRows: boolean;
|
|
7657
7660
|
|
|
7661
|
+
/** ReportDefinition samplingLevel. */
|
|
7662
|
+
public samplingLevel?: (google.analytics.data.v1alpha.SamplingLevel|keyof typeof google.analytics.data.v1alpha.SamplingLevel|null);
|
|
7663
|
+
|
|
7664
|
+
/** ReportDefinition _samplingLevel. */
|
|
7665
|
+
public _samplingLevel?: "samplingLevel";
|
|
7666
|
+
|
|
7658
7667
|
/**
|
|
7659
7668
|
* Creates a new ReportDefinition instance using the specified properties.
|
|
7660
7669
|
* @param [properties] Properties to set
|
|
@@ -16209,6 +16218,14 @@ export namespace google {
|
|
|
16209
16218
|
COST_DATA = 1,
|
|
16210
16219
|
REVENUE_DATA = 2
|
|
16211
16220
|
}
|
|
16221
|
+
|
|
16222
|
+
/** SamplingLevel enum. */
|
|
16223
|
+
enum SamplingLevel {
|
|
16224
|
+
SAMPLING_LEVEL_UNSPECIFIED = 0,
|
|
16225
|
+
LOW = 1,
|
|
16226
|
+
MEDIUM = 2,
|
|
16227
|
+
UNSAMPLED = 3
|
|
16228
|
+
}
|
|
16212
16229
|
}
|
|
16213
16230
|
|
|
16214
16231
|
/** Namespace v1beta. */
|
package/build/protos/protos.js
CHANGED
|
@@ -20326,6 +20326,7 @@
|
|
|
20326
20326
|
* @property {string|null} [currencyCode] ReportDefinition currencyCode
|
|
20327
20327
|
* @property {google.analytics.data.v1alpha.ICohortSpec|null} [cohortSpec] ReportDefinition cohortSpec
|
|
20328
20328
|
* @property {boolean|null} [keepEmptyRows] ReportDefinition keepEmptyRows
|
|
20329
|
+
* @property {google.analytics.data.v1alpha.SamplingLevel|null} [samplingLevel] ReportDefinition samplingLevel
|
|
20329
20330
|
*/
|
|
20330
20331
|
|
|
20331
20332
|
/**
|
|
@@ -20444,6 +20445,28 @@
|
|
|
20444
20445
|
*/
|
|
20445
20446
|
ReportDefinition.prototype.keepEmptyRows = false;
|
|
20446
20447
|
|
|
20448
|
+
/**
|
|
20449
|
+
* ReportDefinition samplingLevel.
|
|
20450
|
+
* @member {google.analytics.data.v1alpha.SamplingLevel|null|undefined} samplingLevel
|
|
20451
|
+
* @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition
|
|
20452
|
+
* @instance
|
|
20453
|
+
*/
|
|
20454
|
+
ReportDefinition.prototype.samplingLevel = null;
|
|
20455
|
+
|
|
20456
|
+
// OneOf field names bound to virtual getters and setters
|
|
20457
|
+
var $oneOfFields;
|
|
20458
|
+
|
|
20459
|
+
/**
|
|
20460
|
+
* ReportDefinition _samplingLevel.
|
|
20461
|
+
* @member {"samplingLevel"|undefined} _samplingLevel
|
|
20462
|
+
* @memberof google.analytics.data.v1alpha.ReportTask.ReportDefinition
|
|
20463
|
+
* @instance
|
|
20464
|
+
*/
|
|
20465
|
+
Object.defineProperty(ReportDefinition.prototype, "_samplingLevel", {
|
|
20466
|
+
get: $util.oneOfGetter($oneOfFields = ["samplingLevel"]),
|
|
20467
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
20468
|
+
});
|
|
20469
|
+
|
|
20447
20470
|
/**
|
|
20448
20471
|
* Creates a new ReportDefinition instance using the specified properties.
|
|
20449
20472
|
* @function create
|
|
@@ -20500,6 +20523,8 @@
|
|
|
20500
20523
|
$root.google.analytics.data.v1alpha.CohortSpec.encode(message.cohortSpec, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
|
20501
20524
|
if (message.keepEmptyRows != null && Object.hasOwnProperty.call(message, "keepEmptyRows"))
|
|
20502
20525
|
writer.uint32(/* id 13, wireType 0 =*/104).bool(message.keepEmptyRows);
|
|
20526
|
+
if (message.samplingLevel != null && Object.hasOwnProperty.call(message, "samplingLevel"))
|
|
20527
|
+
writer.uint32(/* id 14, wireType 0 =*/112).int32(message.samplingLevel);
|
|
20503
20528
|
return writer;
|
|
20504
20529
|
};
|
|
20505
20530
|
|
|
@@ -20597,6 +20622,10 @@
|
|
|
20597
20622
|
message.keepEmptyRows = reader.bool();
|
|
20598
20623
|
break;
|
|
20599
20624
|
}
|
|
20625
|
+
case 14: {
|
|
20626
|
+
message.samplingLevel = reader.int32();
|
|
20627
|
+
break;
|
|
20628
|
+
}
|
|
20600
20629
|
default:
|
|
20601
20630
|
reader.skipType(tag & 7);
|
|
20602
20631
|
break;
|
|
@@ -20632,6 +20661,7 @@
|
|
|
20632
20661
|
ReportDefinition.verify = function verify(message) {
|
|
20633
20662
|
if (typeof message !== "object" || message === null)
|
|
20634
20663
|
return "object expected";
|
|
20664
|
+
var properties = {};
|
|
20635
20665
|
if (message.dimensions != null && message.hasOwnProperty("dimensions")) {
|
|
20636
20666
|
if (!Array.isArray(message.dimensions))
|
|
20637
20667
|
return "dimensions: array expected";
|
|
@@ -20710,6 +20740,18 @@
|
|
|
20710
20740
|
if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows"))
|
|
20711
20741
|
if (typeof message.keepEmptyRows !== "boolean")
|
|
20712
20742
|
return "keepEmptyRows: boolean expected";
|
|
20743
|
+
if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) {
|
|
20744
|
+
properties._samplingLevel = 1;
|
|
20745
|
+
switch (message.samplingLevel) {
|
|
20746
|
+
default:
|
|
20747
|
+
return "samplingLevel: enum value expected";
|
|
20748
|
+
case 0:
|
|
20749
|
+
case 1:
|
|
20750
|
+
case 2:
|
|
20751
|
+
case 3:
|
|
20752
|
+
break;
|
|
20753
|
+
}
|
|
20754
|
+
}
|
|
20713
20755
|
return null;
|
|
20714
20756
|
};
|
|
20715
20757
|
|
|
@@ -20835,6 +20877,30 @@
|
|
|
20835
20877
|
}
|
|
20836
20878
|
if (object.keepEmptyRows != null)
|
|
20837
20879
|
message.keepEmptyRows = Boolean(object.keepEmptyRows);
|
|
20880
|
+
switch (object.samplingLevel) {
|
|
20881
|
+
default:
|
|
20882
|
+
if (typeof object.samplingLevel === "number") {
|
|
20883
|
+
message.samplingLevel = object.samplingLevel;
|
|
20884
|
+
break;
|
|
20885
|
+
}
|
|
20886
|
+
break;
|
|
20887
|
+
case "SAMPLING_LEVEL_UNSPECIFIED":
|
|
20888
|
+
case 0:
|
|
20889
|
+
message.samplingLevel = 0;
|
|
20890
|
+
break;
|
|
20891
|
+
case "LOW":
|
|
20892
|
+
case 1:
|
|
20893
|
+
message.samplingLevel = 1;
|
|
20894
|
+
break;
|
|
20895
|
+
case "MEDIUM":
|
|
20896
|
+
case 2:
|
|
20897
|
+
message.samplingLevel = 2;
|
|
20898
|
+
break;
|
|
20899
|
+
case "UNSAMPLED":
|
|
20900
|
+
case 3:
|
|
20901
|
+
message.samplingLevel = 3;
|
|
20902
|
+
break;
|
|
20903
|
+
}
|
|
20838
20904
|
return message;
|
|
20839
20905
|
};
|
|
20840
20906
|
|
|
@@ -20920,6 +20986,11 @@
|
|
|
20920
20986
|
object.cohortSpec = $root.google.analytics.data.v1alpha.CohortSpec.toObject(message.cohortSpec, options);
|
|
20921
20987
|
if (message.keepEmptyRows != null && message.hasOwnProperty("keepEmptyRows"))
|
|
20922
20988
|
object.keepEmptyRows = message.keepEmptyRows;
|
|
20989
|
+
if (message.samplingLevel != null && message.hasOwnProperty("samplingLevel")) {
|
|
20990
|
+
object.samplingLevel = options.enums === String ? $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] === undefined ? message.samplingLevel : $root.google.analytics.data.v1alpha.SamplingLevel[message.samplingLevel] : message.samplingLevel;
|
|
20991
|
+
if (options.oneofs)
|
|
20992
|
+
object._samplingLevel = "samplingLevel";
|
|
20993
|
+
}
|
|
20923
20994
|
return object;
|
|
20924
20995
|
};
|
|
20925
20996
|
|
|
@@ -42328,6 +42399,24 @@
|
|
|
42328
42399
|
return values;
|
|
42329
42400
|
})();
|
|
42330
42401
|
|
|
42402
|
+
/**
|
|
42403
|
+
* SamplingLevel enum.
|
|
42404
|
+
* @name google.analytics.data.v1alpha.SamplingLevel
|
|
42405
|
+
* @enum {number}
|
|
42406
|
+
* @property {number} SAMPLING_LEVEL_UNSPECIFIED=0 SAMPLING_LEVEL_UNSPECIFIED value
|
|
42407
|
+
* @property {number} LOW=1 LOW value
|
|
42408
|
+
* @property {number} MEDIUM=2 MEDIUM value
|
|
42409
|
+
* @property {number} UNSAMPLED=3 UNSAMPLED value
|
|
42410
|
+
*/
|
|
42411
|
+
v1alpha.SamplingLevel = (function() {
|
|
42412
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
42413
|
+
values[valuesById[0] = "SAMPLING_LEVEL_UNSPECIFIED"] = 0;
|
|
42414
|
+
values[valuesById[1] = "LOW"] = 1;
|
|
42415
|
+
values[valuesById[2] = "MEDIUM"] = 2;
|
|
42416
|
+
values[valuesById[3] = "UNSAMPLED"] = 3;
|
|
42417
|
+
return values;
|
|
42418
|
+
})();
|
|
42419
|
+
|
|
42331
42420
|
return v1alpha;
|
|
42332
42421
|
})();
|
|
42333
42422
|
|
package/build/protos/protos.json
CHANGED
|
@@ -2393,6 +2393,13 @@
|
|
|
2393
2393
|
},
|
|
2394
2394
|
"nested": {
|
|
2395
2395
|
"ReportDefinition": {
|
|
2396
|
+
"oneofs": {
|
|
2397
|
+
"_samplingLevel": {
|
|
2398
|
+
"oneof": [
|
|
2399
|
+
"samplingLevel"
|
|
2400
|
+
]
|
|
2401
|
+
}
|
|
2402
|
+
},
|
|
2396
2403
|
"fields": {
|
|
2397
2404
|
"dimensions": {
|
|
2398
2405
|
"rule": "repeated",
|
|
@@ -2482,6 +2489,14 @@
|
|
|
2482
2489
|
"options": {
|
|
2483
2490
|
"(google.api.field_behavior)": "OPTIONAL"
|
|
2484
2491
|
}
|
|
2492
|
+
},
|
|
2493
|
+
"samplingLevel": {
|
|
2494
|
+
"type": "SamplingLevel",
|
|
2495
|
+
"id": 14,
|
|
2496
|
+
"options": {
|
|
2497
|
+
"(google.api.field_behavior)": "OPTIONAL",
|
|
2498
|
+
"proto3_optional": true
|
|
2499
|
+
}
|
|
2485
2500
|
}
|
|
2486
2501
|
}
|
|
2487
2502
|
},
|
|
@@ -4153,6 +4168,14 @@
|
|
|
4153
4168
|
"COST_DATA": 1,
|
|
4154
4169
|
"REVENUE_DATA": 2
|
|
4155
4170
|
}
|
|
4171
|
+
},
|
|
4172
|
+
"SamplingLevel": {
|
|
4173
|
+
"values": {
|
|
4174
|
+
"SAMPLING_LEVEL_UNSPECIFIED": 0,
|
|
4175
|
+
"LOW": 1,
|
|
4176
|
+
"MEDIUM": 2,
|
|
4177
|
+
"UNSAMPLED": 3
|
|
4178
|
+
}
|
|
4156
4179
|
}
|
|
4157
4180
|
}
|
|
4158
4181
|
},
|