@google-analytics/data 4.7.0 → 4.8.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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.8.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.7.0...data-v4.8.0) (2024-08-09)
4
+
5
+
6
+ ### Features
7
+
8
+ * [analytics-data] add the `comparisons` field to the `Metadata` resource ([#5600](https://github.com/googleapis/google-cloud-node/issues/5600)) ([e77b934](https://github.com/googleapis/google-cloud-node/commit/e77b9348a198e3a3e60e71474ac3320273d17f6e))
9
+
3
10
  ## [4.7.0](https://github.com/googleapis/google-cloud-node/compare/data-v4.6.0...data-v4.7.0) (2024-05-21)
4
11
 
5
12
 
@@ -311,6 +311,9 @@ message Metadata {
311
311
 
312
312
  // The metric descriptions.
313
313
  repeated MetricMetadata metrics = 2;
314
+
315
+ // The comparison descriptions.
316
+ repeated ComparisonMetadata comparisons = 4;
314
317
  }
315
318
 
316
319
  // The request to generate a report.
@@ -403,6 +406,11 @@ message RunReportRequest {
403
406
  // Toggles whether to return the current state of this Analytics Property's
404
407
  // quota. Quota is returned in [PropertyQuota](#PropertyQuota).
405
408
  bool return_property_quota = 14;
409
+
410
+ // Optional. The configuration of comparisons requested and displayed. The
411
+ // request only requires a comparisons field in order to receive a comparison
412
+ // column in the response.
413
+ repeated Comparison comparisons = 15 [(google.api.field_behavior) = OPTIONAL];
406
414
  }
407
415
 
408
416
  // The response report table corresponding to a request.
@@ -515,6 +523,11 @@ message RunPivotReportRequest {
515
523
  // Toggles whether to return the current state of this Analytics Property's
516
524
  // quota. Quota is returned in [PropertyQuota](#PropertyQuota).
517
525
  bool return_property_quota = 11;
526
+
527
+ // Optional. The configuration of comparisons requested and displayed. The
528
+ // request requires both a comparisons field and a comparisons dimension to
529
+ // receive a comparison column in the response.
530
+ repeated Comparison comparisons = 12 [(google.api.field_behavior) = OPTIONAL];
518
531
  }
519
532
 
520
533
  // The response pivot report table corresponding to a pivot request.
@@ -186,6 +186,25 @@ message Metric {
186
186
  bool invisible = 3;
187
187
  }
188
188
 
189
+ // Defines an individual comparison. Most requests will include multiple
190
+ // comparisons so that the report compares between the comparisons.
191
+ message Comparison {
192
+ // Each comparison produces separate rows in the response. In the response,
193
+ // this comparison is identified by this name. If name is unspecified, we will
194
+ // use the saved comparisons display name.
195
+ optional string name = 1;
196
+
197
+ // One kind of comparison value
198
+ oneof one_comparison {
199
+ // A basic comparison.
200
+ FilterExpression dimension_filter = 2;
201
+
202
+ // A saved comparison identified by the comparison's resource name.
203
+ // For example, 'comparisons/1234'.
204
+ string comparison = 3;
205
+ }
206
+ }
207
+
189
208
  // To express dimension or metric filters. The fields in the same
190
209
  // FilterExpression need to be either all dimensions or all metrics.
191
210
  message FilterExpression {
@@ -861,7 +880,11 @@ message DimensionMetadata {
861
880
  // available only by `apiName`.
862
881
  repeated string deprecated_api_names = 4;
863
882
 
864
- // True if the dimension is a custom dimension for this property.
883
+ // True if the dimension is custom to this property. This includes user,
884
+ // event, & item scoped custom dimensions; to learn more about custom
885
+ // dimensions, see https://support.google.com/analytics/answer/14240153. This
886
+ // also include custom channel groups; to learn more about custom channel
887
+ // groups, see https://support.google.com/analytics/answer/13051316.
865
888
  bool custom_definition = 5;
866
889
 
867
890
  // The display name of the category that this dimension belongs to. Similar
@@ -928,6 +951,19 @@ message MetricMetadata {
928
951
  string category = 10;
929
952
  }
930
953
 
954
+ // The metadata for a single comparison.
955
+ message ComparisonMetadata {
956
+ // This comparison's resource name. Useable in [Comparison](#Comparison)'s
957
+ // `comparison` field. For example, 'comparisons/1234'.
958
+ string api_name = 1;
959
+
960
+ // This comparison's name within the Google Analytics user interface.
961
+ string ui_name = 2;
962
+
963
+ // This comparison's description.
964
+ string description = 3;
965
+ }
966
+
931
967
  // The compatibility for a single dimension.
932
968
  message DimensionCompatibility {
933
969
  // The dimension metadata contains the API name for this compatibility
@@ -16477,6 +16477,9 @@ export namespace google {
16477
16477
 
16478
16478
  /** Metadata metrics */
16479
16479
  metrics?: (google.analytics.data.v1beta.IMetricMetadata[]|null);
16480
+
16481
+ /** Metadata comparisons */
16482
+ comparisons?: (google.analytics.data.v1beta.IComparisonMetadata[]|null);
16480
16483
  }
16481
16484
 
16482
16485
  /** Represents a Metadata. */
@@ -16497,6 +16500,9 @@ export namespace google {
16497
16500
  /** Metadata metrics. */
16498
16501
  public metrics: google.analytics.data.v1beta.IMetricMetadata[];
16499
16502
 
16503
+ /** Metadata comparisons. */
16504
+ public comparisons: google.analytics.data.v1beta.IComparisonMetadata[];
16505
+
16500
16506
  /**
16501
16507
  * Creates a new Metadata instance using the specified properties.
16502
16508
  * @param [properties] Properties to set
@@ -16619,6 +16625,9 @@ export namespace google {
16619
16625
 
16620
16626
  /** RunReportRequest returnPropertyQuota */
16621
16627
  returnPropertyQuota?: (boolean|null);
16628
+
16629
+ /** RunReportRequest comparisons */
16630
+ comparisons?: (google.analytics.data.v1beta.IComparison[]|null);
16622
16631
  }
16623
16632
 
16624
16633
  /** Represents a RunReportRequest. */
@@ -16672,6 +16681,9 @@ export namespace google {
16672
16681
  /** RunReportRequest returnPropertyQuota. */
16673
16682
  public returnPropertyQuota: boolean;
16674
16683
 
16684
+ /** RunReportRequest comparisons. */
16685
+ public comparisons: google.analytics.data.v1beta.IComparison[];
16686
+
16675
16687
  /**
16676
16688
  * Creates a new RunReportRequest instance using the specified properties.
16677
16689
  * @param [properties] Properties to set
@@ -16936,6 +16948,9 @@ export namespace google {
16936
16948
 
16937
16949
  /** RunPivotReportRequest returnPropertyQuota */
16938
16950
  returnPropertyQuota?: (boolean|null);
16951
+
16952
+ /** RunPivotReportRequest comparisons */
16953
+ comparisons?: (google.analytics.data.v1beta.IComparison[]|null);
16939
16954
  }
16940
16955
 
16941
16956
  /** Represents a RunPivotReportRequest. */
@@ -16980,6 +16995,9 @@ export namespace google {
16980
16995
  /** RunPivotReportRequest returnPropertyQuota. */
16981
16996
  public returnPropertyQuota: boolean;
16982
16997
 
16998
+ /** RunPivotReportRequest comparisons. */
16999
+ public comparisons: google.analytics.data.v1beta.IComparison[];
17000
+
16983
17001
  /**
16984
17002
  * Creates a new RunPivotReportRequest instance using the specified properties.
16985
17003
  * @param [properties] Properties to set
@@ -19954,6 +19972,121 @@ export namespace google {
19954
19972
  public static getTypeUrl(typeUrlPrefix?: string): string;
19955
19973
  }
19956
19974
 
19975
+ /** Properties of a Comparison. */
19976
+ interface IComparison {
19977
+
19978
+ /** Comparison name */
19979
+ name?: (string|null);
19980
+
19981
+ /** Comparison dimensionFilter */
19982
+ dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null);
19983
+
19984
+ /** Comparison comparison */
19985
+ comparison?: (string|null);
19986
+ }
19987
+
19988
+ /** Represents a Comparison. */
19989
+ class Comparison implements IComparison {
19990
+
19991
+ /**
19992
+ * Constructs a new Comparison.
19993
+ * @param [properties] Properties to set
19994
+ */
19995
+ constructor(properties?: google.analytics.data.v1beta.IComparison);
19996
+
19997
+ /** Comparison name. */
19998
+ public name?: (string|null);
19999
+
20000
+ /** Comparison dimensionFilter. */
20001
+ public dimensionFilter?: (google.analytics.data.v1beta.IFilterExpression|null);
20002
+
20003
+ /** Comparison comparison. */
20004
+ public comparison?: (string|null);
20005
+
20006
+ /** Comparison _name. */
20007
+ public _name?: "name";
20008
+
20009
+ /** Comparison oneComparison. */
20010
+ public oneComparison?: ("dimensionFilter"|"comparison");
20011
+
20012
+ /**
20013
+ * Creates a new Comparison instance using the specified properties.
20014
+ * @param [properties] Properties to set
20015
+ * @returns Comparison instance
20016
+ */
20017
+ public static create(properties?: google.analytics.data.v1beta.IComparison): google.analytics.data.v1beta.Comparison;
20018
+
20019
+ /**
20020
+ * Encodes the specified Comparison message. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages.
20021
+ * @param message Comparison message or plain object to encode
20022
+ * @param [writer] Writer to encode to
20023
+ * @returns Writer
20024
+ */
20025
+ public static encode(message: google.analytics.data.v1beta.IComparison, writer?: $protobuf.Writer): $protobuf.Writer;
20026
+
20027
+ /**
20028
+ * Encodes the specified Comparison message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.Comparison.verify|verify} messages.
20029
+ * @param message Comparison message or plain object to encode
20030
+ * @param [writer] Writer to encode to
20031
+ * @returns Writer
20032
+ */
20033
+ public static encodeDelimited(message: google.analytics.data.v1beta.IComparison, writer?: $protobuf.Writer): $protobuf.Writer;
20034
+
20035
+ /**
20036
+ * Decodes a Comparison message from the specified reader or buffer.
20037
+ * @param reader Reader or buffer to decode from
20038
+ * @param [length] Message length if known beforehand
20039
+ * @returns Comparison
20040
+ * @throws {Error} If the payload is not a reader or valid buffer
20041
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20042
+ */
20043
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.Comparison;
20044
+
20045
+ /**
20046
+ * Decodes a Comparison message from the specified reader or buffer, length delimited.
20047
+ * @param reader Reader or buffer to decode from
20048
+ * @returns Comparison
20049
+ * @throws {Error} If the payload is not a reader or valid buffer
20050
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
20051
+ */
20052
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.Comparison;
20053
+
20054
+ /**
20055
+ * Verifies a Comparison message.
20056
+ * @param message Plain object to verify
20057
+ * @returns `null` if valid, otherwise the reason why it is not
20058
+ */
20059
+ public static verify(message: { [k: string]: any }): (string|null);
20060
+
20061
+ /**
20062
+ * Creates a Comparison message from a plain object. Also converts values to their respective internal types.
20063
+ * @param object Plain object
20064
+ * @returns Comparison
20065
+ */
20066
+ public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.Comparison;
20067
+
20068
+ /**
20069
+ * Creates a plain object from a Comparison message. Also converts values to other types if specified.
20070
+ * @param message Comparison
20071
+ * @param [options] Conversion options
20072
+ * @returns Plain object
20073
+ */
20074
+ public static toObject(message: google.analytics.data.v1beta.Comparison, options?: $protobuf.IConversionOptions): { [k: string]: any };
20075
+
20076
+ /**
20077
+ * Converts this Comparison to JSON.
20078
+ * @returns JSON object
20079
+ */
20080
+ public toJSON(): { [k: string]: any };
20081
+
20082
+ /**
20083
+ * Gets the default type url for Comparison
20084
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
20085
+ * @returns The default type url
20086
+ */
20087
+ public static getTypeUrl(typeUrlPrefix?: string): string;
20088
+ }
20089
+
19957
20090
  /** Properties of a FilterExpression. */
19958
20091
  interface IFilterExpression {
19959
20092
 
@@ -23625,6 +23758,115 @@ export namespace google {
23625
23758
  }
23626
23759
  }
23627
23760
 
23761
+ /** Properties of a ComparisonMetadata. */
23762
+ interface IComparisonMetadata {
23763
+
23764
+ /** ComparisonMetadata apiName */
23765
+ apiName?: (string|null);
23766
+
23767
+ /** ComparisonMetadata uiName */
23768
+ uiName?: (string|null);
23769
+
23770
+ /** ComparisonMetadata description */
23771
+ description?: (string|null);
23772
+ }
23773
+
23774
+ /** Represents a ComparisonMetadata. */
23775
+ class ComparisonMetadata implements IComparisonMetadata {
23776
+
23777
+ /**
23778
+ * Constructs a new ComparisonMetadata.
23779
+ * @param [properties] Properties to set
23780
+ */
23781
+ constructor(properties?: google.analytics.data.v1beta.IComparisonMetadata);
23782
+
23783
+ /** ComparisonMetadata apiName. */
23784
+ public apiName: string;
23785
+
23786
+ /** ComparisonMetadata uiName. */
23787
+ public uiName: string;
23788
+
23789
+ /** ComparisonMetadata description. */
23790
+ public description: string;
23791
+
23792
+ /**
23793
+ * Creates a new ComparisonMetadata instance using the specified properties.
23794
+ * @param [properties] Properties to set
23795
+ * @returns ComparisonMetadata instance
23796
+ */
23797
+ public static create(properties?: google.analytics.data.v1beta.IComparisonMetadata): google.analytics.data.v1beta.ComparisonMetadata;
23798
+
23799
+ /**
23800
+ * Encodes the specified ComparisonMetadata message. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages.
23801
+ * @param message ComparisonMetadata message or plain object to encode
23802
+ * @param [writer] Writer to encode to
23803
+ * @returns Writer
23804
+ */
23805
+ public static encode(message: google.analytics.data.v1beta.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
23806
+
23807
+ /**
23808
+ * Encodes the specified ComparisonMetadata message, length delimited. Does not implicitly {@link google.analytics.data.v1beta.ComparisonMetadata.verify|verify} messages.
23809
+ * @param message ComparisonMetadata message or plain object to encode
23810
+ * @param [writer] Writer to encode to
23811
+ * @returns Writer
23812
+ */
23813
+ public static encodeDelimited(message: google.analytics.data.v1beta.IComparisonMetadata, writer?: $protobuf.Writer): $protobuf.Writer;
23814
+
23815
+ /**
23816
+ * Decodes a ComparisonMetadata message from the specified reader or buffer.
23817
+ * @param reader Reader or buffer to decode from
23818
+ * @param [length] Message length if known beforehand
23819
+ * @returns ComparisonMetadata
23820
+ * @throws {Error} If the payload is not a reader or valid buffer
23821
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
23822
+ */
23823
+ public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.analytics.data.v1beta.ComparisonMetadata;
23824
+
23825
+ /**
23826
+ * Decodes a ComparisonMetadata message from the specified reader or buffer, length delimited.
23827
+ * @param reader Reader or buffer to decode from
23828
+ * @returns ComparisonMetadata
23829
+ * @throws {Error} If the payload is not a reader or valid buffer
23830
+ * @throws {$protobuf.util.ProtocolError} If required fields are missing
23831
+ */
23832
+ public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.analytics.data.v1beta.ComparisonMetadata;
23833
+
23834
+ /**
23835
+ * Verifies a ComparisonMetadata message.
23836
+ * @param message Plain object to verify
23837
+ * @returns `null` if valid, otherwise the reason why it is not
23838
+ */
23839
+ public static verify(message: { [k: string]: any }): (string|null);
23840
+
23841
+ /**
23842
+ * Creates a ComparisonMetadata message from a plain object. Also converts values to their respective internal types.
23843
+ * @param object Plain object
23844
+ * @returns ComparisonMetadata
23845
+ */
23846
+ public static fromObject(object: { [k: string]: any }): google.analytics.data.v1beta.ComparisonMetadata;
23847
+
23848
+ /**
23849
+ * Creates a plain object from a ComparisonMetadata message. Also converts values to other types if specified.
23850
+ * @param message ComparisonMetadata
23851
+ * @param [options] Conversion options
23852
+ * @returns Plain object
23853
+ */
23854
+ public static toObject(message: google.analytics.data.v1beta.ComparisonMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any };
23855
+
23856
+ /**
23857
+ * Converts this ComparisonMetadata to JSON.
23858
+ * @returns JSON object
23859
+ */
23860
+ public toJSON(): { [k: string]: any };
23861
+
23862
+ /**
23863
+ * Gets the default type url for ComparisonMetadata
23864
+ * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
23865
+ * @returns The default type url
23866
+ */
23867
+ public static getTypeUrl(typeUrlPrefix?: string): string;
23868
+ }
23869
+
23628
23870
  /** Properties of a DimensionCompatibility. */
23629
23871
  interface IDimensionCompatibility {
23630
23872