/* eslint-disable */ // @ts-nocheck /* * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY */ import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb" import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb" import * as InsightIoApiAlertV1alpha1Notify from "./notify.pb" import * as InsightIoApiAlertV1alpha1Type from "./type.pb" export enum ValidateGroupCode { ERR_CODE_UNSPECIFIED = "ERR_CODE_UNSPECIFIED", ERR_YAML_UNMARSHAL = "ERR_YAML_UNMARSHAL", ERR_GROUP_NAME = "ERR_GROUP_NAME", ERR_GROUP_RULES = "ERR_GROUP_RULES", ERR_GROUP_NAME_DUPLICATED = "ERR_GROUP_NAME_DUPLICATED", ERR_RULE = "ERR_RULE", ERR_RULE_ALERT = "ERR_RULE_ALERT", ERR_RULE_RECORD = "ERR_RULE_RECORD", ERR_RULE_FOR = "ERR_RULE_FOR", ERR_RULE_EXPR = "ERR_RULE_EXPR", ERR_RULE_SEVERITY = "ERR_RULE_SEVERITY", ERR_RULE_ANNOTATIONS = "ERR_RULE_ANNOTATIONS", ERR_RULE_LABELS = "ERR_RULE_LABELS", ERR_RULE_ALERT_DUPLICATED = "ERR_RULE_ALERT_DUPLICATED", ERR_RULE_DESCRIPTION = "ERR_RULE_DESCRIPTION", } export enum NotifyStatusStatus { unknown = "unknown", success = "success", partial_success = "partial_success", fail = "fail", silenced = "silenced", not_configured = "not_configured", } export type ID = { id?: string } export type ListGroupsRequest = { builtin?: boolean name?: string clusterName?: string namespace?: string page?: number pageSize?: number sorts?: string[] } export type ListGroupsResponse = { items?: GroupSummary[] pagination?: InsightIoApiTypeV1alpha1Page.Pagination } export type GroupSummary = { id?: string name?: string builtin?: boolean clusterName?: string namespace?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType targets?: string[] groupRuleStatus?: groupRuleStatus[] description?: string createAt?: string updateAt?: string } export type groupRuleStatus = { status?: InsightIoApiAlertV1alpha1Type.RuleStatus count?: number } export type CreateGroupRequest = { name?: string description?: string clusterName?: string namespace?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType targets?: string[] rules?: CreateGroupRule[] notificationTemplate?: string receivers?: groupReceiver[] notifyRepeatConfig?: repeatConfig[] } export type repeatConfig = { severity?: InsightIoApiAlertV1alpha1Type.Severity interval?: number } export type groupReceiver = { type?: InsightIoApiAlertV1alpha1Notify.ReceiverType names?: string[] } export type Group = { id?: string name?: string builtin?: boolean clusterName?: string namespace?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType targets?: string[] description?: string notificationTemplate?: string receivers?: groupReceiver[] notifyRepeatConfig?: repeatConfig[] createAt?: string updateAt?: string } export type ValidateGroupRequest = { yamlString?: string clusterName?: string namespace?: string } export type ValidateGroupError = { code?: ValidateGroupCode message?: string } export type ValidateGroupResponse = { valid?: boolean errors?: ValidateGroupError[] params?: CreateGroupRequest } export type UpdateGroupRequest = { id?: string description?: string notificationTemplate?: string receivers?: groupReceiver[] notifyRepeatConfig?: repeatConfig[] } export type ListGroupRulesRequest = { id?: string name?: string severity?: InsightIoApiAlertV1alpha1Type.Severity status?: InsightIoApiAlertV1alpha1Type.RuleStatus page?: number pageSize?: number sorts?: string[] } export type ListRulesResponse = { items?: RuleSummary[] pagination?: InsightIoApiTypeV1alpha1Page.Pagination } export type RuleSummary = { id?: string name?: string groupId?: string groupName?: string severity?: InsightIoApiAlertV1alpha1Type.Severity source?: InsightIoApiAlertV1alpha1Type.RuleSource expr?: string thresholdSymbol?: string thresholdNum?: number status?: InsightIoApiAlertV1alpha1Type.RuleStatus description?: string createAt?: string logFilterCondition?: InsightIoApiAlertV1alpha1Type.RuleFilterCondition logQueryString?: string duration?: string } export type Rule = { id?: string name?: string groupId?: string groupName?: string expr?: string thresholdSymbol?: string thresholdNum?: number duration?: string severity?: InsightIoApiAlertV1alpha1Type.Severity source?: InsightIoApiAlertV1alpha1Type.RuleSource status?: InsightIoApiAlertV1alpha1Type.RuleStatus promQL?: string labels?: {[key: string]: string} annotations?: {[key: string]: string} description?: string createAt?: string updateAt?: string logFilterCondition?: InsightIoApiAlertV1alpha1Type.RuleFilterCondition logQueryString?: string } export type AddGroupRuleRequest = { id?: string rule?: CreateGroupRule } export type CreateGroupRule = { name?: string description?: string source?: InsightIoApiAlertV1alpha1Type.RuleSource expr?: string thresholdSymbol?: string thresholdNum?: number duration?: string severity?: InsightIoApiAlertV1alpha1Type.Severity labels?: {[key: string]: string} annotations?: {[key: string]: string} logFilterCondition?: InsightIoApiAlertV1alpha1Type.RuleFilterCondition logQueryString?: string } export type UpdateRuleRequest = { id?: string name?: string description?: string expr?: string thresholdSymbol?: string thresholdNum?: number duration?: string severity?: InsightIoApiAlertV1alpha1Type.Severity labels?: {[key: string]: string} annotations?: {[key: string]: string} logFilterCondition?: InsightIoApiAlertV1alpha1Type.RuleFilterCondition logQueryString?: string } export type GroupRule = { id?: string name?: string } export type ListAlertsRequest = { resolved?: boolean groupName?: string groupId?: string ruleName?: string ruleId?: string clusterName?: string namespace?: string severity?: InsightIoApiAlertV1alpha1Type.Severity targetType?: InsightIoApiAlertV1alpha1Type.TargetType target?: string page?: number pageSize?: number sorts?: string[] status?: InsightIoApiAlertV1alpha1Type.AlertStatus[] } export type ListAlertsResponse = { items?: AlertSummary[] pagination?: InsightIoApiTypeV1alpha1Page.Pagination } export type AlertSummary = { id?: string groupName?: string groupId?: string ruleName?: string ruleId?: string clusterName?: string namespace?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType target?: string severity?: InsightIoApiAlertV1alpha1Type.Severity value?: string notifyResponse?: string description?: string promQL?: string labels?: {[key: string]: string} annotations?: {[key: string]: string} startAt?: string updateAt?: string lastSent?: string builtin?: boolean status?: InsightIoApiAlertV1alpha1Type.AlertStatus notifyStatus?: NotifyStatus } export type NotifyStatus = { status?: NotifyStatusStatus messages?: {[key: string]: string} } export type GetAlertRequest = { id?: string resolved?: boolean } export type Alert = { id?: string groupName?: string groupId?: string ruleName?: string ruleId?: string clusterName?: string namespace?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType target?: string severity?: InsightIoApiAlertV1alpha1Type.Severity value?: string notifyResponse?: string description?: string promQL?: string labels?: {[key: string]: string} annotations?: {[key: string]: string} startAt?: string updateAt?: string lastSent?: string builtin?: boolean status?: InsightIoApiAlertV1alpha1Type.AlertStatus notifyStatus?: NotifyStatus } export type CountAlertRequest = { resolved?: boolean clusterName?: string namespace?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType target?: string severity?: InsightIoApiAlertV1alpha1Type.Severity start?: string end?: string step?: string groupByType?: boolean } export type CountAlertResponse = { data?: CountAlert[] } export type CountAlert = { start?: string end?: string items?: countInfo[] } export type countInfo = { target?: string sum?: {[key: string]: string} } export type AlertHistoryRetentionPeriod = { retentionTime?: number } export type CleanAlertHistoryResponse = { num?: string } export type PreviewRuleRequestParams = { start?: string end?: string step?: number } export type PreviewRuleRequestGroup = { clusterName?: string namespace?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType targets?: string[] } export type PreviewRuleRequest = { params?: PreviewRuleRequestParams group?: PreviewRuleRequestGroup rule?: CreateGroupRule } export type PreviewRuleResponse = { matrix?: InsightIoApiMetricV1alpha1Metric.SampleStream[] promQL?: string } export type GetSMTPStatusResponse = { enabled?: boolean } export type RuleTemplate = { id?: string name?: string description?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType count?: number rules?: CreateGroupRule[] createAt?: string updateAt?: string } export type RuleTemplateSummary = { id?: string name?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType } export type ListRuleTemplateSummaryRequest = { targetType?: InsightIoApiAlertV1alpha1Type.TargetType } export type ListRuleTemplateSummaryResponse = { items?: RuleTemplateSummary[] } export type ListRuleTemplatesRequest = { builtin?: boolean name?: string page?: number pageSize?: number sorts?: string[] targetType?: InsightIoApiAlertV1alpha1Type.TargetType } export type ListRuleTemplatesResponse = { items?: RuleTemplate[] pagination?: InsightIoApiTypeV1alpha1Page.Pagination } export type CreateRuleTemplateRequest = { name?: string description?: string targetType?: InsightIoApiAlertV1alpha1Type.TargetType rules?: CreateGroupRule[] } export type UpdateRuleTemplateRequest = { id?: string description?: string rules?: CreateGroupRule[] } export type ListFiringRulesRequest = { expandAlerts?: boolean groupName?: string groupId?: string ruleName?: string ruleId?: string clusterName?: string namespace?: string severity?: InsightIoApiAlertV1alpha1Type.Severity targetType?: InsightIoApiAlertV1alpha1Type.TargetType target?: string page?: number pageSize?: number sorts?: string[] } export type ListFiringRulesResponse = { items?: FiringRule[] pagination?: InsightIoApiTypeV1alpha1Page.Pagination } export type FiringRule = { groupId?: string groupName?: string builtin?: boolean ruleId?: string ruleName?: string severity?: InsightIoApiAlertV1alpha1Type.Severity alertCount?: number latestStartAt?: string alerts?: Alert[] }