import { z } from 'zod';

import type { components } from './openapi/schema';
import { commonQuerySchema, stringArrayCoerce, stringCoerce } from './common';

export type Author = components['schemas']['AuthorRead'];

export const authorQuerySchema = commonQuerySchema.extend({
	libraries: stringArrayCoerce,
	ids: stringArrayCoerce
});

export type AuthorQuerySchema = typeof authorQuerySchema;
