feat(tsview): add database and S3 handlers, tswatch/watch scripts, web utilities, assets and release config
This commit is contained in:
@@ -153,6 +153,22 @@ export class ApiService {
|
||||
return result.databases;
|
||||
}
|
||||
|
||||
async createDatabase(databaseName: string): Promise<boolean> {
|
||||
const result = await this.request<{ databaseName: string }, { success: boolean }>(
|
||||
'createDatabase',
|
||||
{ databaseName }
|
||||
);
|
||||
return result.success;
|
||||
}
|
||||
|
||||
async dropDatabase(databaseName: string): Promise<boolean> {
|
||||
const result = await this.request<{ databaseName: string }, { success: boolean }>(
|
||||
'dropDatabase',
|
||||
{ databaseName }
|
||||
);
|
||||
return result.success;
|
||||
}
|
||||
|
||||
async listCollections(databaseName: string): Promise<IMongoCollection[]> {
|
||||
const result = await this.request<
|
||||
{ databaseName: string },
|
||||
@@ -169,6 +185,14 @@ export class ApiService {
|
||||
return result.success;
|
||||
}
|
||||
|
||||
async dropCollection(databaseName: string, collectionName: string): Promise<boolean> {
|
||||
const result = await this.request<
|
||||
{ databaseName: string; collectionName: string },
|
||||
{ success: boolean }
|
||||
>('dropCollection', { databaseName, collectionName });
|
||||
return result.success;
|
||||
}
|
||||
|
||||
async findDocuments(
|
||||
databaseName: string,
|
||||
collectionName: string,
|
||||
|
||||
Reference in New Issue
Block a user