import { WorkspaceEvents, WorkspaceEventsPayloads } from '@/modules/workspacesCore/domain/events' import { Workspace, WorkspaceAcl } from '@/modules/workspaces/domain/types' /** Workspace */ type UpsertWorkspaceArgs = { workspace: Workspace } export type UpsertWorkspace = (args: UpsertWorkspaceArgs) => Promise type GetWorkspaceArgs = { workspaceId: string } export type GetWorkspace = (args: GetWorkspaceArgs) => Promise /** WorkspaceRole */ export type UpsertWorkspaceRole = (args: WorkspaceAcl) => Promise type GetWorkspaceRoleArgs = { workspaceId: string userId: string } export type GetWorkspaceRole = ( args: GetWorkspaceRoleArgs ) => Promise /** Blob */ export type StoreBlob = (args: string) => Promise /** Events */ export type EmitWorkspaceEvent = (args: { event: TEvent payload: WorkspaceEventsPayloads[TEvent] }) => Promise