Add pl-api to workspace

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak
2024-08-28 13:43:23 +02:00
parent 966b04fdf0
commit 036fa32cd3
114 changed files with 11923 additions and 1 deletions

View File

@ -0,0 +1,22 @@
import z from 'zod';
/** @see {@link https://docs.joinmastodon.org/entities/Relationship/} */
const relationshipSchema = z.object({
blocked_by: z.boolean().catch(false),
blocking: z.boolean().catch(false),
domain_blocking: z.boolean().catch(false),
endorsed: z.boolean().catch(false),
followed_by: z.boolean().catch(false),
following: z.boolean().catch(false),
id: z.string(),
muting: z.boolean().catch(false),
muting_notifications: z.boolean().catch(false),
note: z.string().catch(''),
notifying: z.boolean().catch(false),
requested: z.boolean().catch(false),
showing_reblogs: z.boolean().catch(false),
});
type Relationship = z.infer<typeof relationshipSchema>;
export { relationshipSchema, type Relationship };