camstreamerlib
Version:
Helper library for CamStreamer ACAP applications.
176 lines (175 loc) • 5.1 kB
TypeScript
import { z } from 'zod';
declare const cameraGuidsResponseSchema: z.ZodObject<{
Rsp: z.ZodObject<{
Status: z.ZodString;
Result: z.ZodArray<z.ZodObject<{
Guid: z.ZodString;
}, "strip", z.ZodTypeAny, {
Guid: string;
}, {
Guid: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
Status: string;
Result: {
Guid: string;
}[];
}, {
Status: string;
Result: {
Guid: string;
}[];
}>;
}, "strip", z.ZodTypeAny, {
Rsp: {
Status: string;
Result: {
Guid: string;
}[];
};
}, {
Rsp: {
Status: string;
Result: {
Guid: string;
}[];
};
}>;
export type TCameraGuidsResponse = z.infer<typeof cameraGuidsResponseSchema>;
declare const connectionResponseSchema: z.ZodObject<{
Rsp: z.ZodObject<{
Status: z.ZodString;
}, "strip", z.ZodTypeAny, {
Status: string;
}, {
Status: string;
}>;
}, "strip", z.ZodTypeAny, {
Rsp: {
Status: string;
};
}, {
Rsp: {
Status: string;
};
}>;
export type TConnectionResponse = z.infer<typeof connectionResponseSchema>;
export declare const cameraDetailSchema: z.ZodObject<{
Guid: z.ZodOptional<z.ZodString>;
Name: z.ZodOptional<z.ZodString>;
EntityType: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}, {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}>;
export declare const cameraDetailsResponseSchema: z.ZodObject<{
Rsp: z.ZodObject<{
Status: z.ZodString;
Result: z.ZodUnion<[z.ZodArray<z.ZodObject<{
Guid: z.ZodOptional<z.ZodString>;
Name: z.ZodOptional<z.ZodString>;
EntityType: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}, {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}>, "many">, z.ZodObject<{
Guid: z.ZodOptional<z.ZodString>;
Name: z.ZodOptional<z.ZodString>;
EntityType: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}, {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}>]>;
}, "strip", z.ZodTypeAny, {
Status: string;
Result: {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
} | {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}[];
}, {
Status: string;
Result: {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
} | {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}[];
}>;
}, "strip", z.ZodTypeAny, {
Rsp: {
Status: string;
Result: {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
} | {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}[];
};
}, {
Rsp: {
Status: string;
Result: {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
} | {
Name?: string | undefined;
Guid?: string | undefined;
EntityType?: string | undefined;
}[];
};
}>;
export type TCameraDetailsResponse = z.infer<typeof cameraDetailsResponseSchema>;
export type TCameraDetail = z.infer<typeof cameraDetailSchema>;
export type TParams = Array<'Guid' | 'Name' | 'EntityType'>;
export type TProtocol = 'http' | 'https' | 'https_insecure';
export type GenetecAgentOptions = {
protocol?: TProtocol;
ip?: string;
port?: number;
baseUri?: string;
user?: string;
pass?: string;
appId?: string;
};
export declare class GenetecAgent {
private settings;
private baseUrl;
private credentials;
constructor(options?: GenetecAgentOptions);
checkConnection(): Promise<TConnectionResponse>;
getAllCameraGuids(): Promise<TCameraGuidsResponse>;
getCameraDetails(guids: {
Guid: string;
}[], parameters: TParams): Promise<TCameraDetail[]>;
sendBookmark(guids: string[], bookmarkText: string): Promise<Response>;
private getRequestOptions;
private getTimeStamp;
}
export {};