From 0e32b2dc37854cf5923661e815bc607bd34058f1 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 1 Sep 2025 10:20:42 +0000 Subject: [PATCH] Regenerate client from commit 5168f2e of spec repo --- .generator/schemas/v2/openapi.yaml | 981 ++++++++++++++++++ .../frozen.json | 1 + .../recording.har | 57 + .../frozen.json | 1 + .../recording.har | 110 ++ .../frozen.json | 1 + .../recording.har | 110 ++ .../frozen.json | 1 + .../recording.har | 67 ++ .../frozen.json | 1 + .../recording.har | 67 ++ .../frozen.json | 1 + .../recording.har | 120 +++ .../frozen.json | 1 + .../recording.har | 67 ++ .../frozen.json | 1 + .../recording.har | 120 +++ .../frozen.json | 1 + .../recording.har | 120 +++ .../frozen.json | 1 + .../recording.har | 67 ++ .../frozen.json | 1 + .../recording.har | 120 +++ features/v2/error_tracking.feature | 100 ++ features/v2/given.json | 13 + features/v2/undo.json | 24 + packages/datadog-api-client/README.md | 1 + .../src/support/scenarios_model_mapping.ts | 44 + services/error_tracking/.yarnrc.yml | 1 + services/error_tracking/README.md | 36 + services/error_tracking/package.json | 43 + services/error_tracking/src/index.ts | 3 + .../error_tracking/src/v2/ErrorTrackingApi.ts | 698 +++++++++++++ services/error_tracking/src/v2/index.ts | 79 ++ .../src/v2/models/APIErrorResponse.ts | 45 + services/error_tracking/src/v2/models/Case.ts | 75 ++ .../src/v2/models/Case3rdPartyTicketStatus.ts | 13 + .../src/v2/models/CaseAttributes.ts | 150 +++ .../src/v2/models/CasePriority.ts | 19 + .../src/v2/models/CaseRelationships.ts | 71 ++ .../src/v2/models/CaseResourceType.ts | 7 + .../src/v2/models/CaseStatus.ts | 13 + .../error_tracking/src/v2/models/CaseType.ts | 7 + .../GetIssueIncludeQueryParameterItem.ts | 13 + .../error_tracking/src/v2/models/Issue.ts | 75 ++ .../v2/models/IssueAssigneeRelationship.ts | 47 + .../src/v2/models/IssueAttributes.ts | 146 +++ .../error_tracking/src/v2/models/IssueCase.ts | 75 ++ .../src/v2/models/IssueCaseAttributes.ts | 157 +++ .../src/v2/models/IssueCaseInsight.ts | 60 ++ .../src/v2/models/IssueCaseJiraIssue.ts | 54 + .../src/v2/models/IssueCaseJiraIssueResult.ts | 68 ++ .../src/v2/models/IssueCaseReference.ts | 56 + .../src/v2/models/IssueCaseRelationship.ts | 47 + .../src/v2/models/IssueCaseRelationships.ts | 71 ++ .../src/v2/models/IssueCaseResourceType.ts | 7 + .../src/v2/models/IssueIncluded.ts | 10 + .../src/v2/models/IssueLanguage.ts | 61 ++ .../src/v2/models/IssuePlatform.ts | 23 + .../src/v2/models/IssueReference.ts | 56 + .../src/v2/models/IssueRelationships.ts | 64 ++ .../src/v2/models/IssueResponse.ts | 55 + .../src/v2/models/IssueState.ts | 17 + .../error_tracking/src/v2/models/IssueTeam.ts | 66 ++ .../src/v2/models/IssueTeamAttributes.ts | 60 ++ .../v2/models/IssueTeamOwnersRelationship.ts | 47 + .../src/v2/models/IssueTeamReference.ts | 56 + .../src/v2/models/IssueTeamType.ts | 7 + .../error_tracking/src/v2/models/IssueType.ts | 7 + .../v2/models/IssueUpdateAssigneeRequest.ts | 47 + .../models/IssueUpdateAssigneeRequestData.ts | 56 + .../IssueUpdateAssigneeRequestDataType.ts | 9 + .../src/v2/models/IssueUpdateStateRequest.ts | 47 + .../v2/models/IssueUpdateStateRequestData.ts | 66 ++ .../IssueUpdateStateRequestDataAttributes.ts | 47 + .../models/IssueUpdateStateRequestDataType.ts | 9 + .../error_tracking/src/v2/models/IssueUser.ts | 66 ++ .../src/v2/models/IssueUserAttributes.ts | 60 ++ .../src/v2/models/IssueUserReference.ts | 56 + .../src/v2/models/IssueUserType.ts | 7 + .../src/v2/models/IssuesSearchRequest.ts | 47 + .../src/v2/models/IssuesSearchRequestData.ts | 57 + .../IssuesSearchRequestDataAttributes.ts | 93 ++ ...ssuesSearchRequestDataAttributesOrderBy.ts | 15 + ...ssuesSearchRequestDataAttributesPersona.ts | 15 + .../IssuesSearchRequestDataAttributesTrack.ts | 13 + .../v2/models/IssuesSearchRequestDataType.ts | 9 + .../src/v2/models/IssuesSearchResponse.ts | 55 + .../src/v2/models/IssuesSearchResult.ts | 75 ++ .../v2/models/IssuesSearchResultAttributes.ts | 63 ++ .../v2/models/IssuesSearchResultIncluded.ts | 16 + .../IssuesSearchResultIssueRelationship.ts | 47 + .../models/IssuesSearchResultRelationships.ts | 46 + .../src/v2/models/IssuesSearchResultType.ts | 9 + .../error_tracking/src/v2/models/JiraIssue.ts | 55 + .../src/v2/models/JiraIssueResult.ts | 68 ++ .../src/v2/models/NullableUserRelationship.ts | 47 + .../v2/models/NullableUserRelationshipData.ts | 56 + .../src/v2/models/ProjectRelationship.ts | 47 + .../src/v2/models/ProjectRelationshipData.ts | 56 + .../src/v2/models/ProjectResourceType.ts | 7 + .../SearchIssuesIncludeQueryParameterItem.ts | 15 + .../src/v2/models/ServiceNowTicket.ts | 55 + .../src/v2/models/ServiceNowTicketResult.ts | 44 + .../src/v2/models/TypingInfo.ts | 181 ++++ .../src/v2/models/UserResourceType.ts | 7 + services/error_tracking/tsconfig.json | 28 + yarn.lock | 9 + 108 files changed, 6569 insertions(+) create mode 100644 cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Bad-Request-response_3233709570/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Bad-Request-response_3233709570/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Not-Found-response_1194989905/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Not-Found-response_1194989905/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-OK-response_4094044160/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-OK-response_4094044160/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-Bad-Request-response_3779821528/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-Bad-Request-response_3779821528/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-OK-response_3923349494/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-OK-response_3923349494/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Bad-Request-response_1607077003/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Bad-Request-response_1607077003/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Not-Found-response_2837726668/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Not-Found-response_2837726668/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-OK-response_1891433599/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-OK-response_1891433599/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Bad-Request-response_3010530991/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Bad-Request-response_3010530991/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Not-Found-response_101445672/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Not-Found-response_101445672/recording.har create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-OK-response_176084187/frozen.json create mode 100644 cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-OK-response_176084187/recording.har create mode 100644 features/v2/error_tracking.feature create mode 100644 services/error_tracking/.yarnrc.yml create mode 100644 services/error_tracking/README.md create mode 100644 services/error_tracking/package.json create mode 100644 services/error_tracking/src/index.ts create mode 100644 services/error_tracking/src/v2/ErrorTrackingApi.ts create mode 100644 services/error_tracking/src/v2/index.ts create mode 100644 services/error_tracking/src/v2/models/APIErrorResponse.ts create mode 100644 services/error_tracking/src/v2/models/Case.ts create mode 100644 services/error_tracking/src/v2/models/Case3rdPartyTicketStatus.ts create mode 100644 services/error_tracking/src/v2/models/CaseAttributes.ts create mode 100644 services/error_tracking/src/v2/models/CasePriority.ts create mode 100644 services/error_tracking/src/v2/models/CaseRelationships.ts create mode 100644 services/error_tracking/src/v2/models/CaseResourceType.ts create mode 100644 services/error_tracking/src/v2/models/CaseStatus.ts create mode 100644 services/error_tracking/src/v2/models/CaseType.ts create mode 100644 services/error_tracking/src/v2/models/GetIssueIncludeQueryParameterItem.ts create mode 100644 services/error_tracking/src/v2/models/Issue.ts create mode 100644 services/error_tracking/src/v2/models/IssueAssigneeRelationship.ts create mode 100644 services/error_tracking/src/v2/models/IssueAttributes.ts create mode 100644 services/error_tracking/src/v2/models/IssueCase.ts create mode 100644 services/error_tracking/src/v2/models/IssueCaseAttributes.ts create mode 100644 services/error_tracking/src/v2/models/IssueCaseInsight.ts create mode 100644 services/error_tracking/src/v2/models/IssueCaseJiraIssue.ts create mode 100644 services/error_tracking/src/v2/models/IssueCaseJiraIssueResult.ts create mode 100644 services/error_tracking/src/v2/models/IssueCaseReference.ts create mode 100644 services/error_tracking/src/v2/models/IssueCaseRelationship.ts create mode 100644 services/error_tracking/src/v2/models/IssueCaseRelationships.ts create mode 100644 services/error_tracking/src/v2/models/IssueCaseResourceType.ts create mode 100644 services/error_tracking/src/v2/models/IssueIncluded.ts create mode 100644 services/error_tracking/src/v2/models/IssueLanguage.ts create mode 100644 services/error_tracking/src/v2/models/IssuePlatform.ts create mode 100644 services/error_tracking/src/v2/models/IssueReference.ts create mode 100644 services/error_tracking/src/v2/models/IssueRelationships.ts create mode 100644 services/error_tracking/src/v2/models/IssueResponse.ts create mode 100644 services/error_tracking/src/v2/models/IssueState.ts create mode 100644 services/error_tracking/src/v2/models/IssueTeam.ts create mode 100644 services/error_tracking/src/v2/models/IssueTeamAttributes.ts create mode 100644 services/error_tracking/src/v2/models/IssueTeamOwnersRelationship.ts create mode 100644 services/error_tracking/src/v2/models/IssueTeamReference.ts create mode 100644 services/error_tracking/src/v2/models/IssueTeamType.ts create mode 100644 services/error_tracking/src/v2/models/IssueType.ts create mode 100644 services/error_tracking/src/v2/models/IssueUpdateAssigneeRequest.ts create mode 100644 services/error_tracking/src/v2/models/IssueUpdateAssigneeRequestData.ts create mode 100644 services/error_tracking/src/v2/models/IssueUpdateAssigneeRequestDataType.ts create mode 100644 services/error_tracking/src/v2/models/IssueUpdateStateRequest.ts create mode 100644 services/error_tracking/src/v2/models/IssueUpdateStateRequestData.ts create mode 100644 services/error_tracking/src/v2/models/IssueUpdateStateRequestDataAttributes.ts create mode 100644 services/error_tracking/src/v2/models/IssueUpdateStateRequestDataType.ts create mode 100644 services/error_tracking/src/v2/models/IssueUser.ts create mode 100644 services/error_tracking/src/v2/models/IssueUserAttributes.ts create mode 100644 services/error_tracking/src/v2/models/IssueUserReference.ts create mode 100644 services/error_tracking/src/v2/models/IssueUserType.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchRequest.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchRequestData.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributes.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesOrderBy.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesPersona.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesTrack.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchRequestDataType.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchResponse.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchResult.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchResultAttributes.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchResultIncluded.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchResultIssueRelationship.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchResultRelationships.ts create mode 100644 services/error_tracking/src/v2/models/IssuesSearchResultType.ts create mode 100644 services/error_tracking/src/v2/models/JiraIssue.ts create mode 100644 services/error_tracking/src/v2/models/JiraIssueResult.ts create mode 100644 services/error_tracking/src/v2/models/NullableUserRelationship.ts create mode 100644 services/error_tracking/src/v2/models/NullableUserRelationshipData.ts create mode 100644 services/error_tracking/src/v2/models/ProjectRelationship.ts create mode 100644 services/error_tracking/src/v2/models/ProjectRelationshipData.ts create mode 100644 services/error_tracking/src/v2/models/ProjectResourceType.ts create mode 100644 services/error_tracking/src/v2/models/SearchIssuesIncludeQueryParameterItem.ts create mode 100644 services/error_tracking/src/v2/models/ServiceNowTicket.ts create mode 100644 services/error_tracking/src/v2/models/ServiceNowTicketResult.ts create mode 100644 services/error_tracking/src/v2/models/TypingInfo.ts create mode 100644 services/error_tracking/src/v2/models/UserResourceType.ts create mode 100644 services/error_tracking/tsconfig.json diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a0f0a2bd0980..4d0c4849320a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -415,6 +415,17 @@ components: required: true schema: type: string + GetIssueIncludeQueryParameter: + description: Comma-separated list of relationship objects that should be included + in the response. + explode: false + in: query + name: include + required: false + schema: + items: + $ref: '#/components/schemas/GetIssueIncludeQueryParameterItem' + type: array HistoricalJobID: description: The ID of the job. in: path @@ -579,6 +590,14 @@ components: required: true schema: type: string + IssueIDPathParameter: + description: The identifier of the issue. + example: c1726a66-1f64-11ee-b338-da7ad0900002 + in: path + name: issue_id + required: true + schema: + type: string KindID: description: Entity kind. in: path @@ -824,6 +843,17 @@ components: required: false schema: $ref: '#/components/schemas/ServiceDefinitionSchemaVersions' + SearchIssuesIncludeQueryParameter: + description: Comma-separated list of relationship objects that should be included + in the response. + explode: false + in: query + name: include + required: false + schema: + items: + $ref: '#/components/schemas/SearchIssuesIncludeQueryParameterItem' + type: array SecurityFilterID: description: The ID of the security filter. in: path @@ -18263,6 +18293,18 @@ components: $ref: '#/components/schemas/GetInterfacesData' type: array type: object + GetIssueIncludeQueryParameterItem: + description: Relationship object that should be included in the response. + enum: + - assignee + - case + - team_owners + example: case + type: string + x-enum-varnames: + - ASSIGNEE + - CASE + - TEAM_OWNERS GetResourceEvaluationFiltersResponse: description: The definition of `GetResourceEvaluationFiltersResponse` object. properties: @@ -21383,6 +21425,773 @@ components: - DOWN - WARNING - 'OFF' + Issue: + description: The issue matching the request. + properties: + attributes: + $ref: '#/components/schemas/IssueAttributes' + id: + description: Issue identifier. + example: c1726a66-1f64-11ee-b338-da7ad0900002 + type: string + relationships: + $ref: '#/components/schemas/IssueRelationships' + type: + $ref: '#/components/schemas/IssueType' + required: + - id + - type + - attributes + type: object + IssueAssigneeRelationship: + description: Relationship between the issue and assignee. + properties: + data: + $ref: '#/components/schemas/IssueUserReference' + required: + - data + type: object + IssueAttributes: + description: Object containing the information of an issue. + properties: + error_message: + description: Error message associated with the issue. + example: object of type 'NoneType' has no len() + type: string + error_type: + description: Type of the error that matches the issue. + example: builtins.TypeError + type: string + file_path: + description: Path of the file where the issue occurred. + example: /django-email/conduit/apps/core/utils.py + type: string + first_seen: + description: Timestamp of the first seen error in milliseconds since the + Unix epoch. + example: 1671612804001 + format: int64 + type: integer + first_seen_version: + description: The application version (for example, git commit hash) where + the issue was first observed. + example: aaf65cd0 + type: string + function_name: + description: Name of the function where the issue occurred. + example: filter_forbidden_tags + type: string + is_crash: + description: Error is a crash. + example: false + type: boolean + languages: + description: Array of programming languages associated with the issue. + example: + - PYTHON + - GO + items: + $ref: '#/components/schemas/IssueLanguage' + type: array + last_seen: + description: Timestamp of the last seen error in milliseconds since the + Unix epoch. + example: 1671620003100 + format: int64 + type: integer + last_seen_version: + description: The application version (for example, git commit hash) where + the issue was last observed. + example: b6199f80 + type: string + platform: + $ref: '#/components/schemas/IssuePlatform' + service: + description: Service name. + example: email-api-py + type: string + state: + $ref: '#/components/schemas/IssueState' + type: object + IssueCase: + description: The case attached to the issue. + properties: + attributes: + $ref: '#/components/schemas/IssueCaseAttributes' + id: + description: Case identifier. + example: 2841440d-e780-4fe2-96cd-6a8c1d194da5 + type: string + relationships: + $ref: '#/components/schemas/IssueCaseRelationships' + type: + $ref: '#/components/schemas/IssueCaseResourceType' + required: + - id + - type + - attributes + type: object + IssueCaseAttributes: + description: Object containing the information of a case. + properties: + archived_at: + description: Timestamp of when the case was archived. + example: '2025-01-01T00:00:00Z' + format: date-time + type: string + closed_at: + description: Timestamp of when the case was closed. + example: '2025-01-01T00:00:00Z' + format: date-time + type: string + created_at: + description: Timestamp of when the case was created. + example: '2025-01-01T00:00:00Z' + format: date-time + type: string + creation_source: + description: Source of the case creation. + example: ERROR_TRACKING + type: string + description: + description: Description of the case. + type: string + due_date: + description: Due date of the case. + example: '2025-01-01' + type: string + insights: + description: Insights of the case. + items: + $ref: '#/components/schemas/IssueCaseInsight' + type: array + jira_issue: + $ref: '#/components/schemas/IssueCaseJiraIssue' + key: + description: Key of the case. + example: ET-123 + type: string + modified_at: + description: Timestamp of when the case was last modified. + example: '2025-01-01T00:00:00Z' + format: date-time + type: string + priority: + $ref: '#/components/schemas/CasePriority' + status: + $ref: '#/components/schemas/CaseStatus' + title: + description: Title of the case. + example: 'Error: HTTP error' + type: string + type: + description: Type of the case. + example: ERROR_TRACKING_ISSUE + type: string + type: object + IssueCaseInsight: + description: Insight of the case. + properties: + ref: + description: Reference of the insight. + example: /error-tracking?issueId=2841440d-e780-4fe2-96cd-6a8c1d194da5 + type: string + resource_id: + description: Insight identifier. + example: 2841440d-e780-4fe2-96cd-6a8c1d194da5 + type: string + type: + description: Type of the insight. + example: ERROR_TRACKING + type: string + type: object + IssueCaseJiraIssue: + description: Jira issue of the case. + properties: + result: + $ref: '#/components/schemas/IssueCaseJiraIssueResult' + status: + description: Creation status of the Jira issue. + example: COMPLETED + type: string + type: object + IssueCaseJiraIssueResult: + description: Contains the identifiers and URL for a successfully created Jira + issue. + properties: + issue_id: + description: Jira issue identifier. + example: '1904866' + type: string + issue_key: + description: Jira issue key. + example: ET-123 + type: string + issue_url: + description: Jira issue URL. + example: https://your-jira-instance.atlassian.net/browse/ET-123 + type: string + project_key: + description: Jira project key. + example: ET + type: string + type: object + IssueCaseReference: + description: The case the issue is attached to. + properties: + id: + description: Case identifier. + example: 2841440d-e780-4fe2-96cd-6a8c1d194da5 + type: string + type: + $ref: '#/components/schemas/IssueCaseResourceType' + required: + - id + - type + type: object + IssueCaseRelationship: + description: Relationship between the issue and case. + properties: + data: + $ref: '#/components/schemas/IssueCaseReference' + required: + - data + type: object + IssueCaseRelationships: + description: Resources related to a case. + properties: + assignee: + $ref: '#/components/schemas/NullableUserRelationship' + created_by: + $ref: '#/components/schemas/NullableUserRelationship' + modified_by: + $ref: '#/components/schemas/NullableUserRelationship' + project: + $ref: '#/components/schemas/ProjectRelationship' + type: object + IssueCaseResourceType: + description: Type of the object. + enum: + - case + example: case + type: string + x-enum-varnames: + - CASE + IssueIncluded: + description: An array of related resources, returned when the `include` query + parameter is used. + oneOf: + - $ref: '#/components/schemas/IssueCase' + - $ref: '#/components/schemas/IssueUser' + - $ref: '#/components/schemas/IssueTeam' + IssueLanguage: + description: Programming language associated with the issue. + enum: + - 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 + example: PYTHON + type: string + x-enum-varnames: + - 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 + IssuePlatform: + description: Platform associated with the issue. + enum: + - ANDROID + - BACKEND + - BROWSER + - FLUTTER + - IOS + - REACT_NATIVE + - ROKU + - UNKNOWN + example: BACKEND + type: string + x-enum-varnames: + - ANDROID + - BACKEND + - BROWSER + - FLUTTER + - IOS + - REACT_NATIVE + - ROKU + - UNKNOWN + IssueReference: + description: The issue the search result corresponds to. + properties: + id: + description: Issue identifier. + example: c1726a66-1f64-11ee-b338-da7ad0900002 + type: string + type: + $ref: '#/components/schemas/IssueType' + required: + - id + - type + type: object + IssueRelationships: + description: Relationship between the issue and an assignee, case and/or teams. + properties: + assignee: + $ref: '#/components/schemas/IssueAssigneeRelationship' + case: + $ref: '#/components/schemas/IssueCaseRelationship' + team_owners: + $ref: '#/components/schemas/IssueTeamOwnersRelationship' + type: object + IssueResponse: + description: Response containing error tracking issue data. + properties: + data: + $ref: '#/components/schemas/Issue' + included: + description: Array of resources related to the issue. + items: + $ref: '#/components/schemas/IssueIncluded' + type: array + type: object + IssueState: + description: State of the issue + enum: + - OPEN + - ACKNOWLEDGED + - RESOLVED + - IGNORED + - EXCLUDED + example: RESOLVED + type: string + x-enum-varnames: + - OPEN + - ACKNOWLEDGED + - RESOLVED + - IGNORED + - EXCLUDED + IssueTeam: + description: A team that owns an issue. + properties: + attributes: + $ref: '#/components/schemas/IssueTeamAttributes' + id: + description: Team identifier. + example: 221b0179-6447-4d03-91c3-3ca98bf60e8a + type: string + type: + $ref: '#/components/schemas/IssueTeamType' + required: + - id + - type + - attributes + type: object + IssueTeamAttributes: + description: Object containing the information of a team. + properties: + handle: + description: The team's identifier. + example: team-handle + type: string + name: + description: The name of the team. + example: Team Name + type: string + summary: + description: A brief summary of the team, derived from its description. + example: This is a team. + type: string + type: object + IssueTeamOwnersRelationship: + description: Relationship between the issue and teams. + properties: + data: + description: Array of teams that are owners of the issue. + items: + $ref: '#/components/schemas/IssueTeamReference' + type: array + required: + - data + type: object + IssueTeamReference: + description: A team that owns the issue. + properties: + id: + description: Team identifier. + example: 221b0179-6447-4d03-91c3-3ca98bf60e8a + type: string + type: + $ref: '#/components/schemas/IssueTeamType' + required: + - id + - type + type: object + IssueTeamType: + description: Type of the object. + enum: + - team + example: team + type: string + x-enum-varnames: + - TEAM + IssueType: + description: Type of the object. + enum: + - issue + example: issue + type: string + x-enum-varnames: + - ISSUE + IssueUpdateAssigneeRequest: + description: Update issue assignee request payload. + properties: + data: + $ref: '#/components/schemas/IssueUpdateAssigneeRequestData' + required: + - data + type: object + IssueUpdateAssigneeRequestData: + description: Update issue assignee request. + properties: + id: + description: User identifier. + example: 87cb11a0-278c-440a-99fe-701223c80296 + type: string + type: + $ref: '#/components/schemas/IssueUpdateAssigneeRequestDataType' + required: + - id + - type + type: object + IssueUpdateAssigneeRequestDataType: + description: Type of the object. + enum: + - assignee + example: assignee + type: string + x-enum-varnames: + - ASSIGNEE + IssueUpdateStateRequest: + description: Update issue state request payload. + properties: + data: + $ref: '#/components/schemas/IssueUpdateStateRequestData' + required: + - data + type: object + IssueUpdateStateRequestData: + description: Update issue state request. + properties: + attributes: + $ref: '#/components/schemas/IssueUpdateStateRequestDataAttributes' + id: + description: Issue identifier. + example: c1726a66-1f64-11ee-b338-da7ad0900002 + type: string + type: + $ref: '#/components/schemas/IssueUpdateStateRequestDataType' + required: + - id + - type + - attributes + type: object + IssueUpdateStateRequestDataAttributes: + description: Object describing an issue state update request. + properties: + state: + $ref: '#/components/schemas/IssueState' + required: + - state + type: object + IssueUpdateStateRequestDataType: + description: Type of the object. + enum: + - error_tracking_issue + example: error_tracking_issue + type: string + x-enum-varnames: + - ERROR_TRACKING_ISSUE + IssueUser: + description: The user to whom the issue is assigned. + properties: + attributes: + $ref: '#/components/schemas/IssueUserAttributes' + id: + description: User identifier. + example: 87cb11a0-278c-440a-99fe-701223c80296 + type: string + type: + $ref: '#/components/schemas/IssueUserType' + required: + - id + - type + - attributes + type: object + IssueUserAttributes: + description: Object containing the information of a user. + properties: + email: + description: Email of the user. + example: user@company.com + type: string + handle: + description: Handle of the user. + example: User Handle + type: string + name: + description: Name of the user. + example: User Name + type: string + type: object + IssueUserReference: + description: The user the issue is assigned to. + properties: + id: + description: User identifier. + example: 87cb11a0-278c-440a-99fe-701223c80296 + type: string + type: + $ref: '#/components/schemas/IssueUserType' + required: + - id + - type + type: object + IssueUserType: + description: Type of the object + enum: + - user + example: user + type: string + x-enum-varnames: + - USER + IssuesSearchRequest: + description: Search issues request payload. + properties: + data: + $ref: '#/components/schemas/IssuesSearchRequestData' + required: + - data + type: object + IssuesSearchRequestData: + description: Search issues request. + properties: + attributes: + $ref: '#/components/schemas/IssuesSearchRequestDataAttributes' + type: + $ref: '#/components/schemas/IssuesSearchRequestDataType' + required: + - type + - attributes + type: object + IssuesSearchRequestDataAttributes: + description: Object describing a search issue request. + properties: + from: + description: Start date (inclusive) of the query in milliseconds since the + Unix epoch. + example: 1671612804000 + format: int64 + type: integer + order_by: + $ref: '#/components/schemas/IssuesSearchRequestDataAttributesOrderBy' + persona: + $ref: '#/components/schemas/IssuesSearchRequestDataAttributesPersona' + query: + description: Search query following the event search syntax. + example: service:orders-* AND @language:go + type: string + to: + description: End date (exclusive) of the query in milliseconds since the + Unix epoch. + example: 1671620004000 + format: int64 + type: integer + track: + $ref: '#/components/schemas/IssuesSearchRequestDataAttributesTrack' + required: + - query + - from + - to + type: object + IssuesSearchRequestDataAttributesOrderBy: + description: The attribute to sort the search results by. + enum: + - TOTAL_COUNT + - FIRST_SEEN + - IMPACTED_SESSIONS + - PRIORITY + example: IMPACTED_SESSIONS + type: string + x-enum-varnames: + - TOTAL_COUNT + - FIRST_SEEN + - IMPACTED_SESSIONS + - PRIORITY + IssuesSearchRequestDataAttributesPersona: + description: Persona for the search. Either track(s) or persona(s) must be specified. + enum: + - ALL + - BROWSER + - MOBILE + - BACKEND + example: BACKEND + type: string + x-enum-varnames: + - ALL + - BROWSER + - MOBILE + - BACKEND + IssuesSearchRequestDataAttributesTrack: + description: Track of the events to query. Either track(s) or persona(s) must + be specified. + enum: + - trace + - logs + - rum + example: trace + type: string + x-enum-varnames: + - TRACE + - LOGS + - RUM + IssuesSearchRequestDataType: + description: Type of the object. + enum: + - search_request + example: search_request + type: string + x-enum-varnames: + - SEARCH_REQUEST + IssuesSearchResponse: + description: Search issues response payload. + properties: + data: + description: Array of results matching the search query. + items: + $ref: '#/components/schemas/IssuesSearchResult' + type: array + included: + description: Array of resources related to the search results. + items: + $ref: '#/components/schemas/IssuesSearchResultIncluded' + type: array + type: object + IssuesSearchResult: + description: Result matching the search query. + properties: + attributes: + $ref: '#/components/schemas/IssuesSearchResultAttributes' + id: + description: Search result identifier (matches the nested issue's identifier). + example: c1726a66-1f64-11ee-b338-da7ad0900002 + type: string + relationships: + $ref: '#/components/schemas/IssuesSearchResultRelationships' + type: + $ref: '#/components/schemas/IssuesSearchResultType' + required: + - id + - type + - attributes + type: object + IssuesSearchResultAttributes: + 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. + example: 12 + format: int64 + type: integer + impacted_users: + description: Count of users impacted by the issue over the queried time + window. + example: 4 + format: int64 + type: integer + total_count: + description: Total count of errors that match the issue over the queried + time window. + example: 82 + format: int64 + type: integer + type: object + IssuesSearchResultIncluded: + description: An array of related resources, returned when the `include` query + parameter is used. + oneOf: + - $ref: '#/components/schemas/Issue' + - $ref: '#/components/schemas/Case' + - $ref: '#/components/schemas/IssueUser' + - $ref: '#/components/schemas/IssueTeam' + IssuesSearchResultIssueRelationship: + description: Relationship between the search result and the corresponding issue. + properties: + data: + $ref: '#/components/schemas/IssueReference' + required: + - data + type: object + IssuesSearchResultRelationships: + description: Relationships between the search result and other resources. + properties: + issue: + $ref: '#/components/schemas/IssuesSearchResultIssueRelationship' + type: object + IssuesSearchResultType: + description: Type of the object. + enum: + - error_tracking_search_result + example: error_tracking_search_result + type: string + x-enum-varnames: + - ERROR_TRACKING_SEARCH_RESULT JSONAPIErrorItem: description: API error response body properties: @@ -36255,6 +37064,20 @@ components: type: string x-enum-varnames: - SCORECARD + SearchIssuesIncludeQueryParameterItem: + description: Relationship object that should be included in the search response. + enum: + - issue + - issue.assignee + - issue.case + - issue.team_owners + example: issue.case + type: string + x-enum-varnames: + - ISSUE + - ISSUE_ASSIGNEE + - ISSUE_CASE + - ISSUE_TEAM_OWNERS SecurityFilter: description: The security filter's properties. properties: @@ -45713,6 +46536,8 @@ components: data_scanner_write: Edit Data Scanner configurations. embeddable_graphs_share: Generate public links to share embeddable graphs externally. + error_tracking_read: Read Error Tracking data. + error_tracking_write: Edit Error Tracking issues. events_read: Read Events data. hosts_read: List hosts and their attributes. incident_notification_settings_write: Configure Incidents Notification @@ -52122,6 +52947,159 @@ paths: operator: OR permissions: - monitors_downtime + /api/v2/error-tracking/issues/search: + post: + description: Search issues endpoint allows you to programmatically search for + issues within your organization. This endpoint returns a list of issues that + match a given search query, following the event search syntax. The search + results are limited to a maximum of 100 issues per request. + operationId: SearchIssues + parameters: + - $ref: '#/components/parameters/SearchIssuesIncludeQueryParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IssuesSearchRequest' + description: Search issues request payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IssuesSearchResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - error_tracking_read + summary: Search error tracking issues + tags: + - 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. + operationId: GetIssue + parameters: + - $ref: '#/components/parameters/IssueIDPathParameter' + - $ref: '#/components/parameters/GetIssueIncludeQueryParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IssueResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - error_tracking_read + summary: Get the details of an error tracking issue + tags: + - Error Tracking + /api/v2/error-tracking/issues/{issue_id}/assignee: + put: + description: Update the assignee of an issue by `issue_id`. + operationId: UpdateIssueAssignee + parameters: + - $ref: '#/components/parameters/IssueIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IssueUpdateAssigneeRequest' + description: Update issue assignee request payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IssueResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - error_tracking_read + - error_tracking_write + - cases_read + - cases_write + summary: Update the assignee of an issue + tags: + - Error Tracking + /api/v2/error-tracking/issues/{issue_id}/state: + put: + description: Update the state of an issue by `issue_id`. Use this endpoint to + move an issue between states such as `OPEN`, `RESOLVED`, or `IGNORED`. + operationId: UpdateIssueState + parameters: + - $ref: '#/components/parameters/IssueIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IssueUpdateStateRequest' + description: Update issue state request payload. + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IssueResponse' + description: OK + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - error_tracking_read + - error_tracking_write + summary: Update the state of an issue + tags: + - Error Tracking /api/v2/events: get: description: 'List endpoint returns events that match an events search query. @@ -69190,6 +70168,9 @@ tags: end times, prevent all alerting related to specified Datadog tags.' name: Downtimes +- description: View and manage issues within Error Tracking. See the [Error Tracking + page](https://docs.datadoghq.com/error_tracking/) for more information. + name: Error Tracking - description: 'The Event Management API allows you to programmatically post events to the Events Explorer and fetch events from the Events Explorer. See the [Event Management page](https://docs.datadoghq.com/service_management/events/) for more diff --git a/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Bad-Request-response_3233709570/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Bad-Request-response_3233709570/frozen.json new file mode 100644 index 000000000000..f9cab3991c93 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Bad-Request-response_3233709570/frozen.json @@ -0,0 +1 @@ +"2025-08-29T12:19:16.262Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Bad-Request-response_3233709570/recording.har b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Bad-Request-response_3233709570/recording.har new file mode 100644 index 000000000000..c0239e166b2e --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Bad-Request-response_3233709570/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Error Tracking/Get the details of an error tracking issue returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "3f7077b8a95b25a10d3e6e0bb0aee38b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 527, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/invalid-issue-id" + }, + "response": { + "bodySize": 86, + "content": { + "mimeType": "application/vnd.api+json", + "size": 86, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"issue id is not an uuid\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-08-29T12:19:16.495Z", + "time": 111 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Not-Found-response_1194989905/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Not-Found-response_1194989905/frozen.json new file mode 100644 index 000000000000..b490852e4681 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Not-Found-response_1194989905/frozen.json @@ -0,0 +1 @@ +"2025-08-27T15:33:33.272Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Not-Found-response_1194989905/recording.har b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Not-Found-response_1194989905/recording.har new file mode 100644 index 000000000000..6232a9bbfb28 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-Not-Found-response_1194989905/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Error Tracking/Get the details of an error tracking issue returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "1643802611683bfa3763949697b01fe9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 140, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"from\":1755012813000,\"query\":\"service:synthetics-browser\",\"to\":1756308813000,\"track\":\"rum\"},\"type\":\"search_request\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/search" + }, + "response": { + "bodySize": 243, + "content": { + "mimeType": "application/vnd.api+json", + "size": 243, + "text": "{\"data\":[{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":1,\"total_count\":1},\"relationships\":{\"issue\":{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-27T15:33:33.276Z", + "time": 223 + }, + { + "_id": "2f974d4557e6e947cf7c58467c80daf3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/67d80aa3-36ff-44b9-a694-c501a7591737" + }, + "response": { + "bodySize": 76, + "content": { + "mimeType": "application/vnd.api+json", + "size": 76, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"issue not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-08-27T15:33:33.505Z", + "time": 64 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-OK-response_4094044160/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-OK-response_4094044160/frozen.json new file mode 100644 index 000000000000..e5399ec9282c --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-OK-response_4094044160/frozen.json @@ -0,0 +1 @@ +"2025-08-27T15:33:33.577Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-OK-response_4094044160/recording.har b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-OK-response_4094044160/recording.har new file mode 100644 index 000000000000..14cef59c1ccc --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Get-the-details-of-an-error-tracking-issue-returns-OK-response_4094044160/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Error Tracking/Get the details of an error tracking issue returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "1643802611683bfa3763949697b01fe9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 140, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"from\":1755012813000,\"query\":\"service:synthetics-browser\",\"to\":1756308813000,\"track\":\"rum\"},\"type\":\"search_request\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/search" + }, + "response": { + "bodySize": 243, + "content": { + "mimeType": "application/vnd.api+json", + "size": 243, + "text": "{\"data\":[{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":1,\"total_count\":1},\"relationships\":{\"issue\":{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-27T15:33:33.580Z", + "time": 282 + }, + { + "_id": "88486635766f155f79ad653f5ba278e7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 547, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/5f8ebd5c-6dd9-11f0-8a28-da7ad0900002" + }, + "response": { + "bodySize": 477, + "content": { + "mimeType": "application/vnd.api+json", + "size": 477, + "text": "{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\",\"attributes\":{\"error_message\":\"HTTP error\",\"error_type\":\"Error\",\"file_path\":\"\",\"first_seen\":1753944082256,\"first_seen_version\":\"\",\"function_name\":\"\",\"is_crash\":false,\"languages\":[\"JAVASCRIPT\"],\"last_seen\":1755686259367,\"last_seen_version\":\"\",\"platform\":\"BROWSER\",\"service\":\"synthetics-browser\",\"state\":\"RESOLVED\"},\"relationships\":{\"case\":{\"data\":{\"id\":\"f1b32a47-621d-4c57-9642-045aeb83891e\",\"type\":\"case\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-27T15:33:33.868Z", + "time": 65 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-Bad-Request-response_3779821528/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-Bad-Request-response_3779821528/frozen.json new file mode 100644 index 000000000000..d9d92f11d374 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-Bad-Request-response_3779821528/frozen.json @@ -0,0 +1 @@ +"2025-08-29T12:59:23.045Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-Bad-Request-response_3779821528/recording.har b/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-Bad-Request-response_3779821528/recording.har new file mode 100644 index 000000000000..1959e2ae5396 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-Bad-Request-response_3779821528/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Error Tracking/Search error tracking issues returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "473d324c18e12196062eeaecfb529074", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 157, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"from\":1671612804000,\"query\":\"service:orders-* AND @language:go\",\"to\":1671620004000,\"track\":\"invalid-track\"},\"type\":\"search_request\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/search" + }, + "response": { + "bodySize": 110, + "content": { + "mimeType": "application/vnd.api+json", + "size": 110, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"invalid json value for TrackType: invalid-track\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-08-29T12:59:23.263Z", + "time": 78 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-OK-response_3923349494/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-OK-response_3923349494/frozen.json new file mode 100644 index 000000000000..dabfb6c5a630 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-OK-response_3923349494/frozen.json @@ -0,0 +1 @@ +"2025-08-27T15:33:33.997Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-OK-response_3923349494/recording.har b/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-OK-response_3923349494/recording.har new file mode 100644 index 000000000000..8aec4ea00b10 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Search-error-tracking-issues-returns-OK-response_3923349494/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Error Tracking/Search error tracking issues returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "f46fc451b537346f3e778e7e2bc6d0c7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 149, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"from\":1671612804000,\"query\":\"service:orders-* AND @language:go\",\"to\":1671620004000,\"track\":\"trace\"},\"type\":\"search_request\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/search" + }, + "response": { + "bodySize": 11, + "content": { + "mimeType": "application/vnd.api+json", + "size": 11, + "text": "{\"data\":[]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-27T15:33:33.999Z", + "time": 71 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Bad-Request-response_1607077003/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Bad-Request-response_1607077003/frozen.json new file mode 100644 index 000000000000..c32f6e9cd4da --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Bad-Request-response_1607077003/frozen.json @@ -0,0 +1 @@ +"2025-08-29T12:59:23.349Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Bad-Request-response_1607077003/recording.har b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Bad-Request-response_1607077003/recording.har new file mode 100644 index 000000000000..3634683de78b --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Bad-Request-response_1607077003/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Error Tracking/Update the assignee of an issue returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "64dd10e3cd368dd3f7ba55da10f5ba95", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 140, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"from\":1755176363000,\"query\":\"service:synthetics-browser\",\"to\":1756472363000,\"track\":\"rum\"},\"type\":\"search_request\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/search" + }, + "response": { + "bodySize": 243, + "content": { + "mimeType": "application/vnd.api+json", + "size": 243, + "text": "{\"data\":[{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":1,\"total_count\":1},\"relationships\":{\"issue\":{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-29T12:59:23.352Z", + "time": 282 + }, + { + "_id": "9b63fee9f9a2f4757a0df3e86bf172e5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 46, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 619, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"id\":\"invalid-id\",\"type\":\"assignee\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/5f8ebd5c-6dd9-11f0-8a28-da7ad0900002/assignee" + }, + "response": { + "bodySize": 86, + "content": { + "mimeType": "application/vnd.api+json", + "size": 86, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"invalid UUID length: 10\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-08-29T12:59:23.639Z", + "time": 86 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Not-Found-response_2837726668/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Not-Found-response_2837726668/frozen.json new file mode 100644 index 000000000000..6fe088287465 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Not-Found-response_2837726668/frozen.json @@ -0,0 +1 @@ +"2025-08-27T15:33:34.622Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Not-Found-response_2837726668/recording.har b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Not-Found-response_2837726668/recording.har new file mode 100644 index 000000000000..9d52843c35c7 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-Not-Found-response_2837726668/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Error Tracking/Update the assignee of an issue returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "f2d10dd7fea280fc938a31ddb708af8c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 72, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 619, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"assignee\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/67d80aa3-36ff-44b9-a694-c501a7591737/assignee" + }, + "response": { + "bodySize": 76, + "content": { + "mimeType": "application/vnd.api+json", + "size": 76, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"issue not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-08-27T15:33:34.625Z", + "time": 58 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-OK-response_1891433599/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-OK-response_1891433599/frozen.json new file mode 100644 index 000000000000..2923e2dd57e6 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-OK-response_1891433599/frozen.json @@ -0,0 +1 @@ +"2025-08-27T15:33:34.689Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-OK-response_1891433599/recording.har b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-OK-response_1891433599/recording.har new file mode 100644 index 000000000000..74e2d001c679 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-assignee-of-an-issue-returns-OK-response_1891433599/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Error Tracking/Update the assignee of an issue returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c6544eafd97cca468dbc3ab382c0f9d1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 140, + "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\":{\"from\":1755012814000,\"query\":\"service:synthetics-browser\",\"to\":1756308814000,\"track\":\"rum\"},\"type\":\"search_request\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/search" + }, + "response": { + "bodySize": 243, + "content": { + "mimeType": "application/vnd.api+json", + "size": 243, + "text": "{\"data\":[{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":1,\"total_count\":1},\"relationships\":{\"issue\":{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-27T15:33:34.692Z", + "time": 210 + }, + { + "_id": "489740da6e9ffd6a502a2571355215bc", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 72, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 618, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"assignee\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/5f8ebd5c-6dd9-11f0-8a28-da7ad0900002/assignee" + }, + "response": { + "bodySize": 1554, + "content": { + "mimeType": "application/vnd.api+json", + "size": 1554, + "text": "{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\",\"attributes\":{\"error_message\":\"HTTP error\",\"error_type\":\"Error\",\"file_path\":\"\",\"first_seen\":1753944082256,\"first_seen_version\":\"\",\"function_name\":\"\",\"is_crash\":false,\"languages\":[\"JAVASCRIPT\"],\"last_seen\":1755686259367,\"last_seen_version\":\"\",\"platform\":\"BROWSER\",\"service\":\"synthetics-browser\",\"state\":\"RESOLVED\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\"}},\"case\":{\"data\":{\"id\":\"f1b32a47-621d-4c57-9642-045aeb83891e\",\"type\":\"case\"}}}},\"included\":[{\"id\":\"f1b32a47-621d-4c57-9642-045aeb83891e\",\"type\":\"case\",\"attributes\":{\"closed_at\":\"2025-08-21T17:21:13.882831Z\",\"created_at\":\"2025-08-21T17:20:22.807979Z\",\"creation_source\":\"ERROR_TRACKING\",\"description\":\"\",\"insights\":[{\"type\":\"ERROR_TRACKING\",\"ref\":\"/error-tracking?issueId=5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"resource_id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\"}],\"key\":\"ET-1\",\"modified_at\":\"2025-08-21T17:21:13.882831Z\",\"priority\":\"NOT_DEFINED\",\"status\":\"CLOSED\",\"title\":\"Error: HTTP error\",\"type\":\"ERROR_TRACKING_ISSUE\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"384521ba-dc5f-481f-942d-15bd48428029\",\"type\":\"project\"}}}},{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\",\"attributes\":{\"email\":\"\",\"handle\":\"\",\"name\":\"\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 526, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-27T15:33:34.908Z", + "time": 115 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Bad-Request-response_3010530991/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Bad-Request-response_3010530991/frozen.json new file mode 100644 index 000000000000..95d664201a71 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Bad-Request-response_3010530991/frozen.json @@ -0,0 +1 @@ +"2025-08-27T15:33:35.029Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Bad-Request-response_3010530991/recording.har b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Bad-Request-response_3010530991/recording.har new file mode 100644 index 000000000000..baeae25d35f3 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Bad-Request-response_3010530991/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Error Tracking/Update the state of an issue returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "a2c05b3bbab5013b200d7dc622c1b35e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 140, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"from\":1755012815000,\"query\":\"service:synthetics-browser\",\"to\":1756308815000,\"track\":\"rum\"},\"type\":\"search_request\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/search" + }, + "response": { + "bodySize": 243, + "content": { + "mimeType": "application/vnd.api+json", + "size": 243, + "text": "{\"data\":[{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":1,\"total_count\":1},\"relationships\":{\"issue\":{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-27T15:33:35.031Z", + "time": 242 + }, + { + "_id": "a3a29d1b0e261d5c93c7a945a88390d7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 123, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"state\":\"invalid-state\"},\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"error_tracking_issue\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/5f8ebd5c-6dd9-11f0-8a28-da7ad0900002/state" + }, + "response": { + "bodySize": 115, + "content": { + "mimeType": "application/vnd.api+json", + "size": 115, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"invalid json value for IssueState: \\\"invalid-state\\\"\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-08-27T15:33:35.279Z", + "time": 88 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Not-Found-response_101445672/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Not-Found-response_101445672/frozen.json new file mode 100644 index 000000000000..a9558619e3b0 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Not-Found-response_101445672/frozen.json @@ -0,0 +1 @@ +"2025-08-27T15:33:35.373Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Not-Found-response_101445672/recording.har b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Not-Found-response_101445672/recording.har new file mode 100644 index 000000000000..e78e57eff15c --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-Not-Found-response_101445672/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Error Tracking/Update the state of an issue returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "866bc50f69f9077a3f970b6bf60e2186", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 118, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"state\":\"resolved\"},\"id\":\"67d80aa3-36ff-44b9-a694-c501a7591737\",\"type\":\"error_tracking_issue\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/67d80aa3-36ff-44b9-a694-c501a7591737/state" + }, + "response": { + "bodySize": 76, + "content": { + "mimeType": "application/vnd.api+json", + "size": 76, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"issue not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-08-27T15:33:35.376Z", + "time": 50 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-OK-response_176084187/frozen.json b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-OK-response_176084187/frozen.json new file mode 100644 index 000000000000..00a84aa1729b --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-OK-response_176084187/frozen.json @@ -0,0 +1 @@ +"2025-08-27T15:33:35.431Z" diff --git a/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-OK-response_176084187/recording.har b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-OK-response_176084187/recording.har new file mode 100644 index 000000000000..f933e637c6e0 --- /dev/null +++ b/cassettes/v2/Error-Tracking_4216468318/Update-the-state-of-an-issue-returns-OK-response_176084187/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Error Tracking/Update the state of an issue returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "a2c05b3bbab5013b200d7dc622c1b35e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 140, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"from\":1755012815000,\"query\":\"service:synthetics-browser\",\"to\":1756308815000,\"track\":\"rum\"},\"type\":\"search_request\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/search" + }, + "response": { + "bodySize": 243, + "content": { + "mimeType": "application/vnd.api+json", + "size": 243, + "text": "{\"data\":[{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"error_tracking_search_result\",\"attributes\":{\"impacted_sessions\":1,\"total_count\":1},\"relationships\":{\"issue\":{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\"}}}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-27T15:33:35.437Z", + "time": 203 + }, + { + "_id": "1e4178cc8a6d69111332b52fd96657b2", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 118, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 614, + "httpVersion": "HTTP/1.1", + "method": "PUT", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"state\":\"RESOLVED\"},\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"error_tracking_issue\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/error-tracking/issues/5f8ebd5c-6dd9-11f0-8a28-da7ad0900002/state" + }, + "response": { + "bodySize": 1554, + "content": { + "mimeType": "application/vnd.api+json", + "size": 1554, + "text": "{\"data\":{\"id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"type\":\"issue\",\"attributes\":{\"error_message\":\"HTTP error\",\"error_type\":\"Error\",\"file_path\":\"\",\"first_seen\":1753944082256,\"first_seen_version\":\"\",\"function_name\":\"\",\"is_crash\":false,\"languages\":[\"JAVASCRIPT\"],\"last_seen\":1755686259367,\"last_seen_version\":\"\",\"platform\":\"BROWSER\",\"service\":\"synthetics-browser\",\"state\":\"RESOLVED\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\"}},\"case\":{\"data\":{\"id\":\"f1b32a47-621d-4c57-9642-045aeb83891e\",\"type\":\"case\"}}}},\"included\":[{\"id\":\"f1b32a47-621d-4c57-9642-045aeb83891e\",\"type\":\"case\",\"attributes\":{\"closed_at\":\"2025-08-21T17:21:13.882831Z\",\"created_at\":\"2025-08-21T17:20:22.807979Z\",\"creation_source\":\"ERROR_TRACKING\",\"description\":\"\",\"insights\":[{\"type\":\"ERROR_TRACKING\",\"ref\":\"/error-tracking?issueId=5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\",\"resource_id\":\"5f8ebd5c-6dd9-11f0-8a28-da7ad0900002\"}],\"key\":\"ET-1\",\"modified_at\":\"2025-08-21T17:21:13.882831Z\",\"priority\":\"NOT_DEFINED\",\"status\":\"CLOSED\",\"title\":\"Error: HTTP error\",\"type\":\"ERROR_TRACKING_ISSUE\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"384521ba-dc5f-481f-942d-15bd48428029\",\"type\":\"project\"}}}},{\"id\":\"87cb11a0-278c-440a-99fe-701223c80296\",\"type\":\"user\",\"attributes\":{\"email\":\"\",\"handle\":\"\",\"name\":\"\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 526, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-08-27T15:33:35.646Z", + "time": 76 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/features/v2/error_tracking.feature b/features/v2/error_tracking.feature new file mode 100644 index 000000000000..97f8ceeedd93 --- /dev/null +++ b/features/v2/error_tracking.feature @@ -0,0 +1,100 @@ +@endpoint(error-tracking) @endpoint(error-tracking-v2) +Feature: Error Tracking + View and manage issues within Error Tracking. See the [Error Tracking + page](https://docs.datadoghq.com/error_tracking/) for more information. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "ErrorTracking" API + + @team:DataDog/error-tracking + Scenario: Get the details of an error tracking issue returns "Bad Request" response + Given new "GetIssue" request + And request contains "issue_id" parameter with value "invalid-issue-id" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/error-tracking + Scenario: Get the details of an error tracking issue returns "Not Found" response + Given new "GetIssue" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/error-tracking + Scenario: Get the details of an error tracking issue returns "OK" response + Given new "GetIssue" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter from "issue.id" + When the request is sent + Then the response status is 200 OK + And the response "data.id" is equal to "{{ issue.id }}" + + @team:DataDog/error-tracking + Scenario: Search error tracking issues returns "Bad Request" response + Given new "SearchIssues" request + And body with value {"data": {"attributes": {"query": "service:orders-* AND @language:go", "from": 1671612804000, "to": 1671620004000, "track": "invalid-track"}, "type": "search_request"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/error-tracking + Scenario: Search error tracking issues returns "OK" response + Given new "SearchIssues" request + And body with value {"data": {"attributes": {"query": "service:orders-* AND @language:go", "from": 1671612804000, "to": 1671620004000, "track": "trace"}, "type": "search_request"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/error-tracking + Scenario: Update the assignee of an issue returns "Bad Request" response + Given new "UpdateIssueAssignee" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter from "issue.id" + And body with value {"data": {"id": "invalid-id", "type": "assignee"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/error-tracking + Scenario: Update the assignee of an issue returns "Not Found" response + Given new "UpdateIssueAssignee" request + And request contains "issue_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"id": "87cb11a0-278c-440a-99fe-701223c80296", "type": "assignee"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/error-tracking + Scenario: Update the assignee of an issue returns "OK" response + Given new "UpdateIssueAssignee" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter from "issue.id" + And body with value {"data": {"id": "87cb11a0-278c-440a-99fe-701223c80296", "type": "assignee"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/error-tracking + Scenario: Update the state of an issue returns "Bad Request" response + Given new "UpdateIssueState" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter from "issue.id" + And body with value {"data": {"attributes": {"state": "invalid-state"}, "id": "{{ issue.id }}", "type": "error_tracking_issue"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/error-tracking + Scenario: Update the state of an issue returns "Not Found" response + Given new "UpdateIssueState" request + And request contains "issue_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"state": "resolved"}, "id": "67d80aa3-36ff-44b9-a694-c501a7591737", "type": "error_tracking_issue"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/error-tracking + Scenario: Update the state of an issue returns "OK" response + Given new "UpdateIssueState" request + And there is a valid "issue" in the system + And request contains "issue_id" parameter from "issue.id" + And body with value {"data": {"attributes": {"state": "RESOLVED"}, "id": "{{ issue.id }}", "type": "error_tracking_issue"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.state" is equal to "RESOLVED" diff --git a/features/v2/given.json b/features/v2/given.json index fbeea567872f..79e6d4c45d2c 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -224,6 +224,19 @@ "tag": "Downtimes", "operationId": "CreateDowntime" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"query\": \"service:synthetics-browser\",\n \"from\": {{ timestamp(\"now - 15d\") }}000,\n \"to\": {{ timestamp(\"now\") }}000,\n \"track\": \"rum\"\n },\n \"type\": \"search_request\"\n }\n}" + } + ], + "source": "data[0]", + "step": "there is a valid \"issue\" in the system", + "key": "issue", + "tag": "Error Tracking", + "operationId": "SearchIssues" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index ec94e15e11da..fb630772c1cb 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1022,6 +1022,30 @@ "type": "idempotent" } }, + "SearchIssues": { + "tag": "Error Tracking", + "undo": { + "type": "safe" + } + }, + "GetIssue": { + "tag": "Error Tracking", + "undo": { + "type": "safe" + } + }, + "UpdateIssueAssignee": { + "tag": "Error Tracking", + "undo": { + "type": "idempotent" + } + }, + "UpdateIssueState": { + "tag": "Error Tracking", + "undo": { + "type": "idempotent" + } + }, "ListEvents": { "tag": "Events", "undo": { diff --git a/packages/datadog-api-client/README.md b/packages/datadog-api-client/README.md index 2d5dc09f45c4..a1c16afd4df7 100644 --- a/packages/datadog-api-client/README.md +++ b/packages/datadog-api-client/README.md @@ -377,6 +377,7 @@ apiInstance | Domain Allowlist | @datadog/datadog-api-client-domain-allowlist | [README.md](../../services/domain-allowlist/README.md) | | DORA Metrics | @datadog/datadog-api-client-dora-metrics | [README.md](../../services/dora-metrics/README.md) | | Downtimes | @datadog/datadog-api-client-downtimes | [README.md](../../services/downtimes/README.md) | +| Error Tracking | @datadog/datadog-api-client-error-tracking | [README.md](../../services/error-tracking/README.md) | | Events | @datadog/datadog-api-client-events | [README.md](../../services/events/README.md) | | Fastly Integration | @datadog/datadog-api-client-fastly-integration | [README.md](../../services/fastly-integration/README.md) | | GCP Integration | @datadog/datadog-api-client-gcp-integration | [README.md](../../services/gcp-integration/README.md) | diff --git a/private/bdd_runner/src/support/scenarios_model_mapping.ts b/private/bdd_runner/src/support/scenarios_model_mapping.ts index cca6085a8675..38db9644b98b 100644 --- a/private/bdd_runner/src/support/scenarios_model_mapping.ts +++ b/private/bdd_runner/src/support/scenarios_model_mapping.ts @@ -4816,6 +4816,50 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = { }, operationResponseType: "MonitorDowntimeMatchResponse", }, + "ErrorTrackingApi.V2.SearchIssues": { + include: { + type: "Array", + format: "", + }, + body: { + type: "IssuesSearchRequest", + format: "", + }, + operationResponseType: "IssuesSearchResponse", + }, + "ErrorTrackingApi.V2.GetIssue": { + issueId: { + type: "string", + format: "", + }, + include: { + type: "Array", + format: "", + }, + operationResponseType: "IssueResponse", + }, + "ErrorTrackingApi.V2.UpdateIssueAssignee": { + issueId: { + type: "string", + format: "", + }, + body: { + type: "IssueUpdateAssigneeRequest", + format: "", + }, + operationResponseType: "IssueResponse", + }, + "ErrorTrackingApi.V2.UpdateIssueState": { + issueId: { + type: "string", + format: "", + }, + body: { + type: "IssueUpdateStateRequest", + format: "", + }, + operationResponseType: "IssueResponse", + }, "EventsApi.V2.ListEvents": { filterQuery: { type: "string", diff --git a/services/error_tracking/.yarnrc.yml b/services/error_tracking/.yarnrc.yml new file mode 100644 index 000000000000..3186f3f0795a --- /dev/null +++ b/services/error_tracking/.yarnrc.yml @@ -0,0 +1 @@ +nodeLinker: node-modules diff --git a/services/error_tracking/README.md b/services/error_tracking/README.md new file mode 100644 index 000000000000..859d70097bab --- /dev/null +++ b/services/error_tracking/README.md @@ -0,0 +1,36 @@ +# @datadog/datadog-api-client-error-tracking + +## Description + +View and manage issues within Error Tracking. See the [Error Tracking page](https://docs.datadoghq.com/error_tracking/) for more information. + +## Navigation + +- [Installation](#installation) +- [Getting Started](#getting-started) + +## Installation + +```sh +# NPM +npm install @datadog/datadog-api-client-error-tracking +# Yarn +yarn add @datadog/datadog-api-client-error-tracking +``` + +## Getting Started +```ts +import { createConfiguration } from "@datadog/datadog-api-client"; +import { ErrorTrackingApiV2 } from "@datadog/datadog-api-client-error-tracking"; +import { v2 } from "@datadog/datadog-api-client-error-tracking"; + +const configuration = createConfiguration(); +const apiInstance = new ErrorTrackingApiV2(configuration); +const params = {/* parameters */}; + +apiInstance.searchIssues(params).then((data) => { + console.log("API called successfully. Returned data: " + JSON.stringify(data)); +}).catch((error) => { + console.error("Error calling API: " + error); +}); +``` \ No newline at end of file diff --git a/services/error_tracking/package.json b/services/error_tracking/package.json new file mode 100644 index 000000000000..467cee0ce60a --- /dev/null +++ b/services/error_tracking/package.json @@ -0,0 +1,43 @@ +{ + "name": "@datadog/datadog-api-client-error-tracking", + "description": "", + "author": "", + "keywords": [ + "api", + "fetch", + "typescript" + ], + "license": "Apache-2.0", + "licenses": [ + { + "type": "Apache-2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/DataDog/datadog-api-client-typescript.git", + "directory": "services/error-tracking" + }, + "files": [ + "dist/**/*" + ], + "main": "./dist/index.js", + "typings": "./dist/index.d.ts", + "scripts": { + "prepack": "yarn workspace @datadog/datadog-api-client build && yarn build", + "build": "yarn generate-version-files && tsc", + "generate-version-files": "node -p \"'export const version = ' + JSON.stringify(require('./package.json').version)\" > src/version.ts" + }, + "dependencies": { + "@datadog/datadog-api-client": "^2.0.0-beta.0" + }, + "devDependencies": { + "typescript": "5.8.3" + }, + "engines": { + "node": ">=18.0.0" + }, + "version": "0.0.1", + "packageManager": "yarn@4.9.1" +} diff --git a/services/error_tracking/src/index.ts b/services/error_tracking/src/index.ts new file mode 100644 index 000000000000..480ca3fe3cf7 --- /dev/null +++ b/services/error_tracking/src/index.ts @@ -0,0 +1,3 @@ +export * as v2 from "./v2"; + +export { ErrorTrackingApi as ErrorTrackingApiV2 } from "./v2/ErrorTrackingApi"; diff --git a/services/error_tracking/src/v2/ErrorTrackingApi.ts b/services/error_tracking/src/v2/ErrorTrackingApi.ts new file mode 100644 index 000000000000..51c907fb96e5 --- /dev/null +++ b/services/error_tracking/src/v2/ErrorTrackingApi.ts @@ -0,0 +1,698 @@ +import { + ApiException, + BaseAPIRequestFactory, + BaseServerConfiguration, + buildUserAgent, + Configuration, + createConfiguration, + deserialize, + getPreferredMediaType, + HttpMethod, + isBrowser, + logger, + normalizeMediaType, + parse, + RequiredError, + RequestContext, + ResponseContext, + serialize, + ServerConfiguration, + stringify, + applySecurityAuthentication, +} from "@datadog/datadog-api-client"; + +import { TypingInfo } from "./models/TypingInfo"; +import { APIErrorResponse } from "./models/APIErrorResponse"; +import { GetIssueIncludeQueryParameterItem } from "./models/GetIssueIncludeQueryParameterItem"; +import { IssueResponse } from "./models/IssueResponse"; +import { IssuesSearchRequest } from "./models/IssuesSearchRequest"; +import { IssuesSearchResponse } from "./models/IssuesSearchResponse"; +import { IssueUpdateAssigneeRequest } from "./models/IssueUpdateAssigneeRequest"; +import { IssueUpdateStateRequest } from "./models/IssueUpdateStateRequest"; +import { SearchIssuesIncludeQueryParameterItem } from "./models/SearchIssuesIncludeQueryParameterItem"; +import { version } from "../version"; + +export class ErrorTrackingApiRequestFactory extends BaseAPIRequestFactory { + public userAgent: string | undefined; + + public constructor(configuration: Configuration) { + super(configuration); + if (!isBrowser) { + this.userAgent = buildUserAgent("error-tracking", version); + } + } + public async getIssue( + issueId: string, + include?: Array, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'issueId' is not null or undefined + if (issueId === null || issueId === undefined) { + throw new RequiredError("issueId", "getIssue"); + } + + // Path Params + const localVarPath = "/api/v2/error-tracking/issues/{issue_id}".replace( + "{issue_id}", + encodeURIComponent(String(issueId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ErrorTrackingApi.v2.getIssue", + ErrorTrackingApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.GET, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + serialize( + include, + TypingInfo, + "Array", + "", + ), + "csv", + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async searchIssues( + body: IssuesSearchRequest, + include?: Array, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "searchIssues"); + } + + // Path Params + const localVarPath = "/api/v2/error-tracking/issues/search"; + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ErrorTrackingApi.v2.searchIssues", + ErrorTrackingApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.POST, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + serialize( + include, + TypingInfo, + "Array", + "", + ), + "csv", + ); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "IssuesSearchRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateIssueAssignee( + issueId: string, + body: IssueUpdateAssigneeRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'issueId' is not null or undefined + if (issueId === null || issueId === undefined) { + throw new RequiredError("issueId", "updateIssueAssignee"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIssueAssignee"); + } + + // Path Params + const localVarPath = + "/api/v2/error-tracking/issues/{issue_id}/assignee".replace( + "{issue_id}", + encodeURIComponent(String(issueId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ErrorTrackingApi.v2.updateIssueAssignee", + ErrorTrackingApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PUT, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "IssueUpdateAssigneeRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateIssueState( + issueId: string, + body: IssueUpdateStateRequest, + _options?: Configuration, + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'issueId' is not null or undefined + if (issueId === null || issueId === undefined) { + throw new RequiredError("issueId", "updateIssueState"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIssueState"); + } + + // Path Params + const localVarPath = + "/api/v2/error-tracking/issues/{issue_id}/state".replace( + "{issue_id}", + encodeURIComponent(String(issueId)), + ); + + // Make Request Context + const { server, overrides } = _config.getServerAndOverrides( + "ErrorTrackingApi.v2.updateIssueState", + ErrorTrackingApi.operationServers, + ); + const requestContext = server.makeRequestContext( + localVarPath, + HttpMethod.PUT, + overrides, + ); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Set User-Agent + if (this.userAgent) { + requestContext.setHeaderParam("User-Agent", this.userAgent); + } + + // Body Params + const contentType = getPreferredMediaType(["application/json"]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = stringify( + serialize(body, TypingInfo, "IssueUpdateStateRequest", ""), + contentType, + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } +} + +export class ErrorTrackingApiResponseProcessor { + /** + * 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 getIssue + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIssue(response: ResponseContext): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: IssueResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "IssueResponse", + ) as IssueResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "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: IssueResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "IssueResponse", + "", + ) as IssueResponse; + 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 searchIssues + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchIssues( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: IssuesSearchResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "IssuesSearchResponse", + ) as IssuesSearchResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "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: IssuesSearchResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "IssuesSearchResponse", + "", + ) as IssuesSearchResponse; + 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 updateIssueAssignee + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIssueAssignee( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: IssueResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "IssueResponse", + ) as IssueResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "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: IssueResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "IssueResponse", + "", + ) as IssueResponse; + 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 updateIssueState + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIssueState( + response: ResponseContext, + ): Promise { + const contentType = normalizeMediaType(response.headers["content-type"]); + if (response.httpStatusCode === 200) { + const body: IssueResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "IssueResponse", + ) as IssueResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = parse(await response.body.text(), contentType); + let body: APIErrorResponse; + try { + body = deserialize( + bodyText, + TypingInfo, + "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: IssueResponse = deserialize( + parse(await response.body.text(), contentType), + TypingInfo, + "IssueResponse", + "", + ) as IssueResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"', + ); + } +} + +export interface ErrorTrackingApiGetIssueRequest { + /** + * The identifier of the issue. + * @type string + */ + issueId: string; + /** + * Comma-separated list of relationship objects that should be included in the response. + * @type Array + */ + include?: Array; +} + +export interface ErrorTrackingApiSearchIssuesRequest { + /** + * Search issues request payload. + * @type IssuesSearchRequest + */ + body: IssuesSearchRequest; + /** + * Comma-separated list of relationship objects that should be included in the response. + * @type Array + */ + include?: Array; +} + +export interface ErrorTrackingApiUpdateIssueAssigneeRequest { + /** + * The identifier of the issue. + * @type string + */ + issueId: string; + /** + * Update issue assignee request payload. + * @type IssueUpdateAssigneeRequest + */ + body: IssueUpdateAssigneeRequest; +} + +export interface ErrorTrackingApiUpdateIssueStateRequest { + /** + * The identifier of the issue. + * @type string + */ + issueId: string; + /** + * Update issue state request payload. + * @type IssueUpdateStateRequest + */ + body: IssueUpdateStateRequest; +} + +export class ErrorTrackingApi { + private requestFactory: ErrorTrackingApiRequestFactory; + private responseProcessor: ErrorTrackingApiResponseProcessor; + private configuration: Configuration; + + static operationServers: { [key: string]: BaseServerConfiguration[] } = {}; + + public constructor( + configuration?: Configuration, + requestFactory?: ErrorTrackingApiRequestFactory, + responseProcessor?: ErrorTrackingApiResponseProcessor, + ) { + this.configuration = configuration || createConfiguration(); + this.requestFactory = + requestFactory || new ErrorTrackingApiRequestFactory(this.configuration); + this.responseProcessor = + responseProcessor || new ErrorTrackingApiResponseProcessor(); + } + + /** + * Retrieve the full details for a specific error tracking issue, including attributes and relationships. + * @param param The request object + */ + public getIssue( + param: ErrorTrackingApiGetIssueRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.getIssue( + param.issueId, + param.include, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getIssue(responseContext); + }); + }); + } + + /** + * Search issues endpoint allows you to programmatically search for issues within your organization. This endpoint returns a list of issues that match a given search query, following the event search syntax. The search results are limited to a maximum of 100 issues per request. + * @param param The request object + */ + public searchIssues( + param: ErrorTrackingApiSearchIssuesRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.searchIssues( + param.body, + param.include, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.searchIssues(responseContext); + }); + }); + } + + /** + * Update the assignee of an issue by `issue_id`. + * @param param The request object + */ + public updateIssueAssignee( + param: ErrorTrackingApiUpdateIssueAssigneeRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateIssueAssignee( + param.issueId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIssueAssignee(responseContext); + }); + }); + } + + /** + * Update the state of an issue by `issue_id`. Use this endpoint to move an issue between states such as `OPEN`, `RESOLVED`, or `IGNORED`. + * @param param The request object + */ + public updateIssueState( + param: ErrorTrackingApiUpdateIssueStateRequest, + options?: Configuration, + ): Promise { + const requestContextPromise = this.requestFactory.updateIssueState( + param.issueId, + param.body, + options, + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIssueState(responseContext); + }); + }); + } +} diff --git a/services/error_tracking/src/v2/index.ts b/services/error_tracking/src/v2/index.ts new file mode 100644 index 000000000000..0d22b9f98ad9 --- /dev/null +++ b/services/error_tracking/src/v2/index.ts @@ -0,0 +1,79 @@ +export { + ErrorTrackingApiGetIssueRequest, + ErrorTrackingApiSearchIssuesRequest, + ErrorTrackingApiUpdateIssueAssigneeRequest, + ErrorTrackingApiUpdateIssueStateRequest, + ErrorTrackingApi, +} from "./ErrorTrackingApi"; + +export { APIErrorResponse } from "./models/APIErrorResponse"; +export { Case } from "./models/Case"; +export { Case3rdPartyTicketStatus } from "./models/Case3rdPartyTicketStatus"; +export { CaseAttributes } from "./models/CaseAttributes"; +export { CasePriority } from "./models/CasePriority"; +export { CaseRelationships } from "./models/CaseRelationships"; +export { CaseResourceType } from "./models/CaseResourceType"; +export { CaseStatus } from "./models/CaseStatus"; +export { CaseType } from "./models/CaseType"; +export { GetIssueIncludeQueryParameterItem } from "./models/GetIssueIncludeQueryParameterItem"; +export { Issue } from "./models/Issue"; +export { IssueAssigneeRelationship } from "./models/IssueAssigneeRelationship"; +export { IssueAttributes } from "./models/IssueAttributes"; +export { IssueCase } from "./models/IssueCase"; +export { IssueCaseAttributes } from "./models/IssueCaseAttributes"; +export { IssueCaseInsight } from "./models/IssueCaseInsight"; +export { IssueCaseJiraIssue } from "./models/IssueCaseJiraIssue"; +export { IssueCaseJiraIssueResult } from "./models/IssueCaseJiraIssueResult"; +export { IssueCaseReference } from "./models/IssueCaseReference"; +export { IssueCaseRelationship } from "./models/IssueCaseRelationship"; +export { IssueCaseRelationships } from "./models/IssueCaseRelationships"; +export { IssueCaseResourceType } from "./models/IssueCaseResourceType"; +export { IssueIncluded } from "./models/IssueIncluded"; +export { IssueLanguage } from "./models/IssueLanguage"; +export { IssuePlatform } from "./models/IssuePlatform"; +export { IssueReference } from "./models/IssueReference"; +export { IssueRelationships } from "./models/IssueRelationships"; +export { IssueResponse } from "./models/IssueResponse"; +export { IssuesSearchRequest } from "./models/IssuesSearchRequest"; +export { IssuesSearchRequestData } from "./models/IssuesSearchRequestData"; +export { IssuesSearchRequestDataAttributes } from "./models/IssuesSearchRequestDataAttributes"; +export { IssuesSearchRequestDataAttributesOrderBy } from "./models/IssuesSearchRequestDataAttributesOrderBy"; +export { IssuesSearchRequestDataAttributesPersona } from "./models/IssuesSearchRequestDataAttributesPersona"; +export { IssuesSearchRequestDataAttributesTrack } from "./models/IssuesSearchRequestDataAttributesTrack"; +export { IssuesSearchRequestDataType } from "./models/IssuesSearchRequestDataType"; +export { IssuesSearchResponse } from "./models/IssuesSearchResponse"; +export { IssuesSearchResult } from "./models/IssuesSearchResult"; +export { IssuesSearchResultAttributes } from "./models/IssuesSearchResultAttributes"; +export { IssuesSearchResultIncluded } from "./models/IssuesSearchResultIncluded"; +export { IssuesSearchResultIssueRelationship } from "./models/IssuesSearchResultIssueRelationship"; +export { IssuesSearchResultRelationships } from "./models/IssuesSearchResultRelationships"; +export { IssuesSearchResultType } from "./models/IssuesSearchResultType"; +export { IssueState } from "./models/IssueState"; +export { IssueTeam } from "./models/IssueTeam"; +export { IssueTeamAttributes } from "./models/IssueTeamAttributes"; +export { IssueTeamOwnersRelationship } from "./models/IssueTeamOwnersRelationship"; +export { IssueTeamReference } from "./models/IssueTeamReference"; +export { IssueTeamType } from "./models/IssueTeamType"; +export { IssueType } from "./models/IssueType"; +export { IssueUpdateAssigneeRequest } from "./models/IssueUpdateAssigneeRequest"; +export { IssueUpdateAssigneeRequestData } from "./models/IssueUpdateAssigneeRequestData"; +export { IssueUpdateAssigneeRequestDataType } from "./models/IssueUpdateAssigneeRequestDataType"; +export { IssueUpdateStateRequest } from "./models/IssueUpdateStateRequest"; +export { IssueUpdateStateRequestData } from "./models/IssueUpdateStateRequestData"; +export { IssueUpdateStateRequestDataAttributes } from "./models/IssueUpdateStateRequestDataAttributes"; +export { IssueUpdateStateRequestDataType } from "./models/IssueUpdateStateRequestDataType"; +export { IssueUser } from "./models/IssueUser"; +export { IssueUserAttributes } from "./models/IssueUserAttributes"; +export { IssueUserReference } from "./models/IssueUserReference"; +export { IssueUserType } from "./models/IssueUserType"; +export { JiraIssue } from "./models/JiraIssue"; +export { JiraIssueResult } from "./models/JiraIssueResult"; +export { NullableUserRelationship } from "./models/NullableUserRelationship"; +export { NullableUserRelationshipData } from "./models/NullableUserRelationshipData"; +export { ProjectRelationship } from "./models/ProjectRelationship"; +export { ProjectRelationshipData } from "./models/ProjectRelationshipData"; +export { ProjectResourceType } from "./models/ProjectResourceType"; +export { SearchIssuesIncludeQueryParameterItem } from "./models/SearchIssuesIncludeQueryParameterItem"; +export { ServiceNowTicket } from "./models/ServiceNowTicket"; +export { ServiceNowTicketResult } from "./models/ServiceNowTicketResult"; +export { UserResourceType } from "./models/UserResourceType"; diff --git a/services/error_tracking/src/v2/models/APIErrorResponse.ts b/services/error_tracking/src/v2/models/APIErrorResponse.ts new file mode 100644 index 000000000000..58d6c35b80f0 --- /dev/null +++ b/services/error_tracking/src/v2/models/APIErrorResponse.ts @@ -0,0 +1,45 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * API error response. + */ +export class APIErrorResponse { + /** + * A list of errors. + */ + "errors": 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 = { + errors: { + baseName: "errors", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return APIErrorResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/Case.ts b/services/error_tracking/src/v2/models/Case.ts new file mode 100644 index 000000000000..4128d527a1cd --- /dev/null +++ b/services/error_tracking/src/v2/models/Case.ts @@ -0,0 +1,75 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CaseAttributes } from "./CaseAttributes"; +import { CaseRelationships } from "./CaseRelationships"; +import { CaseResourceType } from "./CaseResourceType"; + +/** + * A case + */ +export class Case { + /** + * Case resource attributes + */ + "attributes": CaseAttributes; + /** + * Case's identifier + */ + "id": string; + /** + * Resources related to a case + */ + "relationships"?: CaseRelationships; + /** + * Case resource type + */ + "type": CaseResourceType; + /** + * 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: "CaseAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + relationships: { + baseName: "relationships", + type: "CaseRelationships", + }, + type: { + baseName: "type", + type: "CaseResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return Case.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/Case3rdPartyTicketStatus.ts b/services/error_tracking/src/v2/models/Case3rdPartyTicketStatus.ts new file mode 100644 index 000000000000..2c32a2d2eb17 --- /dev/null +++ b/services/error_tracking/src/v2/models/Case3rdPartyTicketStatus.ts @@ -0,0 +1,13 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Case status + */ +export type Case3rdPartyTicketStatus = + | typeof IN_PROGRESS + | typeof COMPLETED + | typeof FAILED + | UnparsedObject; +export const IN_PROGRESS = "IN_PROGRESS"; +export const COMPLETED = "COMPLETED"; +export const FAILED = "FAILED"; diff --git a/services/error_tracking/src/v2/models/CaseAttributes.ts b/services/error_tracking/src/v2/models/CaseAttributes.ts new file mode 100644 index 000000000000..05e474388f78 --- /dev/null +++ b/services/error_tracking/src/v2/models/CaseAttributes.ts @@ -0,0 +1,150 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CasePriority } from "./CasePriority"; +import { CaseStatus } from "./CaseStatus"; +import { CaseType } from "./CaseType"; +import { JiraIssue } from "./JiraIssue"; +import { ServiceNowTicket } from "./ServiceNowTicket"; + +/** + * Case resource attributes + */ +export class CaseAttributes { + /** + * Timestamp of when the case was archived + */ + "archivedAt"?: Date; + /** + * The definition of `CaseObjectAttributes` object. + */ + "attributes"?: { [key: string]: Array }; + /** + * Timestamp of when the case was closed + */ + "closedAt"?: Date; + /** + * Timestamp of when the case was created + */ + "createdAt"?: Date; + /** + * Description + */ + "description"?: string; + /** + * Jira issue attached to case + */ + "jiraIssue"?: JiraIssue; + /** + * Key + */ + "key"?: string; + /** + * Timestamp of when the case was last modified + */ + "modifiedAt"?: Date; + /** + * Case priority + */ + "priority"?: CasePriority; + /** + * ServiceNow ticket attached to case + */ + "serviceNowTicket"?: ServiceNowTicket; + /** + * Case status + */ + "status"?: CaseStatus; + /** + * Title + */ + "title"?: string; + /** + * Case type + */ + "type"?: CaseType; + /** + * 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 = { + archivedAt: { + baseName: "archived_at", + type: "Date", + format: "date-time", + }, + attributes: { + baseName: "attributes", + type: "{ [key: string]: Array; }", + }, + closedAt: { + baseName: "closed_at", + type: "Date", + format: "date-time", + }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + description: { + baseName: "description", + type: "string", + }, + jiraIssue: { + baseName: "jira_issue", + type: "JiraIssue", + }, + key: { + baseName: "key", + type: "string", + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + format: "date-time", + }, + priority: { + baseName: "priority", + type: "CasePriority", + }, + serviceNowTicket: { + baseName: "service_now_ticket", + type: "ServiceNowTicket", + }, + status: { + baseName: "status", + type: "CaseStatus", + }, + title: { + baseName: "title", + type: "string", + }, + type: { + baseName: "type", + type: "CaseType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/CasePriority.ts b/services/error_tracking/src/v2/models/CasePriority.ts new file mode 100644 index 000000000000..92beb2f7f63b --- /dev/null +++ b/services/error_tracking/src/v2/models/CasePriority.ts @@ -0,0 +1,19 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Case priority + */ +export type CasePriority = + | typeof NOT_DEFINED + | typeof P1 + | typeof P2 + | typeof P3 + | typeof P4 + | typeof P5 + | UnparsedObject; +export const NOT_DEFINED = "NOT_DEFINED"; +export const P1 = "P1"; +export const P2 = "P2"; +export const P3 = "P3"; +export const P4 = "P4"; +export const P5 = "P5"; diff --git a/services/error_tracking/src/v2/models/CaseRelationships.ts b/services/error_tracking/src/v2/models/CaseRelationships.ts new file mode 100644 index 000000000000..63acf85294cc --- /dev/null +++ b/services/error_tracking/src/v2/models/CaseRelationships.ts @@ -0,0 +1,71 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { NullableUserRelationship } from "./NullableUserRelationship"; +import { ProjectRelationship } from "./ProjectRelationship"; + +/** + * Resources related to a case + */ +export class CaseRelationships { + /** + * Relationship to user. + */ + "assignee"?: NullableUserRelationship; + /** + * Relationship to user. + */ + "createdBy"?: NullableUserRelationship; + /** + * Relationship to user. + */ + "modifiedBy"?: NullableUserRelationship; + /** + * Relationship to project + */ + "project"?: ProjectRelationship; + /** + * 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 = { + assignee: { + baseName: "assignee", + type: "NullableUserRelationship", + }, + createdBy: { + baseName: "created_by", + type: "NullableUserRelationship", + }, + modifiedBy: { + baseName: "modified_by", + type: "NullableUserRelationship", + }, + project: { + baseName: "project", + type: "ProjectRelationship", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/CaseResourceType.ts b/services/error_tracking/src/v2/models/CaseResourceType.ts new file mode 100644 index 000000000000..23d8c509f171 --- /dev/null +++ b/services/error_tracking/src/v2/models/CaseResourceType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Case resource type + */ +export type CaseResourceType = typeof CASE | UnparsedObject; +export const CASE = "case"; diff --git a/services/error_tracking/src/v2/models/CaseStatus.ts b/services/error_tracking/src/v2/models/CaseStatus.ts new file mode 100644 index 000000000000..70e3d41566a3 --- /dev/null +++ b/services/error_tracking/src/v2/models/CaseStatus.ts @@ -0,0 +1,13 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Case status + */ +export type CaseStatus = + | typeof OPEN + | typeof IN_PROGRESS + | typeof CLOSED + | UnparsedObject; +export const OPEN = "OPEN"; +export const IN_PROGRESS = "IN_PROGRESS"; +export const CLOSED = "CLOSED"; diff --git a/services/error_tracking/src/v2/models/CaseType.ts b/services/error_tracking/src/v2/models/CaseType.ts new file mode 100644 index 000000000000..1539e83d50f1 --- /dev/null +++ b/services/error_tracking/src/v2/models/CaseType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Case type + */ +export type CaseType = typeof STANDARD | UnparsedObject; +export const STANDARD = "STANDARD"; diff --git a/services/error_tracking/src/v2/models/GetIssueIncludeQueryParameterItem.ts b/services/error_tracking/src/v2/models/GetIssueIncludeQueryParameterItem.ts new file mode 100644 index 000000000000..1a37cd855a29 --- /dev/null +++ b/services/error_tracking/src/v2/models/GetIssueIncludeQueryParameterItem.ts @@ -0,0 +1,13 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Relationship object that should be included in the response. + */ +export type GetIssueIncludeQueryParameterItem = + | typeof ASSIGNEE + | typeof CASE + | typeof TEAM_OWNERS + | UnparsedObject; +export const ASSIGNEE = "assignee"; +export const CASE = "case"; +export const TEAM_OWNERS = "team_owners"; diff --git a/services/error_tracking/src/v2/models/Issue.ts b/services/error_tracking/src/v2/models/Issue.ts new file mode 100644 index 000000000000..42a001d66ee4 --- /dev/null +++ b/services/error_tracking/src/v2/models/Issue.ts @@ -0,0 +1,75 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueAttributes } from "./IssueAttributes"; +import { IssueRelationships } from "./IssueRelationships"; +import { IssueType } from "./IssueType"; + +/** + * The issue matching the request. + */ +export class Issue { + /** + * Object containing the information of an issue. + */ + "attributes": IssueAttributes; + /** + * Issue identifier. + */ + "id": string; + /** + * Relationship between the issue and an assignee, case and/or teams. + */ + "relationships"?: IssueRelationships; + /** + * Type of the object. + */ + "type": IssueType; + /** + * 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: "IssueAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + relationships: { + baseName: "relationships", + type: "IssueRelationships", + }, + type: { + baseName: "type", + type: "IssueType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return Issue.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueAssigneeRelationship.ts b/services/error_tracking/src/v2/models/IssueAssigneeRelationship.ts new file mode 100644 index 000000000000..766d5cae40f6 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueAssigneeRelationship.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueUserReference } from "./IssueUserReference"; + +/** + * Relationship between the issue and assignee. + */ +export class IssueAssigneeRelationship { + /** + * The user the issue is assigned to. + */ + "data": IssueUserReference; + /** + * 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: "IssueUserReference", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueAssigneeRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueAttributes.ts b/services/error_tracking/src/v2/models/IssueAttributes.ts new file mode 100644 index 000000000000..e1caff0ed298 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueAttributes.ts @@ -0,0 +1,146 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueLanguage } from "./IssueLanguage"; +import { IssuePlatform } from "./IssuePlatform"; +import { IssueState } from "./IssueState"; + +/** + * Object containing the information of an issue. + */ +export class IssueAttributes { + /** + * Error message associated with the issue. + */ + "errorMessage"?: string; + /** + * Type of the error that matches the issue. + */ + "errorType"?: string; + /** + * Path of the file where the issue occurred. + */ + "filePath"?: string; + /** + * Timestamp of the first seen error in milliseconds since the Unix epoch. + */ + "firstSeen"?: number; + /** + * The application version (for example, git commit hash) where the issue was first observed. + */ + "firstSeenVersion"?: string; + /** + * Name of the function where the issue occurred. + */ + "functionName"?: string; + /** + * Error is a crash. + */ + "isCrash"?: boolean; + /** + * Array of programming languages associated with the issue. + */ + "languages"?: Array; + /** + * Timestamp of the last seen error in milliseconds since the Unix epoch. + */ + "lastSeen"?: number; + /** + * The application version (for example, git commit hash) where the issue was last observed. + */ + "lastSeenVersion"?: string; + /** + * Platform associated with the issue. + */ + "platform"?: IssuePlatform; + /** + * Service name. + */ + "service"?: string; + /** + * State of the issue + */ + "state"?: IssueState; + /** + * 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 = { + errorMessage: { + baseName: "error_message", + type: "string", + }, + errorType: { + baseName: "error_type", + type: "string", + }, + filePath: { + baseName: "file_path", + type: "string", + }, + firstSeen: { + baseName: "first_seen", + type: "number", + format: "int64", + }, + firstSeenVersion: { + baseName: "first_seen_version", + type: "string", + }, + functionName: { + baseName: "function_name", + type: "string", + }, + isCrash: { + baseName: "is_crash", + type: "boolean", + }, + languages: { + baseName: "languages", + type: "Array", + }, + lastSeen: { + baseName: "last_seen", + type: "number", + format: "int64", + }, + lastSeenVersion: { + baseName: "last_seen_version", + type: "string", + }, + platform: { + baseName: "platform", + type: "IssuePlatform", + }, + service: { + baseName: "service", + type: "string", + }, + state: { + baseName: "state", + type: "IssueState", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueCase.ts b/services/error_tracking/src/v2/models/IssueCase.ts new file mode 100644 index 000000000000..fa5084386149 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueCase.ts @@ -0,0 +1,75 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueCaseAttributes } from "./IssueCaseAttributes"; +import { IssueCaseRelationships } from "./IssueCaseRelationships"; +import { IssueCaseResourceType } from "./IssueCaseResourceType"; + +/** + * The case attached to the issue. + */ +export class IssueCase { + /** + * Object containing the information of a case. + */ + "attributes": IssueCaseAttributes; + /** + * Case identifier. + */ + "id": string; + /** + * Resources related to a case. + */ + "relationships"?: IssueCaseRelationships; + /** + * Type of the object. + */ + "type": IssueCaseResourceType; + /** + * 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: "IssueCaseAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + relationships: { + baseName: "relationships", + type: "IssueCaseRelationships", + }, + type: { + baseName: "type", + type: "IssueCaseResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueCase.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueCaseAttributes.ts b/services/error_tracking/src/v2/models/IssueCaseAttributes.ts new file mode 100644 index 000000000000..9795a72327e8 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueCaseAttributes.ts @@ -0,0 +1,157 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { CasePriority } from "./CasePriority"; +import { CaseStatus } from "./CaseStatus"; +import { IssueCaseInsight } from "./IssueCaseInsight"; +import { IssueCaseJiraIssue } from "./IssueCaseJiraIssue"; + +/** + * Object containing the information of a case. + */ +export class IssueCaseAttributes { + /** + * Timestamp of when the case was archived. + */ + "archivedAt"?: Date; + /** + * Timestamp of when the case was closed. + */ + "closedAt"?: Date; + /** + * Timestamp of when the case was created. + */ + "createdAt"?: Date; + /** + * Source of the case creation. + */ + "creationSource"?: string; + /** + * Description of the case. + */ + "description"?: string; + /** + * Due date of the case. + */ + "dueDate"?: string; + /** + * Insights of the case. + */ + "insights"?: Array; + /** + * Jira issue of the case. + */ + "jiraIssue"?: IssueCaseJiraIssue; + /** + * Key of the case. + */ + "key"?: string; + /** + * Timestamp of when the case was last modified. + */ + "modifiedAt"?: Date; + /** + * Case priority + */ + "priority"?: CasePriority; + /** + * Case status + */ + "status"?: CaseStatus; + /** + * Title of the case. + */ + "title"?: string; + /** + * Type of the case. + */ + "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 = { + archivedAt: { + baseName: "archived_at", + type: "Date", + format: "date-time", + }, + closedAt: { + baseName: "closed_at", + type: "Date", + format: "date-time", + }, + createdAt: { + baseName: "created_at", + type: "Date", + format: "date-time", + }, + creationSource: { + baseName: "creation_source", + type: "string", + }, + description: { + baseName: "description", + type: "string", + }, + dueDate: { + baseName: "due_date", + type: "string", + }, + insights: { + baseName: "insights", + type: "Array", + }, + jiraIssue: { + baseName: "jira_issue", + type: "IssueCaseJiraIssue", + }, + key: { + baseName: "key", + type: "string", + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + format: "date-time", + }, + priority: { + baseName: "priority", + type: "CasePriority", + }, + status: { + baseName: "status", + type: "CaseStatus", + }, + title: { + baseName: "title", + type: "string", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueCaseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueCaseInsight.ts b/services/error_tracking/src/v2/models/IssueCaseInsight.ts new file mode 100644 index 000000000000..2ee852244561 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueCaseInsight.ts @@ -0,0 +1,60 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Insight of the case. + */ +export class IssueCaseInsight { + /** + * Reference of the insight. + */ + "ref"?: string; + /** + * Insight identifier. + */ + "resourceId"?: string; + /** + * Type of the insight. + */ + "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 = { + ref: { + baseName: "ref", + type: "string", + }, + resourceId: { + baseName: "resource_id", + type: "string", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueCaseInsight.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueCaseJiraIssue.ts b/services/error_tracking/src/v2/models/IssueCaseJiraIssue.ts new file mode 100644 index 000000000000..45bcbf7b1572 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueCaseJiraIssue.ts @@ -0,0 +1,54 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueCaseJiraIssueResult } from "./IssueCaseJiraIssueResult"; + +/** + * Jira issue of the case. + */ +export class IssueCaseJiraIssue { + /** + * Contains the identifiers and URL for a successfully created Jira issue. + */ + "result"?: IssueCaseJiraIssueResult; + /** + * Creation status of the Jira issue. + */ + "status"?: 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 = { + result: { + baseName: "result", + type: "IssueCaseJiraIssueResult", + }, + status: { + baseName: "status", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueCaseJiraIssue.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueCaseJiraIssueResult.ts b/services/error_tracking/src/v2/models/IssueCaseJiraIssueResult.ts new file mode 100644 index 000000000000..5920d7fad8f3 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueCaseJiraIssueResult.ts @@ -0,0 +1,68 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Contains the identifiers and URL for a successfully created Jira issue. + */ +export class IssueCaseJiraIssueResult { + /** + * Jira issue identifier. + */ + "issueId"?: string; + /** + * Jira issue key. + */ + "issueKey"?: string; + /** + * Jira issue URL. + */ + "issueUrl"?: string; + /** + * Jira project key. + */ + "projectKey"?: 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 = { + issueId: { + baseName: "issue_id", + type: "string", + }, + issueKey: { + baseName: "issue_key", + type: "string", + }, + issueUrl: { + baseName: "issue_url", + type: "string", + }, + projectKey: { + baseName: "project_key", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueCaseJiraIssueResult.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueCaseReference.ts b/services/error_tracking/src/v2/models/IssueCaseReference.ts new file mode 100644 index 000000000000..b22c31b591ab --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueCaseReference.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueCaseResourceType } from "./IssueCaseResourceType"; + +/** + * The case the issue is attached to. + */ +export class IssueCaseReference { + /** + * Case identifier. + */ + "id": string; + /** + * Type of the object. + */ + "type": IssueCaseResourceType; + /** + * 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: "IssueCaseResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueCaseReference.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueCaseRelationship.ts b/services/error_tracking/src/v2/models/IssueCaseRelationship.ts new file mode 100644 index 000000000000..0184e0d913a8 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueCaseRelationship.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueCaseReference } from "./IssueCaseReference"; + +/** + * Relationship between the issue and case. + */ +export class IssueCaseRelationship { + /** + * The case the issue is attached to. + */ + "data": IssueCaseReference; + /** + * 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: "IssueCaseReference", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueCaseRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueCaseRelationships.ts b/services/error_tracking/src/v2/models/IssueCaseRelationships.ts new file mode 100644 index 000000000000..df9f44e67094 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueCaseRelationships.ts @@ -0,0 +1,71 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { NullableUserRelationship } from "./NullableUserRelationship"; +import { ProjectRelationship } from "./ProjectRelationship"; + +/** + * Resources related to a case. + */ +export class IssueCaseRelationships { + /** + * Relationship to user. + */ + "assignee"?: NullableUserRelationship; + /** + * Relationship to user. + */ + "createdBy"?: NullableUserRelationship; + /** + * Relationship to user. + */ + "modifiedBy"?: NullableUserRelationship; + /** + * Relationship to project + */ + "project"?: ProjectRelationship; + /** + * 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 = { + assignee: { + baseName: "assignee", + type: "NullableUserRelationship", + }, + createdBy: { + baseName: "created_by", + type: "NullableUserRelationship", + }, + modifiedBy: { + baseName: "modified_by", + type: "NullableUserRelationship", + }, + project: { + baseName: "project", + type: "ProjectRelationship", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueCaseRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueCaseResourceType.ts b/services/error_tracking/src/v2/models/IssueCaseResourceType.ts new file mode 100644 index 000000000000..40ccd136c5b3 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueCaseResourceType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Type of the object. + */ +export type IssueCaseResourceType = typeof CASE | UnparsedObject; +export const CASE = "case"; diff --git a/services/error_tracking/src/v2/models/IssueIncluded.ts b/services/error_tracking/src/v2/models/IssueIncluded.ts new file mode 100644 index 000000000000..e14cd5431f53 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueIncluded.ts @@ -0,0 +1,10 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +import { IssueCase } from "./IssueCase"; +import { IssueTeam } from "./IssueTeam"; +import { IssueUser } from "./IssueUser"; + +/** + * An array of related resources, returned when the `include` query parameter is used. + */ +export type IssueIncluded = IssueCase | IssueUser | IssueTeam | UnparsedObject; diff --git a/services/error_tracking/src/v2/models/IssueLanguage.ts b/services/error_tracking/src/v2/models/IssueLanguage.ts new file mode 100644 index 000000000000..4e286b1bcd05 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueLanguage.ts @@ -0,0 +1,61 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Programming language associated with the issue. + */ +export type IssueLanguage = + | typeof BRIGHTSCRIPT + | typeof C + | typeof C_PLUS_PLUS + | typeof C_SHARP + | typeof CLOJURE + | typeof DOT_NET + | typeof ELIXIR + | typeof ERLANG + | typeof GO + | typeof GROOVY + | typeof HASKELL + | typeof HCL + | typeof JAVA + | typeof JAVASCRIPT + | typeof JVM + | typeof KOTLIN + | typeof OBJECTIVE_C + | typeof PERL + | typeof PHP + | typeof PYTHON + | typeof RUBY + | typeof RUST + | typeof SCALA + | typeof SWIFT + | typeof TERRAFORM + | typeof TYPESCRIPT + | typeof UNKNOWN + | UnparsedObject; +export const BRIGHTSCRIPT = "BRIGHTSCRIPT"; +export const C = "C"; +export const C_PLUS_PLUS = "C_PLUS_PLUS"; +export const C_SHARP = "C_SHARP"; +export const CLOJURE = "CLOJURE"; +export const DOT_NET = "DOT_NET"; +export const ELIXIR = "ELIXIR"; +export const ERLANG = "ERLANG"; +export const GO = "GO"; +export const GROOVY = "GROOVY"; +export const HASKELL = "HASKELL"; +export const HCL = "HCL"; +export const JAVA = "JAVA"; +export const JAVASCRIPT = "JAVASCRIPT"; +export const JVM = "JVM"; +export const KOTLIN = "KOTLIN"; +export const OBJECTIVE_C = "OBJECTIVE_C"; +export const PERL = "PERL"; +export const PHP = "PHP"; +export const PYTHON = "PYTHON"; +export const RUBY = "RUBY"; +export const RUST = "RUST"; +export const SCALA = "SCALA"; +export const SWIFT = "SWIFT"; +export const TERRAFORM = "TERRAFORM"; +export const TYPESCRIPT = "TYPESCRIPT"; +export const UNKNOWN = "UNKNOWN"; diff --git a/services/error_tracking/src/v2/models/IssuePlatform.ts b/services/error_tracking/src/v2/models/IssuePlatform.ts new file mode 100644 index 000000000000..175217089647 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuePlatform.ts @@ -0,0 +1,23 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Platform associated with the issue. + */ +export type IssuePlatform = + | typeof ANDROID + | typeof BACKEND + | typeof BROWSER + | typeof FLUTTER + | typeof IOS + | typeof REACT_NATIVE + | typeof ROKU + | typeof UNKNOWN + | UnparsedObject; +export const ANDROID = "ANDROID"; +export const BACKEND = "BACKEND"; +export const BROWSER = "BROWSER"; +export const FLUTTER = "FLUTTER"; +export const IOS = "IOS"; +export const REACT_NATIVE = "REACT_NATIVE"; +export const ROKU = "ROKU"; +export const UNKNOWN = "UNKNOWN"; diff --git a/services/error_tracking/src/v2/models/IssueReference.ts b/services/error_tracking/src/v2/models/IssueReference.ts new file mode 100644 index 000000000000..4f8b2074e8b9 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueReference.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueType } from "./IssueType"; + +/** + * The issue the search result corresponds to. + */ +export class IssueReference { + /** + * Issue identifier. + */ + "id": string; + /** + * Type of the object. + */ + "type": IssueType; + /** + * 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: "IssueType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueReference.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueRelationships.ts b/services/error_tracking/src/v2/models/IssueRelationships.ts new file mode 100644 index 000000000000..cca4516bc7f1 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueRelationships.ts @@ -0,0 +1,64 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueAssigneeRelationship } from "./IssueAssigneeRelationship"; +import { IssueCaseRelationship } from "./IssueCaseRelationship"; +import { IssueTeamOwnersRelationship } from "./IssueTeamOwnersRelationship"; + +/** + * Relationship between the issue and an assignee, case and/or teams. + */ +export class IssueRelationships { + /** + * Relationship between the issue and assignee. + */ + "assignee"?: IssueAssigneeRelationship; + /** + * Relationship between the issue and case. + */ + "_case"?: IssueCaseRelationship; + /** + * Relationship between the issue and teams. + */ + "teamOwners"?: IssueTeamOwnersRelationship; + /** + * 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 = { + assignee: { + baseName: "assignee", + type: "IssueAssigneeRelationship", + }, + _case: { + baseName: "case", + type: "IssueCaseRelationship", + }, + teamOwners: { + baseName: "team_owners", + type: "IssueTeamOwnersRelationship", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueResponse.ts b/services/error_tracking/src/v2/models/IssueResponse.ts new file mode 100644 index 000000000000..d02a40af43f0 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueResponse.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { Issue } from "./Issue"; +import { IssueIncluded } from "./IssueIncluded"; + +/** + * Response containing error tracking issue data. + */ +export class IssueResponse { + /** + * The issue matching the request. + */ + "data"?: Issue; + /** + * Array of resources related to the issue. + */ + "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: "Issue", + }, + included: { + baseName: "included", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueState.ts b/services/error_tracking/src/v2/models/IssueState.ts new file mode 100644 index 000000000000..e561b8e349eb --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueState.ts @@ -0,0 +1,17 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * State of the issue + */ +export type IssueState = + | typeof OPEN + | typeof ACKNOWLEDGED + | typeof RESOLVED + | typeof IGNORED + | typeof EXCLUDED + | UnparsedObject; +export const OPEN = "OPEN"; +export const ACKNOWLEDGED = "ACKNOWLEDGED"; +export const RESOLVED = "RESOLVED"; +export const IGNORED = "IGNORED"; +export const EXCLUDED = "EXCLUDED"; diff --git a/services/error_tracking/src/v2/models/IssueTeam.ts b/services/error_tracking/src/v2/models/IssueTeam.ts new file mode 100644 index 000000000000..e4e71e9fd323 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueTeam.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueTeamAttributes } from "./IssueTeamAttributes"; +import { IssueTeamType } from "./IssueTeamType"; + +/** + * A team that owns an issue. + */ +export class IssueTeam { + /** + * Object containing the information of a team. + */ + "attributes": IssueTeamAttributes; + /** + * Team identifier. + */ + "id": string; + /** + * Type of the object. + */ + "type": IssueTeamType; + /** + * 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: "IssueTeamAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IssueTeamType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueTeam.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueTeamAttributes.ts b/services/error_tracking/src/v2/models/IssueTeamAttributes.ts new file mode 100644 index 000000000000..a2d3abca15d4 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueTeamAttributes.ts @@ -0,0 +1,60 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Object containing the information of a team. + */ +export class IssueTeamAttributes { + /** + * The team's identifier. + */ + "handle"?: string; + /** + * The name of the team. + */ + "name"?: string; + /** + * A brief summary of the team, derived from its description. + */ + "summary"?: 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", + }, + summary: { + baseName: "summary", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueTeamAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueTeamOwnersRelationship.ts b/services/error_tracking/src/v2/models/IssueTeamOwnersRelationship.ts new file mode 100644 index 000000000000..9804d9768fb3 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueTeamOwnersRelationship.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueTeamReference } from "./IssueTeamReference"; + +/** + * Relationship between the issue and teams. + */ +export class IssueTeamOwnersRelationship { + /** + * Array of teams that are owners of the issue. + */ + "data": 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: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueTeamOwnersRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueTeamReference.ts b/services/error_tracking/src/v2/models/IssueTeamReference.ts new file mode 100644 index 000000000000..0fde5f3e11e3 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueTeamReference.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueTeamType } from "./IssueTeamType"; + +/** + * A team that owns the issue. + */ +export class IssueTeamReference { + /** + * Team identifier. + */ + "id": string; + /** + * Type of the object. + */ + "type": IssueTeamType; + /** + * 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: "IssueTeamType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueTeamReference.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueTeamType.ts b/services/error_tracking/src/v2/models/IssueTeamType.ts new file mode 100644 index 000000000000..9df4386187fc --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueTeamType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Type of the object. + */ +export type IssueTeamType = typeof TEAM | UnparsedObject; +export const TEAM = "team"; diff --git a/services/error_tracking/src/v2/models/IssueType.ts b/services/error_tracking/src/v2/models/IssueType.ts new file mode 100644 index 000000000000..d8f4f8b033a6 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Type of the object. + */ +export type IssueType = typeof ISSUE | UnparsedObject; +export const ISSUE = "issue"; diff --git a/services/error_tracking/src/v2/models/IssueUpdateAssigneeRequest.ts b/services/error_tracking/src/v2/models/IssueUpdateAssigneeRequest.ts new file mode 100644 index 000000000000..5abe019f7d9c --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUpdateAssigneeRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueUpdateAssigneeRequestData } from "./IssueUpdateAssigneeRequestData"; + +/** + * Update issue assignee request payload. + */ +export class IssueUpdateAssigneeRequest { + /** + * Update issue assignee request. + */ + "data": IssueUpdateAssigneeRequestData; + /** + * 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: "IssueUpdateAssigneeRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueUpdateAssigneeRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueUpdateAssigneeRequestData.ts b/services/error_tracking/src/v2/models/IssueUpdateAssigneeRequestData.ts new file mode 100644 index 000000000000..43649c286bc5 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUpdateAssigneeRequestData.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueUpdateAssigneeRequestDataType } from "./IssueUpdateAssigneeRequestDataType"; + +/** + * Update issue assignee request. + */ +export class IssueUpdateAssigneeRequestData { + /** + * User identifier. + */ + "id": string; + /** + * Type of the object. + */ + "type": IssueUpdateAssigneeRequestDataType; + /** + * 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: "IssueUpdateAssigneeRequestDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueUpdateAssigneeRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueUpdateAssigneeRequestDataType.ts b/services/error_tracking/src/v2/models/IssueUpdateAssigneeRequestDataType.ts new file mode 100644 index 000000000000..249cb5e12ceb --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUpdateAssigneeRequestDataType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Type of the object. + */ +export type IssueUpdateAssigneeRequestDataType = + | typeof ASSIGNEE + | UnparsedObject; +export const ASSIGNEE = "assignee"; diff --git a/services/error_tracking/src/v2/models/IssueUpdateStateRequest.ts b/services/error_tracking/src/v2/models/IssueUpdateStateRequest.ts new file mode 100644 index 000000000000..7b9081c0bde5 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUpdateStateRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueUpdateStateRequestData } from "./IssueUpdateStateRequestData"; + +/** + * Update issue state request payload. + */ +export class IssueUpdateStateRequest { + /** + * Update issue state request. + */ + "data": IssueUpdateStateRequestData; + /** + * 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: "IssueUpdateStateRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueUpdateStateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueUpdateStateRequestData.ts b/services/error_tracking/src/v2/models/IssueUpdateStateRequestData.ts new file mode 100644 index 000000000000..362ffc779627 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUpdateStateRequestData.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueUpdateStateRequestDataAttributes } from "./IssueUpdateStateRequestDataAttributes"; +import { IssueUpdateStateRequestDataType } from "./IssueUpdateStateRequestDataType"; + +/** + * Update issue state request. + */ +export class IssueUpdateStateRequestData { + /** + * Object describing an issue state update request. + */ + "attributes": IssueUpdateStateRequestDataAttributes; + /** + * Issue identifier. + */ + "id": string; + /** + * Type of the object. + */ + "type": IssueUpdateStateRequestDataType; + /** + * 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: "IssueUpdateStateRequestDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IssueUpdateStateRequestDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueUpdateStateRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueUpdateStateRequestDataAttributes.ts b/services/error_tracking/src/v2/models/IssueUpdateStateRequestDataAttributes.ts new file mode 100644 index 000000000000..a266d4319b95 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUpdateStateRequestDataAttributes.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueState } from "./IssueState"; + +/** + * Object describing an issue state update request. + */ +export class IssueUpdateStateRequestDataAttributes { + /** + * State of the issue + */ + "state": IssueState; + /** + * 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 = { + state: { + baseName: "state", + type: "IssueState", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueUpdateStateRequestDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueUpdateStateRequestDataType.ts b/services/error_tracking/src/v2/models/IssueUpdateStateRequestDataType.ts new file mode 100644 index 000000000000..69b69c94dfee --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUpdateStateRequestDataType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Type of the object. + */ +export type IssueUpdateStateRequestDataType = + | typeof ERROR_TRACKING_ISSUE + | UnparsedObject; +export const ERROR_TRACKING_ISSUE = "error_tracking_issue"; diff --git a/services/error_tracking/src/v2/models/IssueUser.ts b/services/error_tracking/src/v2/models/IssueUser.ts new file mode 100644 index 000000000000..06dbcb96dcb9 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUser.ts @@ -0,0 +1,66 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueUserAttributes } from "./IssueUserAttributes"; +import { IssueUserType } from "./IssueUserType"; + +/** + * The user to whom the issue is assigned. + */ +export class IssueUser { + /** + * Object containing the information of a user. + */ + "attributes": IssueUserAttributes; + /** + * User identifier. + */ + "id": string; + /** + * Type of the object + */ + "type": IssueUserType; + /** + * 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: "IssueUserAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IssueUserType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueUser.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueUserAttributes.ts b/services/error_tracking/src/v2/models/IssueUserAttributes.ts new file mode 100644 index 000000000000..13d1eb6179cf --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUserAttributes.ts @@ -0,0 +1,60 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Object containing the information of a user. + */ +export class IssueUserAttributes { + /** + * Email of the user. + */ + "email"?: string; + /** + * Handle of the user. + */ + "handle"?: string; + /** + * 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 = { + email: { + baseName: "email", + type: "string", + }, + handle: { + baseName: "handle", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueUserAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueUserReference.ts b/services/error_tracking/src/v2/models/IssueUserReference.ts new file mode 100644 index 000000000000..be41d3607658 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUserReference.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueUserType } from "./IssueUserType"; + +/** + * The user the issue is assigned to. + */ +export class IssueUserReference { + /** + * User identifier. + */ + "id": string; + /** + * Type of the object + */ + "type": IssueUserType; + /** + * 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: "IssueUserType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssueUserReference.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssueUserType.ts b/services/error_tracking/src/v2/models/IssueUserType.ts new file mode 100644 index 000000000000..f4ad3aa6d8bc --- /dev/null +++ b/services/error_tracking/src/v2/models/IssueUserType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Type of the object + */ +export type IssueUserType = typeof USER | UnparsedObject; +export const USER = "user"; diff --git a/services/error_tracking/src/v2/models/IssuesSearchRequest.ts b/services/error_tracking/src/v2/models/IssuesSearchRequest.ts new file mode 100644 index 000000000000..9da1b3b13e5e --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchRequest.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssuesSearchRequestData } from "./IssuesSearchRequestData"; + +/** + * Search issues request payload. + */ +export class IssuesSearchRequest { + /** + * Search issues request. + */ + "data": IssuesSearchRequestData; + /** + * 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: "IssuesSearchRequestData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssuesSearchRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssuesSearchRequestData.ts b/services/error_tracking/src/v2/models/IssuesSearchRequestData.ts new file mode 100644 index 000000000000..4f96af7b18c7 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchRequestData.ts @@ -0,0 +1,57 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssuesSearchRequestDataAttributes } from "./IssuesSearchRequestDataAttributes"; +import { IssuesSearchRequestDataType } from "./IssuesSearchRequestDataType"; + +/** + * Search issues request. + */ +export class IssuesSearchRequestData { + /** + * Object describing a search issue request. + */ + "attributes": IssuesSearchRequestDataAttributes; + /** + * Type of the object. + */ + "type": IssuesSearchRequestDataType; + /** + * 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: "IssuesSearchRequestDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "IssuesSearchRequestDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssuesSearchRequestData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributes.ts b/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributes.ts new file mode 100644 index 000000000000..3dfd13646ea6 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributes.ts @@ -0,0 +1,93 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssuesSearchRequestDataAttributesOrderBy } from "./IssuesSearchRequestDataAttributesOrderBy"; +import { IssuesSearchRequestDataAttributesPersona } from "./IssuesSearchRequestDataAttributesPersona"; +import { IssuesSearchRequestDataAttributesTrack } from "./IssuesSearchRequestDataAttributesTrack"; + +/** + * Object describing a search issue request. + */ +export class IssuesSearchRequestDataAttributes { + /** + * Start date (inclusive) of the query in milliseconds since the Unix epoch. + */ + "from": number; + /** + * The attribute to sort the search results by. + */ + "orderBy"?: IssuesSearchRequestDataAttributesOrderBy; + /** + * Persona for the search. Either track(s) or persona(s) must be specified. + */ + "persona"?: IssuesSearchRequestDataAttributesPersona; + /** + * Search query following the event search syntax. + */ + "query": string; + /** + * End date (exclusive) of the query in milliseconds since the Unix epoch. + */ + "to": number; + /** + * Track of the events to query. Either track(s) or persona(s) must be specified. + */ + "track"?: IssuesSearchRequestDataAttributesTrack; + /** + * 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 = { + from: { + baseName: "from", + type: "number", + required: true, + format: "int64", + }, + orderBy: { + baseName: "order_by", + type: "IssuesSearchRequestDataAttributesOrderBy", + }, + persona: { + baseName: "persona", + type: "IssuesSearchRequestDataAttributesPersona", + }, + query: { + baseName: "query", + type: "string", + required: true, + }, + to: { + baseName: "to", + type: "number", + required: true, + format: "int64", + }, + track: { + baseName: "track", + type: "IssuesSearchRequestDataAttributesTrack", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssuesSearchRequestDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesOrderBy.ts b/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesOrderBy.ts new file mode 100644 index 000000000000..b30a5e2ccc61 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesOrderBy.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * The attribute to sort the search results by. + */ +export type IssuesSearchRequestDataAttributesOrderBy = + | typeof TOTAL_COUNT + | typeof FIRST_SEEN + | typeof IMPACTED_SESSIONS + | typeof PRIORITY + | UnparsedObject; +export const TOTAL_COUNT = "TOTAL_COUNT"; +export const FIRST_SEEN = "FIRST_SEEN"; +export const IMPACTED_SESSIONS = "IMPACTED_SESSIONS"; +export const PRIORITY = "PRIORITY"; diff --git a/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesPersona.ts b/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesPersona.ts new file mode 100644 index 000000000000..f97fc08d41ed --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesPersona.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Persona for the search. Either track(s) or persona(s) must be specified. + */ +export type IssuesSearchRequestDataAttributesPersona = + | typeof ALL + | typeof BROWSER + | typeof MOBILE + | typeof BACKEND + | UnparsedObject; +export const ALL = "ALL"; +export const BROWSER = "BROWSER"; +export const MOBILE = "MOBILE"; +export const BACKEND = "BACKEND"; diff --git a/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesTrack.ts b/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesTrack.ts new file mode 100644 index 000000000000..e1bf74737174 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchRequestDataAttributesTrack.ts @@ -0,0 +1,13 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Track of the events to query. Either track(s) or persona(s) must be specified. + */ +export type IssuesSearchRequestDataAttributesTrack = + | typeof TRACE + | typeof LOGS + | typeof RUM + | UnparsedObject; +export const TRACE = "trace"; +export const LOGS = "logs"; +export const RUM = "rum"; diff --git a/services/error_tracking/src/v2/models/IssuesSearchRequestDataType.ts b/services/error_tracking/src/v2/models/IssuesSearchRequestDataType.ts new file mode 100644 index 000000000000..34f1dfbc0fa0 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchRequestDataType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Type of the object. + */ +export type IssuesSearchRequestDataType = + | typeof SEARCH_REQUEST + | UnparsedObject; +export const SEARCH_REQUEST = "search_request"; diff --git a/services/error_tracking/src/v2/models/IssuesSearchResponse.ts b/services/error_tracking/src/v2/models/IssuesSearchResponse.ts new file mode 100644 index 000000000000..2fe022d5b452 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchResponse.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssuesSearchResult } from "./IssuesSearchResult"; +import { IssuesSearchResultIncluded } from "./IssuesSearchResultIncluded"; + +/** + * Search issues response payload. + */ +export class IssuesSearchResponse { + /** + * Array of results matching the search query. + */ + "data"?: Array; + /** + * Array of resources related to the search results. + */ + "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: "Array", + }, + included: { + baseName: "included", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssuesSearchResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssuesSearchResult.ts b/services/error_tracking/src/v2/models/IssuesSearchResult.ts new file mode 100644 index 000000000000..3d9233576b62 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchResult.ts @@ -0,0 +1,75 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssuesSearchResultAttributes } from "./IssuesSearchResultAttributes"; +import { IssuesSearchResultRelationships } from "./IssuesSearchResultRelationships"; +import { IssuesSearchResultType } from "./IssuesSearchResultType"; + +/** + * Result matching the search query. + */ +export class IssuesSearchResult { + /** + * Object containing the information of a search result. + */ + "attributes": IssuesSearchResultAttributes; + /** + * Search result identifier (matches the nested issue's identifier). + */ + "id": string; + /** + * Relationships between the search result and other resources. + */ + "relationships"?: IssuesSearchResultRelationships; + /** + * Type of the object. + */ + "type": IssuesSearchResultType; + /** + * 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: "IssuesSearchResultAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + relationships: { + baseName: "relationships", + type: "IssuesSearchResultRelationships", + }, + type: { + baseName: "type", + type: "IssuesSearchResultType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssuesSearchResult.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssuesSearchResultAttributes.ts b/services/error_tracking/src/v2/models/IssuesSearchResultAttributes.ts new file mode 100644 index 000000000000..66185fb664da --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchResultAttributes.ts @@ -0,0 +1,63 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Object containing the information of a search result. + */ +export class IssuesSearchResultAttributes { + /** + * Count of sessions impacted by the issue over the queried time window. + */ + "impactedSessions"?: number; + /** + * Count of users impacted by the issue over the queried time window. + */ + "impactedUsers"?: number; + /** + * Total count of errors that match the issue over the queried time window. + */ + "totalCount"?: 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 = { + impactedSessions: { + baseName: "impacted_sessions", + type: "number", + format: "int64", + }, + impactedUsers: { + baseName: "impacted_users", + type: "number", + format: "int64", + }, + totalCount: { + baseName: "total_count", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssuesSearchResultAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssuesSearchResultIncluded.ts b/services/error_tracking/src/v2/models/IssuesSearchResultIncluded.ts new file mode 100644 index 000000000000..909ba23ee1ec --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchResultIncluded.ts @@ -0,0 +1,16 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +import { Case } from "./Case"; +import { Issue } from "./Issue"; +import { IssueTeam } from "./IssueTeam"; +import { IssueUser } from "./IssueUser"; + +/** + * An array of related resources, returned when the `include` query parameter is used. + */ +export type IssuesSearchResultIncluded = + | Issue + | Case + | IssueUser + | IssueTeam + | UnparsedObject; diff --git a/services/error_tracking/src/v2/models/IssuesSearchResultIssueRelationship.ts b/services/error_tracking/src/v2/models/IssuesSearchResultIssueRelationship.ts new file mode 100644 index 000000000000..b04e1ceb0416 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchResultIssueRelationship.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssueReference } from "./IssueReference"; + +/** + * Relationship between the search result and the corresponding issue. + */ +export class IssuesSearchResultIssueRelationship { + /** + * The issue the search result corresponds to. + */ + "data": IssueReference; + /** + * 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: "IssueReference", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssuesSearchResultIssueRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssuesSearchResultRelationships.ts b/services/error_tracking/src/v2/models/IssuesSearchResultRelationships.ts new file mode 100644 index 000000000000..00401e1baa96 --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchResultRelationships.ts @@ -0,0 +1,46 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { IssuesSearchResultIssueRelationship } from "./IssuesSearchResultIssueRelationship"; + +/** + * Relationships between the search result and other resources. + */ +export class IssuesSearchResultRelationships { + /** + * Relationship between the search result and the corresponding issue. + */ + "issue"?: IssuesSearchResultIssueRelationship; + /** + * 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 = { + issue: { + baseName: "issue", + type: "IssuesSearchResultIssueRelationship", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IssuesSearchResultRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/IssuesSearchResultType.ts b/services/error_tracking/src/v2/models/IssuesSearchResultType.ts new file mode 100644 index 000000000000..4037998852ca --- /dev/null +++ b/services/error_tracking/src/v2/models/IssuesSearchResultType.ts @@ -0,0 +1,9 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Type of the object. + */ +export type IssuesSearchResultType = + | typeof ERROR_TRACKING_SEARCH_RESULT + | UnparsedObject; +export const ERROR_TRACKING_SEARCH_RESULT = "error_tracking_search_result"; diff --git a/services/error_tracking/src/v2/models/JiraIssue.ts b/services/error_tracking/src/v2/models/JiraIssue.ts new file mode 100644 index 000000000000..f299491f6064 --- /dev/null +++ b/services/error_tracking/src/v2/models/JiraIssue.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { Case3rdPartyTicketStatus } from "./Case3rdPartyTicketStatus"; +import { JiraIssueResult } from "./JiraIssueResult"; + +/** + * Jira issue attached to case + */ +export class JiraIssue { + /** + * Jira issue information + */ + "result"?: JiraIssueResult; + /** + * Case status + */ + "status"?: Case3rdPartyTicketStatus; + /** + * 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 = { + result: { + baseName: "result", + type: "JiraIssueResult", + }, + status: { + baseName: "status", + type: "Case3rdPartyTicketStatus", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JiraIssue.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/JiraIssueResult.ts b/services/error_tracking/src/v2/models/JiraIssueResult.ts new file mode 100644 index 000000000000..45e05a4cc32c --- /dev/null +++ b/services/error_tracking/src/v2/models/JiraIssueResult.ts @@ -0,0 +1,68 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * Jira issue information + */ +export class JiraIssueResult { + /** + * Jira issue ID + */ + "issueId"?: string; + /** + * Jira issue key + */ + "issueKey"?: string; + /** + * Jira issue URL + */ + "issueUrl"?: string; + /** + * Jira project key + */ + "projectKey"?: 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 = { + issueId: { + baseName: "issue_id", + type: "string", + }, + issueKey: { + baseName: "issue_key", + type: "string", + }, + issueUrl: { + baseName: "issue_url", + type: "string", + }, + projectKey: { + baseName: "project_key", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JiraIssueResult.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/NullableUserRelationship.ts b/services/error_tracking/src/v2/models/NullableUserRelationship.ts new file mode 100644 index 000000000000..8419a639eee9 --- /dev/null +++ b/services/error_tracking/src/v2/models/NullableUserRelationship.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { NullableUserRelationshipData } from "./NullableUserRelationshipData"; + +/** + * Relationship to user. + */ +export class NullableUserRelationship { + /** + * Relationship to user object. + */ + "data": NullableUserRelationshipData | 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 = { + data: { + baseName: "data", + type: "NullableUserRelationshipData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return NullableUserRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/NullableUserRelationshipData.ts b/services/error_tracking/src/v2/models/NullableUserRelationshipData.ts new file mode 100644 index 000000000000..b6d0c30c818d --- /dev/null +++ b/services/error_tracking/src/v2/models/NullableUserRelationshipData.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { UserResourceType } from "./UserResourceType"; + +/** + * Relationship to user object. + */ +export class NullableUserRelationshipData { + /** + * A unique identifier that represents the user. + */ + "id": string; + /** + * User resource type. + */ + "type": UserResourceType; + /** + * 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: "UserResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return NullableUserRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/ProjectRelationship.ts b/services/error_tracking/src/v2/models/ProjectRelationship.ts new file mode 100644 index 000000000000..99a1bb72d1d5 --- /dev/null +++ b/services/error_tracking/src/v2/models/ProjectRelationship.ts @@ -0,0 +1,47 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { ProjectRelationshipData } from "./ProjectRelationshipData"; + +/** + * Relationship to project + */ +export class ProjectRelationship { + /** + * Relationship to project object + */ + "data": ProjectRelationshipData; + /** + * 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: "ProjectRelationshipData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/ProjectRelationshipData.ts b/services/error_tracking/src/v2/models/ProjectRelationshipData.ts new file mode 100644 index 000000000000..b73e2e4d845d --- /dev/null +++ b/services/error_tracking/src/v2/models/ProjectRelationshipData.ts @@ -0,0 +1,56 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { ProjectResourceType } from "./ProjectResourceType"; + +/** + * Relationship to project object + */ +export class ProjectRelationshipData { + /** + * A unique identifier that represents the project + */ + "id": string; + /** + * Project resource type + */ + "type": ProjectResourceType; + /** + * 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: "ProjectResourceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/ProjectResourceType.ts b/services/error_tracking/src/v2/models/ProjectResourceType.ts new file mode 100644 index 000000000000..adc5c09ec874 --- /dev/null +++ b/services/error_tracking/src/v2/models/ProjectResourceType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Project resource type + */ +export type ProjectResourceType = typeof PROJECT | UnparsedObject; +export const PROJECT = "project"; diff --git a/services/error_tracking/src/v2/models/SearchIssuesIncludeQueryParameterItem.ts b/services/error_tracking/src/v2/models/SearchIssuesIncludeQueryParameterItem.ts new file mode 100644 index 000000000000..1cae25062791 --- /dev/null +++ b/services/error_tracking/src/v2/models/SearchIssuesIncludeQueryParameterItem.ts @@ -0,0 +1,15 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * Relationship object that should be included in the search response. + */ +export type SearchIssuesIncludeQueryParameterItem = + | typeof ISSUE + | typeof ISSUE_ASSIGNEE + | typeof ISSUE_CASE + | typeof ISSUE_TEAM_OWNERS + | UnparsedObject; +export const ISSUE = "issue"; +export const ISSUE_ASSIGNEE = "issue.assignee"; +export const ISSUE_CASE = "issue.case"; +export const ISSUE_TEAM_OWNERS = "issue.team_owners"; diff --git a/services/error_tracking/src/v2/models/ServiceNowTicket.ts b/services/error_tracking/src/v2/models/ServiceNowTicket.ts new file mode 100644 index 000000000000..97d9ea29374b --- /dev/null +++ b/services/error_tracking/src/v2/models/ServiceNowTicket.ts @@ -0,0 +1,55 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +import { Case3rdPartyTicketStatus } from "./Case3rdPartyTicketStatus"; +import { ServiceNowTicketResult } from "./ServiceNowTicketResult"; + +/** + * ServiceNow ticket attached to case + */ +export class ServiceNowTicket { + /** + * ServiceNow ticket information + */ + "result"?: ServiceNowTicketResult; + /** + * Case status + */ + "status"?: Case3rdPartyTicketStatus; + /** + * 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 = { + result: { + baseName: "result", + type: "ServiceNowTicketResult", + }, + status: { + baseName: "status", + type: "Case3rdPartyTicketStatus", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ServiceNowTicket.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/ServiceNowTicketResult.ts b/services/error_tracking/src/v2/models/ServiceNowTicketResult.ts new file mode 100644 index 000000000000..e116c2943d85 --- /dev/null +++ b/services/error_tracking/src/v2/models/ServiceNowTicketResult.ts @@ -0,0 +1,44 @@ +import { AttributeTypeMap } from "@datadog/datadog-api-client"; + +/** + * ServiceNow ticket information + */ +export class ServiceNowTicketResult { + /** + * Link to the Incident created on ServiceNow + */ + "sysTargetLink"?: 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 = { + sysTargetLink: { + baseName: "sys_target_link", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ServiceNowTicketResult.attributeTypeMap; + } + + public constructor() {} +} diff --git a/services/error_tracking/src/v2/models/TypingInfo.ts b/services/error_tracking/src/v2/models/TypingInfo.ts new file mode 100644 index 000000000000..7168a1f39051 --- /dev/null +++ b/services/error_tracking/src/v2/models/TypingInfo.ts @@ -0,0 +1,181 @@ +import { ModelTypingInfo } from "@datadog/datadog-api-client"; + +import { APIErrorResponse } from "./APIErrorResponse"; +import { Case } from "./Case"; +import { CaseAttributes } from "./CaseAttributes"; +import { CaseRelationships } from "./CaseRelationships"; +import { Issue } from "./Issue"; +import { IssueAssigneeRelationship } from "./IssueAssigneeRelationship"; +import { IssueAttributes } from "./IssueAttributes"; +import { IssueCase } from "./IssueCase"; +import { IssueCaseAttributes } from "./IssueCaseAttributes"; +import { IssueCaseInsight } from "./IssueCaseInsight"; +import { IssueCaseJiraIssue } from "./IssueCaseJiraIssue"; +import { IssueCaseJiraIssueResult } from "./IssueCaseJiraIssueResult"; +import { IssueCaseReference } from "./IssueCaseReference"; +import { IssueCaseRelationship } from "./IssueCaseRelationship"; +import { IssueCaseRelationships } from "./IssueCaseRelationships"; +import { IssueReference } from "./IssueReference"; +import { IssueRelationships } from "./IssueRelationships"; +import { IssueResponse } from "./IssueResponse"; +import { IssueTeam } from "./IssueTeam"; +import { IssueTeamAttributes } from "./IssueTeamAttributes"; +import { IssueTeamOwnersRelationship } from "./IssueTeamOwnersRelationship"; +import { IssueTeamReference } from "./IssueTeamReference"; +import { IssueUpdateAssigneeRequest } from "./IssueUpdateAssigneeRequest"; +import { IssueUpdateAssigneeRequestData } from "./IssueUpdateAssigneeRequestData"; +import { IssueUpdateStateRequest } from "./IssueUpdateStateRequest"; +import { IssueUpdateStateRequestData } from "./IssueUpdateStateRequestData"; +import { IssueUpdateStateRequestDataAttributes } from "./IssueUpdateStateRequestDataAttributes"; +import { IssueUser } from "./IssueUser"; +import { IssueUserAttributes } from "./IssueUserAttributes"; +import { IssueUserReference } from "./IssueUserReference"; +import { IssuesSearchRequest } from "./IssuesSearchRequest"; +import { IssuesSearchRequestData } from "./IssuesSearchRequestData"; +import { IssuesSearchRequestDataAttributes } from "./IssuesSearchRequestDataAttributes"; +import { IssuesSearchResponse } from "./IssuesSearchResponse"; +import { IssuesSearchResult } from "./IssuesSearchResult"; +import { IssuesSearchResultAttributes } from "./IssuesSearchResultAttributes"; +import { IssuesSearchResultIssueRelationship } from "./IssuesSearchResultIssueRelationship"; +import { IssuesSearchResultRelationships } from "./IssuesSearchResultRelationships"; +import { JiraIssue } from "./JiraIssue"; +import { JiraIssueResult } from "./JiraIssueResult"; +import { NullableUserRelationship } from "./NullableUserRelationship"; +import { NullableUserRelationshipData } from "./NullableUserRelationshipData"; +import { ProjectRelationship } from "./ProjectRelationship"; +import { ProjectRelationshipData } from "./ProjectRelationshipData"; +import { ServiceNowTicket } from "./ServiceNowTicket"; +import { ServiceNowTicketResult } from "./ServiceNowTicketResult"; + +export const TypingInfo: ModelTypingInfo = { + enumsMap: { + Case3rdPartyTicketStatus: ["IN_PROGRESS", "COMPLETED", "FAILED"], + CasePriority: ["NOT_DEFINED", "P1", "P2", "P3", "P4", "P5"], + CaseResourceType: ["case"], + CaseStatus: ["OPEN", "IN_PROGRESS", "CLOSED"], + CaseType: ["STANDARD"], + GetIssueIncludeQueryParameterItem: ["assignee", "case", "team_owners"], + IssueCaseResourceType: ["case"], + IssueLanguage: [ + "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", + ], + IssuePlatform: [ + "ANDROID", + "BACKEND", + "BROWSER", + "FLUTTER", + "IOS", + "REACT_NATIVE", + "ROKU", + "UNKNOWN", + ], + IssueState: ["OPEN", "ACKNOWLEDGED", "RESOLVED", "IGNORED", "EXCLUDED"], + IssueTeamType: ["team"], + IssueType: ["issue"], + IssueUpdateAssigneeRequestDataType: ["assignee"], + IssueUpdateStateRequestDataType: ["error_tracking_issue"], + IssueUserType: ["user"], + IssuesSearchRequestDataAttributesOrderBy: [ + "TOTAL_COUNT", + "FIRST_SEEN", + "IMPACTED_SESSIONS", + "PRIORITY", + ], + IssuesSearchRequestDataAttributesPersona: [ + "ALL", + "BROWSER", + "MOBILE", + "BACKEND", + ], + IssuesSearchRequestDataAttributesTrack: ["trace", "logs", "rum"], + IssuesSearchRequestDataType: ["search_request"], + IssuesSearchResultType: ["error_tracking_search_result"], + ProjectResourceType: ["project"], + SearchIssuesIncludeQueryParameterItem: [ + "issue", + "issue.assignee", + "issue.case", + "issue.team_owners", + ], + UserResourceType: ["user"], + }, + oneOfMap: { + IssueIncluded: ["IssueCase", "IssueUser", "IssueTeam"], + IssuesSearchResultIncluded: ["Issue", "Case", "IssueUser", "IssueTeam"], + }, + typeMap: { + APIErrorResponse: APIErrorResponse, + Case: Case, + CaseAttributes: CaseAttributes, + CaseRelationships: CaseRelationships, + Issue: Issue, + IssueAssigneeRelationship: IssueAssigneeRelationship, + IssueAttributes: IssueAttributes, + IssueCase: IssueCase, + IssueCaseAttributes: IssueCaseAttributes, + IssueCaseInsight: IssueCaseInsight, + IssueCaseJiraIssue: IssueCaseJiraIssue, + IssueCaseJiraIssueResult: IssueCaseJiraIssueResult, + IssueCaseReference: IssueCaseReference, + IssueCaseRelationship: IssueCaseRelationship, + IssueCaseRelationships: IssueCaseRelationships, + IssueReference: IssueReference, + IssueRelationships: IssueRelationships, + IssueResponse: IssueResponse, + IssueTeam: IssueTeam, + IssueTeamAttributes: IssueTeamAttributes, + IssueTeamOwnersRelationship: IssueTeamOwnersRelationship, + IssueTeamReference: IssueTeamReference, + IssueUpdateAssigneeRequest: IssueUpdateAssigneeRequest, + IssueUpdateAssigneeRequestData: IssueUpdateAssigneeRequestData, + IssueUpdateStateRequest: IssueUpdateStateRequest, + IssueUpdateStateRequestData: IssueUpdateStateRequestData, + IssueUpdateStateRequestDataAttributes: + IssueUpdateStateRequestDataAttributes, + IssueUser: IssueUser, + IssueUserAttributes: IssueUserAttributes, + IssueUserReference: IssueUserReference, + IssuesSearchRequest: IssuesSearchRequest, + IssuesSearchRequestData: IssuesSearchRequestData, + IssuesSearchRequestDataAttributes: IssuesSearchRequestDataAttributes, + IssuesSearchResponse: IssuesSearchResponse, + IssuesSearchResult: IssuesSearchResult, + IssuesSearchResultAttributes: IssuesSearchResultAttributes, + IssuesSearchResultIssueRelationship: IssuesSearchResultIssueRelationship, + IssuesSearchResultRelationships: IssuesSearchResultRelationships, + JiraIssue: JiraIssue, + JiraIssueResult: JiraIssueResult, + NullableUserRelationship: NullableUserRelationship, + NullableUserRelationshipData: NullableUserRelationshipData, + ProjectRelationship: ProjectRelationship, + ProjectRelationshipData: ProjectRelationshipData, + ServiceNowTicket: ServiceNowTicket, + ServiceNowTicketResult: ServiceNowTicketResult, + }, +}; diff --git a/services/error_tracking/src/v2/models/UserResourceType.ts b/services/error_tracking/src/v2/models/UserResourceType.ts new file mode 100644 index 000000000000..01b59048e545 --- /dev/null +++ b/services/error_tracking/src/v2/models/UserResourceType.ts @@ -0,0 +1,7 @@ +import { UnparsedObject } from "@datadog/datadog-api-client"; + +/** + * User resource type. + */ +export type UserResourceType = typeof USER | UnparsedObject; +export const USER = "user"; diff --git a/services/error_tracking/tsconfig.json b/services/error_tracking/tsconfig.json new file mode 100644 index 000000000000..d6c32bfb893c --- /dev/null +++ b/services/error_tracking/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "strict": true, + /* Basic Options */ + "target": "es6", + "module": "commonjs", + "moduleResolution": "node", + "declaration": true, + + "esModuleInterop": true, + "resolveJsonModule": true, + + "noImplicitAny": true, + "noImplicitThis": true, + + /* Additional Checks */ + "noUnusedLocals": false /* Report errors on unused locals. */, // TODO: reenable (unused imports!) + "noUnusedParameters": false /* Report errors on unused parameters. */, // TODO: set to true again + "noImplicitReturns": true /* Report error when not all code paths in function return a value. */, + "noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */, + + "sourceMap": true, + "outDir": "./dist", + "lib": ["es6", "es7"] + }, + "exclude": ["dist", "node_modules", "tests"], + "include": ["src"] +} diff --git a/yarn.lock b/yarn.lock index fc15e08208da..149d9cb22b99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -532,6 +532,15 @@ __metadata: languageName: unknown linkType: soft +"@datadog/datadog-api-client-error-tracking@workspace:services/error_tracking": + version: 0.0.0-use.local + resolution: "@datadog/datadog-api-client-error-tracking@workspace:services/error_tracking" + dependencies: + "@datadog/datadog-api-client": "npm:^2.0.0-beta.0" + typescript: "npm:5.8.3" + languageName: unknown + linkType: soft + "@datadog/datadog-api-client-events@workspace:services/events": version: 0.0.0-use.local resolution: "@datadog/datadog-api-client-events@workspace:services/events"