feat(core): rebrand to @lossless.zone/objectstorage
- Rename from @lossless.zone/s3container to @lossless.zone/objectstorage - Replace @push.rocks/smarts3 with @push.rocks/smartstorage - Change env var prefix from S3_ to OBJST_ - Rename S3Container class to ObjectStorageContainer - Update web component prefix from s3c- to objst- - Update UI labels, CLI flags, documentation, and Docker config
This commit is contained in:
134
ts_interfaces/requests/objects.ts
Normal file
134
ts_interfaces/requests/objects.ts
Normal file
@@ -0,0 +1,134 @@
|
||||
import * as plugins from '../plugins.ts';
|
||||
import * as data from '../data/index.ts';
|
||||
|
||||
export interface IReq_ListObjects extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_ListObjects
|
||||
> {
|
||||
method: 'listObjects';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
bucketName: string;
|
||||
prefix?: string;
|
||||
delimiter?: string;
|
||||
maxKeys?: number;
|
||||
};
|
||||
response: {
|
||||
result: data.IObjectListResult;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeleteObject extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_DeleteObject
|
||||
> {
|
||||
method: 'deleteObject';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
bucketName: string;
|
||||
key: string;
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetObject extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetObject
|
||||
> {
|
||||
method: 'getObject';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
bucketName: string;
|
||||
key: string;
|
||||
};
|
||||
response: {
|
||||
content: string;
|
||||
contentType: string;
|
||||
size: number;
|
||||
lastModified: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_PutObject extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_PutObject
|
||||
> {
|
||||
method: 'putObject';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
bucketName: string;
|
||||
key: string;
|
||||
base64Content: string;
|
||||
contentType: string;
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_DeletePrefix extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_DeletePrefix
|
||||
> {
|
||||
method: 'deletePrefix';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
bucketName: string;
|
||||
prefix: string;
|
||||
};
|
||||
response: {
|
||||
ok: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_GetObjectUrl extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_GetObjectUrl
|
||||
> {
|
||||
method: 'getObjectUrl';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
bucketName: string;
|
||||
key: string;
|
||||
};
|
||||
response: {
|
||||
url: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_MoveObject extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_MoveObject
|
||||
> {
|
||||
method: 'moveObject';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
bucketName: string;
|
||||
sourceKey: string;
|
||||
destKey: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
error?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export interface IReq_MovePrefix extends plugins.typedrequestInterfaces.implementsTR<
|
||||
plugins.typedrequestInterfaces.ITypedRequest,
|
||||
IReq_MovePrefix
|
||||
> {
|
||||
method: 'movePrefix';
|
||||
request: {
|
||||
identity: data.IIdentity;
|
||||
bucketName: string;
|
||||
sourcePrefix: string;
|
||||
destPrefix: string;
|
||||
};
|
||||
response: {
|
||||
success: boolean;
|
||||
movedCount?: number;
|
||||
error?: string;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user