Skip to content

Commit

Permalink
Update dtable-web-api.js
Browse files Browse the repository at this point in the history
  • Loading branch information
r350178982 committed Aug 28, 2023
1 parent f55a42f commit b408c34
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/dtable-web-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2988,6 +2988,40 @@ class DTableWebAPI {
return this._sendPostRequest(url, params, {headers: {'Content-Type': 'application/json'}});
}

listAutoArchiveTasks(dtableUuid) {
let url = this.server + '/api/v2.1/dtables/' + dtableUuid + '/auto-archive-tasks/';
return this.req.get(url);
}

addAutoArchiveTask(dtableUuid, table_id, view_id, run_condition, details) {
let url = this.server + '/api/v2.1/dtables/' + dtableUuid + '/auto-archive-tasks/';
let data = {
'table_id': table_id,
'view_id': view_id,
'run_condition': run_condition,
'details': details
};
return this._sendPostRequest(url, data, {headers: {'Content-Type': 'application/json'}});
}

updateAutoArchiveTask(dtableUuid, task_id, table_id, view_id, run_condition, details) {
let url = this.server + '/api/v2.1/dtables/' + dtableUuid + '/auto-archive-tasks/' + task_id + '/';
let data = {
'table_id': table_id,
'view_id': view_id,
'run_condition': run_condition,
'details': details
};
return this.req.put(url, data, {headers: {'Content-Type': 'application/json'}});
}


deleteAutoArchiveTask(dtableUuid, task_id) {
let url = this.server + '/api/v2.1/dtables/' + dtableUuid + '/auto-archive-tasks/' + task_id + '/';
return this.req.delete(url);
}


// org admin api
orgAdminUpdateOrgInfo(newOrgName) {
let url = this.server + '/api/v2.1/org/admin/info/';
Expand Down

0 comments on commit b408c34

Please sign in to comment.