Home > @activeviam/activeui-sdk > ContentServer
ContentServer interface
Expose the API to interact with a Content Server.
Signature:
export interface ContentServer extends Server
Remarks
For all calls accepting owners
and readers
, if no permissions are given, they will default to the current username.
Properties
Property | Type | Description |
---|---|---|
areMultiplePermissionsSupported | () => Promise<boolean> | |
bookmarksManager | BookmarksManager | |
canMove | () => boolean | Returns a boolean indicating whether the underlying Content Server supports moving files. |
createFile | (path: ContentServerPath, content: string, owners: PermissionGroups, readers: PermissionGroups) => Promise<void> | Create a new file in the specified directory, letting the server specify its name. |
createListener | (settingsRepository: typeof SettingsRepository) => void | |
deleteFile | (path: ContentServerPath, childrenOnly?: boolean) => Promise<void> | Delete the file at the given path. If the file is a directory, its content will be recursively removed. Set childrenOnly to true to only remove a directory's children but not the directory itself. |
exist | (path: ContentServerPath) => Promise<void> | Resolved if the path exists and rejected otherwise. |
getFile | (path: ContentServerPath, recursive: number, metadata: boolean) => Promise<void> | Retrieve the file found at the given path. If the file is a directory, list all its accessible children, by default recursively. recursive is the maximum depth at which to retrieve children. -1 means that all available children are retrieved, 0 means that only the directory itself is retrieved. When metadata is true , only the metadata of the entries will be retrieved. Their content will be omitted. |
jwt | (authString: string) => Promise<JwtResult> | |
mkDir | (path: ContentServerPath, owners: PermissionGroups, readers: PermissionGroups, recursive?: boolean) => Promise<void> | Create an empty directory at the given path. Set recursive to true to reate the directory and its parents if they do not exist. |
moveFile | (source: ContentServerPath, destination: ContentServerPath) => Promise<void> | Move an existing file to a different location. |
report | (payload: ReportingPayload) => Promise<void> | Trigger the generation of a report. If the feature is not enabled server-side, the returned promise will be rejected. |
updateFile | (path: ContentServerPath, content: string, owners: PermissionGroups, readers: PermissionGroups, overwrite?: boolean, recursive?: boolean) => Promise<void> | Create a file at the given path or update an existing one. If the file already exists and no content is given, only permissions will be updated. If the file already exists and overwrite is true , the existing content will be overwritten. Set recursive to true to create a directory and its parents. If false , then the parent must exist. |
updatePermissions | (path: ContentServerPath, owners: PermissionGroups, readers: PermissionGroups) => Promise<void> | Update the permissions of the file at the given path. |