Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24156,6 +24156,7 @@ components:
- $ref: "#/components/schemas/ToplistWidgetDefinition"
- $ref: "#/components/schemas/TopologyMapWidgetDefinition"
- $ref: "#/components/schemas/TreeMapWidgetDefinition"
- $ref: "#/components/schemas/WildcardWidgetDefinition"
WidgetDisplayType:
description: Type of display to use for the request.
enum:
Expand Down Expand Up @@ -24927,6 +24928,81 @@ components:
x-enum-varnames:
- TIMESERIES
- TOPLIST
WildcardWidgetDefinition:
description: >-
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.
properties:
custom_links:
description: List of custom links.
items:
$ref: "#/components/schemas/WidgetCustomLink"
type: array
requests:
description: List of data requests for the wildcard widget.
example: [{"formulas": ["formula": "query1"], "queries": [{"aggregator": "avg", "data_source": "metrics", "name": "query1", "query": "avg:system.cpu.user{*} by {env}"}], "response_format": "scalar"}]
items:
$ref: "#/components/schemas/WildcardWidgetRequest"
type: array
specification:
$ref: "#/components/schemas/WildcardWidgetSpecification"
time:
$ref: "#/components/schemas/WidgetTime"
title:
description: Title of the widget.
type: string
title_align:
$ref: "#/components/schemas/WidgetTextAlign"
title_size:
description: Size of the title.
type: string
type:
$ref: "#/components/schemas/WildcardWidgetDefinitionType"
required:
- type
- requests
- specification
type: object
WildcardWidgetDefinitionType:
default: wildcard
description: Type of the wildcard widget.
enum:
- wildcard
example: wildcard
type: string
x-enum-varnames:
- WILDCARD
WildcardWidgetRequest:
description: >-
Request object for the wildcard widget. Each variant represents a distinct data-fetching pattern: scalar formulas, timeseries formulas, list streams, and histograms.
oneOf:
- $ref: "#/components/schemas/TreeMapWidgetRequest"
- $ref: "#/components/schemas/TimeseriesWidgetRequest"
- $ref: "#/components/schemas/ListStreamWidgetRequest"
- $ref: "#/components/schemas/DistributionWidgetRequest"
WildcardWidgetSpecification:
description: >-
Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference.
properties:
contents:
description: The Vega or Vega-Lite JSON specification object.
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"}
type: object
type:
$ref: "#/components/schemas/WildcardWidgetSpecificationType"
required:
- type
- contents
type: object
WildcardWidgetSpecificationType:
description: Type of specification used by the wildcard widget.
enum:
- vega
- vega-lite
example: vega-lite
type: string
x-enum-varnames:
- VEGA
- VEGA_LITE
securitySchemes:
AuthZ:
description: This API uses OAuth 2 with the implicit grant flow.
Expand Down
5 changes: 5 additions & 0 deletions packages/datadog-api-client-v1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1348,5 +1348,10 @@ export { WidgetTimeWindows } from "./models/WidgetTimeWindows";
export { WidgetVerticalAlign } from "./models/WidgetVerticalAlign";
export { WidgetViewMode } from "./models/WidgetViewMode";
export { WidgetVizType } from "./models/WidgetVizType";
export { WildcardWidgetDefinition } from "./models/WildcardWidgetDefinition";
export { WildcardWidgetDefinitionType } from "./models/WildcardWidgetDefinitionType";
export { WildcardWidgetRequest } from "./models/WildcardWidgetRequest";
export { WildcardWidgetSpecification } from "./models/WildcardWidgetSpecification";
export { WildcardWidgetSpecificationType } from "./models/WildcardWidgetSpecificationType";

export { ObjectSerializer } from "./models/ObjectSerializer";
13 changes: 13 additions & 0 deletions packages/datadog-api-client-v1/models/ObjectSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,8 @@ import { WidgetNumberFormat } from "./WidgetNumberFormat";
import { WidgetRequestStyle } from "./WidgetRequestStyle";
import { WidgetSortBy } from "./WidgetSortBy";
import { WidgetStyle } from "./WidgetStyle";
import { WildcardWidgetDefinition } from "./WildcardWidgetDefinition";
import { WildcardWidgetSpecification } from "./WildcardWidgetSpecification";
import {
dateFromRFC3339String,
dateToRFC3339String,
Expand Down Expand Up @@ -1845,6 +1847,8 @@ const enumsMap: { [key: string]: any[] } = {
WidgetVerticalAlign: ["center", "top", "bottom"],
WidgetViewMode: ["overall", "component", "both"],
WidgetVizType: ["timeseries", "toplist"],
WildcardWidgetDefinitionType: ["wildcard"],
WildcardWidgetSpecificationType: ["vega", "vega-lite"],
};

const typeMap: { [index: string]: any } = {
Expand Down Expand Up @@ -2600,6 +2604,8 @@ const typeMap: { [index: string]: any } = {
WidgetRequestStyle: WidgetRequestStyle,
WidgetSortBy: WidgetSortBy,
WidgetStyle: WidgetStyle,
WildcardWidgetDefinition: WildcardWidgetDefinition,
WildcardWidgetSpecification: WildcardWidgetSpecification,
};

const oneOfMap: { [index: string]: string[] } = {
Expand Down Expand Up @@ -2796,13 +2802,20 @@ const oneOfMap: { [index: string]: string[] } = {
"ToplistWidgetDefinition",
"TopologyMapWidgetDefinition",
"TreeMapWidgetDefinition",
"WildcardWidgetDefinition",
],
WidgetSortOrderBy: ["WidgetFormulaSort", "WidgetGroupSort"],
WidgetTime: [
"WidgetLegacyLiveSpan",
"WidgetNewLiveSpan",
"WidgetNewFixedSpan",
],
WildcardWidgetRequest: [
"TreeMapWidgetRequest",
"TimeseriesWidgetRequest",
"ListStreamWidgetRequest",
"DistributionWidgetRequest",
],
};

export class ObjectSerializer {
Expand Down
2 changes: 2 additions & 0 deletions packages/datadog-api-client-v1/models/WidgetDefinition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { TimeseriesWidgetDefinition } from "./TimeseriesWidgetDefinition";
import { ToplistWidgetDefinition } from "./ToplistWidgetDefinition";
import { TopologyMapWidgetDefinition } from "./TopologyMapWidgetDefinition";
import { TreeMapWidgetDefinition } from "./TreeMapWidgetDefinition";
import { WildcardWidgetDefinition } from "./WildcardWidgetDefinition";

import { UnparsedObject } from "../../datadog-api-client-common/util";

Expand Down Expand Up @@ -83,4 +84,5 @@ export type WidgetDefinition =
| ToplistWidgetDefinition
| TopologyMapWidgetDefinition
| TreeMapWidgetDefinition
| WildcardWidgetDefinition
| UnparsedObject;
117 changes: 117 additions & 0 deletions packages/datadog-api-client-v1/models/WildcardWidgetDefinition.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
import { WidgetCustomLink } from "./WidgetCustomLink";
import { WidgetTextAlign } from "./WidgetTextAlign";
import { WidgetTime } from "./WidgetTime";
import { WildcardWidgetDefinitionType } from "./WildcardWidgetDefinitionType";
import { WildcardWidgetRequest } from "./WildcardWidgetRequest";
import { WildcardWidgetSpecification } from "./WildcardWidgetSpecification";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* 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.
*/
export class WildcardWidgetDefinition {
/**
* List of custom links.
*/
"customLinks"?: Array<WidgetCustomLink>;
/**
* List of data requests for the wildcard widget.
*/
"requests": Array<WildcardWidgetRequest>;
/**
* Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference.
*/
"specification": WildcardWidgetSpecification;
/**
* Time setting for the widget.
*/
"time"?: WidgetTime;
/**
* Title of the widget.
*/
"title"?: string;
/**
* How to align the text on the widget.
*/
"titleAlign"?: WidgetTextAlign;
/**
* Size of the title.
*/
"titleSize"?: string;
/**
* Type of the wildcard widget.
*/
"type": WildcardWidgetDefinitionType;

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
"additionalProperties"?: { [key: string]: any };

/**
* @ignore
*/
"_unparsed"?: boolean;

/**
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
customLinks: {
baseName: "custom_links",
type: "Array<WidgetCustomLink>",
},
requests: {
baseName: "requests",
type: "Array<WildcardWidgetRequest>",
required: true,
},
specification: {
baseName: "specification",
type: "WildcardWidgetSpecification",
required: true,
},
time: {
baseName: "time",
type: "WidgetTime",
},
title: {
baseName: "title",
type: "string",
},
titleAlign: {
baseName: "title_align",
type: "WidgetTextAlign",
},
titleSize: {
baseName: "title_size",
type: "string",
},
type: {
baseName: "type",
type: "WildcardWidgetDefinitionType",
required: true,
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return WildcardWidgetDefinition.attributeTypeMap;
}

public constructor() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/

import { UnparsedObject } from "../../datadog-api-client-common/util";

/**
* Type of the wildcard widget.
*/

export type WildcardWidgetDefinitionType = typeof WILDCARD | UnparsedObject;
export const WILDCARD = "wildcard";
22 changes: 22 additions & 0 deletions packages/datadog-api-client-v1/models/WildcardWidgetRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
import { DistributionWidgetRequest } from "./DistributionWidgetRequest";
import { ListStreamWidgetRequest } from "./ListStreamWidgetRequest";
import { TimeseriesWidgetRequest } from "./TimeseriesWidgetRequest";
import { TreeMapWidgetRequest } from "./TreeMapWidgetRequest";

import { UnparsedObject } from "../../datadog-api-client-common/util";

/**
* Request object for the wildcard widget. Each variant represents a distinct data-fetching pattern: scalar formulas, timeseries formulas, list streams, and histograms.
*/

export type WildcardWidgetRequest =
| TreeMapWidgetRequest
| TimeseriesWidgetRequest
| ListStreamWidgetRequest
| DistributionWidgetRequest
| UnparsedObject;
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/**
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
* This product includes software developed at Datadog (https://www.datadoghq.com/).
* Copyright 2020-Present Datadog, Inc.
*/
import { WildcardWidgetSpecificationType } from "./WildcardWidgetSpecificationType";

import { AttributeTypeMap } from "../../datadog-api-client-common/util";

/**
* Vega or Vega-Lite specification for custom visualization rendering. See https://vega.github.io/vega-lite/ for the full grammar reference.
*/
export class WildcardWidgetSpecification {
/**
* The Vega or Vega-Lite JSON specification object.
*/
"contents": any;
/**
* Type of specification used by the wildcard widget.
*/
"type": WildcardWidgetSpecificationType;

/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
"additionalProperties"?: { [key: string]: any };

/**
* @ignore
*/
"_unparsed"?: boolean;

/**
* @ignore
*/
static readonly attributeTypeMap: AttributeTypeMap = {
contents: {
baseName: "contents",
type: "any",
required: true,
},
type: {
baseName: "type",
type: "WildcardWidgetSpecificationType",
required: true,
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return WildcardWidgetSpecification.attributeTypeMap;
}

public constructor() {}
}
Loading
Loading