bf80347abf
* 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>
33 lines
909 B
TypeScript
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>
|