camstreamerlib
Version:
Helper library for CamStreamer ACAP applications.
701 lines (700 loc) • 22.1 kB
TypeScript
import { z } from 'zod';
export declare const mappingZonesCountdownSettingsSchema: z.ZodObject<{
startDate: z.ZodNumber;
targetDate: z.ZodNumber;
countdown: z.ZodBoolean;
countup: z.ZodBoolean;
displayDay: z.ZodBoolean;
displayHour: z.ZodBoolean;
displayMinute: z.ZodBoolean;
displaySeconds: z.ZodBoolean;
idleText: z.ZodString;
hideZeros: z.ZodBoolean;
delimiter: z.ZodUnion<[z.ZodLiteral<"colon">, z.ZodLiteral<"letters">]>;
suffixSeconds: z.ZodString;
suffixMinute: z.ZodString;
suffixHour: z.ZodString;
suffixDay: z.ZodString;
loop: z.ZodBoolean;
loopPeriod: z.ZodNumber;
waitingPeriod: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
}, {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
}>;
export declare const mappingZoneSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
name: z.ZodString;
pos_x: z.ZodNumber;
pos_y: z.ZodNumber;
text: z.ZodOptional<z.ZodArray<z.ZodObject<{
source: z.ZodString;
active: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
source: string;
active: boolean;
}, {
source: string;
active: boolean;
}>, "many">>;
wrapText: z.ZodBoolean;
textLines: z.ZodNumber;
textWidth: z.ZodNumber;
textAlign: z.ZodUnion<[z.ZodLiteral<"A_LEFT">, z.ZodLiteral<"A_CENTER">, z.ZodLiteral<"A_RIGHT">]>;
textVerticalAlign: z.ZodUnion<[z.ZodLiteral<"VA_TOP">, z.ZodLiteral<"VA_CENTER">, z.ZodLiteral<"VA_BOTTOM">]>;
textColor: z.ZodString;
font: z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"digital">, z.ZodType<string, z.ZodTypeDef, string>]>;
fontSize: z.ZodNumber;
switchingTime: z.ZodNumber;
} & {
type: z.ZodLiteral<"plain">;
}, "strip", z.ZodTypeAny, {
type: "plain";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
text?: {
source: string;
active: boolean;
}[] | undefined;
}, {
type: "plain";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
text?: {
source: string;
active: boolean;
}[] | undefined;
}>, z.ZodObject<{
name: z.ZodString;
pos_x: z.ZodNumber;
pos_y: z.ZodNumber;
text: z.ZodOptional<z.ZodArray<z.ZodObject<{
source: z.ZodString;
active: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
source: string;
active: boolean;
}, {
source: string;
active: boolean;
}>, "many">>;
wrapText: z.ZodBoolean;
textLines: z.ZodNumber;
textWidth: z.ZodNumber;
textAlign: z.ZodUnion<[z.ZodLiteral<"A_LEFT">, z.ZodLiteral<"A_CENTER">, z.ZodLiteral<"A_RIGHT">]>;
textVerticalAlign: z.ZodUnion<[z.ZodLiteral<"VA_TOP">, z.ZodLiteral<"VA_CENTER">, z.ZodLiteral<"VA_BOTTOM">]>;
textColor: z.ZodString;
font: z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"digital">, z.ZodType<string, z.ZodTypeDef, string>]>;
fontSize: z.ZodNumber;
switchingTime: z.ZodNumber;
} & {
type: z.ZodLiteral<"countdown">;
settings: z.ZodObject<{
startDate: z.ZodNumber;
targetDate: z.ZodNumber;
countdown: z.ZodBoolean;
countup: z.ZodBoolean;
displayDay: z.ZodBoolean;
displayHour: z.ZodBoolean;
displayMinute: z.ZodBoolean;
displaySeconds: z.ZodBoolean;
idleText: z.ZodString;
hideZeros: z.ZodBoolean;
delimiter: z.ZodUnion<[z.ZodLiteral<"colon">, z.ZodLiteral<"letters">]>;
suffixSeconds: z.ZodString;
suffixMinute: z.ZodString;
suffixHour: z.ZodString;
suffixDay: z.ZodString;
loop: z.ZodBoolean;
loopPeriod: z.ZodNumber;
waitingPeriod: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
}, {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
}>;
}, "strip", z.ZodTypeAny, {
type: "countdown";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
settings: {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
};
text?: {
source: string;
active: boolean;
}[] | undefined;
}, {
type: "countdown";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
settings: {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
};
text?: {
source: string;
active: boolean;
}[] | undefined;
}>]>;
export declare const customGraphicsSchema: z.ZodObject<{
id: z.ZodNumber;
enabled: z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<1>]>;
automationType: z.ZodUnion<[z.ZodLiteral<"time">, z.ZodLiteral<"manual">, z.ZodLiteral<"schedule">, z.ZodType<`input${number}`, z.ZodTypeDef, `input${number}`>]>;
invertInput: z.ZodOptional<z.ZodBoolean>;
cameraList: z.ZodArray<z.ZodNumber, "many">;
camera: z.ZodOptional<z.ZodNumber>;
schedule: z.ZodOptional<z.ZodString>;
customName: z.ZodDefault<z.ZodString>;
zIndex: z.ZodOptional<z.ZodNumber>;
width: z.ZodNumber;
height: z.ZodNumber;
} & {
name: z.ZodLiteral<"customGraphics">;
pos_x: z.ZodNumber;
pos_y: z.ZodNumber;
coordSystem: z.ZodUnion<[z.ZodLiteral<"top_left">, z.ZodLiteral<"top">, z.ZodLiteral<"top_right">, z.ZodLiteral<"left">, z.ZodLiteral<"center">, z.ZodLiteral<"right">, z.ZodLiteral<"bottom_left">, z.ZodLiteral<"bottom">, z.ZodLiteral<"bottom_right">]>;
clockFormat: z.ZodUnion<[z.ZodLiteral<"12h">, z.ZodLiteral<"24h">]>;
background: z.ZodEnum<["custom", "image"]>;
image: z.ZodString;
customAreaColor: z.ZodString;
customAreaWidth: z.ZodNumber;
customAreaHeight: z.ZodNumber;
customAreaCorners: z.ZodUnion<[z.ZodLiteral<"sharp">, z.ZodLiteral<"rounded">]>;
mappingZones: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
name: z.ZodString;
pos_x: z.ZodNumber;
pos_y: z.ZodNumber;
text: z.ZodOptional<z.ZodArray<z.ZodObject<{
source: z.ZodString;
active: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
source: string;
active: boolean;
}, {
source: string;
active: boolean;
}>, "many">>;
wrapText: z.ZodBoolean;
textLines: z.ZodNumber;
textWidth: z.ZodNumber;
textAlign: z.ZodUnion<[z.ZodLiteral<"A_LEFT">, z.ZodLiteral<"A_CENTER">, z.ZodLiteral<"A_RIGHT">]>;
textVerticalAlign: z.ZodUnion<[z.ZodLiteral<"VA_TOP">, z.ZodLiteral<"VA_CENTER">, z.ZodLiteral<"VA_BOTTOM">]>;
textColor: z.ZodString;
font: z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"digital">, z.ZodType<string, z.ZodTypeDef, string>]>;
fontSize: z.ZodNumber;
switchingTime: z.ZodNumber;
} & {
type: z.ZodLiteral<"plain">;
}, "strip", z.ZodTypeAny, {
type: "plain";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
text?: {
source: string;
active: boolean;
}[] | undefined;
}, {
type: "plain";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
text?: {
source: string;
active: boolean;
}[] | undefined;
}>, z.ZodObject<{
name: z.ZodString;
pos_x: z.ZodNumber;
pos_y: z.ZodNumber;
text: z.ZodOptional<z.ZodArray<z.ZodObject<{
source: z.ZodString;
active: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
source: string;
active: boolean;
}, {
source: string;
active: boolean;
}>, "many">>;
wrapText: z.ZodBoolean;
textLines: z.ZodNumber;
textWidth: z.ZodNumber;
textAlign: z.ZodUnion<[z.ZodLiteral<"A_LEFT">, z.ZodLiteral<"A_CENTER">, z.ZodLiteral<"A_RIGHT">]>;
textVerticalAlign: z.ZodUnion<[z.ZodLiteral<"VA_TOP">, z.ZodLiteral<"VA_CENTER">, z.ZodLiteral<"VA_BOTTOM">]>;
textColor: z.ZodString;
font: z.ZodUnion<[z.ZodLiteral<"classic">, z.ZodLiteral<"digital">, z.ZodType<string, z.ZodTypeDef, string>]>;
fontSize: z.ZodNumber;
switchingTime: z.ZodNumber;
} & {
type: z.ZodLiteral<"countdown">;
settings: z.ZodObject<{
startDate: z.ZodNumber;
targetDate: z.ZodNumber;
countdown: z.ZodBoolean;
countup: z.ZodBoolean;
displayDay: z.ZodBoolean;
displayHour: z.ZodBoolean;
displayMinute: z.ZodBoolean;
displaySeconds: z.ZodBoolean;
idleText: z.ZodString;
hideZeros: z.ZodBoolean;
delimiter: z.ZodUnion<[z.ZodLiteral<"colon">, z.ZodLiteral<"letters">]>;
suffixSeconds: z.ZodString;
suffixMinute: z.ZodString;
suffixHour: z.ZodString;
suffixDay: z.ZodString;
loop: z.ZodBoolean;
loopPeriod: z.ZodNumber;
waitingPeriod: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
}, {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
}>;
}, "strip", z.ZodTypeAny, {
type: "countdown";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
settings: {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
};
text?: {
source: string;
active: boolean;
}[] | undefined;
}, {
type: "countdown";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
settings: {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
};
text?: {
source: string;
active: boolean;
}[] | undefined;
}>]>, "many">;
}, "strip", z.ZodTypeAny, {
name: "customGraphics";
enabled: 0 | 1;
id: number;
width: number;
height: number;
automationType: "time" | "manual" | "schedule" | `input${number}`;
cameraList: number[];
customName: string;
pos_x: number;
pos_y: number;
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
image: string;
clockFormat: "12h" | "24h";
background: "custom" | "image";
customAreaColor: string;
customAreaWidth: number;
customAreaHeight: number;
customAreaCorners: "sharp" | "rounded";
mappingZones: ({
type: "plain";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
text?: {
source: string;
active: boolean;
}[] | undefined;
} | {
type: "countdown";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
settings: {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
};
text?: {
source: string;
active: boolean;
}[] | undefined;
})[];
camera?: number | undefined;
schedule?: string | undefined;
invertInput?: boolean | undefined;
zIndex?: number | undefined;
}, {
name: "customGraphics";
enabled: 0 | 1;
id: number;
width: number;
height: number;
automationType: "time" | "manual" | "schedule" | `input${number}`;
cameraList: number[];
pos_x: number;
pos_y: number;
coordSystem: "top_left" | "top" | "top_right" | "left" | "center" | "right" | "bottom_left" | "bottom" | "bottom_right";
image: string;
clockFormat: "12h" | "24h";
background: "custom" | "image";
customAreaColor: string;
customAreaWidth: number;
customAreaHeight: number;
customAreaCorners: "sharp" | "rounded";
mappingZones: ({
type: "plain";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
text?: {
source: string;
active: boolean;
}[] | undefined;
} | {
type: "countdown";
name: string;
pos_x: number;
pos_y: number;
textColor: string;
switchingTime: number;
font: string;
fontSize: number;
wrapText: boolean;
textLines: number;
textWidth: number;
textAlign: "A_LEFT" | "A_CENTER" | "A_RIGHT";
textVerticalAlign: "VA_TOP" | "VA_CENTER" | "VA_BOTTOM";
settings: {
loop: boolean;
startDate: number;
targetDate: number;
countdown: boolean;
countup: boolean;
displayDay: boolean;
displayHour: boolean;
displayMinute: boolean;
displaySeconds: boolean;
idleText: string;
hideZeros: boolean;
delimiter: "colon" | "letters";
suffixSeconds: string;
suffixMinute: string;
suffixHour: string;
suffixDay: string;
loopPeriod: number;
waitingPeriod: number;
};
text?: {
source: string;
active: boolean;
}[] | undefined;
})[];
camera?: number | undefined;
schedule?: string | undefined;
invertInput?: boolean | undefined;
customName?: string | undefined;
zIndex?: number | undefined;
}>;
export declare const fieldSchema: z.ZodObject<{
field_name: z.ZodString;
text: z.ZodString;
color: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
text: string;
field_name: string;
color?: string | undefined;
}, {
text: string;
field_name: string;
color?: string | undefined;
}>;
export type TField = z.infer<typeof fieldSchema>;