-
Notifications
You must be signed in to change notification settings - Fork 1
/
i-snapshots.ts
55 lines (51 loc) · 1.7 KB
/
i-snapshots.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import {IPage} from '../params/i-page';
import {ISnapshot} from '../model/i-snapshot';
/**
* @export
* @interface ISnapshots
*/
export interface ISnapshots {
/**
* @public
* @description Retrieves a list of project snapshots.
* Requires Manage settings admin right.
* @param {string} projectId
* @param {IPage} [query]
* @returns {Promise<{project_id: string, snapshots: ISnapshot[]}>}
* @memberof ISnapshots
*/
list(projectId: string, query?: IPage):
Promise<{project_id: string, snapshots: ISnapshot[]}>;
/**
* @public
* @description Creates snapshot of the project.
* Requires Manage settings admin right.
* @param {string} projectId
* @param {object} body
* @returns {Promise<{project_id: string, snapshot: ISnapshot}>}
* @memberof ISnapshots
*/
create(projectId: string, body: object):
Promise<{project_id: string, snapshot: ISnapshot}>;
/**
* @public
* @description Restores project snapshot to a project copy.
* Requires Manage settings admin right and Admin role in the team.
* @param {string} projectId
* @param {number} snapshotId
* @returns {Promise<object>}
* @memberof ISnapshots
*/
restore(projectId: string, snapshotId: number): Promise<object>;
/**
* @public
* @description Deletes project snapshot.
* Requires Manage settings admin right.
* @param {string} projectId
* @param {number} snapshotId
* @returns {Promise<{project_id: string, snapshot_deleted: boolean}>}
* @memberof ISnapshots
*/
delete(projectId: string, snapshotId: number):
Promise<{project_id: string, snapshot_deleted: boolean}>;
}