Admin Page work - Still blank/broken
This commit is contained in:
@@ -19,6 +19,40 @@ export const auditLogsQuerySchema = z.object({
|
||||
offset: z.coerce.number().min(0).default(0),
|
||||
});
|
||||
|
||||
export const bulkCreateAdminSchema = z.object({
|
||||
admins: z.array(
|
||||
z.object({
|
||||
email: z.string().email('Invalid email format'),
|
||||
role: z.enum(['admin', 'super_admin']).optional().default('admin'),
|
||||
})
|
||||
).min(1, 'At least one admin must be provided').max(100, 'Maximum 100 admins per batch'),
|
||||
});
|
||||
|
||||
export const bulkRevokeAdminSchema = z.object({
|
||||
auth0Subs: z.array(z.string().min(1, 'auth0Sub cannot be empty'))
|
||||
.min(1, 'At least one auth0Sub must be provided')
|
||||
.max(100, 'Maximum 100 admins per batch'),
|
||||
});
|
||||
|
||||
export const bulkReinstateAdminSchema = z.object({
|
||||
auth0Subs: z.array(z.string().min(1, 'auth0Sub cannot be empty'))
|
||||
.min(1, 'At least one auth0Sub must be provided')
|
||||
.max(100, 'Maximum 100 admins per batch'),
|
||||
});
|
||||
|
||||
export const catalogEntitySchema = z.enum(['makes', 'models', 'years', 'trims', 'engines']);
|
||||
|
||||
export const bulkDeleteCatalogSchema = z.object({
|
||||
ids: z.array(z.number().int().positive('ID must be a positive integer'))
|
||||
.min(1, 'At least one ID must be provided')
|
||||
.max(100, 'Maximum 100 items per batch'),
|
||||
});
|
||||
|
||||
export type CreateAdminInput = z.infer<typeof createAdminSchema>;
|
||||
export type AdminAuth0SubInput = z.infer<typeof adminAuth0SubSchema>;
|
||||
export type AuditLogsQueryInput = z.infer<typeof auditLogsQuerySchema>;
|
||||
export type BulkCreateAdminInput = z.infer<typeof bulkCreateAdminSchema>;
|
||||
export type BulkRevokeAdminInput = z.infer<typeof bulkRevokeAdminSchema>;
|
||||
export type BulkReinstateAdminInput = z.infer<typeof bulkReinstateAdminSchema>;
|
||||
export type CatalogEntity = z.infer<typeof catalogEntitySchema>;
|
||||
export type BulkDeleteCatalogInput = z.infer<typeof bulkDeleteCatalogSchema>;
|
||||
|
||||
Reference in New Issue
Block a user