feat: certificates, landing pages, ai tutor, website update, compliance
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
export * from './account';
|
||||
export * from './profile';
|
||||
export * from './workspaces';
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
import * as z from 'zod';
|
||||
|
||||
import { blockedSubdomain } from '@cio/utils/constants';
|
||||
|
||||
export const ZCreateWorkspace = z.object({
|
||||
name: z
|
||||
.string()
|
||||
.min(5)
|
||||
.refine((val) => !/^[-]|[-]$/.test(val), {
|
||||
message: 'Workspace name cannot start or end with a hyphen'
|
||||
}),
|
||||
siteName: z
|
||||
.string()
|
||||
.min(5)
|
||||
.refine((val) => !/^[-]|[-]$/.test(val), {
|
||||
message: 'Site name cannot start or end with a hyphen'
|
||||
})
|
||||
.refine((val) => !blockedSubdomain.includes(val), {
|
||||
message: 'Sitename already exists.'
|
||||
})
|
||||
});
|
||||
|
||||
export type TCreateWorkspace = z.infer<typeof ZCreateWorkspace>;
|
||||
|
||||
export const ZWorkspaceIdParam = z.object({
|
||||
workspaceId: z.uuid()
|
||||
});
|
||||
|
||||
export type TWorkspaceIdParam = z.infer<typeof ZWorkspaceIdParam>;
|
||||
Reference in New Issue
Block a user