import z from 'zod';

// src/server/schemas/common.ts
var runIdSchema = z.object({
  runId: z.string().describe("Unique identifier for the run")
});
var optionalRunIdSchema = z.object({
  runId: z.string().optional()
});
var paginationInfoSchema = z.object({
  total: z.number(),
  page: z.number(),
  perPage: z.union([z.number(), z.literal(false)]),
  hasMore: z.boolean()
});
var createPagePaginationSchema = (defaultPerPage) => {
  const baseSchema = {
    page: z.coerce.number().optional().default(0)
  };
  if (defaultPerPage !== void 0) {
    return z.object({
      ...baseSchema,
      perPage: z.coerce.number().optional().default(defaultPerPage)
    });
  } else {
    return z.object({
      ...baseSchema,
      perPage: z.coerce.number().optional()
    });
  }
};
var createCombinedPaginationSchema = () => {
  return z.object({
    page: z.coerce.number().optional(),
    perPage: z.coerce.number().optional(),
    /**
     * @deprecated Use page and perPage instead
     */
    offset: z.coerce.number().optional(),
    /**
     * @deprecated Use page and perPage instead
     */
    limit: z.coerce.number().optional()
  });
};
var tracingOptionsSchema = z.object({
  metadata: z.record(z.string(), z.unknown()).optional(),
  requestContextKeys: z.array(z.string()).optional(),
  traceId: z.string().optional(),
  parentSpanId: z.string().optional()
});
var coreMessageSchema = z.any();
var successResponseSchema = z.object({
  success: z.boolean()
});
var messageResponseSchema = z.object({
  message: z.string()
});
var partialQuerySchema = z.object({
  partial: z.string().optional()
});
var statusQuerySchema = z.object({
  status: z.enum(["draft", "published", "archived"]).optional().default("published").describe("Which version to resolve: published (active version) or draft (latest version)")
});
var baseLogMessageSchema = z.object({
  level: z.enum(["debug", "info", "warn", "error", "silent"]),
  msg: z.string(),
  time: z.date(),
  context: z.record(z.string(), z.unknown()).optional(),
  runId: z.string().optional(),
  pid: z.number(),
  hostname: z.string(),
  name: z.string()
});

export { baseLogMessageSchema, coreMessageSchema, createCombinedPaginationSchema, createPagePaginationSchema, messageResponseSchema, optionalRunIdSchema, paginationInfoSchema, partialQuerySchema, runIdSchema, statusQuerySchema, successResponseSchema, tracingOptionsSchema };
//# sourceMappingURL=chunk-USZD5AX2.js.map
//# sourceMappingURL=chunk-USZD5AX2.js.map