UNPKG

@speckle/shared

Version:

Shared code between various Speckle JS packages

10 lines 1.12 kB
import { AuthCheckContextLoaderKeys } from '../../domain/loaders.js'; import { MaybeUserContext, WorkspaceContext } from '../../domain/context.js'; import { DashboardsNotEnabledError, WorkspaceNoEditorSeatError, WorkspaceNotEnoughPermissionsError, WorkspacePlanNoFeatureAccessError } from '../../domain/authErrors.js'; import { AuthPolicy } from '../../domain/policies.js'; type PolicyLoaderKeys = typeof AuthCheckContextLoaderKeys.getEnv | typeof AuthCheckContextLoaderKeys.getServerRole | typeof AuthCheckContextLoaderKeys.getAdminOverrideEnabled | typeof AuthCheckContextLoaderKeys.getWorkspacePlan | typeof AuthCheckContextLoaderKeys.getWorkspaceRole | typeof AuthCheckContextLoaderKeys.getWorkspaceSeat; type PolicyArgs = MaybeUserContext & WorkspaceContext; type PolicyErrors = InstanceType<typeof DashboardsNotEnabledError | typeof WorkspaceNotEnoughPermissionsError | typeof WorkspacePlanNoFeatureAccessError | typeof WorkspaceNoEditorSeatError>; export declare const canCreateDashboardsPolicy: AuthPolicy<PolicyLoaderKeys, PolicyArgs, PolicyErrors>; export {}; //# sourceMappingURL=canCreateDashboards.d.ts.map