@appwrite.io/console 1.5.1 → 1.6.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 +4 -4
- package/dist/cjs/sdk.js +7714 -9758
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +7714 -9758
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +7714 -9758
- package/docs/examples/databases/update-float-attribute.md +2 -2
- package/docs/examples/databases/update-integer-attribute.md +2 -2
- package/docs/examples/health/{get-queue-usage-count.md → get-queue-stats-resources.md} +1 -1
- package/docs/examples/health/{get-queue-usage-dump.md → get-queue-stats-usage-dump.md} +1 -1
- package/docs/examples/organizations/create.md +5 -1
- package/docs/examples/organizations/update-plan.md +5 -1
- package/docs/examples/organizations/validate-invoice.md +14 -0
- package/package.json +1 -1
- package/src/client.ts +21 -4
- package/src/enums/credit-card.ts +1 -0
- package/src/enums/name.ts +3 -2
- package/src/enums/o-auth-provider.ts +1 -0
- package/src/enums/runtime.ts +3 -0
- package/src/models.ts +202 -5
- package/src/services/account.ts +126 -430
- package/src/services/assistant.ts +2 -7
- package/src/services/avatars.ts +7 -21
- package/src/services/backups.ts +24 -84
- package/src/services/console.ts +14 -49
- package/src/services/databases.ts +99 -350
- package/src/services/functions.ts +55 -192
- package/src/services/graphql.ts +4 -14
- package/src/services/health.ts +55 -207
- package/src/services/locale.ts +16 -56
- package/src/services/messaging.ts +92 -322
- package/src/services/migrations.ts +24 -84
- package/src/services/organizations.ts +118 -196
- package/src/services/project.ts +12 -42
- package/src/services/projects.ts +92 -322
- package/src/services/proxy.ts +10 -35
- package/src/services/storage.ts +27 -93
- package/src/services/teams.ts +28 -98
- package/src/services/users.ts +86 -301
- package/src/services/vcs.ts +20 -70
- package/types/enums/credit-card.d.ts +2 -1
- package/types/enums/name.d.ts +3 -2
- package/types/enums/o-auth-provider.d.ts +1 -0
- package/types/enums/runtime.d.ts +3 -0
- package/types/models.d.ts +202 -5
- package/types/services/account.d.ts +4 -128
- package/types/services/assistant.d.ts +0 -2
- package/types/services/avatars.d.ts +0 -14
- package/types/services/backups.d.ts +0 -24
- package/types/services/console.d.ts +0 -14
- package/types/services/databases.d.ts +5 -100
- package/types/services/functions.d.ts +0 -56
- package/types/services/graphql.d.ts +0 -4
- package/types/services/health.d.ts +5 -64
- package/types/services/locale.d.ts +0 -16
- package/types/services/messaging.d.ts +0 -92
- package/types/services/migrations.d.ts +0 -24
- package/types/services/organizations.d.ts +21 -60
- package/types/services/project.d.ts +0 -12
- package/types/services/projects.d.ts +0 -92
- package/types/services/proxy.d.ts +0 -10
- package/types/services/storage.d.ts +0 -30
- package/types/services/teams.d.ts +0 -28
- package/types/services/users.d.ts +0 -86
- package/types/services/vcs.d.ts +0 -20
- package/docs/examples/health/get-queue.md +0 -11
package/src/services/health.ts
CHANGED
|
@@ -11,14 +11,12 @@ export class Health {
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* Get HTTP
|
|
15
|
-
*
|
|
16
14
|
* Check the Appwrite HTTP server is up and responsive.
|
|
17
15
|
*
|
|
18
16
|
* @throws {AppwriteException}
|
|
19
17
|
* @returns {Promise<Models.HealthStatus>}
|
|
20
18
|
*/
|
|
21
|
-
|
|
19
|
+
get(): Promise<Models.HealthStatus> {
|
|
22
20
|
const apiPath = '/health';
|
|
23
21
|
const payload: Payload = {};
|
|
24
22
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -27,10 +25,7 @@ export class Health {
|
|
|
27
25
|
'content-type': 'application/json',
|
|
28
26
|
}
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return await this.client.call(
|
|
28
|
+
return this.client.call(
|
|
34
29
|
'get',
|
|
35
30
|
uri,
|
|
36
31
|
apiHeaders,
|
|
@@ -38,14 +33,12 @@ export class Health {
|
|
|
38
33
|
);
|
|
39
34
|
}
|
|
40
35
|
/**
|
|
41
|
-
* Get antivirus
|
|
42
|
-
*
|
|
43
36
|
* Check the Appwrite Antivirus server is up and connection is successful.
|
|
44
37
|
*
|
|
45
38
|
* @throws {AppwriteException}
|
|
46
39
|
* @returns {Promise<Models.HealthAntivirus>}
|
|
47
40
|
*/
|
|
48
|
-
|
|
41
|
+
getAntivirus(): Promise<Models.HealthAntivirus> {
|
|
49
42
|
const apiPath = '/health/anti-virus';
|
|
50
43
|
const payload: Payload = {};
|
|
51
44
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -54,10 +47,7 @@ export class Health {
|
|
|
54
47
|
'content-type': 'application/json',
|
|
55
48
|
}
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return await this.client.call(
|
|
50
|
+
return this.client.call(
|
|
61
51
|
'get',
|
|
62
52
|
uri,
|
|
63
53
|
apiHeaders,
|
|
@@ -65,14 +55,12 @@ export class Health {
|
|
|
65
55
|
);
|
|
66
56
|
}
|
|
67
57
|
/**
|
|
68
|
-
* Get cache
|
|
69
|
-
*
|
|
70
58
|
* Check the Appwrite in-memory cache servers are up and connection is successful.
|
|
71
59
|
*
|
|
72
60
|
* @throws {AppwriteException}
|
|
73
61
|
* @returns {Promise<Models.HealthStatus>}
|
|
74
62
|
*/
|
|
75
|
-
|
|
63
|
+
getCache(): Promise<Models.HealthStatus> {
|
|
76
64
|
const apiPath = '/health/cache';
|
|
77
65
|
const payload: Payload = {};
|
|
78
66
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -81,10 +69,7 @@ export class Health {
|
|
|
81
69
|
'content-type': 'application/json',
|
|
82
70
|
}
|
|
83
71
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
return await this.client.call(
|
|
72
|
+
return this.client.call(
|
|
88
73
|
'get',
|
|
89
74
|
uri,
|
|
90
75
|
apiHeaders,
|
|
@@ -92,15 +77,13 @@ export class Health {
|
|
|
92
77
|
);
|
|
93
78
|
}
|
|
94
79
|
/**
|
|
95
|
-
* Get the SSL certificate for a domain
|
|
96
|
-
*
|
|
97
80
|
* Get the SSL certificate for a domain
|
|
98
81
|
*
|
|
99
82
|
* @param {string} domain
|
|
100
83
|
* @throws {AppwriteException}
|
|
101
84
|
* @returns {Promise<Models.HealthCertificate>}
|
|
102
85
|
*/
|
|
103
|
-
|
|
86
|
+
getCertificate(domain?: string): Promise<Models.HealthCertificate> {
|
|
104
87
|
const apiPath = '/health/certificate';
|
|
105
88
|
const payload: Payload = {};
|
|
106
89
|
if (typeof domain !== 'undefined') {
|
|
@@ -112,10 +95,7 @@ export class Health {
|
|
|
112
95
|
'content-type': 'application/json',
|
|
113
96
|
}
|
|
114
97
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
return await this.client.call(
|
|
98
|
+
return this.client.call(
|
|
119
99
|
'get',
|
|
120
100
|
uri,
|
|
121
101
|
apiHeaders,
|
|
@@ -123,14 +103,12 @@ export class Health {
|
|
|
123
103
|
);
|
|
124
104
|
}
|
|
125
105
|
/**
|
|
126
|
-
* Get DB
|
|
127
|
-
*
|
|
128
106
|
* Check the Appwrite database servers are up and connection is successful.
|
|
129
107
|
*
|
|
130
108
|
* @throws {AppwriteException}
|
|
131
109
|
* @returns {Promise<Models.HealthStatus>}
|
|
132
110
|
*/
|
|
133
|
-
|
|
111
|
+
getDB(): Promise<Models.HealthStatus> {
|
|
134
112
|
const apiPath = '/health/db';
|
|
135
113
|
const payload: Payload = {};
|
|
136
114
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -139,10 +117,7 @@ export class Health {
|
|
|
139
117
|
'content-type': 'application/json',
|
|
140
118
|
}
|
|
141
119
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return await this.client.call(
|
|
120
|
+
return this.client.call(
|
|
146
121
|
'get',
|
|
147
122
|
uri,
|
|
148
123
|
apiHeaders,
|
|
@@ -150,14 +125,12 @@ export class Health {
|
|
|
150
125
|
);
|
|
151
126
|
}
|
|
152
127
|
/**
|
|
153
|
-
* Get pubsub
|
|
154
|
-
*
|
|
155
128
|
* Check the Appwrite pub-sub servers are up and connection is successful.
|
|
156
129
|
*
|
|
157
130
|
* @throws {AppwriteException}
|
|
158
131
|
* @returns {Promise<Models.HealthStatus>}
|
|
159
132
|
*/
|
|
160
|
-
|
|
133
|
+
getPubSub(): Promise<Models.HealthStatus> {
|
|
161
134
|
const apiPath = '/health/pubsub';
|
|
162
135
|
const payload: Payload = {};
|
|
163
136
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -166,10 +139,7 @@ export class Health {
|
|
|
166
139
|
'content-type': 'application/json',
|
|
167
140
|
}
|
|
168
141
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
return await this.client.call(
|
|
142
|
+
return this.client.call(
|
|
173
143
|
'get',
|
|
174
144
|
uri,
|
|
175
145
|
apiHeaders,
|
|
@@ -177,42 +147,13 @@ export class Health {
|
|
|
177
147
|
);
|
|
178
148
|
}
|
|
179
149
|
/**
|
|
180
|
-
* Get queue
|
|
181
|
-
*
|
|
182
|
-
* Check the Appwrite queue messaging servers are up and connection is successful.
|
|
183
|
-
*
|
|
184
|
-
* @throws {AppwriteException}
|
|
185
|
-
* @returns {Promise<Models.HealthStatus>}
|
|
186
|
-
*/
|
|
187
|
-
async getQueue(): Promise<Models.HealthStatus> {
|
|
188
|
-
const apiPath = '/health/queue';
|
|
189
|
-
const payload: Payload = {};
|
|
190
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
191
|
-
|
|
192
|
-
const apiHeaders: { [header: string]: string } = {
|
|
193
|
-
'content-type': 'application/json',
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
payload['project'] = this.client.config.project;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
return await this.client.call(
|
|
200
|
-
'get',
|
|
201
|
-
uri,
|
|
202
|
-
apiHeaders,
|
|
203
|
-
payload
|
|
204
|
-
);
|
|
205
|
-
}
|
|
206
|
-
/**
|
|
207
|
-
* Get billing aggregation queue
|
|
208
|
-
*
|
|
209
150
|
* Get billing aggregation queue
|
|
210
151
|
*
|
|
211
152
|
* @param {number} threshold
|
|
212
153
|
* @throws {AppwriteException}
|
|
213
154
|
* @returns {Promise<Models.HealthQueue>}
|
|
214
155
|
*/
|
|
215
|
-
|
|
156
|
+
getQueueBillingAggregation(threshold?: number): Promise<Models.HealthQueue> {
|
|
216
157
|
const apiPath = '/health/queue/billing-aggregation';
|
|
217
158
|
const payload: Payload = {};
|
|
218
159
|
if (typeof threshold !== 'undefined') {
|
|
@@ -224,10 +165,7 @@ export class Health {
|
|
|
224
165
|
'content-type': 'application/json',
|
|
225
166
|
}
|
|
226
167
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
return await this.client.call(
|
|
168
|
+
return this.client.call(
|
|
231
169
|
'get',
|
|
232
170
|
uri,
|
|
233
171
|
apiHeaders,
|
|
@@ -235,15 +173,13 @@ export class Health {
|
|
|
235
173
|
);
|
|
236
174
|
}
|
|
237
175
|
/**
|
|
238
|
-
* Get builds queue
|
|
239
|
-
*
|
|
240
176
|
* Get the number of builds that are waiting to be processed in the Appwrite internal queue server.
|
|
241
177
|
*
|
|
242
178
|
* @param {number} threshold
|
|
243
179
|
* @throws {AppwriteException}
|
|
244
180
|
* @returns {Promise<Models.HealthQueue>}
|
|
245
181
|
*/
|
|
246
|
-
|
|
182
|
+
getQueueBuilds(threshold?: number): Promise<Models.HealthQueue> {
|
|
247
183
|
const apiPath = '/health/queue/builds';
|
|
248
184
|
const payload: Payload = {};
|
|
249
185
|
if (typeof threshold !== 'undefined') {
|
|
@@ -255,10 +191,7 @@ export class Health {
|
|
|
255
191
|
'content-type': 'application/json',
|
|
256
192
|
}
|
|
257
193
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
return await this.client.call(
|
|
194
|
+
return this.client.call(
|
|
262
195
|
'get',
|
|
263
196
|
uri,
|
|
264
197
|
apiHeaders,
|
|
@@ -266,15 +199,13 @@ export class Health {
|
|
|
266
199
|
);
|
|
267
200
|
}
|
|
268
201
|
/**
|
|
269
|
-
* Get billing aggregation queue
|
|
270
|
-
*
|
|
271
202
|
* Get the priority builds queue size.
|
|
272
203
|
*
|
|
273
204
|
* @param {number} threshold
|
|
274
205
|
* @throws {AppwriteException}
|
|
275
206
|
* @returns {Promise<Models.HealthQueue>}
|
|
276
207
|
*/
|
|
277
|
-
|
|
208
|
+
getQueuePriorityBuilds(threshold?: number): Promise<Models.HealthQueue> {
|
|
278
209
|
const apiPath = '/health/queue/builds-priority';
|
|
279
210
|
const payload: Payload = {};
|
|
280
211
|
if (typeof threshold !== 'undefined') {
|
|
@@ -286,10 +217,7 @@ export class Health {
|
|
|
286
217
|
'content-type': 'application/json',
|
|
287
218
|
}
|
|
288
219
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
return await this.client.call(
|
|
220
|
+
return this.client.call(
|
|
293
221
|
'get',
|
|
294
222
|
uri,
|
|
295
223
|
apiHeaders,
|
|
@@ -297,15 +225,13 @@ export class Health {
|
|
|
297
225
|
);
|
|
298
226
|
}
|
|
299
227
|
/**
|
|
300
|
-
* Get certificates queue
|
|
301
|
-
*
|
|
302
228
|
* Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.
|
|
303
229
|
*
|
|
304
230
|
* @param {number} threshold
|
|
305
231
|
* @throws {AppwriteException}
|
|
306
232
|
* @returns {Promise<Models.HealthQueue>}
|
|
307
233
|
*/
|
|
308
|
-
|
|
234
|
+
getQueueCertificates(threshold?: number): Promise<Models.HealthQueue> {
|
|
309
235
|
const apiPath = '/health/queue/certificates';
|
|
310
236
|
const payload: Payload = {};
|
|
311
237
|
if (typeof threshold !== 'undefined') {
|
|
@@ -317,10 +243,7 @@ export class Health {
|
|
|
317
243
|
'content-type': 'application/json',
|
|
318
244
|
}
|
|
319
245
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
return await this.client.call(
|
|
246
|
+
return this.client.call(
|
|
324
247
|
'get',
|
|
325
248
|
uri,
|
|
326
249
|
apiHeaders,
|
|
@@ -328,8 +251,6 @@ export class Health {
|
|
|
328
251
|
);
|
|
329
252
|
}
|
|
330
253
|
/**
|
|
331
|
-
* Get databases queue
|
|
332
|
-
*
|
|
333
254
|
* Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.
|
|
334
255
|
*
|
|
335
256
|
* @param {string} name
|
|
@@ -337,7 +258,7 @@ export class Health {
|
|
|
337
258
|
* @throws {AppwriteException}
|
|
338
259
|
* @returns {Promise<Models.HealthQueue>}
|
|
339
260
|
*/
|
|
340
|
-
|
|
261
|
+
getQueueDatabases(name?: string, threshold?: number): Promise<Models.HealthQueue> {
|
|
341
262
|
const apiPath = '/health/queue/databases';
|
|
342
263
|
const payload: Payload = {};
|
|
343
264
|
if (typeof name !== 'undefined') {
|
|
@@ -352,10 +273,7 @@ export class Health {
|
|
|
352
273
|
'content-type': 'application/json',
|
|
353
274
|
}
|
|
354
275
|
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
return await this.client.call(
|
|
276
|
+
return this.client.call(
|
|
359
277
|
'get',
|
|
360
278
|
uri,
|
|
361
279
|
apiHeaders,
|
|
@@ -363,15 +281,13 @@ export class Health {
|
|
|
363
281
|
);
|
|
364
282
|
}
|
|
365
283
|
/**
|
|
366
|
-
* Get deletes queue
|
|
367
|
-
*
|
|
368
284
|
* Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.
|
|
369
285
|
*
|
|
370
286
|
* @param {number} threshold
|
|
371
287
|
* @throws {AppwriteException}
|
|
372
288
|
* @returns {Promise<Models.HealthQueue>}
|
|
373
289
|
*/
|
|
374
|
-
|
|
290
|
+
getQueueDeletes(threshold?: number): Promise<Models.HealthQueue> {
|
|
375
291
|
const apiPath = '/health/queue/deletes';
|
|
376
292
|
const payload: Payload = {};
|
|
377
293
|
if (typeof threshold !== 'undefined') {
|
|
@@ -383,10 +299,7 @@ export class Health {
|
|
|
383
299
|
'content-type': 'application/json',
|
|
384
300
|
}
|
|
385
301
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
return await this.client.call(
|
|
302
|
+
return this.client.call(
|
|
390
303
|
'get',
|
|
391
304
|
uri,
|
|
392
305
|
apiHeaders,
|
|
@@ -394,8 +307,6 @@ export class Health {
|
|
|
394
307
|
);
|
|
395
308
|
}
|
|
396
309
|
/**
|
|
397
|
-
* Get number of failed queue jobs
|
|
398
|
-
*
|
|
399
310
|
* Returns the amount of failed jobs in a given queue.
|
|
400
311
|
|
|
401
312
|
*
|
|
@@ -404,7 +315,7 @@ export class Health {
|
|
|
404
315
|
* @throws {AppwriteException}
|
|
405
316
|
* @returns {Promise<Models.HealthQueue>}
|
|
406
317
|
*/
|
|
407
|
-
|
|
318
|
+
getFailedJobs(name: Name, threshold?: number): Promise<Models.HealthQueue> {
|
|
408
319
|
if (typeof name === 'undefined') {
|
|
409
320
|
throw new AppwriteException('Missing required parameter: "name"');
|
|
410
321
|
}
|
|
@@ -419,10 +330,7 @@ export class Health {
|
|
|
419
330
|
'content-type': 'application/json',
|
|
420
331
|
}
|
|
421
332
|
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
return await this.client.call(
|
|
333
|
+
return this.client.call(
|
|
426
334
|
'get',
|
|
427
335
|
uri,
|
|
428
336
|
apiHeaders,
|
|
@@ -430,15 +338,13 @@ export class Health {
|
|
|
430
338
|
);
|
|
431
339
|
}
|
|
432
340
|
/**
|
|
433
|
-
* Get functions queue
|
|
434
|
-
*
|
|
435
341
|
* Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.
|
|
436
342
|
*
|
|
437
343
|
* @param {number} threshold
|
|
438
344
|
* @throws {AppwriteException}
|
|
439
345
|
* @returns {Promise<Models.HealthQueue>}
|
|
440
346
|
*/
|
|
441
|
-
|
|
347
|
+
getQueueFunctions(threshold?: number): Promise<Models.HealthQueue> {
|
|
442
348
|
const apiPath = '/health/queue/functions';
|
|
443
349
|
const payload: Payload = {};
|
|
444
350
|
if (typeof threshold !== 'undefined') {
|
|
@@ -450,10 +356,7 @@ export class Health {
|
|
|
450
356
|
'content-type': 'application/json',
|
|
451
357
|
}
|
|
452
358
|
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
return await this.client.call(
|
|
359
|
+
return this.client.call(
|
|
457
360
|
'get',
|
|
458
361
|
uri,
|
|
459
362
|
apiHeaders,
|
|
@@ -461,15 +364,13 @@ export class Health {
|
|
|
461
364
|
);
|
|
462
365
|
}
|
|
463
366
|
/**
|
|
464
|
-
* Get logs queue
|
|
465
|
-
*
|
|
466
367
|
* Get the number of logs that are waiting to be processed in the Appwrite internal queue server.
|
|
467
368
|
*
|
|
468
369
|
* @param {number} threshold
|
|
469
370
|
* @throws {AppwriteException}
|
|
470
371
|
* @returns {Promise<Models.HealthQueue>}
|
|
471
372
|
*/
|
|
472
|
-
|
|
373
|
+
getQueueLogs(threshold?: number): Promise<Models.HealthQueue> {
|
|
473
374
|
const apiPath = '/health/queue/logs';
|
|
474
375
|
const payload: Payload = {};
|
|
475
376
|
if (typeof threshold !== 'undefined') {
|
|
@@ -481,10 +382,7 @@ export class Health {
|
|
|
481
382
|
'content-type': 'application/json',
|
|
482
383
|
}
|
|
483
384
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
return await this.client.call(
|
|
385
|
+
return this.client.call(
|
|
488
386
|
'get',
|
|
489
387
|
uri,
|
|
490
388
|
apiHeaders,
|
|
@@ -492,15 +390,13 @@ export class Health {
|
|
|
492
390
|
);
|
|
493
391
|
}
|
|
494
392
|
/**
|
|
495
|
-
* Get mails queue
|
|
496
|
-
*
|
|
497
393
|
* Get the number of mails that are waiting to be processed in the Appwrite internal queue server.
|
|
498
394
|
*
|
|
499
395
|
* @param {number} threshold
|
|
500
396
|
* @throws {AppwriteException}
|
|
501
397
|
* @returns {Promise<Models.HealthQueue>}
|
|
502
398
|
*/
|
|
503
|
-
|
|
399
|
+
getQueueMails(threshold?: number): Promise<Models.HealthQueue> {
|
|
504
400
|
const apiPath = '/health/queue/mails';
|
|
505
401
|
const payload: Payload = {};
|
|
506
402
|
if (typeof threshold !== 'undefined') {
|
|
@@ -512,10 +408,7 @@ export class Health {
|
|
|
512
408
|
'content-type': 'application/json',
|
|
513
409
|
}
|
|
514
410
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
return await this.client.call(
|
|
411
|
+
return this.client.call(
|
|
519
412
|
'get',
|
|
520
413
|
uri,
|
|
521
414
|
apiHeaders,
|
|
@@ -523,15 +416,13 @@ export class Health {
|
|
|
523
416
|
);
|
|
524
417
|
}
|
|
525
418
|
/**
|
|
526
|
-
* Get messaging queue
|
|
527
|
-
*
|
|
528
419
|
* Get the number of messages that are waiting to be processed in the Appwrite internal queue server.
|
|
529
420
|
*
|
|
530
421
|
* @param {number} threshold
|
|
531
422
|
* @throws {AppwriteException}
|
|
532
423
|
* @returns {Promise<Models.HealthQueue>}
|
|
533
424
|
*/
|
|
534
|
-
|
|
425
|
+
getQueueMessaging(threshold?: number): Promise<Models.HealthQueue> {
|
|
535
426
|
const apiPath = '/health/queue/messaging';
|
|
536
427
|
const payload: Payload = {};
|
|
537
428
|
if (typeof threshold !== 'undefined') {
|
|
@@ -543,10 +434,7 @@ export class Health {
|
|
|
543
434
|
'content-type': 'application/json',
|
|
544
435
|
}
|
|
545
436
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
return await this.client.call(
|
|
437
|
+
return this.client.call(
|
|
550
438
|
'get',
|
|
551
439
|
uri,
|
|
552
440
|
apiHeaders,
|
|
@@ -554,15 +442,13 @@ export class Health {
|
|
|
554
442
|
);
|
|
555
443
|
}
|
|
556
444
|
/**
|
|
557
|
-
* Get migrations queue
|
|
558
|
-
*
|
|
559
445
|
* Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.
|
|
560
446
|
*
|
|
561
447
|
* @param {number} threshold
|
|
562
448
|
* @throws {AppwriteException}
|
|
563
449
|
* @returns {Promise<Models.HealthQueue>}
|
|
564
450
|
*/
|
|
565
|
-
|
|
451
|
+
getQueueMigrations(threshold?: number): Promise<Models.HealthQueue> {
|
|
566
452
|
const apiPath = '/health/queue/migrations';
|
|
567
453
|
const payload: Payload = {};
|
|
568
454
|
if (typeof threshold !== 'undefined') {
|
|
@@ -574,10 +460,7 @@ export class Health {
|
|
|
574
460
|
'content-type': 'application/json',
|
|
575
461
|
}
|
|
576
462
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
return await this.client.call(
|
|
463
|
+
return this.client.call(
|
|
581
464
|
'get',
|
|
582
465
|
uri,
|
|
583
466
|
apiHeaders,
|
|
@@ -585,16 +468,14 @@ export class Health {
|
|
|
585
468
|
);
|
|
586
469
|
}
|
|
587
470
|
/**
|
|
588
|
-
* Get
|
|
589
|
-
*
|
|
590
|
-
* Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.
|
|
471
|
+
* Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.
|
|
591
472
|
*
|
|
592
473
|
* @param {number} threshold
|
|
593
474
|
* @throws {AppwriteException}
|
|
594
475
|
* @returns {Promise<Models.HealthQueue>}
|
|
595
476
|
*/
|
|
596
|
-
|
|
597
|
-
const apiPath = '/health/queue/
|
|
477
|
+
getQueueStatsResources(threshold?: number): Promise<Models.HealthQueue> {
|
|
478
|
+
const apiPath = '/health/queue/stats-resources';
|
|
598
479
|
const payload: Payload = {};
|
|
599
480
|
if (typeof threshold !== 'undefined') {
|
|
600
481
|
payload['threshold'] = threshold;
|
|
@@ -605,10 +486,7 @@ export class Health {
|
|
|
605
486
|
'content-type': 'application/json',
|
|
606
487
|
}
|
|
607
488
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
return await this.client.call(
|
|
489
|
+
return this.client.call(
|
|
612
490
|
'get',
|
|
613
491
|
uri,
|
|
614
492
|
apiHeaders,
|
|
@@ -616,16 +494,14 @@ export class Health {
|
|
|
616
494
|
);
|
|
617
495
|
}
|
|
618
496
|
/**
|
|
619
|
-
* Get
|
|
620
|
-
*
|
|
621
|
-
* Get the usage count aggregation queue.
|
|
497
|
+
* Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.
|
|
622
498
|
*
|
|
623
499
|
* @param {number} threshold
|
|
624
500
|
* @throws {AppwriteException}
|
|
625
501
|
* @returns {Promise<Models.HealthQueue>}
|
|
626
502
|
*/
|
|
627
|
-
|
|
628
|
-
const apiPath = '/health/queue/usage
|
|
503
|
+
getQueueUsage(threshold?: number): Promise<Models.HealthQueue> {
|
|
504
|
+
const apiPath = '/health/queue/stats-usage';
|
|
629
505
|
const payload: Payload = {};
|
|
630
506
|
if (typeof threshold !== 'undefined') {
|
|
631
507
|
payload['threshold'] = threshold;
|
|
@@ -636,10 +512,7 @@ export class Health {
|
|
|
636
512
|
'content-type': 'application/json',
|
|
637
513
|
}
|
|
638
514
|
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
return await this.client.call(
|
|
515
|
+
return this.client.call(
|
|
643
516
|
'get',
|
|
644
517
|
uri,
|
|
645
518
|
apiHeaders,
|
|
@@ -647,16 +520,14 @@ export class Health {
|
|
|
647
520
|
);
|
|
648
521
|
}
|
|
649
522
|
/**
|
|
650
|
-
* Get usage dump queue
|
|
651
|
-
*
|
|
652
523
|
* Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.
|
|
653
524
|
*
|
|
654
525
|
* @param {number} threshold
|
|
655
526
|
* @throws {AppwriteException}
|
|
656
527
|
* @returns {Promise<Models.HealthQueue>}
|
|
657
528
|
*/
|
|
658
|
-
|
|
659
|
-
const apiPath = '/health/queue/usage-dump';
|
|
529
|
+
getQueueStatsUsageDump(threshold?: number): Promise<Models.HealthQueue> {
|
|
530
|
+
const apiPath = '/health/queue/stats-usage-dump';
|
|
660
531
|
const payload: Payload = {};
|
|
661
532
|
if (typeof threshold !== 'undefined') {
|
|
662
533
|
payload['threshold'] = threshold;
|
|
@@ -667,10 +538,7 @@ export class Health {
|
|
|
667
538
|
'content-type': 'application/json',
|
|
668
539
|
}
|
|
669
540
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
return await this.client.call(
|
|
541
|
+
return this.client.call(
|
|
674
542
|
'get',
|
|
675
543
|
uri,
|
|
676
544
|
apiHeaders,
|
|
@@ -678,15 +546,13 @@ export class Health {
|
|
|
678
546
|
);
|
|
679
547
|
}
|
|
680
548
|
/**
|
|
681
|
-
* Get webhooks queue
|
|
682
|
-
*
|
|
683
549
|
* Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.
|
|
684
550
|
*
|
|
685
551
|
* @param {number} threshold
|
|
686
552
|
* @throws {AppwriteException}
|
|
687
553
|
* @returns {Promise<Models.HealthQueue>}
|
|
688
554
|
*/
|
|
689
|
-
|
|
555
|
+
getQueueWebhooks(threshold?: number): Promise<Models.HealthQueue> {
|
|
690
556
|
const apiPath = '/health/queue/webhooks';
|
|
691
557
|
const payload: Payload = {};
|
|
692
558
|
if (typeof threshold !== 'undefined') {
|
|
@@ -698,10 +564,7 @@ export class Health {
|
|
|
698
564
|
'content-type': 'application/json',
|
|
699
565
|
}
|
|
700
566
|
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
return await this.client.call(
|
|
567
|
+
return this.client.call(
|
|
705
568
|
'get',
|
|
706
569
|
uri,
|
|
707
570
|
apiHeaders,
|
|
@@ -709,14 +572,12 @@ export class Health {
|
|
|
709
572
|
);
|
|
710
573
|
}
|
|
711
574
|
/**
|
|
712
|
-
* Get storage
|
|
713
|
-
*
|
|
714
575
|
* Check the Appwrite storage device is up and connection is successful.
|
|
715
576
|
*
|
|
716
577
|
* @throws {AppwriteException}
|
|
717
578
|
* @returns {Promise<Models.HealthStatus>}
|
|
718
579
|
*/
|
|
719
|
-
|
|
580
|
+
getStorage(): Promise<Models.HealthStatus> {
|
|
720
581
|
const apiPath = '/health/storage';
|
|
721
582
|
const payload: Payload = {};
|
|
722
583
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -725,10 +586,7 @@ export class Health {
|
|
|
725
586
|
'content-type': 'application/json',
|
|
726
587
|
}
|
|
727
588
|
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
return await this.client.call(
|
|
589
|
+
return this.client.call(
|
|
732
590
|
'get',
|
|
733
591
|
uri,
|
|
734
592
|
apiHeaders,
|
|
@@ -736,14 +594,12 @@ export class Health {
|
|
|
736
594
|
);
|
|
737
595
|
}
|
|
738
596
|
/**
|
|
739
|
-
* Get local storage
|
|
740
|
-
*
|
|
741
597
|
* Check the Appwrite local storage device is up and connection is successful.
|
|
742
598
|
*
|
|
743
599
|
* @throws {AppwriteException}
|
|
744
600
|
* @returns {Promise<Models.HealthStatus>}
|
|
745
601
|
*/
|
|
746
|
-
|
|
602
|
+
getStorageLocal(): Promise<Models.HealthStatus> {
|
|
747
603
|
const apiPath = '/health/storage/local';
|
|
748
604
|
const payload: Payload = {};
|
|
749
605
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -752,10 +608,7 @@ export class Health {
|
|
|
752
608
|
'content-type': 'application/json',
|
|
753
609
|
}
|
|
754
610
|
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
return await this.client.call(
|
|
611
|
+
return this.client.call(
|
|
759
612
|
'get',
|
|
760
613
|
uri,
|
|
761
614
|
apiHeaders,
|
|
@@ -763,14 +616,12 @@ export class Health {
|
|
|
763
616
|
);
|
|
764
617
|
}
|
|
765
618
|
/**
|
|
766
|
-
* Get time
|
|
767
|
-
*
|
|
768
619
|
* Check the Appwrite server time is synced with Google remote NTP server. We use this technology to smoothly handle leap seconds with no disruptive events. The [Network Time Protocol](https://en.wikipedia.org/wiki/Network_Time_Protocol) (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.
|
|
769
620
|
*
|
|
770
621
|
* @throws {AppwriteException}
|
|
771
622
|
* @returns {Promise<Models.HealthTime>}
|
|
772
623
|
*/
|
|
773
|
-
|
|
624
|
+
getTime(): Promise<Models.HealthTime> {
|
|
774
625
|
const apiPath = '/health/time';
|
|
775
626
|
const payload: Payload = {};
|
|
776
627
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
@@ -779,10 +630,7 @@ export class Health {
|
|
|
779
630
|
'content-type': 'application/json',
|
|
780
631
|
}
|
|
781
632
|
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
return await this.client.call(
|
|
633
|
+
return this.client.call(
|
|
786
634
|
'get',
|
|
787
635
|
uri,
|
|
788
636
|
apiHeaders,
|