@maxim_mazurok/gapi.client.monitoring-v1 0.0.20230708 → 0.0.20230724

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.
Files changed (3) hide show
  1. package/index.d.ts +75 -40
  2. package/package.json +1 -1
  3. package/tests.ts +10 -9
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://monitoring.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230708
12
+ // Revision: 20230724
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -262,17 +262,6 @@ declare namespace gapi.client {
262
262
  nextPageToken?:
263
263
  string;
264
264
  }
265
- interface ListLabelsRequest {
266
- /** The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. */
267
- end?:
268
- string;
269
- /** A list of matchers encoded in the Prometheus label matcher format to constrain the values to series that satisfy them. */
270
- match?:
271
- string;
272
- /** The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. */
273
- start?:
274
- string;
275
- }
276
265
  interface ListMetricsScopesByMonitoredProjectResponse {
277
266
  /** A set of all metrics scopes that the specified monitored project has been added to. */
278
267
  metricsScopes?:
@@ -428,6 +417,17 @@ declare namespace gapi.client {
428
417
  timeout?:
429
418
  string;
430
419
  }
420
+ interface QueryLabelsRequest {
421
+ /** The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. */
422
+ end?:
423
+ string;
424
+ /** A list of matchers encoded in the Prometheus label matcher format to constrain the values to series that satisfy them. */
425
+ match?:
426
+ string;
427
+ /** The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. */
428
+ start?:
429
+ string;
430
+ }
431
431
  interface QueryRangeRequest {
432
432
  /** The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. */
433
433
  end?:
@@ -1407,8 +1407,8 @@ declare namespace gapi.client {
1407
1407
  string;
1408
1408
  }): Request<HttpBody>;
1409
1409
  }
1410
- interface LabelsResource {
1411
- /** Lists labels for metrics. */
1410
+ interface MetadataResource {
1411
+ /** Lists metadata for metrics. */
1412
1412
  list(request?: {
1413
1413
  /** V1 error format. */
1414
1414
  "$.xgafv"?:
@@ -1422,8 +1422,58 @@ declare namespace gapi.client {
1422
1422
  /** JSONP */
1423
1423
  callback?:
1424
1424
  string;
1425
- /** The end time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. */
1426
- end?:
1425
+ /** Selector specifying which fields to include in a partial response. */
1426
+ fields?:
1427
+ string;
1428
+ /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1429
+ key?:
1430
+ string;
1431
+ /** Maximum number of metrics to return. */
1432
+ limit?:
1433
+ string;
1434
+ /** Location of the resource information. Has to be "global" for now. */
1435
+ location:
1436
+ string;
1437
+ /** The metric name for which to query metadata. If unset, all metric metadata is returned. */
1438
+ metric?:
1439
+ string;
1440
+ /**
1441
+ * Required. The workspace on which to execute the request. It is not part of the open source API but used as a request path prefix to distinguish different virtual Prometheus
1442
+ * instances of Google Prometheus Engine. The format is: projects/PROJECT_ID_OR_NUMBER.
1443
+ */
1444
+ name:
1445
+ string;
1446
+ /** OAuth 2.0 token for the current user. */
1447
+ oauth_token?:
1448
+ string;
1449
+ /** Returns response with indentations and line breaks. */
1450
+ prettyPrint?:
1451
+ boolean;
1452
+ /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1453
+ quotaUser?:
1454
+ string;
1455
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1456
+ upload_protocol?:
1457
+ string;
1458
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1459
+ uploadType?:
1460
+ string;
1461
+ }): Request<HttpBody>;
1462
+ }
1463
+ interface V1Resource {
1464
+ /** Lists labels for metrics. */
1465
+ labels(request: {
1466
+ /** V1 error format. */
1467
+ "$.xgafv"?:
1468
+ string;
1469
+ /** OAuth access token. */
1470
+ access_token?:
1471
+ string;
1472
+ /** Data format for response. */
1473
+ alt?:
1474
+ string;
1475
+ /** JSONP */
1476
+ callback?:
1427
1477
  string;
1428
1478
  /** Selector specifying which fields to include in a partial response. */
1429
1479
  fields?:
@@ -1434,9 +1484,6 @@ declare namespace gapi.client {
1434
1484
  /** Location of the resource information. Has to be "global" now. */
1435
1485
  location:
1436
1486
  string;
1437
- /** A list of matchers encoded in the Prometheus label matcher format to constrain the values to series that satisfy them. */
1438
- match?:
1439
- string;
1440
1487
  /**
1441
1488
  * The workspace on which to execute the request. It is not part of the open source API but used as a request path prefix to distinguish different virtual Prometheus instances of
1442
1489
  * Google Prometheus Engine. The format is: projects/PROJECT_ID_OR_NUMBER.
@@ -1452,20 +1499,17 @@ declare namespace gapi.client {
1452
1499
  /** Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. */
1453
1500
  quotaUser?:
1454
1501
  string;
1455
- /** The start time to evaluate the query for. Either floating point UNIX seconds or RFC3339 formatted timestamp. */
1456
- start?:
1457
- string;
1458
1502
  /** Upload protocol for media (e.g. "raw", "multipart"). */
1459
1503
  upload_protocol?:
1460
1504
  string;
1461
1505
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1462
1506
  uploadType?:
1463
1507
  string;
1508
+ /** Request body */
1509
+ resource:
1510
+ QueryLabelsRequest;
1464
1511
  }): Request<HttpBody>;
1465
- }
1466
- interface MetadataResource {
1467
- /** Lists metadata for metrics. */
1468
- list(request?: {
1512
+ labels(request: {
1469
1513
  /** V1 error format. */
1470
1514
  "$.xgafv"?:
1471
1515
  string;
@@ -1484,18 +1528,12 @@ declare namespace gapi.client {
1484
1528
  /** API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. */
1485
1529
  key?:
1486
1530
  string;
1487
- /** Maximum number of metrics to return. */
1488
- limit?:
1489
- string;
1490
- /** Location of the resource information. Has to be "global" for now. */
1531
+ /** Location of the resource information. Has to be "global" now. */
1491
1532
  location:
1492
1533
  string;
1493
- /** The metric name for which to query metadata. If unset, all metric metadata is returned. */
1494
- metric?:
1495
- string;
1496
1534
  /**
1497
- * Required. The workspace on which to execute the request. It is not part of the open source API but used as a request path prefix to distinguish different virtual Prometheus
1498
- * instances of Google Prometheus Engine. The format is: projects/PROJECT_ID_OR_NUMBER.
1535
+ * The workspace on which to execute the request. It is not part of the open source API but used as a request path prefix to distinguish different virtual Prometheus instances of
1536
+ * Google Prometheus Engine. The format is: projects/PROJECT_ID_OR_NUMBER.
1499
1537
  */
1500
1538
  name:
1501
1539
  string;
@@ -1514,9 +1552,8 @@ declare namespace gapi.client {
1514
1552
  /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1515
1553
  uploadType?:
1516
1554
  string;
1517
- }): Request<HttpBody>;
1518
- }
1519
- interface V1Resource {
1555
+ },
1556
+ body: QueryLabelsRequest): Request<HttpBody>;
1520
1557
  /** Evaluate a PromQL query at a single point in time. */
1521
1558
  query(request: {
1522
1559
  /** V1 error format. */
@@ -1891,8 +1928,6 @@ declare namespace gapi.client {
1891
1928
  body: QuerySeriesRequest): Request<HttpBody>;
1892
1929
  label:
1893
1930
  LabelResource;
1894
- labels:
1895
- LabelsResource;
1896
1931
  metadata:
1897
1932
  MetadataResource;
1898
1933
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.monitoring-v1",
3
- "version": "0.0.20230708",
3
+ "version": "0.0.20230724",
4
4
  "description": "TypeScript typings for Cloud Monitoring API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230708
6
+ // Revision: 20230724
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -2839,6 +2839,15 @@ gapi.load('client', async () => {
2839
2839
  ],
2840
2840
  },
2841
2841
  });
2842
+ /** Lists labels for metrics. */
2843
+ await gapi.client.monitoring.projects.location.prometheus.api.v1.labels({
2844
+ location: "Test string",
2845
+ name: "Test string",
2846
+ }, {
2847
+ end: "Test string",
2848
+ match: "Test string",
2849
+ start: "Test string",
2850
+ });
2842
2851
  /** Evaluate a PromQL query at a single point in time. */
2843
2852
  await gapi.client.monitoring.projects.location.prometheus.api.v1.query({
2844
2853
  location: "Test string",
@@ -2885,14 +2894,6 @@ gapi.load('client', async () => {
2885
2894
  name: "Test string",
2886
2895
  start: "Test string",
2887
2896
  });
2888
- /** Lists labels for metrics. */
2889
- await gapi.client.monitoring.projects.location.prometheus.api.v1.labels.list({
2890
- end: "Test string",
2891
- location: "Test string",
2892
- match: "Test string",
2893
- name: "Test string",
2894
- start: "Test string",
2895
- });
2896
2897
  /** Lists metadata for metrics. */
2897
2898
  await gapi.client.monitoring.projects.location.prometheus.api.v1.metadata.list({
2898
2899
  limit: "Test string",