From b72526c7a91358b9683b43d607d0586521a60da5 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 13 Feb 2024 13:00:02 +0000 Subject: [PATCH] Case Management Public API documentation (#1499) Co-authored-by: ci.datadog-api-spec Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 1050 ++++++++++++ .../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 | 157 ++ .../frozen.json | 1 + .../recording.har | 210 +++ .../frozen.json | 1 + .../recording.har | 67 + .../frozen.json | 1 + .../recording.har | 157 ++ .../frozen.json | 1 + .../recording.har | 57 + .../frozen.json | 1 + .../recording.har | 110 ++ .../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 ++ .../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 ++ examples/v2/cases-projects/CreateProject.ts | 29 + examples/v2/cases-projects/DeleteProject.ts | 21 + examples/v2/cases-projects/GetProject.ts | 21 + examples/v2/cases-projects/GetProjects.ts | 17 + examples/v2/cases/ArchiveCase.ts | 29 + examples/v2/cases/AssignCase.ts | 35 + examples/v2/cases/CreateCase.ts | 47 + examples/v2/cases/GetCase.ts | 24 + examples/v2/cases/SearchCases.ts | 17 + examples/v2/cases/SearchCases_3433960044.ts | 18 + examples/v2/cases/UnarchiveCase.ts | 29 + examples/v2/cases/UnassignCase.ts | 29 + examples/v2/cases/UpdatePriority.ts | 32 + examples/v2/cases/UpdateStatus.ts | 32 + features/support/scenarios_model_mapping.ts | 127 ++ features/v2/cases.feature | 241 +++ features/v2/cases_projects.feature | 82 + features/v2/given.json | 13 + features/v2/undo.json | 85 + .../datadog-api-client-v2/apis/CasesApi.ts | 1422 +++++++++++++++++ .../apis/CasesProjectsApi.ts | 525 ++++++ packages/datadog-api-client-v2/index.ts | 68 + packages/datadog-api-client-v2/models/Case.ts | 71 + .../models/Case3rdPartyTicketStatus.ts | 20 + .../models/CaseAssign.ts | 53 + .../models/CaseAssignAttributes.ts | 42 + .../models/CaseAssignRequest.ts | 43 + .../models/CaseAttributes.ts | 138 ++ .../models/CaseCreate.ts | 62 + .../models/CaseCreateAttributes.ts | 69 + .../models/CaseCreateRelationships.ts | 52 + .../models/CaseCreateRequest.ts | 43 + .../datadog-api-client-v2/models/CaseEmpty.ts | 43 + .../models/CaseEmptyRequest.ts | 43 + .../models/CasePriority.ts | 26 + .../models/CaseRelationships.ts | 67 + .../models/CaseResourceType.ts | 14 + .../models/CaseResponse.ts | 42 + .../models/CaseSortableField.ts | 20 + .../models/CaseStatus.ts | 20 + .../datadog-api-client-v2/models/CaseType.ts | 14 + .../models/CaseUpdatePriority.ts | 53 + .../models/CaseUpdatePriorityAttributes.ts | 43 + .../models/CaseUpdatePriorityRequest.ts | 43 + .../models/CaseUpdateStatus.ts | 53 + .../models/CaseUpdateStatusAttributes.ts | 43 + .../models/CaseUpdateStatusRequest.ts | 43 + .../models/CasesResponse.ts | 51 + .../models/CasesResponseMeta.ts | 42 + .../models/CasesResponseMetaPagination.ts | 60 + .../datadog-api-client-v2/models/JiraIssue.ts | 51 + .../models/JiraIssueResult.ts | 65 + .../models/NullableUserRelationship.ts | 43 + .../models/NullableUserRelationshipData.ts | 52 + .../models/ObjectSerializer.ts | 88 + .../datadog-api-client-v2/models/Project.ts | 71 + .../models/ProjectAttributes.ts | 49 + .../models/ProjectCreate.ts | 53 + .../models/ProjectCreateAttributes.ts | 51 + .../models/ProjectCreateRequest.ts | 43 + .../models/ProjectRelationship.ts | 43 + .../models/ProjectRelationshipData.ts | 52 + .../models/ProjectRelationships.ts | 51 + .../models/ProjectResourceType.ts | 14 + .../models/ProjectResponse.ts | 42 + .../models/ProjectsResponse.ts | 42 + .../models/ServiceNowTicket.ts | 51 + .../models/ServiceNowTicketResult.ts | 41 + .../models/UserRelationshipData.ts | 52 + .../models/UserResourceType.ts | 14 + .../models/UsersRelationship.ts | 43 + 117 files changed, 8756 insertions(+), 4 deletions(-) create mode 100644 cassettes/v2/Cases_2740177670/Archive-case-returns-Bad-Request-response_3307115673/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Archive-case-returns-Bad-Request-response_3307115673/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Archive-case-returns-Not-Found-response_3250820290/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Archive-case-returns-Not-Found-response_3250820290/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Archive-case-returns-OK-response_1644289173/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Archive-case-returns-OK-response_1644289173/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Assign-case-returns-Bad-Request-response_1562814608/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Assign-case-returns-Bad-Request-response_1562814608/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Assign-case-returns-Not-Found-response_3693775655/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Assign-case-returns-Not-Found-response_3693775655/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Assign-case-returns-OK-response_198940254/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Assign-case-returns-OK-response_198940254/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Create-a-case-returns-Bad-Request-response_1348998798/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Create-a-case-returns-Bad-Request-response_1348998798/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Create-a-case-returns-CREATED-response_3810133052/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Create-a-case-returns-CREATED-response_3810133052/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-Not-Found-response_3332065607/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-Not-Found-response_3332065607/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-OK-response_1678668670/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-OK-response_1678668670/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Unarchive-case-returns-Bad-Request-response_3573022260/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Unarchive-case-returns-Bad-Request-response_3573022260/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Unarchive-case-returns-Not-Found-response_2591944147/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Unarchive-case-returns-Not-Found-response_2591944147/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Unarchive-case-returns-OK-response_720357866/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Unarchive-case-returns-OK-response_720357866/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Unassign-case-returns-Bad-Request-response_1235480583/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Unassign-case-returns-Bad-Request-response_1235480583/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Unassign-case-returns-Not-Found-response_2139056352/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Unassign-case-returns-Not-Found-response_2139056352/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Unassign-case-returns-OK-response_1230954147/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Unassign-case-returns-OK-response_1230954147/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Update-case-priority-returns-Bad-Request-response_270760096/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Update-case-priority-returns-Bad-Request-response_270760096/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Update-case-priority-returns-Not-Found-response_1985619607/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Update-case-priority-returns-Not-Found-response_1985619607/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Update-case-priority-returns-OK-response_1115539438/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Update-case-priority-returns-OK-response_1115539438/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Update-case-status-returns-Bad-Request-response_4072076838/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Update-case-status-returns-Bad-Request-response_4072076838/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Update-case-status-returns-Not-Found-response_3322612333/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Update-case-status-returns-Not-Found-response_3322612333/recording.har create mode 100644 cassettes/v2/Cases_2740177670/Update-case-status-returns-OK-response_35723180/frozen.json create mode 100644 cassettes/v2/Cases_2740177670/Update-case-status-returns-OK-response_35723180/recording.har create mode 100644 examples/v2/cases-projects/CreateProject.ts create mode 100644 examples/v2/cases-projects/DeleteProject.ts create mode 100644 examples/v2/cases-projects/GetProject.ts create mode 100644 examples/v2/cases-projects/GetProjects.ts create mode 100644 examples/v2/cases/ArchiveCase.ts create mode 100644 examples/v2/cases/AssignCase.ts create mode 100644 examples/v2/cases/CreateCase.ts create mode 100644 examples/v2/cases/GetCase.ts create mode 100644 examples/v2/cases/SearchCases.ts create mode 100644 examples/v2/cases/SearchCases_3433960044.ts create mode 100644 examples/v2/cases/UnarchiveCase.ts create mode 100644 examples/v2/cases/UnassignCase.ts create mode 100644 examples/v2/cases/UpdatePriority.ts create mode 100644 examples/v2/cases/UpdateStatus.ts create mode 100644 features/v2/cases.feature create mode 100644 features/v2/cases_projects.feature create mode 100644 packages/datadog-api-client-v2/apis/CasesApi.ts create mode 100644 packages/datadog-api-client-v2/apis/CasesProjectsApi.ts create mode 100644 packages/datadog-api-client-v2/models/Case.ts create mode 100644 packages/datadog-api-client-v2/models/Case3rdPartyTicketStatus.ts create mode 100644 packages/datadog-api-client-v2/models/CaseAssign.ts create mode 100644 packages/datadog-api-client-v2/models/CaseAssignAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CaseAssignRequest.ts create mode 100644 packages/datadog-api-client-v2/models/CaseAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CaseCreate.ts create mode 100644 packages/datadog-api-client-v2/models/CaseCreateAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CaseCreateRelationships.ts create mode 100644 packages/datadog-api-client-v2/models/CaseCreateRequest.ts create mode 100644 packages/datadog-api-client-v2/models/CaseEmpty.ts create mode 100644 packages/datadog-api-client-v2/models/CaseEmptyRequest.ts create mode 100644 packages/datadog-api-client-v2/models/CasePriority.ts create mode 100644 packages/datadog-api-client-v2/models/CaseRelationships.ts create mode 100644 packages/datadog-api-client-v2/models/CaseResourceType.ts create mode 100644 packages/datadog-api-client-v2/models/CaseResponse.ts create mode 100644 packages/datadog-api-client-v2/models/CaseSortableField.ts create mode 100644 packages/datadog-api-client-v2/models/CaseStatus.ts create mode 100644 packages/datadog-api-client-v2/models/CaseType.ts create mode 100644 packages/datadog-api-client-v2/models/CaseUpdatePriority.ts create mode 100644 packages/datadog-api-client-v2/models/CaseUpdatePriorityAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CaseUpdatePriorityRequest.ts create mode 100644 packages/datadog-api-client-v2/models/CaseUpdateStatus.ts create mode 100644 packages/datadog-api-client-v2/models/CaseUpdateStatusAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/CaseUpdateStatusRequest.ts create mode 100644 packages/datadog-api-client-v2/models/CasesResponse.ts create mode 100644 packages/datadog-api-client-v2/models/CasesResponseMeta.ts create mode 100644 packages/datadog-api-client-v2/models/CasesResponseMetaPagination.ts create mode 100644 packages/datadog-api-client-v2/models/JiraIssue.ts create mode 100644 packages/datadog-api-client-v2/models/JiraIssueResult.ts create mode 100644 packages/datadog-api-client-v2/models/NullableUserRelationship.ts create mode 100644 packages/datadog-api-client-v2/models/NullableUserRelationshipData.ts create mode 100644 packages/datadog-api-client-v2/models/Project.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectCreate.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectCreateAttributes.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectCreateRequest.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectRelationship.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectRelationshipData.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectRelationships.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectResourceType.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectResponse.ts create mode 100644 packages/datadog-api-client-v2/models/ProjectsResponse.ts create mode 100644 packages/datadog-api-client-v2/models/ServiceNowTicket.ts create mode 100644 packages/datadog-api-client-v2/models/ServiceNowTicketResult.ts create mode 100644 packages/datadog-api-client-v2/models/UserRelationshipData.ts create mode 100644 packages/datadog-api-client-v2/models/UserResourceType.ts create mode 100644 packages/datadog-api-client-v2/models/UsersRelationship.ts diff --git a/.apigentools-info b/.apigentools-info index a52a4a6d8f8..c9ca3465d94 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-02-06 15:44:58.457905", - "spec_repo_commit": "46672359" + "regenerated": "2024-02-12 17:39:16.275525", + "spec_repo_commit": "3cda457d" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-02-06 15:44:58.472215", - "spec_repo_commit": "46672359" + "regenerated": "2024-02-12 17:39:16.290807", + "spec_repo_commit": "3cda457d" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 25c4b451339..4e26326131d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -151,6 +151,21 @@ components: required: true schema: type: string + CaseIDPathParameter: + description: Case's UUID or key + example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de504 + in: path + name: case_id + required: true + schema: + type: string + CaseSortableFieldParameter: + description: Specify which field to sort + in: query + name: sort[field] + required: false + schema: + $ref: '#/components/schemas/CaseSortableField' CloudAccountID: description: Cloud Account id. in: path @@ -381,6 +396,14 @@ components: example: 10 format: int64 type: integer + ProjectIDPathParameter: + description: Project UUID + example: e555e290-ed65-49bd-ae18-8acbfcf18db7 + in: path + name: project_id + required: true + schema: + type: string ResourceID: description: 'Identifier, formatted as `type:id`. Supported types: `connection`, `dashboard`, `notebook`, `security-rule`, `slo`.' @@ -3332,6 +3355,345 @@ components: from the other indexes type: string type: object + Case: + description: A case + properties: + attributes: + $ref: '#/components/schemas/CaseAttributes' + id: + description: Case's identifier + example: aeadc05e-98a8-11ec-ac2c-da7ad0900001 + type: string + relationships: + $ref: '#/components/schemas/CaseRelationships' + type: + $ref: '#/components/schemas/CaseResourceType' + required: + - id + - type + - attributes + type: object + Case3rdPartyTicketStatus: + default: IN_PROGRESS + description: Case status + enum: + - IN_PROGRESS + - COMPLETED + - FAILED + example: COMPLETED + readOnly: true + type: string + x-enum-varnames: + - IN_PROGRESS + - COMPLETED + - FAILED + CaseAssign: + description: Case assign + properties: + attributes: + $ref: '#/components/schemas/CaseAssignAttributes' + type: + $ref: '#/components/schemas/CaseResourceType' + required: + - attributes + - type + type: object + CaseAssignAttributes: + description: Case assign attributes + properties: + assignee_id: + description: Assignee's UUID + example: f98a5a5b-e0ff-45d4-b2f5-afe6e74de504 + type: string + required: + - assignee_id + type: object + CaseAssignRequest: + description: Case assign request + properties: + data: + $ref: '#/components/schemas/CaseAssign' + required: + - data + type: object + CaseAttributes: + description: Case attributes + properties: + archived_at: + description: Timestamp of when the case was archived + format: date-time + nullable: true + readOnly: true + type: string + closed_at: + description: Timestamp of when the case was closed + format: date-time + nullable: true + readOnly: true + type: string + created_at: + description: Timestamp of when the case was created + format: date-time + readOnly: true + type: string + description: + description: Description + type: string + jira_issue: + $ref: '#/components/schemas/JiraIssue' + key: + description: Key + example: CASEM-4523 + type: string + modified_at: + description: Timestamp of when the case was last modified + format: date-time + nullable: true + readOnly: true + type: string + priority: + $ref: '#/components/schemas/CasePriority' + service_now_ticket: + $ref: '#/components/schemas/ServiceNowTicket' + status: + $ref: '#/components/schemas/CaseStatus' + title: + description: Title + example: Memory leak investigation on API + type: string + type: + $ref: '#/components/schemas/CaseType' + type: object + CaseCreate: + description: Case creation data + properties: + attributes: + $ref: '#/components/schemas/CaseCreateAttributes' + relationships: + $ref: '#/components/schemas/CaseCreateRelationships' + type: + $ref: '#/components/schemas/CaseResourceType' + required: + - attributes + - type + type: object + CaseCreateAttributes: + description: Case creation attributes + properties: + description: + description: Description + type: string + priority: + $ref: '#/components/schemas/CasePriority' + title: + description: Title + example: Security breach investigation + type: string + type: + $ref: '#/components/schemas/CaseType' + required: + - title + - type + type: object + CaseCreateRelationships: + description: Relationships formed with the case on creation + properties: + assignee: + $ref: '#/components/schemas/NullableUserRelationship' + project: + $ref: '#/components/schemas/ProjectRelationship' + required: + - project + type: object + CaseCreateRequest: + description: Case create request + properties: + data: + $ref: '#/components/schemas/CaseCreate' + required: + - data + type: object + CaseEmpty: + description: Case empty request data + properties: + type: + $ref: '#/components/schemas/CaseResourceType' + required: + - type + type: object + CaseEmptyRequest: + description: Case empty request + properties: + data: + $ref: '#/components/schemas/CaseEmpty' + required: + - data + type: object + CasePriority: + default: NOT_DEFINED + description: Case priority + enum: + - NOT_DEFINED + - P1 + - P2 + - P3 + - P4 + - P5 + example: NOT_DEFINED + type: string + x-enum-varnames: + - NOT_DEFINED + - P1 + - P2 + - P3 + - P4 + - P5 + CaseRelationships: + 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 + CaseResourceType: + default: case + description: Case resource type + enum: + - case + example: case + type: string + x-enum-varnames: + - CASE + CaseResponse: + description: Case response + properties: + data: + $ref: '#/components/schemas/Case' + type: object + CaseSortableField: + description: Case field that can be sorted on + enum: + - created_at + - priority + - status + example: created_at + type: string + x-enum-varnames: + - CREATED_AT + - PRIORITY + - STATUS + CaseStatus: + description: Case status + enum: + - OPEN + - IN_PROGRESS + - CLOSED + example: OPEN + type: string + x-enum-varnames: + - OPEN + - IN_PROGRESS + - CLOSED + CaseType: + description: Case type + enum: + - STANDARD + example: STANDARD + type: string + x-enum-varnames: + - STANDARD + CaseUpdatePriority: + description: Case priority status + properties: + attributes: + $ref: '#/components/schemas/CaseUpdatePriorityAttributes' + type: + $ref: '#/components/schemas/CaseResourceType' + required: + - attributes + - type + type: object + CaseUpdatePriorityAttributes: + description: Case update priority attributes + properties: + priority: + $ref: '#/components/schemas/CasePriority' + required: + - priority + type: object + CaseUpdatePriorityRequest: + description: Case update priority request + properties: + data: + $ref: '#/components/schemas/CaseUpdatePriority' + required: + - data + type: object + CaseUpdateStatus: + description: Case update status + properties: + attributes: + $ref: '#/components/schemas/CaseUpdateStatusAttributes' + type: + $ref: '#/components/schemas/CaseResourceType' + required: + - attributes + - type + type: object + CaseUpdateStatusAttributes: + description: Case update status attributes + properties: + status: + $ref: '#/components/schemas/CaseStatus' + required: + - status + type: object + CaseUpdateStatusRequest: + description: Case update status request + properties: + data: + $ref: '#/components/schemas/CaseUpdateStatus' + required: + - data + type: object + CasesResponse: + description: Response with cases + properties: + data: + description: Cases response data + items: + $ref: '#/components/schemas/Case' + type: array + meta: + $ref: '#/components/schemas/CasesResponseMeta' + type: object + CasesResponseMeta: + description: Cases response metadata + properties: + page: + $ref: '#/components/schemas/CasesResponseMetaPagination' + type: object + CasesResponseMetaPagination: + description: Pagination metadata + properties: + current: + description: Current page number + format: int64 + type: integer + size: + description: Number of cases in current page + format: int64 + type: integer + total: + description: Total number of pages + format: int64 + type: integer + type: object ChargebackBreakdown: description: Charges breakdown. properties: @@ -9344,6 +9706,32 @@ components: - project_key - account type: object + JiraIssue: + description: Jira issue attached to case + nullable: true + properties: + result: + $ref: '#/components/schemas/JiraIssueResult' + status: + $ref: '#/components/schemas/Case3rdPartyTicketStatus' + readOnly: true + type: object + JiraIssueResult: + description: Jira issue information + properties: + issue_id: + description: Jira issue ID + type: string + issue_key: + description: Jira issue key + type: string + issue_url: + description: Jira issue URL + type: string + project_key: + description: Jira project key + type: string + type: object ListApplicationKeysResponse: description: Response for a list of application keys. properties: @@ -11943,6 +12331,29 @@ components: - id - type type: object + NullableUserRelationship: + description: Relationship to user. + nullable: true + properties: + data: + $ref: '#/components/schemas/NullableUserRelationshipData' + required: + - data + type: object + NullableUserRelationshipData: + description: Relationship to user object. + nullable: true + properties: + id: + description: A unique identifier that represents the user. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/UserResourceType' + required: + - id + - type + type: object OktaAccount: description: Schema for an Okta account. properties: @@ -13075,6 +13486,113 @@ components: type: string x-enum-varnames: - PROCESS + Project: + description: A Project + properties: + attributes: + $ref: '#/components/schemas/ProjectAttributes' + id: + description: The Project's identifier + example: aeadc05e-98a8-11ec-ac2c-da7ad0900001 + type: string + relationships: + $ref: '#/components/schemas/ProjectRelationships' + type: + $ref: '#/components/schemas/ProjectResourceType' + required: + - id + - type + - attributes + type: object + ProjectAttributes: + description: Project attributes + properties: + key: + description: The project's key + example: CASEM + type: string + name: + description: Project's name + type: string + type: object + ProjectCreate: + description: Project create + properties: + attributes: + $ref: '#/components/schemas/ProjectCreateAttributes' + type: + $ref: '#/components/schemas/ProjectResourceType' + required: + - attributes + - type + type: object + ProjectCreateAttributes: + description: Project creation attributes + properties: + key: + description: Project's key. Cannot be "CASE" + example: SEC + type: string + name: + description: name + example: Security Investigation + type: string + required: + - name + - key + type: object + ProjectCreateRequest: + description: Project create request + properties: + data: + $ref: '#/components/schemas/ProjectCreate' + required: + - data + type: object + ProjectRelationship: + description: Relationship to project + properties: + data: + $ref: '#/components/schemas/ProjectRelationshipData' + required: + - data + type: object + ProjectRelationshipData: + description: Relationship to project object + properties: + id: + description: A unique identifier that represents the project + example: e555e290-ed65-49bd-ae18-8acbfcf18db7 + type: string + type: + $ref: '#/components/schemas/ProjectResourceType' + required: + - id + - type + type: object + ProjectRelationships: + description: Project relationships + properties: + member_team: + $ref: '#/components/schemas/RelationshipToTeamLinks' + member_user: + $ref: '#/components/schemas/UsersRelationship' + type: object + ProjectResourceType: + default: project + description: Project resource type + enum: + - project + example: project + type: string + x-enum-varnames: + - PROJECT + ProjectResponse: + description: Project response + properties: + data: + $ref: '#/components/schemas/Project' + type: object ProjectedCost: description: Projected Cost data. properties: @@ -13131,6 +13649,15 @@ components: type: string x-enum-varnames: - PROJECt_COST + ProjectsResponse: + description: Response with projects + properties: + data: + description: Projects response data + items: + $ref: '#/components/schemas/Project' + type: array + type: object QueryFormula: description: A formula for calculation based on one or more queries. properties: @@ -18614,6 +19141,23 @@ components: $ref: '#/components/schemas/ServiceDefinitionData' type: array type: object + ServiceNowTicket: + description: ServiceNow ticket attached to case + nullable: true + properties: + result: + $ref: '#/components/schemas/ServiceNowTicketResult' + status: + $ref: '#/components/schemas/Case3rdPartyTicketStatus' + readOnly: true + type: object + ServiceNowTicketResult: + description: ServiceNow ticket information + properties: + sys_target_link: + description: Link to the Incident created on ServiceNow + type: string + type: object SlackIntegrationMetadata: description: Incident integration metadata for the Slack integration. properties: @@ -20615,12 +21159,34 @@ components: type: string x-enum-varnames: - USER_INVITATIONS + UserRelationshipData: + description: Relationship to user object. + properties: + id: + description: A unique identifier that represents the user. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/UserResourceType' + required: + - id + - type + type: object UserRelationships: description: Relationships of the user object. properties: roles: $ref: '#/components/schemas/RelationshipToRoles' type: object + UserResourceType: + default: user + description: User resource type. + enum: + - user + example: user + type: string + x-enum-varnames: + - USER UserResponse: description: Response containing information about a single user. properties: @@ -20857,6 +21423,18 @@ components: required: - data type: object + UsersRelationship: + description: Relationship to users. + properties: + data: + description: Relationships to user objects. + example: [] + items: + $ref: '#/components/schemas/UserRelationshipData' + type: array + required: + - data + type: object UsersResponse: description: Response containing information about multiple users. properties: @@ -20929,6 +21507,8 @@ components: apm_service_catalog_read: View service catalog and service definitions. apm_service_catalog_write: Add, modify, and delete service catalog definitions when those definitions are maintained by Datadog. + cases_read: Read all cases data. + cases_write: Create, update and delete cases data. ci_visibility_pipelines_write: Create CI Visibility pipeline spans using the API. ci_visibility_read: View CI Visibility. @@ -22117,6 +22697,472 @@ paths: - AuthN Mappings x-codegen-request-body-name: body x-permission: OR(USER_ACCESS_MANAGE) + /api/v2/cases: + get: + description: Search cases. + operationId: SearchCases + parameters: + - $ref: '#/components/parameters/PageSize' + - $ref: '#/components/parameters/PageOffset' + - $ref: '#/components/parameters/CaseSortableFieldParameter' + - description: Search query + in: query + name: filter + required: false + schema: + example: status:open (team:case-management OR team:event-management) + type: string + - description: Specify if order is ascending or not + in: query + name: sort[asc] + required: false + schema: + default: false + type: boolean + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CasesResponse' + 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: + - cases_read + summary: Search cases + tags: + - Cases + x-pagination: + limitParam: page[size] + pageOffsetParam: page[offset] + resultsPath: data + post: + description: Create a Case + operationId: CreateCase + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseCreateRequest' + description: Case payload + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + description: CREATED + '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: + - cases_write + summary: Create a case + tags: + - Cases + /api/v2/cases/projects: + get: + description: Get all projects. + operationId: GetProjects + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectsResponse' + 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: + - cases_read + summary: Get all projects + tags: + - Cases Projects + post: + description: Create a project. + operationId: CreateProject + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectCreateRequest' + description: Project payload + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResponse' + description: CREATED + '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: + - cases_write + summary: Create a project + tags: + - Cases Projects + /api/v2/cases/projects/{project_id}: + delete: + description: Remove a project using the project's `id`. + operationId: DeleteProject + parameters: + - $ref: '#/components/parameters/ProjectIDPathParameter' + responses: + '204': + description: No Content + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: API error response + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - cases_write + summary: Remove a project + tags: + - Cases Projects + get: + description: Get the details of a project by `project_id`. + operationId: GetProject + parameters: + - $ref: '#/components/parameters/ProjectIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/ProjectResponse' + 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: + - cases_read + summary: Get the details of a project + tags: + - Cases Projects + /api/v2/cases/{case_id}: + get: + description: Get the details of case by `case_id` + operationId: GetCase + parameters: + - $ref: '#/components/parameters/CaseIDPathParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + 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: + - cases_read + summary: Get the details of a case + tags: + - Cases + /api/v2/cases/{case_id}/archive: + post: + description: Archive case + operationId: ArchiveCase + parameters: + - $ref: '#/components/parameters/CaseIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseEmptyRequest' + description: Archive case payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + 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: + - cases_write + summary: Archive case + tags: + - Cases + /api/v2/cases/{case_id}/assign: + post: + description: Assign case to a user + operationId: AssignCase + parameters: + - $ref: '#/components/parameters/CaseIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseAssignRequest' + description: Assign case payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + 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: + - cases_write + summary: Assign case + tags: + - Cases + /api/v2/cases/{case_id}/priority: + post: + description: Update case priority + operationId: UpdatePriority + parameters: + - $ref: '#/components/parameters/CaseIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseUpdatePriorityRequest' + description: Case priority update payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + 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: + - cases_write + summary: Update case priority + tags: + - Cases + /api/v2/cases/{case_id}/status: + post: + description: Update case status + operationId: UpdateStatus + parameters: + - $ref: '#/components/parameters/CaseIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseUpdateStatusRequest' + description: Case status update payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + 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: + - cases_write + summary: Update case status + tags: + - Cases + /api/v2/cases/{case_id}/unarchive: + post: + description: Unarchive case + operationId: UnarchiveCase + parameters: + - $ref: '#/components/parameters/CaseIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseEmptyRequest' + description: Unarchive case payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + 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: + - cases_write + summary: Unarchive case + tags: + - Cases + /api/v2/cases/{case_id}/unassign: + post: + description: Unassign case + operationId: UnassignCase + parameters: + - $ref: '#/components/parameters/CaseIDPathParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CaseEmptyRequest' + description: Unassign case payload + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/CaseResponse' + 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: + - cases_write + summary: Unassign case + tags: + - Cases /api/v2/ci/pipeline: post: description: 'Send your pipeline event to your Datadog platform over HTTP. For @@ -33463,6 +34509,10 @@ tags: [Test Visibility in Datadog page](https://docs.datadoghq.com/tests/) for more information. name: CI Visibility Tests +- description: View and manage cases within Datadog + name: Cases +- description: View and manage project within Case Management + name: Cases Projects - description: The Cloud Cost Management API allows you to set up, edit, and delete Cloud Cost Management accounts for AWS and Azure. See the [Cloud Cost Management page](https://docs.datadoghq.com/cloud_cost_management/) for more information. diff --git a/cassettes/v2/Cases_2740177670/Archive-case-returns-Bad-Request-response_3307115673/frozen.json b/cassettes/v2/Cases_2740177670/Archive-case-returns-Bad-Request-response_3307115673/frozen.json new file mode 100644 index 00000000000..114f2973004 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Archive-case-returns-Bad-Request-response_3307115673/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:35.988Z" diff --git a/cassettes/v2/Cases_2740177670/Archive-case-returns-Bad-Request-response_3307115673/recording.har b/cassettes/v2/Cases_2740177670/Archive-case-returns-Bad-Request-response_3307115673/recording.har new file mode 100644 index 00000000000..dd8777de5b4 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Archive-case-returns-Bad-Request-response_3307115673/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Archive case returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 747, + "content": { + "mimeType": "application/vnd.api+json", + "size": 747, + "text": "{\"data\":{\"id\":\"1f205230-5ea9-444e-a5f9-48f93d6a2cde\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:36.54518451Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"1f205230-5ea9-444e-a5f9-48f93d6a2cde\",\"key\":\"DDFC-2\",\"priority\":\"P4\",\"public_id\":\"62\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:36.261Z", + "time": 325 + }, + { + "_id": "2c0f4f458dc658dffb53fc17524fd2fd", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 27, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 595, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"type\":\"project\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/1f205230-5ea9-444e-a5f9-48f93d6a2cde/archive" + }, + "response": { + "bodySize": 108, + "content": { + "mimeType": "application/vnd.api+json", + "size": 108, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"got type \\\"project\\\" expected one of \\\"case\\\"\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-02-07T18:00:36.593Z", + "time": 299 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Archive-case-returns-Not-Found-response_3250820290/frozen.json b/cassettes/v2/Cases_2740177670/Archive-case-returns-Not-Found-response_3250820290/frozen.json new file mode 100644 index 00000000000..812be9942e5 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Archive-case-returns-Not-Found-response_3250820290/frozen.json @@ -0,0 +1 @@ +"2024-02-07T13:09:07.949Z" diff --git a/cassettes/v2/Cases_2740177670/Archive-case-returns-Not-Found-response_3250820290/recording.har b/cassettes/v2/Cases_2740177670/Archive-case-returns-Not-Found-response_3250820290/recording.har new file mode 100644 index 00000000000..2754e0f0287 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Archive-case-returns-Not-Found-response_3250820290/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Cases/Archive case returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "aad1f7d5d833b9831b11d9674f694a13", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 24, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 595, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/67d80aa3-36ff-44b9-a694-c501a7591737/archive" + }, + "response": { + "bodySize": 67, + "content": { + "mimeType": "application/vnd.api+json", + "size": 67, + "text": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"case not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-02-07T13:09:07.953Z", + "time": 54 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Archive-case-returns-OK-response_1644289173/frozen.json b/cassettes/v2/Cases_2740177670/Archive-case-returns-OK-response_1644289173/frozen.json new file mode 100644 index 00000000000..a3ee05736a8 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Archive-case-returns-OK-response_1644289173/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:36.901Z" diff --git a/cassettes/v2/Cases_2740177670/Archive-case-returns-OK-response_1644289173/recording.har b/cassettes/v2/Cases_2740177670/Archive-case-returns-OK-response_1644289173/recording.har new file mode 100644 index 00000000000..0c3543f6445 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Archive-case-returns-OK-response_1644289173/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Archive case returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 549, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 748, + "content": { + "mimeType": "application/vnd.api+json", + "size": 748, + "text": "{\"data\":{\"id\":\"99e6e8cd-f115-4168-8814-30776007f44c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:37.185776261Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"99e6e8cd-f115-4168-8814-30776007f44c\",\"key\":\"DDFC-3\",\"priority\":\"P4\",\"public_id\":\"63\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:36.904Z", + "time": 318 + }, + { + "_id": "8a5e0b6d99bba8c73455cfaf3bd14fa2", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 24, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/99e6e8cd-f115-4168-8814-30776007f44c/archive" + }, + "response": { + "bodySize": 874, + "content": { + "mimeType": "application/vnd.api+json", + "size": 874, + "text": "{\"data\":{\"id\":\"99e6e8cd-f115-4168-8814-30776007f44c\",\"type\":\"case\",\"attributes\":{\"archived_at\":\"2024-02-07T18:00:37.47125606Z\",\"attributes\":{},\"created_at\":\"2024-02-07T18:00:37.185776Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"99e6e8cd-f115-4168-8814-30776007f44c\",\"key\":\"DDFC-3\",\"priority\":\"P4\",\"public_id\":\"63\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-02-07T18:00:37.229Z", + "time": 284 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Assign-case-returns-Bad-Request-response_1562814608/frozen.json b/cassettes/v2/Cases_2740177670/Assign-case-returns-Bad-Request-response_1562814608/frozen.json new file mode 100644 index 00000000000..8f1c35000d1 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Assign-case-returns-Bad-Request-response_1562814608/frozen.json @@ -0,0 +1 @@ +"2024-02-12T13:25:55.665Z" diff --git a/cassettes/v2/Cases_2740177670/Assign-case-returns-Bad-Request-response_1562814608/recording.har b/cassettes/v2/Cases_2740177670/Assign-case-returns-Bad-Request-response_1562814608/recording.har new file mode 100644 index 00000000000..e55a106e62a --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Assign-case-returns-Bad-Request-response_1562814608/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Assign case returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 749, + "content": { + "mimeType": "application/vnd.api+json", + "size": 749, + "text": "{\"data\":{\"id\":\"4039be1a-5f87-4666-b986-a8396c0225c3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-12T13:25:56.280897807Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"4039be1a-5f87-4666-b986-a8396c0225c3\",\"key\":\"DDFC-17\",\"priority\":\"P4\",\"public_id\":\"77\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 639, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-12T13:25:56.131Z", + "time": 180 + }, + { + "_id": "14525dd1f9868c8a6c89279b8b2e7c21", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 68, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 593, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"assignee_id\":\"invalid-uuid\"},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/4039be1a-5f87-4666-b986-a8396c0225c3/assign" + }, + "response": { + "bodySize": 166, + "content": { + "mimeType": "application/vnd.api+json", + "size": 166, + "text": "{\"errors\":[{\"code\":\"invalid_command\",\"title\":\"error when validating input command: 'assigneeid' field must be an uuid\",\"meta\":{\"entity\":\"assigneeid\",\"rule\":\"uuid\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-02-12T13:25:56.320Z", + "time": 60 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Assign-case-returns-Not-Found-response_3693775655/frozen.json b/cassettes/v2/Cases_2740177670/Assign-case-returns-Not-Found-response_3693775655/frozen.json new file mode 100644 index 00000000000..d90879b68cd --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Assign-case-returns-Not-Found-response_3693775655/frozen.json @@ -0,0 +1 @@ +"2024-02-07T13:09:08.433Z" diff --git a/cassettes/v2/Cases_2740177670/Assign-case-returns-Not-Found-response_3693775655/recording.har b/cassettes/v2/Cases_2740177670/Assign-case-returns-Not-Found-response_3693775655/recording.har new file mode 100644 index 00000000000..f14cfbfc091 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Assign-case-returns-Not-Found-response_3693775655/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Cases/Assign case returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "1873797ed953ac5e016a7e24e4d69188", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 140, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"email\":\"Test-Assign_case_returns_Not_Found_response-1707311348@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/users" + }, + "response": { + "bodySize": 681, + "content": { + "mimeType": "application/json", + "size": 681, + "text": "{\"data\":{\"type\":\"users\",\"id\":\"14040f89-c5ba-11ee-87b5-f6892353f87d\",\"attributes\":{\"name\":null,\"handle\":\"test-assign_case_returns_not_found_response-1707311348@datadoghq.com\",\"created_at\":\"2024-02-07T13:09:08.546371+00:00\",\"modified_at\":\"2024-02-07T13:09:08.546371+00:00\",\"email\":\"test-assign_case_returns_not_found_response-1707311348@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/e0a6ed9703a1166a2c07bca15e37d0d6?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 650, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T13:09:08.437Z", + "time": 148 + }, + { + "_id": "9018b92e0bbedcd0dc0b9f6a749f7ce3", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 92, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 593, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"assignee_id\":\"14040f89-c5ba-11ee-87b5-f6892353f87d\"},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/67d80aa3-36ff-44b9-a694-c501a7591737/assign" + }, + "response": { + "bodySize": 67, + "content": { + "mimeType": "application/vnd.api+json", + "size": 67, + "text": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"case not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-02-07T13:09:08.592Z", + "time": 55 + }, + { + "_id": "a3c3af125456ebfdd3818f81136e3a00", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/users/14040f89-c5ba-11ee-87b5-f6892353f87d" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-02-07T13:09:08.654Z", + "time": 199 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Assign-case-returns-OK-response_198940254/frozen.json b/cassettes/v2/Cases_2740177670/Assign-case-returns-OK-response_198940254/frozen.json new file mode 100644 index 00000000000..7bd7b462148 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Assign-case-returns-OK-response_198940254/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:38.147Z" diff --git a/cassettes/v2/Cases_2740177670/Assign-case-returns-OK-response_198940254/recording.har b/cassettes/v2/Cases_2740177670/Assign-case-returns-OK-response_198940254/recording.har new file mode 100644 index 00000000000..864daa9b971 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Assign-case-returns-OK-response_198940254/recording.har @@ -0,0 +1,210 @@ +{ + "log": { + "_recordingName": "Cases/Assign case returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 748, + "content": { + "mimeType": "application/vnd.api+json", + "size": 748, + "text": "{\"data\":{\"id\":\"a0801fce-a045-4b66-ad78-effcd959fa4f\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:38.353039559Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"a0801fce-a045-4b66-ad78-effcd959fa4f\",\"key\":\"DDFC-5\",\"priority\":\"P4\",\"public_id\":\"65\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:38.151Z", + "time": 240 + }, + { + "_id": "cab62f98b410a5fa7744fb417093528b", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 133, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"email\":\"Test-Assign_case_returns_OK_response-1707328838@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/users" + }, + "response": { + "bodySize": 667, + "content": { + "mimeType": "application/json", + "size": 667, + "text": "{\"data\":{\"type\":\"users\",\"id\":\"cced7029-c5e2-11ee-ac63-c24751e8bab0\",\"attributes\":{\"name\":null,\"handle\":\"test-assign_case_returns_ok_response-1707328838@datadoghq.com\",\"created_at\":\"2024-02-07T18:00:38.645791+00:00\",\"modified_at\":\"2024-02-07T18:00:38.645791+00:00\",\"email\":\"test-assign_case_returns_ok_response-1707328838@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/dd4005a3eca9e7c6aed30c77d193bc37?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 650, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:38.400Z", + "time": 313 + }, + { + "_id": "7e6da293a2771b77ea441ae9eb6f5a5e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 92, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 593, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"assignee_id\":\"cced7029-c5e2-11ee-ac63-c24751e8bab0\"},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/a0801fce-a045-4b66-ad78-effcd959fa4f/assign" + }, + "response": { + "bodySize": 1181, + "content": { + "mimeType": "application/vnd.api+json", + "size": 1181, + "text": "{\"data\":{\"id\":\"a0801fce-a045-4b66-ad78-effcd959fa4f\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:38.35304Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"a0801fce-a045-4b66-ad78-effcd959fa4f\",\"key\":\"DDFC-5\",\"modified_at\":\"2024-02-07T18:00:39.010235Z\",\"priority\":\"P4\",\"public_id\":\"65\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"cced7029-c5e2-11ee-ac63-c24751e8bab0\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}},{\"id\":\"cced7029-c5e2-11ee-ac63-c24751e8bab0\",\"type\":\"user\",\"attributes\":{\"email\":\"test-assign_case_returns_ok_response-1707328838@datadoghq.com\",\"handle\":\"test-assign_case_returns_ok_response-1707328838@datadoghq.com\",\"name\":\"\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 642, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-02-07T18:00:38.719Z", + "time": 333 + }, + { + "_id": "fe717567adbe91c8b08460c20fa5c5e9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/users/cced7029-c5e2-11ee-ac63-c24751e8bab0" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-02-07T18:00:39.058Z", + "time": 500 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Create-a-case-returns-Bad-Request-response_1348998798/frozen.json b/cassettes/v2/Cases_2740177670/Create-a-case-returns-Bad-Request-response_1348998798/frozen.json new file mode 100644 index 00000000000..01e5a082287 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Create-a-case-returns-Bad-Request-response_1348998798/frozen.json @@ -0,0 +1 @@ +"2024-02-07T13:09:09.415Z" diff --git a/cassettes/v2/Cases_2740177670/Create-a-case-returns-Bad-Request-response_1348998798/recording.har b/cassettes/v2/Cases_2740177670/Create-a-case-returns-Bad-Request-response_1348998798/recording.har new file mode 100644 index 00000000000..15a4053ac9b --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Create-a-case-returns-Bad-Request-response_1348998798/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Cases/Create a case returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "c53a0d9163086fd6b142d95814505a59", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 303, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"NOT_DEFINED\",\"title\":\"Security breach investigation\",\"type\":\"STANDARD\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"00000000-0000-0000-0000-000000000000\",\"type\":\"userx\"}},\"project\":{\"data\":{\"id\":\"e555e290-ed65-49bd-ae18-8acbfcf18db7\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 106, + "content": { + "mimeType": "application/vnd.api+json", + "size": 106, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"got type \\\"userx\\\" expected one of \\\"user\\\"\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-02-07T13:09:09.418Z", + "time": 50 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Create-a-case-returns-CREATED-response_3810133052/frozen.json b/cassettes/v2/Cases_2740177670/Create-a-case-returns-CREATED-response_3810133052/frozen.json new file mode 100644 index 00000000000..6538d04de9d --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Create-a-case-returns-CREATED-response_3810133052/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:39.566Z" diff --git a/cassettes/v2/Cases_2740177670/Create-a-case-returns-CREATED-response_3810133052/recording.har b/cassettes/v2/Cases_2740177670/Create-a-case-returns-CREATED-response_3810133052/recording.har new file mode 100644 index 00000000000..e8e92bd1c1d --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Create-a-case-returns-CREATED-response_3810133052/recording.har @@ -0,0 +1,157 @@ +{ + "log": { + "_recordingName": "Cases/Create a case returns \"CREATED\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "36db496207ad731fd8d63ecdf39f6022", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 140, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 549, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"email\":\"Test-Create_a_case_returns_CREATED_response-1707328839@datadoghq.com\",\"title\":\"user title\"},\"type\":\"users\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/users" + }, + "response": { + "bodySize": 681, + "content": { + "mimeType": "application/json", + "size": 681, + "text": "{\"data\":{\"type\":\"users\",\"id\":\"cda929dc-c5e2-11ee-883d-6ad03867f364\",\"attributes\":{\"name\":null,\"handle\":\"test-create_a_case_returns_created_response-1707328839@datadoghq.com\",\"created_at\":\"2024-02-07T18:00:39.876070+00:00\",\"modified_at\":\"2024-02-07T18:00:39.876070+00:00\",\"email\":\"test-create_a_case_returns_created_response-1707328839@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/e564f62a22caae2dd8e878a8d73c6328?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\"},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 650, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:39.569Z", + "time": 380 + }, + { + "_id": "dcf876745c6025c60298fd31cf40a6eb", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 322, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 549, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"NOT_DEFINED\",\"title\":\"Security breach investigation in 3b9b6a6abdcf0b9b\",\"type\":\"STANDARD\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"cda929dc-c5e2-11ee-883d-6ad03867f364\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 1119, + "content": { + "mimeType": "application/vnd.api+json", + "size": 1119, + "text": "{\"data\":{\"id\":\"4045de8b-3808-4bb6-94c9-f55ced4811c7\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:40.197151067Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"4045de8b-3808-4bb6-94c9-f55ced4811c7\",\"key\":\"DDFC-6\",\"priority\":\"NOT_DEFINED\",\"public_id\":\"66\",\"status\":\"OPEN\",\"title\":\"Security breach investigation in 3b9b6a6abdcf0b9b\",\"type\":\"STANDARD\"},\"relationships\":{\"assignee\":{\"data\":{\"id\":\"cda929dc-c5e2-11ee-883d-6ad03867f364\",\"type\":\"user\"}},\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}},{\"id\":\"cda929dc-c5e2-11ee-883d-6ad03867f364\",\"type\":\"user\",\"attributes\":{\"email\":\"test-create_a_case_returns_created_response-1707328839@datadoghq.com\",\"handle\":\"test-create_a_case_returns_created_response-1707328839@datadoghq.com\",\"name\":\"\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:39.954Z", + "time": 283 + }, + { + "_id": "36b3e4125eb7c7bc95635e1f4e74d719", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 523, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/users/cda929dc-c5e2-11ee-883d-6ad03867f364" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2024-02-07T18:00:40.243Z", + "time": 491 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-Not-Found-response_3332065607/frozen.json b/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-Not-Found-response_3332065607/frozen.json new file mode 100644 index 00000000000..97764c182ce --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-Not-Found-response_3332065607/frozen.json @@ -0,0 +1 @@ +"2024-02-07T13:09:09.931Z" diff --git a/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-Not-Found-response_3332065607/recording.har b/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-Not-Found-response_3332065607/recording.har new file mode 100644 index 00000000000..65c95a9dc9d --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-Not-Found-response_3332065607/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Cases/Get the details of a case returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "9c63e8537a007b429e54bbfd11806251", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 530, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/67d80aa3-36ff-44b9-a694-c501a7591737" + }, + "response": { + "bodySize": 67, + "content": { + "mimeType": "application/vnd.api+json", + "size": 67, + "text": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"case not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-02-07T13:09:09.934Z", + "time": 50 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-OK-response_1678668670/frozen.json b/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-OK-response_1678668670/frozen.json new file mode 100644 index 00000000000..8450add09f1 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-OK-response_1678668670/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:40.743Z" diff --git a/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-OK-response_1678668670/recording.har b/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-OK-response_1678668670/recording.har new file mode 100644 index 00000000000..ec98a7f7c50 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Get-the-details-of-a-case-returns-OK-response_1678668670/recording.har @@ -0,0 +1,110 @@ +{ + "log": { + "_recordingName": "Cases/Get the details of a case returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 549, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 748, + "content": { + "mimeType": "application/vnd.api+json", + "size": 748, + "text": "{\"data\":{\"id\":\"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:41.007812312Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749\",\"key\":\"DDFC-7\",\"priority\":\"P4\",\"public_id\":\"67\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:40.765Z", + "time": 285 + }, + { + "_id": "204e0ca357c0d6126f7b5c5f14d218bc", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 529, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749" + }, + "response": { + "bodySize": 745, + "content": { + "mimeType": "application/vnd.api+json", + "size": 745, + "text": "{\"data\":{\"id\":\"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:41.007812Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"8fd1a1c3-3f55-4d6b-807f-ca70bc0e5749\",\"key\":\"DDFC-7\",\"priority\":\"P4\",\"public_id\":\"67\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-02-07T18:00:41.055Z", + "time": 332 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Bad-Request-response_3573022260/frozen.json b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Bad-Request-response_3573022260/frozen.json new file mode 100644 index 00000000000..4387924c569 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Bad-Request-response_3573022260/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:41.393Z" diff --git a/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Bad-Request-response_3573022260/recording.har b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Bad-Request-response_3573022260/recording.har new file mode 100644 index 00000000000..4b39beefb2f --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Bad-Request-response_3573022260/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Unarchive case returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 748, + "content": { + "mimeType": "application/vnd.api+json", + "size": 748, + "text": "{\"data\":{\"id\":\"91b52d3b-4d67-4b7f-ba4d-da67d8b46798\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:41.662578539Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"91b52d3b-4d67-4b7f-ba4d-da67d8b46798\",\"key\":\"DDFC-8\",\"priority\":\"P4\",\"public_id\":\"68\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:41.395Z", + "time": 307 + }, + { + "_id": "5b23316a1fcd0359328adfcea4f169b7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 27, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 599, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"type\":\"project\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/91b52d3b-4d67-4b7f-ba4d-da67d8b46798/unarchive" + }, + "response": { + "bodySize": 108, + "content": { + "mimeType": "application/vnd.api+json", + "size": 108, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"got type \\\"project\\\" expected one of \\\"case\\\"\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-02-07T18:00:41.706Z", + "time": 315 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Not-Found-response_2591944147/frozen.json b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Not-Found-response_2591944147/frozen.json new file mode 100644 index 00000000000..e262ee60063 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Not-Found-response_2591944147/frozen.json @@ -0,0 +1 @@ +"2024-02-07T13:09:10.329Z" diff --git a/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Not-Found-response_2591944147/recording.har b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Not-Found-response_2591944147/recording.har new file mode 100644 index 00000000000..791f7cbd44d --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-Not-Found-response_2591944147/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Cases/Unarchive case returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "29a32511d4fa5a96ef86da4143f604aa", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 24, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 599, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/67d80aa3-36ff-44b9-a694-c501a7591737/unarchive" + }, + "response": { + "bodySize": 67, + "content": { + "mimeType": "application/vnd.api+json", + "size": 67, + "text": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"case not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-02-07T13:09:10.332Z", + "time": 40 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Unarchive-case-returns-OK-response_720357866/frozen.json b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-OK-response_720357866/frozen.json new file mode 100644 index 00000000000..4eba6229ac5 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-OK-response_720357866/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:42.027Z" diff --git a/cassettes/v2/Cases_2740177670/Unarchive-case-returns-OK-response_720357866/recording.har b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-OK-response_720357866/recording.har new file mode 100644 index 00000000000..7aa39bff585 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unarchive-case-returns-OK-response_720357866/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Unarchive case returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 748, + "content": { + "mimeType": "application/vnd.api+json", + "size": 748, + "text": "{\"data\":{\"id\":\"020e2ce7-9fe8-4273-81ae-1e5873fba9d3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:42.286687881Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"020e2ce7-9fe8-4273-81ae-1e5873fba9d3\",\"key\":\"DDFC-9\",\"priority\":\"P4\",\"public_id\":\"69\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:42.029Z", + "time": 296 + }, + { + "_id": "b0b5632a23eb2bb37871201d11f2f4ea", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 24, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 599, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/020e2ce7-9fe8-4273-81ae-1e5873fba9d3/unarchive" + }, + "response": { + "bodySize": 745, + "content": { + "mimeType": "application/vnd.api+json", + "size": 745, + "text": "{\"data\":{\"id\":\"020e2ce7-9fe8-4273-81ae-1e5873fba9d3\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:42.286688Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"020e2ce7-9fe8-4273-81ae-1e5873fba9d3\",\"key\":\"DDFC-9\",\"priority\":\"P4\",\"public_id\":\"69\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-02-07T18:00:42.331Z", + "time": 301 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Unassign-case-returns-Bad-Request-response_1235480583/frozen.json b/cassettes/v2/Cases_2740177670/Unassign-case-returns-Bad-Request-response_1235480583/frozen.json new file mode 100644 index 00000000000..469d1654d11 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unassign-case-returns-Bad-Request-response_1235480583/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:42.637Z" diff --git a/cassettes/v2/Cases_2740177670/Unassign-case-returns-Bad-Request-response_1235480583/recording.har b/cassettes/v2/Cases_2740177670/Unassign-case-returns-Bad-Request-response_1235480583/recording.har new file mode 100644 index 00000000000..bddc3350487 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unassign-case-returns-Bad-Request-response_1235480583/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Unassign case returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 749, + "content": { + "mimeType": "application/vnd.api+json", + "size": 749, + "text": "{\"data\":{\"id\":\"8a6e4254-7429-4398-99c2-ba9363fb3f98\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:42.908434394Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"8a6e4254-7429-4398-99c2-ba9363fb3f98\",\"key\":\"DDFC-10\",\"priority\":\"P4\",\"public_id\":\"70\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:42.639Z", + "time": 308 + }, + { + "_id": "b1fb0b9798b0316c65c7308eace539bb", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 27, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"type\":\"project\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/8a6e4254-7429-4398-99c2-ba9363fb3f98/unassign" + }, + "response": { + "bodySize": 108, + "content": { + "mimeType": "application/vnd.api+json", + "size": 108, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"got type \\\"project\\\" expected one of \\\"case\\\"\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-02-07T18:00:42.953Z", + "time": 218 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Unassign-case-returns-Not-Found-response_2139056352/frozen.json b/cassettes/v2/Cases_2740177670/Unassign-case-returns-Not-Found-response_2139056352/frozen.json new file mode 100644 index 00000000000..eb8b0e531ca --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unassign-case-returns-Not-Found-response_2139056352/frozen.json @@ -0,0 +1 @@ +"2024-02-07T13:09:10.714Z" diff --git a/cassettes/v2/Cases_2740177670/Unassign-case-returns-Not-Found-response_2139056352/recording.har b/cassettes/v2/Cases_2740177670/Unassign-case-returns-Not-Found-response_2139056352/recording.har new file mode 100644 index 00000000000..75963709ed6 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unassign-case-returns-Not-Found-response_2139056352/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Cases/Unassign case returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "b22c2067ba11bbaf0f08e4f705959fc4", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 24, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/67d80aa3-36ff-44b9-a694-c501a7591737/unassign" + }, + "response": { + "bodySize": 67, + "content": { + "mimeType": "application/vnd.api+json", + "size": 67, + "text": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"case not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-02-07T13:09:10.722Z", + "time": 39 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Unassign-case-returns-OK-response_1230954147/frozen.json b/cassettes/v2/Cases_2740177670/Unassign-case-returns-OK-response_1230954147/frozen.json new file mode 100644 index 00000000000..18e07bb897f --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unassign-case-returns-OK-response_1230954147/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:43.176Z" diff --git a/cassettes/v2/Cases_2740177670/Unassign-case-returns-OK-response_1230954147/recording.har b/cassettes/v2/Cases_2740177670/Unassign-case-returns-OK-response_1230954147/recording.har new file mode 100644 index 00000000000..e4e2d1af7ec --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Unassign-case-returns-OK-response_1230954147/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Unassign case returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 749, + "content": { + "mimeType": "application/vnd.api+json", + "size": 749, + "text": "{\"data\":{\"id\":\"8c5de575-685c-4ac4-a78a-9774c4f2160b\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:43.427988311Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"8c5de575-685c-4ac4-a78a-9774c4f2160b\",\"key\":\"DDFC-11\",\"priority\":\"P4\",\"public_id\":\"71\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:43.181Z", + "time": 291 + }, + { + "_id": "2f95a0d520ae92d5f3e1ac541bfe4bd0", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 24, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/8c5de575-685c-4ac4-a78a-9774c4f2160b/unassign" + }, + "response": { + "bodySize": 746, + "content": { + "mimeType": "application/vnd.api+json", + "size": 746, + "text": "{\"data\":{\"id\":\"8c5de575-685c-4ac4-a78a-9774c4f2160b\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:43.427988Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"8c5de575-685c-4ac4-a78a-9774c4f2160b\",\"key\":\"DDFC-11\",\"priority\":\"P4\",\"public_id\":\"71\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-02-07T18:00:43.477Z", + "time": 325 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Bad-Request-response_270760096/frozen.json b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Bad-Request-response_270760096/frozen.json new file mode 100644 index 00000000000..cbb64dc3635 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Bad-Request-response_270760096/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:43.807Z" diff --git a/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Bad-Request-response_270760096/recording.har b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Bad-Request-response_270760096/recording.har new file mode 100644 index 00000000000..110785ebb7b --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Bad-Request-response_270760096/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Update case priority returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 549, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 748, + "content": { + "mimeType": "application/vnd.api+json", + "size": 748, + "text": "{\"data\":{\"id\":\"09077090-4370-4539-b9e5-445173f4fced\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:44.06773183Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"09077090-4370-4539-b9e5-445173f4fced\",\"key\":\"DDFC-12\",\"priority\":\"P4\",\"public_id\":\"72\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:43.810Z", + "time": 297 + }, + { + "_id": "e2cc2f5678c10d2921fdc3df2edc80aa", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 58, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 597, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P1234\"},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/09077090-4370-4539-b9e5-445173f4fced/priority" + }, + "response": { + "bodySize": 120, + "content": { + "mimeType": "application/vnd.api+json", + "size": 120, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid priority P1234. Must be one of P3, P4, P5, NOT_DEFINED, P1, P2\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-02-07T18:00:44.112Z", + "time": 313 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Not-Found-response_1985619607/frozen.json b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Not-Found-response_1985619607/frozen.json new file mode 100644 index 00000000000..2546ec9213a --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Not-Found-response_1985619607/frozen.json @@ -0,0 +1 @@ +"2024-02-07T13:09:11.084Z" diff --git a/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Not-Found-response_1985619607/recording.har b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Not-Found-response_1985619607/recording.har new file mode 100644 index 00000000000..a436a3d5b16 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-Not-Found-response_1985619607/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Cases/Update case priority returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "fdf36d1e6b7ef1f0eaef3e8b96c7a303", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 55, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 599, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P3\"},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/67d80aa3-36ff-44b9-a694-c501a7591737/priority" + }, + "response": { + "bodySize": 67, + "content": { + "mimeType": "application/vnd.api+json", + "size": 67, + "text": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"case not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-02-07T13:09:11.087Z", + "time": 45 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Update-case-priority-returns-OK-response_1115539438/frozen.json b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-OK-response_1115539438/frozen.json new file mode 100644 index 00000000000..774eeb79bdf --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-OK-response_1115539438/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:44.433Z" diff --git a/cassettes/v2/Cases_2740177670/Update-case-priority-returns-OK-response_1115539438/recording.har b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-OK-response_1115539438/recording.har new file mode 100644 index 00000000000..dcdeb1b3d84 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-priority-returns-OK-response_1115539438/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Update case priority returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 749, + "content": { + "mimeType": "application/vnd.api+json", + "size": 749, + "text": "{\"data\":{\"id\":\"60fdb1eb-209a-4072-9db3-4d08a9c4180c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:44.723781245Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"60fdb1eb-209a-4072-9db3-4d08a9c4180c\",\"key\":\"DDFC-13\",\"priority\":\"P4\",\"public_id\":\"73\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:44.435Z", + "time": 331 + }, + { + "_id": "10019189077c6bb258201d3153e262b7", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 55, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 599, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P3\"},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/60fdb1eb-209a-4072-9db3-4d08a9c4180c/priority" + }, + "response": { + "bodySize": 873, + "content": { + "mimeType": "application/vnd.api+json", + "size": 873, + "text": "{\"data\":{\"id\":\"60fdb1eb-209a-4072-9db3-4d08a9c4180c\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:44.723781Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"60fdb1eb-209a-4072-9db3-4d08a9c4180c\",\"key\":\"DDFC-13\",\"modified_at\":\"2024-02-07T18:00:45.028076Z\",\"priority\":\"P3\",\"public_id\":\"73\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-02-07T18:00:44.770Z", + "time": 294 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Update-case-status-returns-Bad-Request-response_4072076838/frozen.json b/cassettes/v2/Cases_2740177670/Update-case-status-returns-Bad-Request-response_4072076838/frozen.json new file mode 100644 index 00000000000..68ada8be70d --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-status-returns-Bad-Request-response_4072076838/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:45.069Z" diff --git a/cassettes/v2/Cases_2740177670/Update-case-status-returns-Bad-Request-response_4072076838/recording.har b/cassettes/v2/Cases_2740177670/Update-case-status-returns-Bad-Request-response_4072076838/recording.har new file mode 100644 index 00000000000..07af7edee51 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-status-returns-Bad-Request-response_4072076838/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Update case status returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 749, + "content": { + "mimeType": "application/vnd.api+json", + "size": 749, + "text": "{\"data\":{\"id\":\"243feddb-69f8-4e22-988a-8ae954b643fa\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:45.265151303Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"243feddb-69f8-4e22-988a-8ae954b643fa\",\"key\":\"DDFC-14\",\"priority\":\"P4\",\"public_id\":\"74\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:45.071Z", + "time": 235 + }, + { + "_id": "c5f2d9862127f3dd8520055bb7d96b9e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 57, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 594, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"status\":\"OPENED\"},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/243feddb-69f8-4e22-988a-8ae954b643fa/status" + }, + "response": { + "bodySize": 123, + "content": { + "mimeType": "application/vnd.api+json", + "size": 123, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"invalid status OPENED. Must be one of CLOSED, SUNKNOWN, OPEN, IN_PROGRESS\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2024-02-07T18:00:45.312Z", + "time": 311 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Update-case-status-returns-Not-Found-response_3322612333/frozen.json b/cassettes/v2/Cases_2740177670/Update-case-status-returns-Not-Found-response_3322612333/frozen.json new file mode 100644 index 00000000000..43be461f658 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-status-returns-Not-Found-response_3322612333/frozen.json @@ -0,0 +1 @@ +"2024-02-07T13:09:11.471Z" diff --git a/cassettes/v2/Cases_2740177670/Update-case-status-returns-Not-Found-response_3322612333/recording.har b/cassettes/v2/Cases_2740177670/Update-case-status-returns-Not-Found-response_3322612333/recording.har new file mode 100644 index 00000000000..d3fcf156d86 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-status-returns-Not-Found-response_3322612333/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Cases/Update case status returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "eb9efabf11d1a48eae1379e6ed33a2fc", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 55, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 595, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"status\":\"OPEN\"},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/67d80aa3-36ff-44b9-a694-c501a7591737/status" + }, + "response": { + "bodySize": 67, + "content": { + "mimeType": "application/vnd.api+json", + "size": 67, + "text": "{\"errors\":[{\"code\":\"resource_not_found\",\"title\":\"case not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2024-02-07T13:09:11.473Z", + "time": 41 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Cases_2740177670/Update-case-status-returns-OK-response_35723180/frozen.json b/cassettes/v2/Cases_2740177670/Update-case-status-returns-OK-response_35723180/frozen.json new file mode 100644 index 00000000000..95b10d1a841 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-status-returns-OK-response_35723180/frozen.json @@ -0,0 +1 @@ +"2024-02-07T18:00:45.628Z" diff --git a/cassettes/v2/Cases_2740177670/Update-case-status-returns-OK-response_35723180/recording.har b/cassettes/v2/Cases_2740177670/Update-case-status-returns-OK-response_35723180/recording.har new file mode 100644 index 00000000000..f921a2fc506 --- /dev/null +++ b/cassettes/v2/Cases_2740177670/Update-case-status-returns-OK-response_35723180/recording.har @@ -0,0 +1,120 @@ +{ + "log": { + "_recordingName": "Cases/Update case status returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "0a6534d042f2507564f87ab28f449a8d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 195, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 550, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"priority\":\"P4\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases" + }, + "response": { + "bodySize": 749, + "content": { + "mimeType": "application/vnd.api+json", + "size": 749, + "text": "{\"data\":{\"id\":\"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:45.905784777Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b\",\"key\":\"DDFC-15\",\"priority\":\"P4\",\"public_id\":\"75\",\"status\":\"OPEN\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 640, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2024-02-07T18:00:45.630Z", + "time": 312 + }, + { + "_id": "2fa2347352a0ad7e0155a0f8fd387cf5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 62, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 595, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"status\":\"IN_PROGRESS\"},\"type\":\"case\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/cases/ceae478d-b504-4cb7-bad2-e8f8e5a0a77b/status" + }, + "response": { + "bodySize": 879, + "content": { + "mimeType": "application/vnd.api+json", + "size": 879, + "text": "{\"data\":{\"id\":\"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b\",\"type\":\"case\",\"attributes\":{\"attributes\":{},\"created_at\":\"2024-02-07T18:00:45.905785Z\",\"creation_source\":\"MANUAL\",\"description\":\"\",\"insights\":[],\"internal_id\":\"ceae478d-b504-4cb7-bad2-e8f8e5a0a77b\",\"key\":\"DDFC-15\",\"modified_at\":\"2024-02-07T18:00:46.22949Z\",\"priority\":\"P4\",\"public_id\":\"75\",\"status\":\"IN_PROGRESS\",\"title\":\"My new case\",\"type\":\"STANDARD\"},\"relationships\":{\"created_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"modified_by\":{\"data\":{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\"}},\"project\":{\"data\":{\"id\":\"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\"type\":\"project\"}}}},\"included\":[{\"id\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"type\":\"user\",\"attributes\":{\"email\":\"team-intg-tools-libs-spam@datadoghq.com\",\"handle\":\"9919ec9b-ebc7-49ee-8dc8-03626e717cca\",\"name\":\"CI Account\"}}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 641, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2024-02-07T18:00:45.949Z", + "time": 316 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/cases-projects/CreateProject.ts b/examples/v2/cases-projects/CreateProject.ts new file mode 100644 index 00000000000..f10656048af --- /dev/null +++ b/examples/v2/cases-projects/CreateProject.ts @@ -0,0 +1,29 @@ +/** + * Create a project returns "CREATED" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesProjectsApi(configuration); + +const params: v2.CasesProjectsApiCreateProjectRequest = { + body: { + data: { + attributes: { + key: "SEC", + name: "Security Investigation", + }, + type: "project", + }, + }, +}; + +apiInstance + .createProject(params) + .then((data: v2.ProjectResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases-projects/DeleteProject.ts b/examples/v2/cases-projects/DeleteProject.ts new file mode 100644 index 00000000000..5a7918363e7 --- /dev/null +++ b/examples/v2/cases-projects/DeleteProject.ts @@ -0,0 +1,21 @@ +/** + * Remove a project returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesProjectsApi(configuration); + +const params: v2.CasesProjectsApiDeleteProjectRequest = { + projectId: "project_id", +}; + +apiInstance + .deleteProject(params) + .then((data: any) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases-projects/GetProject.ts b/examples/v2/cases-projects/GetProject.ts new file mode 100644 index 00000000000..eeb418e01d9 --- /dev/null +++ b/examples/v2/cases-projects/GetProject.ts @@ -0,0 +1,21 @@ +/** + * Get the details of a project returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesProjectsApi(configuration); + +const params: v2.CasesProjectsApiGetProjectRequest = { + projectId: "project_id", +}; + +apiInstance + .getProject(params) + .then((data: v2.ProjectResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases-projects/GetProjects.ts b/examples/v2/cases-projects/GetProjects.ts new file mode 100644 index 00000000000..e99aed53f53 --- /dev/null +++ b/examples/v2/cases-projects/GetProjects.ts @@ -0,0 +1,17 @@ +/** + * Get all projects returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesProjectsApi(configuration); + +apiInstance + .getProjects() + .then((data: v2.ProjectsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases/ArchiveCase.ts b/examples/v2/cases/ArchiveCase.ts new file mode 100644 index 00000000000..aac7c128996 --- /dev/null +++ b/examples/v2/cases/ArchiveCase.ts @@ -0,0 +1,29 @@ +/** + * Archive case returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +// there is a valid "case" in the system +const CASE_ID = process.env.CASE_ID as string; + +const params: v2.CasesApiArchiveCaseRequest = { + body: { + data: { + type: "case", + }, + }, + caseId: CASE_ID, +}; + +apiInstance + .archiveCase(params) + .then((data: v2.CaseResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases/AssignCase.ts b/examples/v2/cases/AssignCase.ts new file mode 100644 index 00000000000..95c2ebfc9db --- /dev/null +++ b/examples/v2/cases/AssignCase.ts @@ -0,0 +1,35 @@ +/** + * Assign case returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +// there is a valid "case" in the system +const CASE_ID = process.env.CASE_ID as string; + +// there is a valid "user" in the system +const USER_DATA_ID = process.env.USER_DATA_ID as string; + +const params: v2.CasesApiAssignCaseRequest = { + body: { + data: { + attributes: { + assigneeId: USER_DATA_ID, + }, + type: "case", + }, + }, + caseId: CASE_ID, +}; + +apiInstance + .assignCase(params) + .then((data: v2.CaseResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases/CreateCase.ts b/examples/v2/cases/CreateCase.ts new file mode 100644 index 00000000000..7ac2c29e0a1 --- /dev/null +++ b/examples/v2/cases/CreateCase.ts @@ -0,0 +1,47 @@ +/** + * Create a case returns "CREATED" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +// there is a valid "user" in the system +const USER_DATA_ID = process.env.USER_DATA_ID as string; + +const params: v2.CasesApiCreateCaseRequest = { + body: { + data: { + attributes: { + priority: "NOT_DEFINED", + title: "Security breach investigation in 3dcc5b2ebf9bfb8f", + type: "STANDARD", + }, + relationships: { + assignee: { + data: { + id: USER_DATA_ID, + type: "user", + }, + }, + project: { + data: { + id: "d4bbe1af-f36e-42f1-87c1-493ca35c320e", + type: "project", + }, + }, + }, + type: "case", + }, + }, +}; + +apiInstance + .createCase(params) + .then((data: v2.CaseResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases/GetCase.ts b/examples/v2/cases/GetCase.ts new file mode 100644 index 00000000000..14a3dff5a1b --- /dev/null +++ b/examples/v2/cases/GetCase.ts @@ -0,0 +1,24 @@ +/** + * Get the details of a case returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +// there is a valid "case" in the system +const CASE_ID = process.env.CASE_ID as string; + +const params: v2.CasesApiGetCaseRequest = { + caseId: CASE_ID, +}; + +apiInstance + .getCase(params) + .then((data: v2.CaseResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases/SearchCases.ts b/examples/v2/cases/SearchCases.ts new file mode 100644 index 00000000000..6abbdfc111b --- /dev/null +++ b/examples/v2/cases/SearchCases.ts @@ -0,0 +1,17 @@ +/** + * Search cases returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +apiInstance + .searchCases() + .then((data: v2.CasesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases/SearchCases_3433960044.ts b/examples/v2/cases/SearchCases_3433960044.ts new file mode 100644 index 00000000000..a2a056ab008 --- /dev/null +++ b/examples/v2/cases/SearchCases_3433960044.ts @@ -0,0 +1,18 @@ +/** + * Search cases returns "OK" response with pagination + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +(async () => { + try { + for await (const item of apiInstance.searchCasesWithPagination()) { + console.log(item); + } + } catch (error) { + console.error(error); + } +})(); diff --git a/examples/v2/cases/UnarchiveCase.ts b/examples/v2/cases/UnarchiveCase.ts new file mode 100644 index 00000000000..5f5a1f34c3e --- /dev/null +++ b/examples/v2/cases/UnarchiveCase.ts @@ -0,0 +1,29 @@ +/** + * Unarchive case returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +// there is a valid "case" in the system +const CASE_ID = process.env.CASE_ID as string; + +const params: v2.CasesApiUnarchiveCaseRequest = { + body: { + data: { + type: "case", + }, + }, + caseId: CASE_ID, +}; + +apiInstance + .unarchiveCase(params) + .then((data: v2.CaseResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases/UnassignCase.ts b/examples/v2/cases/UnassignCase.ts new file mode 100644 index 00000000000..9c3970b81b0 --- /dev/null +++ b/examples/v2/cases/UnassignCase.ts @@ -0,0 +1,29 @@ +/** + * Unassign case returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +// there is a valid "case" in the system +const CASE_ID = process.env.CASE_ID as string; + +const params: v2.CasesApiUnassignCaseRequest = { + body: { + data: { + type: "case", + }, + }, + caseId: CASE_ID, +}; + +apiInstance + .unassignCase(params) + .then((data: v2.CaseResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases/UpdatePriority.ts b/examples/v2/cases/UpdatePriority.ts new file mode 100644 index 00000000000..1ee6c7c0ee8 --- /dev/null +++ b/examples/v2/cases/UpdatePriority.ts @@ -0,0 +1,32 @@ +/** + * Update case priority returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +// there is a valid "case" in the system +const CASE_ID = process.env.CASE_ID as string; + +const params: v2.CasesApiUpdatePriorityRequest = { + body: { + data: { + attributes: { + priority: "P3", + }, + type: "case", + }, + }, + caseId: CASE_ID, +}; + +apiInstance + .updatePriority(params) + .then((data: v2.CaseResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/cases/UpdateStatus.ts b/examples/v2/cases/UpdateStatus.ts new file mode 100644 index 00000000000..ff2055dde03 --- /dev/null +++ b/examples/v2/cases/UpdateStatus.ts @@ -0,0 +1,32 @@ +/** + * Update case status returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +const apiInstance = new v2.CasesApi(configuration); + +// there is a valid "case" in the system +const CASE_ID = process.env.CASE_ID as string; + +const params: v2.CasesApiUpdateStatusRequest = { + body: { + data: { + attributes: { + status: "IN_PROGRESS", + }, + type: "case", + }, + }, + caseId: CASE_ID, +}; + +apiInstance + .updateStatus(params) + .then((data: v2.CaseResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/features/support/scenarios_model_mapping.ts b/features/support/scenarios_model_mapping.ts index b9be85bb3aa..cad59fd7514 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -2701,6 +2701,133 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "AuthNMappingResponse", }, + "v2.SearchCases": { + "pageSize": { + "type": "number", + "format": "int64", + }, + "pageOffset": { + "type": "number", + "format": "int64", + }, + "sortField": { + "type": "CaseSortableField", + "format": "", + }, + "filter": { + "type": "string", + "format": "", + }, + "sortAsc": { + "type": "boolean", + "format": "", + }, + "operationResponseType": "CasesResponse", + }, + "v2.CreateCase": { + "body": { + "type": "CaseCreateRequest", + "format": "", + }, + "operationResponseType": "CaseResponse", + }, + "v2.GetCase": { + "caseId": { + "type": "string", + "format": "", + }, + "operationResponseType": "CaseResponse", + }, + "v2.ArchiveCase": { + "caseId": { + "type": "string", + "format": "", + }, + "body": { + "type": "CaseEmptyRequest", + "format": "", + }, + "operationResponseType": "CaseResponse", + }, + "v2.AssignCase": { + "caseId": { + "type": "string", + "format": "", + }, + "body": { + "type": "CaseAssignRequest", + "format": "", + }, + "operationResponseType": "CaseResponse", + }, + "v2.UpdatePriority": { + "caseId": { + "type": "string", + "format": "", + }, + "body": { + "type": "CaseUpdatePriorityRequest", + "format": "", + }, + "operationResponseType": "CaseResponse", + }, + "v2.UpdateStatus": { + "caseId": { + "type": "string", + "format": "", + }, + "body": { + "type": "CaseUpdateStatusRequest", + "format": "", + }, + "operationResponseType": "CaseResponse", + }, + "v2.UnarchiveCase": { + "caseId": { + "type": "string", + "format": "", + }, + "body": { + "type": "CaseEmptyRequest", + "format": "", + }, + "operationResponseType": "CaseResponse", + }, + "v2.UnassignCase": { + "caseId": { + "type": "string", + "format": "", + }, + "body": { + "type": "CaseEmptyRequest", + "format": "", + }, + "operationResponseType": "CaseResponse", + }, + "v2.GetProjects": { + "operationResponseType": "ProjectsResponse", + }, + "v2.CreateProject": { + "body": { + "type": "ProjectCreateRequest", + "format": "", + }, + "operationResponseType": "ProjectResponse", + }, + "v2.DeleteProject": { + "projectId": { + "type": "string", + "format": "", + }, + "operationResponseType": "void", + }, + "v2.GetProject": { + "projectId": { + "type": "string", + "format": "", + }, + "operationResponseType": "ProjectResponse", + }, "v2.CreateCIAppPipelineEvent": { "body": { "type": "CIAppCreatePipelineEventRequest", diff --git a/features/v2/cases.feature b/features/v2/cases.feature new file mode 100644 index 00000000000..5a0eca61555 --- /dev/null +++ b/features/v2/cases.feature @@ -0,0 +1,241 @@ +@endpoint(cases) @endpoint(cases-v2) +Feature: Cases + View and manage cases within Datadog + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Cases" API + + @team:DataDog/case-management + Scenario: Archive case returns "Bad Request" response + Given new "ArchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Archive case returns "Not Found" response + Given new "ArchiveCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Archive case returns "OK" response + Given new "ArchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Assign case returns "Bad Request" response + Given new "AssignCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"assignee_id": "invalid-uuid"}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Assign case returns "Not Found" response + Given new "AssignCase" request + And there is a valid "user" in the system + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"assignee_id": "{{user.data.id}}"}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Assign case returns "OK" response + Given new "AssignCase" request + And there is a valid "case" in the system + And there is a valid "user" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"assignee_id": "{{user.data.id}}"}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Create a case returns "Bad Request" response + Given new "CreateCase" request + And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "userx"}}, "project": {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Create a case returns "CREATED" response + Given new "CreateCase" request + And there is a valid "user" in the system + And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation in {{ unique_hash }}", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "{{user.data.id}}", "type": "user"} }, "project": {"data": {"id": "d4bbe1af-f36e-42f1-87c1-493ca35c320e", "type": "project"}}}, "type": "case"}} + When the request is sent + Then the response status is 201 CREATED + And the response "data" has field "id" + And the response "data.attributes.title" is equal to "Security breach investigation in {{ unique_hash }}" + And the response "data.attributes.type" is equal to "STANDARD" + And the response "data.attributes.priority" is equal to "NOT_DEFINED" + + @generated @skip @team:DataDog/case-management + Scenario: Create a case returns "Not Found" response + Given new "CreateCase" request + And body with value {"data": {"attributes": {"priority": "NOT_DEFINED", "title": "Security breach investigation", "type": "STANDARD"}, "relationships": {"assignee": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "user"}}, "project": {"data": {"id": "e555e290-ed65-49bd-ae18-8acbfcf18db7", "type": "project"}}}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @skip @team:DataDog/case-management + Scenario: Get the details of a case returns "Bad Request" response + Given new "GetCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Get the details of a case returns "Not Found" response + Given new "GetCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Get the details of a case returns "OK" response + Given new "GetCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management + Scenario: Search cases returns "Bad Request" response + Given new "SearchCases" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Search cases returns "Not Found" response + Given new "SearchCases" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Search cases returns "OK" response + Given new "SearchCases" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management @with-pagination + Scenario: Search cases returns "OK" response with pagination + Given new "SearchCases" request + When the request with pagination is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Unarchive case returns "Bad Request" response + Given new "UnarchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Unarchive case returns "Not Found" response + Given new "UnarchiveCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Unarchive case returns "OK" response + Given new "UnarchiveCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Unassign case returns "Bad Request" response + Given new "UnassignCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Unassign case returns "Not Found" response + Given new "UnassignCase" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Unassign case returns "OK" response + Given new "UnassignCase" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"type": "case"}} + When the request is sent + Then the response status is 200 OK + + @team:DataDog/case-management + Scenario: Update case priority returns "Bad Request" response + Given new "UpdatePriority" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"priority": "P1234"}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Update case priority returns "Not Found" response + Given new "UpdatePriority" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"priority": "P3"}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update case priority returns "OK" response + Given new "UpdatePriority" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"priority": "P3"}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.priority" is equal to "P3" + + @team:DataDog/case-management + Scenario: Update case status returns "Bad Request" response + Given new "UpdateStatus" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"status": "OPENED"}, "type": "case"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:DataDog/case-management + Scenario: Update case status returns "Not Found" response + Given new "UpdateStatus" request + And request contains "case_id" parameter with value "67d80aa3-36ff-44b9-a694-c501a7591737" + And body with value {"data": {"attributes": {"status": "OPEN"}, "type": "case"}} + When the request is sent + Then the response status is 404 Not Found + + @team:DataDog/case-management + Scenario: Update case status returns "OK" response + Given new "UpdateStatus" request + And there is a valid "case" in the system + And request contains "case_id" parameter from "case.id" + And body with value {"data": {"attributes": {"status": "IN_PROGRESS"}, "type": "case"}} + When the request is sent + Then the response status is 200 OK + And the response "data.attributes.status" is equal to "IN_PROGRESS" diff --git a/features/v2/cases_projects.feature b/features/v2/cases_projects.feature new file mode 100644 index 00000000000..1b3fe63e499 --- /dev/null +++ b/features/v2/cases_projects.feature @@ -0,0 +1,82 @@ +@endpoint(cases-projects) @endpoint(cases-projects-v2) +Feature: Cases Projects + View and manage project within Case Management + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "CasesProjects" API + + @generated @skip @team:DataDog/case-management + Scenario: Create a project returns "Bad Request" response + Given new "CreateProject" request + And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Create a project returns "CREATED" response + Given new "CreateProject" request + And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + When the request is sent + Then the response status is 201 CREATED + + @generated @skip @team:DataDog/case-management + Scenario: Create a project returns "Not Found" response + Given new "CreateProject" request + And body with value {"data": {"attributes": {"key": "SEC", "name": "Security Investigation"}, "type": "project"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get all projects returns "Bad Request" response + Given new "GetProjects" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Get all projects returns "Not Found" response + Given new "GetProjects" request + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get all projects returns "OK" response + Given new "GetProjects" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management + Scenario: Get the details of a project returns "Bad Request" response + Given new "GetProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/case-management + Scenario: Get the details of a project returns "Not Found" response + Given new "GetProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/case-management + Scenario: Get the details of a project returns "OK" response + Given new "GetProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/case-management + Scenario: Remove a project returns "API error response" response + Given new "DeleteProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 API error response + + @generated @skip @team:DataDog/case-management + Scenario: Remove a project returns "No Content" response + Given new "DeleteProject" request + And request contains "project_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content diff --git a/features/v2/given.json b/features/v2/given.json index da22a5fc35d..cbaee96cb71 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -59,6 +59,19 @@ "tag": "AuthN Mappings", "operationId": "CreateAuthNMapping" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"title\": \"My new case\",\n \"type\": \"STANDARD\",\n \"priority\": \"P4\"\n },\n \"relationships\": {\n \"project\": {\n \"data\": {\n \"id\": \"d4bbe1af-f36e-42f1-87c1-493ca35c320e\",\n \"type\": \"project\"\n }\n }\n },\n \"type\": \"case\"\n }\n}" + } + ], + "source": "data", + "step": "there is a valid \"case\" in the system", + "key": "case", + "tag": "Cases", + "operationId": "CreateCase" + }, { "parameters": [ { diff --git a/features/v2/undo.json b/features/v2/undo.json index 61d85e0fcad..1268756c9d2 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -220,6 +220,91 @@ "type": "idempotent" } }, + "SearchCases": { + "tag": "Cases", + "undo": { + "type": "safe" + } + }, + "CreateCase": { + "tag": "Cases", + "undo": { + "type": "safe" + } + }, + "GetProjects": { + "tag": "Cases Projects", + "undo": { + "type": "safe" + } + }, + "CreateProject": { + "tag": "Cases Projects", + "undo": { + "operationId": "DeleteProject", + "parameters": [ + { + "name": "project_id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteProject": { + "tag": "Cases Projects", + "undo": { + "type": "idempotent" + } + }, + "GetProject": { + "tag": "Cases Projects", + "undo": { + "type": "safe" + } + }, + "GetCase": { + "tag": "Cases", + "undo": { + "type": "safe" + } + }, + "ArchiveCase": { + "tag": "Cases", + "undo": { + "type": "idempotent" + } + }, + "AssignCase": { + "tag": "Cases", + "undo": { + "type": "idempotent" + } + }, + "UpdatePriority": { + "tag": "Cases", + "undo": { + "type": "idempotent" + } + }, + "UpdateStatus": { + "tag": "Cases", + "undo": { + "type": "idempotent" + } + }, + "UnarchiveCase": { + "tag": "Cases", + "undo": { + "type": "idempotent" + } + }, + "UnassignCase": { + "tag": "Cases", + "undo": { + "type": "idempotent" + } + }, "CreateCIAppPipelineEvent": { "tag": "CI Visibility Pipelines", "undo": { diff --git a/packages/datadog-api-client-v2/apis/CasesApi.ts b/packages/datadog-api-client-v2/apis/CasesApi.ts new file mode 100644 index 00000000000..8daee595648 --- /dev/null +++ b/packages/datadog-api-client-v2/apis/CasesApi.ts @@ -0,0 +1,1422 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { Case } from "../models/Case"; +import { CaseAssignRequest } from "../models/CaseAssignRequest"; +import { CaseCreateRequest } from "../models/CaseCreateRequest"; +import { CaseEmptyRequest } from "../models/CaseEmptyRequest"; +import { CaseResponse } from "../models/CaseResponse"; +import { CaseSortableField } from "../models/CaseSortableField"; +import { CasesResponse } from "../models/CasesResponse"; +import { CaseUpdatePriorityRequest } from "../models/CaseUpdatePriorityRequest"; +import { CaseUpdateStatusRequest } from "../models/CaseUpdateStatusRequest"; + +export class CasesApiRequestFactory extends BaseAPIRequestFactory { + public async archiveCase( + caseId: string, + body: CaseEmptyRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'caseId' is not null or undefined + if (caseId === null || caseId === undefined) { + throw new RequiredError("caseId", "archiveCase"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "archiveCase"); + } + + // Path Params + const localVarPath = "/api/v2/cases/{case_id}/archive".replace( + "{case_id}", + encodeURIComponent(String(caseId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesApi.archiveCase") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CaseEmptyRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async assignCase( + caseId: string, + body: CaseAssignRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'caseId' is not null or undefined + if (caseId === null || caseId === undefined) { + throw new RequiredError("caseId", "assignCase"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "assignCase"); + } + + // Path Params + const localVarPath = "/api/v2/cases/{case_id}/assign".replace( + "{case_id}", + encodeURIComponent(String(caseId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesApi.assignCase") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CaseAssignRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async createCase( + body: CaseCreateRequest, + _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", "createCase"); + } + + // Path Params + const localVarPath = "/api/v2/cases"; + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesApi.createCase") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CaseCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getCase( + caseId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'caseId' is not null or undefined + if (caseId === null || caseId === undefined) { + throw new RequiredError("caseId", "getCase"); + } + + // Path Params + const localVarPath = "/api/v2/cases/{case_id}".replace( + "{case_id}", + encodeURIComponent(String(caseId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesApi.getCase") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async searchCases( + pageSize?: number, + pageOffset?: number, + sortField?: CaseSortableField, + filter?: string, + sortAsc?: boolean, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/cases"; + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesApi.searchCases") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + ObjectSerializer.serialize(pageSize, "number", "int64") + ); + } + if (pageOffset !== undefined) { + requestContext.setQueryParam( + "page[offset]", + ObjectSerializer.serialize(pageOffset, "number", "int64") + ); + } + if (sortField !== undefined) { + requestContext.setQueryParam( + "sort[field]", + ObjectSerializer.serialize(sortField, "CaseSortableField", "") + ); + } + if (filter !== undefined) { + requestContext.setQueryParam( + "filter", + ObjectSerializer.serialize(filter, "string", "") + ); + } + if (sortAsc !== undefined) { + requestContext.setQueryParam( + "sort[asc]", + ObjectSerializer.serialize(sortAsc, "boolean", "") + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async unarchiveCase( + caseId: string, + body: CaseEmptyRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'caseId' is not null or undefined + if (caseId === null || caseId === undefined) { + throw new RequiredError("caseId", "unarchiveCase"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "unarchiveCase"); + } + + // Path Params + const localVarPath = "/api/v2/cases/{case_id}/unarchive".replace( + "{case_id}", + encodeURIComponent(String(caseId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesApi.unarchiveCase") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CaseEmptyRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async unassignCase( + caseId: string, + body: CaseEmptyRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'caseId' is not null or undefined + if (caseId === null || caseId === undefined) { + throw new RequiredError("caseId", "unassignCase"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "unassignCase"); + } + + // Path Params + const localVarPath = "/api/v2/cases/{case_id}/unassign".replace( + "{case_id}", + encodeURIComponent(String(caseId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesApi.unassignCase") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CaseEmptyRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updatePriority( + caseId: string, + body: CaseUpdatePriorityRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'caseId' is not null or undefined + if (caseId === null || caseId === undefined) { + throw new RequiredError("caseId", "updatePriority"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updatePriority"); + } + + // Path Params + const localVarPath = "/api/v2/cases/{case_id}/priority".replace( + "{case_id}", + encodeURIComponent(String(caseId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesApi.updatePriority") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CaseUpdatePriorityRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async updateStatus( + caseId: string, + body: CaseUpdateStatusRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'caseId' is not null or undefined + if (caseId === null || caseId === undefined) { + throw new RequiredError("caseId", "updateStatus"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateStatus"); + } + + // Path Params + const localVarPath = "/api/v2/cases/{case_id}/status".replace( + "{case_id}", + encodeURIComponent(String(caseId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesApi.updateStatus") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "CaseUpdateStatusRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class CasesApiResponseProcessor { + /** + * 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 archiveCase + * @throws ApiException if the response code was not in [200, 299] + */ + public async archiveCase(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse" + ) as CaseResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse", + "" + ) as CaseResponse; + 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 assignCase + * @throws ApiException if the response code was not in [200, 299] + */ + public async assignCase(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse" + ) as CaseResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse", + "" + ) as CaseResponse; + 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 createCase + * @throws ApiException if the response code was not in [200, 299] + */ + public async createCase(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 201) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse" + ) as CaseResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse", + "" + ) as CaseResponse; + 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 getCase + * @throws ApiException if the response code was not in [200, 299] + */ + public async getCase(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse" + ) as CaseResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse", + "" + ) as CaseResponse; + 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 searchCases + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchCases(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: CasesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CasesResponse" + ) as CasesResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CasesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CasesResponse", + "" + ) as CasesResponse; + 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 unarchiveCase + * @throws ApiException if the response code was not in [200, 299] + */ + public async unarchiveCase(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse" + ) as CaseResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse", + "" + ) as CaseResponse; + 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 unassignCase + * @throws ApiException if the response code was not in [200, 299] + */ + public async unassignCase(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse" + ) as CaseResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse", + "" + ) as CaseResponse; + 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 updatePriority + * @throws ApiException if the response code was not in [200, 299] + */ + public async updatePriority( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse" + ) as CaseResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse", + "" + ) as CaseResponse; + 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 updateStatus + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateStatus(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse" + ) as CaseResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: CaseResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "CaseResponse", + "" + ) as CaseResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface CasesApiArchiveCaseRequest { + /** + * Case's UUID or key + * @type string + */ + caseId: string; + /** + * Archive case payload + * @type CaseEmptyRequest + */ + body: CaseEmptyRequest; +} + +export interface CasesApiAssignCaseRequest { + /** + * Case's UUID or key + * @type string + */ + caseId: string; + /** + * Assign case payload + * @type CaseAssignRequest + */ + body: CaseAssignRequest; +} + +export interface CasesApiCreateCaseRequest { + /** + * Case payload + * @type CaseCreateRequest + */ + body: CaseCreateRequest; +} + +export interface CasesApiGetCaseRequest { + /** + * Case's UUID or key + * @type string + */ + caseId: string; +} + +export interface CasesApiSearchCasesRequest { + /** + * Size for a given page. The maximum allowed value is 100. + * @type number + */ + pageSize?: number; + /** + * Specific offset to use as the beginning of the returned page. + * @type number + */ + pageOffset?: number; + /** + * Specify which field to sort + * @type CaseSortableField + */ + sortField?: CaseSortableField; + /** + * Search query + * @type string + */ + filter?: string; + /** + * Specify if order is ascending or not + * @type boolean + */ + sortAsc?: boolean; +} + +export interface CasesApiUnarchiveCaseRequest { + /** + * Case's UUID or key + * @type string + */ + caseId: string; + /** + * Unarchive case payload + * @type CaseEmptyRequest + */ + body: CaseEmptyRequest; +} + +export interface CasesApiUnassignCaseRequest { + /** + * Case's UUID or key + * @type string + */ + caseId: string; + /** + * Unassign case payload + * @type CaseEmptyRequest + */ + body: CaseEmptyRequest; +} + +export interface CasesApiUpdatePriorityRequest { + /** + * Case's UUID or key + * @type string + */ + caseId: string; + /** + * Case priority update payload + * @type CaseUpdatePriorityRequest + */ + body: CaseUpdatePriorityRequest; +} + +export interface CasesApiUpdateStatusRequest { + /** + * Case's UUID or key + * @type string + */ + caseId: string; + /** + * Case status update payload + * @type CaseUpdateStatusRequest + */ + body: CaseUpdateStatusRequest; +} + +export class CasesApi { + private requestFactory: CasesApiRequestFactory; + private responseProcessor: CasesApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: CasesApiRequestFactory, + responseProcessor?: CasesApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new CasesApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new CasesApiResponseProcessor(); + } + + /** + * Archive case + * @param param The request object + */ + public archiveCase( + param: CasesApiArchiveCaseRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.archiveCase( + param.caseId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.archiveCase(responseContext); + }); + }); + } + + /** + * Assign case to a user + * @param param The request object + */ + public assignCase( + param: CasesApiAssignCaseRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.assignCase( + param.caseId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.assignCase(responseContext); + }); + }); + } + + /** + * Create a Case + * @param param The request object + */ + public createCase( + param: CasesApiCreateCaseRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createCase( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createCase(responseContext); + }); + }); + } + + /** + * Get the details of case by `case_id` + * @param param The request object + */ + public getCase( + param: CasesApiGetCaseRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getCase( + param.caseId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getCase(responseContext); + }); + }); + } + + /** + * Search cases. + * @param param The request object + */ + public searchCases( + param: CasesApiSearchCasesRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.searchCases( + param.pageSize, + param.pageOffset, + param.sortField, + param.filter, + param.sortAsc, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.searchCases(responseContext); + }); + }); + } + + /** + * Provide a paginated version of searchCases returning a generator with all the items. + */ + public async *searchCasesWithPagination( + param: CasesApiSearchCasesRequest = {}, + options?: Configuration + ): AsyncGenerator { + let pageSize = 10; + if (param.pageSize !== undefined) { + pageSize = param.pageSize; + } + param.pageSize = pageSize; + while (true) { + const requestContext = await this.requestFactory.searchCases( + param.pageSize, + param.pageOffset, + param.sortField, + param.filter, + param.sortAsc, + options + ); + const responseContext = await this.configuration.httpApi.send( + requestContext + ); + + const response = await this.responseProcessor.searchCases( + responseContext + ); + const responseData = response.data; + if (responseData === undefined) { + break; + } + const results = responseData; + for (const item of results) { + yield item; + } + if (results.length < pageSize) { + break; + } + if (param.pageOffset === undefined) { + param.pageOffset = pageSize; + } else { + param.pageOffset = param.pageOffset + pageSize; + } + } + } + + /** + * Unarchive case + * @param param The request object + */ + public unarchiveCase( + param: CasesApiUnarchiveCaseRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.unarchiveCase( + param.caseId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.unarchiveCase(responseContext); + }); + }); + } + + /** + * Unassign case + * @param param The request object + */ + public unassignCase( + param: CasesApiUnassignCaseRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.unassignCase( + param.caseId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.unassignCase(responseContext); + }); + }); + } + + /** + * Update case priority + * @param param The request object + */ + public updatePriority( + param: CasesApiUpdatePriorityRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updatePriority( + param.caseId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updatePriority(responseContext); + }); + }); + } + + /** + * Update case status + * @param param The request object + */ + public updateStatus( + param: CasesApiUpdateStatusRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.updateStatus( + param.caseId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateStatus(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/apis/CasesProjectsApi.ts b/packages/datadog-api-client-v2/apis/CasesProjectsApi.ts new file mode 100644 index 00000000000..9418fd6cd5f --- /dev/null +++ b/packages/datadog-api-client-v2/apis/CasesProjectsApi.ts @@ -0,0 +1,525 @@ +import { + BaseAPIRequestFactory, + RequiredError, +} from "../../datadog-api-client-common/baseapi"; +import { + Configuration, + applySecurityAuthentication, +} from "../../datadog-api-client-common/configuration"; +import { + RequestContext, + HttpMethod, + ResponseContext, +} from "../../datadog-api-client-common/http/http"; + +import { logger } from "../../../logger"; +import { ObjectSerializer } from "../models/ObjectSerializer"; +import { ApiException } from "../../datadog-api-client-common/exception"; + +import { APIErrorResponse } from "../models/APIErrorResponse"; +import { ProjectCreateRequest } from "../models/ProjectCreateRequest"; +import { ProjectResponse } from "../models/ProjectResponse"; +import { ProjectsResponse } from "../models/ProjectsResponse"; + +export class CasesProjectsApiRequestFactory extends BaseAPIRequestFactory { + public async createProject( + body: ProjectCreateRequest, + _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", "createProject"); + } + + // Path Params + const localVarPath = "/api/v2/cases/projects"; + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesProjectsApi.createProject") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "ProjectCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async deleteProject( + projectId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'projectId' is not null or undefined + if (projectId === null || projectId === undefined) { + throw new RequiredError("projectId", "deleteProject"); + } + + // Path Params + const localVarPath = "/api/v2/cases/projects/{project_id}".replace( + "{project_id}", + encodeURIComponent(String(projectId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesProjectsApi.deleteProject") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getProject( + projectId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'projectId' is not null or undefined + if (projectId === null || projectId === undefined) { + throw new RequiredError("projectId", "getProject"); + } + + // Path Params + const localVarPath = "/api/v2/cases/projects/{project_id}".replace( + "{project_id}", + encodeURIComponent(String(projectId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesProjectsApi.getProject") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async getProjects(_options?: Configuration): Promise { + const _config = _options || this.configuration; + + // Path Params + const localVarPath = "/api/v2/cases/projects"; + + // Make Request Context + const requestContext = _config + .getServer("v2.CasesProjectsApi.getProjects") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "AuthZ", + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } +} + +export class CasesProjectsApiResponseProcessor { + /** + * 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 createProject + * @throws ApiException if the response code was not in [200, 299] + */ + public async createProject( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 201) { + const body: ProjectResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ProjectResponse" + ) as ProjectResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ProjectResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ProjectResponse", + "" + ) as ProjectResponse; + 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 deleteProject + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteProject(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 204) { + return; + } + if ( + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: void = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "void", + "" + ) as void; + 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 getProject + * @throws ApiException if the response code was not in [200, 299] + */ + public async getProject(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: ProjectResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ProjectResponse" + ) as ProjectResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ProjectResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ProjectResponse", + "" + ) as ProjectResponse; + 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 getProjects + * @throws ApiException if the response code was not in [200, 299] + */ + public async getProjects( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode == 200) { + const body: ProjectsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ProjectsResponse" + ) as ProjectsResponse; + return body; + } + if ( + response.httpStatusCode == 400 || + response.httpStatusCode == 401 || + response.httpStatusCode == 403 || + response.httpStatusCode == 404 || + response.httpStatusCode == 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: ProjectsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "ProjectsResponse", + "" + ) as ProjectsResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface CasesProjectsApiCreateProjectRequest { + /** + * Project payload + * @type ProjectCreateRequest + */ + body: ProjectCreateRequest; +} + +export interface CasesProjectsApiDeleteProjectRequest { + /** + * Project UUID + * @type string + */ + projectId: string; +} + +export interface CasesProjectsApiGetProjectRequest { + /** + * Project UUID + * @type string + */ + projectId: string; +} + +export class CasesProjectsApi { + private requestFactory: CasesProjectsApiRequestFactory; + private responseProcessor: CasesProjectsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: CasesProjectsApiRequestFactory, + responseProcessor?: CasesProjectsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new CasesProjectsApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new CasesProjectsApiResponseProcessor(); + } + + /** + * Create a project. + * @param param The request object + */ + public createProject( + param: CasesProjectsApiCreateProjectRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createProject( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createProject(responseContext); + }); + }); + } + + /** + * Remove a project using the project's `id`. + * @param param The request object + */ + public deleteProject( + param: CasesProjectsApiDeleteProjectRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteProject( + param.projectId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteProject(responseContext); + }); + }); + } + + /** + * Get the details of a project by `project_id`. + * @param param The request object + */ + public getProject( + param: CasesProjectsApiGetProjectRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.getProject( + param.projectId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getProject(responseContext); + }); + }); + } + + /** + * Get all projects. + * @param param The request object + */ + public getProjects(options?: Configuration): Promise { + const requestContextPromise = this.requestFactory.getProjects(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getProjects(responseContext); + }); + }); + } +} diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index d059becf63c..dda0957ecfc 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -45,6 +45,26 @@ export { CIVisibilityTestsApi, } from "./apis/CIVisibilityTestsApi"; +export { + CasesApiArchiveCaseRequest, + CasesApiAssignCaseRequest, + CasesApiCreateCaseRequest, + CasesApiGetCaseRequest, + CasesApiSearchCasesRequest, + CasesApiUnarchiveCaseRequest, + CasesApiUnassignCaseRequest, + CasesApiUpdatePriorityRequest, + CasesApiUpdateStatusRequest, + CasesApi, +} from "./apis/CasesApi"; + +export { + CasesProjectsApiCreateProjectRequest, + CasesProjectsApiDeleteProjectRequest, + CasesProjectsApiGetProjectRequest, + CasesProjectsApi, +} from "./apis/CasesProjectsApi"; + export { CloudCostManagementApiCreateCostAWSCURConfigRequest, CloudCostManagementApiCreateCostAzureUCConfigsRequest, @@ -566,6 +586,34 @@ export { BulkMuteFindingsRequestMetaFindings } from "./models/BulkMuteFindingsRe export { BulkMuteFindingsRequestProperties } from "./models/BulkMuteFindingsRequestProperties"; export { BulkMuteFindingsResponse } from "./models/BulkMuteFindingsResponse"; export { BulkMuteFindingsResponseData } from "./models/BulkMuteFindingsResponseData"; +export { Case } from "./models/Case"; +export { Case3rdPartyTicketStatus } from "./models/Case3rdPartyTicketStatus"; +export { CaseAssign } from "./models/CaseAssign"; +export { CaseAssignAttributes } from "./models/CaseAssignAttributes"; +export { CaseAssignRequest } from "./models/CaseAssignRequest"; +export { CaseAttributes } from "./models/CaseAttributes"; +export { CaseCreate } from "./models/CaseCreate"; +export { CaseCreateAttributes } from "./models/CaseCreateAttributes"; +export { CaseCreateRelationships } from "./models/CaseCreateRelationships"; +export { CaseCreateRequest } from "./models/CaseCreateRequest"; +export { CaseEmpty } from "./models/CaseEmpty"; +export { CaseEmptyRequest } from "./models/CaseEmptyRequest"; +export { CasePriority } from "./models/CasePriority"; +export { CaseRelationships } from "./models/CaseRelationships"; +export { CaseResourceType } from "./models/CaseResourceType"; +export { CaseResponse } from "./models/CaseResponse"; +export { CaseSortableField } from "./models/CaseSortableField"; +export { CasesResponse } from "./models/CasesResponse"; +export { CasesResponseMeta } from "./models/CasesResponseMeta"; +export { CasesResponseMetaPagination } from "./models/CasesResponseMetaPagination"; +export { CaseStatus } from "./models/CaseStatus"; +export { CaseType } from "./models/CaseType"; +export { CaseUpdatePriority } from "./models/CaseUpdatePriority"; +export { CaseUpdatePriorityAttributes } from "./models/CaseUpdatePriorityAttributes"; +export { CaseUpdatePriorityRequest } from "./models/CaseUpdatePriorityRequest"; +export { CaseUpdateStatus } from "./models/CaseUpdateStatus"; +export { CaseUpdateStatusAttributes } from "./models/CaseUpdateStatusAttributes"; +export { CaseUpdateStatusRequest } from "./models/CaseUpdateStatusRequest"; export { ChargebackBreakdown } from "./models/ChargebackBreakdown"; export { CIAppAggregateBucketValue } from "./models/CIAppAggregateBucketValue"; export { CIAppAggregateBucketValueTimeseriesPoint } from "./models/CIAppAggregateBucketValueTimeseriesPoint"; @@ -1018,6 +1066,8 @@ export { IPAllowlistType } from "./models/IPAllowlistType"; export { IPAllowlistUpdateRequest } from "./models/IPAllowlistUpdateRequest"; export { JiraIntegrationMetadata } from "./models/JiraIntegrationMetadata"; export { JiraIntegrationMetadataIssuesItem } from "./models/JiraIntegrationMetadataIssuesItem"; +export { JiraIssue } from "./models/JiraIssue"; +export { JiraIssueResult } from "./models/JiraIssueResult"; export { JSONAPIErrorItem } from "./models/JSONAPIErrorItem"; export { JSONAPIErrorResponse } from "./models/JSONAPIErrorResponse"; export { ListApplicationKeysResponse } from "./models/ListApplicationKeysResponse"; @@ -1194,6 +1244,8 @@ export { MonthlyCostAttributionPagination } from "./models/MonthlyCostAttributio export { MonthlyCostAttributionResponse } from "./models/MonthlyCostAttributionResponse"; export { NullableRelationshipToUser } from "./models/NullableRelationshipToUser"; export { NullableRelationshipToUserData } from "./models/NullableRelationshipToUserData"; +export { NullableUserRelationship } from "./models/NullableUserRelationship"; +export { NullableUserRelationshipData } from "./models/NullableUserRelationshipData"; export { OktaAccount } from "./models/OktaAccount"; export { OktaAccountAttributes } from "./models/OktaAccountAttributes"; export { OktaAccountRequest } from "./models/OktaAccountRequest"; @@ -1269,10 +1321,21 @@ export { ProcessSummariesResponse } from "./models/ProcessSummariesResponse"; export { ProcessSummary } from "./models/ProcessSummary"; export { ProcessSummaryAttributes } from "./models/ProcessSummaryAttributes"; export { ProcessSummaryType } from "./models/ProcessSummaryType"; +export { Project } from "./models/Project"; +export { ProjectAttributes } from "./models/ProjectAttributes"; +export { ProjectCreate } from "./models/ProjectCreate"; +export { ProjectCreateAttributes } from "./models/ProjectCreateAttributes"; +export { ProjectCreateRequest } from "./models/ProjectCreateRequest"; export { ProjectedCost } from "./models/ProjectedCost"; export { ProjectedCostAttributes } from "./models/ProjectedCostAttributes"; export { ProjectedCostResponse } from "./models/ProjectedCostResponse"; export { ProjectedCostType } from "./models/ProjectedCostType"; +export { ProjectRelationship } from "./models/ProjectRelationship"; +export { ProjectRelationshipData } from "./models/ProjectRelationshipData"; +export { ProjectRelationships } from "./models/ProjectRelationships"; +export { ProjectResourceType } from "./models/ProjectResourceType"; +export { ProjectResponse } from "./models/ProjectResponse"; +export { ProjectsResponse } from "./models/ProjectsResponse"; export { QueryFormula } from "./models/QueryFormula"; export { QuerySortOrder } from "./models/QuerySortOrder"; export { RelationshipToIncidentAttachment } from "./models/RelationshipToIncidentAttachment"; @@ -1631,6 +1694,8 @@ export { ServiceDefinitionV2Repo } from "./models/ServiceDefinitionV2Repo"; export { ServiceDefinitionV2Slack } from "./models/ServiceDefinitionV2Slack"; export { ServiceDefinitionV2SlackType } from "./models/ServiceDefinitionV2SlackType"; export { ServiceDefinitionV2Version } from "./models/ServiceDefinitionV2Version"; +export { ServiceNowTicket } from "./models/ServiceNowTicket"; +export { ServiceNowTicketResult } from "./models/ServiceNowTicketResult"; export { SlackIntegrationMetadata } from "./models/SlackIntegrationMetadata"; export { SlackIntegrationMetadataChannelItem } from "./models/SlackIntegrationMetadataChannelItem"; export { SortDirection } from "./models/SortDirection"; @@ -1765,10 +1830,13 @@ export { UserInvitationResponseData } from "./models/UserInvitationResponseData" export { UserInvitationsRequest } from "./models/UserInvitationsRequest"; export { UserInvitationsResponse } from "./models/UserInvitationsResponse"; export { UserInvitationsType } from "./models/UserInvitationsType"; +export { UserRelationshipData } from "./models/UserRelationshipData"; export { UserRelationships } from "./models/UserRelationships"; +export { UserResourceType } from "./models/UserResourceType"; export { UserResponse } from "./models/UserResponse"; export { UserResponseIncludedItem } from "./models/UserResponseIncludedItem"; export { UserResponseRelationships } from "./models/UserResponseRelationships"; +export { UsersRelationship } from "./models/UsersRelationship"; export { UsersResponse } from "./models/UsersResponse"; export { UsersType } from "./models/UsersType"; export { UserTeam } from "./models/UserTeam"; diff --git a/packages/datadog-api-client-v2/models/Case.ts b/packages/datadog-api-client-v2/models/Case.ts new file mode 100644 index 00000000000..76b887d523a --- /dev/null +++ b/packages/datadog-api-client-v2/models/Case.ts @@ -0,0 +1,71 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseAttributes } from "./CaseAttributes"; +import { CaseRelationships } from "./CaseRelationships"; +import { CaseResourceType } from "./CaseResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A case + */ +export class Case { + /** + * Case attributes + */ + "attributes": CaseAttributes; + /** + * Case's identifier + */ + "id": string; + /** + * Resources related to a case + */ + "relationships"?: CaseRelationships; + /** + * Case resource type + */ + "type": CaseResourceType; + + /** + * @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, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return Case.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/Case3rdPartyTicketStatus.ts b/packages/datadog-api-client-v2/models/Case3rdPartyTicketStatus.ts new file mode 100644 index 00000000000..f7a9d374bf9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/Case3rdPartyTicketStatus.ts @@ -0,0 +1,20 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * 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/packages/datadog-api-client-v2/models/CaseAssign.ts b/packages/datadog-api-client-v2/models/CaseAssign.ts new file mode 100644 index 00000000000..d2bfcc788d0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseAssign.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseAssignAttributes } from "./CaseAssignAttributes"; +import { CaseResourceType } from "./CaseResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case assign + */ +export class CaseAssign { + /** + * Case assign attributes + */ + "attributes": CaseAssignAttributes; + /** + * Case resource type + */ + "type": CaseResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "CaseAssignAttributes", + required: true, + }, + type: { + baseName: "type", + type: "CaseResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseAssign.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseAssignAttributes.ts b/packages/datadog-api-client-v2/models/CaseAssignAttributes.ts new file mode 100644 index 00000000000..968c0c3722c --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseAssignAttributes.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case assign attributes + */ +export class CaseAssignAttributes { + /** + * Assignee's UUID + */ + "assigneeId": string; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + assigneeId: { + baseName: "assignee_id", + type: "string", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseAssignAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseAssignRequest.ts b/packages/datadog-api-client-v2/models/CaseAssignRequest.ts new file mode 100644 index 00000000000..9b9abfc896c --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseAssignRequest.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseAssign } from "./CaseAssign"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case assign request + */ +export class CaseAssignRequest { + /** + * Case assign + */ + "data": CaseAssign; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CaseAssign", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseAssignRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseAttributes.ts b/packages/datadog-api-client-v2/models/CaseAttributes.ts new file mode 100644 index 00000000000..accd97c5435 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseAttributes.ts @@ -0,0 +1,138 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CasePriority } from "./CasePriority"; +import { CaseStatus } from "./CaseStatus"; +import { CaseType } from "./CaseType"; +import { JiraIssue } from "./JiraIssue"; +import { ServiceNowTicket } from "./ServiceNowTicket"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case attributes + */ +export class CaseAttributes { + /** + * 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; + /** + * 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; + + /** + * @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", + }, + 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", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseCreate.ts b/packages/datadog-api-client-v2/models/CaseCreate.ts new file mode 100644 index 00000000000..c6241515f79 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseCreate.ts @@ -0,0 +1,62 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseCreateAttributes } from "./CaseCreateAttributes"; +import { CaseCreateRelationships } from "./CaseCreateRelationships"; +import { CaseResourceType } from "./CaseResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case creation data + */ +export class CaseCreate { + /** + * Case creation attributes + */ + "attributes": CaseCreateAttributes; + /** + * Relationships formed with the case on creation + */ + "relationships"?: CaseCreateRelationships; + /** + * Case resource type + */ + "type": CaseResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "CaseCreateAttributes", + required: true, + }, + relationships: { + baseName: "relationships", + type: "CaseCreateRelationships", + }, + type: { + baseName: "type", + type: "CaseResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseCreateAttributes.ts b/packages/datadog-api-client-v2/models/CaseCreateAttributes.ts new file mode 100644 index 00000000000..f1be8d577a8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseCreateAttributes.ts @@ -0,0 +1,69 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CasePriority } from "./CasePriority"; +import { CaseType } from "./CaseType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case creation attributes + */ +export class CaseCreateAttributes { + /** + * Description + */ + "description"?: string; + /** + * Case priority + */ + "priority"?: CasePriority; + /** + * Title + */ + "title": string; + /** + * Case type + */ + "type": CaseType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + }, + priority: { + baseName: "priority", + type: "CasePriority", + }, + title: { + baseName: "title", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "CaseType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseCreateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseCreateRelationships.ts b/packages/datadog-api-client-v2/models/CaseCreateRelationships.ts new file mode 100644 index 00000000000..8b67a8c0d0e --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseCreateRelationships.ts @@ -0,0 +1,52 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { NullableUserRelationship } from "./NullableUserRelationship"; +import { ProjectRelationship } from "./ProjectRelationship"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationships formed with the case on creation + */ +export class CaseCreateRelationships { + /** + * Relationship to user. + */ + "assignee"?: NullableUserRelationship; + /** + * Relationship to project + */ + "project": ProjectRelationship; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + assignee: { + baseName: "assignee", + type: "NullableUserRelationship", + }, + project: { + baseName: "project", + type: "ProjectRelationship", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseCreateRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseCreateRequest.ts b/packages/datadog-api-client-v2/models/CaseCreateRequest.ts new file mode 100644 index 00000000000..457b340b9d4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseCreateRequest.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseCreate } from "./CaseCreate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case create request + */ +export class CaseCreateRequest { + /** + * Case creation data + */ + "data": CaseCreate; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CaseCreate", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseEmpty.ts b/packages/datadog-api-client-v2/models/CaseEmpty.ts new file mode 100644 index 00000000000..fba130d9c49 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseEmpty.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseResourceType } from "./CaseResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case empty request data + */ +export class CaseEmpty { + /** + * Case resource type + */ + "type": CaseResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + type: { + baseName: "type", + type: "CaseResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseEmpty.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseEmptyRequest.ts b/packages/datadog-api-client-v2/models/CaseEmptyRequest.ts new file mode 100644 index 00000000000..6cfcd40f15a --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseEmptyRequest.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseEmpty } from "./CaseEmpty"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case empty request + */ +export class CaseEmptyRequest { + /** + * Case empty request data + */ + "data": CaseEmpty; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CaseEmpty", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseEmptyRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CasePriority.ts b/packages/datadog-api-client-v2/models/CasePriority.ts new file mode 100644 index 00000000000..1ef61f834cc --- /dev/null +++ b/packages/datadog-api-client-v2/models/CasePriority.ts @@ -0,0 +1,26 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * 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/packages/datadog-api-client-v2/models/CaseRelationships.ts b/packages/datadog-api-client-v2/models/CaseRelationships.ts new file mode 100644 index 00000000000..fe5a6f791d7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseRelationships.ts @@ -0,0 +1,67 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { NullableUserRelationship } from "./NullableUserRelationship"; +import { ProjectRelationship } from "./ProjectRelationship"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * 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; + + /** + * @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", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseResourceType.ts b/packages/datadog-api-client-v2/models/CaseResourceType.ts new file mode 100644 index 00000000000..74a432108cd --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseResourceType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Case resource type + */ + +export type CaseResourceType = typeof CASE | UnparsedObject; +export const CASE = "case"; diff --git a/packages/datadog-api-client-v2/models/CaseResponse.ts b/packages/datadog-api-client-v2/models/CaseResponse.ts new file mode 100644 index 00000000000..ad191c90624 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseResponse.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Case } from "./Case"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case response + */ +export class CaseResponse { + /** + * A case + */ + "data"?: Case; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Case", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseSortableField.ts b/packages/datadog-api-client-v2/models/CaseSortableField.ts new file mode 100644 index 00000000000..6939f4e41c0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseSortableField.ts @@ -0,0 +1,20 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Case field that can be sorted on + */ + +export type CaseSortableField = + | typeof CREATED_AT + | typeof PRIORITY + | typeof STATUS + | UnparsedObject; +export const CREATED_AT = "created_at"; +export const PRIORITY = "priority"; +export const STATUS = "status"; diff --git a/packages/datadog-api-client-v2/models/CaseStatus.ts b/packages/datadog-api-client-v2/models/CaseStatus.ts new file mode 100644 index 00000000000..0631226cf42 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseStatus.ts @@ -0,0 +1,20 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * 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/packages/datadog-api-client-v2/models/CaseType.ts b/packages/datadog-api-client-v2/models/CaseType.ts new file mode 100644 index 00000000000..fd1f876d140 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Case type + */ + +export type CaseType = typeof STANDARD | UnparsedObject; +export const STANDARD = "STANDARD"; diff --git a/packages/datadog-api-client-v2/models/CaseUpdatePriority.ts b/packages/datadog-api-client-v2/models/CaseUpdatePriority.ts new file mode 100644 index 00000000000..c8991c5e7ce --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseUpdatePriority.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseResourceType } from "./CaseResourceType"; +import { CaseUpdatePriorityAttributes } from "./CaseUpdatePriorityAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case priority status + */ +export class CaseUpdatePriority { + /** + * Case update priority attributes + */ + "attributes": CaseUpdatePriorityAttributes; + /** + * Case resource type + */ + "type": CaseResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "CaseUpdatePriorityAttributes", + required: true, + }, + type: { + baseName: "type", + type: "CaseResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseUpdatePriority.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseUpdatePriorityAttributes.ts b/packages/datadog-api-client-v2/models/CaseUpdatePriorityAttributes.ts new file mode 100644 index 00000000000..b1b99c9ebbb --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseUpdatePriorityAttributes.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CasePriority } from "./CasePriority"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case update priority attributes + */ +export class CaseUpdatePriorityAttributes { + /** + * Case priority + */ + "priority": CasePriority; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + priority: { + baseName: "priority", + type: "CasePriority", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseUpdatePriorityAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseUpdatePriorityRequest.ts b/packages/datadog-api-client-v2/models/CaseUpdatePriorityRequest.ts new file mode 100644 index 00000000000..e9594d88ce4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseUpdatePriorityRequest.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseUpdatePriority } from "./CaseUpdatePriority"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case update priority request + */ +export class CaseUpdatePriorityRequest { + /** + * Case priority status + */ + "data": CaseUpdatePriority; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CaseUpdatePriority", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseUpdatePriorityRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseUpdateStatus.ts b/packages/datadog-api-client-v2/models/CaseUpdateStatus.ts new file mode 100644 index 00000000000..8688f0feb69 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseUpdateStatus.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseResourceType } from "./CaseResourceType"; +import { CaseUpdateStatusAttributes } from "./CaseUpdateStatusAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case update status + */ +export class CaseUpdateStatus { + /** + * Case update status attributes + */ + "attributes": CaseUpdateStatusAttributes; + /** + * Case resource type + */ + "type": CaseResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "CaseUpdateStatusAttributes", + required: true, + }, + type: { + baseName: "type", + type: "CaseResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseUpdateStatus.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseUpdateStatusAttributes.ts b/packages/datadog-api-client-v2/models/CaseUpdateStatusAttributes.ts new file mode 100644 index 00000000000..d5ba38a4315 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseUpdateStatusAttributes.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseStatus } from "./CaseStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case update status attributes + */ +export class CaseUpdateStatusAttributes { + /** + * Case status + */ + "status": CaseStatus; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + status: { + baseName: "status", + type: "CaseStatus", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseUpdateStatusAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CaseUpdateStatusRequest.ts b/packages/datadog-api-client-v2/models/CaseUpdateStatusRequest.ts new file mode 100644 index 00000000000..80de71a5426 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CaseUpdateStatusRequest.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CaseUpdateStatus } from "./CaseUpdateStatus"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case update status request + */ +export class CaseUpdateStatusRequest { + /** + * Case update status + */ + "data": CaseUpdateStatus; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "CaseUpdateStatus", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CaseUpdateStatusRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CasesResponse.ts b/packages/datadog-api-client-v2/models/CasesResponse.ts new file mode 100644 index 00000000000..cb4aec4d326 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CasesResponse.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Case } from "./Case"; +import { CasesResponseMeta } from "./CasesResponseMeta"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with cases + */ +export class CasesResponse { + /** + * Cases response data + */ + "data"?: Array; + /** + * Cases response metadata + */ + "meta"?: CasesResponseMeta; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + }, + meta: { + baseName: "meta", + type: "CasesResponseMeta", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CasesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CasesResponseMeta.ts b/packages/datadog-api-client-v2/models/CasesResponseMeta.ts new file mode 100644 index 00000000000..78c283cb999 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CasesResponseMeta.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { CasesResponseMetaPagination } from "./CasesResponseMetaPagination"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Cases response metadata + */ +export class CasesResponseMeta { + /** + * Pagination metadata + */ + "page"?: CasesResponseMetaPagination; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + page: { + baseName: "page", + type: "CasesResponseMetaPagination", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CasesResponseMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/CasesResponseMetaPagination.ts b/packages/datadog-api-client-v2/models/CasesResponseMetaPagination.ts new file mode 100644 index 00000000000..45ec7ddfa06 --- /dev/null +++ b/packages/datadog-api-client-v2/models/CasesResponseMetaPagination.ts @@ -0,0 +1,60 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Pagination metadata + */ +export class CasesResponseMetaPagination { + /** + * Current page number + */ + "current"?: number; + /** + * Number of cases in current page + */ + "size"?: number; + /** + * Total number of pages + */ + "total"?: number; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + current: { + baseName: "current", + type: "number", + format: "int64", + }, + size: { + baseName: "size", + type: "number", + format: "int64", + }, + total: { + baseName: "total", + type: "number", + format: "int64", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CasesResponseMetaPagination.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/JiraIssue.ts b/packages/datadog-api-client-v2/models/JiraIssue.ts new file mode 100644 index 00000000000..175cbbe55c7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/JiraIssue.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Case3rdPartyTicketStatus } from "./Case3rdPartyTicketStatus"; +import { JiraIssueResult } from "./JiraIssueResult"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Jira issue attached to case + */ +export class JiraIssue { + /** + * Jira issue information + */ + "result"?: JiraIssueResult; + /** + * Case status + */ + "status"?: Case3rdPartyTicketStatus; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + result: { + baseName: "result", + type: "JiraIssueResult", + }, + status: { + baseName: "status", + type: "Case3rdPartyTicketStatus", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JiraIssue.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/JiraIssueResult.ts b/packages/datadog-api-client-v2/models/JiraIssueResult.ts new file mode 100644 index 00000000000..430a472a189 --- /dev/null +++ b/packages/datadog-api-client-v2/models/JiraIssueResult.ts @@ -0,0 +1,65 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * 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; + + /** + * @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", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return JiraIssueResult.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/NullableUserRelationship.ts b/packages/datadog-api-client-v2/models/NullableUserRelationship.ts new file mode 100644 index 00000000000..edf32561b68 --- /dev/null +++ b/packages/datadog-api-client-v2/models/NullableUserRelationship.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { NullableUserRelationshipData } from "./NullableUserRelationshipData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to user. + */ +export class NullableUserRelationship { + /** + * Relationship to user object. + */ + "data": NullableUserRelationshipData | null; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "NullableUserRelationshipData", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return NullableUserRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/NullableUserRelationshipData.ts b/packages/datadog-api-client-v2/models/NullableUserRelationshipData.ts new file mode 100644 index 00000000000..a20ddee8607 --- /dev/null +++ b/packages/datadog-api-client-v2/models/NullableUserRelationshipData.ts @@ -0,0 +1,52 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { UserResourceType } from "./UserResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to user object. + */ +export class NullableUserRelationshipData { + /** + * A unique identifier that represents the user. + */ + "id": string; + /** + * User resource type. + */ + "type": UserResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "UserResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return NullableUserRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 79dc03f38ae..0924862eae2 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -123,6 +123,28 @@ import { CIAppTestsBucketResponse } from "./CIAppTestsBucketResponse"; import { CIAppTestsGroupBy } from "./CIAppTestsGroupBy"; import { CIAppTestsQueryFilter } from "./CIAppTestsQueryFilter"; import { CIAppWarning } from "./CIAppWarning"; +import { Case } from "./Case"; +import { CaseAssign } from "./CaseAssign"; +import { CaseAssignAttributes } from "./CaseAssignAttributes"; +import { CaseAssignRequest } from "./CaseAssignRequest"; +import { CaseAttributes } from "./CaseAttributes"; +import { CaseCreate } from "./CaseCreate"; +import { CaseCreateAttributes } from "./CaseCreateAttributes"; +import { CaseCreateRelationships } from "./CaseCreateRelationships"; +import { CaseCreateRequest } from "./CaseCreateRequest"; +import { CaseEmpty } from "./CaseEmpty"; +import { CaseEmptyRequest } from "./CaseEmptyRequest"; +import { CaseRelationships } from "./CaseRelationships"; +import { CaseResponse } from "./CaseResponse"; +import { CaseUpdatePriority } from "./CaseUpdatePriority"; +import { CaseUpdatePriorityAttributes } from "./CaseUpdatePriorityAttributes"; +import { CaseUpdatePriorityRequest } from "./CaseUpdatePriorityRequest"; +import { CaseUpdateStatus } from "./CaseUpdateStatus"; +import { CaseUpdateStatusAttributes } from "./CaseUpdateStatusAttributes"; +import { CaseUpdateStatusRequest } from "./CaseUpdateStatusRequest"; +import { CasesResponse } from "./CasesResponse"; +import { CasesResponseMeta } from "./CasesResponseMeta"; +import { CasesResponseMetaPagination } from "./CasesResponseMetaPagination"; import { ChargebackBreakdown } from "./ChargebackBreakdown"; import { CloudConfigurationComplianceRuleOptions } from "./CloudConfigurationComplianceRuleOptions"; import { CloudConfigurationRegoRule } from "./CloudConfigurationRegoRule"; @@ -426,6 +448,8 @@ import { JSONAPIErrorItem } from "./JSONAPIErrorItem"; import { JSONAPIErrorResponse } from "./JSONAPIErrorResponse"; import { JiraIntegrationMetadata } from "./JiraIntegrationMetadata"; import { JiraIntegrationMetadataIssuesItem } from "./JiraIntegrationMetadataIssuesItem"; +import { JiraIssue } from "./JiraIssue"; +import { JiraIssueResult } from "./JiraIssueResult"; import { ListApplicationKeysResponse } from "./ListApplicationKeysResponse"; import { ListDowntimesResponse } from "./ListDowntimesResponse"; import { ListFindingsMeta } from "./ListFindingsMeta"; @@ -555,6 +579,8 @@ import { MonthlyCostAttributionPagination } from "./MonthlyCostAttributionPagina import { MonthlyCostAttributionResponse } from "./MonthlyCostAttributionResponse"; import { NullableRelationshipToUser } from "./NullableRelationshipToUser"; import { NullableRelationshipToUserData } from "./NullableRelationshipToUserData"; +import { NullableUserRelationship } from "./NullableUserRelationship"; +import { NullableUserRelationshipData } from "./NullableUserRelationshipData"; import { OktaAccount } from "./OktaAccount"; import { OktaAccountAttributes } from "./OktaAccountAttributes"; import { OktaAccountRequest } from "./OktaAccountRequest"; @@ -621,9 +647,19 @@ import { ProcessSummariesMetaPage } from "./ProcessSummariesMetaPage"; import { ProcessSummariesResponse } from "./ProcessSummariesResponse"; import { ProcessSummary } from "./ProcessSummary"; import { ProcessSummaryAttributes } from "./ProcessSummaryAttributes"; +import { Project } from "./Project"; +import { ProjectAttributes } from "./ProjectAttributes"; +import { ProjectCreate } from "./ProjectCreate"; +import { ProjectCreateAttributes } from "./ProjectCreateAttributes"; +import { ProjectCreateRequest } from "./ProjectCreateRequest"; +import { ProjectRelationship } from "./ProjectRelationship"; +import { ProjectRelationshipData } from "./ProjectRelationshipData"; +import { ProjectRelationships } from "./ProjectRelationships"; +import { ProjectResponse } from "./ProjectResponse"; import { ProjectedCost } from "./ProjectedCost"; import { ProjectedCostAttributes } from "./ProjectedCostAttributes"; import { ProjectedCostResponse } from "./ProjectedCostResponse"; +import { ProjectsResponse } from "./ProjectsResponse"; import { QueryFormula } from "./QueryFormula"; import { RUMAggregateBucketValueTimeseriesPoint } from "./RUMAggregateBucketValueTimeseriesPoint"; import { RUMAggregateRequest } from "./RUMAggregateRequest"; @@ -898,6 +934,8 @@ import { ServiceDefinitionV2Opsgenie } from "./ServiceDefinitionV2Opsgenie"; import { ServiceDefinitionV2Repo } from "./ServiceDefinitionV2Repo"; import { ServiceDefinitionV2Slack } from "./ServiceDefinitionV2Slack"; import { ServiceDefinitionsListResponse } from "./ServiceDefinitionsListResponse"; +import { ServiceNowTicket } from "./ServiceNowTicket"; +import { ServiceNowTicketResult } from "./ServiceNowTicketResult"; import { SlackIntegrationMetadata } from "./SlackIntegrationMetadata"; import { SlackIntegrationMetadataChannelItem } from "./SlackIntegrationMetadataChannelItem"; import { Span } from "./Span"; @@ -1003,6 +1041,7 @@ import { UserInvitationResponse } from "./UserInvitationResponse"; import { UserInvitationResponseData } from "./UserInvitationResponseData"; import { UserInvitationsRequest } from "./UserInvitationsRequest"; import { UserInvitationsResponse } from "./UserInvitationsResponse"; +import { UserRelationshipData } from "./UserRelationshipData"; import { UserRelationships } from "./UserRelationships"; import { UserResponse } from "./UserResponse"; import { UserResponseRelationships } from "./UserResponseRelationships"; @@ -1020,6 +1059,7 @@ import { UserTeamsResponse } from "./UserTeamsResponse"; import { UserUpdateAttributes } from "./UserUpdateAttributes"; import { UserUpdateData } from "./UserUpdateData"; import { UserUpdateRequest } from "./UserUpdateRequest"; +import { UsersRelationship } from "./UsersRelationship"; import { UsersResponse } from "./UsersResponse"; import { dateFromRFC3339String, @@ -1139,6 +1179,12 @@ const enumsMap: { [key: string]: any[] } = { CIAppSortOrder: ["asc", "desc"], CIAppTestEventTypeName: ["citest"], CIAppTestLevel: ["session", "module", "suite", "test"], + Case3rdPartyTicketStatus: ["IN_PROGRESS", "COMPLETED", "FAILED"], + CasePriority: ["NOT_DEFINED", "P1", "P2", "P3", "P4", "P5"], + CaseResourceType: ["case"], + CaseSortableField: ["created_at", "priority", "status"], + CaseStatus: ["OPEN", "IN_PROGRESS", "CLOSED"], + CaseType: ["STANDARD"], CloudConfigurationRuleType: ["cloud_configuration"], CloudCostActivityType: ["cloud_cost_activity"], CloudWorkloadSecurityAgentRuleType: ["agent_rule"], @@ -1325,6 +1371,7 @@ const enumsMap: { [key: string]: any[] } = { OutcomesBatchType: ["batched-outcome"], PermissionsType: ["permissions"], ProcessSummaryType: ["process"], + ProjectResourceType: ["project"], ProjectedCostType: ["projected_cost"], QuerySortOrder: ["asc", "desc"], RUMAggregateSortType: ["alphabetical", "measure"], @@ -1565,6 +1612,7 @@ const enumsMap: { [key: string]: any[] } = { TimeseriesFormulaResponseType: ["timeseries_response"], UsageTimeSeriesType: ["usage_timeseries"], UserInvitationsType: ["user_invitations"], + UserResourceType: ["user"], UserTeamPermissionType: ["user_team_permissions"], UserTeamRole: ["admin"], UserTeamTeamType: ["team"], @@ -1720,6 +1768,28 @@ const typeMap: { [index: string]: any } = { CIAppTestsGroupBy: CIAppTestsGroupBy, CIAppTestsQueryFilter: CIAppTestsQueryFilter, CIAppWarning: CIAppWarning, + Case: Case, + CaseAssign: CaseAssign, + CaseAssignAttributes: CaseAssignAttributes, + CaseAssignRequest: CaseAssignRequest, + CaseAttributes: CaseAttributes, + CaseCreate: CaseCreate, + CaseCreateAttributes: CaseCreateAttributes, + CaseCreateRelationships: CaseCreateRelationships, + CaseCreateRequest: CaseCreateRequest, + CaseEmpty: CaseEmpty, + CaseEmptyRequest: CaseEmptyRequest, + CaseRelationships: CaseRelationships, + CaseResponse: CaseResponse, + CaseUpdatePriority: CaseUpdatePriority, + CaseUpdatePriorityAttributes: CaseUpdatePriorityAttributes, + CaseUpdatePriorityRequest: CaseUpdatePriorityRequest, + CaseUpdateStatus: CaseUpdateStatus, + CaseUpdateStatusAttributes: CaseUpdateStatusAttributes, + CaseUpdateStatusRequest: CaseUpdateStatusRequest, + CasesResponse: CasesResponse, + CasesResponseMeta: CasesResponseMeta, + CasesResponseMetaPagination: CasesResponseMetaPagination, ChargebackBreakdown: ChargebackBreakdown, CloudConfigurationComplianceRuleOptions: CloudConfigurationComplianceRuleOptions, @@ -2058,6 +2128,8 @@ const typeMap: { [index: string]: any } = { JSONAPIErrorResponse: JSONAPIErrorResponse, JiraIntegrationMetadata: JiraIntegrationMetadata, JiraIntegrationMetadataIssuesItem: JiraIntegrationMetadataIssuesItem, + JiraIssue: JiraIssue, + JiraIssueResult: JiraIssueResult, ListApplicationKeysResponse: ListApplicationKeysResponse, ListDowntimesResponse: ListDowntimesResponse, ListFindingsMeta: ListFindingsMeta, @@ -2196,6 +2268,8 @@ const typeMap: { [index: string]: any } = { MonthlyCostAttributionResponse: MonthlyCostAttributionResponse, NullableRelationshipToUser: NullableRelationshipToUser, NullableRelationshipToUserData: NullableRelationshipToUserData, + NullableUserRelationship: NullableUserRelationship, + NullableUserRelationshipData: NullableUserRelationshipData, OktaAccount: OktaAccount, OktaAccountAttributes: OktaAccountAttributes, OktaAccountRequest: OktaAccountRequest, @@ -2263,9 +2337,19 @@ const typeMap: { [index: string]: any } = { ProcessSummariesResponse: ProcessSummariesResponse, ProcessSummary: ProcessSummary, ProcessSummaryAttributes: ProcessSummaryAttributes, + Project: Project, + ProjectAttributes: ProjectAttributes, + ProjectCreate: ProjectCreate, + ProjectCreateAttributes: ProjectCreateAttributes, + ProjectCreateRequest: ProjectCreateRequest, + ProjectRelationship: ProjectRelationship, + ProjectRelationshipData: ProjectRelationshipData, + ProjectRelationships: ProjectRelationships, + ProjectResponse: ProjectResponse, ProjectedCost: ProjectedCost, ProjectedCostAttributes: ProjectedCostAttributes, ProjectedCostResponse: ProjectedCostResponse, + ProjectsResponse: ProjectsResponse, QueryFormula: QueryFormula, RUMAggregateBucketValueTimeseriesPoint: RUMAggregateBucketValueTimeseriesPoint, @@ -2596,6 +2680,8 @@ const typeMap: { [index: string]: any } = { ServiceDefinitionV2Repo: ServiceDefinitionV2Repo, ServiceDefinitionV2Slack: ServiceDefinitionV2Slack, ServiceDefinitionsListResponse: ServiceDefinitionsListResponse, + ServiceNowTicket: ServiceNowTicket, + ServiceNowTicketResult: ServiceNowTicketResult, SlackIntegrationMetadata: SlackIntegrationMetadata, SlackIntegrationMetadataChannelItem: SlackIntegrationMetadataChannelItem, Span: Span, @@ -2703,6 +2789,7 @@ const typeMap: { [index: string]: any } = { UserInvitationResponseData: UserInvitationResponseData, UserInvitationsRequest: UserInvitationsRequest, UserInvitationsResponse: UserInvitationsResponse, + UserRelationshipData: UserRelationshipData, UserRelationships: UserRelationships, UserResponse: UserResponse, UserResponseRelationships: UserResponseRelationships, @@ -2720,6 +2807,7 @@ const typeMap: { [index: string]: any } = { UserUpdateAttributes: UserUpdateAttributes, UserUpdateData: UserUpdateData, UserUpdateRequest: UserUpdateRequest, + UsersRelationship: UsersRelationship, UsersResponse: UsersResponse, }; diff --git a/packages/datadog-api-client-v2/models/Project.ts b/packages/datadog-api-client-v2/models/Project.ts new file mode 100644 index 00000000000..0ef50feb6e5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/Project.ts @@ -0,0 +1,71 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ProjectAttributes } from "./ProjectAttributes"; +import { ProjectRelationships } from "./ProjectRelationships"; +import { ProjectResourceType } from "./ProjectResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A Project + */ +export class Project { + /** + * Project attributes + */ + "attributes": ProjectAttributes; + /** + * The Project's identifier + */ + "id": string; + /** + * Project relationships + */ + "relationships"?: ProjectRelationships; + /** + * Project resource type + */ + "type": ProjectResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ProjectAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + relationships: { + baseName: "relationships", + type: "ProjectRelationships", + }, + type: { + baseName: "type", + type: "ProjectResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return Project.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ProjectAttributes.ts b/packages/datadog-api-client-v2/models/ProjectAttributes.ts new file mode 100644 index 00000000000..3f7f5829b10 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectAttributes.ts @@ -0,0 +1,49 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Project attributes + */ +export class ProjectAttributes { + /** + * The project's key + */ + "key"?: string; + /** + * Project's name + */ + "name"?: string; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + key: { + baseName: "key", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ProjectCreate.ts b/packages/datadog-api-client-v2/models/ProjectCreate.ts new file mode 100644 index 00000000000..50184420541 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectCreate.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ProjectCreateAttributes } from "./ProjectCreateAttributes"; +import { ProjectResourceType } from "./ProjectResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Project create + */ +export class ProjectCreate { + /** + * Project creation attributes + */ + "attributes": ProjectCreateAttributes; + /** + * Project resource type + */ + "type": ProjectResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "ProjectCreateAttributes", + required: true, + }, + type: { + baseName: "type", + type: "ProjectResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectCreate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ProjectCreateAttributes.ts b/packages/datadog-api-client-v2/models/ProjectCreateAttributes.ts new file mode 100644 index 00000000000..972b1746fb5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectCreateAttributes.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Project creation attributes + */ +export class ProjectCreateAttributes { + /** + * Project's key. Cannot be "CASE" + */ + "key": string; + /** + * name + */ + "name": string; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + key: { + baseName: "key", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectCreateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ProjectCreateRequest.ts b/packages/datadog-api-client-v2/models/ProjectCreateRequest.ts new file mode 100644 index 00000000000..4399edee3be --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectCreateRequest.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ProjectCreate } from "./ProjectCreate"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Project create request + */ +export class ProjectCreateRequest { + /** + * Project create + */ + "data": ProjectCreate; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ProjectCreate", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ProjectRelationship.ts b/packages/datadog-api-client-v2/models/ProjectRelationship.ts new file mode 100644 index 00000000000..f76a313f515 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectRelationship.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ProjectRelationshipData } from "./ProjectRelationshipData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to project + */ +export class ProjectRelationship { + /** + * Relationship to project object + */ + "data": ProjectRelationshipData; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ProjectRelationshipData", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ProjectRelationshipData.ts b/packages/datadog-api-client-v2/models/ProjectRelationshipData.ts new file mode 100644 index 00000000000..dcbb0744906 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectRelationshipData.ts @@ -0,0 +1,52 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { ProjectResourceType } from "./ProjectResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to project object + */ +export class ProjectRelationshipData { + /** + * A unique identifier that represents the project + */ + "id": string; + /** + * Project resource type + */ + "type": ProjectResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "ProjectResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ProjectRelationships.ts b/packages/datadog-api-client-v2/models/ProjectRelationships.ts new file mode 100644 index 00000000000..7ce9a356be3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectRelationships.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { RelationshipToTeamLinks } from "./RelationshipToTeamLinks"; +import { UsersRelationship } from "./UsersRelationship"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Project relationships + */ +export class ProjectRelationships { + /** + * Relationship between a team and a team link + */ + "memberTeam"?: RelationshipToTeamLinks; + /** + * Relationship to users. + */ + "memberUser"?: UsersRelationship; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + memberTeam: { + baseName: "member_team", + type: "RelationshipToTeamLinks", + }, + memberUser: { + baseName: "member_user", + type: "UsersRelationship", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ProjectResourceType.ts b/packages/datadog-api-client-v2/models/ProjectResourceType.ts new file mode 100644 index 00000000000..638af20b361 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectResourceType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Project resource type + */ + +export type ProjectResourceType = typeof PROJECT | UnparsedObject; +export const PROJECT = "project"; diff --git a/packages/datadog-api-client-v2/models/ProjectResponse.ts b/packages/datadog-api-client-v2/models/ProjectResponse.ts new file mode 100644 index 00000000000..f145ca5a083 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectResponse.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Project } from "./Project"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Project response + */ +export class ProjectResponse { + /** + * A Project + */ + "data"?: Project; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Project", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ProjectsResponse.ts b/packages/datadog-api-client-v2/models/ProjectsResponse.ts new file mode 100644 index 00000000000..e3287eed271 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ProjectsResponse.ts @@ -0,0 +1,42 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Project } from "./Project"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with projects + */ +export class ProjectsResponse { + /** + * Projects response data + */ + "data"?: Array; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ProjectsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ServiceNowTicket.ts b/packages/datadog-api-client-v2/models/ServiceNowTicket.ts new file mode 100644 index 00000000000..87077edb74d --- /dev/null +++ b/packages/datadog-api-client-v2/models/ServiceNowTicket.ts @@ -0,0 +1,51 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { Case3rdPartyTicketStatus } from "./Case3rdPartyTicketStatus"; +import { ServiceNowTicketResult } from "./ServiceNowTicketResult"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * ServiceNow ticket attached to case + */ +export class ServiceNowTicket { + /** + * ServiceNow ticket information + */ + "result"?: ServiceNowTicketResult; + /** + * Case status + */ + "status"?: Case3rdPartyTicketStatus; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + result: { + baseName: "result", + type: "ServiceNowTicketResult", + }, + status: { + baseName: "status", + type: "Case3rdPartyTicketStatus", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ServiceNowTicket.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ServiceNowTicketResult.ts b/packages/datadog-api-client-v2/models/ServiceNowTicketResult.ts new file mode 100644 index 00000000000..cd77f307a84 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ServiceNowTicketResult.ts @@ -0,0 +1,41 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * ServiceNow ticket information + */ +export class ServiceNowTicketResult { + /** + * Link to the Incident created on ServiceNow + */ + "sysTargetLink"?: string; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + sysTargetLink: { + baseName: "sys_target_link", + type: "string", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ServiceNowTicketResult.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UserRelationshipData.ts b/packages/datadog-api-client-v2/models/UserRelationshipData.ts new file mode 100644 index 00000000000..a1113b6cfe2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UserRelationshipData.ts @@ -0,0 +1,52 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { UserResourceType } from "./UserResourceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to user object. + */ +export class UserRelationshipData { + /** + * A unique identifier that represents the user. + */ + "id": string; + /** + * User resource type. + */ + "type": UserResourceType; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "UserResourceType", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UserRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UserResourceType.ts b/packages/datadog-api-client-v2/models/UserResourceType.ts new file mode 100644 index 00000000000..50c8c2225b1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UserResourceType.ts @@ -0,0 +1,14 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * User resource type. + */ + +export type UserResourceType = typeof USER | UnparsedObject; +export const USER = "user"; diff --git a/packages/datadog-api-client-v2/models/UsersRelationship.ts b/packages/datadog-api-client-v2/models/UsersRelationship.ts new file mode 100644 index 00000000000..c7e527a93f7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UsersRelationship.ts @@ -0,0 +1,43 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { UserRelationshipData } from "./UserRelationshipData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to users. + */ +export class UsersRelationship { + /** + * Relationships to user objects. + */ + "data": Array; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UsersRelationship.attributeTypeMap; + } + + public constructor() {} +}