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 Mar 3, 2023
1 parent 08aba7a commit 157d5d4
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/dtable-web-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -2643,6 +2643,41 @@ class DTableWebAPI {
return this.req.delete(url);
}


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 157d5d4

Please sign in to comment.