feat: update project settings and details endpoints, and add project meta update method
This commit is contained in:
19
src/index.ts
19
src/index.ts
@ -76,9 +76,8 @@ export class FewLineSDK {
|
||||
|
||||
async deleteSetting(key: string): Promise<any> {
|
||||
const response = await this.createRequestWithAuthHeaders(
|
||||
`${this.url}/project/settings/delete`,
|
||||
"DELETE",
|
||||
{ key }
|
||||
`${this.url}/project/settings/delete/${key}`,
|
||||
"DELETE"
|
||||
);
|
||||
|
||||
return response.data;
|
||||
@ -102,15 +101,25 @@ export class FewLineSDK {
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async getProjectInfo(): Promise<any> {
|
||||
async getProjectDetails(): Promise<any> {
|
||||
const response = await this.createRequestWithAuthHeaders(
|
||||
`${this.url}/project/info`,
|
||||
`${this.url}/project/details`,
|
||||
"GET"
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async updateProjectMeta(meta: Record<string, any>): Promise<any> {
|
||||
const response = await this.createRequestWithAuthHeaders(
|
||||
`${this.url}/project/update/meta`,
|
||||
"POST",
|
||||
{ meta }
|
||||
);
|
||||
|
||||
return response.data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Database management part
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user