@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.
50 lines (46 loc) • 1.35 kB
JavaScript
'use strict';
var zod = require('zod');
// src/validators/common.validators.ts
var ConnectionParameterSchema = zod.z.object({
roomId: zod.z.string({
required_error: "Room id must provided"
}),
token: zod.z.string({
required_error: "Token must provided"
})
});
var GeolocationSchema = zod.z.object({
country: zod.z.string({
required_error: "Country must provided"
}),
latitude: zod.z.string({
required_error: "Latitude must provided"
}),
longitude: zod.z.string({
required_error: "Longitude must provided"
}),
region: zod.z.string({
required_error: "Region must provided"
}),
globalRegion: zod.z.string({
required_error: "Global region must provided"
}),
ip: zod.z.string({
required_error: "IP must provided"
})
});
var VolatileDataMessageSchema = zod.z.object({
from: zod.z.string(),
payload: zod.z.unknown(),
label: zod.z.string().optional(),
to: zod.z.union([zod.z.literal("*"), zod.z.array(zod.z.string())]).optional()
});
var DataMessageSchema = zod.z.object({
from: zod.z.string(),
payload: zod.z.string(),
label: zod.z.string().optional()
});
exports.ConnectionParameterSchema = ConnectionParameterSchema;
exports.DataMessageSchema = DataMessageSchema;
exports.GeolocationSchema = GeolocationSchema;
exports.VolatileDataMessageSchema = VolatileDataMessageSchema;