PersistentAI API Documentation / @persistentai/fireflow-vfs / server / WorkspaceWorkflows
Class: WorkspaceWorkflows
Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:43
Workspace workflows class
Extends
ConfiguredInstance
Constructors
Constructor
new WorkspaceWorkflows(
db,name?):WorkspaceWorkflows
Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:44
Parameters
db
name?
string = 'WorkspaceWorkflows'
Returns
WorkspaceWorkflows
Overrides
ConfiguredInstance.constructor
Properties
name
readonlyname:string
Defined in: node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@dbos-inc/dbos-sdk/dist/src/decorators.d.ts:126
Inherited from
ConfiguredInstance.name
Methods
addCollaborator()
addCollaborator(
workspaceId,targetUserId,role,invitedByUserId):Promise<void>
Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:287
Add collaborator to workspace
Parameters
workspaceId
string
targetUserId
string
role
"editor" | "viewer"
invitedByUserId
string
Returns
Promise<void>
createWorkspace()
createWorkspace(
name,userId,options?):Promise<Workspace>
Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:60
Create a new workspace
Steps:
- Generate IDs
- Create lakeFS repository
- Create FireFlow workspace record
- Add owner as collaborator
- Deploy webhook action configuration
- Emit event
Parameters
name
string
userId
string
options?
description?
string
settings?
Partial<WorkspaceSettings>
visibility?
Returns
Promise<Workspace>
deleteWorkspace()
deleteWorkspace(
workspaceId,userId):Promise<void>
Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:174
Delete a workspace
Steps:
- Check ownership
- Delete lakeFS repository
- Delete FireFlow records (cascades to collaborators, shares)
- Emit event
Parameters
workspaceId
string
userId
string
Returns
Promise<void>
initialize()
initialize():
Promise<void>
Defined in: node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@dbos-inc/dbos-sdk/dist/src/decorators.d.ts:131
Override this method to perform async initialization between construction and DBOS.launch().
Returns
Promise<void>
Inherited from
ConfiguredInstance.initialize
removeCollaborator()
removeCollaborator(
workspaceId,targetUserId,removedByUserId):Promise<void>
Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:343
Remove collaborator from workspace
Parameters
workspaceId
string
targetUserId
string
removedByUserId
string
Returns
Promise<void>
updateWorkspaceSettings()
updateWorkspaceSettings(
workspaceId,userId,updates):Promise<Workspace>
Defined in: packages/fireflow-vfs/src/workflows/workspace-workflows.ts:228
Update workspace settings
Parameters
workspaceId
string
userId
string
updates
description?
string
name?
string
visibility?
Returns
Promise<Workspace>