import { z } from 'zod';

// ../core/src/platform/utils/validation.ts
var UuidSchema = z.string().uuid();
var NonEmptyStringSchema = z.string().trim().min(1).max(1e3);
var ResourceTypeSchema = z.enum(["agent", "workflow"]);
var OriginResourceTypeSchema = z.enum(["agent", "workflow", "scheduler", "api"]);
var CredentialNameSchema = z.string().trim().toLowerCase().min(1, "Credential name required").max(100, "Credential name too long (max 100 chars)").regex(
  /^[a-z0-9]+(-[a-z0-9]+)+$/,
  "Credential name must be lowercase letters, numbers, and hyphens in format: service-environment (e.g., gmail-prod, attio-dev)"
);
z.enum(["google-sheets", "google-calendar", "dropbox"]);
z.string().min(10, "Authorization code too short").max(1e3, "Authorization code too long");
z.string().min(10, "State parameter too short").max(2048, "State parameter too long");
z.string().trim().transform((str) => str.replace(/[<>'"]/g, ""));
z.string().email();
z.string().url();
z.object({
  limit: z.coerce.number().int().min(1).max(100).default(20),
  offset: z.coerce.number().int().min(0).default(0)
});
z.string().datetime();
z.object({
  startDate: z.string().datetime(),
  endDate: z.string().datetime()
});

export { CredentialNameSchema, NonEmptyStringSchema, OriginResourceTypeSchema, ResourceTypeSchema, UuidSchema };
