bigbuffet-rw/packages/pl-api/lib/entities/search.ts
marcin mikołajczak 036fa32cd3 Add pl-api to workspace
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-28 13:43:23 +02:00

17 lines
487 B
TypeScript

import { z } from 'zod';
import { filteredArray } from './utils';
import { accountSchema, groupSchema, statusSchema, tagSchema } from '.';
/** @see {@link https://docs.joinmastodon.org/entities/Search} */
const searchSchema = z.object({
accounts: filteredArray(accountSchema),
statuses: filteredArray(statusSchema),
hashtags: filteredArray(tagSchema),
groups: filteredArray(groupSchema),
});
type Search = z.infer<typeof searchSchema>;
export { searchSchema, type Search };