UNPKG

camstreamerlib

Version:

Helper library for CamStreamer ACAP applications.

60 lines (59 loc) 2.4 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.camstreamerServerResponseSchema = exports.cameraStreamResponseSchema = exports.streamSchema = exports.cameraStreamSchema = void 0; const zod_1 = require("zod"); exports.cameraStreamSchema = zod_1.z.object({ enabled: zod_1.z.string(), active: zod_1.z.string(), audioSource: zod_1.z.string(), avSyncMsec: zod_1.z.string(), internalVapixParameters: zod_1.z.string(), userVapixParameters: zod_1.z.string(), outputParameters: zod_1.z.string(), outputType: zod_1.z.string(), mediaServerUrl: zod_1.z.string(), inputType: zod_1.z.string(), inputUrl: zod_1.z.string(), forceStereo: zod_1.z.string(), streamDelay: zod_1.z.string(), statusLed: zod_1.z.string(), statusPort: zod_1.z.string(), callApi: zod_1.z.string(), trigger: zod_1.z.string(), schedule: zod_1.z.string(), prepareAhead: zod_1.z.string(), startTime: zod_1.z.string(), stopTime: zod_1.z.string(), }); exports.streamSchema = zod_1.z.object({ enabled: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]), active: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]), audioSource: zod_1.z.string(), avSyncMsec: zod_1.z.number().int(), internalVapixParameters: zod_1.z.string(), userVapixParameters: zod_1.z.string(), outputParameters: zod_1.z.string(), outputType: zod_1.z.union([zod_1.z.literal('video'), zod_1.z.literal('images'), zod_1.z.literal('none')]), mediaServerUrl: zod_1.z.string(), inputType: zod_1.z.union([zod_1.z.literal('CSw'), zod_1.z.literal('CRS'), zod_1.z.literal('RTSP_URL')]), inputUrl: zod_1.z.string(), forceStereo: zod_1.z.union([zod_1.z.literal(0), zod_1.z.literal(1)]), streamDelay: zod_1.z.number().nullable(), statusLed: zod_1.z.number(), statusPort: zod_1.z.string(), callApi: zod_1.z.number().int(), trigger: zod_1.z.string(), schedule: zod_1.z.string(), prepareAhead: zod_1.z.number().int(), startTime: zod_1.z.number().nullable(), stopTime: zod_1.z.number().nullable(), }); exports.cameraStreamResponseSchema = zod_1.z.object({ data: exports.cameraStreamSchema, code: zod_1.z.number(), message: zod_1.z.string(), }); exports.camstreamerServerResponseSchema = zod_1.z.object({ code: zod_1.z.number(), message: zod_1.z.string(), });