/** * postgres-mcp - Role Management Tool Schemas * * Input validation and output schemas for role management tools. * 12 tools: list, create, drop, attributes, grants, grant, assign, * revoke, user_roles, set, rls_enable, rls_policies. */ import { z } from "zod"; /** * pg_role_list — list all roles with optional pattern filter */ export declare const RoleListSchemaBase: z.ZodObject<{ pattern: z.ZodOptional; includeSystem: z.ZodOptional; limit: z.ZodOptional; }, z.core.$strip>; export declare const RoleListSchema: z.ZodPreprocess; includeSystem: z.ZodOptional; limit: z.ZodOptional; }, z.core.$strip>>; /** * pg_role_create — create a new role with optional attributes */ export declare const RoleCreateSchemaBase: z.ZodObject<{ name: z.ZodString; ifNotExists: z.ZodOptional; login: z.ZodOptional; password: z.ZodOptional; superuser: z.ZodOptional; createdb: z.ZodOptional; createrole: z.ZodOptional; replication: z.ZodOptional; bypassrls: z.ZodOptional; connectionLimit: z.ZodOptional; validUntil: z.ZodOptional; inRoles: z.ZodOptional>; }, z.core.$strip>; export declare const RoleCreateSchema: z.ZodObject<{ name: z.ZodString; ifNotExists: z.ZodOptional; login: z.ZodOptional; password: z.ZodOptional; superuser: z.ZodOptional; createdb: z.ZodOptional; createrole: z.ZodOptional; replication: z.ZodOptional; bypassrls: z.ZodOptional; connectionLimit: z.ZodOptional; validUntil: z.ZodOptional; inRoles: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_drop — drop a role */ export declare const RoleDropSchemaBase: z.ZodObject<{ name: z.ZodString; ifExists: z.ZodOptional; }, z.core.$strip>; export declare const RoleDropSchema: z.ZodObject<{ name: z.ZodString; ifExists: z.ZodOptional; }, z.core.$strip>; /** * pg_role_attributes — get detailed role attributes */ export declare const RoleAttributesSchemaBase: z.ZodObject<{ role: z.ZodString; }, z.core.$strip>; export declare const RoleAttributesSchema: z.ZodObject<{ role: z.ZodString; }, z.core.$strip>; /** * pg_role_grants — show privileges granted to a role */ export declare const RoleGrantsSchemaBase: z.ZodObject<{ role: z.ZodString; includeTableGrants: z.ZodOptional; }, z.core.$strip>; export declare const RoleGrantsSchema: z.ZodObject<{ role: z.ZodString; includeTableGrants: z.ZodOptional; }, z.core.$strip>; /** * pg_role_grant — grant privileges on objects to a role */ export declare const RoleGrantSchemaBase: z.ZodObject<{ role: z.ZodString; privileges: z.ZodArray; schema: z.ZodOptional; table: z.ZodOptional; tableName: z.ZodOptional; objectType: z.ZodOptional; withGrantOption: z.ZodOptional; }, z.core.$strip>; export declare const RoleGrantSchema: z.ZodPreprocess; schema: z.ZodOptional; table: z.ZodOptional; tableName: z.ZodOptional; objectType: z.ZodOptional; withGrantOption: z.ZodOptional; }, z.core.$strip>>; /** * pg_role_assign — grant role membership to another role/user */ export declare const RoleAssignSchemaBase: z.ZodObject<{ role: z.ZodString; user: z.ZodString; member: z.ZodOptional; withAdminOption: z.ZodOptional; withSet: z.ZodOptional; }, z.core.$strip>; export declare const RoleAssignSchema: z.ZodPreprocess; withAdminOption: z.ZodOptional; withSet: z.ZodOptional; }, z.core.$strip>>; /** * pg_role_revoke — revoke role or privileges from a user/role */ export declare const RoleRevokeSchemaBase: z.ZodObject<{ role: z.ZodString; user: z.ZodOptional; member: z.ZodOptional; privileges: z.ZodOptional>; schema: z.ZodOptional; table: z.ZodOptional; tableName: z.ZodOptional; objectType: z.ZodOptional; }, z.core.$strip>; export declare const RoleRevokeSchema: z.ZodPreprocess; member: z.ZodOptional; privileges: z.ZodOptional>; schema: z.ZodOptional; table: z.ZodOptional; tableName: z.ZodOptional; objectType: z.ZodOptional; }, z.core.$strip>>; /** * pg_user_roles — list roles assigned to a user/role */ export declare const UserRolesSchemaBase: z.ZodObject<{ user: z.ZodString; role: z.ZodOptional; }, z.core.$strip>; export declare const UserRolesSchema: z.ZodPreprocess; }, z.core.$strip>>; /** * pg_role_set — set session's active role */ export declare const RoleSetSchemaBase: z.ZodObject<{ role: z.ZodOptional; reset: z.ZodOptional; }, z.core.$strip>; export declare const RoleSetSchema: z.ZodPreprocess; reset: z.ZodOptional; }, z.core.$strip>>; /** * pg_role_rls_enable — enable/disable row-level security on a table */ export declare const RoleRlsEnableSchemaBase: z.ZodObject<{ table: z.ZodString; schema: z.ZodOptional; enable: z.ZodOptional; force: z.ZodOptional; }, z.core.$strip>; export declare const RoleRlsEnableSchema: z.ZodObject<{ table: z.ZodString; schema: z.ZodOptional; enable: z.ZodOptional; force: z.ZodOptional; }, z.core.$strip>; /** * pg_role_rls_policies — list RLS policies on a table */ export declare const RoleRlsPoliciesSchemaBase: z.ZodObject<{ table: z.ZodOptional; schema: z.ZodOptional; }, z.core.$strip>; export declare const RoleRlsPoliciesSchema: z.ZodPreprocess; schema: z.ZodOptional; }, z.core.$strip>>; /** * pg_role_list output */ export declare const RoleListOutputSchema: z.ZodObject<{ roles: z.ZodOptional>; }, z.core.$strip>>>; count: z.ZodOptional; success: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_create output */ export declare const RoleCreateOutputSchema: z.ZodObject<{ success: z.ZodOptional; name: z.ZodOptional; skipped: z.ZodOptional; reason: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_drop output */ export declare const RoleDropOutputSchema: z.ZodObject<{ success: z.ZodOptional; name: z.ZodOptional; skipped: z.ZodOptional; reason: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_attributes output */ export declare const RoleAttributesOutputSchema: z.ZodObject<{ exists: z.ZodOptional; role: z.ZodOptional>; oid: z.ZodNumber; }, z.core.$strip>>; success: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_grants output */ export declare const RoleGrantsOutputSchema: z.ZodObject<{ exists: z.ZodOptional; role: z.ZodOptional; memberOf: z.ZodOptional>>; tableGrants: z.ZodOptional>>; success: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_grant output */ export declare const RoleGrantOutputSchema: z.ZodObject<{ success: z.ZodOptional; role: z.ZodOptional; privileges: z.ZodOptional>; target: z.ZodOptional; exists: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_assign output */ export declare const RoleAssignOutputSchema: z.ZodObject<{ success: z.ZodOptional; role: z.ZodOptional; user: z.ZodOptional; withAdminOption: z.ZodOptional; exists: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_revoke output */ export declare const RoleRevokeOutputSchema: z.ZodObject<{ success: z.ZodOptional; role: z.ZodOptional; user: z.ZodOptional; privileges: z.ZodOptional>; target: z.ZodOptional; exists: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_user_roles output */ export declare const UserRolesOutputSchema: z.ZodObject<{ exists: z.ZodOptional; user: z.ZodOptional; roles: z.ZodOptional; }, z.core.$strip>>>; count: z.ZodOptional; success: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_set output */ export declare const RoleSetOutputSchema: z.ZodObject<{ success: z.ZodOptional; currentRole: z.ZodOptional; previousRole: z.ZodOptional; reset: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_rls_enable output */ export declare const RoleRlsEnableOutputSchema: z.ZodObject<{ success: z.ZodOptional; table: z.ZodOptional; schema: z.ZodOptional; enabled: z.ZodOptional; forced: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; /** * pg_role_rls_policies output */ export declare const RoleRlsPoliciesOutputSchema: z.ZodObject<{ policies: z.ZodOptional; usingExpr: z.ZodOptional>; withCheckExpr: z.ZodOptional>; }, z.core.$strip>>>; count: z.ZodOptional; success: z.ZodOptional; error: z.ZodOptional; code: z.ZodOptional; category: z.ZodOptional; recoverable: z.ZodOptional; suggestion: z.ZodOptional; details: z.ZodOptional>; }, z.core.$strip>; //# sourceMappingURL=roles.d.ts.map