UNPKG

@axiomhq/js

Version:

The official javascript bindings for the Axiom API

37 lines 1.3 kB
import HTTPClient from './httpClient.js'; export declare namespace monitors { type MonitorType = 'Threshold' | 'MatchEvent'; type MonitorOperator = 'Below' | 'BelowOrEqual' | 'Above' | 'AboveOrEqual'; interface Monitor { id: string; createdAt: string; createdBy: string; name: string; type: MonitorType; description?: string; aplQuery: string; operator: MonitorOperator; threshold: number; alertOnNoData: boolean; notifyByGroup: boolean; resolvable?: boolean; notifierIDs: string[]; intervalMinutes: number; rangeMinutes: number; disabled?: boolean; disabledUntil?: string; } interface CreateRequest extends Omit<Monitor, 'id' | 'createdAt' | 'createdBy'> { } interface UpdateRequest extends Omit<Monitor, 'id' | 'createdAt' | 'createdBy'> { } class Service extends HTTPClient { private readonly localPath; list: () => Promise<Monitor[]>; get: (id: string) => Promise<Monitor>; create: (req: CreateRequest) => Promise<Monitor>; update: (id: string, req: UpdateRequest) => Promise<Monitor>; delete: (id: string) => Promise<Response>; } } //# sourceMappingURL=monitors.d.ts.map