Skip to content

Commit 1d511e0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b951844 of spec repo (#3745)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent df0dcad commit 1d511e0

File tree

9 files changed

+296
-0
lines changed

9 files changed

+296
-0
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24274,6 +24274,7 @@ components:
2427424274
- $ref: "#/components/schemas/ToplistWidgetDefinition"
2427524275
- $ref: "#/components/schemas/TopologyMapWidgetDefinition"
2427624276
- $ref: "#/components/schemas/TreeMapWidgetDefinition"
24277+
- $ref: "#/components/schemas/WildcardWidgetDefinition"
2427724278
WidgetDisplayType:
2427824279
description: Type of display to use for the request.
2427924280
enum:
@@ -25045,6 +25046,81 @@ components:
2504525046
x-enum-varnames:
2504625047
- TIMESERIES
2504725048
- TOPLIST
25049+
WildcardWidgetDefinition:
25050+
description: >-
25051+
Custom visualization widget using Vega or Vega-Lite specifications. Combines standard Datadog data requests with a Vega or Vega-Lite JSON specification for flexible, custom visualizations.
25052+
properties:
25053+
custom_links:
25054+
description: List of custom links.
25055+
items:
25056+
$ref: "#/components/schemas/WidgetCustomLink"
25057+
type: array
25058+
requests:
25059+
description: List of data requests for the wildcard widget.
25060+
example: [{"formulas": ["formula": "query1"], "queries": [{"aggregator": "avg", "data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{*} by {env}"}], "response_format": "scalar"}]
25061+
items:
25062+
$ref: "#/components/schemas/WildcardWidgetRequest"
25063+
type: array
25064+
specification:
25065+
$ref: "#/components/schemas/WildcardWidgetSpecification"
25066+
time:
25067+
$ref: "#/components/schemas/WidgetTime"
25068+
title:
25069+
description: Title of the widget.
25070+
type: string
25071+
title_align:
25072+
$ref: "#/components/schemas/WidgetTextAlign"
25073+
title_size:
25074+
description: Size of the title.
25075+
type: string
25076+
type:
25077+
$ref: "#/components/schemas/WildcardWidgetDefinitionType"
25078+
required:
25079+
- type
25080+
- requests
25081+
- specification
25082+
type: object
25083+
WildcardWidgetDefinitionType:
25084+
default: wildcard
25085+
description: Type of the wildcard widget.
25086+
enum:
25087+
- wildcard
25088+
example: wildcard
25089+
type: string
25090+
x-enum-varnames:
25091+
- WILDCARD
25092+
WildcardWidgetRequest:
25093+
description: >-
25094+
Request object for the wildcard widget. Each variant represents a distinct data-fetching pattern: scalar formulas, timeseries formulas, list streams, and histograms.
25095+
oneOf:
25096+
- $ref: "#/components/schemas/TreeMapWidgetRequest"
25097+
- $ref: "#/components/schemas/TimeseriesWidgetRequest"
25098+
- $ref: "#/components/schemas/ListStreamWidgetRequest"
25099+
- $ref: "#/components/schemas/DistributionWidgetRequest"
25100+
WildcardWidgetSpecification:
25101+
description: >-
25102+
Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference.
25103+
properties:
25104+
contents:
25105+
description: The Vega or Vega-Lite JSON specification object.
25106+
example: {"$schema": "https://vega.github.io/schema/vega-lite/v5.json", "data": {"name": "table1"}, "description": "A simple bar chart", "encoding": {"x": {"field": "env", "sort": "-y", "type": "nominal"}, "y": {"field": "query1", "type": "quantitative"}}, "mark": "bar"}
25107+
type: object
25108+
type:
25109+
$ref: "#/components/schemas/WildcardWidgetSpecificationType"
25110+
required:
25111+
- type
25112+
- contents
25113+
type: object
25114+
WildcardWidgetSpecificationType:
25115+
description: Type of specification used by the wildcard widget.
25116+
enum:
25117+
- vega
25118+
- vega-lite
25119+
example: vega-lite
25120+
type: string
25121+
x-enum-varnames:
25122+
- VEGA
25123+
- VEGA_LITE
2504825124
securitySchemes:
2504925125
AuthZ:
2505025126
description: This API uses OAuth 2 with the implicit grant flow.

services/dashboards/src/v1/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,3 +358,8 @@ export { WidgetTimeWindows } from "./models/WidgetTimeWindows";
358358
export { WidgetVerticalAlign } from "./models/WidgetVerticalAlign";
359359
export { WidgetViewMode } from "./models/WidgetViewMode";
360360
export { WidgetVizType } from "./models/WidgetVizType";
361+
export { WildcardWidgetDefinition } from "./models/WildcardWidgetDefinition";
362+
export { WildcardWidgetDefinitionType } from "./models/WildcardWidgetDefinitionType";
363+
export { WildcardWidgetRequest } from "./models/WildcardWidgetRequest";
364+
export { WildcardWidgetSpecification } from "./models/WildcardWidgetSpecification";
365+
export { WildcardWidgetSpecificationType } from "./models/WildcardWidgetSpecificationType";

services/dashboards/src/v1/models/TypingInfo.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ import { WidgetNumberFormat } from "./WidgetNumberFormat";
179179
import { WidgetRequestStyle } from "./WidgetRequestStyle";
180180
import { WidgetSortBy } from "./WidgetSortBy";
181181
import { WidgetStyle } from "./WidgetStyle";
182+
import { WildcardWidgetDefinition } from "./WildcardWidgetDefinition";
183+
import { WildcardWidgetSpecification } from "./WildcardWidgetSpecification";
182184

183185
export const TypingInfo: ModelTypingInfo = {
184186
enumsMap: {
@@ -571,6 +573,8 @@ export const TypingInfo: ModelTypingInfo = {
571573
WidgetVerticalAlign: ["center", "top", "bottom"],
572574
WidgetViewMode: ["overall", "component", "both"],
573575
WidgetVizType: ["timeseries", "toplist"],
576+
WildcardWidgetDefinitionType: ["wildcard"],
577+
WildcardWidgetSpecificationType: ["vega", "vega-lite"],
574578
},
575579
oneOfMap: {
576580
BarChartWidgetDisplay: ["BarChartWidgetStacked", "BarChartWidgetFlat"],
@@ -658,13 +662,20 @@ export const TypingInfo: ModelTypingInfo = {
658662
"ToplistWidgetDefinition",
659663
"TopologyMapWidgetDefinition",
660664
"TreeMapWidgetDefinition",
665+
"WildcardWidgetDefinition",
661666
],
662667
WidgetSortOrderBy: ["WidgetFormulaSort", "WidgetGroupSort"],
663668
WidgetTime: [
664669
"WidgetLegacyLiveSpan",
665670
"WidgetNewLiveSpan",
666671
"WidgetNewFixedSpan",
667672
],
673+
WildcardWidgetRequest: [
674+
"TreeMapWidgetRequest",
675+
"TimeseriesWidgetRequest",
676+
"ListStreamWidgetRequest",
677+
"DistributionWidgetRequest",
678+
],
668679
},
669680
typeMap: {
670681
APIErrorResponse: APIErrorResponse,
@@ -863,5 +874,7 @@ export const TypingInfo: ModelTypingInfo = {
863874
WidgetRequestStyle: WidgetRequestStyle,
864875
WidgetSortBy: WidgetSortBy,
865876
WidgetStyle: WidgetStyle,
877+
WildcardWidgetDefinition: WildcardWidgetDefinition,
878+
WildcardWidgetSpecification: WildcardWidgetSpecification,
866879
},
867880
};

services/dashboards/src/v1/models/WidgetDefinition.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ import { TimeseriesWidgetDefinition } from "./TimeseriesWidgetDefinition";
3636
import { ToplistWidgetDefinition } from "./ToplistWidgetDefinition";
3737
import { TopologyMapWidgetDefinition } from "./TopologyMapWidgetDefinition";
3838
import { TreeMapWidgetDefinition } from "./TreeMapWidgetDefinition";
39+
import { WildcardWidgetDefinition } from "./WildcardWidgetDefinition";
3940

4041
/**
4142
* [Definition of the widget](https://docs.datadoghq.com/dashboards/widgets/).
@@ -77,4 +78,5 @@ export type WidgetDefinition =
7778
| ToplistWidgetDefinition
7879
| TopologyMapWidgetDefinition
7980
| TreeMapWidgetDefinition
81+
| WildcardWidgetDefinition
8082
| UnparsedObject;
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
import { WidgetCustomLink } from "./WidgetCustomLink";
4+
import { WidgetTextAlign } from "./WidgetTextAlign";
5+
import { WidgetTime } from "./WidgetTime";
6+
import { WildcardWidgetDefinitionType } from "./WildcardWidgetDefinitionType";
7+
import { WildcardWidgetRequest } from "./WildcardWidgetRequest";
8+
import { WildcardWidgetSpecification } from "./WildcardWidgetSpecification";
9+
10+
/**
11+
* Custom visualization widget using Vega or Vega-Lite specifications. Combines standard Datadog data requests with a Vega or Vega-Lite JSON specification for flexible, custom visualizations.
12+
*/
13+
export class WildcardWidgetDefinition {
14+
/**
15+
* List of custom links.
16+
*/
17+
"customLinks"?: Array<WidgetCustomLink>;
18+
/**
19+
* List of data requests for the wildcard widget.
20+
*/
21+
"requests": Array<WildcardWidgetRequest>;
22+
/**
23+
* Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference.
24+
*/
25+
"specification": WildcardWidgetSpecification;
26+
/**
27+
* Time setting for the widget.
28+
*/
29+
"time"?: WidgetTime;
30+
/**
31+
* Title of the widget.
32+
*/
33+
"title"?: string;
34+
/**
35+
* How to align the text on the widget.
36+
*/
37+
"titleAlign"?: WidgetTextAlign;
38+
/**
39+
* Size of the title.
40+
*/
41+
"titleSize"?: string;
42+
/**
43+
* Type of the wildcard widget.
44+
*/
45+
"type": WildcardWidgetDefinitionType;
46+
/**
47+
* A container for additional, undeclared properties.
48+
* This is a holder for any undeclared properties as specified with
49+
* the 'additionalProperties' keyword in the OAS document.
50+
*/
51+
"additionalProperties"?: { [key: string]: any };
52+
/**
53+
* @ignore
54+
*/
55+
"_unparsed"?: boolean;
56+
57+
/**
58+
* @ignore
59+
*/
60+
static readonly attributeTypeMap: AttributeTypeMap = {
61+
customLinks: {
62+
baseName: "custom_links",
63+
type: "Array<WidgetCustomLink>",
64+
},
65+
requests: {
66+
baseName: "requests",
67+
type: "Array<WildcardWidgetRequest>",
68+
required: true,
69+
},
70+
specification: {
71+
baseName: "specification",
72+
type: "WildcardWidgetSpecification",
73+
required: true,
74+
},
75+
time: {
76+
baseName: "time",
77+
type: "WidgetTime",
78+
},
79+
title: {
80+
baseName: "title",
81+
type: "string",
82+
},
83+
titleAlign: {
84+
baseName: "title_align",
85+
type: "WidgetTextAlign",
86+
},
87+
titleSize: {
88+
baseName: "title_size",
89+
type: "string",
90+
},
91+
type: {
92+
baseName: "type",
93+
type: "WildcardWidgetDefinitionType",
94+
required: true,
95+
},
96+
additionalProperties: {
97+
baseName: "additionalProperties",
98+
type: "{ [key: string]: any; }",
99+
},
100+
};
101+
102+
/**
103+
* @ignore
104+
*/
105+
static getAttributeTypeMap(): AttributeTypeMap {
106+
return WildcardWidgetDefinition.attributeTypeMap;
107+
}
108+
109+
public constructor() {}
110+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* Type of the wildcard widget.
5+
*/
6+
export type WildcardWidgetDefinitionType = typeof WILDCARD | UnparsedObject;
7+
export const WILDCARD = "wildcard";
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
import { DistributionWidgetRequest } from "./DistributionWidgetRequest";
4+
import { ListStreamWidgetRequest } from "./ListStreamWidgetRequest";
5+
import { TimeseriesWidgetRequest } from "./TimeseriesWidgetRequest";
6+
import { TreeMapWidgetRequest } from "./TreeMapWidgetRequest";
7+
8+
/**
9+
* Request object for the wildcard widget. Each variant represents a distinct data-fetching pattern: scalar formulas, timeseries formulas, list streams, and histograms.
10+
*/
11+
export type WildcardWidgetRequest =
12+
| TreeMapWidgetRequest
13+
| TimeseriesWidgetRequest
14+
| ListStreamWidgetRequest
15+
| DistributionWidgetRequest
16+
| UnparsedObject;
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
import { AttributeTypeMap } from "@datadog/datadog-api-client";
2+
3+
import { WildcardWidgetSpecificationType } from "./WildcardWidgetSpecificationType";
4+
5+
/**
6+
* Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference.
7+
*/
8+
export class WildcardWidgetSpecification {
9+
/**
10+
* The Vega or Vega-Lite JSON specification object.
11+
*/
12+
"contents": any;
13+
/**
14+
* Type of specification used by the wildcard widget.
15+
*/
16+
"type": WildcardWidgetSpecificationType;
17+
/**
18+
* A container for additional, undeclared properties.
19+
* This is a holder for any undeclared properties as specified with
20+
* the 'additionalProperties' keyword in the OAS document.
21+
*/
22+
"additionalProperties"?: { [key: string]: any };
23+
/**
24+
* @ignore
25+
*/
26+
"_unparsed"?: boolean;
27+
28+
/**
29+
* @ignore
30+
*/
31+
static readonly attributeTypeMap: AttributeTypeMap = {
32+
contents: {
33+
baseName: "contents",
34+
type: "any",
35+
required: true,
36+
},
37+
type: {
38+
baseName: "type",
39+
type: "WildcardWidgetSpecificationType",
40+
required: true,
41+
},
42+
additionalProperties: {
43+
baseName: "additionalProperties",
44+
type: "{ [key: string]: any; }",
45+
},
46+
};
47+
48+
/**
49+
* @ignore
50+
*/
51+
static getAttributeTypeMap(): AttributeTypeMap {
52+
return WildcardWidgetSpecification.attributeTypeMap;
53+
}
54+
55+
public constructor() {}
56+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* Type of specification used by the wildcard widget.
5+
*/
6+
export type WildcardWidgetSpecificationType =
7+
| typeof VEGA
8+
| typeof VEGA_LITE
9+
| UnparsedObject;
10+
export const VEGA = "vega";
11+
export const VEGA_LITE = "vega-lite";

0 commit comments

Comments
 (0)