import { AuthPolicyEnsureFragment } from '../domain/policies.js'; import { PersonalProjectsLimitedError, ProjectNotFoundError, ServerNoAccessError, ServerNoSessionError, ServerNotEnoughPermissionsError, WorkspaceLimitsReachedError, WorkspaceNoAccessError, WorkspaceNoEditorSeatError, WorkspaceNotEnoughPermissionsError, WorkspacePlanNoFeatureAccessError, WorkspaceReadOnlyError, WorkspacesNotEnabledError, WorkspaceSsoSessionNoAccessError } from '../domain/authErrors.js'; import { Loaders } from '../domain/loaders.js'; import { WorkspaceRoles } from '../../core/constants.js'; import { MaybeUserContext, MaybeWorkspaceContext, ProjectContext, WorkspaceContext } from '../domain/context.js'; import { WorkspacePlanFeatures } from '../../workspaces/helpers/features.js'; /** * Ensure user has a workspace role, and a valid SSO session (if SSO is configured) */ export declare const ensureWorkspaceRoleAndSessionFragment: AuthPolicyEnsureFragment<'getWorkspaceRole' | 'getWorkspaceSsoProvider' | 'getWorkspaceSsoSession' | 'getWorkspace', { userId: string; workspaceId: string; role?: WorkspaceRoles; }, InstanceType>; /** * Ensure the workspaces module is enabled */ export declare const ensureWorkspacesEnabledFragment: AuthPolicyEnsureFragment>; /** * Ensure workspace is not read-only */ export declare const ensureWorkspaceNotReadOnlyFragment: AuthPolicyEnsureFragment>; /** * Ensure workspace can accept new project (not read-only, limits not reached). * If userId is specified, will also check for user role & seat */ export declare const ensureWorkspaceProjectCanBeCreatedFragment: AuthPolicyEnsureFragment>; /** * Ensure model can be created (workspace not read-only, limits not reached). * If userId is specified, will also check for appropriate user role & seat */ export declare const ensureModelCanBeCreatedFragment: AuthPolicyEnsureFragment>; export declare const ensureUserIsWorkspaceAdminFragment: AuthPolicyEnsureFragment>; /** * Check if workspace has access to a specific feature */ export declare const ensureCanUseWorkspacePlanFeatureFragment: AuthPolicyEnsureFragment | InstanceType | InstanceType | InstanceType>; //# sourceMappingURL=workspaces.d.ts.map