api
Files plugin API operations.
Defines the typed API operations for the files plugin. These operations
are available via runtime.plugins.files.api when the plugin is installed.
Available Operations
list_files- List files in a directoryupload- Upload a new filesave_file- Save file contentdownload_data- Download from data directorydownload_cache- Download from cache directorydownload_upload- Download from upload directory
Example
Type Aliases
FilesApi
FilesApi =
TypedOperations<FilesPaths, typeofFILES_OPERATIONS>
Defined in: files/src/api.ts:72
Typed API client for files operations.
Access via runtime.plugins.files.api.
FilesOperations
FilesOperations =
DefineOperations<operations>
Defined in: files/src/api.ts:44
OpenAPI operations type for the files plugin
FilesPaths
FilesPaths =
DefinePaths<paths>
Defined in: files/src/api.ts:41
OpenAPI paths type for the files plugin
Variables
FILES_OPERATIONS
constFILES_OPERATIONS:object
Defined in: files/src/api.ts:52
Files plugin operation bindings.
Maps friendly operation names to their HTTP method and path. Paths do NOT include any prefix - that's provided via plugin options.
Type Declaration
download_cache
readonlydownload_cache:object
Download a file from the cache directory
download_cache.method
readonlymethod:"get"='get'
download_cache.path
readonlypath:"/file/cache/{path}"='/file/cache/{path}'
download_data
readonlydownload_data:object
Download a file from the data directory
download_data.method
readonlymethod:"get"='get'
download_data.path
readonlypath:"/file/data/{path}"='/file/data/{path}'
download_upload
readonlydownload_upload:object
Download a file from the upload directory
download_upload.method
readonlymethod:"get"='get'
download_upload.path
readonlypath:"/file/upload/{path}"='/file/upload/{path}'
list_files
readonlylist_files:object
List files in a directory
list_files.method
readonlymethod:"get"='get'
list_files.path
readonlypath:"/list"='/list'
save_file
readonlysave_file:object
Save content to a file
save_file.method
readonlymethod:"post"='post'
save_file.path
readonlypath:"/save"='/save'
upload
readonlyupload:object
Upload a file via multipart form
upload.method
readonlymethod:"post"='post'
upload.path
readonlypath:"/upload"='/upload'