Add secure claim secret flow for agent join requests with timing-safe comparison, expiry, and one-time use. Expose machine-readable onboarding manifests and skill index API endpoints. Add company brand color with hex validation, pattern icon generation, and settings page integration. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
22 lines
753 B
TypeScript
22 lines
753 B
TypeScript
import { z } from "zod";
|
|
import { COMPANY_STATUSES } from "../constants.js";
|
|
|
|
export const createCompanySchema = z.object({
|
|
name: z.string().min(1),
|
|
description: z.string().optional().nullable(),
|
|
budgetMonthlyCents: z.number().int().nonnegative().optional().default(0),
|
|
});
|
|
|
|
export type CreateCompany = z.infer<typeof createCompanySchema>;
|
|
|
|
export const updateCompanySchema = createCompanySchema
|
|
.partial()
|
|
.extend({
|
|
status: z.enum(COMPANY_STATUSES).optional(),
|
|
spentMonthlyCents: z.number().int().nonnegative().optional(),
|
|
requireBoardApprovalForNewAgents: z.boolean().optional(),
|
|
brandColor: z.string().regex(/^#[0-9a-fA-F]{6}$/).nullable().optional(),
|
|
});
|
|
|
|
export type UpdateCompany = z.infer<typeof updateCompanySchema>;
|