Files
speckle-server/packages/server/modules/gatekeeper/domain/operations.ts
T
Gergő Jedlicska bf80347abf gergo/web 2664 workspace backend powered metrics (#3985)
* feat(workspaces): delete workspace emit event

* feat(workspaces): move workspace group metrics to the backend

* Removed FE mixpanel group update

* Remove fragment

* test(gatekeeper): add unittest to new gatekeeper service

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2025-02-17 09:50:16 +01:00

33 lines
909 B
TypeScript

import { WorkspaceFeatureName } from '@/modules/gatekeeper/domain/workspacePricing'
import {
PlanStatuses,
WorkspacePlan,
WorkspacePlans
} from '@/modules/gatekeeperCore/domain/billing'
import { Workspace } from '@/modules/workspacesCore/domain/types'
export type CanWorkspaceAccessFeature = (args: {
workspaceId: string
workspaceFeature: WorkspaceFeatureName
}) => Promise<boolean>
export type WorkspaceFeatureAccessFunction = (args: {
workspaceId: string
}) => Promise<boolean>
export type ChangeExpiredTrialWorkspacePlanStatuses = (args: {
numberOfDays: number
}) => Promise<WorkspacePlan[]>
export type GetWorkspacesByPlanDaysTillExpiry = (args: {
daysTillExpiry: number
planValidFor: number
plan: WorkspacePlans
status: PlanStatuses
}) => Promise<Workspace[]>
export type GetWorkspacePlanByProjectId = ({
projectId
}: {
projectId: string
}) => Promise<WorkspacePlan | null>