pleroma/packages/pl-api/lib/entities/backup.ts
marcin mikołajczak a6bc160caa pl-api: Do some blind search and replace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-10-14 00:25:30 +02:00

17 lines
517 B
TypeScript

import * as v from 'valibot';
import { dateSchema, mimeSchema } from './utils';
/** @see {@link https://docs.pleroma.social/backend/development/API/pleroma_api/#post-apiv1pleromabackups} */
const backupSchema = v.object({
id: z.coerce.string(),
contentType: mimeSchema,
file_size: v.fallback(v.number(), 0),
inserted_at: dateSchema,
processed: v.fallback(v.boolean(), false),
url: v.fallback(v.string(), ''),
});
type Backup = v.InferOutput<typeof backupSchema>;
export { backupSchema, type Backup };