Skip to content

Commit 5fa3d15

Browse files
committed
Update dtable-web-api.js
1 parent db2089b commit 5fa3d15

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

src/dtable-web-api.js

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2582,6 +2582,41 @@ class DTableWebAPI {
25822582
return this.req.delete(url);
25832583
}
25842584

2585+
2586+
listAutoArchiveTasks(dtableUuid) {
2587+
let url = this.server + '/api/v2.1/dtables/' + dtableUuid + '/auto-archive-tasks/';
2588+
return this.req.get(url);
2589+
}
2590+
2591+
addAutoArchiveTask(dtableUuid, table_id, view_id, run_condition, details) {
2592+
let url = this.server + '/api/v2.1/dtables/' + dtableUuid + '/auto-archive-tasks/';
2593+
let data = {
2594+
'table_id': table_id,
2595+
'view_id': view_id,
2596+
'run_condition': run_condition,
2597+
'details': details
2598+
};
2599+
return this._sendPostRequest(url, data, {headers: {'Content-Type': 'application/json'}});
2600+
}
2601+
2602+
updateAutoArchiveTask(dtableUuid, task_id, table_id, view_id, run_condition, details) {
2603+
let url = this.server + '/api/v2.1/dtables/' + dtableUuid + '/auto-archive-tasks/' + task_id + '/';
2604+
let data = {
2605+
'table_id': table_id,
2606+
'view_id': view_id,
2607+
'run_condition': run_condition,
2608+
'details': details
2609+
};
2610+
return this.req.put(url, data, {headers: {'Content-Type': 'application/json'}});
2611+
}
2612+
2613+
2614+
deleteAutoArchiveTask(dtableUuid, task_id) {
2615+
let url = this.server + '/api/v2.1/dtables/' + dtableUuid + '/auto-archive-tasks/' + task_id + '/';
2616+
return this.req.delete(url);
2617+
}
2618+
2619+
25852620
// org admin api
25862621
orgAdminUpdateOrgInfo(newOrgName) {
25872622
let url = this.server + '/api/v2.1/org/admin/info/';

0 commit comments

Comments
 (0)