From 315ba4f2493d13ffffde93c2c003716da709073e Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 16 Feb 2026 12:15:18 +0000 Subject: [PATCH] Regenerate client from commit 7a2c753 of spec repo --- .generator/schemas/v2/openapi.yaml | 764 ++++++++++++++++++ docs/datadog_api_client.v2.model.rst | 189 +++++ .../CreateCustomAgentConversation.py | 21 + .../CreateDataTransformation.py | 33 + .../CreateDataTransformationDescription.py | 20 + .../workflow-automation/CreatePickAction.py | 24 + .../CreatePickRemediationFromInvestigation.py | 31 + .../CreateWorkflowDescription.py | 20 + .../CreateWorkflowScaffoldAgenticStream.py | 39 + src/datadog_api_client/configuration.py | 7 + .../v2/api/workflow_automation_api.py | 282 +++++++ .../v2/model/action_match.py | 45 ++ .../v2/model/agentic_event.py | 49 ++ .../v2/model/chat_history_item.py | 46 ++ .../v2/model/chat_history_item_role.py | 38 + .../v2/model/chat_message.py | 75 ++ .../v2/model/chat_message_role.py | 41 + .../v2/model/client_type.py | 41 + .../custom_agent_conversation_request.py | 56 ++ ...stom_agent_conversation_stream_response.py | 46 ++ .../v2/model/data_transformation_context.py | 39 + ...data_transformation_description_request.py | 39 + ...ata_transformation_description_response.py | 45 ++ .../v2/model/data_transformation_language.py | 38 + .../v2/model/data_transformation_request.py | 82 ++ .../data_transformation_stream_response.py | 39 + .../v2/model/pick_action_request.py | 78 ++ .../v2/model/pick_action_response.py | 52 ++ ..._remediation_from_investigation_request.py | 94 +++ ...remediation_from_investigation_response.py | 60 ++ .../v2/model/stability_level.py | 44 + .../v2/model/stream_event_v1.py | 43 + .../v2/model/user_context.py | 40 + src/datadog_api_client/v2/model/user_info.py | 57 ++ .../v2/model/workflow_description_request.py | 39 + .../v2/model/workflow_description_response.py | 45 ++ ...orkflow_scaffold_agentic_stream_request.py | 80 ++ ...rkflow_scaffold_agentic_stream_response.py | 46 ++ src/datadog_api_client/v2/models/__init__.py | 58 ++ tests/v2/features/undo.json | 56 ++ tests/v2/features/workflow_automation.feature | 123 +++ 41 files changed, 3064 insertions(+) create mode 100644 examples/v2/workflow-automation/CreateCustomAgentConversation.py create mode 100644 examples/v2/workflow-automation/CreateDataTransformation.py create mode 100644 examples/v2/workflow-automation/CreateDataTransformationDescription.py create mode 100644 examples/v2/workflow-automation/CreatePickAction.py create mode 100644 examples/v2/workflow-automation/CreatePickRemediationFromInvestigation.py create mode 100644 examples/v2/workflow-automation/CreateWorkflowDescription.py create mode 100644 examples/v2/workflow-automation/CreateWorkflowScaffoldAgenticStream.py create mode 100644 src/datadog_api_client/v2/model/action_match.py create mode 100644 src/datadog_api_client/v2/model/agentic_event.py create mode 100644 src/datadog_api_client/v2/model/chat_history_item.py create mode 100644 src/datadog_api_client/v2/model/chat_history_item_role.py create mode 100644 src/datadog_api_client/v2/model/chat_message.py create mode 100644 src/datadog_api_client/v2/model/chat_message_role.py create mode 100644 src/datadog_api_client/v2/model/client_type.py create mode 100644 src/datadog_api_client/v2/model/custom_agent_conversation_request.py create mode 100644 src/datadog_api_client/v2/model/custom_agent_conversation_stream_response.py create mode 100644 src/datadog_api_client/v2/model/data_transformation_context.py create mode 100644 src/datadog_api_client/v2/model/data_transformation_description_request.py create mode 100644 src/datadog_api_client/v2/model/data_transformation_description_response.py create mode 100644 src/datadog_api_client/v2/model/data_transformation_language.py create mode 100644 src/datadog_api_client/v2/model/data_transformation_request.py create mode 100644 src/datadog_api_client/v2/model/data_transformation_stream_response.py create mode 100644 src/datadog_api_client/v2/model/pick_action_request.py create mode 100644 src/datadog_api_client/v2/model/pick_action_response.py create mode 100644 src/datadog_api_client/v2/model/pick_remediation_from_investigation_request.py create mode 100644 src/datadog_api_client/v2/model/pick_remediation_from_investigation_response.py create mode 100644 src/datadog_api_client/v2/model/stability_level.py create mode 100644 src/datadog_api_client/v2/model/stream_event_v1.py create mode 100644 src/datadog_api_client/v2/model/user_context.py create mode 100644 src/datadog_api_client/v2/model/user_info.py create mode 100644 src/datadog_api_client/v2/model/workflow_description_request.py create mode 100644 src/datadog_api_client/v2/model/workflow_description_response.py create mode 100644 src/datadog_api_client/v2/model/workflow_scaffold_agentic_stream_request.py create mode 100644 src/datadog_api_client/v2/model/workflow_scaffold_agentic_stream_response.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 07cf64fab0..35163c0441 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -2700,6 +2700,26 @@ components: - $ref: '#/components/schemas/SplitIntegrationUpdate' - $ref: '#/components/schemas/StatsigIntegrationUpdate' - $ref: '#/components/schemas/VirusTotalIntegrationUpdate' + ActionMatch: + properties: + actionFqn: + description: The fully qualified name of the action. + example: com.datadoghq.slack.send_message + type: string + description: + description: The description of the action. + example: Sends a message to a Slack channel + type: string + score: + description: The relevance score of the match. + example: 0.95 + format: double + type: number + required: + - actionFqn + - score + - description + type: object ActionQuery: description: An action query. This query type is used to trigger an action, such as sending a HTTP request. @@ -2971,6 +2991,23 @@ components: - id - base_severity type: object + AgenticEvent: + properties: + message: + description: The message content. + example: The weather is sunny. + type: string + payload: + description: Additional payload data for the event. + type: object + type: + description: The type of agentic event. + example: streaming_content + type: string + required: + - type + - message + type: object AlertEventAttributes: description: Alert event attributes. properties: @@ -10455,6 +10492,66 @@ components: example: infra_host type: string type: object + ChatHistoryItem: + properties: + content: + description: The message content. + example: Please add error handling + type: string + role: + $ref: '#/components/schemas/ChatHistoryItemRole' + required: + - role + - content + type: object + ChatHistoryItemRole: + description: The role of the message sender. + enum: + - user + - assistant + example: user + type: string + x-enum-varnames: + - USER + - ASSISTANT + ChatMessage: + properties: + chatId: + description: The chat ID. + example: chat-456 + type: string + content: + description: The message content. + example: Add error handling to the workflow + type: string + id: + description: The message ID. + example: msg-123 + type: string + role: + $ref: '#/components/schemas/ChatMessageRole' + userUuid: + description: The UUID of the user who sent the message. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + required: + - id + - chatId + - role + - content + type: object + ChatMessageRole: + description: The role of the message sender. + enum: + - user + - assistant + - system + example: user + type: string + x-enum-varnames: + - USER + - ASSISTANT + - SYSTEM CircleCIAPIKey: description: The definition of the `CircleCIAPIKey` object. properties: @@ -10593,6 +10690,18 @@ components: required: - type type: object + ClientType: + description: The client type for action filtering. + enum: + - workflows + - app_builder + - actions_api + example: workflows + type: string + x-enum-varnames: + - WORKFLOWS + - APP_BUILDER + - ACTIONS_API CloudAssetType: description: The cloud asset type enum: @@ -15824,6 +15933,34 @@ components: data: $ref: '#/components/schemas/CsmServerlessCoverageAnalysisData' type: object + CustomAgentConversationRequest: + properties: + conversationId: + description: The conversation ID to continue an existing conversation. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + outputSchema: + description: Optional JSON schema to structure the output. + type: object + userPrompt: + description: The user's prompt for the conversation. + example: What is the weather like today? + type: string + required: + - userPrompt + type: object + CustomAgentConversationStreamResponse: + properties: + event: + $ref: '#/components/schemas/AgenticEvent' + id: + description: The conversation ID. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + required: + - id + - event + type: object CustomAttributeConfig: description: The definition of `CustomAttributeConfig` object. properties: @@ -18729,6 +18866,100 @@ components: type: string x-enum-varnames: - DATATRANSFORM + DataTransformationContext: + properties: + contextVariables: + description: Available context variables for the transformation. + example: '{ "timestamp": 1234567890 }' + type: string + currentScript: + description: The current script to modify or enhance. + example: return data.timestamp; + type: string + required: + - contextVariables + - currentScript + type: object + DataTransformationDescriptionRequest: + properties: + actionId: + description: The fully qualified name (FQN) of the action. + example: com.datadoghq.transform.timestamp + type: string + script: + description: The transformation script to describe. + example: return new Date(data.timestamp).toISOString(); + type: string + required: + - actionId + - script + type: object + DataTransformationDescriptionResponse: + properties: + details: + description: Detailed description of the transformation. + example: This transformation takes a Unix timestamp and converts it to ISO + 8601 format using JavaScript Date object. + type: string + id: + description: The generation ID. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + summary: + description: A brief summary of the transformation. + example: Converts Unix timestamp to ISO format + type: string + required: + - id + - summary + - details + type: object + DataTransformationLanguage: + description: The programming language for the transformation. + enum: + - javascript + - python + example: javascript + type: string + x-enum-varnames: + - JAVASCRIPT + - PYTHON + DataTransformationRequest: + properties: + chatHistory: + description: Previous chat messages for iterative interaction. + items: + $ref: '#/components/schemas/ChatHistoryItem' + type: array + context: + $ref: '#/components/schemas/DataTransformationContext' + language: + $ref: '#/components/schemas/DataTransformationLanguage' + stream: + description: Whether to stream the response. + example: true + type: boolean + userPrompt: + description: The user's prompt describing the desired transformation. + example: Convert timestamp to ISO format + type: string + required: + - userPrompt + type: object + DataTransformationStreamResponse: + properties: + content: + description: The generated code or explanation chunk. + example: const timestamp = data.timestamp; + type: string + id: + description: The generation ID. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + required: + - id + - content + type: object DatabaseMonitoringTriggerWrapper: description: Schema for a Database Monitoring-based trigger. properties: @@ -45508,6 +45739,112 @@ components: type: string x-enum-varnames: - PERMISSIONS + PickActionRequest: + properties: + client: + $ref: '#/components/schemas/ClientType' + number_of_relevant_actions: + description: The number of relevant actions to return. + example: 5 + format: int64 + maximum: 100 + minimum: 1 + type: integer + stability: + $ref: '#/components/schemas/StabilityLevel' + user_prompt: + description: The user's prompt to find relevant actions. + example: Send a Slack message + type: string + required: + - user_prompt + - number_of_relevant_actions + type: object + PickActionResponse: + properties: + matches: + description: The matching actions. + items: + $ref: '#/components/schemas/ActionMatch' + type: array + request_id: + description: The request ID. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + total_matches: + description: The total number of matches. + example: 5 + format: int64 + type: integer + required: + - request_id + - matches + - total_matches + type: object + PickRemediationFromInvestigationRequest: + properties: + client: + $ref: '#/components/schemas/ClientType' + integrations: + description: List of integrations to filter actions by. + example: + - aws + - datadog + items: + type: string + type: array + investigation: + description: The investigation text to extract remediation keywords from. + example: High CPU usage detected on prod-server-01 + type: string + number_of_keyword_variants: + description: The number of keyword variants to generate. + example: 2 + format: int64 + type: integer + number_of_relevant_actions: + description: The number of relevant actions to return per keyword. + example: 5 + format: int64 + maximum: 100 + minimum: 1 + type: integer + stability: + $ref: '#/components/schemas/StabilityLevel' + required: + - investigation + - number_of_relevant_actions + type: object + PickRemediationFromInvestigationResponse: + properties: + keywords_used: + description: The keywords generated and used for finding actions. + example: + - restart service + - scale resources + items: + type: string + type: array + matches: + description: The matching actions. + items: + $ref: '#/components/schemas/ActionMatch' + type: array + request_id: + description: The request ID. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + total_matches: + description: The total number of matches. + example: 10 + format: int64 + type: integer + required: + - request_id + - matches + - total_matches + - keywords_used + type: object Playlist: properties: data: @@ -60303,6 +60640,20 @@ components: required: - type type: object + StabilityLevel: + description: The stability level for action filtering. + enum: + - UNSPECIFIED + - DEV + - BETA + - STABLE + example: STABLE + type: string + x-enum-varnames: + - UNSPECIFIED + - DEV + - BETA + - STABLE StartStepNames: description: A list of steps that run first after a trigger fires. example: @@ -61355,6 +61706,18 @@ components: format: double type: number type: object + StreamEventV1: + properties: + data: + description: The event data payload. + type: object + type: + description: The type of stream event. + example: content + type: string + required: + - type + type: object SuiteCreateEdit: properties: attributes: @@ -66166,6 +66529,13 @@ components: - ACTIVE - DEACTIVATED - PENDING + UserContext: + properties: + userInfo: + $ref: '#/components/schemas/UserInfo' + required: + - userInfo + type: object UserCreateAttributes: description: Attributes of the created user. properties: @@ -66203,6 +66573,29 @@ components: required: - data type: object + UserInfo: + properties: + orgName: + description: The organization name. + example: Acme Corp + type: string + userEmail: + description: The user's email address. + example: john.doe@example.com + type: string + userName: + description: The user's name. + example: John Doe + type: string + userUUID: + description: The user's UUID. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + required: + - orgName + - userUUID + - userEmail + type: object UserInvitationData: description: Object to create a user invitation. properties: @@ -67587,6 +67980,43 @@ components: type: string writeOnly: true type: object + WorkflowDescriptionRequest: + properties: + name: + description: The name of the workflow. + example: Alert Response Workflow + type: string + spec: + description: The workflow specification as a JSON object. + example: + steps: + - actionId: com.datadoghq.slack.send_message + name: Send notification + type: object + required: + - name + - spec + type: object + WorkflowDescriptionResponse: + properties: + description: + description: The generated workflow description. + example: This workflow responds to alerts by creating a ticket and notifying + the team. + type: string + id: + description: The generation ID. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + summary: + description: A brief summary of the workflow. + example: Alert response automation workflow + type: string + required: + - id + - description + - summary + type: object WorkflowInstanceCreateMeta: description: Additional information for creating a workflow instance. properties: @@ -67653,6 +68083,41 @@ components: format: int64 type: integer type: object + WorkflowScaffoldAgenticStreamRequest: + properties: + chatHistory: + description: Previous chat messages for iterative workflow generation. + items: + $ref: '#/components/schemas/ChatMessage' + type: array + existingWorkflow: + description: The existing workflow specification to modify. + type: object + previousAction: + description: The previous action taken in the workflow generation. + example: created_initial_scaffold + type: string + userContext: + $ref: '#/components/schemas/UserContext' + userPrompt: + description: The user's prompt for generating or modifying the workflow. + example: Create a workflow to restart a service when CPU is high + type: string + required: + - userPrompt + type: object + WorkflowScaffoldAgenticStreamResponse: + properties: + event: + $ref: '#/components/schemas/StreamEventV1' + id: + description: The generation ID. + example: 550e8400-e29b-41d4-a716-446655440000 + type: string + required: + - id + - event + type: object WorkflowTriggerWrapper: description: Schema for a Workflow-based trigger. properties: @@ -69380,6 +69845,72 @@ paths: operator: OR permissions: - apps_datastore_write + /api/v2/actions/agents/{custom_agent_id}/conversation: + post: + description: Initiates or continues a conversation with a custom agent. Supports + streaming responses. + operationId: CreateCustomAgentConversation + parameters: + - description: The ID of the custom agent. + in: path + name: custom_agent_id + required: true + schema: + example: 3b796bda-b79b-477e-ae29-958473a683db + format: uuid + type: string + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/CustomAgentConversationRequest' + required: true + responses: + '200': + content: + text/event-stream: + schema: + $ref: '#/components/schemas/CustomAgentConversationStreamResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '401': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Unauthorized + '403': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Not Found + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Create a custom agent conversation + tags: + - Workflow Automation + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/actions/app_key_registrations: get: description: List App Key Registrations @@ -103309,6 +103840,239 @@ paths: operator: OR permissions: - teams_read + /api/v2/workflow_generation/data_transformation: + post: + description: Generates data transformation code (JavaScript or Python) based + on user prompt and context. + operationId: CreateDataTransformation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransformationRequest' + required: true + responses: + '200': + content: + text/event-stream: + schema: + $ref: '#/components/schemas/DataTransformationStreamResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Generate data transformation code + tags: + - Workflow Automation + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/workflow_generation/data_transformation/description: + post: + description: Generates a summary and detailed description for data transformation + code. + operationId: CreateDataTransformationDescription + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransformationDescriptionRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DataTransformationDescriptionResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Generate data transformation description + tags: + - Workflow Automation + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/workflow_generation/description: + post: + description: Generates a description and summary for a workflow based on its + specification. + operationId: CreateWorkflowDescription + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowDescriptionRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowDescriptionResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Generate workflow description + tags: + - Workflow Automation + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/workflow_generation/pick_action: + post: + description: Finds similar actions based on a user prompt using vector search. + operationId: CreatePickAction + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PickActionRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PickActionResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Pick relevant actions + tags: + - Workflow Automation + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/workflow_generation/pick_remediation_from_investigation: + post: + description: Generates keywords from an investigation and finds relevant remediation + actions. + operationId: CreatePickRemediationFromInvestigation + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/PickRemediationFromInvestigationRequest' + required: true + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/PickRemediationFromInvestigationResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Pick remediation actions from investigation + tags: + - Workflow Automation + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' + /api/v2/workflow_generation/scaffold_agentic_stream: + post: + description: Generates or updates a workflow scaffold using agentic streaming + based on user prompts. + operationId: CreateWorkflowScaffoldAgenticStream + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/WorkflowScaffoldAgenticStreamRequest' + required: true + responses: + '200': + content: + text/event-stream: + schema: + $ref: '#/components/schemas/WorkflowScaffoldAgenticStreamResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + summary: Generate workflow scaffold with agentic stream + tags: + - Workflow Automation + x-codegen-request-body-name: body + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/workflows: post: description: Create a new workflow, returning the workflow ID. This API requires diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 6ea9cfc5d1..df78fe7242 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -60,6 +60,13 @@ datadog\_api\_client.v2.model.action\_connection\_integration\_update module :members: :show-inheritance: +datadog\_api\_client.v2.model.action\_match module +-------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.action_match + :members: + :show-inheritance: + datadog\_api\_client.v2.model.action\_query module -------------------------------------------------- @@ -221,6 +228,13 @@ datadog\_api\_client.v2.model.advisory module :members: :show-inheritance: +datadog\_api\_client.v2.model.agentic\_event module +--------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.agentic_event + :members: + :show-inheritance: + datadog\_api\_client.v2.model.alert\_event\_attributes module ------------------------------------------------------------- @@ -3560,6 +3574,34 @@ datadog\_api\_client.v2.model.chargeback\_breakdown module :members: :show-inheritance: +datadog\_api\_client.v2.model.chat\_history\_item module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.chat_history_item + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.chat\_history\_item\_role module +-------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.chat_history_item_role + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.chat\_message module +-------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.chat_message + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.chat\_message\_role module +-------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.chat_message_role + :members: + :show-inheritance: + datadog\_api\_client.v2.model.ci\_app\_aggregate\_bucket\_value module ---------------------------------------------------------------------- @@ -4190,6 +4232,13 @@ datadog\_api\_client.v2.model.clickup\_integration\_update module :members: :show-inheritance: +datadog\_api\_client.v2.model.client\_type module +------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.client_type + :members: + :show-inheritance: + datadog\_api\_client.v2.model.cloud\_asset\_type module ------------------------------------------------------- @@ -6416,6 +6465,20 @@ datadog\_api\_client.v2.model.csm\_serverless\_coverage\_analysis\_response modu :members: :show-inheritance: +datadog\_api\_client.v2.model.custom\_agent\_conversation\_request module +------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.custom_agent_conversation_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.custom\_agent\_conversation\_stream\_response module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.custom_agent_conversation_stream_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.custom\_attribute\_config module -------------------------------------------------------------- @@ -7305,6 +7368,48 @@ datadog\_api\_client.v2.model.data\_transform\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.data\_transformation\_context module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.data_transformation_context + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.data\_transformation\_description\_request module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.data_transformation_description_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.data\_transformation\_description\_response module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.data_transformation_description_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.data\_transformation\_language module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.data_transformation_language + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.data\_transformation\_request module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.data_transformation_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.data\_transformation\_stream\_response module +--------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.data_transformation_stream_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.database\_monitoring\_trigger\_wrapper module --------------------------------------------------------------------------- @@ -19779,6 +19884,34 @@ datadog\_api\_client.v2.model.permissions\_type module :members: :show-inheritance: +datadog\_api\_client.v2.model.pick\_action\_request module +---------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.pick_action_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.pick\_action\_response module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.pick_action_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.pick\_remediation\_from\_investigation\_request module +------------------------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.pick_remediation_from_investigation_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.pick\_remediation\_from\_investigation\_response module +------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.pick_remediation_from_investigation_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.playlist module --------------------------------------------- @@ -26464,6 +26597,13 @@ datadog\_api\_client.v2.model.split\_integration\_update module :members: :show-inheritance: +datadog\_api\_client.v2.model.stability\_level module +----------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.stability_level + :members: + :show-inheritance: + datadog\_api\_client.v2.model.state module ------------------------------------------ @@ -26982,6 +27122,13 @@ datadog\_api\_client.v2.model.step\_display\_bounds module :members: :show-inheritance: +datadog\_api\_client.v2.model.stream\_event\_v1 module +------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.stream_event_v1 + :members: + :show-inheritance: + datadog\_api\_client.v2.model.suite\_create\_edit module -------------------------------------------------------- @@ -29187,6 +29334,13 @@ datadog\_api\_client.v2.model.user\_attributes\_status module :members: :show-inheritance: +datadog\_api\_client.v2.model.user\_context module +-------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.user_context + :members: + :show-inheritance: + datadog\_api\_client.v2.model.user\_create\_attributes module ------------------------------------------------------------- @@ -29208,6 +29362,13 @@ datadog\_api\_client.v2.model.user\_create\_request module :members: :show-inheritance: +datadog\_api\_client.v2.model.user\_info module +----------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.user_info + :members: + :show-inheritance: + datadog\_api\_client.v2.model.user\_invitation\_data module ----------------------------------------------------------- @@ -29845,6 +30006,20 @@ datadog\_api\_client.v2.model.workflow\_data\_update\_attributes module :members: :show-inheritance: +datadog\_api\_client.v2.model.workflow\_description\_request module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.workflow_description_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.workflow\_description\_response module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.workflow_description_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.workflow\_instance\_create\_meta module --------------------------------------------------------------------- @@ -29901,6 +30076,20 @@ datadog\_api\_client.v2.model.workflow\_list\_instances\_response\_meta\_page mo :members: :show-inheritance: +datadog\_api\_client.v2.model.workflow\_scaffold\_agentic\_stream\_request module +--------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.workflow_scaffold_agentic_stream_request + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.workflow\_scaffold\_agentic\_stream\_response module +---------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.workflow_scaffold_agentic_stream_response + :members: + :show-inheritance: + datadog\_api\_client.v2.model.workflow\_trigger\_wrapper module --------------------------------------------------------------- diff --git a/examples/v2/workflow-automation/CreateCustomAgentConversation.py b/examples/v2/workflow-automation/CreateCustomAgentConversation.py new file mode 100644 index 0000000000..3b439f2d62 --- /dev/null +++ b/examples/v2/workflow-automation/CreateCustomAgentConversation.py @@ -0,0 +1,21 @@ +""" +Create a custom agent conversation returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi +from datadog_api_client.v2.model.custom_agent_conversation_request import CustomAgentConversationRequest +from uuid import UUID + +body = CustomAgentConversationRequest( + conversation_id="550e8400-e29b-41d4-a716-446655440000", + user_prompt="What is the weather like today?", +) + +configuration = Configuration() +configuration.unstable_operations["create_custom_agent_conversation"] = True +with ApiClient(configuration) as api_client: + api_instance = WorkflowAutomationApi(api_client) + response = api_instance.create_custom_agent_conversation( + custom_agent_id=UUID("3b796bda-b79b-477e-ae29-958473a683db"), body=body + ) diff --git a/examples/v2/workflow-automation/CreateDataTransformation.py b/examples/v2/workflow-automation/CreateDataTransformation.py new file mode 100644 index 0000000000..3cd19c0196 --- /dev/null +++ b/examples/v2/workflow-automation/CreateDataTransformation.py @@ -0,0 +1,33 @@ +""" +Generate data transformation code returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi +from datadog_api_client.v2.model.chat_history_item import ChatHistoryItem +from datadog_api_client.v2.model.chat_history_item_role import ChatHistoryItemRole +from datadog_api_client.v2.model.data_transformation_context import DataTransformationContext +from datadog_api_client.v2.model.data_transformation_language import DataTransformationLanguage +from datadog_api_client.v2.model.data_transformation_request import DataTransformationRequest + +body = DataTransformationRequest( + chat_history=[ + ChatHistoryItem( + content="Please add error handling", + role=ChatHistoryItemRole.USER, + ), + ], + context=DataTransformationContext( + context_variables='{ "timestamp": 1234567890 }', + current_script="return data.timestamp;", + ), + language=DataTransformationLanguage.JAVASCRIPT, + stream=True, + user_prompt="Convert timestamp to ISO format", +) + +configuration = Configuration() +configuration.unstable_operations["create_data_transformation"] = True +with ApiClient(configuration) as api_client: + api_instance = WorkflowAutomationApi(api_client) + response = api_instance.create_data_transformation(body=body) diff --git a/examples/v2/workflow-automation/CreateDataTransformationDescription.py b/examples/v2/workflow-automation/CreateDataTransformationDescription.py new file mode 100644 index 0000000000..d27987cd5b --- /dev/null +++ b/examples/v2/workflow-automation/CreateDataTransformationDescription.py @@ -0,0 +1,20 @@ +""" +Generate data transformation description returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi +from datadog_api_client.v2.model.data_transformation_description_request import DataTransformationDescriptionRequest + +body = DataTransformationDescriptionRequest( + action_id="com.datadoghq.transform.timestamp", + script="return new Date(data.timestamp).toISOString();", +) + +configuration = Configuration() +configuration.unstable_operations["create_data_transformation_description"] = True +with ApiClient(configuration) as api_client: + api_instance = WorkflowAutomationApi(api_client) + response = api_instance.create_data_transformation_description(body=body) + + print(response) diff --git a/examples/v2/workflow-automation/CreatePickAction.py b/examples/v2/workflow-automation/CreatePickAction.py new file mode 100644 index 0000000000..ec8be6d9c5 --- /dev/null +++ b/examples/v2/workflow-automation/CreatePickAction.py @@ -0,0 +1,24 @@ +""" +Pick relevant actions returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi +from datadog_api_client.v2.model.client_type import ClientType +from datadog_api_client.v2.model.pick_action_request import PickActionRequest +from datadog_api_client.v2.model.stability_level import StabilityLevel + +body = PickActionRequest( + client=ClientType.WORKFLOWS, + number_of_relevant_actions=5, + stability=StabilityLevel.STABLE, + user_prompt="Send a Slack message", +) + +configuration = Configuration() +configuration.unstable_operations["create_pick_action"] = True +with ApiClient(configuration) as api_client: + api_instance = WorkflowAutomationApi(api_client) + response = api_instance.create_pick_action(body=body) + + print(response) diff --git a/examples/v2/workflow-automation/CreatePickRemediationFromInvestigation.py b/examples/v2/workflow-automation/CreatePickRemediationFromInvestigation.py new file mode 100644 index 0000000000..e946469624 --- /dev/null +++ b/examples/v2/workflow-automation/CreatePickRemediationFromInvestigation.py @@ -0,0 +1,31 @@ +""" +Pick remediation actions from investigation returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi +from datadog_api_client.v2.model.client_type import ClientType +from datadog_api_client.v2.model.pick_remediation_from_investigation_request import ( + PickRemediationFromInvestigationRequest, +) +from datadog_api_client.v2.model.stability_level import StabilityLevel + +body = PickRemediationFromInvestigationRequest( + client=ClientType.WORKFLOWS, + integrations=[ + "aws", + "datadog", + ], + investigation="High CPU usage detected on prod-server-01", + number_of_keyword_variants=2, + number_of_relevant_actions=5, + stability=StabilityLevel.STABLE, +) + +configuration = Configuration() +configuration.unstable_operations["create_pick_remediation_from_investigation"] = True +with ApiClient(configuration) as api_client: + api_instance = WorkflowAutomationApi(api_client) + response = api_instance.create_pick_remediation_from_investigation(body=body) + + print(response) diff --git a/examples/v2/workflow-automation/CreateWorkflowDescription.py b/examples/v2/workflow-automation/CreateWorkflowDescription.py new file mode 100644 index 0000000000..60828286fa --- /dev/null +++ b/examples/v2/workflow-automation/CreateWorkflowDescription.py @@ -0,0 +1,20 @@ +""" +Generate workflow description returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi +from datadog_api_client.v2.model.workflow_description_request import WorkflowDescriptionRequest + +body = WorkflowDescriptionRequest( + name="Alert Response Workflow", + spec=dict([("steps", "[{'actionId': 'com.datadoghq.slack.send_message', 'name': 'Send notification'}]")]), +) + +configuration = Configuration() +configuration.unstable_operations["create_workflow_description"] = True +with ApiClient(configuration) as api_client: + api_instance = WorkflowAutomationApi(api_client) + response = api_instance.create_workflow_description(body=body) + + print(response) diff --git a/examples/v2/workflow-automation/CreateWorkflowScaffoldAgenticStream.py b/examples/v2/workflow-automation/CreateWorkflowScaffoldAgenticStream.py new file mode 100644 index 0000000000..9b994068ea --- /dev/null +++ b/examples/v2/workflow-automation/CreateWorkflowScaffoldAgenticStream.py @@ -0,0 +1,39 @@ +""" +Generate workflow scaffold with agentic stream returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.workflow_automation_api import WorkflowAutomationApi +from datadog_api_client.v2.model.chat_message import ChatMessage +from datadog_api_client.v2.model.chat_message_role import ChatMessageRole +from datadog_api_client.v2.model.user_context import UserContext +from datadog_api_client.v2.model.user_info import UserInfo +from datadog_api_client.v2.model.workflow_scaffold_agentic_stream_request import WorkflowScaffoldAgenticStreamRequest + +body = WorkflowScaffoldAgenticStreamRequest( + chat_history=[ + ChatMessage( + chat_id="chat-456", + content="Add error handling to the workflow", + id="msg-123", + role=ChatMessageRole.USER, + user_uuid="550e8400-e29b-41d4-a716-446655440000", + ), + ], + previous_action="created_initial_scaffold", + user_context=UserContext( + user_info=UserInfo( + org_name="Acme Corp", + user_email="john.doe@example.com", + user_name="John Doe", + user_uuid="550e8400-e29b-41d4-a716-446655440000", + ), + ), + user_prompt="Create a workflow to restart a service when CPU is high", +) + +configuration = Configuration() +configuration.unstable_operations["create_workflow_scaffold_agentic_stream"] = True +with ApiClient(configuration) as api_client: + api_instance = WorkflowAutomationApi(api_client) + response = api_instance.create_workflow_scaffold_agentic_stream(body=body) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index efa1d3f521..689d5ba842 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -261,6 +261,13 @@ def __init__( "v2.list_fleet_schedules": False, "v2.trigger_fleet_schedule": False, "v2.update_fleet_schedule": False, + "v2.create_custom_agent_conversation": False, + "v2.create_data_transformation": False, + "v2.create_data_transformation_description": False, + "v2.create_pick_action": False, + "v2.create_pick_remediation_from_investigation": False, + "v2.create_workflow_description": False, + "v2.create_workflow_scaffold_agentic_stream": False, "v2.create_open_api": False, "v2.delete_open_api": False, "v2.get_open_api": False, diff --git a/src/datadog_api_client/v2/api/workflow_automation_api.py b/src/datadog_api_client/v2/api/workflow_automation_api.py index f32b55e50f..3643a27f98 100644 --- a/src/datadog_api_client/v2/api/workflow_automation_api.py +++ b/src/datadog_api_client/v2/api/workflow_automation_api.py @@ -10,7 +10,26 @@ from datadog_api_client.model_utils import ( UnsetType, unset, + UUID, ) +from datadog_api_client.v2.model.custom_agent_conversation_stream_response import CustomAgentConversationStreamResponse +from datadog_api_client.v2.model.custom_agent_conversation_request import CustomAgentConversationRequest +from datadog_api_client.v2.model.data_transformation_stream_response import DataTransformationStreamResponse +from datadog_api_client.v2.model.data_transformation_request import DataTransformationRequest +from datadog_api_client.v2.model.data_transformation_description_response import DataTransformationDescriptionResponse +from datadog_api_client.v2.model.data_transformation_description_request import DataTransformationDescriptionRequest +from datadog_api_client.v2.model.workflow_description_response import WorkflowDescriptionResponse +from datadog_api_client.v2.model.workflow_description_request import WorkflowDescriptionRequest +from datadog_api_client.v2.model.pick_action_response import PickActionResponse +from datadog_api_client.v2.model.pick_action_request import PickActionRequest +from datadog_api_client.v2.model.pick_remediation_from_investigation_response import ( + PickRemediationFromInvestigationResponse, +) +from datadog_api_client.v2.model.pick_remediation_from_investigation_request import ( + PickRemediationFromInvestigationRequest, +) +from datadog_api_client.v2.model.workflow_scaffold_agentic_stream_response import WorkflowScaffoldAgenticStreamResponse +from datadog_api_client.v2.model.workflow_scaffold_agentic_stream_request import WorkflowScaffoldAgenticStreamRequest from datadog_api_client.v2.model.create_workflow_response import CreateWorkflowResponse from datadog_api_client.v2.model.create_workflow_request import CreateWorkflowRequest from datadog_api_client.v2.model.get_workflow_response import GetWorkflowResponse @@ -62,6 +81,112 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._create_custom_agent_conversation_endpoint = _Endpoint( + settings={ + "response_type": (CustomAgentConversationStreamResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/actions/agents/{custom_agent_id}/conversation", + "operation_id": "create_custom_agent_conversation", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "custom_agent_id": { + "required": True, + "openapi_types": (UUID,), + "attribute": "custom_agent_id", + "location": "path", + }, + "body": { + "required": True, + "openapi_types": (CustomAgentConversationRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["text/event-stream", "application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_data_transformation_endpoint = _Endpoint( + settings={ + "response_type": (DataTransformationStreamResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/workflow_generation/data_transformation", + "operation_id": "create_data_transformation", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (DataTransformationRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["text/event-stream", "application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_data_transformation_description_endpoint = _Endpoint( + settings={ + "response_type": (DataTransformationDescriptionResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/workflow_generation/data_transformation/description", + "operation_id": "create_data_transformation_description", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (DataTransformationDescriptionRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_pick_action_endpoint = _Endpoint( + settings={ + "response_type": (PickActionResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/workflow_generation/pick_action", + "operation_id": "create_pick_action", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (PickActionRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + + self._create_pick_remediation_from_investigation_endpoint = _Endpoint( + settings={ + "response_type": (PickRemediationFromInvestigationResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/workflow_generation/pick_remediation_from_investigation", + "operation_id": "create_pick_remediation_from_investigation", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (PickRemediationFromInvestigationRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._create_workflow_endpoint = _Endpoint( settings={ "response_type": (CreateWorkflowResponse,), @@ -82,6 +207,26 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._create_workflow_description_endpoint = _Endpoint( + settings={ + "response_type": (WorkflowDescriptionResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/workflow_generation/description", + "operation_id": "create_workflow_description", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (WorkflowDescriptionRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._create_workflow_instance_endpoint = _Endpoint( settings={ "response_type": (WorkflowInstanceCreateResponse,), @@ -108,6 +253,26 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._create_workflow_scaffold_agentic_stream_endpoint = _Endpoint( + settings={ + "response_type": (WorkflowScaffoldAgenticStreamResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/workflow_generation/scaffold_agentic_stream", + "operation_id": "create_workflow_scaffold_agentic_stream", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "body": { + "required": True, + "openapi_types": (WorkflowScaffoldAgenticStreamRequest,), + "location": "body", + }, + }, + headers_map={"accept": ["text/event-stream", "application/json"], "content_type": ["application/json"]}, + api_client=api_client, + ) + self._delete_workflow_endpoint = _Endpoint( settings={ "response_type": None, @@ -264,6 +429,91 @@ def cancel_workflow_instance( return self._cancel_workflow_instance_endpoint.call_with_http_info(**kwargs) + def create_custom_agent_conversation( + self, + custom_agent_id: UUID, + body: CustomAgentConversationRequest, + ) -> CustomAgentConversationStreamResponse: + """Create a custom agent conversation. + + Initiates or continues a conversation with a custom agent. Supports streaming responses. + + :param custom_agent_id: The ID of the custom agent. + :type custom_agent_id: UUID + :type body: CustomAgentConversationRequest + :rtype: CustomAgentConversationStreamResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["custom_agent_id"] = custom_agent_id + + kwargs["body"] = body + + return self._create_custom_agent_conversation_endpoint.call_with_http_info(**kwargs) + + def create_data_transformation( + self, + body: DataTransformationRequest, + ) -> DataTransformationStreamResponse: + """Generate data transformation code. + + Generates data transformation code (JavaScript or Python) based on user prompt and context. + + :type body: DataTransformationRequest + :rtype: DataTransformationStreamResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_data_transformation_endpoint.call_with_http_info(**kwargs) + + def create_data_transformation_description( + self, + body: DataTransformationDescriptionRequest, + ) -> DataTransformationDescriptionResponse: + """Generate data transformation description. + + Generates a summary and detailed description for data transformation code. + + :type body: DataTransformationDescriptionRequest + :rtype: DataTransformationDescriptionResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_data_transformation_description_endpoint.call_with_http_info(**kwargs) + + def create_pick_action( + self, + body: PickActionRequest, + ) -> PickActionResponse: + """Pick relevant actions. + + Finds similar actions based on a user prompt using vector search. + + :type body: PickActionRequest + :rtype: PickActionResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_pick_action_endpoint.call_with_http_info(**kwargs) + + def create_pick_remediation_from_investigation( + self, + body: PickRemediationFromInvestigationRequest, + ) -> PickRemediationFromInvestigationResponse: + """Pick remediation actions from investigation. + + Generates keywords from an investigation and finds relevant remediation actions. + + :type body: PickRemediationFromInvestigationRequest + :rtype: PickRemediationFromInvestigationResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_pick_remediation_from_investigation_endpoint.call_with_http_info(**kwargs) + def create_workflow( self, body: CreateWorkflowRequest, @@ -280,6 +530,22 @@ def create_workflow( return self._create_workflow_endpoint.call_with_http_info(**kwargs) + def create_workflow_description( + self, + body: WorkflowDescriptionRequest, + ) -> WorkflowDescriptionResponse: + """Generate workflow description. + + Generates a description and summary for a workflow based on its specification. + + :type body: WorkflowDescriptionRequest + :rtype: WorkflowDescriptionResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_workflow_description_endpoint.call_with_http_info(**kwargs) + def create_workflow_instance( self, workflow_id: str, @@ -301,6 +567,22 @@ def create_workflow_instance( return self._create_workflow_instance_endpoint.call_with_http_info(**kwargs) + def create_workflow_scaffold_agentic_stream( + self, + body: WorkflowScaffoldAgenticStreamRequest, + ) -> WorkflowScaffoldAgenticStreamResponse: + """Generate workflow scaffold with agentic stream. + + Generates or updates a workflow scaffold using agentic streaming based on user prompts. + + :type body: WorkflowScaffoldAgenticStreamRequest + :rtype: WorkflowScaffoldAgenticStreamResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["body"] = body + + return self._create_workflow_scaffold_agentic_stream_endpoint.call_with_http_info(**kwargs) + def delete_workflow( self, workflow_id: str, diff --git a/src/datadog_api_client/v2/model/action_match.py b/src/datadog_api_client/v2/model/action_match.py new file mode 100644 index 0000000000..455b4b9c77 --- /dev/null +++ b/src/datadog_api_client/v2/model/action_match.py @@ -0,0 +1,45 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class ActionMatch(ModelNormal): + @cached_property + def openapi_types(_): + return { + "action_fqn": (str,), + "description": (str,), + "score": (float,), + } + + attribute_map = { + "action_fqn": "actionFqn", + "description": "description", + "score": "score", + } + + def __init__(self_, action_fqn: str, description: str, score: float, **kwargs): + """ + + + :param action_fqn: The fully qualified name of the action. + :type action_fqn: str + + :param description: The description of the action. + :type description: str + + :param score: The relevance score of the match. + :type score: float + """ + super().__init__(kwargs) + + self_.action_fqn = action_fqn + self_.description = description + self_.score = score diff --git a/src/datadog_api_client/v2/model/agentic_event.py b/src/datadog_api_client/v2/model/agentic_event.py new file mode 100644 index 0000000000..4bd98bf0c3 --- /dev/null +++ b/src/datadog_api_client/v2/model/agentic_event.py @@ -0,0 +1,49 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class AgenticEvent(ModelNormal): + @cached_property + def openapi_types(_): + return { + "message": (str,), + "payload": (dict,), + "type": (str,), + } + + attribute_map = { + "message": "message", + "payload": "payload", + "type": "type", + } + + def __init__(self_, message: str, type: str, payload: Union[dict, UnsetType] = unset, **kwargs): + """ + + + :param message: The message content. + :type message: str + + :param payload: Additional payload data for the event. + :type payload: dict, optional + + :param type: The type of agentic event. + :type type: str + """ + if payload is not unset: + kwargs["payload"] = payload + super().__init__(kwargs) + + self_.message = message + self_.type = type diff --git a/src/datadog_api_client/v2/model/chat_history_item.py b/src/datadog_api_client/v2/model/chat_history_item.py new file mode 100644 index 0000000000..e5869ddd1b --- /dev/null +++ b/src/datadog_api_client/v2/model/chat_history_item.py @@ -0,0 +1,46 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.chat_history_item_role import ChatHistoryItemRole + + +class ChatHistoryItem(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.chat_history_item_role import ChatHistoryItemRole + + return { + "content": (str,), + "role": (ChatHistoryItemRole,), + } + + attribute_map = { + "content": "content", + "role": "role", + } + + def __init__(self_, content: str, role: ChatHistoryItemRole, **kwargs): + """ + + + :param content: The message content. + :type content: str + + :param role: The role of the message sender. + :type role: ChatHistoryItemRole + """ + super().__init__(kwargs) + + self_.content = content + self_.role = role diff --git a/src/datadog_api_client/v2/model/chat_history_item_role.py b/src/datadog_api_client/v2/model/chat_history_item_role.py new file mode 100644 index 0000000000..22f62da2f9 --- /dev/null +++ b/src/datadog_api_client/v2/model/chat_history_item_role.py @@ -0,0 +1,38 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ChatHistoryItemRole(ModelSimple): + """ + The role of the message sender. + + :param value: Must be one of ["user", "assistant"]. + :type value: str + """ + + allowed_values = { + "user", + "assistant", + } + USER: ClassVar["ChatHistoryItemRole"] + ASSISTANT: ClassVar["ChatHistoryItemRole"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ChatHistoryItemRole.USER = ChatHistoryItemRole("user") +ChatHistoryItemRole.ASSISTANT = ChatHistoryItemRole("assistant") diff --git a/src/datadog_api_client/v2/model/chat_message.py b/src/datadog_api_client/v2/model/chat_message.py new file mode 100644 index 0000000000..1142d94948 --- /dev/null +++ b/src/datadog_api_client/v2/model/chat_message.py @@ -0,0 +1,75 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.chat_message_role import ChatMessageRole + + +class ChatMessage(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.chat_message_role import ChatMessageRole + + return { + "chat_id": (str,), + "content": (str,), + "id": (str,), + "role": (ChatMessageRole,), + "user_uuid": (str,), + } + + attribute_map = { + "chat_id": "chatId", + "content": "content", + "id": "id", + "role": "role", + "user_uuid": "userUuid", + } + + def __init__( + self_, + chat_id: str, + content: str, + id: str, + role: ChatMessageRole, + user_uuid: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + + + :param chat_id: The chat ID. + :type chat_id: str + + :param content: The message content. + :type content: str + + :param id: The message ID. + :type id: str + + :param role: The role of the message sender. + :type role: ChatMessageRole + + :param user_uuid: The UUID of the user who sent the message. + :type user_uuid: str, optional + """ + if user_uuid is not unset: + kwargs["user_uuid"] = user_uuid + super().__init__(kwargs) + + self_.chat_id = chat_id + self_.content = content + self_.id = id + self_.role = role diff --git a/src/datadog_api_client/v2/model/chat_message_role.py b/src/datadog_api_client/v2/model/chat_message_role.py new file mode 100644 index 0000000000..97f36ac721 --- /dev/null +++ b/src/datadog_api_client/v2/model/chat_message_role.py @@ -0,0 +1,41 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ChatMessageRole(ModelSimple): + """ + The role of the message sender. + + :param value: Must be one of ["user", "assistant", "system"]. + :type value: str + """ + + allowed_values = { + "user", + "assistant", + "system", + } + USER: ClassVar["ChatMessageRole"] + ASSISTANT: ClassVar["ChatMessageRole"] + SYSTEM: ClassVar["ChatMessageRole"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ChatMessageRole.USER = ChatMessageRole("user") +ChatMessageRole.ASSISTANT = ChatMessageRole("assistant") +ChatMessageRole.SYSTEM = ChatMessageRole("system") diff --git a/src/datadog_api_client/v2/model/client_type.py b/src/datadog_api_client/v2/model/client_type.py new file mode 100644 index 0000000000..35a07f1750 --- /dev/null +++ b/src/datadog_api_client/v2/model/client_type.py @@ -0,0 +1,41 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ClientType(ModelSimple): + """ + The client type for action filtering. + + :param value: Must be one of ["workflows", "app_builder", "actions_api"]. + :type value: str + """ + + allowed_values = { + "workflows", + "app_builder", + "actions_api", + } + WORKFLOWS: ClassVar["ClientType"] + APP_BUILDER: ClassVar["ClientType"] + ACTIONS_API: ClassVar["ClientType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ClientType.WORKFLOWS = ClientType("workflows") +ClientType.APP_BUILDER = ClientType("app_builder") +ClientType.ACTIONS_API = ClientType("actions_api") diff --git a/src/datadog_api_client/v2/model/custom_agent_conversation_request.py b/src/datadog_api_client/v2/model/custom_agent_conversation_request.py new file mode 100644 index 0000000000..876aed936f --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_agent_conversation_request.py @@ -0,0 +1,56 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class CustomAgentConversationRequest(ModelNormal): + @cached_property + def openapi_types(_): + return { + "conversation_id": (str,), + "output_schema": (dict,), + "user_prompt": (str,), + } + + attribute_map = { + "conversation_id": "conversationId", + "output_schema": "outputSchema", + "user_prompt": "userPrompt", + } + + def __init__( + self_, + user_prompt: str, + conversation_id: Union[str, UnsetType] = unset, + output_schema: Union[dict, UnsetType] = unset, + **kwargs, + ): + """ + + + :param conversation_id: The conversation ID to continue an existing conversation. + :type conversation_id: str, optional + + :param output_schema: Optional JSON schema to structure the output. + :type output_schema: dict, optional + + :param user_prompt: The user's prompt for the conversation. + :type user_prompt: str + """ + if conversation_id is not unset: + kwargs["conversation_id"] = conversation_id + if output_schema is not unset: + kwargs["output_schema"] = output_schema + super().__init__(kwargs) + + self_.user_prompt = user_prompt diff --git a/src/datadog_api_client/v2/model/custom_agent_conversation_stream_response.py b/src/datadog_api_client/v2/model/custom_agent_conversation_stream_response.py new file mode 100644 index 0000000000..c0882ea514 --- /dev/null +++ b/src/datadog_api_client/v2/model/custom_agent_conversation_stream_response.py @@ -0,0 +1,46 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.agentic_event import AgenticEvent + + +class CustomAgentConversationStreamResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.agentic_event import AgenticEvent + + return { + "event": (AgenticEvent,), + "id": (str,), + } + + attribute_map = { + "event": "event", + "id": "id", + } + + def __init__(self_, event: AgenticEvent, id: str, **kwargs): + """ + + + :param event: + :type event: AgenticEvent + + :param id: The conversation ID. + :type id: str + """ + super().__init__(kwargs) + + self_.event = event + self_.id = id diff --git a/src/datadog_api_client/v2/model/data_transformation_context.py b/src/datadog_api_client/v2/model/data_transformation_context.py new file mode 100644 index 0000000000..e2770d3846 --- /dev/null +++ b/src/datadog_api_client/v2/model/data_transformation_context.py @@ -0,0 +1,39 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DataTransformationContext(ModelNormal): + @cached_property + def openapi_types(_): + return { + "context_variables": (str,), + "current_script": (str,), + } + + attribute_map = { + "context_variables": "contextVariables", + "current_script": "currentScript", + } + + def __init__(self_, context_variables: str, current_script: str, **kwargs): + """ + + + :param context_variables: Available context variables for the transformation. + :type context_variables: str + + :param current_script: The current script to modify or enhance. + :type current_script: str + """ + super().__init__(kwargs) + + self_.context_variables = context_variables + self_.current_script = current_script diff --git a/src/datadog_api_client/v2/model/data_transformation_description_request.py b/src/datadog_api_client/v2/model/data_transformation_description_request.py new file mode 100644 index 0000000000..a953027158 --- /dev/null +++ b/src/datadog_api_client/v2/model/data_transformation_description_request.py @@ -0,0 +1,39 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DataTransformationDescriptionRequest(ModelNormal): + @cached_property + def openapi_types(_): + return { + "action_id": (str,), + "script": (str,), + } + + attribute_map = { + "action_id": "actionId", + "script": "script", + } + + def __init__(self_, action_id: str, script: str, **kwargs): + """ + + + :param action_id: The fully qualified name (FQN) of the action. + :type action_id: str + + :param script: The transformation script to describe. + :type script: str + """ + super().__init__(kwargs) + + self_.action_id = action_id + self_.script = script diff --git a/src/datadog_api_client/v2/model/data_transformation_description_response.py b/src/datadog_api_client/v2/model/data_transformation_description_response.py new file mode 100644 index 0000000000..ad88283df2 --- /dev/null +++ b/src/datadog_api_client/v2/model/data_transformation_description_response.py @@ -0,0 +1,45 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DataTransformationDescriptionResponse(ModelNormal): + @cached_property + def openapi_types(_): + return { + "details": (str,), + "id": (str,), + "summary": (str,), + } + + attribute_map = { + "details": "details", + "id": "id", + "summary": "summary", + } + + def __init__(self_, details: str, id: str, summary: str, **kwargs): + """ + + + :param details: Detailed description of the transformation. + :type details: str + + :param id: The generation ID. + :type id: str + + :param summary: A brief summary of the transformation. + :type summary: str + """ + super().__init__(kwargs) + + self_.details = details + self_.id = id + self_.summary = summary diff --git a/src/datadog_api_client/v2/model/data_transformation_language.py b/src/datadog_api_client/v2/model/data_transformation_language.py new file mode 100644 index 0000000000..29d9335d1e --- /dev/null +++ b/src/datadog_api_client/v2/model/data_transformation_language.py @@ -0,0 +1,38 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class DataTransformationLanguage(ModelSimple): + """ + The programming language for the transformation. + + :param value: Must be one of ["javascript", "python"]. + :type value: str + """ + + allowed_values = { + "javascript", + "python", + } + JAVASCRIPT: ClassVar["DataTransformationLanguage"] + PYTHON: ClassVar["DataTransformationLanguage"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +DataTransformationLanguage.JAVASCRIPT = DataTransformationLanguage("javascript") +DataTransformationLanguage.PYTHON = DataTransformationLanguage("python") diff --git a/src/datadog_api_client/v2/model/data_transformation_request.py b/src/datadog_api_client/v2/model/data_transformation_request.py new file mode 100644 index 0000000000..193110563a --- /dev/null +++ b/src/datadog_api_client/v2/model/data_transformation_request.py @@ -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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.chat_history_item import ChatHistoryItem + from datadog_api_client.v2.model.data_transformation_context import DataTransformationContext + from datadog_api_client.v2.model.data_transformation_language import DataTransformationLanguage + + +class DataTransformationRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.chat_history_item import ChatHistoryItem + from datadog_api_client.v2.model.data_transformation_context import DataTransformationContext + from datadog_api_client.v2.model.data_transformation_language import DataTransformationLanguage + + return { + "chat_history": ([ChatHistoryItem],), + "context": (DataTransformationContext,), + "language": (DataTransformationLanguage,), + "stream": (bool,), + "user_prompt": (str,), + } + + attribute_map = { + "chat_history": "chatHistory", + "context": "context", + "language": "language", + "stream": "stream", + "user_prompt": "userPrompt", + } + + def __init__( + self_, + user_prompt: str, + chat_history: Union[List[ChatHistoryItem], UnsetType] = unset, + context: Union[DataTransformationContext, UnsetType] = unset, + language: Union[DataTransformationLanguage, UnsetType] = unset, + stream: Union[bool, UnsetType] = unset, + **kwargs, + ): + """ + + + :param chat_history: Previous chat messages for iterative interaction. + :type chat_history: [ChatHistoryItem], optional + + :param context: + :type context: DataTransformationContext, optional + + :param language: The programming language for the transformation. + :type language: DataTransformationLanguage, optional + + :param stream: Whether to stream the response. + :type stream: bool, optional + + :param user_prompt: The user's prompt describing the desired transformation. + :type user_prompt: str + """ + if chat_history is not unset: + kwargs["chat_history"] = chat_history + if context is not unset: + kwargs["context"] = context + if language is not unset: + kwargs["language"] = language + if stream is not unset: + kwargs["stream"] = stream + super().__init__(kwargs) + + self_.user_prompt = user_prompt diff --git a/src/datadog_api_client/v2/model/data_transformation_stream_response.py b/src/datadog_api_client/v2/model/data_transformation_stream_response.py new file mode 100644 index 0000000000..5e4d07e7d8 --- /dev/null +++ b/src/datadog_api_client/v2/model/data_transformation_stream_response.py @@ -0,0 +1,39 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DataTransformationStreamResponse(ModelNormal): + @cached_property + def openapi_types(_): + return { + "content": (str,), + "id": (str,), + } + + attribute_map = { + "content": "content", + "id": "id", + } + + def __init__(self_, content: str, id: str, **kwargs): + """ + + + :param content: The generated code or explanation chunk. + :type content: str + + :param id: The generation ID. + :type id: str + """ + super().__init__(kwargs) + + self_.content = content + self_.id = id diff --git a/src/datadog_api_client/v2/model/pick_action_request.py b/src/datadog_api_client/v2/model/pick_action_request.py new file mode 100644 index 0000000000..6ba7239edd --- /dev/null +++ b/src/datadog_api_client/v2/model/pick_action_request.py @@ -0,0 +1,78 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.client_type import ClientType + from datadog_api_client.v2.model.stability_level import StabilityLevel + + +class PickActionRequest(ModelNormal): + validations = { + "number_of_relevant_actions": { + "inclusive_maximum": 100, + "inclusive_minimum": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.client_type import ClientType + from datadog_api_client.v2.model.stability_level import StabilityLevel + + return { + "client": (ClientType,), + "number_of_relevant_actions": (int,), + "stability": (StabilityLevel,), + "user_prompt": (str,), + } + + attribute_map = { + "client": "client", + "number_of_relevant_actions": "number_of_relevant_actions", + "stability": "stability", + "user_prompt": "user_prompt", + } + + def __init__( + self_, + number_of_relevant_actions: int, + user_prompt: str, + client: Union[ClientType, UnsetType] = unset, + stability: Union[StabilityLevel, UnsetType] = unset, + **kwargs, + ): + """ + + + :param client: The client type for action filtering. + :type client: ClientType, optional + + :param number_of_relevant_actions: The number of relevant actions to return. + :type number_of_relevant_actions: int + + :param stability: The stability level for action filtering. + :type stability: StabilityLevel, optional + + :param user_prompt: The user's prompt to find relevant actions. + :type user_prompt: str + """ + if client is not unset: + kwargs["client"] = client + if stability is not unset: + kwargs["stability"] = stability + super().__init__(kwargs) + + self_.number_of_relevant_actions = number_of_relevant_actions + self_.user_prompt = user_prompt diff --git a/src/datadog_api_client/v2/model/pick_action_response.py b/src/datadog_api_client/v2/model/pick_action_response.py new file mode 100644 index 0000000000..ef1300d2b9 --- /dev/null +++ b/src/datadog_api_client/v2/model/pick_action_response.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.action_match import ActionMatch + + +class PickActionResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.action_match import ActionMatch + + return { + "matches": ([ActionMatch],), + "request_id": (str,), + "total_matches": (int,), + } + + attribute_map = { + "matches": "matches", + "request_id": "request_id", + "total_matches": "total_matches", + } + + def __init__(self_, matches: List[ActionMatch], request_id: str, total_matches: int, **kwargs): + """ + + + :param matches: The matching actions. + :type matches: [ActionMatch] + + :param request_id: The request ID. + :type request_id: str + + :param total_matches: The total number of matches. + :type total_matches: int + """ + super().__init__(kwargs) + + self_.matches = matches + self_.request_id = request_id + self_.total_matches = total_matches diff --git a/src/datadog_api_client/v2/model/pick_remediation_from_investigation_request.py b/src/datadog_api_client/v2/model/pick_remediation_from_investigation_request.py new file mode 100644 index 0000000000..4551194e05 --- /dev/null +++ b/src/datadog_api_client/v2/model/pick_remediation_from_investigation_request.py @@ -0,0 +1,94 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.client_type import ClientType + from datadog_api_client.v2.model.stability_level import StabilityLevel + + +class PickRemediationFromInvestigationRequest(ModelNormal): + validations = { + "number_of_relevant_actions": { + "inclusive_maximum": 100, + "inclusive_minimum": 1, + }, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.client_type import ClientType + from datadog_api_client.v2.model.stability_level import StabilityLevel + + return { + "client": (ClientType,), + "integrations": ([str],), + "investigation": (str,), + "number_of_keyword_variants": (int,), + "number_of_relevant_actions": (int,), + "stability": (StabilityLevel,), + } + + attribute_map = { + "client": "client", + "integrations": "integrations", + "investigation": "investigation", + "number_of_keyword_variants": "number_of_keyword_variants", + "number_of_relevant_actions": "number_of_relevant_actions", + "stability": "stability", + } + + def __init__( + self_, + investigation: str, + number_of_relevant_actions: int, + client: Union[ClientType, UnsetType] = unset, + integrations: Union[List[str], UnsetType] = unset, + number_of_keyword_variants: Union[int, UnsetType] = unset, + stability: Union[StabilityLevel, UnsetType] = unset, + **kwargs, + ): + """ + + + :param client: The client type for action filtering. + :type client: ClientType, optional + + :param integrations: List of integrations to filter actions by. + :type integrations: [str], optional + + :param investigation: The investigation text to extract remediation keywords from. + :type investigation: str + + :param number_of_keyword_variants: The number of keyword variants to generate. + :type number_of_keyword_variants: int, optional + + :param number_of_relevant_actions: The number of relevant actions to return per keyword. + :type number_of_relevant_actions: int + + :param stability: The stability level for action filtering. + :type stability: StabilityLevel, optional + """ + if client is not unset: + kwargs["client"] = client + if integrations is not unset: + kwargs["integrations"] = integrations + if number_of_keyword_variants is not unset: + kwargs["number_of_keyword_variants"] = number_of_keyword_variants + if stability is not unset: + kwargs["stability"] = stability + super().__init__(kwargs) + + self_.investigation = investigation + self_.number_of_relevant_actions = number_of_relevant_actions diff --git a/src/datadog_api_client/v2/model/pick_remediation_from_investigation_response.py b/src/datadog_api_client/v2/model/pick_remediation_from_investigation_response.py new file mode 100644 index 0000000000..94688b740b --- /dev/null +++ b/src/datadog_api_client/v2/model/pick_remediation_from_investigation_response.py @@ -0,0 +1,60 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.action_match import ActionMatch + + +class PickRemediationFromInvestigationResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.action_match import ActionMatch + + return { + "keywords_used": ([str],), + "matches": ([ActionMatch],), + "request_id": (str,), + "total_matches": (int,), + } + + attribute_map = { + "keywords_used": "keywords_used", + "matches": "matches", + "request_id": "request_id", + "total_matches": "total_matches", + } + + def __init__( + self_, keywords_used: List[str], matches: List[ActionMatch], request_id: str, total_matches: int, **kwargs + ): + """ + + + :param keywords_used: The keywords generated and used for finding actions. + :type keywords_used: [str] + + :param matches: The matching actions. + :type matches: [ActionMatch] + + :param request_id: The request ID. + :type request_id: str + + :param total_matches: The total number of matches. + :type total_matches: int + """ + super().__init__(kwargs) + + self_.keywords_used = keywords_used + self_.matches = matches + self_.request_id = request_id + self_.total_matches = total_matches diff --git a/src/datadog_api_client/v2/model/stability_level.py b/src/datadog_api_client/v2/model/stability_level.py new file mode 100644 index 0000000000..8c8bcf01b2 --- /dev/null +++ b/src/datadog_api_client/v2/model/stability_level.py @@ -0,0 +1,44 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class StabilityLevel(ModelSimple): + """ + The stability level for action filtering. + + :param value: Must be one of ["UNSPECIFIED", "DEV", "BETA", "STABLE"]. + :type value: str + """ + + allowed_values = { + "UNSPECIFIED", + "DEV", + "BETA", + "STABLE", + } + UNSPECIFIED: ClassVar["StabilityLevel"] + DEV: ClassVar["StabilityLevel"] + BETA: ClassVar["StabilityLevel"] + STABLE: ClassVar["StabilityLevel"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +StabilityLevel.UNSPECIFIED = StabilityLevel("UNSPECIFIED") +StabilityLevel.DEV = StabilityLevel("DEV") +StabilityLevel.BETA = StabilityLevel("BETA") +StabilityLevel.STABLE = StabilityLevel("STABLE") diff --git a/src/datadog_api_client/v2/model/stream_event_v1.py b/src/datadog_api_client/v2/model/stream_event_v1.py new file mode 100644 index 0000000000..59fb8cc3b8 --- /dev/null +++ b/src/datadog_api_client/v2/model/stream_event_v1.py @@ -0,0 +1,43 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class StreamEventV1(ModelNormal): + @cached_property + def openapi_types(_): + return { + "data": (dict,), + "type": (str,), + } + + attribute_map = { + "data": "data", + "type": "type", + } + + def __init__(self_, type: str, data: Union[dict, UnsetType] = unset, **kwargs): + """ + + + :param data: The event data payload. + :type data: dict, optional + + :param type: The type of stream event. + :type type: str + """ + if data is not unset: + kwargs["data"] = data + super().__init__(kwargs) + + self_.type = type diff --git a/src/datadog_api_client/v2/model/user_context.py b/src/datadog_api_client/v2/model/user_context.py new file mode 100644 index 0000000000..2fdc559653 --- /dev/null +++ b/src/datadog_api_client/v2/model/user_context.py @@ -0,0 +1,40 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.user_info import UserInfo + + +class UserContext(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.user_info import UserInfo + + return { + "user_info": (UserInfo,), + } + + attribute_map = { + "user_info": "userInfo", + } + + def __init__(self_, user_info: UserInfo, **kwargs): + """ + + + :param user_info: + :type user_info: UserInfo + """ + super().__init__(kwargs) + + self_.user_info = user_info diff --git a/src/datadog_api_client/v2/model/user_info.py b/src/datadog_api_client/v2/model/user_info.py new file mode 100644 index 0000000000..30f02dc92f --- /dev/null +++ b/src/datadog_api_client/v2/model/user_info.py @@ -0,0 +1,57 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class UserInfo(ModelNormal): + @cached_property + def openapi_types(_): + return { + "org_name": (str,), + "user_email": (str,), + "user_name": (str,), + "user_uuid": (str,), + } + + attribute_map = { + "org_name": "orgName", + "user_email": "userEmail", + "user_name": "userName", + "user_uuid": "userUUID", + } + + def __init__( + self_, org_name: str, user_email: str, user_uuid: str, user_name: Union[str, UnsetType] = unset, **kwargs + ): + """ + + + :param org_name: The organization name. + :type org_name: str + + :param user_email: The user's email address. + :type user_email: str + + :param user_name: The user's name. + :type user_name: str, optional + + :param user_uuid: The user's UUID. + :type user_uuid: str + """ + if user_name is not unset: + kwargs["user_name"] = user_name + super().__init__(kwargs) + + self_.org_name = org_name + self_.user_email = user_email + self_.user_uuid = user_uuid diff --git a/src/datadog_api_client/v2/model/workflow_description_request.py b/src/datadog_api_client/v2/model/workflow_description_request.py new file mode 100644 index 0000000000..51f5e403b2 --- /dev/null +++ b/src/datadog_api_client/v2/model/workflow_description_request.py @@ -0,0 +1,39 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class WorkflowDescriptionRequest(ModelNormal): + @cached_property + def openapi_types(_): + return { + "name": (str,), + "spec": (dict,), + } + + attribute_map = { + "name": "name", + "spec": "spec", + } + + def __init__(self_, name: str, spec: dict, **kwargs): + """ + + + :param name: The name of the workflow. + :type name: str + + :param spec: The workflow specification as a JSON object. + :type spec: dict + """ + super().__init__(kwargs) + + self_.name = name + self_.spec = spec diff --git a/src/datadog_api_client/v2/model/workflow_description_response.py b/src/datadog_api_client/v2/model/workflow_description_response.py new file mode 100644 index 0000000000..fd9e8666d2 --- /dev/null +++ b/src/datadog_api_client/v2/model/workflow_description_response.py @@ -0,0 +1,45 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class WorkflowDescriptionResponse(ModelNormal): + @cached_property + def openapi_types(_): + return { + "description": (str,), + "id": (str,), + "summary": (str,), + } + + attribute_map = { + "description": "description", + "id": "id", + "summary": "summary", + } + + def __init__(self_, description: str, id: str, summary: str, **kwargs): + """ + + + :param description: The generated workflow description. + :type description: str + + :param id: The generation ID. + :type id: str + + :param summary: A brief summary of the workflow. + :type summary: str + """ + super().__init__(kwargs) + + self_.description = description + self_.id = id + self_.summary = summary diff --git a/src/datadog_api_client/v2/model/workflow_scaffold_agentic_stream_request.py b/src/datadog_api_client/v2/model/workflow_scaffold_agentic_stream_request.py new file mode 100644 index 0000000000..e57197b85c --- /dev/null +++ b/src/datadog_api_client/v2/model/workflow_scaffold_agentic_stream_request.py @@ -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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.chat_message import ChatMessage + from datadog_api_client.v2.model.user_context import UserContext + + +class WorkflowScaffoldAgenticStreamRequest(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.chat_message import ChatMessage + from datadog_api_client.v2.model.user_context import UserContext + + return { + "chat_history": ([ChatMessage],), + "existing_workflow": (dict,), + "previous_action": (str,), + "user_context": (UserContext,), + "user_prompt": (str,), + } + + attribute_map = { + "chat_history": "chatHistory", + "existing_workflow": "existingWorkflow", + "previous_action": "previousAction", + "user_context": "userContext", + "user_prompt": "userPrompt", + } + + def __init__( + self_, + user_prompt: str, + chat_history: Union[List[ChatMessage], UnsetType] = unset, + existing_workflow: Union[dict, UnsetType] = unset, + previous_action: Union[str, UnsetType] = unset, + user_context: Union[UserContext, UnsetType] = unset, + **kwargs, + ): + """ + + + :param chat_history: Previous chat messages for iterative workflow generation. + :type chat_history: [ChatMessage], optional + + :param existing_workflow: The existing workflow specification to modify. + :type existing_workflow: dict, optional + + :param previous_action: The previous action taken in the workflow generation. + :type previous_action: str, optional + + :param user_context: + :type user_context: UserContext, optional + + :param user_prompt: The user's prompt for generating or modifying the workflow. + :type user_prompt: str + """ + if chat_history is not unset: + kwargs["chat_history"] = chat_history + if existing_workflow is not unset: + kwargs["existing_workflow"] = existing_workflow + if previous_action is not unset: + kwargs["previous_action"] = previous_action + if user_context is not unset: + kwargs["user_context"] = user_context + super().__init__(kwargs) + + self_.user_prompt = user_prompt diff --git a/src/datadog_api_client/v2/model/workflow_scaffold_agentic_stream_response.py b/src/datadog_api_client/v2/model/workflow_scaffold_agentic_stream_response.py new file mode 100644 index 0000000000..7040fe9f4f --- /dev/null +++ b/src/datadog_api_client/v2/model/workflow_scaffold_agentic_stream_response.py @@ -0,0 +1,46 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.stream_event_v1 import StreamEventV1 + + +class WorkflowScaffoldAgenticStreamResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.stream_event_v1 import StreamEventV1 + + return { + "event": (StreamEventV1,), + "id": (str,), + } + + attribute_map = { + "event": "event", + "id": "id", + } + + def __init__(self_, event: StreamEventV1, id: str, **kwargs): + """ + + + :param event: + :type event: StreamEventV1 + + :param id: The generation ID. + :type id: str + """ + super().__init__(kwargs) + + self_.event = event + self_.id = id diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 2eece21eff..925d553862 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -108,6 +108,7 @@ from datadog_api_client.v2.model.action_connection_data_update import ActionConnectionDataUpdate from datadog_api_client.v2.model.action_connection_integration import ActionConnectionIntegration from datadog_api_client.v2.model.action_connection_integration_update import ActionConnectionIntegrationUpdate +from datadog_api_client.v2.model.action_match import ActionMatch from datadog_api_client.v2.model.action_query import ActionQuery from datadog_api_client.v2.model.action_query_condition import ActionQueryCondition from datadog_api_client.v2.model.action_query_debounce_in_ms import ActionQueryDebounceInMs @@ -131,6 +132,7 @@ from datadog_api_client.v2.model.active_billing_dimensions_type import ActiveBillingDimensionsType from datadog_api_client.v2.model.add_member_team_request import AddMemberTeamRequest from datadog_api_client.v2.model.advisory import Advisory +from datadog_api_client.v2.model.agentic_event import AgenticEvent from datadog_api_client.v2.model.alert_event_attributes import AlertEventAttributes from datadog_api_client.v2.model.alert_event_attributes_links_item import AlertEventAttributesLinksItem from datadog_api_client.v2.model.alert_event_attributes_links_item_category import AlertEventAttributesLinksItemCategory @@ -762,6 +764,10 @@ ) from datadog_api_client.v2.model.change_event_trigger_wrapper import ChangeEventTriggerWrapper from datadog_api_client.v2.model.chargeback_breakdown import ChargebackBreakdown +from datadog_api_client.v2.model.chat_history_item import ChatHistoryItem +from datadog_api_client.v2.model.chat_history_item_role import ChatHistoryItemRole +from datadog_api_client.v2.model.chat_message import ChatMessage +from datadog_api_client.v2.model.chat_message_role import ChatMessageRole from datadog_api_client.v2.model.circle_ciapi_key import CircleCIAPIKey from datadog_api_client.v2.model.circle_ciapi_key_type import CircleCIAPIKeyType from datadog_api_client.v2.model.circle_ciapi_key_update import CircleCIAPIKeyUpdate @@ -778,6 +784,7 @@ from datadog_api_client.v2.model.clickup_integration import ClickupIntegration from datadog_api_client.v2.model.clickup_integration_type import ClickupIntegrationType from datadog_api_client.v2.model.clickup_integration_update import ClickupIntegrationUpdate +from datadog_api_client.v2.model.client_type import ClientType from datadog_api_client.v2.model.cloud_asset_type import CloudAssetType from datadog_api_client.v2.model.cloud_configuration_compliance_rule_options import ( CloudConfigurationComplianceRuleOptions, @@ -1261,6 +1268,8 @@ ) from datadog_api_client.v2.model.csm_serverless_coverage_analysis_data import CsmServerlessCoverageAnalysisData from datadog_api_client.v2.model.csm_serverless_coverage_analysis_response import CsmServerlessCoverageAnalysisResponse +from datadog_api_client.v2.model.custom_agent_conversation_request import CustomAgentConversationRequest +from datadog_api_client.v2.model.custom_agent_conversation_stream_response import CustomAgentConversationStreamResponse from datadog_api_client.v2.model.custom_attribute_config import CustomAttributeConfig from datadog_api_client.v2.model.custom_attribute_config_attributes_create import CustomAttributeConfigAttributesCreate from datadog_api_client.v2.model.custom_attribute_config_create import CustomAttributeConfigCreate @@ -1495,6 +1504,12 @@ from datadog_api_client.v2.model.data_transform import DataTransform from datadog_api_client.v2.model.data_transform_properties import DataTransformProperties from datadog_api_client.v2.model.data_transform_type import DataTransformType +from datadog_api_client.v2.model.data_transformation_context import DataTransformationContext +from datadog_api_client.v2.model.data_transformation_description_request import DataTransformationDescriptionRequest +from datadog_api_client.v2.model.data_transformation_description_response import DataTransformationDescriptionResponse +from datadog_api_client.v2.model.data_transformation_language import DataTransformationLanguage +from datadog_api_client.v2.model.data_transformation_request import DataTransformationRequest +from datadog_api_client.v2.model.data_transformation_stream_response import DataTransformationStreamResponse from datadog_api_client.v2.model.database_monitoring_trigger_wrapper import DatabaseMonitoringTriggerWrapper from datadog_api_client.v2.model.datadog_api_key import DatadogAPIKey from datadog_api_client.v2.model.datadog_api_key_type import DatadogAPIKeyType @@ -4055,6 +4070,14 @@ from datadog_api_client.v2.model.permission_attributes import PermissionAttributes from datadog_api_client.v2.model.permissions_response import PermissionsResponse from datadog_api_client.v2.model.permissions_type import PermissionsType +from datadog_api_client.v2.model.pick_action_request import PickActionRequest +from datadog_api_client.v2.model.pick_action_response import PickActionResponse +from datadog_api_client.v2.model.pick_remediation_from_investigation_request import ( + PickRemediationFromInvestigationRequest, +) +from datadog_api_client.v2.model.pick_remediation_from_investigation_response import ( + PickRemediationFromInvestigationResponse, +) from datadog_api_client.v2.model.playlist import Playlist from datadog_api_client.v2.model.playlist_array import PlaylistArray from datadog_api_client.v2.model.playlist_data import PlaylistData @@ -5343,6 +5366,7 @@ from datadog_api_client.v2.model.split_integration import SplitIntegration from datadog_api_client.v2.model.split_integration_type import SplitIntegrationType from datadog_api_client.v2.model.split_integration_update import SplitIntegrationUpdate +from datadog_api_client.v2.model.stability_level import StabilityLevel from datadog_api_client.v2.model.state import State from datadog_api_client.v2.model.state_variable import StateVariable from datadog_api_client.v2.model.state_variable_properties import StateVariableProperties @@ -5485,6 +5509,7 @@ from datadog_api_client.v2.model.step import Step from datadog_api_client.v2.model.step_display import StepDisplay from datadog_api_client.v2.model.step_display_bounds import StepDisplayBounds +from datadog_api_client.v2.model.stream_event_v1 import StreamEventV1 from datadog_api_client.v2.model.suite_create_edit import SuiteCreateEdit from datadog_api_client.v2.model.suite_create_edit_request import SuiteCreateEditRequest from datadog_api_client.v2.model.suite_search_response_type import SuiteSearchResponseType @@ -5902,9 +5927,11 @@ from datadog_api_client.v2.model.user import User from datadog_api_client.v2.model.user_attributes import UserAttributes from datadog_api_client.v2.model.user_attributes_status import UserAttributesStatus +from datadog_api_client.v2.model.user_context import UserContext from datadog_api_client.v2.model.user_create_attributes import UserCreateAttributes from datadog_api_client.v2.model.user_create_data import UserCreateData from datadog_api_client.v2.model.user_create_request import UserCreateRequest +from datadog_api_client.v2.model.user_info import UserInfo from datadog_api_client.v2.model.user_invitation_data import UserInvitationData from datadog_api_client.v2.model.user_invitation_data_attributes import UserInvitationDataAttributes from datadog_api_client.v2.model.user_invitation_relationships import UserInvitationRelationships @@ -5998,6 +6025,8 @@ from datadog_api_client.v2.model.workflow_data_type import WorkflowDataType from datadog_api_client.v2.model.workflow_data_update import WorkflowDataUpdate from datadog_api_client.v2.model.workflow_data_update_attributes import WorkflowDataUpdateAttributes +from datadog_api_client.v2.model.workflow_description_request import WorkflowDescriptionRequest +from datadog_api_client.v2.model.workflow_description_response import WorkflowDescriptionResponse from datadog_api_client.v2.model.workflow_instance_create_meta import WorkflowInstanceCreateMeta from datadog_api_client.v2.model.workflow_instance_create_request import WorkflowInstanceCreateRequest from datadog_api_client.v2.model.workflow_instance_create_response import WorkflowInstanceCreateResponse @@ -6006,6 +6035,8 @@ from datadog_api_client.v2.model.workflow_list_instances_response import WorkflowListInstancesResponse from datadog_api_client.v2.model.workflow_list_instances_response_meta import WorkflowListInstancesResponseMeta from datadog_api_client.v2.model.workflow_list_instances_response_meta_page import WorkflowListInstancesResponseMetaPage +from datadog_api_client.v2.model.workflow_scaffold_agentic_stream_request import WorkflowScaffoldAgenticStreamRequest +from datadog_api_client.v2.model.workflow_scaffold_agentic_stream_response import WorkflowScaffoldAgenticStreamResponse from datadog_api_client.v2.model.workflow_trigger_wrapper import WorkflowTriggerWrapper from datadog_api_client.v2.model.workflow_user_relationship import WorkflowUserRelationship from datadog_api_client.v2.model.workflow_user_relationship_data import WorkflowUserRelationshipData @@ -6122,6 +6153,7 @@ "ActionConnectionDataUpdate", "ActionConnectionIntegration", "ActionConnectionIntegrationUpdate", + "ActionMatch", "ActionQuery", "ActionQueryCondition", "ActionQueryDebounceInMs", @@ -6145,6 +6177,7 @@ "ActiveBillingDimensionsType", "AddMemberTeamRequest", "Advisory", + "AgenticEvent", "AlertEventAttributes", "AlertEventAttributesLinksItem", "AlertEventAttributesLinksItemCategory", @@ -6610,6 +6643,10 @@ "ChangeEventCustomAttributesImpactedResourcesItemsType", "ChangeEventTriggerWrapper", "ChargebackBreakdown", + "ChatHistoryItem", + "ChatHistoryItemRole", + "ChatMessage", + "ChatMessageRole", "CircleCIAPIKey", "CircleCIAPIKeyType", "CircleCIAPIKeyUpdate", @@ -6626,6 +6663,7 @@ "ClickupIntegration", "ClickupIntegrationType", "ClickupIntegrationUpdate", + "ClientType", "CloudAssetType", "CloudConfigurationComplianceRuleOptions", "CloudConfigurationRegoRule", @@ -6943,6 +6981,8 @@ "CsmServerlessCoverageAnalysisAttributes", "CsmServerlessCoverageAnalysisData", "CsmServerlessCoverageAnalysisResponse", + "CustomAgentConversationRequest", + "CustomAgentConversationStreamResponse", "CustomAttributeConfig", "CustomAttributeConfigAttributesCreate", "CustomAttributeConfigCreate", @@ -7105,6 +7145,12 @@ "DataTransform", "DataTransformProperties", "DataTransformType", + "DataTransformationContext", + "DataTransformationDescriptionRequest", + "DataTransformationDescriptionResponse", + "DataTransformationLanguage", + "DataTransformationRequest", + "DataTransformationStreamResponse", "DatabaseMonitoringTriggerWrapper", "DatadogAPIKey", "DatadogAPIKeyType", @@ -8855,6 +8901,10 @@ "PermissionAttributes", "PermissionsResponse", "PermissionsType", + "PickActionRequest", + "PickActionResponse", + "PickRemediationFromInvestigationRequest", + "PickRemediationFromInvestigationResponse", "Playlist", "PlaylistArray", "PlaylistData", @@ -9815,6 +9865,7 @@ "SplitIntegration", "SplitIntegrationType", "SplitIntegrationUpdate", + "StabilityLevel", "State", "StateVariable", "StateVariableProperties", @@ -9889,6 +9940,7 @@ "Step", "StepDisplay", "StepDisplayBounds", + "StreamEventV1", "SuiteCreateEdit", "SuiteCreateEditRequest", "SuiteSearchResponseType", @@ -10204,9 +10256,11 @@ "User", "UserAttributes", "UserAttributesStatus", + "UserContext", "UserCreateAttributes", "UserCreateData", "UserCreateRequest", + "UserInfo", "UserInvitationData", "UserInvitationDataAttributes", "UserInvitationRelationships", @@ -10298,6 +10352,8 @@ "WorkflowDataType", "WorkflowDataUpdate", "WorkflowDataUpdateAttributes", + "WorkflowDescriptionRequest", + "WorkflowDescriptionResponse", "WorkflowInstanceCreateMeta", "WorkflowInstanceCreateRequest", "WorkflowInstanceCreateResponse", @@ -10306,6 +10362,8 @@ "WorkflowListInstancesResponse", "WorkflowListInstancesResponseMeta", "WorkflowListInstancesResponseMetaPage", + "WorkflowScaffoldAgenticStreamRequest", + "WorkflowScaffoldAgenticStreamResponse", "WorkflowTriggerWrapper", "WorkflowUserRelationship", "WorkflowUserRelationshipData", diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 75d0d7f71e..aa562d9da7 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -178,6 +178,14 @@ "type": "idempotent" } }, + "CreateCustomAgentConversation": { + "tag": "Workflow Automation", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, "ListAppKeyRegistrations": { "tag": "Action Connection", "undo": { @@ -5799,6 +5807,54 @@ "type": "safe" } }, + "CreateDataTransformation": { + "tag": "Workflow Automation", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "CreateDataTransformationDescription": { + "tag": "Workflow Automation", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "CreateWorkflowDescription": { + "tag": "Workflow Automation", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "CreatePickAction": { + "tag": "Workflow Automation", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "CreatePickRemediationFromInvestigation": { + "tag": "Workflow Automation", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, + "CreateWorkflowScaffoldAgenticStream": { + "tag": "Workflow Automation", + "undo": { + "operationId": "TODO", + "parameters": [], + "type": "unsafe" + } + }, "CreateWorkflow": { "tag": "Workflow Automation", "undo": { diff --git a/tests/v2/features/workflow_automation.feature b/tests/v2/features/workflow_automation.feature index df51d50139..9ceb0da6c1 100644 --- a/tests/v2/features/workflow_automation.feature +++ b/tests/v2/features/workflow_automation.feature @@ -51,6 +51,33 @@ Feature: Workflow Automation When the request is sent Then the response status is 201 Successfully created a workflow. + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Create a custom agent conversation returns "Bad Request" response + Given operation "CreateCustomAgentConversation" enabled + And new "CreateCustomAgentConversation" request + And request contains "custom_agent_id" parameter from "REPLACE.ME" + And body with value {"conversationId": "550e8400-e29b-41d4-a716-446655440000", "userPrompt": "What is the weather like today?"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Create a custom agent conversation returns "Not Found" response + Given operation "CreateCustomAgentConversation" enabled + And new "CreateCustomAgentConversation" request + And request contains "custom_agent_id" parameter from "REPLACE.ME" + And body with value {"conversationId": "550e8400-e29b-41d4-a716-446655440000", "userPrompt": "What is the weather like today?"} + When the request is sent + Then the response status is 404 Not Found + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Create a custom agent conversation returns "OK" response + Given operation "CreateCustomAgentConversation" enabled + And new "CreateCustomAgentConversation" request + And request contains "custom_agent_id" parameter from "REPLACE.ME" + And body with value {"conversationId": "550e8400-e29b-41d4-a716-446655440000", "userPrompt": "What is the weather like today?"} + When the request is sent + Then the response status is 200 OK + @team:DataDog/workflow-automation-dev Scenario: Delete an existing Workflow returns "Not found" response Given new "DeleteWorkflow" request @@ -82,6 +109,70 @@ Feature: Workflow Automation When the request is sent Then the response status is 200 Created + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Generate data transformation code returns "Bad Request" response + Given operation "CreateDataTransformation" enabled + And new "CreateDataTransformation" request + And body with value {"chatHistory": [{"content": "Please add error handling", "role": "user"}], "context": {"contextVariables": "{ \"timestamp\": 1234567890 }", "currentScript": "return data.timestamp;"}, "language": "javascript", "stream": true, "userPrompt": "Convert timestamp to ISO format"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Generate data transformation code returns "OK" response + Given operation "CreateDataTransformation" enabled + And new "CreateDataTransformation" request + And body with value {"chatHistory": [{"content": "Please add error handling", "role": "user"}], "context": {"contextVariables": "{ \"timestamp\": 1234567890 }", "currentScript": "return data.timestamp;"}, "language": "javascript", "stream": true, "userPrompt": "Convert timestamp to ISO format"} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Generate data transformation description returns "Bad Request" response + Given operation "CreateDataTransformationDescription" enabled + And new "CreateDataTransformationDescription" request + And body with value {"actionId": "com.datadoghq.transform.timestamp", "script": "return new Date(data.timestamp).toISOString();"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Generate data transformation description returns "OK" response + Given operation "CreateDataTransformationDescription" enabled + And new "CreateDataTransformationDescription" request + And body with value {"actionId": "com.datadoghq.transform.timestamp", "script": "return new Date(data.timestamp).toISOString();"} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Generate workflow description returns "Bad Request" response + Given operation "CreateWorkflowDescription" enabled + And new "CreateWorkflowDescription" request + And body with value {"name": "Alert Response Workflow", "spec": {"steps": [{"actionId": "com.datadoghq.slack.send_message", "name": "Send notification"}]}} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Generate workflow description returns "OK" response + Given operation "CreateWorkflowDescription" enabled + And new "CreateWorkflowDescription" request + And body with value {"name": "Alert Response Workflow", "spec": {"steps": [{"actionId": "com.datadoghq.slack.send_message", "name": "Send notification"}]}} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Generate workflow scaffold with agentic stream returns "Bad Request" response + Given operation "CreateWorkflowScaffoldAgenticStream" enabled + And new "CreateWorkflowScaffoldAgenticStream" request + And body with value {"chatHistory": [{"chatId": "chat-456", "content": "Add error handling to the workflow", "id": "msg-123", "role": "user", "userUuid": "550e8400-e29b-41d4-a716-446655440000"}], "previousAction": "created_initial_scaffold", "userContext": {"userInfo": {"orgName": "Acme Corp", "userEmail": "john.doe@example.com", "userName": "John Doe", "userUUID": "550e8400-e29b-41d4-a716-446655440000"}}, "userPrompt": "Create a workflow to restart a service when CPU is high"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Generate workflow scaffold with agentic stream returns "OK" response + Given operation "CreateWorkflowScaffoldAgenticStream" enabled + And new "CreateWorkflowScaffoldAgenticStream" request + And body with value {"chatHistory": [{"chatId": "chat-456", "content": "Add error handling to the workflow", "id": "msg-123", "role": "user", "userUuid": "550e8400-e29b-41d4-a716-446655440000"}], "previousAction": "created_initial_scaffold", "userContext": {"userInfo": {"orgName": "Acme Corp", "userEmail": "john.doe@example.com", "userName": "John Doe", "userUUID": "550e8400-e29b-41d4-a716-446655440000"}}, "userPrompt": "Create a workflow to restart a service when CPU is high"} + When the request is sent + Then the response status is 200 OK + @replay-only @team:DataDog/workflow-automation-dev Scenario: Get a workflow instance returns "Bad Request" response Given new "GetWorkflowInstance" request @@ -142,6 +233,38 @@ Feature: Workflow Automation When the request is sent Then the response status is 200 OK + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Pick relevant actions returns "Bad Request" response + Given operation "CreatePickAction" enabled + And new "CreatePickAction" request + And body with value {"client": "workflows", "number_of_relevant_actions": 5, "stability": "STABLE", "user_prompt": "Send a Slack message"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Pick relevant actions returns "OK" response + Given operation "CreatePickAction" enabled + And new "CreatePickAction" request + And body with value {"client": "workflows", "number_of_relevant_actions": 5, "stability": "STABLE", "user_prompt": "Send a Slack message"} + When the request is sent + Then the response status is 200 OK + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Pick remediation actions from investigation returns "Bad Request" response + Given operation "CreatePickRemediationFromInvestigation" enabled + And new "CreatePickRemediationFromInvestigation" request + And body with value {"client": "workflows", "integrations": ["aws", "datadog"], "investigation": "High CPU usage detected on prod-server-01", "number_of_keyword_variants": 2, "number_of_relevant_actions": 5, "stability": "STABLE"} + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/workflow-automation-backend + Scenario: Pick remediation actions from investigation returns "OK" response + Given operation "CreatePickRemediationFromInvestigation" enabled + And new "CreatePickRemediationFromInvestigation" request + And body with value {"client": "workflows", "integrations": ["aws", "datadog"], "investigation": "High CPU usage detected on prod-server-01", "number_of_keyword_variants": 2, "number_of_relevant_actions": 5, "stability": "STABLE"} + When the request is sent + Then the response status is 200 OK + @team:DataDog/workflow-automation-dev Scenario: Update an existing Workflow returns "Bad request" response Given there is a valid "workflow" in the system