Files
vitfit-r2/V2/app/core/schemas/org.js
T
2026-06-13 08:03:45 -04:00

24 lines
736 B
JavaScript

'use strict';
const { z } = require('zod');
const hexColor = z.string().regex(/^#[0-9A-Fa-f]{6}$/, 'Must be a valid hex color (e.g. #00FF88)');
const updateOrg = z.object({
name: z.string().min(1).max(200).optional(),
timezone: z.string().max(100).optional(),
licenseOwner: z.string().max(200).optional(),
licenseEmail: z.string().email().optional(),
}).strict();
const updateBranding = z.object({
appName: z.string().min(1).max(200).optional(),
primaryColor: hexColor.optional(),
secondaryColor: hexColor.optional(),
workColor: hexColor.optional(),
restColor: hexColor.optional(),
moveColor: hexColor.optional(),
}).strict();
module.exports = { updateOrg, updateBranding };