From 5de8c77ebe506bcb29ea6ce564fa4574b21dbd52 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Fri, 27 Mar 2026 09:44:41 +0000 Subject: [PATCH] Regenerate client from commit f364e4c of spec repo --- .generator/schemas/v2/openapi.yaml | 594 ------------ .../frozen.json | 1 + .../recording.har | 67 ++ .../frozen.json | 1 + .../recording.har | 210 +++++ .../frozen.json | 1 + .../recording.har | 157 ++++ .../frozen.json | 1 + .../recording.har | 67 ++ .../frozen.json | 1 + .../recording.har | 204 +++++ .../frozen.json | 1 + .../recording.har | 207 +++++ .../frozen.json | 1 + .../recording.har | 213 +++++ examples/v2/teams/CreateTeamConnections.ts | 1 - examples/v2/teams/DeleteTeamConnections.ts | 5 +- examples/v2/teams/ListTeamConnections.ts | 6 +- .../teams/ListTeamConnections_1473516764.ts | 1 - examples/v2/widgets/CreateWidget.ts | 33 - examples/v2/widgets/DeleteWidget.ts | 22 - examples/v2/widgets/GetWidget.ts | 22 - examples/v2/widgets/SearchWidgets.ts | 21 - examples/v2/widgets/UpdateWidget.ts | 34 - features/support/scenarios_model_mapping.ts | 87 -- features/v2/given.json | 8 +- features/v2/teams.feature | 57 +- features/v2/undo.json | 44 +- features/v2/widgets.feature | 115 --- .../datadog-api-client-v2/apis/WidgetsApi.ts | 850 ------------------ packages/datadog-api-client-v2/index.ts | 25 - .../models/CreateOrUpdateWidgetRequest.ts | 54 -- .../CreateOrUpdateWidgetRequestAttributes.ts | 62 -- .../models/CreateOrUpdateWidgetRequestData.ts | 63 -- .../models/ObjectSerializer.ts | 51 -- .../models/WidgetAttributes.ts | 90 -- .../models/WidgetData.ts | 81 -- .../models/WidgetDefinition.ts | 64 -- .../models/WidgetExperienceType.ts | 22 - .../models/WidgetIncludedUser.ts | 71 -- .../models/WidgetIncludedUserAttributes.ts | 60 -- .../models/WidgetListResponse.ts | 72 -- .../models/WidgetRelationshipData.ts | 62 -- .../models/WidgetRelationshipItem.ts | 53 -- .../models/WidgetRelationships.ts | 61 -- .../models/WidgetResponse.ts | 63 -- .../models/WidgetSearchMeta.ts | 80 -- .../models/WidgetType.ts | 45 - 48 files changed, 1180 insertions(+), 2931 deletions(-) create mode 100644 cassettes/v2/Teams_3116892301/Create-team-connections-returns-Bad-Request-response_2428370037/frozen.json create mode 100644 cassettes/v2/Teams_3116892301/Create-team-connections-returns-Bad-Request-response_2428370037/recording.har create mode 100644 cassettes/v2/Teams_3116892301/Create-team-connections-returns-Conflict-response_79021749/frozen.json create mode 100644 cassettes/v2/Teams_3116892301/Create-team-connections-returns-Conflict-response_79021749/recording.har create mode 100644 cassettes/v2/Teams_3116892301/Create-team-connections-returns-Created-response_993325971/frozen.json create mode 100644 cassettes/v2/Teams_3116892301/Create-team-connections-returns-Created-response_993325971/recording.har create mode 100644 cassettes/v2/Teams_3116892301/Delete-team-connections-returns-Bad-Request-response_4153956674/frozen.json create mode 100644 cassettes/v2/Teams_3116892301/Delete-team-connections-returns-Bad-Request-response_4153956674/recording.har create mode 100644 cassettes/v2/Teams_3116892301/Delete-team-connections-returns-No-Content-response_2778320456/frozen.json create mode 100644 cassettes/v2/Teams_3116892301/Delete-team-connections-returns-No-Content-response_2778320456/recording.har create mode 100644 cassettes/v2/Teams_3116892301/List-team-connections-returns-OK-response_2716431901/frozen.json create mode 100644 cassettes/v2/Teams_3116892301/List-team-connections-returns-OK-response_2716431901/recording.har create mode 100644 cassettes/v2/Teams_3116892301/List-team-connections-with-filters-returns-OK-response_530453408/frozen.json create mode 100644 cassettes/v2/Teams_3116892301/List-team-connections-with-filters-returns-OK-response_530453408/recording.har delete mode 100644 examples/v2/widgets/CreateWidget.ts delete mode 100644 examples/v2/widgets/DeleteWidget.ts delete mode 100644 examples/v2/widgets/GetWidget.ts delete mode 100644 examples/v2/widgets/SearchWidgets.ts delete mode 100644 examples/v2/widgets/UpdateWidget.ts delete mode 100644 features/v2/widgets.feature delete mode 100644 packages/datadog-api-client-v2/apis/WidgetsApi.ts delete mode 100644 packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequest.ts delete mode 100644 packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestAttributes.ts delete mode 100644 packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestData.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetAttributes.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetData.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetDefinition.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetExperienceType.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetIncludedUser.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetIncludedUserAttributes.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetListResponse.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetRelationshipData.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetRelationshipItem.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetRelationships.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetResponse.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetSearchMeta.ts delete mode 100644 packages/datadog-api-client-v2/models/WidgetType.ts diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 34f94ce65a0c..e889415714c2 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -15324,41 +15324,6 @@ components: id: $ref: "#/components/schemas/ApiID" type: object - CreateOrUpdateWidgetRequest: - description: Request body for creating or updating a widget. - properties: - data: - $ref: "#/components/schemas/CreateOrUpdateWidgetRequestData" - required: - - data - type: object - CreateOrUpdateWidgetRequestAttributes: - description: Attributes for creating or updating a widget. - properties: - definition: - $ref: "#/components/schemas/WidgetDefinition" - tags: - description: User-defined tags for organizing the widget. - items: - type: string - nullable: true - type: array - required: - - definition - type: object - CreateOrUpdateWidgetRequestData: - description: Data for creating or updating a widget. - properties: - attributes: - $ref: "#/components/schemas/CreateOrUpdateWidgetRequestAttributes" - type: - description: Widgets resource type. - example: widgets - type: string - required: - - type - - attributes - type: object CreatePageRequest: description: Full request to trigger an On-Call Page. example: @@ -71710,136 +71675,6 @@ components: - FRIDAY - SATURDAY - SUNDAY - WidgetAttributes: - description: Attributes of a widget resource. - properties: - created_at: - description: ISO 8601 timestamp of when the widget was created. - example: "2024-01-15T00:00:00.000Z" - type: string - definition: - $ref: "#/components/schemas/WidgetDefinition" - is_favorited: - description: "Will be implemented soon. Currently always returns false." - example: false - type: boolean - modified_at: - description: ISO 8601 timestamp of when the widget was last modified. - example: "2024-01-15T00:00:00.000Z" - type: string - tags: - description: User-defined tags for organizing widgets. - example: - - "team:my-team" - items: - type: string - nullable: true - type: array - required: - - definition - - tags - - is_favorited - - created_at - - modified_at - type: object - WidgetData: - description: A widget resource object. - properties: - attributes: - $ref: "#/components/schemas/WidgetAttributes" - id: - description: The unique identifier of the widget. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - type: string - relationships: - $ref: "#/components/schemas/WidgetRelationships" - type: - description: Widgets resource type. - example: widgets - type: string - required: - - id - - type - - attributes - type: object - WidgetDefinition: - additionalProperties: {} - description: The definition of a widget, including its type and configuration. - properties: - title: - description: The display title of the widget. - example: My Widget - maxLength: 100 - minLength: 1 - type: string - type: - $ref: "#/components/schemas/WidgetType" - required: - - type - - title - type: object - WidgetExperienceType: - description: Widget experience types that differentiate between the products using the specific widget. - enum: - - ccm_reports - - logs_reports - - csv_reports - - product_analytics - example: ccm_reports - type: string - x-enum-varnames: - - CCM_REPORTS - - LOGS_REPORTS - - CSV_REPORTS - - PRODUCT_ANALYTICS - WidgetIncludedUser: - description: A user resource included in the response. - properties: - attributes: - $ref: "#/components/schemas/WidgetIncludedUserAttributes" - id: - description: The unique identifier of the user. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - type: string - type: - description: Users resource type. - example: users - type: string - required: - - id - - type - type: object - WidgetIncludedUserAttributes: - description: Attributes of an included user resource. - properties: - handle: - description: The email handle of the user. - example: "john.doe@example.com" - type: string - name: - description: The display name of the user. - example: "John Doe" - nullable: true - type: string - type: object - WidgetListResponse: - description: Response containing a list of widgets. - properties: - data: - description: List of widget resources. - items: - $ref: "#/components/schemas/WidgetData" - type: array - included: - description: Array of user resources related to the widgets. - items: - $ref: "#/components/schemas/WidgetIncludedUser" - type: array - meta: - $ref: "#/components/schemas/WidgetSearchMeta" - required: - - data - type: object WidgetLiveSpan: description: The available timeframes depend on the widget you are using. enum: @@ -71876,108 +71711,6 @@ components: - PAST_SIX_MONTHS - PAST_ONE_YEAR - ALERT - WidgetRelationshipData: - description: Relationship data referencing a user resource. - properties: - id: - description: The unique identifier of the user. - example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890" - type: string - type: - description: Users resource type. - example: users - type: string - required: - - id - - type - type: object - WidgetRelationshipItem: - description: A JSON:API relationship to a user. - properties: - data: - $ref: "#/components/schemas/WidgetRelationshipData" - type: object - WidgetRelationships: - description: Relationships of the widget resource. - properties: - created_by: - $ref: "#/components/schemas/WidgetRelationshipItem" - description: The user who created the widget. - modified_by: - $ref: "#/components/schemas/WidgetRelationshipItem" - description: The user who last modified the widget. - type: object - WidgetResponse: - description: Response containing a single widget. - properties: - data: - $ref: "#/components/schemas/WidgetData" - included: - description: Array of user resources related to the widget. - items: - $ref: "#/components/schemas/WidgetIncludedUser" - type: array - required: - - data - type: object - WidgetSearchMeta: - description: Metadata about the search results. - properties: - created_by_anyone_total: - description: Total number of widgets created by anyone. - format: int64 - type: integer - created_by_you_total: - description: Total number of widgets created by the current user. - format: int64 - type: integer - favorited_by_you_total: - description: Total number of widgets favorited by the current user. - format: int64 - type: integer - filtered_total: - description: Total number of widgets matching the current filter criteria. - format: int64 - type: integer - type: object - WidgetType: - description: |- - Widget types that are allowed to be stored as individual records. - This is not a complete list of dashboard and notebook widget types. - enum: - - bar_chart - - change - - cloud_cost_summary - - cohort - - funnel - - geomap - - list_stream - - query_table - - query_value - - retention_curve - - sankey - - sunburst - - timeseries - - toplist - - treemap - example: bar_chart - type: string - x-enum-varnames: - - BAR_CHART - - CHANGE - - CLOUD_COST_SUMMARY - - COHORT - - FUNNEL - - GEOMAP - - LIST_STREAM - - QUERY_TABLE - - QUERY_VALUE - - RETENTION_CURVE - - SANKEY - - SUNBURST - - TIMESERIES - - TOPLIST - - TREEMAP WorkflowData: description: Data related to the workflow. properties: @@ -110133,328 +109866,6 @@ paths: operator: OR permissions: - 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. - operationId: SearchWidgets - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - - description: Filter widgets by widget type. - in: query - name: filter[widgetType] - schema: - $ref: "#/components/schemas/WidgetType" - - description: Filter widgets by the email handle of the creator. - in: query - name: filter[creatorHandle] - schema: - example: "john.doe@example.com" - type: string - - description: Filter to only widgets favorited by the current user. - in: query - name: filter[isFavorited] - schema: - type: boolean - - description: Filter widgets by title (substring match). - in: query - name: filter[title] - schema: - type: string - - description: Filter widgets by tags. Format as bracket-delimited CSV, e.g. `[tag1,tag2]`. - in: query - name: filter[tags] - schema: - type: string - - description: |- - Sort field for the results. Prefix with `-` for descending order. - Allowed values: `title`, `created_at`, `modified_at`. - in: query - name: sort - schema: - default: "-modified_at" - example: "-modified_at" - type: string - - description: Page number for pagination (0-indexed). - in: query - name: page[number] - schema: - default: 0 - minimum: 0 - type: integer - - description: Number of widgets per page. - in: query - name: page[size] - schema: - default: 50 - maximum: 100 - type: integer - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WidgetListResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Search widgets - tags: - - Widgets - x-permission: - operator: OR - permissions: - - cloud_cost_management_read - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_read - post: - description: Create a new widget for a given experience type. - operationId: CreateWidget - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateOrUpdateWidgetRequest" - description: Widget request body. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WidgetResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Create a widget - tags: - - Widgets - x-codegen-request-body-name: body - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_write - /api/v2/widgets/{experience_type}/{uuid}: - delete: - description: Soft-delete a widget by its UUID for a given experience type. - operationId: DeleteWidget - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - - description: The UUID of the widget. - in: path - name: uuid - required: true - schema: - format: uuid - type: string - responses: - "204": - description: No Content - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Delete a widget - tags: - - Widgets - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_write - get: - description: Retrieve a widget by its UUID for a given experience type. - operationId: GetWidget - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - - description: The UUID of the widget. - in: path - name: uuid - required: true - schema: - format: uuid - type: string - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WidgetResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Get a widget - tags: - - Widgets - x-permission: - operator: OR - permissions: - - cloud_cost_management_read - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_read - put: - description: Update a widget by its UUID for a given experience type. This performs a full replacement of the widget definition. - operationId: UpdateWidget - parameters: - - description: The experience type for the widget. - in: path - name: experience_type - required: true - schema: - $ref: "#/components/schemas/WidgetExperienceType" - - description: The UUID of the widget. - in: path - name: uuid - required: true - schema: - format: uuid - type: string - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/CreateOrUpdateWidgetRequest" - description: Widget request body. - required: true - responses: - "200": - content: - application/json: - schema: - $ref: "#/components/schemas/WidgetResponse" - description: OK - "400": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Bad Request - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "404": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Not Found - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Update a widget - tags: - - Widgets - x-codegen-request-body-name: body - x-permission: - operator: OR - permissions: - - cloud_cost_management_write - - generate_log_reports - - manage_log_reports - - product_analytics_saved_widgets_write /api/v2/workflows: post: description: Create a new workflow, returning the workflow ID. This API requires a [registered application key](https://docs.datadoghq.com/api/latest/action-connection/#register-a-new-app-key). Alternatively, you can configure these permissions [in the UI](https://docs.datadoghq.com/account_management/api-app-keys/#actions-api-access). @@ -111305,11 +110716,6 @@ tags: externalDocs: url: https://docs.datadoghq.com/account_management/users name: Users - - description: |- - Create, read, update, and delete saved widgets. Widgets are reusable - visualization components stored independently from any dashboard or notebook, - partitioned by experience type and identified by a UUID. - name: Widgets - description: |- Datadog Workflow Automation allows you to automate your end-to-end processes by connecting Datadog with the rest of your tech stack. Build workflows to auto-remediate your alerts, streamline your incident and security processes, and reduce manual toil. Workflow Automation supports over 1,000+ OOTB actions, including AWS, JIRA, ServiceNow, GitHub, and OpenAI. Learn more in our Workflow Automation docs [here](https://docs.datadoghq.com/service_management/workflows/). externalDocs: diff --git a/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Bad-Request-response_2428370037/frozen.json b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Bad-Request-response_2428370037/frozen.json new file mode 100644 index 000000000000..6229ee2404c2 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Bad-Request-response_2428370037/frozen.json @@ -0,0 +1 @@ +"2026-03-27T09:09:04.870Z" diff --git a/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Bad-Request-response_2428370037/recording.har b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Bad-Request-response_2428370037/recording.har new file mode 100644 index 000000000000..eaf55355ff6d --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Bad-Request-response_2428370037/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Teams/Create team connections returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c6a73f23f19150364cfcd6f24bba772e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 11, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 596, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/connections" + }, + "response": { + "bodySize": 127, + "content": { + "mimeType": "application/vnd.api+json", + "size": 127, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"data\\\" at least one team connection must be provided\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2026-03-27T09:09:04.874Z", + "time": 458 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Conflict-response_79021749/frozen.json b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Conflict-response_79021749/frozen.json new file mode 100644 index 000000000000..71007f43c571 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Conflict-response_79021749/frozen.json @@ -0,0 +1 @@ +"2026-03-27T09:28:24.368Z" diff --git a/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Conflict-response_79021749/recording.har b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Conflict-response_79021749/recording.har new file mode 100644 index 000000000000..80f1904bea22 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Conflict-response_79021749/recording.har @@ -0,0 +1,210 @@ +{ + "log": { + "_recordingName": "Teams/Create team connections returns \"Conflict\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "41a6dab268b8510b2dc324d5fa75ae09", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 115, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-84ab6777f7201a32\",\"name\":\"test-name-84ab6777f7201a32\"},\"type\":\"team\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team" + }, + "response": { + "bodySize": 661, + "content": { + "mimeType": "application/vnd.api+json", + "size": 661, + "text": "{\"data\":{\"id\":\"be93b665-0a69-4573-8ef4-56f6a741c1a1\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":10,\"created_at\":\"2026-03-27T09:28:24.862516+00:00\",\"description\":null,\"handle\":\"test-handle-84ab6777f7201a32\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-03-27T09:28:24.862516+00:00\",\"name\":\"test-name-84ab6777f7201a32\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/be93b665-0a69-4573-8ef4-56f6a741c1a1/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/be93b665-0a69-4573-8ef4-56f6a741c1a1/permission-settings\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 662, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:28:24.372Z", + "time": 568 + }, + { + "_id": "1ac41fd9f784940b18916a8a7ecd402e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 273, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"be93b665-0a69-4573-8ef4-56f6a741c1a1\",\"type\":\"team\"}}},\"type\":\"team_connection\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/connections" + }, + "response": { + "bodySize": 317, + "content": { + "mimeType": "application/vnd.api+json", + "size": 317, + "text": "{\"data\":[{\"id\":\"4e4b0094-29bf-11f1-aeac-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"be93b665-0a69-4573-8ef4-56f6a741c1a1\",\"type\":\"team\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:28:24.945Z", + "time": 516 + }, + { + "_id": "1ac41fd9f784940b18916a8a7ecd402e", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 273, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"be93b665-0a69-4573-8ef4-56f6a741c1a1\",\"type\":\"team\"}}},\"type\":\"team_connection\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/connections" + }, + "response": { + "bodySize": 133, + "content": { + "mimeType": "application/vnd.api+json", + "size": 133, + "text": "{\"errors\":[{\"status\":\"409\",\"title\":\"Conflict\",\"detail\":\"failed to add team connections: one or more team attributes already exist\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 409, + "statusText": "Conflict" + }, + "startedDateTime": "2026-03-27T09:28:25.465Z", + "time": 160 + }, + { + "_id": "fb8f40a0fece78aa5141a94e3de9fc5e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/be93b665-0a69-4573-8ef4-56f6a741c1a1" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 632, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-03-27T09:28:25.628Z", + "time": 646 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Created-response_993325971/frozen.json b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Created-response_993325971/frozen.json new file mode 100644 index 000000000000..a9422abe91d8 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Created-response_993325971/frozen.json @@ -0,0 +1 @@ +"2026-03-27T09:09:22.678Z" diff --git a/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Created-response_993325971/recording.har b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Created-response_993325971/recording.har new file mode 100644 index 000000000000..74393e5f77c8 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Create-team-connections-returns-Created-response_993325971/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Teams/Create team connections returns \"Created\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "957a279ba415a087b7debc6f6abf841e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 115, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-8d5b9953d168d107\",\"name\":\"test-name-8d5b9953d168d107\"},\"type\":\"team\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team" + }, + "response": { + "bodySize": 661, + "content": { + "mimeType": "application/vnd.api+json", + "size": 661, + "text": "{\"data\":{\"id\":\"726053a9-9b81-4381-bf91-b96b746f28d9\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":11,\"created_at\":\"2026-03-27T09:09:23.174349+00:00\",\"description\":null,\"handle\":\"test-handle-8d5b9953d168d107\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-03-27T09:09:23.174349+00:00\",\"name\":\"test-name-8d5b9953d168d107\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/726053a9-9b81-4381-bf91-b96b746f28d9/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/726053a9-9b81-4381-bf91-b96b746f28d9/permission-settings\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 662, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:09:22.682Z", + "time": 563 + }, + { + "_id": "ce4d9e066e8ab79db845c428225e08b9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 273, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"726053a9-9b81-4381-bf91-b96b746f28d9\",\"type\":\"team\"}}},\"type\":\"team_connection\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/connections" + }, + "response": { + "bodySize": 317, + "content": { + "mimeType": "application/vnd.api+json", + "size": 317, + "text": "{\"data\":[{\"id\":\"a5c93d48-29bc-11f1-82fc-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"726053a9-9b81-4381-bf91-b96b746f28d9\",\"type\":\"team\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:09:23.249Z", + "time": 524 + }, + { + "_id": "a6a3d8b10ad55bb1a9bee53ba851ca8c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/726053a9-9b81-4381-bf91-b96b746f28d9" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 632, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-03-27T09:09:23.778Z", + "time": 279 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-Bad-Request-response_4153956674/frozen.json b/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-Bad-Request-response_4153956674/frozen.json new file mode 100644 index 000000000000..17f978e26ea0 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-Bad-Request-response_4153956674/frozen.json @@ -0,0 +1 @@ +"2026-03-27T09:21:11.529Z" diff --git a/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-Bad-Request-response_4153956674/recording.har b/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-Bad-Request-response_4153956674/recording.har new file mode 100644 index 000000000000..c973761e5f28 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-Bad-Request-response_4153956674/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Teams/Delete team connections returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "edab17aded935f0fe864ba1a6b99d3fe", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 45, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 585, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"id\":\"\",\"type\":\"team_connection\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/connections" + }, + "response": { + "bodySize": 127, + "content": { + "mimeType": "application/vnd.api+json", + "size": 127, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"id\\\" one or more team connection ids are not present\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2026-03-27T09:21:11.532Z", + "time": 482 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-No-Content-response_2778320456/frozen.json b/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-No-Content-response_2778320456/frozen.json new file mode 100644 index 000000000000..ca37b022af95 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-No-Content-response_2778320456/frozen.json @@ -0,0 +1 @@ +"2026-03-27T09:21:19.736Z" diff --git a/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-No-Content-response_2778320456/recording.har b/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-No-Content-response_2778320456/recording.har new file mode 100644 index 000000000000..f8100ed07b4a --- /dev/null +++ b/cassettes/v2/Teams_3116892301/Delete-team-connections-returns-No-Content-response_2778320456/recording.har @@ -0,0 +1,204 @@ +{ + "log": { + "_recordingName": "Teams/Delete team connections returns \"No Content\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "eaf61c66335b8bb1ee20f41cc75976ec", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 115, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-5e060b20bd1650cf\",\"name\":\"test-name-5e060b20bd1650cf\"},\"type\":\"team\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team" + }, + "response": { + "bodySize": 660, + "content": { + "mimeType": "application/vnd.api+json", + "size": 660, + "text": "{\"data\":{\"id\":\"250b46bc-90c5-4464-8a8f-bf261f788495\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":1,\"created_at\":\"2026-03-27T09:21:20.252382+00:00\",\"description\":null,\"handle\":\"test-handle-5e060b20bd1650cf\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-03-27T09:21:20.252382+00:00\",\"name\":\"test-name-5e060b20bd1650cf\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/250b46bc-90c5-4464-8a8f-bf261f788495/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/250b46bc-90c5-4464-8a8f-bf261f788495/permission-settings\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 662, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:21:19.739Z", + "time": 585 + }, + { + "_id": "6ad04942c102ae9c8a78f6a5bf5d0640", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 273, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"250b46bc-90c5-4464-8a8f-bf261f788495\",\"type\":\"team\"}}},\"type\":\"team_connection\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/connections" + }, + "response": { + "bodySize": 317, + "content": { + "mimeType": "application/vnd.api+json", + "size": 317, + "text": "{\"data\":[{\"id\":\"51323b02-29be-11f1-ad4d-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"250b46bc-90c5-4464-8a8f-bf261f788495\",\"type\":\"team\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:21:20.328Z", + "time": 507 + }, + { + "_id": "b11409d6e742a2168db878bb47ce709d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 81, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 585, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"id\":\"51323b02-29be-11f1-ad4d-da7ad0900002\",\"type\":\"team_connection\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/connections" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 600, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-03-27T09:21:20.840Z", + "time": 173 + }, + { + "_id": "044c16517ea8ce160ec7b6141a1b1789", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/250b46bc-90c5-4464-8a8f-bf261f788495" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 632, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-03-27T09:21:21.017Z", + "time": 612 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Teams_3116892301/List-team-connections-returns-OK-response_2716431901/frozen.json b/cassettes/v2/Teams_3116892301/List-team-connections-returns-OK-response_2716431901/frozen.json new file mode 100644 index 000000000000..db50aa62cf53 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/List-team-connections-returns-OK-response_2716431901/frozen.json @@ -0,0 +1 @@ +"2026-03-27T09:09:49.513Z" diff --git a/cassettes/v2/Teams_3116892301/List-team-connections-returns-OK-response_2716431901/recording.har b/cassettes/v2/Teams_3116892301/List-team-connections-returns-OK-response_2716431901/recording.har new file mode 100644 index 000000000000..ac435a5b9eb8 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/List-team-connections-returns-OK-response_2716431901/recording.har @@ -0,0 +1,207 @@ +{ + "log": { + "_recordingName": "Teams/List team connections returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "3ef98988938c052d7fb8a4ece9f610ee", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 115, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-48ce99925c887f33\",\"name\":\"test-name-48ce99925c887f33\"},\"type\":\"team\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team" + }, + "response": { + "bodySize": 660, + "content": { + "mimeType": "application/vnd.api+json", + "size": 660, + "text": "{\"data\":{\"id\":\"f520e86b-5137-461d-b054-5b454d7135c4\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":4,\"created_at\":\"2026-03-27T09:09:50.012362+00:00\",\"description\":null,\"handle\":\"test-handle-48ce99925c887f33\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-03-27T09:09:50.012363+00:00\",\"name\":\"test-name-48ce99925c887f33\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/f520e86b-5137-461d-b054-5b454d7135c4/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/f520e86b-5137-461d-b054-5b454d7135c4/permission-settings\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 662, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:09:49.517Z", + "time": 569 + }, + { + "_id": "5f55b05737ac9ef5ef8bf7cd1f4057ce", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 273, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"f520e86b-5137-461d-b054-5b454d7135c4\",\"type\":\"team\"}}},\"type\":\"team_connection\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/connections" + }, + "response": { + "bodySize": 317, + "content": { + "mimeType": "application/vnd.api+json", + "size": 317, + "text": "{\"data\":[{\"id\":\"b5c56780-29bc-11f1-b3d1-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"f520e86b-5137-461d-b054-5b454d7135c4\",\"type\":\"team\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:09:50.091Z", + "time": 491 + }, + { + "_id": "28064af68bf3e2d34fd8c7a1226e6f25", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 559, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "page", + "value": { + "size": "10" + } + } + ], + "url": "https://api.datadoghq.com/api/v2/team/connections?page%5Bsize%5D=10" + }, + "response": { + "bodySize": 1993, + "content": { + "mimeType": "application/vnd.api+json", + "size": 1993, + "text": "{\"data\":[{\"id\":\"52a55816-291e-11f1-be93-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"0a81a948-5ee2-4790-b855-8817a21ccf1e\",\"type\":\"team\"}}}},{\"id\":\"52df3810-291e-11f1-b8ea-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"a9d786f4-447a-4a3b-9505-882df3f1d7e4\",\"type\":\"team\"}}}},{\"id\":\"53407c2e-291e-11f1-af9c-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"48f1089c-a1ee-4039-8b9d-59a512010d89\",\"type\":\"team\"}}}},{\"id\":\"53722ae4-291e-11f1-be97-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"27c3acd0-4eeb-459c-9dbf-2f61263c8387\",\"type\":\"team\"}}}},{\"id\":\"4f642338-28f8-11f1-8cc3-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"52b98022-50b0-42b5-8d59-f8f8a809027e\",\"type\":\"team\"}}}},{\"id\":\"b5c56780-29bc-11f1-b3d1-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"f520e86b-5137-461d-b054-5b454d7135c4\",\"type\":\"team\"}}}}],\"meta\":{\"page\":{\"type\":\"number_size\",\"number\":0,\"size\":10,\"total\":6,\"first_number\":0,\"prev_number\":null,\"next_number\":null,\"last_number\":0}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 662, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-27T09:09:50.587Z", + "time": 155 + }, + { + "_id": "1441d0eda4a4a8da291d7d68b2eb7c6f", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/f520e86b-5137-461d-b054-5b454d7135c4" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 631, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-03-27T09:09:50.746Z", + "time": 644 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Teams_3116892301/List-team-connections-with-filters-returns-OK-response_530453408/frozen.json b/cassettes/v2/Teams_3116892301/List-team-connections-with-filters-returns-OK-response_530453408/frozen.json new file mode 100644 index 000000000000..3d1814e5a653 --- /dev/null +++ b/cassettes/v2/Teams_3116892301/List-team-connections-with-filters-returns-OK-response_530453408/frozen.json @@ -0,0 +1 @@ +"2026-03-27T09:09:58.847Z" diff --git a/cassettes/v2/Teams_3116892301/List-team-connections-with-filters-returns-OK-response_530453408/recording.har b/cassettes/v2/Teams_3116892301/List-team-connections-with-filters-returns-OK-response_530453408/recording.har new file mode 100644 index 000000000000..903f18b0322f --- /dev/null +++ b/cassettes/v2/Teams_3116892301/List-team-connections-with-filters-returns-OK-response_530453408/recording.har @@ -0,0 +1,213 @@ +{ + "log": { + "_recordingName": "Teams/List team connections with filters returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "3dea2d45c438044658c8f0cfc76865ae", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 115, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 574, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"handle\":\"test-handle-fa25cb1eef560458\",\"name\":\"test-name-fa25cb1eef560458\"},\"type\":\"team\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team" + }, + "response": { + "bodySize": 660, + "content": { + "mimeType": "application/vnd.api+json", + "size": 660, + "text": "{\"data\":{\"id\":\"d7ee1319-6ac0-45c6-8700-079e58eac9f9\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":1,\"created_at\":\"2026-03-27T09:09:59.338935+00:00\",\"description\":null,\"handle\":\"test-handle-fa25cb1eef560458\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-03-27T09:09:59.338935+00:00\",\"name\":\"test-name-fa25cb1eef560458\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/d7ee1319-6ac0-45c6-8700-079e58eac9f9/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/d7ee1319-6ac0-45c6-8700-079e58eac9f9/permission-settings\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 661, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:09:58.850Z", + "time": 569 + }, + { + "_id": "b20ff35322bf068cfd9e1f5d1a9fab39", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 273, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":[{\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"d7ee1319-6ac0-45c6-8700-079e58eac9f9\",\"type\":\"team\"}}},\"type\":\"team_connection\"}]}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/connections" + }, + "response": { + "bodySize": 317, + "content": { + "mimeType": "application/vnd.api+json", + "size": 317, + "text": "{\"data\":[{\"id\":\"bb57db2e-29bc-11f1-bcee-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"d7ee1319-6ac0-45c6-8700-079e58eac9f9\",\"type\":\"team\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 660, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2026-03-27T09:09:59.425Z", + "time": 518 + }, + { + "_id": "f1d8c3a61bfeb00708a6a2f2228733bf", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 586, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [ + { + "name": "filter", + "value": { + "sources": "github" + } + }, + { + "name": "page", + "value": { + "size": "10" + } + } + ], + "url": "https://api.datadoghq.com/api/v2/team/connections?filter%5Bsources%5D=github&page%5Bsize%5D=10" + }, + "response": { + "bodySize": 1993, + "content": { + "mimeType": "application/vnd.api+json", + "size": 1993, + "text": "{\"data\":[{\"id\":\"52a55816-291e-11f1-be93-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"0a81a948-5ee2-4790-b855-8817a21ccf1e\",\"type\":\"team\"}}}},{\"id\":\"52df3810-291e-11f1-b8ea-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"a9d786f4-447a-4a3b-9505-882df3f1d7e4\",\"type\":\"team\"}}}},{\"id\":\"53407c2e-291e-11f1-af9c-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"48f1089c-a1ee-4039-8b9d-59a512010d89\",\"type\":\"team\"}}}},{\"id\":\"53722ae4-291e-11f1-be97-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"27c3acd0-4eeb-459c-9dbf-2f61263c8387\",\"type\":\"team\"}}}},{\"id\":\"4f642338-28f8-11f1-8cc3-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"52b98022-50b0-42b5-8d59-f8f8a809027e\",\"type\":\"team\"}}}},{\"id\":\"bb57db2e-29bc-11f1-bcee-da7ad0900002\",\"type\":\"team_connection\",\"attributes\":{\"managed_by\":\"datadog\",\"source\":\"github\"},\"relationships\":{\"connected_team\":{\"data\":{\"id\":\"@MyGitHubAccount/my-team-name\",\"type\":\"github_team\"}},\"team\":{\"data\":{\"id\":\"d7ee1319-6ac0-45c6-8700-079e58eac9f9\",\"type\":\"team\"}}}}],\"meta\":{\"page\":{\"type\":\"number_size\",\"number\":0,\"size\":10,\"total\":6,\"first_number\":0,\"prev_number\":null,\"next_number\":null,\"last_number\":0}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 662, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2026-03-27T09:09:59.951Z", + "time": 149 + }, + { + "_id": "ae1dd938b0aa57fd868d4d92f0388dca", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/team/d7ee1319-6ac0-45c6-8700-079e58eac9f9" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 632, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2026-03-27T09:10:00.105Z", + "time": 604 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/teams/CreateTeamConnections.ts b/examples/v2/teams/CreateTeamConnections.ts index 473d85215708..74df78d6f32f 100644 --- a/examples/v2/teams/CreateTeamConnections.ts +++ b/examples/v2/teams/CreateTeamConnections.ts @@ -5,7 +5,6 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); -configuration.unstableOperations["v2.createTeamConnections"] = true; const apiInstance = new v2.TeamsApi(configuration); // there is a valid "dd_team" in the system diff --git a/examples/v2/teams/DeleteTeamConnections.ts b/examples/v2/teams/DeleteTeamConnections.ts index f2c767b0610d..c58a57de8ad5 100644 --- a/examples/v2/teams/DeleteTeamConnections.ts +++ b/examples/v2/teams/DeleteTeamConnections.ts @@ -7,11 +7,14 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); const apiInstance = new v2.TeamsApi(configuration); +// there is a valid "team_connection" in the system +const TEAM_CONNECTION_ID = process.env.TEAM_CONNECTION_ID as string; + const params: v2.TeamsApiDeleteTeamConnectionsRequest = { body: { data: [ { - id: "12345678-1234-5678-9abc-123456789012", + id: TEAM_CONNECTION_ID, type: "team_connection", }, ], diff --git a/examples/v2/teams/ListTeamConnections.ts b/examples/v2/teams/ListTeamConnections.ts index 25e12dedfa3f..4ca3d0629e74 100644 --- a/examples/v2/teams/ListTeamConnections.ts +++ b/examples/v2/teams/ListTeamConnections.ts @@ -7,8 +7,12 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); const apiInstance = new v2.TeamsApi(configuration); +const params: v2.TeamsApiListTeamConnectionsRequest = { + pageSize: 10, +}; + apiInstance - .listTeamConnections() + .listTeamConnections(params) .then((data: v2.TeamConnectionsResponse) => { console.log( "API called successfully. Returned data: " + JSON.stringify(data) diff --git a/examples/v2/teams/ListTeamConnections_1473516764.ts b/examples/v2/teams/ListTeamConnections_1473516764.ts index e36ef7086a89..c60854fa86b4 100644 --- a/examples/v2/teams/ListTeamConnections_1473516764.ts +++ b/examples/v2/teams/ListTeamConnections_1473516764.ts @@ -5,7 +5,6 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); -configuration.unstableOperations["v2.listTeamConnections"] = true; const apiInstance = new v2.TeamsApi(configuration); const params: v2.TeamsApiListTeamConnectionsRequest = { diff --git a/examples/v2/widgets/CreateWidget.ts b/examples/v2/widgets/CreateWidget.ts deleted file mode 100644 index fca2cd11e170..000000000000 --- a/examples/v2/widgets/CreateWidget.ts +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Create a widget returns "OK" response - */ - -import { client, v2 } from "@datadog/datadog-api-client"; - -const configuration = client.createConfiguration(); -const apiInstance = new v2.WidgetsApi(configuration); - -const params: v2.WidgetsApiCreateWidgetRequest = { - body: { - data: { - attributes: { - definition: { - title: "My Widget", - type: "bar_chart", - }, - tags: [], - }, - type: "widgets", - }, - }, - experienceType: "ccm_reports", -}; - -apiInstance - .createWidget(params) - .then((data: v2.WidgetResponse) => { - console.log( - "API called successfully. Returned data: " + JSON.stringify(data) - ); - }) - .catch((error: any) => console.error(error)); diff --git a/examples/v2/widgets/DeleteWidget.ts b/examples/v2/widgets/DeleteWidget.ts deleted file mode 100644 index 876e8072c8c6..000000000000 --- a/examples/v2/widgets/DeleteWidget.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Delete a widget returns "No Content" response - */ - -import { client, v2 } from "@datadog/datadog-api-client"; - -const configuration = client.createConfiguration(); -const apiInstance = new v2.WidgetsApi(configuration); - -const params: v2.WidgetsApiDeleteWidgetRequest = { - experienceType: "ccm_reports", - uuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", -}; - -apiInstance - .deleteWidget(params) - .then((data: any) => { - console.log( - "API called successfully. Returned data: " + JSON.stringify(data) - ); - }) - .catch((error: any) => console.error(error)); diff --git a/examples/v2/widgets/GetWidget.ts b/examples/v2/widgets/GetWidget.ts deleted file mode 100644 index 67ba6df36f7f..000000000000 --- a/examples/v2/widgets/GetWidget.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Get a widget returns "OK" response - */ - -import { client, v2 } from "@datadog/datadog-api-client"; - -const configuration = client.createConfiguration(); -const apiInstance = new v2.WidgetsApi(configuration); - -const params: v2.WidgetsApiGetWidgetRequest = { - experienceType: "ccm_reports", - uuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", -}; - -apiInstance - .getWidget(params) - .then((data: v2.WidgetResponse) => { - console.log( - "API called successfully. Returned data: " + JSON.stringify(data) - ); - }) - .catch((error: any) => console.error(error)); diff --git a/examples/v2/widgets/SearchWidgets.ts b/examples/v2/widgets/SearchWidgets.ts deleted file mode 100644 index 3ef86a402a23..000000000000 --- a/examples/v2/widgets/SearchWidgets.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Search widgets returns "OK" response - */ - -import { client, v2 } from "@datadog/datadog-api-client"; - -const configuration = client.createConfiguration(); -const apiInstance = new v2.WidgetsApi(configuration); - -const params: v2.WidgetsApiSearchWidgetsRequest = { - experienceType: "ccm_reports", -}; - -apiInstance - .searchWidgets(params) - .then((data: v2.WidgetListResponse) => { - console.log( - "API called successfully. Returned data: " + JSON.stringify(data) - ); - }) - .catch((error: any) => console.error(error)); diff --git a/examples/v2/widgets/UpdateWidget.ts b/examples/v2/widgets/UpdateWidget.ts deleted file mode 100644 index ce47306b0bee..000000000000 --- a/examples/v2/widgets/UpdateWidget.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Update a widget returns "OK" response - */ - -import { client, v2 } from "@datadog/datadog-api-client"; - -const configuration = client.createConfiguration(); -const apiInstance = new v2.WidgetsApi(configuration); - -const params: v2.WidgetsApiUpdateWidgetRequest = { - body: { - data: { - attributes: { - definition: { - title: "My Widget", - type: "bar_chart", - }, - tags: [], - }, - type: "widgets", - }, - }, - experienceType: "ccm_reports", - uuid: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", -}; - -apiInstance - .updateWidget(params) - .then((data: v2.WidgetResponse) => { - console.log( - "API called successfully. Returned data: " + JSON.stringify(data) - ); - }) - .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index 712504cb93a5..777bb863a27b 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -11751,93 +11751,6 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "PermissionsResponse", }, - "v2.SearchWidgets": { - "experienceType": { - "type": "WidgetExperienceType", - "format": "", - }, - "filterWidgetType": { - "type": "WidgetType", - "format": "", - }, - "filterCreatorHandle": { - "type": "string", - "format": "", - }, - "filterIsFavorited": { - "type": "boolean", - "format": "", - }, - "filterTitle": { - "type": "string", - "format": "", - }, - "filterTags": { - "type": "string", - "format": "", - }, - "sort": { - "type": "string", - "format": "", - }, - "pageNumber": { - "type": "number", - "format": "", - }, - "pageSize": { - "type": "number", - "format": "", - }, - "operationResponseType": "WidgetListResponse", - }, - "v2.CreateWidget": { - "experienceType": { - "type": "WidgetExperienceType", - "format": "", - }, - "body": { - "type": "CreateOrUpdateWidgetRequest", - "format": "", - }, - "operationResponseType": "WidgetResponse", - }, - "v2.GetWidget": { - "experienceType": { - "type": "WidgetExperienceType", - "format": "", - }, - "uuid": { - "type": "string", - "format": "uuid", - }, - "operationResponseType": "WidgetResponse", - }, - "v2.UpdateWidget": { - "experienceType": { - "type": "WidgetExperienceType", - "format": "", - }, - "uuid": { - "type": "string", - "format": "uuid", - }, - "body": { - "type": "CreateOrUpdateWidgetRequest", - "format": "", - }, - "operationResponseType": "WidgetResponse", - }, - "v2.DeleteWidget": { - "experienceType": { - "type": "WidgetExperienceType", - "format": "", - }, - "uuid": { - "type": "string", - "format": "uuid", - }, - "operationResponseType": "{}", - }, "v2.CreateWorkflow": { "body": { "type": "CreateWorkflowRequest", diff --git a/features/v2/given.json b/features/v2/given.json index 2fee80e2ff9e..6c42beffa17f 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -1388,7 +1388,13 @@ "operationId": "AddTeamHierarchyLink" }, { - "source": "data.data[0]", + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": [{\n \"type\": \"team_connection\",\n \"attributes\": {\n \"source\": \"github\",\n \"managed_by\": \"datadog\"\n },\n \"relationships\": {\n \"team\": {\n \"data\": {\n \"id\": \"{{ dd_team.data.id }}\",\n \"type\": \"team\"\n }\n },\n \"connected_team\": {\n \"data\": {\n \"id\": \"@MyGitHubAccount/my-team-name\",\n \"type\": \"github_team\"\n }\n }\n }\n }]\n}" + } + ], + "source": "data[0]", "step": "there is a valid \"team_connection\" in the system", "key": "team_connection", "tag": "Teams", diff --git a/features/v2/teams.feature b/features/v2/teams.feature index 50f7f314684d..c24ced9ffbf1 100644 --- a/features/v2/teams.feature +++ b/features/v2/teams.feature @@ -118,34 +118,34 @@ Feature: Teams And the response "data.attributes.hidden_modules" has length 1 And the response "data.attributes.hidden_modules" array contains value "m3" - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Create team connections returns "Bad Request" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request - And body with value {"data": [{"attributes": {"source": "github"}, "relationships": {"connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}, "team": {"data": {"type": "team"}}}, "type": "team_connection"}]} + Given new "CreateTeamConnections" request + And body with value {"data": []} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Create team connections returns "Conflict" response Given new "CreateTeamConnections" request - And body with value {"data": [{"attributes": {"managed_by": "github_sync", "source": "github"}, "relationships": {"connected_team": {"data": {"id": "@GitHubOrg/team-handle", "type": "github_team"}}, "team": {"data": {"id": "87654321-4321-8765-dcba-210987654321", "type": "team"}}}, "type": "team_connection"}]} + And there is a valid "dd_team" in the system + And there is a valid "team_connection" in the system + And body with value {"data": [{"attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"connected_team": {"data": {"id": "{{ team_connection.relationships.connected_team.data.id }}", "type": "github_team"}}, "team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}}, "type": "team_connection"}]} When the request is sent Then the response status is 409 Conflict - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Create team connections returns "Created" response - Given operation "CreateTeamConnections" enabled - And new "CreateTeamConnections" request + Given new "CreateTeamConnections" request And there is a valid "dd_team" in the system And body with value {"data": [{"type": "team_connection", "attributes": {"source": "github", "managed_by": "datadog"}, "relationships": {"team": {"data": {"id": "{{ dd_team.data.id }}", "type": "team"}}, "connected_team": {"data": {"id": "@MyGitHubAccount/my-team-name", "type": "github_team"}}}}]} When the request is sent Then the response status is 201 Created - And the response "data.data[0].attributes.source" is equal to "github" - And the response "data.data[0].attributes.managed_by" is equal to "datadog" - And the response "data.data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" - And the response "data.data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name" - And the response "data.data[0].type" is equal to "team_connection" + And the response "data[0].attributes.source" is equal to "github" + And the response "data[0].attributes.managed_by" is equal to "datadog" + And the response "data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" + And the response "data[0].relationships.connected_team.data.id" is equal to "@MyGitHubAccount/my-team-name" + And the response "data[0].type" is equal to "team_connection" @team:DataDog/aaa-omg Scenario: Create team notification rule returns "API error response." response @@ -166,25 +166,26 @@ Feature: Teams When the request is sent Then the response status is 201 Created - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Delete team connections returns "Bad Request" response - Given operation "DeleteTeamConnections" enabled - And new "DeleteTeamConnections" request - And body with value {"data": [{"type": "team_connection"}]} + Given new "DeleteTeamConnections" request + And body with value {"data": [{"id": "", "type": "team_connection"}]} When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: Delete team connections returns "No Content" response Given new "DeleteTeamConnections" request - And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} + And there is a valid "dd_team" in the system + And there is a valid "team_connection" in the system + And body with value {"data": [{"id": "{{ team_connection.id }}", "type": "team_connection"}]} When the request is sent Then the response status is 204 No Content - @generated @skip @team:DataDog/aaa-omg + @skip @team:DataDog/aaa-omg Scenario: Delete team connections returns "Not Found" response Given new "DeleteTeamConnections" request - And body with value {"data": [{"id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection"}]} + And body with value {"data": [{"id": "00000000-0000-dead-beef-000000000000", "type": "team_connection"}]} When the request is sent Then the response status is 404 Not Found @@ -474,9 +475,12 @@ Feature: Teams When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: List team connections returns "OK" response Given new "ListTeamConnections" request + And there is a valid "dd_team" in the system + And there is a valid "team_connection" in the system + And request contains "page[size]" parameter with value 10 When the request is sent Then the response status is 200 OK @@ -486,10 +490,11 @@ Feature: Teams When the request with pagination is sent Then the response status is 200 OK - @skip @team:DataDog/aaa-omg + @team:DataDog/aaa-omg Scenario: List team connections with filters returns "OK" response - Given operation "ListTeamConnections" enabled - And new "ListTeamConnections" request + Given new "ListTeamConnections" request + And there is a valid "dd_team" in the system + And there is a valid "team_connection" in the system And request contains "filter[sources]" parameter with value ["github"] And request contains "page[size]" parameter with value 10 When the request is sent diff --git a/features/v2/undo.json b/features/v2/undo.json index ed1ec823bd31..67596e3589cb 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -6008,8 +6008,7 @@ "CreateTeamConnections": { "tag": "Teams", "undo": { - "operationId": "DeleteTeamConnections", - "type": "unsafe" + "type": "safe" } }, "GetTeamSync": { @@ -6357,47 +6356,6 @@ "type": "safe" } }, - "SearchWidgets": { - "tag": "Widgets", - "undo": { - "type": "safe" - } - }, - "CreateWidget": { - "tag": "Widgets", - "undo": { - "operationId": "DeleteWidget", - "parameters": [ - { - "name": "experience_type", - "source": "experience_type" - }, - { - "name": "uuid", - "source": "data.id" - } - ], - "type": "unsafe" - } - }, - "DeleteWidget": { - "tag": "Widgets", - "undo": { - "type": "idempotent" - } - }, - "GetWidget": { - "tag": "Widgets", - "undo": { - "type": "safe" - } - }, - "UpdateWidget": { - "tag": "Widgets", - "undo": { - "type": "safe" - } - }, "CreateWorkflow": { "tag": "Workflow Automation", "undo": { diff --git a/features/v2/widgets.feature b/features/v2/widgets.feature deleted file mode 100644 index 54b015711565..000000000000 --- a/features/v2/widgets.feature +++ /dev/null @@ -1,115 +0,0 @@ -@endpoint(widgets) @endpoint(widgets-v2) -Feature: Widgets - Create, read, update, and delete saved widgets. Widgets are reusable - visualization components stored independently from any dashboard or - notebook, partitioned by experience type and identified by a UUID. - - Background: - Given a valid "apiKeyAuth" key in the system - And a valid "appKeyAuth" key in the system - And an instance of "Widgets" API - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Create a widget returns "Bad Request" response - Given new "CreateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Create a widget returns "OK" response - Given new "CreateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Delete a widget returns "Bad Request" response - Given new "DeleteWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Delete a widget returns "No Content" response - Given new "DeleteWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 204 No Content - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Delete a widget returns "Not Found" response - Given new "DeleteWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Get a widget returns "Bad Request" response - Given new "GetWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Get a widget returns "Not Found" response - Given new "GetWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Get a widget returns "OK" response - Given new "GetWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Search widgets returns "Bad Request" response - Given new "SearchWidgets" request - And request contains "experience_type" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Search widgets returns "OK" response - Given new "SearchWidgets" request - And request contains "experience_type" parameter from "REPLACE.ME" - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Update a widget returns "Bad Request" response - Given new "UpdateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 400 Bad Request - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Update a widget returns "Not Found" response - Given new "UpdateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 404 Not Found - - @generated @skip @team:DataDog/reporting-and-sharing - Scenario: Update a widget returns "OK" response - Given new "UpdateWidget" request - And request contains "experience_type" parameter from "REPLACE.ME" - And request contains "uuid" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"definition": {"title": "My Widget", "type": "bar_chart"}, "tags": []}, "type": "widgets"}} - When the request is sent - Then the response status is 200 OK diff --git a/packages/datadog-api-client-v2/apis/WidgetsApi.ts b/packages/datadog-api-client-v2/apis/WidgetsApi.ts deleted file mode 100644 index 4693abbd9a60..000000000000 --- a/packages/datadog-api-client-v2/apis/WidgetsApi.ts +++ /dev/null @@ -1,850 +0,0 @@ -import { - BaseAPIRequestFactory, - RequiredError, -} from "../../datadog-api-client-common/baseapi"; -import { - Configuration, - applySecurityAuthentication, -} from "../../datadog-api-client-common/configuration"; -import { - RequestContext, - HttpMethod, - ResponseContext, -} from "../../datadog-api-client-common/http/http"; - -import { logger } from "../../../logger"; -import { ObjectSerializer } from "../models/ObjectSerializer"; -import { ApiException } from "../../datadog-api-client-common/exception"; - -import { APIErrorResponse } from "../models/APIErrorResponse"; -import { CreateOrUpdateWidgetRequest } from "../models/CreateOrUpdateWidgetRequest"; -import { WidgetExperienceType } from "../models/WidgetExperienceType"; -import { WidgetListResponse } from "../models/WidgetListResponse"; -import { WidgetResponse } from "../models/WidgetResponse"; -import { WidgetType } from "../models/WidgetType"; - -export class WidgetsApiRequestFactory extends BaseAPIRequestFactory { - public async createWidget( - experienceType: WidgetExperienceType, - body: CreateOrUpdateWidgetRequest, - _options?: Configuration - ): Promise { - const _config = _options || this.configuration; - - // verify required parameter 'experienceType' is not null or undefined - if (experienceType === null || experienceType === undefined) { - throw new RequiredError("experienceType", "createWidget"); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "createWidget"); - } - - // Path Params - const localVarPath = "/api/v2/widgets/{experience_type}".replace( - "{experience_type}", - encodeURIComponent(String(experienceType)) - ); - - // Make Request Context - const requestContext = _config - .getServer("v2.WidgetsApi.createWidget") - .makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json"); - requestContext.setHttpConfig(_config.httpConfig); - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json", - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "CreateOrUpdateWidgetRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - - // Apply auth methods - applySecurityAuthentication(_config, requestContext, [ - "apiKeyAuth", - "appKeyAuth", - ]); - - return requestContext; - } - - public async deleteWidget( - experienceType: WidgetExperienceType, - uuid: string, - _options?: Configuration - ): Promise { - const _config = _options || this.configuration; - - // verify required parameter 'experienceType' is not null or undefined - if (experienceType === null || experienceType === undefined) { - throw new RequiredError("experienceType", "deleteWidget"); - } - - // verify required parameter 'uuid' is not null or undefined - if (uuid === null || uuid === undefined) { - throw new RequiredError("uuid", "deleteWidget"); - } - - // Path Params - const localVarPath = "/api/v2/widgets/{experience_type}/{uuid}" - .replace("{experience_type}", encodeURIComponent(String(experienceType))) - .replace("{uuid}", encodeURIComponent(String(uuid))); - - // Make Request Context - const requestContext = _config - .getServer("v2.WidgetsApi.deleteWidget") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); - requestContext.setHttpConfig(_config.httpConfig); - - // Apply auth methods - applySecurityAuthentication(_config, requestContext, [ - "apiKeyAuth", - "appKeyAuth", - ]); - - return requestContext; - } - - public async getWidget( - experienceType: WidgetExperienceType, - uuid: string, - _options?: Configuration - ): Promise { - const _config = _options || this.configuration; - - // verify required parameter 'experienceType' is not null or undefined - if (experienceType === null || experienceType === undefined) { - throw new RequiredError("experienceType", "getWidget"); - } - - // verify required parameter 'uuid' is not null or undefined - if (uuid === null || uuid === undefined) { - throw new RequiredError("uuid", "getWidget"); - } - - // Path Params - const localVarPath = "/api/v2/widgets/{experience_type}/{uuid}" - .replace("{experience_type}", encodeURIComponent(String(experienceType))) - .replace("{uuid}", encodeURIComponent(String(uuid))); - - // Make Request Context - const requestContext = _config - .getServer("v2.WidgetsApi.getWidget") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); - requestContext.setHttpConfig(_config.httpConfig); - - // Apply auth methods - applySecurityAuthentication(_config, requestContext, [ - "apiKeyAuth", - "appKeyAuth", - ]); - - return requestContext; - } - - public async searchWidgets( - experienceType: WidgetExperienceType, - filterWidgetType?: WidgetType, - filterCreatorHandle?: string, - filterIsFavorited?: boolean, - filterTitle?: string, - filterTags?: string, - sort?: string, - pageNumber?: number, - pageSize?: number, - _options?: Configuration - ): Promise { - const _config = _options || this.configuration; - - // verify required parameter 'experienceType' is not null or undefined - if (experienceType === null || experienceType === undefined) { - throw new RequiredError("experienceType", "searchWidgets"); - } - - // Path Params - const localVarPath = "/api/v2/widgets/{experience_type}".replace( - "{experience_type}", - encodeURIComponent(String(experienceType)) - ); - - // Make Request Context - const requestContext = _config - .getServer("v2.WidgetsApi.searchWidgets") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); - requestContext.setHttpConfig(_config.httpConfig); - - // Query Params - if (filterWidgetType !== undefined) { - requestContext.setQueryParam( - "filter[widgetType]", - ObjectSerializer.serialize(filterWidgetType, "WidgetType", ""), - "" - ); - } - if (filterCreatorHandle !== undefined) { - requestContext.setQueryParam( - "filter[creatorHandle]", - ObjectSerializer.serialize(filterCreatorHandle, "string", ""), - "" - ); - } - if (filterIsFavorited !== undefined) { - requestContext.setQueryParam( - "filter[isFavorited]", - ObjectSerializer.serialize(filterIsFavorited, "boolean", ""), - "" - ); - } - if (filterTitle !== undefined) { - requestContext.setQueryParam( - "filter[title]", - ObjectSerializer.serialize(filterTitle, "string", ""), - "" - ); - } - if (filterTags !== undefined) { - requestContext.setQueryParam( - "filter[tags]", - ObjectSerializer.serialize(filterTags, "string", ""), - "" - ); - } - if (sort !== undefined) { - requestContext.setQueryParam( - "sort", - ObjectSerializer.serialize(sort, "string", ""), - "" - ); - } - if (pageNumber !== undefined) { - requestContext.setQueryParam( - "page[number]", - ObjectSerializer.serialize(pageNumber, "number", ""), - "" - ); - } - if (pageSize !== undefined) { - requestContext.setQueryParam( - "page[size]", - ObjectSerializer.serialize(pageSize, "number", ""), - "" - ); - } - - // Apply auth methods - applySecurityAuthentication(_config, requestContext, [ - "apiKeyAuth", - "appKeyAuth", - ]); - - return requestContext; - } - - public async updateWidget( - experienceType: WidgetExperienceType, - uuid: string, - body: CreateOrUpdateWidgetRequest, - _options?: Configuration - ): Promise { - const _config = _options || this.configuration; - - // verify required parameter 'experienceType' is not null or undefined - if (experienceType === null || experienceType === undefined) { - throw new RequiredError("experienceType", "updateWidget"); - } - - // verify required parameter 'uuid' is not null or undefined - if (uuid === null || uuid === undefined) { - throw new RequiredError("uuid", "updateWidget"); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateWidget"); - } - - // Path Params - const localVarPath = "/api/v2/widgets/{experience_type}/{uuid}" - .replace("{experience_type}", encodeURIComponent(String(experienceType))) - .replace("{uuid}", encodeURIComponent(String(uuid))); - - // Make Request Context - const requestContext = _config - .getServer("v2.WidgetsApi.updateWidget") - .makeRequestContext(localVarPath, HttpMethod.PUT); - requestContext.setHeaderParam("Accept", "application/json"); - requestContext.setHttpConfig(_config.httpConfig); - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json", - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "CreateOrUpdateWidgetRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - - // Apply auth methods - applySecurityAuthentication(_config, requestContext, [ - "apiKeyAuth", - "appKeyAuth", - ]); - - return requestContext; - } -} - -export class WidgetsApiResponseProcessor { - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to createWidget - * @throws ApiException if the response code was not in [200, 299] - */ - public async createWidget( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: WidgetResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "WidgetResponse" - ) as WidgetResponse; - return body; - } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: WidgetResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "WidgetResponse", - "" - ) as WidgetResponse; - return body; - } - - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to deleteWidget - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteWidget(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; - } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; - } - - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to getWidget - * @throws ApiException if the response code was not in [200, 299] - */ - public async getWidget(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: WidgetResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "WidgetResponse" - ) as WidgetResponse; - return body; - } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: WidgetResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "WidgetResponse", - "" - ) as WidgetResponse; - return body; - } - - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to searchWidgets - * @throws ApiException if the response code was not in [200, 299] - */ - public async searchWidgets( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: WidgetListResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "WidgetListResponse" - ) as WidgetListResponse; - return body; - } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: WidgetListResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "WidgetListResponse", - "" - ) as WidgetListResponse; - return body; - } - - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } - - /** - * Unwraps the actual response sent by the server from the response context and deserializes the response content - * to the expected objects - * - * @params response Response returned by the server for a request to updateWidget - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateWidget( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: WidgetResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "WidgetResponse" - ) as WidgetResponse; - return body; - } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); - } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: WidgetResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "WidgetResponse", - "" - ) as WidgetResponse; - return body; - } - - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } -} - -export interface WidgetsApiCreateWidgetRequest { - /** - * The experience type for the widget. - * @type WidgetExperienceType - */ - experienceType: WidgetExperienceType; - /** - * Widget request body. - * @type CreateOrUpdateWidgetRequest - */ - body: CreateOrUpdateWidgetRequest; -} - -export interface WidgetsApiDeleteWidgetRequest { - /** - * The experience type for the widget. - * @type WidgetExperienceType - */ - experienceType: WidgetExperienceType; - /** - * The UUID of the widget. - * @type string - */ - uuid: string; -} - -export interface WidgetsApiGetWidgetRequest { - /** - * The experience type for the widget. - * @type WidgetExperienceType - */ - experienceType: WidgetExperienceType; - /** - * The UUID of the widget. - * @type string - */ - uuid: string; -} - -export interface WidgetsApiSearchWidgetsRequest { - /** - * The experience type for the widget. - * @type WidgetExperienceType - */ - experienceType: WidgetExperienceType; - /** - * Filter widgets by widget type. - * @type WidgetType - */ - filterWidgetType?: WidgetType; - /** - * Filter widgets by the email handle of the creator. - * @type string - */ - filterCreatorHandle?: string; - /** - * Filter to only widgets favorited by the current user. - * @type boolean - */ - filterIsFavorited?: boolean; - /** - * Filter widgets by title (substring match). - * @type string - */ - filterTitle?: string; - /** - * Filter widgets by tags. Format as bracket-delimited CSV, e.g. `[tag1,tag2]`. - * @type string - */ - filterTags?: string; - /** - * Sort field for the results. Prefix with `-` for descending order. - * Allowed values: `title`, `created_at`, `modified_at`. - * @type string - */ - sort?: string; - /** - * Page number for pagination (0-indexed). - * @type number - */ - pageNumber?: number; - /** - * Number of widgets per page. - * @type number - */ - pageSize?: number; -} - -export interface WidgetsApiUpdateWidgetRequest { - /** - * The experience type for the widget. - * @type WidgetExperienceType - */ - experienceType: WidgetExperienceType; - /** - * The UUID of the widget. - * @type string - */ - uuid: string; - /** - * Widget request body. - * @type CreateOrUpdateWidgetRequest - */ - body: CreateOrUpdateWidgetRequest; -} - -export class WidgetsApi { - private requestFactory: WidgetsApiRequestFactory; - private responseProcessor: WidgetsApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: WidgetsApiRequestFactory, - responseProcessor?: WidgetsApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = - requestFactory || new WidgetsApiRequestFactory(configuration); - this.responseProcessor = - responseProcessor || new WidgetsApiResponseProcessor(); - } - - /** - * Create a new widget for a given experience type. - * @param param The request object - */ - public createWidget( - param: WidgetsApiCreateWidgetRequest, - options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.createWidget( - param.experienceType, - param.body, - options - ); - return requestContextPromise.then((requestContext) => { - return this.configuration.httpApi - .send(requestContext) - .then((responseContext) => { - return this.responseProcessor.createWidget(responseContext); - }); - }); - } - - /** - * Soft-delete a widget by its UUID for a given experience type. - * @param param The request object - */ - public deleteWidget( - param: WidgetsApiDeleteWidgetRequest, - options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.deleteWidget( - param.experienceType, - param.uuid, - options - ); - return requestContextPromise.then((requestContext) => { - return this.configuration.httpApi - .send(requestContext) - .then((responseContext) => { - return this.responseProcessor.deleteWidget(responseContext); - }); - }); - } - - /** - * Retrieve a widget by its UUID for a given experience type. - * @param param The request object - */ - public getWidget( - param: WidgetsApiGetWidgetRequest, - options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.getWidget( - param.experienceType, - param.uuid, - options - ); - return requestContextPromise.then((requestContext) => { - return this.configuration.httpApi - .send(requestContext) - .then((responseContext) => { - return this.responseProcessor.getWidget(responseContext); - }); - }); - } - - /** - * Search and list widgets for a given experience type. Supports filtering by widget type, creator, title, and tags, as well as sorting and pagination. - * @param param The request object - */ - public searchWidgets( - param: WidgetsApiSearchWidgetsRequest, - options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.searchWidgets( - param.experienceType, - param.filterWidgetType, - param.filterCreatorHandle, - param.filterIsFavorited, - param.filterTitle, - param.filterTags, - param.sort, - param.pageNumber, - param.pageSize, - options - ); - return requestContextPromise.then((requestContext) => { - return this.configuration.httpApi - .send(requestContext) - .then((responseContext) => { - return this.responseProcessor.searchWidgets(responseContext); - }); - }); - } - - /** - * Update a widget by its UUID for a given experience type. This performs a full replacement of the widget definition. - * @param param The request object - */ - public updateWidget( - param: WidgetsApiUpdateWidgetRequest, - options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.updateWidget( - param.experienceType, - param.uuid, - param.body, - options - ); - return requestContextPromise.then((requestContext) => { - return this.configuration.httpApi - .send(requestContext) - .then((responseContext) => { - return this.responseProcessor.updateWidget(responseContext); - }); - }); - } -} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 30c44313af3d..5f7dc60a3853 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -1227,15 +1227,6 @@ export { UsersApi, } from "./apis/UsersApi"; -export { - WidgetsApiCreateWidgetRequest, - WidgetsApiDeleteWidgetRequest, - WidgetsApiGetWidgetRequest, - WidgetsApiSearchWidgetsRequest, - WidgetsApiUpdateWidgetRequest, - WidgetsApi, -} from "./apis/WidgetsApi"; - export { WorkflowAutomationApiCancelWorkflowInstanceRequest, WorkflowAutomationApiCreateWorkflowRequest, @@ -2161,9 +2152,6 @@ export { CreateOnCallNotificationRuleRequestData } from "./models/CreateOnCallNo export { CreateOpenAPIResponse } from "./models/CreateOpenAPIResponse"; export { CreateOpenAPIResponseAttributes } from "./models/CreateOpenAPIResponseAttributes"; export { CreateOpenAPIResponseData } from "./models/CreateOpenAPIResponseData"; -export { CreateOrUpdateWidgetRequest } from "./models/CreateOrUpdateWidgetRequest"; -export { CreateOrUpdateWidgetRequestAttributes } from "./models/CreateOrUpdateWidgetRequestAttributes"; -export { CreateOrUpdateWidgetRequestData } from "./models/CreateOrUpdateWidgetRequestData"; export { CreatePageRequest } from "./models/CreatePageRequest"; export { CreatePageRequestData } from "./models/CreatePageRequestData"; export { CreatePageRequestDataAttributes } from "./models/CreatePageRequestDataAttributes"; @@ -5881,20 +5869,7 @@ export { WatcherData } from "./models/WatcherData"; export { WatcherDataAttributes } from "./models/WatcherDataAttributes"; export { WatcherDataType } from "./models/WatcherDataType"; export { Weekday } from "./models/Weekday"; -export { WidgetAttributes } from "./models/WidgetAttributes"; -export { WidgetData } from "./models/WidgetData"; -export { WidgetDefinition } from "./models/WidgetDefinition"; -export { WidgetExperienceType } from "./models/WidgetExperienceType"; -export { WidgetIncludedUser } from "./models/WidgetIncludedUser"; -export { WidgetIncludedUserAttributes } from "./models/WidgetIncludedUserAttributes"; -export { WidgetListResponse } from "./models/WidgetListResponse"; export { WidgetLiveSpan } from "./models/WidgetLiveSpan"; -export { WidgetRelationshipData } from "./models/WidgetRelationshipData"; -export { WidgetRelationshipItem } from "./models/WidgetRelationshipItem"; -export { WidgetRelationships } from "./models/WidgetRelationships"; -export { WidgetResponse } from "./models/WidgetResponse"; -export { WidgetSearchMeta } from "./models/WidgetSearchMeta"; -export { WidgetType } from "./models/WidgetType"; export { WorkflowData } from "./models/WorkflowData"; export { WorkflowDataAttributes } from "./models/WorkflowDataAttributes"; export { WorkflowDataRelationships } from "./models/WorkflowDataRelationships"; diff --git a/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequest.ts b/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequest.ts deleted file mode 100644 index 10d20619deeb..000000000000 --- a/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequest.ts +++ /dev/null @@ -1,54 +0,0 @@ -/** - * 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 { CreateOrUpdateWidgetRequestData } from "./CreateOrUpdateWidgetRequestData"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Request body for creating or updating a widget. - */ -export class CreateOrUpdateWidgetRequest { - /** - * Data for creating or updating a widget. - */ - "data": CreateOrUpdateWidgetRequestData; - - /** - * 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 = { - data: { - baseName: "data", - type: "CreateOrUpdateWidgetRequestData", - required: true, - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return CreateOrUpdateWidgetRequest.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestAttributes.ts b/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestAttributes.ts deleted file mode 100644 index 706ce73aeb32..000000000000 --- a/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestAttributes.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 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 { WidgetDefinition } from "./WidgetDefinition"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Attributes for creating or updating a widget. - */ -export class CreateOrUpdateWidgetRequestAttributes { - /** - * The definition of a widget, including its type and configuration. - */ - "definition": WidgetDefinition; - /** - * User-defined tags for organizing the widget. - */ - "tags"?: 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 = { - definition: { - baseName: "definition", - type: "WidgetDefinition", - required: true, - }, - tags: { - baseName: "tags", - type: "Array", - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return CreateOrUpdateWidgetRequestAttributes.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestData.ts b/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestData.ts deleted file mode 100644 index 285f08562178..000000000000 --- a/packages/datadog-api-client-v2/models/CreateOrUpdateWidgetRequestData.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 { CreateOrUpdateWidgetRequestAttributes } from "./CreateOrUpdateWidgetRequestAttributes"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Data for creating or updating a widget. - */ -export class CreateOrUpdateWidgetRequestData { - /** - * Attributes for creating or updating a widget. - */ - "attributes": CreateOrUpdateWidgetRequestAttributes; - /** - * Widgets resource type. - */ - "type": string; - - /** - * 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 = { - attributes: { - baseName: "attributes", - type: "CreateOrUpdateWidgetRequestAttributes", - required: true, - }, - type: { - baseName: "type", - type: "string", - required: true, - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return CreateOrUpdateWidgetRequestData.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 8a3bc781a918..c092ffd784f2 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -700,9 +700,6 @@ import { CreateOnCallNotificationRuleRequestData } from "./CreateOnCallNotificat import { CreateOpenAPIResponse } from "./CreateOpenAPIResponse"; import { CreateOpenAPIResponseAttributes } from "./CreateOpenAPIResponseAttributes"; import { CreateOpenAPIResponseData } from "./CreateOpenAPIResponseData"; -import { CreateOrUpdateWidgetRequest } from "./CreateOrUpdateWidgetRequest"; -import { CreateOrUpdateWidgetRequestAttributes } from "./CreateOrUpdateWidgetRequestAttributes"; -import { CreateOrUpdateWidgetRequestData } from "./CreateOrUpdateWidgetRequestData"; import { CreatePageRequest } from "./CreatePageRequest"; import { CreatePageRequestData } from "./CreatePageRequestData"; import { CreatePageRequestDataAttributes } from "./CreatePageRequestDataAttributes"; @@ -3515,17 +3512,6 @@ import { WatchDataAttributes } from "./WatchDataAttributes"; import { WatcherArray } from "./WatcherArray"; import { WatcherData } from "./WatcherData"; import { WatcherDataAttributes } from "./WatcherDataAttributes"; -import { WidgetAttributes } from "./WidgetAttributes"; -import { WidgetData } from "./WidgetData"; -import { WidgetDefinition } from "./WidgetDefinition"; -import { WidgetIncludedUser } from "./WidgetIncludedUser"; -import { WidgetIncludedUserAttributes } from "./WidgetIncludedUserAttributes"; -import { WidgetListResponse } from "./WidgetListResponse"; -import { WidgetRelationshipData } from "./WidgetRelationshipData"; -import { WidgetRelationshipItem } from "./WidgetRelationshipItem"; -import { WidgetRelationships } from "./WidgetRelationships"; -import { WidgetResponse } from "./WidgetResponse"; -import { WidgetSearchMeta } from "./WidgetSearchMeta"; import { WorkflowData } from "./WorkflowData"; import { WorkflowDataAttributes } from "./WorkflowDataAttributes"; import { WorkflowDataRelationships } from "./WorkflowDataRelationships"; @@ -5601,12 +5587,6 @@ const enumsMap: { [key: string]: any[] } = { "saturday", "sunday", ], - WidgetExperienceType: [ - "ccm_reports", - "logs_reports", - "csv_reports", - "product_analytics", - ], WidgetLiveSpan: [ "1m", "5m", @@ -5624,23 +5604,6 @@ const enumsMap: { [key: string]: any[] } = { "1y", "alert", ], - WidgetType: [ - "bar_chart", - "change", - "cloud_cost_summary", - "cohort", - "funnel", - "geomap", - "list_stream", - "query_table", - "query_value", - "retention_curve", - "sankey", - "sunburst", - "timeseries", - "toplist", - "treemap", - ], WorkflowDataType: ["workflows"], WorkflowUserRelationshipType: ["users"], }; @@ -6479,9 +6442,6 @@ const typeMap: { [index: string]: any } = { CreateOpenAPIResponse: CreateOpenAPIResponse, CreateOpenAPIResponseAttributes: CreateOpenAPIResponseAttributes, CreateOpenAPIResponseData: CreateOpenAPIResponseData, - CreateOrUpdateWidgetRequest: CreateOrUpdateWidgetRequest, - CreateOrUpdateWidgetRequestAttributes: CreateOrUpdateWidgetRequestAttributes, - CreateOrUpdateWidgetRequestData: CreateOrUpdateWidgetRequestData, CreatePageRequest: CreatePageRequest, CreatePageRequestData: CreatePageRequestData, CreatePageRequestDataAttributes: CreatePageRequestDataAttributes, @@ -9870,17 +9830,6 @@ const typeMap: { [index: string]: any } = { WatcherArray: WatcherArray, WatcherData: WatcherData, WatcherDataAttributes: WatcherDataAttributes, - WidgetAttributes: WidgetAttributes, - WidgetData: WidgetData, - WidgetDefinition: WidgetDefinition, - WidgetIncludedUser: WidgetIncludedUser, - WidgetIncludedUserAttributes: WidgetIncludedUserAttributes, - WidgetListResponse: WidgetListResponse, - WidgetRelationshipData: WidgetRelationshipData, - WidgetRelationshipItem: WidgetRelationshipItem, - WidgetRelationships: WidgetRelationships, - WidgetResponse: WidgetResponse, - WidgetSearchMeta: WidgetSearchMeta, WorkflowData: WorkflowData, WorkflowDataAttributes: WorkflowDataAttributes, WorkflowDataRelationships: WorkflowDataRelationships, diff --git a/packages/datadog-api-client-v2/models/WidgetAttributes.ts b/packages/datadog-api-client-v2/models/WidgetAttributes.ts deleted file mode 100644 index 08c7a665c241..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetAttributes.ts +++ /dev/null @@ -1,90 +0,0 @@ -/** - * 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 { WidgetDefinition } from "./WidgetDefinition"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Attributes of a widget resource. - */ -export class WidgetAttributes { - /** - * ISO 8601 timestamp of when the widget was created. - */ - "createdAt": string; - /** - * The definition of a widget, including its type and configuration. - */ - "definition": WidgetDefinition; - /** - * Will be implemented soon. Currently always returns false. - */ - "isFavorited": boolean; - /** - * ISO 8601 timestamp of when the widget was last modified. - */ - "modifiedAt": string; - /** - * User-defined tags for organizing widgets. - */ - "tags": Array | null; - - /** - * 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 = { - createdAt: { - baseName: "created_at", - type: "string", - required: true, - }, - definition: { - baseName: "definition", - type: "WidgetDefinition", - required: true, - }, - isFavorited: { - baseName: "is_favorited", - type: "boolean", - required: true, - }, - modifiedAt: { - baseName: "modified_at", - type: "string", - required: true, - }, - tags: { - baseName: "tags", - type: "Array", - required: true, - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetAttributes.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetData.ts b/packages/datadog-api-client-v2/models/WidgetData.ts deleted file mode 100644 index 1383f5d356b1..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetData.ts +++ /dev/null @@ -1,81 +0,0 @@ -/** - * 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 { WidgetAttributes } from "./WidgetAttributes"; -import { WidgetRelationships } from "./WidgetRelationships"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * A widget resource object. - */ -export class WidgetData { - /** - * Attributes of a widget resource. - */ - "attributes": WidgetAttributes; - /** - * The unique identifier of the widget. - */ - "id": string; - /** - * Relationships of the widget resource. - */ - "relationships"?: WidgetRelationships; - /** - * Widgets resource type. - */ - "type": string; - - /** - * 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 = { - attributes: { - baseName: "attributes", - type: "WidgetAttributes", - required: true, - }, - id: { - baseName: "id", - type: "string", - required: true, - }, - relationships: { - baseName: "relationships", - type: "WidgetRelationships", - }, - type: { - baseName: "type", - type: "string", - required: true, - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetData.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetDefinition.ts b/packages/datadog-api-client-v2/models/WidgetDefinition.ts deleted file mode 100644 index f10dd2de3bf4..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetDefinition.ts +++ /dev/null @@ -1,64 +0,0 @@ -/** - * 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 { WidgetType } from "./WidgetType"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * The definition of a widget, including its type and configuration. - */ -export class WidgetDefinition { - /** - * The display title of the widget. - */ - "title": string; - /** - * Widget types that are allowed to be stored as individual records. - * This is not a complete list of dashboard and notebook widget types. - */ - "type": WidgetType; - - /** - * 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 = { - title: { - baseName: "title", - type: "string", - required: true, - }, - type: { - baseName: "type", - type: "WidgetType", - required: true, - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetDefinition.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetExperienceType.ts b/packages/datadog-api-client-v2/models/WidgetExperienceType.ts deleted file mode 100644 index 17088146941d..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetExperienceType.ts +++ /dev/null @@ -1,22 +0,0 @@ -/** - * 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"; - -/** - * Widget experience types that differentiate between the products using the specific widget. - */ - -export type WidgetExperienceType = - | typeof CCM_REPORTS - | typeof LOGS_REPORTS - | typeof CSV_REPORTS - | typeof PRODUCT_ANALYTICS - | UnparsedObject; -export const CCM_REPORTS = "ccm_reports"; -export const LOGS_REPORTS = "logs_reports"; -export const CSV_REPORTS = "csv_reports"; -export const PRODUCT_ANALYTICS = "product_analytics"; diff --git a/packages/datadog-api-client-v2/models/WidgetIncludedUser.ts b/packages/datadog-api-client-v2/models/WidgetIncludedUser.ts deleted file mode 100644 index 5f656542b387..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetIncludedUser.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * 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 { WidgetIncludedUserAttributes } from "./WidgetIncludedUserAttributes"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * A user resource included in the response. - */ -export class WidgetIncludedUser { - /** - * Attributes of an included user resource. - */ - "attributes"?: WidgetIncludedUserAttributes; - /** - * The unique identifier of the user. - */ - "id": string; - /** - * Users resource type. - */ - "type": string; - - /** - * 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 = { - attributes: { - baseName: "attributes", - type: "WidgetIncludedUserAttributes", - }, - id: { - baseName: "id", - type: "string", - required: true, - }, - type: { - baseName: "type", - type: "string", - required: true, - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetIncludedUser.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetIncludedUserAttributes.ts b/packages/datadog-api-client-v2/models/WidgetIncludedUserAttributes.ts deleted file mode 100644 index 49d4a59a5e9a..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetIncludedUserAttributes.ts +++ /dev/null @@ -1,60 +0,0 @@ -/** - * 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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Attributes of an included user resource. - */ -export class WidgetIncludedUserAttributes { - /** - * The email handle of the user. - */ - "handle"?: string; - /** - * The display name of the user. - */ - "name"?: string; - - /** - * 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 = { - handle: { - baseName: "handle", - type: "string", - }, - name: { - baseName: "name", - type: "string", - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetIncludedUserAttributes.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetListResponse.ts b/packages/datadog-api-client-v2/models/WidgetListResponse.ts deleted file mode 100644 index c89ae4abc862..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetListResponse.ts +++ /dev/null @@ -1,72 +0,0 @@ -/** - * 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 { WidgetData } from "./WidgetData"; -import { WidgetIncludedUser } from "./WidgetIncludedUser"; -import { WidgetSearchMeta } from "./WidgetSearchMeta"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Response containing a list of widgets. - */ -export class WidgetListResponse { - /** - * List of widget resources. - */ - "data": Array; - /** - * Array of user resources related to the widgets. - */ - "included"?: Array; - /** - * Metadata about the search results. - */ - "meta"?: WidgetSearchMeta; - - /** - * 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 = { - data: { - baseName: "data", - type: "Array", - required: true, - }, - included: { - baseName: "included", - type: "Array", - }, - meta: { - baseName: "meta", - type: "WidgetSearchMeta", - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetListResponse.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetRelationshipData.ts b/packages/datadog-api-client-v2/models/WidgetRelationshipData.ts deleted file mode 100644 index ad69f3704eb8..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetRelationshipData.ts +++ /dev/null @@ -1,62 +0,0 @@ -/** - * 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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Relationship data referencing a user resource. - */ -export class WidgetRelationshipData { - /** - * The unique identifier of the user. - */ - "id": string; - /** - * Users resource type. - */ - "type": string; - - /** - * 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, - }, - type: { - baseName: "type", - type: "string", - required: true, - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetRelationshipData.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetRelationshipItem.ts b/packages/datadog-api-client-v2/models/WidgetRelationshipItem.ts deleted file mode 100644 index 7f20e80c3786..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetRelationshipItem.ts +++ /dev/null @@ -1,53 +0,0 @@ -/** - * 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 { WidgetRelationshipData } from "./WidgetRelationshipData"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * A JSON:API relationship to a user. - */ -export class WidgetRelationshipItem { - /** - * Relationship data referencing a user resource. - */ - "data"?: WidgetRelationshipData; - - /** - * 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 = { - data: { - baseName: "data", - type: "WidgetRelationshipData", - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetRelationshipItem.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetRelationships.ts b/packages/datadog-api-client-v2/models/WidgetRelationships.ts deleted file mode 100644 index a8f4b23072f1..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetRelationships.ts +++ /dev/null @@ -1,61 +0,0 @@ -/** - * 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 { WidgetRelationshipItem } from "./WidgetRelationshipItem"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Relationships of the widget resource. - */ -export class WidgetRelationships { - /** - * A JSON:API relationship to a user. - */ - "createdBy"?: WidgetRelationshipItem; - /** - * A JSON:API relationship to a user. - */ - "modifiedBy"?: WidgetRelationshipItem; - - /** - * 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 = { - createdBy: { - baseName: "created_by", - type: "WidgetRelationshipItem", - }, - modifiedBy: { - baseName: "modified_by", - type: "WidgetRelationshipItem", - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetRelationships.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetResponse.ts b/packages/datadog-api-client-v2/models/WidgetResponse.ts deleted file mode 100644 index b8feacaad577..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetResponse.ts +++ /dev/null @@ -1,63 +0,0 @@ -/** - * 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 { WidgetData } from "./WidgetData"; -import { WidgetIncludedUser } from "./WidgetIncludedUser"; - -import { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Response containing a single widget. - */ -export class WidgetResponse { - /** - * A widget resource object. - */ - "data": WidgetData; - /** - * Array of user resources related to the widget. - */ - "included"?: 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 = { - data: { - baseName: "data", - type: "WidgetData", - required: true, - }, - included: { - baseName: "included", - type: "Array", - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetResponse.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetSearchMeta.ts b/packages/datadog-api-client-v2/models/WidgetSearchMeta.ts deleted file mode 100644 index 92b1d4f18cf2..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetSearchMeta.ts +++ /dev/null @@ -1,80 +0,0 @@ -/** - * 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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; - -/** - * Metadata about the search results. - */ -export class WidgetSearchMeta { - /** - * Total number of widgets created by anyone. - */ - "createdByAnyoneTotal"?: number; - /** - * Total number of widgets created by the current user. - */ - "createdByYouTotal"?: number; - /** - * Total number of widgets favorited by the current user. - */ - "favoritedByYouTotal"?: number; - /** - * Total number of widgets matching the current filter criteria. - */ - "filteredTotal"?: number; - - /** - * 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 = { - createdByAnyoneTotal: { - baseName: "created_by_anyone_total", - type: "number", - format: "int64", - }, - createdByYouTotal: { - baseName: "created_by_you_total", - type: "number", - format: "int64", - }, - favoritedByYouTotal: { - baseName: "favorited_by_you_total", - type: "number", - format: "int64", - }, - filteredTotal: { - baseName: "filtered_total", - type: "number", - format: "int64", - }, - additionalProperties: { - baseName: "additionalProperties", - type: "{ [key: string]: any; }", - }, - }; - - /** - * @ignore - */ - static getAttributeTypeMap(): AttributeTypeMap { - return WidgetSearchMeta.attributeTypeMap; - } - - public constructor() {} -} diff --git a/packages/datadog-api-client-v2/models/WidgetType.ts b/packages/datadog-api-client-v2/models/WidgetType.ts deleted file mode 100644 index 68e9064755c1..000000000000 --- a/packages/datadog-api-client-v2/models/WidgetType.ts +++ /dev/null @@ -1,45 +0,0 @@ -/** - * 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"; - -/** - * Widget types that are allowed to be stored as individual records. - * This is not a complete list of dashboard and notebook widget types. - */ - -export type WidgetType = - | typeof BAR_CHART - | typeof CHANGE - | typeof CLOUD_COST_SUMMARY - | typeof COHORT - | typeof FUNNEL - | typeof GEOMAP - | typeof LIST_STREAM - | typeof QUERY_TABLE - | typeof QUERY_VALUE - | typeof RETENTION_CURVE - | typeof SANKEY - | typeof SUNBURST - | typeof TIMESERIES - | typeof TOPLIST - | typeof TREEMAP - | UnparsedObject; -export const BAR_CHART = "bar_chart"; -export const CHANGE = "change"; -export const CLOUD_COST_SUMMARY = "cloud_cost_summary"; -export const COHORT = "cohort"; -export const FUNNEL = "funnel"; -export const GEOMAP = "geomap"; -export const LIST_STREAM = "list_stream"; -export const QUERY_TABLE = "query_table"; -export const QUERY_VALUE = "query_value"; -export const RETENTION_CURVE = "retention_curve"; -export const SANKEY = "sankey"; -export const SUNBURST = "sunburst"; -export const TIMESERIES = "timeseries"; -export const TOPLIST = "toplist"; -export const TREEMAP = "treemap";