From a18a2e81806e36f0b9fdadd79d3ca8403bcc5f9c Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 30 Jun 2026 20:20:30 +0000 Subject: [PATCH] Regenerate client from commit a73640a of spec repo --- .generator/schemas/v1/openapi.yaml | 11 ++ .../frozen.json | 1 + .../recording.har | 110 ++++++++++++++++++ .../dashboards/CreateDashboard_153558925.ts | 58 +++++++++ features/v1/dashboards.feature | 9 ++ packages/datadog-api-client-v1/index.ts | 1 + .../models/ListStreamQuery.ts | 10 ++ .../models/ListStreamQueryVersion.ts | 15 +++ .../models/ObjectSerializer.ts | 1 + 9 files changed, 216 insertions(+) create mode 100644 cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-logs_transaction_stream-list_stream-widget-and-version_589023633/frozen.json create mode 100644 cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-logs_transaction_stream-list_stream-widget-and-version_589023633/recording.har create mode 100644 examples/v1/dashboards/CreateDashboard_153558925.ts create mode 100644 packages/datadog-api-client-v1/models/ListStreamQueryVersion.ts diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index d829783224aa..e11d56f929c1 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -5807,10 +5807,21 @@ components: description: Team handle. type: string type: array + version: + $ref: "#/components/schemas/ListStreamQueryVersion" required: - query_string - data_source type: object + ListStreamQueryVersion: + description: |- + Version of the query for the logs transaction stream widget. When omitted, v1 query behavior is + preserved. Set to `sequential_query` to use v2 behavior. **This feature is in Preview.** + enum: + - sequential_query + type: string + x-enum-varnames: + - SEQUENTIAL_QUERY ListStreamResponseFormat: description: Widget response format. enum: diff --git a/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-logs_transaction_stream-list_stream-widget-and-version_589023633/frozen.json b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-logs_transaction_stream-list_stream-widget-and-version_589023633/frozen.json new file mode 100644 index 000000000000..d979957dfb67 --- /dev/null +++ b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-logs_transaction_stream-list_stream-widget-and-version_589023633/frozen.json @@ -0,0 +1 @@ +"2026-06-30T18:19:26.621Z" diff --git a/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-logs_transaction_stream-list_stream-widget-and-version_589023633/recording.har b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-logs_transaction_stream-list_stream-widget-and-version_589023633/recording.har new file mode 100644 index 000000000000..c68d7c287e7b --- /dev/null +++ b/cassettes/v1/Dashboards_1335235736/Create-a-new-dashboard-with-logs_transaction_stream-list_stream-widget-and-version_589023633/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Dashboards/Create a new dashboard with logs_transaction_stream list_stream widget and version", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7d2dcbfd4f2570cd30d2db347a6251ab", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 487, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 559, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"layout_type\":\"ordered\",\"title\":\"Test-Create_a_new_dashboard_with_logs_transaction_stream_list_stream_widget_and_version-1782843566 with list_stream widget\",\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"}],\"query\":{\"compute\":[{\"aggregation\":\"count\",\"facet\":\"service\"}],\"data_source\":\"logs_transaction_stream\",\"group_by\":[{\"facet\":\"service\"}],\"query_string\":\"\",\"version\":\"sequential_query\"},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"}}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v1/dashboard" + }, + "response": { + "bodySize": 905, + "content": { + "mimeType": "application/json", + "size": 905, + "text": "{\"id\":\"72a-q2p-zau\",\"title\":\"Test-Create_a_new_dashboard_with_logs_transaction_stream_list_stream_widget_and_version-1782843566 with list_stream widget\",\"description\":null,\"author_handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"author_name\":\"CI Account\",\"layout_type\":\"ordered\",\"url\":\"/dashboard/72a-q2p-zau/test-createanewdashboardwithlogstransactionstreamliststreamwidgetandversion-1782\",\"template_variables\":null,\"widgets\":[{\"definition\":{\"requests\":[{\"columns\":[{\"field\":\"timestamp\",\"width\":\"auto\"}],\"query\":{\"compute\":[{\"aggregation\":\"count\",\"facet\":\"service\"}],\"data_source\":\"logs_transaction_stream\",\"group_by\":[{\"facet\":\"service\"}],\"query_string\":\"\",\"version\":\"sequential_query\"},\"response_format\":\"event_list\"}],\"type\":\"list_stream\"},\"id\":7740630869906828}],\"notify_list\":null,\"created_at\":\"2026-06-30T18:19:26.794909+00:00\",\"modified_at\":\"2026-06-30T18:19:26.794909+00:00\",\"restricted_roles\":[]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 380, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-30T18:19:26.631Z", + "time": 371 + }, + { + "_id": "6ad9f4e6a51014114aa481cf0551672f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 520, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v1/dashboard/72a-q2p-zau" + }, + "response": { + "bodySize": 38, + "content": { + "mimeType": "application/json", + "size": 38, + "text": "{\"deleted_dashboard_id\":\"72a-q2p-zau\"}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 379, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-06-30T18:19:27.026Z", + "time": 501 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v1/dashboards/CreateDashboard_153558925.ts b/examples/v1/dashboards/CreateDashboard_153558925.ts new file mode 100644 index 000000000000..fca5017ab3b1 --- /dev/null +++ b/examples/v1/dashboards/CreateDashboard_153558925.ts @@ -0,0 +1,58 @@ +/** + * Create a new dashboard with logs_transaction_stream list_stream widget and version + */ + +import { client, v1 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v1.DashboardsApi(configuration); + +const params: v1.DashboardsApiCreateDashboardRequest = { + body: { + layoutType: "ordered", + title: "Example-Dashboard with list_stream widget", + widgets: [ + { + definition: { + type: "list_stream", + requests: [ + { + columns: [ + { + width: "auto", + field: "timestamp", + }, + ], + query: { + dataSource: "logs_transaction_stream", + queryString: "", + groupBy: [ + { + facet: "service", + }, + ], + compute: [ + { + facet: "service", + aggregation: "count", + }, + ], + version: "sequential_query", + }, + responseFormat: "event_list", + }, + ], + }, + }, + ], + }, +}; + +apiInstance + .createDashboard(params) + .then((data: v1.Dashboard) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/v1/dashboards.feature b/features/v1/dashboards.feature index 932dc22b0b39..42df30e0a6f3 100644 --- a/features/v1/dashboards.feature +++ b/features/v1/dashboards.feature @@ -721,6 +721,15 @@ Feature: Dashboards And the response "widgets[0].definition.requests[0].query.compute[0].facet" is equal to "service" And the response "widgets[0].definition.requests[0].query.compute[0].aggregation" is equal to "count" + @team:DataDog/dashboards-backend + Scenario: Create a new dashboard with logs_transaction_stream list_stream widget and version + Given new "CreateDashboard" request + And body with value {"layout_type": "ordered", "title": "{{ unique }} with list_stream widget","widgets": [{"definition": {"type": "list_stream","requests": [{"columns":[{"width":"auto","field":"timestamp"}],"query":{"data_source":"logs_transaction_stream","query_string":"","group_by":[{"facet":"service"}],"compute":[{"facet":"service","aggregation":"count"}],"version":"sequential_query"},"response_format":"event_list"}]}}]} + When the request is sent + Then the response status is 200 OK + And the response "widgets[0].definition.requests[0].query.data_source" is equal to "logs_transaction_stream" + And the response "widgets[0].definition.requests[0].query.version" is equal to "sequential_query" + @team:DataDog/dashboards-backend Scenario: Create a new dashboard with manage_status widget Given new "CreateDashboard" request diff --git a/packages/datadog-api-client-v1/index.ts b/packages/datadog-api-client-v1/index.ts index e36d635fc832..7bf091d93ee2 100644 --- a/packages/datadog-api-client-v1/index.ts +++ b/packages/datadog-api-client-v1/index.ts @@ -588,6 +588,7 @@ export { ListStreamGroupByItems } from "./models/ListStreamGroupByItems"; export { ListStreamIssuePersona } from "./models/ListStreamIssuePersona"; export { ListStreamIssueState } from "./models/ListStreamIssueState"; export { ListStreamQuery } from "./models/ListStreamQuery"; +export { ListStreamQueryVersion } from "./models/ListStreamQueryVersion"; export { ListStreamResponseFormat } from "./models/ListStreamResponseFormat"; export { ListStreamSource } from "./models/ListStreamSource"; export { ListStreamWidgetDefinition } from "./models/ListStreamWidgetDefinition"; diff --git a/packages/datadog-api-client-v1/models/ListStreamQuery.ts b/packages/datadog-api-client-v1/models/ListStreamQuery.ts index c90adfa2050c..42923fd5284d 100644 --- a/packages/datadog-api-client-v1/models/ListStreamQuery.ts +++ b/packages/datadog-api-client-v1/models/ListStreamQuery.ts @@ -7,6 +7,7 @@ import { ListStreamComputeItems } from "./ListStreamComputeItems"; import { ListStreamGroupByItems } from "./ListStreamGroupByItems"; import { ListStreamIssuePersona } from "./ListStreamIssuePersona"; import { ListStreamIssueState } from "./ListStreamIssueState"; +import { ListStreamQueryVersion } from "./ListStreamQueryVersion"; import { ListStreamSource } from "./ListStreamSource"; import { WidgetEventSize } from "./WidgetEventSize"; import { WidgetFieldSort } from "./WidgetFieldSort"; @@ -73,6 +74,11 @@ export class ListStreamQuery { * Filter by team handles. Usable only with `issue_stream`. */ "teamHandles"?: Array; + /** + * Version of the query for the logs transaction stream widget. When omitted, v1 query behavior is + * preserved. Set to `sequential_query` to use v2 behavior. **This feature is in Preview.** + */ + "version"?: ListStreamQueryVersion; /** * A container for additional, undeclared properties. @@ -148,6 +154,10 @@ export class ListStreamQuery { baseName: "team_handles", type: "Array", }, + version: { + baseName: "version", + type: "ListStreamQueryVersion", + }, additionalProperties: { baseName: "additionalProperties", type: "{ [key: string]: any; }", diff --git a/packages/datadog-api-client-v1/models/ListStreamQueryVersion.ts b/packages/datadog-api-client-v1/models/ListStreamQueryVersion.ts new file mode 100644 index 000000000000..14228b09e494 --- /dev/null +++ b/packages/datadog-api-client-v1/models/ListStreamQueryVersion.ts @@ -0,0 +1,15 @@ +/** + * 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"; + +/** + * Version of the query for the logs transaction stream widget. When omitted, v1 query behavior is + * preserved. Set to `sequential_query` to use v2 behavior. **This feature is in Preview.** + */ + +export type ListStreamQueryVersion = typeof SEQUENTIAL_QUERY | UnparsedObject; +export const SEQUENTIAL_QUERY = "sequential_query"; diff --git a/packages/datadog-api-client-v1/models/ObjectSerializer.ts b/packages/datadog-api-client-v1/models/ObjectSerializer.ts index 011d49cb08cc..ddd42709dd47 100644 --- a/packages/datadog-api-client-v1/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v1/models/ObjectSerializer.ts @@ -1120,6 +1120,7 @@ const enumsMap: { [key: string]: any[] } = { ], ListStreamIssuePersona: ["all", "browser", "mobile", "backend"], ListStreamIssueState: ["OPEN", "IGNORED", "ACKNOWLEDGED", "RESOLVED"], + ListStreamQueryVersion: ["sequential_query"], ListStreamResponseFormat: ["event_list"], ListStreamSource: [ "logs_stream",