diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a484bec1a76a..b380cb714686 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -28684,6 +28684,19 @@ components: type: string x-enum-varnames: - INCIDENT_ATTACHMENTS + IncidentCondition: + description: A condition evaluated against incident tags. + properties: + tags: + description: Tags that must match for the condition to pass. + example: + - '' + items: + type: string + type: array + required: + - tags + type: object IncidentCreateAttributes: description: The incident's attributes for a create request. properties: @@ -30203,6 +30216,32 @@ components: user_defined_fields: $ref: '#/components/schemas/RelationshipToIncidentUserDefinedFields' type: object + IncidentScheduleTrigger: + description: Trigger a workflow from an Incident Schedule. The workflow must + be published. + properties: + incidentType: + description: Incident type filter for the schedule. + type: string + rrule: + description: Recurrence rule expression for scheduling. + example: '' + type: string + tagCondition: + $ref: '#/components/schemas/IncidentCondition' + required: + - rrule + type: object + IncidentScheduleTriggerWrapper: + description: Schema for an Incident Schedule-based trigger. + properties: + incidentScheduleTrigger: + $ref: '#/components/schemas/IncidentScheduleTrigger' + startStepNames: + $ref: '#/components/schemas/StartStepNames' + required: + - incidentScheduleTrigger + type: object IncidentSearchResponse: description: Response with incidents and facets. properties: @@ -65465,6 +65504,7 @@ components: - $ref: '#/components/schemas/DashboardTriggerWrapper' - $ref: '#/components/schemas/GithubWebhookTriggerWrapper' - $ref: '#/components/schemas/IncidentTriggerWrapper' + - $ref: '#/components/schemas/IncidentScheduleTriggerWrapper' - $ref: '#/components/schemas/MonitorTriggerWrapper' - $ref: '#/components/schemas/NotebookTriggerWrapper' - $ref: '#/components/schemas/OnCallTriggerWrapper' diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 7f5a54da9324..d439a92b43ea 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -2879,6 +2879,7 @@ export { HTTPTokenAuthType } from "./models/HTTPTokenAuthType"; export { HTTPTokenAuthUpdate } from "./models/HTTPTokenAuthUpdate"; export { HTTPTokenUpdate } from "./models/HTTPTokenUpdate"; export { IncidentAttachmentType } from "./models/IncidentAttachmentType"; +export { IncidentCondition } from "./models/IncidentCondition"; export { IncidentCreateAttributes } from "./models/IncidentCreateAttributes"; export { IncidentCreateData } from "./models/IncidentCreateData"; export { IncidentCreateRelationships } from "./models/IncidentCreateRelationships"; @@ -2970,6 +2971,8 @@ export { IncidentResponseIncludedItem } from "./models/IncidentResponseIncludedI export { IncidentResponseMeta } from "./models/IncidentResponseMeta"; export { IncidentResponseMetaPagination } from "./models/IncidentResponseMetaPagination"; export { IncidentResponseRelationships } from "./models/IncidentResponseRelationships"; +export { IncidentScheduleTrigger } from "./models/IncidentScheduleTrigger"; +export { IncidentScheduleTriggerWrapper } from "./models/IncidentScheduleTriggerWrapper"; export { IncidentSearchResponse } from "./models/IncidentSearchResponse"; export { IncidentSearchResponseAttributes } from "./models/IncidentSearchResponseAttributes"; export { IncidentSearchResponseData } from "./models/IncidentSearchResponseData"; diff --git a/packages/datadog-api-client-v2/models/IncidentCondition.ts b/packages/datadog-api-client-v2/models/IncidentCondition.ts new file mode 100644 index 000000000000..6d7a39a45901 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentCondition.ts @@ -0,0 +1,53 @@ +/** + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * A condition evaluated against incident tags. + */ +export class IncidentCondition { + /** + * Tags that must match for the condition to pass. + */ + "tags": 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 = { + tags: { + baseName: "tags", + type: "Array", + required: true, + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentCondition.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentScheduleTrigger.ts b/packages/datadog-api-client-v2/models/IncidentScheduleTrigger.ts new file mode 100644 index 000000000000..e2de97ffddf9 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentScheduleTrigger.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 { IncidentCondition } from "./IncidentCondition"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Trigger a workflow from an Incident Schedule. The workflow must be published. + */ +export class IncidentScheduleTrigger { + /** + * Incident type filter for the schedule. + */ + "incidentType"?: string; + /** + * Recurrence rule expression for scheduling. + */ + "rrule": string; + /** + * A condition evaluated against incident tags. + */ + "tagCondition"?: IncidentCondition; + + /** + * 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: "incidentType", + type: "string", + }, + rrule: { + baseName: "rrule", + type: "string", + required: true, + }, + tagCondition: { + baseName: "tagCondition", + type: "IncidentCondition", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentScheduleTrigger.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/IncidentScheduleTriggerWrapper.ts b/packages/datadog-api-client-v2/models/IncidentScheduleTriggerWrapper.ts new file mode 100644 index 000000000000..a0aa5d0b6188 --- /dev/null +++ b/packages/datadog-api-client-v2/models/IncidentScheduleTriggerWrapper.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 { IncidentScheduleTrigger } from "./IncidentScheduleTrigger"; + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * Schema for an Incident Schedule-based trigger. + */ +export class IncidentScheduleTriggerWrapper { + /** + * Trigger a workflow from an Incident Schedule. The workflow must be published. + */ + "incidentScheduleTrigger": IncidentScheduleTrigger; + /** + * A list of steps that run first after a trigger fires. + */ + "startStepNames"?: 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 = { + incidentScheduleTrigger: { + baseName: "incidentScheduleTrigger", + type: "IncidentScheduleTrigger", + required: true, + }, + startStepNames: { + baseName: "startStepNames", + type: "Array", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "{ [key: string]: any; }", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return IncidentScheduleTriggerWrapper.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 4fe7db3842a5..bdd8b43d6e6a 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -1332,6 +1332,7 @@ import { IPAllowlistEntryAttributes } from "./IPAllowlistEntryAttributes"; import { IPAllowlistEntryData } from "./IPAllowlistEntryData"; import { IPAllowlistResponse } from "./IPAllowlistResponse"; import { IPAllowlistUpdateRequest } from "./IPAllowlistUpdateRequest"; +import { IncidentCondition } from "./IncidentCondition"; import { IncidentCreateAttributes } from "./IncidentCreateAttributes"; import { IncidentCreateData } from "./IncidentCreateData"; import { IncidentCreateRelationships } from "./IncidentCreateRelationships"; @@ -1401,6 +1402,8 @@ import { IncidentResponseData } from "./IncidentResponseData"; import { IncidentResponseMeta } from "./IncidentResponseMeta"; import { IncidentResponseMetaPagination } from "./IncidentResponseMetaPagination"; import { IncidentResponseRelationships } from "./IncidentResponseRelationships"; +import { IncidentScheduleTrigger } from "./IncidentScheduleTrigger"; +import { IncidentScheduleTriggerWrapper } from "./IncidentScheduleTriggerWrapper"; import { IncidentSearchResponse } from "./IncidentSearchResponse"; import { IncidentSearchResponseAttributes } from "./IncidentSearchResponseAttributes"; import { IncidentSearchResponseData } from "./IncidentSearchResponseData"; @@ -6795,6 +6798,7 @@ const typeMap: { [index: string]: any } = { IPAllowlistEntryData: IPAllowlistEntryData, IPAllowlistResponse: IPAllowlistResponse, IPAllowlistUpdateRequest: IPAllowlistUpdateRequest, + IncidentCondition: IncidentCondition, IncidentCreateAttributes: IncidentCreateAttributes, IncidentCreateData: IncidentCreateData, IncidentCreateRelationships: IncidentCreateRelationships, @@ -6880,6 +6884,8 @@ const typeMap: { [index: string]: any } = { IncidentResponseMeta: IncidentResponseMeta, IncidentResponseMetaPagination: IncidentResponseMetaPagination, IncidentResponseRelationships: IncidentResponseRelationships, + IncidentScheduleTrigger: IncidentScheduleTrigger, + IncidentScheduleTriggerWrapper: IncidentScheduleTriggerWrapper, IncidentSearchResponse: IncidentSearchResponse, IncidentSearchResponseAttributes: IncidentSearchResponseAttributes, IncidentSearchResponseData: IncidentSearchResponseData, @@ -9682,6 +9688,7 @@ const oneOfMap: { [index: string]: string[] } = { "DashboardTriggerWrapper", "GithubWebhookTriggerWrapper", "IncidentTriggerWrapper", + "IncidentScheduleTriggerWrapper", "MonitorTriggerWrapper", "NotebookTriggerWrapper", "OnCallTriggerWrapper", diff --git a/packages/datadog-api-client-v2/models/Trigger.ts b/packages/datadog-api-client-v2/models/Trigger.ts index 2cd861cf6553..0e2d87725b34 100644 --- a/packages/datadog-api-client-v2/models/Trigger.ts +++ b/packages/datadog-api-client-v2/models/Trigger.ts @@ -11,6 +11,7 @@ import { DashboardTriggerWrapper } from "./DashboardTriggerWrapper"; import { DatabaseMonitoringTriggerWrapper } from "./DatabaseMonitoringTriggerWrapper"; import { DatastoreTriggerWrapper } from "./DatastoreTriggerWrapper"; import { GithubWebhookTriggerWrapper } from "./GithubWebhookTriggerWrapper"; +import { IncidentScheduleTriggerWrapper } from "./IncidentScheduleTriggerWrapper"; import { IncidentTriggerWrapper } from "./IncidentTriggerWrapper"; import { MonitorTriggerWrapper } from "./MonitorTriggerWrapper"; import { NotebookTriggerWrapper } from "./NotebookTriggerWrapper"; @@ -38,6 +39,7 @@ export type Trigger = | DashboardTriggerWrapper | GithubWebhookTriggerWrapper | IncidentTriggerWrapper + | IncidentScheduleTriggerWrapper | MonitorTriggerWrapper | NotebookTriggerWrapper | OnCallTriggerWrapper