diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2a64f59537..2083f92a8c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -891,8 +891,8 @@ components: type: string GetIssueIncludeQueryParameter: description: |- - Comma-separated list of relationship objects that should be included in the response. - Possible values are `assignee`, `case`, `team_owners`, and `samples`. + Comma-separated list of relationship objects that should be included in the response. Possible values are `assignee`, `bits_investigation`, `case`, `pull_requests`, `samples`, `team_owners`, and `watches`. + Values must not contain spaces. `case` and `assignee` return nothing, without an error, if the caller lacks the `cases_read` permission. explode: false in: query name: include @@ -2194,7 +2194,8 @@ components: schema: $ref: "#/components/schemas/ServiceDefinitionSchemaVersions" SearchIssuesIncludeQueryParameter: - description: Comma-separated list of relationship objects that should be included in the response. Possible values are `issue`, `issue.assignee`, `issue.case`, and `issue.team_owners`. + description: |- + Comma-separated list of relationship objects that should be included in the response. Possible values are `issue`, `issue.assignee`, `issue.bits_investigation`, `issue.case`, `issue.impacted_sessions`, `issue.impacted_users`, `issue.pull_requests`, `issue.team_owners`, and `issue.watches`. explode: false in: query name: include @@ -61959,16 +61960,22 @@ components: description: Relationship object that should be included in the response. enum: - assignee + - bits_investigation - case - - team_owners + - pull_requests - samples + - team_owners + - watches example: "case" type: string x-enum-varnames: - ASSIGNEE + - BITS_INVESTIGATION - CASE - - TEAM_OWNERS + - PULL_REQUESTS - SAMPLES + - TEAM_OWNERS + - WATCHES GetMappingResponse: description: Response containing the entity attribute mapping configuration including all available attributes and their properties. example: @@ -72797,6 +72804,36 @@ components: state: $ref: "#/components/schemas/IssueState" type: object + IssueBitsInvestigationReference: + description: The Bits AI investigation linked to the issue. + properties: + id: + description: Bits AI investigation identifier. + example: "6c2b3c2e-6b8f-4c3a-9a7e-1d2f3a4b5c6d" + type: string + type: + $ref: "#/components/schemas/IssueBitsInvestigationType" + required: + - id + - type + type: object + IssueBitsInvestigationRelationship: + description: |- + Bits AI investigation linked to the issue, returned when `bits_investigation` is requested + in the `include` query parameter. + properties: + data: + $ref: "#/components/schemas/IssueBitsInvestigationReference" + required: + - data + type: object + IssueBitsInvestigationType: + description: Type of the object. + enum: ["bits_investigation"] + example: "bits_investigation" + type: string + x-enum-varnames: + - BITS_INVESTIGATION IssueCase: description: The case attached to the issue. properties: @@ -72866,6 +72903,10 @@ components: $ref: "#/components/schemas/CasePriority" status: $ref: "#/components/schemas/CaseStatus" + status_group: + $ref: "#/components/schemas/CaseStatusGroup" + status_name: + $ref: "#/components/schemas/CaseStatusName" title: description: Title of the case. example: "Error: HTTP error" @@ -73017,6 +73058,8 @@ components: - $ref: "#/components/schemas/IssueCase" - $ref: "#/components/schemas/IssueUser" - $ref: "#/components/schemas/IssueTeam" + - $ref: "#/components/schemas/IssuePullRequest" + - $ref: "#/components/schemas/IssueWatch" - $ref: "#/components/schemas/IssueSample" IssueLanguage: description: Programming language associated with the issue. @@ -73046,6 +73089,7 @@ components: - SCALA - SWIFT - TERRAFORM + - TF - TYPESCRIPT - UNKNOWN example: "PYTHON" @@ -73076,6 +73120,7 @@ components: - SCALA - SWIFT - TERRAFORM + - TF - TYPESCRIPT - UNKNOWN IssuePlatform: @@ -73084,6 +73129,7 @@ components: - ANDROID - BACKEND - BROWSER + - ELECTRON - FLUTTER - IOS - REACT_NATIVE @@ -73095,11 +73141,96 @@ components: - ANDROID - BACKEND - BROWSER + - ELECTRON - FLUTTER - IOS - REACT_NATIVE - ROKU - UNKNOWN + IssuePullRequest: + description: A pull request linked to an issue. + properties: + attributes: + $ref: "#/components/schemas/IssuePullRequestAttributes" + id: + description: Pull request link identifier. + example: "b3c1d2e4-5f6a-4b7c-8d9e-0f1a2b3c4d5e" + type: string + type: + $ref: "#/components/schemas/IssuePullRequestType" + required: + - id + - type + - attributes + type: object + IssuePullRequestAttributes: + description: Object containing the information of a pull request linked to an issue. + properties: + closed_at: + description: Timestamp of when the pull request was closed. Omitted if the pull request is not closed. + example: "2025-01-02T00:00:00Z" + format: date-time + type: string + linked_at: + description: Timestamp of when the pull request was linked to the issue. + example: "2025-01-01T00:00:00Z" + format: date-time + type: string + merged_at: + description: Timestamp of when the pull request was merged. Omitted if the pull request is not merged. + example: "2025-01-02T00:00:00Z" + format: date-time + type: string + reason: + $ref: "#/components/schemas/IssuePullRequestReason" + url: + description: URL of the pull request. + example: "https://github.com/DataDog/example/pull/123" + type: string + type: object + IssuePullRequestReason: + description: Why the pull request is linked to the issue. `fix` means the pull request fixes the issue, and `trigger` means the pull request introduced the issue. + enum: + - unknown + - fix + - trigger + example: "fix" + type: string + x-enum-varnames: + - UNKNOWN + - FIX + - TRIGGER + IssuePullRequestReference: + description: A pull request linked to the issue. + properties: + id: + description: Pull request link identifier. + example: "b3c1d2e4-5f6a-4b7c-8d9e-0f1a2b3c4d5e" + type: string + type: + $ref: "#/components/schemas/IssuePullRequestType" + required: + - id + - type + type: object + IssuePullRequestType: + description: Type of the object. + enum: ["error_tracking_pull_request"] + example: "error_tracking_pull_request" + type: string + x-enum-varnames: + - ERROR_TRACKING_PULL_REQUEST + IssuePullRequestsRelationship: + description: Relationship between the issue and its linked pull requests. Returned when `pull_requests` is included and the issue has linked pull requests. + properties: + data: + description: Array of pull requests linked to the issue. + items: + $ref: "#/components/schemas/IssuePullRequestReference" + type: array + required: + - data + type: object IssueReference: description: The issue the search result corresponds to. properties: @@ -73135,16 +73266,22 @@ components: - regressed_at type: object IssueRelationships: - description: Relationship between the issue and an assignee, case and/or teams. + description: Relationship between the issue and other resources, such as an assignee, case, teams, pull requests, watches, samples, or a Bits AI investigation. properties: assignee: $ref: "#/components/schemas/IssueAssigneeRelationship" + bits_investigation: + $ref: "#/components/schemas/IssueBitsInvestigationRelationship" case: $ref: "#/components/schemas/IssueCaseRelationship" + pull_requests: + $ref: "#/components/schemas/IssuePullRequestsRelationship" samples: $ref: "#/components/schemas/IssueSamplesRelationship" team_owners: $ref: "#/components/schemas/IssueTeamOwnersRelationship" + watches: + $ref: "#/components/schemas/IssueWatchesRelationship" type: object IssueResponse: description: Response containing error tracking issue data. @@ -73651,6 +73788,146 @@ components: type: string x-enum-varnames: - USER + IssueWatch: + description: |- + An active watch on an issue. A watch moves an ignored issue back to open when its condition is met. + properties: + attributes: + $ref: "#/components/schemas/IssueWatchAttributes" + id: + description: Watch identifier. + example: "e7a1c3b5-2d4f-4a6b-8c9d-0e1f2a3b4c5d" + type: string + type: + $ref: "#/components/schemas/IssueWatchType" + required: + - id + - type + - attributes + type: object + IssueWatchAction: + description: Action applied to the issue when the watch condition is met. + properties: + from: + $ref: "#/components/schemas/IssueState" + kind: + $ref: "#/components/schemas/IssueWatchActionKind" + to: + $ref: "#/components/schemas/IssueState" + required: + - kind + type: object + IssueWatchActionKind: + description: Kind of watch action. + enum: + - CHANGE_ISSUE_STATE + example: "CHANGE_ISSUE_STATE" + type: string + x-enum-varnames: + - CHANGE_ISSUE_STATE + IssueWatchAttributes: + description: Object containing the information of a watch. + properties: + action: + $ref: "#/components/schemas/IssueWatchAction" + condition: + $ref: "#/components/schemas/IssueWatchCondition" + started_at: + description: Timestamp of when the watch started. + example: "2025-01-01T00:00:00Z" + format: date-time + type: string + status: + $ref: "#/components/schemas/IssueWatchStatus" + type: object + IssueWatchCondition: + description: |- + Condition that triggers the watch action. The fields that are set depend on `kind`: + `OCCURRENCES` uses `threshold`, `CARDINALITY` uses `threshold` and `projection`, + `ELAPSED_TIME` uses `duration`, and `ANY` and `ALL` use `operands`. + properties: + duration: + description: Time that must elapse before the condition is met, as a Go duration string. + example: "168h0m0s" + type: string + kind: + $ref: "#/components/schemas/IssueWatchConditionKind" + operands: + description: Nested conditions combined by `ANY` or `ALL`. + items: + $ref: "#/components/schemas/IssueWatchCondition" + type: array + projection: + description: Attributes whose distinct values are counted for `CARDINALITY`. + example: ["@usr.id"] + items: + description: Attribute path. + example: "@usr.id" + type: string + type: array + threshold: + description: Number of occurrences, or of distinct values for `CARDINALITY`, that triggers the condition. + example: 100 + format: int64 + type: integer + required: + - kind + type: object + IssueWatchConditionKind: + description: Kind of watch condition. + enum: + - OCCURRENCES + - CARDINALITY + - ELAPSED_TIME + - ANY + - ALL + example: "OCCURRENCES" + type: string + x-enum-varnames: + - OCCURRENCES + - CARDINALITY + - ELAPSED_TIME + - ANY + - ALL + IssueWatchReference: + description: An active watch on the issue. + properties: + id: + description: Watch identifier. + example: "e7a1c3b5-2d4f-4a6b-8c9d-0e1f2a3b4c5d" + type: string + type: + $ref: "#/components/schemas/IssueWatchType" + required: + - id + - type + type: object + IssueWatchStatus: + description: Status of the watch. + enum: + - ACTIVE + example: "ACTIVE" + type: string + x-enum-varnames: + - ACTIVE + IssueWatchType: + description: Type of the object. + enum: ["error_tracking_issue_watch"] + example: "error_tracking_issue_watch" + type: string + x-enum-varnames: + - ERROR_TRACKING_ISSUE_WATCH + IssueWatchesRelationship: + description: Relationship between the issue and its active watches. Returned when `watches` is included and the issue has an active watch. + properties: + data: + description: Array of active watches on the issue. + items: + $ref: "#/components/schemas/IssueWatchReference" + type: array + required: + - data + type: object IssuesSearchRequest: description: Search issues request payload. properties: @@ -73801,12 +74078,20 @@ components: description: Object containing the information of a search result. properties: impacted_sessions: - description: Count of sessions impacted by the issue over the queried time window. + description: |- + Count of sessions impacted by the issue over the queried time window. + Returned for RUM, LLM Observability, browser, and mobile searches, + or when `issue.impacted_sessions` is requested in the `include` query parameter. + Omitted when zero unless requested in the `include` query parameter. example: 12 format: int64 type: integer impacted_users: - description: Count of users impacted by the issue over the queried time window. + description: |- + Count of users impacted by the issue over the queried time window. + Returned for RUM, browser, and mobile searches, + or when `issue.impacted_users` is requested in the `include` query parameter. + Omitted when zero unless requested in the `include` query parameter. example: 4 format: int64 type: integer @@ -73823,6 +74108,8 @@ components: - $ref: "#/components/schemas/IssueCase" - $ref: "#/components/schemas/IssueUser" - $ref: "#/components/schemas/IssueTeam" + - $ref: "#/components/schemas/IssuePullRequest" + - $ref: "#/components/schemas/IssueWatch" IssuesSearchResultIssueRelationship: description: Relationship between the search result and the corresponding issue. properties: @@ -120833,15 +121120,25 @@ components: enum: - issue - issue.assignee + - issue.bits_investigation - issue.case + - issue.impacted_sessions + - issue.impacted_users + - issue.pull_requests - issue.team_owners + - issue.watches example: "issue.case" type: string x-enum-varnames: - ISSUE - ISSUE_ASSIGNEE + - ISSUE_BITS_INVESTIGATION - ISSUE_CASE + - ISSUE_IMPACTED_SESSIONS + - ISSUE_IMPACTED_USERS + - ISSUE_PULL_REQUESTS - ISSUE_TEAM_OWNERS + - ISSUE_WATCHES SeatAssignmentsDataType: default: seat-assignments description: Seat assignments resource type. @@ -179214,7 +179511,9 @@ paths: - Error Tracking /api/v2/error-tracking/issues/{issue_id}: get: - description: Retrieve the full details for a specific error tracking issue, including attributes and relationships. + description: |- + Retrieve the full details for a specific error tracking issue, including attributes and relationships. + Returns 403 if the caller lacks the `error_tracking_read` permission or does not have access to the issue's data. operationId: GetIssue parameters: - $ref: "#/components/parameters/IssueIDPathParameter" diff --git a/src/datadog_api_client/v2/api/error_tracking_api.py b/src/datadog_api_client/v2/api/error_tracking_api.py index 4c4e07f6eb..2f8753e226 100644 --- a/src/datadog_api_client/v2/api/error_tracking_api.py +++ b/src/datadog_api_client/v2/api/error_tracking_api.py @@ -194,11 +194,12 @@ def get_issue( """Get the details of an error tracking issue. Retrieve the full details for a specific error tracking issue, including attributes and relationships. + Returns 403 if the caller lacks the ``error_tracking_read`` permission or does not have access to the issue's data. :param issue_id: The identifier of the issue. :type issue_id: str - :param include: Comma-separated list of relationship objects that should be included in the response. - Possible values are ``assignee`` , ``case`` , ``team_owners`` , and ``samples``. + :param include: Comma-separated list of relationship objects that should be included in the response. Possible values are ``assignee`` , ``bits_investigation`` , ``case`` , ``pull_requests`` , ``samples`` , ``team_owners`` , and ``watches``. + Values must not contain spaces. ``case`` and ``assignee`` return nothing, without an error, if the caller lacks the ``cases_read`` permission. :type include: [GetIssueIncludeQueryParameterItem], optional :param filter_samples_biases: Comma-separated list of biases used to pick the samples returned with ``include=samples``. Requires ``include=samples``. Defaults to all biases. @@ -228,7 +229,7 @@ def search_issues( :param body: Search issues request payload. :type body: IssuesSearchRequest - :param include: Comma-separated list of relationship objects that should be included in the response. Possible values are ``issue`` , ``issue.assignee`` , ``issue.case`` , and ``issue.team_owners``. + :param include: Comma-separated list of relationship objects that should be included in the response. Possible values are ``issue`` , ``issue.assignee`` , ``issue.bits_investigation`` , ``issue.case`` , ``issue.impacted_sessions`` , ``issue.impacted_users`` , ``issue.pull_requests`` , ``issue.team_owners`` , and ``issue.watches``. :type include: [SearchIssuesIncludeQueryParameterItem], optional :rtype: IssuesSearchResponse """ diff --git a/src/datadog_api_client/v2/model/get_issue_include_query_parameter_item.py b/src/datadog_api_client/v2/model/get_issue_include_query_parameter_item.py index 879c5014d4..22dd2d4768 100644 --- a/src/datadog_api_client/v2/model/get_issue_include_query_parameter_item.py +++ b/src/datadog_api_client/v2/model/get_issue_include_query_parameter_item.py @@ -16,20 +16,26 @@ class GetIssueIncludeQueryParameterItem(ModelSimple): """ Relationship object that should be included in the response. - :param value: Must be one of ["assignee", "case", "team_owners", "samples"]. + :param value: Must be one of ["assignee", "bits_investigation", "case", "pull_requests", "samples", "team_owners", "watches"]. :type value: str """ allowed_values = { "assignee", + "bits_investigation", "case", - "team_owners", + "pull_requests", "samples", + "team_owners", + "watches", } ASSIGNEE: ClassVar["GetIssueIncludeQueryParameterItem"] + BITS_INVESTIGATION: ClassVar["GetIssueIncludeQueryParameterItem"] CASE: ClassVar["GetIssueIncludeQueryParameterItem"] - TEAM_OWNERS: ClassVar["GetIssueIncludeQueryParameterItem"] + PULL_REQUESTS: ClassVar["GetIssueIncludeQueryParameterItem"] SAMPLES: ClassVar["GetIssueIncludeQueryParameterItem"] + TEAM_OWNERS: ClassVar["GetIssueIncludeQueryParameterItem"] + WATCHES: ClassVar["GetIssueIncludeQueryParameterItem"] @cached_property def openapi_types(_): @@ -39,6 +45,9 @@ def openapi_types(_): GetIssueIncludeQueryParameterItem.ASSIGNEE = GetIssueIncludeQueryParameterItem("assignee") +GetIssueIncludeQueryParameterItem.BITS_INVESTIGATION = GetIssueIncludeQueryParameterItem("bits_investigation") GetIssueIncludeQueryParameterItem.CASE = GetIssueIncludeQueryParameterItem("case") -GetIssueIncludeQueryParameterItem.TEAM_OWNERS = GetIssueIncludeQueryParameterItem("team_owners") +GetIssueIncludeQueryParameterItem.PULL_REQUESTS = GetIssueIncludeQueryParameterItem("pull_requests") GetIssueIncludeQueryParameterItem.SAMPLES = GetIssueIncludeQueryParameterItem("samples") +GetIssueIncludeQueryParameterItem.TEAM_OWNERS = GetIssueIncludeQueryParameterItem("team_owners") +GetIssueIncludeQueryParameterItem.WATCHES = GetIssueIncludeQueryParameterItem("watches") diff --git a/src/datadog_api_client/v2/model/issue.py b/src/datadog_api_client/v2/model/issue.py index ae47f012ea..0354ac711b 100644 --- a/src/datadog_api_client/v2/model/issue.py +++ b/src/datadog_api_client/v2/model/issue.py @@ -57,7 +57,7 @@ def __init__( :param id: Issue identifier. :type id: str - :param relationships: Relationship between the issue and an assignee, case and/or teams. + :param relationships: Relationship between the issue and other resources, such as an assignee, case, teams, pull requests, watches, samples, or a Bits AI investigation. :type relationships: IssueRelationships, optional :param type: Type of the object. diff --git a/src/datadog_api_client/v2/model/issue_bits_investigation_reference.py b/src/datadog_api_client/v2/model/issue_bits_investigation_reference.py new file mode 100644 index 0000000000..2a3e868b95 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_bits_investigation_reference.py @@ -0,0 +1,46 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_bits_investigation_type import IssueBitsInvestigationType + + +class IssueBitsInvestigationReference(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_bits_investigation_type import IssueBitsInvestigationType + + return { + "id": (str,), + "type": (IssueBitsInvestigationType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: IssueBitsInvestigationType, **kwargs): + """ + The Bits AI investigation linked to the issue. + + :param id: Bits AI investigation identifier. + :type id: str + + :param type: Type of the object. + :type type: IssueBitsInvestigationType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/issue_bits_investigation_relationship.py b/src/datadog_api_client/v2/model/issue_bits_investigation_relationship.py new file mode 100644 index 0000000000..927cd86033 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_bits_investigation_relationship.py @@ -0,0 +1,41 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_bits_investigation_reference import IssueBitsInvestigationReference + + +class IssueBitsInvestigationRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_bits_investigation_reference import IssueBitsInvestigationReference + + return { + "data": (IssueBitsInvestigationReference,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: IssueBitsInvestigationReference, **kwargs): + """ + Bits AI investigation linked to the issue, returned when ``bits_investigation`` is requested + in the ``include`` query parameter. + + :param data: The Bits AI investigation linked to the issue. + :type data: IssueBitsInvestigationReference + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/issue_bits_investigation_type.py b/src/datadog_api_client/v2/model/issue_bits_investigation_type.py new file mode 100644 index 0000000000..af68ff923a --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_bits_investigation_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class IssueBitsInvestigationType(ModelSimple): + """ + Type of the object. + + :param value: If omitted defaults to "bits_investigation". Must be one of ["bits_investigation"]. + :type value: str + """ + + allowed_values = { + "bits_investigation", + } + BITS_INVESTIGATION: ClassVar["IssueBitsInvestigationType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IssueBitsInvestigationType.BITS_INVESTIGATION = IssueBitsInvestigationType("bits_investigation") diff --git a/src/datadog_api_client/v2/model/issue_case_attributes.py b/src/datadog_api_client/v2/model/issue_case_attributes.py index 770be3ee29..75bb327998 100644 --- a/src/datadog_api_client/v2/model/issue_case_attributes.py +++ b/src/datadog_api_client/v2/model/issue_case_attributes.py @@ -20,6 +20,7 @@ from datadog_api_client.v2.model.issue_case_linear_issue import IssueCaseLinearIssue from datadog_api_client.v2.model.case_priority import CasePriority from datadog_api_client.v2.model.case_status import CaseStatus + from datadog_api_client.v2.model.case_status_group import CaseStatusGroup class IssueCaseAttributes(ModelNormal): @@ -30,6 +31,7 @@ def openapi_types(_): from datadog_api_client.v2.model.issue_case_linear_issue import IssueCaseLinearIssue from datadog_api_client.v2.model.case_priority import CasePriority from datadog_api_client.v2.model.case_status import CaseStatus + from datadog_api_client.v2.model.case_status_group import CaseStatusGroup return { "archived_at": (datetime,), @@ -45,6 +47,8 @@ def openapi_types(_): "modified_at": (datetime,), "priority": (CasePriority,), "status": (CaseStatus,), + "status_group": (CaseStatusGroup,), + "status_name": (str,), "title": (str,), "type": (str,), } @@ -63,6 +67,8 @@ def openapi_types(_): "modified_at": "modified_at", "priority": "priority", "status": "status", + "status_group": "status_group", + "status_name": "status_name", "title": "title", "type": "type", } @@ -82,6 +88,8 @@ def __init__( modified_at: Union[datetime, UnsetType] = unset, priority: Union[CasePriority, UnsetType] = unset, status: Union[CaseStatus, UnsetType] = unset, + status_group: Union[CaseStatusGroup, UnsetType] = unset, + status_name: Union[str, UnsetType] = unset, title: Union[str, UnsetType] = unset, type: Union[str, UnsetType] = unset, **kwargs, @@ -128,6 +136,12 @@ def __init__( :param status: Deprecated way of representing the work item status, which only supports OPEN, IN_PROGRESS, and CLOSED statuses. Use ``status_name`` instead. **Deprecated**. :type status: CaseStatus, optional + :param status_group: Status group of the work item. + :type status_group: CaseStatusGroup, optional + + :param status_name: Status of the work item. Must be one of the existing statuses for the work item's type. + :type status_name: str, optional + :param title: Title of the case. :type title: str, optional @@ -160,6 +174,10 @@ def __init__( kwargs["priority"] = priority if status is not unset: kwargs["status"] = status + if status_group is not unset: + kwargs["status_group"] = status_group + if status_name is not unset: + kwargs["status_name"] = status_name if title is not unset: kwargs["title"] = title if type is not unset: diff --git a/src/datadog_api_client/v2/model/issue_included.py b/src/datadog_api_client/v2/model/issue_included.py index 816e79f44b..91bf11e852 100644 --- a/src/datadog_api_client/v2/model/issue_included.py +++ b/src/datadog_api_client/v2/model/issue_included.py @@ -41,6 +41,8 @@ def _composed_schemas(_): from datadog_api_client.v2.model.issue_case import IssueCase from datadog_api_client.v2.model.issue_user import IssueUser from datadog_api_client.v2.model.issue_team import IssueTeam + from datadog_api_client.v2.model.issue_pull_request import IssuePullRequest + from datadog_api_client.v2.model.issue_watch import IssueWatch from datadog_api_client.v2.model.issue_sample import IssueSample return { @@ -48,6 +50,8 @@ def _composed_schemas(_): IssueCase, IssueUser, IssueTeam, + IssuePullRequest, + IssueWatch, IssueSample, ], } diff --git a/src/datadog_api_client/v2/model/issue_language.py b/src/datadog_api_client/v2/model/issue_language.py index 5f0f86d228..8ed4305985 100644 --- a/src/datadog_api_client/v2/model/issue_language.py +++ b/src/datadog_api_client/v2/model/issue_language.py @@ -16,7 +16,7 @@ class IssueLanguage(ModelSimple): """ Programming language associated with the issue. - :param value: Must be one of ["BRIGHTSCRIPT", "C", "C_PLUS_PLUS", "C_SHARP", "CLOJURE", "DOT_NET", "ELIXIR", "ERLANG", "GO", "GROOVY", "HASKELL", "HCL", "JAVA", "JAVASCRIPT", "JVM", "KOTLIN", "OBJECTIVE_C", "PERL", "PHP", "PYTHON", "RUBY", "RUST", "SCALA", "SWIFT", "TERRAFORM", "TYPESCRIPT", "UNKNOWN"]. + :param value: Must be one of ["BRIGHTSCRIPT", "C", "C_PLUS_PLUS", "C_SHARP", "CLOJURE", "DOT_NET", "ELIXIR", "ERLANG", "GO", "GROOVY", "HASKELL", "HCL", "JAVA", "JAVASCRIPT", "JVM", "KOTLIN", "OBJECTIVE_C", "PERL", "PHP", "PYTHON", "RUBY", "RUST", "SCALA", "SWIFT", "TERRAFORM", "TF", "TYPESCRIPT", "UNKNOWN"]. :type value: str """ @@ -46,6 +46,7 @@ class IssueLanguage(ModelSimple): "SCALA", "SWIFT", "TERRAFORM", + "TF", "TYPESCRIPT", "UNKNOWN", } @@ -74,6 +75,7 @@ class IssueLanguage(ModelSimple): SCALA: ClassVar["IssueLanguage"] SWIFT: ClassVar["IssueLanguage"] TERRAFORM: ClassVar["IssueLanguage"] + TF: ClassVar["IssueLanguage"] TYPESCRIPT: ClassVar["IssueLanguage"] UNKNOWN: ClassVar["IssueLanguage"] @@ -109,5 +111,6 @@ def openapi_types(_): IssueLanguage.SCALA = IssueLanguage("SCALA") IssueLanguage.SWIFT = IssueLanguage("SWIFT") IssueLanguage.TERRAFORM = IssueLanguage("TERRAFORM") +IssueLanguage.TF = IssueLanguage("TF") IssueLanguage.TYPESCRIPT = IssueLanguage("TYPESCRIPT") IssueLanguage.UNKNOWN = IssueLanguage("UNKNOWN") diff --git a/src/datadog_api_client/v2/model/issue_platform.py b/src/datadog_api_client/v2/model/issue_platform.py index 326d7b7ad7..b1c217d35a 100644 --- a/src/datadog_api_client/v2/model/issue_platform.py +++ b/src/datadog_api_client/v2/model/issue_platform.py @@ -16,7 +16,7 @@ class IssuePlatform(ModelSimple): """ Platform associated with the issue. - :param value: Must be one of ["ANDROID", "BACKEND", "BROWSER", "FLUTTER", "IOS", "REACT_NATIVE", "ROKU", "UNKNOWN"]. + :param value: Must be one of ["ANDROID", "BACKEND", "BROWSER", "ELECTRON", "FLUTTER", "IOS", "REACT_NATIVE", "ROKU", "UNKNOWN"]. :type value: str """ @@ -24,6 +24,7 @@ class IssuePlatform(ModelSimple): "ANDROID", "BACKEND", "BROWSER", + "ELECTRON", "FLUTTER", "IOS", "REACT_NATIVE", @@ -33,6 +34,7 @@ class IssuePlatform(ModelSimple): ANDROID: ClassVar["IssuePlatform"] BACKEND: ClassVar["IssuePlatform"] BROWSER: ClassVar["IssuePlatform"] + ELECTRON: ClassVar["IssuePlatform"] FLUTTER: ClassVar["IssuePlatform"] IOS: ClassVar["IssuePlatform"] REACT_NATIVE: ClassVar["IssuePlatform"] @@ -49,6 +51,7 @@ def openapi_types(_): IssuePlatform.ANDROID = IssuePlatform("ANDROID") IssuePlatform.BACKEND = IssuePlatform("BACKEND") IssuePlatform.BROWSER = IssuePlatform("BROWSER") +IssuePlatform.ELECTRON = IssuePlatform("ELECTRON") IssuePlatform.FLUTTER = IssuePlatform("FLUTTER") IssuePlatform.IOS = IssuePlatform("IOS") IssuePlatform.REACT_NATIVE = IssuePlatform("REACT_NATIVE") diff --git a/src/datadog_api_client/v2/model/issue_pull_request.py b/src/datadog_api_client/v2/model/issue_pull_request.py new file mode 100644 index 0000000000..eb206dc2bb --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_pull_request.py @@ -0,0 +1,54 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_pull_request_attributes import IssuePullRequestAttributes + from datadog_api_client.v2.model.issue_pull_request_type import IssuePullRequestType + + +class IssuePullRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_pull_request_attributes import IssuePullRequestAttributes + from datadog_api_client.v2.model.issue_pull_request_type import IssuePullRequestType + + return { + "attributes": (IssuePullRequestAttributes,), + "id": (str,), + "type": (IssuePullRequestType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: IssuePullRequestAttributes, id: str, type: IssuePullRequestType, **kwargs): + """ + A pull request linked to an issue. + + :param attributes: Object containing the information of a pull request linked to an issue. + :type attributes: IssuePullRequestAttributes + + :param id: Pull request link identifier. + :type id: str + + :param type: Type of the object. + :type type: IssuePullRequestType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/issue_pull_request_attributes.py b/src/datadog_api_client/v2/model/issue_pull_request_attributes.py new file mode 100644 index 0000000000..d91833bb91 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_pull_request_attributes.py @@ -0,0 +1,79 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_pull_request_reason import IssuePullRequestReason + + +class IssuePullRequestAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_pull_request_reason import IssuePullRequestReason + + return { + "closed_at": (datetime,), + "linked_at": (datetime,), + "merged_at": (datetime,), + "reason": (IssuePullRequestReason,), + "url": (str,), + } + + attribute_map = { + "closed_at": "closed_at", + "linked_at": "linked_at", + "merged_at": "merged_at", + "reason": "reason", + "url": "url", + } + + def __init__( + self_, + closed_at: Union[datetime, UnsetType] = unset, + linked_at: Union[datetime, UnsetType] = unset, + merged_at: Union[datetime, UnsetType] = unset, + reason: Union[IssuePullRequestReason, UnsetType] = unset, + url: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Object containing the information of a pull request linked to an issue. + + :param closed_at: Timestamp of when the pull request was closed. Omitted if the pull request is not closed. + :type closed_at: datetime, optional + + :param linked_at: Timestamp of when the pull request was linked to the issue. + :type linked_at: datetime, optional + + :param merged_at: Timestamp of when the pull request was merged. Omitted if the pull request is not merged. + :type merged_at: datetime, optional + + :param reason: Why the pull request is linked to the issue. ``fix`` means the pull request fixes the issue, and ``trigger`` means the pull request introduced the issue. + :type reason: IssuePullRequestReason, optional + + :param url: URL of the pull request. + :type url: str, optional + """ + if closed_at is not unset: + kwargs["closed_at"] = closed_at + if linked_at is not unset: + kwargs["linked_at"] = linked_at + if merged_at is not unset: + kwargs["merged_at"] = merged_at + if reason is not unset: + kwargs["reason"] = reason + if url is not unset: + kwargs["url"] = url + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/issue_pull_request_reason.py b/src/datadog_api_client/v2/model/issue_pull_request_reason.py new file mode 100644 index 0000000000..f11931c362 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_pull_request_reason.py @@ -0,0 +1,41 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class IssuePullRequestReason(ModelSimple): + """ + Why the pull request is linked to the issue. `fix` means the pull request fixes the issue, and `trigger` means the pull request introduced the issue. + + :param value: Must be one of ["unknown", "fix", "trigger"]. + :type value: str + """ + + allowed_values = { + "unknown", + "fix", + "trigger", + } + UNKNOWN: ClassVar["IssuePullRequestReason"] + FIX: ClassVar["IssuePullRequestReason"] + TRIGGER: ClassVar["IssuePullRequestReason"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IssuePullRequestReason.UNKNOWN = IssuePullRequestReason("unknown") +IssuePullRequestReason.FIX = IssuePullRequestReason("fix") +IssuePullRequestReason.TRIGGER = IssuePullRequestReason("trigger") diff --git a/src/datadog_api_client/v2/model/issue_pull_request_reference.py b/src/datadog_api_client/v2/model/issue_pull_request_reference.py new file mode 100644 index 0000000000..d1130b5648 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_pull_request_reference.py @@ -0,0 +1,46 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_pull_request_type import IssuePullRequestType + + +class IssuePullRequestReference(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_pull_request_type import IssuePullRequestType + + return { + "id": (str,), + "type": (IssuePullRequestType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: IssuePullRequestType, **kwargs): + """ + A pull request linked to the issue. + + :param id: Pull request link identifier. + :type id: str + + :param type: Type of the object. + :type type: IssuePullRequestType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/issue_pull_request_type.py b/src/datadog_api_client/v2/model/issue_pull_request_type.py new file mode 100644 index 0000000000..03ee9f41ca --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_pull_request_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class IssuePullRequestType(ModelSimple): + """ + Type of the object. + + :param value: If omitted defaults to "error_tracking_pull_request". Must be one of ["error_tracking_pull_request"]. + :type value: str + """ + + allowed_values = { + "error_tracking_pull_request", + } + ERROR_TRACKING_PULL_REQUEST: ClassVar["IssuePullRequestType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IssuePullRequestType.ERROR_TRACKING_PULL_REQUEST = IssuePullRequestType("error_tracking_pull_request") diff --git a/src/datadog_api_client/v2/model/issue_pull_requests_relationship.py b/src/datadog_api_client/v2/model/issue_pull_requests_relationship.py new file mode 100644 index 0000000000..15711eb4d6 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_pull_requests_relationship.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_pull_request_reference import IssuePullRequestReference + + +class IssuePullRequestsRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_pull_request_reference import IssuePullRequestReference + + return { + "data": ([IssuePullRequestReference],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[IssuePullRequestReference], **kwargs): + """ + Relationship between the issue and its linked pull requests. Returned when ``pull_requests`` is included and the issue has linked pull requests. + + :param data: Array of pull requests linked to the issue. + :type data: [IssuePullRequestReference] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/issue_relationships.py b/src/datadog_api_client/v2/model/issue_relationships.py index 3f8f182808..51050c258e 100644 --- a/src/datadog_api_client/v2/model/issue_relationships.py +++ b/src/datadog_api_client/v2/model/issue_relationships.py @@ -15,62 +15,93 @@ if TYPE_CHECKING: from datadog_api_client.v2.model.issue_assignee_relationship import IssueAssigneeRelationship + from datadog_api_client.v2.model.issue_bits_investigation_relationship import IssueBitsInvestigationRelationship from datadog_api_client.v2.model.issue_case_relationship import IssueCaseRelationship + from datadog_api_client.v2.model.issue_pull_requests_relationship import IssuePullRequestsRelationship from datadog_api_client.v2.model.issue_samples_relationship import IssueSamplesRelationship from datadog_api_client.v2.model.issue_team_owners_relationship import IssueTeamOwnersRelationship + from datadog_api_client.v2.model.issue_watches_relationship import IssueWatchesRelationship class IssueRelationships(ModelNormal): @cached_property def openapi_types(_): from datadog_api_client.v2.model.issue_assignee_relationship import IssueAssigneeRelationship + from datadog_api_client.v2.model.issue_bits_investigation_relationship import IssueBitsInvestigationRelationship from datadog_api_client.v2.model.issue_case_relationship import IssueCaseRelationship + from datadog_api_client.v2.model.issue_pull_requests_relationship import IssuePullRequestsRelationship from datadog_api_client.v2.model.issue_samples_relationship import IssueSamplesRelationship from datadog_api_client.v2.model.issue_team_owners_relationship import IssueTeamOwnersRelationship + from datadog_api_client.v2.model.issue_watches_relationship import IssueWatchesRelationship return { "assignee": (IssueAssigneeRelationship,), + "bits_investigation": (IssueBitsInvestigationRelationship,), "case": (IssueCaseRelationship,), + "pull_requests": (IssuePullRequestsRelationship,), "samples": (IssueSamplesRelationship,), "team_owners": (IssueTeamOwnersRelationship,), + "watches": (IssueWatchesRelationship,), } attribute_map = { "assignee": "assignee", + "bits_investigation": "bits_investigation", "case": "case", + "pull_requests": "pull_requests", "samples": "samples", "team_owners": "team_owners", + "watches": "watches", } def __init__( self_, assignee: Union[IssueAssigneeRelationship, UnsetType] = unset, + bits_investigation: Union[IssueBitsInvestigationRelationship, UnsetType] = unset, case: Union[IssueCaseRelationship, UnsetType] = unset, + pull_requests: Union[IssuePullRequestsRelationship, UnsetType] = unset, samples: Union[IssueSamplesRelationship, UnsetType] = unset, team_owners: Union[IssueTeamOwnersRelationship, UnsetType] = unset, + watches: Union[IssueWatchesRelationship, UnsetType] = unset, **kwargs, ): """ - Relationship between the issue and an assignee, case and/or teams. + Relationship between the issue and other resources, such as an assignee, case, teams, pull requests, watches, samples, or a Bits AI investigation. :param assignee: Relationship between the issue and assignee. :type assignee: IssueAssigneeRelationship, optional + :param bits_investigation: Bits AI investigation linked to the issue, returned when ``bits_investigation`` is requested + in the ``include`` query parameter. + :type bits_investigation: IssueBitsInvestigationRelationship, optional + :param case: Relationship between the issue and case. :type case: IssueCaseRelationship, optional + :param pull_requests: Relationship between the issue and its linked pull requests. Returned when ``pull_requests`` is included and the issue has linked pull requests. + :type pull_requests: IssuePullRequestsRelationship, optional + :param samples: Relationship between the issue and its curated error samples. :type samples: IssueSamplesRelationship, optional :param team_owners: Relationship between the issue and teams. :type team_owners: IssueTeamOwnersRelationship, optional + + :param watches: Relationship between the issue and its active watches. Returned when ``watches`` is included and the issue has an active watch. + :type watches: IssueWatchesRelationship, optional """ if assignee is not unset: kwargs["assignee"] = assignee + if bits_investigation is not unset: + kwargs["bits_investigation"] = bits_investigation if case is not unset: kwargs["case"] = case + if pull_requests is not unset: + kwargs["pull_requests"] = pull_requests if samples is not unset: kwargs["samples"] = samples if team_owners is not unset: kwargs["team_owners"] = team_owners + if watches is not unset: + kwargs["watches"] = watches super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/issue_response.py b/src/datadog_api_client/v2/model/issue_response.py index 621a2c907e..a2a36923a6 100644 --- a/src/datadog_api_client/v2/model/issue_response.py +++ b/src/datadog_api_client/v2/model/issue_response.py @@ -19,6 +19,8 @@ from datadog_api_client.v2.model.issue_case import IssueCase from datadog_api_client.v2.model.issue_user import IssueUser from datadog_api_client.v2.model.issue_team import IssueTeam + from datadog_api_client.v2.model.issue_pull_request import IssuePullRequest + from datadog_api_client.v2.model.issue_watch import IssueWatch from datadog_api_client.v2.model.issue_sample import IssueSample @@ -41,7 +43,10 @@ def openapi_types(_): def __init__( self_, data: Union[Issue, UnsetType] = unset, - included: Union[List[Union[IssueIncluded, IssueCase, IssueUser, IssueTeam, IssueSample]], UnsetType] = unset, + included: Union[ + List[Union[IssueIncluded, IssueCase, IssueUser, IssueTeam, IssuePullRequest, IssueWatch, IssueSample]], + UnsetType, + ] = unset, **kwargs, ): """ diff --git a/src/datadog_api_client/v2/model/issue_watch.py b/src/datadog_api_client/v2/model/issue_watch.py new file mode 100644 index 0000000000..1d427f25d1 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watch.py @@ -0,0 +1,54 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_watch_attributes import IssueWatchAttributes + from datadog_api_client.v2.model.issue_watch_type import IssueWatchType + + +class IssueWatch(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_watch_attributes import IssueWatchAttributes + from datadog_api_client.v2.model.issue_watch_type import IssueWatchType + + return { + "attributes": (IssueWatchAttributes,), + "id": (str,), + "type": (IssueWatchType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: IssueWatchAttributes, id: str, type: IssueWatchType, **kwargs): + """ + An active watch on an issue. A watch moves an ignored issue back to open when its condition is met. + + :param attributes: Object containing the information of a watch. + :type attributes: IssueWatchAttributes + + :param id: Watch identifier. + :type id: str + + :param type: Type of the object. + :type type: IssueWatchType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/issue_watch_action.py b/src/datadog_api_client/v2/model/issue_watch_action.py new file mode 100644 index 0000000000..c4d6c3c853 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watch_action.py @@ -0,0 +1,64 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_state import IssueState + from datadog_api_client.v2.model.issue_watch_action_kind import IssueWatchActionKind + + +class IssueWatchAction(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_state import IssueState + from datadog_api_client.v2.model.issue_watch_action_kind import IssueWatchActionKind + + return { + "_from": (IssueState,), + "kind": (IssueWatchActionKind,), + "to": (IssueState,), + } + + attribute_map = { + "_from": "from", + "kind": "kind", + "to": "to", + } + + def __init__( + self_, + kind: IssueWatchActionKind, + _from: Union[IssueState, UnsetType] = unset, + to: Union[IssueState, UnsetType] = unset, + **kwargs, + ): + """ + Action applied to the issue when the watch condition is met. + + :param _from: State of the issue + :type _from: IssueState, optional + + :param kind: Kind of watch action. + :type kind: IssueWatchActionKind + + :param to: State of the issue + :type to: IssueState, optional + """ + if _from is not unset: + kwargs["_from"] = _from + if to is not unset: + kwargs["to"] = to + super().__init__(kwargs) + + self_.kind = kind diff --git a/src/datadog_api_client/v2/model/issue_watch_action_kind.py b/src/datadog_api_client/v2/model/issue_watch_action_kind.py new file mode 100644 index 0000000000..76d5f55ae6 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watch_action_kind.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class IssueWatchActionKind(ModelSimple): + """ + Kind of watch action. + + :param value: If omitted defaults to "CHANGE_ISSUE_STATE". Must be one of ["CHANGE_ISSUE_STATE"]. + :type value: str + """ + + allowed_values = { + "CHANGE_ISSUE_STATE", + } + CHANGE_ISSUE_STATE: ClassVar["IssueWatchActionKind"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IssueWatchActionKind.CHANGE_ISSUE_STATE = IssueWatchActionKind("CHANGE_ISSUE_STATE") diff --git a/src/datadog_api_client/v2/model/issue_watch_attributes.py b/src/datadog_api_client/v2/model/issue_watch_attributes.py new file mode 100644 index 0000000000..714e030b6b --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watch_attributes.py @@ -0,0 +1,77 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_watch_action import IssueWatchAction + from datadog_api_client.v2.model.issue_watch_condition import IssueWatchCondition + from datadog_api_client.v2.model.issue_watch_status import IssueWatchStatus + + +class IssueWatchAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_watch_action import IssueWatchAction + from datadog_api_client.v2.model.issue_watch_condition import IssueWatchCondition + from datadog_api_client.v2.model.issue_watch_status import IssueWatchStatus + + return { + "action": (IssueWatchAction,), + "condition": (IssueWatchCondition,), + "started_at": (datetime,), + "status": (IssueWatchStatus,), + } + + attribute_map = { + "action": "action", + "condition": "condition", + "started_at": "started_at", + "status": "status", + } + + def __init__( + self_, + action: Union[IssueWatchAction, UnsetType] = unset, + condition: Union[IssueWatchCondition, UnsetType] = unset, + started_at: Union[datetime, UnsetType] = unset, + status: Union[IssueWatchStatus, UnsetType] = unset, + **kwargs, + ): + """ + Object containing the information of a watch. + + :param action: Action applied to the issue when the watch condition is met. + :type action: IssueWatchAction, optional + + :param condition: Condition that triggers the watch action. The fields that are set depend on ``kind`` : + ``OCCURRENCES`` uses ``threshold`` , ``CARDINALITY`` uses ``threshold`` and ``projection`` , + ``ELAPSED_TIME`` uses ``duration`` , and ``ANY`` and ``ALL`` use ``operands``. + :type condition: IssueWatchCondition, optional + + :param started_at: Timestamp of when the watch started. + :type started_at: datetime, optional + + :param status: Status of the watch. + :type status: IssueWatchStatus, optional + """ + if action is not unset: + kwargs["action"] = action + if condition is not unset: + kwargs["condition"] = condition + if started_at is not unset: + kwargs["started_at"] = started_at + if status is not unset: + kwargs["status"] = status + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/issue_watch_condition.py b/src/datadog_api_client/v2/model/issue_watch_condition.py new file mode 100644 index 0000000000..eae67dc2b9 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watch_condition.py @@ -0,0 +1,80 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_watch_condition_kind import IssueWatchConditionKind + + +class IssueWatchCondition(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_watch_condition_kind import IssueWatchConditionKind + + return { + "duration": (str,), + "kind": (IssueWatchConditionKind,), + "operands": ([IssueWatchCondition],), + "projection": ([str],), + "threshold": (int,), + } + + attribute_map = { + "duration": "duration", + "kind": "kind", + "operands": "operands", + "projection": "projection", + "threshold": "threshold", + } + + def __init__( + self_, + kind: IssueWatchConditionKind, + duration: Union[str, UnsetType] = unset, + operands: Union[List[IssueWatchCondition], UnsetType] = unset, + projection: Union[List[str], UnsetType] = unset, + threshold: Union[int, UnsetType] = unset, + **kwargs, + ): + """ + Condition that triggers the watch action. The fields that are set depend on ``kind`` : + ``OCCURRENCES`` uses ``threshold`` , ``CARDINALITY`` uses ``threshold`` and ``projection`` , + ``ELAPSED_TIME`` uses ``duration`` , and ``ANY`` and ``ALL`` use ``operands``. + + :param duration: Time that must elapse before the condition is met, as a Go duration string. + :type duration: str, optional + + :param kind: Kind of watch condition. + :type kind: IssueWatchConditionKind + + :param operands: Nested conditions combined by ``ANY`` or ``ALL``. + :type operands: [IssueWatchCondition], optional + + :param projection: Attributes whose distinct values are counted for ``CARDINALITY``. + :type projection: [str], optional + + :param threshold: Number of occurrences, or of distinct values for ``CARDINALITY`` , that triggers the condition. + :type threshold: int, optional + """ + if duration is not unset: + kwargs["duration"] = duration + if operands is not unset: + kwargs["operands"] = operands + if projection is not unset: + kwargs["projection"] = projection + if threshold is not unset: + kwargs["threshold"] = threshold + super().__init__(kwargs) + + self_.kind = kind diff --git a/src/datadog_api_client/v2/model/issue_watch_condition_kind.py b/src/datadog_api_client/v2/model/issue_watch_condition_kind.py new file mode 100644 index 0000000000..85d740d4f0 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watch_condition_kind.py @@ -0,0 +1,47 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class IssueWatchConditionKind(ModelSimple): + """ + Kind of watch condition. + + :param value: Must be one of ["OCCURRENCES", "CARDINALITY", "ELAPSED_TIME", "ANY", "ALL"]. + :type value: str + """ + + allowed_values = { + "OCCURRENCES", + "CARDINALITY", + "ELAPSED_TIME", + "ANY", + "ALL", + } + OCCURRENCES: ClassVar["IssueWatchConditionKind"] + CARDINALITY: ClassVar["IssueWatchConditionKind"] + ELAPSED_TIME: ClassVar["IssueWatchConditionKind"] + ANY: ClassVar["IssueWatchConditionKind"] + ALL: ClassVar["IssueWatchConditionKind"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IssueWatchConditionKind.OCCURRENCES = IssueWatchConditionKind("OCCURRENCES") +IssueWatchConditionKind.CARDINALITY = IssueWatchConditionKind("CARDINALITY") +IssueWatchConditionKind.ELAPSED_TIME = IssueWatchConditionKind("ELAPSED_TIME") +IssueWatchConditionKind.ANY = IssueWatchConditionKind("ANY") +IssueWatchConditionKind.ALL = IssueWatchConditionKind("ALL") diff --git a/src/datadog_api_client/v2/model/issue_watch_reference.py b/src/datadog_api_client/v2/model/issue_watch_reference.py new file mode 100644 index 0000000000..cbcb79b583 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watch_reference.py @@ -0,0 +1,46 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_watch_type import IssueWatchType + + +class IssueWatchReference(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_watch_type import IssueWatchType + + return { + "id": (str,), + "type": (IssueWatchType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: str, type: IssueWatchType, **kwargs): + """ + An active watch on the issue. + + :param id: Watch identifier. + :type id: str + + :param type: Type of the object. + :type type: IssueWatchType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/issue_watch_status.py b/src/datadog_api_client/v2/model/issue_watch_status.py new file mode 100644 index 0000000000..b0e0040575 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watch_status.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class IssueWatchStatus(ModelSimple): + """ + Status of the watch. + + :param value: If omitted defaults to "ACTIVE". Must be one of ["ACTIVE"]. + :type value: str + """ + + allowed_values = { + "ACTIVE", + } + ACTIVE: ClassVar["IssueWatchStatus"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IssueWatchStatus.ACTIVE = IssueWatchStatus("ACTIVE") diff --git a/src/datadog_api_client/v2/model/issue_watch_type.py b/src/datadog_api_client/v2/model/issue_watch_type.py new file mode 100644 index 0000000000..59aefcc1c3 --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watch_type.py @@ -0,0 +1,35 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class IssueWatchType(ModelSimple): + """ + Type of the object. + + :param value: If omitted defaults to "error_tracking_issue_watch". Must be one of ["error_tracking_issue_watch"]. + :type value: str + """ + + allowed_values = { + "error_tracking_issue_watch", + } + ERROR_TRACKING_ISSUE_WATCH: ClassVar["IssueWatchType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +IssueWatchType.ERROR_TRACKING_ISSUE_WATCH = IssueWatchType("error_tracking_issue_watch") diff --git a/src/datadog_api_client/v2/model/issue_watches_relationship.py b/src/datadog_api_client/v2/model/issue_watches_relationship.py new file mode 100644 index 0000000000..85fde924fe --- /dev/null +++ b/src/datadog_api_client/v2/model/issue_watches_relationship.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.issue_watch_reference import IssueWatchReference + + +class IssueWatchesRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.issue_watch_reference import IssueWatchReference + + return { + "data": ([IssueWatchReference],), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: List[IssueWatchReference], **kwargs): + """ + Relationship between the issue and its active watches. Returned when ``watches`` is included and the issue has an active watch. + + :param data: Array of active watches on the issue. + :type data: [IssueWatchReference] + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/issues_search_response.py b/src/datadog_api_client/v2/model/issues_search_response.py index 4d3024782f..0dc082a94d 100644 --- a/src/datadog_api_client/v2/model/issues_search_response.py +++ b/src/datadog_api_client/v2/model/issues_search_response.py @@ -20,6 +20,8 @@ from datadog_api_client.v2.model.issue_case import IssueCase from datadog_api_client.v2.model.issue_user import IssueUser from datadog_api_client.v2.model.issue_team import IssueTeam + from datadog_api_client.v2.model.issue_pull_request import IssuePullRequest + from datadog_api_client.v2.model.issue_watch import IssueWatch class IssuesSearchResponse(ModelNormal): @@ -42,7 +44,10 @@ def __init__( self_, data: Union[List[IssuesSearchResult], UnsetType] = unset, included: Union[ - List[Union[IssuesSearchResultIncluded, Issue, IssueCase, IssueUser, IssueTeam]], UnsetType + List[ + Union[IssuesSearchResultIncluded, Issue, IssueCase, IssueUser, IssueTeam, IssuePullRequest, IssueWatch] + ], + UnsetType, ] = unset, **kwargs, ): diff --git a/src/datadog_api_client/v2/model/issues_search_result_attributes.py b/src/datadog_api_client/v2/model/issues_search_result_attributes.py index 0d9811e9f0..04dfd918d2 100644 --- a/src/datadog_api_client/v2/model/issues_search_result_attributes.py +++ b/src/datadog_api_client/v2/model/issues_search_result_attributes.py @@ -39,9 +39,15 @@ def __init__( Object containing the information of a search result. :param impacted_sessions: Count of sessions impacted by the issue over the queried time window. + Returned for RUM, LLM Observability, browser, and mobile searches, + or when ``issue.impacted_sessions`` is requested in the ``include`` query parameter. + Omitted when zero unless requested in the ``include`` query parameter. :type impacted_sessions: int, optional :param impacted_users: Count of users impacted by the issue over the queried time window. + Returned for RUM, browser, and mobile searches, + or when ``issue.impacted_users`` is requested in the ``include`` query parameter. + Omitted when zero unless requested in the ``include`` query parameter. :type impacted_users: int, optional :param total_count: Total count of errors that match the issue over the queried time window. diff --git a/src/datadog_api_client/v2/model/issues_search_result_included.py b/src/datadog_api_client/v2/model/issues_search_result_included.py index ca2fa4ca11..3137df69c8 100644 --- a/src/datadog_api_client/v2/model/issues_search_result_included.py +++ b/src/datadog_api_client/v2/model/issues_search_result_included.py @@ -21,7 +21,7 @@ def __init__(self, **kwargs): :param id: Issue identifier. :type id: str - :param relationships: Relationship between the issue and an assignee, case and/or teams. + :param relationships: Relationship between the issue and other resources, such as an assignee, case, teams, pull requests, watches, samples, or a Bits AI investigation. :type relationships: IssueRelationships, optional :param type: Type of the object. @@ -42,6 +42,8 @@ def _composed_schemas(_): from datadog_api_client.v2.model.issue_case import IssueCase from datadog_api_client.v2.model.issue_user import IssueUser from datadog_api_client.v2.model.issue_team import IssueTeam + from datadog_api_client.v2.model.issue_pull_request import IssuePullRequest + from datadog_api_client.v2.model.issue_watch import IssueWatch return { "oneOf": [ @@ -49,5 +51,7 @@ def _composed_schemas(_): IssueCase, IssueUser, IssueTeam, + IssuePullRequest, + IssueWatch, ], } diff --git a/src/datadog_api_client/v2/model/search_issues_include_query_parameter_item.py b/src/datadog_api_client/v2/model/search_issues_include_query_parameter_item.py index eb349fb34a..6d0d546135 100644 --- a/src/datadog_api_client/v2/model/search_issues_include_query_parameter_item.py +++ b/src/datadog_api_client/v2/model/search_issues_include_query_parameter_item.py @@ -16,20 +16,30 @@ class SearchIssuesIncludeQueryParameterItem(ModelSimple): """ Relationship object that should be included in the search response. - :param value: Must be one of ["issue", "issue.assignee", "issue.case", "issue.team_owners"]. + :param value: Must be one of ["issue", "issue.assignee", "issue.bits_investigation", "issue.case", "issue.impacted_sessions", "issue.impacted_users", "issue.pull_requests", "issue.team_owners", "issue.watches"]. :type value: str """ allowed_values = { "issue", "issue.assignee", + "issue.bits_investigation", "issue.case", + "issue.impacted_sessions", + "issue.impacted_users", + "issue.pull_requests", "issue.team_owners", + "issue.watches", } ISSUE: ClassVar["SearchIssuesIncludeQueryParameterItem"] ISSUE_ASSIGNEE: ClassVar["SearchIssuesIncludeQueryParameterItem"] + ISSUE_BITS_INVESTIGATION: ClassVar["SearchIssuesIncludeQueryParameterItem"] ISSUE_CASE: ClassVar["SearchIssuesIncludeQueryParameterItem"] + ISSUE_IMPACTED_SESSIONS: ClassVar["SearchIssuesIncludeQueryParameterItem"] + ISSUE_IMPACTED_USERS: ClassVar["SearchIssuesIncludeQueryParameterItem"] + ISSUE_PULL_REQUESTS: ClassVar["SearchIssuesIncludeQueryParameterItem"] ISSUE_TEAM_OWNERS: ClassVar["SearchIssuesIncludeQueryParameterItem"] + ISSUE_WATCHES: ClassVar["SearchIssuesIncludeQueryParameterItem"] @cached_property def openapi_types(_): @@ -40,5 +50,16 @@ def openapi_types(_): SearchIssuesIncludeQueryParameterItem.ISSUE = SearchIssuesIncludeQueryParameterItem("issue") SearchIssuesIncludeQueryParameterItem.ISSUE_ASSIGNEE = SearchIssuesIncludeQueryParameterItem("issue.assignee") +SearchIssuesIncludeQueryParameterItem.ISSUE_BITS_INVESTIGATION = SearchIssuesIncludeQueryParameterItem( + "issue.bits_investigation" +) SearchIssuesIncludeQueryParameterItem.ISSUE_CASE = SearchIssuesIncludeQueryParameterItem("issue.case") +SearchIssuesIncludeQueryParameterItem.ISSUE_IMPACTED_SESSIONS = SearchIssuesIncludeQueryParameterItem( + "issue.impacted_sessions" +) +SearchIssuesIncludeQueryParameterItem.ISSUE_IMPACTED_USERS = SearchIssuesIncludeQueryParameterItem( + "issue.impacted_users" +) +SearchIssuesIncludeQueryParameterItem.ISSUE_PULL_REQUESTS = SearchIssuesIncludeQueryParameterItem("issue.pull_requests") SearchIssuesIncludeQueryParameterItem.ISSUE_TEAM_OWNERS = SearchIssuesIncludeQueryParameterItem("issue.team_owners") +SearchIssuesIncludeQueryParameterItem.ISSUE_WATCHES = SearchIssuesIncludeQueryParameterItem("issue.watches") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 348ef84839..b0d9271981 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -5806,6 +5806,9 @@ from datadog_api_client.v2.model.issue import Issue from datadog_api_client.v2.model.issue_assignee_relationship import IssueAssigneeRelationship from datadog_api_client.v2.model.issue_attributes import IssueAttributes +from datadog_api_client.v2.model.issue_bits_investigation_reference import IssueBitsInvestigationReference +from datadog_api_client.v2.model.issue_bits_investigation_relationship import IssueBitsInvestigationRelationship +from datadog_api_client.v2.model.issue_bits_investigation_type import IssueBitsInvestigationType from datadog_api_client.v2.model.issue_case import IssueCase from datadog_api_client.v2.model.issue_case_attributes import IssueCaseAttributes from datadog_api_client.v2.model.issue_case_insight import IssueCaseInsight @@ -5820,6 +5823,12 @@ from datadog_api_client.v2.model.issue_included import IssueIncluded from datadog_api_client.v2.model.issue_language import IssueLanguage from datadog_api_client.v2.model.issue_platform import IssuePlatform +from datadog_api_client.v2.model.issue_pull_request import IssuePullRequest +from datadog_api_client.v2.model.issue_pull_request_attributes import IssuePullRequestAttributes +from datadog_api_client.v2.model.issue_pull_request_reason import IssuePullRequestReason +from datadog_api_client.v2.model.issue_pull_request_reference import IssuePullRequestReference +from datadog_api_client.v2.model.issue_pull_request_type import IssuePullRequestType +from datadog_api_client.v2.model.issue_pull_requests_relationship import IssuePullRequestsRelationship from datadog_api_client.v2.model.issue_reference import IssueReference from datadog_api_client.v2.model.issue_regression import IssueRegression from datadog_api_client.v2.model.issue_relationships import IssueRelationships @@ -5855,6 +5864,16 @@ from datadog_api_client.v2.model.issue_user_attributes import IssueUserAttributes from datadog_api_client.v2.model.issue_user_reference import IssueUserReference from datadog_api_client.v2.model.issue_user_type import IssueUserType +from datadog_api_client.v2.model.issue_watch import IssueWatch +from datadog_api_client.v2.model.issue_watch_action import IssueWatchAction +from datadog_api_client.v2.model.issue_watch_action_kind import IssueWatchActionKind +from datadog_api_client.v2.model.issue_watch_attributes import IssueWatchAttributes +from datadog_api_client.v2.model.issue_watch_condition import IssueWatchCondition +from datadog_api_client.v2.model.issue_watch_condition_kind import IssueWatchConditionKind +from datadog_api_client.v2.model.issue_watch_reference import IssueWatchReference +from datadog_api_client.v2.model.issue_watch_status import IssueWatchStatus +from datadog_api_client.v2.model.issue_watch_type import IssueWatchType +from datadog_api_client.v2.model.issue_watches_relationship import IssueWatchesRelationship from datadog_api_client.v2.model.issues_search_request import IssuesSearchRequest from datadog_api_client.v2.model.issues_search_request_data import IssuesSearchRequestData from datadog_api_client.v2.model.issues_search_request_data_attributes import IssuesSearchRequestDataAttributes @@ -17927,6 +17946,9 @@ "Issue", "IssueAssigneeRelationship", "IssueAttributes", + "IssueBitsInvestigationReference", + "IssueBitsInvestigationRelationship", + "IssueBitsInvestigationType", "IssueCase", "IssueCaseAttributes", "IssueCaseInsight", @@ -17941,6 +17963,12 @@ "IssueIncluded", "IssueLanguage", "IssuePlatform", + "IssuePullRequest", + "IssuePullRequestAttributes", + "IssuePullRequestReason", + "IssuePullRequestReference", + "IssuePullRequestType", + "IssuePullRequestsRelationship", "IssueReference", "IssueRegression", "IssueRelationships", @@ -17976,6 +18004,16 @@ "IssueUserAttributes", "IssueUserReference", "IssueUserType", + "IssueWatch", + "IssueWatchAction", + "IssueWatchActionKind", + "IssueWatchAttributes", + "IssueWatchCondition", + "IssueWatchConditionKind", + "IssueWatchReference", + "IssueWatchStatus", + "IssueWatchType", + "IssueWatchesRelationship", "IssuesSearchRequest", "IssuesSearchRequestData", "IssuesSearchRequestDataAttributes", diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json index 2a1d17e57e..fe4dd6aa23 100644 --- a/tests/generated-test/test-runner-data/manifest.json +++ b/tests/generated-test/test-runner-data/manifest.json @@ -5670,6 +5670,13 @@ "scenario": "Get the details of an error tracking issue returns \"OK\" response", "version": "v2" }, + { + "feature": "Error Tracking", + "feature_file": "../../v2/features/error_tracking.feature", + "file": "v2/error-tracking/get-the-details-of-an-error-tracking-issue-with-a-samples-bias-filter-but-no-samples-include-returns-bad-request-response.json", + "scenario": "Get the details of an error tracking issue with a samples bias filter but no samples include returns \"Bad Request\" response", + "version": "v2" + }, { "feature": "Error Tracking", "feature_file": "../../v2/features/error_tracking.feature", diff --git a/tests/generated-test/test-runner-data/v2/error-tracking/get-the-details-of-an-error-tracking-issue-with-a-samples-bias-filter-but-no-samples-include-returns-bad-request-response.json b/tests/generated-test/test-runner-data/v2/error-tracking/get-the-details-of-an-error-tracking-issue-with-a-samples-bias-filter-but-no-samples-include-returns-bad-request-response.json new file mode 100644 index 0000000000..19a6b7f534 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/error-tracking/get-the-details-of-an-error-tracking-issue-with-a-samples-bias-filter-but-no-samples-include-returns-bad-request-response.json @@ -0,0 +1,58 @@ +{ + "api": "ErrorTracking", + "expected_status": 400, + "feature": "Error Tracking", + "id": "v2/Error Tracking/Get the details of an error tracking issue with a samples bias filter but no samples include returns \"Bad Request\" response", + "operation_id": "GetIssue", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "issue_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "issue.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": false, + "in": "query", + "name": "filter[samples.biases]", + "required": false, + "schema": { + "format": null, + "items": { + "format": null, + "ref": "IssueSampleBias", + "type": "string" + }, + "ref": null, + "type": "array" + }, + "source": { + "type": "literal", + "value": [ + "latest" + ] + }, + "style": null + } + ], + "path": "/api/v2/error-tracking/issues/{issue_id}" + }, + "scenario": "Get the details of an error tracking issue with a samples bias filter but no samples include returns \"Bad Request\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-server-data/v2/error-tracking.json b/tests/generated-test/test-server-data/v2/error-tracking.json index 2dcd5024c5..ae03aee515 100644 --- a/tests/generated-test/test-server-data/v2/error-tracking.json +++ b/tests/generated-test/test-server-data/v2/error-tracking.json @@ -160,6 +160,75 @@ "scenario": "Get the details of an error tracking issue returns \"OK\" response", "version": "v2" }, + { + "feature": "Error Tracking", + "frozen_at": "2026-11-09T11:28:48.513Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "from": 1792927728000, + "query": "service:synthetics-browser", + "to": 1794223728000, + "track": "rum" + }, + "type": "search_request" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/error-tracking/issues/search", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":4430,\"impacted_users\":4320,\"total_count\":8647},\"relationships\":{\"issue\":{\"data\":{\"id\":\"d3ab59c6-84ee-11f0-87bb-da7ad0900002\",\"type\":\"issue\"}}}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/error-tracking/issues/d3ab59c6-84ee-11f0-87bb-da7ad0900002", + "query": [ + [ + "filter[samples.biases]", + "latest" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"invalid filter\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + } + ], + "scenario": "Get the details of an error tracking issue with a samples bias filter but no samples include returns \"Bad Request\" response", + "version": "v2" + }, { "feature": "Error Tracking", "frozen_at": "2026-10-22T13:29:57.649Z", diff --git a/tests/v2/features/error_tracking.feature b/tests/v2/features/error_tracking.feature index 55bfe924ff..0245544462 100644 --- a/tests/v2/features/error_tracking.feature +++ b/tests/v2/features/error_tracking.feature @@ -32,6 +32,15 @@ Feature: Error Tracking Then the response status is 200 OK And the response "data.id" is equal to "{{ issue.id }}" + @team:ddoghq/error-tracking + Scenario: Get the details of an error tracking issue with a samples bias filter but no samples include returns "Bad Request" response + Given new "GetIssue" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter from "issue.id" + And request contains "filter[samples.biases]" parameter with value ["latest"] + When the request is sent + Then the response status is 400 Bad Request + @replay-only @team:ddoghq/error-tracking Scenario: Get the details of an error tracking issue with samples returns "OK" response Given new "GetIssue" request