camstreamerlib
Version:
Helper library for CamStreamer ACAP applications.
49 lines (48 loc) • 1.76 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.accuweatherSchema = void 0;
const constants_1 = require("./constants");
const widgetCommonSchema_1 = require("./widgetCommonSchema");
const zod_1 = require("zod");
exports.accuweatherSchema = widgetCommonSchema_1.widgetCommonSchema.extend({
name: zod_1.z.literal(constants_1.allowedWidgetNames.accuweather),
location: zod_1.z.string(),
locationName: zod_1.z.string(),
title: zod_1.z.string(),
bgStartColor: zod_1.z.union([
zod_1.z.literal('237,143,73,0.93'),
zod_1.z.literal('0,0,0,0.75'),
zod_1.z.literal('31,32,73,0.9'),
zod_1.z.literal('76,94,127,0.95'),
]),
bgEndColor: zod_1.z.union([
zod_1.z.literal('234,181,89,0.93'),
zod_1.z.literal('0,0,0,0.75'),
zod_1.z.literal('73,96,213,0.9'),
zod_1.z.literal('140,150,168,0.95'),
]),
clockType: zod_1.z.union([zod_1.z.literal('12h'), zod_1.z.literal('24h')]),
lang: widgetCommonSchema_1.languageSchema,
font: widgetCommonSchema_1.fontSchema,
units: widgetCommonSchema_1.weatherUnitSchema,
pos_x: zod_1.z.number(),
pos_y: zod_1.z.number(),
coordSystem: widgetCommonSchema_1.coordinateSystemSchema,
layout: zod_1.z.union([
zod_1.z.literal('0'),
zod_1.z.literal('1'),
zod_1.z.literal('2'),
zod_1.z.literal('3'),
zod_1.z.literal('4'),
zod_1.z.literal('5'),
zod_1.z.literal('6'),
zod_1.z.literal('7'),
zod_1.z.literal('8'),
zod_1.z.literal('9'),
zod_1.z.literal('10'),
zod_1.z.literal('11'),
zod_1.z.literal('12'),
zod_1.z.literal('13'),
]),
scale: zod_1.z.number().nonnegative(),
});