From a21f7a7c34774117cfd6f8f4696fb4de7aded6f5 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 17 Feb 2026 00:12:11 +0000 Subject: [PATCH] Regenerate client from commit e22d968 of spec repo --- .generator/schemas/v1/openapi.yaml | 37 +++++++++++ features/v1/dashboards.feature | 6 +- services/dashboards/src/v1/index.ts | 1 + .../dashboards/src/v1/models/Dashboard.ts | 9 +++ .../dashboards/src/v1/models/DashboardTab.ts | 65 +++++++++++++++++++ .../dashboards/src/v1/models/TypingInfo.ts | 2 + 6 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 services/dashboards/src/v1/models/DashboardTab.ts diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 3e86f3a82c2d..87bad04350b9 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -1390,6 +1390,13 @@ components: description: A role UUID. type: string type: array + tabs: + description: List of tabs for organizing dashboard widgets into groups. + items: + $ref: '#/components/schemas/DashboardTab' + maxItems: 100 + nullable: true + type: array tags: description: List of team names representing ownership of a dashboard. items: @@ -1681,6 +1688,36 @@ components: description: URL of the dashboard. type: string type: object + DashboardTab: + description: Dashboard tab for organizing widgets. + properties: + id: + description: UUID of the tab. + example: '' + format: uuid + type: string + name: + description: Name of the tab. + example: L + maxLength: 100 + minLength: 1 + type: string + widget_ids: + description: List of widget IDs belonging to this tab. The backend also + accepts positional references in @N format (1-indexed) as a convenience + for Terraform and other declarative tools. + example: + - 0 + items: + description: Widget ID. + format: int64 + type: integer + type: array + required: + - id + - name + - widget_ids + type: object DashboardTemplateVariable: description: Template variable. properties: diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index 349f7de6f9d7..180d587a837b 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -91,7 +91,7 @@ Feature: Dashboards @generated @skip @team:DataDog/dashboards-backend Scenario: Create a new dashboard returns "Bad Request" response Given new "CreateDashboard" request - And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tabs": [{"id": "", "name": "L", "widget_ids": [0]}], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} When the request is sent Then the response status is 400 Bad Request @@ -1342,7 +1342,7 @@ Feature: Dashboards Scenario: Update a dashboard returns "Bad Request" response Given new "UpdateDashboard" request And request contains "dashboard_id" parameter from "REPLACE.ME" - And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tabs": [{"id": "", "name": "L", "widget_ids": [0]}], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} When the request is sent Then the response status is 400 Bad Request @@ -1350,7 +1350,7 @@ Feature: Dashboards Scenario: Update a dashboard returns "Item Not Found" response Given new "UpdateDashboard" request And request contains "dashboard_id" parameter from "REPLACE.ME" - And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} + And body with value {"description": null, "is_read_only": false, "layout_type": "ordered", "notify_list": [], "reflow_type": "auto", "restricted_roles": [], "tabs": [{"id": "", "name": "L", "widget_ids": [0]}], "tags": [], "template_variable_presets": [{"template_variables": [{"values": []}]}], "template_variables": [{"available_values": ["my-host", "host1", "host2"], "default": "my-host", "defaults": ["my-host-1", "my-host-2"], "name": "host1", "prefix": "host", "type": "group"}], "title": "", "widgets": [{"definition": {"requests": {"fill": {"q": "avg:system.cpu.user{*}"}}, "type": "hostmap"}}]} When the request is sent Then the response status is 404 Item Not Found diff --git a/services/dashboards/src/v1/index.ts b/services/dashboards/src/v1/index.ts index c53bb2b81399..c33bad4cdd36 100644 --- a/services/dashboards/src/v1/index.ts +++ b/services/dashboards/src/v1/index.ts @@ -54,6 +54,7 @@ export { DashboardRestoreRequest } from "./models/DashboardRestoreRequest"; export { DashboardShareType } from "./models/DashboardShareType"; export { DashboardSummary } from "./models/DashboardSummary"; export { DashboardSummaryDefinition } from "./models/DashboardSummaryDefinition"; +export { DashboardTab } from "./models/DashboardTab"; export { DashboardTemplateVariable } from "./models/DashboardTemplateVariable"; export { DashboardTemplateVariablePreset } from "./models/DashboardTemplateVariablePreset"; export { DashboardTemplateVariablePresetValue } from "./models/DashboardTemplateVariablePresetValue"; diff --git a/services/dashboards/src/v1/models/Dashboard.ts b/services/dashboards/src/v1/models/Dashboard.ts index bbeda6aebb0b..0c74d00ef39e 100644 --- a/services/dashboards/src/v1/models/Dashboard.ts +++ b/services/dashboards/src/v1/models/Dashboard.ts @@ -2,6 +2,7 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client"; import { DashboardLayoutType } from "./DashboardLayoutType"; import { DashboardReflowType } from "./DashboardReflowType"; +import { DashboardTab } from "./DashboardTab"; import { DashboardTemplateVariable } from "./DashboardTemplateVariable"; import { DashboardTemplateVariablePreset } from "./DashboardTemplateVariablePreset"; import { Widget } from "./Widget"; @@ -59,6 +60,10 @@ export class Dashboard { * A list of role identifiers. Only the author and users associated with at least one of these roles can edit this dashboard. */ "restrictedRoles"?: Array; + /** + * List of tabs for organizing dashboard widgets into groups. + */ + "tabs"?: Array; /** * List of team names representing ownership of a dashboard. */ @@ -145,6 +150,10 @@ export class Dashboard { baseName: "restricted_roles", type: "Array", }, + tabs: { + baseName: "tabs", + type: "Array", + }, tags: { baseName: "tags", type: "Array", diff --git a/services/dashboards/src/v1/models/DashboardTab.ts b/services/dashboards/src/v1/models/DashboardTab.ts new file mode 100644 index 000000000000..5bebd4aeb689 --- /dev/null +++ b/services/dashboards/src/v1/models/DashboardTab.ts @@ -0,0 +1,65 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Dashboard tab for organizing widgets. + */ +export class DashboardTab { + /** + * UUID of the tab. + */ + "id": string; + /** + * Name of the tab. + */ + "name": string; + /** + * List of widget IDs belonging to this tab. The backend also accepts positional references in @N format (1-indexed) as a convenience for Terraform and other declarative tools. + */ + "widgetIds": Array; + /** + * 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 = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + widgetIds: { + baseName: "widget_ids", + type: "Array", + required: true, + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return DashboardTab.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/dashboards/src/v1/models/TypingInfo.ts b/services/dashboards/src/v1/models/TypingInfo.ts index b525f01c44e6..4f330fa6f1fa 100644 --- a/services/dashboards/src/v1/models/TypingInfo.ts +++ b/services/dashboards/src/v1/models/TypingInfo.ts @@ -21,6 +21,7 @@ import { DashboardGlobalTime } from "./DashboardGlobalTime"; import { DashboardRestoreRequest } from "./DashboardRestoreRequest"; import { DashboardSummary } from "./DashboardSummary"; import { DashboardSummaryDefinition } from "./DashboardSummaryDefinition"; +import { DashboardTab } from "./DashboardTab"; import { DashboardTemplateVariable } from "./DashboardTemplateVariable"; import { DashboardTemplateVariablePreset } from "./DashboardTemplateVariablePreset"; import { DashboardTemplateVariablePresetValue } from "./DashboardTemplateVariablePresetValue"; @@ -618,6 +619,7 @@ export const TypingInfo: ModelTypingInfo = { DashboardRestoreRequest: DashboardRestoreRequest, DashboardSummary: DashboardSummary, DashboardSummaryDefinition: DashboardSummaryDefinition, + DashboardTab: DashboardTab, DashboardTemplateVariable: DashboardTemplateVariable, DashboardTemplateVariablePreset: DashboardTemplateVariablePreset, DashboardTemplateVariablePresetValue: DashboardTemplateVariablePresetValue,