@maxim_mazurok/gapi.client.cloudbilling-v1beta 0.2.20260313 → 0.2.20260605

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 +284 -1
  2. package/package.json +1 -1
  3. package/readme.md +22 -0
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://cloudbilling.googleapis.com/$discovery/rest?version=v1beta
12
- // Revision: 20260313
12
+ // Revision: 20260605
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -28,10 +28,96 @@ declare namespace gapi.client {
28
28
  ): void;
29
29
 
30
30
  namespace cloudbilling {
31
+ interface AgenticQueryInfo {
32
+ /** The columns queried. */
33
+ columns?: string;
34
+ /** The filter applied to the query. */
35
+ filter?: string;
36
+ /** The group-by clause applied to the query. */
37
+ groupBy?: string;
38
+ /** The row limit applied to the query. */
39
+ limit?: number;
40
+ /** The order-by clause applied to the query. */
41
+ orderBy?: string;
42
+ /** The parents (e.g. projects, billing accounts) queried. */
43
+ parents?: string[];
44
+ /** The view queried. */
45
+ view?: string;
46
+ }
47
+ interface Array {
48
+ /** The elements of the array. */
49
+ element?: ValueProto[];
50
+ }
51
+ interface BillingData {
52
+ /** Information about columns. */
53
+ columnInfo?: ColumnInfo[];
54
+ /** Rows. */
55
+ rows?: Row[];
56
+ }
57
+ interface BillingDataResource {
58
+ /** Optional. If not provided the billing account currently associated with the resource will be used. */
59
+ billingAccount?: string;
60
+ /** Required. Resource name for an entitity that can be used for authorization to access billing data such as `projects/{project}` or `billingAccounts/{billing_account}` */
61
+ resource?: string;
62
+ }
63
+ interface ColumnInfo {
64
+ /** Name of the column. */
65
+ column?: string;
66
+ }
67
+ interface DataSet {
68
+ /** Output only. Actual billing data returned from the Data Mart. Uses the formal message from the Billing Data Service. */
69
+ billingData?: BillingData;
70
+ /** Output only. The query used to fetch this data. */
71
+ queryInfo?: AgenticQueryInfo;
72
+ /** Output only. A suggested chart for the data set, used for UI rendering. */
73
+ suggestedChart?: SuggestedChart;
74
+ }
75
+ interface Datetime {
76
+ /** Represents bit field encoding of year/month/day/hour/minute/second. See class DatetimeValue in civil_time.h for details of encoding. */
77
+ bitFieldDatetimeSeconds?: string;
78
+ /** Non-negative fractions of a second at nanosecond resolution. */
79
+ nanos?: number;
80
+ }
31
81
  interface Decimal {
32
82
  /** The decimal value, as a string. The string representation consists of an optional sign, `+` (`U+002B`) or `-` (`U+002D`), followed by a sequence of zero or more decimal digits ("the integer"), optionally followed by a fraction, optionally followed by an exponent. An empty string **should** be interpreted as `0`. The fraction consists of a decimal point followed by zero or more decimal digits. The string must contain at least one digit in either the integer or the fraction. The number formed by the sign, the integer and the fraction is referred to as the significand. The exponent consists of the character `e` (`U+0065`) or `E` (`U+0045`) followed by one or more decimal digits. Services **should** normalize decimal values before storing them by: - Removing an explicitly-provided `+` sign (`+2.5` -> `2.5`). - Replacing a zero-length integer value with `0` (`.5` -> `0.5`). - Coercing the exponent character to upper-case, with explicit sign (`2.5e8` -> `2.5E+8`). - Removing an explicitly-provided zero exponent (`2.5E0` -> `2.5`). Services **may** perform additional normalization based on its own needs and the internal decimal implementation selected, such as shifting the decimal point and exponent value together (example: `2.5E-1` <-> `0.25`). Additionally, services **may** preserve trailing zeroes in the fraction to indicate increased precision, but are not required to do so. Note that only the `.` character is supported to divide the integer and the fraction; `,` **should not** be supported regardless of locale. Additionally, thousand separators **should not** be supported. If a service does support them, values **must** be normalized. The ENBF grammar is: DecimalString = '' | [Sign] Significand [Exponent]; Sign = '+' | '-'; Significand = Digits '.' | [Digits] '.' Digits; Exponent = ('e' | 'E') [Sign] Digits; Digits = { '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' }; Services **should** clearly document the range of supported values, the maximum supported precision (total number of digits), and, if applicable, the scale (number of digits after the decimal point), as well as how it behaves when receiving out-of-bounds values. Services **may** choose to accept values passed as input even when the value has a higher precision or scale than the service supports, and **should** round the value to fit the supported scale. Alternatively, the service **may** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if precision would be lost. Services **should** error with `400 Bad Request` (`INVALID_ARGUMENT` in gRPC) if the service receives a value outside of the supported range. */
33
83
  value?: string;
34
84
  }
85
+ interface FinalResult {
86
+ /** Output only. Data sets used to support the insights, suitable for UI rendering (tables/charts). */
87
+ dataSets?: DataSet[];
88
+ /** Output only. Contains the full natural language analysis, including thoughts, reasoning, and references. */
89
+ fullAnalysis?: string;
90
+ /** Output only. A list of discrete insights gleaned from the data. */
91
+ insights?: Insight[];
92
+ /** Output only. Links to interoperable tools (e.g., pre-filtered Cost Reports or BQE queries). */
93
+ interopLinks?: InteropLink[];
94
+ /** Output only. A list of suggested follow-up queries for the user. */
95
+ suggestedQueries?: SuggestedQuery[];
96
+ /** Output only. The full natural language summary (re-sent for consistency). */
97
+ summary?: string;
98
+ }
99
+ interface GenerateInsightsRequest {
100
+ /** Optional. Filters cost data by service id. Follows https://google.aip.dev/160 for the filter syntax. eg. filter: "service = 'C7E2-9256-1C43'" */
101
+ filter?: string;
102
+ /** Optional. Overrides the maximum iterations for any selected strategy. */
103
+ overriddenMaxIterationCounts?: number;
104
+ /** Optional. The billing account or projects to analyze. */
105
+ parents?: BillingDataResource[];
106
+ /** Required. The natural language prompt from the user. */
107
+ prompt?: string;
108
+ /** Optional. Additional context for personalization (e.g., user persona, role). */
109
+ userContext?: UserContext;
110
+ }
111
+ interface GenerateInsightsResponse {
112
+ /** Output only. The final structured results and metadata. Usually sent as the final message in the stream. */
113
+ finalResult?: FinalResult;
114
+ /** Output only. The request was rejected (e.g. out of scope). */
115
+ rejection?: Rejection;
116
+ /** Output only. A chunk of the natural language summary (customer-facing). The UI can append these chunks to provide a real-time "typing" effect. */
117
+ summaryChunk?: string;
118
+ /** Output only. A chunk of the agent's internal reasoning process. The UI can use this to render a "Thinking..." log or status. */
119
+ thoughtChunk?: string;
120
+ }
35
121
  interface GoogleCloudBillingBillingaccountpricesV1betaAggregationInfo {
36
122
  /** Interval at which usage is aggregated to compute cost. Example: "MONTHLY" interval indicates that usage is aggregated every month. */
37
123
  interval?: 'INTERVAL_UNSPECIFIED' | 'INTERVAL_MONTHLY' | 'INTERVAL_DAILY';
@@ -373,6 +459,36 @@ declare namespace gapi.client {
373
459
  /** Resource name for the SKU group. Example: "skuGroups/0e6403d1-4694-44d2-a696-7a78b1a69301". */
374
460
  name?: string;
375
461
  }
462
+ interface Insight {
463
+ /** Output only. The description of the insight. */
464
+ description?: string;
465
+ /** Output only. The severity of the insight, used for UI rendering (e.g., color-coding). */
466
+ severity?: 'SEVERITY_UNSPECIFIED' | 'INFO' | 'WARNING' | 'CRITICAL';
467
+ /** Output only. The title of the insight. */
468
+ title?: string;
469
+ }
470
+ interface InteropLink {
471
+ /** Output only. The label of the link, suitable for UI rendering. */
472
+ label?: string;
473
+ /** Output only. The type of the interop link, e.g., "COST_REPORT", "BQE_QUERY", etc. */
474
+ linkType?:
475
+ | 'LINK_TYPE_UNSPECIFIED'
476
+ | 'COST_REPORT'
477
+ | 'BQE_QUERY'
478
+ | 'FINOPS_HUB';
479
+ /** Output only. The URL of the link. */
480
+ url?: string;
481
+ }
482
+ interface Map {
483
+ /** Represents the map entries in the map. */
484
+ entry?: MapEntry[];
485
+ }
486
+ interface MapEntry {
487
+ /** Represents the serialized map key for the entry. */
488
+ key?: ValueProto;
489
+ /** Represents the serialized map value of the entry. */
490
+ value?: ValueProto;
491
+ }
376
492
  interface Money {
377
493
  /** The three-letter currency code defined in ISO 4217. */
378
494
  currencyCode?: string;
@@ -381,6 +497,115 @@ declare namespace gapi.client {
381
497
  /** The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar. */
382
498
  units?: string;
383
499
  }
500
+ interface Range {
501
+ /** Represents the end of the range. */
502
+ end?: ValueProto;
503
+ /** Represents the start of the range. */
504
+ start?: ValueProto;
505
+ }
506
+ interface Rejection {
507
+ /** Output only. A user-facing message explaining the rejection. */
508
+ displayMessage?: string;
509
+ /** Output only. The reason for the rejection. */
510
+ reason?: 'REASON_UNSPECIFIED' | 'EXPLICIT_OUT_OF_SCOPE';
511
+ }
512
+ interface Row {
513
+ /** Values for a row in the column order. */
514
+ values?: ValueProto[];
515
+ }
516
+ interface Struct {
517
+ /** The fields in the struct */
518
+ field?: ValueProto[];
519
+ }
520
+ interface SuggestedChart {
521
+ /** The title of the chart. */
522
+ chartTitle?: string;
523
+ /** The type of the chart. */
524
+ chartType?:
525
+ | 'CHART_TYPE_UNSPECIFIED'
526
+ | 'BAR_CHART'
527
+ | 'UNCHARTABLE'
528
+ | 'LINE_CHART'
529
+ | 'AREA_CHART';
530
+ /** The field used for the series (e.g., color-coding). Optional, but recommended for time-series data. */
531
+ seriesField?: string;
532
+ /** The field used for the x-axis. */
533
+ xAxisField?: string;
534
+ /** The label of the x-axis. */
535
+ xAxisLabel?: string;
536
+ /** The field used for the y-axis. */
537
+ yAxisField?: string;
538
+ /** The label of the y-axis. */
539
+ yAxisLabel?: string;
540
+ }
541
+ interface SuggestedQuery {
542
+ /** The natural language query. */
543
+ query?: string;
544
+ }
545
+ interface UserContext {
546
+ /** Optional. The user's persona (e.g., FinOps Manager, Developer). */
547
+ persona?: 'PERSONA_UNSPECIFIED' | 'FINOPS_MANAGER' | 'DEVELOPER';
548
+ /** Optional. The user's role (e.g., Billing Admin, Project Owner, etc.). */
549
+ role?: string;
550
+ }
551
+ interface ValueProto {
552
+ /** An array of value */
553
+ arrayValue?: Array;
554
+ /** Encoded bignumeric value. For the encoding format see documentation for BigNumericValue::SerializeAsProtoBytes(). */
555
+ bignumericValue?: string;
556
+ /** Primitive for bool. */
557
+ boolValue?: boolean;
558
+ /** Primitive for bytes. */
559
+ bytesValue?: string;
560
+ /** primitive for datetime */
561
+ datetimeValue?: Datetime;
562
+ /** Primitive for date. */
563
+ dateValue?: number;
564
+ /** Primitive for double. */
565
+ doubleValue?: number;
566
+ /** Tag 11 was used for specifying micros timestamps as int64, now obsolete. */
567
+ enumValue?: number;
568
+ /** Primitive for float. */
569
+ floatValue?: number;
570
+ /** Geography encoded using ::stlib::STGeographyEncoder */
571
+ geographyValue?: string;
572
+ /** Primitive value for int32. */
573
+ int32Value?: number;
574
+ /** Primitive for int64. */
575
+ int64Value?: string;
576
+ /** Encoded interval value. For the encoding format see documentation for IntervalValue::SerializeAsBytes(). */
577
+ intervalValue?: string;
578
+ /** Tag 22 was used for json value as bytes, now obsolete. Json value represented as a string document. */
579
+ jsonValue?: string;
580
+ /** Encoded map value. See go/googlesql_map. */
581
+ mapValue?: Map;
582
+ /** Encoded numeric value. For the encoding format see documentation for NumericValue::SerializeAsProtoBytes(). */
583
+ numericValue?: string;
584
+ /** Stores a serialized protocol message. */
585
+ protoValue?: string;
586
+ /** Encoded range value. See go/googlesql_range. */
587
+ rangeValue?: Range;
588
+ /** Primitive for string. */
589
+ stringValue?: string;
590
+ /** A struct of values */
591
+ structValue?: Struct;
592
+ /** Encoded timestamp_pico value. For the encoding format see documentation for googlesql::TimestampPico::SerializeAsBytes(). */
593
+ timestampPicoValue?: string;
594
+ /** primitive for timestamp */
595
+ timestampValue?: string;
596
+ /** Bit field encoding of hour/minute/second/nanos. See TimeValue class for details. */
597
+ timeValue?: string;
598
+ /** Encoded tokenlist value. copybara:strip_begin(internal-comment) See //search/tokens:token_list. copybara:strip_end */
599
+ tokenlistValue?: string;
600
+ /** Primitive for uint32. */
601
+ uint32Value?: number;
602
+ /** Primitive for uint64. */
603
+ uint64Value?: string;
604
+ /** Encoded uuid value. For the encoding format see documentation for UuidValue::SerializeAsBytes(). */
605
+ uuidValue?: string;
606
+ /** User code that switches on this oneoff enum must have a default case so builds won't break when new fields are added. */
607
+ ValueProtoSwitchMustHaveADefault?: boolean;
608
+ }
384
609
  interface ServicesResource {
385
610
  /** Gets a Google Cloud service visible to a billing account. */
386
611
  get(request?: {
@@ -886,11 +1111,69 @@ declare namespace gapi.client {
886
1111
  price: PriceResource;
887
1112
  prices: PricesResource;
888
1113
  }
1114
+ interface V1betaResource {
1115
+ /** Analyzes cost data for a billing account and/or specific projects. Returns a natural language summary and supporting datasets. */
1116
+ generateInsights(request: {
1117
+ /** V1 error format. */
1118
+ '$.xgafv'?: '1' | '2';
1119
+ /** OAuth access token. */
1120
+ access_token?: string;
1121
+ /** Data format for response. */
1122
+ alt?: 'json' | 'media' | 'proto';
1123
+ /** JSONP */
1124
+ callback?: string;
1125
+ /** Selector specifying which fields to include in a partial response. */
1126
+ fields?: string;
1127
+ /** 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. */
1128
+ key?: string;
1129
+ /** OAuth 2.0 token for the current user. */
1130
+ oauth_token?: string;
1131
+ /** Returns response with indentations and line breaks. */
1132
+ prettyPrint?: boolean;
1133
+ /** 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. */
1134
+ quotaUser?: string;
1135
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1136
+ upload_protocol?: string;
1137
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1138
+ uploadType?: string;
1139
+ /** Request body */
1140
+ resource: GenerateInsightsRequest;
1141
+ }): Request<GenerateInsightsResponse>;
1142
+ generateInsights(
1143
+ request: {
1144
+ /** V1 error format. */
1145
+ '$.xgafv'?: '1' | '2';
1146
+ /** OAuth access token. */
1147
+ access_token?: string;
1148
+ /** Data format for response. */
1149
+ alt?: 'json' | 'media' | 'proto';
1150
+ /** JSONP */
1151
+ callback?: string;
1152
+ /** Selector specifying which fields to include in a partial response. */
1153
+ fields?: string;
1154
+ /** 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. */
1155
+ key?: string;
1156
+ /** OAuth 2.0 token for the current user. */
1157
+ oauth_token?: string;
1158
+ /** Returns response with indentations and line breaks. */
1159
+ prettyPrint?: boolean;
1160
+ /** 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. */
1161
+ quotaUser?: string;
1162
+ /** Upload protocol for media (e.g. "raw", "multipart"). */
1163
+ upload_protocol?: string;
1164
+ /** Legacy upload protocol for media (e.g. "media", "multipart"). */
1165
+ uploadType?: string;
1166
+ },
1167
+ body: GenerateInsightsRequest,
1168
+ ): Request<GenerateInsightsResponse>;
1169
+ }
889
1170
 
890
1171
  const billingAccounts: BillingAccountsResource;
891
1172
 
892
1173
  const skuGroups: SkuGroupsResource;
893
1174
 
894
1175
  const skus: SkusResource;
1176
+
1177
+ const v1beta: V1betaResource;
895
1178
  }
896
1179
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.cloudbilling-v1beta",
3
- "version": "0.2.20260313",
3
+ "version": "0.2.20260605",
4
4
  "description": "TypeScript typings for Cloud Billing API v1beta",
5
5
  "repository": {
6
6
  "type": "git",
package/readme.md CHANGED
@@ -11,6 +11,23 @@ Install typings for Cloud Billing API:
11
11
  npm install @types/gapi.client.cloudbilling-v1beta --save-dev
12
12
  ```
13
13
 
14
+ ## TypeScript 6.0+
15
+
16
+ TypeScript 6.0 changed `types` to default to `[]`. You must now explicitly list type packages in `tsconfig.json`:
17
+
18
+ ```json
19
+ {
20
+ "compilerOptions": {
21
+ "types": [
22
+ "gapi",
23
+ "gapi.auth2",
24
+ "gapi.client",
25
+ "gapi.client.cloudbilling-v1beta"
26
+ ]
27
+ }
28
+ }
29
+ ```
30
+
14
31
  ## Usage
15
32
 
16
33
  You need to initialize Google API client in your code:
@@ -84,6 +101,11 @@ await gapi.client.cloudbilling.skuGroups.get({name: 'name'});
84
101
  Lists all publicly listed SKU groups.
85
102
  */
86
103
  await gapi.client.cloudbilling.skuGroups.list({});
104
+
105
+ /*
106
+ Analyzes cost data for a billing account and/or specific projects. Returns a natural language summary and supporting datasets.
107
+ */
108
+ await gapi.client.cloudbilling.generateInsights({});
87
109
  ```
88
110
 
89
111
  For provenance information see [Provenance section on NPM](https://www.npmjs.com/package/@maxim_mazurok/gapi.client.cloudbilling-v1beta#Provenance:~:text=none-,Provenance,-Built%20and%20signed)