All files / src/entities/wiki schema.ts

100% Statements 4/4
100% Branches 0/0
100% Functions 0/0
100% Lines 4/4

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 283x     3x             3x               3x                  
import { z } from "zod";
 
// Write-only wiki operation schemas
export const CreateWikiPageSchema = z.object({
  namespace: z.string().describe("Namespace path (group or project) to create wiki page in"),
  title: z.string().describe("Title of the wiki page"),
  content: z.string().describe("Content of the wiki page"),
  format: z.string().optional().describe("Content format, e.g., markdown, rdoc"),
});
 
export const UpdateWikiPageSchema = z.object({
  namespace: z.string().describe("Namespace path (group or project) containing the wiki page"),
  slug: z.string().describe("URL-encoded slug of the wiki page"),
  title: z.string().optional().describe("New title of the wiki page"),
  content: z.string().optional().describe("New content of the wiki page"),
  format: z.string().optional().describe("Content format, e.g., markdown, rdoc"),
});
 
export const DeleteWikiPageSchema = z.object({
  namespace: z.string().describe("Namespace path (group or project) containing the wiki page"),
  slug: z.string().describe("URL-encoded slug of the wiki page"),
});
 
// Type exports
export type CreateWikiPageOptions = z.infer<typeof CreateWikiPageSchema>;
export type UpdateWikiPageOptions = z.infer<typeof UpdateWikiPageSchema>;
export type DeleteWikiPageOptions = z.infer<typeof DeleteWikiPageSchema>;