bigbuffet-rw/packages/pl-api/lib/entities/preview-card-author.ts
marcin mikołajczak bc65755862 pl-api: Update docs
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-11-29 16:01:54 +01:00

20 lines
505 B
TypeScript

import * as v from 'valibot';
import { accountSchema } from './account';
/**
* @category Schemas
* @see {@link https://docs.joinmastodon.org/entities/PreviewCardAuthor/}
*/
const previewCardAuthorSchema = v.object({
name: v.string(),
url: v.pipe(v.string(), v.url()),
account: v.fallback(v.nullable(accountSchema), null),
});
/**
* @category Entity types
*/
type PreviewCardAuthor = v.InferOutput<typeof previewCardAuthorSchema>;
export { previewCardAuthorSchema, type PreviewCardAuthor };