mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
57b6e9aca4
closes #6930
31 lines
797 B
TypeScript
31 lines
797 B
TypeScript
import { z } from "zod";
|
|
import { BaseSchema } from "@server/routes/api/schema";
|
|
import { UserPasskeyValidation } from "@shared/validations";
|
|
|
|
export const PasskeysListSchema = BaseSchema.extend({
|
|
body: z.object({}),
|
|
});
|
|
|
|
export type PasskeysListReq = z.infer<typeof PasskeysListSchema>;
|
|
|
|
export const PasskeysDeleteSchema = BaseSchema.extend({
|
|
body: z.object({
|
|
id: z.string().uuid(),
|
|
}),
|
|
});
|
|
|
|
export type PasskeysDeleteReq = z.infer<typeof PasskeysDeleteSchema>;
|
|
|
|
export const PasskeysUpdateSchema = BaseSchema.extend({
|
|
body: z.object({
|
|
id: z.string().uuid(),
|
|
name: z
|
|
.string()
|
|
.trim()
|
|
.min(UserPasskeyValidation.minNameLength)
|
|
.max(UserPasskeyValidation.maxNameLength),
|
|
}),
|
|
});
|
|
|
|
export type PasskeysUpdateReq = z.infer<typeof PasskeysUpdateSchema>;
|