import { z } from 'zod';
/** Sort direction for list operations */
export const SortDirectionSchema = z
    .enum(['asc', 'desc'])
    .describe('Sort direction for list operations (ascending or descending).');
/** Base pagination parameters used by all list operations */
export const PaginationParamsSchema = z.object({
    limit: z.number().int().nonnegative().optional().describe('Maximum number of items to return'),
    offset: z
        .number()
        .int()
        .nonnegative()
        .optional()
        .describe('Number of items to skip for pagination'),
});
/** Sort parameters generic over allowed field names */
export const SortParamsSchema = (sortFieldSchema) => z.object({
    sort: sortFieldSchema.optional().describe('Field to sort by'),
    direction: SortDirectionSchema.optional().describe("Sort direction (default: 'desc')"),
});
/** Combined list parameters = pagination + sorting */
export const ListParamsSchema = (sortFieldSchema) => PaginationParamsSchema.merge(SortParamsSchema(sortFieldSchema));
/** Standard paginated list response */
export const PaginatedListSchema = (itemSchema) => z.object({
    data: z.array(itemSchema).describe('Array of items'),
    total: z.number().describe('Total number of items matching the query'),
    limit: z.number().describe('Number of items requested per page'),
    offset: z.number().describe('Number of items skipped'),
    hasMore: z.boolean().describe('Whether more items are available'),
});
//# sourceMappingURL=pagination.js.map