UNPKG

camstreamerlib

Version:

Helper library for CamStreamer ACAP applications.

77 lines (76 loc) 4.26 kB
import { IClient, TParameters, TResponse } from './internal/types'; import { TAudioSampleRates, TSDCardInfo, TPtzOverview, TCameraPTZItem, TCameraPTZItemData, TAudioDevice, TPortSetSchema, TPortSequenceStateSchema } from './types/VapixAPI'; import { ProxyClient } from './internal/ProxyClient'; import { TCameraImageConfig, TProxyParam } from './types/common'; export declare class VapixAPI<Client extends IClient<TResponse> = IClient<TResponse>> { client: ProxyClient<Client>; constructor(client: Client, getProxyUrl: () => string); getUrlEncoded(proxy: TProxyParam, path: string, parameters?: TParameters, headers?: Record<string, string>): Promise<TResponse>; postJson(proxy: TProxyParam, path: string, jsonData: Record<string, any>, headers?: Record<string, string>): Promise<TResponse>; getCameraImage(params: TCameraImageConfig, proxy?: TProxyParam): Promise<TResponse>; getEventDeclarations(proxy?: TProxyParam): Promise<string>; getSupportedAudioSampleRate(proxy?: TProxyParam): Promise<TAudioSampleRates[]>; performAutofocus(proxy?: TProxyParam): Promise<void>; checkSDCard(proxy?: TProxyParam): Promise<TSDCardInfo>; mountSDCard(proxy?: TProxyParam): Promise<number>; unmountSDCard(proxy?: TProxyParam): Promise<number>; private _doSDCardMountAction; fetchSDCardJobProgress(jobId: number, proxy?: TProxyParam): Promise<number>; downloadCameraReport(proxy?: TProxyParam): Promise<TResponse>; getSystemLog(proxy?: TProxyParam): Promise<TResponse>; getMaxFps(channel: number, proxy?: TProxyParam): Promise<number>; getTimezone(proxy?: TProxyParam): Promise<string>; getDateTimeInfo(proxy?: TProxyParam): Promise<{ data: { dateTime: string; dstEnabled: boolean; localDateTime: string; posixTimeZone: string; timeZone?: string | undefined; }; }>; getDevicesSettings(proxy?: TProxyParam): Promise<TAudioDevice[]>; fetchRemoteDeviceInfo<T extends Record<string, any>>(payload: T, proxy?: TProxyParam): Promise<any>; getHeaders(proxy?: TProxyParam): Promise<Record<string, string>>; setHeaders(headers: Record<string, string>, proxy?: TProxyParam): Promise<TResponse>; getParameter(paramNames: string | string[], proxy?: TProxyParam): Promise<Record<string, string>>; setParameter(params: Record<string, string | number | boolean>, proxy?: TProxyParam): Promise<boolean>; getGuardTourList(proxy?: TProxyParam): Promise<{ name: string; id: string; running: string; tour: { moveSpeed?: unknown; position?: unknown; presetNbr?: unknown; waitTime?: unknown; waitTimeViewType?: unknown; }[]; camNbr?: unknown; randomEnabled?: unknown; timeBetweenSequences?: unknown; }[]>; setGuardTourEnabled(guardTourID: string, enable: boolean, proxy?: TProxyParam): Promise<boolean>; getPTZPresetList(channel: number, proxy?: TProxyParam): Promise<string[]>; listPTZ(camera: number, proxy?: TProxyParam): Promise<TCameraPTZItem[]>; listPtzVideoSourceOverview(proxy?: TProxyParam): Promise<TPtzOverview>; goToPreset(channel: number, presetName: string, proxy?: TProxyParam): Promise<TResponse>; getPtzPosition(camera: number, proxy?: TProxyParam): Promise<TCameraPTZItemData>; getPorts(proxy?: TProxyParam): Promise<{ name: string; port: string; state: "open" | "closed"; configurable: boolean; usage: string; direction: "input" | "output"; normalState: "open" | "closed"; readonly?: boolean | undefined; }[]>; setPorts(ports: TPortSetSchema[], proxy?: TProxyParam): Promise<void>; setPortStateSequence(port: number, sequence: TPortSequenceStateSchema[], proxy?: TProxyParam): Promise<void>; getApplicationList(proxy?: TProxyParam): Promise<any>; startApplication(applicationID: string, proxy?: TProxyParam): Promise<void>; restartApplication(applicationID: string, proxy?: TProxyParam): Promise<void>; stopApplication(applicationID: string, proxy?: TProxyParam): Promise<void>; installApplication(data: Blob, fileName: string): Promise<void>; }