@speckle/shared
Version:
Shared code between various Speckle JS packages
10 lines • 1.27 kB
TypeScript
import { AuthCheckContextLoaderKeys } from '../../domain/loaders.js';
import { DashboardContext, MaybeUserContext } from '../../domain/context.js';
import { DashboardNotFoundError, DashboardNotOwnerError, 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.getDashboard | typeof AuthCheckContextLoaderKeys.getWorkspacePlan | typeof AuthCheckContextLoaderKeys.getWorkspaceRole | typeof AuthCheckContextLoaderKeys.getWorkspaceSeat;
type PolicyArgs = MaybeUserContext & DashboardContext;
type PolicyErrors = InstanceType<typeof DashboardsNotEnabledError | typeof DashboardNotOwnerError | typeof DashboardNotFoundError | typeof WorkspaceNotEnoughPermissionsError | typeof WorkspacePlanNoFeatureAccessError | typeof WorkspaceNoEditorSeatError>;
export declare const canDeleteDashboardPolicy: AuthPolicy<PolicyLoaderKeys, PolicyArgs, PolicyErrors>;
export {};
//# sourceMappingURL=canDelete.d.ts.map