UNPKG

@meshwatch/backend-core

Version:

Meshwatch backend core services.

92 lines (91 loc) 5.13 kB
import { CreateMonitorDTO, UpdateMonitorDTO } from '@meshwatch/types'; import { DynamoDBClient } from '../../shared'; import BaseService, { ServiceResponse } from '../../shared/services'; export declare class MonitorsService extends BaseService { private readonly datasource; constructor(dynamoClient?: DynamoDBClient); bookmarkMonitor: (userId: string, monitorId: string) => Promise<ServiceResponse<(import("@meshwatch/types").CreateMonitorBaseDTO & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | (import("@meshwatch/types").CreateMonitorBaseDTO & { apdex: number; regions: string[]; headers?: import("@meshwatch/types/dist/common").Dictionary<string> | undefined; body?: string | undefined; } & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<undefined>>>>; getMonitor: (userId: string, monitorId: string) => Promise<ServiceResponse<(import("@meshwatch/types").CreateMonitorBaseDTO & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | (import("@meshwatch/types").CreateMonitorBaseDTO & { apdex: number; regions: string[]; headers?: import("@meshwatch/types/dist/common").Dictionary<string> | undefined; body?: string | undefined; } & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<undefined>>>>; deleteMonitor: (userId: string, monitorId: string) => Promise<ServiceResponse<(import("@meshwatch/types").CreateMonitorBaseDTO & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | (import("@meshwatch/types").CreateMonitorBaseDTO & { apdex: number; regions: string[]; headers?: import("@meshwatch/types/dist/common").Dictionary<string> | undefined; body?: string | undefined; } & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<undefined>>>>; getMonitorsByScheduler: (scheduler: string) => Promise<ServiceResponse<import("@meshwatch/types/dist/common").WithCreated<UpdateMonitorDTO>[] | import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<undefined>>>>; getMonitors: (userId: string) => Promise<ServiceResponse<import("@meshwatch/types/dist/common").WithCreated<UpdateMonitorDTO>[] | import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<undefined>>>>; updateMonitor: (userId: string, updateMonitorPayload: UpdateMonitorDTO) => Promise<ServiceResponse<(import("@meshwatch/types").CreateMonitorBaseDTO & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | (import("@meshwatch/types").CreateMonitorBaseDTO & { apdex: number; regions: string[]; headers?: import("@meshwatch/types/dist/common").Dictionary<string> | undefined; body?: string | undefined; } & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<import("@meshwatch/types/dist/common").WithCreated<UpdateMonitorDTO>>>> | ServiceResponse<import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<import("../../shared/validation/types").FormErrors<UpdateMonitorDTO>>>>>; createMonitor: (userId: string, newMonitorPayload: CreateMonitorDTO) => Promise<ServiceResponse<(import("@meshwatch/types").CreateMonitorBaseDTO & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | (import("@meshwatch/types").CreateMonitorBaseDTO & { apdex: number; regions: string[]; headers?: import("@meshwatch/types/dist/common").Dictionary<string> | undefined; body?: string | undefined; } & { id: string; location?: import("@meshwatch/types").Location | undefined; } & { created: Date; }) | import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<import("@meshwatch/types/dist/common").WithCreated<UpdateMonitorDTO>>>> | ServiceResponse<import("@meshwatch/types").Boom<import("../../shared/validation/types").FormErrors<import("../../shared/validation/types").FormErrors<CreateMonitorDTO>>>>>; } declare const monitorsService: MonitorsService; export default monitorsService;