node-appwrite 22.0.0 → 22.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/client.js +2 -2
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +2 -2
- package/dist/client.mjs.map +1 -1
- package/dist/enums/backup-services.d.mts +7 -0
- package/dist/enums/backup-services.d.ts +7 -0
- package/dist/enums/backup-services.js +12 -0
- package/dist/enums/backup-services.js.map +1 -0
- package/dist/enums/backup-services.mjs +11 -0
- package/dist/enums/backup-services.mjs.map +1 -0
- package/dist/enums/build-runtime.d.mts +3 -4
- package/dist/enums/build-runtime.d.ts +3 -4
- package/dist/enums/build-runtime.js +2 -3
- package/dist/enums/build-runtime.js.map +1 -1
- package/dist/enums/build-runtime.mjs +2 -3
- package/dist/enums/build-runtime.mjs.map +1 -1
- package/dist/enums/runtime.d.mts +3 -4
- package/dist/enums/runtime.d.ts +3 -4
- package/dist/enums/runtime.js +2 -3
- package/dist/enums/runtime.js.map +1 -1
- package/dist/enums/runtime.mjs +2 -3
- package/dist/enums/runtime.mjs.map +1 -1
- package/dist/enums/scopes.d.mts +9 -1
- package/dist/enums/scopes.d.ts +9 -1
- package/dist/enums/scopes.js +8 -0
- package/dist/enums/scopes.js.map +1 -1
- package/dist/enums/scopes.mjs +8 -0
- package/dist/enums/scopes.mjs.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/dist/models.d.mts +216 -2
- package/dist/models.d.ts +216 -2
- package/dist/services/account.js +3 -3
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +3 -3
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.js +3 -3
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +3 -3
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/backups.d.mts +291 -0
- package/dist/services/backups.d.ts +291 -0
- package/dist/services/backups.js +404 -0
- package/dist/services/backups.js.map +1 -0
- package/dist/services/backups.mjs +403 -0
- package/dist/services/backups.mjs.map +1 -0
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/graphql.mjs.map +1 -1
- package/dist/services/health.d.mts +95 -0
- package/dist/services/health.d.ts +95 -0
- package/dist/services/health.js +121 -1
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +121 -1
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/storage.d.mts +4 -4
- package/dist/services/storage.d.ts +4 -4
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/teams.d.mts +8 -9
- package/dist/services/teams.d.ts +8 -9
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/enums/roles.d.mts +0 -7
- package/dist/enums/roles.d.ts +0 -7
- package/dist/enums/roles.js +0 -12
- package/dist/enums/roles.js.map +0 -1
- package/dist/enums/roles.mjs +0 -11
- package/dist/enums/roles.mjs.map +0 -1
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { Client } from '../client.mjs';
|
|
2
|
+
import { Models } from '../models.mjs';
|
|
3
|
+
import { BackupServices } from '../enums/backup-services.mjs';
|
|
4
|
+
import '../query.mjs';
|
|
5
|
+
import '../enums/database-type.mjs';
|
|
6
|
+
import '../enums/attribute-status.mjs';
|
|
7
|
+
import '../enums/column-status.mjs';
|
|
8
|
+
import '../enums/index-status.mjs';
|
|
9
|
+
import '../enums/deployment-status.mjs';
|
|
10
|
+
import '../enums/execution-trigger.mjs';
|
|
11
|
+
import '../enums/execution-status.mjs';
|
|
12
|
+
import '../enums/health-antivirus-status.mjs';
|
|
13
|
+
import '../enums/health-check-status.mjs';
|
|
14
|
+
import '../enums/message-status.mjs';
|
|
15
|
+
|
|
16
|
+
declare class Backups {
|
|
17
|
+
client: Client;
|
|
18
|
+
constructor(client: Client);
|
|
19
|
+
/**
|
|
20
|
+
* List all archives for a project.
|
|
21
|
+
*
|
|
22
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
23
|
+
* @throws {AppwriteException}
|
|
24
|
+
* @returns {Promise<Models.BackupArchiveList>}
|
|
25
|
+
*/
|
|
26
|
+
listArchives(params?: {
|
|
27
|
+
queries?: string[];
|
|
28
|
+
}): Promise<Models.BackupArchiveList>;
|
|
29
|
+
/**
|
|
30
|
+
* List all archives for a project.
|
|
31
|
+
*
|
|
32
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
33
|
+
* @throws {AppwriteException}
|
|
34
|
+
* @returns {Promise<Models.BackupArchiveList>}
|
|
35
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
36
|
+
*/
|
|
37
|
+
listArchives(queries?: string[]): Promise<Models.BackupArchiveList>;
|
|
38
|
+
/**
|
|
39
|
+
* Create a new archive asynchronously for a project.
|
|
40
|
+
*
|
|
41
|
+
* @param {BackupServices[]} params.services - Array of services to backup
|
|
42
|
+
* @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
43
|
+
* @throws {AppwriteException}
|
|
44
|
+
* @returns {Promise<Models.BackupArchive>}
|
|
45
|
+
*/
|
|
46
|
+
createArchive(params: {
|
|
47
|
+
services: BackupServices[];
|
|
48
|
+
resourceId?: string;
|
|
49
|
+
}): Promise<Models.BackupArchive>;
|
|
50
|
+
/**
|
|
51
|
+
* Create a new archive asynchronously for a project.
|
|
52
|
+
*
|
|
53
|
+
* @param {BackupServices[]} services - Array of services to backup
|
|
54
|
+
* @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
55
|
+
* @throws {AppwriteException}
|
|
56
|
+
* @returns {Promise<Models.BackupArchive>}
|
|
57
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
58
|
+
*/
|
|
59
|
+
createArchive(services: BackupServices[], resourceId?: string): Promise<Models.BackupArchive>;
|
|
60
|
+
/**
|
|
61
|
+
* Get a backup archive using it's ID.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} params.archiveId - Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
64
|
+
* @throws {AppwriteException}
|
|
65
|
+
* @returns {Promise<Models.BackupArchive>}
|
|
66
|
+
*/
|
|
67
|
+
getArchive(params: {
|
|
68
|
+
archiveId: string;
|
|
69
|
+
}): Promise<Models.BackupArchive>;
|
|
70
|
+
/**
|
|
71
|
+
* Get a backup archive using it's ID.
|
|
72
|
+
*
|
|
73
|
+
* @param {string} archiveId - Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
74
|
+
* @throws {AppwriteException}
|
|
75
|
+
* @returns {Promise<Models.BackupArchive>}
|
|
76
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
77
|
+
*/
|
|
78
|
+
getArchive(archiveId: string): Promise<Models.BackupArchive>;
|
|
79
|
+
/**
|
|
80
|
+
* Delete an existing archive for a project.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} params.archiveId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
83
|
+
* @throws {AppwriteException}
|
|
84
|
+
* @returns {Promise<{}>}
|
|
85
|
+
*/
|
|
86
|
+
deleteArchive(params: {
|
|
87
|
+
archiveId: string;
|
|
88
|
+
}): Promise<{}>;
|
|
89
|
+
/**
|
|
90
|
+
* Delete an existing archive for a project.
|
|
91
|
+
*
|
|
92
|
+
* @param {string} archiveId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
93
|
+
* @throws {AppwriteException}
|
|
94
|
+
* @returns {Promise<{}>}
|
|
95
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
96
|
+
*/
|
|
97
|
+
deleteArchive(archiveId: string): Promise<{}>;
|
|
98
|
+
/**
|
|
99
|
+
* List all policies for a project.
|
|
100
|
+
*
|
|
101
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
102
|
+
* @throws {AppwriteException}
|
|
103
|
+
* @returns {Promise<Models.BackupPolicyList>}
|
|
104
|
+
*/
|
|
105
|
+
listPolicies(params?: {
|
|
106
|
+
queries?: string[];
|
|
107
|
+
}): Promise<Models.BackupPolicyList>;
|
|
108
|
+
/**
|
|
109
|
+
* List all policies for a project.
|
|
110
|
+
*
|
|
111
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
112
|
+
* @throws {AppwriteException}
|
|
113
|
+
* @returns {Promise<Models.BackupPolicyList>}
|
|
114
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
115
|
+
*/
|
|
116
|
+
listPolicies(queries?: string[]): Promise<Models.BackupPolicyList>;
|
|
117
|
+
/**
|
|
118
|
+
* Create a new backup policy.
|
|
119
|
+
*
|
|
120
|
+
* @param {string} params.policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
121
|
+
* @param {BackupServices[]} params.services - Array of services to backup
|
|
122
|
+
* @param {number} params.retention - Days to keep backups before deletion
|
|
123
|
+
* @param {string} params.schedule - Schedule CRON syntax.
|
|
124
|
+
* @param {string} params.name - Policy name. Max length: 128 chars.
|
|
125
|
+
* @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
126
|
+
* @param {boolean} params.enabled - Is policy enabled? When set to 'disabled', no backups will be taken
|
|
127
|
+
* @throws {AppwriteException}
|
|
128
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
129
|
+
*/
|
|
130
|
+
createPolicy(params: {
|
|
131
|
+
policyId: string;
|
|
132
|
+
services: BackupServices[];
|
|
133
|
+
retention: number;
|
|
134
|
+
schedule: string;
|
|
135
|
+
name?: string;
|
|
136
|
+
resourceId?: string;
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
}): Promise<Models.BackupPolicy>;
|
|
139
|
+
/**
|
|
140
|
+
* Create a new backup policy.
|
|
141
|
+
*
|
|
142
|
+
* @param {string} policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
143
|
+
* @param {BackupServices[]} services - Array of services to backup
|
|
144
|
+
* @param {number} retention - Days to keep backups before deletion
|
|
145
|
+
* @param {string} schedule - Schedule CRON syntax.
|
|
146
|
+
* @param {string} name - Policy name. Max length: 128 chars.
|
|
147
|
+
* @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
148
|
+
* @param {boolean} enabled - Is policy enabled? When set to 'disabled', no backups will be taken
|
|
149
|
+
* @throws {AppwriteException}
|
|
150
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
151
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
152
|
+
*/
|
|
153
|
+
createPolicy(policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
154
|
+
/**
|
|
155
|
+
* Get a backup policy using it's ID.
|
|
156
|
+
*
|
|
157
|
+
* @param {string} params.policyId - Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
158
|
+
* @throws {AppwriteException}
|
|
159
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
160
|
+
*/
|
|
161
|
+
getPolicy(params: {
|
|
162
|
+
policyId: string;
|
|
163
|
+
}): Promise<Models.BackupPolicy>;
|
|
164
|
+
/**
|
|
165
|
+
* Get a backup policy using it's ID.
|
|
166
|
+
*
|
|
167
|
+
* @param {string} policyId - Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
168
|
+
* @throws {AppwriteException}
|
|
169
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
170
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
171
|
+
*/
|
|
172
|
+
getPolicy(policyId: string): Promise<Models.BackupPolicy>;
|
|
173
|
+
/**
|
|
174
|
+
* Update an existing policy using it's ID.
|
|
175
|
+
*
|
|
176
|
+
* @param {string} params.policyId - Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
177
|
+
* @param {string} params.name - Policy name. Max length: 128 chars.
|
|
178
|
+
* @param {number} params.retention - Days to keep backups before deletion
|
|
179
|
+
* @param {string} params.schedule - Cron expression
|
|
180
|
+
* @param {boolean} params.enabled - Is Backup enabled? When set to 'disabled', No backup will be taken
|
|
181
|
+
* @throws {AppwriteException}
|
|
182
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
183
|
+
*/
|
|
184
|
+
updatePolicy(params: {
|
|
185
|
+
policyId: string;
|
|
186
|
+
name?: string;
|
|
187
|
+
retention?: number;
|
|
188
|
+
schedule?: string;
|
|
189
|
+
enabled?: boolean;
|
|
190
|
+
}): Promise<Models.BackupPolicy>;
|
|
191
|
+
/**
|
|
192
|
+
* Update an existing policy using it's ID.
|
|
193
|
+
*
|
|
194
|
+
* @param {string} policyId - Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
195
|
+
* @param {string} name - Policy name. Max length: 128 chars.
|
|
196
|
+
* @param {number} retention - Days to keep backups before deletion
|
|
197
|
+
* @param {string} schedule - Cron expression
|
|
198
|
+
* @param {boolean} enabled - Is Backup enabled? When set to 'disabled', No backup will be taken
|
|
199
|
+
* @throws {AppwriteException}
|
|
200
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
201
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
202
|
+
*/
|
|
203
|
+
updatePolicy(policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
204
|
+
/**
|
|
205
|
+
* Delete a policy using it's ID.
|
|
206
|
+
*
|
|
207
|
+
* @param {string} params.policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
208
|
+
* @throws {AppwriteException}
|
|
209
|
+
* @returns {Promise<{}>}
|
|
210
|
+
*/
|
|
211
|
+
deletePolicy(params: {
|
|
212
|
+
policyId: string;
|
|
213
|
+
}): Promise<{}>;
|
|
214
|
+
/**
|
|
215
|
+
* Delete a policy using it's ID.
|
|
216
|
+
*
|
|
217
|
+
* @param {string} policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
218
|
+
* @throws {AppwriteException}
|
|
219
|
+
* @returns {Promise<{}>}
|
|
220
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
221
|
+
*/
|
|
222
|
+
deletePolicy(policyId: string): Promise<{}>;
|
|
223
|
+
/**
|
|
224
|
+
* Create and trigger a new restoration for a backup on a project.
|
|
225
|
+
*
|
|
226
|
+
* @param {string} params.archiveId - Backup archive ID to restore
|
|
227
|
+
* @param {BackupServices[]} params.services - Array of services to restore
|
|
228
|
+
* @param {string} params.newResourceId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
229
|
+
* @param {string} params.newResourceName - Database name. Max length: 128 chars.
|
|
230
|
+
* @throws {AppwriteException}
|
|
231
|
+
* @returns {Promise<Models.BackupRestoration>}
|
|
232
|
+
*/
|
|
233
|
+
createRestoration(params: {
|
|
234
|
+
archiveId: string;
|
|
235
|
+
services: BackupServices[];
|
|
236
|
+
newResourceId?: string;
|
|
237
|
+
newResourceName?: string;
|
|
238
|
+
}): Promise<Models.BackupRestoration>;
|
|
239
|
+
/**
|
|
240
|
+
* Create and trigger a new restoration for a backup on a project.
|
|
241
|
+
*
|
|
242
|
+
* @param {string} archiveId - Backup archive ID to restore
|
|
243
|
+
* @param {BackupServices[]} services - Array of services to restore
|
|
244
|
+
* @param {string} newResourceId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
245
|
+
* @param {string} newResourceName - Database name. Max length: 128 chars.
|
|
246
|
+
* @throws {AppwriteException}
|
|
247
|
+
* @returns {Promise<Models.BackupRestoration>}
|
|
248
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
249
|
+
*/
|
|
250
|
+
createRestoration(archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string): Promise<Models.BackupRestoration>;
|
|
251
|
+
/**
|
|
252
|
+
* List all backup restorations for a project.
|
|
253
|
+
*
|
|
254
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
255
|
+
* @throws {AppwriteException}
|
|
256
|
+
* @returns {Promise<Models.BackupRestorationList>}
|
|
257
|
+
*/
|
|
258
|
+
listRestorations(params?: {
|
|
259
|
+
queries?: string[];
|
|
260
|
+
}): Promise<Models.BackupRestorationList>;
|
|
261
|
+
/**
|
|
262
|
+
* List all backup restorations for a project.
|
|
263
|
+
*
|
|
264
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
265
|
+
* @throws {AppwriteException}
|
|
266
|
+
* @returns {Promise<Models.BackupRestorationList>}
|
|
267
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
268
|
+
*/
|
|
269
|
+
listRestorations(queries?: string[]): Promise<Models.BackupRestorationList>;
|
|
270
|
+
/**
|
|
271
|
+
* Get the current status of a backup restoration.
|
|
272
|
+
*
|
|
273
|
+
* @param {string} params.restorationId - Restoration ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
274
|
+
* @throws {AppwriteException}
|
|
275
|
+
* @returns {Promise<Models.BackupRestoration>}
|
|
276
|
+
*/
|
|
277
|
+
getRestoration(params: {
|
|
278
|
+
restorationId: string;
|
|
279
|
+
}): Promise<Models.BackupRestoration>;
|
|
280
|
+
/**
|
|
281
|
+
* Get the current status of a backup restoration.
|
|
282
|
+
*
|
|
283
|
+
* @param {string} restorationId - Restoration ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
284
|
+
* @throws {AppwriteException}
|
|
285
|
+
* @returns {Promise<Models.BackupRestoration>}
|
|
286
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
287
|
+
*/
|
|
288
|
+
getRestoration(restorationId: string): Promise<Models.BackupRestoration>;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export { Backups };
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import { Client } from '../client.js';
|
|
2
|
+
import { Models } from '../models.js';
|
|
3
|
+
import { BackupServices } from '../enums/backup-services.js';
|
|
4
|
+
import '../query.js';
|
|
5
|
+
import '../enums/database-type.js';
|
|
6
|
+
import '../enums/attribute-status.js';
|
|
7
|
+
import '../enums/column-status.js';
|
|
8
|
+
import '../enums/index-status.js';
|
|
9
|
+
import '../enums/deployment-status.js';
|
|
10
|
+
import '../enums/execution-trigger.js';
|
|
11
|
+
import '../enums/execution-status.js';
|
|
12
|
+
import '../enums/health-antivirus-status.js';
|
|
13
|
+
import '../enums/health-check-status.js';
|
|
14
|
+
import '../enums/message-status.js';
|
|
15
|
+
|
|
16
|
+
declare class Backups {
|
|
17
|
+
client: Client;
|
|
18
|
+
constructor(client: Client);
|
|
19
|
+
/**
|
|
20
|
+
* List all archives for a project.
|
|
21
|
+
*
|
|
22
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
23
|
+
* @throws {AppwriteException}
|
|
24
|
+
* @returns {Promise<Models.BackupArchiveList>}
|
|
25
|
+
*/
|
|
26
|
+
listArchives(params?: {
|
|
27
|
+
queries?: string[];
|
|
28
|
+
}): Promise<Models.BackupArchiveList>;
|
|
29
|
+
/**
|
|
30
|
+
* List all archives for a project.
|
|
31
|
+
*
|
|
32
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
33
|
+
* @throws {AppwriteException}
|
|
34
|
+
* @returns {Promise<Models.BackupArchiveList>}
|
|
35
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
36
|
+
*/
|
|
37
|
+
listArchives(queries?: string[]): Promise<Models.BackupArchiveList>;
|
|
38
|
+
/**
|
|
39
|
+
* Create a new archive asynchronously for a project.
|
|
40
|
+
*
|
|
41
|
+
* @param {BackupServices[]} params.services - Array of services to backup
|
|
42
|
+
* @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
43
|
+
* @throws {AppwriteException}
|
|
44
|
+
* @returns {Promise<Models.BackupArchive>}
|
|
45
|
+
*/
|
|
46
|
+
createArchive(params: {
|
|
47
|
+
services: BackupServices[];
|
|
48
|
+
resourceId?: string;
|
|
49
|
+
}): Promise<Models.BackupArchive>;
|
|
50
|
+
/**
|
|
51
|
+
* Create a new archive asynchronously for a project.
|
|
52
|
+
*
|
|
53
|
+
* @param {BackupServices[]} services - Array of services to backup
|
|
54
|
+
* @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
55
|
+
* @throws {AppwriteException}
|
|
56
|
+
* @returns {Promise<Models.BackupArchive>}
|
|
57
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
58
|
+
*/
|
|
59
|
+
createArchive(services: BackupServices[], resourceId?: string): Promise<Models.BackupArchive>;
|
|
60
|
+
/**
|
|
61
|
+
* Get a backup archive using it's ID.
|
|
62
|
+
*
|
|
63
|
+
* @param {string} params.archiveId - Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
64
|
+
* @throws {AppwriteException}
|
|
65
|
+
* @returns {Promise<Models.BackupArchive>}
|
|
66
|
+
*/
|
|
67
|
+
getArchive(params: {
|
|
68
|
+
archiveId: string;
|
|
69
|
+
}): Promise<Models.BackupArchive>;
|
|
70
|
+
/**
|
|
71
|
+
* Get a backup archive using it's ID.
|
|
72
|
+
*
|
|
73
|
+
* @param {string} archiveId - Archive ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
74
|
+
* @throws {AppwriteException}
|
|
75
|
+
* @returns {Promise<Models.BackupArchive>}
|
|
76
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
77
|
+
*/
|
|
78
|
+
getArchive(archiveId: string): Promise<Models.BackupArchive>;
|
|
79
|
+
/**
|
|
80
|
+
* Delete an existing archive for a project.
|
|
81
|
+
*
|
|
82
|
+
* @param {string} params.archiveId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
83
|
+
* @throws {AppwriteException}
|
|
84
|
+
* @returns {Promise<{}>}
|
|
85
|
+
*/
|
|
86
|
+
deleteArchive(params: {
|
|
87
|
+
archiveId: string;
|
|
88
|
+
}): Promise<{}>;
|
|
89
|
+
/**
|
|
90
|
+
* Delete an existing archive for a project.
|
|
91
|
+
*
|
|
92
|
+
* @param {string} archiveId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
93
|
+
* @throws {AppwriteException}
|
|
94
|
+
* @returns {Promise<{}>}
|
|
95
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
96
|
+
*/
|
|
97
|
+
deleteArchive(archiveId: string): Promise<{}>;
|
|
98
|
+
/**
|
|
99
|
+
* List all policies for a project.
|
|
100
|
+
*
|
|
101
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
102
|
+
* @throws {AppwriteException}
|
|
103
|
+
* @returns {Promise<Models.BackupPolicyList>}
|
|
104
|
+
*/
|
|
105
|
+
listPolicies(params?: {
|
|
106
|
+
queries?: string[];
|
|
107
|
+
}): Promise<Models.BackupPolicyList>;
|
|
108
|
+
/**
|
|
109
|
+
* List all policies for a project.
|
|
110
|
+
*
|
|
111
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
112
|
+
* @throws {AppwriteException}
|
|
113
|
+
* @returns {Promise<Models.BackupPolicyList>}
|
|
114
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
115
|
+
*/
|
|
116
|
+
listPolicies(queries?: string[]): Promise<Models.BackupPolicyList>;
|
|
117
|
+
/**
|
|
118
|
+
* Create a new backup policy.
|
|
119
|
+
*
|
|
120
|
+
* @param {string} params.policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
121
|
+
* @param {BackupServices[]} params.services - Array of services to backup
|
|
122
|
+
* @param {number} params.retention - Days to keep backups before deletion
|
|
123
|
+
* @param {string} params.schedule - Schedule CRON syntax.
|
|
124
|
+
* @param {string} params.name - Policy name. Max length: 128 chars.
|
|
125
|
+
* @param {string} params.resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
126
|
+
* @param {boolean} params.enabled - Is policy enabled? When set to 'disabled', no backups will be taken
|
|
127
|
+
* @throws {AppwriteException}
|
|
128
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
129
|
+
*/
|
|
130
|
+
createPolicy(params: {
|
|
131
|
+
policyId: string;
|
|
132
|
+
services: BackupServices[];
|
|
133
|
+
retention: number;
|
|
134
|
+
schedule: string;
|
|
135
|
+
name?: string;
|
|
136
|
+
resourceId?: string;
|
|
137
|
+
enabled?: boolean;
|
|
138
|
+
}): Promise<Models.BackupPolicy>;
|
|
139
|
+
/**
|
|
140
|
+
* Create a new backup policy.
|
|
141
|
+
*
|
|
142
|
+
* @param {string} policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
143
|
+
* @param {BackupServices[]} services - Array of services to backup
|
|
144
|
+
* @param {number} retention - Days to keep backups before deletion
|
|
145
|
+
* @param {string} schedule - Schedule CRON syntax.
|
|
146
|
+
* @param {string} name - Policy name. Max length: 128 chars.
|
|
147
|
+
* @param {string} resourceId - Resource ID. When set, only this single resource will be backed up.
|
|
148
|
+
* @param {boolean} enabled - Is policy enabled? When set to 'disabled', no backups will be taken
|
|
149
|
+
* @throws {AppwriteException}
|
|
150
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
151
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
152
|
+
*/
|
|
153
|
+
createPolicy(policyId: string, services: BackupServices[], retention: number, schedule: string, name?: string, resourceId?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
154
|
+
/**
|
|
155
|
+
* Get a backup policy using it's ID.
|
|
156
|
+
*
|
|
157
|
+
* @param {string} params.policyId - Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
158
|
+
* @throws {AppwriteException}
|
|
159
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
160
|
+
*/
|
|
161
|
+
getPolicy(params: {
|
|
162
|
+
policyId: string;
|
|
163
|
+
}): Promise<Models.BackupPolicy>;
|
|
164
|
+
/**
|
|
165
|
+
* Get a backup policy using it's ID.
|
|
166
|
+
*
|
|
167
|
+
* @param {string} policyId - Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
168
|
+
* @throws {AppwriteException}
|
|
169
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
170
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
171
|
+
*/
|
|
172
|
+
getPolicy(policyId: string): Promise<Models.BackupPolicy>;
|
|
173
|
+
/**
|
|
174
|
+
* Update an existing policy using it's ID.
|
|
175
|
+
*
|
|
176
|
+
* @param {string} params.policyId - Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
177
|
+
* @param {string} params.name - Policy name. Max length: 128 chars.
|
|
178
|
+
* @param {number} params.retention - Days to keep backups before deletion
|
|
179
|
+
* @param {string} params.schedule - Cron expression
|
|
180
|
+
* @param {boolean} params.enabled - Is Backup enabled? When set to 'disabled', No backup will be taken
|
|
181
|
+
* @throws {AppwriteException}
|
|
182
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
183
|
+
*/
|
|
184
|
+
updatePolicy(params: {
|
|
185
|
+
policyId: string;
|
|
186
|
+
name?: string;
|
|
187
|
+
retention?: number;
|
|
188
|
+
schedule?: string;
|
|
189
|
+
enabled?: boolean;
|
|
190
|
+
}): Promise<Models.BackupPolicy>;
|
|
191
|
+
/**
|
|
192
|
+
* Update an existing policy using it's ID.
|
|
193
|
+
*
|
|
194
|
+
* @param {string} policyId - Policy ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
195
|
+
* @param {string} name - Policy name. Max length: 128 chars.
|
|
196
|
+
* @param {number} retention - Days to keep backups before deletion
|
|
197
|
+
* @param {string} schedule - Cron expression
|
|
198
|
+
* @param {boolean} enabled - Is Backup enabled? When set to 'disabled', No backup will be taken
|
|
199
|
+
* @throws {AppwriteException}
|
|
200
|
+
* @returns {Promise<Models.BackupPolicy>}
|
|
201
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
202
|
+
*/
|
|
203
|
+
updatePolicy(policyId: string, name?: string, retention?: number, schedule?: string, enabled?: boolean): Promise<Models.BackupPolicy>;
|
|
204
|
+
/**
|
|
205
|
+
* Delete a policy using it's ID.
|
|
206
|
+
*
|
|
207
|
+
* @param {string} params.policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
208
|
+
* @throws {AppwriteException}
|
|
209
|
+
* @returns {Promise<{}>}
|
|
210
|
+
*/
|
|
211
|
+
deletePolicy(params: {
|
|
212
|
+
policyId: string;
|
|
213
|
+
}): Promise<{}>;
|
|
214
|
+
/**
|
|
215
|
+
* Delete a policy using it's ID.
|
|
216
|
+
*
|
|
217
|
+
* @param {string} policyId - Policy ID. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
218
|
+
* @throws {AppwriteException}
|
|
219
|
+
* @returns {Promise<{}>}
|
|
220
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
221
|
+
*/
|
|
222
|
+
deletePolicy(policyId: string): Promise<{}>;
|
|
223
|
+
/**
|
|
224
|
+
* Create and trigger a new restoration for a backup on a project.
|
|
225
|
+
*
|
|
226
|
+
* @param {string} params.archiveId - Backup archive ID to restore
|
|
227
|
+
* @param {BackupServices[]} params.services - Array of services to restore
|
|
228
|
+
* @param {string} params.newResourceId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
229
|
+
* @param {string} params.newResourceName - Database name. Max length: 128 chars.
|
|
230
|
+
* @throws {AppwriteException}
|
|
231
|
+
* @returns {Promise<Models.BackupRestoration>}
|
|
232
|
+
*/
|
|
233
|
+
createRestoration(params: {
|
|
234
|
+
archiveId: string;
|
|
235
|
+
services: BackupServices[];
|
|
236
|
+
newResourceId?: string;
|
|
237
|
+
newResourceName?: string;
|
|
238
|
+
}): Promise<Models.BackupRestoration>;
|
|
239
|
+
/**
|
|
240
|
+
* Create and trigger a new restoration for a backup on a project.
|
|
241
|
+
*
|
|
242
|
+
* @param {string} archiveId - Backup archive ID to restore
|
|
243
|
+
* @param {BackupServices[]} services - Array of services to restore
|
|
244
|
+
* @param {string} newResourceId - Unique Id. Choose a custom ID or generate a random ID with `ID.unique()`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
245
|
+
* @param {string} newResourceName - Database name. Max length: 128 chars.
|
|
246
|
+
* @throws {AppwriteException}
|
|
247
|
+
* @returns {Promise<Models.BackupRestoration>}
|
|
248
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
249
|
+
*/
|
|
250
|
+
createRestoration(archiveId: string, services: BackupServices[], newResourceId?: string, newResourceName?: string): Promise<Models.BackupRestoration>;
|
|
251
|
+
/**
|
|
252
|
+
* List all backup restorations for a project.
|
|
253
|
+
*
|
|
254
|
+
* @param {string[]} params.queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
255
|
+
* @throws {AppwriteException}
|
|
256
|
+
* @returns {Promise<Models.BackupRestorationList>}
|
|
257
|
+
*/
|
|
258
|
+
listRestorations(params?: {
|
|
259
|
+
queries?: string[];
|
|
260
|
+
}): Promise<Models.BackupRestorationList>;
|
|
261
|
+
/**
|
|
262
|
+
* List all backup restorations for a project.
|
|
263
|
+
*
|
|
264
|
+
* @param {string[]} queries - Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long.
|
|
265
|
+
* @throws {AppwriteException}
|
|
266
|
+
* @returns {Promise<Models.BackupRestorationList>}
|
|
267
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
268
|
+
*/
|
|
269
|
+
listRestorations(queries?: string[]): Promise<Models.BackupRestorationList>;
|
|
270
|
+
/**
|
|
271
|
+
* Get the current status of a backup restoration.
|
|
272
|
+
*
|
|
273
|
+
* @param {string} params.restorationId - Restoration ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
274
|
+
* @throws {AppwriteException}
|
|
275
|
+
* @returns {Promise<Models.BackupRestoration>}
|
|
276
|
+
*/
|
|
277
|
+
getRestoration(params: {
|
|
278
|
+
restorationId: string;
|
|
279
|
+
}): Promise<Models.BackupRestoration>;
|
|
280
|
+
/**
|
|
281
|
+
* Get the current status of a backup restoration.
|
|
282
|
+
*
|
|
283
|
+
* @param {string} restorationId - Restoration ID. Choose a custom ID`. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.
|
|
284
|
+
* @throws {AppwriteException}
|
|
285
|
+
* @returns {Promise<Models.BackupRestoration>}
|
|
286
|
+
* @deprecated Use the object parameter style method for a better developer experience.
|
|
287
|
+
*/
|
|
288
|
+
getRestoration(restorationId: string): Promise<Models.BackupRestoration>;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
export { Backups };
|