bigbuffet-rw/packages/pl-api/lib/entities/backup.ts
marcin mikołajczak d91b55d9b1 cleanup
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-29 22:48:58 +02:00

17 lines
488 B
TypeScript

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