From d78238d4b57e4a21f485c6e60a60f3d980898be1 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 6 May 2026 09:45:58 +0000 Subject: [PATCH] Regenerate client from commit 7e41715 of spec repo --- .generator/schemas/v2/openapi.yaml | 29 +++++++++++-- src/datadogV2/api/api_widgets.rs | 42 ++++++++++++++++--- .../model/model_widget_attributes.rs | 6 ++- 3 files changed, 66 insertions(+), 11 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index df325279ee..3fb4155791 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -82741,7 +82741,12 @@ components: definition: $ref: "#/components/schemas/WidgetDefinition" is_favorited: - description: "Will be implemented soon. Currently always returns false." + description: |- + Whether the current user has favorited this widget. Populated on get, + batch_get, update, and search responses; create responses always return + `false` because a widget can only be favorited after it exists. + Favoriting itself is performed through the shared favorites API, not + this service. example: false type: boolean modified_at: @@ -134588,7 +134593,17 @@ paths: - teams_read /api/v2/widgets/{experience_type}: get: - description: Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination. + description: |- + Search and list widgets for a given experience type, with filtering, sorting, and pagination. + + **Response meta** carries totals scoped to the current filter: + - `filtered_total` — widgets matching the filter. + - `created_by_you_total` — among the matches, how many the current user created. + - `favorited_by_you_total` — among the matches, how many the current user has favorited. + - `created_by_anyone_total` — total widgets in the experience type, ignoring filters. + + Each returned widget includes `is_favorited` reflecting the current user's favorite status. + Favoriting itself is performed through the shared favorites API, not this endpoint. operationId: SearchWidgets parameters: - description: The experience type for the widget. @@ -134624,8 +134639,14 @@ paths: schema: type: string - description: |- - Sort field for the results. Prefix with `-` for descending order. - Allowed values: `title`, `created_at`, `modified_at`. + Sort field for the results. + + **`title`, `created_at`, `modified_at`** — both ascending and descending are + supported. Use the bare field name for ascending (e.g. `sort=title`) or prefix + with `-` for descending (e.g. `sort=-modified_at`). + + **`is_favorited`** — returns favorites-first ordering (favorited widgets first, + then the rest). Direction is fixed; the `-` prefix is ignored for this field. in: query name: sort schema: diff --git a/src/datadogV2/api/api_widgets.rs b/src/datadogV2/api/api_widgets.rs index 1f5cd318fb..f062d5a283 100644 --- a/src/datadogV2/api/api_widgets.rs +++ b/src/datadogV2/api/api_widgets.rs @@ -24,8 +24,14 @@ pub struct SearchWidgetsOptionalParams { pub filter_title: Option, /// Filter widgets by tags. Format as bracket-delimited CSV, e.g. `[tag1,tag2]`. pub filter_tags: Option, - /// Sort field for the results. Prefix with `-` for descending order. - /// Allowed values: `title`, `created_at`, `modified_at`. + /// Sort field for the results. + /// + /// **`title`, `created_at`, `modified_at`** — both ascending and descending are + /// supported. Use the bare field name for ascending (e.g. `sort=title`) or prefix + /// with `-` for descending (e.g. `sort=-modified_at`). + /// + /// **`is_favorited`** — returns favorites-first ordering (favorited widgets first, + /// then the rest). Direction is fixed; the `-` prefix is ignored for this field. pub sort: Option, /// Page number for pagination (0-indexed). pub page_number: Option, @@ -59,8 +65,14 @@ impl SearchWidgetsOptionalParams { self.filter_tags = Some(value); self } - /// Sort field for the results. Prefix with `-` for descending order. - /// Allowed values: `title`, `created_at`, `modified_at`. + /// Sort field for the results. + /// + /// **`title`, `created_at`, `modified_at`** — both ascending and descending are + /// supported. Use the bare field name for ascending (e.g. `sort=title`) or prefix + /// with `-` for descending (e.g. `sort=-modified_at`). + /// + /// **`is_favorited`** — returns favorites-first ordering (favorited widgets first, + /// then the rest). Direction is fixed; the `-` prefix is ignored for this field. pub fn sort(mut self, value: String) -> Self { self.sort = Some(value); self @@ -547,7 +559,16 @@ impl WidgetsAPI { } } - /// Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination. + /// Search and list widgets for a given experience type, with filtering, sorting, and pagination. + /// + /// **Response meta** carries totals scoped to the current filter: + /// - `filtered_total` — widgets matching the filter. + /// - `created_by_you_total` — among the matches, how many the current user created. + /// - `favorited_by_you_total` — among the matches, how many the current user has favorited. + /// - `created_by_anyone_total` — total widgets in the experience type, ignoring filters. + /// + /// Each returned widget includes `is_favorited` reflecting the current user's favorite status. + /// Favoriting itself is performed through the shared favorites API, not this endpoint. pub async fn search_widgets( &self, experience_type: crate::datadogV2::model::WidgetExperienceType, @@ -571,7 +592,16 @@ impl WidgetsAPI { } } - /// Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination. + /// Search and list widgets for a given experience type, with filtering, sorting, and pagination. + /// + /// **Response meta** carries totals scoped to the current filter: + /// - `filtered_total` — widgets matching the filter. + /// - `created_by_you_total` — among the matches, how many the current user created. + /// - `favorited_by_you_total` — among the matches, how many the current user has favorited. + /// - `created_by_anyone_total` — total widgets in the experience type, ignoring filters. + /// + /// Each returned widget includes `is_favorited` reflecting the current user's favorite status. + /// Favoriting itself is performed through the shared favorites API, not this endpoint. pub async fn search_widgets_with_http_info( &self, experience_type: crate::datadogV2::model::WidgetExperienceType, diff --git a/src/datadogV2/model/model_widget_attributes.rs b/src/datadogV2/model/model_widget_attributes.rs index d3140ef9c4..465cecafb7 100644 --- a/src/datadogV2/model/model_widget_attributes.rs +++ b/src/datadogV2/model/model_widget_attributes.rs @@ -17,7 +17,11 @@ pub struct WidgetAttributes { /// The definition of a widget, including its type and configuration. #[serde(rename = "definition")] pub definition: crate::datadogV2::model::WidgetDefinition, - /// Will be implemented soon. Currently always returns false. + /// Whether the current user has favorited this widget. Populated on get, + /// batch_get, update, and search responses; create responses always return + /// `false` because a widget can only be favorited after it exists. + /// Favoriting itself is performed through the shared favorites API, not + /// this service. #[serde(rename = "is_favorited")] pub is_favorited: bool, /// ISO 8601 timestamp of when the widget was last modified.