fix(storage-browser): rename S3-specific storage browser interfaces to generic storage types
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
/**
|
||||
* S3 Data Provider interface - implement this to connect the S3 browser to your backend
|
||||
* Storage Data Provider interface - implement this to connect the storage browser to your backend
|
||||
*/
|
||||
|
||||
export interface IS3Object {
|
||||
export interface IStorageObject {
|
||||
key: string;
|
||||
size?: number;
|
||||
lastModified?: string;
|
||||
isPrefix?: boolean;
|
||||
}
|
||||
|
||||
export interface IS3ChangeEvent {
|
||||
export interface IStorageChangeEvent {
|
||||
type: 'add' | 'modify' | 'delete';
|
||||
key: string;
|
||||
bucket: string;
|
||||
@@ -17,8 +17,8 @@ export interface IS3ChangeEvent {
|
||||
lastModified?: Date;
|
||||
}
|
||||
|
||||
export interface IS3DataProvider {
|
||||
listObjects(bucket: string, prefix?: string, delimiter?: string): Promise<{ objects: IS3Object[]; prefixes: string[] }>;
|
||||
export interface IStorageDataProvider {
|
||||
listObjects(bucket: string, prefix?: string, delimiter?: string): Promise<{ objects: IStorageObject[]; prefixes: string[] }>;
|
||||
getObject(bucket: string, key: string): Promise<{ content: string; contentType: string; size: number; lastModified: string }>;
|
||||
putObject(bucket: string, key: string, base64Content: string, contentType: string): Promise<boolean>;
|
||||
deleteObject(bucket: string, key: string): Promise<boolean>;
|
||||
@@ -30,7 +30,7 @@ export interface IS3DataProvider {
|
||||
|
||||
export interface IColumn {
|
||||
prefix: string;
|
||||
objects: IS3Object[];
|
||||
objects: IStorageObject[];
|
||||
prefixes: string[];
|
||||
selectedItem: string | null;
|
||||
width: number;
|
||||
|
||||
Reference in New Issue
Block a user