// src/schemas/projectConfigSchema.ts
import { z as z4 } from "zod";

// src/schemas/projectSecurityConfigSchema.ts
import { z as z3 } from "zod";

// src/schemas/projectSecurityRoleSchema.ts
import { z as z2 } from "zod";

// src/schemas/projectSecurityRoleModelPermissionSchema.ts
import { z } from "zod";
var SecurityOptionOptions;
(function(SecurityOptionOptions2) {
  SecurityOptionOptions2["ALLOW_EVERYTHING"] = "allow-everything";
  SecurityOptionOptions2["ALLOW_OWN"] = "allow-own";
  SecurityOptionOptions2[SecurityOptionOptions2["DISABLED"] = 0] = "DISABLED";
})(SecurityOptionOptions || (SecurityOptionOptions = {}));
var ZodSecurityOptionOptions = z.nativeEnum(SecurityOptionOptions);
var projectSecurityRoleModelPermissionSchema = z.object({
  c: ZodSecurityOptionOptions.default(0),
  r: ZodSecurityOptionOptions.default(0),
  u: ZodSecurityOptionOptions.default(0),
  d: ZodSecurityOptionOptions.default(0)
});

// src/schemas/projectSecurityRoleSchema.ts
var projectSecurityRoleSchema = z2.object({
  name: z2.string(),
  modelPermissions: z2.record(z2.enum([
    "users",
    "userRoles",
    "files"
  ]).or(z2.string()), projectSecurityRoleModelPermissionSchema),
  hasAccessToAdmin: z2.boolean().default(true)
});

// src/schemas/projectSecurityConfigSchema.ts
var projectSecurityConfigSchema = z3.object({
  secret: z3.string().optional(),
  roles: z3.array(projectSecurityRoleSchema).optional()
});

// src/schemas/projectConfigSchema.ts
var projectConfigSchema = z4.object({
  name: z4.string(),
  slug: z4.string().optional(),
  url: z4.string(),
  prefix: z4.string().optional(),
  security: projectSecurityConfigSchema.optional()
});
export {
  projectConfigSchema
};
//# sourceMappingURL=projectConfigSchema.js.map