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

19 lines
612 B
TypeScript

import { z } from 'zod';
/** @see {@link https://docs.joinmastodon.org/entities/Application/} */
const applicationSchema = z.object({
name: z.string().catch(''),
website: z.string().optional().catch(undefined),
client_id: z.string().optional().catch(undefined),
client_secret: z.string().optional().catch(undefined),
redirect_uri: z.string().optional().catch(undefined),
id: z.string().optional().catch(undefined),
/** @deprecated */
vapid_key: z.string().optional().catch(undefined),
});
type Application = z.infer<typeof applicationSchema>;
export { applicationSchema, type Application };