diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 2f4dce9e3c26..21a2d895b20c 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -485,6 +485,37 @@ components: required: true schema: type: string + IncidentNotificationTemplateIDPathParameter: + description: The ID of the notification template. + in: path + name: id + required: true + schema: + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + IncidentNotificationTemplateIncidentTypeFilterQueryParameter: + description: Optional incident type ID filter. + explode: false + in: query + name: filter[incident-type] + required: false + schema: + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + IncidentNotificationTemplateIncludeQueryParameter: + description: 'Comma-separated list of relationships to include. Supported values: + `created_by_user`, `last_modified_by_user`, `incident_type` + + ' + explode: false + in: query + name: include + required: false + schema: + example: created_by_user,incident_type + type: string IncidentSearchIncludeQueryParameter: description: Specifies which types of related objects should be included in the response. @@ -10820,6 +10851,14 @@ components: meta: $ref: '#/components/schemas/DataDeletionResponseMeta' type: object + CreateIncidentNotificationTemplateRequest: + description: Create request for a notification template. + properties: + data: + $ref: '#/components/schemas/IncidentNotificationTemplateCreateData' + required: + - data + type: object CreateNotificationRuleParameters: description: Body of the notification rule create request. properties: @@ -18550,6 +18589,31 @@ components: required: - type type: object + GoogleMeetConfigurationReference: + description: A reference to a Google Meet Configuration resource. + nullable: true + properties: + data: + $ref: '#/components/schemas/GoogleMeetConfigurationReferenceData' + required: + - data + type: object + GoogleMeetConfigurationReferenceData: + description: The Google Meet configuration relationship data object. + nullable: true + properties: + id: + description: The unique identifier of the Google Meet configuration. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + description: The type of the Google Meet configuration. + example: google_meet_configurations + type: string + required: + - id + - type + type: object GreyNoiseAPIKey: description: The definition of the `GreyNoiseAPIKey` object. properties: @@ -19875,6 +19939,256 @@ components: example: '@test.user@test.com' type: string type: object + IncidentNotificationTemplate: + description: Response with a notification template. + properties: + data: + $ref: '#/components/schemas/IncidentNotificationTemplateResponseData' + included: + description: Related objects that are included in the response. + items: + $ref: '#/components/schemas/IncidentNotificationTemplateIncludedItems' + type: array + required: + - data + type: object + IncidentNotificationTemplateArray: + description: Response with notification templates. + properties: + data: + description: The `NotificationTemplateArray` `data`. + items: + $ref: '#/components/schemas/IncidentNotificationTemplateResponseData' + type: array + included: + description: Related objects that are included in the response. + items: + $ref: '#/components/schemas/IncidentNotificationTemplateIncludedItems' + type: array + meta: + $ref: '#/components/schemas/IncidentNotificationTemplateArrayMeta' + required: + - data + type: object + IncidentNotificationTemplateArrayMeta: + description: Response metadata. + properties: + page: + $ref: '#/components/schemas/IncidentNotificationTemplateArrayMetaPage' + type: object + IncidentNotificationTemplateArrayMetaPage: + description: Pagination metadata. + properties: + total_count: + description: Total number of notification templates. + example: 42 + format: int64 + type: integer + total_filtered_count: + description: Total number of notification templates matching the filter. + example: 15 + format: int64 + type: integer + type: object + IncidentNotificationTemplateAttributes: + description: The notification template's attributes. + properties: + category: + description: The category of the notification template. + example: alert + type: string + content: + description: The content body of the notification template. + example: 'An incident has been declared. + + + Title: {{incident.title}} + + Severity: {{incident.severity}} + + Affected Services: {{incident.services}} + + Status: {{incident.state}} + + + Please join the incident channel for updates.' + type: string + created: + description: Timestamp when the notification template was created. + example: '2025-01-15T10:30:00Z' + format: date-time + readOnly: true + type: string + modified: + description: Timestamp when the notification template was last modified. + example: '2025-01-15T14:45:00Z' + format: date-time + readOnly: true + type: string + name: + description: The name of the notification template. + example: Incident Alert Template + type: string + subject: + description: The subject line of the notification template. + example: '{{incident.severity}} Incident: {{incident.title}}' + type: string + required: + - name + - subject + - content + - category + - created + - modified + type: object + IncidentNotificationTemplateCreateAttributes: + description: The attributes for creating a notification template. + properties: + category: + description: The category of the notification template. + example: alert + type: string + content: + description: The content body of the notification template. + example: 'An incident has been declared. + + + Title: {{incident.title}} + + Severity: {{incident.severity}} + + Affected Services: {{incident.services}} + + Status: {{incident.state}} + + + Please join the incident channel for updates.' + type: string + name: + description: The name of the notification template. + example: Incident Alert Template + type: string + subject: + description: The subject line of the notification template. + example: '{{incident.severity}} Incident: {{incident.title}}' + type: string + required: + - name + - subject + - content + - category + type: object + IncidentNotificationTemplateCreateData: + description: Notification template data for a create request. + properties: + attributes: + $ref: '#/components/schemas/IncidentNotificationTemplateCreateAttributes' + relationships: + $ref: '#/components/schemas/IncidentNotificationTemplateCreateDataRelationships' + type: + $ref: '#/components/schemas/IncidentNotificationTemplateType' + required: + - type + - attributes + type: object + IncidentNotificationTemplateCreateDataRelationships: + description: The definition of `NotificationTemplateCreateDataRelationships` + object. + properties: + incident_type: + $ref: '#/components/schemas/RelationshipToIncidentType' + type: object + IncidentNotificationTemplateIncludedItems: + description: Objects related to a notification template. + oneOf: + - $ref: '#/components/schemas/User' + - $ref: '#/components/schemas/IncidentTypeObject' + IncidentNotificationTemplateRelationships: + description: The notification template's resource relationships. + properties: + created_by_user: + $ref: '#/components/schemas/RelationshipToUser' + incident_type: + $ref: '#/components/schemas/RelationshipToIncidentType' + last_modified_by_user: + $ref: '#/components/schemas/RelationshipToUser' + type: object + IncidentNotificationTemplateResponseData: + description: Notification template data from a response. + properties: + attributes: + $ref: '#/components/schemas/IncidentNotificationTemplateAttributes' + id: + description: The unique identifier of the notification template. + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + relationships: + $ref: '#/components/schemas/IncidentNotificationTemplateRelationships' + type: + $ref: '#/components/schemas/IncidentNotificationTemplateType' + required: + - id + - type + type: object + IncidentNotificationTemplateType: + description: Notification templates resource type. + enum: + - notification_templates + example: notification_templates + type: string + x-enum-varnames: + - NOTIFICATION_TEMPLATES + IncidentNotificationTemplateUpdateAttributes: + description: The attributes to update on a notification template. + properties: + category: + description: The category of the notification template. + example: update + type: string + content: + description: The content body of the notification template. + example: 'Incident Status Update: + + + Title: {{incident.title}} + + New Status: {{incident.state}} + + Severity: {{incident.severity}} + + Services: {{incident.services}} + + Commander: {{incident.commander}} + + + For more details, visit the incident page.' + type: string + name: + description: The name of the notification template. + example: Incident Status Update Template + type: string + subject: + description: The subject line of the notification template. + example: 'Incident Update: {{incident.title}} - {{incident.state}}' + type: string + type: object + IncidentNotificationTemplateUpdateData: + description: Notification template data for an update request. + properties: + attributes: + $ref: '#/components/schemas/IncidentNotificationTemplateUpdateAttributes' + id: + description: The unique identifier of the notification template. + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + type: + $ref: '#/components/schemas/IncidentNotificationTemplateType' + required: + - id + - type + type: object IncidentPostmortemType: default: incident_postmortems description: Incident postmortem resource type. @@ -21034,6 +21348,8 @@ components: description: The incident type's ID. example: 00000000-0000-0000-0000-000000000000 type: string + relationships: + $ref: '#/components/schemas/IncidentTypeRelationships' type: $ref: '#/components/schemas/IncidentTypeType' required: @@ -21064,6 +21380,21 @@ components: required: - data type: object + IncidentTypeRelationships: + additionalProperties: {} + description: The incident type's resource relationships. + properties: + created_by_user: + $ref: '#/components/schemas/RelationshipToUser' + google_meet_configuration: + $ref: '#/components/schemas/GoogleMeetConfigurationReference' + last_modified_by_user: + $ref: '#/components/schemas/RelationshipToUser' + microsoft_teams_configuration: + $ref: '#/components/schemas/MicrosoftTeamsConfigurationReference' + zoom_configuration: + $ref: '#/components/schemas/ZoomConfigurationReference' + type: object IncidentTypeResponse: description: Incident type response data. properties: @@ -26067,6 +26398,31 @@ components: type: string x-enum-varnames: - MS_TEAMS_CHANNEL_INFO + MicrosoftTeamsConfigurationReference: + description: A reference to a Microsoft Teams Configuration resource. + nullable: true + properties: + data: + $ref: '#/components/schemas/MicrosoftTeamsConfigurationReferenceData' + required: + - data + type: object + MicrosoftTeamsConfigurationReferenceData: + description: The Microsoft Teams configuration relationship data object. + nullable: true + properties: + id: + description: The unique identifier of the Microsoft Teams configuration. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + description: The type of the Microsoft Teams configuration. + example: microsoft_teams_configurations + type: string + required: + - id + - type + type: object MicrosoftTeamsCreateTenantBasedHandleRequest: description: Create tenant-based handle request. properties: @@ -32455,6 +32811,14 @@ components: $ref: '#/components/schemas/ApplicationKeyResponseIncludedItem' type: array type: object + PatchIncidentNotificationTemplateRequest: + description: Update request for a notification template. + properties: + data: + $ref: '#/components/schemas/IncidentNotificationTemplateUpdateData' + required: + - data + type: object PatchNotificationRuleParameters: description: Body of the notification rule patch request. properties: @@ -34362,6 +34726,27 @@ components: required: - data type: object + RelationshipToIncidentType: + description: Relationship to an incident type. + properties: + data: + $ref: '#/components/schemas/RelationshipToIncidentTypeData' + required: + - data + type: object + RelationshipToIncidentTypeData: + description: Relationship to incident type object. + properties: + id: + description: The incident type's ID. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + $ref: '#/components/schemas/IncidentTypeType' + required: + - id + - type + type: object RelationshipToIncidentUserDefinedFieldData: description: Relationship to impact object. properties: @@ -46811,6 +47196,31 @@ components: oneOf: - $ref: '#/components/schemas/XRayServicesIncludeAll' - $ref: '#/components/schemas/XRayServicesIncludeOnly' + ZoomConfigurationReference: + description: A reference to a Zoom configuration resource. + nullable: true + properties: + data: + $ref: '#/components/schemas/ZoomConfigurationReferenceData' + required: + - data + type: object + ZoomConfigurationReferenceData: + description: The Zoom configuration relationship data object. + nullable: true + properties: + id: + description: The unique identifier of the Zoom configuration. + example: 00000000-0000-0000-0000-000000000000 + type: string + type: + description: The type of the Zoom configuration. + example: zoom_configurations + type: string + required: + - id + - type + type: object securitySchemes: AuthZ: description: This API uses OAuth 2 with the implicit grant flow. @@ -46860,6 +47270,7 @@ components: incident_notification_settings_write: Configure Incidents Notification settings. incident_read: View incidents in Datadog. + incident_settings_read: View Incident Settings. incident_settings_write: Configure Incident Settings. incident_write: Create, view, and manage incidents in Datadog. metrics_read: View custom metrics. @@ -53787,6 +54198,208 @@ paths: - incident_write 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/config/notification-templates: + get: + description: Lists all notification templates. Optionally filter by incident + type. + operationId: ListIncidentNotificationTemplates + parameters: + - $ref: '#/components/parameters/IncidentNotificationTemplateIncidentTypeFilterQueryParameter' + - $ref: '#/components/parameters/IncidentNotificationTemplateIncludeQueryParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentNotificationTemplateArray' + 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_settings_read + summary: List incident notification templates + tags: + - Incidents + x-permission: + operator: AND + permissions: + - incident_notification_settings_read + x-unstable: '**Note**: This endpoint is in Preview. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + post: + description: Creates a new notification template. + operationId: CreateIncidentNotificationTemplate + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CreateIncidentNotificationTemplateRequest' + required: true + responses: + '201': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentNotificationTemplate' + description: Created + '400': + $ref: '#/components/responses/BadRequestResponse' + '401': + $ref: '#/components/responses/UnauthorizedResponse' + '403': + $ref: '#/components/responses/ForbiddenResponse' + '404': + $ref: '#/components/responses/NotFoundResponse' + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - incident_notification_settings_write + summary: Create incident notification template + 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. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/incidents/config/notification-templates/{id}: + delete: + description: Deletes a notification template by its ID. + operationId: DeleteIncidentNotificationTemplate + parameters: + - $ref: '#/components/parameters/IncidentNotificationTemplateIDPathParameter' + - $ref: '#/components/parameters/IncidentNotificationTemplateIncludeQueryParameter' + responses: + '204': + description: No Content + '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: Delete a notification template + tags: + - Incidents + x-permission: + operator: AND + permissions: + - incident_notification_settings_write + x-unstable: '**Note**: This endpoint is in Preview. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + get: + description: Retrieves a specific notification template by its ID. + operationId: GetIncidentNotificationTemplate + parameters: + - $ref: '#/components/parameters/IncidentNotificationTemplateIDPathParameter' + - $ref: '#/components/parameters/IncidentNotificationTemplateIncludeQueryParameter' + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentNotificationTemplate' + 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_settings_read + summary: Get incident notification template + tags: + - Incidents + x-permission: + operator: OR + permissions: + - incident_settings_read + - incident_write + - incident_read + x-unstable: '**Note**: This endpoint is in Preview. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + patch: + description: Updates an existing notification template's attributes. + operationId: UpdateIncidentNotificationTemplate + parameters: + - $ref: '#/components/parameters/IncidentNotificationTemplateIDPathParameter' + - $ref: '#/components/parameters/IncidentNotificationTemplateIncludeQueryParameter' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PatchIncidentNotificationTemplateRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentNotificationTemplate' + 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: Update incident notification template + 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. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/incidents/config/types: get: diff --git a/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Bad-Request-response_4267246950/frozen.json b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Bad-Request-response_4267246950/frozen.json new file mode 100644 index 000000000000..409310eea04b --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Bad-Request-response_4267246950/frozen.json @@ -0,0 +1 @@ +"2025-09-05T02:18:37.406Z" diff --git a/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Bad-Request-response_4267246950/recording.har b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Bad-Request-response_4267246950/recording.har new file mode 100644 index 000000000000..963e8673557d --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Bad-Request-response_4267246950/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Incidents/Create incident notification template returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "f1ecffd685a94acdc8e098f5bb46bc53", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 205, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"category\":\"alert\",\"content\":\"An incident has been declared. Please join the incident channel for updates.\",\"name\":\"Test Template\",\"subject\":\"Incident Alert\"},\"type\":\"invalid_type\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"got type \\\"invalid_type\\\" expected one of \\\"notification_templates\\\"\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-09-05T02:18:37.411Z", + "time": 100 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Created-response_2440894804/frozen.json b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Created-response_2440894804/frozen.json new file mode 100644 index 000000000000..8af0035f6fd8 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Created-response_2440894804/frozen.json @@ -0,0 +1 @@ +"2025-09-05T02:18:47.764Z" diff --git a/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Created-response_2440894804/recording.har b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Created-response_2440894804/recording.har new file mode 100644 index 000000000000..49099e130803 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Created-response_2440894804/recording.har @@ -0,0 +1,194 @@ +{ + "log": { + "_recordingName": "Incidents/Create incident notification template returns \"Created\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7bcfec665300989151e5e4d7e0833bd1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 223, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"Security Incident\"},\"type\":\"incident_types\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/types" + }, + "response": { + "bodySize": 801, + "content": { + "mimeType": "application/vnd.api+json", + "size": 801, + "text": "{\"data\":{\"id\":\"943312c7-755d-4167-9bd4-bd87603c1784\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2025-09-05T02:18:47.87671627Z\",\"createdBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modifiedAt\":\"2025-09-05T02:18:47.876716352Z\",\"name\":\"Security Incident\",\"prefix\":\"IR\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"google_meet_configuration\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"microsoft_teams_configuration\":{\"data\":null},\"zoom_configuration\":{\"data\":null}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-09-05T02:18:47.769Z", + "time": 229 + }, + { + "_id": "d227954b3a2dfd4229587303ffa1c9e4", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 534, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"category\":\"alert\",\"content\":\"An incident has been declared.\\n\\nTitle: Sample Incident Title\\nSeverity: SEV-2\\nAffected Services: web-service, database-service\\nStatus: active\\n\\nPlease join the incident channel for updates.\",\"name\":\"Test-Create_incident_notification_template_returns_Created_response-1757038727\",\"subject\":\"SEV-2 Incident: Sample Incident Title\"},\"relationships\":{\"incident_type\":{\"data\":{\"id\":\"943312c7-755d-4167-9bd4-bd87603c1784\",\"type\":\"incident_types\"}}},\"type\":\"notification_templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates" + }, + "response": { + "bodySize": 841, + "content": { + "mimeType": "application/vnd.api+json", + "size": 841, + "text": "{\"data\":{\"id\":\"ffbd2758-c695-4879-8355-07371b09aeea\",\"type\":\"notification_templates\",\"attributes\":{\"category\":\"alert\",\"content\":\"An incident has been declared.\\n\\nTitle: Sample Incident Title\\nSeverity: SEV-2\\nAffected Services: web-service, database-service\\nStatus: active\\n\\nPlease join the incident channel for updates.\",\"created\":\"2025-09-05T02:18:48.112073Z\",\"modified\":\"2025-09-05T02:18:48.112073Z\",\"name\":\"Test-Create_incident_notification_template_returns_Created_response-1757038727\",\"subject\":\"SEV-2 Incident: Sample Incident Title\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"incident_type\":{\"data\":{\"id\":\"943312c7-755d-4167-9bd4-bd87603c1784\",\"type\":\"incident_types\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-09-05T02:18:48.011Z", + "time": 123 + }, + { + "_id": "cc62ba70349d2aa541ec6d6952278a1a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 581, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates/ffbd2758-c695-4879-8355-07371b09aeea" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-09-05T02:18:48.151Z", + "time": 123 + }, + { + "_id": "e4267e0ade74c014f3ba6c5a74687822", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 548, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/types/943312c7-755d-4167-9bd4-bd87603c1784" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 603, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-09-05T02:18:48.281Z", + "time": 135 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Not-Found-response_748491693/frozen.json b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Not-Found-response_748491693/frozen.json new file mode 100644 index 000000000000..e7826782bf04 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Not-Found-response_748491693/frozen.json @@ -0,0 +1 @@ +"2025-09-05T02:18:58.276Z" diff --git a/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Not-Found-response_748491693/recording.har b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Not-Found-response_748491693/recording.har new file mode 100644 index 000000000000..2e9bef909d13 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Create-incident-notification-template-returns-Not-Found-response_748491693/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Incidents/Create incident notification template returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "764d22c724e8d860fbbfdd0f436c6d9c", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 338, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 606, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"category\":\"alert\",\"content\":\"An incident has been declared. Please join the incident channel for updates.\",\"name\":\"Incident Alert Template\",\"subject\":\"Incident Alert\"},\"relationships\":{\"incident_type\":{\"data\":{\"id\":\"00000000-1111-2222-3333-444444444444\",\"type\":\"incident_types\"}}},\"type\":\"notification_templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates" + }, + "response": { + "bodySize": 73, + "content": { + "mimeType": "application/vnd.api+json", + "size": 73, + "text": "{\"errors\":[{\"title\":\"Generic Error\",\"detail\":\"incident type not found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-09-05T02:18:58.281Z", + "time": 116 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Incidents_2863714588/Delete-incident-notification-template-returns-No-Content-response_3683228869/frozen.json b/cassettes/v2/Incidents_2863714588/Delete-incident-notification-template-returns-No-Content-response_3683228869/frozen.json new file mode 100644 index 000000000000..75daf0025e83 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Delete-incident-notification-template-returns-No-Content-response_3683228869/frozen.json @@ -0,0 +1 @@ +"2025-09-05T02:19:08.418Z" diff --git a/cassettes/v2/Incidents_2863714588/Delete-incident-notification-template-returns-No-Content-response_3683228869/recording.har b/cassettes/v2/Incidents_2863714588/Delete-incident-notification-template-returns-No-Content-response_3683228869/recording.har new file mode 100644 index 000000000000..31fc52f1d0a9 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Delete-incident-notification-template-returns-No-Content-response_3683228869/recording.har @@ -0,0 +1,237 @@ +{ + "log": { + "_recordingName": "Incidents/Delete incident notification template returns \"No Content\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7bcfec665300989151e5e4d7e0833bd1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 223, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"Security Incident\"},\"type\":\"incident_types\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/types" + }, + "response": { + "bodySize": 802, + "content": { + "mimeType": "application/vnd.api+json", + "size": 802, + "text": "{\"data\":{\"id\":\"d067e172-1ce4-4b59-ae6e-3f867e98c81e\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2025-09-05T02:19:08.514411675Z\",\"createdBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modifiedAt\":\"2025-09-05T02:19:08.514411774Z\",\"name\":\"Security Incident\",\"prefix\":\"IR\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"google_meet_configuration\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"microsoft_teams_configuration\":{\"data\":null},\"zoom_configuration\":{\"data\":null}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-09-05T02:19:08.423Z", + "time": 207 + }, + { + "_id": "8b9b9531c285eb4a8c91ea4652e57bee", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 358, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"category\":\"alert\",\"content\":\"Test notification template\",\"name\":\"Test Template Test-Delete_incident_notification_template_returns_No_Content_response-1757038748\",\"subject\":\"Test Subject\"},\"relationships\":{\"incident_type\":{\"data\":{\"id\":\"d067e172-1ce4-4b59-ae6e-3f867e98c81e\",\"type\":\"incident_types\"}}},\"type\":\"notification_templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates" + }, + "response": { + "bodySize": 665, + "content": { + "mimeType": "application/vnd.api+json", + "size": 665, + "text": "{\"data\":{\"id\":\"15bb5f88-fdc8-45be-9b38-348cb42d421e\",\"type\":\"notification_templates\",\"attributes\":{\"category\":\"alert\",\"content\":\"Test notification template\",\"created\":\"2025-09-05T02:19:08.730505Z\",\"modified\":\"2025-09-05T02:19:08.730505Z\",\"name\":\"Test Template Test-Delete_incident_notification_template_returns_No_Content_response-1757038748\",\"subject\":\"Test Subject\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"incident_type\":{\"data\":{\"id\":\"d067e172-1ce4-4b59-ae6e-3f867e98c81e\",\"type\":\"incident_types\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-09-05T02:19:08.637Z", + "time": 111 + }, + { + "_id": "1376cac6af4f788bc760cdc56734c358", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 581, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates/15bb5f88-fdc8-45be-9b38-348cb42d421e" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-09-05T02:19:08.760Z", + "time": 137 + }, + { + "_id": "1376cac6af4f788bc760cdc56734c358", + "_order": 1, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 581, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates/15bb5f88-fdc8-45be-9b38-348cb42d421e" + }, + "response": { + "bodySize": 49, + "content": { + "mimeType": "application/vnd.api+json", + "size": 49, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-09-05T02:19:08.906Z", + "time": 119 + }, + { + "_id": "8c8984903eae2862f3675e1f82e42d40", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 548, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/types/d067e172-1ce4-4b59-ae6e-3f867e98c81e" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 603, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-09-05T02:19:09.032Z", + "time": 114 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Incidents_2863714588/Get-incident-notification-template-returns-OK-response_2167801298/frozen.json b/cassettes/v2/Incidents_2863714588/Get-incident-notification-template-returns-OK-response_2167801298/frozen.json new file mode 100644 index 000000000000..a158af7f0e8a --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Get-incident-notification-template-returns-OK-response_2167801298/frozen.json @@ -0,0 +1 @@ +"2025-09-05T02:19:18.985Z" diff --git a/cassettes/v2/Incidents_2863714588/Get-incident-notification-template-returns-OK-response_2167801298/recording.har b/cassettes/v2/Incidents_2863714588/Get-incident-notification-template-returns-OK-response_2167801298/recording.har new file mode 100644 index 000000000000..b26a3a3132d9 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Get-incident-notification-template-returns-OK-response_2167801298/recording.har @@ -0,0 +1,237 @@ +{ + "log": { + "_recordingName": "Incidents/Get incident notification template returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7bcfec665300989151e5e4d7e0833bd1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 223, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"Security Incident\"},\"type\":\"incident_types\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/types" + }, + "response": { + "bodySize": 802, + "content": { + "mimeType": "application/vnd.api+json", + "size": 802, + "text": "{\"data\":{\"id\":\"64f3b511-c83f-46cd-a07c-0120372df2d1\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2025-09-05T02:19:19.082876806Z\",\"createdBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modifiedAt\":\"2025-09-05T02:19:19.082876888Z\",\"name\":\"Security Incident\",\"prefix\":\"IR\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"google_meet_configuration\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"microsoft_teams_configuration\":{\"data\":null},\"zoom_configuration\":{\"data\":null}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-09-05T02:19:18.990Z", + "time": 212 + }, + { + "_id": "d9eb44941accaa9ac6d377011e1c61b9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 347, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"category\":\"alert\",\"content\":\"Test notification template\",\"name\":\"Test Template Test-Get_incident_notification_template_returns_OK_response-1757038758\",\"subject\":\"Test Subject\"},\"relationships\":{\"incident_type\":{\"data\":{\"id\":\"64f3b511-c83f-46cd-a07c-0120372df2d1\",\"type\":\"incident_types\"}}},\"type\":\"notification_templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates" + }, + "response": { + "bodySize": 654, + "content": { + "mimeType": "application/vnd.api+json", + "size": 654, + "text": "{\"data\":{\"id\":\"85266d98-836e-4981-84ce-ffd443885b5c\",\"type\":\"notification_templates\",\"attributes\":{\"category\":\"alert\",\"content\":\"Test notification template\",\"created\":\"2025-09-05T02:19:19.310014Z\",\"modified\":\"2025-09-05T02:19:19.310014Z\",\"name\":\"Test Template Test-Get_incident_notification_template_returns_OK_response-1757038758\",\"subject\":\"Test Subject\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"incident_type\":{\"data\":{\"id\":\"64f3b511-c83f-46cd-a07c-0120372df2d1\",\"type\":\"incident_types\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-09-05T02:19:19.214Z", + "time": 128 + }, + { + "_id": "fe57b22eab0c954124f228518c8b5b65", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 588, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates/85266d98-836e-4981-84ce-ffd443885b5c" + }, + "response": { + "bodySize": 654, + "content": { + "mimeType": "application/vnd.api+json", + "size": 654, + "text": "{\"data\":{\"id\":\"85266d98-836e-4981-84ce-ffd443885b5c\",\"type\":\"notification_templates\",\"attributes\":{\"category\":\"alert\",\"content\":\"Test notification template\",\"created\":\"2025-09-05T02:19:19.310014Z\",\"modified\":\"2025-09-05T02:19:19.310014Z\",\"name\":\"Test Template Test-Get_incident_notification_template_returns_OK_response-1757038758\",\"subject\":\"Test Subject\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"incident_type\":{\"data\":{\"id\":\"64f3b511-c83f-46cd-a07c-0120372df2d1\",\"type\":\"incident_types\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-09-05T02:19:19.350Z", + "time": 108 + }, + { + "_id": "430b04226514e66785b3d9be26bb1a0a", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 581, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates/85266d98-836e-4981-84ce-ffd443885b5c" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-09-05T02:19:19.467Z", + "time": 128 + }, + { + "_id": "bd7bf6e5e11672c67e8688810b309a41", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 548, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/types/64f3b511-c83f-46cd-a07c-0120372df2d1" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 603, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-09-05T02:19:19.599Z", + "time": 113 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Incidents_2863714588/List-incident-notification-templates-returns-OK-response_1531966673/frozen.json b/cassettes/v2/Incidents_2863714588/List-incident-notification-templates-returns-OK-response_1531966673/frozen.json new file mode 100644 index 000000000000..17d9ac27bec6 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/List-incident-notification-templates-returns-OK-response_1531966673/frozen.json @@ -0,0 +1 @@ +"2025-09-05T02:19:29.855Z" diff --git a/cassettes/v2/Incidents_2863714588/List-incident-notification-templates-returns-OK-response_1531966673/recording.har b/cassettes/v2/Incidents_2863714588/List-incident-notification-templates-returns-OK-response_1531966673/recording.har new file mode 100644 index 000000000000..4820be0cddd2 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/List-incident-notification-templates-returns-OK-response_1531966673/recording.har @@ -0,0 +1,57 @@ +{ + "log": { + "_recordingName": "Incidents/List incident notification templates returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "239ef584e5d53bf680e387340aeb07b5", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + } + ], + "headersSize": 551, + "httpVersion": "HTTP/1.1", + "method": "GET", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates" + }, + "response": { + "bodySize": 11, + "content": { + "mimeType": "application/vnd.api+json", + "size": 11, + "text": "{\"data\":[]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-09-05T02:19:29.859Z", + "time": 99 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Bad-Request-response_1785496415/frozen.json b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Bad-Request-response_1785496415/frozen.json new file mode 100644 index 000000000000..47cf057c6838 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Bad-Request-response_1785496415/frozen.json @@ -0,0 +1 @@ +"2025-09-05T02:19:40.063Z" diff --git a/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Bad-Request-response_1785496415/recording.har b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Bad-Request-response_1785496415/recording.har new file mode 100644 index 000000000000..5b56bf39a163 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Bad-Request-response_1785496415/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Incidents/Update incident notification template returns \"Bad Request\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7038fe00fae7bb0be89c229934a1a6a2", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 243, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 646, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"category\":\"update\",\"content\":\"Incident Status Update: For more details, visit the incident page.\",\"name\":\"Update Template\",\"subject\":\"Incident Update\"},\"id\":\"00000000-0000-0000-0000-000000000001\",\"type\":\"invalid_type\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates/00000000-1111-2222-3333-444444444444" + }, + "response": { + "bodySize": 131, + "content": { + "mimeType": "application/vnd.api+json", + "size": 131, + "text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"got type \\\"invalid_type\\\" expected one of \\\"notification_templates\\\"\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 400, + "statusText": "Bad Request" + }, + "startedDateTime": "2025-09-05T02:19:40.068Z", + "time": 92 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Not-Found-response_82313528/frozen.json b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Not-Found-response_82313528/frozen.json new file mode 100644 index 000000000000..0465a92e3cbc --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Not-Found-response_82313528/frozen.json @@ -0,0 +1 @@ +"2025-09-05T02:19:50.591Z" diff --git a/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Not-Found-response_82313528/recording.har b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Not-Found-response_82313528/recording.har new file mode 100644 index 000000000000..47175c02bba0 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-Not-Found-response_82313528/recording.har @@ -0,0 +1,67 @@ +{ + "log": { + "_recordingName": "Incidents/Update incident notification template returns \"Not Found\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "28f28077c17e6421484ca16d3a354df9", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 259, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 646, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"category\":\"update\",\"content\":\"Incident Status Update: For more details, visit the incident page.\",\"name\":\"Updated Template Name\",\"subject\":\"Incident Update\"},\"id\":\"00000000-1111-2222-3333-444444444444\",\"type\":\"notification_templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates/00000000-1111-2222-3333-444444444444" + }, + "response": { + "bodySize": 49, + "content": { + "mimeType": "application/vnd.api+json", + "size": 49, + "text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 524, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 404, + "statusText": "Not Found" + }, + "startedDateTime": "2025-09-05T02:19:50.596Z", + "time": 94 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-OK-response_2235900363/frozen.json b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-OK-response_2235900363/frozen.json new file mode 100644 index 000000000000..f83c52446bda --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-OK-response_2235900363/frozen.json @@ -0,0 +1 @@ +"2025-09-05T02:20:00.641Z" diff --git a/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-OK-response_2235900363/recording.har b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-OK-response_2235900363/recording.har new file mode 100644 index 000000000000..0ab6f7dc17d5 --- /dev/null +++ b/cassettes/v2/Incidents_2863714588/Update-incident-notification-template-returns-OK-response_2235900363/recording.har @@ -0,0 +1,247 @@ +{ + "log": { + "_recordingName": "Incidents/Update incident notification template returns \"OK\" response", + "creator": { + "comment": "persister:fs", + "name": "Polly.JS", + "version": "6.0.5" + }, + "entries": [ + { + "_id": "7bcfec665300989151e5e4d7e0833bd1", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 223, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 575, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"name\":\"Security Incident\"},\"type\":\"incident_types\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/types" + }, + "response": { + "bodySize": 802, + "content": { + "mimeType": "application/vnd.api+json", + "size": 802, + "text": "{\"data\":{\"id\":\"614d7660-ec56-4b27-98f5-3a58dfffba02\",\"type\":\"incident_types\",\"attributes\":{\"createdAt\":\"2025-09-05T02:20:00.720888811Z\",\"createdBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"description\":\"Any incidents that harm (or have the potential to) the confidentiality, integrity, or availability of our data.\",\"is_default\":false,\"lastModifiedBy\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modifiedAt\":\"2025-09-05T02:20:00.720888909Z\",\"name\":\"Security Incident\",\"prefix\":\"IR\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"google_meet_configuration\":{\"data\":null},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"microsoft_teams_configuration\":{\"data\":null},\"zoom_configuration\":{\"data\":null}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 664, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-09-05T02:20:00.646Z", + "time": 182 + }, + { + "_id": "576d0bbfc344ba74783810eda3807563", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 350, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 608, + "httpVersion": "HTTP/1.1", + "method": "POST", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"category\":\"alert\",\"content\":\"Test notification template\",\"name\":\"Test Template Test-Update_incident_notification_template_returns_OK_response-1757038800\",\"subject\":\"Test Subject\"},\"relationships\":{\"incident_type\":{\"data\":{\"id\":\"614d7660-ec56-4b27-98f5-3a58dfffba02\",\"type\":\"incident_types\"}}},\"type\":\"notification_templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates" + }, + "response": { + "bodySize": 657, + "content": { + "mimeType": "application/vnd.api+json", + "size": 657, + "text": "{\"data\":{\"id\":\"0975a4b5-8190-449c-8342-64dab1a90c65\",\"type\":\"notification_templates\",\"attributes\":{\"category\":\"alert\",\"content\":\"Test notification template\",\"created\":\"2025-09-05T02:20:00.936994Z\",\"modified\":\"2025-09-05T02:20:00.936994Z\",\"name\":\"Test Template Test-Update_incident_notification_template_returns_OK_response-1757038800\",\"subject\":\"Test Subject\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"incident_type\":{\"data\":{\"id\":\"614d7660-ec56-4b27-98f5-3a58dfffba02\",\"type\":\"incident_types\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 201, + "statusText": "Created" + }, + "startedDateTime": "2025-09-05T02:20:00.838Z", + "time": 115 + }, + { + "_id": "254efdd9343f651607b7761f806fb54d", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 481, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "application/json" + }, + { + "_fromType": "array", + "name": "content-type", + "value": "application/json" + } + ], + "headersSize": 646, + "httpVersion": "HTTP/1.1", + "method": "PATCH", + "postData": { + "mimeType": "application/json", + "params": [], + "text": "{\"data\":{\"attributes\":{\"category\":\"update\",\"content\":\"Incident Status Update:\\n\\nTitle: Sample Incident Title\\nNew Status: resolved\\nSeverity: SEV-2\\nServices: web-service, database-service\\nCommander: John Doe\\n\\nFor more details, visit the incident page.\",\"name\":\"Test-Update_incident_notification_template_returns_OK_response-1757038800\",\"subject\":\"Incident Update: Sample Incident Title - resolved\"},\"id\":\"0975a4b5-8190-449c-8342-64dab1a90c65\",\"type\":\"notification_templates\"}}" + }, + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates/0975a4b5-8190-449c-8342-64dab1a90c65" + }, + "response": { + "bodySize": 857, + "content": { + "mimeType": "application/vnd.api+json", + "size": 857, + "text": "{\"data\":{\"id\":\"0975a4b5-8190-449c-8342-64dab1a90c65\",\"type\":\"notification_templates\",\"attributes\":{\"category\":\"update\",\"content\":\"Incident Status Update:\\n\\nTitle: Sample Incident Title\\nNew Status: resolved\\nSeverity: SEV-2\\nServices: web-service, database-service\\nCommander: John Doe\\n\\nFor more details, visit the incident page.\",\"created\":\"2025-09-05T02:20:00.936994Z\",\"modified\":\"2025-09-05T02:20:01.067409Z\",\"name\":\"Test-Update_incident_notification_template_returns_OK_response-1757038800\",\"subject\":\"Incident Update: Sample Incident Title - resolved\"},\"relationships\":{\"created_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}},\"incident_type\":{\"data\":{\"id\":\"614d7660-ec56-4b27-98f5-3a58dfffba02\",\"type\":\"incident_types\"}},\"last_modified_by_user\":{\"data\":{\"id\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"type\":\"users\"}}}}}" + }, + "cookies": [], + "headers": [ + { + "name": "content-type", + "value": "application/vnd.api+json" + } + ], + "headersSize": 525, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 200, + "statusText": "OK" + }, + "startedDateTime": "2025-09-05T02:20:00.967Z", + "time": 122 + }, + { + "_id": "12642529a6b4844c4b8b614311256417", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 581, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/notification-templates/0975a4b5-8190-449c-8342-64dab1a90c65" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 464, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-09-05T02:20:01.095Z", + "time": 104 + }, + { + "_id": "55bc228f4c398234694e04341a7e035e", + "_order": 0, + "cache": {}, + "request": { + "bodySize": 0, + "cookies": [], + "headers": [ + { + "_fromType": "array", + "name": "accept", + "value": "*/*" + } + ], + "headersSize": 548, + "httpVersion": "HTTP/1.1", + "method": "DELETE", + "queryString": [], + "url": "https://api.datadoghq.com/api/v2/incidents/config/types/614d7660-ec56-4b27-98f5-3a58dfffba02" + }, + "response": { + "bodySize": 0, + "content": { + "mimeType": "text/plain", + "size": 0 + }, + "cookies": [], + "headers": [], + "headersSize": 603, + "httpVersion": "HTTP/1.1", + "redirectURL": "", + "status": 204, + "statusText": "No Content" + }, + "startedDateTime": "2025-09-05T02:20:01.205Z", + "time": 123 + } + ], + "pages": [], + "version": "1.2" + } +} diff --git a/examples/v2/incidents/CreateIncidentNotificationTemplate.ts b/examples/v2/incidents/CreateIncidentNotificationTemplate.ts new file mode 100644 index 000000000000..c014de1fc6bf --- /dev/null +++ b/examples/v2/incidents/CreateIncidentNotificationTemplate.ts @@ -0,0 +1,45 @@ +/** + * Create incident notification template returns "Created" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.createIncidentNotificationTemplate"] = + true; +const apiInstance = new v2.IncidentsApi(configuration); + +// there is a valid "incident_type" in the system +const INCIDENT_TYPE_DATA_ID = process.env.INCIDENT_TYPE_DATA_ID as string; + +const params: v2.IncidentsApiCreateIncidentNotificationTemplateRequest = { + body: { + data: { + attributes: { + category: "alert", + content: + "An incident has been declared.\n\nTitle: Sample Incident Title\nSeverity: SEV-2\nAffected Services: web-service, database-service\nStatus: active\n\nPlease join the incident channel for updates.", + name: "Example-Incident", + subject: "SEV-2 Incident: Sample Incident Title", + }, + relationships: { + incidentType: { + data: { + id: INCIDENT_TYPE_DATA_ID, + type: "incident_types", + }, + }, + }, + type: "notification_templates", + }, + }, +}; + +apiInstance + .createIncidentNotificationTemplate(params) + .then((data: v2.IncidentNotificationTemplate) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/DeleteIncidentNotificationTemplate.ts b/examples/v2/incidents/DeleteIncidentNotificationTemplate.ts new file mode 100644 index 000000000000..a9181e0a53ae --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentNotificationTemplate.ts @@ -0,0 +1,23 @@ +/** + * Delete a notification template returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteIncidentNotificationTemplate"] = + true; +const apiInstance = new v2.IncidentsApi(configuration); + +const params: v2.IncidentsApiDeleteIncidentNotificationTemplateRequest = { + id: "00000000-0000-0000-0000-000000000001", +}; + +apiInstance + .deleteIncidentNotificationTemplate(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/DeleteIncidentNotificationTemplate_1602689347.ts b/examples/v2/incidents/DeleteIncidentNotificationTemplate_1602689347.ts new file mode 100644 index 000000000000..bc39532b729f --- /dev/null +++ b/examples/v2/incidents/DeleteIncidentNotificationTemplate_1602689347.ts @@ -0,0 +1,27 @@ +/** + * Delete incident notification template returns "No Content" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.deleteIncidentNotificationTemplate"] = + true; +const apiInstance = new v2.IncidentsApi(configuration); + +// there is a valid "notification_template" in the system +const NOTIFICATION_TEMPLATE_DATA_ID = process.env + .NOTIFICATION_TEMPLATE_DATA_ID as string; + +const params: v2.IncidentsApiDeleteIncidentNotificationTemplateRequest = { + id: NOTIFICATION_TEMPLATE_DATA_ID, +}; + +apiInstance + .deleteIncidentNotificationTemplate(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/GetIncidentNotificationTemplate.ts b/examples/v2/incidents/GetIncidentNotificationTemplate.ts new file mode 100644 index 000000000000..470c470e1df1 --- /dev/null +++ b/examples/v2/incidents/GetIncidentNotificationTemplate.ts @@ -0,0 +1,26 @@ +/** + * Get incident notification template returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.getIncidentNotificationTemplate"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +// there is a valid "notification_template" in the system +const NOTIFICATION_TEMPLATE_DATA_ID = process.env + .NOTIFICATION_TEMPLATE_DATA_ID as string; + +const params: v2.IncidentsApiGetIncidentNotificationTemplateRequest = { + id: NOTIFICATION_TEMPLATE_DATA_ID, +}; + +apiInstance + .getIncidentNotificationTemplate(params) + .then((data: v2.IncidentNotificationTemplate) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/ListIncidentNotificationTemplates.ts b/examples/v2/incidents/ListIncidentNotificationTemplates.ts new file mode 100644 index 000000000000..29779d28d9e7 --- /dev/null +++ b/examples/v2/incidents/ListIncidentNotificationTemplates.ts @@ -0,0 +1,18 @@ +/** + * List incident notification templates returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.listIncidentNotificationTemplates"] = true; +const apiInstance = new v2.IncidentsApi(configuration); + +apiInstance + .listIncidentNotificationTemplates() + .then((data: v2.IncidentNotificationTemplateArray) => { + console.log( + "API called successfully. Returned data: " + JSON.stringify(data) + ); + }) + .catch((error: any) => console.error(error)); diff --git a/examples/v2/incidents/UpdateIncidentNotificationTemplate.ts b/examples/v2/incidents/UpdateIncidentNotificationTemplate.ts new file mode 100644 index 000000000000..a8d21094f8b2 --- /dev/null +++ b/examples/v2/incidents/UpdateIncidentNotificationTemplate.ts @@ -0,0 +1,40 @@ +/** + * Update incident notification template returns "OK" response + */ + +import { client, v2 } from "@datadog/datadog-api-client"; + +const configuration = client.createConfiguration(); +configuration.unstableOperations["v2.updateIncidentNotificationTemplate"] = + true; +const apiInstance = new v2.IncidentsApi(configuration); + +// there is a valid "notification_template" in the system +const NOTIFICATION_TEMPLATE_DATA_ID = process.env + .NOTIFICATION_TEMPLATE_DATA_ID as string; + +const params: v2.IncidentsApiUpdateIncidentNotificationTemplateRequest = { + body: { + data: { + attributes: { + category: "update", + content: + "Incident Status Update:\n\nTitle: Sample Incident Title\nNew Status: resolved\nSeverity: SEV-2\nServices: web-service, database-service\nCommander: John Doe\n\nFor more details, visit the incident page.", + name: "Example-Incident", + subject: "Incident Update: Sample Incident Title - resolved", + }, + id: NOTIFICATION_TEMPLATE_DATA_ID, + type: "notification_templates", + }, + }, + id: NOTIFICATION_TEMPLATE_DATA_ID, +}; + +apiInstance + .updateIncidentNotificationTemplate(params) + .then((data: v2.IncidentNotificationTemplate) => { + 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 77c897ba63c2..35320e83705e 100644 --- a/features/support/scenarios_model_mapping.ts +++ b/features/support/scenarios_model_mapping.ts @@ -5013,6 +5013,61 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = { }, "operationResponseType": "IncidentResponse", }, + "v2.ListIncidentNotificationTemplates": { + "filterIncidentType": { + "type": "string", + "format": "uuid", + }, + "include": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentNotificationTemplateArray", + }, + "v2.CreateIncidentNotificationTemplate": { + "body": { + "type": "CreateIncidentNotificationTemplateRequest", + "format": "", + }, + "operationResponseType": "IncidentNotificationTemplate", + }, + "v2.GetIncidentNotificationTemplate": { + "id": { + "type": "string", + "format": "uuid", + }, + "include": { + "type": "string", + "format": "", + }, + "operationResponseType": "IncidentNotificationTemplate", + }, + "v2.DeleteIncidentNotificationTemplate": { + "id": { + "type": "string", + "format": "uuid", + }, + "include": { + "type": "string", + "format": "", + }, + "operationResponseType": "{}", + }, + "v2.UpdateIncidentNotificationTemplate": { + "id": { + "type": "string", + "format": "uuid", + }, + "include": { + "type": "string", + "format": "", + }, + "body": { + "type": "PatchIncidentNotificationTemplateRequest", + "format": "", + }, + "operationResponseType": "IncidentNotificationTemplate", + }, "v2.ListIncidentTypes": { "includeDeleted": { "type": "boolean", diff --git a/features/v2/given.json b/features/v2/given.json index ef93bc042eac..2fce716f34a1 100644 --- a/features/v2/given.json +++ b/features/v2/given.json @@ -249,6 +249,18 @@ "tag": "Incidents", "operationId": "CreateIncident" }, + { + "operationId": "CreateIncidentNotificationTemplate", + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"category\": \"alert\",\n \"content\": \"Test notification template\",\n \"name\": \"Test Template {{ unique }}\",\n \"subject\": \"Test Subject\"\n },\n \"relationships\": {\n \"incident_type\": {\n \"data\": {\n \"id\": \"{{ incident_type.data.id }}\",\n \"type\": \"incident_types\"\n }\n }\n },\n \"type\": \"notification_templates\"\n }\n}" + } + ], + "step": "there is a valid \"notification_template\" in the system", + "key": "notification_template", + "tag": "Incidents" + }, { "parameters": [ { diff --git a/features/v2/incidents.feature b/features/v2/incidents.feature index 95314aad3450..f381e2e6f0b8 100644 --- a/features/v2/incidents.feature +++ b/features/v2/incidents.feature @@ -146,6 +146,35 @@ Feature: Incidents When the request is sent Then the response status is 404 Not Found + @team:Datadog/incident-app + Scenario: Create incident notification template returns "Bad Request" response + Given operation "CreateIncidentNotificationTemplate" enabled + And new "CreateIncidentNotificationTemplate" request + And body with value {"data": {"attributes": {"category": "alert", "content": "An incident has been declared. Please join the incident channel for updates.", "name": "Test Template", "subject": "Incident Alert"}, "type": "invalid_type"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/incident-app + Scenario: Create incident notification template returns "Created" response + Given there is a valid "incident_type" in the system + And operation "CreateIncidentNotificationTemplate" enabled + And new "CreateIncidentNotificationTemplate" request + And body with value {"data": {"attributes": {"category": "alert", "content": "An incident has been declared.\n\nTitle: Sample Incident Title\nSeverity: SEV-2\nAffected Services: web-service, database-service\nStatus: active\n\nPlease join the incident channel for updates.", "name": "{{ unique }}", "subject": "SEV-2 Incident: Sample Incident Title"}, "relationships": {"incident_type": {"data": {"id": "{{ incident_type.data.id }}", "type": "incident_types"}}}, "type": "notification_templates"}} + When the request is sent + Then the response status is 201 Created + And the response "data.type" is equal to "notification_templates" + And the response "data.attributes.name" has the same value as "unique" + And the response "data.attributes.category" is equal to "alert" + And the response "data.relationships.incident_type.data.id" has the same value as "incident_type.data.id" + + @team:Datadog/incident-app + Scenario: Create incident notification template returns "Not Found" response + Given operation "CreateIncidentNotificationTemplate" enabled + And new "CreateIncidentNotificationTemplate" request + And body with value {"data": {"attributes": {"category": "alert", "content": "An incident has been declared. Please join the incident channel for updates.", "name": "Incident Alert Template", "subject": "Incident Alert"}, "relationships": {"incident_type": {"data": {"id": "00000000-1111-2222-3333-444444444444", "type": "incident_types"}}}, "type": "notification_templates"}} + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:DataDog/incident-app Scenario: Create, update, and delete incident attachments returns "Bad Request" response Given operation "UpdateIncidentAttachments" enabled @@ -173,6 +202,30 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app + Scenario: Delete a notification template returns "Bad Request" response + Given operation "DeleteIncidentNotificationTemplate" enabled + And new "DeleteIncidentNotificationTemplate" request + And request contains "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 a notification template returns "No Content" response + Given operation "DeleteIncidentNotificationTemplate" enabled + And new "DeleteIncidentNotificationTemplate" request + And request contains "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 a notification template returns "Not Found" response + Given operation "DeleteIncidentNotificationTemplate" enabled + And new "DeleteIncidentNotificationTemplate" request + And request contains "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 existing incident returns "Bad Request" response Given operation "DeleteIncident" enabled @@ -281,6 +334,16 @@ Feature: Incidents When the request is sent Then the response status is 204 OK + @team:Datadog/incident-app + Scenario: Delete incident notification template returns "No Content" response + Given there is a valid "incident_type" in the system + And there is a valid "notification_template" in the system + And operation "DeleteIncidentNotificationTemplate" enabled + And new "DeleteIncidentNotificationTemplate" request + And request contains "id" parameter from "notification_template.data.id" + When the request is sent + Then the response status is 204 No Content + @generated @skip @team:DataDog/incident-app Scenario: Get a list of an incident's integration metadata returns "Bad Request" response Given operation "ListIncidentIntegrations" enabled @@ -450,6 +513,36 @@ Feature: Incidents When the request is sent Then the response status is 200 OK + @generated @skip @team:Datadog/incident-app + Scenario: Get incident notification template returns "Bad Request" response + Given operation "GetIncidentNotificationTemplate" enabled + And new "GetIncidentNotificationTemplate" request + And request contains "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 notification template returns "Not Found" response + Given operation "GetIncidentNotificationTemplate" enabled + And new "GetIncidentNotificationTemplate" request + And request contains "id" parameter from "REPLACE.ME" + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Get incident notification template returns "OK" response + Given there is a valid "incident_type" in the system + And there is a valid "notification_template" in the system + And operation "GetIncidentNotificationTemplate" enabled + And new "GetIncidentNotificationTemplate" request + And request contains "id" parameter from "notification_template.data.id" + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "notification_templates" + And the response "data.id" has the same value as "notification_template.data.id" + And the response "data" has field "attributes" + And the response "data" has field "relationships" + @generated @skip @team:Datadog/incident-app Scenario: Get incident todo details returns "Bad Request" response Given operation "GetIncidentTodo" enabled @@ -531,6 +624,28 @@ Feature: Incidents Then the response status is 200 OK And the response "data.attributes.title" has the same value as "incident.data.attributes.title" + @generated @skip @team:Datadog/incident-app + Scenario: List incident notification templates returns "Bad Request" response + Given operation "ListIncidentNotificationTemplates" enabled + And new "ListIncidentNotificationTemplates" request + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:Datadog/incident-app + Scenario: List incident notification templates returns "Not Found" response + Given operation "ListIncidentNotificationTemplates" enabled + And new "ListIncidentNotificationTemplates" request + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: List incident notification templates returns "OK" response + Given operation "ListIncidentNotificationTemplates" enabled + And new "ListIncidentNotificationTemplates" request + When the request is sent + Then the response status is 200 OK + And the response "data" has length 0 + @team:DataDog/incident-app Scenario: Remove commander from an incident returns "OK" response Given operation "UpdateIncident" enabled @@ -702,3 +817,36 @@ Feature: Incidents And body with value {"data": {"id": "{{incident_type.data.id}}", "attributes": {"name": "{{incident_type.data.attributes.name}}-updated"}, "type": "incident_types"}} When the request is sent Then the response status is 200 OK + + @team:Datadog/incident-app + Scenario: Update incident notification template returns "Bad Request" response + Given operation "UpdateIncidentNotificationTemplate" enabled + And new "UpdateIncidentNotificationTemplate" request + And request contains "id" parameter with value "00000000-1111-2222-3333-444444444444" + And body with value {"data": {"attributes": {"category": "update", "content": "Incident Status Update: For more details, visit the incident page.", "name": "Update Template", "subject": "Incident Update"}, "id": "00000000-0000-0000-0000-000000000001", "type": "invalid_type"}} + When the request is sent + Then the response status is 400 Bad Request + + @team:Datadog/incident-app + Scenario: Update incident notification template returns "Not Found" response + Given operation "UpdateIncidentNotificationTemplate" enabled + And new "UpdateIncidentNotificationTemplate" request + And request contains "id" parameter with value "00000000-1111-2222-3333-444444444444" + And body with value {"data": {"attributes": {"category": "update", "content": "Incident Status Update: For more details, visit the incident page.", "name": "Updated Template Name", "subject": "Incident Update"}, "id": "00000000-1111-2222-3333-444444444444", "type": "notification_templates"}} + When the request is sent + Then the response status is 404 Not Found + + @team:Datadog/incident-app + Scenario: Update incident notification template returns "OK" response + Given there is a valid "incident_type" in the system + And there is a valid "notification_template" in the system + And operation "UpdateIncidentNotificationTemplate" enabled + And new "UpdateIncidentNotificationTemplate" request + And request contains "id" parameter from "notification_template.data.id" + And body with value {"data": {"attributes": {"category": "update", "content": "Incident Status Update:\n\nTitle: Sample Incident Title\nNew Status: resolved\nSeverity: SEV-2\nServices: web-service, database-service\nCommander: John Doe\n\nFor more details, visit the incident page.", "name": "{{ unique }}", "subject": "Incident Update: Sample Incident Title - resolved"}, "id": "{{ notification_template.data.id }}", "type": "notification_templates"}} + When the request is sent + Then the response status is 200 OK + And the response "data.type" is equal to "notification_templates" + And the response "data.id" has the same value as "notification_template.data.id" + And the response "data.attributes.name" has the same value as "unique" + And the response "data.attributes.category" is equal to "update" diff --git a/features/v2/undo.json b/features/v2/undo.json index 1ade02a7370a..58051028c293 100644 --- a/features/v2/undo.json +++ b/features/v2/undo.json @@ -1089,6 +1089,43 @@ "type": "unsafe" } }, + "ListIncidentNotificationTemplates": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "CreateIncidentNotificationTemplate": { + "tag": "Incidents", + "undo": { + "operationId": "DeleteIncidentNotificationTemplate", + "parameters": [ + { + "name": "id", + "source": "data.id" + } + ], + "type": "unsafe" + } + }, + "DeleteIncidentNotificationTemplate": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, + "GetIncidentNotificationTemplate": { + "tag": "Incidents", + "undo": { + "type": "safe" + } + }, + "UpdateIncidentNotificationTemplate": { + "tag": "Incidents", + "undo": { + "type": "idempotent" + } + }, "ListIncidentTypes": { "tag": "Incidents", "undo": { diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 6f61e6bf7a7f..9ca521f4f204 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -255,18 +255,22 @@ export function createConfiguration( "v2.getDataDeletionRequests": false, "v2.createIncident": false, "v2.createIncidentIntegration": false, + "v2.createIncidentNotificationTemplate": false, "v2.createIncidentTodo": false, "v2.createIncidentType": false, "v2.deleteIncident": false, "v2.deleteIncidentIntegration": false, + "v2.deleteIncidentNotificationTemplate": false, "v2.deleteIncidentTodo": false, "v2.deleteIncidentType": false, "v2.getIncident": false, "v2.getIncidentIntegration": false, + "v2.getIncidentNotificationTemplate": false, "v2.getIncidentTodo": false, "v2.getIncidentType": false, "v2.listIncidentAttachments": false, "v2.listIncidentIntegrations": false, + "v2.listIncidentNotificationTemplates": false, "v2.listIncidents": false, "v2.listIncidentTodos": false, "v2.listIncidentTypes": false, @@ -274,6 +278,7 @@ export function createConfiguration( "v2.updateIncident": false, "v2.updateIncidentAttachments": false, "v2.updateIncidentIntegration": false, + "v2.updateIncidentNotificationTemplate": false, "v2.updateIncidentTodo": false, "v2.updateIncidentType": false, "v2.createAWSAccount": false, diff --git a/packages/datadog-api-client-v2/apis/IncidentsApi.ts b/packages/datadog-api-client-v2/apis/IncidentsApi.ts index 83f1138b9a72..9ce482c84100 100644 --- a/packages/datadog-api-client-v2/apis/IncidentsApi.ts +++ b/packages/datadog-api-client-v2/apis/IncidentsApi.ts @@ -17,6 +17,7 @@ import { ObjectSerializer } from "../models/ObjectSerializer"; import { ApiException } from "../../datadog-api-client-common/exception"; import { APIErrorResponse } from "../models/APIErrorResponse"; +import { CreateIncidentNotificationTemplateRequest } from "../models/CreateIncidentNotificationTemplateRequest"; import { IncidentAttachmentAttachmentType } from "../models/IncidentAttachmentAttachmentType"; import { IncidentAttachmentRelatedObject } from "../models/IncidentAttachmentRelatedObject"; import { IncidentAttachmentsResponse } from "../models/IncidentAttachmentsResponse"; @@ -27,6 +28,8 @@ import { IncidentIntegrationMetadataCreateRequest } from "../models/IncidentInte import { IncidentIntegrationMetadataListResponse } from "../models/IncidentIntegrationMetadataListResponse"; import { IncidentIntegrationMetadataPatchRequest } from "../models/IncidentIntegrationMetadataPatchRequest"; import { IncidentIntegrationMetadataResponse } from "../models/IncidentIntegrationMetadataResponse"; +import { IncidentNotificationTemplate } from "../models/IncidentNotificationTemplate"; +import { IncidentNotificationTemplateArray } from "../models/IncidentNotificationTemplateArray"; import { IncidentRelatedObject } from "../models/IncidentRelatedObject"; import { IncidentResponse } from "../models/IncidentResponse"; import { IncidentResponseData } from "../models/IncidentResponseData"; @@ -43,6 +46,7 @@ import { IncidentTypeListResponse } from "../models/IncidentTypeListResponse"; import { IncidentTypePatchRequest } from "../models/IncidentTypePatchRequest"; import { IncidentTypeResponse } from "../models/IncidentTypeResponse"; import { IncidentUpdateRequest } from "../models/IncidentUpdateRequest"; +import { PatchIncidentNotificationTemplateRequest } from "../models/PatchIncidentNotificationTemplateRequest"; export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { public async createIncident( @@ -155,6 +159,61 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async createIncidentNotificationTemplate( + body: CreateIncidentNotificationTemplateRequest, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + 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", "createIncidentNotificationTemplate"); + } + + // Path Params + const localVarPath = "/api/v2/incidents/config/notification-templates"; + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.createIncidentNotificationTemplate") + .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, + "CreateIncidentNotificationTemplateRequest", + "" + ), + contentType + ); + requestContext.setBody(serializedBody); + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + public async createIncidentTodo( incidentId: string, body: IncidentTodoCreateRequest, @@ -351,6 +410,60 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async deleteIncidentNotificationTemplate( + id: string, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn( + "Using unstable operation 'deleteIncidentNotificationTemplate'" + ); + if (!_config.unstableOperations["v2.deleteIncidentNotificationTemplate"]) { + throw new Error( + "Unstable operation 'deleteIncidentNotificationTemplate' is disabled" + ); + } + + // 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/notification-templates/{id}".replace( + "{id}", + encodeURIComponent(String(id)) + ); + + // Make Request Context + const requestContext = _config + .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", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + public async deleteIncidentTodo( incidentId: string, todoId: string, @@ -538,6 +651,58 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + public async getIncidentNotificationTemplate( + id: string, + include?: string, + _options?: Configuration + ): Promise { + const _config = _options || this.configuration; + + logger.warn("Using unstable operation 'getIncidentNotificationTemplate'"); + if (!_config.unstableOperations["v2.getIncidentNotificationTemplate"]) { + throw new Error( + "Unstable operation 'getIncidentNotificationTemplate' is disabled" + ); + } + + // 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/notification-templates/{id}".replace( + "{id}", + encodeURIComponent(String(id)) + ); + + // Make Request Context + const requestContext = _config + .getServer("v2.IncidentsApi.getIncidentNotificationTemplate") + .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", ""), + "" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + public async getIncidentTodo( incidentId: string, todoId: string, @@ -731,6 +896,56 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + 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" + ); + } + + // 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"), + "" + ); + } + if (include !== undefined) { + requestContext.setQueryParam( + "include", + ObjectSerializer.serialize(include, "string", ""), + "" + ); + } + + // Apply auth methods + applySecurityAuthentication(_config, requestContext, [ + "apiKeyAuth", + "appKeyAuth", + "AuthZ", + ]); + + return requestContext; + } + public async listIncidents( include?: Array, pageSize?: number, @@ -1155,6 +1370,81 @@ export class IncidentsApiRequestFactory extends BaseAPIRequestFactory { return requestContext; } + 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" + ); + } + + // 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"); + } + + // Path Params + const localVarPath = + "/api/v2/incidents/config/notification-templates/{id}".replace( + "{id}", + encodeURIComponent(String(id)) + ); + + // 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", ""), + "" + ); + } + + // 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; + } + public async updateIncidentTodo( incidentId: string, todoId: string, @@ -1406,6 +1696,70 @@ 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 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 @@ -1642,6 +1996,61 @@ 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 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 @@ -1816,21 +2225,86 @@ 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 getIncidentIntegration + * @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 getIncidentNotificationTemplate * @throws ApiException if the response code was not in [200, 299] */ - public async getIncidentIntegration( + public async getIncidentNotificationTemplate( response: ResponseContext - ): Promise { + ): 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; + const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplate" + ) as IncidentNotificationTemplate; return body; } if ( @@ -1862,12 +2336,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: IncidentIntegrationMetadataResponse = - ObjectSerializer.deserialize( - ObjectSerializer.parse(await response.body.text(), contentType), - "IncidentIntegrationMetadataResponse", - "" - ) as IncidentIntegrationMetadataResponse; + const body: IncidentNotificationTemplate = ObjectSerializer.deserialize( + ObjectSerializer.parse(await response.body.text(), contentType), + "IncidentNotificationTemplate", + "" + ) as IncidentNotificationTemplate; return body; } @@ -2136,6 +2609,72 @@ 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 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 @@ -2587,6 +3126,70 @@ 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 + * @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 @@ -2737,6 +3340,13 @@ export interface IncidentsApiCreateIncidentIntegrationRequest { body: IncidentIntegrationMetadataCreateRequest; } +export interface IncidentsApiCreateIncidentNotificationTemplateRequest { + /** + * @type CreateIncidentNotificationTemplateRequest + */ + body: CreateIncidentNotificationTemplateRequest; +} + export interface IncidentsApiCreateIncidentTodoRequest { /** * The UUID of the incident. @@ -2779,6 +3389,19 @@ export interface IncidentsApiDeleteIncidentIntegrationRequest { integrationMetadataId: 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 IncidentsApiDeleteIncidentTodoRequest { /** * The UUID of the incident. @@ -2826,6 +3449,19 @@ export interface IncidentsApiGetIncidentIntegrationRequest { integrationMetadataId: 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 IncidentsApiGetIncidentTodoRequest { /** * The UUID of the incident. @@ -2873,6 +3509,19 @@ export interface IncidentsApiListIncidentIntegrationsRequest { incidentId: string; } +export interface IncidentsApiListIncidentNotificationTemplatesRequest { + /** + * Optional incident type ID filter. + * @type string + */ + 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 IncidentsApiListIncidentsRequest { /** * Specifies which types of related objects should be included in the response. @@ -2991,6 +3640,23 @@ export interface IncidentsApiUpdateIncidentIntegrationRequest { body: IncidentIntegrationMetadataPatchRequest; } +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 + */ + include?: string; +} + export interface IncidentsApiUpdateIncidentTodoRequest { /** * The UUID of the incident. @@ -3084,6 +3750,30 @@ export class IncidentsApi { }); } + /** + * Creates a new notification template. + * @param param The request object + */ + 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 + ); + }); + }); + } + /** * Create an incident todo. * @param param The request object @@ -3172,6 +3862,31 @@ export class IncidentsApi { }); } + /** + * Deletes a notification template by its ID. + * @param param The request object + */ + public deleteIncidentNotificationTemplate( + param: IncidentsApiDeleteIncidentNotificationTemplateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.deleteIncidentNotificationTemplate( + param.id, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.deleteIncidentNotificationTemplate( + responseContext + ); + }); + }); + } + /** * Delete an incident todo. * @param param The request object @@ -3259,6 +3974,31 @@ export class IncidentsApi { }); } + /** + * Retrieves a specific notification template by its ID. + * @param param The request object + */ + public getIncidentNotificationTemplate( + param: IncidentsApiGetIncidentNotificationTemplateRequest, + options?: Configuration + ): 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.getIncidentNotificationTemplate( + responseContext + ); + }); + }); + } + /** * Get incident todo details. * @param param The request object @@ -3350,6 +4090,31 @@ export class IncidentsApi { }); } + /** + * Lists all notification templates. Optionally filter by incident type. + * @param param The request object + */ + public listIncidentNotificationTemplates( + param: IncidentsApiListIncidentNotificationTemplatesRequest = {}, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.listIncidentNotificationTemplates( + param.filterIncidentType, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.listIncidentNotificationTemplates( + responseContext + ); + }); + }); + } + /** * Get all incidents for the user's organization. * @param param The request object @@ -3613,6 +4378,32 @@ export class IncidentsApi { }); } + /** + * Updates an existing notification template's attributes. + * @param param The request object + */ + public updateIncidentNotificationTemplate( + param: IncidentsApiUpdateIncidentNotificationTemplateRequest, + options?: Configuration + ): Promise { + const requestContextPromise = + this.requestFactory.updateIncidentNotificationTemplate( + param.id, + param.body, + param.include, + options + ); + return requestContextPromise.then((requestContext) => { + return this.configuration.httpApi + .send(requestContext) + .then((responseContext) => { + return this.responseProcessor.updateIncidentNotificationTemplate( + responseContext + ); + }); + }); + } + /** * Update an incident todo. * @param param The request object diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 5b9e9edab63a..3d91698604b6 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -314,18 +314,22 @@ export { export { IncidentsApiCreateIncidentRequest, IncidentsApiCreateIncidentIntegrationRequest, + IncidentsApiCreateIncidentNotificationTemplateRequest, IncidentsApiCreateIncidentTodoRequest, IncidentsApiCreateIncidentTypeRequest, IncidentsApiDeleteIncidentRequest, IncidentsApiDeleteIncidentIntegrationRequest, + IncidentsApiDeleteIncidentNotificationTemplateRequest, IncidentsApiDeleteIncidentTodoRequest, IncidentsApiDeleteIncidentTypeRequest, IncidentsApiGetIncidentRequest, IncidentsApiGetIncidentIntegrationRequest, + IncidentsApiGetIncidentNotificationTemplateRequest, IncidentsApiGetIncidentTodoRequest, IncidentsApiGetIncidentTypeRequest, IncidentsApiListIncidentAttachmentsRequest, IncidentsApiListIncidentIntegrationsRequest, + IncidentsApiListIncidentNotificationTemplatesRequest, IncidentsApiListIncidentTodosRequest, IncidentsApiListIncidentTypesRequest, IncidentsApiListIncidentsRequest, @@ -333,6 +337,7 @@ export { IncidentsApiUpdateIncidentRequest, IncidentsApiUpdateIncidentAttachmentsRequest, IncidentsApiUpdateIncidentIntegrationRequest, + IncidentsApiUpdateIncidentNotificationTemplateRequest, IncidentsApiUpdateIncidentTodoRequest, IncidentsApiUpdateIncidentTypeRequest, IncidentsApi, @@ -1404,6 +1409,7 @@ export { CreateDataDeletionRequestBodyAttributes } from "./models/CreateDataDele export { CreateDataDeletionRequestBodyData } from "./models/CreateDataDeletionRequestBodyData"; export { CreateDataDeletionRequestBodyDataType } from "./models/CreateDataDeletionRequestBodyDataType"; export { CreateDataDeletionResponseBody } from "./models/CreateDataDeletionResponseBody"; +export { CreateIncidentNotificationTemplateRequest } from "./models/CreateIncidentNotificationTemplateRequest"; export { CreateNotificationRuleParameters } from "./models/CreateNotificationRuleParameters"; export { CreateNotificationRuleParametersData } from "./models/CreateNotificationRuleParametersData"; export { CreateNotificationRuleParametersDataAttributes } from "./models/CreateNotificationRuleParametersDataAttributes"; @@ -1912,6 +1918,8 @@ export { GitlabCredentialsUpdate } from "./models/GitlabCredentialsUpdate"; export { GitlabIntegration } from "./models/GitlabIntegration"; export { GitlabIntegrationType } from "./models/GitlabIntegrationType"; export { GitlabIntegrationUpdate } from "./models/GitlabIntegrationUpdate"; +export { GoogleMeetConfigurationReference } from "./models/GoogleMeetConfigurationReference"; +export { GoogleMeetConfigurationReferenceData } from "./models/GoogleMeetConfigurationReferenceData"; export { GreyNoiseAPIKey } from "./models/GreyNoiseAPIKey"; export { GreyNoiseAPIKeyType } from "./models/GreyNoiseAPIKeyType"; export { GreyNoiseAPIKeyUpdate } from "./models/GreyNoiseAPIKeyUpdate"; @@ -1995,6 +2003,20 @@ export { IncidentIntegrationMetadataType } from "./models/IncidentIntegrationMet export { IncidentIntegrationRelationships } from "./models/IncidentIntegrationRelationships"; export { IncidentNonDatadogCreator } from "./models/IncidentNonDatadogCreator"; export { IncidentNotificationHandle } from "./models/IncidentNotificationHandle"; +export { IncidentNotificationTemplate } from "./models/IncidentNotificationTemplate"; +export { IncidentNotificationTemplateArray } from "./models/IncidentNotificationTemplateArray"; +export { IncidentNotificationTemplateArrayMeta } from "./models/IncidentNotificationTemplateArrayMeta"; +export { IncidentNotificationTemplateArrayMetaPage } from "./models/IncidentNotificationTemplateArrayMetaPage"; +export { IncidentNotificationTemplateAttributes } from "./models/IncidentNotificationTemplateAttributes"; +export { IncidentNotificationTemplateCreateAttributes } from "./models/IncidentNotificationTemplateCreateAttributes"; +export { IncidentNotificationTemplateCreateData } from "./models/IncidentNotificationTemplateCreateData"; +export { IncidentNotificationTemplateCreateDataRelationships } from "./models/IncidentNotificationTemplateCreateDataRelationships"; +export { IncidentNotificationTemplateIncludedItems } from "./models/IncidentNotificationTemplateIncludedItems"; +export { IncidentNotificationTemplateRelationships } from "./models/IncidentNotificationTemplateRelationships"; +export { IncidentNotificationTemplateResponseData } from "./models/IncidentNotificationTemplateResponseData"; +export { IncidentNotificationTemplateType } from "./models/IncidentNotificationTemplateType"; +export { IncidentNotificationTemplateUpdateAttributes } from "./models/IncidentNotificationTemplateUpdateAttributes"; +export { IncidentNotificationTemplateUpdateData } from "./models/IncidentNotificationTemplateUpdateData"; export { IncidentPostmortemType } from "./models/IncidentPostmortemType"; export { IncidentRelatedObject } from "./models/IncidentRelatedObject"; export { IncidentRespondersType } from "./models/IncidentRespondersType"; @@ -2074,6 +2096,7 @@ export { IncidentTypeListResponse } from "./models/IncidentTypeListResponse"; export { IncidentTypeObject } from "./models/IncidentTypeObject"; export { IncidentTypePatchData } from "./models/IncidentTypePatchData"; export { IncidentTypePatchRequest } from "./models/IncidentTypePatchRequest"; +export { IncidentTypeRelationships } from "./models/IncidentTypeRelationships"; export { IncidentTypeResponse } from "./models/IncidentTypeResponse"; export { IncidentTypeType } from "./models/IncidentTypeType"; export { IncidentTypeUpdateAttributes } from "./models/IncidentTypeUpdateAttributes"; @@ -2406,6 +2429,8 @@ export { MicrosoftSentinelDestinationType } from "./models/MicrosoftSentinelDest export { MicrosoftTeamsChannelInfoResponseAttributes } from "./models/MicrosoftTeamsChannelInfoResponseAttributes"; export { MicrosoftTeamsChannelInfoResponseData } from "./models/MicrosoftTeamsChannelInfoResponseData"; export { MicrosoftTeamsChannelInfoType } from "./models/MicrosoftTeamsChannelInfoType"; +export { MicrosoftTeamsConfigurationReference } from "./models/MicrosoftTeamsConfigurationReference"; +export { MicrosoftTeamsConfigurationReferenceData } from "./models/MicrosoftTeamsConfigurationReferenceData"; export { MicrosoftTeamsCreateTenantBasedHandleRequest } from "./models/MicrosoftTeamsCreateTenantBasedHandleRequest"; export { MicrosoftTeamsCreateWorkflowsWebhookHandleRequest } from "./models/MicrosoftTeamsCreateWorkflowsWebhookHandleRequest"; export { MicrosoftTeamsGetChannelByNameResponse } from "./models/MicrosoftTeamsGetChannelByNameResponse"; @@ -2830,6 +2855,7 @@ export { PartialAPIKeyAttributes } from "./models/PartialAPIKeyAttributes"; export { PartialApplicationKey } from "./models/PartialApplicationKey"; export { PartialApplicationKeyAttributes } from "./models/PartialApplicationKeyAttributes"; export { PartialApplicationKeyResponse } from "./models/PartialApplicationKeyResponse"; +export { PatchIncidentNotificationTemplateRequest } from "./models/PatchIncidentNotificationTemplateRequest"; export { PatchNotificationRuleParameters } from "./models/PatchNotificationRuleParameters"; export { PatchNotificationRuleParametersData } from "./models/PatchNotificationRuleParametersData"; export { PatchNotificationRuleParametersDataAttributes } from "./models/PatchNotificationRuleParametersDataAttributes"; @@ -2902,6 +2928,8 @@ export { RelationshipToIncidentPostmortem } from "./models/RelationshipToInciden export { RelationshipToIncidentPostmortemData } from "./models/RelationshipToIncidentPostmortemData"; export { RelationshipToIncidentResponderData } from "./models/RelationshipToIncidentResponderData"; export { RelationshipToIncidentResponders } from "./models/RelationshipToIncidentResponders"; +export { RelationshipToIncidentType } from "./models/RelationshipToIncidentType"; +export { RelationshipToIncidentTypeData } from "./models/RelationshipToIncidentTypeData"; export { RelationshipToIncidentUserDefinedFieldData } from "./models/RelationshipToIncidentUserDefinedFieldData"; export { RelationshipToIncidentUserDefinedFields } from "./models/RelationshipToIncidentUserDefinedFields"; export { RelationshipToOrganization } from "./models/RelationshipToOrganization"; @@ -3765,5 +3793,7 @@ export { WorklflowGetInstanceResponseDataAttributes } from "./models/WorklflowGe export { XRayServicesIncludeAll } from "./models/XRayServicesIncludeAll"; export { XRayServicesIncludeOnly } from "./models/XRayServicesIncludeOnly"; export { XRayServicesList } from "./models/XRayServicesList"; +export { ZoomConfigurationReference } from "./models/ZoomConfigurationReference"; +export { ZoomConfigurationReferenceData } from "./models/ZoomConfigurationReferenceData"; export { ObjectSerializer } from "./models/ObjectSerializer"; diff --git a/packages/datadog-api-client-v2/models/CreateIncidentNotificationTemplateRequest.ts b/packages/datadog-api-client-v2/models/CreateIncidentNotificationTemplateRequest.ts new file mode 100644 index 000000000000..4627e605a77f --- /dev/null +++ b/packages/datadog-api-client-v2/models/CreateIncidentNotificationTemplateRequest.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 { IncidentNotificationTemplateCreateData } from "./IncidentNotificationTemplateCreateData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Create request for a notification template. + */ +export class CreateIncidentNotificationTemplateRequest { + /** + * Notification template data for a create request. + */ + "data": IncidentNotificationTemplateCreateData; + + /** + * 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: "IncidentNotificationTemplateCreateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return CreateIncidentNotificationTemplateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/GoogleMeetConfigurationReference.ts b/packages/datadog-api-client-v2/models/GoogleMeetConfigurationReference.ts new file mode 100644 index 000000000000..21d4664c4b9b --- /dev/null +++ b/packages/datadog-api-client-v2/models/GoogleMeetConfigurationReference.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 { GoogleMeetConfigurationReferenceData } from "./GoogleMeetConfigurationReferenceData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A reference to a Google Meet Configuration resource. + */ +export class GoogleMeetConfigurationReference { + /** + * The Google Meet configuration relationship data object. + */ + "data": GoogleMeetConfigurationReferenceData | null; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "GoogleMeetConfigurationReferenceData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return GoogleMeetConfigurationReference.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/GoogleMeetConfigurationReferenceData.ts b/packages/datadog-api-client-v2/models/GoogleMeetConfigurationReferenceData.ts new file mode 100644 index 000000000000..d3d6d668efa5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/GoogleMeetConfigurationReferenceData.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"; + +/** + * The Google Meet configuration relationship data object. + */ +export class GoogleMeetConfigurationReferenceData { + /** + * The unique identifier of the Google Meet configuration. + */ + "id": string; + /** + * The type of the Google Meet configuration. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return GoogleMeetConfigurationReferenceData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplate.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplate.ts new file mode 100644 index 000000000000..754f9de2724d --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplate.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 { IncidentNotificationTemplateIncludedItems } from "./IncidentNotificationTemplateIncludedItems"; +import { IncidentNotificationTemplateResponseData } from "./IncidentNotificationTemplateResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with a notification template. + */ +export class IncidentNotificationTemplate { + /** + * Notification template data from a response. + */ + "data": IncidentNotificationTemplateResponseData; + /** + * Related objects that are included in the response. + */ + "included"?: Array; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "IncidentNotificationTemplateResponseData", + required: true, + }, + included: { + baseName: "included", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplate.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateArray.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateArray.ts new file mode 100644 index 000000000000..a64fb787291b --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateArray.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 { IncidentNotificationTemplateArrayMeta } from "./IncidentNotificationTemplateArrayMeta"; +import { IncidentNotificationTemplateIncludedItems } from "./IncidentNotificationTemplateIncludedItems"; +import { IncidentNotificationTemplateResponseData } from "./IncidentNotificationTemplateResponseData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response with notification templates. + */ +export class IncidentNotificationTemplateArray { + /** + * The `NotificationTemplateArray` `data`. + */ + "data": Array; + /** + * Related objects that are included in the response. + */ + "included"?: Array; + /** + * Response metadata. + */ + "meta"?: IncidentNotificationTemplateArrayMeta; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "Array", + required: true, + }, + included: { + baseName: "included", + type: "Array", + }, + meta: { + baseName: "meta", + type: "IncidentNotificationTemplateArrayMeta", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateArray.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateArrayMeta.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateArrayMeta.ts new file mode 100644 index 000000000000..625e2f30fe6c --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateArrayMeta.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 { IncidentNotificationTemplateArrayMetaPage } from "./IncidentNotificationTemplateArrayMetaPage"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Response metadata. + */ +export class IncidentNotificationTemplateArrayMeta { + /** + * Pagination metadata. + */ + "page"?: IncidentNotificationTemplateArrayMetaPage; + + /** + * 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 = { + page: { + baseName: "page", + type: "IncidentNotificationTemplateArrayMetaPage", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateArrayMeta.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateArrayMetaPage.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateArrayMetaPage.ts new file mode 100644 index 000000000000..c16c0702c095 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateArrayMetaPage.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"; + +/** + * Pagination metadata. + */ +export class IncidentNotificationTemplateArrayMetaPage { + /** + * Total number of notification templates. + */ + "totalCount"?: number; + /** + * Total number of notification templates matching the filter. + */ + "totalFilteredCount"?: number; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + totalCount: { + baseName: "total_count", + type: "number", + format: "int64", + }, + totalFilteredCount: { + baseName: "total_filtered_count", + type: "number", + format: "int64", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateArrayMetaPage.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateAttributes.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateAttributes.ts new file mode 100644 index 000000000000..fd2ef007aa7d --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateAttributes.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"; + +/** + * The notification template's attributes. + */ +export class IncidentNotificationTemplateAttributes { + /** + * The category of the notification template. + */ + "category": string; + /** + * The content body of the notification template. + */ + "content": string; + /** + * Timestamp when the notification template was created. + */ + "created": Date; + /** + * Timestamp when the notification template was last modified. + */ + "modified": Date; + /** + * The name of the notification template. + */ + "name": string; + /** + * The subject line of the notification template. + */ + "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 = { + category: { + baseName: "category", + type: "string", + required: true, + }, + content: { + baseName: "content", + type: "string", + required: true, + }, + created: { + baseName: "created", + type: "Date", + required: true, + format: "date-time", + }, + modified: { + baseName: "modified", + type: "Date", + required: true, + format: "date-time", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + subject: { + baseName: "subject", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateCreateAttributes.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateCreateAttributes.ts new file mode 100644 index 000000000000..df33906bd29b --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateCreateAttributes.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"; + +/** + * The attributes for creating a notification template. + */ +export class IncidentNotificationTemplateCreateAttributes { + /** + * The category of the notification template. + */ + "category": string; + /** + * The content body of the notification template. + */ + "content": string; + /** + * The name of the notification template. + */ + "name": string; + /** + * The subject line of the notification template. + */ + "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 = { + category: { + baseName: "category", + type: "string", + required: true, + }, + content: { + baseName: "content", + type: "string", + required: true, + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + subject: { + baseName: "subject", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateCreateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateCreateData.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateCreateData.ts new file mode 100644 index 000000000000..62ceb4bd8d42 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateCreateData.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 { IncidentNotificationTemplateCreateAttributes } from "./IncidentNotificationTemplateCreateAttributes"; +import { IncidentNotificationTemplateCreateDataRelationships } from "./IncidentNotificationTemplateCreateDataRelationships"; +import { IncidentNotificationTemplateType } from "./IncidentNotificationTemplateType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Notification template data for a create request. + */ +export class IncidentNotificationTemplateCreateData { + /** + * The attributes for creating a notification template. + */ + "attributes": IncidentNotificationTemplateCreateAttributes; + /** + * The definition of `NotificationTemplateCreateDataRelationships` object. + */ + "relationships"?: IncidentNotificationTemplateCreateDataRelationships; + /** + * Notification templates resource type. + */ + "type": IncidentNotificationTemplateType; + + /** + * 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: "IncidentNotificationTemplateCreateAttributes", + required: true, + }, + relationships: { + baseName: "relationships", + type: "IncidentNotificationTemplateCreateDataRelationships", + }, + type: { + baseName: "type", + type: "IncidentNotificationTemplateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateCreateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateCreateDataRelationships.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateCreateDataRelationships.ts new file mode 100644 index 000000000000..2ee836ddccc4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateCreateDataRelationships.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 { RelationshipToIncidentType } from "./RelationshipToIncidentType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `NotificationTemplateCreateDataRelationships` object. + */ +export class IncidentNotificationTemplateCreateDataRelationships { + /** + * Relationship to an incident type. + */ + "incidentType"?: RelationshipToIncidentType; + + /** + * 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: "RelationshipToIncidentType", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateCreateDataRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateIncludedItems.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateIncludedItems.ts new file mode 100644 index 000000000000..cac66f16589e --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateIncludedItems.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 { IncidentTypeObject } from "./IncidentTypeObject"; +import { User } from "./User"; + +import { UnparsedObject } from "../../datadog-api-client-common/util"; + +/** + * Objects related to a notification template. + */ + +export type IncidentNotificationTemplateIncludedItems = + | User + | IncidentTypeObject + | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateRelationships.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateRelationships.ts new file mode 100644 index 000000000000..9c271728c0ea --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateRelationships.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 { RelationshipToIncidentType } from "./RelationshipToIncidentType"; +import { RelationshipToUser } from "./RelationshipToUser"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The notification template's resource relationships. + */ +export class IncidentNotificationTemplateRelationships { + /** + * Relationship to user. + */ + "createdByUser"?: RelationshipToUser; + /** + * Relationship to an incident type. + */ + "incidentType"?: RelationshipToIncidentType; + /** + * Relationship to user. + */ + "lastModifiedByUser"?: RelationshipToUser; + + /** + * 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: "RelationshipToUser", + }, + incidentType: { + baseName: "incident_type", + type: "RelationshipToIncidentType", + }, + lastModifiedByUser: { + baseName: "last_modified_by_user", + type: "RelationshipToUser", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateResponseData.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateResponseData.ts new file mode 100644 index 000000000000..0a3991dcde8a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateResponseData.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 { IncidentNotificationTemplateAttributes } from "./IncidentNotificationTemplateAttributes"; +import { IncidentNotificationTemplateRelationships } from "./IncidentNotificationTemplateRelationships"; +import { IncidentNotificationTemplateType } from "./IncidentNotificationTemplateType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Notification template data from a response. + */ +export class IncidentNotificationTemplateResponseData { + /** + * The notification template's attributes. + */ + "attributes"?: IncidentNotificationTemplateAttributes; + /** + * The unique identifier of the notification template. + */ + "id": string; + /** + * The notification template's resource relationships. + */ + "relationships"?: IncidentNotificationTemplateRelationships; + /** + * Notification templates resource type. + */ + "type": IncidentNotificationTemplateType; + + /** + * 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: "IncidentNotificationTemplateAttributes", + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + relationships: { + baseName: "relationships", + type: "IncidentNotificationTemplateRelationships", + }, + type: { + baseName: "type", + type: "IncidentNotificationTemplateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateResponseData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateType.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateType.ts new file mode 100644 index 000000000000..757675c78811 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateType.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"; + +/** + * Notification templates resource type. + */ + +export type IncidentNotificationTemplateType = + | typeof NOTIFICATION_TEMPLATES + | UnparsedObject; +export const NOTIFICATION_TEMPLATES = "notification_templates"; diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateUpdateAttributes.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateUpdateAttributes.ts new file mode 100644 index 000000000000..f6fc09bd51ec --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateUpdateAttributes.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"; + +/** + * The attributes to update on a notification template. + */ +export class IncidentNotificationTemplateUpdateAttributes { + /** + * The category of the notification template. + */ + "category"?: string; + /** + * The content body of the notification template. + */ + "content"?: string; + /** + * The name of the notification template. + */ + "name"?: string; + /** + * The subject line of the notification template. + */ + "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 = { + category: { + baseName: "category", + type: "string", + }, + content: { + baseName: "content", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + subject: { + baseName: "subject", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateUpdateAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentNotificationTemplateUpdateData.ts b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateUpdateData.ts new file mode 100644 index 000000000000..ef386acc2882 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentNotificationTemplateUpdateData.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 { IncidentNotificationTemplateType } from "./IncidentNotificationTemplateType"; +import { IncidentNotificationTemplateUpdateAttributes } from "./IncidentNotificationTemplateUpdateAttributes"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Notification template data for an update request. + */ +export class IncidentNotificationTemplateUpdateData { + /** + * The attributes to update on a notification template. + */ + "attributes"?: IncidentNotificationTemplateUpdateAttributes; + /** + * The unique identifier of the notification template. + */ + "id": string; + /** + * Notification templates resource type. + */ + "type": IncidentNotificationTemplateType; + + /** + * 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: "IncidentNotificationTemplateUpdateAttributes", + }, + id: { + baseName: "id", + type: "string", + required: true, + format: "uuid", + }, + type: { + baseName: "type", + type: "IncidentNotificationTemplateType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentNotificationTemplateUpdateData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentTypeObject.ts b/packages/datadog-api-client-v2/models/IncidentTypeObject.ts index 26742ce2516e..ad16256ca5e7 100644 --- a/packages/datadog-api-client-v2/models/IncidentTypeObject.ts +++ b/packages/datadog-api-client-v2/models/IncidentTypeObject.ts @@ -4,6 +4,7 @@ * Copyright 2020-Present Datadog, Inc. */ import { IncidentTypeAttributes } from "./IncidentTypeAttributes"; +import { IncidentTypeRelationships } from "./IncidentTypeRelationships"; import { IncidentTypeType } from "./IncidentTypeType"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -20,6 +21,10 @@ export class IncidentTypeObject { * The incident type's ID. */ "id": string; + /** + * The incident type's resource relationships. + */ + "relationships"?: IncidentTypeRelationships; /** * Incident type resource type. */ @@ -50,6 +55,10 @@ export class IncidentTypeObject { type: "string", required: true, }, + relationships: { + baseName: "relationships", + type: "IncidentTypeRelationships", + }, type: { baseName: "type", type: "IncidentTypeType", diff --git a/packages/datadog-api-client-v2/models/IncidentTypeRelationships.ts b/packages/datadog-api-client-v2/models/IncidentTypeRelationships.ts new file mode 100644 index 000000000000..201d7310c29a --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentTypeRelationships.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 { GoogleMeetConfigurationReference } from "./GoogleMeetConfigurationReference"; +import { MicrosoftTeamsConfigurationReference } from "./MicrosoftTeamsConfigurationReference"; +import { RelationshipToUser } from "./RelationshipToUser"; +import { ZoomConfigurationReference } from "./ZoomConfigurationReference"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The incident type's resource relationships. + */ +export class IncidentTypeRelationships { + /** + * Relationship to user. + */ + "createdByUser"?: RelationshipToUser; + /** + * A reference to a Google Meet Configuration resource. + */ + "googleMeetConfiguration"?: GoogleMeetConfigurationReference; + /** + * Relationship to user. + */ + "lastModifiedByUser"?: RelationshipToUser; + /** + * A reference to a Microsoft Teams Configuration resource. + */ + "microsoftTeamsConfiguration"?: MicrosoftTeamsConfigurationReference; + /** + * A reference to a Zoom configuration resource. + */ + "zoomConfiguration"?: ZoomConfigurationReference; + + /** + * 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: "RelationshipToUser", + }, + googleMeetConfiguration: { + baseName: "google_meet_configuration", + type: "GoogleMeetConfigurationReference", + }, + lastModifiedByUser: { + baseName: "last_modified_by_user", + type: "RelationshipToUser", + }, + microsoftTeamsConfiguration: { + baseName: "microsoft_teams_configuration", + type: "MicrosoftTeamsConfigurationReference", + }, + zoomConfiguration: { + baseName: "zoom_configuration", + type: "ZoomConfigurationReference", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentTypeRelationships.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsConfigurationReference.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsConfigurationReference.ts new file mode 100644 index 000000000000..dfb1a3147466 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsConfigurationReference.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 { MicrosoftTeamsConfigurationReferenceData } from "./MicrosoftTeamsConfigurationReferenceData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A reference to a Microsoft Teams Configuration resource. + */ +export class MicrosoftTeamsConfigurationReference { + /** + * The Microsoft Teams configuration relationship data object. + */ + "data": MicrosoftTeamsConfigurationReferenceData | null; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "MicrosoftTeamsConfigurationReferenceData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsConfigurationReference.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/MicrosoftTeamsConfigurationReferenceData.ts b/packages/datadog-api-client-v2/models/MicrosoftTeamsConfigurationReferenceData.ts new file mode 100644 index 000000000000..1d5e64fcfdb4 --- /dev/null +++ b/packages/datadog-api-client-v2/models/MicrosoftTeamsConfigurationReferenceData.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"; + +/** + * The Microsoft Teams configuration relationship data object. + */ +export class MicrosoftTeamsConfigurationReferenceData { + /** + * The unique identifier of the Microsoft Teams configuration. + */ + "id": string; + /** + * The type of the Microsoft Teams configuration. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return MicrosoftTeamsConfigurationReferenceData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 2dbc4c74be43..b9874fcdd9ce 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -445,6 +445,7 @@ import { CreateDataDeletionRequestBody } from "./CreateDataDeletionRequestBody"; import { CreateDataDeletionRequestBodyAttributes } from "./CreateDataDeletionRequestBodyAttributes"; import { CreateDataDeletionRequestBodyData } from "./CreateDataDeletionRequestBodyData"; import { CreateDataDeletionResponseBody } from "./CreateDataDeletionResponseBody"; +import { CreateIncidentNotificationTemplateRequest } from "./CreateIncidentNotificationTemplateRequest"; import { CreateNotificationRuleParameters } from "./CreateNotificationRuleParameters"; import { CreateNotificationRuleParametersData } from "./CreateNotificationRuleParametersData"; import { CreateNotificationRuleParametersDataAttributes } from "./CreateNotificationRuleParametersDataAttributes"; @@ -830,6 +831,8 @@ import { GitlabAPIKey } from "./GitlabAPIKey"; import { GitlabAPIKeyUpdate } from "./GitlabAPIKeyUpdate"; import { GitlabIntegration } from "./GitlabIntegration"; import { GitlabIntegrationUpdate } from "./GitlabIntegrationUpdate"; +import { GoogleMeetConfigurationReference } from "./GoogleMeetConfigurationReference"; +import { GoogleMeetConfigurationReferenceData } from "./GoogleMeetConfigurationReferenceData"; import { GreyNoiseAPIKey } from "./GreyNoiseAPIKey"; import { GreyNoiseAPIKeyUpdate } from "./GreyNoiseAPIKeyUpdate"; import { GreyNoiseIntegration } from "./GreyNoiseIntegration"; @@ -895,6 +898,18 @@ import { IncidentIntegrationMetadataResponseData } from "./IncidentIntegrationMe import { IncidentIntegrationRelationships } from "./IncidentIntegrationRelationships"; import { IncidentNonDatadogCreator } from "./IncidentNonDatadogCreator"; import { IncidentNotificationHandle } from "./IncidentNotificationHandle"; +import { IncidentNotificationTemplate } from "./IncidentNotificationTemplate"; +import { IncidentNotificationTemplateArray } from "./IncidentNotificationTemplateArray"; +import { IncidentNotificationTemplateArrayMeta } from "./IncidentNotificationTemplateArrayMeta"; +import { IncidentNotificationTemplateArrayMetaPage } from "./IncidentNotificationTemplateArrayMetaPage"; +import { IncidentNotificationTemplateAttributes } from "./IncidentNotificationTemplateAttributes"; +import { IncidentNotificationTemplateCreateAttributes } from "./IncidentNotificationTemplateCreateAttributes"; +import { IncidentNotificationTemplateCreateData } from "./IncidentNotificationTemplateCreateData"; +import { IncidentNotificationTemplateCreateDataRelationships } from "./IncidentNotificationTemplateCreateDataRelationships"; +import { IncidentNotificationTemplateRelationships } from "./IncidentNotificationTemplateRelationships"; +import { IncidentNotificationTemplateResponseData } from "./IncidentNotificationTemplateResponseData"; +import { IncidentNotificationTemplateUpdateAttributes } from "./IncidentNotificationTemplateUpdateAttributes"; +import { IncidentNotificationTemplateUpdateData } from "./IncidentNotificationTemplateUpdateData"; import { IncidentResponse } from "./IncidentResponse"; import { IncidentResponseAttributes } from "./IncidentResponseAttributes"; import { IncidentResponseData } from "./IncidentResponseData"; @@ -955,6 +970,7 @@ import { IncidentTypeListResponse } from "./IncidentTypeListResponse"; import { IncidentTypeObject } from "./IncidentTypeObject"; import { IncidentTypePatchData } from "./IncidentTypePatchData"; import { IncidentTypePatchRequest } from "./IncidentTypePatchRequest"; +import { IncidentTypeRelationships } from "./IncidentTypeRelationships"; import { IncidentTypeResponse } from "./IncidentTypeResponse"; import { IncidentTypeUpdateAttributes } from "./IncidentTypeUpdateAttributes"; import { IncidentUpdateAttributes } from "./IncidentUpdateAttributes"; @@ -1200,6 +1216,8 @@ import { MetricsTimeseriesQuery } from "./MetricsTimeseriesQuery"; import { MicrosoftSentinelDestination } from "./MicrosoftSentinelDestination"; import { MicrosoftTeamsChannelInfoResponseAttributes } from "./MicrosoftTeamsChannelInfoResponseAttributes"; import { MicrosoftTeamsChannelInfoResponseData } from "./MicrosoftTeamsChannelInfoResponseData"; +import { MicrosoftTeamsConfigurationReference } from "./MicrosoftTeamsConfigurationReference"; +import { MicrosoftTeamsConfigurationReferenceData } from "./MicrosoftTeamsConfigurationReferenceData"; import { MicrosoftTeamsCreateTenantBasedHandleRequest } from "./MicrosoftTeamsCreateTenantBasedHandleRequest"; import { MicrosoftTeamsCreateWorkflowsWebhookHandleRequest } from "./MicrosoftTeamsCreateWorkflowsWebhookHandleRequest"; import { MicrosoftTeamsGetChannelByNameResponse } from "./MicrosoftTeamsGetChannelByNameResponse"; @@ -1471,6 +1489,7 @@ import { PartialAPIKeyAttributes } from "./PartialAPIKeyAttributes"; import { PartialApplicationKey } from "./PartialApplicationKey"; import { PartialApplicationKeyAttributes } from "./PartialApplicationKeyAttributes"; import { PartialApplicationKeyResponse } from "./PartialApplicationKeyResponse"; +import { PatchIncidentNotificationTemplateRequest } from "./PatchIncidentNotificationTemplateRequest"; import { PatchNotificationRuleParameters } from "./PatchNotificationRuleParameters"; import { PatchNotificationRuleParametersData } from "./PatchNotificationRuleParametersData"; import { PatchNotificationRuleParametersDataAttributes } from "./PatchNotificationRuleParametersDataAttributes"; @@ -1569,6 +1588,8 @@ import { RelationshipToIncidentPostmortem } from "./RelationshipToIncidentPostmo import { RelationshipToIncidentPostmortemData } from "./RelationshipToIncidentPostmortemData"; import { RelationshipToIncidentResponderData } from "./RelationshipToIncidentResponderData"; import { RelationshipToIncidentResponders } from "./RelationshipToIncidentResponders"; +import { RelationshipToIncidentType } from "./RelationshipToIncidentType"; +import { RelationshipToIncidentTypeData } from "./RelationshipToIncidentTypeData"; import { RelationshipToIncidentUserDefinedFieldData } from "./RelationshipToIncidentUserDefinedFieldData"; import { RelationshipToIncidentUserDefinedFields } from "./RelationshipToIncidentUserDefinedFields"; import { RelationshipToOrganization } from "./RelationshipToOrganization"; @@ -2176,6 +2197,8 @@ import { WorklflowGetInstanceResponseData } from "./WorklflowGetInstanceResponse import { WorklflowGetInstanceResponseDataAttributes } from "./WorklflowGetInstanceResponseDataAttributes"; import { XRayServicesIncludeAll } from "./XRayServicesIncludeAll"; import { XRayServicesIncludeOnly } from "./XRayServicesIncludeOnly"; +import { ZoomConfigurationReference } from "./ZoomConfigurationReference"; +import { ZoomConfigurationReferenceData } from "./ZoomConfigurationReferenceData"; import { dateFromRFC3339String, dateToRFC3339String, @@ -2695,6 +2718,7 @@ const enumsMap: { [key: string]: any[] } = { ], IncidentImpactsType: ["incident_impacts"], IncidentIntegrationMetadataType: ["incident_integrations"], + IncidentNotificationTemplateType: ["notification_templates"], IncidentPostmortemType: ["incident_postmortems"], IncidentRelatedObject: ["users", "attachments"], IncidentRespondersType: ["incident_responders"], @@ -4176,6 +4200,8 @@ const typeMap: { [index: string]: any } = { CreateDataDeletionRequestBodyAttributes, CreateDataDeletionRequestBodyData: CreateDataDeletionRequestBodyData, CreateDataDeletionResponseBody: CreateDataDeletionResponseBody, + CreateIncidentNotificationTemplateRequest: + CreateIncidentNotificationTemplateRequest, CreateNotificationRuleParameters: CreateNotificationRuleParameters, CreateNotificationRuleParametersData: CreateNotificationRuleParametersData, CreateNotificationRuleParametersDataAttributes: @@ -4613,6 +4639,8 @@ const typeMap: { [index: string]: any } = { GitlabAPIKeyUpdate: GitlabAPIKeyUpdate, GitlabIntegration: GitlabIntegration, GitlabIntegrationUpdate: GitlabIntegrationUpdate, + GoogleMeetConfigurationReference: GoogleMeetConfigurationReference, + GoogleMeetConfigurationReferenceData: GoogleMeetConfigurationReferenceData, GreyNoiseAPIKey: GreyNoiseAPIKey, GreyNoiseAPIKeyUpdate: GreyNoiseAPIKeyUpdate, GreyNoiseIntegration: GreyNoiseIntegration, @@ -4685,6 +4713,27 @@ const typeMap: { [index: string]: any } = { IncidentIntegrationRelationships: IncidentIntegrationRelationships, IncidentNonDatadogCreator: IncidentNonDatadogCreator, IncidentNotificationHandle: IncidentNotificationHandle, + IncidentNotificationTemplate: IncidentNotificationTemplate, + IncidentNotificationTemplateArray: IncidentNotificationTemplateArray, + IncidentNotificationTemplateArrayMeta: IncidentNotificationTemplateArrayMeta, + IncidentNotificationTemplateArrayMetaPage: + IncidentNotificationTemplateArrayMetaPage, + IncidentNotificationTemplateAttributes: + IncidentNotificationTemplateAttributes, + IncidentNotificationTemplateCreateAttributes: + IncidentNotificationTemplateCreateAttributes, + IncidentNotificationTemplateCreateData: + IncidentNotificationTemplateCreateData, + IncidentNotificationTemplateCreateDataRelationships: + IncidentNotificationTemplateCreateDataRelationships, + IncidentNotificationTemplateRelationships: + IncidentNotificationTemplateRelationships, + IncidentNotificationTemplateResponseData: + IncidentNotificationTemplateResponseData, + IncidentNotificationTemplateUpdateAttributes: + IncidentNotificationTemplateUpdateAttributes, + IncidentNotificationTemplateUpdateData: + IncidentNotificationTemplateUpdateData, IncidentResponse: IncidentResponse, IncidentResponseAttributes: IncidentResponseAttributes, IncidentResponseData: IncidentResponseData, @@ -4750,6 +4799,7 @@ const typeMap: { [index: string]: any } = { IncidentTypeObject: IncidentTypeObject, IncidentTypePatchData: IncidentTypePatchData, IncidentTypePatchRequest: IncidentTypePatchRequest, + IncidentTypeRelationships: IncidentTypeRelationships, IncidentTypeResponse: IncidentTypeResponse, IncidentTypeUpdateAttributes: IncidentTypeUpdateAttributes, IncidentUpdateAttributes: IncidentUpdateAttributes, @@ -5002,6 +5052,9 @@ const typeMap: { [index: string]: any } = { MicrosoftTeamsChannelInfoResponseAttributes: MicrosoftTeamsChannelInfoResponseAttributes, MicrosoftTeamsChannelInfoResponseData: MicrosoftTeamsChannelInfoResponseData, + MicrosoftTeamsConfigurationReference: MicrosoftTeamsConfigurationReference, + MicrosoftTeamsConfigurationReferenceData: + MicrosoftTeamsConfigurationReferenceData, MicrosoftTeamsCreateTenantBasedHandleRequest: MicrosoftTeamsCreateTenantBasedHandleRequest, MicrosoftTeamsCreateWorkflowsWebhookHandleRequest: @@ -5382,6 +5435,8 @@ const typeMap: { [index: string]: any } = { PartialApplicationKey: PartialApplicationKey, PartialApplicationKeyAttributes: PartialApplicationKeyAttributes, PartialApplicationKeyResponse: PartialApplicationKeyResponse, + PatchIncidentNotificationTemplateRequest: + PatchIncidentNotificationTemplateRequest, PatchNotificationRuleParameters: PatchNotificationRuleParameters, PatchNotificationRuleParametersData: PatchNotificationRuleParametersData, PatchNotificationRuleParametersDataAttributes: @@ -5484,6 +5539,8 @@ const typeMap: { [index: string]: any } = { RelationshipToIncidentPostmortemData: RelationshipToIncidentPostmortemData, RelationshipToIncidentResponderData: RelationshipToIncidentResponderData, RelationshipToIncidentResponders: RelationshipToIncidentResponders, + RelationshipToIncidentType: RelationshipToIncidentType, + RelationshipToIncidentTypeData: RelationshipToIncidentTypeData, RelationshipToIncidentUserDefinedFieldData: RelationshipToIncidentUserDefinedFieldData, RelationshipToIncidentUserDefinedFields: @@ -6173,6 +6230,8 @@ const typeMap: { [index: string]: any } = { WorklflowGetInstanceResponseDataAttributes, XRayServicesIncludeAll: XRayServicesIncludeAll, XRayServicesIncludeOnly: XRayServicesIncludeOnly, + ZoomConfigurationReference: ZoomConfigurationReference, + ZoomConfigurationReferenceData: ZoomConfigurationReferenceData, }; const oneOfMap: { [index: string]: string[] } = { @@ -6389,6 +6448,7 @@ const oneOfMap: { [index: string]: string[] } = { "MSTeamsIntegrationMetadata", ], IncidentIntegrationMetadataResponseIncludedItem: ["User"], + IncidentNotificationTemplateIncludedItems: ["User", "IncidentTypeObject"], IncidentResponseIncludedItem: ["IncidentUserData", "IncidentAttachmentData"], IncidentServiceIncludedItems: ["User"], IncidentTeamIncludedItems: ["User"], diff --git a/packages/datadog-api-client-v2/models/PatchIncidentNotificationTemplateRequest.ts b/packages/datadog-api-client-v2/models/PatchIncidentNotificationTemplateRequest.ts new file mode 100644 index 000000000000..d5bb9ace22af --- /dev/null +++ b/packages/datadog-api-client-v2/models/PatchIncidentNotificationTemplateRequest.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 { IncidentNotificationTemplateUpdateData } from "./IncidentNotificationTemplateUpdateData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Update request for a notification template. + */ +export class PatchIncidentNotificationTemplateRequest { + /** + * Notification template data for an update request. + */ + "data": IncidentNotificationTemplateUpdateData; + + /** + * 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: "IncidentNotificationTemplateUpdateData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return PatchIncidentNotificationTemplateRequest.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RelationshipToIncidentType.ts b/packages/datadog-api-client-v2/models/RelationshipToIncidentType.ts new file mode 100644 index 000000000000..0d44b6e46b81 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RelationshipToIncidentType.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 { RelationshipToIncidentTypeData } from "./RelationshipToIncidentTypeData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to an incident type. + */ +export class RelationshipToIncidentType { + /** + * Relationship to incident type object. + */ + "data": RelationshipToIncidentTypeData; + + /** + * 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: "RelationshipToIncidentTypeData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RelationshipToIncidentType.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/RelationshipToIncidentTypeData.ts b/packages/datadog-api-client-v2/models/RelationshipToIncidentTypeData.ts new file mode 100644 index 000000000000..633a7b8d5a48 --- /dev/null +++ b/packages/datadog-api-client-v2/models/RelationshipToIncidentTypeData.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 { IncidentTypeType } from "./IncidentTypeType"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Relationship to incident type object. + */ +export class RelationshipToIncidentTypeData { + /** + * The incident type's ID. + */ + "id": string; + /** + * Incident type resource type. + */ + "type": IncidentTypeType; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "IncidentTypeType", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return RelationshipToIncidentTypeData.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ZoomConfigurationReference.ts b/packages/datadog-api-client-v2/models/ZoomConfigurationReference.ts new file mode 100644 index 000000000000..b650a7d1ab08 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ZoomConfigurationReference.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 { ZoomConfigurationReferenceData } from "./ZoomConfigurationReferenceData"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A reference to a Zoom configuration resource. + */ +export class ZoomConfigurationReference { + /** + * The Zoom configuration relationship data object. + */ + "data": ZoomConfigurationReferenceData | null; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + data: { + baseName: "data", + type: "ZoomConfigurationReferenceData", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ZoomConfigurationReference.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ZoomConfigurationReferenceData.ts b/packages/datadog-api-client-v2/models/ZoomConfigurationReferenceData.ts new file mode 100644 index 000000000000..68b15dc24804 --- /dev/null +++ b/packages/datadog-api-client-v2/models/ZoomConfigurationReferenceData.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"; + +/** + * The Zoom configuration relationship data object. + */ +export class ZoomConfigurationReferenceData { + /** + * The unique identifier of the Zoom configuration. + */ + "id": string; + /** + * The type of the Zoom configuration. + */ + "type": string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + id: { + baseName: "id", + type: "string", + required: true, + }, + type: { + baseName: "type", + type: "string", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return ZoomConfigurationReferenceData.attributeTypeMap; + } + + public constructor() {} +}