UNPKG

@huddle01/web-core

Version:

The Huddle01 Javascript SDK offers a comprehensive suite of methods and event listeners that allow for seamless real-time audio and video communication with minimal coding required.

45 lines (42 loc) 1.13 kB
import { z } from 'zod'; // src/validators/common.validators.ts var ConnectionParameterSchema = z.object({ roomId: z.string({ required_error: "Room id must provided" }), token: z.string({ required_error: "Token must provided" }) }); var GeolocationSchema = z.object({ country: z.string({ required_error: "Country must provided" }), latitude: z.string({ required_error: "Latitude must provided" }), longitude: z.string({ required_error: "Longitude must provided" }), region: z.string({ required_error: "Region must provided" }), globalRegion: z.string({ required_error: "Global region must provided" }), ip: z.string({ required_error: "IP must provided" }) }); var VolatileDataMessageSchema = z.object({ from: z.string(), payload: z.unknown(), label: z.string().optional(), to: z.union([z.literal("*"), z.array(z.string())]).optional() }); var DataMessageSchema = z.object({ from: z.string(), payload: z.string(), label: z.string().optional() }); export { ConnectionParameterSchema, DataMessageSchema, GeolocationSchema, VolatileDataMessageSchema };