PersistentAI API Documentation / @persistentai/fireflow-vfs / server / TypedFileWorkflows
Class: TypedFileWorkflows
Defined in: packages/fireflow-vfs/src/workflows/typed-file-workflows.ts:65
DBOS Workflow for creating typed files with pre-create hooks
Extends
ConfiguredInstance
Constructors
Constructor
new TypedFileWorkflows(
db,name?):TypedFileWorkflows
Defined in: packages/fireflow-vfs/src/workflows/typed-file-workflows.ts:68
Parameters
db
name?
string = 'TypedFileWorkflows'
Returns
TypedFileWorkflows
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
createTypedFile()
createTypedFile(
workspaceId,branchName,path,typeId,params,userId):Promise<CreateTypedFileResult>
Defined in: packages/fireflow-vfs/src/workflows/typed-file-workflows.ts:91
Create a typed file with pre-create hook
Steps:
- Check permissions and validate type
- Execute pre-create hook (if defined)
- Generate file content with resourceId
- Write to lakeFS
- Create commit
- Emit event
Parameters
workspaceId
string
branchName
string
path
string
typeId
string
params
Record<string, unknown>
userId
string
Returns
Promise<CreateTypedFileResult>
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
registerHook()
registerHook(
hookId,executor):void
Defined in: packages/fireflow-vfs/src/workflows/typed-file-workflows.ts:75
Register a pre-create hook executor
Parameters
hookId
string
executor
Returns
void