import { z } from 'zod'; /** * Enum for Permission Types */ export declare enum PermissionTypes { /** * Type for Prompt Permissions */ PROMPTS = "PROMPTS", /** * Type for Bookmark Permissions */ BOOKMARKS = "BOOKMARKS", /** * Type for Agent Permissions */ AGENTS = "AGENTS", /** * Type for Memory Permissions */ MEMORIES = "MEMORIES", /** * Type for Multi-Conversation Permissions */ MULTI_CONVO = "MULTI_CONVO", /** * Type for Temporary Chat */ TEMPORARY_CHAT = "TEMPORARY_CHAT", /** * Type for using the "Run Code" LC Code Interpreter API feature */ RUN_CODE = "RUN_CODE", /** * Type for using the "Web Search" feature */ WEB_SEARCH = "WEB_SEARCH", /** * Type for People Picker Permissions */ PEOPLE_PICKER = "PEOPLE_PICKER", /** * Type for Marketplace Permissions */ MARKETPLACE = "MARKETPLACE", /** * Type for using the "File Search" feature */ FILE_SEARCH = "FILE_SEARCH", /** * Type for using the "File Citations" feature in agents */ FILE_CITATIONS = "FILE_CITATIONS", /** * Type for MCP Server Permissions */ MCP_SERVERS = "MCP_SERVERS", /** * Type for Remote Agent (API) Permissions */ REMOTE_AGENTS = "REMOTE_AGENTS", /** * Type for Skill Permissions */ SKILLS = "SKILLS", /** * Type for Shared Link Permissions */ SHARED_LINKS = "SHARED_LINKS", /** * Type for Scheduled Chats Permissions */ SCHEDULES = "SCHEDULES" } /** * Maps PermissionTypes to their corresponding `interface` config field names. * Used to identify which interface fields seed role permissions at startup * and must NOT be overridden via DB config (use the role permissions editor instead). */ export declare const PERMISSION_TYPE_INTERFACE_FIELDS: Record; /** Set of interface config field names that correspond to role permissions. */ export declare const INTERFACE_PERMISSION_FIELDS: Set; /** * Interface fields that seed a permission (use/create) BUT also carry runtime * config that must survive DB/tenant/user overrides. For these, override * sanitizers strip only the permission sub-keys (use/create) from the object * form and PRESERVE the boolean form — for `schedules`, `interface.schedules: false` * is the runtime feature disable that `getLimits` reads, not a permission toggle. */ export declare const RUNTIME_CONFIG_INTERFACE_FIELDS: Set; /** * YAML sub-keys within composite interface permission fields that map to permission bits. * When an interface permission field is an object, only these sub-keys are stripped from * DB overrides — other sub-keys (like `placeholder`, `trustCheckbox`) are UI-only and pass through. * * Mapping to Permissions enum: * 'use' → Permissions.USE (agents, prompts, mcpServers, remoteAgents, marketplace) * 'create' → Permissions.CREATE (agents, prompts, mcpServers, remoteAgents) * 'share' → Permissions.SHARE (agents, prompts, mcpServers, remoteAgents) * 'public' → Permissions.SHARE_PUBLIC (agents, prompts, mcpServers, remoteAgents) * 'users' → Permissions.VIEW_USERS (peoplePicker only) * 'groups' → Permissions.VIEW_GROUPS (peoplePicker only) * 'roles' → Permissions.VIEW_ROLES (peoplePicker only) * 'configureObo' → Permissions.CONFIGURE_OBO (mcpServers only) */ export declare const PERMISSION_SUB_KEYS: Set; /** * Enum for Role-Based Access Control Constants */ export declare enum Permissions { USE = "USE", CREATE = "CREATE", UPDATE = "UPDATE", READ = "READ", READ_AUTHOR = "READ_AUTHOR", SHARE = "SHARE", /** Can disable if desired */ OPT_OUT = "OPT_OUT", VIEW_USERS = "VIEW_USERS", VIEW_GROUPS = "VIEW_GROUPS", VIEW_ROLES = "VIEW_ROLES", /** Can share resources publicly (with everyone) */ SHARE_PUBLIC = "SHARE_PUBLIC", /** * Can configure MCP server On-Behalf-Of (OBO) token exchange. Gates the * `obo` field on MCP server configs because OBO silently mints and forwards * per-user delegated tokens to whatever URL the server points at. */ CONFIGURE_OBO = "CONFIGURE_OBO" } export declare const promptPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; export type TPromptPermissions = z.infer; export declare const bookmarkPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; export type TBookmarkPermissions = z.infer; export declare const memoryPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; UPDATE: z.ZodDefault; READ: z.ZodDefault; OPT_OUT: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; UPDATE: boolean; READ: boolean; OPT_OUT: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; UPDATE?: boolean | undefined; READ?: boolean | undefined; OPT_OUT?: boolean | undefined; }>; export type TMemoryPermissions = z.infer; export declare const agentPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; export type TAgentPermissions = z.infer; export declare const multiConvoPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; export type TMultiConvoPermissions = z.infer; export declare const temporaryChatPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; export type TTemporaryChatPermissions = z.infer; export declare const runCodePermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; export type TRunCodePermissions = z.infer; export declare const webSearchPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; export type TWebSearchPermissions = z.infer; export declare const peoplePickerPermissionsSchema: z.ZodObject<{ VIEW_USERS: z.ZodDefault; VIEW_GROUPS: z.ZodDefault; VIEW_ROLES: z.ZodDefault; }, "strip", z.ZodTypeAny, { VIEW_USERS: boolean; VIEW_GROUPS: boolean; VIEW_ROLES: boolean; }, { VIEW_USERS?: boolean | undefined; VIEW_GROUPS?: boolean | undefined; VIEW_ROLES?: boolean | undefined; }>; export type TPeoplePickerPermissions = z.infer; export declare const marketplacePermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; export type TMarketplacePermissions = z.infer; export declare const fileSearchPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; export type TFileSearchPermissions = z.infer; export declare const fileCitationsPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; export type TFileCitationsPermissions = z.infer; export declare const mcpServersPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; CONFIGURE_OBO: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; CONFIGURE_OBO: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; CONFIGURE_OBO?: boolean | undefined; }>; export type TMcpServersPermissions = z.infer; export declare const remoteAgentsPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; export type TRemoteAgentsPermissions = z.infer; export declare const skillPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; export type TSkillPermissions = z.infer; export declare const schedulesPermissionsSchema: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; }>; export type TSchedulesPermissions = z.infer; export declare const sharedLinksPermissionsSchema: z.ZodObject<{ CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; export type TSharedLinksPermissions = z.infer; export declare const permissionsSchema: z.ZodObject<{ PROMPTS: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; BOOKMARKS: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; MEMORIES: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; UPDATE: z.ZodDefault; READ: z.ZodDefault; OPT_OUT: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; UPDATE: boolean; READ: boolean; OPT_OUT: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; UPDATE?: boolean | undefined; READ?: boolean | undefined; OPT_OUT?: boolean | undefined; }>; AGENTS: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; MULTI_CONVO: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; TEMPORARY_CHAT: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; RUN_CODE: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; WEB_SEARCH: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; PEOPLE_PICKER: z.ZodObject<{ VIEW_USERS: z.ZodDefault; VIEW_GROUPS: z.ZodDefault; VIEW_ROLES: z.ZodDefault; }, "strip", z.ZodTypeAny, { VIEW_USERS: boolean; VIEW_GROUPS: boolean; VIEW_ROLES: boolean; }, { VIEW_USERS?: boolean | undefined; VIEW_GROUPS?: boolean | undefined; VIEW_ROLES?: boolean | undefined; }>; MARKETPLACE: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; FILE_SEARCH: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; FILE_CITATIONS: z.ZodObject<{ USE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; }, { USE?: boolean | undefined; }>; MCP_SERVERS: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; CONFIGURE_OBO: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; CONFIGURE_OBO: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; CONFIGURE_OBO?: boolean | undefined; }>; REMOTE_AGENTS: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; SKILLS: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; SHARED_LINKS: z.ZodObject<{ CREATE: z.ZodDefault; SHARE: z.ZodDefault; SHARE_PUBLIC: z.ZodDefault; }, "strip", z.ZodTypeAny, { CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }, { CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }>; SCHEDULES: z.ZodObject<{ USE: z.ZodDefault; CREATE: z.ZodDefault; }, "strip", z.ZodTypeAny, { USE: boolean; CREATE: boolean; }, { USE?: boolean | undefined; CREATE?: boolean | undefined; }>; }, "strip", z.ZodTypeAny, { PROMPTS: { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }; BOOKMARKS: { USE: boolean; }; AGENTS: { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }; MEMORIES: { USE: boolean; CREATE: boolean; UPDATE: boolean; READ: boolean; OPT_OUT: boolean; }; MULTI_CONVO: { USE: boolean; }; TEMPORARY_CHAT: { USE: boolean; }; RUN_CODE: { USE: boolean; }; WEB_SEARCH: { USE: boolean; }; PEOPLE_PICKER: { VIEW_USERS: boolean; VIEW_GROUPS: boolean; VIEW_ROLES: boolean; }; MARKETPLACE: { USE: boolean; }; FILE_SEARCH: { USE: boolean; }; FILE_CITATIONS: { USE: boolean; }; MCP_SERVERS: { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; CONFIGURE_OBO: boolean; }; REMOTE_AGENTS: { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }; SKILLS: { USE: boolean; CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }; SHARED_LINKS: { CREATE: boolean; SHARE: boolean; SHARE_PUBLIC: boolean; }; SCHEDULES: { USE: boolean; CREATE: boolean; }; }, { PROMPTS: { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }; BOOKMARKS: { USE?: boolean | undefined; }; AGENTS: { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }; MEMORIES: { USE?: boolean | undefined; CREATE?: boolean | undefined; UPDATE?: boolean | undefined; READ?: boolean | undefined; OPT_OUT?: boolean | undefined; }; MULTI_CONVO: { USE?: boolean | undefined; }; TEMPORARY_CHAT: { USE?: boolean | undefined; }; RUN_CODE: { USE?: boolean | undefined; }; WEB_SEARCH: { USE?: boolean | undefined; }; PEOPLE_PICKER: { VIEW_USERS?: boolean | undefined; VIEW_GROUPS?: boolean | undefined; VIEW_ROLES?: boolean | undefined; }; MARKETPLACE: { USE?: boolean | undefined; }; FILE_SEARCH: { USE?: boolean | undefined; }; FILE_CITATIONS: { USE?: boolean | undefined; }; MCP_SERVERS: { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; CONFIGURE_OBO?: boolean | undefined; }; REMOTE_AGENTS: { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }; SKILLS: { USE?: boolean | undefined; CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }; SHARED_LINKS: { CREATE?: boolean | undefined; SHARE?: boolean | undefined; SHARE_PUBLIC?: boolean | undefined; }; SCHEDULES: { USE?: boolean | undefined; CREATE?: boolean | undefined; }; }>;