UNPKG

ts-onvif

Version:

Client to ONVIF devices

21 lines (20 loc) 786 B
/** * Service module for all ONVIF services * @author Andrew D.Laptev <a.d.laptev@gmail.com> * @see https://www.onvif.org/profiles/specifications/ */ import { Onvif, OnvifServices } from './onvif'; import { LineraseOptions } from './utils'; /** * Common class for all services that handles the common xmlns, request and response */ export default class Service { protected readonly onvif: Onvif; protected readonly service: keyof OnvifServices; protected readonly xmlns: string; constructor(onvif: Onvif, service: keyof OnvifServices); request<T = any>(body: Record<string, any>, options?: LineraseOptions): Promise<T>; } export declare function lazyService<T extends object>(onvif: Onvif, loader: () => Promise<{ default: new (onvif: Onvif) => T; }>): T;