import { RegionType, CamelCasedProps } from './../interface'; import { DeployDashboardInputs } from './dashboard'; export interface CreateAlarmOptions { id?: string; name: string; noticeId: string; logsetId: string; topicId: string; targets: { period?: number; query: string; }[]; monitor?: { type: string; time: number; }; trigger: { condition: string; count?: number; period?: number; }; status?: boolean; } export declare type CreateAlarmResult = CreateAlarmOptions; export interface MonitorTime { Type: string; Time: number; } export interface CallBackInfo { Body: string; Headers?: string[]; } export interface AlarmTargetItem { TopicId: string; Query: string; Number: string; StartTimeOffset: string; EndTimeOffset: string; LogsetId: string; } export interface AlarmInfo { Name: string; AlarmTargets: AlarmTargetItem[]; MonitorTime: MonitorTime; Condition: string; TriggerCount: number; AlarmPeriod: number; AlarmNoticeIds: string[]; Status: boolean; AlarmId: string; CreateTime: string; UpdateTime: string; MessageTemplate: string; CallBack: CallBackInfo; } export declare type AlarmDetail = CamelCasedProps; declare type NoticeChannel = 'Email' | 'Sms' | 'WeChat' | 'Phone'; export interface ReceiverOptions { start: string; end: string; type: 'Uin' | 'Group'; ids: number[] | string[]; channels: NoticeChannel[]; } export interface WebCallbackOptions { type: 'WeCom' | 'Http'; url: string; body: string; headers?: string[]; method?: string; } export interface CreateNoticeOptions { id?: string; name: string; type: 'Trigger' | 'Recovery' | 'All'; receivers: ReceiverOptions[]; webCallbacks: WebCallbackOptions[]; } export declare type CreateNoticeResult = CreateNoticeOptions; export interface Receiver { ReceiverChannels: NoticeChannel[]; ReceiverIds: number[]; EndTime: string; ReceiverType: string; StartTime: string; } export interface WebCallback { Body: string; CallbackType: 'WeCom' | 'Http'; Headers: null | string[]; Method: null | string; Url: string; } export interface NoticeInfo { AlarmNoticeId: string; Name: string; NoticeReceivers: Receiver[]; CreateTime: string; WebCallbacks: WebCallback[]; } export declare type NoticeDetail = CamelCasedProps; export interface DeployLogsetInputs { name?: string; period?: number; logsetId?: string; } export interface DeployTopicInputs { name?: string; period?: number; logsetId?: string; topic?: string; topicId?: string; } export interface DeployIndexInputs { topicId?: string; effective?: boolean; indexRule?: { fullText?: { caseSensitive?: boolean; tokenizer?: string; }; keyValue?: { caseSensitive: boolean; keys: { key: string; type: string; sqlFlag?: boolean; tokenizer?: string; }[]; }; }; } export interface AlarmInputs { id?: string; name: string; noticeId: string; targets: { period?: number; query: string; }[]; monitor?: { type: string; time: number; }; trigger: { condition: string; count?: number; period?: number; }; status?: boolean; } export interface DeployInputs extends DeployLogsetInputs, DeployTopicInputs, DeployIndexInputs { region?: RegionType; name?: string; topic?: string; alarms?: AlarmInputs[]; dashboards?: DeployDashboardInputs[]; } export interface DeployOutputs extends Partial { region: RegionType; } export interface StatusSqlMapEnum { success: string; fail: string; retry: string; interrupt: string; timeout: string; exceed: string; codeError: string; } export interface GetSearchSqlOptions { functionName: string; namespace?: string; qualifier?: string; startTime?: number | string; endTime?: number | string; reqId?: string; status?: keyof StatusSqlMapEnum | ''; limit?: number; } export declare type GetLogOptions = Omit & { logsetId: string; topicId: string; interval?: string | number; }; export declare type GetLogDetailOptions = { logsetId: string; topicId: string; reqId: string; startTime?: string; endTime: string; }; export interface LogContent { SCF_FunctionName: string; SCF_Namespace: string; SCF_StartTime: string; SCF_RequestId: string; SCF_Duration: string; SCF_Alias: string; SCF_Qualifier: string; SCF_LogTime: string; SCF_RetryNum: string; SCF_MemUsage: string; SCF_Level: string; SCF_Message: string; SCF_Type: string; SCF_StatusCode: string; } export {};