Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand Down
3 changes: 3 additions & 0 deletions services/workflow_automation/src/v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export { ErrorHandler } from "./models/ErrorHandler";
export { GetWorkflowResponse } from "./models/GetWorkflowResponse";
export { GithubWebhookTrigger } from "./models/GithubWebhookTrigger";
export { GithubWebhookTriggerWrapper } from "./models/GithubWebhookTriggerWrapper";
export { IncidentCondition } from "./models/IncidentCondition";
export { IncidentScheduleTrigger } from "./models/IncidentScheduleTrigger";
export { IncidentScheduleTriggerWrapper } from "./models/IncidentScheduleTriggerWrapper";
export { IncidentTrigger } from "./models/IncidentTrigger";
export { IncidentTriggerWrapper } from "./models/IncidentTriggerWrapper";
export { InputSchema } from "./models/InputSchema";
Expand Down
45 changes: 45 additions & 0 deletions services/workflow_automation/src/v2/models/IncidentCondition.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { AttributeTypeMap } from "@datadog/datadog-api-client";

/**
* A condition evaluated against incident tags.
*/
export class IncidentCondition {
/**
* Tags that must match for the condition to pass.
*/
"tags": Array<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 = {
tags: {
baseName: "tags",
type: "Array<string>",
required: true,
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return IncidentCondition.attributeTypeMap;
}

public constructor() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { AttributeTypeMap } from "@datadog/datadog-api-client";

import { IncidentCondition } from "./IncidentCondition";

/**
* 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() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { AttributeTypeMap } from "@datadog/datadog-api-client";

import { IncidentScheduleTrigger } from "./IncidentScheduleTrigger";

/**
* 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<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 = {
incidentScheduleTrigger: {
baseName: "incidentScheduleTrigger",
type: "IncidentScheduleTrigger",
required: true,
},
startStepNames: {
baseName: "startStepNames",
type: "Array<string>",
},
additionalProperties: {
baseName: "additionalProperties",
type: "{ [key: string]: any; }",
},
};

/**
* @ignore
*/
static getAttributeTypeMap(): AttributeTypeMap {
return IncidentScheduleTriggerWrapper.attributeTypeMap;
}

public constructor() {}
}
2 changes: 2 additions & 0 deletions services/workflow_automation/src/v2/models/Trigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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";
Expand All @@ -32,6 +33,7 @@ export type Trigger =
| DashboardTriggerWrapper
| GithubWebhookTriggerWrapper
| IncidentTriggerWrapper
| IncidentScheduleTriggerWrapper
| MonitorTriggerWrapper
| NotebookTriggerWrapper
| OnCallTriggerWrapper
Expand Down
7 changes: 7 additions & 0 deletions services/workflow_automation/src/v2/models/TypingInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ import { ErrorHandler } from "./ErrorHandler";
import { GetWorkflowResponse } from "./GetWorkflowResponse";
import { GithubWebhookTrigger } from "./GithubWebhookTrigger";
import { GithubWebhookTriggerWrapper } from "./GithubWebhookTriggerWrapper";
import { IncidentCondition } from "./IncidentCondition";
import { IncidentScheduleTrigger } from "./IncidentScheduleTrigger";
import { IncidentScheduleTriggerWrapper } from "./IncidentScheduleTriggerWrapper";
import { IncidentTrigger } from "./IncidentTrigger";
import { IncidentTriggerWrapper } from "./IncidentTriggerWrapper";
import { InputSchema } from "./InputSchema";
Expand Down Expand Up @@ -134,6 +137,7 @@ export const TypingInfo: ModelTypingInfo = {
"DashboardTriggerWrapper",
"GithubWebhookTriggerWrapper",
"IncidentTriggerWrapper",
"IncidentScheduleTriggerWrapper",
"MonitorTriggerWrapper",
"NotebookTriggerWrapper",
"OnCallTriggerWrapper",
Expand Down Expand Up @@ -172,6 +176,9 @@ export const TypingInfo: ModelTypingInfo = {
GetWorkflowResponse: GetWorkflowResponse,
GithubWebhookTrigger: GithubWebhookTrigger,
GithubWebhookTriggerWrapper: GithubWebhookTriggerWrapper,
IncidentCondition: IncidentCondition,
IncidentScheduleTrigger: IncidentScheduleTrigger,
IncidentScheduleTriggerWrapper: IncidentScheduleTriggerWrapper,
IncidentTrigger: IncidentTrigger,
IncidentTriggerWrapper: IncidentTriggerWrapper,
InputSchema: InputSchema,
Expand Down
Loading