Files
outline-mcp/src/tools/common.ts
T
t.behrendt e2081a19b5
CD / test (push) Successful in 21s
CD / Check changes (push) Successful in 31s
CD / Build and push (amd64) (push) Successful in 47s
CD / Build and push (arm64) (push) Successful in 3m6s
CD / Create manifest (push) Successful in 55s
initial-commit (#1)
Reviewed-on: #1
Co-authored-by: Timo Behrendt <t.behrendt@t00n.de>
Co-committed-by: Timo Behrendt <t.behrendt@t00n.de>
2025-07-16 07:21:12 +02:00

20 lines
663 B
TypeScript

import { z } from "zod";
const positiveInteger = z.number().int().positive();
const uuid = z.string().uuid();
const optionalUuid = uuid.optional();
// Pagination
export const offset = positiveInteger.optional();
export const limit = positiveInteger.optional().default(10);
export const sort = z.enum(["createdAt", "updatedAt", "title"]).optional();
export const direction = z
.enum(["asc", "desc"])
.optional()
.transform((val) => val?.toUpperCase() as "ASC" | "DESC" | undefined);
export const collectionId = optionalUuid;
export const userId = optionalUuid;
export const backlinkDocumentId = optionalUuid;
export const parentDocumentId = optionalUuid;