onvif-rx
Version:
Interact with ONVIF cameras and devices using RXJS
28 lines (27 loc) • 966 B
TypeScript
import { Observable } from 'rxjs';
import { IMaybe } from 'typescript-monads';
export interface ITransportPayoad {
readonly body: string;
readonly statusMessage: string;
readonly status: number;
}
export declare type ITransport = (body: string) => (uri: string) => Observable<ITransportPayoad>;
export declare type IEncodeBase64 = (str: string) => string;
export declare type ISha1Digest = (str: string) => PromiseLike<string>;
export declare type INonce = (size?: number) => string;
export interface ISystemConfig {
readonly parser: DOMParser;
readonly transport: ITransport;
readonly nonce: INonce;
readonly buffer: any;
readonly digestSha1: ISha1Digest;
}
export interface IDeviceConfig {
readonly system: ISystemConfig;
readonly deviceUrl: string;
readonly user: IMaybe<IUserCredentials>;
}
export interface IUserCredentials {
readonly username: string;
readonly password: string;
}