fix(core): update
This commit is contained in:
43
ts/classes.exposeprovider.ts
Normal file
43
ts/classes.exposeprovider.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import * as plugins from './plugins.js';
|
||||
|
||||
/**
|
||||
* An expose provider provides a standardized interface for exposing data
|
||||
* Note: SmartExpose comes with some default implmentations of ExposeProvider
|
||||
*
|
||||
* notably:
|
||||
* - WebDavExposeProvider
|
||||
*/
|
||||
export abstract class ExposeProvider {
|
||||
|
||||
/**
|
||||
* Should take care of any housekeeping required to keep things in a healthy state.
|
||||
*/
|
||||
public abstract houseKeeping(): Promise<void>;
|
||||
|
||||
/**
|
||||
* should return a url with info about how to access the file
|
||||
* @param optionsArg
|
||||
*/
|
||||
public abstract exposeFile(optionsArg: {
|
||||
smartFile: plugins.smartfile.SmartFile,
|
||||
deleteAfterMillis?: number,
|
||||
privateUrl?: boolean, // wether the returned url should be private by design
|
||||
}): Promise<{
|
||||
url: string;
|
||||
id: string;
|
||||
status: 'created' | 'updated';
|
||||
}>;
|
||||
|
||||
public abstract start(): Promise<void>;
|
||||
|
||||
public abstract stop(): Promise<void>;
|
||||
|
||||
public abstract wipeAll(): Promise<{
|
||||
id: string;
|
||||
status: 'deleted' | 'failed' | 'notfound';
|
||||
}[]>
|
||||
public abstract wipeFileById(idArg: string): Promise<{
|
||||
id: string;
|
||||
status: 'deleted' | 'failed' | 'notfound';
|
||||
}>
|
||||
}
|
||||
Reference in New Issue
Block a user