diff --git a/openapi/spec.json b/openapi/spec.json index 9a8c2e0..3c93e1e 100644 --- a/openapi/spec.json +++ b/openapi/spec.json @@ -5589,6 +5589,77 @@ "topic_map_functions" ] }, + "TopicDigestAutomationConfig": { + "type": "object", + "properties": { + "event_type": { + "type": "string", + "enum": [ + "topic_digest" + ], + "description": "The type of automation." + }, + "status": { + "$ref": "#/components/schemas/AutomationStatus" + }, + "window_seconds": { + "type": "integer", + "minimum": 3600, + "maximum": 2592000, + "default": 86400, + "description": "How much recent history to include in each digest" + }, + "scheduled_time_minutes_utc": { + "type": "integer", + "minimum": 0, + "maximum": 1439, + "description": "Minutes after midnight UTC when the digest should be sent" + }, + "action": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "slack" + ], + "description": "The type of action to take" + }, + "workspace_id": { + "type": "string", + "description": "The Slack workspace ID to post to" + }, + "channel": { + "type": "string", + "description": "The Slack channel ID to post to" + }, + "message_template": { + "type": "string", + "description": "Custom message template for the alert" + } + }, + "required": [ + "type", + "workspace_id", + "channel" + ], + "description": "The Slack action to take when the digest is sent" + }, + "topic_map_function_ids": { + "type": "array", + "items": { + "type": "string" + }, + "maxItems": 10, + "description": "Optional topic map function IDs to include in the digest" + } + }, + "required": [ + "event_type", + "scheduled_time_minutes_utc", + "action" + ] + }, "ProjectAutomation": { "type": "object", "properties": { @@ -6034,6 +6105,9 @@ }, { "$ref": "#/components/schemas/TopicAutomationConfig" + }, + { + "$ref": "#/components/schemas/TopicDigestAutomationConfig" } ], "description": "The configuration for the automation rule" @@ -6474,6 +6548,9 @@ }, { "$ref": "#/components/schemas/TopicAutomationConfig" + }, + { + "$ref": "#/components/schemas/TopicDigestAutomationConfig" } ], "description": "The configuration for the automation rule" @@ -6910,6 +6987,9 @@ { "$ref": "#/components/schemas/TopicAutomationConfig" }, + { + "$ref": "#/components/schemas/TopicDigestAutomationConfig" + }, { "nullable": true } diff --git a/openapi/spec.yaml b/openapi/spec.yaml index 33870f9..b5ef197 100644 --- a/openapi/spec.yaml +++ b/openapi/spec.yaml @@ -4936,6 +4936,59 @@ components: - sampling_rate - facet_functions - topic_map_functions + TopicDigestAutomationConfig: + type: object + properties: + event_type: + type: string + enum: + - topic_digest + description: The type of automation. + status: + $ref: "#/components/schemas/AutomationStatus" + window_seconds: + type: integer + minimum: 3600 + maximum: 2592000 + default: 86400 + description: How much recent history to include in each digest + scheduled_time_minutes_utc: + type: integer + minimum: 0 + maximum: 1439 + description: Minutes after midnight UTC when the digest should be sent + action: + type: object + properties: + type: + type: string + enum: + - slack + description: The type of action to take + workspace_id: + type: string + description: The Slack workspace ID to post to + channel: + type: string + description: The Slack channel ID to post to + message_template: + type: string + description: Custom message template for the alert + required: + - type + - workspace_id + - channel + description: The Slack action to take when the digest is sent + topic_map_function_ids: + type: array + items: + type: string + maxItems: 10 + description: Optional topic map function IDs to include in the digest + required: + - event_type + - scheduled_time_minutes_utc + - action ProjectAutomation: type: object properties: @@ -5245,6 +5298,7 @@ components: - event_type - action - $ref: "#/components/schemas/TopicAutomationConfig" + - $ref: "#/components/schemas/TopicDigestAutomationConfig" description: The configuration for the automation rule required: - id @@ -5546,6 +5600,7 @@ components: - event_type - action - $ref: "#/components/schemas/TopicAutomationConfig" + - $ref: "#/components/schemas/TopicDigestAutomationConfig" description: The configuration for the automation rule required: - project_id @@ -5842,6 +5897,7 @@ components: - event_type - action - $ref: "#/components/schemas/TopicAutomationConfig" + - $ref: "#/components/schemas/TopicDigestAutomationConfig" - nullable: true description: The configuration for the automation rule ProjectScoreCategory: