diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 25ad70c2815c..6f78eb1476f6 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -606,6 +606,37 @@ components: required: true schema: type: string + IncidentAutomationDataIncludeParameter: + description: Specifies which related objects to include in the response. + in: query + name: include + required: false + schema: + type: string + IncidentAutomationDataKeyParameter: + description: The automation data key. + example: workflow_status + in: path + name: key + required: true + schema: + type: string + IncidentCommunicationFilterTypeParameter: + description: Filter by communication type. + in: query + name: "filter[communication_type]" + required: false + schema: + type: string + IncidentCommunicationIdParameter: + description: The ID of the communication. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: communication_id + required: true + schema: + format: uuid + type: string IncidentIDPathParameter: description: The UUID of the incident. in: path @@ -657,6 +688,53 @@ components: required: true schema: type: string + IncidentJiraTemplateIdParameter: + description: The ID of the Jira template. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: template_id + required: true + schema: + format: uuid + type: string + IncidentJiraTemplateIncidentTypeIdParameter: + description: Filter templates by incident type identifier. + in: query + name: incidentTypeId + required: false + schema: + format: uuid + type: string + IncidentJiraTemplateIsDefaultParameter: + description: Filter templates by default status. + in: query + name: isDefault + required: false + schema: + type: boolean + IncidentJiraTemplateTypeParameter: + description: Filter templates by type. + in: query + name: templateType + required: false + schema: + type: string + IncidentMicrosoftTeamsConfigurationIdParameter: + description: The ID of the Microsoft Teams configuration. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: configuration_id + required: true + schema: + format: uuid + type: string + IncidentMicrosoftTeamsIncludeParameter: + description: Specifies which related objects to include in the response. + in: query + name: include + required: false + schema: + type: string IncidentNotificationRuleIDPathParameter: description: The ID of the notification rule. in: path @@ -705,6 +783,77 @@ components: schema: example: "created_by_user,incident_type" type: string + IncidentReservedRoleIdParameter: + description: The ID of the reserved role. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: role_id + required: true + schema: + format: uuid + type: string + IncidentRoleAssignmentIdParameter: + description: The ID of the role assignment. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: role_assignment_id + required: true + schema: + format: uuid + type: string + IncidentSearchIncidentsIncludeParameter: + description: Specifies which types of related objects to include. + in: query + name: include + required: false + schema: + items: + $ref: "#/components/schemas/IncidentSearchIncidentsIncludeType" + type: array + IncidentSearchIncidentsQueryParameter: + description: Specifies which incidents should be returned by the search. + in: query + name: query + required: false + schema: + type: string + IncidentSearchIncidentsSemanticQueryParameter: + description: A semantic search query. + in: query + name: semantic_query + required: false + schema: + type: string + IncidentSearchIncidentsSortParameter: + description: Specifies the order of returned incidents. + in: query + name: sort + required: false + schema: + $ref: "#/components/schemas/IncidentSearchIncidentsSortOrder" + IncidentSearchIncidentsTimezoneParameter: + description: The timezone for date-based operations. + in: query + name: timeZone + required: false + schema: + type: string + IncidentSearchIncidentsWithDeletedParameter: + description: Whether to include deleted incidents in the response. + in: query + name: "filter[with_deleted]" + required: false + schema: + default: false + type: boolean + IncidentSearchIncidentsWithFacetsParameter: + description: Whether to include facet data in the response. + in: query + name: with_facets + required: false + schema: + default: true + type: boolean IncidentSearchIncludeQueryParameter: description: Specifies which types of related objects should be included in the response. in: query @@ -753,6 +902,79 @@ components: schema: example: "ExampleServiceName" type: string + IncidentStatusPageIdParameter: + description: The ID of the status page. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: statuspage_id + required: true + schema: + format: uuid + type: string + IncidentStatusPageNoticeIdParameter: + description: The ID of the status page notice. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: notice_id + required: true + schema: + format: uuid + type: string + IncidentStatusPageNotifySubscribersParameter: + description: Whether to notify subscribers about this notice. + in: query + name: notify_subscribers + required: false + schema: + type: boolean + IncidentStatuspageIncidentIdParameter: + description: The ID of the Statuspage incident. + example: abc123 + in: path + name: statuspage_incident_id + required: true + schema: + type: string + IncidentStatuspagePageIdParameter: + description: The ID of the Statuspage page. + example: abc123 + in: path + name: page_id + required: true + schema: + type: string + IncidentStatuspagePageIdPathParameter: + description: The ID of the status page. + example: my-status-page + in: path + name: page_id + required: true + schema: + type: string + IncidentTemplateVariableFilterIncidentTypeParameter: + description: Filter template variables by incident type. + in: query + name: "filter[incident-type]" + required: false + schema: + format: uuid + type: string + IncidentTemplateVariableIncludeFollowUpsParameter: + description: Whether to include follow-up template variables. + in: query + name: includeFollowUps + required: false + schema: + type: boolean + IncidentTimelineEntryIdParameter: + description: The ID of the timeline entry. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: timeline_entry_id + required: true + schema: + format: uuid + type: string IncidentTodoIDPathParameter: description: The UUID of the incident todo. in: path @@ -782,6 +1004,22 @@ components: schema: example: "00000000-0000-0000-0000-000000000000" type: string + IncidentZoomConfigurationIdParameter: + description: The ID of the Zoom configuration. + example: 00000000-0000-0000-0000-000000000000 + in: path + name: configuration_id + required: true + schema: + format: uuid + type: string + IncidentZoomIncludeParameter: + description: Specifies which related objects to include in the response. + in: query + name: include + required: false + schema: + type: string Include: description: Include relationship data. explode: true @@ -1198,6 +1436,22 @@ components: example: 10 format: int64 type: integer + PagerdutyIncidentIdParameter: + description: The PagerDuty incident identifier. + example: P1234AB + in: path + name: pagerduty_incident_id + required: true + schema: + type: string + PagerdutyIncludeUnresolvedParameter: + description: Whether to include unresolved PagerDuty services. + in: query + name: include_unresolved + required: false + schema: + default: false + type: boolean PersonaMappingID: description: The ID of the persona mapping example: c5c758c6-18c2-4484-ae3f-46b84128404a @@ -35936,6 +36190,373 @@ components: type: string x-enum-varnames: - INCIDENT_ATTACHMENTS + IncidentAutomationDataAttributesRequest: + description: Attributes for creating or updating automation data. + properties: + value: + description: The automation data value. + example: completed + type: string + required: + - value + type: object + IncidentAutomationDataAttributesResponse: + description: Attributes of incident automation data. + properties: + created_at: + description: Timestamp when the data was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incident_id: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + key: + description: The automation data key. + example: workflow_status + type: string + updated_at: + description: Timestamp when the data was last updated. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + value: + description: The automation data value. + example: completed + type: string + required: + - incident_id + - key + - value + - created_at + - updated_at + type: object + IncidentAutomationDataDataRequest: + description: Automation data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentAutomationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentAutomationDataType" + required: + - type + - attributes + type: object + IncidentAutomationDataDataResponse: + description: Automation data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentAutomationDataAttributesResponse" + id: + description: The automation data identifier. + example: workflow_status + type: string + type: + $ref: "#/components/schemas/IncidentAutomationDataType" + required: + - id + - type + - attributes + type: object + IncidentAutomationDataRequest: + description: Request to upsert automation data. + properties: + data: + $ref: "#/components/schemas/IncidentAutomationDataDataRequest" + required: + - data + type: object + IncidentAutomationDataResponse: + description: Response with automation data. + properties: + data: + $ref: "#/components/schemas/IncidentAutomationDataDataResponse" + required: + - data + type: object + IncidentAutomationDataType: + description: Incident automation data resource type. + enum: + - incidents_automation_data + example: incidents_automation_data + type: string + x-enum-varnames: + - INCIDENTS_AUTOMATION_DATA + IncidentBatchCreateRuleExecutionStatesData: + description: Data for batch creating rule execution states. + properties: + attributes: + $ref: "#/components/schemas/IncidentBatchCreateRuleExecutionStatesDataAttributes" + type: + $ref: "#/components/schemas/IncidentRuleExecutionStateType" + required: + - type + - attributes + type: object + IncidentBatchCreateRuleExecutionStatesDataAttributes: + description: Attributes for batch creating rule execution states. + properties: + rules: + description: List of rules to create execution states for. + items: + $ref: "#/components/schemas/IncidentRuleExecutionStateRule" + type: array + required: + - rules + type: object + IncidentBatchCreateRuleExecutionStatesRequest: + description: Request to batch create rule execution states. + properties: + data: + $ref: "#/components/schemas/IncidentBatchCreateRuleExecutionStatesData" + required: + - data + type: object + IncidentBatchUpdateRuleExecutionStatesData: + description: Data for batch updating rule execution states. + properties: + attributes: + $ref: "#/components/schemas/IncidentBatchUpdateRuleExecutionStatesDataAttributes" + type: + $ref: "#/components/schemas/IncidentRuleExecutionStateType" + required: + - type + - attributes + type: object + IncidentBatchUpdateRuleExecutionStatesDataAttributes: + description: Attributes for batch updating rule execution states. + properties: + rules: + description: List of rules to update execution states for. + items: + $ref: "#/components/schemas/IncidentRuleExecutionStateRule" + type: array + required: + - rules + type: object + IncidentBatchUpdateRuleExecutionStatesRequest: + description: Request to batch update rule execution states. + properties: + data: + $ref: "#/components/schemas/IncidentBatchUpdateRuleExecutionStatesData" + required: + - data + type: object + IncidentCaseLinkData: + description: Case link data. + properties: + attributes: + $ref: "#/components/schemas/IncidentCaseLinkDataAttributes" + id: + description: The case link identifier. + example: "12345" + type: string + type: + $ref: "#/components/schemas/IncidentCaseLinkType" + required: + - id + - type + - attributes + type: object + IncidentCaseLinkDataAttributes: + description: Attributes of a case link. + properties: + entity_id: + description: The entity identifier. + example: "12345" + type: string + is_page: + description: Whether this is a page link. + example: false + type: boolean + relationship: + description: The relationship type. + example: source + type: string + required: + - entity_id + - is_page + - relationship + type: object + IncidentCaseLinkResponse: + description: Response with a case link. + properties: + data: + $ref: "#/components/schemas/IncidentCaseLinkData" + required: + - data + type: object + IncidentCaseLinkType: + description: Case link resource type. + enum: + - case_link + example: case_link + type: string + x-enum-varnames: + - CASE_LINK + IncidentCommunicationContent: + description: The content of a communication. + properties: + grouping_key: + description: A key used for grouping communications. + example: update-1 + type: string + handles: + description: The list of handles the communication is sent to. + items: + $ref: "#/components/schemas/IncidentCommunicationContentHandle" + type: array + message: + description: The message body of the communication. + example: Incident update for INC-123. + type: string + status: + description: The status code of the communication. + example: 0 + format: int32 + maximum: 2147483647 + type: integer + subject: + description: The subject line of the communication. + example: "Incident INC-123: Update" + type: string + required: + - handles + - message + type: object + IncidentCommunicationContentHandle: + description: A handle used for sending a communication. + properties: + created_at: + description: Timestamp when the handle was added. + example: "2024-01-01T00:00:00.000Z" + type: string + display_name: + description: The display name for the handle. + example: "#incidents-channel" + type: string + handle: + description: The notification handle. + example: "@slack-incidents-channel" + type: string + required: + - handle + type: object + IncidentCommunicationDataAttributesRequest: + description: Attributes for creating or updating a communication. + properties: + communication_type: + $ref: "#/components/schemas/IncidentCommunicationKind" + content: + $ref: "#/components/schemas/IncidentCommunicationContent" + required: + - communication_type + - content + type: object + IncidentCommunicationDataAttributesResponse: + description: Attributes of an incident communication response. + properties: + communication_type: + $ref: "#/components/schemas/IncidentCommunicationKind" + content: + $ref: "#/components/schemas/IncidentCommunicationContent" + created: + description: Timestamp when the communication was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incident_id: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + modified: + description: Timestamp when the communication was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + required: + - incident_id + - communication_type + - content + - created + - modified + type: object + IncidentCommunicationDataRequest: + description: Incident communication data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentCommunicationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentCommunicationType" + required: + - type + - attributes + type: object + IncidentCommunicationDataResponse: + description: Incident communication data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentCommunicationDataAttributesResponse" + id: + description: The communication identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentCommunicationType" + required: + - id + - type + - attributes + type: object + IncidentCommunicationKind: + description: The kind of communication. + enum: + - manual + - automated + example: manual + type: string + x-enum-varnames: + - MANUAL + - AUTOMATED + IncidentCommunicationRequest: + description: Request to create or update a communication. + properties: + data: + $ref: "#/components/schemas/IncidentCommunicationDataRequest" + required: + - data + type: object + IncidentCommunicationResponse: + description: Response with a single communication. + properties: + data: + $ref: "#/components/schemas/IncidentCommunicationDataResponse" + required: + - data + type: object + IncidentCommunicationType: + description: Incident communication resource type. + enum: + - communication + example: communication + type: string + x-enum-varnames: + - COMMUNICATION + IncidentCommunicationsResponse: + description: Response with a list of communications. + properties: + data: + description: List of communications. + items: + $ref: "#/components/schemas/IncidentCommunicationDataResponse" + type: array + required: + - data + type: object IncidentCreateAttributes: description: The incident's attributes for a create request. properties: @@ -36009,6 +36630,35 @@ components: required: - data type: object + IncidentCreateZoomMeetingData: + description: Data for creating a Zoom meeting. + properties: + attributes: + $ref: "#/components/schemas/IncidentCreateZoomMeetingDataAttributes" + type: + $ref: "#/components/schemas/IncidentZoomIntegrationType" + required: + - type + - attributes + type: object + IncidentCreateZoomMeetingDataAttributes: + description: Attributes for creating a Zoom meeting. + properties: + topic: + description: The topic of the Zoom meeting. + example: "Incident INC-123 War Room" + type: string + required: + - topic + type: object + IncidentCreateZoomMeetingRequest: + description: Request to create a Zoom meeting for an incident. + properties: + data: + $ref: "#/components/schemas/IncidentCreateZoomMeetingData" + required: + - data + type: object IncidentFieldAttributes: description: Dynamic fields for which selections can be made, with field names as keys. oneOf: @@ -36066,6 +36716,92 @@ components: - TEXTARRAY - METRICTAG - AUTOCOMPLETE + IncidentGoogleMeetIntegrationDataAttributes: + description: Attributes of a Google Meet integration metadata. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: google_meet + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + spaces: + description: List of Google Meet spaces. + items: + $ref: "#/components/schemas/IncidentGoogleMeetSpace" + type: array + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - spaces + - created + - modified + type: object + IncidentGoogleMeetIntegrationDataResponse: + description: Google Meet integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentGoogleMeetIntegrationResponse: + description: Response with Google Meet integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationDataResponse" + required: + - data + type: object + IncidentGoogleMeetIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentGoogleMeetSpace: + description: A Google Meet space associated with an incident. + properties: + join_url: + description: The URL to join the Google Meet space. + example: https://meet.google.com/abc-defg-hij + type: string + meeting_code: + description: The meeting code for the space. + example: abc-defg-hij + type: string + name: + description: The name of the Google Meet space. + example: spaces/abc123 + type: string + required: + - name + - join_url + - meeting_code + type: object IncidentHandleAttributesFields: description: Dynamic fields associated with the handle example: @@ -36889,6 +37625,579 @@ components: last_modified_by_user: $ref: "#/components/schemas/RelationshipToUser" type: object + IncidentJiraIssueDataAttributesRequest: + description: Attributes for creating a Jira issue from an incident. + properties: + account_id: + description: The Jira account identifier. + example: "123456" + type: string + issue_type_id: + description: The Jira issue type identifier. + example: "10001" + type: string + project_id: + description: The Jira project identifier. + example: "10000" + type: string + template_id: + description: The identifier of the Jira template to use. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + required: + - account_id + - project_id + - issue_type_id + type: object + IncidentJiraIssueDataRequest: + description: Jira issue data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraIssueDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentJiraIssueType" + required: + - type + - attributes + type: object + IncidentJiraIssueIntegrationDataAttributes: + description: Attributes of a Jira issue integration. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: jira + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - created + - modified + type: object + IncidentJiraIssueIntegrationDataResponse: + description: Jira issue integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentJiraIssueIntegrationResponse: + description: Response with Jira issue integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationDataResponse" + required: + - data + type: object + IncidentJiraIssueIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentJiraIssueRequest: + description: Request to create a Jira issue from an incident. + properties: + data: + $ref: "#/components/schemas/IncidentJiraIssueDataRequest" + required: + - data + type: object + IncidentJiraIssueType: + description: Incident Jira issue resource type. + enum: + - incident_jira_issues + example: incident_jira_issues + type: string + x-enum-varnames: + - INCIDENT_JIRA_ISSUES + IncidentJiraTemplateDataAttributesRequest: + description: Attributes for creating or updating an incident Jira template. + properties: + account_id: + description: The Jira account identifier. + example: "123456" + type: string + field_configurations: + description: Field configuration mappings. + items: + $ref: "#/components/schemas/IncidentJiraTemplateFieldConfiguration" + type: array + fields: + additionalProperties: {} + description: The Jira fields configuration. + type: object + is_default: + description: Whether this is the default template. + example: false + type: boolean + issue_id: + description: The Jira issue type identifier. + example: "10001" + type: string + mappings: + additionalProperties: {} + description: The field mappings configuration. + type: object + meta: + additionalProperties: {} + description: Additional metadata for the template. + type: object + name: + description: The name of the template. + example: Default Jira Template + type: string + project_id: + description: The Jira project identifier. + example: "10000" + type: string + project_key: + description: The Jira project key. + example: INC + type: string + sync_enabled: + description: Whether synchronization is enabled. + example: true + type: boolean + type: + description: The type of the template. + example: jira + type: string + required: + - account_id + - issue_id + - project_id + - project_key + type: object + IncidentJiraTemplateDataAttributesResponse: + description: Attributes of an incident Jira template. + properties: + account_id: + description: The Jira account identifier. + example: "123456" + type: string + created: + description: Timestamp when the template was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + created_by_uuid: + description: UUID of the user who created the template. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + field_configurations: + description: Field configuration mappings. + items: + $ref: "#/components/schemas/IncidentJiraTemplateFieldConfiguration" + type: array + fields: + additionalProperties: {} + description: The Jira fields configuration. + type: object + is_default: + description: Whether this is the default template. + example: false + type: boolean + issue_id: + description: The Jira issue type identifier. + example: "10001" + type: string + last_modified_by_uuid: + description: UUID of the user who last modified the template. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + mappings: + additionalProperties: {} + description: The field mappings configuration. + type: object + meta: + additionalProperties: {} + description: Additional metadata for the template. + type: object + modified: + description: Timestamp when the template was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + name: + description: The name of the template. + example: Default Jira Template + type: string + project_id: + description: The Jira project identifier. + example: "10000" + type: string + project_key: + description: The Jira project key. + example: INC + type: string + sync_enabled: + description: Whether synchronization is enabled. + example: true + type: boolean + type: + description: The type of the template. + example: jira + type: string + required: + - account_id + - issue_id + - project_id + - project_key + - name + - type + - is_default + - sync_enabled + - created + - modified + - created_by_uuid + - last_modified_by_uuid + type: object + IncidentJiraTemplateDataRequest: + description: Incident Jira template data for a create or update request. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraTemplateDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentJiraTemplateRelationships" + type: + $ref: "#/components/schemas/IncidentJiraTemplateType" + required: + - type + - attributes + type: object + IncidentJiraTemplateDataResponse: + description: Incident Jira template data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentJiraTemplateDataAttributesResponse" + id: + description: The template identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentJiraTemplateRelationships" + type: + $ref: "#/components/schemas/IncidentJiraTemplateType" + required: + - id + - type + - attributes + type: object + IncidentJiraTemplateFieldConfiguration: + description: Configuration for a Jira field mapping. + properties: + custom_outbound_value: + description: Custom value for outbound synchronization. + incident_field: + description: The incident field to map to. + example: title + nullable: true + type: string + jira_field_key: + description: The Jira field key. + example: summary + type: string + jira_field_type: + description: The type of the Jira field. + example: string + nullable: true + type: string + sync_direction: + description: The direction of synchronization. + example: bidirectional + type: string + value_mapping: + additionalProperties: + type: string + description: Mapping of values between incident and Jira fields. + type: object + required: + - jira_field_key + - sync_direction + type: object + IncidentJiraTemplateIncidentTypeRelationship: + description: Relationship to an incident type. + properties: + data: + $ref: "#/components/schemas/IncidentJiraTemplateIncidentTypeRelationshipData" + required: + - data + type: object + IncidentJiraTemplateIncidentTypeRelationshipData: + description: Incident type relationship data. + properties: + id: + description: The incident type identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The incident type resource type. + example: incident_types + type: string + required: + - id + - type + type: object + IncidentJiraTemplateRelationships: + description: Relationships for an incident Jira template. + properties: + incident_type: + $ref: "#/components/schemas/IncidentJiraTemplateIncidentTypeRelationship" + type: object + IncidentJiraTemplateRequest: + description: Create or update request for an incident Jira template. + properties: + data: + $ref: "#/components/schemas/IncidentJiraTemplateDataRequest" + required: + - data + type: object + IncidentJiraTemplateResponse: + description: Response with a single incident Jira template. + properties: + data: + $ref: "#/components/schemas/IncidentJiraTemplateDataResponse" + required: + - data + type: object + IncidentJiraTemplateType: + description: Incident Jira template resource type. + enum: + - incidents_jira_templates + example: incidents_jira_templates + type: string + x-enum-varnames: + - INCIDENTS_JIRA_TEMPLATES + IncidentJiraTemplatesResponse: + description: Response with a list of incident Jira templates. + properties: + data: + description: List of incident Jira templates. + items: + $ref: "#/components/schemas/IncidentJiraTemplateDataResponse" + type: array + required: + - data + type: object + IncidentMSTeamsChannel: + description: A Microsoft Teams channel associated with an incident. + properties: + ms_channel_id: + description: The Teams channel identifier. + example: "19:abc123@thread.tacv2" + type: string + ms_channel_name: + description: The name of the Teams channel. + example: incidents-channel + type: string + ms_team_id: + description: The Teams team identifier. + example: "00000000-0000-0000-0000-000000000000" + type: string + ms_tenant_id: + description: The Teams tenant identifier. + example: "00000000-0000-0000-0000-000000000000" + type: string + redirect_url: + description: The redirect URL for the channel. + example: https://teams.microsoft.com/l/channel/abc123 + type: string + team_name: + description: The name of the Teams team. + example: Incident Response + type: string + required: + - ms_channel_name + - ms_channel_id + type: object + IncidentMSTeamsIntegrationDataAttributes: + description: Attributes of a Microsoft Teams integration metadata. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: ms_teams + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + teams: + description: List of Microsoft Teams channels. + items: + $ref: "#/components/schemas/IncidentMSTeamsChannel" + type: array + required: + - status + - integration_type + - teams + - created + - modified + type: object + IncidentMSTeamsIntegrationDataResponse: + description: Microsoft Teams integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentMSTeamsIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentMicrosoftTeamsIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentMSTeamsIntegrationResponse: + description: Response with Microsoft Teams integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentMSTeamsIntegrationDataResponse" + required: + - data + type: object + IncidentMicrosoftTeamsConfigurationDataAttributesRequest: + description: Attributes for creating or updating a Microsoft Teams configuration. + properties: + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + type: object + IncidentMicrosoftTeamsConfigurationDataAttributesResponse: + description: Attributes of a Microsoft Teams configuration. + properties: + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + modified_at: + description: Timestamp when the configuration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + required: + - manual_meeting_creation + - post_meeting_summary + - created_at + - modified_at + type: object + IncidentMicrosoftTeamsConfigurationDataRequest: + description: Microsoft Teams configuration data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationType" + required: + - type + - attributes + type: object + IncidentMicrosoftTeamsConfigurationDataResponse: + description: Microsoft Teams configuration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataAttributesResponse" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationType" + required: + - id + - type + - attributes + type: object + IncidentMicrosoftTeamsConfigurationRequest: + description: Request to create or update a Microsoft Teams configuration. + properties: + data: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataRequest" + required: + - data + type: object + IncidentMicrosoftTeamsConfigurationResponse: + description: Response with a Microsoft Teams configuration. + properties: + data: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationDataResponse" + required: + - data + type: object + IncidentMicrosoftTeamsConfigurationType: + description: Microsoft Teams configuration resource type. + enum: + - microsoft_teams_configurations + example: microsoft_teams_configurations + type: string + x-enum-varnames: + - MICROSOFT_TEAMS_CONFIGURATIONS + IncidentMicrosoftTeamsIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS IncidentNonDatadogCreator: description: Incident's non Datadog creator. nullable: true @@ -37402,6 +38711,93 @@ components: - id - type type: object + IncidentPagerdutyIncidentDataResponse: + description: Incident data related to a PagerDuty incident. + properties: + id: + description: The Datadog incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The incident resource type. + example: incidents + type: string + required: + - id + - type + type: object + IncidentPagerdutyRelatedIncidentsResponse: + description: Response with a list of Datadog incidents related to a PagerDuty incident. + properties: + data: + description: List of related Datadog incidents. + items: + $ref: "#/components/schemas/IncidentPagerdutyIncidentDataResponse" + type: array + required: + - data + type: object + IncidentPagerdutyServiceData: + description: PagerDuty service data. + properties: + attributes: + $ref: "#/components/schemas/IncidentPagerdutyServiceDataAttributes" + id: + description: The PagerDuty service identifier. + example: P1234AB + type: string + type: + $ref: "#/components/schemas/IncidentPagerdutyServiceType" + required: + - id + - type + - attributes + type: object + IncidentPagerdutyServiceDataAttributes: + description: Attributes of a PagerDuty service. + properties: + handle: + description: The handle for the PagerDuty service. + example: my-pagerduty-service + type: string + name: + description: The name of the PagerDuty service. + example: My PagerDuty Service + type: string + service_id: + description: The PagerDuty service identifier. + example: P1234AB + type: string + webhooks_enabled: + description: Whether webhooks are enabled for this service. + example: true + type: boolean + required: + - name + - service_id + - webhooks_enabled + - handle + type: object + IncidentPagerdutyServiceType: + description: PagerDuty service resource type. + enum: + - pagerduty_service + example: pagerduty_service + type: string + x-enum-varnames: + - PAGERDUTY_SERVICE + IncidentPagerdutyServicesResponse: + description: Response with a list of PagerDuty services. + properties: + data: + description: List of PagerDuty services. + items: + $ref: "#/components/schemas/IncidentPagerdutyServiceData" + type: array + required: + - data + type: object IncidentPostmortemType: default: incident_postmortems description: Incident postmortem resource type. @@ -37433,6 +38829,180 @@ components: - type - id type: object + IncidentRenderTemplateDataAttributesRequest: + description: Attributes for rendering a template. + properties: + content: + description: The template content to render. + example: "Incident INC-123 is SEV-1." + type: string + datetime_format: + description: The date-time format to use for rendering. + example: "2006-01-02T15:04:05Z07:00" + type: string + timezone: + description: The timezone to use for rendering. + example: America/New_York + type: string + validate_links: + description: Whether to validate links in the rendered template. + example: false + nullable: true + type: boolean + validate_variables: + description: Whether to validate variables in the template. + example: false + nullable: true + type: boolean + required: + - content + type: object + IncidentRenderTemplateDataRequest: + description: Data for rendering a template. + properties: + attributes: + $ref: "#/components/schemas/IncidentRenderTemplateDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentRenderedTemplateType" + required: + - type + - attributes + type: object + IncidentRenderTemplateRequest: + description: Request to render a template. + properties: + data: + $ref: "#/components/schemas/IncidentRenderTemplateDataRequest" + required: + - data + type: object + IncidentRenderedTemplateData: + description: Rendered template data. + properties: + attributes: + $ref: "#/components/schemas/IncidentRenderedTemplateDataAttributes" + id: + description: The rendered template identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentRenderedTemplateType" + required: + - id + - type + - attributes + type: object + IncidentRenderedTemplateDataAttributes: + description: Attributes of a rendered template. + properties: + rendered_content: + description: The rendered template content. + example: "Incident Server Down is SEV-1." + type: string + required: + - rendered_content + type: object + IncidentRenderedTemplateResponse: + description: Response with a rendered template. + properties: + data: + $ref: "#/components/schemas/IncidentRenderedTemplateData" + required: + - data + type: object + IncidentRenderedTemplateType: + description: Rendered template resource type. + enum: + - rendered_templates + example: rendered_templates + type: string + x-enum-varnames: + - RENDERED_TEMPLATES + IncidentReservedRoleDataAttributesResponse: + description: Attributes of a reserved role. + properties: + created: + description: Timestamp when the role was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + description: + description: A description of the reserved role. + example: The incident commander. + nullable: true + type: string + modified: + description: Timestamp when the role was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + name: + description: The name of the reserved role. + example: commander + type: string + policy: + $ref: "#/components/schemas/IncidentReservedRolePolicy" + required: + - name + - policy + - created + - modified + type: object + IncidentReservedRoleDataResponse: + description: Reserved role data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentReservedRoleDataAttributesResponse" + id: + description: The reserved role identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentReservedRoleType" + required: + - id + - type + - attributes + type: object + IncidentReservedRolePolicy: + description: Policy for a reserved role. + properties: + is_single: + description: Whether this role can only be assigned to a single responder. + example: true + type: boolean + required: + - is_single + type: object + IncidentReservedRoleResponse: + description: Response with a single reserved role. + properties: + data: + $ref: "#/components/schemas/IncidentReservedRoleDataResponse" + required: + - data + type: object + IncidentReservedRoleType: + description: Incident reserved role resource type. + enum: + - incident_reserved_roles + example: incident_reserved_roles + type: string + x-enum-varnames: + - INCIDENT_RESERVED_ROLES + IncidentReservedRolesResponse: + description: Response with a list of reserved roles. + properties: + data: + description: List of reserved roles. + items: + $ref: "#/components/schemas/IncidentReservedRoleDataResponse" + type: array + required: + - data + type: object IncidentResourceType: description: Incident resource type enum: @@ -37676,6 +39246,310 @@ components: user_defined_fields: $ref: "#/components/schemas/RelationshipToIncidentUserDefinedFields" type: object + IncidentRoleAssignmentDataAttributesRequest: + description: Attributes for creating a role assignment. + properties: + role: + description: The name of the role to assign. + example: commander + nullable: true + type: string + type: object + IncidentRoleAssignmentDataAttributesResponse: + description: Attributes of an incident role assignment. + properties: + created: + description: Timestamp when the role assignment was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + modified: + description: Timestamp when the role assignment was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + responder_type: + description: The type of the responder. + example: user + type: string + role: + description: The name of the assigned role. + example: commander + type: string + required: + - role + - responder_type + - created + - modified + type: object + IncidentRoleAssignmentDataRequest: + description: Role assignment data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentRoleAssignmentDataAttributesRequest" + relationships: + $ref: "#/components/schemas/IncidentRoleAssignmentRelationshipsRequest" + type: + $ref: "#/components/schemas/IncidentRoleAssignmentType" + required: + - type + - relationships + type: object + IncidentRoleAssignmentDataResponse: + description: Role assignment data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentRoleAssignmentDataAttributesResponse" + id: + description: The role assignment identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + relationships: + $ref: "#/components/schemas/IncidentRoleAssignmentRelationshipsResponse" + type: + $ref: "#/components/schemas/IncidentRoleAssignmentType" + required: + - id + - type + - attributes + type: object + IncidentRoleAssignmentRelationshipsRequest: + description: Relationships for creating a role assignment. + properties: + reserved_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + responder: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + user_defined_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + required: + - responder + type: object + IncidentRoleAssignmentRelationshipsResponse: + description: Relationships of a role assignment. + properties: + created_by_user: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + last_modified_by_user: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + reserved_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + responder: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationship" + user_defined_role: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationship" + required: + - responder + type: object + IncidentRoleAssignmentRequest: + description: Request to create a role assignment. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentDataRequest" + required: + - data + type: object + IncidentRoleAssignmentResponderRelationship: + description: Relationship to a responder. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentResponderRelationshipData" + required: + - data + type: object + IncidentRoleAssignmentResponderRelationshipData: + description: Responder relationship data. + properties: + id: + description: The responder identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The responder resource type. + example: users + type: string + required: + - id + - type + type: object + IncidentRoleAssignmentResponse: + description: Response with a single role assignment. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentDataResponse" + required: + - data + type: object + IncidentRoleAssignmentRoleRelationship: + description: Relationship to a role. + properties: + data: + $ref: "#/components/schemas/IncidentRoleAssignmentRoleRelationshipData" + type: object + IncidentRoleAssignmentRoleRelationshipData: + description: Role relationship data. + properties: + id: + description: The role identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + description: The role resource type. + example: incident_reserved_roles + type: string + required: + - id + - type + type: object + IncidentRoleAssignmentType: + description: Incident role assignment resource type. + enum: + - incident_role_assignments + example: incident_role_assignments + type: string + x-enum-varnames: + - INCIDENT_ROLE_ASSIGNMENTS + IncidentRuleExecutionStateDataAttributesResponse: + description: Attributes of an incident rule execution state. + properties: + created: + description: Timestamp when the state was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incident_uuid: + description: The incident identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + last_executed_at: + description: Timestamp of the last rule execution. + example: "2024-01-01T00:00:00.000Z" + format: date-time + nullable: true + type: string + modified: + description: Timestamp when the state was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + rule_uuid: + description: The rule identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + required: + - rule_uuid + - incident_uuid + - created + - modified + type: object + IncidentRuleExecutionStateDataResponse: + description: Rule execution state data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentRuleExecutionStateDataAttributesResponse" + id: + description: The rule execution state identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentRuleExecutionStateType" + required: + - id + - type + - attributes + type: object + IncidentRuleExecutionStateRule: + description: A rule in a batch request. + properties: + last_executed_at: + description: Timestamp of the last rule execution. + example: "2024-01-01T00:00:00.000Z" + format: date-time + nullable: true + type: string + rule_uuid: + description: The rule identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + required: + - rule_uuid + type: object + IncidentRuleExecutionStateType: + description: Incident rule execution state resource type. + enum: + - incident_rule_execution_states + example: incident_rule_execution_states + type: string + x-enum-varnames: + - INCIDENT_RULE_EXECUTION_STATES + IncidentRuleExecutionStatesResponse: + description: Response with a list of rule execution states. + properties: + data: + description: List of rule execution states. + items: + $ref: "#/components/schemas/IncidentRuleExecutionStateDataResponse" + type: array + required: + - data + type: object + IncidentSearchIncidentsExportRequest: + description: Request to export incidents as CSV. + properties: + fields: + description: The list of fields to include in the export. + example: + - title + - severity + - state + items: + type: string + type: array + query: + description: The search query to filter incidents for export. + example: "state:active" + type: string + required: + - query + - fields + type: object + IncidentSearchIncidentsIncludeType: + description: Types of related objects to include. + enum: + - incident_type + - impacts + - users + - responders + - integrations + - attachments + type: string + x-enum-varnames: + - INCIDENT_TYPE + - IMPACTS + - USERS + - RESPONDERS + - INTEGRATIONS + - ATTACHMENTS + IncidentSearchIncidentsSortOrder: + description: The ways searched incidents can be sorted. + enum: + - created + - -created + - modified + - -modified + type: string + x-enum-varnames: + - CREATED_ASCENDING + - CREATED_DESCENDING + - MODIFIED_ASCENDING + - MODIFIED_DESCENDING IncidentSearchResponse: description: Response with incidents and facets. properties: @@ -38073,6 +39947,531 @@ components: - SEV_3 - SEV_4 - SEV_5 + IncidentStatusPageNoticeCreateData: + description: Data for publishing a status page notice. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPageNoticeCreateDataAttributes" + type: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationType" + required: + - type + - attributes + type: object + IncidentStatusPageNoticeCreateDataAttributes: + description: Attributes for publishing a status page notice. + properties: + components: + additionalProperties: + type: string + description: Map of component identifiers to their status. + example: + component_1: degraded_performance + type: object + message: + description: The message body of the notice. + example: We are investigating reports of elevated error rates. + type: string + status: + description: The status of the notice. + example: investigating + type: string + title: + description: The title of the notice. + example: Service degradation detected. + type: string + type: object + IncidentStatusPageNoticeCreateRequest: + description: Request to publish a status page notice. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPageNoticeCreateData" + required: + - data + type: object + IncidentStatusPageNoticeIntegrationDataAttributes: + description: Attributes of a status page notice integration. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: statuspage + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - created + - modified + type: object + IncidentStatusPageNoticeIntegrationDataResponse: + description: Status page notice integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentStatusPageNoticeIntegrationResponse: + description: Response with status page notice integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationDataResponse" + required: + - data + type: object + IncidentStatusPageNoticeIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentStatusPageNoticeUpdateData: + description: Data for updating a status page notice. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPageNoticeUpdateDataAttributes" + type: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationType" + required: + - type + - attributes + type: object + IncidentStatusPageNoticeUpdateDataAttributes: + description: Attributes for updating a status page notice. + properties: + components: + additionalProperties: + type: string + description: Map of component identifiers to their status. + type: object + message: + description: The message body of the notice. + example: The issue has been resolved. + type: string + status: + description: The status of the notice. + example: resolved + type: string + title: + description: The title of the notice. + example: Service degradation resolved. + type: string + type: object + IncidentStatusPageNoticeUpdateRequest: + description: Request to update a status page notice. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPageNoticeUpdateData" + required: + - data + type: object + IncidentStatusPagesSuggestionData: + description: Status pages suggestion data. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionDataAttributes" + id: + description: The suggestion title. + example: Service Degradation Detected + type: string + type: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionType" + required: + - id + - type + - attributes + type: object + IncidentStatusPagesSuggestionDataAttributes: + description: Attributes of a status pages suggestion. + properties: + status: + description: The suggested status for the status page. + example: investigating + type: string + update_text: + description: The suggested update text for the status page notice. + example: We are investigating reports of elevated error rates. + type: string + required: + - status + - update_text + type: object + IncidentStatusPagesSuggestionResponse: + description: Response with a status pages suggestion. + properties: + data: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionData" + required: + - data + type: object + IncidentStatusPagesSuggestionType: + description: Incident status pages suggestion resource type. + enum: + - incident_statuspages_suggestion + example: incident_statuspages_suggestion + type: string + x-enum-varnames: + - INCIDENT_STATUSPAGES_SUGGESTION + IncidentStatuspageIncidentDataAttributesRequest: + description: Attributes for creating or updating a Statuspage incident. + properties: + body: + description: The body text of the Statuspage incident. + example: We are investigating the issue. + nullable: true + type: string + components: + additionalProperties: + type: string + description: Map of component identifiers to their status. + type: object + deliver_notifications: + description: Whether to deliver notifications. + example: true + nullable: true + type: boolean + impact: + description: The impact level of the incident. + example: major + nullable: true + type: string + name: + description: The name of the Statuspage incident. + example: Service Outage + nullable: true + type: string + page_id: + description: The Statuspage page identifier. + example: abc123 + type: string + status: + description: The status of the Statuspage incident. + example: investigating + nullable: true + type: string + type: object + IncidentStatuspageIncidentDataAttributesResponse: + description: Attributes of a Statuspage incident integration. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + incidents: + description: List of Statuspage incidents. + items: + $ref: "#/components/schemas/IncidentStatuspageIncidentEntry" + type: array + integration_type: + description: The type of integration. + example: statuspage + type: string + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - created + - modified + type: object + IncidentStatuspageIncidentDataRequest: + description: Statuspage incident data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentStatuspageIncidentType" + required: + - type + - attributes + type: object + IncidentStatuspageIncidentDataResponse: + description: Statuspage incident data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataAttributesResponse" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentStatuspageIncidentType" + required: + - id + - type + - attributes + type: object + IncidentStatuspageIncidentEntry: + description: A Statuspage incident entry. + properties: + incident_id: + description: The Datadog incident identifier. + example: "12345" + type: string + page_id: + description: The Statuspage page identifier. + example: abc123 + type: string + redirect_url: + description: The URL of the Statuspage incident. + example: https://status.example.com/incidents/abc123 + type: string + required: + - incident_id + - page_id + type: object + IncidentStatuspageIncidentRequest: + description: Request to create or update a Statuspage incident. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataRequest" + required: + - data + type: object + IncidentStatuspageIncidentResponse: + description: Response with Statuspage incident integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageIncidentDataResponse" + required: + - data + type: object + IncidentStatuspageIncidentType: + description: Statuspage incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentStatuspagePreferencesData: + description: Subscription preferences data. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspagePreferencesDataAttributes" + id: + description: The preferences identifier. + example: "12345" + type: string + type: + $ref: "#/components/schemas/IncidentStatuspagePreferencesType" + required: + - id + - type + - attributes + type: object + IncidentStatuspagePreferencesDataAttributes: + description: Attributes of subscription preferences. + properties: + subscribed: + description: Whether the user is subscribed. + example: true + type: boolean + required: + - subscribed + type: object + IncidentStatuspagePreferencesResponse: + description: Response with subscription preferences. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspagePreferencesData" + required: + - data + type: object + IncidentStatuspagePreferencesType: + description: Subscription preferences resource type. + enum: + - statuspage_subscription_preferences + example: statuspage_subscription_preferences + type: string + x-enum-varnames: + - STATUSPAGE_SUBSCRIPTION_PREFERENCES + IncidentStatuspageSubscriptionDataAttributesRequest: + description: Attributes for creating an email subscription. + properties: + email: + description: The email address to subscribe. + example: user@example.com + type: string + required: + - email + type: object + IncidentStatuspageSubscriptionDataAttributesResponse: + description: Attributes of an email subscription. + properties: + confirmed: + description: Whether the subscription has been confirmed. + example: true + type: boolean + created_at: + description: Timestamp when the subscription was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + email: + description: The subscribed email address. + example: user@example.com + type: string + required: + - email + - confirmed + - created_at + type: object + IncidentStatuspageSubscriptionDataRequest: + description: Subscription data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionType" + required: + - type + - attributes + type: object + IncidentStatuspageSubscriptionDataResponse: + description: Email subscription data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataAttributesResponse" + id: + description: The subscription identifier. + example: "12345" + type: string + type: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionType" + required: + - id + - type + - attributes + type: object + IncidentStatuspageSubscriptionRequest: + description: Request to create an email subscription. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataRequest" + required: + - data + type: object + IncidentStatuspageSubscriptionResponse: + description: Response with a single email subscription. + properties: + data: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataResponse" + required: + - data + type: object + IncidentStatuspageSubscriptionType: + description: Statuspage email subscription resource type. + enum: + - statuspage_email_subscription + example: statuspage_email_subscription + type: string + x-enum-varnames: + - STATUSPAGE_EMAIL_SUBSCRIPTION + IncidentStatuspageSubscriptionsResponse: + description: Response with a list of email subscriptions. + properties: + data: + description: List of email subscriptions. + items: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionDataResponse" + type: array + required: + - data + type: object + IncidentTemplateVariableData: + description: Template variable data. + properties: + attributes: + $ref: "#/components/schemas/IncidentTemplateVariableDataAttributes" + id: + description: The template variable identifier. + example: incident.title + type: string + type: + $ref: "#/components/schemas/IncidentTemplateVariableType" + required: + - id + - type + - attributes + type: object + IncidentTemplateVariableDataAttributes: + description: Attributes of a template variable. + properties: + description: + description: A description of the template variable. + example: The title of the incident. + type: string + display_name: + description: The display name of the template variable. + example: Incident Title + type: string + domain: + description: The domain of the template variable. + example: incident + type: string + variable: + description: The variable name used in templates. + example: "incident.title" + type: string + required: + - display_name + - domain + - variable + - description + type: object + IncidentTemplateVariableType: + description: Template variable resource type. + enum: + - template_variables + example: template_variables + type: string + x-enum-varnames: + - TEMPLATE_VARIABLES + IncidentTemplateVariablesResponse: + description: Response with a list of template variables. + properties: + data: + description: List of template variables. + items: + $ref: "#/components/schemas/IncidentTemplateVariableData" + type: array + required: + - data + type: object IncidentTimelineCellCreateAttributes: description: The timeline cell's attributes for a create request. oneOf: @@ -38111,6 +40510,206 @@ components: nullable: false type: string type: object + IncidentTimelineCellSource: + description: The source of a timeline cell. + enum: + - slack + - microsoft_teams + - datadog + - api + example: api + type: string + x-enum-varnames: + - SLACK + - MICROSOFT_TEAMS + - DATADOG + - API + IncidentTimelineCellType: + description: The type of a timeline cell. + enum: + - markdown + - incident_status_change + - timestamp_change + - meeting_summary + - meeting_chat + - role_assignment_change + - postmortem_change + example: markdown + type: string + x-enum-varnames: + - MARKDOWN + - INCIDENT_STATUS_CHANGE + - TIMESTAMP_CHANGE + - MEETING_SUMMARY + - MEETING_CHAT + - ROLE_ASSIGNMENT_CHANGE + - POSTMORTEM_CHANGE + IncidentTimelineEntriesResponse: + description: Response with a list of timeline entries. + properties: + data: + description: List of timeline entries. + items: + $ref: "#/components/schemas/IncidentTimelineEntryDataResponse" + type: array + required: + - data + type: object + IncidentTimelineEntryContent: + description: The content of a timeline entry. + properties: + message: + description: The markdown message content. + example: Investigating the issue. + type: string + type: object + IncidentTimelineEntryDataAttributesRequest: + description: Attributes for creating or updating a timeline entry. + properties: + cell_type: + $ref: "#/components/schemas/IncidentTimelineCellType" + content: + $ref: "#/components/schemas/IncidentTimelineEntryContent" + display_time: + description: The display time for this timeline entry. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + important: + description: Whether this timeline entry is marked as important. + example: false + type: boolean + required: + - cell_type + - content + type: object + IncidentTimelineEntryDataAttributesResponse: + description: Attributes of a timeline entry. + properties: + cell_type: + $ref: "#/components/schemas/IncidentTimelineCellType" + content: + $ref: "#/components/schemas/IncidentTimelineEntryContent" + created: + description: Timestamp when the entry was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + display_time: + description: The display time for this timeline entry. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + important: + description: Whether this timeline entry is marked as important. + example: false + type: boolean + incident_id: + description: The incident identifier. + example: "12345" + type: string + modified: + description: Timestamp when the entry was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + parent_uuid: + description: UUID of the parent timeline entry. + example: 00000000-0000-0000-0000-000000000000 + nullable: true + type: string + source: + $ref: "#/components/schemas/IncidentTimelineCellSource" + required: + - incident_id + - cell_type + - content + - source + - display_time + - important + - created + - modified + type: object + IncidentTimelineEntryDataRequest: + description: Timeline entry data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimelineEntryDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentTimelineEntryType" + required: + - type + - attributes + type: object + IncidentTimelineEntryDataResponse: + description: Timeline entry data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimelineEntryDataAttributesResponse" + id: + description: The timeline entry identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentTimelineEntryType" + required: + - id + - type + - attributes + type: object + IncidentTimelineEntryRequest: + description: Request to create or update a timeline entry. + properties: + data: + $ref: "#/components/schemas/IncidentTimelineEntryDataRequest" + required: + - data + type: object + IncidentTimelineEntryResponse: + description: Response with a single timeline entry. + properties: + data: + $ref: "#/components/schemas/IncidentTimelineEntryDataResponse" + required: + - data + type: object + IncidentTimelineEntryType: + description: Incident timeline entry resource type. + enum: + - incident_timeline_cells + example: incident_timeline_cells + type: string + x-enum-varnames: + - INCIDENT_TIMELINE_CELLS + IncidentTimelineThreadDataResponse: + description: Thread data for a timeline entry. + properties: + attributes: + $ref: "#/components/schemas/IncidentTimelineEntryDataAttributesResponse" + id: + description: The thread entry identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentTimelineEntryType" + required: + - id + - type + - attributes + type: object + IncidentTimelineThreadResponse: + description: Response with thread entries for a timeline entry. + properties: + data: + description: List of thread entries. + items: + $ref: "#/components/schemas/IncidentTimelineThreadDataResponse" + type: array + required: + - data + type: object IncidentTodoAnonymousAssignee: description: Anonymous assignee entity. properties: @@ -39059,6 +41658,200 @@ components: - display_name - value type: object + IncidentZoomConfigurationDataAttributesRequest: + description: Attributes for creating or updating a Zoom configuration. + properties: + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + meeting_chat_timeline_sync: + description: Whether meeting chat timeline sync is enabled. + example: false + type: boolean + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + type: object + IncidentZoomConfigurationDataAttributesResponse: + description: Attributes of a Zoom configuration. + properties: + created_at: + description: Timestamp when the configuration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + manual_meeting_creation: + description: Whether manual meeting creation is enabled. + example: false + type: boolean + meeting_chat_timeline_sync: + description: Whether meeting chat timeline sync is enabled. + example: false + type: boolean + modified_at: + description: Timestamp when the configuration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + post_meeting_summary: + description: Whether post-meeting summary is enabled. + example: true + type: boolean + required: + - manual_meeting_creation + - post_meeting_summary + - meeting_chat_timeline_sync + - created_at + - modified_at + type: object + IncidentZoomConfigurationDataRequest: + description: Zoom configuration data for a request. + properties: + attributes: + $ref: "#/components/schemas/IncidentZoomConfigurationDataAttributesRequest" + type: + $ref: "#/components/schemas/IncidentZoomConfigurationType" + required: + - type + - attributes + type: object + IncidentZoomConfigurationDataResponse: + description: Zoom configuration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentZoomConfigurationDataAttributesResponse" + id: + description: The configuration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentZoomConfigurationType" + required: + - id + - type + - attributes + type: object + IncidentZoomConfigurationRequest: + description: Request to create or update a Zoom configuration. + properties: + data: + $ref: "#/components/schemas/IncidentZoomConfigurationDataRequest" + required: + - data + type: object + IncidentZoomConfigurationResponse: + description: Response with a Zoom configuration. + properties: + data: + $ref: "#/components/schemas/IncidentZoomConfigurationDataResponse" + required: + - data + type: object + IncidentZoomConfigurationType: + description: Zoom configuration resource type. + enum: + - zoom_configurations + example: zoom_configurations + type: string + x-enum-varnames: + - ZOOM_CONFIGURATIONS + IncidentZoomIntegrationDataAttributes: + description: Attributes of a Zoom integration metadata. + properties: + created: + description: Timestamp when the integration was created. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + integration_type: + description: The type of integration. + example: zoom + type: string + meetings: + description: List of Zoom meetings. + items: + $ref: "#/components/schemas/IncidentZoomMeeting" + type: array + modified: + description: Timestamp when the integration was last modified. + example: "2024-01-01T00:00:00.000Z" + format: date-time + type: string + status: + description: The status of the integration. + example: active + type: string + required: + - status + - integration_type + - meetings + - created + - modified + type: object + IncidentZoomIntegrationDataResponse: + description: Zoom integration data in a response. + properties: + attributes: + $ref: "#/components/schemas/IncidentZoomIntegrationDataAttributes" + id: + description: The integration identifier. + example: 00000000-0000-0000-0000-000000000000 + format: uuid + type: string + type: + $ref: "#/components/schemas/IncidentZoomIntegrationType" + required: + - id + - type + - attributes + type: object + IncidentZoomIntegrationResponse: + description: Response with Zoom integration metadata. + properties: + data: + $ref: "#/components/schemas/IncidentZoomIntegrationDataResponse" + required: + - data + type: object + IncidentZoomIntegrationType: + description: Incident integration resource type. + enum: + - incident_integrations + example: incident_integrations + type: string + x-enum-varnames: + - INCIDENT_INTEGRATIONS + IncidentZoomMeeting: + description: A Zoom meeting associated with an incident. + properties: + host_id: + description: The Zoom host identifier. + example: abc123 + type: string + join_url: + description: The URL to join the meeting. + example: https://zoom.us/j/1234567890 + type: string + meeting_id: + description: The Zoom meeting identifier. + example: 1234567890 + format: int64 + type: integer + password: + description: The meeting password. + example: abc123 + type: string + recording_url: + description: The URL of the meeting recording. + example: https://zoom.us/rec/share/abc123 + type: string + required: + - join_url + - meeting_id + type: object IncidentsResponse: description: Response with a list of incidents. properties: @@ -112744,6 +115537,475 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/jira-templates: + get: + description: List all incident Jira templates for the organization. + operationId: ListIncidentJiraTemplates + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIsDefaultParameter" + - $ref: "#/components/parameters/IncidentJiraTemplateIncidentTypeIdParameter" + - $ref: "#/components/parameters/IncidentJiraTemplateTypeParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentJiraTemplatesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: List incident Jira templates + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a new incident Jira template for the organization. + operationId: CreateIncidentJiraTemplate + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + issue_id: "10001" + project_id: "10000" + project_key: INC + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + created: "2024-01-01T00:00:00.000Z" + created_by_uuid: 00000000-0000-0000-0000-000000000000 + is_default: false + issue_id: "10001" + last_modified_by_uuid: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + name: Default Jira Template + project_id: "10000" + project_key: INC + sync_enabled: true + type: jira + id: 00000000-0000-0000-0000-000000000000 + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident Jira template + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/jira-templates/{template_id}: + delete: + description: Delete an incident Jira template by its identifier. + operationId: DeleteIncidentJiraTemplate + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Delete an incident Jira template + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of an incident Jira template by its identifier. + operationId: GetIncidentJiraTemplate + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + created: "2024-01-01T00:00:00.000Z" + created_by_uuid: 00000000-0000-0000-0000-000000000000 + is_default: false + issue_id: "10001" + last_modified_by_uuid: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + name: Default Jira Template + project_id: "10000" + project_key: INC + sync_enabled: true + type: jira + id: 00000000-0000-0000-0000-000000000000 + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: Get an incident Jira template + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Update an existing incident Jira template. + operationId: UpdateIncidentJiraTemplate + parameters: + - $ref: "#/components/parameters/IncidentJiraTemplateIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + issue_id: "10001" + project_id: "10000" + project_key: INC + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + created: "2024-01-01T00:00:00.000Z" + created_by_uuid: 00000000-0000-0000-0000-000000000000 + is_default: false + issue_id: "10001" + last_modified_by_uuid: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + name: Default Jira Template + project_id: "10000" + project_key: INC + sync_enabled: true + type: jira + id: 00000000-0000-0000-0000-000000000000 + type: incidents_jira_templates + schema: + $ref: "#/components/schemas/IncidentJiraTemplateResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident Jira template + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/microsoft-teams-configurations: + post: + description: Create a Microsoft Teams configuration for incidents. + operationId: CreateIncidentMicrosoftTeamsConfiguration + parameters: + - $ref: "#/components/parameters/IncidentMicrosoftTeamsIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + post_meeting_summary: true + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident Microsoft Teams configuration + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/microsoft-teams-configurations/{configuration_id}: + patch: + description: Update a Microsoft Teams configuration for incidents. + operationId: UpdateIncidentMicrosoftTeamsConfiguration + parameters: + - $ref: "#/components/parameters/IncidentMicrosoftTeamsConfigurationIdParameter" + - $ref: "#/components/parameters/IncidentMicrosoftTeamsIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + post_meeting_summary: true + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: microsoft_teams_configurations + schema: + $ref: "#/components/schemas/IncidentMicrosoftTeamsConfigurationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident Microsoft Teams configuration + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/config/notification-rules: get: description: Lists all notification rules for the organization. Optionally filter by incident type. @@ -112982,6 +116244,100 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Partially updates an existing notification rule. + operationId: PatchIncidentNotificationRule + parameters: + - $ref: "#/components/parameters/IncidentNotificationRuleIDPathParameter" + - $ref: "#/components/parameters/IncidentNotificationRuleIncludeQueryParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + conditions: + - field: severity + values: + - SEV-1 + - SEV-2 + enabled: true + handles: + - "@team-email@company.com" + - "@slack-channel" + renotify_on: + - status + - severity + trigger: incident_created_trigger + visibility: organization + id: 00000000-0000-0000-0000-000000000001 + relationships: + incident_type: + data: + id: 00000000-0000-0000-0000-000000000000 + type: incident_types + notification_template: + data: + id: 00000000-0000-0000-0000-000000000001 + type: notification_templates + type: incident_notification_rules + schema: + $ref: "#/components/schemas/PutIncidentNotificationRuleRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + conditions: + - field: severity + values: + - SEV-1 + - SEV-2 + created: "2024-01-01T00:00:00+00:00" + enabled: true + handles: + - "@team-email@example.com" + modified: "2024-01-01T00:00:00+00:00" + trigger: incident_created_trigger + visibility: organization + id: 00000000-0000-0000-0000-000000000001 + type: incident_notification_rules + schema: + $ref: "#/components/schemas/IncidentNotificationRule" + 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: + - incident_notification_settings_write + summary: Partially update an incident notification rule + tags: + - Incidents + x-codegen-request-body-name: body + x-permission: + operator: AND + permissions: + - incident_notification_settings_write + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). put: description: Updates an existing notification rule with a complete replacement. operationId: UpdateIncidentNotificationRule @@ -113587,6 +116943,146 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/reserved-roles: + get: + description: List all reserved roles for incidents. + operationId: ListIncidentReservedRoles + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentReservedRolesResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: List incident reserved roles + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/reserved-roles/{role_id}: + get: + description: Get the details of a reserved role by its identifier. + operationId: GetIncidentReservedRole + parameters: + - $ref: "#/components/parameters/IncidentReservedRoleIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + description: The incident commander. + modified: "2024-01-01T00:00:00.000Z" + name: commander + policy: + is_single: true + id: 00000000-0000-0000-0000-000000000000 + type: incident_reserved_roles + schema: + $ref: "#/components/schemas/IncidentReservedRoleResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_read + summary: Get an incident reserved role + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/template-variables: + get: + description: List all available template variables for incident templates. + operationId: ListIncidentTemplateVariables + parameters: + - $ref: "#/components/parameters/IncidentTemplateVariableFilterIncidentTypeParameter" + - $ref: "#/components/parameters/IncidentTemplateVariableIncludeFollowUpsParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTemplateVariablesResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident template variables + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/config/types: get: description: Get all incident types. @@ -114326,6 +117822,155 @@ paths: x-unstable: |- **Note**: This endpoint is in preview and is subject to change. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/zoom-configurations: + post: + description: Create a Zoom configuration for incidents. + operationId: CreateIncidentZoomConfiguration + parameters: + - $ref: "#/components/parameters/IncidentZoomIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + meeting_chat_timeline_sync: false + post_meeting_summary: true + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + meeting_chat_timeline_sync: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Create an incident Zoom configuration + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/config/zoom-configurations/{configuration_id}: + patch: + description: Update a Zoom configuration for incidents. + operationId: UpdateIncidentZoomConfiguration + parameters: + - $ref: "#/components/parameters/IncidentZoomConfigurationIdParameter" + - $ref: "#/components/parameters/IncidentZoomIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + manual_meeting_creation: false + meeting_chat_timeline_sync: false + post_meeting_summary: true + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + manual_meeting_creation: false + meeting_chat_timeline_sync: false + modified_at: "2024-01-01T00:00:00.000Z" + post_meeting_summary: true + id: 00000000-0000-0000-0000-000000000000 + type: zoom_configurations + schema: + $ref: "#/components/schemas/IncidentZoomConfigurationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_settings_write + summary: Update an incident Zoom configuration + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/import: post: description: |- @@ -114416,6 +118061,297 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/pagerduty/services: + get: + description: List all PagerDuty services configured for the organization. + operationId: ListIncidentPagerdutyServices + parameters: + - $ref: "#/components/parameters/PagerdutyIncludeUnresolvedParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentPagerdutyServicesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List PagerDuty services + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/pagerduty/{pagerduty_incident_id}/relationships/incidents: + get: + description: Get the list of Datadog incidents attached to a PagerDuty incident. + operationId: GetIncidentPagerdutyRelatedIncidents + parameters: + - $ref: "#/components/parameters/PagerdutyIncidentIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentPagerdutyRelatedIncidentsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get PagerDuty related incidents + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/role_assignments: + post: + description: Create a new role assignment for an incident. + operationId: CreateIncidentRoleAssignment + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + role: commander + relationships: + responder: + data: + id: 00000000-0000-0000-0000-000000000000 + type: users + type: incident_role_assignments + schema: + $ref: "#/components/schemas/IncidentRoleAssignmentRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + modified: "2024-01-01T00:00:00.000Z" + responder_type: user + role: commander + id: 00000000-0000-0000-0000-000000000000 + type: incident_role_assignments + schema: + $ref: "#/components/schemas/IncidentRoleAssignmentResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "409": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Conflict + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident role assignment + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/role_assignments/{role_assignment_id}: + delete: + description: Delete a role assignment by its identifier. + operationId: DeleteIncidentRoleAssignment + parameters: + - $ref: "#/components/parameters/IncidentRoleAssignmentIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident role assignment + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of a role assignment by its identifier. + operationId: GetIncidentRoleAssignment + parameters: + - $ref: "#/components/parameters/IncidentRoleAssignmentIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + modified: "2024-01-01T00:00:00.000Z" + responder_type: user + role: commander + id: 00000000-0000-0000-0000-000000000000 + type: incident_role_assignments + schema: + $ref: "#/components/schemas/IncidentRoleAssignmentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get an incident role assignment + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/search: get: description: >- @@ -114474,6 +118410,285 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/search-incidents: + get: + description: Search for incidents using advanced filtering and pagination. + operationId: SearchIncidentsV2 + parameters: + - $ref: "#/components/parameters/IncidentSearchIncidentsQueryParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsSortParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsWithFacetsParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsWithDeletedParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsSemanticQueryParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsTimezoneParameter" + - $ref: "#/components/parameters/IncidentSearchIncidentsIncludeParameter" + - $ref: "#/components/parameters/PageSize" + - $ref: "#/components/parameters/PageOffset" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + facets: {} + incidents: [] + total: 0 + type: incidents_search_results + schema: + $ref: "#/components/schemas/IncidentSearchResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Search incidents + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/search-incidents/export: + post: + description: Export incidents matching a search query as a CSV file. + operationId: ExportIncidents + requestBody: + content: + application/json: + examples: + default: + value: + fields: + - title + - severity + - state + query: "state:active" + schema: + $ref: "#/components/schemas/IncidentSearchIncidentsExportRequest" + required: true + responses: + "200": + content: + text/csv: + examples: + default: + value: "title,severity,state" + schema: + format: binary + type: string + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Export incidents + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/statuspage/{incident_id}/statuspage-incidents: + post: + description: Create a Statuspage incident linked to a Datadog incident. + operationId: CreateIncidentStatuspageIncident + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + body: We are investigating the issue. + deliver_notifications: true + name: Service Outage + page_id: abc123 + status: investigating + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create a Statuspage incident for an incident + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/statuspage/{incident_id}/statuspage-incidents/pages/{page_id}/incidents/{statuspage_incident_id}: + patch: + description: Update a Statuspage incident linked to a Datadog incident. + operationId: UpdateIncidentStatuspageIncident + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentStatuspagePageIdParameter" + - $ref: "#/components/parameters/IncidentStatuspageIncidentIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + body: The issue has been resolved. + deliver_notifications: true + name: Service Outage + page_id: abc123 + status: resolved + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatuspageIncidentResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update a Statuspage incident for an incident + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/{incident_id}: delete: description: Deletes an existing incident from the users organization. @@ -114955,6 +119170,592 @@ paths: x-unstable: |- **Note**: This endpoint is in Preview. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/automation-data/{key}: + get: + description: Get automation data for a given incident and key. + operationId: GetIncidentAutomationData + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentAutomationDataKeyParameter" + - $ref: "#/components/parameters/IncidentAutomationDataIncludeParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + key: workflow_status + updated_at: "2024-01-01T00:00:00.000Z" + value: completed + id: workflow_status + type: incidents_automation_data + schema: + $ref: "#/components/schemas/IncidentAutomationDataResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident automation data + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Create or update automation data for a given incident and key. + operationId: UpsertIncidentAutomationData + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentAutomationDataKeyParameter" + - $ref: "#/components/parameters/IncidentAutomationDataIncludeParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + value: completed + type: incidents_automation_data + schema: + $ref: "#/components/schemas/IncidentAutomationDataRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created_at: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + key: workflow_status + updated_at: "2024-01-01T00:00:00.000Z" + value: completed + id: workflow_status + type: incidents_automation_data + schema: + $ref: "#/components/schemas/IncidentAutomationDataResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create or update incident automation data + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/cases/source-link: + get: + description: Get the source link for a case associated with an incident. + operationId: GetIncidentCaseSourceLink + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + entity_id: "12345" + is_page: false + relationship: source + id: "12345" + type: case_link + schema: + $ref: "#/components/schemas/IncidentCaseLinkResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident case source link + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/communications: + get: + description: List all communications for a given incident. + operationId: ListIncidentCommunications + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationFilterTypeParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentCommunicationsResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident communications + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a new communication for a given incident. + operationId: CreateIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Incident update for INC-123. + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Incident update for INC-123. + created: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000000 + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident communication + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/communications/{communication_id}: + delete: + description: Delete a communication for a given incident. + operationId: DeleteIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident communication + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + get: + description: Get the details of a communication for a given incident. + operationId: GetIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Incident update for INC-123. + created: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000000 + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get an incident communication + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a communication for a given incident. + operationId: UpdateIncidentCommunication + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentCommunicationIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Updated incident communication for INC-123. + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + communication_type: manual + content: + handles: + - handle: "@slack-incidents-channel" + message: Updated incident communication for INC-123. + created: "2024-01-01T00:00:00.000Z" + incident_id: 00000000-0000-0000-0000-000000000000 + modified: "2024-01-01T00:00:00.000Z" + id: 00000000-0000-0000-0000-000000000000 + type: communication + schema: + $ref: "#/components/schemas/IncidentCommunicationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident communication + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/google-meet/space: + post: + description: Create a Google Meet space for a given incident. + operationId: CreateIncidentGoogleMeetSpace + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: google_meet + modified: "2024-01-01T00:00:00.000Z" + spaces: [] + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentGoogleMeetIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Google Meet space + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/{incident_id}/impacts: get: description: Get all impacts for an incident. @@ -115098,6 +119899,198 @@ paths: operator: OR permissions: - incident_write + /api/v2/incidents/{incident_id}/jira-issues: + post: + description: Create a Jira issue linked to a given incident. + operationId: CreateIncidentJiraIssue + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + account_id: "123456" + issue_type_id: "10001" + project_id: "10000" + type: incident_jira_issues + schema: + $ref: "#/components/schemas/IncidentJiraIssueRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: jira + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentJiraIssueIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Jira issue + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/microsoft-teams-integration/online-meeting: + post: + description: Create a Microsoft Teams online meeting for a given incident. + operationId: CreateIncidentMSTeamsOnlineMeeting + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: ms_teams + modified: "2024-01-01T00:00:00.000Z" + status: active + teams: [] + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentMSTeamsIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Microsoft Teams online meeting + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/pages/source-link: + get: + description: Get the source link for a page associated with an incident. + operationId: GetIncidentPageSourceLink + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + entity_id: "12345" + is_page: true + relationship: source + id: "12345" + type: case_link + schema: + $ref: "#/components/schemas/IncidentCaseLinkResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident page source link + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/incidents/{incident_id}/relationships/integrations: get: description: Get all integration metadata for an incident. @@ -115636,6 +120629,871 @@ paths: x-unstable: |- **Note**: This endpoint is in public beta. If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/render-template: + post: + description: Render a template with incident-specific data. + operationId: RenderIncidentTemplate + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + content: "Incident INC-123 is SEV-1." + type: rendered_templates + schema: + $ref: "#/components/schemas/IncidentRenderTemplateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + rendered_content: "Incident Server Down is SEV-1." + id: 00000000-0000-0000-0000-000000000000 + type: rendered_templates + schema: + $ref: "#/components/schemas/IncidentRenderedTemplateResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Render an incident template + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/rule-execution-states: + get: + description: List all rule execution states for a given incident. + operationId: ListIncidentRuleExecutionStates + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRuleExecutionStatesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident rule execution states + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/rule-execution-states/batch: + post: + description: Batch create rule execution states for a given incident. + operationId: BatchCreateIncidentRuleExecutionStates + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + rules: + - rule_uuid: 00000000-0000-0000-0000-000000000000 + type: incident_rule_execution_states + schema: + $ref: "#/components/schemas/IncidentBatchCreateRuleExecutionStatesRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRuleExecutionStatesResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Batch create incident rule execution states + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + put: + description: Batch update rule execution states for a given incident. + operationId: BatchUpdateIncidentRuleExecutionStates + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + rules: + - last_executed_at: "2024-01-01T00:00:00.000Z" + rule_uuid: 00000000-0000-0000-0000-000000000000 + type: incident_rule_execution_states + schema: + $ref: "#/components/schemas/IncidentBatchUpdateRuleExecutionStatesRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentRuleExecutionStatesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Batch update incident rule execution states + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/statuspages-suggestion: + get: + description: Get an AI-generated suggestion for a status page notice for a given incident. + operationId: GetIncidentStatusPagesSuggestion + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + status: investigating + update_text: We are investigating reports of elevated error rates. + id: Service Degradation Detected + type: incident_statuspages_suggestion + schema: + $ref: "#/components/schemas/IncidentStatusPagesSuggestionResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident status page suggestion + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices: + post: + description: Publish a status page notice for a given incident. + operationId: CreateIncidentStatusPageNotice + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentStatusPageIdParameter" + - $ref: "#/components/parameters/IncidentStatusPageNotifySubscribersParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + components: + component_1: degraded_performance + message: We are investigating reports of elevated error rates. + status: investigating + title: Service degradation detected. + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeCreateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Publish an incident status page notice + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices/{notice_id}: + patch: + description: Update a status page notice for a given incident. + operationId: UpdateIncidentStatusPageNotice + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentStatusPageIdParameter" + - $ref: "#/components/parameters/IncidentStatusPageNoticeIdParameter" + - $ref: "#/components/parameters/IncidentStatusPageNotifySubscribersParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + message: The issue has been resolved. + status: resolved + title: Service degradation resolved. + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeUpdateRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: statuspage + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentStatusPageNoticeIntegrationResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident status page notice + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/timeline: + get: + description: Get the timeline for a given incident. + operationId: ListIncidentTimelineEntries + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTimelineEntriesResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List incident timeline entries + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create a new timeline entry for a given incident. + operationId: CreateIncidentTimelineEntry + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Investigating the issue. + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Investigating the issue. + created: "2024-01-01T00:00:00.000Z" + display_time: "2024-01-01T00:00:00.000Z" + important: false + incident_id: "12345" + modified: "2024-01-01T00:00:00.000Z" + source: api + id: 00000000-0000-0000-0000-000000000000 + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident timeline entry + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}: + delete: + description: Delete a timeline entry for a given incident. + operationId: DeleteIncidentTimelineEntry + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimelineEntryIdParameter" + responses: + "204": + description: No Content + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Delete an incident timeline entry + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + patch: + description: Update a timeline entry for a given incident. + operationId: UpdateIncidentTimelineEntry + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimelineEntryIdParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Updated investigation notes. + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryRequest" + required: true + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + cell_type: markdown + content: + message: Updated investigation notes. + created: "2024-01-01T00:00:00.000Z" + display_time: "2024-01-01T00:00:00.000Z" + important: false + incident_id: "12345" + modified: "2024-01-01T00:00:00.000Z" + source: api + id: 00000000-0000-0000-0000-000000000000 + type: incident_timeline_cells + schema: + $ref: "#/components/schemas/IncidentTimelineEntryResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Update an incident timeline entry + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}/thread: + get: + description: Get the thread entries for a given timeline entry. + operationId: GetIncidentTimelineEntryThread + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + - $ref: "#/components/parameters/IncidentTimelineEntryIdParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentTimelineThreadResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: Get incident timeline entry thread + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + /api/v2/incidents/{incident_id}/zoom/meeting: + post: + description: Create a Zoom meeting for a given incident. + operationId: CreateIncidentZoomMeeting + parameters: + - $ref: "#/components/parameters/IncidentIDPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + topic: "Incident INC-123 War Room" + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentCreateZoomMeetingRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + created: "2024-01-01T00:00:00.000Z" + integration_type: zoom + meetings: [] + modified: "2024-01-01T00:00:00.000Z" + status: active + id: 00000000-0000-0000-0000-000000000000 + type: incident_integrations + schema: + $ref: "#/components/schemas/IncidentZoomIntegrationResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_write + summary: Create an incident Zoom meeting + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/integration/aws/accounts: get: description: Get a list of AWS Account Integration Configs. @@ -149546,6 +155404,48 @@ paths: operator: AND permissions: - status_pages_settings_read + /api/v2/statuspages/subscription/preferences: + get: + description: Get the subscription preferences for the current user. + operationId: GetStatuspageSubscriptionPreferences + responses: + "200": + content: + application/json: + examples: + default: + value: + data: + attributes: + subscribed: true + id: "12345" + type: statuspage_subscription_preferences + schema: + $ref: "#/components/schemas/IncidentStatuspagePreferencesResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + summary: Get status page subscription preferences + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/statuspages/{page_id}: delete: description: Deletes a status page by its ID. @@ -150653,6 +156553,103 @@ paths: - status_pages_settings_write - status_pages_public_page_publish - status_pages_internal_page_publish + /api/v2/statuspages/{page_id}/subscriptions/email: + get: + description: List all email subscriptions for a status page. + operationId: ListStatuspageEmailSubscriptions + parameters: + - $ref: "#/components/parameters/IncidentStatuspagePageIdPathParameter" + responses: + "200": + content: + application/json: + examples: + default: + value: + data: [] + schema: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionsResponse" + description: OK + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Forbidden + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_read + summary: List status page email subscriptions + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). + post: + description: Create an email subscription for a status page. + operationId: CreateStatuspageEmailSubscription + parameters: + - $ref: "#/components/parameters/IncidentStatuspagePageIdPathParameter" + requestBody: + content: + application/json: + examples: + default: + value: + data: + attributes: + email: user@example.com + type: statuspage_email_subscription + schema: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionRequest" + required: true + responses: + "201": + content: + application/json: + examples: + default: + value: + data: + attributes: + confirmed: true + created_at: "2024-01-01T00:00:00.000Z" + email: user@example.com + id: "12345" + type: statuspage_email_subscription + schema: + $ref: "#/components/schemas/IncidentStatuspageSubscriptionResponse" + description: Created + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + summary: Create a status page email subscription + tags: + - Incidents + x-unstable: |- + **Note**: This endpoint is in preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/statuspages/{page_id}/unpublish: post: description: Unpublishes a status page. For pages of type `public`, removes the status page from the public internet and requires the `status_pages_public_page_publish` permission. For pages of type `internal`, removes the `status-pages/$domain_prefix/view` route from the Datadog organization and requires the `status_pages_internal_page_publish` permission. The `status_pages_settings_write` permission is temporarily honored as we migrate unpublishing functionality from the update status page endpoint to the unpublish status page endpoint. diff --git a/examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.ts b/examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.ts new file mode 100644 index 000000000000..667a503d96b8 --- /dev/null +++ b/examples/v2/incidents/BatchCreateIncidentRuleExecutionStates.ts @@ -0,0 +1,36 @@ +/** + * Batch create incident rule execution states returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.batchCreateIncidentRuleExecutionStates"] = + true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiBatchCreateIncidentRuleExecutionStatesRequest = { + body: { + data: { + attributes: { + rules: [ + { + lastExecutedAt: new Date(2024, 1, 1, 0, 0, 0, 0), + ruleUuid: "00000000-0000-0000-0000-000000000000", + }, + ], + }, + type: "incident_rule_execution_states", + }, + }, + incidentId: "incident_id", +}; + +apiInstance + .batchCreateIncidentRuleExecutionStates(params) + .then((data: v2.IncidentRuleExecutionStatesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/BatchUpdateIncidentRuleExecutionStates.ts b/examples/v2/incidents/BatchUpdateIncidentRuleExecutionStates.ts new file mode 100644 index 000000000000..ed7b51d5e927 --- /dev/null +++ b/examples/v2/incidents/BatchUpdateIncidentRuleExecutionStates.ts @@ -0,0 +1,36 @@ +/** + * Batch update incident rule execution states returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.batchUpdateIncidentRuleExecutionStates"] = + true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiBatchUpdateIncidentRuleExecutionStatesRequest = { + body: { + data: { + attributes: { + rules: [ + { + lastExecutedAt: new Date(2024, 1, 1, 0, 0, 0, 0), + ruleUuid: "00000000-0000-0000-0000-000000000000", + }, + ], + }, + type: "incident_rule_execution_states", + }, + }, + incidentId: "incident_id", +}; + +apiInstance + .batchUpdateIncidentRuleExecutionStates(params) + .then((data: v2.IncidentRuleExecutionStatesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentCommunication.ts b/examples/v2/incidents/CreateIncidentCommunication.ts new file mode 100644 index 000000000000..ef45e8ff5343 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentCommunication.ts @@ -0,0 +1,43 @@ +/** + * Create an incident communication returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentCommunication"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentCommunicationRequest = { + body: { + data: { + attributes: { + communicationType: "manual", + content: { + groupingKey: "update-1", + handles: [ + { + createdAt: "2024-01-01T00:00:00.000Z", + displayName: "#incidents-channel", + handle: "@slack-incidents-channel", + }, + ], + message: "Incident update for INC-123.", + status: 0, + subject: "Incident INC-123: Update", + }, + }, + type: "communication", + }, + }, + incidentId: "incident_id", +}; + +apiInstance + .createIncidentCommunication(params) + .then((data: v2.IncidentCommunicationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentGoogleMeetSpace.ts b/examples/v2/incidents/CreateIncidentGoogleMeetSpace.ts new file mode 100644 index 000000000000..d9cc11c6a1b2 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentGoogleMeetSpace.ts @@ -0,0 +1,22 @@ +/** + * Create an incident Google Meet space returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentGoogleMeetSpace"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentGoogleMeetSpaceRequest = { + incidentId: "incident_id", +}; + +apiInstance + .createIncidentGoogleMeetSpace(params) + .then((data: v2.IncidentGoogleMeetIntegrationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentJiraIssue.ts b/examples/v2/incidents/CreateIncidentJiraIssue.ts new file mode 100644 index 000000000000..571f7a5a2ab1 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentJiraIssue.ts @@ -0,0 +1,33 @@ +/** + * Create an incident Jira issue returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentJiraIssue"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentJiraIssueRequest = { + body: { + data: { + attributes: { + accountId: "123456", + issueTypeId: "10001", + projectId: "10000", + templateId: "00000000-0000-0000-0000-000000000000", + }, + type: "incident_jira_issues", + }, + }, + incidentId: "incident_id", +}; + +apiInstance + .createIncidentJiraIssue(params) + .then((data: v2.IncidentJiraIssueIntegrationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentJiraTemplate.ts b/examples/v2/incidents/CreateIncidentJiraTemplate.ts new file mode 100644 index 000000000000..85e3d7c9b627 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentJiraTemplate.ts @@ -0,0 +1,52 @@ +/** + * Create an incident Jira template returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentJiraTemplate"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentJiraTemplateRequest = { + body: { + data: { + attributes: { + accountId: "123456", + fieldConfigurations: [ + { + incidentField: "title", + jiraFieldKey: "summary", + jiraFieldType: "string", + syncDirection: "bidirectional", + }, + ], + isDefault: false, + issueId: "10001", + name: "Default Jira Template", + projectId: "10000", + projectKey: "INC", + syncEnabled: true, + type: "jira", + }, + relationships: { + incidentType: { + data: { + id: "00000000-0000-0000-0000-000000000000", + type: "incident_types", + }, + }, + }, + type: "incidents_jira_templates", + }, + }, +}; + +apiInstance + .createIncidentJiraTemplate(params) + .then((data: v2.IncidentJiraTemplateResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentMSTeamsOnlineMeeting.ts b/examples/v2/incidents/CreateIncidentMSTeamsOnlineMeeting.ts new file mode 100644 index 000000000000..379ac4d76e3c --- /dev/null +++ b/examples/v2/incidents/CreateIncidentMSTeamsOnlineMeeting.ts @@ -0,0 +1,23 @@ +/** + * Create an incident Microsoft Teams online meeting returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentMSTeamsOnlineMeeting"] = + true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentMSTeamsOnlineMeetingRequest = { + incidentId: "incident_id", +}; + +apiInstance + .createIncidentMSTeamsOnlineMeeting(params) + .then((data: v2.IncidentMSTeamsIntegrationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentMicrosoftTeamsConfiguration.ts b/examples/v2/incidents/CreateIncidentMicrosoftTeamsConfiguration.ts new file mode 100644 index 000000000000..74d2130c1cae --- /dev/null +++ b/examples/v2/incidents/CreateIncidentMicrosoftTeamsConfiguration.ts @@ -0,0 +1,33 @@ +/** + * Create an incident Microsoft Teams configuration returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.createIncidentMicrosoftTeamsConfiguration" +] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentMicrosoftTeamsConfigurationRequest = + { + body: { + data: { + attributes: { + manualMeetingCreation: false, + postMeetingSummary: true, + }, + type: "microsoft_teams_configurations", + }, + }, + }; + +apiInstance + .createIncidentMicrosoftTeamsConfiguration(params) + .then((data: v2.IncidentMicrosoftTeamsConfigurationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentRoleAssignment.ts b/examples/v2/incidents/CreateIncidentRoleAssignment.ts new file mode 100644 index 000000000000..e2cfb67ae4fa --- /dev/null +++ b/examples/v2/incidents/CreateIncidentRoleAssignment.ts @@ -0,0 +1,49 @@ +/** + * Create an incident role assignment returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentRoleAssignment"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentRoleAssignmentRequest = { + body: { + data: { + attributes: { + role: "commander", + }, + relationships: { + reservedRole: { + data: { + id: "00000000-0000-0000-0000-000000000000", + type: "incident_reserved_roles", + }, + }, + responder: { + data: { + id: "00000000-0000-0000-0000-000000000000", + type: "users", + }, + }, + userDefinedRole: { + data: { + id: "00000000-0000-0000-0000-000000000000", + type: "incident_reserved_roles", + }, + }, + }, + type: "incident_role_assignments", + }, + }, +}; + +apiInstance + .createIncidentRoleAssignment(params) + .then((data: v2.IncidentRoleAssignmentResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentStatusPageNotice.ts b/examples/v2/incidents/CreateIncidentStatusPageNotice.ts new file mode 100644 index 000000000000..b7652c215d91 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentStatusPageNotice.ts @@ -0,0 +1,36 @@ +/** + * Publish an incident status page notice returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentStatusPageNotice"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentStatusPageNoticeRequest = { + body: { + data: { + attributes: { + components: { + component_1: "degraded_performance", + }, + message: "We are investigating reports of elevated error rates.", + status: "investigating", + title: "Service degradation detected.", + }, + type: "incident_integrations", + }, + }, + incidentId: "incident_id", + statuspageId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .createIncidentStatusPageNotice(params) + .then((data: v2.IncidentStatusPageNoticeIntegrationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentStatuspageIncident.ts b/examples/v2/incidents/CreateIncidentStatuspageIncident.ts new file mode 100644 index 000000000000..b98f246de79d --- /dev/null +++ b/examples/v2/incidents/CreateIncidentStatuspageIncident.ts @@ -0,0 +1,35 @@ +/** + * Create a Statuspage incident for an incident returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentStatuspageIncident"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentStatuspageIncidentRequest = { + body: { + data: { + attributes: { + body: "We are investigating the issue.", + deliverNotifications: true, + impact: "major", + name: "Service Outage", + pageId: "abc123", + status: "investigating", + }, + type: "incident_integrations", + }, + }, + incidentId: "incident_id", +}; + +apiInstance + .createIncidentStatuspageIncident(params) + .then((data: v2.IncidentStatuspageIncidentResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentTimelineEntry.ts b/examples/v2/incidents/CreateIncidentTimelineEntry.ts new file mode 100644 index 000000000000..87802840708e --- /dev/null +++ b/examples/v2/incidents/CreateIncidentTimelineEntry.ts @@ -0,0 +1,35 @@ +/** + * Create an incident timeline entry returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentTimelineEntry"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentTimelineEntryRequest = { + body: { + data: { + attributes: { + cellType: "markdown", + content: { + message: "Investigating the issue.", + }, + displayTime: new Date(2024, 1, 1, 0, 0, 0, 0), + important: false, + }, + type: "incident_timeline_cells", + }, + }, + incidentId: "incident_id", +}; + +apiInstance + .createIncidentTimelineEntry(params) + .then((data: v2.IncidentTimelineEntryResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentZoomConfiguration.ts b/examples/v2/incidents/CreateIncidentZoomConfiguration.ts new file mode 100644 index 000000000000..abb77e532b02 --- /dev/null +++ b/examples/v2/incidents/CreateIncidentZoomConfiguration.ts @@ -0,0 +1,31 @@ +/** + * Create an incident Zoom configuration returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentZoomConfiguration"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentZoomConfigurationRequest = { + body: { + data: { + attributes: { + manualMeetingCreation: false, + meetingChatTimelineSync: false, + postMeetingSummary: true, + }, + type: "zoom_configurations", + }, + }, +}; + +apiInstance + .createIncidentZoomConfiguration(params) + .then((data: v2.IncidentZoomConfigurationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateIncidentZoomMeeting.ts b/examples/v2/incidents/CreateIncidentZoomMeeting.ts new file mode 100644 index 000000000000..cd1cbb61ac7c --- /dev/null +++ b/examples/v2/incidents/CreateIncidentZoomMeeting.ts @@ -0,0 +1,30 @@ +/** + * Create an incident Zoom meeting returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentZoomMeeting"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateIncidentZoomMeetingRequest = { + body: { + data: { + attributes: { + topic: "Incident INC-123 War Room", + }, + type: "incident_integrations", + }, + }, + incidentId: "incident_id", +}; + +apiInstance + .createIncidentZoomMeeting(params) + .then((data: v2.IncidentZoomIntegrationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/CreateStatuspageEmailSubscription.ts b/examples/v2/incidents/CreateStatuspageEmailSubscription.ts new file mode 100644 index 000000000000..127d0fbe3ac3 --- /dev/null +++ b/examples/v2/incidents/CreateStatuspageEmailSubscription.ts @@ -0,0 +1,30 @@ +/** + * Create a status page email subscription returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createStatuspageEmailSubscription"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiCreateStatuspageEmailSubscriptionRequest = { + body: { + data: { + attributes: { + email: "user@example.com", + }, + type: "statuspage_email_subscription", + }, + }, + pageId: "page_id", +}; + +apiInstance + .createStatuspageEmailSubscription(params) + .then((data: v2.IncidentStatuspageSubscriptionResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/DeleteIncidentCommunication.ts b/examples/v2/incidents/DeleteIncidentCommunication.ts new file mode 100644 index 000000000000..0161dc2f225e --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentCommunication.ts @@ -0,0 +1,23 @@ +/** + * Delete an incident communication returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteIncidentCommunication"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiDeleteIncidentCommunicationRequest = { + incidentId: "incident_id", + communicationId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .deleteIncidentCommunication(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/incidents/DeleteIncidentJiraTemplate.ts b/examples/v2/incidents/DeleteIncidentJiraTemplate.ts new file mode 100644 index 000000000000..00f8c1bfd737 --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentJiraTemplate.ts @@ -0,0 +1,22 @@ +/** + * Delete an incident Jira template returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteIncidentJiraTemplate"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiDeleteIncidentJiraTemplateRequest = { + templateId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .deleteIncidentJiraTemplate(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/incidents/DeleteIncidentRoleAssignment.ts b/examples/v2/incidents/DeleteIncidentRoleAssignment.ts new file mode 100644 index 000000000000..145f9332c30c --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentRoleAssignment.ts @@ -0,0 +1,22 @@ +/** + * Delete an incident role assignment returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteIncidentRoleAssignment"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiDeleteIncidentRoleAssignmentRequest = { + roleAssignmentId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .deleteIncidentRoleAssignment(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/incidents/DeleteIncidentTimelineEntry.ts b/examples/v2/incidents/DeleteIncidentTimelineEntry.ts new file mode 100644 index 000000000000..2ebdcd145fce --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentTimelineEntry.ts @@ -0,0 +1,23 @@ +/** + * Delete an incident timeline entry returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteIncidentTimelineEntry"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiDeleteIncidentTimelineEntryRequest = { + incidentId: "incident_id", + timelineEntryId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .deleteIncidentTimelineEntry(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/incidents/ExportIncidents.ts b/examples/v2/incidents/ExportIncidents.ts new file mode 100644 index 000000000000..b5b6a8361f90 --- /dev/null +++ b/examples/v2/incidents/ExportIncidents.ts @@ -0,0 +1,25 @@ +/** + * Export incidents returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.exportIncidents"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiExportIncidentsRequest = { + body: { + fields: ["title", "severity", "state"], + query: "state:active", + }, +}; + +apiInstance + .exportIncidents(params) + .then((data: client.HttpFile) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentAutomationData.ts b/examples/v2/incidents/GetIncidentAutomationData.ts new file mode 100644 index 000000000000..4d4c4d3443dc --- /dev/null +++ b/examples/v2/incidents/GetIncidentAutomationData.ts @@ -0,0 +1,23 @@ +/** + * Get incident automation data returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentAutomationData"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentAutomationDataRequest = { + incidentId: "incident_id", + key: "key", +}; + +apiInstance + .getIncidentAutomationData(params) + .then((data: v2.IncidentAutomationDataResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentCaseSourceLink.ts b/examples/v2/incidents/GetIncidentCaseSourceLink.ts new file mode 100644 index 000000000000..4f908e6eb9dc --- /dev/null +++ b/examples/v2/incidents/GetIncidentCaseSourceLink.ts @@ -0,0 +1,22 @@ +/** + * Get incident case source link returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentCaseSourceLink"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentCaseSourceLinkRequest = { + incidentId: "incident_id", +}; + +apiInstance + .getIncidentCaseSourceLink(params) + .then((data: v2.IncidentCaseLinkResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentCommunication.ts b/examples/v2/incidents/GetIncidentCommunication.ts new file mode 100644 index 000000000000..be8f8541eea7 --- /dev/null +++ b/examples/v2/incidents/GetIncidentCommunication.ts @@ -0,0 +1,23 @@ +/** + * Get an incident communication returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentCommunication"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentCommunicationRequest = { + incidentId: "incident_id", + communicationId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .getIncidentCommunication(params) + .then((data: v2.IncidentCommunicationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentJiraTemplate.ts b/examples/v2/incidents/GetIncidentJiraTemplate.ts new file mode 100644 index 000000000000..0ffad757cb18 --- /dev/null +++ b/examples/v2/incidents/GetIncidentJiraTemplate.ts @@ -0,0 +1,22 @@ +/** + * Get an incident Jira template returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentJiraTemplate"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentJiraTemplateRequest = { + templateId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .getIncidentJiraTemplate(params) + .then((data: v2.IncidentJiraTemplateResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentPageSourceLink.ts b/examples/v2/incidents/GetIncidentPageSourceLink.ts new file mode 100644 index 000000000000..7c6777a88d67 --- /dev/null +++ b/examples/v2/incidents/GetIncidentPageSourceLink.ts @@ -0,0 +1,22 @@ +/** + * Get incident page source link returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentPageSourceLink"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentPageSourceLinkRequest = { + incidentId: "incident_id", +}; + +apiInstance + .getIncidentPageSourceLink(params) + .then((data: v2.IncidentCaseLinkResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentPagerdutyRelatedIncidents.ts b/examples/v2/incidents/GetIncidentPagerdutyRelatedIncidents.ts new file mode 100644 index 000000000000..a9b266b399a5 --- /dev/null +++ b/examples/v2/incidents/GetIncidentPagerdutyRelatedIncidents.ts @@ -0,0 +1,23 @@ +/** + * Get PagerDuty related incidents returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentPagerdutyRelatedIncidents"] = + true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentPagerdutyRelatedIncidentsRequest = { + pagerdutyIncidentId: "pagerduty_incident_id", +}; + +apiInstance + .getIncidentPagerdutyRelatedIncidents(params) + .then((data: v2.IncidentPagerdutyRelatedIncidentsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentReservedRole.ts b/examples/v2/incidents/GetIncidentReservedRole.ts new file mode 100644 index 000000000000..390109c99a4f --- /dev/null +++ b/examples/v2/incidents/GetIncidentReservedRole.ts @@ -0,0 +1,22 @@ +/** + * Get an incident reserved role returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentReservedRole"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentReservedRoleRequest = { + roleId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .getIncidentReservedRole(params) + .then((data: v2.IncidentReservedRoleResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentRoleAssignment.ts b/examples/v2/incidents/GetIncidentRoleAssignment.ts new file mode 100644 index 000000000000..4687fade1905 --- /dev/null +++ b/examples/v2/incidents/GetIncidentRoleAssignment.ts @@ -0,0 +1,22 @@ +/** + * Get an incident role assignment returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentRoleAssignment"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentRoleAssignmentRequest = { + roleAssignmentId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .getIncidentRoleAssignment(params) + .then((data: v2.IncidentRoleAssignmentResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentStatusPagesSuggestion.ts b/examples/v2/incidents/GetIncidentStatusPagesSuggestion.ts new file mode 100644 index 000000000000..cf134631c8f0 --- /dev/null +++ b/examples/v2/incidents/GetIncidentStatusPagesSuggestion.ts @@ -0,0 +1,22 @@ +/** + * Get incident status page suggestion returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentStatusPagesSuggestion"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentStatusPagesSuggestionRequest = { + incidentId: "incident_id", +}; + +apiInstance + .getIncidentStatusPagesSuggestion(params) + .then((data: v2.IncidentStatusPagesSuggestionResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetIncidentTimelineEntryThread.ts b/examples/v2/incidents/GetIncidentTimelineEntryThread.ts new file mode 100644 index 000000000000..2a0ecbfd3f25 --- /dev/null +++ b/examples/v2/incidents/GetIncidentTimelineEntryThread.ts @@ -0,0 +1,23 @@ +/** + * Get incident timeline entry thread returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentTimelineEntryThread"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiGetIncidentTimelineEntryThreadRequest = { + incidentId: "incident_id", + timelineEntryId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .getIncidentTimelineEntryThread(params) + .then((data: v2.IncidentTimelineThreadResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/GetStatuspageSubscriptionPreferences.ts b/examples/v2/incidents/GetStatuspageSubscriptionPreferences.ts new file mode 100644 index 000000000000..4612b474832e --- /dev/null +++ b/examples/v2/incidents/GetStatuspageSubscriptionPreferences.ts @@ -0,0 +1,19 @@ +/** + * Get status page subscription preferences returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getStatuspageSubscriptionPreferences"] = + true; +const apiInstance = new v2.IncidentsApi(configuration); + +apiInstance + .getStatuspageSubscriptionPreferences() + .then((data: v2.IncidentStatuspagePreferencesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/ListIncidentCommunications.ts b/examples/v2/incidents/ListIncidentCommunications.ts new file mode 100644 index 000000000000..0db43e70782f --- /dev/null +++ b/examples/v2/incidents/ListIncidentCommunications.ts @@ -0,0 +1,22 @@ +/** + * List incident communications returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listIncidentCommunications"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiListIncidentCommunicationsRequest = { + incidentId: "incident_id", +}; + +apiInstance + .listIncidentCommunications(params) + .then((data: v2.IncidentCommunicationsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/ListIncidentJiraTemplates.ts b/examples/v2/incidents/ListIncidentJiraTemplates.ts new file mode 100644 index 000000000000..1c7658beed39 --- /dev/null +++ b/examples/v2/incidents/ListIncidentJiraTemplates.ts @@ -0,0 +1,18 @@ +/** + * List incident Jira templates returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listIncidentJiraTemplates"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +apiInstance + .listIncidentJiraTemplates() + .then((data: v2.IncidentJiraTemplatesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/ListIncidentPagerdutyServices.ts b/examples/v2/incidents/ListIncidentPagerdutyServices.ts new file mode 100644 index 000000000000..b7097cdae599 --- /dev/null +++ b/examples/v2/incidents/ListIncidentPagerdutyServices.ts @@ -0,0 +1,18 @@ +/** + * List PagerDuty services returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listIncidentPagerdutyServices"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +apiInstance + .listIncidentPagerdutyServices() + .then((data: v2.IncidentPagerdutyServicesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/ListIncidentReservedRoles.ts b/examples/v2/incidents/ListIncidentReservedRoles.ts new file mode 100644 index 000000000000..3f07b8f79a5e --- /dev/null +++ b/examples/v2/incidents/ListIncidentReservedRoles.ts @@ -0,0 +1,18 @@ +/** + * List incident reserved roles returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listIncidentReservedRoles"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +apiInstance + .listIncidentReservedRoles() + .then((data: v2.IncidentReservedRolesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/ListIncidentRuleExecutionStates.ts b/examples/v2/incidents/ListIncidentRuleExecutionStates.ts new file mode 100644 index 000000000000..ccd7c1defd4d --- /dev/null +++ b/examples/v2/incidents/ListIncidentRuleExecutionStates.ts @@ -0,0 +1,22 @@ +/** + * List incident rule execution states returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listIncidentRuleExecutionStates"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiListIncidentRuleExecutionStatesRequest = { + incidentId: "incident_id", +}; + +apiInstance + .listIncidentRuleExecutionStates(params) + .then((data: v2.IncidentRuleExecutionStatesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/ListIncidentTemplateVariables.ts b/examples/v2/incidents/ListIncidentTemplateVariables.ts new file mode 100644 index 000000000000..d6caaa082b2b --- /dev/null +++ b/examples/v2/incidents/ListIncidentTemplateVariables.ts @@ -0,0 +1,18 @@ +/** + * List incident template variables returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listIncidentTemplateVariables"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +apiInstance + .listIncidentTemplateVariables() + .then((data: v2.IncidentTemplateVariablesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/ListIncidentTimelineEntries.ts b/examples/v2/incidents/ListIncidentTimelineEntries.ts new file mode 100644 index 000000000000..bc9303b63baa --- /dev/null +++ b/examples/v2/incidents/ListIncidentTimelineEntries.ts @@ -0,0 +1,22 @@ +/** + * List incident timeline entries returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listIncidentTimelineEntries"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiListIncidentTimelineEntriesRequest = { + incidentId: "incident_id", +}; + +apiInstance + .listIncidentTimelineEntries(params) + .then((data: v2.IncidentTimelineEntriesResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/ListStatuspageEmailSubscriptions.ts b/examples/v2/incidents/ListStatuspageEmailSubscriptions.ts new file mode 100644 index 000000000000..ce642256d620 --- /dev/null +++ b/examples/v2/incidents/ListStatuspageEmailSubscriptions.ts @@ -0,0 +1,22 @@ +/** + * List status page email subscriptions returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listStatuspageEmailSubscriptions"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiListStatuspageEmailSubscriptionsRequest = { + pageId: "page_id", +}; + +apiInstance + .listStatuspageEmailSubscriptions(params) + .then((data: v2.IncidentStatuspageSubscriptionsResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/PatchIncidentNotificationRule.ts b/examples/v2/incidents/PatchIncidentNotificationRule.ts new file mode 100644 index 000000000000..808014cbca1f --- /dev/null +++ b/examples/v2/incidents/PatchIncidentNotificationRule.ts @@ -0,0 +1,55 @@ +/** + * Partially update an incident notification rule returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.patchIncidentNotificationRule"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiPatchIncidentNotificationRuleRequest = { + body: { + data: { + attributes: { + conditions: [ + { + field: "severity", + values: ["SEV-1", "SEV-2"], + }, + ], + enabled: true, + handles: ["@team-email@company.com", "@slack-channel"], + renotifyOn: ["status", "severity"], + trigger: "incident_created_trigger", + visibility: "organization", + }, + id: "00000000-0000-0000-0000-000000000001", + relationships: { + incidentType: { + data: { + id: "00000000-0000-0000-0000-000000000000", + type: "incident_types", + }, + }, + notificationTemplate: { + data: { + id: "00000000-0000-0000-0000-000000000001", + type: "notification_templates", + }, + }, + }, + type: "incident_notification_rules", + }, + }, + id: "00000000-0000-0000-0000-000000000001", +}; + +apiInstance + .patchIncidentNotificationRule(params) + .then((data: v2.IncidentNotificationRule) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/RenderIncidentTemplate.ts b/examples/v2/incidents/RenderIncidentTemplate.ts new file mode 100644 index 000000000000..d179b4f4d5ad --- /dev/null +++ b/examples/v2/incidents/RenderIncidentTemplate.ts @@ -0,0 +1,34 @@ +/** + * Render an incident template returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.renderIncidentTemplate"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiRenderIncidentTemplateRequest = { + body: { + data: { + attributes: { + content: "Incident INC-123 is SEV-1.", + datetimeFormat: "2006-01-02T15:04:05Z07:00", + timezone: "America/New_York", + validateLinks: false, + validateVariables: false, + }, + type: "rendered_templates", + }, + }, + incidentId: "incident_id", +}; + +apiInstance + .renderIncidentTemplate(params) + .then((data: v2.IncidentRenderedTemplateResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/SearchIncidentsV2.ts b/examples/v2/incidents/SearchIncidentsV2.ts new file mode 100644 index 000000000000..9fa49bd7ab3d --- /dev/null +++ b/examples/v2/incidents/SearchIncidentsV2.ts @@ -0,0 +1,18 @@ +/** + * Search incidents returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.searchIncidentsV2"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +apiInstance + .searchIncidentsV2() + .then((data: v2.IncidentSearchResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/UpdateIncidentCommunication.ts b/examples/v2/incidents/UpdateIncidentCommunication.ts new file mode 100644 index 000000000000..31f4c1418fa2 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentCommunication.ts @@ -0,0 +1,44 @@ +/** + * Update an incident communication returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateIncidentCommunication"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiUpdateIncidentCommunicationRequest = { + body: { + data: { + attributes: { + communicationType: "manual", + content: { + groupingKey: "update-1", + handles: [ + { + createdAt: "2024-01-01T00:00:00.000Z", + displayName: "#incidents-channel", + handle: "@slack-incidents-channel", + }, + ], + message: "Incident update for INC-123.", + status: 0, + subject: "Incident INC-123: Update", + }, + }, + type: "communication", + }, + }, + incidentId: "incident_id", + communicationId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .updateIncidentCommunication(params) + .then((data: v2.IncidentCommunicationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/UpdateIncidentJiraTemplate.ts b/examples/v2/incidents/UpdateIncidentJiraTemplate.ts new file mode 100644 index 000000000000..c8fac44c5f65 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentJiraTemplate.ts @@ -0,0 +1,53 @@ +/** + * Update an incident Jira template returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateIncidentJiraTemplate"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiUpdateIncidentJiraTemplateRequest = { + body: { + data: { + attributes: { + accountId: "123456", + fieldConfigurations: [ + { + incidentField: "title", + jiraFieldKey: "summary", + jiraFieldType: "string", + syncDirection: "bidirectional", + }, + ], + isDefault: false, + issueId: "10001", + name: "Default Jira Template", + projectId: "10000", + projectKey: "INC", + syncEnabled: true, + type: "jira", + }, + relationships: { + incidentType: { + data: { + id: "00000000-0000-0000-0000-000000000000", + type: "incident_types", + }, + }, + }, + type: "incidents_jira_templates", + }, + }, + templateId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .updateIncidentJiraTemplate(params) + .then((data: v2.IncidentJiraTemplateResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/UpdateIncidentMicrosoftTeamsConfiguration.ts b/examples/v2/incidents/UpdateIncidentMicrosoftTeamsConfiguration.ts new file mode 100644 index 000000000000..0ca8578ec292 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentMicrosoftTeamsConfiguration.ts @@ -0,0 +1,34 @@ +/** + * Update an incident Microsoft Teams configuration returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations[ + "v2.updateIncidentMicrosoftTeamsConfiguration" +] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiUpdateIncidentMicrosoftTeamsConfigurationRequest = + { + body: { + data: { + attributes: { + manualMeetingCreation: false, + postMeetingSummary: true, + }, + type: "microsoft_teams_configurations", + }, + }, + configurationId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", + }; + +apiInstance + .updateIncidentMicrosoftTeamsConfiguration(params) + .then((data: v2.IncidentMicrosoftTeamsConfigurationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/UpdateIncidentStatusPageNotice.ts b/examples/v2/incidents/UpdateIncidentStatusPageNotice.ts new file mode 100644 index 000000000000..5d3c7833ce17 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentStatusPageNotice.ts @@ -0,0 +1,34 @@ +/** + * Update an incident status page notice returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateIncidentStatusPageNotice"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiUpdateIncidentStatusPageNoticeRequest = { + body: { + data: { + attributes: { + message: "The issue has been resolved.", + status: "resolved", + title: "Service degradation resolved.", + }, + type: "incident_integrations", + }, + }, + incidentId: "incident_id", + statuspageId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", + noticeId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .updateIncidentStatusPageNotice(params) + .then((data: v2.IncidentStatusPageNoticeIntegrationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/UpdateIncidentStatuspageIncident.ts b/examples/v2/incidents/UpdateIncidentStatuspageIncident.ts new file mode 100644 index 000000000000..d665319cd6d8 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentStatuspageIncident.ts @@ -0,0 +1,37 @@ +/** + * Update a Statuspage incident for an incident returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateIncidentStatuspageIncident"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiUpdateIncidentStatuspageIncidentRequest = { + body: { + data: { + attributes: { + body: "We are investigating the issue.", + deliverNotifications: true, + impact: "major", + name: "Service Outage", + pageId: "abc123", + status: "investigating", + }, + type: "incident_integrations", + }, + }, + incidentId: "incident_id", + pageId: "page_id", + statuspageIncidentId: "statuspage_incident_id", +}; + +apiInstance + .updateIncidentStatuspageIncident(params) + .then((data: v2.IncidentStatuspageIncidentResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/UpdateIncidentTimelineEntry.ts b/examples/v2/incidents/UpdateIncidentTimelineEntry.ts new file mode 100644 index 000000000000..76df0f153c83 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentTimelineEntry.ts @@ -0,0 +1,36 @@ +/** + * Update an incident timeline entry returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateIncidentTimelineEntry"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiUpdateIncidentTimelineEntryRequest = { + body: { + data: { + attributes: { + cellType: "markdown", + content: { + message: "Investigating the issue.", + }, + displayTime: new Date(2024, 1, 1, 0, 0, 0, 0), + important: false, + }, + type: "incident_timeline_cells", + }, + }, + incidentId: "incident_id", + timelineEntryId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .updateIncidentTimelineEntry(params) + .then((data: v2.IncidentTimelineEntryResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/UpdateIncidentZoomConfiguration.ts b/examples/v2/incidents/UpdateIncidentZoomConfiguration.ts new file mode 100644 index 000000000000..411e6ea28eb3 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentZoomConfiguration.ts @@ -0,0 +1,32 @@ +/** + * Update an incident Zoom configuration returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateIncidentZoomConfiguration"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiUpdateIncidentZoomConfigurationRequest = { + body: { + data: { + attributes: { + manualMeetingCreation: false, + meetingChatTimelineSync: false, + postMeetingSummary: true, + }, + type: "zoom_configurations", + }, + }, + configurationId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", +}; + +apiInstance + .updateIncidentZoomConfiguration(params) + .then((data: v2.IncidentZoomConfigurationResponse) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/UpsertIncidentAutomationData.ts b/examples/v2/incidents/UpsertIncidentAutomationData.ts new file mode 100644 index 000000000000..f8e22efaf66e --- /dev/null +++ b/examples/v2/incidents/UpsertIncidentAutomationData.ts @@ -0,0 +1,31 @@ +/** + * Create or update incident automation data returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.upsertIncidentAutomationData"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiUpsertIncidentAutomationDataRequest = { + body: { + data: { + attributes: { + value: "completed", + }, + type: "incidents_automation_data", + }, + }, + incidentId: "incident_id", + key: "key", +}; + +apiInstance + .upsertIncidentAutomationData(params) + .then((data: v2.IncidentAutomationDataResponse) => { + 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 bb8db8d6acc4..be058b73aced 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -8244,6 +8244,79 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "GlobalIncidentSettingsResponse", }, + "v2.ListIncidentJiraTemplates": { + "isDefault": { + "type": "boolean", + "format": "", + }, + "incidentTypeId": { + "type": "string", + "format": "uuid", + }, + "templateType": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentJiraTemplatesResponse", + }, + "v2.CreateIncidentJiraTemplate": { + "body": { + "type": "IncidentJiraTemplateRequest", + "format": "", + }, + "operationResponseType": "IncidentJiraTemplateResponse", + }, + "v2.GetIncidentJiraTemplate": { + "templateId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "IncidentJiraTemplateResponse", + }, + "v2.UpdateIncidentJiraTemplate": { + "templateId": { + "type": "string", + "format": "uuid", + }, + "body": { + "type": "IncidentJiraTemplateRequest", + "format": "", + }, + "operationResponseType": "IncidentJiraTemplateResponse", + }, + "v2.DeleteIncidentJiraTemplate": { + "templateId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, + "v2.CreateIncidentMicrosoftTeamsConfiguration": { + "include": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentMicrosoftTeamsConfigurationRequest", + "format": "", + }, + "operationResponseType": "IncidentMicrosoftTeamsConfigurationResponse", + }, + "v2.UpdateIncidentMicrosoftTeamsConfiguration": { + "configurationId": { + "type": "string", + "format": "uuid", + }, + "include": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentMicrosoftTeamsConfigurationRequest", + "format": "", + }, + "operationResponseType": "IncidentMicrosoftTeamsConfigurationResponse", + }, "v2.ListIncidentNotificationRules": { "include": { "type": "string", @@ -8295,6 +8368,21 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "{}", }, + "v2.PatchIncidentNotificationRule": { + "id": { + "type": "string", + "format": "uuid", + }, + "include": { + "type": "string", + "format": "", + }, + "body": { + "type": "PutIncidentNotificationRuleRequest", + "format": "", + }, + "operationResponseType": "IncidentNotificationRule", + }, "v2.ListIncidentNotificationTemplates": { "filterIncidentType": { "type": "string", @@ -8385,6 +8473,27 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "PostmortemTemplateResponse", }, + "v2.ListIncidentReservedRoles": { + "operationResponseType": "IncidentReservedRolesResponse", + }, + "v2.GetIncidentReservedRole": { + "roleId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "IncidentReservedRoleResponse", + }, + "v2.ListIncidentTemplateVariables": { + "filterIncidentType": { + "type": "string", + "format": "uuid", + }, + "includeFollowUps": { + "type": "boolean", + "format": "", + }, + "operationResponseType": "IncidentTemplateVariablesResponse", + }, "v2.ListIncidentTypes": { "includeDeleted": { "type": "boolean", @@ -8491,6 +8600,32 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "IncidentUserDefinedFieldResponse", }, + "v2.CreateIncidentZoomConfiguration": { + "include": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentZoomConfigurationRequest", + "format": "", + }, + "operationResponseType": "IncidentZoomConfigurationResponse", + }, + "v2.UpdateIncidentZoomConfiguration": { + "configurationId": { + "type": "string", + "format": "uuid", + }, + "include": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentZoomConfigurationRequest", + "format": "", + }, + "operationResponseType": "IncidentZoomConfigurationResponse", + }, "v2.ImportIncident": { "include": { "type": "Array", @@ -8502,6 +8637,41 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "IncidentImportResponse", }, + "v2.ListIncidentPagerdutyServices": { + "includeUnresolved": { + "type": "boolean", + "format": "", + }, + "operationResponseType": "IncidentPagerdutyServicesResponse", + }, + "v2.GetIncidentPagerdutyRelatedIncidents": { + "pagerdutyIncidentId": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentPagerdutyRelatedIncidentsResponse", + }, + "v2.CreateIncidentRoleAssignment": { + "body": { + "type": "IncidentRoleAssignmentRequest", + "format": "", + }, + "operationResponseType": "IncidentRoleAssignmentResponse", + }, + "v2.GetIncidentRoleAssignment": { + "roleAssignmentId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "IncidentRoleAssignmentResponse", + }, + "v2.DeleteIncidentRoleAssignment": { + "roleAssignmentId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, "v2.SearchIncidents": { "include": { "type": "IncidentRelatedObject", @@ -8525,6 +8695,82 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "IncidentSearchResponse", }, + "v2.SearchIncidentsV2": { + "query": { + "type": "string", + "format": "", + }, + "sort": { + "type": "IncidentSearchIncidentsSortOrder", + "format": "", + }, + "withFacets": { + "type": "boolean", + "format": "", + }, + "filterWithDeleted": { + "type": "boolean", + "format": "", + }, + "semanticQuery": { + "type": "string", + "format": "", + }, + "timeZone": { + "type": "string", + "format": "", + }, + "include": { + "type": "Array", + "format": "", + }, + "pageSize": { + "type": "number", + "format": "int64", + }, + "pageOffset": { + "type": "number", + "format": "int64", + }, + "operationResponseType": "IncidentSearchResponse", + }, + "v2.ExportIncidents": { + "body": { + "type": "IncidentSearchIncidentsExportRequest", + "format": "", + }, + "operationResponseType": "HttpFile", + }, + "v2.CreateIncidentStatuspageIncident": { + "incidentId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentStatuspageIncidentRequest", + "format": "", + }, + "operationResponseType": "IncidentStatuspageIncidentResponse", + }, + "v2.UpdateIncidentStatuspageIncident": { + "incidentId": { + "type": "string", + "format": "", + }, + "pageId": { + "type": "string", + "format": "", + }, + "statuspageIncidentId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentStatuspageIncidentRequest", + "format": "", + }, + "operationResponseType": "IncidentStatuspageIncidentResponse", + }, "v2.GetIncident": { "incidentId": { "type": "string", @@ -8629,6 +8875,113 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "Attachment", }, + "v2.GetIncidentAutomationData": { + "incidentId": { + "type": "string", + "format": "", + }, + "key": { + "type": "string", + "format": "", + }, + "include": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentAutomationDataResponse", + }, + "v2.UpsertIncidentAutomationData": { + "incidentId": { + "type": "string", + "format": "", + }, + "key": { + "type": "string", + "format": "", + }, + "include": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentAutomationDataRequest", + "format": "", + }, + "operationResponseType": "IncidentAutomationDataResponse", + }, + "v2.GetIncidentCaseSourceLink": { + "incidentId": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentCaseLinkResponse", + }, + "v2.ListIncidentCommunications": { + "incidentId": { + "type": "string", + "format": "", + }, + "filterCommunicationType": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentCommunicationsResponse", + }, + "v2.CreateIncidentCommunication": { + "incidentId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentCommunicationRequest", + "format": "", + }, + "operationResponseType": "IncidentCommunicationResponse", + }, + "v2.GetIncidentCommunication": { + "incidentId": { + "type": "string", + "format": "", + }, + "communicationId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "IncidentCommunicationResponse", + }, + "v2.DeleteIncidentCommunication": { + "incidentId": { + "type": "string", + "format": "", + }, + "communicationId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, + "v2.UpdateIncidentCommunication": { + "incidentId": { + "type": "string", + "format": "", + }, + "communicationId": { + "type": "string", + "format": "uuid", + }, + "body": { + "type": "IncidentCommunicationRequest", + "format": "", + }, + "operationResponseType": "IncidentCommunicationResponse", + }, + "v2.CreateIncidentGoogleMeetSpace": { + "incidentId": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentGoogleMeetIntegrationResponse", + }, "v2.ListIncidentImpacts": { "incidentId": { "type": "string", @@ -8666,6 +9019,31 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "{}", }, + "v2.CreateIncidentJiraIssue": { + "incidentId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentJiraIssueRequest", + "format": "", + }, + "operationResponseType": "IncidentJiraIssueIntegrationResponse", + }, + "v2.CreateIncidentMSTeamsOnlineMeeting": { + "incidentId": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentMSTeamsIntegrationResponse", + }, + "v2.GetIncidentPageSourceLink": { + "incidentId": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentCaseLinkResponse", + }, "v2.ListIncidentIntegrations": { "incidentId": { "type": "string", @@ -8776,6 +9154,182 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "IncidentTodoResponse", }, + "v2.RenderIncidentTemplate": { + "incidentId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentRenderTemplateRequest", + "format": "", + }, + "operationResponseType": "IncidentRenderedTemplateResponse", + }, + "v2.ListIncidentRuleExecutionStates": { + "incidentId": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentRuleExecutionStatesResponse", + }, + "v2.BatchUpdateIncidentRuleExecutionStates": { + "incidentId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentBatchUpdateRuleExecutionStatesRequest", + "format": "", + }, + "operationResponseType": "IncidentRuleExecutionStatesResponse", + }, + "v2.BatchCreateIncidentRuleExecutionStates": { + "incidentId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentBatchCreateRuleExecutionStatesRequest", + "format": "", + }, + "operationResponseType": "IncidentRuleExecutionStatesResponse", + }, + "v2.GetIncidentStatusPagesSuggestion": { + "incidentId": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentStatusPagesSuggestionResponse", + }, + "v2.CreateIncidentStatusPageNotice": { + "incidentId": { + "type": "string", + "format": "", + }, + "statuspageId": { + "type": "string", + "format": "uuid", + }, + "notifySubscribers": { + "type": "boolean", + "format": "", + }, + "body": { + "type": "IncidentStatusPageNoticeCreateRequest", + "format": "", + }, + "operationResponseType": "IncidentStatusPageNoticeIntegrationResponse", + }, + "v2.UpdateIncidentStatusPageNotice": { + "incidentId": { + "type": "string", + "format": "", + }, + "statuspageId": { + "type": "string", + "format": "uuid", + }, + "noticeId": { + "type": "string", + "format": "uuid", + }, + "notifySubscribers": { + "type": "boolean", + "format": "", + }, + "body": { + "type": "IncidentStatusPageNoticeUpdateRequest", + "format": "", + }, + "operationResponseType": "IncidentStatusPageNoticeIntegrationResponse", + }, + "v2.ListIncidentTimelineEntries": { + "incidentId": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentTimelineEntriesResponse", + }, + "v2.CreateIncidentTimelineEntry": { + "incidentId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentTimelineEntryRequest", + "format": "", + }, + "operationResponseType": "IncidentTimelineEntryResponse", + }, + "v2.DeleteIncidentTimelineEntry": { + "incidentId": { + "type": "string", + "format": "", + }, + "timelineEntryId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "{}", + }, + "v2.UpdateIncidentTimelineEntry": { + "incidentId": { + "type": "string", + "format": "", + }, + "timelineEntryId": { + "type": "string", + "format": "uuid", + }, + "body": { + "type": "IncidentTimelineEntryRequest", + "format": "", + }, + "operationResponseType": "IncidentTimelineEntryResponse", + }, + "v2.GetIncidentTimelineEntryThread": { + "incidentId": { + "type": "string", + "format": "", + }, + "timelineEntryId": { + "type": "string", + "format": "uuid", + }, + "operationResponseType": "IncidentTimelineThreadResponse", + }, + "v2.CreateIncidentZoomMeeting": { + "incidentId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentCreateZoomMeetingRequest", + "format": "", + }, + "operationResponseType": "IncidentZoomIntegrationResponse", + }, + "v2.GetStatuspageSubscriptionPreferences": { + "operationResponseType": "IncidentStatuspagePreferencesResponse", + }, + "v2.ListStatuspageEmailSubscriptions": { + "pageId": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentStatuspageSubscriptionsResponse", + }, + "v2.CreateStatuspageEmailSubscription": { + "pageId": { + "type": "string", + "format": "", + }, + "body": { + "type": "IncidentStatuspageSubscriptionRequest", + "format": "", + }, + "operationResponseType": "IncidentStatuspageSubscriptionResponse", + }, "v2.ListAWSAccounts": { "awsAccountId": { "type": "string", diff --git a/features/v2/incidents.feature b/features/v2/incidents.feature index e30ccb252928..5c17c702dafe 100644 --- a/features/v2/incidents.feature +++ b/features/v2/incidents.feature @@ -21,6 +21,282 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Batch create incident rule execution states returns "Bad Request" response + Given operation "BatchCreateIncidentRuleExecutionStates" enabled + And new "BatchCreateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Batch create incident rule execution states returns "Created" response + Given operation "BatchCreateIncidentRuleExecutionStates" enabled + And new "BatchCreateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Batch create incident rule execution states returns "Not Found" response + Given operation "BatchCreateIncidentRuleExecutionStates" enabled + And new "BatchCreateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Batch update incident rule execution states returns "Bad Request" response + Given operation "BatchUpdateIncidentRuleExecutionStates" enabled + And new "BatchUpdateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Batch update incident rule execution states returns "Not Found" response + Given operation "BatchUpdateIncidentRuleExecutionStates" enabled + And new "BatchUpdateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Batch update incident rule execution states returns "OK" response + Given operation "BatchUpdateIncidentRuleExecutionStates" enabled + And new "BatchUpdateIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"rules": [{"last_executed_at": "2024-01-01T00:00:00.000Z", "rule_uuid": "00000000-0000-0000-0000-000000000000"}]}, "type": "incident_rule_execution_states"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Create a Statuspage incident for an incident returns "Bad Request" response + Given operation "CreateIncidentStatuspageIncident" enabled + And new "CreateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create a Statuspage incident for an incident returns "Not Found" response + Given operation "CreateIncidentStatuspageIncident" enabled + And new "CreateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create a Statuspage incident for an incident returns "OK" response + Given operation "CreateIncidentStatuspageIncident" enabled + And new "CreateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Create a status page email subscription returns "Bad Request" response + Given operation "CreateStatuspageEmailSubscription" enabled + And new "CreateStatuspageEmailSubscription" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"email": "user@example.com"}, "type": "statuspage_email_subscription"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create a status page email subscription returns "Created" response + Given operation "CreateStatuspageEmailSubscription" enabled + And new "CreateStatuspageEmailSubscription" request + And request contains "page_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"email": "user@example.com"}, "type": "statuspage_email_subscription"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Google Meet space returns "Bad Request" response + Given operation "CreateIncidentGoogleMeetSpace" enabled + And new "CreateIncidentGoogleMeetSpace" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Google Meet space returns "Created" response + Given operation "CreateIncidentGoogleMeetSpace" enabled + And new "CreateIncidentGoogleMeetSpace" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Google Meet space returns "Not Found" response + Given operation "CreateIncidentGoogleMeetSpace" enabled + And new "CreateIncidentGoogleMeetSpace" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira issue returns "Bad Request" response + Given operation "CreateIncidentJiraIssue" enabled + And new "CreateIncidentJiraIssue" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "issue_type_id": "10001", "project_id": "10000", "template_id": "00000000-0000-0000-0000-000000000000"}, "type": "incident_jira_issues"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira issue returns "Created" response + Given operation "CreateIncidentJiraIssue" enabled + And new "CreateIncidentJiraIssue" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "issue_type_id": "10001", "project_id": "10000", "template_id": "00000000-0000-0000-0000-000000000000"}, "type": "incident_jira_issues"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira issue returns "Not Found" response + Given operation "CreateIncidentJiraIssue" enabled + And new "CreateIncidentJiraIssue" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "issue_type_id": "10001", "project_id": "10000", "template_id": "00000000-0000-0000-0000-000000000000"}, "type": "incident_jira_issues"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira template returns "Bad Request" response + Given operation "CreateIncidentJiraTemplate" enabled + And new "CreateIncidentJiraTemplate" request + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Jira template returns "Created" response + Given operation "CreateIncidentJiraTemplate" enabled + And new "CreateIncidentJiraTemplate" request + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams configuration returns "Bad Request" response + Given operation "CreateIncidentMicrosoftTeamsConfiguration" enabled + And new "CreateIncidentMicrosoftTeamsConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams configuration returns "Created" response + Given operation "CreateIncidentMicrosoftTeamsConfiguration" enabled + And new "CreateIncidentMicrosoftTeamsConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams online meeting returns "Bad Request" response + Given operation "CreateIncidentMSTeamsOnlineMeeting" enabled + And new "CreateIncidentMSTeamsOnlineMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams online meeting returns "Created" response + Given operation "CreateIncidentMSTeamsOnlineMeeting" enabled + And new "CreateIncidentMSTeamsOnlineMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Microsoft Teams online meeting returns "Not Found" response + Given operation "CreateIncidentMSTeamsOnlineMeeting" enabled + And new "CreateIncidentMSTeamsOnlineMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom configuration returns "Bad Request" response + Given operation "CreateIncidentZoomConfiguration" enabled + And new "CreateIncidentZoomConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom configuration returns "Created" response + Given operation "CreateIncidentZoomConfiguration" enabled + And new "CreateIncidentZoomConfiguration" request + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom meeting returns "Bad Request" response + Given operation "CreateIncidentZoomMeeting" enabled + And new "CreateIncidentZoomMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"topic": "Incident INC-123 War Room"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom meeting returns "Created" response + Given operation "CreateIncidentZoomMeeting" enabled + And new "CreateIncidentZoomMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"topic": "Incident INC-123 War Room"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident Zoom meeting returns "Not Found" response + Given operation "CreateIncidentZoomMeeting" enabled + And new "CreateIncidentZoomMeeting" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"topic": "Incident INC-123 War Room"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident communication returns "Bad Request" response + Given operation "CreateIncidentCommunication" enabled + And new "CreateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident communication returns "Created" response + Given operation "CreateIncidentCommunication" enabled + And new "CreateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident communication returns "Not Found" response + Given operation "CreateIncidentCommunication" enabled + And new "CreateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 404 Not Found + @skip @team:DataDog/incident-app Scenario: Create an incident impact returns "Bad Request" response Given operation "CreateIncidentImpact" enabled @@ -133,6 +409,65 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Bad Request" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Conflict" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 409 Conflict + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Created" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident role assignment returns "Not Found" response + Given operation "CreateIncidentRoleAssignment" enabled + And new "CreateIncidentRoleAssignment" request + And body with value {"data": {"attributes": {"role": "commander"}, "relationships": {"reserved_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}, "responder": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "users"}}, "user_defined_role": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_reserved_roles"}}}, "type": "incident_role_assignments"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident timeline entry returns "Bad Request" response + Given operation "CreateIncidentTimelineEntry" enabled + And new "CreateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident timeline entry returns "Created" response + Given operation "CreateIncidentTimelineEntry" enabled + And new "CreateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 201 Created + + @generated @skip @team:DataDog/incident-app + Scenario: Create an incident timeline entry returns "Not Found" response + Given operation "CreateIncidentTimelineEntry" enabled + And new "CreateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:Datadog/incident-app Scenario: Create an incident todo returns "Bad Request" response Given operation "CreateIncidentTodo" enabled @@ -296,6 +631,36 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: Create or update incident automation data returns "Bad Request" response + Given operation "UpsertIncidentAutomationData" enabled + And new "UpsertIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "completed"}, "type": "incidents_automation_data"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Create or update incident automation data returns "Not Found" response + Given operation "UpsertIncidentAutomationData" enabled + And new "UpsertIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "completed"}, "type": "incidents_automation_data"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Create or update incident automation data returns "OK" response + Given operation "UpsertIncidentAutomationData" enabled + And new "UpsertIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"value": "completed"}, "type": "incidents_automation_data"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Create postmortem attachment returns "Bad Request" response Given operation "CreateIncidentPostmortemAttachment" enabled @@ -379,6 +744,57 @@ Feature: Incidents When the request is sent Then the response status is 204 OK + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident Jira template returns "Bad Request" response + Given operation "DeleteIncidentJiraTemplate" enabled + And new "DeleteIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident Jira template returns "No Content" response + Given operation "DeleteIncidentJiraTemplate" enabled + And new "DeleteIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident Jira template returns "Not Found" response + Given operation "DeleteIncidentJiraTemplate" enabled + And new "DeleteIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident communication returns "Bad Request" response + Given operation "DeleteIncidentCommunication" enabled + And new "DeleteIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident communication returns "No Content" response + Given operation "DeleteIncidentCommunication" enabled + And new "DeleteIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident communication returns "Not Found" response + Given operation "DeleteIncidentCommunication" enabled + And new "DeleteIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @skip @team:DataDog/incident-app Scenario: Delete an incident impact returns "No Content" response Given there is a valid "incident" in the system @@ -452,6 +868,57 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident role assignment returns "Bad Request" response + Given operation "DeleteIncidentRoleAssignment" enabled + And new "DeleteIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident role assignment returns "No Content" response + Given operation "DeleteIncidentRoleAssignment" enabled + And new "DeleteIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident role assignment returns "Not Found" response + Given operation "DeleteIncidentRoleAssignment" enabled + And new "DeleteIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident timeline entry returns "Bad Request" response + Given operation "DeleteIncidentTimelineEntry" enabled + And new "DeleteIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident timeline entry returns "No Content" response + Given operation "DeleteIncidentTimelineEntry" enabled + And new "DeleteIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 204 No Content + + @generated @skip @team:DataDog/incident-app + Scenario: Delete an incident timeline entry returns "Not Found" response + Given operation "DeleteIncidentTimelineEntry" enabled + And new "DeleteIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:Datadog/incident-app Scenario: Delete an incident todo returns "Bad Request" response Given operation "DeleteIncidentTodo" enabled @@ -626,8 +1093,48 @@ Feature: Incidents Then the response status is 404 Not Found @generated @skip @team:DataDog/incident-app - Scenario: Get a list of an incident's integration metadata returns "Bad Request" response - Given operation "ListIncidentIntegrations" enabled + Scenario: Export incidents returns "Bad Request" response + Given operation "ExportIncidents" enabled + And new "ExportIncidents" request + And body with value {"fields": ["title", "severity", "state"], "query": "state:active"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Export incidents returns "OK" response + Given operation "ExportIncidents" enabled + And new "ExportIncidents" request + And body with value {"fields": ["title", "severity", "state"], "query": "state:active"} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get PagerDuty related incidents returns "Bad Request" response + Given operation "GetIncidentPagerdutyRelatedIncidents" enabled + And new "GetIncidentPagerdutyRelatedIncidents" request + And request contains "pagerduty_incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get PagerDuty related incidents returns "Not Found" response + Given operation "GetIncidentPagerdutyRelatedIncidents" enabled + And new "GetIncidentPagerdutyRelatedIncidents" request + And request contains "pagerduty_incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get PagerDuty related incidents returns "OK" response + Given operation "GetIncidentPagerdutyRelatedIncidents" enabled + And new "GetIncidentPagerdutyRelatedIncidents" request + And request contains "pagerduty_incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get a list of an incident's integration metadata returns "Bad Request" response + Given operation "ListIncidentIntegrations" enabled And new "ListIncidentIntegrations" request And request contains "incident_id" parameter from "REPLACE.ME" When the request is sent @@ -741,6 +1248,57 @@ Feature: Incidents Then the response status is 200 OK And the response has 3 items + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident Jira template returns "Bad Request" response + Given operation "GetIncidentJiraTemplate" enabled + And new "GetIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident Jira template returns "Not Found" response + Given operation "GetIncidentJiraTemplate" enabled + And new "GetIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident Jira template returns "OK" response + Given operation "GetIncidentJiraTemplate" enabled + And new "GetIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident communication returns "Bad Request" response + Given operation "GetIncidentCommunication" enabled + And new "GetIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident communication returns "Not Found" response + Given operation "GetIncidentCommunication" enabled + And new "GetIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident communication returns "OK" response + Given operation "GetIncidentCommunication" enabled + And new "GetIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Get an incident notification rule returns "Bad Request" response Given operation "GetIncidentNotificationRule" enabled @@ -765,6 +1323,46 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident reserved role returns "Not Found" response + Given operation "GetIncidentReservedRole" enabled + And new "GetIncidentReservedRole" request + And request contains "role_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident reserved role returns "OK" response + Given operation "GetIncidentReservedRole" enabled + And new "GetIncidentReservedRole" request + And request contains "role_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident role assignment returns "Bad Request" response + Given operation "GetIncidentRoleAssignment" enabled + And new "GetIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident role assignment returns "Not Found" response + Given operation "GetIncidentRoleAssignment" enabled + And new "GetIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get an incident role assignment returns "OK" response + Given operation "GetIncidentRoleAssignment" enabled + And new "GetIncidentRoleAssignment" request + And request contains "role_assignment_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get an incident user-defined field returns "Not Found" response Given operation "GetIncidentUserDefinedField" enabled @@ -795,6 +1393,49 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Get incident automation data returns "Bad Request" response + Given operation "GetIncidentAutomationData" enabled + And new "GetIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident automation data returns "Not Found" response + Given operation "GetIncidentAutomationData" enabled + And new "GetIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident automation data returns "OK" response + Given operation "GetIncidentAutomationData" enabled + And new "GetIncidentAutomationData" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "key" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident case source link returns "Not Found" response + Given operation "GetIncidentCaseSourceLink" enabled + And new "GetIncidentCaseSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident case source link returns "OK" response + Given operation "GetIncidentCaseSourceLink" enabled + And new "GetIncidentCaseSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get incident integration metadata details returns "Bad Request" response Given operation "GetIncidentIntegration" enabled @@ -874,6 +1515,65 @@ Feature: Incidents And the response "data" has field "attributes" And the response "data" has field "relationships" + @generated @skip @team:DataDog/incident-app + Scenario: Get incident page source link returns "Not Found" response + Given operation "GetIncidentPageSourceLink" enabled + And new "GetIncidentPageSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident page source link returns "OK" response + Given operation "GetIncidentPageSourceLink" enabled + And new "GetIncidentPageSourceLink" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident status page suggestion returns "Not Found" response + Given operation "GetIncidentStatusPagesSuggestion" enabled + And new "GetIncidentStatusPagesSuggestion" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident status page suggestion returns "OK" response + Given operation "GetIncidentStatusPagesSuggestion" enabled + And new "GetIncidentStatusPagesSuggestion" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident timeline entry thread returns "Bad Request" response + Given operation "GetIncidentTimelineEntryThread" enabled + And new "GetIncidentTimelineEntryThread" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident timeline entry thread returns "Not Found" response + Given operation "GetIncidentTimelineEntryThread" enabled + And new "GetIncidentTimelineEntryThread" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Get incident timeline entry thread returns "OK" response + Given operation "GetIncidentTimelineEntryThread" enabled + And new "GetIncidentTimelineEntryThread" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Get incident todo details returns "Bad Request" response Given operation "GetIncidentTodo" enabled @@ -953,6 +1653,13 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Get status page subscription preferences returns "OK" response + Given operation "GetStatuspageSubscriptionPreferences" enabled + And new "GetStatuspageSubscriptionPreferences" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Get the details of an incident returns "Bad Request" response Given operation "GetIncident" enabled @@ -1005,6 +1712,20 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app + Scenario: List PagerDuty services returns "Bad Request" response + Given operation "ListIncidentPagerdutyServices" enabled + And new "ListIncidentPagerdutyServices" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List PagerDuty services returns "OK" response + Given operation "ListIncidentPagerdutyServices" enabled + And new "ListIncidentPagerdutyServices" request + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: List an incident's impacts returns "Bad Request" response Given new "ListIncidentImpacts" request @@ -1042,6 +1763,20 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: List incident Jira templates returns "Bad Request" response + Given operation "ListIncidentJiraTemplates" enabled + And new "ListIncidentJiraTemplates" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident Jira templates returns "OK" response + Given operation "ListIncidentJiraTemplates" enabled + And new "ListIncidentJiraTemplates" request + When the request is sent + Then the response status is 200 OK + @skip @team:DataDog/incident-app Scenario: List incident attachments returns "Bad Request" response Given operation "ListIncidentAttachments" enabled @@ -1061,6 +1796,30 @@ Feature: Incidents Then the response status is 200 OK And the response "data" has length 1 + @generated @skip @team:DataDog/incident-app + Scenario: List incident communications returns "Bad Request" response + Given operation "ListIncidentCommunications" enabled + And new "ListIncidentCommunications" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident communications returns "Not Found" response + Given operation "ListIncidentCommunications" enabled + And new "ListIncidentCommunications" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List incident communications returns "OK" response + Given operation "ListIncidentCommunications" enabled + And new "ListIncidentCommunications" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: List incident notification rules returns "Bad Request" response Given operation "ListIncidentNotificationRules" enabled @@ -1108,6 +1867,68 @@ Feature: Incidents Then the response status is 200 OK And the response "data" has length 0 + @generated @skip @team:DataDog/incident-app + Scenario: List incident reserved roles returns "OK" response + Given operation "ListIncidentReservedRoles" enabled + And new "ListIncidentReservedRoles" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: List incident rule execution states returns "Bad Request" response + Given operation "ListIncidentRuleExecutionStates" enabled + And new "ListIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident rule execution states returns "Not Found" response + Given operation "ListIncidentRuleExecutionStates" enabled + And new "ListIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List incident rule execution states returns "OK" response + Given operation "ListIncidentRuleExecutionStates" enabled + And new "ListIncidentRuleExecutionStates" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: List incident template variables returns "OK" response + Given operation "ListIncidentTemplateVariables" enabled + And new "ListIncidentTemplateVariables" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: List incident timeline entries returns "Bad Request" response + Given operation "ListIncidentTimelineEntries" enabled + And new "ListIncidentTimelineEntries" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: List incident timeline entries returns "Not Found" response + Given operation "ListIncidentTimelineEntries" enabled + And new "ListIncidentTimelineEntries" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List incident timeline entries returns "OK" response + Given operation "ListIncidentTimelineEntries" enabled + And new "ListIncidentTimelineEntries" request + And request contains "incident_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: List postmortem templates returns "Bad Request" response Given operation "ListIncidentPostmortemTemplates" enabled @@ -1122,6 +1943,79 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: List status page email subscriptions returns "Not Found" response + Given operation "ListStatuspageEmailSubscriptions" enabled + And new "ListStatuspageEmailSubscriptions" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: List status page email subscriptions returns "OK" response + Given operation "ListStatuspageEmailSubscriptions" enabled + And new "ListStatuspageEmailSubscriptions" request + And request contains "page_id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:Datadog/incident-app + Scenario: Partially update an incident notification rule returns "Bad Request" response + Given operation "PatchIncidentNotificationRule" enabled + And new "PatchIncidentNotificationRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"conditions": [{"field": "severity", "values": ["SEV-1", "SEV-2"]}], "enabled": true, "handles": ["@team-email@company.com", "@slack-channel"], "renotify_on": ["status", "severity"], "trigger": "incident_created_trigger", "visibility": "organization"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}, "notification_template": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "notification_templates"}}}, "type": "incident_notification_rules"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: Partially update an incident notification rule returns "Not Found" response + Given operation "PatchIncidentNotificationRule" enabled + And new "PatchIncidentNotificationRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"conditions": [{"field": "severity", "values": ["SEV-1", "SEV-2"]}], "enabled": true, "handles": ["@team-email@company.com", "@slack-channel"], "renotify_on": ["status", "severity"], "trigger": "incident_created_trigger", "visibility": "organization"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}, "notification_template": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "notification_templates"}}}, "type": "incident_notification_rules"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:Datadog/incident-app + Scenario: Partially update an incident notification rule returns "OK" response + Given operation "PatchIncidentNotificationRule" enabled + And new "PatchIncidentNotificationRule" request + And request contains "id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"conditions": [{"field": "severity", "values": ["SEV-1", "SEV-2"]}], "enabled": true, "handles": ["@team-email@company.com", "@slack-channel"], "renotify_on": ["status", "severity"], "trigger": "incident_created_trigger", "visibility": "organization"}, "id": "00000000-0000-0000-0000-000000000001", "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}, "notification_template": {"data": {"id": "00000000-0000-0000-0000-000000000001", "type": "notification_templates"}}}, "type": "incident_notification_rules"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Publish an incident status page notice returns "Bad Request" response + Given operation "CreateIncidentStatusPageNotice" enabled + And new "CreateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"components": {"component_1": "degraded_performance"}, "message": "We are investigating reports of elevated error rates.", "status": "investigating", "title": "Service degradation detected."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Publish an incident status page notice returns "Not Found" response + Given operation "CreateIncidentStatusPageNotice" enabled + And new "CreateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"components": {"component_1": "degraded_performance"}, "message": "We are investigating reports of elevated error rates.", "status": "investigating", "title": "Service degradation detected."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Publish an incident status page notice returns "OK" response + Given operation "CreateIncidentStatusPageNotice" enabled + And new "CreateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"components": {"component_1": "degraded_performance"}, "message": "We are investigating reports of elevated error rates.", "status": "investigating", "title": "Service degradation detected."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + @team:DataDog/incident-app Scenario: Remove commander from an incident returns "OK" response Given operation "UpdateIncident" enabled @@ -1133,6 +2027,33 @@ Feature: Incidents Then the response status is 200 OK And the response "data.relationships.commander_user.data" is equal to null + @generated @skip @team:DataDog/incident-app + Scenario: Render an incident template returns "Bad Request" response + Given operation "RenderIncidentTemplate" enabled + And new "RenderIncidentTemplate" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"content": "Incident INC-123 is SEV-1.", "datetime_format": "2006-01-02T15:04:05Z07:00", "timezone": "America/New_York", "validate_links": false, "validate_variables": false}, "type": "rendered_templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Render an incident template returns "Not Found" response + Given operation "RenderIncidentTemplate" enabled + And new "RenderIncidentTemplate" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"content": "Incident INC-123 is SEV-1.", "datetime_format": "2006-01-02T15:04:05Z07:00", "timezone": "America/New_York", "validate_links": false, "validate_variables": false}, "type": "rendered_templates"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Render an incident template returns "OK" response + Given operation "RenderIncidentTemplate" enabled + And new "RenderIncidentTemplate" request + And request contains "incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"content": "Incident INC-123 is SEV-1.", "datetime_format": "2006-01-02T15:04:05Z07:00", "timezone": "America/New_York", "validate_links": false, "validate_variables": false}, "type": "rendered_templates"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Search for incidents returns "Bad Request" response Given operation "SearchIncidents" enabled @@ -1170,6 +2091,53 @@ Feature: Incidents Then the response status is 200 OK And the response has 3 items + @generated @skip @team:DataDog/incident-app + Scenario: Search incidents returns "Bad Request" response + Given operation "SearchIncidentsV2" enabled + And new "SearchIncidentsV2" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Search incidents returns "OK" response + Given operation "SearchIncidentsV2" enabled + And new "SearchIncidentsV2" request + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update a Statuspage incident for an incident returns "Bad Request" response + Given operation "UpdateIncidentStatuspageIncident" enabled + And new "UpdateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "statuspage_incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update a Statuspage incident for an incident returns "Not Found" response + Given operation "UpdateIncidentStatuspageIncident" enabled + And new "UpdateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "statuspage_incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update a Statuspage incident for an incident returns "OK" response + Given operation "UpdateIncidentStatuspageIncident" enabled + And new "UpdateIncidentStatuspageIncident" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "page_id" parameter from "REPLACE.ME" + And request contains "statuspage_incident_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"body": "We are investigating the issue.", "deliver_notifications": true, "impact": "major", "name": "Service Outage", "page_id": "abc123", "status": "investigating"}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app Scenario: Update an existing incident integration metadata returns "Bad Request" response Given operation "UpdateIncidentIntegration" enabled @@ -1232,6 +2200,117 @@ Feature: Incidents Then the response status is 200 OK And the response "data.attributes.title" is equal to "{{ incident.data.attributes.title }}-updated" + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Jira template returns "Bad Request" response + Given operation "UpdateIncidentJiraTemplate" enabled + And new "UpdateIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Jira template returns "Not Found" response + Given operation "UpdateIncidentJiraTemplate" enabled + And new "UpdateIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Jira template returns "OK" response + Given operation "UpdateIncidentJiraTemplate" enabled + And new "UpdateIncidentJiraTemplate" request + And request contains "template_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"account_id": "123456", "field_configurations": [{"incident_field": "title", "jira_field_key": "summary", "jira_field_type": "string", "sync_direction": "bidirectional"}], "is_default": false, "issue_id": "10001", "name": "Default Jira Template", "project_id": "10000", "project_key": "INC", "sync_enabled": true, "type": "jira"}, "relationships": {"incident_type": {"data": {"id": "00000000-0000-0000-0000-000000000000", "type": "incident_types"}}}, "type": "incidents_jira_templates"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Microsoft Teams configuration returns "Bad Request" response + Given operation "UpdateIncidentMicrosoftTeamsConfiguration" enabled + And new "UpdateIncidentMicrosoftTeamsConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Microsoft Teams configuration returns "Not Found" response + Given operation "UpdateIncidentMicrosoftTeamsConfiguration" enabled + And new "UpdateIncidentMicrosoftTeamsConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Microsoft Teams configuration returns "OK" response + Given operation "UpdateIncidentMicrosoftTeamsConfiguration" enabled + And new "UpdateIncidentMicrosoftTeamsConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "post_meeting_summary": true}, "type": "microsoft_teams_configurations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Zoom configuration returns "Bad Request" response + Given operation "UpdateIncidentZoomConfiguration" enabled + And new "UpdateIncidentZoomConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Zoom configuration returns "Not Found" response + Given operation "UpdateIncidentZoomConfiguration" enabled + And new "UpdateIncidentZoomConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident Zoom configuration returns "OK" response + Given operation "UpdateIncidentZoomConfiguration" enabled + And new "UpdateIncidentZoomConfiguration" request + And request contains "configuration_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"manual_meeting_creation": false, "meeting_chat_timeline_sync": false, "post_meeting_summary": true}, "type": "zoom_configurations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident communication returns "Bad Request" response + Given operation "UpdateIncidentCommunication" enabled + And new "UpdateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident communication returns "Not Found" response + Given operation "UpdateIncidentCommunication" enabled + And new "UpdateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident communication returns "OK" response + Given operation "UpdateIncidentCommunication" enabled + And new "UpdateIncidentCommunication" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "communication_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"communication_type": "manual", "content": {"grouping_key": "update-1", "handles": [{"created_at": "2024-01-01T00:00:00.000Z", "display_name": "#incidents-channel", "handle": "@slack-incidents-channel"}], "message": "Incident update for INC-123.", "status": 0, "subject": "Incident INC-123: Update"}}, "type": "communication"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Update an incident notification rule returns "Bad Request" response Given operation "UpdateIncidentNotificationRule" enabled @@ -1259,6 +2338,69 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident status page notice returns "Bad Request" response + Given operation "UpdateIncidentStatusPageNotice" enabled + And new "UpdateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And request contains "notice_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "The issue has been resolved.", "status": "resolved", "title": "Service degradation resolved."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident status page notice returns "Not Found" response + Given operation "UpdateIncidentStatusPageNotice" enabled + And new "UpdateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And request contains "notice_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "The issue has been resolved.", "status": "resolved", "title": "Service degradation resolved."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident status page notice returns "OK" response + Given operation "UpdateIncidentStatusPageNotice" enabled + And new "UpdateIncidentStatusPageNotice" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "statuspage_id" parameter from "REPLACE.ME" + And request contains "notice_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"message": "The issue has been resolved.", "status": "resolved", "title": "Service degradation resolved."}, "type": "incident_integrations"}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident timeline entry returns "Bad Request" response + Given operation "UpdateIncidentTimelineEntry" enabled + And new "UpdateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident timeline entry returns "Not Found" response + Given operation "UpdateIncidentTimelineEntry" enabled + And new "UpdateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/incident-app + Scenario: Update an incident timeline entry returns "OK" response + Given operation "UpdateIncidentTimelineEntry" enabled + And new "UpdateIncidentTimelineEntry" request + And request contains "incident_id" parameter from "REPLACE.ME" + And request contains "timeline_entry_id" parameter from "REPLACE.ME" + And body with value {"data": {"attributes": {"cell_type": "markdown", "content": {"message": "Investigating the issue."}, "display_time": "2024-01-01T00:00:00.000Z", "important": false}, "type": "incident_timeline_cells"}} + When the request is sent + Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app Scenario: Update an incident todo returns "Bad Request" response Given operation "UpdateIncidentTodo" enabled diff --git a/features/v2/undo.json b/features/v2/undo.json index 02753f1a80a7..5e77ed0122cc 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -2571,6 +2571,54 @@ "type": "idempotent" } }, + "ListIncidentJiraTemplates": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentJiraTemplate", + "parameters": [ + { + "name": "template_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpdateIncidentJiraTemplate": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "CreateIncidentMicrosoftTeamsConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentMicrosoftTeamsConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListIncidentNotificationRules": { "tag": "Incidents", "undo": { @@ -2602,6 +2650,12 @@ "type": "safe" } }, + "PatchIncidentNotificationRule": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "UpdateIncidentNotificationRule": { "tag": "Incidents", "undo": { @@ -2682,6 +2736,24 @@ "type": "idempotent" } }, + "ListIncidentReservedRoles": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "GetIncidentReservedRole": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ListIncidentTemplateVariables": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "ListIncidentTypes": { "tag": "Incidents", "undo": { @@ -2756,6 +2828,18 @@ "type": "idempotent" } }, + "CreateIncidentZoomConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentZoomConfiguration": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ImportIncident": { "tag": "Incidents", "undo": { @@ -2769,12 +2853,72 @@ "type": "unsafe" } }, + "ListIncidentPagerdutyServices": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "GetIncidentPagerdutyRelatedIncidents": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentRoleAssignment": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentRoleAssignment", + "parameters": [ + { + "name": "role_assignment_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentRoleAssignment": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentRoleAssignment": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "SearchIncidents": { "tag": "Incidents", "undo": { "type": "safe" } }, + "SearchIncidentsV2": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ExportIncidents": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentStatuspageIncident": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentStatuspageIncident": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "DeleteIncident": { "tag": "Incidents", "undo": { @@ -2836,6 +2980,70 @@ "type": "idempotent" } }, + "GetIncidentAutomationData": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpsertIncidentAutomationData": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentCaseSourceLink": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ListIncidentCommunications": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentCommunication": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentCommunication", + "parameters": [ + { + "name": "incident_id", + "source": "data.attributes.incident_id" + }, + { + "name": "communication_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentCommunication": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentCommunication": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpdateIncidentCommunication": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "CreateIncidentGoogleMeetSpace": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListIncidentImpacts": { "tag": "Incidents", "undo": { @@ -2865,6 +3073,24 @@ "type": "idempotent" } }, + "CreateIncidentJiraIssue": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "CreateIncidentMSTeamsOnlineMeeting": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentPageSourceLink": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "ListIncidentIntegrations": { "tag": "Incidents", "undo": { @@ -2947,6 +3173,94 @@ "type": "idempotent" } }, + "RenderIncidentTemplate": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "ListIncidentRuleExecutionStates": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "BatchCreateIncidentRuleExecutionStates": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "BatchUpdateIncidentRuleExecutionStates": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentStatusPagesSuggestion": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentStatusPageNotice": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentStatusPageNotice": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "ListIncidentTimelineEntries": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentTimelineEntry": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentTimelineEntry", + "parameters": [ + { + "name": "incident_id", + "source": "data.attributes.incident_id" + }, + { + "name": "timeline_entry_id", + "source": "data.id" + } + ] + } + }, + "DeleteIncidentTimelineEntry": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "UpdateIncidentTimelineEntry": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentTimelineEntryThread": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentZoomMeeting": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListAWSAccounts": { "tag": "AWS Integration", "undo": { @@ -6947,6 +7261,12 @@ "type": "safe" } }, + "GetStatuspageSubscriptionPreferences": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, "DeleteStatusPage": { "tag": "Status Pages", "undo": { @@ -7088,6 +7408,18 @@ "type": "idempotent" } }, + "ListStatuspageEmailSubscriptions": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateStatuspageEmailSubscription": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "UnpublishStatusPage": { "tag": "Status Pages", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index b7324b9b1c1c..0b3f512b3fc1 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -413,59 +413,109 @@ export function createConfiguration( "v2.updateDeploymentRule": false, "v2.createHamrOrgConnection": false, "v2.getHamrOrgConnection": false, + "v2.batchCreateIncidentRuleExecutionStates": false, + "v2.batchUpdateIncidentRuleExecutionStates": false, "v2.createGlobalIncidentHandle": false, "v2.createIncident": false, "v2.createIncidentAttachment": false, + "v2.createIncidentCommunication": false, + "v2.createIncidentGoogleMeetSpace": false, "v2.createIncidentIntegration": false, + "v2.createIncidentJiraIssue": false, + "v2.createIncidentJiraTemplate": false, + "v2.createIncidentMicrosoftTeamsConfiguration": false, + "v2.createIncidentMSTeamsOnlineMeeting": false, "v2.createIncidentNotificationRule": false, "v2.createIncidentNotificationTemplate": false, "v2.createIncidentPostmortemAttachment": false, "v2.createIncidentPostmortemTemplate": false, + "v2.createIncidentRoleAssignment": false, + "v2.createIncidentStatuspageIncident": false, + "v2.createIncidentStatusPageNotice": false, + "v2.createIncidentTimelineEntry": false, "v2.createIncidentTodo": false, "v2.createIncidentType": false, "v2.createIncidentUserDefinedField": false, + "v2.createIncidentZoomConfiguration": false, + "v2.createIncidentZoomMeeting": false, + "v2.createStatuspageEmailSubscription": false, "v2.deleteGlobalIncidentHandle": false, "v2.deleteIncident": false, "v2.deleteIncidentAttachment": false, + "v2.deleteIncidentCommunication": false, "v2.deleteIncidentIntegration": false, + "v2.deleteIncidentJiraTemplate": false, "v2.deleteIncidentNotificationRule": false, "v2.deleteIncidentNotificationTemplate": false, "v2.deleteIncidentPostmortemTemplate": false, + "v2.deleteIncidentRoleAssignment": false, + "v2.deleteIncidentTimelineEntry": false, "v2.deleteIncidentTodo": false, "v2.deleteIncidentType": false, "v2.deleteIncidentUserDefinedField": false, + "v2.exportIncidents": false, "v2.getGlobalIncidentSettings": false, "v2.getIncident": false, + "v2.getIncidentAutomationData": false, + "v2.getIncidentCaseSourceLink": false, + "v2.getIncidentCommunication": false, "v2.getIncidentIntegration": false, + "v2.getIncidentJiraTemplate": false, "v2.getIncidentNotificationRule": false, "v2.getIncidentNotificationTemplate": false, + "v2.getIncidentPagerdutyRelatedIncidents": false, + "v2.getIncidentPageSourceLink": false, "v2.getIncidentPostmortemTemplate": false, + "v2.getIncidentReservedRole": false, + "v2.getIncidentRoleAssignment": false, + "v2.getIncidentStatusPagesSuggestion": false, + "v2.getIncidentTimelineEntryThread": false, "v2.getIncidentTodo": false, "v2.getIncidentType": false, "v2.getIncidentUserDefinedField": false, + "v2.getStatuspageSubscriptionPreferences": false, "v2.importIncident": false, "v2.listGlobalIncidentHandles": false, "v2.listIncidentAttachments": false, + "v2.listIncidentCommunications": false, "v2.listIncidentIntegrations": false, + "v2.listIncidentJiraTemplates": false, "v2.listIncidentNotificationRules": false, "v2.listIncidentNotificationTemplates": false, + "v2.listIncidentPagerdutyServices": false, "v2.listIncidentPostmortemTemplates": false, + "v2.listIncidentReservedRoles": false, + "v2.listIncidentRuleExecutionStates": false, "v2.listIncidents": false, + "v2.listIncidentTemplateVariables": false, + "v2.listIncidentTimelineEntries": false, "v2.listIncidentTodos": false, "v2.listIncidentTypes": false, "v2.listIncidentUserDefinedFields": false, + "v2.listStatuspageEmailSubscriptions": false, + "v2.patchIncidentNotificationRule": false, + "v2.renderIncidentTemplate": false, "v2.searchIncidents": false, + "v2.searchIncidentsV2": false, "v2.updateGlobalIncidentHandle": false, "v2.updateGlobalIncidentSettings": false, "v2.updateIncident": false, "v2.updateIncidentAttachment": false, + "v2.updateIncidentCommunication": false, "v2.updateIncidentIntegration": false, + "v2.updateIncidentJiraTemplate": false, + "v2.updateIncidentMicrosoftTeamsConfiguration": false, "v2.updateIncidentNotificationRule": false, "v2.updateIncidentNotificationTemplate": false, "v2.updateIncidentPostmortemTemplate": false, + "v2.updateIncidentStatuspageIncident": false, + "v2.updateIncidentStatusPageNotice": false, + "v2.updateIncidentTimelineEntry": false, "v2.updateIncidentTodo": false, "v2.updateIncidentType": false, "v2.updateIncidentUserDefinedField": false, + "v2.updateIncidentZoomConfiguration": false, + "v2.upsertIncidentAutomationData": false, "v2.createAWSAccountCCMConfig": false, "v2.deleteAWSAccountCCMConfig": false, "v2.getAWSAccountCCMConfig": false, diff --git a/packages/datadog-api-client-v2/apis/IncidentsApi.ts b/packages/datadog-api-client-v2/apis/IncidentsApi.ts index 730fdfa7fab2..b74bc40d496d 100644 --- a/packages/datadog-api-client-v2/apis/IncidentsApi.ts +++ b/packages/datadog-api-client-v2/apis/IncidentsApi.ts @@ -10,6 +10,7 @@ import { RequestContext, HttpMethod, ResponseContext, + HttpFile, } from "../../datadog-api-client-common/http/http"; import { logger } from "../../../logger"; @@ -24,7 +25,17 @@ import { CreateIncidentNotificationRuleRequest } from "../models/CreateIncidentN import { CreateIncidentNotificationTemplateRequest } from "../models/CreateIncidentNotificationTemplateRequest"; import { GlobalIncidentSettingsRequest } from "../models/GlobalIncidentSettingsRequest"; import { GlobalIncidentSettingsResponse } from "../models/GlobalIncidentSettingsResponse"; +import { IncidentAutomationDataRequest } from "../models/IncidentAutomationDataRequest"; +import { IncidentAutomationDataResponse } from "../models/IncidentAutomationDataResponse"; +import { IncidentBatchCreateRuleExecutionStatesRequest } from "../models/IncidentBatchCreateRuleExecutionStatesRequest"; +import { IncidentBatchUpdateRuleExecutionStatesRequest } from "../models/IncidentBatchUpdateRuleExecutionStatesRequest"; +import { IncidentCaseLinkResponse } from "../models/IncidentCaseLinkResponse"; +import { IncidentCommunicationRequest } from "../models/IncidentCommunicationRequest"; +import { IncidentCommunicationResponse } from "../models/IncidentCommunicationResponse"; +import { IncidentCommunicationsResponse } from "../models/IncidentCommunicationsResponse"; import { IncidentCreateRequest } from "../models/IncidentCreateRequest"; +import { IncidentCreateZoomMeetingRequest } from "../models/IncidentCreateZoomMeetingRequest"; +import { IncidentGoogleMeetIntegrationResponse } from "../models/IncidentGoogleMeetIntegrationResponse"; import { IncidentHandleRequest } from "../models/IncidentHandleRequest"; import { IncidentHandleResponse } from "../models/IncidentHandleResponse"; import { IncidentHandlesResponse } from "../models/IncidentHandlesResponse"; @@ -39,17 +50,52 @@ import { IncidentIntegrationMetadataCreateRequest } from "../models/IncidentInte import { IncidentIntegrationMetadataListResponse } from "../models/IncidentIntegrationMetadataListResponse"; import { IncidentIntegrationMetadataPatchRequest } from "../models/IncidentIntegrationMetadataPatchRequest"; import { IncidentIntegrationMetadataResponse } from "../models/IncidentIntegrationMetadataResponse"; +import { IncidentJiraIssueIntegrationResponse } from "../models/IncidentJiraIssueIntegrationResponse"; +import { IncidentJiraIssueRequest } from "../models/IncidentJiraIssueRequest"; +import { IncidentJiraTemplateRequest } from "../models/IncidentJiraTemplateRequest"; +import { IncidentJiraTemplateResponse } from "../models/IncidentJiraTemplateResponse"; +import { IncidentJiraTemplatesResponse } from "../models/IncidentJiraTemplatesResponse"; +import { IncidentMicrosoftTeamsConfigurationRequest } from "../models/IncidentMicrosoftTeamsConfigurationRequest"; +import { IncidentMicrosoftTeamsConfigurationResponse } from "../models/IncidentMicrosoftTeamsConfigurationResponse"; +import { IncidentMSTeamsIntegrationResponse } from "../models/IncidentMSTeamsIntegrationResponse"; import { IncidentNotificationRule } from "../models/IncidentNotificationRule"; import { IncidentNotificationRuleArray } from "../models/IncidentNotificationRuleArray"; import { IncidentNotificationTemplate } from "../models/IncidentNotificationTemplate"; import { IncidentNotificationTemplateArray } from "../models/IncidentNotificationTemplateArray"; +import { IncidentPagerdutyRelatedIncidentsResponse } from "../models/IncidentPagerdutyRelatedIncidentsResponse"; +import { IncidentPagerdutyServicesResponse } from "../models/IncidentPagerdutyServicesResponse"; import { IncidentRelatedObject } from "../models/IncidentRelatedObject"; +import { IncidentRenderedTemplateResponse } from "../models/IncidentRenderedTemplateResponse"; +import { IncidentRenderTemplateRequest } from "../models/IncidentRenderTemplateRequest"; +import { IncidentReservedRoleResponse } from "../models/IncidentReservedRoleResponse"; +import { IncidentReservedRolesResponse } from "../models/IncidentReservedRolesResponse"; import { IncidentResponse } from "../models/IncidentResponse"; import { IncidentResponseData } from "../models/IncidentResponseData"; +import { IncidentRoleAssignmentRequest } from "../models/IncidentRoleAssignmentRequest"; +import { IncidentRoleAssignmentResponse } from "../models/IncidentRoleAssignmentResponse"; +import { IncidentRuleExecutionStatesResponse } from "../models/IncidentRuleExecutionStatesResponse"; +import { IncidentSearchIncidentsExportRequest } from "../models/IncidentSearchIncidentsExportRequest"; +import { IncidentSearchIncidentsIncludeType } from "../models/IncidentSearchIncidentsIncludeType"; +import { IncidentSearchIncidentsSortOrder } from "../models/IncidentSearchIncidentsSortOrder"; import { IncidentSearchResponse } from "../models/IncidentSearchResponse"; import { IncidentSearchResponseIncidentsData } from "../models/IncidentSearchResponseIncidentsData"; import { IncidentSearchSortOrder } from "../models/IncidentSearchSortOrder"; import { IncidentsResponse } from "../models/IncidentsResponse"; +import { IncidentStatuspageIncidentRequest } from "../models/IncidentStatuspageIncidentRequest"; +import { IncidentStatuspageIncidentResponse } from "../models/IncidentStatuspageIncidentResponse"; +import { IncidentStatusPageNoticeCreateRequest } from "../models/IncidentStatusPageNoticeCreateRequest"; +import { IncidentStatusPageNoticeIntegrationResponse } from "../models/IncidentStatusPageNoticeIntegrationResponse"; +import { IncidentStatusPageNoticeUpdateRequest } from "../models/IncidentStatusPageNoticeUpdateRequest"; +import { IncidentStatuspagePreferencesResponse } from "../models/IncidentStatuspagePreferencesResponse"; +import { IncidentStatusPagesSuggestionResponse } from "../models/IncidentStatusPagesSuggestionResponse"; +import { IncidentStatuspageSubscriptionRequest } from "../models/IncidentStatuspageSubscriptionRequest"; +import { IncidentStatuspageSubscriptionResponse } from "../models/IncidentStatuspageSubscriptionResponse"; +import { IncidentStatuspageSubscriptionsResponse } from "../models/IncidentStatuspageSubscriptionsResponse"; +import { IncidentTemplateVariablesResponse } from "../models/IncidentTemplateVariablesResponse"; +import { IncidentTimelineEntriesResponse } from "../models/IncidentTimelineEntriesResponse"; +import { IncidentTimelineEntryRequest } from "../models/IncidentTimelineEntryRequest"; +import { IncidentTimelineEntryResponse } from "../models/IncidentTimelineEntryResponse"; +import { IncidentTimelineThreadResponse } from "../models/IncidentTimelineThreadResponse"; import { IncidentTodoCreateRequest } from "../models/IncidentTodoCreateRequest"; import { IncidentTodoListResponse } from "../models/IncidentTodoListResponse"; import { IncidentTodoPatchRequest } from "../models/IncidentTodoPatchRequest"; @@ -63,6 +109,9 @@ import { IncidentUserDefinedFieldCreateRequest } from "../models/IncidentUserDef import { IncidentUserDefinedFieldListResponse } from "../models/IncidentUserDefinedFieldListResponse"; import { IncidentUserDefinedFieldResponse } from "../models/IncidentUserDefinedFieldResponse"; import { IncidentUserDefinedFieldUpdateRequest } from "../models/IncidentUserDefinedFieldUpdateRequest"; +import { IncidentZoomConfigurationRequest } from "../models/IncidentZoomConfigurationRequest"; +import { IncidentZoomConfigurationResponse } from "../models/IncidentZoomConfigurationResponse"; +import { IncidentZoomIntegrationResponse } from "../models/IncidentZoomIntegrationResponse"; import { JSONAPIErrorResponse } from "../models/JSONAPIErrorResponse"; import { PatchAttachmentRequest } from "../models/PatchAttachmentRequest"; import { PatchIncidentNotificationTemplateRequest } from "../models/PatchIncidentNotificationTemplateRequest"; @@ -73,6 +122,146 @@ import { PostmortemTemplatesResponse } from "../models/PostmortemTemplatesRespon import { PutIncidentNotificationRuleRequest } from "../models/PutIncidentNotificationRuleRequest"; export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { + public async batchCreateIncidentRuleExecutionStates( + incidentId: string, + body: IncidentBatchCreateRuleExecutionStatesRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'batchCreateIncidentRuleExecutionStates'" + ); + if ( + !_config.unstableOperations["v2.batchCreateIncidentRuleExecutionStates"] + ) { + throw new Error( + "Unstable operation 'batchCreateIncidentRuleExecutionStates' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError( + "incidentId", + "batchCreateIncidentRuleExecutionStates" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "batchCreateIncidentRuleExecutionStates"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/rule-execution-states/batch".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.batchCreateIncidentRuleExecutionStates") + .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, + "IncidentBatchCreateRuleExecutionStatesRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async batchUpdateIncidentRuleExecutionStates( + incidentId: string, + body: IncidentBatchUpdateRuleExecutionStatesRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'batchUpdateIncidentRuleExecutionStates'" + ); + if ( + !_config.unstableOperations["v2.batchUpdateIncidentRuleExecutionStates"] + ) { + throw new Error( + "Unstable operation 'batchUpdateIncidentRuleExecutionStates' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError( + "incidentId", + "batchUpdateIncidentRuleExecutionStates" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "batchUpdateIncidentRuleExecutionStates"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/rule-execution-states/batch".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.batchUpdateIncidentRuleExecutionStates") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "IncidentBatchUpdateRuleExecutionStatesRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + public async createGlobalIncidentHandle( body: IncidentHandleRequest, include?: string, @@ -246,6 +435,107 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async createIncidentCommunication( + incidentId: string, + body: IncidentCommunicationRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createIncidentCommunication'"); + if (!_config.unstableOperations["v2.createIncidentCommunication"]) { + throw new Error( + "Unstable operation 'createIncidentCommunication' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "createIncidentCommunication"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentCommunication"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/communications".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.createIncidentCommunication") + .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, "IncidentCommunicationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async createIncidentGoogleMeetSpace( + incidentId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createIncidentGoogleMeetSpace'"); + if (!_config.unstableOperations["v2.createIncidentGoogleMeetSpace"]) { + throw new Error( + "Unstable operation 'createIncidentGoogleMeetSpace' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "createIncidentGoogleMeetSpace"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/google-meet/space".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.createIncidentGoogleMeetSpace") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + public async createIncidentImpact( incidentId: string, body: IncidentImpactCreateRequest, @@ -374,30 +664,39 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async createIncidentNotificationRule( - body: CreateIncidentNotificationRuleRequest, + public async createIncidentJiraIssue( + incidentId: string, + body: IncidentJiraIssueRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'createIncidentNotificationRule'"); - if (!_config.unstableOperations["v2.createIncidentNotificationRule"]) { + logger.warn("Using unstable operation 'createIncidentJiraIssue'"); + if (!_config.unstableOperations["v2.createIncidentJiraIssue"]) { throw new Error( - "Unstable operation 'createIncidentNotificationRule' is disabled" + "Unstable operation 'createIncidentJiraIssue' is disabled" ); } + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "createIncidentJiraIssue"); + } + // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "createIncidentNotificationRule"); + throw new RequiredError("body", "createIncidentJiraIssue"); } // Path Params - const localVarPath = "/api/v2/incidents/config/notification-rules"; + const localVarPath = "/api/v2/incidents/{incident_id}/jira-issues".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.createIncidentNotificationRule") + .getServer("v2.IncidentsApi.createIncidentJiraIssue") .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -408,11 +707,7 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize( - body, - "CreateIncidentNotificationRuleRequest", - "" - ), + ObjectSerializer.serialize(body, "IncidentJiraIssueRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -427,32 +722,30 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async createIncidentNotificationTemplate( - body: CreateIncidentNotificationTemplateRequest, + public async createIncidentJiraTemplate( + body: IncidentJiraTemplateRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn( - "Using unstable operation 'createIncidentNotificationTemplate'" - ); - if (!_config.unstableOperations["v2.createIncidentNotificationTemplate"]) { + logger.warn("Using unstable operation 'createIncidentJiraTemplate'"); + if (!_config.unstableOperations["v2.createIncidentJiraTemplate"]) { throw new Error( - "Unstable operation 'createIncidentNotificationTemplate' is disabled" + "Unstable operation 'createIncidentJiraTemplate' is disabled" ); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "createIncidentNotificationTemplate"); + throw new RequiredError("body", "createIncidentJiraTemplate"); } // Path Params - const localVarPath = "/api/v2/incidents/config/notification-templates"; + const localVarPath = "/api/v2/incidents/config/jira-templates"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.createIncidentNotificationTemplate") + .getServer("v2.IncidentsApi.createIncidentJiraTemplate") .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -463,11 +756,7 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize( - body, - "CreateIncidentNotificationTemplateRequest", - "" - ), + ObjectSerializer.serialize(body, "IncidentJiraTemplateRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -482,56 +771,65 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async createIncidentPostmortemAttachment( - incidentId: string, - body: PostmortemAttachmentRequest, + public async createIncidentMicrosoftTeamsConfiguration( + body: IncidentMicrosoftTeamsConfigurationRequest, + include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; logger.warn( - "Using unstable operation 'createIncidentPostmortemAttachment'" + "Using unstable operation 'createIncidentMicrosoftTeamsConfiguration'" ); - if (!_config.unstableOperations["v2.createIncidentPostmortemAttachment"]) { + if ( + !_config.unstableOperations[ + "v2.createIncidentMicrosoftTeamsConfiguration" + ] + ) { throw new Error( - "Unstable operation 'createIncidentPostmortemAttachment' is disabled" + "Unstable operation 'createIncidentMicrosoftTeamsConfiguration' is disabled" ); } - // verify required parameter 'incidentId' is not null or undefined - if (incidentId === null || incidentId === undefined) { + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { throw new RequiredError( - "incidentId", - "createIncidentPostmortemAttachment" + "body", + "createIncidentMicrosoftTeamsConfiguration" ); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "createIncidentPostmortemAttachment"); - } - // Path Params const localVarPath = - "/api/v2/incidents/{incident_id}/attachments/postmortems".replace( - "{incident_id}", - encodeURIComponent(String(incidentId)) - ); + "/api/v2/incidents/config/microsoft-teams-configurations"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.createIncidentPostmortemAttachment") + .getServer("v2.IncidentsApi.createIncidentMicrosoftTeamsConfiguration") .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } + // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "PostmortemAttachmentRequest", ""), + ObjectSerializer.serialize( + body, + "IncidentMicrosoftTeamsConfigurationRequest", + "" + ), contentType ); requestContext.setBody(serializedBody); @@ -540,35 +838,83 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async createIncidentPostmortemTemplate( - body: PostmortemTemplateRequest, + public async createIncidentMSTeamsOnlineMeeting( + incidentId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'createIncidentPostmortemTemplate'"); - if (!_config.unstableOperations["v2.createIncidentPostmortemTemplate"]) { + logger.warn( + "Using unstable operation 'createIncidentMSTeamsOnlineMeeting'" + ); + if (!_config.unstableOperations["v2.createIncidentMSTeamsOnlineMeeting"]) { throw new Error( - "Unstable operation 'createIncidentPostmortemTemplate' is disabled" + "Unstable operation 'createIncidentMSTeamsOnlineMeeting' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError( + "incidentId", + "createIncidentMSTeamsOnlineMeeting" + ); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/microsoft-teams-integration/online-meeting".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.createIncidentMSTeamsOnlineMeeting") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async createIncidentNotificationRule( + body: CreateIncidentNotificationRuleRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'createIncidentNotificationRule'"); + if (!_config.unstableOperations["v2.createIncidentNotificationRule"]) { + throw new Error( + "Unstable operation 'createIncidentNotificationRule' is disabled" ); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "createIncidentPostmortemTemplate"); + throw new RequiredError("body", "createIncidentNotificationRule"); } // Path Params - const localVarPath = "/api/v2/incidents/config/postmortem-templates"; + const localVarPath = "/api/v2/incidents/config/notification-rules"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.createIncidentPostmortemTemplate") + .getServer("v2.IncidentsApi.createIncidentNotificationRule") .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -579,7 +925,11 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "PostmortemTemplateRequest", ""), + ObjectSerializer.serialize( + body, + "CreateIncidentNotificationRuleRequest", + "" + ), contentType ); requestContext.setBody(serializedBody); @@ -588,43 +938,38 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async createIncidentTodo( - incidentId: string, - body: IncidentTodoCreateRequest, + public async createIncidentNotificationTemplate( + body: CreateIncidentNotificationTemplateRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'createIncidentTodo'"); - if (!_config.unstableOperations["v2.createIncidentTodo"]) { - throw new Error("Unstable operation 'createIncidentTodo' is disabled"); - } - - // verify required parameter 'incidentId' is not null or undefined - if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "createIncidentTodo"); + logger.warn( + "Using unstable operation 'createIncidentNotificationTemplate'" + ); + if (!_config.unstableOperations["v2.createIncidentNotificationTemplate"]) { + throw new Error( + "Unstable operation 'createIncidentNotificationTemplate' is disabled" + ); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "createIncidentTodo"); + throw new RequiredError("body", "createIncidentNotificationTemplate"); } // Path Params - const localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos".replace( - "{incident_id}", - encodeURIComponent(String(incidentId)) - ); + const localVarPath = "/api/v2/incidents/config/notification-templates"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.createIncidentTodo") + .getServer("v2.IncidentsApi.createIncidentNotificationTemplate") .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -635,7 +980,11 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "IncidentTodoCreateRequest", ""), + ObjectSerializer.serialize( + body, + "CreateIncidentNotificationTemplateRequest", + "" + ), contentType ); requestContext.setBody(serializedBody); @@ -650,28 +999,45 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async createIncidentType( - body: IncidentTypeCreateRequest, + public async createIncidentPostmortemAttachment( + incidentId: string, + body: PostmortemAttachmentRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'createIncidentType'"); - if (!_config.unstableOperations["v2.createIncidentType"]) { - throw new Error("Unstable operation 'createIncidentType' is disabled"); + logger.warn( + "Using unstable operation 'createIncidentPostmortemAttachment'" + ); + if (!_config.unstableOperations["v2.createIncidentPostmortemAttachment"]) { + throw new Error( + "Unstable operation 'createIncidentPostmortemAttachment' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError( + "incidentId", + "createIncidentPostmortemAttachment" + ); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "createIncidentType"); + throw new RequiredError("body", "createIncidentPostmortemAttachment"); } // Path Params - const localVarPath = "/api/v2/incidents/config/types"; + const localVarPath = + "/api/v2/incidents/{incident_id}/attachments/postmortems".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.createIncidentType") + .getServer("v2.IncidentsApi.createIncidentPostmortemAttachment") .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -682,7 +1048,7 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "IncidentTypeCreateRequest", ""), + ObjectSerializer.serialize(body, "PostmortemAttachmentRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -691,61 +1057,46 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async createIncidentUserDefinedField( - body: IncidentUserDefinedFieldCreateRequest, - include?: string, + public async createIncidentPostmortemTemplate( + body: PostmortemTemplateRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'createIncidentUserDefinedField'"); - if (!_config.unstableOperations["v2.createIncidentUserDefinedField"]) { + logger.warn("Using unstable operation 'createIncidentPostmortemTemplate'"); + if (!_config.unstableOperations["v2.createIncidentPostmortemTemplate"]) { throw new Error( - "Unstable operation 'createIncidentUserDefinedField' is disabled" + "Unstable operation 'createIncidentPostmortemTemplate' is disabled" ); } // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { - throw new RequiredError("body", "createIncidentUserDefinedField"); + throw new RequiredError("body", "createIncidentPostmortemTemplate"); } // Path Params - const localVarPath = "/api/v2/incidents/config/user-defined-fields"; + const localVarPath = "/api/v2/incidents/config/postmortem-templates"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.createIncidentUserDefinedField") + .getServer("v2.IncidentsApi.createIncidentPostmortemTemplate") .makeRequestContext(localVarPath, HttpMethod.POST); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize( - body, - "IncidentUserDefinedFieldCreateRequest", - "" - ), + ObjectSerializer.serialize(body, "PostmortemTemplateRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -754,72 +1105,109 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async deleteGlobalIncidentHandle( + public async createIncidentRoleAssignment( + body: IncidentRoleAssignmentRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteGlobalIncidentHandle'"); - if (!_config.unstableOperations["v2.deleteGlobalIncidentHandle"]) { + logger.warn("Using unstable operation 'createIncidentRoleAssignment'"); + if (!_config.unstableOperations["v2.createIncidentRoleAssignment"]) { throw new Error( - "Unstable operation 'deleteGlobalIncidentHandle' is disabled" + "Unstable operation 'createIncidentRoleAssignment' is disabled" ); } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentRoleAssignment"); + } + // Path Params - const localVarPath = "/api/v2/incidents/config/global/incident-handles"; + const localVarPath = "/api/v2/incidents/role_assignments"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteGlobalIncidentHandle") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createIncidentRoleAssignment") + .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, "IncidentRoleAssignmentRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async deleteIncident( + public async createIncidentStatuspageIncident( incidentId: string, + body: IncidentStatuspageIncidentRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteIncident'"); - if (!_config.unstableOperations["v2.deleteIncident"]) { - throw new Error("Unstable operation 'deleteIncident' is disabled"); + logger.warn("Using unstable operation 'createIncidentStatuspageIncident'"); + if (!_config.unstableOperations["v2.createIncidentStatuspageIncident"]) { + throw new Error( + "Unstable operation 'createIncidentStatuspageIncident' is disabled" + ); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "deleteIncident"); + throw new RequiredError("incidentId", "createIncidentStatuspageIncident"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentStatuspageIncident"); } // Path Params - const localVarPath = "/api/v2/incidents/{incident_id}".replace( - "{incident_id}", - encodeURIComponent(String(incidentId)) - ); + const localVarPath = + "/api/v2/incidents/statuspage/{incident_id}/statuspage-incidents".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncident") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createIncidentStatuspageIncident") + .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, "IncidentStatuspageIncidentRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -830,43 +1218,74 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async deleteIncidentAttachment( + public async createIncidentStatusPageNotice( incidentId: string, - attachmentId: string, + statuspageId: string, + body: IncidentStatusPageNoticeCreateRequest, + notifySubscribers?: boolean, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteIncidentAttachment'"); - if (!_config.unstableOperations["v2.deleteIncidentAttachment"]) { + logger.warn("Using unstable operation 'createIncidentStatusPageNotice'"); + if (!_config.unstableOperations["v2.createIncidentStatusPageNotice"]) { throw new Error( - "Unstable operation 'deleteIncidentAttachment' is disabled" + "Unstable operation 'createIncidentStatusPageNotice' is disabled" ); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "deleteIncidentAttachment"); + throw new RequiredError("incidentId", "createIncidentStatusPageNotice"); } - // verify required parameter 'attachmentId' is not null or undefined - if (attachmentId === null || attachmentId === undefined) { - throw new RequiredError("attachmentId", "deleteIncidentAttachment"); + // verify required parameter 'statuspageId' is not null or undefined + if (statuspageId === null || statuspageId === undefined) { + throw new RequiredError("statuspageId", "createIncidentStatusPageNotice"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentStatusPageNotice"); } // Path Params const localVarPath = - "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" + "/api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices" .replace("{incident_id}", encodeURIComponent(String(incidentId))) - .replace("{attachment_id}", encodeURIComponent(String(attachmentId))); + .replace("{statuspage_id}", encodeURIComponent(String(statuspageId))); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncidentAttachment") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createIncidentStatusPageNotice") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); + // Query Params + if (notifySubscribers !== undefined) { + requestContext.setQueryParam( + "notify_subscribers", + ObjectSerializer.serialize(notifySubscribers, "boolean", ""), + "" + ); + } + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "IncidentStatusPageNoticeCreateRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -877,35 +1296,54 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async deleteIncidentImpact( + public async createIncidentTimelineEntry( incidentId: string, - impactId: string, + body: IncidentTimelineEntryRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; + logger.warn("Using unstable operation 'createIncidentTimelineEntry'"); + if (!_config.unstableOperations["v2.createIncidentTimelineEntry"]) { + throw new Error( + "Unstable operation 'createIncidentTimelineEntry' is disabled" + ); + } + // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "deleteIncidentImpact"); + throw new RequiredError("incidentId", "createIncidentTimelineEntry"); } - // verify required parameter 'impactId' is not null or undefined - if (impactId === null || impactId === undefined) { - throw new RequiredError("impactId", "deleteIncidentImpact"); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentTimelineEntry"); } // Path Params - const localVarPath = "/api/v2/incidents/{incident_id}/impacts/{impact_id}" - .replace("{incident_id}", encodeURIComponent(String(incidentId))) - .replace("{impact_id}", encodeURIComponent(String(impactId))); + const localVarPath = "/api/v2/incidents/{incident_id}/timeline".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncidentImpact") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createIncidentTimelineEntry") + .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, "IncidentTimelineEntryRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -916,49 +1354,53 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async deleteIncidentIntegration( + public async createIncidentTodo( incidentId: string, - integrationMetadataId: string, + body: IncidentTodoCreateRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteIncidentIntegration'"); - if (!_config.unstableOperations["v2.deleteIncidentIntegration"]) { - throw new Error( - "Unstable operation 'deleteIncidentIntegration' is disabled" - ); + logger.warn("Using unstable operation 'createIncidentTodo'"); + if (!_config.unstableOperations["v2.createIncidentTodo"]) { + throw new Error("Unstable operation 'createIncidentTodo' is disabled"); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "deleteIncidentIntegration"); + throw new RequiredError("incidentId", "createIncidentTodo"); } - // verify required parameter 'integrationMetadataId' is not null or undefined - if (integrationMetadataId === null || integrationMetadataId === undefined) { - throw new RequiredError( - "integrationMetadataId", - "deleteIncidentIntegration" - ); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentTodo"); } // Path Params const localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" - .replace("{incident_id}", encodeURIComponent(String(incidentId))) - .replace( - "{integration_metadata_id}", - encodeURIComponent(String(integrationMetadataId)) - ); + "/api/v2/incidents/{incident_id}/relationships/todos".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncidentIntegration") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createIncidentTodo") + .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, "IncidentTodoCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -969,47 +1411,42 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async deleteIncidentNotificationRule( - id: string, - include?: string, + public async createIncidentType( + body: IncidentTypeCreateRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteIncidentNotificationRule'"); - if (!_config.unstableOperations["v2.deleteIncidentNotificationRule"]) { - throw new Error( - "Unstable operation 'deleteIncidentNotificationRule' is disabled" - ); + logger.warn("Using unstable operation 'createIncidentType'"); + if (!_config.unstableOperations["v2.createIncidentType"]) { + throw new Error("Unstable operation 'createIncidentType' is disabled"); } - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError("id", "deleteIncidentNotificationRule"); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentType"); } // Path Params - const localVarPath = - "/api/v2/incidents/config/notification-rules/{id}".replace( - "{id}", - encodeURIComponent(String(id)) - ); + const localVarPath = "/api/v2/incidents/config/types"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncidentNotificationRule") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createIncidentType") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "IncidentTypeCreateRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); // Apply auth methods applySecurityAuthentication(_config, requestContext, [ @@ -1021,39 +1458,33 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async deleteIncidentNotificationTemplate( - id: string, + public async createIncidentUserDefinedField( + body: IncidentUserDefinedFieldCreateRequest, include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn( - "Using unstable operation 'deleteIncidentNotificationTemplate'" - ); - if (!_config.unstableOperations["v2.deleteIncidentNotificationTemplate"]) { + logger.warn("Using unstable operation 'createIncidentUserDefinedField'"); + if (!_config.unstableOperations["v2.createIncidentUserDefinedField"]) { throw new Error( - "Unstable operation 'deleteIncidentNotificationTemplate' is disabled" + "Unstable operation 'createIncidentUserDefinedField' is disabled" ); } - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError("id", "deleteIncidentNotificationTemplate"); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentUserDefinedField"); } // Path Params - const localVarPath = - "/api/v2/incidents/config/notification-templates/{id}".replace( - "{id}", - encodeURIComponent(String(id)) - ); + const localVarPath = "/api/v2/incidents/config/user-defined-fields"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncidentNotificationTemplate") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createIncidentUserDefinedField") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); // Query Params @@ -1065,6 +1496,21 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { ); } + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "IncidentUserDefinedFieldCreateRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -1075,82 +1521,113 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async deleteIncidentPostmortemTemplate( - templateId: string, + public async createIncidentZoomConfiguration( + body: IncidentZoomConfigurationRequest, + include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteIncidentPostmortemTemplate'"); - if (!_config.unstableOperations["v2.deleteIncidentPostmortemTemplate"]) { + logger.warn("Using unstable operation 'createIncidentZoomConfiguration'"); + if (!_config.unstableOperations["v2.createIncidentZoomConfiguration"]) { throw new Error( - "Unstable operation 'deleteIncidentPostmortemTemplate' is disabled" + "Unstable operation 'createIncidentZoomConfiguration' is disabled" ); } - // verify required parameter 'templateId' is not null or undefined - if (templateId === null || templateId === undefined) { - throw new RequiredError("templateId", "deleteIncidentPostmortemTemplate"); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentZoomConfiguration"); } // Path Params - const localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) - ); + const localVarPath = "/api/v2/incidents/config/zoom-configurations"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncidentPostmortemTemplate") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createIncidentZoomConfiguration") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "IncidentZoomConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async deleteIncidentTodo( + public async createIncidentZoomMeeting( incidentId: string, - todoId: string, + body: IncidentCreateZoomMeetingRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteIncidentTodo'"); - if (!_config.unstableOperations["v2.deleteIncidentTodo"]) { - throw new Error("Unstable operation 'deleteIncidentTodo' is disabled"); + logger.warn("Using unstable operation 'createIncidentZoomMeeting'"); + if (!_config.unstableOperations["v2.createIncidentZoomMeeting"]) { + throw new Error( + "Unstable operation 'createIncidentZoomMeeting' is disabled" + ); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "deleteIncidentTodo"); + throw new RequiredError("incidentId", "createIncidentZoomMeeting"); } - // verify required parameter 'todoId' is not null or undefined - if (todoId === null || todoId === undefined) { - throw new RequiredError("todoId", "deleteIncidentTodo"); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createIncidentZoomMeeting"); } // Path Params - const localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" - .replace("{incident_id}", encodeURIComponent(String(incidentId))) - .replace("{todo_id}", encodeURIComponent(String(todoId))); + const localVarPath = "/api/v2/incidents/{incident_id}/zoom/meeting".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncidentTodo") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createIncidentZoomMeeting") + .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, "IncidentCreateZoomMeetingRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -1161,74 +1638,86 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async deleteIncidentType( - incidentTypeId: string, + public async createStatuspageEmailSubscription( + pageId: string, + body: IncidentStatuspageSubscriptionRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteIncidentType'"); - if (!_config.unstableOperations["v2.deleteIncidentType"]) { - throw new Error("Unstable operation 'deleteIncidentType' is disabled"); + logger.warn("Using unstable operation 'createStatuspageEmailSubscription'"); + if (!_config.unstableOperations["v2.createStatuspageEmailSubscription"]) { + throw new Error( + "Unstable operation 'createStatuspageEmailSubscription' is disabled" + ); } - // verify required parameter 'incidentTypeId' is not null or undefined - if (incidentTypeId === null || incidentTypeId === undefined) { - throw new RequiredError("incidentTypeId", "deleteIncidentType"); + // verify required parameter 'pageId' is not null or undefined + if (pageId === null || pageId === undefined) { + throw new RequiredError("pageId", "createStatuspageEmailSubscription"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "createStatuspageEmailSubscription"); } // Path Params const localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}".replace( - "{incident_type_id}", - encodeURIComponent(String(incidentTypeId)) + "/api/v2/statuspages/{page_id}/subscriptions/email".replace( + "{page_id}", + encodeURIComponent(String(pageId)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncidentType") - .makeRequestContext(localVarPath, HttpMethod.DELETE); - requestContext.setHeaderParam("Accept", "*/*"); + .getServer("v2.IncidentsApi.createStatuspageEmailSubscription") + .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, + "IncidentStatuspageSubscriptionRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async deleteIncidentUserDefinedField( - fieldId: string, + public async deleteGlobalIncidentHandle( _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'deleteIncidentUserDefinedField'"); - if (!_config.unstableOperations["v2.deleteIncidentUserDefinedField"]) { + logger.warn("Using unstable operation 'deleteGlobalIncidentHandle'"); + if (!_config.unstableOperations["v2.deleteGlobalIncidentHandle"]) { throw new Error( - "Unstable operation 'deleteIncidentUserDefinedField' is disabled" + "Unstable operation 'deleteGlobalIncidentHandle' is disabled" ); } - // verify required parameter 'fieldId' is not null or undefined - if (fieldId === null || fieldId === undefined) { - throw new RequiredError("fieldId", "deleteIncidentUserDefinedField"); - } - // Path Params - const localVarPath = - "/api/v2/incidents/config/user-defined-fields/{field_id}".replace( - "{field_id}", - encodeURIComponent(String(fieldId)) - ); + const localVarPath = "/api/v2/incidents/config/global/incident-handles"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.deleteIncidentUserDefinedField") + .getServer("v2.IncidentsApi.deleteGlobalIncidentHandle") .makeRequestContext(localVarPath, HttpMethod.DELETE); requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); @@ -1237,82 +1726,87 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async getGlobalIncidentSettings( + public async deleteIncident( + incidentId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getGlobalIncidentSettings'"); - if (!_config.unstableOperations["v2.getGlobalIncidentSettings"]) { - throw new Error( - "Unstable operation 'getGlobalIncidentSettings' is disabled" - ); + logger.warn("Using unstable operation 'deleteIncident'"); + if (!_config.unstableOperations["v2.deleteIncident"]) { + throw new Error("Unstable operation 'deleteIncident' is disabled"); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "deleteIncident"); } // Path Params - const localVarPath = "/api/v2/incidents/config/global/settings"; + const localVarPath = "/api/v2/incidents/{incident_id}".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.getGlobalIncidentSettings") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncident") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async getIncident( + public async deleteIncidentAttachment( incidentId: string, - include?: Array, + attachmentId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getIncident'"); - if (!_config.unstableOperations["v2.getIncident"]) { - throw new Error("Unstable operation 'getIncident' is disabled"); + logger.warn("Using unstable operation 'deleteIncidentAttachment'"); + if (!_config.unstableOperations["v2.deleteIncidentAttachment"]) { + throw new Error( + "Unstable operation 'deleteIncidentAttachment' is disabled" + ); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "getIncident"); + throw new RequiredError("incidentId", "deleteIncidentAttachment"); + } + + // verify required parameter 'attachmentId' is not null or undefined + if (attachmentId === null || attachmentId === undefined) { + throw new RequiredError("attachmentId", "deleteIncidentAttachment"); } // Path Params - const localVarPath = "/api/v2/incidents/{incident_id}".replace( - "{incident_id}", - encodeURIComponent(String(incidentId)) - ); + const localVarPath = + "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace("{attachment_id}", encodeURIComponent(String(attachmentId))); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.getIncident") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentAttachment") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "Array", ""), - "csv" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -1323,47 +1817,44 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async getIncidentIntegration( + public async deleteIncidentCommunication( incidentId: string, - integrationMetadataId: string, + communicationId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getIncidentIntegration'"); - if (!_config.unstableOperations["v2.getIncidentIntegration"]) { + logger.warn("Using unstable operation 'deleteIncidentCommunication'"); + if (!_config.unstableOperations["v2.deleteIncidentCommunication"]) { throw new Error( - "Unstable operation 'getIncidentIntegration' is disabled" + "Unstable operation 'deleteIncidentCommunication' is disabled" ); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "getIncidentIntegration"); + throw new RequiredError("incidentId", "deleteIncidentCommunication"); } - // verify required parameter 'integrationMetadataId' is not null or undefined - if (integrationMetadataId === null || integrationMetadataId === undefined) { - throw new RequiredError( - "integrationMetadataId", - "getIncidentIntegration" - ); + // verify required parameter 'communicationId' is not null or undefined + if (communicationId === null || communicationId === undefined) { + throw new RequiredError("communicationId", "deleteIncidentCommunication"); } // Path Params const localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + "/api/v2/incidents/{incident_id}/communications/{communication_id}" .replace("{incident_id}", encodeURIComponent(String(incidentId))) .replace( - "{integration_metadata_id}", - encodeURIComponent(String(integrationMetadataId)) + "{communication_id}", + encodeURIComponent(String(communicationId)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.getIncidentIntegration") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentCommunication") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods @@ -1376,48 +1867,35 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async getIncidentNotificationRule( - id: string, - include?: string, + public async deleteIncidentImpact( + incidentId: string, + impactId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getIncidentNotificationRule'"); - if (!_config.unstableOperations["v2.getIncidentNotificationRule"]) { - throw new Error( - "Unstable operation 'getIncidentNotificationRule' is disabled" - ); + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "deleteIncidentImpact"); } - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError("id", "getIncidentNotificationRule"); + // verify required parameter 'impactId' is not null or undefined + if (impactId === null || impactId === undefined) { + throw new RequiredError("impactId", "deleteIncidentImpact"); } // Path Params - const localVarPath = - "/api/v2/incidents/config/notification-rules/{id}".replace( - "{id}", - encodeURIComponent(String(id)) - ); + const localVarPath = "/api/v2/incidents/{incident_id}/impacts/{impact_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace("{impact_id}", encodeURIComponent(String(impactId))); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.getIncidentNotificationRule") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentImpact") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -1428,47 +1906,48 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async getIncidentNotificationTemplate( - id: string, - include?: string, + public async deleteIncidentIntegration( + incidentId: string, + integrationMetadataId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getIncidentNotificationTemplate'"); - if (!_config.unstableOperations["v2.getIncidentNotificationTemplate"]) { + logger.warn("Using unstable operation 'deleteIncidentIntegration'"); + if (!_config.unstableOperations["v2.deleteIncidentIntegration"]) { throw new Error( - "Unstable operation 'getIncidentNotificationTemplate' is disabled" + "Unstable operation 'deleteIncidentIntegration' is disabled" ); } - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError("id", "getIncidentNotificationTemplate"); + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "deleteIncidentIntegration"); } - // Path Params - const localVarPath = - "/api/v2/incidents/config/notification-templates/{id}".replace( - "{id}", - encodeURIComponent(String(id)) + // verify required parameter 'integrationMetadataId' is not null or undefined + if (integrationMetadataId === null || integrationMetadataId === undefined) { + throw new RequiredError( + "integrationMetadataId", + "deleteIncidentIntegration" ); + } - // Make Request Context - const requestContext = _config - .getServer("v2.IncidentsApi.getIncidentNotificationTemplate") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); - requestContext.setHttpConfig(_config.httpConfig); + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace( + "{integration_metadata_id}", + encodeURIComponent(String(integrationMetadataId)) + ); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.deleteIncidentIntegration") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); + requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods applySecurityAuthentication(_config, requestContext, [ @@ -1480,82 +1959,90 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async getIncidentPostmortemTemplate( + public async deleteIncidentJiraTemplate( templateId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getIncidentPostmortemTemplate'"); - if (!_config.unstableOperations["v2.getIncidentPostmortemTemplate"]) { + logger.warn("Using unstable operation 'deleteIncidentJiraTemplate'"); + if (!_config.unstableOperations["v2.deleteIncidentJiraTemplate"]) { throw new Error( - "Unstable operation 'getIncidentPostmortemTemplate' is disabled" + "Unstable operation 'deleteIncidentJiraTemplate' is disabled" ); } // verify required parameter 'templateId' is not null or undefined if (templateId === null || templateId === undefined) { - throw new RequiredError("templateId", "getIncidentPostmortemTemplate"); + throw new RequiredError("templateId", "deleteIncidentJiraTemplate"); } // Path Params const localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}".replace( + "/api/v2/incidents/config/jira-templates/{template_id}".replace( "{template_id}", encodeURIComponent(String(templateId)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.getIncidentPostmortemTemplate") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentJiraTemplate") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async getIncidentTodo( - incidentId: string, - todoId: string, + public async deleteIncidentNotificationRule( + id: string, + include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getIncidentTodo'"); - if (!_config.unstableOperations["v2.getIncidentTodo"]) { - throw new Error("Unstable operation 'getIncidentTodo' is disabled"); - } - - // verify required parameter 'incidentId' is not null or undefined - if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "getIncidentTodo"); + logger.warn("Using unstable operation 'deleteIncidentNotificationRule'"); + if (!_config.unstableOperations["v2.deleteIncidentNotificationRule"]) { + throw new Error( + "Unstable operation 'deleteIncidentNotificationRule' is disabled" + ); } - // verify required parameter 'todoId' is not null or undefined - if (todoId === null || todoId === undefined) { - throw new RequiredError("todoId", "getIncidentTodo"); + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "deleteIncidentNotificationRule"); } // Path Params const localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" - .replace("{incident_id}", encodeURIComponent(String(incidentId))) - .replace("{todo_id}", encodeURIComponent(String(todoId))); + "/api/v2/incidents/config/notification-rules/{id}".replace( + "{id}", + encodeURIComponent(String(id)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.getIncidentTodo") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentNotificationRule") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -1566,36 +2053,50 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async getIncidentType( - incidentTypeId: string, + public async deleteIncidentNotificationTemplate( + id: string, + include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getIncidentType'"); - if (!_config.unstableOperations["v2.getIncidentType"]) { - throw new Error("Unstable operation 'getIncidentType' is disabled"); + logger.warn( + "Using unstable operation 'deleteIncidentNotificationTemplate'" + ); + if (!_config.unstableOperations["v2.deleteIncidentNotificationTemplate"]) { + throw new Error( + "Unstable operation 'deleteIncidentNotificationTemplate' is disabled" + ); } - // verify required parameter 'incidentTypeId' is not null or undefined - if (incidentTypeId === null || incidentTypeId === undefined) { - throw new RequiredError("incidentTypeId", "getIncidentType"); + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "deleteIncidentNotificationTemplate"); } // Path Params const localVarPath = - "/api/v2/incidents/config/types/{incident_type_id}".replace( - "{incident_type_id}", - encodeURIComponent(String(incidentTypeId)) + "/api/v2/incidents/config/notification-templates/{id}".replace( + "{id}", + encodeURIComponent(String(id)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.getIncidentType") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentNotificationTemplate") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -1606,109 +2107,82 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async getIncidentUserDefinedField( - fieldId: string, - include?: string, + public async deleteIncidentPostmortemTemplate( + templateId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'getIncidentUserDefinedField'"); - if (!_config.unstableOperations["v2.getIncidentUserDefinedField"]) { + logger.warn("Using unstable operation 'deleteIncidentPostmortemTemplate'"); + if (!_config.unstableOperations["v2.deleteIncidentPostmortemTemplate"]) { throw new Error( - "Unstable operation 'getIncidentUserDefinedField' is disabled" + "Unstable operation 'deleteIncidentPostmortemTemplate' is disabled" ); } - // verify required parameter 'fieldId' is not null or undefined - if (fieldId === null || fieldId === undefined) { - throw new RequiredError("fieldId", "getIncidentUserDefinedField"); + // verify required parameter 'templateId' is not null or undefined + if (templateId === null || templateId === undefined) { + throw new RequiredError("templateId", "deleteIncidentPostmortemTemplate"); } // Path Params const localVarPath = - "/api/v2/incidents/config/user-defined-fields/{field_id}".replace( - "{field_id}", - encodeURIComponent(String(fieldId)) + "/api/v2/incidents/config/postmortem-templates/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.getIncidentUserDefinedField") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentPostmortemTemplate") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async importIncident( - body: IncidentImportRequest, - include?: Array, + public async deleteIncidentRoleAssignment( + roleAssignmentId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'importIncident'"); - if (!_config.unstableOperations["v2.importIncident"]) { - throw new Error("Unstable operation 'importIncident' is disabled"); + logger.warn("Using unstable operation 'deleteIncidentRoleAssignment'"); + if (!_config.unstableOperations["v2.deleteIncidentRoleAssignment"]) { + throw new Error( + "Unstable operation 'deleteIncidentRoleAssignment' is disabled" + ); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "importIncident"); + // verify required parameter 'roleAssignmentId' is not null or undefined + if (roleAssignmentId === null || roleAssignmentId === undefined) { + throw new RequiredError( + "roleAssignmentId", + "deleteIncidentRoleAssignment" + ); } // Path Params - const localVarPath = "/api/v2/incidents/import"; + const localVarPath = + "/api/v2/incidents/role_assignments/{role_assignment_id}".replace( + "{role_assignment_id}", + encodeURIComponent(String(roleAssignmentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.importIncident") - .makeRequestContext(localVarPath, HttpMethod.POST); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentRoleAssignment") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize( - include, - "Array", - "" - ), - "csv" - ); - } - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json", - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "IncidentImportRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -1719,143 +2193,131 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listGlobalIncidentHandles( - include?: string, + public async deleteIncidentTimelineEntry( + incidentId: string, + timelineEntryId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listGlobalIncidentHandles'"); - if (!_config.unstableOperations["v2.listGlobalIncidentHandles"]) { + logger.warn("Using unstable operation 'deleteIncidentTimelineEntry'"); + if (!_config.unstableOperations["v2.deleteIncidentTimelineEntry"]) { throw new Error( - "Unstable operation 'listGlobalIncidentHandles' is disabled" + "Unstable operation 'deleteIncidentTimelineEntry' is disabled" ); } + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "deleteIncidentTimelineEntry"); + } + + // verify required parameter 'timelineEntryId' is not null or undefined + if (timelineEntryId === null || timelineEntryId === undefined) { + throw new RequiredError("timelineEntryId", "deleteIncidentTimelineEntry"); + } + // Path Params - const localVarPath = "/api/v2/incidents/config/global/incident-handles"; + const localVarPath = + "/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace( + "{timeline_entry_id}", + encodeURIComponent(String(timelineEntryId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listGlobalIncidentHandles") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentTimelineEntry") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async listIncidentAttachments( + public async deleteIncidentTodo( incidentId: string, - filterAttachmentType?: string, - include?: string, + todoId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listIncidentAttachments'"); - if (!_config.unstableOperations["v2.listIncidentAttachments"]) { - throw new Error( - "Unstable operation 'listIncidentAttachments' is disabled" - ); + logger.warn("Using unstable operation 'deleteIncidentTodo'"); + if (!_config.unstableOperations["v2.deleteIncidentTodo"]) { + throw new Error("Unstable operation 'deleteIncidentTodo' is disabled"); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "listIncidentAttachments"); + throw new RequiredError("incidentId", "deleteIncidentTodo"); + } + + // verify required parameter 'todoId' is not null or undefined + if (todoId === null || todoId === undefined) { + throw new RequiredError("todoId", "deleteIncidentTodo"); } // Path Params - const localVarPath = "/api/v2/incidents/{incident_id}/attachments".replace( - "{incident_id}", - encodeURIComponent(String(incidentId)) - ); + const localVarPath = + "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace("{todo_id}", encodeURIComponent(String(todoId))); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidentAttachments") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentTodo") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (filterAttachmentType !== undefined) { - requestContext.setQueryParam( - "filter[attachment_type]", - ObjectSerializer.serialize(filterAttachmentType, "string", ""), - "" - ); - } - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async listIncidentImpacts( - incidentId: string, - include?: Array, + public async deleteIncidentType( + incidentTypeId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - // verify required parameter 'incidentId' is not null or undefined - if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "listIncidentImpacts"); + logger.warn("Using unstable operation 'deleteIncidentType'"); + if (!_config.unstableOperations["v2.deleteIncidentType"]) { + throw new Error("Unstable operation 'deleteIncidentType' is disabled"); + } + + // verify required parameter 'incidentTypeId' is not null or undefined + if (incidentTypeId === null || incidentTypeId === undefined) { + throw new RequiredError("incidentTypeId", "deleteIncidentType"); } // Path Params - const localVarPath = "/api/v2/incidents/{incident_id}/impacts".replace( - "{incident_id}", - encodeURIComponent(String(incidentId)) - ); + const localVarPath = + "/api/v2/incidents/config/types/{incident_type_id}".replace( + "{incident_type_id}", + encodeURIComponent(String(incidentTypeId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidentImpacts") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentType") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize( - include, - "Array", - "" - ), - "csv" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -1866,36 +2328,36 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listIncidentIntegrations( - incidentId: string, + public async deleteIncidentUserDefinedField( + fieldId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listIncidentIntegrations'"); - if (!_config.unstableOperations["v2.listIncidentIntegrations"]) { + logger.warn("Using unstable operation 'deleteIncidentUserDefinedField'"); + if (!_config.unstableOperations["v2.deleteIncidentUserDefinedField"]) { throw new Error( - "Unstable operation 'listIncidentIntegrations' is disabled" + "Unstable operation 'deleteIncidentUserDefinedField' is disabled" ); } - // verify required parameter 'incidentId' is not null or undefined - if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "listIncidentIntegrations"); + // verify required parameter 'fieldId' is not null or undefined + if (fieldId === null || fieldId === undefined) { + throw new RequiredError("fieldId", "deleteIncidentUserDefinedField"); } // Path Params const localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations".replace( - "{incident_id}", - encodeURIComponent(String(incidentId)) + "/api/v2/incidents/config/user-defined-fields/{field_id}".replace( + "{field_id}", + encodeURIComponent(String(fieldId)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidentIntegrations") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.deleteIncidentUserDefinedField") + .makeRequestContext(localVarPath, HttpMethod.DELETE); + requestContext.setHeaderParam("Accept", "*/*"); requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods @@ -1908,37 +2370,46 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listIncidentNotificationRules( - include?: string, + public async exportIncidents( + body: IncidentSearchIncidentsExportRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listIncidentNotificationRules'"); - if (!_config.unstableOperations["v2.listIncidentNotificationRules"]) { - throw new Error( - "Unstable operation 'listIncidentNotificationRules' is disabled" - ); + logger.warn("Using unstable operation 'exportIncidents'"); + if (!_config.unstableOperations["v2.exportIncidents"]) { + throw new Error("Unstable operation 'exportIncidents' is disabled"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "exportIncidents"); } // Path Params - const localVarPath = "/api/v2/incidents/config/notification-rules"; + const localVarPath = "/api/v2/incidents/search-incidents/export"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidentNotificationRules") - .makeRequestContext(localVarPath, HttpMethod.GET); - requestContext.setHeaderParam("Accept", "application/json"); + .getServer("v2.IncidentsApi.exportIncidents") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "text/csv, application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "IncidentSearchIncidentsExportRequest", "" - ); - } + ), + contentType + ); + requestContext.setBody(serializedBody); // Apply auth methods applySecurityAuthentication(_config, requestContext, [ @@ -1950,106 +2421,119 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listIncidentNotificationTemplates( - filterIncidentType?: string, - include?: string, + public async getGlobalIncidentSettings( _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listIncidentNotificationTemplates'"); - if (!_config.unstableOperations["v2.listIncidentNotificationTemplates"]) { + logger.warn("Using unstable operation 'getGlobalIncidentSettings'"); + if (!_config.unstableOperations["v2.getGlobalIncidentSettings"]) { throw new Error( - "Unstable operation 'listIncidentNotificationTemplates' is disabled" + "Unstable operation 'getGlobalIncidentSettings' is disabled" ); } // Path Params - const localVarPath = "/api/v2/incidents/config/notification-templates"; + const localVarPath = "/api/v2/incidents/config/global/settings"; // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidentNotificationTemplates") + .getServer("v2.IncidentsApi.getGlobalIncidentSettings") .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (filterIncidentType !== undefined) { - requestContext.setQueryParam( - "filter[incident-type]", - ObjectSerializer.serialize(filterIncidentType, "string", "uuid"), - "" - ); - } - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async listIncidentPostmortemTemplates( + public async getIncident( + incidentId: string, + include?: Array, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listIncidentPostmortemTemplates'"); - if (!_config.unstableOperations["v2.listIncidentPostmortemTemplates"]) { - throw new Error( - "Unstable operation 'listIncidentPostmortemTemplates' is disabled" - ); + logger.warn("Using unstable operation 'getIncident'"); + if (!_config.unstableOperations["v2.getIncident"]) { + throw new Error("Unstable operation 'getIncident' is disabled"); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "getIncident"); } // Path Params - const localVarPath = "/api/v2/incidents/config/postmortem-templates"; + const localVarPath = "/api/v2/incidents/{incident_id}".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidentPostmortemTemplates") + .getServer("v2.IncidentsApi.getIncident") .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "Array", ""), + "csv" + ); + } + // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async listIncidents( - include?: Array, - pageSize?: number, - pageOffset?: number, + public async getIncidentAutomationData( + incidentId: string, + key: string, + include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listIncidents'"); - if (!_config.unstableOperations["v2.listIncidents"]) { - throw new Error("Unstable operation 'listIncidents' is disabled"); + logger.warn("Using unstable operation 'getIncidentAutomationData'"); + if (!_config.unstableOperations["v2.getIncidentAutomationData"]) { + throw new Error( + "Unstable operation 'getIncidentAutomationData' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "getIncidentAutomationData"); + } + + // verify required parameter 'key' is not null or undefined + if (key === null || key === undefined) { + throw new RequiredError("key", "getIncidentAutomationData"); } // Path Params - const localVarPath = "/api/v2/incidents"; + const localVarPath = "/api/v2/incidents/{incident_id}/automation-data/{key}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace("{key}", encodeURIComponent(String(key))); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidents") + .getServer("v2.IncidentsApi.getIncidentAutomationData") .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -2058,21 +2542,7 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { if (include !== undefined) { requestContext.setQueryParam( "include", - ObjectSerializer.serialize(include, "Array", ""), - "csv" - ); - } - if (pageSize !== undefined) { - requestContext.setQueryParam( - "page[size]", - ObjectSerializer.serialize(pageSize, "number", "int64"), - "" - ); - } - if (pageOffset !== undefined) { - requestContext.setQueryParam( - "page[offset]", - ObjectSerializer.serialize(pageOffset, "number", "int64"), + ObjectSerializer.serialize(include, "string", ""), "" ); } @@ -2087,32 +2557,34 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listIncidentTodos( + public async getIncidentCaseSourceLink( incidentId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listIncidentTodos'"); - if (!_config.unstableOperations["v2.listIncidentTodos"]) { - throw new Error("Unstable operation 'listIncidentTodos' is disabled"); + logger.warn("Using unstable operation 'getIncidentCaseSourceLink'"); + if (!_config.unstableOperations["v2.getIncidentCaseSourceLink"]) { + throw new Error( + "Unstable operation 'getIncidentCaseSourceLink' is disabled" + ); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "listIncidentTodos"); + throw new RequiredError("incidentId", "getIncidentCaseSourceLink"); } // Path Params const localVarPath = - "/api/v2/incidents/{incident_id}/relationships/todos".replace( + "/api/v2/incidents/{incident_id}/cases/source-link".replace( "{incident_id}", encodeURIComponent(String(incidentId)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidentTodos") + .getServer("v2.IncidentsApi.getIncidentCaseSourceLink") .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -2127,36 +2599,46 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listIncidentTypes( - includeDeleted?: boolean, + public async getIncidentCommunication( + incidentId: string, + communicationId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listIncidentTypes'"); - if (!_config.unstableOperations["v2.listIncidentTypes"]) { - throw new Error("Unstable operation 'listIncidentTypes' is disabled"); + logger.warn("Using unstable operation 'getIncidentCommunication'"); + if (!_config.unstableOperations["v2.getIncidentCommunication"]) { + throw new Error( + "Unstable operation 'getIncidentCommunication' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "getIncidentCommunication"); + } + + // verify required parameter 'communicationId' is not null or undefined + if (communicationId === null || communicationId === undefined) { + throw new RequiredError("communicationId", "getIncidentCommunication"); } // Path Params - const localVarPath = "/api/v2/incidents/config/types"; + const localVarPath = + "/api/v2/incidents/{incident_id}/communications/{communication_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace( + "{communication_id}", + encodeURIComponent(String(communicationId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidentTypes") + .getServer("v2.IncidentsApi.getIncidentCommunication") .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (includeDeleted !== undefined) { - requestContext.setQueryParam( - "include_deleted", - ObjectSerializer.serialize(includeDeleted, "boolean", ""), - "" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -2167,70 +2649,49 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async listIncidentUserDefinedFields( - pageSize?: number, - pageNumber?: number, - includeDeleted?: boolean, - filterIncidentType?: string, - include?: string, + public async getIncidentIntegration( + incidentId: string, + integrationMetadataId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'listIncidentUserDefinedFields'"); - if (!_config.unstableOperations["v2.listIncidentUserDefinedFields"]) { + logger.warn("Using unstable operation 'getIncidentIntegration'"); + if (!_config.unstableOperations["v2.getIncidentIntegration"]) { throw new Error( - "Unstable operation 'listIncidentUserDefinedFields' is disabled" + "Unstable operation 'getIncidentIntegration' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "getIncidentIntegration"); + } + + // verify required parameter 'integrationMetadataId' is not null or undefined + if (integrationMetadataId === null || integrationMetadataId === undefined) { + throw new RequiredError( + "integrationMetadataId", + "getIncidentIntegration" ); } // Path Params - const localVarPath = "/api/v2/incidents/config/user-defined-fields"; + const localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace( + "{integration_metadata_id}", + encodeURIComponent(String(integrationMetadataId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.listIncidentUserDefinedFields") + .getServer("v2.IncidentsApi.getIncidentIntegration") .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 (pageNumber !== undefined) { - requestContext.setQueryParam( - "page[number]", - ObjectSerializer.serialize(pageNumber, "number", "int64"), - "" - ); - } - if (includeDeleted !== undefined) { - requestContext.setQueryParam( - "include-deleted", - ObjectSerializer.serialize(includeDeleted, "boolean", ""), - "" - ); - } - if (filterIncidentType !== undefined) { - requestContext.setQueryParam( - "filter[incident-type]", - ObjectSerializer.serialize(filterIncidentType, "string", ""), - "" - ); - } - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -2241,73 +2702,38 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async searchIncidents( - query: string, - include?: IncidentRelatedObject, - sort?: IncidentSearchSortOrder, - pageSize?: number, - pageOffset?: number, + public async getIncidentJiraTemplate( + templateId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'searchIncidents'"); - if (!_config.unstableOperations["v2.searchIncidents"]) { - throw new Error("Unstable operation 'searchIncidents' is disabled"); + logger.warn("Using unstable operation 'getIncidentJiraTemplate'"); + if (!_config.unstableOperations["v2.getIncidentJiraTemplate"]) { + throw new Error( + "Unstable operation 'getIncidentJiraTemplate' is disabled" + ); } - // verify required parameter 'query' is not null or undefined - if (query === null || query === undefined) { - throw new RequiredError("query", "searchIncidents"); + // verify required parameter 'templateId' is not null or undefined + if (templateId === null || templateId === undefined) { + throw new RequiredError("templateId", "getIncidentJiraTemplate"); } // Path Params - const localVarPath = "/api/v2/incidents/search"; + const localVarPath = + "/api/v2/incidents/config/jira-templates/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.searchIncidents") + .getServer("v2.IncidentsApi.getIncidentJiraTemplate") .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "IncidentRelatedObject", ""), - "" - ); - } - if (query !== undefined) { - requestContext.setQueryParam( - "query", - ObjectSerializer.serialize(query, "string", ""), - "" - ); - } - if (sort !== undefined) { - requestContext.setQueryParam( - "sort", - ObjectSerializer.serialize(sort, "IncidentSearchSortOrder", ""), - "" - ); - } - if (pageSize !== undefined) { - requestContext.setQueryParam( - "page[size]", - ObjectSerializer.serialize(pageSize, "number", "int64"), - "" - ); - } - if (pageOffset !== undefined) { - requestContext.setQueryParam( - "page[offset]", - ObjectSerializer.serialize(pageOffset, "number", "int64"), - "" - ); - } - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -2318,32 +2744,36 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async updateGlobalIncidentHandle( - body: IncidentHandleRequest, + public async getIncidentNotificationRule( + id: string, include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateGlobalIncidentHandle'"); - if (!_config.unstableOperations["v2.updateGlobalIncidentHandle"]) { + logger.warn("Using unstable operation 'getIncidentNotificationRule'"); + if (!_config.unstableOperations["v2.getIncidentNotificationRule"]) { throw new Error( - "Unstable operation 'updateGlobalIncidentHandle' is disabled" + "Unstable operation 'getIncidentNotificationRule' is disabled" ); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateGlobalIncidentHandle"); + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "getIncidentNotificationRule"); } // Path Params - const localVarPath = "/api/v2/incidents/config/global/incident-handles"; + const localVarPath = + "/api/v2/incidents/config/notification-rules/{id}".replace( + "{id}", + encodeURIComponent(String(id)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateGlobalIncidentHandle") - .makeRequestContext(localVarPath, HttpMethod.PUT); + .getServer("v2.IncidentsApi.getIncidentNotificationRule") + .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -2356,130 +2786,107 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { ); } - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json", - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "IncidentHandleRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async updateGlobalIncidentSettings( - body: GlobalIncidentSettingsRequest, + public async getIncidentNotificationTemplate( + id: string, + include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateGlobalIncidentSettings'"); - if (!_config.unstableOperations["v2.updateGlobalIncidentSettings"]) { + logger.warn("Using unstable operation 'getIncidentNotificationTemplate'"); + if (!_config.unstableOperations["v2.getIncidentNotificationTemplate"]) { throw new Error( - "Unstable operation 'updateGlobalIncidentSettings' is disabled" + "Unstable operation 'getIncidentNotificationTemplate' is disabled" ); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateGlobalIncidentSettings"); + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "getIncidentNotificationTemplate"); } // Path Params - const localVarPath = "/api/v2/incidents/config/global/settings"; + const localVarPath = + "/api/v2/incidents/config/notification-templates/{id}".replace( + "{id}", + encodeURIComponent(String(id)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateGlobalIncidentSettings") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer("v2.IncidentsApi.getIncidentNotificationTemplate") + .makeRequestContext(localVarPath, HttpMethod.GET); 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, "GlobalIncidentSettingsRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async updateIncident( - incidentId: string, - body: IncidentUpdateRequest, - include?: Array, + public async getIncidentPagerdutyRelatedIncidents( + pagerdutyIncidentId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateIncident'"); - if (!_config.unstableOperations["v2.updateIncident"]) { - throw new Error("Unstable operation 'updateIncident' is disabled"); - } - - // verify required parameter 'incidentId' is not null or undefined - if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "updateIncident"); + logger.warn( + "Using unstable operation 'getIncidentPagerdutyRelatedIncidents'" + ); + if ( + !_config.unstableOperations["v2.getIncidentPagerdutyRelatedIncidents"] + ) { + throw new Error( + "Unstable operation 'getIncidentPagerdutyRelatedIncidents' is disabled" + ); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateIncident"); + // verify required parameter 'pagerdutyIncidentId' is not null or undefined + if (pagerdutyIncidentId === null || pagerdutyIncidentId === undefined) { + throw new RequiredError( + "pagerdutyIncidentId", + "getIncidentPagerdutyRelatedIncidents" + ); } // Path Params - const localVarPath = "/api/v2/incidents/{incident_id}".replace( - "{incident_id}", - encodeURIComponent(String(incidentId)) - ); + const localVarPath = + "/api/v2/incidents/pagerduty/{pagerduty_incident_id}/relationships/incidents".replace( + "{pagerduty_incident_id}", + encodeURIComponent(String(pagerdutyIncidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateIncident") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer("v2.IncidentsApi.getIncidentPagerdutyRelatedIncidents") + .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "Array", ""), - "csv" - ); - } - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json", - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "IncidentUpdateRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -2490,70 +2897,38 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async updateIncidentAttachment( + public async getIncidentPageSourceLink( incidentId: string, - attachmentId: string, - body: PatchAttachmentRequest, - include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateIncidentAttachment'"); - if (!_config.unstableOperations["v2.updateIncidentAttachment"]) { + logger.warn("Using unstable operation 'getIncidentPageSourceLink'"); + if (!_config.unstableOperations["v2.getIncidentPageSourceLink"]) { throw new Error( - "Unstable operation 'updateIncidentAttachment' is disabled" + "Unstable operation 'getIncidentPageSourceLink' is disabled" ); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "updateIncidentAttachment"); - } - - // verify required parameter 'attachmentId' is not null or undefined - if (attachmentId === null || attachmentId === undefined) { - throw new RequiredError("attachmentId", "updateIncidentAttachment"); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateIncidentAttachment"); + throw new RequiredError("incidentId", "getIncidentPageSourceLink"); } // Path Params const localVarPath = - "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" - .replace("{incident_id}", encodeURIComponent(String(incidentId))) - .replace("{attachment_id}", encodeURIComponent(String(attachmentId))); + "/api/v2/incidents/{incident_id}/pages/source-link".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateIncidentAttachment") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer("v2.IncidentsApi.getIncidentPageSourceLink") + .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json", - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "PatchAttachmentRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -2564,143 +2939,79 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async updateIncidentIntegration( - incidentId: string, - integrationMetadataId: string, - body: IncidentIntegrationMetadataPatchRequest, + public async getIncidentPostmortemTemplate( + templateId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateIncidentIntegration'"); - if (!_config.unstableOperations["v2.updateIncidentIntegration"]) { + logger.warn("Using unstable operation 'getIncidentPostmortemTemplate'"); + if (!_config.unstableOperations["v2.getIncidentPostmortemTemplate"]) { throw new Error( - "Unstable operation 'updateIncidentIntegration' is disabled" - ); - } - - // verify required parameter 'incidentId' is not null or undefined - if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "updateIncidentIntegration"); - } - - // verify required parameter 'integrationMetadataId' is not null or undefined - if (integrationMetadataId === null || integrationMetadataId === undefined) { - throw new RequiredError( - "integrationMetadataId", - "updateIncidentIntegration" + "Unstable operation 'getIncidentPostmortemTemplate' is disabled" ); } - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateIncidentIntegration"); + // verify required parameter 'templateId' is not null or undefined + if (templateId === null || templateId === undefined) { + throw new RequiredError("templateId", "getIncidentPostmortemTemplate"); } // Path Params const localVarPath = - "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" - .replace("{incident_id}", encodeURIComponent(String(incidentId))) - .replace( - "{integration_metadata_id}", - encodeURIComponent(String(integrationMetadataId)) - ); + "/api/v2/incidents/config/postmortem-templates/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateIncidentIntegration") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer("v2.IncidentsApi.getIncidentPostmortemTemplate") + .makeRequestContext(localVarPath, HttpMethod.GET); 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, - "IncidentIntegrationMetadataPatchRequest", - "" - ), - contentType - ); - requestContext.setBody(serializedBody); - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", - "AuthZ", ]); return requestContext; } - public async updateIncidentNotificationRule( - id: string, - body: PutIncidentNotificationRuleRequest, - include?: string, + public async getIncidentReservedRole( + roleId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateIncidentNotificationRule'"); - if (!_config.unstableOperations["v2.updateIncidentNotificationRule"]) { + logger.warn("Using unstable operation 'getIncidentReservedRole'"); + if (!_config.unstableOperations["v2.getIncidentReservedRole"]) { throw new Error( - "Unstable operation 'updateIncidentNotificationRule' is disabled" + "Unstable operation 'getIncidentReservedRole' is disabled" ); } - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError("id", "updateIncidentNotificationRule"); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateIncidentNotificationRule"); + // verify required parameter 'roleId' is not null or undefined + if (roleId === null || roleId === undefined) { + throw new RequiredError("roleId", "getIncidentReservedRole"); } // Path Params const localVarPath = - "/api/v2/incidents/config/notification-rules/{id}".replace( - "{id}", - encodeURIComponent(String(id)) + "/api/v2/incidents/config/reserved-roles/{role_id}".replace( + "{role_id}", + encodeURIComponent(String(roleId)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateIncidentNotificationRule") - .makeRequestContext(localVarPath, HttpMethod.PUT); + .getServer("v2.IncidentsApi.getIncidentReservedRole") + .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json", - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize( - body, - "PutIncidentNotificationRuleRequest", - "" - ), - contentType - ); - requestContext.setBody(serializedBody); - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -2711,71 +3022,38 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async updateIncidentNotificationTemplate( - id: string, - body: PatchIncidentNotificationTemplateRequest, - include?: string, + public async getIncidentRoleAssignment( + roleAssignmentId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn( - "Using unstable operation 'updateIncidentNotificationTemplate'" - ); - if (!_config.unstableOperations["v2.updateIncidentNotificationTemplate"]) { + logger.warn("Using unstable operation 'getIncidentRoleAssignment'"); + if (!_config.unstableOperations["v2.getIncidentRoleAssignment"]) { throw new Error( - "Unstable operation 'updateIncidentNotificationTemplate' is disabled" + "Unstable operation 'getIncidentRoleAssignment' is disabled" ); } - // verify required parameter 'id' is not null or undefined - if (id === null || id === undefined) { - throw new RequiredError("id", "updateIncidentNotificationTemplate"); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateIncidentNotificationTemplate"); + // verify required parameter 'roleAssignmentId' is not null or undefined + if (roleAssignmentId === null || roleAssignmentId === undefined) { + throw new RequiredError("roleAssignmentId", "getIncidentRoleAssignment"); } // Path Params const localVarPath = - "/api/v2/incidents/config/notification-templates/{id}".replace( - "{id}", - encodeURIComponent(String(id)) + "/api/v2/incidents/role_assignments/{role_assignment_id}".replace( + "{role_assignment_id}", + encodeURIComponent(String(roleAssignmentId)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateIncidentNotificationTemplate") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer("v2.IncidentsApi.getIncidentRoleAssignment") + .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Query Params - if (include !== undefined) { - requestContext.setQueryParam( - "include", - ObjectSerializer.serialize(include, "string", ""), - "" - ); - } - - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json", - ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize( - body, - "PatchIncidentNotificationTemplateRequest", - "" - ), - contentType - ); - requestContext.setBody(serializedBody); - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -2786,90 +3064,121 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async updateIncidentPostmortemTemplate( - templateId: string, - body: PostmortemTemplateRequest, + public async getIncidentStatusPagesSuggestion( + incidentId: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateIncidentPostmortemTemplate'"); - if (!_config.unstableOperations["v2.updateIncidentPostmortemTemplate"]) { + logger.warn("Using unstable operation 'getIncidentStatusPagesSuggestion'"); + if (!_config.unstableOperations["v2.getIncidentStatusPagesSuggestion"]) { throw new Error( - "Unstable operation 'updateIncidentPostmortemTemplate' is disabled" + "Unstable operation 'getIncidentStatusPagesSuggestion' is disabled" ); } - // verify required parameter 'templateId' is not null or undefined - if (templateId === null || templateId === undefined) { - throw new RequiredError("templateId", "updateIncidentPostmortemTemplate"); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateIncidentPostmortemTemplate"); + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "getIncidentStatusPagesSuggestion"); } // Path Params const localVarPath = - "/api/v2/incidents/config/postmortem-templates/{template_id}".replace( - "{template_id}", - encodeURIComponent(String(templateId)) + "/api/v2/incidents/{incident_id}/statuspages-suggestion".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) ); // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateIncidentPostmortemTemplate") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer("v2.IncidentsApi.getIncidentStatusPagesSuggestion") + .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); - // Body Params - const contentType = ObjectSerializer.getPreferredMediaType([ - "application/json", + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", ]); - requestContext.setHeaderParam("Content-Type", contentType); - const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize(body, "PostmortemTemplateRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); + + return requestContext; + } + + public async getIncidentTimelineEntryThread( + incidentId: string, + timelineEntryId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getIncidentTimelineEntryThread'"); + if (!_config.unstableOperations["v2.getIncidentTimelineEntryThread"]) { + throw new Error( + "Unstable operation 'getIncidentTimelineEntryThread' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "getIncidentTimelineEntryThread"); + } + + // verify required parameter 'timelineEntryId' is not null or undefined + if (timelineEntryId === null || timelineEntryId === undefined) { + throw new RequiredError( + "timelineEntryId", + "getIncidentTimelineEntryThread" + ); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}/thread" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace( + "{timeline_entry_id}", + encodeURIComponent(String(timelineEntryId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.getIncidentTimelineEntryThread") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", "appKeyAuth", + "AuthZ", ]); return requestContext; } - public async updateIncidentTodo( + public async getIncidentTodo( incidentId: string, todoId: string, - body: IncidentTodoPatchRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateIncidentTodo'"); - if (!_config.unstableOperations["v2.updateIncidentTodo"]) { - throw new Error("Unstable operation 'updateIncidentTodo' is disabled"); + logger.warn("Using unstable operation 'getIncidentTodo'"); + if (!_config.unstableOperations["v2.getIncidentTodo"]) { + throw new Error("Unstable operation 'getIncidentTodo' is disabled"); } // verify required parameter 'incidentId' is not null or undefined if (incidentId === null || incidentId === undefined) { - throw new RequiredError("incidentId", "updateIncidentTodo"); + throw new RequiredError("incidentId", "getIncidentTodo"); } // verify required parameter 'todoId' is not null or undefined if (todoId === null || todoId === undefined) { - throw new RequiredError("todoId", "updateIncidentTodo"); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateIncidentTodo"); + throw new RequiredError("todoId", "getIncidentTodo"); } // Path Params @@ -2880,22 +3189,11 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateIncidentTodo") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer("v2.IncidentsApi.getIncidentTodo") + .makeRequestContext(localVarPath, HttpMethod.GET); 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, "IncidentTodoPatchRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -2906,26 +3204,20 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async updateIncidentType( + public async getIncidentType( incidentTypeId: string, - body: IncidentTypePatchRequest, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateIncidentType'"); - if (!_config.unstableOperations["v2.updateIncidentType"]) { - throw new Error("Unstable operation 'updateIncidentType' is disabled"); + logger.warn("Using unstable operation 'getIncidentType'"); + if (!_config.unstableOperations["v2.getIncidentType"]) { + throw new Error("Unstable operation 'getIncidentType' is disabled"); } // verify required parameter 'incidentTypeId' is not null or undefined if (incidentTypeId === null || incidentTypeId === undefined) { - throw new RequiredError("incidentTypeId", "updateIncidentType"); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateIncidentType"); + throw new RequiredError("incidentTypeId", "getIncidentType"); } // Path Params @@ -2937,22 +3229,11 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateIncidentType") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer("v2.IncidentsApi.getIncidentType") + .makeRequestContext(localVarPath, HttpMethod.GET); 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, "IncidentTypePatchRequest", ""), - contentType - ); - requestContext.setBody(serializedBody); - // Apply auth methods applySecurityAuthentication(_config, requestContext, [ "apiKeyAuth", @@ -2963,29 +3244,23 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } - public async updateIncidentUserDefinedField( + public async getIncidentUserDefinedField( fieldId: string, - body: IncidentUserDefinedFieldUpdateRequest, include?: string, _options?: Configuration ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'updateIncidentUserDefinedField'"); - if (!_config.unstableOperations["v2.updateIncidentUserDefinedField"]) { + logger.warn("Using unstable operation 'getIncidentUserDefinedField'"); + if (!_config.unstableOperations["v2.getIncidentUserDefinedField"]) { throw new Error( - "Unstable operation 'updateIncidentUserDefinedField' is disabled" + "Unstable operation 'getIncidentUserDefinedField' is disabled" ); } // verify required parameter 'fieldId' is not null or undefined if (fieldId === null || fieldId === undefined) { - throw new RequiredError("fieldId", "updateIncidentUserDefinedField"); - } - - // verify required parameter 'body' is not null or undefined - if (body === null || body === undefined) { - throw new RequiredError("body", "updateIncidentUserDefinedField"); + throw new RequiredError("fieldId", "getIncidentUserDefinedField"); } // Path Params @@ -2997,8 +3272,8 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { // Make Request Context const requestContext = _config - .getServer("v2.IncidentsApi.updateIncidentUserDefinedField") - .makeRequestContext(localVarPath, HttpMethod.PATCH); + .getServer("v2.IncidentsApi.getIncidentUserDefinedField") + .makeRequestContext(localVarPath, HttpMethod.GET); requestContext.setHeaderParam("Accept", "application/json"); requestContext.setHttpConfig(_config.httpConfig); @@ -3011,17 +3286,98 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { ); } + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async getStatuspageSubscriptionPreferences( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'getStatuspageSubscriptionPreferences'" + ); + if ( + !_config.unstableOperations["v2.getStatuspageSubscriptionPreferences"] + ) { + throw new Error( + "Unstable operation 'getStatuspageSubscriptionPreferences' is disabled" + ); + } + + // Path Params + const localVarPath = "/api/v2/statuspages/subscription/preferences"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.getStatuspageSubscriptionPreferences") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; + } + + public async importIncident( + body: IncidentImportRequest, + include?: Array, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'importIncident'"); + if (!_config.unstableOperations["v2.importIncident"]) { + throw new Error("Unstable operation 'importIncident' is disabled"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "importIncident"); + } + + // Path Params + const localVarPath = "/api/v2/incidents/import"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.importIncident") + .makeRequestContext(localVarPath, HttpMethod.POST); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize( + include, + "Array", + "" + ), + "csv" + ); + } + // Body Params const contentType = ObjectSerializer.getPreferredMediaType([ "application/json", ]); requestContext.setHeaderParam("Content-Type", contentType); const serializedBody = ObjectSerializer.stringify( - ObjectSerializer.serialize( - body, - "IncidentUserDefinedFieldUpdateRequest", - "" - ), + ObjectSerializer.serialize(body, "IncidentImportRequest", ""), contentType ); requestContext.setBody(serializedBody); @@ -3035,3339 +3391,2564 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } -} -export class IncidentsApiResponseProcessor { - /** - * 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 createGlobalIncidentHandle - * @throws ApiException if the response code was not in [200, 299] - */ - public async createGlobalIncidentHandle( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentHandleResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentHandleResponse" - ) as IncidentHandleResponse; - return body; - } - if (response.httpStatusCode === 400) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body - ); - } - if (response.httpStatusCode === 429) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + public async listGlobalIncidentHandles( + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listGlobalIncidentHandles'"); + if (!_config.unstableOperations["v2.listGlobalIncidentHandles"]) { + throw new Error( + "Unstable operation 'listGlobalIncidentHandles' is disabled" ); - 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: IncidentHandleResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentHandleResponse", + // Path Params + const localVarPath = "/api/v2/incidents/config/global/incident-handles"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listGlobalIncidentHandles") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), "" - ) as IncidentHandleResponse; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; } - /** - * 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 createIncident - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncident( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentResponse" - ) as IncidentResponse; - 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 + public async listIncidentAttachments( + incidentId: string, + filterAttachmentType?: string, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentAttachments'"); + if (!_config.unstableOperations["v2.listIncidentAttachments"]) { + throw new Error( + "Unstable operation 'listIncidentAttachments' is disabled" ); - 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: IncidentResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentResponse", - "" - ) as IncidentResponse; - return body; + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "listIncidentAttachments"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Path Params + const localVarPath = "/api/v2/incidents/{incident_id}/attachments".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) ); - } - /** - * 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 createIncidentAttachment - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentAttachment( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: Attachment = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Attachment" - ) as Attachment; - return body; - } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentAttachments") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (filterAttachmentType !== undefined) { + requestContext.setQueryParam( + "filter[attachment_type]", + ObjectSerializer.serialize(filterAttachmentType, "string", ""), + "" ); - 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: Attachment = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Attachment", + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), "" - ) as Attachment; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; } - /** - * 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 createIncidentImpact - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentImpact( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentImpactResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentImpactResponse" - ) as IncidentImpactResponse; - 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 + public async listIncidentCommunications( + incidentId: string, + filterCommunicationType?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentCommunications'"); + if (!_config.unstableOperations["v2.listIncidentCommunications"]) { + throw new Error( + "Unstable operation 'listIncidentCommunications' is disabled" ); - 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: IncidentImpactResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentImpactResponse", + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "listIncidentCommunications"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/communications".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentCommunications") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (filterCommunicationType !== undefined) { + requestContext.setQueryParam( + "filter[communication_type]", + ObjectSerializer.serialize(filterCommunicationType, "string", ""), "" - ) as IncidentImpactResponse; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 createIncidentIntegration - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentIntegration( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentIntegrationMetadataResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentIntegrationMetadataResponse" - ) as IncidentIntegrationMetadataResponse; - 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); + public async listIncidentImpacts( + incidentId: string, + include?: Array, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "listIncidentImpacts"); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentIntegrationMetadataResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentIntegrationMetadataResponse", + // Path Params + const localVarPath = "/api/v2/incidents/{incident_id}/impacts".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentImpacts") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize( + include, + "Array", "" - ) as IncidentIntegrationMetadataResponse; - return body; + ), + "csv" + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 createIncidentNotificationRule - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentNotificationRule( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentNotificationRule = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationRule" - ) as IncidentNotificationRule; - 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 + public async listIncidentIntegrations( + incidentId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentIntegrations'"); + if (!_config.unstableOperations["v2.listIncidentIntegrations"]) { + throw new Error( + "Unstable operation 'listIncidentIntegrations' is disabled" ); - 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: IncidentNotificationRule = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationRule", - "" - ) as IncidentNotificationRule; - return body; + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "listIncidentIntegrations"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); - /** - * 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 createIncidentNotificationTemplate - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentNotificationTemplate( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationTemplate" - ) as IncidentNotificationTemplate; - 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); - } + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentIntegrations") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationTemplate", - "" - ) as IncidentNotificationTemplate; - return body; - } + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + return requestContext; } - /** - * 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 createIncidentPostmortemAttachment - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentPostmortemAttachment( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: Attachment = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Attachment" - ) as Attachment; - return body; - } - if (response.httpStatusCode === 400) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + public async listIncidentJiraTemplates( + isDefault?: boolean, + incidentTypeId?: string, + templateType?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentJiraTemplates'"); + if (!_config.unstableOperations["v2.listIncidentJiraTemplates"]) { + throw new Error( + "Unstable operation 'listIncidentJiraTemplates' is disabled" ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body + } + + // Path Params + const localVarPath = "/api/v2/incidents/config/jira-templates"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentJiraTemplates") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (isDefault !== undefined) { + requestContext.setQueryParam( + "isDefault", + ObjectSerializer.serialize(isDefault, "boolean", ""), + "" ); } - if (response.httpStatusCode === 429) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + if (incidentTypeId !== undefined) { + requestContext.setQueryParam( + "incidentTypeId", + ObjectSerializer.serialize(incidentTypeId, "string", "uuid"), + "" ); - 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: Attachment = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Attachment", + if (templateType !== undefined) { + requestContext.setQueryParam( + "templateType", + ObjectSerializer.serialize(templateType, "string", ""), "" - ) as Attachment; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 createIncidentPostmortemTemplate - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentPostmortemTemplate( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: PostmortemTemplateResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "PostmortemTemplateResponse" - ) as PostmortemTemplateResponse; - return body; - } - if (response.httpStatusCode === 400 || response.httpStatusCode === 403) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body + public async listIncidentNotificationRules( + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentNotificationRules'"); + if (!_config.unstableOperations["v2.listIncidentNotificationRules"]) { + throw new Error( + "Unstable operation 'listIncidentNotificationRules' is disabled" ); } - if (response.httpStatusCode === 429) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + + // Path Params + const localVarPath = "/api/v2/incidents/config/notification-rules"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentNotificationRules") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" ); - 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: PostmortemTemplateResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "PostmortemTemplateResponse", - "" - ) as PostmortemTemplateResponse; - return body; - } + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + return requestContext; } - /** - * 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 createIncidentTodo - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentTodo( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentTodoResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTodoResponse" - ) as IncidentTodoResponse; - 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 + public async listIncidentNotificationTemplates( + filterIncidentType?: string, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentNotificationTemplates'"); + if (!_config.unstableOperations["v2.listIncidentNotificationTemplates"]) { + throw new Error( + "Unstable operation 'listIncidentNotificationTemplates' is disabled" ); - 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: IncidentTodoResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTodoResponse", + // Path Params + const localVarPath = "/api/v2/incidents/config/notification-templates"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentNotificationTemplates") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (filterIncidentType !== undefined) { + requestContext.setQueryParam( + "filter[incident-type]", + ObjectSerializer.serialize(filterIncidentType, "string", "uuid"), "" - ) as IncidentTodoResponse; - return body; + ); + } + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 createIncidentType - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentType( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentTypeResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTypeResponse" - ) as IncidentTypeResponse; - 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 + public async listIncidentPagerdutyServices( + includeUnresolved?: boolean, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentPagerdutyServices'"); + if (!_config.unstableOperations["v2.listIncidentPagerdutyServices"]) { + throw new Error( + "Unstable operation 'listIncidentPagerdutyServices' is disabled" ); - 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: IncidentTypeResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTypeResponse", + // Path Params + const localVarPath = "/api/v2/incidents/pagerduty/services"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentPagerdutyServices") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (includeUnresolved !== undefined) { + requestContext.setQueryParam( + "include_unresolved", + ObjectSerializer.serialize(includeUnresolved, "boolean", ""), "" - ) as IncidentTypeResponse; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 createIncidentUserDefinedField - * @throws ApiException if the response code was not in [200, 299] - */ - public async createIncidentUserDefinedField( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentUserDefinedFieldResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentUserDefinedFieldResponse" - ) as IncidentUserDefinedFieldResponse; - return body; - } - if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body + public async listIncidentPostmortemTemplates( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentPostmortemTemplates'"); + if (!_config.unstableOperations["v2.listIncidentPostmortemTemplates"]) { + throw new Error( + "Unstable operation 'listIncidentPostmortemTemplates' is disabled" ); } - if ( - response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); - } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentUserDefinedFieldResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentUserDefinedFieldResponse", - "" - ) as IncidentUserDefinedFieldResponse; - return body; - } + // Path Params + const localVarPath = "/api/v2/incidents/config/postmortem-templates"; - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentPostmortemTemplates") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; } - /** - * 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 deleteGlobalIncidentHandle - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteGlobalIncidentHandle( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; - } - if (response.httpStatusCode === 400) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body - ); - } - if (response.httpStatusCode === 429) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + public async listIncidentReservedRoles( + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentReservedRoles'"); + if (!_config.unstableOperations["v2.listIncidentReservedRoles"]) { + throw new Error( + "Unstable operation 'listIncidentReservedRoles' is disabled" ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; - } + // Path Params + const localVarPath = "/api/v2/incidents/config/reserved-roles"; - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentReservedRoles") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 deleteIncident - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncident(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; - } - 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 + public async listIncidentRuleExecutionStates( + incidentId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentRuleExecutionStates'"); + if (!_config.unstableOperations["v2.listIncidentRuleExecutionStates"]) { + throw new Error( + "Unstable operation 'listIncidentRuleExecutionStates' is disabled" ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "listIncidentRuleExecutionStates"); } - 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 deleteIncidentAttachment - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncidentAttachment( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; - } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/rule-execution-states".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); - } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; - } + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentRuleExecutionStates") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 deleteIncidentImpact - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncidentImpact(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; + public async listIncidents( + include?: Array, + pageSize?: number, + pageOffset?: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidents'"); + if (!_config.unstableOperations["v2.listIncidents"]) { + throw new Error("Unstable operation 'listIncidents' is disabled"); } - if ( - response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + + // Path Params + const localVarPath = "/api/v2/incidents"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidents") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "Array", ""), + "csv" ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + ObjectSerializer.serialize(pageSize, "number", "int64"), + "" + ); + } + if (pageOffset !== undefined) { + requestContext.setQueryParam( + "page[offset]", + ObjectSerializer.serialize(pageOffset, "number", "int64"), + "" + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 deleteIncidentIntegration - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncidentIntegration( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; - } - 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 + public async listIncidentTemplateVariables( + filterIncidentType?: string, + includeFollowUps?: boolean, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentTemplateVariables'"); + if (!_config.unstableOperations["v2.listIncidentTemplateVariables"]) { + throw new Error( + "Unstable operation 'listIncidentTemplateVariables' is disabled" ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + // Path Params + const localVarPath = "/api/v2/incidents/config/template-variables"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentTemplateVariables") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (filterIncidentType !== undefined) { + requestContext.setQueryParam( + "filter[incident-type]", + ObjectSerializer.serialize(filterIncidentType, "string", "uuid"), + "" + ); + } + if (includeFollowUps !== undefined) { + requestContext.setQueryParam( + "includeFollowUps", + ObjectSerializer.serialize(includeFollowUps, "boolean", ""), + "" + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 deleteIncidentNotificationRule - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncidentNotificationRule( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; - } - 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 + public async listIncidentTimelineEntries( + incidentId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentTimelineEntries'"); + if (!_config.unstableOperations["v2.listIncidentTimelineEntries"]) { + throw new Error( + "Unstable operation 'listIncidentTimelineEntries' is disabled" ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "listIncidentTimelineEntries"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Path Params + const localVarPath = "/api/v2/incidents/{incident_id}/timeline".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentTimelineEntries") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 deleteIncidentNotificationTemplate - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncidentNotificationTemplate( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; + public async listIncidentTodos( + incidentId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentTodos'"); + if (!_config.unstableOperations["v2.listIncidentTodos"]) { + throw new Error("Unstable operation 'listIncidentTodos' is disabled"); } - 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 + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "listIncidentTodos"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/relationships/todos".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) ); - 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); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentTodos") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async listIncidentTypes( + includeDeleted?: boolean, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentTypes'"); + if (!_config.unstableOperations["v2.listIncidentTypes"]) { + throw new Error("Unstable operation 'listIncidentTypes' is disabled"); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + // Path Params + const localVarPath = "/api/v2/incidents/config/types"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentTypes") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (includeDeleted !== undefined) { + requestContext.setQueryParam( + "include_deleted", + ObjectSerializer.serialize(includeDeleted, "boolean", ""), + "" + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 deleteIncidentPostmortemTemplate - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncidentPostmortemTemplate( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; + public async listIncidentUserDefinedFields( + pageSize?: number, + pageNumber?: number, + includeDeleted?: boolean, + filterIncidentType?: string, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listIncidentUserDefinedFields'"); + if (!_config.unstableOperations["v2.listIncidentUserDefinedFields"]) { + throw new Error( + "Unstable operation 'listIncidentUserDefinedFields' is disabled" + ); } - if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + + // Path Params + const localVarPath = "/api/v2/incidents/config/user-defined-fields"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listIncidentUserDefinedFields") + .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"), + "" ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body + } + if (pageNumber !== undefined) { + requestContext.setQueryParam( + "page[number]", + ObjectSerializer.serialize(pageNumber, "number", "int64"), + "" ); } - if (response.httpStatusCode === 429) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + if (includeDeleted !== undefined) { + requestContext.setQueryParam( + "include-deleted", + ObjectSerializer.serialize(includeDeleted, "boolean", ""), + "" ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); } - - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + if (filterIncidentType !== undefined) { + requestContext.setQueryParam( + "filter[incident-type]", + ObjectSerializer.serialize(filterIncidentType, "string", ""), + "" + ); + } + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 deleteIncidentTodo - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncidentTodo(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; - } - 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); + public async listStatuspageEmailSubscriptions( + pageId: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'listStatuspageEmailSubscriptions'"); + if (!_config.unstableOperations["v2.listStatuspageEmailSubscriptions"]) { + throw new Error( + "Unstable operation 'listStatuspageEmailSubscriptions' is disabled" + ); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + // verify required parameter 'pageId' is not null or undefined + if (pageId === null || pageId === undefined) { + throw new RequiredError("pageId", "listStatuspageEmailSubscriptions"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Path Params + const localVarPath = + "/api/v2/statuspages/{page_id}/subscriptions/email".replace( + "{page_id}", + encodeURIComponent(String(pageId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.listStatuspageEmailSubscriptions") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 deleteIncidentType - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncidentType(response: ResponseContext): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; - } - 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 + public async patchIncidentNotificationRule( + id: string, + body: PutIncidentNotificationRuleRequest, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'patchIncidentNotificationRule'"); + if (!_config.unstableOperations["v2.patchIncidentNotificationRule"]) { + throw new Error( + "Unstable operation 'patchIncidentNotificationRule' is disabled" ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "patchIncidentNotificationRule"); } - 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 deleteIncidentUserDefinedField - * @throws ApiException if the response code was not in [200, 299] - */ - public async deleteIncidentUserDefinedField( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 204) { - return; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "patchIncidentNotificationRule"); } - if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + + // Path Params + const localVarPath = + "/api/v2/incidents/config/notification-rules/{id}".replace( + "{id}", + encodeURIComponent(String(id)) ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.patchIncidentNotificationRule") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" ); } - if ( - response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "PutIncidentNotificationRuleRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async renderIncidentTemplate( + incidentId: string, + body: IncidentRenderTemplateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'renderIncidentTemplate'"); + if (!_config.unstableOperations["v2.renderIncidentTemplate"]) { + throw new Error( + "Unstable operation 'renderIncidentTemplate' is disabled" ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - return; + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "renderIncidentTemplate"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "renderIncidentTemplate"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/render-template".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.renderIncidentTemplate") + .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, "IncidentRenderTemplateRequest", ""), + contentType ); - } + requestContext.setBody(serializedBody); - /** - * 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 getGlobalIncidentSettings - * @throws ApiException if the response code was not in [200, 299] - */ - public async getGlobalIncidentSettings( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: GlobalIncidentSettingsResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "GlobalIncidentSettingsResponse" - ) as GlobalIncidentSettingsResponse; - return body; + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async searchIncidents( + query: string, + include?: IncidentRelatedObject, + sort?: IncidentSearchSortOrder, + pageSize?: number, + pageOffset?: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'searchIncidents'"); + if (!_config.unstableOperations["v2.searchIncidents"]) { + throw new Error("Unstable operation 'searchIncidents' is disabled"); } - if (response.httpStatusCode === 400) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + + // verify required parameter 'query' is not null or undefined + if (query === null || query === undefined) { + throw new RequiredError("query", "searchIncidents"); + } + + // Path Params + const localVarPath = "/api/v2/incidents/search"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.searchIncidents") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "IncidentRelatedObject", ""), + "" ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body + } + if (query !== undefined) { + requestContext.setQueryParam( + "query", + ObjectSerializer.serialize(query, "string", ""), + "" ); } - if (response.httpStatusCode === 429) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + ObjectSerializer.serialize(sort, "IncidentSearchSortOrder", ""), + "" ); - 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: GlobalIncidentSettingsResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "GlobalIncidentSettingsResponse", + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + ObjectSerializer.serialize(pageSize, "number", "int64"), "" - ) as GlobalIncidentSettingsResponse; - return body; + ); + } + if (pageOffset !== undefined) { + requestContext.setQueryParam( + "page[offset]", + ObjectSerializer.serialize(pageOffset, "number", "int64"), + "" + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 getIncident - * @throws ApiException if the response code was not in [200, 299] - */ - public async getIncident( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentResponse" - ) as IncidentResponse; - 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); - } + public async searchIncidentsV2( + query?: string, + sort?: IncidentSearchIncidentsSortOrder, + withFacets?: boolean, + filterWithDeleted?: boolean, + semanticQuery?: string, + timeZone?: string, + include?: Array, + pageSize?: number, + pageOffset?: number, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentResponse", - "" - ) as IncidentResponse; - return body; + logger.warn("Using unstable operation 'searchIncidentsV2'"); + if (!_config.unstableOperations["v2.searchIncidentsV2"]) { + throw new Error("Unstable operation 'searchIncidentsV2' is disabled"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } + // Path Params + const localVarPath = "/api/v2/incidents/search-incidents"; - /** - * 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 getIncidentIntegration - * @throws ApiException if the response code was not in [200, 299] - */ - public async getIncidentIntegration( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentIntegrationMetadataResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentIntegrationMetadataResponse" - ) as IncidentIntegrationMetadataResponse; - return body; + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.searchIncidentsV2") + .makeRequestContext(localVarPath, HttpMethod.GET); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (query !== undefined) { + requestContext.setQueryParam( + "query", + ObjectSerializer.serialize(query, "string", ""), + "" + ); } - 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 + if (sort !== undefined) { + requestContext.setQueryParam( + "sort", + ObjectSerializer.serialize( + sort, + "IncidentSearchIncidentsSortOrder", + "" + ), + "" ); - 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: IncidentIntegrationMetadataResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentIntegrationMetadataResponse", + if (withFacets !== undefined) { + requestContext.setQueryParam( + "with_facets", + ObjectSerializer.serialize(withFacets, "boolean", ""), + "" + ); + } + if (filterWithDeleted !== undefined) { + requestContext.setQueryParam( + "filter[with_deleted]", + ObjectSerializer.serialize(filterWithDeleted, "boolean", ""), + "" + ); + } + if (semanticQuery !== undefined) { + requestContext.setQueryParam( + "semantic_query", + ObjectSerializer.serialize(semanticQuery, "string", ""), + "" + ); + } + if (timeZone !== undefined) { + requestContext.setQueryParam( + "timeZone", + ObjectSerializer.serialize(timeZone, "string", ""), + "" + ); + } + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize( + include, + "Array", "" - ) as IncidentIntegrationMetadataResponse; - return body; + ), + "multi" + ); + } + if (pageSize !== undefined) { + requestContext.setQueryParam( + "page[size]", + ObjectSerializer.serialize(pageSize, "number", "int64"), + "" + ); + } + if (pageOffset !== undefined) { + requestContext.setQueryParam( + "page[offset]", + ObjectSerializer.serialize(pageOffset, "number", "int64"), + "" + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 getIncidentNotificationRule - * @throws ApiException if the response code was not in [200, 299] - */ - public async getIncidentNotificationRule( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentNotificationRule = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationRule" - ) as IncidentNotificationRule; - 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 + public async updateGlobalIncidentHandle( + body: IncidentHandleRequest, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateGlobalIncidentHandle'"); + if (!_config.unstableOperations["v2.updateGlobalIncidentHandle"]) { + throw new Error( + "Unstable operation 'updateGlobalIncidentHandle' is disabled" ); - 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: IncidentNotificationRule = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationRule", + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateGlobalIncidentHandle"); + } + + // Path Params + const localVarPath = "/api/v2/incidents/config/global/incident-handles"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateGlobalIncidentHandle") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), "" - ) as IncidentNotificationRule; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "IncidentHandleRequest", ""), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; } - /** - * 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 getIncidentNotificationTemplate - * @throws ApiException if the response code was not in [200, 299] - */ - public async getIncidentNotificationTemplate( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationTemplate" - ) as IncidentNotificationTemplate; - 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 + public async updateGlobalIncidentSettings( + body: GlobalIncidentSettingsRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateGlobalIncidentSettings'"); + if (!_config.unstableOperations["v2.updateGlobalIncidentSettings"]) { + throw new Error( + "Unstable operation 'updateGlobalIncidentSettings' is disabled" ); - 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: IncidentNotificationTemplate = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationTemplate", - "" - ) as IncidentNotificationTemplate; - return body; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateGlobalIncidentSettings"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } + // Path Params + const localVarPath = "/api/v2/incidents/config/global/settings"; - /** - * 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 getIncidentPostmortemTemplate - * @throws ApiException if the response code was not in [200, 299] - */ - public async getIncidentPostmortemTemplate( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateGlobalIncidentSettings") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + 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, "GlobalIncidentSettingsRequest", ""), + contentType ); - if (response.httpStatusCode === 200) { - const body: PostmortemTemplateResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "PostmortemTemplateResponse" - ) as PostmortemTemplateResponse; - return body; - } - if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body - ); - } - if (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); - } + requestContext.setBody(serializedBody); - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: PostmortemTemplateResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "PostmortemTemplateResponse", - "" - ) as PostmortemTemplateResponse; - return body; - } + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); + return requestContext; } - /** - * 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 getIncidentTodo - * @throws ApiException if the response code was not in [200, 299] - */ - public async getIncidentTodo( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentTodoResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTodoResponse" - ) as IncidentTodoResponse; - return body; + public async updateIncident( + incidentId: string, + body: IncidentUpdateRequest, + include?: Array, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncident'"); + if (!_config.unstableOperations["v2.updateIncident"]) { + throw new Error("Unstable operation 'updateIncident' is disabled"); } - 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); + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "updateIncident"); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentTodoResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTodoResponse", - "" - ) as IncidentTodoResponse; - return body; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncident"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Path Params + const localVarPath = "/api/v2/incidents/{incident_id}".replace( + "{incident_id}", + encodeURIComponent(String(incidentId)) ); - } - /** - * 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 getIncidentType - * @throws ApiException if the response code was not in [200, 299] - */ - public async getIncidentType( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentTypeResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTypeResponse" - ) as IncidentTypeResponse; - 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); - } + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncident") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentTypeResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTypeResponse", - "" - ) as IncidentTypeResponse; - return body; + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "Array", ""), + "csv" + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "IncidentUpdateRequest", ""), + contentType ); - } + requestContext.setBody(serializedBody); - /** - * 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 getIncidentUserDefinedField - * @throws ApiException if the response code was not in [200, 299] - */ - public async getIncidentUserDefinedField( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentUserDefinedFieldResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentUserDefinedFieldResponse" - ) as IncidentUserDefinedFieldResponse; - return body; - } - if ( - response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateIncidentAttachment( + incidentId: string, + attachmentId: string, + body: PatchAttachmentRequest, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentAttachment'"); + if (!_config.unstableOperations["v2.updateIncidentAttachment"]) { + throw new Error( + "Unstable operation 'updateIncidentAttachment' is disabled" ); - 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); } - if (response.httpStatusCode === 404) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body - ); + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "updateIncidentAttachment"); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentUserDefinedFieldResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentUserDefinedFieldResponse", - "" - ) as IncidentUserDefinedFieldResponse; - return body; + // verify required parameter 'attachmentId' is not null or undefined + if (attachmentId === null || attachmentId === undefined) { + throw new RequiredError("attachmentId", "updateIncidentAttachment"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentAttachment"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/attachments/{attachment_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace("{attachment_id}", encodeURIComponent(String(attachmentId))); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentAttachment") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "PatchAttachmentRequest", ""), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 importIncident - * @throws ApiException if the response code was not in [200, 299] - */ - public async importIncident( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 201) { - const body: IncidentImportResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentImportResponse" - ) as IncidentImportResponse; - 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 + public async updateIncidentCommunication( + incidentId: string, + communicationId: string, + body: IncidentCommunicationRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentCommunication'"); + if (!_config.unstableOperations["v2.updateIncidentCommunication"]) { + throw new Error( + "Unstable operation 'updateIncidentCommunication' is disabled" ); - 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: IncidentImportResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentImportResponse", - "" - ) as IncidentImportResponse; - return body; + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "updateIncidentCommunication"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // verify required parameter 'communicationId' is not null or undefined + if (communicationId === null || communicationId === undefined) { + throw new RequiredError("communicationId", "updateIncidentCommunication"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentCommunication"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/communications/{communication_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace( + "{communication_id}", + encodeURIComponent(String(communicationId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentCommunication") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + 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, "IncidentCommunicationRequest", ""), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 listGlobalIncidentHandles - * @throws ApiException if the response code was not in [200, 299] - */ - public async listGlobalIncidentHandles( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentHandlesResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentHandlesResponse" - ) as IncidentHandlesResponse; - return body; - } - if (response.httpStatusCode === 400) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body + public async updateIncidentIntegration( + incidentId: string, + integrationMetadataId: string, + body: IncidentIntegrationMetadataPatchRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentIntegration'"); + if (!_config.unstableOperations["v2.updateIncidentIntegration"]) { + throw new Error( + "Unstable operation 'updateIncidentIntegration' is disabled" ); } - if (response.httpStatusCode === 429) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "updateIncidentIntegration"); + } + + // verify required parameter 'integrationMetadataId' is not null or undefined + if (integrationMetadataId === null || integrationMetadataId === undefined) { + throw new RequiredError( + "integrationMetadataId", + "updateIncidentIntegration" ); - 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: IncidentHandlesResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentHandlesResponse", - "" - ) as IncidentHandlesResponse; - return body; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentIntegration"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/relationships/integrations/{integration_metadata_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace( + "{integration_metadata_id}", + encodeURIComponent(String(integrationMetadataId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentIntegration") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + 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, + "IncidentIntegrationMetadataPatchRequest", + "" + ), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 listIncidentAttachments - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidentAttachments( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: AttachmentArray = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "AttachmentArray" - ) as AttachmentArray; - return body; - } - if (response.httpStatusCode === 400 || response.httpStatusCode === 429) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + public async updateIncidentJiraTemplate( + templateId: string, + body: IncidentJiraTemplateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentJiraTemplate'"); + if (!_config.unstableOperations["v2.updateIncidentJiraTemplate"]) { + throw new Error( + "Unstable operation 'updateIncidentJiraTemplate' is disabled" ); - 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: AttachmentArray = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "AttachmentArray", - "" - ) as AttachmentArray; - return body; + // verify required parameter 'templateId' is not null or undefined + if (templateId === null || templateId === undefined) { + throw new RequiredError("templateId", "updateIncidentJiraTemplate"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentJiraTemplate"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/config/jira-templates/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentJiraTemplate") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "IncidentJiraTemplateRequest", ""), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 listIncidentImpacts - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidentImpacts( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] + public async updateIncidentMicrosoftTeamsConfiguration( + configurationId: string, + body: IncidentMicrosoftTeamsConfigurationRequest, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'updateIncidentMicrosoftTeamsConfiguration'" ); - if (response.httpStatusCode === 200) { - const body: IncidentImpactsResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentImpactsResponse" - ) as IncidentImpactsResponse; - return body; - } if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 + !_config.unstableOperations[ + "v2.updateIncidentMicrosoftTeamsConfiguration" + ] ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + throw new Error( + "Unstable operation 'updateIncidentMicrosoftTeamsConfiguration' is disabled" ); - 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: IncidentImpactsResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentImpactsResponse", + // verify required parameter 'configurationId' is not null or undefined + if (configurationId === null || configurationId === undefined) { + throw new RequiredError( + "configurationId", + "updateIncidentMicrosoftTeamsConfiguration" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError( + "body", + "updateIncidentMicrosoftTeamsConfiguration" + ); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/config/microsoft-teams-configurations/{configuration_id}".replace( + "{configuration_id}", + encodeURIComponent(String(configurationId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentMicrosoftTeamsConfiguration") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), "" - ) as IncidentImpactsResponse; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "IncidentMicrosoftTeamsConfigurationRequest", + "" + ), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 listIncidentIntegrations - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidentIntegrations( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentIntegrationMetadataListResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentIntegrationMetadataListResponse" - ) as IncidentIntegrationMetadataListResponse; - 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 + public async updateIncidentNotificationRule( + id: string, + body: PutIncidentNotificationRuleRequest, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentNotificationRule'"); + if (!_config.unstableOperations["v2.updateIncidentNotificationRule"]) { + throw new Error( + "Unstable operation 'updateIncidentNotificationRule' is disabled" ); - 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: IncidentIntegrationMetadataListResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentIntegrationMetadataListResponse", - "" - ) as IncidentIntegrationMetadataListResponse; - return body; + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "updateIncidentNotificationRule"); } - 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 listIncidentNotificationRules - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidentNotificationRules( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentNotificationRuleArray = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationRuleArray" - ) as IncidentNotificationRuleArray; - return body; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentNotificationRule"); } - 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 + + // Path Params + const localVarPath = + "/api/v2/incidents/config/notification-rules/{id}".replace( + "{id}", + encodeURIComponent(String(id)) ); - 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: IncidentNotificationRuleArray = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationRuleArray", + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentNotificationRule") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), "" - ) as IncidentNotificationRuleArray; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "PutIncidentNotificationRuleRequest", + "" + ), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 listIncidentNotificationTemplates - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidentNotificationTemplates( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentNotificationTemplateArray = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationTemplateArray" - ) as IncidentNotificationTemplateArray; - 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 + public async updateIncidentNotificationTemplate( + id: string, + body: PatchIncidentNotificationTemplateRequest, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'updateIncidentNotificationTemplate'" + ); + if (!_config.unstableOperations["v2.updateIncidentNotificationTemplate"]) { + throw new Error( + "Unstable operation 'updateIncidentNotificationTemplate' is disabled" ); - 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: IncidentNotificationTemplateArray = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationTemplateArray", - "" - ) as IncidentNotificationTemplateArray; - return body; + // verify required parameter 'id' is not null or undefined + if (id === null || id === undefined) { + throw new RequiredError("id", "updateIncidentNotificationTemplate"); } - 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 listIncidentPostmortemTemplates - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidentPostmortemTemplates( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: PostmortemTemplatesResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "PostmortemTemplatesResponse" - ) as PostmortemTemplatesResponse; - return body; - } - if (response.httpStatusCode === 400) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body - ); + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentNotificationTemplate"); } - if (response.httpStatusCode === 429) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + + // Path Params + const localVarPath = + "/api/v2/incidents/config/notification-templates/{id}".replace( + "{id}", + encodeURIComponent(String(id)) ); - 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: PostmortemTemplatesResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "PostmortemTemplatesResponse", + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentNotificationTemplate") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), "" - ) as PostmortemTemplatesResponse; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "PatchIncidentNotificationTemplateRequest", + "" + ), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 listIncidents - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidents( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentsResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentsResponse" - ) as IncidentsResponse; - 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 + public async updateIncidentPostmortemTemplate( + templateId: string, + body: PostmortemTemplateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentPostmortemTemplate'"); + if (!_config.unstableOperations["v2.updateIncidentPostmortemTemplate"]) { + throw new Error( + "Unstable operation 'updateIncidentPostmortemTemplate' is disabled" ); - 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: IncidentsResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentsResponse", - "" - ) as IncidentsResponse; - return body; + // verify required parameter 'templateId' is not null or undefined + if (templateId === null || templateId === undefined) { + throw new RequiredError("templateId", "updateIncidentPostmortemTemplate"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentPostmortemTemplate"); + } - /** - * 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 listIncidentTodos - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidentTodos( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentTodoListResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTodoListResponse" - ) as IncidentTodoListResponse; - 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 + // Path Params + const localVarPath = + "/api/v2/incidents/config/postmortem-templates/{template_id}".replace( + "{template_id}", + encodeURIComponent(String(templateId)) ); - 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: IncidentTodoListResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTodoListResponse", - "" - ) as IncidentTodoListResponse; - return body; - } + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentPostmortemTemplate") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "PostmortemTemplateRequest", ""), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + ]); + + return requestContext; } - /** - * 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 listIncidentTypes - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidentTypes( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentTypeListResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTypeListResponse" - ) as IncidentTypeListResponse; - return body; - } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + public async updateIncidentStatuspageIncident( + incidentId: string, + pageId: string, + statuspageIncidentId: string, + body: IncidentStatuspageIncidentRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentStatuspageIncident'"); + if (!_config.unstableOperations["v2.updateIncidentStatuspageIncident"]) { + throw new Error( + "Unstable operation 'updateIncidentStatuspageIncident' is disabled" ); - 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: IncidentTypeListResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTypeListResponse", - "" - ) as IncidentTypeListResponse; - return body; + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "updateIncidentStatuspageIncident"); } - 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 listIncidentUserDefinedFields - * @throws ApiException if the response code was not in [200, 299] - */ - public async listIncidentUserDefinedFields( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentUserDefinedFieldListResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentUserDefinedFieldListResponse" - ) as IncidentUserDefinedFieldListResponse; - return body; - } - if (response.httpStatusCode === 400) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body - ); + // verify required parameter 'pageId' is not null or undefined + if (pageId === null || pageId === undefined) { + throw new RequiredError("pageId", "updateIncidentStatuspageIncident"); } - if ( - response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType + + // verify required parameter 'statuspageIncidentId' is not null or undefined + if (statuspageIncidentId === null || statuspageIncidentId === undefined) { + throw new RequiredError( + "statuspageIncidentId", + "updateIncidentStatuspageIncident" ); - 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: IncidentUserDefinedFieldListResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentUserDefinedFieldListResponse", - "" - ) as IncidentUserDefinedFieldListResponse; - return body; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentStatuspageIncident"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Path Params + const localVarPath = + "/api/v2/incidents/statuspage/{incident_id}/statuspage-incidents/pages/{page_id}/incidents/{statuspage_incident_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace("{page_id}", encodeURIComponent(String(pageId))) + .replace( + "{statuspage_incident_id}", + encodeURIComponent(String(statuspageIncidentId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentStatuspageIncident") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + 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, "IncidentStatuspageIncidentRequest", ""), + contentType ); - } + requestContext.setBody(serializedBody); - /** - * 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 searchIncidents - * @throws ApiException if the response code was not in [200, 299] - */ - public async searchIncidents( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentSearchResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentSearchResponse" - ) as IncidentSearchResponse; - 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 + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateIncidentStatusPageNotice( + incidentId: string, + statuspageId: string, + noticeId: string, + body: IncidentStatusPageNoticeUpdateRequest, + notifySubscribers?: boolean, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentStatusPageNotice'"); + if (!_config.unstableOperations["v2.updateIncidentStatusPageNotice"]) { + throw new Error( + "Unstable operation 'updateIncidentStatusPageNotice' is disabled" ); - 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: IncidentSearchResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentSearchResponse", - "" - ) as IncidentSearchResponse; - return body; + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "updateIncidentStatusPageNotice"); } - 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 updateGlobalIncidentHandle - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateGlobalIncidentHandle( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentHandleResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentHandleResponse" - ) as IncidentHandleResponse; - return body; + // verify required parameter 'statuspageId' is not null or undefined + if (statuspageId === null || statuspageId === undefined) { + throw new RequiredError("statuspageId", "updateIncidentStatusPageNotice"); } - if (response.httpStatusCode === 400) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body - ); + + // verify required parameter 'noticeId' is not null or undefined + if (noticeId === null || noticeId === undefined) { + throw new RequiredError("noticeId", "updateIncidentStatusPageNotice"); } - if (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); + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentStatusPageNotice"); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentHandleResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentHandleResponse", + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/statuspages/{statuspage_id}/notices/{notice_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace("{statuspage_id}", encodeURIComponent(String(statuspageId))) + .replace("{notice_id}", encodeURIComponent(String(noticeId))); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentStatusPageNotice") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (notifySubscribers !== undefined) { + requestContext.setQueryParam( + "notify_subscribers", + ObjectSerializer.serialize(notifySubscribers, "boolean", ""), "" - ) as IncidentHandleResponse; - return body; + ); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "IncidentStatusPageNoticeUpdateRequest", + "" + ), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 updateGlobalIncidentSettings - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateGlobalIncidentSettings( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: GlobalIncidentSettingsResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "GlobalIncidentSettingsResponse" - ) as GlobalIncidentSettingsResponse; - return body; - } - if (response.httpStatusCode === 400) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body + public async updateIncidentTimelineEntry( + incidentId: string, + timelineEntryId: string, + body: IncidentTimelineEntryRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentTimelineEntry'"); + if (!_config.unstableOperations["v2.updateIncidentTimelineEntry"]) { + throw new Error( + "Unstable operation 'updateIncidentTimelineEntry' is disabled" ); } - if (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); + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "updateIncidentTimelineEntry"); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: GlobalIncidentSettingsResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "GlobalIncidentSettingsResponse", - "" - ) as GlobalIncidentSettingsResponse; - return body; + // verify required parameter 'timelineEntryId' is not null or undefined + if (timelineEntryId === null || timelineEntryId === undefined) { + throw new RequiredError("timelineEntryId", "updateIncidentTimelineEntry"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentTimelineEntry"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/timeline/{timeline_entry_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace( + "{timeline_entry_id}", + encodeURIComponent(String(timelineEntryId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentTimelineEntry") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + 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, "IncidentTimelineEntryRequest", ""), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 updateIncident - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateIncident( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: IncidentResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentResponse" - ) as IncidentResponse; - return body; + public async updateIncidentTodo( + incidentId: string, + todoId: string, + body: IncidentTodoPatchRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentTodo'"); + if (!_config.unstableOperations["v2.updateIncidentTodo"]) { + throw new Error("Unstable operation 'updateIncidentTodo' is disabled"); } - 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); + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "updateIncidentTodo"); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentResponse = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentResponse", - "" - ) as IncidentResponse; - return body; + // verify required parameter 'todoId' is not null or undefined + if (todoId === null || todoId === undefined) { + throw new RequiredError("todoId", "updateIncidentTodo"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentTodo"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/{incident_id}/relationships/todos/{todo_id}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace("{todo_id}", encodeURIComponent(String(todoId))); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentTodo") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + 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, "IncidentTodoPatchRequest", ""), + contentType ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; } - /** - * 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 updateIncidentAttachment - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateIncidentAttachment( - response: ResponseContext - ): Promise { - const contentType = ObjectSerializer.normalizeMediaType( - response.headers["content-type"] - ); - if (response.httpStatusCode === 200) { - const body: Attachment = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Attachment" - ) as Attachment; - return body; + public async updateIncidentType( + incidentTypeId: string, + body: IncidentTypePatchRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentType'"); + if (!_config.unstableOperations["v2.updateIncidentType"]) { + throw new Error("Unstable operation 'updateIncidentType' is disabled"); } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 - ) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: APIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException(response.httpStatusCode, body); + + // verify required parameter 'incidentTypeId' is not null or undefined + if (incidentTypeId === null || incidentTypeId === undefined) { + throw new RequiredError("incidentTypeId", "updateIncidentType"); } - // Work around for missing responses in specification, e.g. for petstore.yaml - if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: Attachment = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "Attachment", - "" - ) as Attachment; - return body; + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentType"); } - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' + // Path Params + const localVarPath = + "/api/v2/incidents/config/types/{incident_type_id}".replace( + "{incident_type_id}", + encodeURIComponent(String(incidentTypeId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentType") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + 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, "IncidentTypePatchRequest", ""), + contentType ); - } + requestContext.setBody(serializedBody); - /** - * 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 updateIncidentIntegration - * @throws ApiException if the response code was not in [200, 299] - */ - public async updateIncidentIntegration( + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateIncidentUserDefinedField( + fieldId: string, + body: IncidentUserDefinedFieldUpdateRequest, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentUserDefinedField'"); + if (!_config.unstableOperations["v2.updateIncidentUserDefinedField"]) { + throw new Error( + "Unstable operation 'updateIncidentUserDefinedField' is disabled" + ); + } + + // verify required parameter 'fieldId' is not null or undefined + if (fieldId === null || fieldId === undefined) { + throw new RequiredError("fieldId", "updateIncidentUserDefinedField"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentUserDefinedField"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/config/user-defined-fields/{field_id}".replace( + "{field_id}", + encodeURIComponent(String(fieldId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentUserDefinedField") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize( + body, + "IncidentUserDefinedFieldUpdateRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async updateIncidentZoomConfiguration( + configurationId: string, + body: IncidentZoomConfigurationRequest, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'updateIncidentZoomConfiguration'"); + if (!_config.unstableOperations["v2.updateIncidentZoomConfiguration"]) { + throw new Error( + "Unstable operation 'updateIncidentZoomConfiguration' is disabled" + ); + } + + // verify required parameter 'configurationId' is not null or undefined + if (configurationId === null || configurationId === undefined) { + throw new RequiredError( + "configurationId", + "updateIncidentZoomConfiguration" + ); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "updateIncidentZoomConfiguration"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/config/zoom-configurations/{configuration_id}".replace( + "{configuration_id}", + encodeURIComponent(String(configurationId)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.updateIncidentZoomConfiguration") + .makeRequestContext(localVarPath, HttpMethod.PATCH); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "IncidentZoomConfigurationRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + + public async upsertIncidentAutomationData( + incidentId: string, + key: string, + body: IncidentAutomationDataRequest, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'upsertIncidentAutomationData'"); + if (!_config.unstableOperations["v2.upsertIncidentAutomationData"]) { + throw new Error( + "Unstable operation 'upsertIncidentAutomationData' is disabled" + ); + } + + // verify required parameter 'incidentId' is not null or undefined + if (incidentId === null || incidentId === undefined) { + throw new RequiredError("incidentId", "upsertIncidentAutomationData"); + } + + // verify required parameter 'key' is not null or undefined + if (key === null || key === undefined) { + throw new RequiredError("key", "upsertIncidentAutomationData"); + } + + // verify required parameter 'body' is not null or undefined + if (body === null || body === undefined) { + throw new RequiredError("body", "upsertIncidentAutomationData"); + } + + // Path Params + const localVarPath = "/api/v2/incidents/{incident_id}/automation-data/{key}" + .replace("{incident_id}", encodeURIComponent(String(incidentId))) + .replace("{key}", encodeURIComponent(String(key))); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.upsertIncidentAutomationData") + .makeRequestContext(localVarPath, HttpMethod.PUT); + requestContext.setHeaderParam("Accept", "application/json"); + requestContext.setHttpConfig(_config.httpConfig); + + // Query Params + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } + + // Body Params + const contentType = ObjectSerializer.getPreferredMediaType([ + "application/json", + ]); + requestContext.setHeaderParam("Content-Type", contentType); + const serializedBody = ObjectSerializer.stringify( + ObjectSerializer.serialize(body, "IncidentAutomationDataRequest", ""), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } +} + +export class IncidentsApiResponseProcessor { + /** + * 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 batchCreateIncidentRuleExecutionStates + * @throws ApiException if the response code was not in [200, 299] + */ + public async batchCreateIncidentRuleExecutionStates( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); - if (response.httpStatusCode === 200) { - const body: IncidentIntegrationMetadataResponse = + if (response.httpStatusCode === 201) { + const body: IncidentRuleExecutionStatesResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentIntegrationMetadataResponse" - ) as IncidentIntegrationMetadataResponse; + "IncidentRuleExecutionStatesResponse" + ) as IncidentRuleExecutionStatesResponse; return body; } if ( response.httpStatusCode === 400 || response.httpStatusCode === 401 || response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 + response.httpStatusCode === 404 ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -6390,12 +5971,12 @@ export class IncidentsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentIntegrationMetadataResponse = + const body: IncidentRuleExecutionStatesResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentIntegrationMetadataResponse", + "IncidentRuleExecutionStatesResponse", "" - ) as IncidentIntegrationMetadataResponse; + ) as IncidentRuleExecutionStatesResponse; return body; } @@ -6410,40 +5991,63 @@ export class IncidentsApiResponseProcessor { * 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 updateIncidentNotificationRule + * @params response Response returned by the server for a request to batchUpdateIncidentRuleExecutionStates * @throws ApiException if the response code was not in [200, 299] */ - public async updateIncidentNotificationRule( + public async batchUpdateIncidentRuleExecutionStates( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); if (response.httpStatusCode === 200) { - const body: IncidentNotificationRule = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationRule" - ) as IncidentNotificationRule; + const body: IncidentRuleExecutionStatesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRuleExecutionStatesResponse" + ) as IncidentRuleExecutionStatesResponse; return body; } if ( response.httpStatusCode === 400 || response.httpStatusCode === 401 || response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 + response.httpStatusCode === 404 ) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType ); - let body: APIErrorResponse; + let body: JSONAPIErrorResponse; try { body = ObjectSerializer.deserialize( bodyText, - "APIErrorResponse" - ) as APIErrorResponse; - } catch (error) { + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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, @@ -6455,11 +6059,12 @@ export class IncidentsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentNotificationRule = ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationRule", - "" - ) as IncidentNotificationRule; + const body: IncidentRuleExecutionStatesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRuleExecutionStatesResponse", + "" + ) as IncidentRuleExecutionStatesResponse; return body; } @@ -6474,29 +6079,46 @@ export class IncidentsApiResponseProcessor { * 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 updateIncidentNotificationTemplate + * @params response Response returned by the server for a request to createGlobalIncidentHandle * @throws ApiException if the response code was not in [200, 299] */ - public async updateIncidentNotificationTemplate( + public async createGlobalIncidentHandle( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); - if (response.httpStatusCode === 200) { - const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( + if (response.httpStatusCode === 201) { + const body: IncidentHandleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationTemplate" - ) as IncidentNotificationTemplate; + "IncidentHandleResponse" + ) as IncidentHandleResponse; return body; } - if ( - response.httpStatusCode === 400 || - response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 - ) { + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -6519,11 +6141,11 @@ export class IncidentsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( + const body: IncidentHandleResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentNotificationTemplate", + "IncidentHandleResponse", "" - ) as IncidentNotificationTemplate; + ) as IncidentHandleResponse; return body; } @@ -6538,46 +6160,29 @@ export class IncidentsApiResponseProcessor { * 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 updateIncidentPostmortemTemplate + * @params response Response returned by the server for a request to createIncident * @throws ApiException if the response code was not in [200, 299] */ - public async updateIncidentPostmortemTemplate( + public async createIncident( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); - if (response.httpStatusCode === 200) { - const body: PostmortemTemplateResponse = ObjectSerializer.deserialize( + if (response.httpStatusCode === 201) { + const body: IncidentResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "PostmortemTemplateResponse" - ) as PostmortemTemplateResponse; + "IncidentResponse" + ) as IncidentResponse; return body; } - if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { - const bodyText = ObjectSerializer.parse( - await response.body.text(), - contentType - ); - let body: JSONAPIErrorResponse; - try { - body = ObjectSerializer.deserialize( - bodyText, - "JSONAPIErrorResponse" - ) as JSONAPIErrorResponse; - } catch (error) { - logger.debug(`Got error deserializing error: ${error}`); - throw new ApiException( - response.httpStatusCode, - bodyText - ); - } - throw new ApiException( - response.httpStatusCode, - body - ); - } - if (response.httpStatusCode === 429) { + 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 @@ -6600,11 +6205,11 @@ export class IncidentsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: PostmortemTemplateResponse = ObjectSerializer.deserialize( + const body: IncidentResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "PostmortemTemplateResponse", + "IncidentResponse", "" - ) as PostmortemTemplateResponse; + ) as IncidentResponse; return body; } @@ -6619,27 +6224,25 @@ export class IncidentsApiResponseProcessor { * 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 updateIncidentTodo + * @params response Response returned by the server for a request to createIncidentAttachment * @throws ApiException if the response code was not in [200, 299] */ - public async updateIncidentTodo( + public async createIncidentAttachment( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); - if (response.httpStatusCode === 200) { - const body: IncidentTodoResponse = ObjectSerializer.deserialize( + if (response.httpStatusCode === 201) { + const body: Attachment = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTodoResponse" - ) as IncidentTodoResponse; + "Attachment" + ) as Attachment; return body; } if ( response.httpStatusCode === 400 || - response.httpStatusCode === 401 || response.httpStatusCode === 403 || - response.httpStatusCode === 404 || response.httpStatusCode === 429 ) { const bodyText = ObjectSerializer.parse( @@ -6664,11 +6267,11 @@ export class IncidentsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentTodoResponse = ObjectSerializer.deserialize( + const body: Attachment = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTodoResponse", + "Attachment", "" - ) as IncidentTodoResponse; + ) as Attachment; return body; } @@ -6683,29 +6286,51 @@ export class IncidentsApiResponseProcessor { * 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 updateIncidentType + * @params response Response returned by the server for a request to createIncidentCommunication * @throws ApiException if the response code was not in [200, 299] */ - public async updateIncidentType( + public async createIncidentCommunication( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); - if (response.httpStatusCode === 200) { - const body: IncidentTypeResponse = ObjectSerializer.deserialize( + if (response.httpStatusCode === 201) { + const body: IncidentCommunicationResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTypeResponse" - ) as IncidentTypeResponse; + "IncidentCommunicationResponse" + ) as IncidentCommunicationResponse; return body; } if ( response.httpStatusCode === 400 || response.httpStatusCode === 401 || response.httpStatusCode === 403 || - response.httpStatusCode === 404 || - response.httpStatusCode === 429 + response.httpStatusCode === 404 ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -6728,11 +6353,11 @@ export class IncidentsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentTypeResponse = ObjectSerializer.deserialize( + const body: IncidentCommunicationResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentTypeResponse", + "IncidentCommunicationResponse", "" - ) as IncidentTypeResponse; + ) as IncidentCommunicationResponse; return body; } @@ -6747,24 +6372,29 @@ export class IncidentsApiResponseProcessor { * 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 updateIncidentUserDefinedField + * @params response Response returned by the server for a request to createIncidentGoogleMeetSpace * @throws ApiException if the response code was not in [200, 299] */ - public async updateIncidentUserDefinedField( + public async createIncidentGoogleMeetSpace( response: ResponseContext - ): Promise { + ): Promise { const contentType = ObjectSerializer.normalizeMediaType( response.headers["content-type"] ); - if (response.httpStatusCode === 200) { - const body: IncidentUserDefinedFieldResponse = + if (response.httpStatusCode === 201) { + const body: IncidentGoogleMeetIntegrationResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentUserDefinedFieldResponse" - ) as IncidentUserDefinedFieldResponse; + "IncidentGoogleMeetIntegrationResponse" + ) as IncidentGoogleMeetIntegrationResponse; return body; } - if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -6787,11 +6417,7 @@ export class IncidentsApiResponseProcessor { body ); } - if ( - response.httpStatusCode === 401 || - response.httpStatusCode === 403 || - response.httpStatusCode === 429 - ) { + if (response.httpStatusCode === 429) { const bodyText = ObjectSerializer.parse( await response.body.text(), contentType @@ -6814,53 +6440,8201 @@ export class IncidentsApiResponseProcessor { // Work around for missing responses in specification, e.g. for petstore.yaml if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { - const body: IncidentUserDefinedFieldResponse = + const body: IncidentGoogleMeetIntegrationResponse = ObjectSerializer.deserialize( ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentUserDefinedFieldResponse", + "IncidentGoogleMeetIntegrationResponse", "" - ) as IncidentUserDefinedFieldResponse; + ) as IncidentGoogleMeetIntegrationResponse; + 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 createIncidentImpact + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentImpact( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentImpactResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentImpactResponse" + ) as IncidentImpactResponse; 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: IncidentImpactResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentImpactResponse", + "" + ) as IncidentImpactResponse; + 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 createIncidentIntegration + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentIntegration( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentIntegrationMetadataResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentIntegrationMetadataResponse" + ) as IncidentIntegrationMetadataResponse; + 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: IncidentIntegrationMetadataResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentIntegrationMetadataResponse", + "" + ) as IncidentIntegrationMetadataResponse; + 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 createIncidentJiraIssue + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentJiraIssue( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentJiraIssueIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraIssueIntegrationResponse" + ) as IncidentJiraIssueIntegrationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentJiraIssueIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraIssueIntegrationResponse", + "" + ) as IncidentJiraIssueIntegrationResponse; + 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 createIncidentJiraTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentJiraTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentJiraTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraTemplateResponse" + ) as IncidentJiraTemplateResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentJiraTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraTemplateResponse", + "" + ) as IncidentJiraTemplateResponse; + 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 createIncidentMicrosoftTeamsConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentMicrosoftTeamsConfiguration( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentMicrosoftTeamsConfigurationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentMicrosoftTeamsConfigurationResponse" + ) as IncidentMicrosoftTeamsConfigurationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentMicrosoftTeamsConfigurationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentMicrosoftTeamsConfigurationResponse", + "" + ) as IncidentMicrosoftTeamsConfigurationResponse; + 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 createIncidentMSTeamsOnlineMeeting + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentMSTeamsOnlineMeeting( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentMSTeamsIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentMSTeamsIntegrationResponse" + ) as IncidentMSTeamsIntegrationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentMSTeamsIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentMSTeamsIntegrationResponse", + "" + ) as IncidentMSTeamsIntegrationResponse; + 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 createIncidentNotificationRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentNotificationRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentNotificationRule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRule" + ) as IncidentNotificationRule; + 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: IncidentNotificationRule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRule", + "" + ) as IncidentNotificationRule; + 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 createIncidentNotificationTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentNotificationTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplate" + ) as IncidentNotificationTemplate; + 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: IncidentNotificationTemplate = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplate", + "" + ) as IncidentNotificationTemplate; + 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 createIncidentPostmortemAttachment + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentPostmortemAttachment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: Attachment = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Attachment" + ) as Attachment; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: Attachment = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Attachment", + "" + ) as Attachment; + 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 createIncidentPostmortemTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentPostmortemTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: PostmortemTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PostmortemTemplateResponse" + ) as PostmortemTemplateResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 403) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: PostmortemTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PostmortemTemplateResponse", + "" + ) as PostmortemTemplateResponse; + 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 createIncidentRoleAssignment + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentRoleAssignment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentRoleAssignmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRoleAssignmentResponse" + ) as IncidentRoleAssignmentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 409 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentRoleAssignmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRoleAssignmentResponse", + "" + ) as IncidentRoleAssignmentResponse; + 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 createIncidentStatuspageIncident + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentStatuspageIncident( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentStatuspageIncidentResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspageIncidentResponse" + ) as IncidentStatuspageIncidentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentStatuspageIncidentResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspageIncidentResponse", + "" + ) as IncidentStatuspageIncidentResponse; + 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 createIncidentStatusPageNotice + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentStatusPageNotice( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentStatusPageNoticeIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatusPageNoticeIntegrationResponse" + ) as IncidentStatusPageNoticeIntegrationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentStatusPageNoticeIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatusPageNoticeIntegrationResponse", + "" + ) as IncidentStatusPageNoticeIntegrationResponse; + 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 createIncidentTimelineEntry + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentTimelineEntry( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentTimelineEntryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTimelineEntryResponse" + ) as IncidentTimelineEntryResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentTimelineEntryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTimelineEntryResponse", + "" + ) as IncidentTimelineEntryResponse; + 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 createIncidentTodo + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentTodo( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentTodoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTodoResponse" + ) as IncidentTodoResponse; + 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: IncidentTodoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTodoResponse", + "" + ) as IncidentTodoResponse; + 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 createIncidentType + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentType( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentTypeResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTypeResponse" + ) as IncidentTypeResponse; + 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: IncidentTypeResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTypeResponse", + "" + ) as IncidentTypeResponse; + 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 createIncidentUserDefinedField + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentUserDefinedField( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentUserDefinedFieldResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentUserDefinedFieldResponse" + ) as IncidentUserDefinedFieldResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: IncidentUserDefinedFieldResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentUserDefinedFieldResponse", + "" + ) as IncidentUserDefinedFieldResponse; + 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 createIncidentZoomConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentZoomConfiguration( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentZoomConfigurationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentZoomConfigurationResponse" + ) as IncidentZoomConfigurationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentZoomConfigurationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentZoomConfigurationResponse", + "" + ) as IncidentZoomConfigurationResponse; + 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 createIncidentZoomMeeting + * @throws ApiException if the response code was not in [200, 299] + */ + public async createIncidentZoomMeeting( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentZoomIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentZoomIntegrationResponse" + ) as IncidentZoomIntegrationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentZoomIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentZoomIntegrationResponse", + "" + ) as IncidentZoomIntegrationResponse; + 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 createStatuspageEmailSubscription + * @throws ApiException if the response code was not in [200, 299] + */ + public async createStatuspageEmailSubscription( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentStatuspageSubscriptionResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspageSubscriptionResponse" + ) as IncidentStatuspageSubscriptionResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentStatuspageSubscriptionResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspageSubscriptionResponse", + "" + ) as IncidentStatuspageSubscriptionResponse; + 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 deleteGlobalIncidentHandle + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteGlobalIncidentHandle( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncident + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncident(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + 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) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentAttachment + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentAttachment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentCommunication + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentCommunication( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentImpact + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentImpact(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + 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) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentIntegration + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentIntegration( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + 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) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentJiraTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentJiraTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentNotificationRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentNotificationRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + 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) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentNotificationTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentNotificationTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + 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) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentPostmortemTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentPostmortemTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentRoleAssignment + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentRoleAssignment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentTimelineEntry + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentTimelineEntry( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (response.httpStatusCode === 429) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentTodo + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentTodo(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + 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) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentType + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentType(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + 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) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to deleteIncidentUserDefinedField + * @throws ApiException if the response code was not in [200, 299] + */ + public async deleteIncidentUserDefinedField( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 204) { + return; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + return; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } + + /** + * Unwraps the actual response sent by the server from the response context and deserializes the response content + * to the expected objects + * + * @params response Response returned by the server for a request to exportIncidents + * @throws ApiException if the response code was not in [200, 299] + */ + public async exportIncidents(response: ResponseContext): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: HttpFile = (await response.getBodyAsFile()) as HttpFile; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: HttpFile = + (await response.getBodyAsFile()) as any as HttpFile; + 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 getGlobalIncidentSettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async getGlobalIncidentSettings( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: GlobalIncidentSettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GlobalIncidentSettingsResponse" + ) as GlobalIncidentSettingsResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: GlobalIncidentSettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GlobalIncidentSettingsResponse", + "" + ) as GlobalIncidentSettingsResponse; + 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 getIncident + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncident( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentResponse" + ) as IncidentResponse; + 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: IncidentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentResponse", + "" + ) as IncidentResponse; + 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 getIncidentAutomationData + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentAutomationData( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentAutomationDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentAutomationDataResponse" + ) as IncidentAutomationDataResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentAutomationDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentAutomationDataResponse", + "" + ) as IncidentAutomationDataResponse; + 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 getIncidentCaseSourceLink + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentCaseSourceLink( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentCaseLinkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCaseLinkResponse" + ) as IncidentCaseLinkResponse; + return body; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentCaseLinkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCaseLinkResponse", + "" + ) as IncidentCaseLinkResponse; + 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 getIncidentCommunication + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentCommunication( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentCommunicationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCommunicationResponse" + ) as IncidentCommunicationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentCommunicationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCommunicationResponse", + "" + ) as IncidentCommunicationResponse; + 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 getIncidentIntegration + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentIntegration( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentIntegrationMetadataResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentIntegrationMetadataResponse" + ) as IncidentIntegrationMetadataResponse; + 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: IncidentIntegrationMetadataResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentIntegrationMetadataResponse", + "" + ) as IncidentIntegrationMetadataResponse; + 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 getIncidentJiraTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentJiraTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentJiraTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraTemplateResponse" + ) as IncidentJiraTemplateResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentJiraTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraTemplateResponse", + "" + ) as IncidentJiraTemplateResponse; + 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 getIncidentNotificationRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentNotificationRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentNotificationRule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRule" + ) as IncidentNotificationRule; + 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: IncidentNotificationRule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRule", + "" + ) as IncidentNotificationRule; + 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 getIncidentNotificationTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentNotificationTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplate" + ) as IncidentNotificationTemplate; + 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: IncidentNotificationTemplate = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplate", + "" + ) as IncidentNotificationTemplate; + 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 getIncidentPagerdutyRelatedIncidents + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentPagerdutyRelatedIncidents( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentPagerdutyRelatedIncidentsResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentPagerdutyRelatedIncidentsResponse" + ) as IncidentPagerdutyRelatedIncidentsResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentPagerdutyRelatedIncidentsResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentPagerdutyRelatedIncidentsResponse", + "" + ) as IncidentPagerdutyRelatedIncidentsResponse; + 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 getIncidentPageSourceLink + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentPageSourceLink( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentCaseLinkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCaseLinkResponse" + ) as IncidentCaseLinkResponse; + return body; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentCaseLinkResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCaseLinkResponse", + "" + ) as IncidentCaseLinkResponse; + 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 getIncidentPostmortemTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentPostmortemTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: PostmortemTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PostmortemTemplateResponse" + ) as PostmortemTemplateResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: PostmortemTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PostmortemTemplateResponse", + "" + ) as PostmortemTemplateResponse; + 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 getIncidentReservedRole + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentReservedRole( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentReservedRoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentReservedRoleResponse" + ) as IncidentReservedRoleResponse; + return body; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentReservedRoleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentReservedRoleResponse", + "" + ) as IncidentReservedRoleResponse; + 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 getIncidentRoleAssignment + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentRoleAssignment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentRoleAssignmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRoleAssignmentResponse" + ) as IncidentRoleAssignmentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentRoleAssignmentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRoleAssignmentResponse", + "" + ) as IncidentRoleAssignmentResponse; + 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 getIncidentStatusPagesSuggestion + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentStatusPagesSuggestion( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentStatusPagesSuggestionResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatusPagesSuggestionResponse" + ) as IncidentStatusPagesSuggestionResponse; + return body; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentStatusPagesSuggestionResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatusPagesSuggestionResponse", + "" + ) as IncidentStatusPagesSuggestionResponse; + 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 getIncidentTimelineEntryThread + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentTimelineEntryThread( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTimelineThreadResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTimelineThreadResponse" + ) as IncidentTimelineThreadResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentTimelineThreadResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTimelineThreadResponse", + "" + ) as IncidentTimelineThreadResponse; + 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 getIncidentTodo + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentTodo( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTodoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTodoResponse" + ) as IncidentTodoResponse; + 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: IncidentTodoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTodoResponse", + "" + ) as IncidentTodoResponse; + 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 getIncidentType + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentType( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTypeResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTypeResponse" + ) as IncidentTypeResponse; + 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: IncidentTypeResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTypeResponse", + "" + ) as IncidentTypeResponse; + 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 getIncidentUserDefinedField + * @throws ApiException if the response code was not in [200, 299] + */ + public async getIncidentUserDefinedField( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentUserDefinedFieldResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentUserDefinedFieldResponse" + ) as IncidentUserDefinedFieldResponse; + return body; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + if (response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } 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: IncidentUserDefinedFieldResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentUserDefinedFieldResponse", + "" + ) as IncidentUserDefinedFieldResponse; + 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 getStatuspageSubscriptionPreferences + * @throws ApiException if the response code was not in [200, 299] + */ + public async getStatuspageSubscriptionPreferences( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentStatuspagePreferencesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspagePreferencesResponse" + ) as IncidentStatuspagePreferencesResponse; + return body; + } + if (response.httpStatusCode === 401 || response.httpStatusCode === 403) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentStatuspagePreferencesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspagePreferencesResponse", + "" + ) as IncidentStatuspagePreferencesResponse; + 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 importIncident + * @throws ApiException if the response code was not in [200, 299] + */ + public async importIncident( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 201) { + const body: IncidentImportResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentImportResponse" + ) as IncidentImportResponse; + 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: IncidentImportResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentImportResponse", + "" + ) as IncidentImportResponse; + 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 listGlobalIncidentHandles + * @throws ApiException if the response code was not in [200, 299] + */ + public async listGlobalIncidentHandles( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentHandlesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentHandlesResponse" + ) as IncidentHandlesResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentHandlesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentHandlesResponse", + "" + ) as IncidentHandlesResponse; + 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 listIncidentAttachments + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentAttachments( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: AttachmentArray = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AttachmentArray" + ) as AttachmentArray; + return body; + } + if (response.httpStatusCode === 400 || 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: AttachmentArray = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "AttachmentArray", + "" + ) as AttachmentArray; + 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 listIncidentCommunications + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentCommunications( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentCommunicationsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCommunicationsResponse" + ) as IncidentCommunicationsResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentCommunicationsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCommunicationsResponse", + "" + ) as IncidentCommunicationsResponse; + 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 listIncidentImpacts + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentImpacts( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentImpactsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentImpactsResponse" + ) as IncidentImpactsResponse; + 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: IncidentImpactsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentImpactsResponse", + "" + ) as IncidentImpactsResponse; + 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 listIncidentIntegrations + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentIntegrations( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentIntegrationMetadataListResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentIntegrationMetadataListResponse" + ) as IncidentIntegrationMetadataListResponse; + 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: IncidentIntegrationMetadataListResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentIntegrationMetadataListResponse", + "" + ) as IncidentIntegrationMetadataListResponse; + 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 listIncidentJiraTemplates + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentJiraTemplates( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentJiraTemplatesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraTemplatesResponse" + ) as IncidentJiraTemplatesResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentJiraTemplatesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraTemplatesResponse", + "" + ) as IncidentJiraTemplatesResponse; + 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 listIncidentNotificationRules + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentNotificationRules( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentNotificationRuleArray = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRuleArray" + ) as IncidentNotificationRuleArray; + 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: IncidentNotificationRuleArray = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRuleArray", + "" + ) as IncidentNotificationRuleArray; + 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 listIncidentNotificationTemplates + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentNotificationTemplates( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentNotificationTemplateArray = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplateArray" + ) as IncidentNotificationTemplateArray; + 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: IncidentNotificationTemplateArray = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplateArray", + "" + ) as IncidentNotificationTemplateArray; + 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 listIncidentPagerdutyServices + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentPagerdutyServices( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentPagerdutyServicesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentPagerdutyServicesResponse" + ) as IncidentPagerdutyServicesResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentPagerdutyServicesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentPagerdutyServicesResponse", + "" + ) as IncidentPagerdutyServicesResponse; + 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 listIncidentPostmortemTemplates + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentPostmortemTemplates( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: PostmortemTemplatesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PostmortemTemplatesResponse" + ) as PostmortemTemplatesResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: PostmortemTemplatesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PostmortemTemplatesResponse", + "" + ) as PostmortemTemplatesResponse; + 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 listIncidentReservedRoles + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentReservedRoles( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentReservedRolesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentReservedRolesResponse" + ) as IncidentReservedRolesResponse; + return body; + } + if (response.httpStatusCode === 401 || response.httpStatusCode === 403) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentReservedRolesResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentReservedRolesResponse", + "" + ) as IncidentReservedRolesResponse; + 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 listIncidentRuleExecutionStates + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentRuleExecutionStates( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentRuleExecutionStatesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRuleExecutionStatesResponse" + ) as IncidentRuleExecutionStatesResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentRuleExecutionStatesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRuleExecutionStatesResponse", + "" + ) as IncidentRuleExecutionStatesResponse; + 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 listIncidents + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidents( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentsResponse" + ) as IncidentsResponse; + 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: IncidentsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentsResponse", + "" + ) as IncidentsResponse; + 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 listIncidentTemplateVariables + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentTemplateVariables( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTemplateVariablesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTemplateVariablesResponse" + ) as IncidentTemplateVariablesResponse; + return body; + } + if (response.httpStatusCode === 401 || response.httpStatusCode === 403) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentTemplateVariablesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTemplateVariablesResponse", + "" + ) as IncidentTemplateVariablesResponse; + 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 listIncidentTimelineEntries + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentTimelineEntries( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTimelineEntriesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTimelineEntriesResponse" + ) as IncidentTimelineEntriesResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentTimelineEntriesResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTimelineEntriesResponse", + "" + ) as IncidentTimelineEntriesResponse; + 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 listIncidentTodos + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentTodos( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTodoListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTodoListResponse" + ) as IncidentTodoListResponse; + 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: IncidentTodoListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTodoListResponse", + "" + ) as IncidentTodoListResponse; + 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 listIncidentTypes + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentTypes( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTypeListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTypeListResponse" + ) as IncidentTypeListResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: IncidentTypeListResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTypeListResponse", + "" + ) as IncidentTypeListResponse; + 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 listIncidentUserDefinedFields + * @throws ApiException if the response code was not in [200, 299] + */ + public async listIncidentUserDefinedFields( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentUserDefinedFieldListResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentUserDefinedFieldListResponse" + ) as IncidentUserDefinedFieldListResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: IncidentUserDefinedFieldListResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentUserDefinedFieldListResponse", + "" + ) as IncidentUserDefinedFieldListResponse; + 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 listStatuspageEmailSubscriptions + * @throws ApiException if the response code was not in [200, 299] + */ + public async listStatuspageEmailSubscriptions( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentStatuspageSubscriptionsResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspageSubscriptionsResponse" + ) as IncidentStatuspageSubscriptionsResponse; + return body; + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentStatuspageSubscriptionsResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspageSubscriptionsResponse", + "" + ) as IncidentStatuspageSubscriptionsResponse; + 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 patchIncidentNotificationRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async patchIncidentNotificationRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentNotificationRule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRule" + ) as IncidentNotificationRule; + 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: IncidentNotificationRule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRule", + "" + ) as IncidentNotificationRule; + 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 renderIncidentTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async renderIncidentTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentRenderedTemplateResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRenderedTemplateResponse" + ) as IncidentRenderedTemplateResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentRenderedTemplateResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentRenderedTemplateResponse", + "" + ) as IncidentRenderedTemplateResponse; + 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 searchIncidents + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchIncidents( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentSearchResponse" + ) as IncidentSearchResponse; + 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: IncidentSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentSearchResponse", + "" + ) as IncidentSearchResponse; + 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 searchIncidentsV2 + * @throws ApiException if the response code was not in [200, 299] + */ + public async searchIncidentsV2( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentSearchResponse" + ) as IncidentSearchResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentSearchResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentSearchResponse", + "" + ) as IncidentSearchResponse; + 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 updateGlobalIncidentHandle + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateGlobalIncidentHandle( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentHandleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentHandleResponse" + ) as IncidentHandleResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentHandleResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentHandleResponse", + "" + ) as IncidentHandleResponse; + 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 updateGlobalIncidentSettings + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateGlobalIncidentSettings( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: GlobalIncidentSettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GlobalIncidentSettingsResponse" + ) as GlobalIncidentSettingsResponse; + return body; + } + if (response.httpStatusCode === 400) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: GlobalIncidentSettingsResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "GlobalIncidentSettingsResponse", + "" + ) as GlobalIncidentSettingsResponse; + 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 updateIncident + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncident( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentResponse" + ) as IncidentResponse; + 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: IncidentResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentResponse", + "" + ) as IncidentResponse; + 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 updateIncidentAttachment + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentAttachment( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: Attachment = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Attachment" + ) as Attachment; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: Attachment = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "Attachment", + "" + ) as Attachment; + 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 updateIncidentCommunication + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentCommunication( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentCommunicationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCommunicationResponse" + ) as IncidentCommunicationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentCommunicationResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentCommunicationResponse", + "" + ) as IncidentCommunicationResponse; + 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 updateIncidentIntegration + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentIntegration( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentIntegrationMetadataResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentIntegrationMetadataResponse" + ) as IncidentIntegrationMetadataResponse; + 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: IncidentIntegrationMetadataResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentIntegrationMetadataResponse", + "" + ) as IncidentIntegrationMetadataResponse; + 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 updateIncidentJiraTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentJiraTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentJiraTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraTemplateResponse" + ) as IncidentJiraTemplateResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentJiraTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentJiraTemplateResponse", + "" + ) as IncidentJiraTemplateResponse; + 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 updateIncidentMicrosoftTeamsConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentMicrosoftTeamsConfiguration( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentMicrosoftTeamsConfigurationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentMicrosoftTeamsConfigurationResponse" + ) as IncidentMicrosoftTeamsConfigurationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentMicrosoftTeamsConfigurationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentMicrosoftTeamsConfigurationResponse", + "" + ) as IncidentMicrosoftTeamsConfigurationResponse; + 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 updateIncidentNotificationRule + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentNotificationRule( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentNotificationRule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRule" + ) as IncidentNotificationRule; + 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: IncidentNotificationRule = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationRule", + "" + ) as IncidentNotificationRule; + 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 updateIncidentNotificationTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentNotificationTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplate" + ) as IncidentNotificationTemplate; + 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: IncidentNotificationTemplate = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplate", + "" + ) as IncidentNotificationTemplate; + 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 updateIncidentPostmortemTemplate + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentPostmortemTemplate( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: PostmortemTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PostmortemTemplateResponse" + ) as PostmortemTemplateResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: PostmortemTemplateResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "PostmortemTemplateResponse", + "" + ) as PostmortemTemplateResponse; + 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 updateIncidentStatuspageIncident + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentStatuspageIncident( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentStatuspageIncidentResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspageIncidentResponse" + ) as IncidentStatuspageIncidentResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentStatuspageIncidentResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatuspageIncidentResponse", + "" + ) as IncidentStatuspageIncidentResponse; + 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 updateIncidentStatusPageNotice + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentStatusPageNotice( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentStatusPageNoticeIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatusPageNoticeIntegrationResponse" + ) as IncidentStatusPageNoticeIntegrationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentStatusPageNoticeIntegrationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentStatusPageNoticeIntegrationResponse", + "" + ) as IncidentStatusPageNoticeIntegrationResponse; + 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 updateIncidentTimelineEntry + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentTimelineEntry( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTimelineEntryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTimelineEntryResponse" + ) as IncidentTimelineEntryResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentTimelineEntryResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTimelineEntryResponse", + "" + ) as IncidentTimelineEntryResponse; + 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 updateIncidentTodo + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentTodo( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTodoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTodoResponse" + ) as IncidentTodoResponse; + 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: IncidentTodoResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTodoResponse", + "" + ) as IncidentTodoResponse; + 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 updateIncidentType + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentType( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentTypeResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTypeResponse" + ) as IncidentTypeResponse; + 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: IncidentTypeResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentTypeResponse", + "" + ) as IncidentTypeResponse; + 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 updateIncidentUserDefinedField + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentUserDefinedField( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentUserDefinedFieldResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentUserDefinedFieldResponse" + ) as IncidentUserDefinedFieldResponse; + return body; + } + if (response.httpStatusCode === 400 || response.httpStatusCode === 404) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if ( + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 429 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: APIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "APIErrorResponse" + ) as APIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException(response.httpStatusCode, body); + } + + // Work around for missing responses in specification, e.g. for petstore.yaml + if (response.httpStatusCode >= 200 && response.httpStatusCode <= 299) { + const body: IncidentUserDefinedFieldResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentUserDefinedFieldResponse", + "" + ) as IncidentUserDefinedFieldResponse; + 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 updateIncidentZoomConfiguration + * @throws ApiException if the response code was not in [200, 299] + */ + public async updateIncidentZoomConfiguration( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentZoomConfigurationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentZoomConfigurationResponse" + ) as IncidentZoomConfigurationResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentZoomConfigurationResponse = + ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentZoomConfigurationResponse", + "" + ) as IncidentZoomConfigurationResponse; + 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 upsertIncidentAutomationData + * @throws ApiException if the response code was not in [200, 299] + */ + public async upsertIncidentAutomationData( + response: ResponseContext + ): Promise { + const contentType = ObjectSerializer.normalizeMediaType( + response.headers["content-type"] + ); + if (response.httpStatusCode === 200) { + const body: IncidentAutomationDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentAutomationDataResponse" + ) as IncidentAutomationDataResponse; + return body; + } + if ( + response.httpStatusCode === 400 || + response.httpStatusCode === 401 || + response.httpStatusCode === 403 || + response.httpStatusCode === 404 + ) { + const bodyText = ObjectSerializer.parse( + await response.body.text(), + contentType + ); + let body: JSONAPIErrorResponse; + try { + body = ObjectSerializer.deserialize( + bodyText, + "JSONAPIErrorResponse" + ) as JSONAPIErrorResponse; + } catch (error) { + logger.debug(`Got error deserializing error: ${error}`); + throw new ApiException( + response.httpStatusCode, + bodyText + ); + } + throw new ApiException( + response.httpStatusCode, + body + ); + } + if (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: IncidentAutomationDataResponse = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentAutomationDataResponse", + "" + ) as IncidentAutomationDataResponse; + return body; + } + + const body = (await response.body.text()) || ""; + throw new ApiException( + response.httpStatusCode, + 'Unknown API Status Code!\nBody: "' + body + '"' + ); + } +} + +export interface IncidentsApiBatchCreateIncidentRuleExecutionStatesRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * @type IncidentBatchCreateRuleExecutionStatesRequest + */ + body: IncidentBatchCreateRuleExecutionStatesRequest; +} + +export interface IncidentsApiBatchUpdateIncidentRuleExecutionStatesRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * @type IncidentBatchUpdateRuleExecutionStatesRequest + */ + body: IncidentBatchUpdateRuleExecutionStatesRequest; +} + +export interface IncidentsApiCreateGlobalIncidentHandleRequest { + /** + * @type IncidentHandleRequest + */ + body: IncidentHandleRequest; + /** + * Comma-separated list of related resources to include in the response + * @type string + */ + include?: string; +} + +export interface IncidentsApiCreateIncidentRequest { + /** + * Incident payload. + * @type IncidentCreateRequest + */ + body: IncidentCreateRequest; +} + +export interface IncidentsApiCreateIncidentAttachmentRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * @type CreateAttachmentRequest + */ + body: CreateAttachmentRequest; + /** + * Resource to include in the response. Supported value: `last_modified_by_user`. + * @type string + */ + include?: string; +} + +export interface IncidentsApiCreateIncidentCommunicationRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * @type IncidentCommunicationRequest + */ + body: IncidentCommunicationRequest; +} + +export interface IncidentsApiCreateIncidentGoogleMeetSpaceRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; +} + +export interface IncidentsApiCreateIncidentImpactRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * Incident impact payload. + * @type IncidentImpactCreateRequest + */ + body: IncidentImpactCreateRequest; + /** + * Specifies which related resources should be included in the response. + * @type Array + */ + include?: Array; +} + +export interface IncidentsApiCreateIncidentIntegrationRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * Incident integration metadata payload. + * @type IncidentIntegrationMetadataCreateRequest + */ + body: IncidentIntegrationMetadataCreateRequest; +} + +export interface IncidentsApiCreateIncidentJiraIssueRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * @type IncidentJiraIssueRequest + */ + body: IncidentJiraIssueRequest; +} + +export interface IncidentsApiCreateIncidentJiraTemplateRequest { + /** + * @type IncidentJiraTemplateRequest + */ + body: IncidentJiraTemplateRequest; +} + +export interface IncidentsApiCreateIncidentMicrosoftTeamsConfigurationRequest { + /** + * @type IncidentMicrosoftTeamsConfigurationRequest + */ + body: IncidentMicrosoftTeamsConfigurationRequest; + /** + * Specifies which related objects to include in the response. + * @type string + */ + include?: string; +} + +export interface IncidentsApiCreateIncidentMSTeamsOnlineMeetingRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; +} + +export interface IncidentsApiCreateIncidentNotificationRuleRequest { + /** + * @type CreateIncidentNotificationRuleRequest + */ + body: CreateIncidentNotificationRuleRequest; +} + +export interface IncidentsApiCreateIncidentNotificationTemplateRequest { + /** + * @type CreateIncidentNotificationTemplateRequest + */ + body: CreateIncidentNotificationTemplateRequest; +} + +export interface IncidentsApiCreateIncidentPostmortemAttachmentRequest { + /** + * The ID of the incident + * @type string + */ + incidentId: string; + /** + * @type PostmortemAttachmentRequest + */ + body: PostmortemAttachmentRequest; +} + +export interface IncidentsApiCreateIncidentPostmortemTemplateRequest { + /** + * @type PostmortemTemplateRequest + */ + body: PostmortemTemplateRequest; +} + +export interface IncidentsApiCreateIncidentRoleAssignmentRequest { + /** + * @type IncidentRoleAssignmentRequest + */ + body: IncidentRoleAssignmentRequest; +} + +export interface IncidentsApiCreateIncidentStatuspageIncidentRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * @type IncidentStatuspageIncidentRequest + */ + body: IncidentStatuspageIncidentRequest; +} + +export interface IncidentsApiCreateIncidentStatusPageNoticeRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The ID of the status page. + * @type string + */ + statuspageId: string; + /** + * @type IncidentStatusPageNoticeCreateRequest + */ + body: IncidentStatusPageNoticeCreateRequest; + /** + * Whether to notify subscribers about this notice. + * @type boolean + */ + notifySubscribers?: boolean; +} + +export interface IncidentsApiCreateIncidentTimelineEntryRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * @type IncidentTimelineEntryRequest + */ + body: IncidentTimelineEntryRequest; +} + +export interface IncidentsApiCreateIncidentTodoRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * Incident todo payload. + * @type IncidentTodoCreateRequest + */ + body: IncidentTodoCreateRequest; +} + +export interface IncidentsApiCreateIncidentTypeRequest { + /** + * Incident type payload. + * @type IncidentTypeCreateRequest + */ + body: IncidentTypeCreateRequest; +} + +export interface IncidentsApiCreateIncidentUserDefinedFieldRequest { + /** + * Incident user-defined field payload. + * @type IncidentUserDefinedFieldCreateRequest + */ + body: IncidentUserDefinedFieldCreateRequest; + /** + * Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". + * @type string + */ + include?: string; +} + +export interface IncidentsApiCreateIncidentZoomConfigurationRequest { + /** + * @type IncidentZoomConfigurationRequest + */ + body: IncidentZoomConfigurationRequest; + /** + * Specifies which related objects to include in the response. + * @type string + */ + include?: string; +} + +export interface IncidentsApiCreateIncidentZoomMeetingRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * @type IncidentCreateZoomMeetingRequest + */ + body: IncidentCreateZoomMeetingRequest; +} + +export interface IncidentsApiCreateStatuspageEmailSubscriptionRequest { + /** + * The ID of the status page. + * @type string + */ + pageId: string; + /** + * @type IncidentStatuspageSubscriptionRequest + */ + body: IncidentStatuspageSubscriptionRequest; +} + +export interface IncidentsApiDeleteIncidentRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; +} + +export interface IncidentsApiDeleteIncidentAttachmentRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The ID of the attachment. + * @type string + */ + attachmentId: string; +} + +export interface IncidentsApiDeleteIncidentCommunicationRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The ID of the communication. + * @type string + */ + communicationId: string; +} + +export interface IncidentsApiDeleteIncidentImpactRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The UUID of the incident impact. + * @type string + */ + impactId: string; +} + +export interface IncidentsApiDeleteIncidentIntegrationRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The UUID of the incident integration metadata. + * @type string + */ + integrationMetadataId: string; +} + +export interface IncidentsApiDeleteIncidentJiraTemplateRequest { + /** + * The ID of the Jira template. + * @type string + */ + templateId: string; +} + +export interface IncidentsApiDeleteIncidentNotificationRuleRequest { + /** + * The ID of the notification rule. + * @type string + */ + id: string; + /** + * Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + * @type string + */ + include?: string; +} + +export interface IncidentsApiDeleteIncidentNotificationTemplateRequest { + /** + * The ID of the notification template. + * @type string + */ + id: string; + /** + * Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` + * @type string + */ + include?: string; +} + +export interface IncidentsApiDeleteIncidentPostmortemTemplateRequest { + /** + * The ID of the postmortem template + * @type string + */ + templateId: string; +} + +export interface IncidentsApiDeleteIncidentRoleAssignmentRequest { + /** + * The ID of the role assignment. + * @type string + */ + roleAssignmentId: string; +} + +export interface IncidentsApiDeleteIncidentTimelineEntryRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The ID of the timeline entry. + * @type string + */ + timelineEntryId: string; +} + +export interface IncidentsApiDeleteIncidentTodoRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The UUID of the incident todo. + * @type string + */ + todoId: string; +} + +export interface IncidentsApiDeleteIncidentTypeRequest { + /** + * The UUID of the incident type. + * @type string + */ + incidentTypeId: string; +} + +export interface IncidentsApiDeleteIncidentUserDefinedFieldRequest { + /** + * The ID of the incident user-defined field. + * @type string + */ + fieldId: string; +} + +export interface IncidentsApiExportIncidentsRequest { + /** + * @type IncidentSearchIncidentsExportRequest + */ + body: IncidentSearchIncidentsExportRequest; +} + +export interface IncidentsApiGetIncidentRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * Specifies which types of related objects should be included in the response. + * @type Array + */ + include?: Array; +} + +export interface IncidentsApiGetIncidentAutomationDataRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The automation data key. + * @type string + */ + key: string; + /** + * Specifies which related objects to include in the response. + * @type string + */ + include?: string; +} + +export interface IncidentsApiGetIncidentCaseSourceLinkRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; +} + +export interface IncidentsApiGetIncidentCommunicationRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The ID of the communication. + * @type string + */ + communicationId: string; +} + +export interface IncidentsApiGetIncidentIntegrationRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The UUID of the incident integration metadata. + * @type string + */ + integrationMetadataId: string; +} + +export interface IncidentsApiGetIncidentJiraTemplateRequest { + /** + * The ID of the Jira template. + * @type string + */ + templateId: string; +} + +export interface IncidentsApiGetIncidentNotificationRuleRequest { + /** + * The ID of the notification rule. + * @type string + */ + id: string; + /** + * Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + * @type string + */ + include?: string; +} + +export interface IncidentsApiGetIncidentNotificationTemplateRequest { + /** + * The ID of the notification template. + * @type string + */ + id: string; + /** + * Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` + * @type string + */ + include?: string; +} + +export interface IncidentsApiGetIncidentPagerdutyRelatedIncidentsRequest { + /** + * The PagerDuty incident identifier. + * @type string + */ + pagerdutyIncidentId: string; +} + +export interface IncidentsApiGetIncidentPageSourceLinkRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; +} + +export interface IncidentsApiGetIncidentPostmortemTemplateRequest { + /** + * The ID of the postmortem template + * @type string + */ + templateId: string; +} + +export interface IncidentsApiGetIncidentReservedRoleRequest { + /** + * The ID of the reserved role. + * @type string + */ + roleId: string; +} + +export interface IncidentsApiGetIncidentRoleAssignmentRequest { + /** + * The ID of the role assignment. + * @type string + */ + roleAssignmentId: string; +} + +export interface IncidentsApiGetIncidentStatusPagesSuggestionRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; +} + +export interface IncidentsApiGetIncidentTimelineEntryThreadRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The ID of the timeline entry. + * @type string + */ + timelineEntryId: string; +} + +export interface IncidentsApiGetIncidentTodoRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * The UUID of the incident todo. + * @type string + */ + todoId: string; +} - const body = (await response.body.text()) || ""; - throw new ApiException( - response.httpStatusCode, - 'Unknown API Status Code!\nBody: "' + body + '"' - ); - } +export interface IncidentsApiGetIncidentTypeRequest { + /** + * The UUID of the incident type. + * @type string + */ + incidentTypeId: string; } -export interface IncidentsApiCreateGlobalIncidentHandleRequest { +export interface IncidentsApiGetIncidentUserDefinedFieldRequest { /** - * @type IncidentHandleRequest + * The ID of the incident user-defined field. + * @type string */ - body: IncidentHandleRequest; + fieldId: string; /** - * Comma-separated list of related resources to include in the response + * Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". * @type string */ include?: string; } -export interface IncidentsApiCreateIncidentRequest { +export interface IncidentsApiImportIncidentRequest { /** - * Incident payload. - * @type IncidentCreateRequest + * Incident import payload. + * @type IncidentImportRequest */ - body: IncidentCreateRequest; + body: IncidentImportRequest; + /** + * Specifies which related object types to include in the response when importing an incident. + * @type Array + */ + include?: Array; } -export interface IncidentsApiCreateIncidentAttachmentRequest { +export interface IncidentsApiListGlobalIncidentHandlesRequest { + /** + * Comma-separated list of related resources to include in the response + * @type string + */ + include?: string; +} + +export interface IncidentsApiListIncidentAttachmentsRequest { /** * The UUID of the incident. * @type string */ incidentId: string; /** - * @type CreateAttachmentRequest + * Filter attachments by type. Supported values are `1` (`postmortem`) and `2` (`link`). + * @type string */ - body: CreateAttachmentRequest; + filterAttachmentType?: string; /** * Resource to include in the response. Supported value: `last_modified_by_user`. * @type string @@ -6868,17 +14642,25 @@ export interface IncidentsApiCreateIncidentAttachmentRequest { include?: string; } -export interface IncidentsApiCreateIncidentImpactRequest { +export interface IncidentsApiListIncidentCommunicationsRequest { /** * The UUID of the incident. * @type string */ incidentId: string; /** - * Incident impact payload. - * @type IncidentImpactCreateRequest + * Filter by communication type. + * @type string */ - body: IncidentImpactCreateRequest; + filterCommunicationType?: string; +} + +export interface IncidentsApiListIncidentImpactsRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; /** * Specifies which related resources should be included in the response. * @type Array @@ -6886,228 +14668,400 @@ export interface IncidentsApiCreateIncidentImpactRequest { include?: Array; } -export interface IncidentsApiCreateIncidentIntegrationRequest { +export interface IncidentsApiListIncidentIntegrationsRequest { /** * The UUID of the incident. * @type string */ incidentId: string; +} + +export interface IncidentsApiListIncidentJiraTemplatesRequest { /** - * Incident integration metadata payload. - * @type IncidentIntegrationMetadataCreateRequest + * Filter templates by default status. + * @type boolean */ - body: IncidentIntegrationMetadataCreateRequest; + isDefault?: boolean; + /** + * Filter templates by incident type identifier. + * @type string + */ + incidentTypeId?: string; + /** + * Filter templates by type. + * @type string + */ + templateType?: string; } -export interface IncidentsApiCreateIncidentNotificationRuleRequest { +export interface IncidentsApiListIncidentNotificationRulesRequest { /** - * @type CreateIncidentNotificationRuleRequest + * Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + * @type string */ - body: CreateIncidentNotificationRuleRequest; + include?: string; } -export interface IncidentsApiCreateIncidentNotificationTemplateRequest { +export interface IncidentsApiListIncidentNotificationTemplatesRequest { /** - * @type CreateIncidentNotificationTemplateRequest + * Optional incident type ID filter. + * @type string */ - body: CreateIncidentNotificationTemplateRequest; + filterIncidentType?: string; + /** + * Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` + * @type string + */ + include?: string; } -export interface IncidentsApiCreateIncidentPostmortemAttachmentRequest { +export interface IncidentsApiListIncidentPagerdutyServicesRequest { /** - * The ID of the incident + * Whether to include unresolved PagerDuty services. + * @type boolean + */ + includeUnresolved?: boolean; +} + +export interface IncidentsApiListIncidentRuleExecutionStatesRequest { + /** + * The UUID of the incident. * @type string */ incidentId: string; +} + +export interface IncidentsApiListIncidentsRequest { /** - * @type PostmortemAttachmentRequest + * Specifies which types of related objects should be included in the response. + * @type Array */ - body: PostmortemAttachmentRequest; + include?: Array; + /** + * 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; } -export interface IncidentsApiCreateIncidentPostmortemTemplateRequest { +export interface IncidentsApiListIncidentTemplateVariablesRequest { + /** + * Filter template variables by incident type. + * @type string + */ + filterIncidentType?: string; + /** + * Whether to include follow-up template variables. + * @type boolean + */ + includeFollowUps?: boolean; +} + +export interface IncidentsApiListIncidentTimelineEntriesRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; +} + +export interface IncidentsApiListIncidentTodosRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; +} + +export interface IncidentsApiListIncidentTypesRequest { + /** + * Include deleted incident types in the response. + * @type boolean + */ + includeDeleted?: boolean; +} + +export interface IncidentsApiListIncidentUserDefinedFieldsRequest { + /** + * The number of results to return per page. Must be between 0 and 1000. + * @type number + */ + pageSize?: number; + /** + * The page number to retrieve, starting at 0. + * @type number + */ + pageNumber?: number; + /** + * When true, include soft-deleted fields in the response. + * @type boolean + */ + includeDeleted?: boolean; + /** + * Filter results to fields associated with the given incident type UUID. + * @type string + */ + filterIncidentType?: string; + /** + * Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". + * @type string + */ + include?: string; +} + +export interface IncidentsApiListStatuspageEmailSubscriptionsRequest { + /** + * The ID of the status page. + * @type string + */ + pageId: string; +} + +export interface IncidentsApiPatchIncidentNotificationRuleRequest { + /** + * The ID of the notification rule. + * @type string + */ + id: string; + /** + * @type PutIncidentNotificationRuleRequest + */ + body: PutIncidentNotificationRuleRequest; + /** + * Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + * @type string + */ + include?: string; +} + +export interface IncidentsApiRenderIncidentTemplateRequest { + /** + * The UUID of the incident. + * @type string + */ + incidentId: string; + /** + * @type IncidentRenderTemplateRequest + */ + body: IncidentRenderTemplateRequest; +} + +export interface IncidentsApiSearchIncidentsRequest { + /** + * Specifies which incidents should be returned. The query can contain any number of incident facets + * joined by `ANDs`, along with multiple values for each of those facets joined by `OR`s. For + * example: `state:active AND severity:(SEV-2 OR SEV-1)`. + * @type string + */ + query: string; + /** + * Specifies which types of related objects should be included in the response. + * @type IncidentRelatedObject + */ + include?: IncidentRelatedObject; + /** + * Specifies the order of returned incidents. + * @type IncidentSearchSortOrder + */ + sort?: IncidentSearchSortOrder; + /** + * 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; +} + +export interface IncidentsApiSearchIncidentsV2Request { + /** + * Specifies which incidents should be returned by the search. + * @type string + */ + query?: string; + /** + * Specifies the order of returned incidents. + * @type IncidentSearchIncidentsSortOrder + */ + sort?: IncidentSearchIncidentsSortOrder; + /** + * Whether to include facet data in the response. + * @type boolean + */ + withFacets?: boolean; + /** + * Whether to include deleted incidents in the response. + * @type boolean + */ + filterWithDeleted?: boolean; /** - * @type PostmortemTemplateRequest + * A semantic search query. + * @type string */ - body: PostmortemTemplateRequest; -} - -export interface IncidentsApiCreateIncidentTodoRequest { + semanticQuery?: string; /** - * The UUID of the incident. + * The timezone for date-based operations. * @type string */ - incidentId: string; + timeZone?: string; /** - * Incident todo payload. - * @type IncidentTodoCreateRequest + * Specifies which types of related objects to include. + * @type Array */ - body: IncidentTodoCreateRequest; -} - -export interface IncidentsApiCreateIncidentTypeRequest { + include?: Array; /** - * Incident type payload. - * @type IncidentTypeCreateRequest + * Size for a given page. The maximum allowed value is 100. + * @type number */ - body: IncidentTypeCreateRequest; + pageSize?: number; + /** + * Specific offset to use as the beginning of the returned page. + * @type number + */ + pageOffset?: number; } -export interface IncidentsApiCreateIncidentUserDefinedFieldRequest { +export interface IncidentsApiUpdateGlobalIncidentHandleRequest { /** - * Incident user-defined field payload. - * @type IncidentUserDefinedFieldCreateRequest + * @type IncidentHandleRequest */ - body: IncidentUserDefinedFieldCreateRequest; + body: IncidentHandleRequest; /** - * Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". + * Comma-separated list of related resources to include in the response * @type string */ include?: string; } -export interface IncidentsApiDeleteIncidentRequest { +export interface IncidentsApiUpdateGlobalIncidentSettingsRequest { /** - * The UUID of the incident. - * @type string + * @type GlobalIncidentSettingsRequest */ - incidentId: string; + body: GlobalIncidentSettingsRequest; } -export interface IncidentsApiDeleteIncidentAttachmentRequest { +export interface IncidentsApiUpdateIncidentRequest { /** * The UUID of the incident. * @type string */ incidentId: string; /** - * The ID of the attachment. - * @type string - */ - attachmentId: string; -} - -export interface IncidentsApiDeleteIncidentImpactRequest { - /** - * The UUID of the incident. - * @type string + * Incident Payload. + * @type IncidentUpdateRequest */ - incidentId: string; + body: IncidentUpdateRequest; /** - * The UUID of the incident impact. - * @type string + * Specifies which types of related objects should be included in the response. + * @type Array */ - impactId: string; + include?: Array; } -export interface IncidentsApiDeleteIncidentIntegrationRequest { +export interface IncidentsApiUpdateIncidentAttachmentRequest { /** * The UUID of the incident. * @type string */ incidentId: string; /** - * The UUID of the incident integration metadata. + * The ID of the attachment. * @type string */ - integrationMetadataId: string; -} - -export interface IncidentsApiDeleteIncidentNotificationRuleRequest { + attachmentId: string; /** - * The ID of the notification rule. - * @type string + * @type PatchAttachmentRequest */ - id: string; + body: PatchAttachmentRequest; /** - * Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` + * Resource to include in the response. Supported value: `last_modified_by_user`. * @type string */ include?: string; } -export interface IncidentsApiDeleteIncidentNotificationTemplateRequest { +export interface IncidentsApiUpdateIncidentCommunicationRequest { /** - * The ID of the notification template. + * The UUID of the incident. * @type string */ - id: string; + incidentId: string; /** - * Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` + * The ID of the communication. * @type string */ - include?: string; -} - -export interface IncidentsApiDeleteIncidentPostmortemTemplateRequest { + communicationId: string; /** - * The ID of the postmortem template - * @type string + * @type IncidentCommunicationRequest */ - templateId: string; + body: IncidentCommunicationRequest; } -export interface IncidentsApiDeleteIncidentTodoRequest { +export interface IncidentsApiUpdateIncidentIntegrationRequest { /** * The UUID of the incident. * @type string */ incidentId: string; /** - * The UUID of the incident todo. - * @type string - */ - todoId: string; -} - -export interface IncidentsApiDeleteIncidentTypeRequest { - /** - * The UUID of the incident type. + * The UUID of the incident integration metadata. * @type string */ - incidentTypeId: string; -} - -export interface IncidentsApiDeleteIncidentUserDefinedFieldRequest { + integrationMetadataId: string; /** - * The ID of the incident user-defined field. - * @type string + * Incident integration metadata payload. + * @type IncidentIntegrationMetadataPatchRequest */ - fieldId: string; + body: IncidentIntegrationMetadataPatchRequest; } -export interface IncidentsApiGetIncidentRequest { +export interface IncidentsApiUpdateIncidentJiraTemplateRequest { /** - * The UUID of the incident. + * The ID of the Jira template. * @type string */ - incidentId: string; + templateId: string; /** - * Specifies which types of related objects should be included in the response. - * @type Array + * @type IncidentJiraTemplateRequest */ - include?: Array; + body: IncidentJiraTemplateRequest; } -export interface IncidentsApiGetIncidentIntegrationRequest { +export interface IncidentsApiUpdateIncidentMicrosoftTeamsConfigurationRequest { /** - * The UUID of the incident. + * The ID of the Microsoft Teams configuration. * @type string */ - incidentId: string; + configurationId: string; /** - * The UUID of the incident integration metadata. + * @type IncidentMicrosoftTeamsConfigurationRequest + */ + body: IncidentMicrosoftTeamsConfigurationRequest; + /** + * Specifies which related objects to include in the response. * @type string */ - integrationMetadataId: string; + include?: string; } -export interface IncidentsApiGetIncidentNotificationRuleRequest { +export interface IncidentsApiUpdateIncidentNotificationRuleRequest { /** * The ID of the notification rule. * @type string */ id: string; + /** + * @type PutIncidentNotificationRuleRequest + */ + body: PutIncidentNotificationRuleRequest; /** * Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` * @type string @@ -7115,12 +15069,16 @@ export interface IncidentsApiGetIncidentNotificationRuleRequest { include?: string; } -export interface IncidentsApiGetIncidentNotificationTemplateRequest { +export interface IncidentsApiUpdateIncidentNotificationTemplateRequest { /** * The ID of the notification template. * @type string */ id: string; + /** + * @type PatchIncidentNotificationTemplateRequest + */ + body: PatchIncidentNotificationTemplateRequest; /** * Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` * @type string @@ -7128,429 +15086,916 @@ export interface IncidentsApiGetIncidentNotificationTemplateRequest { include?: string; } -export interface IncidentsApiGetIncidentPostmortemTemplateRequest { +export interface IncidentsApiUpdateIncidentPostmortemTemplateRequest { /** * The ID of the postmortem template * @type string */ templateId: string; + /** + * @type PostmortemTemplateRequest + */ + body: PostmortemTemplateRequest; } -export interface IncidentsApiGetIncidentTodoRequest { +export interface IncidentsApiUpdateIncidentStatuspageIncidentRequest { /** * The UUID of the incident. * @type string */ incidentId: string; /** - * The UUID of the incident todo. + * The ID of the Statuspage page. * @type string */ - todoId: string; -} - -export interface IncidentsApiGetIncidentTypeRequest { + pageId: string; /** - * The UUID of the incident type. + * The ID of the Statuspage incident. * @type string */ - incidentTypeId: string; + statuspageIncidentId: string; + /** + * @type IncidentStatuspageIncidentRequest + */ + body: IncidentStatuspageIncidentRequest; } -export interface IncidentsApiGetIncidentUserDefinedFieldRequest { +export interface IncidentsApiUpdateIncidentStatusPageNoticeRequest { /** - * The ID of the incident user-defined field. + * The UUID of the incident. * @type string */ - fieldId: string; + incidentId: string; /** - * Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". + * The ID of the status page. * @type string */ - include?: string; -} - -export interface IncidentsApiImportIncidentRequest { + statuspageId: string; /** - * Incident import payload. - * @type IncidentImportRequest + * The ID of the status page notice. + * @type string */ - body: IncidentImportRequest; + noticeId: string; /** - * Specifies which related object types to include in the response when importing an incident. - * @type Array + * @type IncidentStatusPageNoticeUpdateRequest */ - include?: Array; -} - -export interface IncidentsApiListGlobalIncidentHandlesRequest { + body: IncidentStatusPageNoticeUpdateRequest; /** - * Comma-separated list of related resources to include in the response - * @type string + * Whether to notify subscribers about this notice. + * @type boolean */ - include?: string; + notifySubscribers?: boolean; } -export interface IncidentsApiListIncidentAttachmentsRequest { +export interface IncidentsApiUpdateIncidentTimelineEntryRequest { /** * The UUID of the incident. * @type string */ incidentId: string; /** - * Filter attachments by type. Supported values are `1` (`postmortem`) and `2` (`link`). + * The ID of the timeline entry. * @type string */ - filterAttachmentType?: string; + timelineEntryId: string; /** - * Resource to include in the response. Supported value: `last_modified_by_user`. - * @type string + * @type IncidentTimelineEntryRequest */ - include?: string; + body: IncidentTimelineEntryRequest; } -export interface IncidentsApiListIncidentImpactsRequest { +export interface IncidentsApiUpdateIncidentTodoRequest { /** * The UUID of the incident. * @type string */ incidentId: string; /** - * Specifies which related resources should be included in the response. - * @type Array - */ - include?: Array; -} - -export interface IncidentsApiListIncidentIntegrationsRequest { - /** - * The UUID of the incident. + * The UUID of the incident todo. * @type string */ - incidentId: string; -} - -export interface IncidentsApiListIncidentNotificationRulesRequest { + todoId: string; /** - * Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` - * @type string + * Incident todo payload. + * @type IncidentTodoPatchRequest */ - include?: string; + body: IncidentTodoPatchRequest; } -export interface IncidentsApiListIncidentNotificationTemplatesRequest { +export interface IncidentsApiUpdateIncidentTypeRequest { /** - * Optional incident type ID filter. + * The UUID of the incident type. * @type string */ - filterIncidentType?: string; + incidentTypeId: string; /** - * Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` - * @type string + * Incident type payload. + * @type IncidentTypePatchRequest */ - include?: string; + body: IncidentTypePatchRequest; } -export interface IncidentsApiListIncidentsRequest { - /** - * Specifies which types of related objects should be included in the response. - * @type Array - */ - include?: Array; - /** - * Size for a given page. The maximum allowed value is 100. - * @type number - */ - pageSize?: number; +export interface IncidentsApiUpdateIncidentUserDefinedFieldRequest { /** - * Specific offset to use as the beginning of the returned page. - * @type number + * The ID of the incident user-defined field. + * @type string */ - pageOffset?: number; -} - -export interface IncidentsApiListIncidentTodosRequest { + fieldId: string; /** - * The UUID of the incident. - * @type string + * Incident user-defined field update payload. + * @type IncidentUserDefinedFieldUpdateRequest */ - incidentId: string; -} - -export interface IncidentsApiListIncidentTypesRequest { + body: IncidentUserDefinedFieldUpdateRequest; /** - * Include deleted incident types in the response. - * @type boolean + * Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". + * @type string */ - includeDeleted?: boolean; + include?: string; } -export interface IncidentsApiListIncidentUserDefinedFieldsRequest { +export interface IncidentsApiUpdateIncidentZoomConfigurationRequest { /** - * The number of results to return per page. Must be between 0 and 1000. - * @type number + * The ID of the Zoom configuration. + * @type string */ - pageSize?: number; + configurationId: string; /** - * The page number to retrieve, starting at 0. - * @type number + * @type IncidentZoomConfigurationRequest */ - pageNumber?: number; + body: IncidentZoomConfigurationRequest; /** - * When true, include soft-deleted fields in the response. - * @type boolean + * Specifies which related objects to include in the response. + * @type string */ - includeDeleted?: boolean; + include?: string; +} + +export interface IncidentsApiUpsertIncidentAutomationDataRequest { /** - * Filter results to fields associated with the given incident type UUID. + * The UUID of the incident. * @type string */ - filterIncidentType?: string; + incidentId: string; /** - * Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". + * The automation data key. * @type string */ - include?: string; -} - -export interface IncidentsApiSearchIncidentsRequest { + key: string; /** - * Specifies which incidents should be returned. The query can contain any number of incident facets - * joined by `ANDs`, along with multiple values for each of those facets joined by `OR`s. For - * example: `state:active AND severity:(SEV-2 OR SEV-1)`. - * @type string + * @type IncidentAutomationDataRequest */ - query: string; + body: IncidentAutomationDataRequest; /** - * Specifies which types of related objects should be included in the response. - * @type IncidentRelatedObject + * Specifies which related objects to include in the response. + * @type string */ - include?: IncidentRelatedObject; + include?: string; +} + +export class IncidentsApi { + private requestFactory: IncidentsApiRequestFactory; + private responseProcessor: IncidentsApiResponseProcessor; + private configuration: Configuration; + + public constructor( + configuration: Configuration, + requestFactory?: IncidentsApiRequestFactory, + responseProcessor?: IncidentsApiResponseProcessor + ) { + this.configuration = configuration; + this.requestFactory = + requestFactory || new IncidentsApiRequestFactory(configuration); + this.responseProcessor = + responseProcessor || new IncidentsApiResponseProcessor(); + } + /** - * Specifies the order of returned incidents. - * @type IncidentSearchSortOrder + * Batch create rule execution states for a given incident. + * @param param The request object */ - sort?: IncidentSearchSortOrder; + public batchCreateIncidentRuleExecutionStates( + param: IncidentsApiBatchCreateIncidentRuleExecutionStatesRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.batchCreateIncidentRuleExecutionStates( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.batchCreateIncidentRuleExecutionStates( + responseContext + ); + }); + }); + } + /** - * Size for a given page. The maximum allowed value is 100. - * @type number + * Batch update rule execution states for a given incident. + * @param param The request object */ - pageSize?: number; + public batchUpdateIncidentRuleExecutionStates( + param: IncidentsApiBatchUpdateIncidentRuleExecutionStatesRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.batchUpdateIncidentRuleExecutionStates( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.batchUpdateIncidentRuleExecutionStates( + responseContext + ); + }); + }); + } + /** - * Specific offset to use as the beginning of the returned page. - * @type number + * Create a new global incident handle. + * @param param The request object */ - pageOffset?: number; -} + public createGlobalIncidentHandle( + param: IncidentsApiCreateGlobalIncidentHandleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createGlobalIncidentHandle( + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createGlobalIncidentHandle( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateGlobalIncidentHandleRequest { /** - * @type IncidentHandleRequest + * Create an incident. + * @param param The request object */ - body: IncidentHandleRequest; + public createIncident( + param: IncidentsApiCreateIncidentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createIncident( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncident(responseContext); + }); + }); + } + /** - * Comma-separated list of related resources to include in the response - * @type string + * Create an incident attachment. + * @param param The request object */ - include?: string; -} + public createIncidentAttachment( + param: IncidentsApiCreateIncidentAttachmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createIncidentAttachment( + param.incidentId, + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentAttachment( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateGlobalIncidentSettingsRequest { /** - * @type GlobalIncidentSettingsRequest + * Create a new communication for a given incident. + * @param param The request object */ - body: GlobalIncidentSettingsRequest; -} + public createIncidentCommunication( + param: IncidentsApiCreateIncidentCommunicationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentCommunication( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentCommunication( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateIncidentRequest { /** - * The UUID of the incident. - * @type string + * Create a Google Meet space for a given incident. + * @param param The request object */ - incidentId: string; + public createIncidentGoogleMeetSpace( + param: IncidentsApiCreateIncidentGoogleMeetSpaceRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentGoogleMeetSpace( + param.incidentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentGoogleMeetSpace( + responseContext + ); + }); + }); + } + /** - * Incident Payload. - * @type IncidentUpdateRequest + * Create an impact for an incident. + * @param param The request object */ - body: IncidentUpdateRequest; + public createIncidentImpact( + param: IncidentsApiCreateIncidentImpactRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createIncidentImpact( + param.incidentId, + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentImpact(responseContext); + }); + }); + } + /** - * Specifies which types of related objects should be included in the response. - * @type Array + * Create an incident integration metadata. + * @param param The request object */ - include?: Array; -} + public createIncidentIntegration( + param: IncidentsApiCreateIncidentIntegrationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createIncidentIntegration( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentIntegration( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateIncidentAttachmentRequest { - /** - * The UUID of the incident. - * @type string - */ - incidentId: string; /** - * The ID of the attachment. - * @type string + * Create a Jira issue linked to a given incident. + * @param param The request object */ - attachmentId: string; + public createIncidentJiraIssue( + param: IncidentsApiCreateIncidentJiraIssueRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createIncidentJiraIssue( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentJiraIssue( + responseContext + ); + }); + }); + } + /** - * @type PatchAttachmentRequest + * Create a new incident Jira template for the organization. + * @param param The request object */ - body: PatchAttachmentRequest; + public createIncidentJiraTemplate( + param: IncidentsApiCreateIncidentJiraTemplateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentJiraTemplate(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentJiraTemplate( + responseContext + ); + }); + }); + } + /** - * Resource to include in the response. Supported value: `last_modified_by_user`. - * @type string + * Create a Microsoft Teams configuration for incidents. + * @param param The request object */ - include?: string; -} + public createIncidentMicrosoftTeamsConfiguration( + param: IncidentsApiCreateIncidentMicrosoftTeamsConfigurationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentMicrosoftTeamsConfiguration( + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentMicrosoftTeamsConfiguration( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateIncidentIntegrationRequest { /** - * The UUID of the incident. - * @type string + * Create a Microsoft Teams online meeting for a given incident. + * @param param The request object */ - incidentId: string; + public createIncidentMSTeamsOnlineMeeting( + param: IncidentsApiCreateIncidentMSTeamsOnlineMeetingRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentMSTeamsOnlineMeeting( + param.incidentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentMSTeamsOnlineMeeting( + responseContext + ); + }); + }); + } + /** - * The UUID of the incident integration metadata. - * @type string + * Creates a new notification rule. + * @param param The request object */ - integrationMetadataId: string; + public createIncidentNotificationRule( + param: IncidentsApiCreateIncidentNotificationRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentNotificationRule(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentNotificationRule( + responseContext + ); + }); + }); + } + /** - * Incident integration metadata payload. - * @type IncidentIntegrationMetadataPatchRequest + * Creates a new notification template. + * @param param The request object */ - body: IncidentIntegrationMetadataPatchRequest; -} + public createIncidentNotificationTemplate( + param: IncidentsApiCreateIncidentNotificationTemplateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentNotificationTemplate( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentNotificationTemplate( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateIncidentNotificationRuleRequest { /** - * The ID of the notification rule. - * @type string + * Create a postmortem attachment for an incident. + * + * The endpoint accepts markdown for notebooks created in Confluence or Google Docs. + * Postmortems created from notebooks need to be formatted using frontend notebook cells, + * in addition to markdown format. + * @param param The request object */ - id: string; + public createIncidentPostmortemAttachment( + param: IncidentsApiCreateIncidentPostmortemAttachmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentPostmortemAttachment( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentPostmortemAttachment( + responseContext + ); + }); + }); + } + /** - * @type PutIncidentNotificationRuleRequest + * Create a new postmortem template for incidents. + * @param param The request object */ - body: PutIncidentNotificationRuleRequest; + public createIncidentPostmortemTemplate( + param: IncidentsApiCreateIncidentPostmortemTemplateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentPostmortemTemplate(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentPostmortemTemplate( + responseContext + ); + }); + }); + } + /** - * Comma-separated list of resources to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type`, `notification_template` - * @type string + * Create a new role assignment for an incident. + * @param param The request object */ - include?: string; -} + public createIncidentRoleAssignment( + param: IncidentsApiCreateIncidentRoleAssignmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentRoleAssignment(param.body, options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentRoleAssignment( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateIncidentNotificationTemplateRequest { /** - * The ID of the notification template. - * @type string + * Create a Statuspage incident linked to a Datadog incident. + * @param param The request object */ - id: string; + public createIncidentStatuspageIncident( + param: IncidentsApiCreateIncidentStatuspageIncidentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentStatuspageIncident( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentStatuspageIncident( + responseContext + ); + }); + }); + } + /** - * @type PatchIncidentNotificationTemplateRequest + * Publish a status page notice for a given incident. + * @param param The request object */ - body: PatchIncidentNotificationTemplateRequest; + public createIncidentStatusPageNotice( + param: IncidentsApiCreateIncidentStatusPageNoticeRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentStatusPageNotice( + param.incidentId, + param.statuspageId, + param.body, + param.notifySubscribers, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentStatusPageNotice( + responseContext + ); + }); + }); + } + /** - * Comma-separated list of relationships to include. Supported values: `created_by_user`, `last_modified_by_user`, `incident_type` - * @type string + * Create a new timeline entry for a given incident. + * @param param The request object */ - include?: string; -} + public createIncidentTimelineEntry( + param: IncidentsApiCreateIncidentTimelineEntryRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentTimelineEntry( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentTimelineEntry( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateIncidentPostmortemTemplateRequest { - /** - * The ID of the postmortem template - * @type string - */ - templateId: string; /** - * @type PostmortemTemplateRequest + * Create an incident todo. + * @param param The request object */ - body: PostmortemTemplateRequest; -} + public createIncidentTodo( + param: IncidentsApiCreateIncidentTodoRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createIncidentTodo( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentTodo(responseContext); + }); + }); + } -export interface IncidentsApiUpdateIncidentTodoRequest { /** - * The UUID of the incident. - * @type string + * Create an incident type. + * @param param The request object */ - incidentId: string; + public createIncidentType( + param: IncidentsApiCreateIncidentTypeRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createIncidentType( + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentType(responseContext); + }); + }); + } + /** - * The UUID of the incident todo. - * @type string + * Create an incident user-defined field. + * @param param The request object */ - todoId: string; + public createIncidentUserDefinedField( + param: IncidentsApiCreateIncidentUserDefinedFieldRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentUserDefinedField( + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentUserDefinedField( + responseContext + ); + }); + }); + } + /** - * Incident todo payload. - * @type IncidentTodoPatchRequest + * Create a Zoom configuration for incidents. + * @param param The request object */ - body: IncidentTodoPatchRequest; -} + public createIncidentZoomConfiguration( + param: IncidentsApiCreateIncidentZoomConfigurationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createIncidentZoomConfiguration( + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentZoomConfiguration( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateIncidentTypeRequest { /** - * The UUID of the incident type. - * @type string + * Create a Zoom meeting for a given incident. + * @param param The request object */ - incidentTypeId: string; + public createIncidentZoomMeeting( + param: IncidentsApiCreateIncidentZoomMeetingRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.createIncidentZoomMeeting( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createIncidentZoomMeeting( + responseContext + ); + }); + }); + } + /** - * Incident type payload. - * @type IncidentTypePatchRequest + * Create an email subscription for a status page. + * @param param The request object */ - body: IncidentTypePatchRequest; -} + public createStatuspageEmailSubscription( + param: IncidentsApiCreateStatuspageEmailSubscriptionRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.createStatuspageEmailSubscription( + param.pageId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.createStatuspageEmailSubscription( + responseContext + ); + }); + }); + } -export interface IncidentsApiUpdateIncidentUserDefinedFieldRequest { /** - * The ID of the incident user-defined field. - * @type string + * Delete a global incident handle. + * @param param The request object */ - fieldId: string; + public deleteGlobalIncidentHandle(options?: Configuration): Promise { + const requestContextPromise = + this.requestFactory.deleteGlobalIncidentHandle(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteGlobalIncidentHandle( + responseContext + ); + }); + }); + } + /** - * Incident user-defined field update payload. - * @type IncidentUserDefinedFieldUpdateRequest + * Deletes an existing incident from the users organization. + * @param param The request object */ - body: IncidentUserDefinedFieldUpdateRequest; + public deleteIncident( + param: IncidentsApiDeleteIncidentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteIncident( + param.incidentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteIncident(responseContext); + }); + }); + } + /** - * Comma-separated list of related resources to include. Supported values are "last_modified_by_user", "created_by_user", and "incident_type". - * @type string + * @param param The request object */ - include?: string; -} - -export class IncidentsApi { - private requestFactory: IncidentsApiRequestFactory; - private responseProcessor: IncidentsApiResponseProcessor; - private configuration: Configuration; - - public constructor( - configuration: Configuration, - requestFactory?: IncidentsApiRequestFactory, - responseProcessor?: IncidentsApiResponseProcessor - ) { - this.configuration = configuration; - this.requestFactory = - requestFactory || new IncidentsApiRequestFactory(configuration); - this.responseProcessor = - responseProcessor || new IncidentsApiResponseProcessor(); + public deleteIncidentAttachment( + param: IncidentsApiDeleteIncidentAttachmentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.deleteIncidentAttachment( + param.incidentId, + param.attachmentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteIncidentAttachment( + responseContext + ); + }); + }); } /** - * Create a new global incident handle. + * Delete a communication for a given incident. * @param param The request object */ - public createGlobalIncidentHandle( - param: IncidentsApiCreateGlobalIncidentHandleRequest, + public deleteIncidentCommunication( + param: IncidentsApiDeleteIncidentCommunicationRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.createGlobalIncidentHandle( - param.body, - param.include, + this.requestFactory.deleteIncidentCommunication( + param.incidentId, + param.communicationId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createGlobalIncidentHandle( + return this.responseProcessor.deleteIncidentCommunication( responseContext ); }); @@ -7558,45 +16003,45 @@ export class IncidentsApi { } /** - * Create an incident. + * Delete an incident impact. * @param param The request object */ - public createIncident( - param: IncidentsApiCreateIncidentRequest, + public deleteIncidentImpact( + param: IncidentsApiDeleteIncidentImpactRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.createIncident( - param.body, + ): Promise { + const requestContextPromise = this.requestFactory.deleteIncidentImpact( + param.incidentId, + param.impactId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncident(responseContext); + return this.responseProcessor.deleteIncidentImpact(responseContext); }); }); } /** - * Create an incident attachment. + * Delete an incident integration metadata. * @param param The request object */ - public createIncidentAttachment( - param: IncidentsApiCreateIncidentAttachmentRequest, + public deleteIncidentIntegration( + param: IncidentsApiDeleteIncidentIntegrationRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.createIncidentAttachment( + ): Promise { + const requestContextPromise = this.requestFactory.deleteIncidentIntegration( param.incidentId, - param.body, - param.include, + param.integrationMetadataId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentAttachment( + return this.responseProcessor.deleteIncidentIntegration( responseContext ); }); @@ -7604,46 +16049,45 @@ export class IncidentsApi { } /** - * Create an impact for an incident. + * Delete an incident Jira template by its identifier. * @param param The request object */ - public createIncidentImpact( - param: IncidentsApiCreateIncidentImpactRequest, + public deleteIncidentJiraTemplate( + param: IncidentsApiDeleteIncidentJiraTemplateRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.createIncidentImpact( - param.incidentId, - param.body, - param.include, - options - ); + ): Promise { + const requestContextPromise = + this.requestFactory.deleteIncidentJiraTemplate(param.templateId, options); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentImpact(responseContext); + return this.responseProcessor.deleteIncidentJiraTemplate( + responseContext + ); }); }); } /** - * Create an incident integration metadata. + * Deletes a notification rule by its ID. * @param param The request object */ - public createIncidentIntegration( - param: IncidentsApiCreateIncidentIntegrationRequest, + public deleteIncidentNotificationRule( + param: IncidentsApiDeleteIncidentNotificationRuleRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.createIncidentIntegration( - param.incidentId, - param.body, - options - ); + ): Promise { + const requestContextPromise = + this.requestFactory.deleteIncidentNotificationRule( + param.id, + param.include, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentIntegration( + return this.responseProcessor.deleteIncidentNotificationRule( responseContext ); }); @@ -7651,20 +16095,24 @@ export class IncidentsApi { } /** - * Creates a new notification rule. + * Deletes a notification template by its ID. * @param param The request object */ - public createIncidentNotificationRule( - param: IncidentsApiCreateIncidentNotificationRuleRequest, + public deleteIncidentNotificationTemplate( + param: IncidentsApiDeleteIncidentNotificationTemplateRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.createIncidentNotificationRule(param.body, options); + this.requestFactory.deleteIncidentNotificationTemplate( + param.id, + param.include, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentNotificationRule( + return this.responseProcessor.deleteIncidentNotificationTemplate( responseContext ); }); @@ -7672,23 +16120,23 @@ export class IncidentsApi { } /** - * Creates a new notification template. + * Delete a postmortem template. * @param param The request object */ - public createIncidentNotificationTemplate( - param: IncidentsApiCreateIncidentNotificationTemplateRequest, + public deleteIncidentPostmortemTemplate( + param: IncidentsApiDeleteIncidentPostmortemTemplateRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.createIncidentNotificationTemplate( - param.body, + this.requestFactory.deleteIncidentPostmortemTemplate( + param.templateId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentNotificationTemplate( + return this.responseProcessor.deleteIncidentPostmortemTemplate( responseContext ); }); @@ -7696,28 +16144,23 @@ export class IncidentsApi { } /** - * Create a postmortem attachment for an incident. - * - * The endpoint accepts markdown for notebooks created in Confluence or Google Docs. - * Postmortems created from notebooks need to be formatted using frontend notebook cells, - * in addition to markdown format. + * Delete a role assignment by its identifier. * @param param The request object */ - public createIncidentPostmortemAttachment( - param: IncidentsApiCreateIncidentPostmortemAttachmentRequest, + public deleteIncidentRoleAssignment( + param: IncidentsApiDeleteIncidentRoleAssignmentRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.createIncidentPostmortemAttachment( - param.incidentId, - param.body, + this.requestFactory.deleteIncidentRoleAssignment( + param.roleAssignmentId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentPostmortemAttachment( + return this.responseProcessor.deleteIncidentRoleAssignment( responseContext ); }); @@ -7725,20 +16168,24 @@ export class IncidentsApi { } /** - * Create a new postmortem template for incidents. + * Delete a timeline entry for a given incident. * @param param The request object */ - public createIncidentPostmortemTemplate( - param: IncidentsApiCreateIncidentPostmortemTemplateRequest, + public deleteIncidentTimelineEntry( + param: IncidentsApiDeleteIncidentTimelineEntryRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.createIncidentPostmortemTemplate(param.body, options); + this.requestFactory.deleteIncidentTimelineEntry( + param.incidentId, + param.timelineEntryId, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentPostmortemTemplate( + return this.responseProcessor.deleteIncidentTimelineEntry( responseContext ); }); @@ -7746,67 +16193,66 @@ export class IncidentsApi { } /** - * Create an incident todo. + * Delete an incident todo. * @param param The request object */ - public createIncidentTodo( - param: IncidentsApiCreateIncidentTodoRequest, + public deleteIncidentTodo( + param: IncidentsApiDeleteIncidentTodoRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.createIncidentTodo( + ): Promise { + const requestContextPromise = this.requestFactory.deleteIncidentTodo( param.incidentId, - param.body, + param.todoId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentTodo(responseContext); + return this.responseProcessor.deleteIncidentTodo(responseContext); }); }); } /** - * Create an incident type. + * Delete an incident type. * @param param The request object */ - public createIncidentType( - param: IncidentsApiCreateIncidentTypeRequest, + public deleteIncidentType( + param: IncidentsApiDeleteIncidentTypeRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.createIncidentType( - param.body, + ): Promise { + const requestContextPromise = this.requestFactory.deleteIncidentType( + param.incidentTypeId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentType(responseContext); + return this.responseProcessor.deleteIncidentType(responseContext); }); }); } /** - * Create an incident user-defined field. + * Delete an incident user-defined field. * @param param The request object */ - public createIncidentUserDefinedField( - param: IncidentsApiCreateIncidentUserDefinedFieldRequest, + public deleteIncidentUserDefinedField( + param: IncidentsApiDeleteIncidentUserDefinedFieldRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.createIncidentUserDefinedField( - param.body, - param.include, + this.requestFactory.deleteIncidentUserDefinedField( + param.fieldId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.createIncidentUserDefinedField( + return this.responseProcessor.deleteIncidentUserDefinedField( responseContext ); }); @@ -7814,107 +16260,110 @@ export class IncidentsApi { } /** - * Delete a global incident handle. + * Export incidents matching a search query as a CSV file. * @param param The request object */ - public deleteGlobalIncidentHandle(options?: Configuration): Promise { - const requestContextPromise = - this.requestFactory.deleteGlobalIncidentHandle(options); + public exportIncidents( + param: IncidentsApiExportIncidentsRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.exportIncidents( + param.body, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteGlobalIncidentHandle( - responseContext - ); + return this.responseProcessor.exportIncidents(responseContext); }); }); } /** - * Deletes an existing incident from the users organization. + * Retrieve global incident settings for the organization. * @param param The request object */ - public deleteIncident( - param: IncidentsApiDeleteIncidentRequest, + public getGlobalIncidentSettings( options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.deleteIncident( - param.incidentId, - options - ); + ): Promise { + const requestContextPromise = + this.requestFactory.getGlobalIncidentSettings(options); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncident(responseContext); + return this.responseProcessor.getGlobalIncidentSettings( + responseContext + ); }); }); } /** + * Get the details of an incident by `incident_id`. * @param param The request object */ - public deleteIncidentAttachment( - param: IncidentsApiDeleteIncidentAttachmentRequest, + public getIncident( + param: IncidentsApiGetIncidentRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.deleteIncidentAttachment( + ): Promise { + const requestContextPromise = this.requestFactory.getIncident( param.incidentId, - param.attachmentId, + param.include, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncidentAttachment( - responseContext - ); + return this.responseProcessor.getIncident(responseContext); }); }); } /** - * Delete an incident impact. + * Get automation data for a given incident and key. * @param param The request object */ - public deleteIncidentImpact( - param: IncidentsApiDeleteIncidentImpactRequest, + public getIncidentAutomationData( + param: IncidentsApiGetIncidentAutomationDataRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.deleteIncidentImpact( + ): Promise { + const requestContextPromise = this.requestFactory.getIncidentAutomationData( param.incidentId, - param.impactId, + param.key, + param.include, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncidentImpact(responseContext); + return this.responseProcessor.getIncidentAutomationData( + responseContext + ); }); }); } /** - * Delete an incident integration metadata. + * Get the source link for a case associated with an incident. * @param param The request object */ - public deleteIncidentIntegration( - param: IncidentsApiDeleteIncidentIntegrationRequest, + public getIncidentCaseSourceLink( + param: IncidentsApiGetIncidentCaseSourceLinkRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.deleteIncidentIntegration( + ): Promise { + const requestContextPromise = this.requestFactory.getIncidentCaseSourceLink( param.incidentId, - param.integrationMetadataId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncidentIntegration( + return this.responseProcessor.getIncidentCaseSourceLink( responseContext ); }); @@ -7922,24 +16371,23 @@ export class IncidentsApi { } /** - * Deletes a notification rule by its ID. + * Get the details of a communication for a given incident. * @param param The request object */ - public deleteIncidentNotificationRule( - param: IncidentsApiDeleteIncidentNotificationRuleRequest, + public getIncidentCommunication( + param: IncidentsApiGetIncidentCommunicationRequest, options?: Configuration - ): Promise { - const requestContextPromise = - this.requestFactory.deleteIncidentNotificationRule( - param.id, - param.include, - options - ); + ): Promise { + const requestContextPromise = this.requestFactory.getIncidentCommunication( + param.incidentId, + param.communicationId, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncidentNotificationRule( + return this.responseProcessor.getIncidentCommunication( responseContext ); }); @@ -7947,48 +16395,44 @@ export class IncidentsApi { } /** - * Deletes a notification template by its ID. + * Get incident integration metadata details. * @param param The request object */ - public deleteIncidentNotificationTemplate( - param: IncidentsApiDeleteIncidentNotificationTemplateRequest, + public getIncidentIntegration( + param: IncidentsApiGetIncidentIntegrationRequest, options?: Configuration - ): Promise { - const requestContextPromise = - this.requestFactory.deleteIncidentNotificationTemplate( - param.id, - param.include, - options - ); + ): Promise { + const requestContextPromise = this.requestFactory.getIncidentIntegration( + param.incidentId, + param.integrationMetadataId, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncidentNotificationTemplate( - responseContext - ); + return this.responseProcessor.getIncidentIntegration(responseContext); }); }); } /** - * Delete a postmortem template. + * Get the details of an incident Jira template by its identifier. * @param param The request object */ - public deleteIncidentPostmortemTemplate( - param: IncidentsApiDeleteIncidentPostmortemTemplateRequest, + public getIncidentJiraTemplate( + param: IncidentsApiGetIncidentJiraTemplateRequest, options?: Configuration - ): Promise { - const requestContextPromise = - this.requestFactory.deleteIncidentPostmortemTemplate( - param.templateId, - options - ); + ): Promise { + const requestContextPromise = this.requestFactory.getIncidentJiraTemplate( + param.templateId, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncidentPostmortemTemplate( + return this.responseProcessor.getIncidentJiraTemplate( responseContext ); }); @@ -7996,66 +16440,73 @@ export class IncidentsApi { } /** - * Delete an incident todo. + * Retrieves a specific notification rule by its ID. * @param param The request object - */ - public deleteIncidentTodo( - param: IncidentsApiDeleteIncidentTodoRequest, - options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.deleteIncidentTodo( - param.incidentId, - param.todoId, - options - ); + */ + public getIncidentNotificationRule( + param: IncidentsApiGetIncidentNotificationRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getIncidentNotificationRule( + param.id, + param.include, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncidentTodo(responseContext); + return this.responseProcessor.getIncidentNotificationRule( + responseContext + ); }); }); } /** - * Delete an incident type. + * Retrieves a specific notification template by its ID. * @param param The request object */ - public deleteIncidentType( - param: IncidentsApiDeleteIncidentTypeRequest, + public getIncidentNotificationTemplate( + param: IncidentsApiGetIncidentNotificationTemplateRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.deleteIncidentType( - param.incidentTypeId, - options - ); + ): Promise { + const requestContextPromise = + this.requestFactory.getIncidentNotificationTemplate( + param.id, + param.include, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncidentType(responseContext); + return this.responseProcessor.getIncidentNotificationTemplate( + responseContext + ); }); }); } /** - * Delete an incident user-defined field. + * Get the list of Datadog incidents attached to a PagerDuty incident. * @param param The request object */ - public deleteIncidentUserDefinedField( - param: IncidentsApiDeleteIncidentUserDefinedFieldRequest, + public getIncidentPagerdutyRelatedIncidents( + param: IncidentsApiGetIncidentPagerdutyRelatedIncidentsRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.deleteIncidentUserDefinedField( - param.fieldId, + this.requestFactory.getIncidentPagerdutyRelatedIncidents( + param.pagerdutyIncidentId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.deleteIncidentUserDefinedField( + return this.responseProcessor.getIncidentPagerdutyRelatedIncidents( responseContext ); }); @@ -8063,19 +16514,22 @@ export class IncidentsApi { } /** - * Retrieve global incident settings for the organization. + * Get the source link for a page associated with an incident. * @param param The request object */ - public getGlobalIncidentSettings( + public getIncidentPageSourceLink( + param: IncidentsApiGetIncidentPageSourceLinkRequest, options?: Configuration - ): Promise { - const requestContextPromise = - this.requestFactory.getGlobalIncidentSettings(options); + ): Promise { + const requestContextPromise = this.requestFactory.getIncidentPageSourceLink( + param.incidentId, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.getGlobalIncidentSettings( + return this.responseProcessor.getIncidentPageSourceLink( responseContext ); }); @@ -8083,68 +16537,69 @@ export class IncidentsApi { } /** - * Get the details of an incident by `incident_id`. + * Retrieve details of a specific postmortem template. * @param param The request object */ - public getIncident( - param: IncidentsApiGetIncidentRequest, + public getIncidentPostmortemTemplate( + param: IncidentsApiGetIncidentPostmortemTemplateRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.getIncident( - param.incidentId, - param.include, - options - ); + ): Promise { + const requestContextPromise = + this.requestFactory.getIncidentPostmortemTemplate( + param.templateId, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.getIncident(responseContext); + return this.responseProcessor.getIncidentPostmortemTemplate( + responseContext + ); }); }); } /** - * Get incident integration metadata details. + * Get the details of a reserved role by its identifier. * @param param The request object */ - public getIncidentIntegration( - param: IncidentsApiGetIncidentIntegrationRequest, + public getIncidentReservedRole( + param: IncidentsApiGetIncidentReservedRoleRequest, options?: Configuration - ): Promise { - const requestContextPromise = this.requestFactory.getIncidentIntegration( - param.incidentId, - param.integrationMetadataId, + ): Promise { + const requestContextPromise = this.requestFactory.getIncidentReservedRole( + param.roleId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.getIncidentIntegration(responseContext); + return this.responseProcessor.getIncidentReservedRole( + responseContext + ); }); }); } /** - * Retrieves a specific notification rule by its ID. + * Get the details of a role assignment by its identifier. * @param param The request object */ - public getIncidentNotificationRule( - param: IncidentsApiGetIncidentNotificationRuleRequest, + public getIncidentRoleAssignment( + param: IncidentsApiGetIncidentRoleAssignmentRequest, options?: Configuration - ): Promise { - const requestContextPromise = - this.requestFactory.getIncidentNotificationRule( - param.id, - param.include, - options - ); + ): Promise { + const requestContextPromise = this.requestFactory.getIncidentRoleAssignment( + param.roleAssignmentId, + options + ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.getIncidentNotificationRule( + return this.responseProcessor.getIncidentRoleAssignment( responseContext ); }); @@ -8152,24 +16607,23 @@ export class IncidentsApi { } /** - * Retrieves a specific notification template by its ID. + * Get an AI-generated suggestion for a status page notice for a given incident. * @param param The request object */ - public getIncidentNotificationTemplate( - param: IncidentsApiGetIncidentNotificationTemplateRequest, + public getIncidentStatusPagesSuggestion( + param: IncidentsApiGetIncidentStatusPagesSuggestionRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.getIncidentNotificationTemplate( - param.id, - param.include, + this.requestFactory.getIncidentStatusPagesSuggestion( + param.incidentId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.getIncidentNotificationTemplate( + return this.responseProcessor.getIncidentStatusPagesSuggestion( responseContext ); }); @@ -8177,23 +16631,24 @@ export class IncidentsApi { } /** - * Retrieve details of a specific postmortem template. + * Get the thread entries for a given timeline entry. * @param param The request object */ - public getIncidentPostmortemTemplate( - param: IncidentsApiGetIncidentPostmortemTemplateRequest, + public getIncidentTimelineEntryThread( + param: IncidentsApiGetIncidentTimelineEntryThreadRequest, options?: Configuration - ): Promise { + ): Promise { const requestContextPromise = - this.requestFactory.getIncidentPostmortemTemplate( - param.templateId, + this.requestFactory.getIncidentTimelineEntryThread( + param.incidentId, + param.timelineEntryId, options ); return requestContextPromise.then((requestContext) => { return this.configuration.httpApi .send(requestContext) .then((responseContext) => { - return this.responseProcessor.getIncidentPostmortemTemplate( + return this.responseProcessor.getIncidentTimelineEntryThread( responseContext ); }); @@ -8268,6 +16723,26 @@ export class IncidentsApi { }); } + /** + * Get the subscription preferences for the current user. + * @param param The request object + */ + public getStatuspageSubscriptionPreferences( + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.getStatuspageSubscriptionPreferences(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.getStatuspageSubscriptionPreferences( + responseContext + ); + }); + }); + } + /** * Import an incident from an external system. This endpoint allows you to create incidents with * historical data such as custom timestamps for detection, declaration, and resolution. @@ -8340,6 +16815,31 @@ export class IncidentsApi { }); } + /** + * List all communications for a given incident. + * @param param The request object + */ + public listIncidentCommunications( + param: IncidentsApiListIncidentCommunicationsRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listIncidentCommunications( + param.incidentId, + param.filterCommunicationType, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listIncidentCommunications( + responseContext + ); + }); + }); + } + /** * Get all impacts for an incident. * @param param The request object @@ -8385,6 +16885,31 @@ export class IncidentsApi { }); } + /** + * List all incident Jira templates for the organization. + * @param param The request object + */ + public listIncidentJiraTemplates( + param: IncidentsApiListIncidentJiraTemplatesRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.listIncidentJiraTemplates( + param.isDefault, + param.incidentTypeId, + param.templateType, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listIncidentJiraTemplates( + responseContext + ); + }); + }); + } + /** * Lists all notification rules for the organization. Optionally filter by incident type. * @param param The request object @@ -8431,6 +16956,30 @@ export class IncidentsApi { }); } + /** + * List all PagerDuty services configured for the organization. + * @param param The request object + */ + public listIncidentPagerdutyServices( + param: IncidentsApiListIncidentPagerdutyServicesRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listIncidentPagerdutyServices( + param.includeUnresolved, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listIncidentPagerdutyServices( + responseContext + ); + }); + }); + } + /** * Retrieve a list of all postmortem templates for incidents. * @param param The request object @@ -8451,6 +17000,50 @@ export class IncidentsApi { }); } + /** + * List all reserved roles for incidents. + * @param param The request object + */ + public listIncidentReservedRoles( + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listIncidentReservedRoles(options); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listIncidentReservedRoles( + responseContext + ); + }); + }); + } + + /** + * List all rule execution states for a given incident. + * @param param The request object + */ + public listIncidentRuleExecutionStates( + param: IncidentsApiListIncidentRuleExecutionStatesRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listIncidentRuleExecutionStates( + param.incidentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listIncidentRuleExecutionStates( + responseContext + ); + }); + }); + } + /** * Get all incidents for the user's organization. * @param param The request object @@ -8500,23 +17093,72 @@ export class IncidentsApi { const response = await this.responseProcessor.listIncidents( 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; - } - } + 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; + } + } + } + + /** + * List all available template variables for incident templates. + * @param param The request object + */ + public listIncidentTemplateVariables( + param: IncidentsApiListIncidentTemplateVariablesRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listIncidentTemplateVariables( + param.filterIncidentType, + param.includeFollowUps, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listIncidentTemplateVariables( + responseContext + ); + }); + }); + } + + /** + * Get the timeline for a given incident. + * @param param The request object + */ + public listIncidentTimelineEntries( + param: IncidentsApiListIncidentTimelineEntriesRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listIncidentTimelineEntries( + param.incidentId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listIncidentTimelineEntries( + responseContext + ); + }); + }); } /** @@ -8589,6 +17231,78 @@ export class IncidentsApi { }); } + /** + * List all email subscriptions for a status page. + * @param param The request object + */ + public listStatuspageEmailSubscriptions( + param: IncidentsApiListStatuspageEmailSubscriptionsRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listStatuspageEmailSubscriptions( + param.pageId, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listStatuspageEmailSubscriptions( + responseContext + ); + }); + }); + } + + /** + * Partially updates an existing notification rule. + * @param param The request object + */ + public patchIncidentNotificationRule( + param: IncidentsApiPatchIncidentNotificationRuleRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.patchIncidentNotificationRule( + param.id, + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.patchIncidentNotificationRule( + responseContext + ); + }); + }); + } + + /** + * Render a template with incident-specific data. + * @param param The request object + */ + public renderIncidentTemplate( + param: IncidentsApiRenderIncidentTemplateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.renderIncidentTemplate( + param.incidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.renderIncidentTemplate(responseContext); + }); + }); + } + /** * Search for incidents matching a certain query. * @param param The request object @@ -8669,6 +17383,35 @@ export class IncidentsApi { } } + /** + * Search for incidents using advanced filtering and pagination. + * @param param The request object + */ + public searchIncidentsV2( + param: IncidentsApiSearchIncidentsV2Request = {}, + options?: Configuration + ): Promise { + const requestContextPromise = this.requestFactory.searchIncidentsV2( + param.query, + param.sort, + param.withFacets, + param.filterWithDeleted, + param.semanticQuery, + param.timeZone, + param.include, + param.pageSize, + param.pageOffset, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.searchIncidentsV2(responseContext); + }); + }); + } + /** * Update an existing global incident handle. * @param param The request object @@ -8763,6 +17506,32 @@ export class IncidentsApi { }); } + /** + * Update a communication for a given incident. + * @param param The request object + */ + public updateIncidentCommunication( + param: IncidentsApiUpdateIncidentCommunicationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateIncidentCommunication( + param.incidentId, + param.communicationId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIncidentCommunication( + responseContext + ); + }); + }); + } + /** * Update an existing incident integration metadata. * @param param The request object @@ -8788,6 +17557,57 @@ export class IncidentsApi { }); } + /** + * Update an existing incident Jira template. + * @param param The request object + */ + public updateIncidentJiraTemplate( + param: IncidentsApiUpdateIncidentJiraTemplateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateIncidentJiraTemplate( + param.templateId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIncidentJiraTemplate( + responseContext + ); + }); + }); + } + + /** + * Update a Microsoft Teams configuration for incidents. + * @param param The request object + */ + public updateIncidentMicrosoftTeamsConfiguration( + param: IncidentsApiUpdateIncidentMicrosoftTeamsConfigurationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateIncidentMicrosoftTeamsConfiguration( + param.configurationId, + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIncidentMicrosoftTeamsConfiguration( + responseContext + ); + }); + }); + } + /** * Updates an existing notification rule with a complete replacement. * @param param The request object @@ -8865,6 +17685,87 @@ export class IncidentsApi { }); } + /** + * Update a Statuspage incident linked to a Datadog incident. + * @param param The request object + */ + public updateIncidentStatuspageIncident( + param: IncidentsApiUpdateIncidentStatuspageIncidentRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateIncidentStatuspageIncident( + param.incidentId, + param.pageId, + param.statuspageIncidentId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIncidentStatuspageIncident( + responseContext + ); + }); + }); + } + + /** + * Update a status page notice for a given incident. + * @param param The request object + */ + public updateIncidentStatusPageNotice( + param: IncidentsApiUpdateIncidentStatusPageNoticeRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateIncidentStatusPageNotice( + param.incidentId, + param.statuspageId, + param.noticeId, + param.body, + param.notifySubscribers, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIncidentStatusPageNotice( + responseContext + ); + }); + }); + } + + /** + * Update a timeline entry for a given incident. + * @param param The request object + */ + public updateIncidentTimelineEntry( + param: IncidentsApiUpdateIncidentTimelineEntryRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateIncidentTimelineEntry( + param.incidentId, + param.timelineEntryId, + param.body, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIncidentTimelineEntry( + responseContext + ); + }); + }); + } + /** * Update an incident todo. * @param param The request object @@ -8935,4 +17836,57 @@ export class IncidentsApi { }); }); } + + /** + * Update a Zoom configuration for incidents. + * @param param The request object + */ + public updateIncidentZoomConfiguration( + param: IncidentsApiUpdateIncidentZoomConfigurationRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateIncidentZoomConfiguration( + param.configurationId, + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIncidentZoomConfiguration( + responseContext + ); + }); + }); + } + + /** + * Create or update automation data for a given incident and key. + * @param param The request object + */ + public upsertIncidentAutomationData( + param: IncidentsApiUpsertIncidentAutomationDataRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.upsertIncidentAutomationData( + param.incidentId, + param.key, + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.upsertIncidentAutomationData( + responseContext + ); + }); + }); + } } diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index adddf2eef454..9f2897992f6a 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -571,59 +571,107 @@ export { } from "./apis/IncidentServicesApi"; export { + IncidentsApiBatchCreateIncidentRuleExecutionStatesRequest, + IncidentsApiBatchUpdateIncidentRuleExecutionStatesRequest, IncidentsApiCreateGlobalIncidentHandleRequest, IncidentsApiCreateIncidentRequest, IncidentsApiCreateIncidentAttachmentRequest, + IncidentsApiCreateIncidentCommunicationRequest, + IncidentsApiCreateIncidentGoogleMeetSpaceRequest, IncidentsApiCreateIncidentImpactRequest, IncidentsApiCreateIncidentIntegrationRequest, + IncidentsApiCreateIncidentJiraIssueRequest, + IncidentsApiCreateIncidentJiraTemplateRequest, + IncidentsApiCreateIncidentMSTeamsOnlineMeetingRequest, + IncidentsApiCreateIncidentMicrosoftTeamsConfigurationRequest, IncidentsApiCreateIncidentNotificationRuleRequest, IncidentsApiCreateIncidentNotificationTemplateRequest, IncidentsApiCreateIncidentPostmortemAttachmentRequest, IncidentsApiCreateIncidentPostmortemTemplateRequest, + IncidentsApiCreateIncidentRoleAssignmentRequest, + IncidentsApiCreateIncidentStatusPageNoticeRequest, + IncidentsApiCreateIncidentStatuspageIncidentRequest, + IncidentsApiCreateIncidentTimelineEntryRequest, IncidentsApiCreateIncidentTodoRequest, IncidentsApiCreateIncidentTypeRequest, IncidentsApiCreateIncidentUserDefinedFieldRequest, + IncidentsApiCreateIncidentZoomConfigurationRequest, + IncidentsApiCreateIncidentZoomMeetingRequest, + IncidentsApiCreateStatuspageEmailSubscriptionRequest, IncidentsApiDeleteIncidentRequest, IncidentsApiDeleteIncidentAttachmentRequest, + IncidentsApiDeleteIncidentCommunicationRequest, IncidentsApiDeleteIncidentImpactRequest, IncidentsApiDeleteIncidentIntegrationRequest, + IncidentsApiDeleteIncidentJiraTemplateRequest, IncidentsApiDeleteIncidentNotificationRuleRequest, IncidentsApiDeleteIncidentNotificationTemplateRequest, IncidentsApiDeleteIncidentPostmortemTemplateRequest, + IncidentsApiDeleteIncidentRoleAssignmentRequest, + IncidentsApiDeleteIncidentTimelineEntryRequest, IncidentsApiDeleteIncidentTodoRequest, IncidentsApiDeleteIncidentTypeRequest, IncidentsApiDeleteIncidentUserDefinedFieldRequest, + IncidentsApiExportIncidentsRequest, IncidentsApiGetIncidentRequest, + IncidentsApiGetIncidentAutomationDataRequest, + IncidentsApiGetIncidentCaseSourceLinkRequest, + IncidentsApiGetIncidentCommunicationRequest, IncidentsApiGetIncidentIntegrationRequest, + IncidentsApiGetIncidentJiraTemplateRequest, IncidentsApiGetIncidentNotificationRuleRequest, IncidentsApiGetIncidentNotificationTemplateRequest, + IncidentsApiGetIncidentPageSourceLinkRequest, + IncidentsApiGetIncidentPagerdutyRelatedIncidentsRequest, IncidentsApiGetIncidentPostmortemTemplateRequest, + IncidentsApiGetIncidentReservedRoleRequest, + IncidentsApiGetIncidentRoleAssignmentRequest, + IncidentsApiGetIncidentStatusPagesSuggestionRequest, + IncidentsApiGetIncidentTimelineEntryThreadRequest, IncidentsApiGetIncidentTodoRequest, IncidentsApiGetIncidentTypeRequest, IncidentsApiGetIncidentUserDefinedFieldRequest, IncidentsApiImportIncidentRequest, IncidentsApiListGlobalIncidentHandlesRequest, IncidentsApiListIncidentAttachmentsRequest, + IncidentsApiListIncidentCommunicationsRequest, IncidentsApiListIncidentImpactsRequest, IncidentsApiListIncidentIntegrationsRequest, + IncidentsApiListIncidentJiraTemplatesRequest, IncidentsApiListIncidentNotificationRulesRequest, IncidentsApiListIncidentNotificationTemplatesRequest, + IncidentsApiListIncidentPagerdutyServicesRequest, + IncidentsApiListIncidentRuleExecutionStatesRequest, + IncidentsApiListIncidentTemplateVariablesRequest, + IncidentsApiListIncidentTimelineEntriesRequest, IncidentsApiListIncidentTodosRequest, IncidentsApiListIncidentTypesRequest, IncidentsApiListIncidentUserDefinedFieldsRequest, IncidentsApiListIncidentsRequest, + IncidentsApiListStatuspageEmailSubscriptionsRequest, + IncidentsApiPatchIncidentNotificationRuleRequest, + IncidentsApiRenderIncidentTemplateRequest, IncidentsApiSearchIncidentsRequest, + IncidentsApiSearchIncidentsV2Request, IncidentsApiUpdateGlobalIncidentHandleRequest, IncidentsApiUpdateGlobalIncidentSettingsRequest, IncidentsApiUpdateIncidentRequest, IncidentsApiUpdateIncidentAttachmentRequest, + IncidentsApiUpdateIncidentCommunicationRequest, IncidentsApiUpdateIncidentIntegrationRequest, + IncidentsApiUpdateIncidentJiraTemplateRequest, + IncidentsApiUpdateIncidentMicrosoftTeamsConfigurationRequest, IncidentsApiUpdateIncidentNotificationRuleRequest, IncidentsApiUpdateIncidentNotificationTemplateRequest, IncidentsApiUpdateIncidentPostmortemTemplateRequest, + IncidentsApiUpdateIncidentStatusPageNoticeRequest, + IncidentsApiUpdateIncidentStatuspageIncidentRequest, + IncidentsApiUpdateIncidentTimelineEntryRequest, IncidentsApiUpdateIncidentTodoRequest, IncidentsApiUpdateIncidentTypeRequest, IncidentsApiUpdateIncidentUserDefinedFieldRequest, + IncidentsApiUpdateIncidentZoomConfigurationRequest, + IncidentsApiUpsertIncidentAutomationDataRequest, IncidentsApi, } from "./apis/IncidentsApi"; @@ -3605,15 +3653,51 @@ export { HTTPTokenAuthType } from "./models/HTTPTokenAuthType"; export { HTTPTokenAuthUpdate } from "./models/HTTPTokenAuthUpdate"; export { HTTPTokenUpdate } from "./models/HTTPTokenUpdate"; export { IncidentAttachmentType } from "./models/IncidentAttachmentType"; +export { IncidentAutomationDataAttributesRequest } from "./models/IncidentAutomationDataAttributesRequest"; +export { IncidentAutomationDataAttributesResponse } from "./models/IncidentAutomationDataAttributesResponse"; +export { IncidentAutomationDataDataRequest } from "./models/IncidentAutomationDataDataRequest"; +export { IncidentAutomationDataDataResponse } from "./models/IncidentAutomationDataDataResponse"; +export { IncidentAutomationDataRequest } from "./models/IncidentAutomationDataRequest"; +export { IncidentAutomationDataResponse } from "./models/IncidentAutomationDataResponse"; +export { IncidentAutomationDataType } from "./models/IncidentAutomationDataType"; +export { IncidentBatchCreateRuleExecutionStatesData } from "./models/IncidentBatchCreateRuleExecutionStatesData"; +export { IncidentBatchCreateRuleExecutionStatesDataAttributes } from "./models/IncidentBatchCreateRuleExecutionStatesDataAttributes"; +export { IncidentBatchCreateRuleExecutionStatesRequest } from "./models/IncidentBatchCreateRuleExecutionStatesRequest"; +export { IncidentBatchUpdateRuleExecutionStatesData } from "./models/IncidentBatchUpdateRuleExecutionStatesData"; +export { IncidentBatchUpdateRuleExecutionStatesDataAttributes } from "./models/IncidentBatchUpdateRuleExecutionStatesDataAttributes"; +export { IncidentBatchUpdateRuleExecutionStatesRequest } from "./models/IncidentBatchUpdateRuleExecutionStatesRequest"; +export { IncidentCaseLinkData } from "./models/IncidentCaseLinkData"; +export { IncidentCaseLinkDataAttributes } from "./models/IncidentCaseLinkDataAttributes"; +export { IncidentCaseLinkResponse } from "./models/IncidentCaseLinkResponse"; +export { IncidentCaseLinkType } from "./models/IncidentCaseLinkType"; +export { IncidentCommunicationContent } from "./models/IncidentCommunicationContent"; +export { IncidentCommunicationContentHandle } from "./models/IncidentCommunicationContentHandle"; +export { IncidentCommunicationDataAttributesRequest } from "./models/IncidentCommunicationDataAttributesRequest"; +export { IncidentCommunicationDataAttributesResponse } from "./models/IncidentCommunicationDataAttributesResponse"; +export { IncidentCommunicationDataRequest } from "./models/IncidentCommunicationDataRequest"; +export { IncidentCommunicationDataResponse } from "./models/IncidentCommunicationDataResponse"; +export { IncidentCommunicationKind } from "./models/IncidentCommunicationKind"; +export { IncidentCommunicationRequest } from "./models/IncidentCommunicationRequest"; +export { IncidentCommunicationResponse } from "./models/IncidentCommunicationResponse"; +export { IncidentCommunicationsResponse } from "./models/IncidentCommunicationsResponse"; +export { IncidentCommunicationType } from "./models/IncidentCommunicationType"; export { IncidentCreateAttributes } from "./models/IncidentCreateAttributes"; export { IncidentCreateData } from "./models/IncidentCreateData"; export { IncidentCreateRelationships } from "./models/IncidentCreateRelationships"; export { IncidentCreateRequest } from "./models/IncidentCreateRequest"; +export { IncidentCreateZoomMeetingData } from "./models/IncidentCreateZoomMeetingData"; +export { IncidentCreateZoomMeetingDataAttributes } from "./models/IncidentCreateZoomMeetingDataAttributes"; +export { IncidentCreateZoomMeetingRequest } from "./models/IncidentCreateZoomMeetingRequest"; export { IncidentFieldAttributes } from "./models/IncidentFieldAttributes"; export { IncidentFieldAttributesMultipleValue } from "./models/IncidentFieldAttributesMultipleValue"; export { IncidentFieldAttributesSingleValue } from "./models/IncidentFieldAttributesSingleValue"; export { IncidentFieldAttributesSingleValueType } from "./models/IncidentFieldAttributesSingleValueType"; export { IncidentFieldAttributesValueType } from "./models/IncidentFieldAttributesValueType"; +export { IncidentGoogleMeetIntegrationDataAttributes } from "./models/IncidentGoogleMeetIntegrationDataAttributes"; +export { IncidentGoogleMeetIntegrationDataResponse } from "./models/IncidentGoogleMeetIntegrationDataResponse"; +export { IncidentGoogleMeetIntegrationResponse } from "./models/IncidentGoogleMeetIntegrationResponse"; +export { IncidentGoogleMeetIntegrationType } from "./models/IncidentGoogleMeetIntegrationType"; +export { IncidentGoogleMeetSpace } from "./models/IncidentGoogleMeetSpace"; export { IncidentHandleAttributesFields } from "./models/IncidentHandleAttributesFields"; export { IncidentHandleAttributesRequest } from "./models/IncidentHandleAttributesRequest"; export { IncidentHandleAttributesResponse } from "./models/IncidentHandleAttributesResponse"; @@ -3665,6 +3749,38 @@ export { IncidentIntegrationMetadataResponseData } from "./models/IncidentIntegr export { IncidentIntegrationMetadataResponseIncludedItem } from "./models/IncidentIntegrationMetadataResponseIncludedItem"; export { IncidentIntegrationMetadataType } from "./models/IncidentIntegrationMetadataType"; export { IncidentIntegrationRelationships } from "./models/IncidentIntegrationRelationships"; +export { IncidentJiraIssueDataAttributesRequest } from "./models/IncidentJiraIssueDataAttributesRequest"; +export { IncidentJiraIssueDataRequest } from "./models/IncidentJiraIssueDataRequest"; +export { IncidentJiraIssueIntegrationDataAttributes } from "./models/IncidentJiraIssueIntegrationDataAttributes"; +export { IncidentJiraIssueIntegrationDataResponse } from "./models/IncidentJiraIssueIntegrationDataResponse"; +export { IncidentJiraIssueIntegrationResponse } from "./models/IncidentJiraIssueIntegrationResponse"; +export { IncidentJiraIssueIntegrationType } from "./models/IncidentJiraIssueIntegrationType"; +export { IncidentJiraIssueRequest } from "./models/IncidentJiraIssueRequest"; +export { IncidentJiraIssueType } from "./models/IncidentJiraIssueType"; +export { IncidentJiraTemplateDataAttributesRequest } from "./models/IncidentJiraTemplateDataAttributesRequest"; +export { IncidentJiraTemplateDataAttributesResponse } from "./models/IncidentJiraTemplateDataAttributesResponse"; +export { IncidentJiraTemplateDataRequest } from "./models/IncidentJiraTemplateDataRequest"; +export { IncidentJiraTemplateDataResponse } from "./models/IncidentJiraTemplateDataResponse"; +export { IncidentJiraTemplateFieldConfiguration } from "./models/IncidentJiraTemplateFieldConfiguration"; +export { IncidentJiraTemplateIncidentTypeRelationship } from "./models/IncidentJiraTemplateIncidentTypeRelationship"; +export { IncidentJiraTemplateIncidentTypeRelationshipData } from "./models/IncidentJiraTemplateIncidentTypeRelationshipData"; +export { IncidentJiraTemplateRelationships } from "./models/IncidentJiraTemplateRelationships"; +export { IncidentJiraTemplateRequest } from "./models/IncidentJiraTemplateRequest"; +export { IncidentJiraTemplateResponse } from "./models/IncidentJiraTemplateResponse"; +export { IncidentJiraTemplatesResponse } from "./models/IncidentJiraTemplatesResponse"; +export { IncidentJiraTemplateType } from "./models/IncidentJiraTemplateType"; +export { IncidentMicrosoftTeamsConfigurationDataAttributesRequest } from "./models/IncidentMicrosoftTeamsConfigurationDataAttributesRequest"; +export { IncidentMicrosoftTeamsConfigurationDataAttributesResponse } from "./models/IncidentMicrosoftTeamsConfigurationDataAttributesResponse"; +export { IncidentMicrosoftTeamsConfigurationDataRequest } from "./models/IncidentMicrosoftTeamsConfigurationDataRequest"; +export { IncidentMicrosoftTeamsConfigurationDataResponse } from "./models/IncidentMicrosoftTeamsConfigurationDataResponse"; +export { IncidentMicrosoftTeamsConfigurationRequest } from "./models/IncidentMicrosoftTeamsConfigurationRequest"; +export { IncidentMicrosoftTeamsConfigurationResponse } from "./models/IncidentMicrosoftTeamsConfigurationResponse"; +export { IncidentMicrosoftTeamsConfigurationType } from "./models/IncidentMicrosoftTeamsConfigurationType"; +export { IncidentMicrosoftTeamsIntegrationType } from "./models/IncidentMicrosoftTeamsIntegrationType"; +export { IncidentMSTeamsChannel } from "./models/IncidentMSTeamsChannel"; +export { IncidentMSTeamsIntegrationDataAttributes } from "./models/IncidentMSTeamsIntegrationDataAttributes"; +export { IncidentMSTeamsIntegrationDataResponse } from "./models/IncidentMSTeamsIntegrationDataResponse"; +export { IncidentMSTeamsIntegrationResponse } from "./models/IncidentMSTeamsIntegrationResponse"; export { IncidentNonDatadogCreator } from "./models/IncidentNonDatadogCreator"; export { IncidentNotificationHandle } from "./models/IncidentNotificationHandle"; export { IncidentNotificationRule } from "./models/IncidentNotificationRule"; @@ -3698,9 +3814,28 @@ export { IncidentNotificationTemplateResponseData } from "./models/IncidentNotif export { IncidentNotificationTemplateType } from "./models/IncidentNotificationTemplateType"; export { IncidentNotificationTemplateUpdateAttributes } from "./models/IncidentNotificationTemplateUpdateAttributes"; export { IncidentNotificationTemplateUpdateData } from "./models/IncidentNotificationTemplateUpdateData"; +export { IncidentPagerdutyIncidentDataResponse } from "./models/IncidentPagerdutyIncidentDataResponse"; +export { IncidentPagerdutyRelatedIncidentsResponse } from "./models/IncidentPagerdutyRelatedIncidentsResponse"; +export { IncidentPagerdutyServiceData } from "./models/IncidentPagerdutyServiceData"; +export { IncidentPagerdutyServiceDataAttributes } from "./models/IncidentPagerdutyServiceDataAttributes"; +export { IncidentPagerdutyServicesResponse } from "./models/IncidentPagerdutyServicesResponse"; +export { IncidentPagerdutyServiceType } from "./models/IncidentPagerdutyServiceType"; export { IncidentPostmortemType } from "./models/IncidentPostmortemType"; export { IncidentRelatedObject } from "./models/IncidentRelatedObject"; export { IncidentRelationshipData } from "./models/IncidentRelationshipData"; +export { IncidentRenderedTemplateData } from "./models/IncidentRenderedTemplateData"; +export { IncidentRenderedTemplateDataAttributes } from "./models/IncidentRenderedTemplateDataAttributes"; +export { IncidentRenderedTemplateResponse } from "./models/IncidentRenderedTemplateResponse"; +export { IncidentRenderedTemplateType } from "./models/IncidentRenderedTemplateType"; +export { IncidentRenderTemplateDataAttributesRequest } from "./models/IncidentRenderTemplateDataAttributesRequest"; +export { IncidentRenderTemplateDataRequest } from "./models/IncidentRenderTemplateDataRequest"; +export { IncidentRenderTemplateRequest } from "./models/IncidentRenderTemplateRequest"; +export { IncidentReservedRoleDataAttributesResponse } from "./models/IncidentReservedRoleDataAttributesResponse"; +export { IncidentReservedRoleDataResponse } from "./models/IncidentReservedRoleDataResponse"; +export { IncidentReservedRolePolicy } from "./models/IncidentReservedRolePolicy"; +export { IncidentReservedRoleResponse } from "./models/IncidentReservedRoleResponse"; +export { IncidentReservedRolesResponse } from "./models/IncidentReservedRolesResponse"; +export { IncidentReservedRoleType } from "./models/IncidentReservedRoleType"; export { IncidentResourceType } from "./models/IncidentResourceType"; export { IncidentRespondersType } from "./models/IncidentRespondersType"; export { IncidentResponse } from "./models/IncidentResponse"; @@ -3710,6 +3845,27 @@ export { IncidentResponseIncludedItem } from "./models/IncidentResponseIncludedI export { IncidentResponseMeta } from "./models/IncidentResponseMeta"; export { IncidentResponseMetaPagination } from "./models/IncidentResponseMetaPagination"; export { IncidentResponseRelationships } from "./models/IncidentResponseRelationships"; +export { IncidentRoleAssignmentDataAttributesRequest } from "./models/IncidentRoleAssignmentDataAttributesRequest"; +export { IncidentRoleAssignmentDataAttributesResponse } from "./models/IncidentRoleAssignmentDataAttributesResponse"; +export { IncidentRoleAssignmentDataRequest } from "./models/IncidentRoleAssignmentDataRequest"; +export { IncidentRoleAssignmentDataResponse } from "./models/IncidentRoleAssignmentDataResponse"; +export { IncidentRoleAssignmentRelationshipsRequest } from "./models/IncidentRoleAssignmentRelationshipsRequest"; +export { IncidentRoleAssignmentRelationshipsResponse } from "./models/IncidentRoleAssignmentRelationshipsResponse"; +export { IncidentRoleAssignmentRequest } from "./models/IncidentRoleAssignmentRequest"; +export { IncidentRoleAssignmentResponderRelationship } from "./models/IncidentRoleAssignmentResponderRelationship"; +export { IncidentRoleAssignmentResponderRelationshipData } from "./models/IncidentRoleAssignmentResponderRelationshipData"; +export { IncidentRoleAssignmentResponse } from "./models/IncidentRoleAssignmentResponse"; +export { IncidentRoleAssignmentRoleRelationship } from "./models/IncidentRoleAssignmentRoleRelationship"; +export { IncidentRoleAssignmentRoleRelationshipData } from "./models/IncidentRoleAssignmentRoleRelationshipData"; +export { IncidentRoleAssignmentType } from "./models/IncidentRoleAssignmentType"; +export { IncidentRuleExecutionStateDataAttributesResponse } from "./models/IncidentRuleExecutionStateDataAttributesResponse"; +export { IncidentRuleExecutionStateDataResponse } from "./models/IncidentRuleExecutionStateDataResponse"; +export { IncidentRuleExecutionStateRule } from "./models/IncidentRuleExecutionStateRule"; +export { IncidentRuleExecutionStatesResponse } from "./models/IncidentRuleExecutionStatesResponse"; +export { IncidentRuleExecutionStateType } from "./models/IncidentRuleExecutionStateType"; +export { IncidentSearchIncidentsExportRequest } from "./models/IncidentSearchIncidentsExportRequest"; +export { IncidentSearchIncidentsIncludeType } from "./models/IncidentSearchIncidentsIncludeType"; +export { IncidentSearchIncidentsSortOrder } from "./models/IncidentSearchIncidentsSortOrder"; export { IncidentSearchResponse } from "./models/IncidentSearchResponse"; export { IncidentSearchResponseAttributes } from "./models/IncidentSearchResponseAttributes"; export { IncidentSearchResponseData } from "./models/IncidentSearchResponseData"; @@ -3738,10 +3894,61 @@ export { IncidentServiceUpdateData } from "./models/IncidentServiceUpdateData"; export { IncidentServiceUpdateRequest } from "./models/IncidentServiceUpdateRequest"; export { IncidentSeverity } from "./models/IncidentSeverity"; export { IncidentsResponse } from "./models/IncidentsResponse"; +export { IncidentStatuspageIncidentDataAttributesRequest } from "./models/IncidentStatuspageIncidentDataAttributesRequest"; +export { IncidentStatuspageIncidentDataAttributesResponse } from "./models/IncidentStatuspageIncidentDataAttributesResponse"; +export { IncidentStatuspageIncidentDataRequest } from "./models/IncidentStatuspageIncidentDataRequest"; +export { IncidentStatuspageIncidentDataResponse } from "./models/IncidentStatuspageIncidentDataResponse"; +export { IncidentStatuspageIncidentEntry } from "./models/IncidentStatuspageIncidentEntry"; +export { IncidentStatuspageIncidentRequest } from "./models/IncidentStatuspageIncidentRequest"; +export { IncidentStatuspageIncidentResponse } from "./models/IncidentStatuspageIncidentResponse"; +export { IncidentStatuspageIncidentType } from "./models/IncidentStatuspageIncidentType"; +export { IncidentStatusPageNoticeCreateData } from "./models/IncidentStatusPageNoticeCreateData"; +export { IncidentStatusPageNoticeCreateDataAttributes } from "./models/IncidentStatusPageNoticeCreateDataAttributes"; +export { IncidentStatusPageNoticeCreateRequest } from "./models/IncidentStatusPageNoticeCreateRequest"; +export { IncidentStatusPageNoticeIntegrationDataAttributes } from "./models/IncidentStatusPageNoticeIntegrationDataAttributes"; +export { IncidentStatusPageNoticeIntegrationDataResponse } from "./models/IncidentStatusPageNoticeIntegrationDataResponse"; +export { IncidentStatusPageNoticeIntegrationResponse } from "./models/IncidentStatusPageNoticeIntegrationResponse"; +export { IncidentStatusPageNoticeIntegrationType } from "./models/IncidentStatusPageNoticeIntegrationType"; +export { IncidentStatusPageNoticeUpdateData } from "./models/IncidentStatusPageNoticeUpdateData"; +export { IncidentStatusPageNoticeUpdateDataAttributes } from "./models/IncidentStatusPageNoticeUpdateDataAttributes"; +export { IncidentStatusPageNoticeUpdateRequest } from "./models/IncidentStatusPageNoticeUpdateRequest"; +export { IncidentStatuspagePreferencesData } from "./models/IncidentStatuspagePreferencesData"; +export { IncidentStatuspagePreferencesDataAttributes } from "./models/IncidentStatuspagePreferencesDataAttributes"; +export { IncidentStatuspagePreferencesResponse } from "./models/IncidentStatuspagePreferencesResponse"; +export { IncidentStatuspagePreferencesType } from "./models/IncidentStatuspagePreferencesType"; +export { IncidentStatusPagesSuggestionData } from "./models/IncidentStatusPagesSuggestionData"; +export { IncidentStatusPagesSuggestionDataAttributes } from "./models/IncidentStatusPagesSuggestionDataAttributes"; +export { IncidentStatusPagesSuggestionResponse } from "./models/IncidentStatusPagesSuggestionResponse"; +export { IncidentStatusPagesSuggestionType } from "./models/IncidentStatusPagesSuggestionType"; +export { IncidentStatuspageSubscriptionDataAttributesRequest } from "./models/IncidentStatuspageSubscriptionDataAttributesRequest"; +export { IncidentStatuspageSubscriptionDataAttributesResponse } from "./models/IncidentStatuspageSubscriptionDataAttributesResponse"; +export { IncidentStatuspageSubscriptionDataRequest } from "./models/IncidentStatuspageSubscriptionDataRequest"; +export { IncidentStatuspageSubscriptionDataResponse } from "./models/IncidentStatuspageSubscriptionDataResponse"; +export { IncidentStatuspageSubscriptionRequest } from "./models/IncidentStatuspageSubscriptionRequest"; +export { IncidentStatuspageSubscriptionResponse } from "./models/IncidentStatuspageSubscriptionResponse"; +export { IncidentStatuspageSubscriptionsResponse } from "./models/IncidentStatuspageSubscriptionsResponse"; +export { IncidentStatuspageSubscriptionType } from "./models/IncidentStatuspageSubscriptionType"; +export { IncidentTemplateVariableData } from "./models/IncidentTemplateVariableData"; +export { IncidentTemplateVariableDataAttributes } from "./models/IncidentTemplateVariableDataAttributes"; +export { IncidentTemplateVariablesResponse } from "./models/IncidentTemplateVariablesResponse"; +export { IncidentTemplateVariableType } from "./models/IncidentTemplateVariableType"; export { IncidentTimelineCellCreateAttributes } from "./models/IncidentTimelineCellCreateAttributes"; export { IncidentTimelineCellMarkdownContentType } from "./models/IncidentTimelineCellMarkdownContentType"; export { IncidentTimelineCellMarkdownCreateAttributes } from "./models/IncidentTimelineCellMarkdownCreateAttributes"; export { IncidentTimelineCellMarkdownCreateAttributesContent } from "./models/IncidentTimelineCellMarkdownCreateAttributesContent"; +export { IncidentTimelineCellSource } from "./models/IncidentTimelineCellSource"; +export { IncidentTimelineCellType } from "./models/IncidentTimelineCellType"; +export { IncidentTimelineEntriesResponse } from "./models/IncidentTimelineEntriesResponse"; +export { IncidentTimelineEntryContent } from "./models/IncidentTimelineEntryContent"; +export { IncidentTimelineEntryDataAttributesRequest } from "./models/IncidentTimelineEntryDataAttributesRequest"; +export { IncidentTimelineEntryDataAttributesResponse } from "./models/IncidentTimelineEntryDataAttributesResponse"; +export { IncidentTimelineEntryDataRequest } from "./models/IncidentTimelineEntryDataRequest"; +export { IncidentTimelineEntryDataResponse } from "./models/IncidentTimelineEntryDataResponse"; +export { IncidentTimelineEntryRequest } from "./models/IncidentTimelineEntryRequest"; +export { IncidentTimelineEntryResponse } from "./models/IncidentTimelineEntryResponse"; +export { IncidentTimelineEntryType } from "./models/IncidentTimelineEntryType"; +export { IncidentTimelineThreadDataResponse } from "./models/IncidentTimelineThreadDataResponse"; +export { IncidentTimelineThreadResponse } from "./models/IncidentTimelineThreadResponse"; export { IncidentTodoAnonymousAssignee } from "./models/IncidentTodoAnonymousAssignee"; export { IncidentTodoAnonymousAssigneeSource } from "./models/IncidentTodoAnonymousAssigneeSource"; export { IncidentTodoAssignee } from "./models/IncidentTodoAssignee"; @@ -3795,6 +4002,18 @@ export { IncidentUserDefinedFieldType } from "./models/IncidentUserDefinedFieldT export { IncidentUserDefinedFieldUpdateData } from "./models/IncidentUserDefinedFieldUpdateData"; export { IncidentUserDefinedFieldUpdateRequest } from "./models/IncidentUserDefinedFieldUpdateRequest"; export { IncidentUserDefinedFieldValidValue } from "./models/IncidentUserDefinedFieldValidValue"; +export { IncidentZoomConfigurationDataAttributesRequest } from "./models/IncidentZoomConfigurationDataAttributesRequest"; +export { IncidentZoomConfigurationDataAttributesResponse } from "./models/IncidentZoomConfigurationDataAttributesResponse"; +export { IncidentZoomConfigurationDataRequest } from "./models/IncidentZoomConfigurationDataRequest"; +export { IncidentZoomConfigurationDataResponse } from "./models/IncidentZoomConfigurationDataResponse"; +export { IncidentZoomConfigurationRequest } from "./models/IncidentZoomConfigurationRequest"; +export { IncidentZoomConfigurationResponse } from "./models/IncidentZoomConfigurationResponse"; +export { IncidentZoomConfigurationType } from "./models/IncidentZoomConfigurationType"; +export { IncidentZoomIntegrationDataAttributes } from "./models/IncidentZoomIntegrationDataAttributes"; +export { IncidentZoomIntegrationDataResponse } from "./models/IncidentZoomIntegrationDataResponse"; +export { IncidentZoomIntegrationResponse } from "./models/IncidentZoomIntegrationResponse"; +export { IncidentZoomIntegrationType } from "./models/IncidentZoomIntegrationType"; +export { IncidentZoomMeeting } from "./models/IncidentZoomMeeting"; export { IncludeType } from "./models/IncludeType"; export { InputSchema } from "./models/InputSchema"; export { InputSchemaParameters } from "./models/InputSchemaParameters"; diff --git a/packages/datadog-api-client-v2/models/IncidentAutomationDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentAutomationDataAttributesRequest.ts new file mode 100644 index 000000000000..cdb1597a3a26 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentAutomationDataAttributesRequest.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating automation data. + */ +export class IncidentAutomationDataAttributesRequest { + /** + * The automation data value. + */ + "value": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + value: { + baseName: "value", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentAutomationDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentAutomationDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentAutomationDataAttributesResponse.ts new file mode 100644 index 000000000000..895928c7841e --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentAutomationDataAttributesResponse.ts @@ -0,0 +1,92 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of incident automation data. + */ +export class IncidentAutomationDataAttributesResponse { + /** + * Timestamp when the data was created. + */ + "createdAt": Date; + /** + * The incident identifier. + */ + "incidentId": string; + /** + * The automation data key. + */ + "key": string; + /** + * Timestamp when the data was last updated. + */ + "updatedAt": Date; + /** + * The automation data value. + */ + "value": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + incidentId: { + baseName: "incident_id", + type: "string", + required: true, + format: "uuid", + }, + key: { + baseName: "key", + type: "string", + required: true, + }, + updatedAt: { + baseName: "updated_at", + type: "Date", + required: true, + format: "date-time", + }, + value: { + baseName: "value", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentAutomationDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentAutomationDataDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentAutomationDataDataRequest.ts new file mode 100644 index 000000000000..1ab2a81e2225 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentAutomationDataDataRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentAutomationDataAttributesRequest } from "./IncidentAutomationDataAttributesRequest"; +import { IncidentAutomationDataType } from "./IncidentAutomationDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Automation data for a request. + */ +export class IncidentAutomationDataDataRequest { + /** + * Attributes for creating or updating automation data. + */ + "attributes": IncidentAutomationDataAttributesRequest; + /** + * Incident automation data resource type. + */ + "type": IncidentAutomationDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentAutomationDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentAutomationDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentAutomationDataDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentAutomationDataDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentAutomationDataDataResponse.ts new file mode 100644 index 000000000000..f12fade9d01c --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentAutomationDataDataResponse.ts @@ -0,0 +1,73 @@ +/** + * 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 { IncidentAutomationDataAttributesResponse } from "./IncidentAutomationDataAttributesResponse"; +import { IncidentAutomationDataType } from "./IncidentAutomationDataType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Automation data in a response. + */ +export class IncidentAutomationDataDataResponse { + /** + * Attributes of incident automation data. + */ + "attributes": IncidentAutomationDataAttributesResponse; + /** + * The automation data identifier. + */ + "id": string; + /** + * Incident automation data resource type. + */ + "type": IncidentAutomationDataType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentAutomationDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IncidentAutomationDataType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentAutomationDataDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentAutomationDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentAutomationDataRequest.ts new file mode 100644 index 000000000000..16e2d6b9efc4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentAutomationDataRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentAutomationDataDataRequest } from "./IncidentAutomationDataDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to upsert automation data. + */ +export class IncidentAutomationDataRequest { + /** + * Automation data for a request. + */ + "data": IncidentAutomationDataDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentAutomationDataDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentAutomationDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentAutomationDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentAutomationDataResponse.ts new file mode 100644 index 000000000000..5fb464eba8d7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentAutomationDataResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentAutomationDataDataResponse } from "./IncidentAutomationDataDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with automation data. + */ +export class IncidentAutomationDataResponse { + /** + * Automation data in a response. + */ + "data": IncidentAutomationDataDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentAutomationDataDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentAutomationDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentAutomationDataType.ts b/packages/datadog-api-client-v2/models/IncidentAutomationDataType.ts new file mode 100644 index 000000000000..b8866884be29 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentAutomationDataType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident automation data resource type. + */ + +export type IncidentAutomationDataType = + | typeof INCIDENTS_AUTOMATION_DATA + | UnparsedObject; +export const INCIDENTS_AUTOMATION_DATA = "incidents_automation_data"; diff --git a/packages/datadog-api-client-v2/models/IncidentBatchCreateRuleExecutionStatesData.ts b/packages/datadog-api-client-v2/models/IncidentBatchCreateRuleExecutionStatesData.ts new file mode 100644 index 000000000000..5421ea4f4d30 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentBatchCreateRuleExecutionStatesData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentBatchCreateRuleExecutionStatesDataAttributes } from "./IncidentBatchCreateRuleExecutionStatesDataAttributes"; +import { IncidentRuleExecutionStateType } from "./IncidentRuleExecutionStateType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for batch creating rule execution states. + */ +export class IncidentBatchCreateRuleExecutionStatesData { + /** + * Attributes for batch creating rule execution states. + */ + "attributes": IncidentBatchCreateRuleExecutionStatesDataAttributes; + /** + * Incident rule execution state resource type. + */ + "type": IncidentRuleExecutionStateType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentBatchCreateRuleExecutionStatesDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "IncidentRuleExecutionStateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentBatchCreateRuleExecutionStatesData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentBatchCreateRuleExecutionStatesDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentBatchCreateRuleExecutionStatesDataAttributes.ts new file mode 100644 index 000000000000..44e02abfe527 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentBatchCreateRuleExecutionStatesDataAttributes.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentRuleExecutionStateRule } from "./IncidentRuleExecutionStateRule"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for batch creating rule execution states. + */ +export class IncidentBatchCreateRuleExecutionStatesDataAttributes { + /** + * List of rules to create execution states for. + */ + "rules": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + rules: { + baseName: "rules", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentBatchCreateRuleExecutionStatesDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentBatchCreateRuleExecutionStatesRequest.ts b/packages/datadog-api-client-v2/models/IncidentBatchCreateRuleExecutionStatesRequest.ts new file mode 100644 index 000000000000..c4973b66548f --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentBatchCreateRuleExecutionStatesRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentBatchCreateRuleExecutionStatesData } from "./IncidentBatchCreateRuleExecutionStatesData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to batch create rule execution states. + */ +export class IncidentBatchCreateRuleExecutionStatesRequest { + /** + * Data for batch creating rule execution states. + */ + "data": IncidentBatchCreateRuleExecutionStatesData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentBatchCreateRuleExecutionStatesData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentBatchCreateRuleExecutionStatesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentBatchUpdateRuleExecutionStatesData.ts b/packages/datadog-api-client-v2/models/IncidentBatchUpdateRuleExecutionStatesData.ts new file mode 100644 index 000000000000..e47fdc6e0a8c --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentBatchUpdateRuleExecutionStatesData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentBatchUpdateRuleExecutionStatesDataAttributes } from "./IncidentBatchUpdateRuleExecutionStatesDataAttributes"; +import { IncidentRuleExecutionStateType } from "./IncidentRuleExecutionStateType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for batch updating rule execution states. + */ +export class IncidentBatchUpdateRuleExecutionStatesData { + /** + * Attributes for batch updating rule execution states. + */ + "attributes": IncidentBatchUpdateRuleExecutionStatesDataAttributes; + /** + * Incident rule execution state resource type. + */ + "type": IncidentRuleExecutionStateType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentBatchUpdateRuleExecutionStatesDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "IncidentRuleExecutionStateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentBatchUpdateRuleExecutionStatesData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentBatchUpdateRuleExecutionStatesDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentBatchUpdateRuleExecutionStatesDataAttributes.ts new file mode 100644 index 000000000000..065767ae6b14 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentBatchUpdateRuleExecutionStatesDataAttributes.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentRuleExecutionStateRule } from "./IncidentRuleExecutionStateRule"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for batch updating rule execution states. + */ +export class IncidentBatchUpdateRuleExecutionStatesDataAttributes { + /** + * List of rules to update execution states for. + */ + "rules": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + rules: { + baseName: "rules", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentBatchUpdateRuleExecutionStatesDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentBatchUpdateRuleExecutionStatesRequest.ts b/packages/datadog-api-client-v2/models/IncidentBatchUpdateRuleExecutionStatesRequest.ts new file mode 100644 index 000000000000..c6af36b3fdc3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentBatchUpdateRuleExecutionStatesRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentBatchUpdateRuleExecutionStatesData } from "./IncidentBatchUpdateRuleExecutionStatesData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to batch update rule execution states. + */ +export class IncidentBatchUpdateRuleExecutionStatesRequest { + /** + * Data for batch updating rule execution states. + */ + "data": IncidentBatchUpdateRuleExecutionStatesData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentBatchUpdateRuleExecutionStatesData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentBatchUpdateRuleExecutionStatesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCaseLinkData.ts b/packages/datadog-api-client-v2/models/IncidentCaseLinkData.ts new file mode 100644 index 000000000000..8604fd92a3f1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCaseLinkData.ts @@ -0,0 +1,73 @@ +/** + * 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 { IncidentCaseLinkDataAttributes } from "./IncidentCaseLinkDataAttributes"; +import { IncidentCaseLinkType } from "./IncidentCaseLinkType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Case link data. + */ +export class IncidentCaseLinkData { + /** + * Attributes of a case link. + */ + "attributes": IncidentCaseLinkDataAttributes; + /** + * The case link identifier. + */ + "id": string; + /** + * Case link resource type. + */ + "type": IncidentCaseLinkType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentCaseLinkDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IncidentCaseLinkType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCaseLinkData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCaseLinkDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentCaseLinkDataAttributes.ts new file mode 100644 index 000000000000..504b5bfeeb53 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCaseLinkDataAttributes.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a case link. + */ +export class IncidentCaseLinkDataAttributes { + /** + * The entity identifier. + */ + "entityId": string; + /** + * Whether this is a page link. + */ + "isPage": boolean; + /** + * The relationship type. + */ + "relationship": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + entityId: { + baseName: "entity_id", + type: "string", + required: true, + }, + isPage: { + baseName: "is_page", + type: "boolean", + required: true, + }, + relationship: { + baseName: "relationship", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCaseLinkDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCaseLinkResponse.ts b/packages/datadog-api-client-v2/models/IncidentCaseLinkResponse.ts new file mode 100644 index 000000000000..869e0cc0449e --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCaseLinkResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentCaseLinkData } from "./IncidentCaseLinkData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a case link. + */ +export class IncidentCaseLinkResponse { + /** + * Case link data. + */ + "data": IncidentCaseLinkData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentCaseLinkData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCaseLinkResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCaseLinkType.ts b/packages/datadog-api-client-v2/models/IncidentCaseLinkType.ts new file mode 100644 index 000000000000..2e8ab9cbbe6d --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCaseLinkType.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 link resource type. + */ + +export type IncidentCaseLinkType = typeof CASE_LINK | UnparsedObject; +export const CASE_LINK = "case_link"; diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationContent.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationContent.ts new file mode 100644 index 000000000000..92bfe4f7a745 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationContent.ts @@ -0,0 +1,88 @@ +/** + * 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 { IncidentCommunicationContentHandle } from "./IncidentCommunicationContentHandle"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The content of a communication. + */ +export class IncidentCommunicationContent { + /** + * A key used for grouping communications. + */ + "groupingKey"?: string; + /** + * The list of handles the communication is sent to. + */ + "handles": Array; + /** + * The message body of the communication. + */ + "message": string; + /** + * The status code of the communication. + */ + "status"?: number; + /** + * The subject line of the communication. + */ + "subject"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + groupingKey: { + baseName: "grouping_key", + type: "string", + }, + handles: { + baseName: "handles", + type: "Array", + required: true, + }, + message: { + baseName: "message", + type: "string", + required: true, + }, + status: { + baseName: "status", + type: "number", + format: "int32", + }, + subject: { + baseName: "subject", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCommunicationContent.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationContentHandle.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationContentHandle.ts new file mode 100644 index 000000000000..4b18a4e6c9f1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationContentHandle.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A handle used for sending a communication. + */ +export class IncidentCommunicationContentHandle { + /** + * Timestamp when the handle was added. + */ + "createdAt"?: string; + /** + * The display name for the handle. + */ + "displayName"?: string; + /** + * The notification handle. + */ + "handle": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "string", + }, + displayName: { + baseName: "display_name", + type: "string", + }, + handle: { + baseName: "handle", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCommunicationContentHandle.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationDataAttributesRequest.ts new file mode 100644 index 000000000000..e918dd1dd096 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationDataAttributesRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentCommunicationContent } from "./IncidentCommunicationContent"; +import { IncidentCommunicationKind } from "./IncidentCommunicationKind"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating a communication. + */ +export class IncidentCommunicationDataAttributesRequest { + /** + * The kind of communication. + */ + "communicationType": IncidentCommunicationKind; + /** + * The content of a communication. + */ + "content": IncidentCommunicationContent; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + communicationType: { + baseName: "communication_type", + type: "IncidentCommunicationKind", + required: true, + }, + content: { + baseName: "content", + type: "IncidentCommunicationContent", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCommunicationDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationDataAttributesResponse.ts new file mode 100644 index 000000000000..c801f40e71ff --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationDataAttributesResponse.ts @@ -0,0 +1,94 @@ +/** + * 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 { IncidentCommunicationContent } from "./IncidentCommunicationContent"; +import { IncidentCommunicationKind } from "./IncidentCommunicationKind"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of an incident communication response. + */ +export class IncidentCommunicationDataAttributesResponse { + /** + * The kind of communication. + */ + "communicationType": IncidentCommunicationKind; + /** + * The content of a communication. + */ + "content": IncidentCommunicationContent; + /** + * Timestamp when the communication was created. + */ + "created": Date; + /** + * The incident identifier. + */ + "incidentId": string; + /** + * Timestamp when the communication was last modified. + */ + "modified": Date; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + communicationType: { + baseName: "communication_type", + type: "IncidentCommunicationKind", + required: true, + }, + content: { + baseName: "content", + type: "IncidentCommunicationContent", + required: true, + }, + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + incidentId: { + baseName: "incident_id", + type: "string", + required: true, + format: "uuid", + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCommunicationDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationDataRequest.ts new file mode 100644 index 000000000000..c9adf64a6912 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationDataRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentCommunicationDataAttributesRequest } from "./IncidentCommunicationDataAttributesRequest"; +import { IncidentCommunicationType } from "./IncidentCommunicationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Incident communication data for a request. + */ +export class IncidentCommunicationDataRequest { + /** + * Attributes for creating or updating a communication. + */ + "attributes": IncidentCommunicationDataAttributesRequest; + /** + * Incident communication resource type. + */ + "type": IncidentCommunicationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentCommunicationDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentCommunicationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCommunicationDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationDataResponse.ts new file mode 100644 index 000000000000..959f7818aca7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentCommunicationDataAttributesResponse } from "./IncidentCommunicationDataAttributesResponse"; +import { IncidentCommunicationType } from "./IncidentCommunicationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Incident communication data in a response. + */ +export class IncidentCommunicationDataResponse { + /** + * Attributes of an incident communication response. + */ + "attributes": IncidentCommunicationDataAttributesResponse; + /** + * The communication identifier. + */ + "id": string; + /** + * Incident communication resource type. + */ + "type": IncidentCommunicationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentCommunicationDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentCommunicationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCommunicationDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationKind.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationKind.ts new file mode 100644 index 000000000000..2cbe18adb57a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationKind.ts @@ -0,0 +1,18 @@ +/** + * 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"; + +/** + * The kind of communication. + */ + +export type IncidentCommunicationKind = + | typeof MANUAL + | typeof AUTOMATED + | UnparsedObject; +export const MANUAL = "manual"; +export const AUTOMATED = "automated"; diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationRequest.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationRequest.ts new file mode 100644 index 000000000000..ffc59d774d12 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentCommunicationDataRequest } from "./IncidentCommunicationDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create or update a communication. + */ +export class IncidentCommunicationRequest { + /** + * Incident communication data for a request. + */ + "data": IncidentCommunicationDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentCommunicationDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCommunicationRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationResponse.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationResponse.ts new file mode 100644 index 000000000000..572833e524f4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentCommunicationDataResponse } from "./IncidentCommunicationDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a single communication. + */ +export class IncidentCommunicationResponse { + /** + * Incident communication data in a response. + */ + "data": IncidentCommunicationDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentCommunicationDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCommunicationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationType.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationType.ts new file mode 100644 index 000000000000..2bf2fe5a08f2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationType.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"; + +/** + * Incident communication resource type. + */ + +export type IncidentCommunicationType = typeof COMMUNICATION | UnparsedObject; +export const COMMUNICATION = "communication"; diff --git a/packages/datadog-api-client-v2/models/IncidentCommunicationsResponse.ts b/packages/datadog-api-client-v2/models/IncidentCommunicationsResponse.ts new file mode 100644 index 000000000000..4f209978d6ed --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCommunicationsResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentCommunicationDataResponse } from "./IncidentCommunicationDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of communications. + */ +export class IncidentCommunicationsResponse { + /** + * List of communications. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCommunicationsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCreateZoomMeetingData.ts b/packages/datadog-api-client-v2/models/IncidentCreateZoomMeetingData.ts new file mode 100644 index 000000000000..4c4f2674d86f --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCreateZoomMeetingData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentCreateZoomMeetingDataAttributes } from "./IncidentCreateZoomMeetingDataAttributes"; +import { IncidentZoomIntegrationType } from "./IncidentZoomIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for creating a Zoom meeting. + */ +export class IncidentCreateZoomMeetingData { + /** + * Attributes for creating a Zoom meeting. + */ + "attributes": IncidentCreateZoomMeetingDataAttributes; + /** + * Incident integration resource type. + */ + "type": IncidentZoomIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentCreateZoomMeetingDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "IncidentZoomIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCreateZoomMeetingData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCreateZoomMeetingDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentCreateZoomMeetingDataAttributes.ts new file mode 100644 index 000000000000..82af32db6e77 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCreateZoomMeetingDataAttributes.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating a Zoom meeting. + */ +export class IncidentCreateZoomMeetingDataAttributes { + /** + * The topic of the Zoom meeting. + */ + "topic": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + topic: { + baseName: "topic", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCreateZoomMeetingDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentCreateZoomMeetingRequest.ts b/packages/datadog-api-client-v2/models/IncidentCreateZoomMeetingRequest.ts new file mode 100644 index 000000000000..32d2e9793ed8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCreateZoomMeetingRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentCreateZoomMeetingData } from "./IncidentCreateZoomMeetingData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create a Zoom meeting for an incident. + */ +export class IncidentCreateZoomMeetingRequest { + /** + * Data for creating a Zoom meeting. + */ + "data": IncidentCreateZoomMeetingData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentCreateZoomMeetingData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCreateZoomMeetingRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationDataAttributes.ts new file mode 100644 index 000000000000..8f53d1009f92 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationDataAttributes.ts @@ -0,0 +1,92 @@ +/** + * 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 { IncidentGoogleMeetSpace } from "./IncidentGoogleMeetSpace"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a Google Meet integration metadata. + */ +export class IncidentGoogleMeetIntegrationDataAttributes { + /** + * Timestamp when the integration was created. + */ + "created": Date; + /** + * The type of integration. + */ + "integrationType": string; + /** + * Timestamp when the integration was last modified. + */ + "modified": Date; + /** + * List of Google Meet spaces. + */ + "spaces": Array; + /** + * The status of the integration. + */ + "status": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + integrationType: { + baseName: "integration_type", + type: "string", + required: true, + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + spaces: { + baseName: "spaces", + type: "Array", + required: true, + }, + status: { + baseName: "status", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentGoogleMeetIntegrationDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationDataResponse.ts new file mode 100644 index 000000000000..431f6f39f94a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentGoogleMeetIntegrationDataAttributes } from "./IncidentGoogleMeetIntegrationDataAttributes"; +import { IncidentGoogleMeetIntegrationType } from "./IncidentGoogleMeetIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Google Meet integration data in a response. + */ +export class IncidentGoogleMeetIntegrationDataResponse { + /** + * Attributes of a Google Meet integration metadata. + */ + "attributes": IncidentGoogleMeetIntegrationDataAttributes; + /** + * The integration identifier. + */ + "id": string; + /** + * Incident integration resource type. + */ + "type": IncidentGoogleMeetIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentGoogleMeetIntegrationDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentGoogleMeetIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentGoogleMeetIntegrationDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationResponse.ts b/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationResponse.ts new file mode 100644 index 000000000000..97ebeb447ee8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentGoogleMeetIntegrationDataResponse } from "./IncidentGoogleMeetIntegrationDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with Google Meet integration metadata. + */ +export class IncidentGoogleMeetIntegrationResponse { + /** + * Google Meet integration data in a response. + */ + "data": IncidentGoogleMeetIntegrationDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentGoogleMeetIntegrationDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentGoogleMeetIntegrationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationType.ts b/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationType.ts new file mode 100644 index 000000000000..df6c1043bcfc --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentGoogleMeetIntegrationType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident integration resource type. + */ + +export type IncidentGoogleMeetIntegrationType = + | typeof INCIDENT_INTEGRATIONS + | UnparsedObject; +export const INCIDENT_INTEGRATIONS = "incident_integrations"; diff --git a/packages/datadog-api-client-v2/models/IncidentGoogleMeetSpace.ts b/packages/datadog-api-client-v2/models/IncidentGoogleMeetSpace.ts new file mode 100644 index 000000000000..71d2234104b4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentGoogleMeetSpace.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A Google Meet space associated with an incident. + */ +export class IncidentGoogleMeetSpace { + /** + * The URL to join the Google Meet space. + */ + "joinUrl": string; + /** + * The meeting code for the space. + */ + "meetingCode": string; + /** + * The name of the Google Meet space. + */ + "name": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + joinUrl: { + baseName: "join_url", + type: "string", + required: true, + }, + meetingCode: { + baseName: "meeting_code", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentGoogleMeetSpace.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraIssueDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentJiraIssueDataAttributesRequest.ts new file mode 100644 index 000000000000..4ed1735c4566 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraIssueDataAttributesRequest.ts @@ -0,0 +1,80 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating a Jira issue from an incident. + */ +export class IncidentJiraIssueDataAttributesRequest { + /** + * The Jira account identifier. + */ + "accountId": string; + /** + * The Jira issue type identifier. + */ + "issueTypeId": string; + /** + * The Jira project identifier. + */ + "projectId": string; + /** + * The identifier of the Jira template to use. + */ + "templateId"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accountId: { + baseName: "account_id", + type: "string", + required: true, + }, + issueTypeId: { + baseName: "issue_type_id", + type: "string", + required: true, + }, + projectId: { + baseName: "project_id", + type: "string", + required: true, + }, + templateId: { + baseName: "template_id", + type: "string", + format: "uuid", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraIssueDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraIssueDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentJiraIssueDataRequest.ts new file mode 100644 index 000000000000..6594d9de662a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraIssueDataRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentJiraIssueDataAttributesRequest } from "./IncidentJiraIssueDataAttributesRequest"; +import { IncidentJiraIssueType } from "./IncidentJiraIssueType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Jira issue data for a request. + */ +export class IncidentJiraIssueDataRequest { + /** + * Attributes for creating a Jira issue from an incident. + */ + "attributes": IncidentJiraIssueDataAttributesRequest; + /** + * Incident Jira issue resource type. + */ + "type": IncidentJiraIssueType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentJiraIssueDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentJiraIssueType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraIssueDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationDataAttributes.ts new file mode 100644 index 000000000000..348cc9e0d8ae --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationDataAttributes.ts @@ -0,0 +1,82 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a Jira issue integration. + */ +export class IncidentJiraIssueIntegrationDataAttributes { + /** + * Timestamp when the integration was created. + */ + "created": Date; + /** + * The type of integration. + */ + "integrationType": string; + /** + * Timestamp when the integration was last modified. + */ + "modified": Date; + /** + * The status of the integration. + */ + "status": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + integrationType: { + baseName: "integration_type", + type: "string", + required: true, + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + status: { + baseName: "status", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraIssueIntegrationDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationDataResponse.ts new file mode 100644 index 000000000000..74edaf1dd056 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentJiraIssueIntegrationDataAttributes } from "./IncidentJiraIssueIntegrationDataAttributes"; +import { IncidentJiraIssueIntegrationType } from "./IncidentJiraIssueIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Jira issue integration data in a response. + */ +export class IncidentJiraIssueIntegrationDataResponse { + /** + * Attributes of a Jira issue integration. + */ + "attributes": IncidentJiraIssueIntegrationDataAttributes; + /** + * The integration identifier. + */ + "id": string; + /** + * Incident integration resource type. + */ + "type": IncidentJiraIssueIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentJiraIssueIntegrationDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentJiraIssueIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraIssueIntegrationDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationResponse.ts b/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationResponse.ts new file mode 100644 index 000000000000..da5a576e7d27 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentJiraIssueIntegrationDataResponse } from "./IncidentJiraIssueIntegrationDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with Jira issue integration metadata. + */ +export class IncidentJiraIssueIntegrationResponse { + /** + * Jira issue integration data in a response. + */ + "data": IncidentJiraIssueIntegrationDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentJiraIssueIntegrationDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraIssueIntegrationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationType.ts b/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationType.ts new file mode 100644 index 000000000000..f116020bfe0f --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraIssueIntegrationType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident integration resource type. + */ + +export type IncidentJiraIssueIntegrationType = + | typeof INCIDENT_INTEGRATIONS + | UnparsedObject; +export const INCIDENT_INTEGRATIONS = "incident_integrations"; diff --git a/packages/datadog-api-client-v2/models/IncidentJiraIssueRequest.ts b/packages/datadog-api-client-v2/models/IncidentJiraIssueRequest.ts new file mode 100644 index 000000000000..c5b26c702742 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraIssueRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentJiraIssueDataRequest } from "./IncidentJiraIssueDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create a Jira issue from an incident. + */ +export class IncidentJiraIssueRequest { + /** + * Jira issue data for a request. + */ + "data": IncidentJiraIssueDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentJiraIssueDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraIssueRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraIssueType.ts b/packages/datadog-api-client-v2/models/IncidentJiraIssueType.ts new file mode 100644 index 000000000000..72cf963d2b16 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraIssueType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident Jira issue resource type. + */ + +export type IncidentJiraIssueType = + | typeof INCIDENT_JIRA_ISSUES + | UnparsedObject; +export const INCIDENT_JIRA_ISSUES = "incident_jira_issues"; diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataAttributesRequest.ts new file mode 100644 index 000000000000..4ddd29af6322 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataAttributesRequest.ts @@ -0,0 +1,145 @@ +/** + * 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 { IncidentJiraTemplateFieldConfiguration } from "./IncidentJiraTemplateFieldConfiguration"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating an incident Jira template. + */ +export class IncidentJiraTemplateDataAttributesRequest { + /** + * The Jira account identifier. + */ + "accountId": string; + /** + * Field configuration mappings. + */ + "fieldConfigurations"?: Array; + /** + * The Jira fields configuration. + */ + "fields"?: { [key: string]: any }; + /** + * Whether this is the default template. + */ + "isDefault"?: boolean; + /** + * The Jira issue type identifier. + */ + "issueId": string; + /** + * The field mappings configuration. + */ + "mappings"?: { [key: string]: any }; + /** + * Additional metadata for the template. + */ + "meta"?: { [key: string]: any }; + /** + * The name of the template. + */ + "name"?: string; + /** + * The Jira project identifier. + */ + "projectId": string; + /** + * The Jira project key. + */ + "projectKey": string; + /** + * Whether synchronization is enabled. + */ + "syncEnabled"?: boolean; + /** + * The type of the template. + */ + "type"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accountId: { + baseName: "account_id", + type: "string", + required: true, + }, + fieldConfigurations: { + baseName: "field_configurations", + type: "Array", + }, + fields: { + baseName: "fields", + type: "{ [key: string]: any; }", + }, + isDefault: { + baseName: "is_default", + type: "boolean", + }, + issueId: { + baseName: "issue_id", + type: "string", + required: true, + }, + mappings: { + baseName: "mappings", + type: "{ [key: string]: any; }", + }, + meta: { + baseName: "meta", + type: "{ [key: string]: any; }", + }, + name: { + baseName: "name", + type: "string", + }, + projectId: { + baseName: "project_id", + type: "string", + required: true, + }, + projectKey: { + baseName: "project_key", + type: "string", + required: true, + }, + syncEnabled: { + baseName: "sync_enabled", + type: "boolean", + }, + type: { + baseName: "type", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataAttributesResponse.ts new file mode 100644 index 000000000000..dadc87e3e663 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataAttributesResponse.ts @@ -0,0 +1,189 @@ +/** + * 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 { IncidentJiraTemplateFieldConfiguration } from "./IncidentJiraTemplateFieldConfiguration"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of an incident Jira template. + */ +export class IncidentJiraTemplateDataAttributesResponse { + /** + * The Jira account identifier. + */ + "accountId": string; + /** + * Timestamp when the template was created. + */ + "created": Date; + /** + * UUID of the user who created the template. + */ + "createdByUuid": string; + /** + * Field configuration mappings. + */ + "fieldConfigurations"?: Array; + /** + * The Jira fields configuration. + */ + "fields"?: { [key: string]: any }; + /** + * Whether this is the default template. + */ + "isDefault": boolean; + /** + * The Jira issue type identifier. + */ + "issueId": string; + /** + * UUID of the user who last modified the template. + */ + "lastModifiedByUuid": string; + /** + * The field mappings configuration. + */ + "mappings"?: { [key: string]: any }; + /** + * Additional metadata for the template. + */ + "meta"?: { [key: string]: any }; + /** + * Timestamp when the template was last modified. + */ + "modified": Date; + /** + * The name of the template. + */ + "name": string; + /** + * The Jira project identifier. + */ + "projectId": string; + /** + * The Jira project key. + */ + "projectKey": string; + /** + * Whether synchronization is enabled. + */ + "syncEnabled": boolean; + /** + * The type of the template. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + accountId: { + baseName: "account_id", + type: "string", + required: true, + }, + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + createdByUuid: { + baseName: "created_by_uuid", + type: "string", + required: true, + format: "uuid", + }, + fieldConfigurations: { + baseName: "field_configurations", + type: "Array", + }, + fields: { + baseName: "fields", + type: "{ [key: string]: any; }", + }, + isDefault: { + baseName: "is_default", + type: "boolean", + required: true, + }, + issueId: { + baseName: "issue_id", + type: "string", + required: true, + }, + lastModifiedByUuid: { + baseName: "last_modified_by_uuid", + type: "string", + required: true, + format: "uuid", + }, + mappings: { + baseName: "mappings", + type: "{ [key: string]: any; }", + }, + meta: { + baseName: "meta", + type: "{ [key: string]: any; }", + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + projectId: { + baseName: "project_id", + type: "string", + required: true, + }, + projectKey: { + baseName: "project_key", + type: "string", + required: true, + }, + syncEnabled: { + baseName: "sync_enabled", + type: "boolean", + required: true, + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataRequest.ts new file mode 100644 index 000000000000..ce007048dcc7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataRequest.ts @@ -0,0 +1,73 @@ +/** + * 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 { IncidentJiraTemplateDataAttributesRequest } from "./IncidentJiraTemplateDataAttributesRequest"; +import { IncidentJiraTemplateRelationships } from "./IncidentJiraTemplateRelationships"; +import { IncidentJiraTemplateType } from "./IncidentJiraTemplateType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Incident Jira template data for a create or update request. + */ +export class IncidentJiraTemplateDataRequest { + /** + * Attributes for creating or updating an incident Jira template. + */ + "attributes": IncidentJiraTemplateDataAttributesRequest; + /** + * Relationships for an incident Jira template. + */ + "relationships"?: IncidentJiraTemplateRelationships; + /** + * Incident Jira template resource type. + */ + "type": IncidentJiraTemplateType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentJiraTemplateDataAttributesRequest", + required: true, + }, + relationships: { + baseName: "relationships", + type: "IncidentJiraTemplateRelationships", + }, + type: { + baseName: "type", + type: "IncidentJiraTemplateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataResponse.ts new file mode 100644 index 000000000000..95534f3b1e15 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateDataResponse.ts @@ -0,0 +1,83 @@ +/** + * 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 { IncidentJiraTemplateDataAttributesResponse } from "./IncidentJiraTemplateDataAttributesResponse"; +import { IncidentJiraTemplateRelationships } from "./IncidentJiraTemplateRelationships"; +import { IncidentJiraTemplateType } from "./IncidentJiraTemplateType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Incident Jira template data in a response. + */ +export class IncidentJiraTemplateDataResponse { + /** + * Attributes of an incident Jira template. + */ + "attributes": IncidentJiraTemplateDataAttributesResponse; + /** + * The template identifier. + */ + "id": string; + /** + * Relationships for an incident Jira template. + */ + "relationships"?: IncidentJiraTemplateRelationships; + /** + * Incident Jira template resource type. + */ + "type": IncidentJiraTemplateType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentJiraTemplateDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + relationships: { + baseName: "relationships", + type: "IncidentJiraTemplateRelationships", + }, + type: { + baseName: "type", + type: "IncidentJiraTemplateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateFieldConfiguration.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateFieldConfiguration.ts new file mode 100644 index 000000000000..55d6cae3e5af --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateFieldConfiguration.ts @@ -0,0 +1,94 @@ +/** + * 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"; + +/** + * Configuration for a Jira field mapping. + */ +export class IncidentJiraTemplateFieldConfiguration { + /** + * Custom value for outbound synchronization. + */ + "customOutboundValue"?: any; + /** + * The incident field to map to. + */ + "incidentField"?: string; + /** + * The Jira field key. + */ + "jiraFieldKey": string; + /** + * The type of the Jira field. + */ + "jiraFieldType"?: string; + /** + * The direction of synchronization. + */ + "syncDirection": string; + /** + * Mapping of values between incident and Jira fields. + */ + "valueMapping"?: { [key: string]: string }; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + customOutboundValue: { + baseName: "custom_outbound_value", + type: "any", + }, + incidentField: { + baseName: "incident_field", + type: "string", + }, + jiraFieldKey: { + baseName: "jira_field_key", + type: "string", + required: true, + }, + jiraFieldType: { + baseName: "jira_field_type", + type: "string", + }, + syncDirection: { + baseName: "sync_direction", + type: "string", + required: true, + }, + valueMapping: { + baseName: "value_mapping", + type: "{ [key: string]: string; }", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateFieldConfiguration.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateIncidentTypeRelationship.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateIncidentTypeRelationship.ts new file mode 100644 index 000000000000..584f5c16fd3a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateIncidentTypeRelationship.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentJiraTemplateIncidentTypeRelationshipData } from "./IncidentJiraTemplateIncidentTypeRelationshipData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to an incident type. + */ +export class IncidentJiraTemplateIncidentTypeRelationship { + /** + * Incident type relationship data. + */ + "data": IncidentJiraTemplateIncidentTypeRelationshipData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentJiraTemplateIncidentTypeRelationshipData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateIncidentTypeRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateIncidentTypeRelationshipData.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateIncidentTypeRelationshipData.ts new file mode 100644 index 000000000000..37ee633847aa --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateIncidentTypeRelationshipData.ts @@ -0,0 +1,63 @@ +/** + * 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"; + +/** + * Incident type relationship data. + */ +export class IncidentJiraTemplateIncidentTypeRelationshipData { + /** + * The incident type identifier. + */ + "id": string; + /** + * The incident type resource type. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateIncidentTypeRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateRelationships.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateRelationships.ts new file mode 100644 index 000000000000..0656c7d57f79 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateRelationships.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 { IncidentJiraTemplateIncidentTypeRelationship } from "./IncidentJiraTemplateIncidentTypeRelationship"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationships for an incident Jira template. + */ +export class IncidentJiraTemplateRelationships { + /** + * Relationship to an incident type. + */ + "incidentType"?: IncidentJiraTemplateIncidentTypeRelationship; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + incidentType: { + baseName: "incident_type", + type: "IncidentJiraTemplateIncidentTypeRelationship", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateRequest.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateRequest.ts new file mode 100644 index 000000000000..b4c1c3025d13 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentJiraTemplateDataRequest } from "./IncidentJiraTemplateDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Create or update request for an incident Jira template. + */ +export class IncidentJiraTemplateRequest { + /** + * Incident Jira template data for a create or update request. + */ + "data": IncidentJiraTemplateDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentJiraTemplateDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateResponse.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateResponse.ts new file mode 100644 index 000000000000..5a6edb8e29b2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentJiraTemplateDataResponse } from "./IncidentJiraTemplateDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a single incident Jira template. + */ +export class IncidentJiraTemplateResponse { + /** + * Incident Jira template data in a response. + */ + "data": IncidentJiraTemplateDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentJiraTemplateDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplateResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplateType.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplateType.ts new file mode 100644 index 000000000000..5db3520b54ad --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplateType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident Jira template resource type. + */ + +export type IncidentJiraTemplateType = + | typeof INCIDENTS_JIRA_TEMPLATES + | UnparsedObject; +export const INCIDENTS_JIRA_TEMPLATES = "incidents_jira_templates"; diff --git a/packages/datadog-api-client-v2/models/IncidentJiraTemplatesResponse.ts b/packages/datadog-api-client-v2/models/IncidentJiraTemplatesResponse.ts new file mode 100644 index 000000000000..decc12cb34f9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentJiraTemplatesResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentJiraTemplateDataResponse } from "./IncidentJiraTemplateDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of incident Jira templates. + */ +export class IncidentJiraTemplatesResponse { + /** + * List of incident Jira templates. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentJiraTemplatesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMSTeamsChannel.ts b/packages/datadog-api-client-v2/models/IncidentMSTeamsChannel.ts new file mode 100644 index 000000000000..4031ef10334c --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMSTeamsChannel.ts @@ -0,0 +1,94 @@ +/** + * 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"; + +/** + * A Microsoft Teams channel associated with an incident. + */ +export class IncidentMSTeamsChannel { + /** + * The Teams channel identifier. + */ + "msChannelId": string; + /** + * The name of the Teams channel. + */ + "msChannelName": string; + /** + * The Teams team identifier. + */ + "msTeamId"?: string; + /** + * The Teams tenant identifier. + */ + "msTenantId"?: string; + /** + * The redirect URL for the channel. + */ + "redirectUrl"?: string; + /** + * The name of the Teams team. + */ + "teamName"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + msChannelId: { + baseName: "ms_channel_id", + type: "string", + required: true, + }, + msChannelName: { + baseName: "ms_channel_name", + type: "string", + required: true, + }, + msTeamId: { + baseName: "ms_team_id", + type: "string", + }, + msTenantId: { + baseName: "ms_tenant_id", + type: "string", + }, + redirectUrl: { + baseName: "redirect_url", + type: "string", + }, + teamName: { + baseName: "team_name", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMSTeamsChannel.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMSTeamsIntegrationDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentMSTeamsIntegrationDataAttributes.ts new file mode 100644 index 000000000000..37a6bbe60ea8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMSTeamsIntegrationDataAttributes.ts @@ -0,0 +1,92 @@ +/** + * 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 { IncidentMSTeamsChannel } from "./IncidentMSTeamsChannel"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a Microsoft Teams integration metadata. + */ +export class IncidentMSTeamsIntegrationDataAttributes { + /** + * Timestamp when the integration was created. + */ + "created": Date; + /** + * The type of integration. + */ + "integrationType": string; + /** + * Timestamp when the integration was last modified. + */ + "modified": Date; + /** + * The status of the integration. + */ + "status": string; + /** + * List of Microsoft Teams channels. + */ + "teams": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + integrationType: { + baseName: "integration_type", + type: "string", + required: true, + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + status: { + baseName: "status", + type: "string", + required: true, + }, + teams: { + baseName: "teams", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMSTeamsIntegrationDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMSTeamsIntegrationDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentMSTeamsIntegrationDataResponse.ts new file mode 100644 index 000000000000..971ea2079a11 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMSTeamsIntegrationDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentMicrosoftTeamsIntegrationType } from "./IncidentMicrosoftTeamsIntegrationType"; +import { IncidentMSTeamsIntegrationDataAttributes } from "./IncidentMSTeamsIntegrationDataAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Microsoft Teams integration data in a response. + */ +export class IncidentMSTeamsIntegrationDataResponse { + /** + * Attributes of a Microsoft Teams integration metadata. + */ + "attributes": IncidentMSTeamsIntegrationDataAttributes; + /** + * The integration identifier. + */ + "id": string; + /** + * Incident integration resource type. + */ + "type": IncidentMicrosoftTeamsIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentMSTeamsIntegrationDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentMicrosoftTeamsIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMSTeamsIntegrationDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMSTeamsIntegrationResponse.ts b/packages/datadog-api-client-v2/models/IncidentMSTeamsIntegrationResponse.ts new file mode 100644 index 000000000000..34f9cb4d741e --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMSTeamsIntegrationResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentMSTeamsIntegrationDataResponse } from "./IncidentMSTeamsIntegrationDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with Microsoft Teams integration metadata. + */ +export class IncidentMSTeamsIntegrationResponse { + /** + * Microsoft Teams integration data in a response. + */ + "data": IncidentMSTeamsIntegrationDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentMSTeamsIntegrationDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMSTeamsIntegrationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataAttributesRequest.ts new file mode 100644 index 000000000000..764d04d45061 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataAttributesRequest.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"; + +/** + * Attributes for creating or updating a Microsoft Teams configuration. + */ +export class IncidentMicrosoftTeamsConfigurationDataAttributesRequest { + /** + * Whether manual meeting creation is enabled. + */ + "manualMeetingCreation"?: boolean; + /** + * Whether post-meeting summary is enabled. + */ + "postMeetingSummary"?: boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + manualMeetingCreation: { + baseName: "manual_meeting_creation", + type: "boolean", + }, + postMeetingSummary: { + baseName: "post_meeting_summary", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMicrosoftTeamsConfigurationDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataAttributesResponse.ts new file mode 100644 index 000000000000..b3ee7b0f45b2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataAttributesResponse.ts @@ -0,0 +1,82 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a Microsoft Teams configuration. + */ +export class IncidentMicrosoftTeamsConfigurationDataAttributesResponse { + /** + * Timestamp when the configuration was created. + */ + "createdAt": Date; + /** + * Whether manual meeting creation is enabled. + */ + "manualMeetingCreation": boolean; + /** + * Timestamp when the configuration was last modified. + */ + "modifiedAt": Date; + /** + * Whether post-meeting summary is enabled. + */ + "postMeetingSummary": boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + manualMeetingCreation: { + baseName: "manual_meeting_creation", + type: "boolean", + required: true, + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + required: true, + format: "date-time", + }, + postMeetingSummary: { + baseName: "post_meeting_summary", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMicrosoftTeamsConfigurationDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataRequest.ts new file mode 100644 index 000000000000..560edfbfae3b --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentMicrosoftTeamsConfigurationDataAttributesRequest } from "./IncidentMicrosoftTeamsConfigurationDataAttributesRequest"; +import { IncidentMicrosoftTeamsConfigurationType } from "./IncidentMicrosoftTeamsConfigurationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Microsoft Teams configuration data for a request. + */ +export class IncidentMicrosoftTeamsConfigurationDataRequest { + /** + * Attributes for creating or updating a Microsoft Teams configuration. + */ + "attributes": IncidentMicrosoftTeamsConfigurationDataAttributesRequest; + /** + * Microsoft Teams configuration resource type. + */ + "type": IncidentMicrosoftTeamsConfigurationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentMicrosoftTeamsConfigurationDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentMicrosoftTeamsConfigurationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMicrosoftTeamsConfigurationDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataResponse.ts new file mode 100644 index 000000000000..0402c9817d5b --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentMicrosoftTeamsConfigurationDataAttributesResponse } from "./IncidentMicrosoftTeamsConfigurationDataAttributesResponse"; +import { IncidentMicrosoftTeamsConfigurationType } from "./IncidentMicrosoftTeamsConfigurationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Microsoft Teams configuration data in a response. + */ +export class IncidentMicrosoftTeamsConfigurationDataResponse { + /** + * Attributes of a Microsoft Teams configuration. + */ + "attributes": IncidentMicrosoftTeamsConfigurationDataAttributesResponse; + /** + * The configuration identifier. + */ + "id": string; + /** + * Microsoft Teams configuration resource type. + */ + "type": IncidentMicrosoftTeamsConfigurationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentMicrosoftTeamsConfigurationDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentMicrosoftTeamsConfigurationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMicrosoftTeamsConfigurationDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationRequest.ts b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationRequest.ts new file mode 100644 index 000000000000..dd6fb25eda0d --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentMicrosoftTeamsConfigurationDataRequest } from "./IncidentMicrosoftTeamsConfigurationDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create or update a Microsoft Teams configuration. + */ +export class IncidentMicrosoftTeamsConfigurationRequest { + /** + * Microsoft Teams configuration data for a request. + */ + "data": IncidentMicrosoftTeamsConfigurationDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentMicrosoftTeamsConfigurationDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMicrosoftTeamsConfigurationRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationResponse.ts b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationResponse.ts new file mode 100644 index 000000000000..91d6ee0589e7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentMicrosoftTeamsConfigurationDataResponse } from "./IncidentMicrosoftTeamsConfigurationDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a Microsoft Teams configuration. + */ +export class IncidentMicrosoftTeamsConfigurationResponse { + /** + * Microsoft Teams configuration data in a response. + */ + "data": IncidentMicrosoftTeamsConfigurationDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentMicrosoftTeamsConfigurationDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentMicrosoftTeamsConfigurationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationType.ts b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationType.ts new file mode 100644 index 000000000000..9c6351986635 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsConfigurationType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Microsoft Teams configuration resource type. + */ + +export type IncidentMicrosoftTeamsConfigurationType = + | typeof MICROSOFT_TEAMS_CONFIGURATIONS + | UnparsedObject; +export const MICROSOFT_TEAMS_CONFIGURATIONS = "microsoft_teams_configurations"; diff --git a/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsIntegrationType.ts b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsIntegrationType.ts new file mode 100644 index 000000000000..ce5698a86338 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentMicrosoftTeamsIntegrationType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident integration resource type. + */ + +export type IncidentMicrosoftTeamsIntegrationType = + | typeof INCIDENT_INTEGRATIONS + | UnparsedObject; +export const INCIDENT_INTEGRATIONS = "incident_integrations"; diff --git a/packages/datadog-api-client-v2/models/IncidentPagerdutyIncidentDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentPagerdutyIncidentDataResponse.ts new file mode 100644 index 000000000000..25e1df455c97 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentPagerdutyIncidentDataResponse.ts @@ -0,0 +1,63 @@ +/** + * 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"; + +/** + * Incident data related to a PagerDuty incident. + */ +export class IncidentPagerdutyIncidentDataResponse { + /** + * The Datadog incident identifier. + */ + "id": string; + /** + * The incident resource type. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentPagerdutyIncidentDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentPagerdutyRelatedIncidentsResponse.ts b/packages/datadog-api-client-v2/models/IncidentPagerdutyRelatedIncidentsResponse.ts new file mode 100644 index 000000000000..f8c39733d8f6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentPagerdutyRelatedIncidentsResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentPagerdutyIncidentDataResponse } from "./IncidentPagerdutyIncidentDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of Datadog incidents related to a PagerDuty incident. + */ +export class IncidentPagerdutyRelatedIncidentsResponse { + /** + * List of related Datadog incidents. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentPagerdutyRelatedIncidentsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentPagerdutyServiceData.ts b/packages/datadog-api-client-v2/models/IncidentPagerdutyServiceData.ts new file mode 100644 index 000000000000..2cf6357b290f --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentPagerdutyServiceData.ts @@ -0,0 +1,73 @@ +/** + * 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 { IncidentPagerdutyServiceDataAttributes } from "./IncidentPagerdutyServiceDataAttributes"; +import { IncidentPagerdutyServiceType } from "./IncidentPagerdutyServiceType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * PagerDuty service data. + */ +export class IncidentPagerdutyServiceData { + /** + * Attributes of a PagerDuty service. + */ + "attributes": IncidentPagerdutyServiceDataAttributes; + /** + * The PagerDuty service identifier. + */ + "id": string; + /** + * PagerDuty service resource type. + */ + "type": IncidentPagerdutyServiceType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentPagerdutyServiceDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IncidentPagerdutyServiceType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentPagerdutyServiceData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentPagerdutyServiceDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentPagerdutyServiceDataAttributes.ts new file mode 100644 index 000000000000..b62db974e014 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentPagerdutyServiceDataAttributes.ts @@ -0,0 +1,80 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a PagerDuty service. + */ +export class IncidentPagerdutyServiceDataAttributes { + /** + * The handle for the PagerDuty service. + */ + "handle": string; + /** + * The name of the PagerDuty service. + */ + "name": string; + /** + * The PagerDuty service identifier. + */ + "serviceId": string; + /** + * Whether webhooks are enabled for this service. + */ + "webhooksEnabled": boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + handle: { + baseName: "handle", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + serviceId: { + baseName: "service_id", + type: "string", + required: true, + }, + webhooksEnabled: { + baseName: "webhooks_enabled", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentPagerdutyServiceDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentPagerdutyServiceType.ts b/packages/datadog-api-client-v2/models/IncidentPagerdutyServiceType.ts new file mode 100644 index 000000000000..d7bf0fc21fc6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentPagerdutyServiceType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * PagerDuty service resource type. + */ + +export type IncidentPagerdutyServiceType = + | typeof PAGERDUTY_SERVICE + | UnparsedObject; +export const PAGERDUTY_SERVICE = "pagerduty_service"; diff --git a/packages/datadog-api-client-v2/models/IncidentPagerdutyServicesResponse.ts b/packages/datadog-api-client-v2/models/IncidentPagerdutyServicesResponse.ts new file mode 100644 index 000000000000..9ea70f5bfa56 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentPagerdutyServicesResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentPagerdutyServiceData } from "./IncidentPagerdutyServiceData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of PagerDuty services. + */ +export class IncidentPagerdutyServicesResponse { + /** + * List of PagerDuty services. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentPagerdutyServicesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRenderTemplateDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentRenderTemplateDataAttributesRequest.ts new file mode 100644 index 000000000000..3c329b821949 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRenderTemplateDataAttributesRequest.ts @@ -0,0 +1,85 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for rendering a template. + */ +export class IncidentRenderTemplateDataAttributesRequest { + /** + * The template content to render. + */ + "content": string; + /** + * The date-time format to use for rendering. + */ + "datetimeFormat"?: string; + /** + * The timezone to use for rendering. + */ + "timezone"?: string; + /** + * Whether to validate links in the rendered template. + */ + "validateLinks"?: boolean; + /** + * Whether to validate variables in the template. + */ + "validateVariables"?: boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + content: { + baseName: "content", + type: "string", + required: true, + }, + datetimeFormat: { + baseName: "datetime_format", + type: "string", + }, + timezone: { + baseName: "timezone", + type: "string", + }, + validateLinks: { + baseName: "validate_links", + type: "boolean", + }, + validateVariables: { + baseName: "validate_variables", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRenderTemplateDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRenderTemplateDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentRenderTemplateDataRequest.ts new file mode 100644 index 000000000000..4c075d305f1d --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRenderTemplateDataRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentRenderedTemplateType } from "./IncidentRenderedTemplateType"; +import { IncidentRenderTemplateDataAttributesRequest } from "./IncidentRenderTemplateDataAttributesRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for rendering a template. + */ +export class IncidentRenderTemplateDataRequest { + /** + * Attributes for rendering a template. + */ + "attributes": IncidentRenderTemplateDataAttributesRequest; + /** + * Rendered template resource type. + */ + "type": IncidentRenderedTemplateType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentRenderTemplateDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentRenderedTemplateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRenderTemplateDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRenderTemplateRequest.ts b/packages/datadog-api-client-v2/models/IncidentRenderTemplateRequest.ts new file mode 100644 index 000000000000..0639842a5402 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRenderTemplateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentRenderTemplateDataRequest } from "./IncidentRenderTemplateDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to render a template. + */ +export class IncidentRenderTemplateRequest { + /** + * Data for rendering a template. + */ + "data": IncidentRenderTemplateDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentRenderTemplateDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRenderTemplateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRenderedTemplateData.ts b/packages/datadog-api-client-v2/models/IncidentRenderedTemplateData.ts new file mode 100644 index 000000000000..83ac08c44b2c --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRenderedTemplateData.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentRenderedTemplateDataAttributes } from "./IncidentRenderedTemplateDataAttributes"; +import { IncidentRenderedTemplateType } from "./IncidentRenderedTemplateType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Rendered template data. + */ +export class IncidentRenderedTemplateData { + /** + * Attributes of a rendered template. + */ + "attributes": IncidentRenderedTemplateDataAttributes; + /** + * The rendered template identifier. + */ + "id": string; + /** + * Rendered template resource type. + */ + "type": IncidentRenderedTemplateType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentRenderedTemplateDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentRenderedTemplateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRenderedTemplateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRenderedTemplateDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentRenderedTemplateDataAttributes.ts new file mode 100644 index 000000000000..204654fbd266 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRenderedTemplateDataAttributes.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a rendered template. + */ +export class IncidentRenderedTemplateDataAttributes { + /** + * The rendered template content. + */ + "renderedContent": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + renderedContent: { + baseName: "rendered_content", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRenderedTemplateDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRenderedTemplateResponse.ts b/packages/datadog-api-client-v2/models/IncidentRenderedTemplateResponse.ts new file mode 100644 index 000000000000..c2575289b2ba --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRenderedTemplateResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentRenderedTemplateData } from "./IncidentRenderedTemplateData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a rendered template. + */ +export class IncidentRenderedTemplateResponse { + /** + * Rendered template data. + */ + "data": IncidentRenderedTemplateData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentRenderedTemplateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRenderedTemplateResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRenderedTemplateType.ts b/packages/datadog-api-client-v2/models/IncidentRenderedTemplateType.ts new file mode 100644 index 000000000000..4d31e2271ed9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRenderedTemplateType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Rendered template resource type. + */ + +export type IncidentRenderedTemplateType = + | typeof RENDERED_TEMPLATES + | UnparsedObject; +export const RENDERED_TEMPLATES = "rendered_templates"; diff --git a/packages/datadog-api-client-v2/models/IncidentReservedRoleDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentReservedRoleDataAttributesResponse.ts new file mode 100644 index 000000000000..77be0625fafb --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentReservedRoleDataAttributesResponse.ts @@ -0,0 +1,91 @@ +/** + * 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 { IncidentReservedRolePolicy } from "./IncidentReservedRolePolicy"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a reserved role. + */ +export class IncidentReservedRoleDataAttributesResponse { + /** + * Timestamp when the role was created. + */ + "created": Date; + /** + * A description of the reserved role. + */ + "description"?: string; + /** + * Timestamp when the role was last modified. + */ + "modified": Date; + /** + * The name of the reserved role. + */ + "name": string; + /** + * Policy for a reserved role. + */ + "policy": IncidentReservedRolePolicy; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + description: { + baseName: "description", + type: "string", + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + policy: { + baseName: "policy", + type: "IncidentReservedRolePolicy", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentReservedRoleDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentReservedRoleDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentReservedRoleDataResponse.ts new file mode 100644 index 000000000000..0cbf5500d2fb --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentReservedRoleDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentReservedRoleDataAttributesResponse } from "./IncidentReservedRoleDataAttributesResponse"; +import { IncidentReservedRoleType } from "./IncidentReservedRoleType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Reserved role data in a response. + */ +export class IncidentReservedRoleDataResponse { + /** + * Attributes of a reserved role. + */ + "attributes": IncidentReservedRoleDataAttributesResponse; + /** + * The reserved role identifier. + */ + "id": string; + /** + * Incident reserved role resource type. + */ + "type": IncidentReservedRoleType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentReservedRoleDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentReservedRoleType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentReservedRoleDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentReservedRolePolicy.ts b/packages/datadog-api-client-v2/models/IncidentReservedRolePolicy.ts new file mode 100644 index 000000000000..a70d3b96f0fd --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentReservedRolePolicy.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Policy for a reserved role. + */ +export class IncidentReservedRolePolicy { + /** + * Whether this role can only be assigned to a single responder. + */ + "isSingle": boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + isSingle: { + baseName: "is_single", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentReservedRolePolicy.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentReservedRoleResponse.ts b/packages/datadog-api-client-v2/models/IncidentReservedRoleResponse.ts new file mode 100644 index 000000000000..496ccfc90884 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentReservedRoleResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentReservedRoleDataResponse } from "./IncidentReservedRoleDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a single reserved role. + */ +export class IncidentReservedRoleResponse { + /** + * Reserved role data in a response. + */ + "data": IncidentReservedRoleDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentReservedRoleDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentReservedRoleResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentReservedRoleType.ts b/packages/datadog-api-client-v2/models/IncidentReservedRoleType.ts new file mode 100644 index 000000000000..1b4a013c0015 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentReservedRoleType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident reserved role resource type. + */ + +export type IncidentReservedRoleType = + | typeof INCIDENT_RESERVED_ROLES + | UnparsedObject; +export const INCIDENT_RESERVED_ROLES = "incident_reserved_roles"; diff --git a/packages/datadog-api-client-v2/models/IncidentReservedRolesResponse.ts b/packages/datadog-api-client-v2/models/IncidentReservedRolesResponse.ts new file mode 100644 index 000000000000..1484072f06fc --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentReservedRolesResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentReservedRoleDataResponse } from "./IncidentReservedRoleDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of reserved roles. + */ +export class IncidentReservedRolesResponse { + /** + * List of reserved roles. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentReservedRolesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataAttributesRequest.ts new file mode 100644 index 000000000000..c1ac14b9574b --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataAttributesRequest.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating a role assignment. + */ +export class IncidentRoleAssignmentDataAttributesRequest { + /** + * The name of the role to assign. + */ + "role"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + role: { + baseName: "role", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataAttributesResponse.ts new file mode 100644 index 000000000000..699f3b660a8e --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataAttributesResponse.ts @@ -0,0 +1,82 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of an incident role assignment. + */ +export class IncidentRoleAssignmentDataAttributesResponse { + /** + * Timestamp when the role assignment was created. + */ + "created": Date; + /** + * Timestamp when the role assignment was last modified. + */ + "modified": Date; + /** + * The type of the responder. + */ + "responderType": string; + /** + * The name of the assigned role. + */ + "role": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + responderType: { + baseName: "responder_type", + type: "string", + required: true, + }, + role: { + baseName: "role", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataRequest.ts new file mode 100644 index 000000000000..715a93aff04f --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataRequest.ts @@ -0,0 +1,73 @@ +/** + * 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 { IncidentRoleAssignmentDataAttributesRequest } from "./IncidentRoleAssignmentDataAttributesRequest"; +import { IncidentRoleAssignmentRelationshipsRequest } from "./IncidentRoleAssignmentRelationshipsRequest"; +import { IncidentRoleAssignmentType } from "./IncidentRoleAssignmentType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Role assignment data for a request. + */ +export class IncidentRoleAssignmentDataRequest { + /** + * Attributes for creating a role assignment. + */ + "attributes"?: IncidentRoleAssignmentDataAttributesRequest; + /** + * Relationships for creating a role assignment. + */ + "relationships": IncidentRoleAssignmentRelationshipsRequest; + /** + * Incident role assignment resource type. + */ + "type": IncidentRoleAssignmentType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentRoleAssignmentDataAttributesRequest", + }, + relationships: { + baseName: "relationships", + type: "IncidentRoleAssignmentRelationshipsRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentRoleAssignmentType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataResponse.ts new file mode 100644 index 000000000000..f3905935213c --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentDataResponse.ts @@ -0,0 +1,83 @@ +/** + * 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 { IncidentRoleAssignmentDataAttributesResponse } from "./IncidentRoleAssignmentDataAttributesResponse"; +import { IncidentRoleAssignmentRelationshipsResponse } from "./IncidentRoleAssignmentRelationshipsResponse"; +import { IncidentRoleAssignmentType } from "./IncidentRoleAssignmentType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Role assignment data in a response. + */ +export class IncidentRoleAssignmentDataResponse { + /** + * Attributes of an incident role assignment. + */ + "attributes": IncidentRoleAssignmentDataAttributesResponse; + /** + * The role assignment identifier. + */ + "id": string; + /** + * Relationships of a role assignment. + */ + "relationships"?: IncidentRoleAssignmentRelationshipsResponse; + /** + * Incident role assignment resource type. + */ + "type": IncidentRoleAssignmentType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentRoleAssignmentDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + relationships: { + baseName: "relationships", + type: "IncidentRoleAssignmentRelationshipsResponse", + }, + type: { + baseName: "type", + type: "IncidentRoleAssignmentType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRelationshipsRequest.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRelationshipsRequest.ts new file mode 100644 index 000000000000..6233e24b217c --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRelationshipsRequest.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 { IncidentRoleAssignmentResponderRelationship } from "./IncidentRoleAssignmentResponderRelationship"; +import { IncidentRoleAssignmentRoleRelationship } from "./IncidentRoleAssignmentRoleRelationship"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationships for creating a role assignment. + */ +export class IncidentRoleAssignmentRelationshipsRequest { + /** + * Relationship to a role. + */ + "reservedRole"?: IncidentRoleAssignmentRoleRelationship; + /** + * Relationship to a responder. + */ + "responder": IncidentRoleAssignmentResponderRelationship; + /** + * Relationship to a role. + */ + "userDefinedRole"?: IncidentRoleAssignmentRoleRelationship; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + reservedRole: { + baseName: "reserved_role", + type: "IncidentRoleAssignmentRoleRelationship", + }, + responder: { + baseName: "responder", + type: "IncidentRoleAssignmentResponderRelationship", + required: true, + }, + userDefinedRole: { + baseName: "user_defined_role", + type: "IncidentRoleAssignmentRoleRelationship", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentRelationshipsRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRelationshipsResponse.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRelationshipsResponse.ts new file mode 100644 index 000000000000..74ed6ffe844e --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRelationshipsResponse.ts @@ -0,0 +1,87 @@ +/** + * 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 { IncidentRoleAssignmentResponderRelationship } from "./IncidentRoleAssignmentResponderRelationship"; +import { IncidentRoleAssignmentRoleRelationship } from "./IncidentRoleAssignmentRoleRelationship"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationships of a role assignment. + */ +export class IncidentRoleAssignmentRelationshipsResponse { + /** + * Relationship to a responder. + */ + "createdByUser"?: IncidentRoleAssignmentResponderRelationship; + /** + * Relationship to a responder. + */ + "lastModifiedByUser"?: IncidentRoleAssignmentResponderRelationship; + /** + * Relationship to a role. + */ + "reservedRole"?: IncidentRoleAssignmentRoleRelationship; + /** + * Relationship to a responder. + */ + "responder": IncidentRoleAssignmentResponderRelationship; + /** + * Relationship to a role. + */ + "userDefinedRole"?: IncidentRoleAssignmentRoleRelationship; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdByUser: { + baseName: "created_by_user", + type: "IncidentRoleAssignmentResponderRelationship", + }, + lastModifiedByUser: { + baseName: "last_modified_by_user", + type: "IncidentRoleAssignmentResponderRelationship", + }, + reservedRole: { + baseName: "reserved_role", + type: "IncidentRoleAssignmentRoleRelationship", + }, + responder: { + baseName: "responder", + type: "IncidentRoleAssignmentResponderRelationship", + required: true, + }, + userDefinedRole: { + baseName: "user_defined_role", + type: "IncidentRoleAssignmentRoleRelationship", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentRelationshipsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRequest.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRequest.ts new file mode 100644 index 000000000000..1ae10954a141 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentRoleAssignmentDataRequest } from "./IncidentRoleAssignmentDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create a role assignment. + */ +export class IncidentRoleAssignmentRequest { + /** + * Role assignment data for a request. + */ + "data": IncidentRoleAssignmentDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentRoleAssignmentDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentResponderRelationship.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentResponderRelationship.ts new file mode 100644 index 000000000000..979f321761ab --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentResponderRelationship.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentRoleAssignmentResponderRelationshipData } from "./IncidentRoleAssignmentResponderRelationshipData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to a responder. + */ +export class IncidentRoleAssignmentResponderRelationship { + /** + * Responder relationship data. + */ + "data": IncidentRoleAssignmentResponderRelationshipData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentRoleAssignmentResponderRelationshipData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentResponderRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentResponderRelationshipData.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentResponderRelationshipData.ts new file mode 100644 index 000000000000..7ad786ccf79a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentResponderRelationshipData.ts @@ -0,0 +1,63 @@ +/** + * 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"; + +/** + * Responder relationship data. + */ +export class IncidentRoleAssignmentResponderRelationshipData { + /** + * The responder identifier. + */ + "id": string; + /** + * The responder resource type. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentResponderRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentResponse.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentResponse.ts new file mode 100644 index 000000000000..855911da76cc --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentRoleAssignmentDataResponse } from "./IncidentRoleAssignmentDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a single role assignment. + */ +export class IncidentRoleAssignmentResponse { + /** + * Role assignment data in a response. + */ + "data": IncidentRoleAssignmentDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentRoleAssignmentDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRoleRelationship.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRoleRelationship.ts new file mode 100644 index 000000000000..70a8b28c7578 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRoleRelationship.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 { IncidentRoleAssignmentRoleRelationshipData } from "./IncidentRoleAssignmentRoleRelationshipData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to a role. + */ +export class IncidentRoleAssignmentRoleRelationship { + /** + * Role relationship data. + */ + "data"?: IncidentRoleAssignmentRoleRelationshipData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentRoleAssignmentRoleRelationshipData", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentRoleRelationship.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRoleRelationshipData.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRoleRelationshipData.ts new file mode 100644 index 000000000000..ad9f1ca341ea --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentRoleRelationshipData.ts @@ -0,0 +1,63 @@ +/** + * 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"; + +/** + * Role relationship data. + */ +export class IncidentRoleAssignmentRoleRelationshipData { + /** + * The role identifier. + */ + "id": string; + /** + * The role resource type. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRoleAssignmentRoleRelationshipData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRoleAssignmentType.ts b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentType.ts new file mode 100644 index 000000000000..2f5359157d4c --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRoleAssignmentType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident role assignment resource type. + */ + +export type IncidentRoleAssignmentType = + | typeof INCIDENT_ROLE_ASSIGNMENTS + | UnparsedObject; +export const INCIDENT_ROLE_ASSIGNMENTS = "incident_role_assignments"; diff --git a/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateDataAttributesResponse.ts new file mode 100644 index 000000000000..c8fd708c2b81 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateDataAttributesResponse.ts @@ -0,0 +1,93 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of an incident rule execution state. + */ +export class IncidentRuleExecutionStateDataAttributesResponse { + /** + * Timestamp when the state was created. + */ + "created": Date; + /** + * The incident identifier. + */ + "incidentUuid": string; + /** + * Timestamp of the last rule execution. + */ + "lastExecutedAt"?: Date; + /** + * Timestamp when the state was last modified. + */ + "modified": Date; + /** + * The rule identifier. + */ + "ruleUuid": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + incidentUuid: { + baseName: "incident_uuid", + type: "string", + required: true, + format: "uuid", + }, + lastExecutedAt: { + baseName: "last_executed_at", + type: "Date", + format: "date-time", + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + ruleUuid: { + baseName: "rule_uuid", + type: "string", + required: true, + format: "uuid", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRuleExecutionStateDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateDataResponse.ts new file mode 100644 index 000000000000..91943ee99052 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentRuleExecutionStateDataAttributesResponse } from "./IncidentRuleExecutionStateDataAttributesResponse"; +import { IncidentRuleExecutionStateType } from "./IncidentRuleExecutionStateType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Rule execution state data in a response. + */ +export class IncidentRuleExecutionStateDataResponse { + /** + * Attributes of an incident rule execution state. + */ + "attributes": IncidentRuleExecutionStateDataAttributesResponse; + /** + * The rule execution state identifier. + */ + "id": string; + /** + * Incident rule execution state resource type. + */ + "type": IncidentRuleExecutionStateType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentRuleExecutionStateDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentRuleExecutionStateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRuleExecutionStateDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateRule.ts b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateRule.ts new file mode 100644 index 000000000000..8a0735553458 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateRule.ts @@ -0,0 +1,63 @@ +/** + * 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"; + +/** + * A rule in a batch request. + */ +export class IncidentRuleExecutionStateRule { + /** + * Timestamp of the last rule execution. + */ + "lastExecutedAt"?: Date; + /** + * The rule identifier. + */ + "ruleUuid": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + lastExecutedAt: { + baseName: "last_executed_at", + type: "Date", + format: "date-time", + }, + ruleUuid: { + baseName: "rule_uuid", + type: "string", + required: true, + format: "uuid", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRuleExecutionStateRule.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateType.ts b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateType.ts new file mode 100644 index 000000000000..5a4dbb50931b --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStateType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident rule execution state resource type. + */ + +export type IncidentRuleExecutionStateType = + | typeof INCIDENT_RULE_EXECUTION_STATES + | UnparsedObject; +export const INCIDENT_RULE_EXECUTION_STATES = "incident_rule_execution_states"; diff --git a/packages/datadog-api-client-v2/models/IncidentRuleExecutionStatesResponse.ts b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStatesResponse.ts new file mode 100644 index 000000000000..3f5dee5a1324 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentRuleExecutionStatesResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentRuleExecutionStateDataResponse } from "./IncidentRuleExecutionStateDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of rule execution states. + */ +export class IncidentRuleExecutionStatesResponse { + /** + * List of rule execution states. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentRuleExecutionStatesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentSearchIncidentsExportRequest.ts b/packages/datadog-api-client-v2/models/IncidentSearchIncidentsExportRequest.ts new file mode 100644 index 000000000000..7872540b61ca --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentSearchIncidentsExportRequest.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to export incidents as CSV. + */ +export class IncidentSearchIncidentsExportRequest { + /** + * The list of fields to include in the export. + */ + "fields": Array; + /** + * The search query to filter incidents for export. + */ + "query": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + fields: { + baseName: "fields", + type: "Array", + required: true, + }, + query: { + baseName: "query", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentSearchIncidentsExportRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentSearchIncidentsIncludeType.ts b/packages/datadog-api-client-v2/models/IncidentSearchIncidentsIncludeType.ts new file mode 100644 index 000000000000..1611ac055936 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentSearchIncidentsIncludeType.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"; + +/** + * Types of related objects to include. + */ + +export type IncidentSearchIncidentsIncludeType = + | typeof INCIDENT_TYPE + | typeof IMPACTS + | typeof USERS + | typeof RESPONDERS + | typeof INTEGRATIONS + | typeof ATTACHMENTS + | UnparsedObject; +export const INCIDENT_TYPE = "incident_type"; +export const IMPACTS = "impacts"; +export const USERS = "users"; +export const RESPONDERS = "responders"; +export const INTEGRATIONS = "integrations"; +export const ATTACHMENTS = "attachments"; diff --git a/packages/datadog-api-client-v2/models/IncidentSearchIncidentsSortOrder.ts b/packages/datadog-api-client-v2/models/IncidentSearchIncidentsSortOrder.ts new file mode 100644 index 000000000000..589811d98165 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentSearchIncidentsSortOrder.ts @@ -0,0 +1,22 @@ +/** + * 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"; + +/** + * The ways searched incidents can be sorted. + */ + +export type IncidentSearchIncidentsSortOrder = + | typeof CREATED_ASCENDING + | typeof CREATED_DESCENDING + | typeof MODIFIED_ASCENDING + | typeof MODIFIED_DESCENDING + | UnparsedObject; +export const CREATED_ASCENDING = "created"; +export const CREATED_DESCENDING = "-created"; +export const MODIFIED_ASCENDING = "modified"; +export const MODIFIED_DESCENDING = "-modified"; diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeCreateData.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeCreateData.ts new file mode 100644 index 000000000000..4050be55fa6a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeCreateData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatusPageNoticeCreateDataAttributes } from "./IncidentStatusPageNoticeCreateDataAttributes"; +import { IncidentStatusPageNoticeIntegrationType } from "./IncidentStatusPageNoticeIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for publishing a status page notice. + */ +export class IncidentStatusPageNoticeCreateData { + /** + * Attributes for publishing a status page notice. + */ + "attributes": IncidentStatusPageNoticeCreateDataAttributes; + /** + * Incident integration resource type. + */ + "type": IncidentStatusPageNoticeIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentStatusPageNoticeCreateDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "IncidentStatusPageNoticeIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPageNoticeCreateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeCreateDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeCreateDataAttributes.ts new file mode 100644 index 000000000000..121c1f8e5bef --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeCreateDataAttributes.ts @@ -0,0 +1,76 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for publishing a status page notice. + */ +export class IncidentStatusPageNoticeCreateDataAttributes { + /** + * Map of component identifiers to their status. + */ + "components"?: { [key: string]: string }; + /** + * The message body of the notice. + */ + "message"?: string; + /** + * The status of the notice. + */ + "status"?: string; + /** + * The title of the notice. + */ + "title"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + components: { + baseName: "components", + type: "{ [key: string]: string; }", + }, + message: { + baseName: "message", + type: "string", + }, + status: { + baseName: "status", + type: "string", + }, + title: { + baseName: "title", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPageNoticeCreateDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeCreateRequest.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeCreateRequest.ts new file mode 100644 index 000000000000..f54d8a697be2 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeCreateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatusPageNoticeCreateData } from "./IncidentStatusPageNoticeCreateData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to publish a status page notice. + */ +export class IncidentStatusPageNoticeCreateRequest { + /** + * Data for publishing a status page notice. + */ + "data": IncidentStatusPageNoticeCreateData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentStatusPageNoticeCreateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPageNoticeCreateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationDataAttributes.ts new file mode 100644 index 000000000000..2f915b8756a9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationDataAttributes.ts @@ -0,0 +1,82 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a status page notice integration. + */ +export class IncidentStatusPageNoticeIntegrationDataAttributes { + /** + * Timestamp when the integration was created. + */ + "created": Date; + /** + * The type of integration. + */ + "integrationType": string; + /** + * Timestamp when the integration was last modified. + */ + "modified": Date; + /** + * The status of the integration. + */ + "status": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + integrationType: { + baseName: "integration_type", + type: "string", + required: true, + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + status: { + baseName: "status", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPageNoticeIntegrationDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationDataResponse.ts new file mode 100644 index 000000000000..dcaa1c564b47 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentStatusPageNoticeIntegrationDataAttributes } from "./IncidentStatusPageNoticeIntegrationDataAttributes"; +import { IncidentStatusPageNoticeIntegrationType } from "./IncidentStatusPageNoticeIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Status page notice integration data in a response. + */ +export class IncidentStatusPageNoticeIntegrationDataResponse { + /** + * Attributes of a status page notice integration. + */ + "attributes": IncidentStatusPageNoticeIntegrationDataAttributes; + /** + * The integration identifier. + */ + "id": string; + /** + * Incident integration resource type. + */ + "type": IncidentStatusPageNoticeIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentStatusPageNoticeIntegrationDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentStatusPageNoticeIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPageNoticeIntegrationDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationResponse.ts new file mode 100644 index 000000000000..837c14b162d6 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatusPageNoticeIntegrationDataResponse } from "./IncidentStatusPageNoticeIntegrationDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with status page notice integration metadata. + */ +export class IncidentStatusPageNoticeIntegrationResponse { + /** + * Status page notice integration data in a response. + */ + "data": IncidentStatusPageNoticeIntegrationDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentStatusPageNoticeIntegrationDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPageNoticeIntegrationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationType.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationType.ts new file mode 100644 index 000000000000..7fe0a9196bae --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeIntegrationType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident integration resource type. + */ + +export type IncidentStatusPageNoticeIntegrationType = + | typeof INCIDENT_INTEGRATIONS + | UnparsedObject; +export const INCIDENT_INTEGRATIONS = "incident_integrations"; diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeUpdateData.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeUpdateData.ts new file mode 100644 index 000000000000..c04f97dcb275 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeUpdateData.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatusPageNoticeIntegrationType } from "./IncidentStatusPageNoticeIntegrationType"; +import { IncidentStatusPageNoticeUpdateDataAttributes } from "./IncidentStatusPageNoticeUpdateDataAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Data for updating a status page notice. + */ +export class IncidentStatusPageNoticeUpdateData { + /** + * Attributes for updating a status page notice. + */ + "attributes": IncidentStatusPageNoticeUpdateDataAttributes; + /** + * Incident integration resource type. + */ + "type": IncidentStatusPageNoticeIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentStatusPageNoticeUpdateDataAttributes", + required: true, + }, + type: { + baseName: "type", + type: "IncidentStatusPageNoticeIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPageNoticeUpdateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeUpdateDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeUpdateDataAttributes.ts new file mode 100644 index 000000000000..bbddac437f87 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeUpdateDataAttributes.ts @@ -0,0 +1,76 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for updating a status page notice. + */ +export class IncidentStatusPageNoticeUpdateDataAttributes { + /** + * Map of component identifiers to their status. + */ + "components"?: { [key: string]: string }; + /** + * The message body of the notice. + */ + "message"?: string; + /** + * The status of the notice. + */ + "status"?: string; + /** + * The title of the notice. + */ + "title"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + components: { + baseName: "components", + type: "{ [key: string]: string; }", + }, + message: { + baseName: "message", + type: "string", + }, + status: { + baseName: "status", + type: "string", + }, + title: { + baseName: "title", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPageNoticeUpdateDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeUpdateRequest.ts b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeUpdateRequest.ts new file mode 100644 index 000000000000..4f1c1fc82071 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPageNoticeUpdateRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatusPageNoticeUpdateData } from "./IncidentStatusPageNoticeUpdateData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to update a status page notice. + */ +export class IncidentStatusPageNoticeUpdateRequest { + /** + * Data for updating a status page notice. + */ + "data": IncidentStatusPageNoticeUpdateData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentStatusPageNoticeUpdateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPageNoticeUpdateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionData.ts b/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionData.ts new file mode 100644 index 000000000000..86e469f0ece0 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionData.ts @@ -0,0 +1,73 @@ +/** + * 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 { IncidentStatusPagesSuggestionDataAttributes } from "./IncidentStatusPagesSuggestionDataAttributes"; +import { IncidentStatusPagesSuggestionType } from "./IncidentStatusPagesSuggestionType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Status pages suggestion data. + */ +export class IncidentStatusPagesSuggestionData { + /** + * Attributes of a status pages suggestion. + */ + "attributes": IncidentStatusPagesSuggestionDataAttributes; + /** + * The suggestion title. + */ + "id": string; + /** + * Incident status pages suggestion resource type. + */ + "type": IncidentStatusPagesSuggestionType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentStatusPagesSuggestionDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IncidentStatusPagesSuggestionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPagesSuggestionData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionDataAttributes.ts new file mode 100644 index 000000000000..f5054fa1f6bd --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionDataAttributes.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a status pages suggestion. + */ +export class IncidentStatusPagesSuggestionDataAttributes { + /** + * The suggested status for the status page. + */ + "status": string; + /** + * The suggested update text for the status page notice. + */ + "updateText": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + status: { + baseName: "status", + type: "string", + required: true, + }, + updateText: { + baseName: "update_text", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPagesSuggestionDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionResponse.ts new file mode 100644 index 000000000000..057f3a996f9a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatusPagesSuggestionData } from "./IncidentStatusPagesSuggestionData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a status pages suggestion. + */ +export class IncidentStatusPagesSuggestionResponse { + /** + * Status pages suggestion data. + */ + "data": IncidentStatusPagesSuggestionData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentStatusPagesSuggestionData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatusPagesSuggestionResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionType.ts b/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionType.ts new file mode 100644 index 000000000000..2ecad276df07 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatusPagesSuggestionType.ts @@ -0,0 +1,17 @@ +/** + * 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"; + +/** + * Incident status pages suggestion resource type. + */ + +export type IncidentStatusPagesSuggestionType = + | typeof INCIDENT_STATUSPAGES_SUGGESTION + | UnparsedObject; +export const INCIDENT_STATUSPAGES_SUGGESTION = + "incident_statuspages_suggestion"; diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataAttributesRequest.ts new file mode 100644 index 000000000000..2130adf7b05c --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataAttributesRequest.ts @@ -0,0 +1,100 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating a Statuspage incident. + */ +export class IncidentStatuspageIncidentDataAttributesRequest { + /** + * The body text of the Statuspage incident. + */ + "body"?: string; + /** + * Map of component identifiers to their status. + */ + "components"?: { [key: string]: string }; + /** + * Whether to deliver notifications. + */ + "deliverNotifications"?: boolean; + /** + * The impact level of the incident. + */ + "impact"?: string; + /** + * The name of the Statuspage incident. + */ + "name"?: string; + /** + * The Statuspage page identifier. + */ + "pageId"?: string; + /** + * The status of the Statuspage incident. + */ + "status"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + body: { + baseName: "body", + type: "string", + }, + components: { + baseName: "components", + type: "{ [key: string]: string; }", + }, + deliverNotifications: { + baseName: "deliver_notifications", + type: "boolean", + }, + impact: { + baseName: "impact", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + pageId: { + baseName: "page_id", + type: "string", + }, + status: { + baseName: "status", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageIncidentDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataAttributesResponse.ts new file mode 100644 index 000000000000..eebf3e4a1ef4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataAttributesResponse.ts @@ -0,0 +1,91 @@ +/** + * 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 { IncidentStatuspageIncidentEntry } from "./IncidentStatuspageIncidentEntry"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a Statuspage incident integration. + */ +export class IncidentStatuspageIncidentDataAttributesResponse { + /** + * Timestamp when the integration was created. + */ + "created": Date; + /** + * List of Statuspage incidents. + */ + "incidents"?: Array; + /** + * The type of integration. + */ + "integrationType": string; + /** + * Timestamp when the integration was last modified. + */ + "modified": Date; + /** + * The status of the integration. + */ + "status": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + incidents: { + baseName: "incidents", + type: "Array", + }, + integrationType: { + baseName: "integration_type", + type: "string", + required: true, + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + status: { + baseName: "status", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageIncidentDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataRequest.ts new file mode 100644 index 000000000000..b484f08797e3 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatuspageIncidentDataAttributesRequest } from "./IncidentStatuspageIncidentDataAttributesRequest"; +import { IncidentStatuspageIncidentType } from "./IncidentStatuspageIncidentType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Statuspage incident data for a request. + */ +export class IncidentStatuspageIncidentDataRequest { + /** + * Attributes for creating or updating a Statuspage incident. + */ + "attributes": IncidentStatuspageIncidentDataAttributesRequest; + /** + * Statuspage incident integration resource type. + */ + "type": IncidentStatuspageIncidentType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentStatuspageIncidentDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentStatuspageIncidentType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageIncidentDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataResponse.ts new file mode 100644 index 000000000000..d66f68746707 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentStatuspageIncidentDataAttributesResponse } from "./IncidentStatuspageIncidentDataAttributesResponse"; +import { IncidentStatuspageIncidentType } from "./IncidentStatuspageIncidentType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Statuspage incident data in a response. + */ +export class IncidentStatuspageIncidentDataResponse { + /** + * Attributes of a Statuspage incident integration. + */ + "attributes": IncidentStatuspageIncidentDataAttributesResponse; + /** + * The integration identifier. + */ + "id": string; + /** + * Statuspage incident integration resource type. + */ + "type": IncidentStatuspageIncidentType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentStatuspageIncidentDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentStatuspageIncidentType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageIncidentDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentEntry.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentEntry.ts new file mode 100644 index 000000000000..e71037fb97ee --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentEntry.ts @@ -0,0 +1,70 @@ +/** + * 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"; + +/** + * A Statuspage incident entry. + */ +export class IncidentStatuspageIncidentEntry { + /** + * The Datadog incident identifier. + */ + "incidentId": string; + /** + * The Statuspage page identifier. + */ + "pageId": string; + /** + * The URL of the Statuspage incident. + */ + "redirectUrl"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + incidentId: { + baseName: "incident_id", + type: "string", + required: true, + }, + pageId: { + baseName: "page_id", + type: "string", + required: true, + }, + redirectUrl: { + baseName: "redirect_url", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageIncidentEntry.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentRequest.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentRequest.ts new file mode 100644 index 000000000000..23474650f241 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatuspageIncidentDataRequest } from "./IncidentStatuspageIncidentDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create or update a Statuspage incident. + */ +export class IncidentStatuspageIncidentRequest { + /** + * Statuspage incident data for a request. + */ + "data": IncidentStatuspageIncidentDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentStatuspageIncidentDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageIncidentRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentResponse.ts new file mode 100644 index 000000000000..f45d3a7b6b6a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatuspageIncidentDataResponse } from "./IncidentStatuspageIncidentDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with Statuspage incident integration metadata. + */ +export class IncidentStatuspageIncidentResponse { + /** + * Statuspage incident data in a response. + */ + "data": IncidentStatuspageIncidentDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentStatuspageIncidentDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageIncidentResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentType.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentType.ts new file mode 100644 index 000000000000..1317d1fccefd --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageIncidentType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Statuspage incident integration resource type. + */ + +export type IncidentStatuspageIncidentType = + | typeof INCIDENT_INTEGRATIONS + | UnparsedObject; +export const INCIDENT_INTEGRATIONS = "incident_integrations"; diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesData.ts b/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesData.ts new file mode 100644 index 000000000000..b764e52c8a87 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesData.ts @@ -0,0 +1,73 @@ +/** + * 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 { IncidentStatuspagePreferencesDataAttributes } from "./IncidentStatuspagePreferencesDataAttributes"; +import { IncidentStatuspagePreferencesType } from "./IncidentStatuspagePreferencesType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Subscription preferences data. + */ +export class IncidentStatuspagePreferencesData { + /** + * Attributes of subscription preferences. + */ + "attributes": IncidentStatuspagePreferencesDataAttributes; + /** + * The preferences identifier. + */ + "id": string; + /** + * Subscription preferences resource type. + */ + "type": IncidentStatuspagePreferencesType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentStatuspagePreferencesDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IncidentStatuspagePreferencesType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspagePreferencesData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesDataAttributes.ts new file mode 100644 index 000000000000..ca2ce61355d9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesDataAttributes.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of subscription preferences. + */ +export class IncidentStatuspagePreferencesDataAttributes { + /** + * Whether the user is subscribed. + */ + "subscribed": boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + subscribed: { + baseName: "subscribed", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspagePreferencesDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesResponse.ts new file mode 100644 index 000000000000..42732a90ed6e --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatuspagePreferencesData } from "./IncidentStatuspagePreferencesData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with subscription preferences. + */ +export class IncidentStatuspagePreferencesResponse { + /** + * Subscription preferences data. + */ + "data": IncidentStatuspagePreferencesData; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentStatuspagePreferencesData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspagePreferencesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesType.ts b/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesType.ts new file mode 100644 index 000000000000..fd3a56b9c2a4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspagePreferencesType.ts @@ -0,0 +1,17 @@ +/** + * 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"; + +/** + * Subscription preferences resource type. + */ + +export type IncidentStatuspagePreferencesType = + | typeof STATUSPAGE_SUBSCRIPTION_PREFERENCES + | UnparsedObject; +export const STATUSPAGE_SUBSCRIPTION_PREFERENCES = + "statuspage_subscription_preferences"; diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataAttributesRequest.ts new file mode 100644 index 000000000000..f857e92e2a03 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataAttributesRequest.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating an email subscription. + */ +export class IncidentStatuspageSubscriptionDataAttributesRequest { + /** + * The email address to subscribe. + */ + "email": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + email: { + baseName: "email", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageSubscriptionDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataAttributesResponse.ts new file mode 100644 index 000000000000..950eb5c70118 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataAttributesResponse.ts @@ -0,0 +1,72 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of an email subscription. + */ +export class IncidentStatuspageSubscriptionDataAttributesResponse { + /** + * Whether the subscription has been confirmed. + */ + "confirmed": boolean; + /** + * Timestamp when the subscription was created. + */ + "createdAt": Date; + /** + * The subscribed email address. + */ + "email": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + confirmed: { + baseName: "confirmed", + type: "boolean", + required: true, + }, + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + email: { + baseName: "email", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageSubscriptionDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataRequest.ts new file mode 100644 index 000000000000..a7157b7f3e89 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatuspageSubscriptionDataAttributesRequest } from "./IncidentStatuspageSubscriptionDataAttributesRequest"; +import { IncidentStatuspageSubscriptionType } from "./IncidentStatuspageSubscriptionType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Subscription data for a request. + */ +export class IncidentStatuspageSubscriptionDataRequest { + /** + * Attributes for creating an email subscription. + */ + "attributes": IncidentStatuspageSubscriptionDataAttributesRequest; + /** + * Statuspage email subscription resource type. + */ + "type": IncidentStatuspageSubscriptionType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentStatuspageSubscriptionDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentStatuspageSubscriptionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageSubscriptionDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataResponse.ts new file mode 100644 index 000000000000..be1e0c168345 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionDataResponse.ts @@ -0,0 +1,73 @@ +/** + * 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 { IncidentStatuspageSubscriptionDataAttributesResponse } from "./IncidentStatuspageSubscriptionDataAttributesResponse"; +import { IncidentStatuspageSubscriptionType } from "./IncidentStatuspageSubscriptionType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Email subscription data in a response. + */ +export class IncidentStatuspageSubscriptionDataResponse { + /** + * Attributes of an email subscription. + */ + "attributes": IncidentStatuspageSubscriptionDataAttributesResponse; + /** + * The subscription identifier. + */ + "id": string; + /** + * Statuspage email subscription resource type. + */ + "type": IncidentStatuspageSubscriptionType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentStatuspageSubscriptionDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IncidentStatuspageSubscriptionType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageSubscriptionDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionRequest.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionRequest.ts new file mode 100644 index 000000000000..e366d4bbb22a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatuspageSubscriptionDataRequest } from "./IncidentStatuspageSubscriptionDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create an email subscription. + */ +export class IncidentStatuspageSubscriptionRequest { + /** + * Subscription data for a request. + */ + "data": IncidentStatuspageSubscriptionDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentStatuspageSubscriptionDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageSubscriptionRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionResponse.ts new file mode 100644 index 000000000000..f0b099278e8d --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatuspageSubscriptionDataResponse } from "./IncidentStatuspageSubscriptionDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a single email subscription. + */ +export class IncidentStatuspageSubscriptionResponse { + /** + * Email subscription data in a response. + */ + "data": IncidentStatuspageSubscriptionDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentStatuspageSubscriptionDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageSubscriptionResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionType.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionType.ts new file mode 100644 index 000000000000..6e99fedd7035 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Statuspage email subscription resource type. + */ + +export type IncidentStatuspageSubscriptionType = + | typeof STATUSPAGE_EMAIL_SUBSCRIPTION + | UnparsedObject; +export const STATUSPAGE_EMAIL_SUBSCRIPTION = "statuspage_email_subscription"; diff --git a/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionsResponse.ts b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionsResponse.ts new file mode 100644 index 000000000000..63592e8c96cb --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentStatuspageSubscriptionsResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentStatuspageSubscriptionDataResponse } from "./IncidentStatuspageSubscriptionDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of email subscriptions. + */ +export class IncidentStatuspageSubscriptionsResponse { + /** + * List of email subscriptions. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentStatuspageSubscriptionsResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTemplateVariableData.ts b/packages/datadog-api-client-v2/models/IncidentTemplateVariableData.ts new file mode 100644 index 000000000000..8cf6aca1396f --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTemplateVariableData.ts @@ -0,0 +1,73 @@ +/** + * 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 { IncidentTemplateVariableDataAttributes } from "./IncidentTemplateVariableDataAttributes"; +import { IncidentTemplateVariableType } from "./IncidentTemplateVariableType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Template variable data. + */ +export class IncidentTemplateVariableData { + /** + * Attributes of a template variable. + */ + "attributes": IncidentTemplateVariableDataAttributes; + /** + * The template variable identifier. + */ + "id": string; + /** + * Template variable resource type. + */ + "type": IncidentTemplateVariableType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentTemplateVariableDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IncidentTemplateVariableType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTemplateVariableData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTemplateVariableDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentTemplateVariableDataAttributes.ts new file mode 100644 index 000000000000..0812035c7056 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTemplateVariableDataAttributes.ts @@ -0,0 +1,80 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a template variable. + */ +export class IncidentTemplateVariableDataAttributes { + /** + * A description of the template variable. + */ + "description": string; + /** + * The display name of the template variable. + */ + "displayName": string; + /** + * The domain of the template variable. + */ + "domain": string; + /** + * The variable name used in templates. + */ + "variable": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + description: { + baseName: "description", + type: "string", + required: true, + }, + displayName: { + baseName: "display_name", + type: "string", + required: true, + }, + domain: { + baseName: "domain", + type: "string", + required: true, + }, + variable: { + baseName: "variable", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTemplateVariableDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTemplateVariableType.ts b/packages/datadog-api-client-v2/models/IncidentTemplateVariableType.ts new file mode 100644 index 000000000000..e4f4298625a4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTemplateVariableType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Template variable resource type. + */ + +export type IncidentTemplateVariableType = + | typeof TEMPLATE_VARIABLES + | UnparsedObject; +export const TEMPLATE_VARIABLES = "template_variables"; diff --git a/packages/datadog-api-client-v2/models/IncidentTemplateVariablesResponse.ts b/packages/datadog-api-client-v2/models/IncidentTemplateVariablesResponse.ts new file mode 100644 index 000000000000..a66043107c9f --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTemplateVariablesResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentTemplateVariableData } from "./IncidentTemplateVariableData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of template variables. + */ +export class IncidentTemplateVariablesResponse { + /** + * List of template variables. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTemplateVariablesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineCellSource.ts b/packages/datadog-api-client-v2/models/IncidentTimelineCellSource.ts new file mode 100644 index 000000000000..714931aecf64 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineCellSource.ts @@ -0,0 +1,22 @@ +/** + * 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"; + +/** + * The source of a timeline cell. + */ + +export type IncidentTimelineCellSource = + | typeof SLACK + | typeof MICROSOFT_TEAMS + | typeof DATADOG + | typeof API + | UnparsedObject; +export const SLACK = "slack"; +export const MICROSOFT_TEAMS = "microsoft_teams"; +export const DATADOG = "datadog"; +export const API = "api"; diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineCellType.ts b/packages/datadog-api-client-v2/models/IncidentTimelineCellType.ts new file mode 100644 index 000000000000..cfc9de0ba5da --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineCellType.ts @@ -0,0 +1,28 @@ +/** + * 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"; + +/** + * The type of a timeline cell. + */ + +export type IncidentTimelineCellType = + | typeof MARKDOWN + | typeof INCIDENT_STATUS_CHANGE + | typeof TIMESTAMP_CHANGE + | typeof MEETING_SUMMARY + | typeof MEETING_CHAT + | typeof ROLE_ASSIGNMENT_CHANGE + | typeof POSTMORTEM_CHANGE + | UnparsedObject; +export const MARKDOWN = "markdown"; +export const INCIDENT_STATUS_CHANGE = "incident_status_change"; +export const TIMESTAMP_CHANGE = "timestamp_change"; +export const MEETING_SUMMARY = "meeting_summary"; +export const MEETING_CHAT = "meeting_chat"; +export const ROLE_ASSIGNMENT_CHANGE = "role_assignment_change"; +export const POSTMORTEM_CHANGE = "postmortem_change"; diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineEntriesResponse.ts b/packages/datadog-api-client-v2/models/IncidentTimelineEntriesResponse.ts new file mode 100644 index 000000000000..87cd9a26f415 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineEntriesResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentTimelineEntryDataResponse } from "./IncidentTimelineEntryDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a list of timeline entries. + */ +export class IncidentTimelineEntriesResponse { + /** + * List of timeline entries. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineEntriesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineEntryContent.ts b/packages/datadog-api-client-v2/models/IncidentTimelineEntryContent.ts new file mode 100644 index 000000000000..8b76c15159fd --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineEntryContent.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 { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The content of a timeline entry. + */ +export class IncidentTimelineEntryContent { + /** + * The markdown message content. + */ + "message"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + message: { + baseName: "message", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineEntryContent.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataAttributesRequest.ts new file mode 100644 index 000000000000..55e51c852cd7 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataAttributesRequest.ts @@ -0,0 +1,81 @@ +/** + * 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 { IncidentTimelineCellType } from "./IncidentTimelineCellType"; +import { IncidentTimelineEntryContent } from "./IncidentTimelineEntryContent"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating a timeline entry. + */ +export class IncidentTimelineEntryDataAttributesRequest { + /** + * The type of a timeline cell. + */ + "cellType": IncidentTimelineCellType; + /** + * The content of a timeline entry. + */ + "content": IncidentTimelineEntryContent; + /** + * The display time for this timeline entry. + */ + "displayTime"?: Date; + /** + * Whether this timeline entry is marked as important. + */ + "important"?: boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + cellType: { + baseName: "cell_type", + type: "IncidentTimelineCellType", + required: true, + }, + content: { + baseName: "content", + type: "IncidentTimelineEntryContent", + required: true, + }, + displayTime: { + baseName: "display_time", + type: "Date", + format: "date-time", + }, + important: { + baseName: "important", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineEntryDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataAttributesResponse.ts new file mode 100644 index 000000000000..87e0c99ecb26 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataAttributesResponse.ts @@ -0,0 +1,130 @@ +/** + * 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 { IncidentTimelineCellSource } from "./IncidentTimelineCellSource"; +import { IncidentTimelineCellType } from "./IncidentTimelineCellType"; +import { IncidentTimelineEntryContent } from "./IncidentTimelineEntryContent"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a timeline entry. + */ +export class IncidentTimelineEntryDataAttributesResponse { + /** + * The type of a timeline cell. + */ + "cellType": IncidentTimelineCellType; + /** + * The content of a timeline entry. + */ + "content": IncidentTimelineEntryContent; + /** + * Timestamp when the entry was created. + */ + "created": Date; + /** + * The display time for this timeline entry. + */ + "displayTime": Date; + /** + * Whether this timeline entry is marked as important. + */ + "important": boolean; + /** + * The incident identifier. + */ + "incidentId": string; + /** + * Timestamp when the entry was last modified. + */ + "modified": Date; + /** + * UUID of the parent timeline entry. + */ + "parentUuid"?: string; + /** + * The source of a timeline cell. + */ + "source": IncidentTimelineCellSource; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + cellType: { + baseName: "cell_type", + type: "IncidentTimelineCellType", + required: true, + }, + content: { + baseName: "content", + type: "IncidentTimelineEntryContent", + required: true, + }, + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + displayTime: { + baseName: "display_time", + type: "Date", + required: true, + format: "date-time", + }, + important: { + baseName: "important", + type: "boolean", + required: true, + }, + incidentId: { + baseName: "incident_id", + type: "string", + required: true, + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + parentUuid: { + baseName: "parent_uuid", + type: "string", + }, + source: { + baseName: "source", + type: "IncidentTimelineCellSource", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineEntryDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataRequest.ts new file mode 100644 index 000000000000..c3b3fe7a4713 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentTimelineEntryDataAttributesRequest } from "./IncidentTimelineEntryDataAttributesRequest"; +import { IncidentTimelineEntryType } from "./IncidentTimelineEntryType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Timeline entry data for a request. + */ +export class IncidentTimelineEntryDataRequest { + /** + * Attributes for creating or updating a timeline entry. + */ + "attributes": IncidentTimelineEntryDataAttributesRequest; + /** + * Incident timeline entry resource type. + */ + "type": IncidentTimelineEntryType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentTimelineEntryDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentTimelineEntryType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineEntryDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataResponse.ts new file mode 100644 index 000000000000..3d044694b9bc --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineEntryDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentTimelineEntryDataAttributesResponse } from "./IncidentTimelineEntryDataAttributesResponse"; +import { IncidentTimelineEntryType } from "./IncidentTimelineEntryType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Timeline entry data in a response. + */ +export class IncidentTimelineEntryDataResponse { + /** + * Attributes of a timeline entry. + */ + "attributes": IncidentTimelineEntryDataAttributesResponse; + /** + * The timeline entry identifier. + */ + "id": string; + /** + * Incident timeline entry resource type. + */ + "type": IncidentTimelineEntryType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentTimelineEntryDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentTimelineEntryType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineEntryDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineEntryRequest.ts b/packages/datadog-api-client-v2/models/IncidentTimelineEntryRequest.ts new file mode 100644 index 000000000000..47c3503db975 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineEntryRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentTimelineEntryDataRequest } from "./IncidentTimelineEntryDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create or update a timeline entry. + */ +export class IncidentTimelineEntryRequest { + /** + * Timeline entry data for a request. + */ + "data": IncidentTimelineEntryDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentTimelineEntryDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineEntryRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineEntryResponse.ts b/packages/datadog-api-client-v2/models/IncidentTimelineEntryResponse.ts new file mode 100644 index 000000000000..ded59d16b20f --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineEntryResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentTimelineEntryDataResponse } from "./IncidentTimelineEntryDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a single timeline entry. + */ +export class IncidentTimelineEntryResponse { + /** + * Timeline entry data in a response. + */ + "data": IncidentTimelineEntryDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentTimelineEntryDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineEntryResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineEntryType.ts b/packages/datadog-api-client-v2/models/IncidentTimelineEntryType.ts new file mode 100644 index 000000000000..a066b06119e5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineEntryType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident timeline entry resource type. + */ + +export type IncidentTimelineEntryType = + | typeof INCIDENT_TIMELINE_CELLS + | UnparsedObject; +export const INCIDENT_TIMELINE_CELLS = "incident_timeline_cells"; diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineThreadDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentTimelineThreadDataResponse.ts new file mode 100644 index 000000000000..cfc7beecf257 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineThreadDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentTimelineEntryDataAttributesResponse } from "./IncidentTimelineEntryDataAttributesResponse"; +import { IncidentTimelineEntryType } from "./IncidentTimelineEntryType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Thread data for a timeline entry. + */ +export class IncidentTimelineThreadDataResponse { + /** + * Attributes of a timeline entry. + */ + "attributes": IncidentTimelineEntryDataAttributesResponse; + /** + * The thread entry identifier. + */ + "id": string; + /** + * Incident timeline entry resource type. + */ + "type": IncidentTimelineEntryType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentTimelineEntryDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentTimelineEntryType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineThreadDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTimelineThreadResponse.ts b/packages/datadog-api-client-v2/models/IncidentTimelineThreadResponse.ts new file mode 100644 index 000000000000..3987de1b844d --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTimelineThreadResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentTimelineThreadDataResponse } from "./IncidentTimelineThreadDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with thread entries for a timeline entry. + */ +export class IncidentTimelineThreadResponse { + /** + * List of thread entries. + */ + "data": Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTimelineThreadResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataAttributesRequest.ts b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataAttributesRequest.ts new file mode 100644 index 000000000000..f4160e0a81e9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataAttributesRequest.ts @@ -0,0 +1,68 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes for creating or updating a Zoom configuration. + */ +export class IncidentZoomConfigurationDataAttributesRequest { + /** + * Whether manual meeting creation is enabled. + */ + "manualMeetingCreation"?: boolean; + /** + * Whether meeting chat timeline sync is enabled. + */ + "meetingChatTimelineSync"?: boolean; + /** + * Whether post-meeting summary is enabled. + */ + "postMeetingSummary"?: boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + manualMeetingCreation: { + baseName: "manual_meeting_creation", + type: "boolean", + }, + meetingChatTimelineSync: { + baseName: "meeting_chat_timeline_sync", + type: "boolean", + }, + postMeetingSummary: { + baseName: "post_meeting_summary", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomConfigurationDataAttributesRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataAttributesResponse.ts b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataAttributesResponse.ts new file mode 100644 index 000000000000..4eab900a3d11 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataAttributesResponse.ts @@ -0,0 +1,91 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a Zoom configuration. + */ +export class IncidentZoomConfigurationDataAttributesResponse { + /** + * Timestamp when the configuration was created. + */ + "createdAt": Date; + /** + * Whether manual meeting creation is enabled. + */ + "manualMeetingCreation": boolean; + /** + * Whether meeting chat timeline sync is enabled. + */ + "meetingChatTimelineSync": boolean; + /** + * Timestamp when the configuration was last modified. + */ + "modifiedAt": Date; + /** + * Whether post-meeting summary is enabled. + */ + "postMeetingSummary": boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + createdAt: { + baseName: "created_at", + type: "Date", + required: true, + format: "date-time", + }, + manualMeetingCreation: { + baseName: "manual_meeting_creation", + type: "boolean", + required: true, + }, + meetingChatTimelineSync: { + baseName: "meeting_chat_timeline_sync", + type: "boolean", + required: true, + }, + modifiedAt: { + baseName: "modified_at", + type: "Date", + required: true, + format: "date-time", + }, + postMeetingSummary: { + baseName: "post_meeting_summary", + type: "boolean", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomConfigurationDataAttributesResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataRequest.ts b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataRequest.ts new file mode 100644 index 000000000000..3ee794502827 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataRequest.ts @@ -0,0 +1,64 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentZoomConfigurationDataAttributesRequest } from "./IncidentZoomConfigurationDataAttributesRequest"; +import { IncidentZoomConfigurationType } from "./IncidentZoomConfigurationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Zoom configuration data for a request. + */ +export class IncidentZoomConfigurationDataRequest { + /** + * Attributes for creating or updating a Zoom configuration. + */ + "attributes": IncidentZoomConfigurationDataAttributesRequest; + /** + * Zoom configuration resource type. + */ + "type": IncidentZoomConfigurationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentZoomConfigurationDataAttributesRequest", + required: true, + }, + type: { + baseName: "type", + type: "IncidentZoomConfigurationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomConfigurationDataRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataResponse.ts new file mode 100644 index 000000000000..004f24dc5bff --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentZoomConfigurationDataAttributesResponse } from "./IncidentZoomConfigurationDataAttributesResponse"; +import { IncidentZoomConfigurationType } from "./IncidentZoomConfigurationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Zoom configuration data in a response. + */ +export class IncidentZoomConfigurationDataResponse { + /** + * Attributes of a Zoom configuration. + */ + "attributes": IncidentZoomConfigurationDataAttributesResponse; + /** + * The configuration identifier. + */ + "id": string; + /** + * Zoom configuration resource type. + */ + "type": IncidentZoomConfigurationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentZoomConfigurationDataAttributesResponse", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentZoomConfigurationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomConfigurationDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomConfigurationRequest.ts b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationRequest.ts new file mode 100644 index 000000000000..bfef8b38a9f4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationRequest.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentZoomConfigurationDataRequest } from "./IncidentZoomConfigurationDataRequest"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Request to create or update a Zoom configuration. + */ +export class IncidentZoomConfigurationRequest { + /** + * Zoom configuration data for a request. + */ + "data": IncidentZoomConfigurationDataRequest; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentZoomConfigurationDataRequest", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomConfigurationRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomConfigurationResponse.ts b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationResponse.ts new file mode 100644 index 000000000000..86d28997e107 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentZoomConfigurationDataResponse } from "./IncidentZoomConfigurationDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a Zoom configuration. + */ +export class IncidentZoomConfigurationResponse { + /** + * Zoom configuration data in a response. + */ + "data": IncidentZoomConfigurationDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentZoomConfigurationDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomConfigurationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomConfigurationType.ts b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationType.ts new file mode 100644 index 000000000000..02e3fe33a0fe --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomConfigurationType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Zoom configuration resource type. + */ + +export type IncidentZoomConfigurationType = + | typeof ZOOM_CONFIGURATIONS + | UnparsedObject; +export const ZOOM_CONFIGURATIONS = "zoom_configurations"; diff --git a/packages/datadog-api-client-v2/models/IncidentZoomIntegrationDataAttributes.ts b/packages/datadog-api-client-v2/models/IncidentZoomIntegrationDataAttributes.ts new file mode 100644 index 000000000000..1bdc1e59aefe --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomIntegrationDataAttributes.ts @@ -0,0 +1,92 @@ +/** + * 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 { IncidentZoomMeeting } from "./IncidentZoomMeeting"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Attributes of a Zoom integration metadata. + */ +export class IncidentZoomIntegrationDataAttributes { + /** + * Timestamp when the integration was created. + */ + "created": Date; + /** + * The type of integration. + */ + "integrationType": string; + /** + * List of Zoom meetings. + */ + "meetings": Array; + /** + * Timestamp when the integration was last modified. + */ + "modified": Date; + /** + * The status of the integration. + */ + "status": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + integrationType: { + baseName: "integration_type", + type: "string", + required: true, + }, + meetings: { + baseName: "meetings", + type: "Array", + required: true, + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + status: { + baseName: "status", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomIntegrationDataAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomIntegrationDataResponse.ts b/packages/datadog-api-client-v2/models/IncidentZoomIntegrationDataResponse.ts new file mode 100644 index 000000000000..aa38a6744ebd --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomIntegrationDataResponse.ts @@ -0,0 +1,74 @@ +/** + * 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 { IncidentZoomIntegrationDataAttributes } from "./IncidentZoomIntegrationDataAttributes"; +import { IncidentZoomIntegrationType } from "./IncidentZoomIntegrationType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Zoom integration data in a response. + */ +export class IncidentZoomIntegrationDataResponse { + /** + * Attributes of a Zoom integration metadata. + */ + "attributes": IncidentZoomIntegrationDataAttributes; + /** + * The integration identifier. + */ + "id": string; + /** + * Incident integration resource type. + */ + "type": IncidentZoomIntegrationType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "IncidentZoomIntegrationDataAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentZoomIntegrationType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomIntegrationDataResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomIntegrationResponse.ts b/packages/datadog-api-client-v2/models/IncidentZoomIntegrationResponse.ts new file mode 100644 index 000000000000..2496663d5056 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomIntegrationResponse.ts @@ -0,0 +1,54 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ +import { IncidentZoomIntegrationDataResponse } from "./IncidentZoomIntegrationDataResponse"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with Zoom integration metadata. + */ +export class IncidentZoomIntegrationResponse { + /** + * Zoom integration data in a response. + */ + "data": IncidentZoomIntegrationDataResponse; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentZoomIntegrationDataResponse", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomIntegrationResponse.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentZoomIntegrationType.ts b/packages/datadog-api-client-v2/models/IncidentZoomIntegrationType.ts new file mode 100644 index 000000000000..86f5e47020a1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomIntegrationType.ts @@ -0,0 +1,16 @@ +/** + * 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"; + +/** + * Incident integration resource type. + */ + +export type IncidentZoomIntegrationType = + | typeof INCIDENT_INTEGRATIONS + | UnparsedObject; +export const INCIDENT_INTEGRATIONS = "incident_integrations"; diff --git a/packages/datadog-api-client-v2/models/IncidentZoomMeeting.ts b/packages/datadog-api-client-v2/models/IncidentZoomMeeting.ts new file mode 100644 index 000000000000..b4638d3350f1 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentZoomMeeting.ts @@ -0,0 +1,87 @@ +/** + * 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"; + +/** + * A Zoom meeting associated with an incident. + */ +export class IncidentZoomMeeting { + /** + * The Zoom host identifier. + */ + "hostId"?: string; + /** + * The URL to join the meeting. + */ + "joinUrl": string; + /** + * The Zoom meeting identifier. + */ + "meetingId": number; + /** + * The meeting password. + */ + "password"?: string; + /** + * The URL of the meeting recording. + */ + "recordingUrl"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + hostId: { + baseName: "host_id", + type: "string", + }, + joinUrl: { + baseName: "join_url", + type: "string", + required: true, + }, + meetingId: { + baseName: "meeting_id", + type: "number", + required: true, + format: "int64", + }, + password: { + baseName: "password", + type: "string", + }, + recordingUrl: { + baseName: "recording_url", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentZoomMeeting.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 1a0931691776..2f110e595837 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -1656,12 +1656,43 @@ import { IPAllowlistEntryAttributes } from "./IPAllowlistEntryAttributes"; import { IPAllowlistEntryData } from "./IPAllowlistEntryData"; import { IPAllowlistResponse } from "./IPAllowlistResponse"; import { IPAllowlistUpdateRequest } from "./IPAllowlistUpdateRequest"; +import { IncidentAutomationDataAttributesRequest } from "./IncidentAutomationDataAttributesRequest"; +import { IncidentAutomationDataAttributesResponse } from "./IncidentAutomationDataAttributesResponse"; +import { IncidentAutomationDataDataRequest } from "./IncidentAutomationDataDataRequest"; +import { IncidentAutomationDataDataResponse } from "./IncidentAutomationDataDataResponse"; +import { IncidentAutomationDataRequest } from "./IncidentAutomationDataRequest"; +import { IncidentAutomationDataResponse } from "./IncidentAutomationDataResponse"; +import { IncidentBatchCreateRuleExecutionStatesData } from "./IncidentBatchCreateRuleExecutionStatesData"; +import { IncidentBatchCreateRuleExecutionStatesDataAttributes } from "./IncidentBatchCreateRuleExecutionStatesDataAttributes"; +import { IncidentBatchCreateRuleExecutionStatesRequest } from "./IncidentBatchCreateRuleExecutionStatesRequest"; +import { IncidentBatchUpdateRuleExecutionStatesData } from "./IncidentBatchUpdateRuleExecutionStatesData"; +import { IncidentBatchUpdateRuleExecutionStatesDataAttributes } from "./IncidentBatchUpdateRuleExecutionStatesDataAttributes"; +import { IncidentBatchUpdateRuleExecutionStatesRequest } from "./IncidentBatchUpdateRuleExecutionStatesRequest"; +import { IncidentCaseLinkData } from "./IncidentCaseLinkData"; +import { IncidentCaseLinkDataAttributes } from "./IncidentCaseLinkDataAttributes"; +import { IncidentCaseLinkResponse } from "./IncidentCaseLinkResponse"; +import { IncidentCommunicationContent } from "./IncidentCommunicationContent"; +import { IncidentCommunicationContentHandle } from "./IncidentCommunicationContentHandle"; +import { IncidentCommunicationDataAttributesRequest } from "./IncidentCommunicationDataAttributesRequest"; +import { IncidentCommunicationDataAttributesResponse } from "./IncidentCommunicationDataAttributesResponse"; +import { IncidentCommunicationDataRequest } from "./IncidentCommunicationDataRequest"; +import { IncidentCommunicationDataResponse } from "./IncidentCommunicationDataResponse"; +import { IncidentCommunicationRequest } from "./IncidentCommunicationRequest"; +import { IncidentCommunicationResponse } from "./IncidentCommunicationResponse"; +import { IncidentCommunicationsResponse } from "./IncidentCommunicationsResponse"; import { IncidentCreateAttributes } from "./IncidentCreateAttributes"; import { IncidentCreateData } from "./IncidentCreateData"; import { IncidentCreateRelationships } from "./IncidentCreateRelationships"; import { IncidentCreateRequest } from "./IncidentCreateRequest"; +import { IncidentCreateZoomMeetingData } from "./IncidentCreateZoomMeetingData"; +import { IncidentCreateZoomMeetingDataAttributes } from "./IncidentCreateZoomMeetingDataAttributes"; +import { IncidentCreateZoomMeetingRequest } from "./IncidentCreateZoomMeetingRequest"; import { IncidentFieldAttributesMultipleValue } from "./IncidentFieldAttributesMultipleValue"; import { IncidentFieldAttributesSingleValue } from "./IncidentFieldAttributesSingleValue"; +import { IncidentGoogleMeetIntegrationDataAttributes } from "./IncidentGoogleMeetIntegrationDataAttributes"; +import { IncidentGoogleMeetIntegrationDataResponse } from "./IncidentGoogleMeetIntegrationDataResponse"; +import { IncidentGoogleMeetIntegrationResponse } from "./IncidentGoogleMeetIntegrationResponse"; +import { IncidentGoogleMeetSpace } from "./IncidentGoogleMeetSpace"; import { IncidentHandleAttributesFields } from "./IncidentHandleAttributesFields"; import { IncidentHandleAttributesRequest } from "./IncidentHandleAttributesRequest"; import { IncidentHandleAttributesResponse } from "./IncidentHandleAttributesResponse"; @@ -1701,6 +1732,33 @@ import { IncidentIntegrationMetadataPatchRequest } from "./IncidentIntegrationMe import { IncidentIntegrationMetadataResponse } from "./IncidentIntegrationMetadataResponse"; import { IncidentIntegrationMetadataResponseData } from "./IncidentIntegrationMetadataResponseData"; import { IncidentIntegrationRelationships } from "./IncidentIntegrationRelationships"; +import { IncidentJiraIssueDataAttributesRequest } from "./IncidentJiraIssueDataAttributesRequest"; +import { IncidentJiraIssueDataRequest } from "./IncidentJiraIssueDataRequest"; +import { IncidentJiraIssueIntegrationDataAttributes } from "./IncidentJiraIssueIntegrationDataAttributes"; +import { IncidentJiraIssueIntegrationDataResponse } from "./IncidentJiraIssueIntegrationDataResponse"; +import { IncidentJiraIssueIntegrationResponse } from "./IncidentJiraIssueIntegrationResponse"; +import { IncidentJiraIssueRequest } from "./IncidentJiraIssueRequest"; +import { IncidentJiraTemplateDataAttributesRequest } from "./IncidentJiraTemplateDataAttributesRequest"; +import { IncidentJiraTemplateDataAttributesResponse } from "./IncidentJiraTemplateDataAttributesResponse"; +import { IncidentJiraTemplateDataRequest } from "./IncidentJiraTemplateDataRequest"; +import { IncidentJiraTemplateDataResponse } from "./IncidentJiraTemplateDataResponse"; +import { IncidentJiraTemplateFieldConfiguration } from "./IncidentJiraTemplateFieldConfiguration"; +import { IncidentJiraTemplateIncidentTypeRelationship } from "./IncidentJiraTemplateIncidentTypeRelationship"; +import { IncidentJiraTemplateIncidentTypeRelationshipData } from "./IncidentJiraTemplateIncidentTypeRelationshipData"; +import { IncidentJiraTemplateRelationships } from "./IncidentJiraTemplateRelationships"; +import { IncidentJiraTemplateRequest } from "./IncidentJiraTemplateRequest"; +import { IncidentJiraTemplateResponse } from "./IncidentJiraTemplateResponse"; +import { IncidentJiraTemplatesResponse } from "./IncidentJiraTemplatesResponse"; +import { IncidentMSTeamsChannel } from "./IncidentMSTeamsChannel"; +import { IncidentMSTeamsIntegrationDataAttributes } from "./IncidentMSTeamsIntegrationDataAttributes"; +import { IncidentMSTeamsIntegrationDataResponse } from "./IncidentMSTeamsIntegrationDataResponse"; +import { IncidentMSTeamsIntegrationResponse } from "./IncidentMSTeamsIntegrationResponse"; +import { IncidentMicrosoftTeamsConfigurationDataAttributesRequest } from "./IncidentMicrosoftTeamsConfigurationDataAttributesRequest"; +import { IncidentMicrosoftTeamsConfigurationDataAttributesResponse } from "./IncidentMicrosoftTeamsConfigurationDataAttributesResponse"; +import { IncidentMicrosoftTeamsConfigurationDataRequest } from "./IncidentMicrosoftTeamsConfigurationDataRequest"; +import { IncidentMicrosoftTeamsConfigurationDataResponse } from "./IncidentMicrosoftTeamsConfigurationDataResponse"; +import { IncidentMicrosoftTeamsConfigurationRequest } from "./IncidentMicrosoftTeamsConfigurationRequest"; +import { IncidentMicrosoftTeamsConfigurationResponse } from "./IncidentMicrosoftTeamsConfigurationResponse"; import { IncidentNonDatadogCreator } from "./IncidentNonDatadogCreator"; import { IncidentNotificationHandle } from "./IncidentNotificationHandle"; import { IncidentNotificationRule } from "./IncidentNotificationRule"; @@ -1728,13 +1786,46 @@ import { IncidentNotificationTemplateRelationships } from "./IncidentNotificatio import { IncidentNotificationTemplateResponseData } from "./IncidentNotificationTemplateResponseData"; import { IncidentNotificationTemplateUpdateAttributes } from "./IncidentNotificationTemplateUpdateAttributes"; import { IncidentNotificationTemplateUpdateData } from "./IncidentNotificationTemplateUpdateData"; +import { IncidentPagerdutyIncidentDataResponse } from "./IncidentPagerdutyIncidentDataResponse"; +import { IncidentPagerdutyRelatedIncidentsResponse } from "./IncidentPagerdutyRelatedIncidentsResponse"; +import { IncidentPagerdutyServiceData } from "./IncidentPagerdutyServiceData"; +import { IncidentPagerdutyServiceDataAttributes } from "./IncidentPagerdutyServiceDataAttributes"; +import { IncidentPagerdutyServicesResponse } from "./IncidentPagerdutyServicesResponse"; import { IncidentRelationshipData } from "./IncidentRelationshipData"; +import { IncidentRenderTemplateDataAttributesRequest } from "./IncidentRenderTemplateDataAttributesRequest"; +import { IncidentRenderTemplateDataRequest } from "./IncidentRenderTemplateDataRequest"; +import { IncidentRenderTemplateRequest } from "./IncidentRenderTemplateRequest"; +import { IncidentRenderedTemplateData } from "./IncidentRenderedTemplateData"; +import { IncidentRenderedTemplateDataAttributes } from "./IncidentRenderedTemplateDataAttributes"; +import { IncidentRenderedTemplateResponse } from "./IncidentRenderedTemplateResponse"; +import { IncidentReservedRoleDataAttributesResponse } from "./IncidentReservedRoleDataAttributesResponse"; +import { IncidentReservedRoleDataResponse } from "./IncidentReservedRoleDataResponse"; +import { IncidentReservedRolePolicy } from "./IncidentReservedRolePolicy"; +import { IncidentReservedRoleResponse } from "./IncidentReservedRoleResponse"; +import { IncidentReservedRolesResponse } from "./IncidentReservedRolesResponse"; import { IncidentResponse } from "./IncidentResponse"; import { IncidentResponseAttributes } from "./IncidentResponseAttributes"; import { IncidentResponseData } from "./IncidentResponseData"; import { IncidentResponseMeta } from "./IncidentResponseMeta"; import { IncidentResponseMetaPagination } from "./IncidentResponseMetaPagination"; import { IncidentResponseRelationships } from "./IncidentResponseRelationships"; +import { IncidentRoleAssignmentDataAttributesRequest } from "./IncidentRoleAssignmentDataAttributesRequest"; +import { IncidentRoleAssignmentDataAttributesResponse } from "./IncidentRoleAssignmentDataAttributesResponse"; +import { IncidentRoleAssignmentDataRequest } from "./IncidentRoleAssignmentDataRequest"; +import { IncidentRoleAssignmentDataResponse } from "./IncidentRoleAssignmentDataResponse"; +import { IncidentRoleAssignmentRelationshipsRequest } from "./IncidentRoleAssignmentRelationshipsRequest"; +import { IncidentRoleAssignmentRelationshipsResponse } from "./IncidentRoleAssignmentRelationshipsResponse"; +import { IncidentRoleAssignmentRequest } from "./IncidentRoleAssignmentRequest"; +import { IncidentRoleAssignmentResponderRelationship } from "./IncidentRoleAssignmentResponderRelationship"; +import { IncidentRoleAssignmentResponderRelationshipData } from "./IncidentRoleAssignmentResponderRelationshipData"; +import { IncidentRoleAssignmentResponse } from "./IncidentRoleAssignmentResponse"; +import { IncidentRoleAssignmentRoleRelationship } from "./IncidentRoleAssignmentRoleRelationship"; +import { IncidentRoleAssignmentRoleRelationshipData } from "./IncidentRoleAssignmentRoleRelationshipData"; +import { IncidentRuleExecutionStateDataAttributesResponse } from "./IncidentRuleExecutionStateDataAttributesResponse"; +import { IncidentRuleExecutionStateDataResponse } from "./IncidentRuleExecutionStateDataResponse"; +import { IncidentRuleExecutionStateRule } from "./IncidentRuleExecutionStateRule"; +import { IncidentRuleExecutionStatesResponse } from "./IncidentRuleExecutionStatesResponse"; +import { IncidentSearchIncidentsExportRequest } from "./IncidentSearchIncidentsExportRequest"; import { IncidentSearchResponse } from "./IncidentSearchResponse"; import { IncidentSearchResponseAttributes } from "./IncidentSearchResponseAttributes"; import { IncidentSearchResponseData } from "./IncidentSearchResponseData"; @@ -1757,8 +1848,50 @@ import { IncidentServiceUpdateAttributes } from "./IncidentServiceUpdateAttribut import { IncidentServiceUpdateData } from "./IncidentServiceUpdateData"; import { IncidentServiceUpdateRequest } from "./IncidentServiceUpdateRequest"; import { IncidentServicesResponse } from "./IncidentServicesResponse"; +import { IncidentStatusPageNoticeCreateData } from "./IncidentStatusPageNoticeCreateData"; +import { IncidentStatusPageNoticeCreateDataAttributes } from "./IncidentStatusPageNoticeCreateDataAttributes"; +import { IncidentStatusPageNoticeCreateRequest } from "./IncidentStatusPageNoticeCreateRequest"; +import { IncidentStatusPageNoticeIntegrationDataAttributes } from "./IncidentStatusPageNoticeIntegrationDataAttributes"; +import { IncidentStatusPageNoticeIntegrationDataResponse } from "./IncidentStatusPageNoticeIntegrationDataResponse"; +import { IncidentStatusPageNoticeIntegrationResponse } from "./IncidentStatusPageNoticeIntegrationResponse"; +import { IncidentStatusPageNoticeUpdateData } from "./IncidentStatusPageNoticeUpdateData"; +import { IncidentStatusPageNoticeUpdateDataAttributes } from "./IncidentStatusPageNoticeUpdateDataAttributes"; +import { IncidentStatusPageNoticeUpdateRequest } from "./IncidentStatusPageNoticeUpdateRequest"; +import { IncidentStatusPagesSuggestionData } from "./IncidentStatusPagesSuggestionData"; +import { IncidentStatusPagesSuggestionDataAttributes } from "./IncidentStatusPagesSuggestionDataAttributes"; +import { IncidentStatusPagesSuggestionResponse } from "./IncidentStatusPagesSuggestionResponse"; +import { IncidentStatuspageIncidentDataAttributesRequest } from "./IncidentStatuspageIncidentDataAttributesRequest"; +import { IncidentStatuspageIncidentDataAttributesResponse } from "./IncidentStatuspageIncidentDataAttributesResponse"; +import { IncidentStatuspageIncidentDataRequest } from "./IncidentStatuspageIncidentDataRequest"; +import { IncidentStatuspageIncidentDataResponse } from "./IncidentStatuspageIncidentDataResponse"; +import { IncidentStatuspageIncidentEntry } from "./IncidentStatuspageIncidentEntry"; +import { IncidentStatuspageIncidentRequest } from "./IncidentStatuspageIncidentRequest"; +import { IncidentStatuspageIncidentResponse } from "./IncidentStatuspageIncidentResponse"; +import { IncidentStatuspagePreferencesData } from "./IncidentStatuspagePreferencesData"; +import { IncidentStatuspagePreferencesDataAttributes } from "./IncidentStatuspagePreferencesDataAttributes"; +import { IncidentStatuspagePreferencesResponse } from "./IncidentStatuspagePreferencesResponse"; +import { IncidentStatuspageSubscriptionDataAttributesRequest } from "./IncidentStatuspageSubscriptionDataAttributesRequest"; +import { IncidentStatuspageSubscriptionDataAttributesResponse } from "./IncidentStatuspageSubscriptionDataAttributesResponse"; +import { IncidentStatuspageSubscriptionDataRequest } from "./IncidentStatuspageSubscriptionDataRequest"; +import { IncidentStatuspageSubscriptionDataResponse } from "./IncidentStatuspageSubscriptionDataResponse"; +import { IncidentStatuspageSubscriptionRequest } from "./IncidentStatuspageSubscriptionRequest"; +import { IncidentStatuspageSubscriptionResponse } from "./IncidentStatuspageSubscriptionResponse"; +import { IncidentStatuspageSubscriptionsResponse } from "./IncidentStatuspageSubscriptionsResponse"; +import { IncidentTemplateVariableData } from "./IncidentTemplateVariableData"; +import { IncidentTemplateVariableDataAttributes } from "./IncidentTemplateVariableDataAttributes"; +import { IncidentTemplateVariablesResponse } from "./IncidentTemplateVariablesResponse"; import { IncidentTimelineCellMarkdownCreateAttributes } from "./IncidentTimelineCellMarkdownCreateAttributes"; import { IncidentTimelineCellMarkdownCreateAttributesContent } from "./IncidentTimelineCellMarkdownCreateAttributesContent"; +import { IncidentTimelineEntriesResponse } from "./IncidentTimelineEntriesResponse"; +import { IncidentTimelineEntryContent } from "./IncidentTimelineEntryContent"; +import { IncidentTimelineEntryDataAttributesRequest } from "./IncidentTimelineEntryDataAttributesRequest"; +import { IncidentTimelineEntryDataAttributesResponse } from "./IncidentTimelineEntryDataAttributesResponse"; +import { IncidentTimelineEntryDataRequest } from "./IncidentTimelineEntryDataRequest"; +import { IncidentTimelineEntryDataResponse } from "./IncidentTimelineEntryDataResponse"; +import { IncidentTimelineEntryRequest } from "./IncidentTimelineEntryRequest"; +import { IncidentTimelineEntryResponse } from "./IncidentTimelineEntryResponse"; +import { IncidentTimelineThreadDataResponse } from "./IncidentTimelineThreadDataResponse"; +import { IncidentTimelineThreadResponse } from "./IncidentTimelineThreadResponse"; import { IncidentTodoAnonymousAssignee } from "./IncidentTodoAnonymousAssignee"; import { IncidentTodoAttributes } from "./IncidentTodoAttributes"; import { IncidentTodoCreateData } from "./IncidentTodoCreateData"; @@ -1802,6 +1935,16 @@ import { IncidentUserDefinedFieldResponseData } from "./IncidentUserDefinedField import { IncidentUserDefinedFieldUpdateData } from "./IncidentUserDefinedFieldUpdateData"; import { IncidentUserDefinedFieldUpdateRequest } from "./IncidentUserDefinedFieldUpdateRequest"; import { IncidentUserDefinedFieldValidValue } from "./IncidentUserDefinedFieldValidValue"; +import { IncidentZoomConfigurationDataAttributesRequest } from "./IncidentZoomConfigurationDataAttributesRequest"; +import { IncidentZoomConfigurationDataAttributesResponse } from "./IncidentZoomConfigurationDataAttributesResponse"; +import { IncidentZoomConfigurationDataRequest } from "./IncidentZoomConfigurationDataRequest"; +import { IncidentZoomConfigurationDataResponse } from "./IncidentZoomConfigurationDataResponse"; +import { IncidentZoomConfigurationRequest } from "./IncidentZoomConfigurationRequest"; +import { IncidentZoomConfigurationResponse } from "./IncidentZoomConfigurationResponse"; +import { IncidentZoomIntegrationDataAttributes } from "./IncidentZoomIntegrationDataAttributes"; +import { IncidentZoomIntegrationDataResponse } from "./IncidentZoomIntegrationDataResponse"; +import { IncidentZoomIntegrationResponse } from "./IncidentZoomIntegrationResponse"; +import { IncidentZoomMeeting } from "./IncidentZoomMeeting"; import { IncidentsResponse } from "./IncidentsResponse"; import { InputSchema } from "./InputSchema"; import { InputSchemaParameters } from "./InputSchemaParameters"; @@ -5172,6 +5315,10 @@ const enumsMap: { [key: string]: any[] } = { IPAllowlistEntryType: ["ip_allowlist_entry"], IPAllowlistType: ["ip_allowlist"], IncidentAttachmentType: ["incident_attachments"], + IncidentAutomationDataType: ["incidents_automation_data"], + IncidentCaseLinkType: ["case_link"], + IncidentCommunicationKind: ["manual", "automated"], + IncidentCommunicationType: ["communication"], IncidentFieldAttributesSingleValueType: ["dropdown", "textbox"], IncidentFieldAttributesValueType: [ "multiselect", @@ -5179,6 +5326,7 @@ const enumsMap: { [key: string]: any[] } = { "metrictag", "autocomplete", ], + IncidentGoogleMeetIntegrationType: ["incident_integrations"], IncidentHandleType: ["incidents_handles"], IncidentImpactRelatedObject: [ "incident", @@ -5196,6 +5344,11 @@ const enumsMap: { [key: string]: any[] } = { ], IncidentImportVisibility: ["organization", "private"], IncidentIntegrationMetadataType: ["incident_integrations"], + IncidentJiraIssueIntegrationType: ["incident_integrations"], + IncidentJiraIssueType: ["incident_jira_issues"], + IncidentJiraTemplateType: ["incidents_jira_templates"], + IncidentMicrosoftTeamsConfigurationType: ["microsoft_teams_configurations"], + IncidentMicrosoftTeamsIntegrationType: ["incident_integrations"], IncidentNotificationRuleAttributesVisibility: [ "all", "organization", @@ -5208,10 +5361,29 @@ const enumsMap: { [key: string]: any[] } = { ], IncidentNotificationRuleType: ["incident_notification_rules"], IncidentNotificationTemplateType: ["notification_templates"], + IncidentPagerdutyServiceType: ["pagerduty_service"], IncidentPostmortemType: ["incident_postmortems"], IncidentRelatedObject: ["users", "attachments"], + IncidentRenderedTemplateType: ["rendered_templates"], + IncidentReservedRoleType: ["incident_reserved_roles"], IncidentResourceType: ["incidents"], IncidentRespondersType: ["incident_responders"], + IncidentRoleAssignmentType: ["incident_role_assignments"], + IncidentRuleExecutionStateType: ["incident_rule_execution_states"], + IncidentSearchIncidentsIncludeType: [ + "incident_type", + "impacts", + "users", + "responders", + "integrations", + "attachments", + ], + IncidentSearchIncidentsSortOrder: [ + "created", + "-created", + "modified", + "-modified", + ], IncidentSearchResultsType: ["incidents_search_results"], IncidentSearchSortOrder: ["created", "-created"], IncidentServiceType: ["services"], @@ -5224,7 +5396,24 @@ const enumsMap: { [key: string]: any[] } = { "SEV-4", "SEV-5", ], + IncidentStatusPageNoticeIntegrationType: ["incident_integrations"], + IncidentStatusPagesSuggestionType: ["incident_statuspages_suggestion"], + IncidentStatuspageIncidentType: ["incident_integrations"], + IncidentStatuspagePreferencesType: ["statuspage_subscription_preferences"], + IncidentStatuspageSubscriptionType: ["statuspage_email_subscription"], + IncidentTemplateVariableType: ["template_variables"], IncidentTimelineCellMarkdownContentType: ["markdown"], + IncidentTimelineCellSource: ["slack", "microsoft_teams", "datadog", "api"], + IncidentTimelineCellType: [ + "markdown", + "incident_status_change", + "timestamp_change", + "meeting_summary", + "meeting_chat", + "role_assignment_change", + "postmortem_change", + ], + IncidentTimelineEntryType: ["incident_timeline_cells"], IncidentTodoAnonymousAssigneeSource: ["slack", "microsoft_teams"], IncidentTodoType: ["incident_todos"], IncidentType: ["incidents"], @@ -5238,6 +5427,8 @@ const enumsMap: { [key: string]: any[] } = { ], IncidentUserDefinedFieldFieldType: [1, 2, 3, 4, 5, 6, 7, 8], IncidentUserDefinedFieldType: ["user_defined_field"], + IncidentZoomConfigurationType: ["zoom_configurations"], + IncidentZoomIntegrationType: ["incident_integrations"], IncludeType: ["schema", "raw_schema", "oncall", "incident", "relation"], InputSchemaParametersType: [ "STRING", @@ -8759,12 +8950,56 @@ const typeMap: { [index: string]: any } = { IPAllowlistEntryData: IPAllowlistEntryData, IPAllowlistResponse: IPAllowlistResponse, IPAllowlistUpdateRequest: IPAllowlistUpdateRequest, + IncidentAutomationDataAttributesRequest: + IncidentAutomationDataAttributesRequest, + IncidentAutomationDataAttributesResponse: + IncidentAutomationDataAttributesResponse, + IncidentAutomationDataDataRequest: IncidentAutomationDataDataRequest, + IncidentAutomationDataDataResponse: IncidentAutomationDataDataResponse, + IncidentAutomationDataRequest: IncidentAutomationDataRequest, + IncidentAutomationDataResponse: IncidentAutomationDataResponse, + IncidentBatchCreateRuleExecutionStatesData: + IncidentBatchCreateRuleExecutionStatesData, + IncidentBatchCreateRuleExecutionStatesDataAttributes: + IncidentBatchCreateRuleExecutionStatesDataAttributes, + IncidentBatchCreateRuleExecutionStatesRequest: + IncidentBatchCreateRuleExecutionStatesRequest, + IncidentBatchUpdateRuleExecutionStatesData: + IncidentBatchUpdateRuleExecutionStatesData, + IncidentBatchUpdateRuleExecutionStatesDataAttributes: + IncidentBatchUpdateRuleExecutionStatesDataAttributes, + IncidentBatchUpdateRuleExecutionStatesRequest: + IncidentBatchUpdateRuleExecutionStatesRequest, + IncidentCaseLinkData: IncidentCaseLinkData, + IncidentCaseLinkDataAttributes: IncidentCaseLinkDataAttributes, + IncidentCaseLinkResponse: IncidentCaseLinkResponse, + IncidentCommunicationContent: IncidentCommunicationContent, + IncidentCommunicationContentHandle: IncidentCommunicationContentHandle, + IncidentCommunicationDataAttributesRequest: + IncidentCommunicationDataAttributesRequest, + IncidentCommunicationDataAttributesResponse: + IncidentCommunicationDataAttributesResponse, + IncidentCommunicationDataRequest: IncidentCommunicationDataRequest, + IncidentCommunicationDataResponse: IncidentCommunicationDataResponse, + IncidentCommunicationRequest: IncidentCommunicationRequest, + IncidentCommunicationResponse: IncidentCommunicationResponse, + IncidentCommunicationsResponse: IncidentCommunicationsResponse, IncidentCreateAttributes: IncidentCreateAttributes, IncidentCreateData: IncidentCreateData, IncidentCreateRelationships: IncidentCreateRelationships, IncidentCreateRequest: IncidentCreateRequest, + IncidentCreateZoomMeetingData: IncidentCreateZoomMeetingData, + IncidentCreateZoomMeetingDataAttributes: + IncidentCreateZoomMeetingDataAttributes, + IncidentCreateZoomMeetingRequest: IncidentCreateZoomMeetingRequest, IncidentFieldAttributesMultipleValue: IncidentFieldAttributesMultipleValue, IncidentFieldAttributesSingleValue: IncidentFieldAttributesSingleValue, + IncidentGoogleMeetIntegrationDataAttributes: + IncidentGoogleMeetIntegrationDataAttributes, + IncidentGoogleMeetIntegrationDataResponse: + IncidentGoogleMeetIntegrationDataResponse, + IncidentGoogleMeetIntegrationResponse: IncidentGoogleMeetIntegrationResponse, + IncidentGoogleMeetSpace: IncidentGoogleMeetSpace, IncidentHandleAttributesFields: IncidentHandleAttributesFields, IncidentHandleAttributesRequest: IncidentHandleAttributesRequest, IncidentHandleAttributesResponse: IncidentHandleAttributesResponse, @@ -8810,6 +9045,49 @@ const typeMap: { [index: string]: any } = { IncidentIntegrationMetadataResponseData: IncidentIntegrationMetadataResponseData, IncidentIntegrationRelationships: IncidentIntegrationRelationships, + IncidentJiraIssueDataAttributesRequest: + IncidentJiraIssueDataAttributesRequest, + IncidentJiraIssueDataRequest: IncidentJiraIssueDataRequest, + IncidentJiraIssueIntegrationDataAttributes: + IncidentJiraIssueIntegrationDataAttributes, + IncidentJiraIssueIntegrationDataResponse: + IncidentJiraIssueIntegrationDataResponse, + IncidentJiraIssueIntegrationResponse: IncidentJiraIssueIntegrationResponse, + IncidentJiraIssueRequest: IncidentJiraIssueRequest, + IncidentJiraTemplateDataAttributesRequest: + IncidentJiraTemplateDataAttributesRequest, + IncidentJiraTemplateDataAttributesResponse: + IncidentJiraTemplateDataAttributesResponse, + IncidentJiraTemplateDataRequest: IncidentJiraTemplateDataRequest, + IncidentJiraTemplateDataResponse: IncidentJiraTemplateDataResponse, + IncidentJiraTemplateFieldConfiguration: + IncidentJiraTemplateFieldConfiguration, + IncidentJiraTemplateIncidentTypeRelationship: + IncidentJiraTemplateIncidentTypeRelationship, + IncidentJiraTemplateIncidentTypeRelationshipData: + IncidentJiraTemplateIncidentTypeRelationshipData, + IncidentJiraTemplateRelationships: IncidentJiraTemplateRelationships, + IncidentJiraTemplateRequest: IncidentJiraTemplateRequest, + IncidentJiraTemplateResponse: IncidentJiraTemplateResponse, + IncidentJiraTemplatesResponse: IncidentJiraTemplatesResponse, + IncidentMSTeamsChannel: IncidentMSTeamsChannel, + IncidentMSTeamsIntegrationDataAttributes: + IncidentMSTeamsIntegrationDataAttributes, + IncidentMSTeamsIntegrationDataResponse: + IncidentMSTeamsIntegrationDataResponse, + IncidentMSTeamsIntegrationResponse: IncidentMSTeamsIntegrationResponse, + IncidentMicrosoftTeamsConfigurationDataAttributesRequest: + IncidentMicrosoftTeamsConfigurationDataAttributesRequest, + IncidentMicrosoftTeamsConfigurationDataAttributesResponse: + IncidentMicrosoftTeamsConfigurationDataAttributesResponse, + IncidentMicrosoftTeamsConfigurationDataRequest: + IncidentMicrosoftTeamsConfigurationDataRequest, + IncidentMicrosoftTeamsConfigurationDataResponse: + IncidentMicrosoftTeamsConfigurationDataResponse, + IncidentMicrosoftTeamsConfigurationRequest: + IncidentMicrosoftTeamsConfigurationRequest, + IncidentMicrosoftTeamsConfigurationResponse: + IncidentMicrosoftTeamsConfigurationResponse, IncidentNonDatadogCreator: IncidentNonDatadogCreator, IncidentNotificationHandle: IncidentNotificationHandle, IncidentNotificationRule: IncidentNotificationRule, @@ -8849,13 +9127,61 @@ const typeMap: { [index: string]: any } = { IncidentNotificationTemplateUpdateAttributes, IncidentNotificationTemplateUpdateData: IncidentNotificationTemplateUpdateData, + IncidentPagerdutyIncidentDataResponse: IncidentPagerdutyIncidentDataResponse, + IncidentPagerdutyRelatedIncidentsResponse: + IncidentPagerdutyRelatedIncidentsResponse, + IncidentPagerdutyServiceData: IncidentPagerdutyServiceData, + IncidentPagerdutyServiceDataAttributes: + IncidentPagerdutyServiceDataAttributes, + IncidentPagerdutyServicesResponse: IncidentPagerdutyServicesResponse, IncidentRelationshipData: IncidentRelationshipData, + IncidentRenderTemplateDataAttributesRequest: + IncidentRenderTemplateDataAttributesRequest, + IncidentRenderTemplateDataRequest: IncidentRenderTemplateDataRequest, + IncidentRenderTemplateRequest: IncidentRenderTemplateRequest, + IncidentRenderedTemplateData: IncidentRenderedTemplateData, + IncidentRenderedTemplateDataAttributes: + IncidentRenderedTemplateDataAttributes, + IncidentRenderedTemplateResponse: IncidentRenderedTemplateResponse, + IncidentReservedRoleDataAttributesResponse: + IncidentReservedRoleDataAttributesResponse, + IncidentReservedRoleDataResponse: IncidentReservedRoleDataResponse, + IncidentReservedRolePolicy: IncidentReservedRolePolicy, + IncidentReservedRoleResponse: IncidentReservedRoleResponse, + IncidentReservedRolesResponse: IncidentReservedRolesResponse, IncidentResponse: IncidentResponse, IncidentResponseAttributes: IncidentResponseAttributes, IncidentResponseData: IncidentResponseData, IncidentResponseMeta: IncidentResponseMeta, IncidentResponseMetaPagination: IncidentResponseMetaPagination, IncidentResponseRelationships: IncidentResponseRelationships, + IncidentRoleAssignmentDataAttributesRequest: + IncidentRoleAssignmentDataAttributesRequest, + IncidentRoleAssignmentDataAttributesResponse: + IncidentRoleAssignmentDataAttributesResponse, + IncidentRoleAssignmentDataRequest: IncidentRoleAssignmentDataRequest, + IncidentRoleAssignmentDataResponse: IncidentRoleAssignmentDataResponse, + IncidentRoleAssignmentRelationshipsRequest: + IncidentRoleAssignmentRelationshipsRequest, + IncidentRoleAssignmentRelationshipsResponse: + IncidentRoleAssignmentRelationshipsResponse, + IncidentRoleAssignmentRequest: IncidentRoleAssignmentRequest, + IncidentRoleAssignmentResponderRelationship: + IncidentRoleAssignmentResponderRelationship, + IncidentRoleAssignmentResponderRelationshipData: + IncidentRoleAssignmentResponderRelationshipData, + IncidentRoleAssignmentResponse: IncidentRoleAssignmentResponse, + IncidentRoleAssignmentRoleRelationship: + IncidentRoleAssignmentRoleRelationship, + IncidentRoleAssignmentRoleRelationshipData: + IncidentRoleAssignmentRoleRelationshipData, + IncidentRuleExecutionStateDataAttributesResponse: + IncidentRuleExecutionStateDataAttributesResponse, + IncidentRuleExecutionStateDataResponse: + IncidentRuleExecutionStateDataResponse, + IncidentRuleExecutionStateRule: IncidentRuleExecutionStateRule, + IncidentRuleExecutionStatesResponse: IncidentRuleExecutionStatesResponse, + IncidentSearchIncidentsExportRequest: IncidentSearchIncidentsExportRequest, IncidentSearchResponse: IncidentSearchResponse, IncidentSearchResponseAttributes: IncidentSearchResponseAttributes, IncidentSearchResponseData: IncidentSearchResponseData, @@ -8881,10 +9207,71 @@ const typeMap: { [index: string]: any } = { IncidentServiceUpdateData: IncidentServiceUpdateData, IncidentServiceUpdateRequest: IncidentServiceUpdateRequest, IncidentServicesResponse: IncidentServicesResponse, + IncidentStatusPageNoticeCreateData: IncidentStatusPageNoticeCreateData, + IncidentStatusPageNoticeCreateDataAttributes: + IncidentStatusPageNoticeCreateDataAttributes, + IncidentStatusPageNoticeCreateRequest: IncidentStatusPageNoticeCreateRequest, + IncidentStatusPageNoticeIntegrationDataAttributes: + IncidentStatusPageNoticeIntegrationDataAttributes, + IncidentStatusPageNoticeIntegrationDataResponse: + IncidentStatusPageNoticeIntegrationDataResponse, + IncidentStatusPageNoticeIntegrationResponse: + IncidentStatusPageNoticeIntegrationResponse, + IncidentStatusPageNoticeUpdateData: IncidentStatusPageNoticeUpdateData, + IncidentStatusPageNoticeUpdateDataAttributes: + IncidentStatusPageNoticeUpdateDataAttributes, + IncidentStatusPageNoticeUpdateRequest: IncidentStatusPageNoticeUpdateRequest, + IncidentStatusPagesSuggestionData: IncidentStatusPagesSuggestionData, + IncidentStatusPagesSuggestionDataAttributes: + IncidentStatusPagesSuggestionDataAttributes, + IncidentStatusPagesSuggestionResponse: IncidentStatusPagesSuggestionResponse, + IncidentStatuspageIncidentDataAttributesRequest: + IncidentStatuspageIncidentDataAttributesRequest, + IncidentStatuspageIncidentDataAttributesResponse: + IncidentStatuspageIncidentDataAttributesResponse, + IncidentStatuspageIncidentDataRequest: IncidentStatuspageIncidentDataRequest, + IncidentStatuspageIncidentDataResponse: + IncidentStatuspageIncidentDataResponse, + IncidentStatuspageIncidentEntry: IncidentStatuspageIncidentEntry, + IncidentStatuspageIncidentRequest: IncidentStatuspageIncidentRequest, + IncidentStatuspageIncidentResponse: IncidentStatuspageIncidentResponse, + IncidentStatuspagePreferencesData: IncidentStatuspagePreferencesData, + IncidentStatuspagePreferencesDataAttributes: + IncidentStatuspagePreferencesDataAttributes, + IncidentStatuspagePreferencesResponse: IncidentStatuspagePreferencesResponse, + IncidentStatuspageSubscriptionDataAttributesRequest: + IncidentStatuspageSubscriptionDataAttributesRequest, + IncidentStatuspageSubscriptionDataAttributesResponse: + IncidentStatuspageSubscriptionDataAttributesResponse, + IncidentStatuspageSubscriptionDataRequest: + IncidentStatuspageSubscriptionDataRequest, + IncidentStatuspageSubscriptionDataResponse: + IncidentStatuspageSubscriptionDataResponse, + IncidentStatuspageSubscriptionRequest: IncidentStatuspageSubscriptionRequest, + IncidentStatuspageSubscriptionResponse: + IncidentStatuspageSubscriptionResponse, + IncidentStatuspageSubscriptionsResponse: + IncidentStatuspageSubscriptionsResponse, + IncidentTemplateVariableData: IncidentTemplateVariableData, + IncidentTemplateVariableDataAttributes: + IncidentTemplateVariableDataAttributes, + IncidentTemplateVariablesResponse: IncidentTemplateVariablesResponse, IncidentTimelineCellMarkdownCreateAttributes: IncidentTimelineCellMarkdownCreateAttributes, IncidentTimelineCellMarkdownCreateAttributesContent: IncidentTimelineCellMarkdownCreateAttributesContent, + IncidentTimelineEntriesResponse: IncidentTimelineEntriesResponse, + IncidentTimelineEntryContent: IncidentTimelineEntryContent, + IncidentTimelineEntryDataAttributesRequest: + IncidentTimelineEntryDataAttributesRequest, + IncidentTimelineEntryDataAttributesResponse: + IncidentTimelineEntryDataAttributesResponse, + IncidentTimelineEntryDataRequest: IncidentTimelineEntryDataRequest, + IncidentTimelineEntryDataResponse: IncidentTimelineEntryDataResponse, + IncidentTimelineEntryRequest: IncidentTimelineEntryRequest, + IncidentTimelineEntryResponse: IncidentTimelineEntryResponse, + IncidentTimelineThreadDataResponse: IncidentTimelineThreadDataResponse, + IncidentTimelineThreadResponse: IncidentTimelineThreadResponse, IncidentTodoAnonymousAssignee: IncidentTodoAnonymousAssignee, IncidentTodoAttributes: IncidentTodoAttributes, IncidentTodoCreateData: IncidentTodoCreateData, @@ -8932,6 +9319,18 @@ const typeMap: { [index: string]: any } = { IncidentUserDefinedFieldUpdateData: IncidentUserDefinedFieldUpdateData, IncidentUserDefinedFieldUpdateRequest: IncidentUserDefinedFieldUpdateRequest, IncidentUserDefinedFieldValidValue: IncidentUserDefinedFieldValidValue, + IncidentZoomConfigurationDataAttributesRequest: + IncidentZoomConfigurationDataAttributesRequest, + IncidentZoomConfigurationDataAttributesResponse: + IncidentZoomConfigurationDataAttributesResponse, + IncidentZoomConfigurationDataRequest: IncidentZoomConfigurationDataRequest, + IncidentZoomConfigurationDataResponse: IncidentZoomConfigurationDataResponse, + IncidentZoomConfigurationRequest: IncidentZoomConfigurationRequest, + IncidentZoomConfigurationResponse: IncidentZoomConfigurationResponse, + IncidentZoomIntegrationDataAttributes: IncidentZoomIntegrationDataAttributes, + IncidentZoomIntegrationDataResponse: IncidentZoomIntegrationDataResponse, + IncidentZoomIntegrationResponse: IncidentZoomIntegrationResponse, + IncidentZoomMeeting: IncidentZoomMeeting, IncidentsResponse: IncidentsResponse, InputSchema: InputSchema, InputSchemaParameters: InputSchemaParameters,