Skip to content
Merged
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
72 changes: 36 additions & 36 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11907,22 +11907,22 @@ components:
description: Configuration for the action to execute, dependent on the action type.
properties:
agent_type:
description: The type of AI agent to assign. Required when the action type is `assign_agent`.
description: The type of AI agent to assign. Required when the action type is `ASSIGN_AGENT`.
type: string
assigned_agent_id:
description: The identifier of the AI agent to assign to the case. Required when the action type is `assign_agent`.
description: The identifier of the AI agent to assign to the case. Required when the action type is `ASSIGN_AGENT`.
type: string
handle:
description: The handle of the Datadog workflow to execute. Required when the action type is `execute_workflow`.
description: The handle of the Datadog workflow to execute. Required when the action type is `EXECUTE_WORKFLOW`.
example: "workflow-handle-123"
type: string
type: object
AutomationRuleActionType:
description: The type of automated action to perform when the rule triggers. `execute_workflow` runs a Datadog workflow; `assign_agent` assigns an AI agent to the case.
description: The type of automated action to perform when the rule triggers. `EXECUTE_WORKFLOW` runs a Datadog workflow; `ASSIGN_AGENT` assigns an AI agent to the case.
enum:
- execute_workflow
- assign_agent
example: execute_workflow
- EXECUTE_WORKFLOW
- ASSIGN_AGENT
example: EXECUTE_WORKFLOW
type: string
x-enum-varnames:
- EXECUTE_WORKFLOW
Expand Down Expand Up @@ -12081,34 +12081,34 @@ components:
- type
type: object
AutomationRuleTriggerData:
description: Additional configuration for the trigger, dependent on the trigger type. For `status_transitioned` triggers, specify `from_status_name` and `to_status_name`. For `attribute_value_changed` triggers, specify `field` and `change_type`.
description: Additional configuration for the trigger, dependent on the trigger type. For `STATUS_TRANSITIONED` triggers, specify `from_status_name` and `to_status_name`. For `ATTRIBUTE_VALUE_CHANGED` triggers, specify `field` and `change_type`.
properties:
approval_type:
description: The approval outcome to match. Used with `case_review_approved` triggers.
description: The approval outcome to match. Used with `CASE_REVIEW_APPROVED` triggers.
type: string
change_type:
description: "The kind of attribute change to match. Allowed values: `VALUE_ADDED`, `VALUE_DELETED`, `ANY_CHANGES`. Used with `attribute_value_changed` triggers."
description: "The kind of attribute change to match. Allowed values: `VALUE_ADDED`, `VALUE_DELETED`, `ANY_CHANGES`. Used with `ATTRIBUTE_VALUE_CHANGED` triggers."
type: string
field:
description: The case attribute field name to monitor for changes. Used with `attribute_value_changed` triggers.
description: The case attribute field name to monitor for changes. Used with `ATTRIBUTE_VALUE_CHANGED` triggers.
type: string
from_status_name:
description: The originating status name. Used with `status_transitioned` triggers to match transitions from this status.
description: The originating status name. Used with `STATUS_TRANSITIONED` triggers to match transitions from this status.
type: string
to_status_name:
description: The destination status name. Used with `status_transitioned` triggers to match transitions to this status.
description: The destination status name. Used with `STATUS_TRANSITIONED` triggers to match transitions to this status.
type: string
type: object
AutomationRuleTriggerType:
description: The case event that activates the automation rule.
enum:
- case_created
- status_transitioned
- attribute_value_changed
- event_correlation_signal_correlated
- case_review_approved
- comment_added
example: case_created
- CASE_CREATED
- STATUS_TRANSITIONED
- ATTRIBUTE_VALUE_CHANGED
- EVENT_CORRELATION_SIGNAL_CORRELATED
- CASE_REVIEW_APPROVED
- COMMENT_ADDED
example: CASE_CREATED
type: string
x-enum-varnames:
- CASE_CREATED
Expand Down Expand Up @@ -125895,12 +125895,12 @@ paths:
action:
data:
handle: workflow-handle-123
type: execute_workflow
type: EXECUTE_WORKFLOW
created_at: "2024-01-01T00:00:00.000Z"
name: Auto-assign workflow
state: ENABLED
trigger:
type: case_created
type: CASE_CREATED
id: e6773723-fe58-49ff-9975-dff00f14e28d
type: rule
schema:
Expand Down Expand Up @@ -125946,11 +125946,11 @@ paths:
action:
data:
handle: workflow-handle-123
type: execute_workflow
type: EXECUTE_WORKFLOW
name: Auto-assign workflow
state: ENABLED
trigger:
type: case_created
type: CASE_CREATED
type: rule
schema:
$ref: "#/components/schemas/AutomationRuleCreateRequest"
Expand All @@ -125968,12 +125968,12 @@ paths:
action:
data:
handle: workflow-handle-123
type: execute_workflow
type: EXECUTE_WORKFLOW
created_at: "2024-01-01T00:00:00.000Z"
name: Auto-assign workflow
state: ENABLED
trigger:
type: case_created
type: CASE_CREATED
id: e6773723-fe58-49ff-9975-dff00f14e28d
type: rule
schema:
Expand Down Expand Up @@ -126051,12 +126051,12 @@ paths:
action:
data:
handle: workflow-handle-123
type: execute_workflow
type: EXECUTE_WORKFLOW
created_at: "2024-01-01T00:00:00.000Z"
name: Auto-assign workflow
state: ENABLED
trigger:
type: case_created
type: CASE_CREATED
id: e6773723-fe58-49ff-9975-dff00f14e28d
type: rule
schema:
Expand Down Expand Up @@ -126103,11 +126103,11 @@ paths:
action:
data:
handle: workflow-handle-123
type: execute_workflow
type: EXECUTE_WORKFLOW
name: Auto-assign workflow
state: ENABLED
trigger:
type: case_created
type: CASE_CREATED
type: rule
schema:
$ref: "#/components/schemas/AutomationRuleUpdateRequest"
Expand All @@ -126125,12 +126125,12 @@ paths:
action:
data:
handle: workflow-handle-123
type: execute_workflow
type: EXECUTE_WORKFLOW
created_at: "2024-01-01T00:00:00.000Z"
name: Auto-assign workflow
state: ENABLED
trigger:
type: case_created
type: CASE_CREATED
id: e6773723-fe58-49ff-9975-dff00f14e28d
type: rule
schema:
Expand Down Expand Up @@ -126179,12 +126179,12 @@ paths:
action:
data:
handle: workflow-handle-123
type: execute_workflow
type: EXECUTE_WORKFLOW
created_at: "2024-01-01T00:00:00.000Z"
name: Auto-assign workflow
state: DISABLED
trigger:
type: case_created
type: CASE_CREATED
id: e6773723-fe58-49ff-9975-dff00f14e28d
type: rule
schema:
Expand Down Expand Up @@ -126233,12 +126233,12 @@ paths:
action:
data:
handle: workflow-handle-123
type: execute_workflow
type: EXECUTE_WORKFLOW
created_at: "2024-01-01T00:00:00.000Z"
name: Auto-assign workflow
state: ENABLED
trigger:
type: case_created
type: CASE_CREATED
id: e6773723-fe58-49ff-9975-dff00f14e28d
type: rule
schema:
Expand Down
12 changes: 6 additions & 6 deletions features/v2/case_management.feature
Original file line number Diff line number Diff line change
Expand Up @@ -360,23 +360,23 @@ Feature: Case Management
Scenario: Create an automation rule returns "Bad Request" response
Given new "CreateCaseAutomationRule" request
And request contains "project_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}}
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "EXECUTE_WORKFLOW"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "CASE_CREATED"}}, "type": "rule"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/case-management
Scenario: Create an automation rule returns "Created" response
Given new "CreateCaseAutomationRule" request
And request contains "project_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}}
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "EXECUTE_WORKFLOW"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "CASE_CREATED"}}, "type": "rule"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/case-management
Scenario: Create an automation rule returns "Not Found" response
Given new "CreateCaseAutomationRule" request
And request contains "project_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}}
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "EXECUTE_WORKFLOW"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "CASE_CREATED"}}, "type": "rule"}}
When the request is sent
Then the response status is 404 Not Found

Expand Down Expand Up @@ -1233,7 +1233,7 @@ Feature: Case Management
Given new "UpdateCaseAutomationRule" request
And request contains "project_id" parameter from "REPLACE.ME"
And request contains "rule_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}}
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "EXECUTE_WORKFLOW"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "CASE_CREATED"}}, "type": "rule"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -1242,7 +1242,7 @@ Feature: Case Management
Given new "UpdateCaseAutomationRule" request
And request contains "project_id" parameter from "REPLACE.ME"
And request contains "rule_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}}
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "EXECUTE_WORKFLOW"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "CASE_CREATED"}}, "type": "rule"}}
When the request is sent
Then the response status is 404 Not Found

Expand All @@ -1251,7 +1251,7 @@ Feature: Case Management
Given new "UpdateCaseAutomationRule" request
And request contains "project_id" parameter from "REPLACE.ME"
And request contains "rule_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "execute_workflow"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "case_created"}}, "type": "rule"}}
And body with value {"data": {"attributes": {"action": {"data": {"handle": "workflow-handle-123"}, "type": "EXECUTE_WORKFLOW"}, "name": "Auto-assign workflow", "state": "ENABLED", "trigger": {"data": {}, "type": "CASE_CREATED"}}, "type": "rule"}}
When the request is sent
Then the response status is 200 OK

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AutomationRuleAction
# Configuration for the action to execute, dependent on the action type.
attr_reader :data

# The type of automated action to perform when the rule triggers. `execute_workflow` runs a Datadog workflow; `assign_agent` assigns an AI agent to the case.
# The type of automated action to perform when the rule triggers. `EXECUTE_WORKFLOW` runs a Datadog workflow; `ASSIGN_AGENT` assigns an AI agent to the case.
attr_reader :type

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ module DatadogAPIClient::V2
class AutomationRuleActionData
include BaseGenericModel

# The type of AI agent to assign. Required when the action type is `assign_agent`.
# The type of AI agent to assign. Required when the action type is `ASSIGN_AGENT`.
attr_accessor :agent_type

# The identifier of the AI agent to assign to the case. Required when the action type is `assign_agent`.
# The identifier of the AI agent to assign to the case. Required when the action type is `ASSIGN_AGENT`.
attr_accessor :assigned_agent_id

# The handle of the Datadog workflow to execute. Required when the action type is `execute_workflow`.
# The handle of the Datadog workflow to execute. Required when the action type is `EXECUTE_WORKFLOW`.
attr_accessor :handle

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
require 'time'

module DatadogAPIClient::V2
# The type of automated action to perform when the rule triggers. `execute_workflow` runs a Datadog workflow; `assign_agent` assigns an AI agent to the case.
# The type of automated action to perform when the rule triggers. `EXECUTE_WORKFLOW` runs a Datadog workflow; `ASSIGN_AGENT` assigns an AI agent to the case.
class AutomationRuleActionType
include BaseEnumModel

EXECUTE_WORKFLOW = "execute_workflow".freeze
ASSIGN_AGENT = "assign_agent".freeze
EXECUTE_WORKFLOW = "EXECUTE_WORKFLOW".freeze
ASSIGN_AGENT = "ASSIGN_AGENT".freeze
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ module DatadogAPIClient::V2
class AutomationRuleTrigger
include BaseGenericModel

# Additional configuration for the trigger, dependent on the trigger type. For `status_transitioned` triggers, specify `from_status_name` and `to_status_name`. For `attribute_value_changed` triggers, specify `field` and `change_type`.
# Additional configuration for the trigger, dependent on the trigger type. For `STATUS_TRANSITIONED` triggers, specify `from_status_name` and `to_status_name`. For `ATTRIBUTE_VALUE_CHANGED` triggers, specify `field` and `change_type`.
attr_accessor :data

# The case event that activates the automation rule.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
require 'time'

module DatadogAPIClient::V2
# Additional configuration for the trigger, dependent on the trigger type. For `status_transitioned` triggers, specify `from_status_name` and `to_status_name`. For `attribute_value_changed` triggers, specify `field` and `change_type`.
# Additional configuration for the trigger, dependent on the trigger type. For `STATUS_TRANSITIONED` triggers, specify `from_status_name` and `to_status_name`. For `ATTRIBUTE_VALUE_CHANGED` triggers, specify `field` and `change_type`.
class AutomationRuleTriggerData
include BaseGenericModel

# The approval outcome to match. Used with `case_review_approved` triggers.
# The approval outcome to match. Used with `CASE_REVIEW_APPROVED` triggers.
attr_accessor :approval_type

# The kind of attribute change to match. Allowed values: `VALUE_ADDED`, `VALUE_DELETED`, `ANY_CHANGES`. Used with `attribute_value_changed` triggers.
# The kind of attribute change to match. Allowed values: `VALUE_ADDED`, `VALUE_DELETED`, `ANY_CHANGES`. Used with `ATTRIBUTE_VALUE_CHANGED` triggers.
attr_accessor :change_type

# The case attribute field name to monitor for changes. Used with `attribute_value_changed` triggers.
# The case attribute field name to monitor for changes. Used with `ATTRIBUTE_VALUE_CHANGED` triggers.
attr_accessor :field

# The originating status name. Used with `status_transitioned` triggers to match transitions from this status.
# The originating status name. Used with `STATUS_TRANSITIONED` triggers to match transitions from this status.
attr_accessor :from_status_name

# The destination status name. Used with `status_transitioned` triggers to match transitions to this status.
# The destination status name. Used with `STATUS_TRANSITIONED` triggers to match transitions to this status.
attr_accessor :to_status_name

attr_accessor :additional_properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ module DatadogAPIClient::V2
class AutomationRuleTriggerType
include BaseEnumModel

CASE_CREATED = "case_created".freeze
STATUS_TRANSITIONED = "status_transitioned".freeze
ATTRIBUTE_VALUE_CHANGED = "attribute_value_changed".freeze
EVENT_CORRELATION_SIGNAL_CORRELATED = "event_correlation_signal_correlated".freeze
CASE_REVIEW_APPROVED = "case_review_approved".freeze
COMMENT_ADDED = "comment_added".freeze
CASE_CREATED = "CASE_CREATED".freeze
STATUS_TRANSITIONED = "STATUS_TRANSITIONED".freeze
ATTRIBUTE_VALUE_CHANGED = "ATTRIBUTE_VALUE_CHANGED".freeze
EVENT_CORRELATION_SIGNAL_CORRELATED = "EVENT_CORRELATION_SIGNAL_CORRELATED".freeze
CASE_REVIEW_APPROVED = "CASE_REVIEW_APPROVED".freeze
COMMENT_ADDED = "COMMENT_ADDED".freeze
end
end
Loading