node-appwrite 15.0.0 → 15.0.1
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/dist/client.js +7 -4
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +7 -4
- package/dist/client.mjs.map +1 -1
- package/dist/models.d.mts +2 -2
- package/dist/models.d.ts +2 -2
- package/dist/services/account.d.mts +0 -86
- package/dist/services/account.d.ts +0 -86
- package/dist/services/account.js +86 -172
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +86 -172
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.d.mts +0 -14
- package/dist/services/avatars.d.ts +0 -14
- package/dist/services/avatars.js +14 -28
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +14 -28
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/databases.d.mts +0 -84
- package/dist/services/databases.d.ts +0 -84
- package/dist/services/databases.js +84 -168
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +84 -168
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +0 -48
- package/dist/services/functions.d.ts +0 -48
- package/dist/services/functions.js +48 -96
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +48 -96
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/graphql.d.mts +0 -4
- package/dist/services/graphql.d.ts +0 -4
- package/dist/services/graphql.js +4 -8
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/graphql.mjs +4 -8
- package/dist/services/graphql.mjs.map +1 -1
- package/dist/services/health.d.mts +0 -46
- package/dist/services/health.d.ts +0 -46
- package/dist/services/health.js +46 -92
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +46 -92
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/locale.d.mts +0 -16
- package/dist/services/locale.d.ts +0 -16
- package/dist/services/locale.js +16 -32
- package/dist/services/locale.js.map +1 -1
- package/dist/services/locale.mjs +16 -32
- package/dist/services/locale.mjs.map +1 -1
- package/dist/services/messaging.d.mts +3 -95
- package/dist/services/messaging.d.ts +3 -95
- package/dist/services/messaging.js +95 -187
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +95 -187
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/storage.d.mts +0 -26
- package/dist/services/storage.d.ts +0 -26
- package/dist/services/storage.js +26 -52
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +26 -52
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/teams.d.mts +0 -26
- package/dist/services/teams.d.ts +0 -26
- package/dist/services/teams.js +26 -52
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +26 -52
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/users.d.mts +0 -84
- package/dist/services/users.d.ts +0 -84
- package/dist/services/users.js +84 -168
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +84 -168
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
package/dist/services/health.js
CHANGED
|
@@ -7,21 +7,19 @@ class Health {
|
|
|
7
7
|
this.client = client;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Get HTTP
|
|
11
|
-
*
|
|
12
10
|
* Check the Appwrite HTTP server is up and responsive.
|
|
13
11
|
*
|
|
14
12
|
* @throws {AppwriteException}
|
|
15
13
|
* @returns {Promise<Models.HealthStatus>}
|
|
16
14
|
*/
|
|
17
|
-
|
|
15
|
+
get() {
|
|
18
16
|
const apiPath = "/health";
|
|
19
17
|
const payload = {};
|
|
20
18
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
21
19
|
const apiHeaders = {
|
|
22
20
|
"content-type": "application/json"
|
|
23
21
|
};
|
|
24
|
-
return
|
|
22
|
+
return this.client.call(
|
|
25
23
|
"get",
|
|
26
24
|
uri,
|
|
27
25
|
apiHeaders,
|
|
@@ -29,21 +27,19 @@ class Health {
|
|
|
29
27
|
);
|
|
30
28
|
}
|
|
31
29
|
/**
|
|
32
|
-
* Get antivirus
|
|
33
|
-
*
|
|
34
30
|
* Check the Appwrite Antivirus server is up and connection is successful.
|
|
35
31
|
*
|
|
36
32
|
* @throws {AppwriteException}
|
|
37
33
|
* @returns {Promise<Models.HealthAntivirus>}
|
|
38
34
|
*/
|
|
39
|
-
|
|
35
|
+
getAntivirus() {
|
|
40
36
|
const apiPath = "/health/anti-virus";
|
|
41
37
|
const payload = {};
|
|
42
38
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
43
39
|
const apiHeaders = {
|
|
44
40
|
"content-type": "application/json"
|
|
45
41
|
};
|
|
46
|
-
return
|
|
42
|
+
return this.client.call(
|
|
47
43
|
"get",
|
|
48
44
|
uri,
|
|
49
45
|
apiHeaders,
|
|
@@ -51,21 +47,19 @@ class Health {
|
|
|
51
47
|
);
|
|
52
48
|
}
|
|
53
49
|
/**
|
|
54
|
-
* Get cache
|
|
55
|
-
*
|
|
56
50
|
* Check the Appwrite in-memory cache servers are up and connection is successful.
|
|
57
51
|
*
|
|
58
52
|
* @throws {AppwriteException}
|
|
59
53
|
* @returns {Promise<Models.HealthStatus>}
|
|
60
54
|
*/
|
|
61
|
-
|
|
55
|
+
getCache() {
|
|
62
56
|
const apiPath = "/health/cache";
|
|
63
57
|
const payload = {};
|
|
64
58
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
65
59
|
const apiHeaders = {
|
|
66
60
|
"content-type": "application/json"
|
|
67
61
|
};
|
|
68
|
-
return
|
|
62
|
+
return this.client.call(
|
|
69
63
|
"get",
|
|
70
64
|
uri,
|
|
71
65
|
apiHeaders,
|
|
@@ -73,15 +67,13 @@ class Health {
|
|
|
73
67
|
);
|
|
74
68
|
}
|
|
75
69
|
/**
|
|
76
|
-
* Get the SSL certificate for a domain
|
|
77
|
-
*
|
|
78
70
|
* Get the SSL certificate for a domain
|
|
79
71
|
*
|
|
80
72
|
* @param {string} domain
|
|
81
73
|
* @throws {AppwriteException}
|
|
82
74
|
* @returns {Promise<Models.HealthCertificate>}
|
|
83
75
|
*/
|
|
84
|
-
|
|
76
|
+
getCertificate(domain) {
|
|
85
77
|
const apiPath = "/health/certificate";
|
|
86
78
|
const payload = {};
|
|
87
79
|
if (typeof domain !== "undefined") {
|
|
@@ -91,7 +83,7 @@ class Health {
|
|
|
91
83
|
const apiHeaders = {
|
|
92
84
|
"content-type": "application/json"
|
|
93
85
|
};
|
|
94
|
-
return
|
|
86
|
+
return this.client.call(
|
|
95
87
|
"get",
|
|
96
88
|
uri,
|
|
97
89
|
apiHeaders,
|
|
@@ -99,21 +91,19 @@ class Health {
|
|
|
99
91
|
);
|
|
100
92
|
}
|
|
101
93
|
/**
|
|
102
|
-
* Get DB
|
|
103
|
-
*
|
|
104
94
|
* Check the Appwrite database servers are up and connection is successful.
|
|
105
95
|
*
|
|
106
96
|
* @throws {AppwriteException}
|
|
107
97
|
* @returns {Promise<Models.HealthStatus>}
|
|
108
98
|
*/
|
|
109
|
-
|
|
99
|
+
getDB() {
|
|
110
100
|
const apiPath = "/health/db";
|
|
111
101
|
const payload = {};
|
|
112
102
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
113
103
|
const apiHeaders = {
|
|
114
104
|
"content-type": "application/json"
|
|
115
105
|
};
|
|
116
|
-
return
|
|
106
|
+
return this.client.call(
|
|
117
107
|
"get",
|
|
118
108
|
uri,
|
|
119
109
|
apiHeaders,
|
|
@@ -121,21 +111,19 @@ class Health {
|
|
|
121
111
|
);
|
|
122
112
|
}
|
|
123
113
|
/**
|
|
124
|
-
* Get pubsub
|
|
125
|
-
*
|
|
126
114
|
* Check the Appwrite pub-sub servers are up and connection is successful.
|
|
127
115
|
*
|
|
128
116
|
* @throws {AppwriteException}
|
|
129
117
|
* @returns {Promise<Models.HealthStatus>}
|
|
130
118
|
*/
|
|
131
|
-
|
|
119
|
+
getPubSub() {
|
|
132
120
|
const apiPath = "/health/pubsub";
|
|
133
121
|
const payload = {};
|
|
134
122
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
135
123
|
const apiHeaders = {
|
|
136
124
|
"content-type": "application/json"
|
|
137
125
|
};
|
|
138
|
-
return
|
|
126
|
+
return this.client.call(
|
|
139
127
|
"get",
|
|
140
128
|
uri,
|
|
141
129
|
apiHeaders,
|
|
@@ -143,21 +131,19 @@ class Health {
|
|
|
143
131
|
);
|
|
144
132
|
}
|
|
145
133
|
/**
|
|
146
|
-
* Get queue
|
|
147
|
-
*
|
|
148
134
|
* Check the Appwrite queue messaging servers are up and connection is successful.
|
|
149
135
|
*
|
|
150
136
|
* @throws {AppwriteException}
|
|
151
137
|
* @returns {Promise<Models.HealthStatus>}
|
|
152
138
|
*/
|
|
153
|
-
|
|
139
|
+
getQueue() {
|
|
154
140
|
const apiPath = "/health/queue";
|
|
155
141
|
const payload = {};
|
|
156
142
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
157
143
|
const apiHeaders = {
|
|
158
144
|
"content-type": "application/json"
|
|
159
145
|
};
|
|
160
|
-
return
|
|
146
|
+
return this.client.call(
|
|
161
147
|
"get",
|
|
162
148
|
uri,
|
|
163
149
|
apiHeaders,
|
|
@@ -165,15 +151,13 @@ class Health {
|
|
|
165
151
|
);
|
|
166
152
|
}
|
|
167
153
|
/**
|
|
168
|
-
* Get builds queue
|
|
169
|
-
*
|
|
170
154
|
* Get the number of builds that are waiting to be processed in the Appwrite internal queue server.
|
|
171
155
|
*
|
|
172
156
|
* @param {number} threshold
|
|
173
157
|
* @throws {AppwriteException}
|
|
174
158
|
* @returns {Promise<Models.HealthQueue>}
|
|
175
159
|
*/
|
|
176
|
-
|
|
160
|
+
getQueueBuilds(threshold) {
|
|
177
161
|
const apiPath = "/health/queue/builds";
|
|
178
162
|
const payload = {};
|
|
179
163
|
if (typeof threshold !== "undefined") {
|
|
@@ -183,7 +167,7 @@ class Health {
|
|
|
183
167
|
const apiHeaders = {
|
|
184
168
|
"content-type": "application/json"
|
|
185
169
|
};
|
|
186
|
-
return
|
|
170
|
+
return this.client.call(
|
|
187
171
|
"get",
|
|
188
172
|
uri,
|
|
189
173
|
apiHeaders,
|
|
@@ -191,15 +175,13 @@ class Health {
|
|
|
191
175
|
);
|
|
192
176
|
}
|
|
193
177
|
/**
|
|
194
|
-
* Get certificates queue
|
|
195
|
-
*
|
|
196
178
|
* Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.
|
|
197
179
|
*
|
|
198
180
|
* @param {number} threshold
|
|
199
181
|
* @throws {AppwriteException}
|
|
200
182
|
* @returns {Promise<Models.HealthQueue>}
|
|
201
183
|
*/
|
|
202
|
-
|
|
184
|
+
getQueueCertificates(threshold) {
|
|
203
185
|
const apiPath = "/health/queue/certificates";
|
|
204
186
|
const payload = {};
|
|
205
187
|
if (typeof threshold !== "undefined") {
|
|
@@ -209,7 +191,7 @@ class Health {
|
|
|
209
191
|
const apiHeaders = {
|
|
210
192
|
"content-type": "application/json"
|
|
211
193
|
};
|
|
212
|
-
return
|
|
194
|
+
return this.client.call(
|
|
213
195
|
"get",
|
|
214
196
|
uri,
|
|
215
197
|
apiHeaders,
|
|
@@ -217,8 +199,6 @@ class Health {
|
|
|
217
199
|
);
|
|
218
200
|
}
|
|
219
201
|
/**
|
|
220
|
-
* Get databases queue
|
|
221
|
-
*
|
|
222
202
|
* Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.
|
|
223
203
|
*
|
|
224
204
|
* @param {string} name
|
|
@@ -226,7 +206,7 @@ class Health {
|
|
|
226
206
|
* @throws {AppwriteException}
|
|
227
207
|
* @returns {Promise<Models.HealthQueue>}
|
|
228
208
|
*/
|
|
229
|
-
|
|
209
|
+
getQueueDatabases(name, threshold) {
|
|
230
210
|
const apiPath = "/health/queue/databases";
|
|
231
211
|
const payload = {};
|
|
232
212
|
if (typeof name !== "undefined") {
|
|
@@ -239,7 +219,7 @@ class Health {
|
|
|
239
219
|
const apiHeaders = {
|
|
240
220
|
"content-type": "application/json"
|
|
241
221
|
};
|
|
242
|
-
return
|
|
222
|
+
return this.client.call(
|
|
243
223
|
"get",
|
|
244
224
|
uri,
|
|
245
225
|
apiHeaders,
|
|
@@ -247,15 +227,13 @@ class Health {
|
|
|
247
227
|
);
|
|
248
228
|
}
|
|
249
229
|
/**
|
|
250
|
-
* Get deletes queue
|
|
251
|
-
*
|
|
252
230
|
* Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.
|
|
253
231
|
*
|
|
254
232
|
* @param {number} threshold
|
|
255
233
|
* @throws {AppwriteException}
|
|
256
234
|
* @returns {Promise<Models.HealthQueue>}
|
|
257
235
|
*/
|
|
258
|
-
|
|
236
|
+
getQueueDeletes(threshold) {
|
|
259
237
|
const apiPath = "/health/queue/deletes";
|
|
260
238
|
const payload = {};
|
|
261
239
|
if (typeof threshold !== "undefined") {
|
|
@@ -265,7 +243,7 @@ class Health {
|
|
|
265
243
|
const apiHeaders = {
|
|
266
244
|
"content-type": "application/json"
|
|
267
245
|
};
|
|
268
|
-
return
|
|
246
|
+
return this.client.call(
|
|
269
247
|
"get",
|
|
270
248
|
uri,
|
|
271
249
|
apiHeaders,
|
|
@@ -273,8 +251,6 @@ class Health {
|
|
|
273
251
|
);
|
|
274
252
|
}
|
|
275
253
|
/**
|
|
276
|
-
* Get number of failed queue jobs
|
|
277
|
-
*
|
|
278
254
|
* Returns the amount of failed jobs in a given queue.
|
|
279
255
|
|
|
280
256
|
*
|
|
@@ -283,7 +259,7 @@ class Health {
|
|
|
283
259
|
* @throws {AppwriteException}
|
|
284
260
|
* @returns {Promise<Models.HealthQueue>}
|
|
285
261
|
*/
|
|
286
|
-
|
|
262
|
+
getFailedJobs(name, threshold) {
|
|
287
263
|
if (typeof name === "undefined") {
|
|
288
264
|
throw new client.AppwriteException('Missing required parameter: "name"');
|
|
289
265
|
}
|
|
@@ -296,7 +272,7 @@ class Health {
|
|
|
296
272
|
const apiHeaders = {
|
|
297
273
|
"content-type": "application/json"
|
|
298
274
|
};
|
|
299
|
-
return
|
|
275
|
+
return this.client.call(
|
|
300
276
|
"get",
|
|
301
277
|
uri,
|
|
302
278
|
apiHeaders,
|
|
@@ -304,15 +280,13 @@ class Health {
|
|
|
304
280
|
);
|
|
305
281
|
}
|
|
306
282
|
/**
|
|
307
|
-
* Get functions queue
|
|
308
|
-
*
|
|
309
283
|
* Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.
|
|
310
284
|
*
|
|
311
285
|
* @param {number} threshold
|
|
312
286
|
* @throws {AppwriteException}
|
|
313
287
|
* @returns {Promise<Models.HealthQueue>}
|
|
314
288
|
*/
|
|
315
|
-
|
|
289
|
+
getQueueFunctions(threshold) {
|
|
316
290
|
const apiPath = "/health/queue/functions";
|
|
317
291
|
const payload = {};
|
|
318
292
|
if (typeof threshold !== "undefined") {
|
|
@@ -322,7 +296,7 @@ class Health {
|
|
|
322
296
|
const apiHeaders = {
|
|
323
297
|
"content-type": "application/json"
|
|
324
298
|
};
|
|
325
|
-
return
|
|
299
|
+
return this.client.call(
|
|
326
300
|
"get",
|
|
327
301
|
uri,
|
|
328
302
|
apiHeaders,
|
|
@@ -330,15 +304,13 @@ class Health {
|
|
|
330
304
|
);
|
|
331
305
|
}
|
|
332
306
|
/**
|
|
333
|
-
* Get logs queue
|
|
334
|
-
*
|
|
335
307
|
* Get the number of logs that are waiting to be processed in the Appwrite internal queue server.
|
|
336
308
|
*
|
|
337
309
|
* @param {number} threshold
|
|
338
310
|
* @throws {AppwriteException}
|
|
339
311
|
* @returns {Promise<Models.HealthQueue>}
|
|
340
312
|
*/
|
|
341
|
-
|
|
313
|
+
getQueueLogs(threshold) {
|
|
342
314
|
const apiPath = "/health/queue/logs";
|
|
343
315
|
const payload = {};
|
|
344
316
|
if (typeof threshold !== "undefined") {
|
|
@@ -348,7 +320,7 @@ class Health {
|
|
|
348
320
|
const apiHeaders = {
|
|
349
321
|
"content-type": "application/json"
|
|
350
322
|
};
|
|
351
|
-
return
|
|
323
|
+
return this.client.call(
|
|
352
324
|
"get",
|
|
353
325
|
uri,
|
|
354
326
|
apiHeaders,
|
|
@@ -356,15 +328,13 @@ class Health {
|
|
|
356
328
|
);
|
|
357
329
|
}
|
|
358
330
|
/**
|
|
359
|
-
* Get mails queue
|
|
360
|
-
*
|
|
361
331
|
* Get the number of mails that are waiting to be processed in the Appwrite internal queue server.
|
|
362
332
|
*
|
|
363
333
|
* @param {number} threshold
|
|
364
334
|
* @throws {AppwriteException}
|
|
365
335
|
* @returns {Promise<Models.HealthQueue>}
|
|
366
336
|
*/
|
|
367
|
-
|
|
337
|
+
getQueueMails(threshold) {
|
|
368
338
|
const apiPath = "/health/queue/mails";
|
|
369
339
|
const payload = {};
|
|
370
340
|
if (typeof threshold !== "undefined") {
|
|
@@ -374,7 +344,7 @@ class Health {
|
|
|
374
344
|
const apiHeaders = {
|
|
375
345
|
"content-type": "application/json"
|
|
376
346
|
};
|
|
377
|
-
return
|
|
347
|
+
return this.client.call(
|
|
378
348
|
"get",
|
|
379
349
|
uri,
|
|
380
350
|
apiHeaders,
|
|
@@ -382,15 +352,13 @@ class Health {
|
|
|
382
352
|
);
|
|
383
353
|
}
|
|
384
354
|
/**
|
|
385
|
-
* Get messaging queue
|
|
386
|
-
*
|
|
387
355
|
* Get the number of messages that are waiting to be processed in the Appwrite internal queue server.
|
|
388
356
|
*
|
|
389
357
|
* @param {number} threshold
|
|
390
358
|
* @throws {AppwriteException}
|
|
391
359
|
* @returns {Promise<Models.HealthQueue>}
|
|
392
360
|
*/
|
|
393
|
-
|
|
361
|
+
getQueueMessaging(threshold) {
|
|
394
362
|
const apiPath = "/health/queue/messaging";
|
|
395
363
|
const payload = {};
|
|
396
364
|
if (typeof threshold !== "undefined") {
|
|
@@ -400,7 +368,7 @@ class Health {
|
|
|
400
368
|
const apiHeaders = {
|
|
401
369
|
"content-type": "application/json"
|
|
402
370
|
};
|
|
403
|
-
return
|
|
371
|
+
return this.client.call(
|
|
404
372
|
"get",
|
|
405
373
|
uri,
|
|
406
374
|
apiHeaders,
|
|
@@ -408,15 +376,13 @@ class Health {
|
|
|
408
376
|
);
|
|
409
377
|
}
|
|
410
378
|
/**
|
|
411
|
-
* Get migrations queue
|
|
412
|
-
*
|
|
413
379
|
* Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.
|
|
414
380
|
*
|
|
415
381
|
* @param {number} threshold
|
|
416
382
|
* @throws {AppwriteException}
|
|
417
383
|
* @returns {Promise<Models.HealthQueue>}
|
|
418
384
|
*/
|
|
419
|
-
|
|
385
|
+
getQueueMigrations(threshold) {
|
|
420
386
|
const apiPath = "/health/queue/migrations";
|
|
421
387
|
const payload = {};
|
|
422
388
|
if (typeof threshold !== "undefined") {
|
|
@@ -426,7 +392,7 @@ class Health {
|
|
|
426
392
|
const apiHeaders = {
|
|
427
393
|
"content-type": "application/json"
|
|
428
394
|
};
|
|
429
|
-
return
|
|
395
|
+
return this.client.call(
|
|
430
396
|
"get",
|
|
431
397
|
uri,
|
|
432
398
|
apiHeaders,
|
|
@@ -434,15 +400,13 @@ class Health {
|
|
|
434
400
|
);
|
|
435
401
|
}
|
|
436
402
|
/**
|
|
437
|
-
* Get usage queue
|
|
438
|
-
*
|
|
439
403
|
* Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.
|
|
440
404
|
*
|
|
441
405
|
* @param {number} threshold
|
|
442
406
|
* @throws {AppwriteException}
|
|
443
407
|
* @returns {Promise<Models.HealthQueue>}
|
|
444
408
|
*/
|
|
445
|
-
|
|
409
|
+
getQueueUsage(threshold) {
|
|
446
410
|
const apiPath = "/health/queue/usage";
|
|
447
411
|
const payload = {};
|
|
448
412
|
if (typeof threshold !== "undefined") {
|
|
@@ -452,7 +416,7 @@ class Health {
|
|
|
452
416
|
const apiHeaders = {
|
|
453
417
|
"content-type": "application/json"
|
|
454
418
|
};
|
|
455
|
-
return
|
|
419
|
+
return this.client.call(
|
|
456
420
|
"get",
|
|
457
421
|
uri,
|
|
458
422
|
apiHeaders,
|
|
@@ -460,15 +424,13 @@ class Health {
|
|
|
460
424
|
);
|
|
461
425
|
}
|
|
462
426
|
/**
|
|
463
|
-
* Get usage dump queue
|
|
464
|
-
*
|
|
465
427
|
* Get the number of projects containing metrics that are waiting to be processed in the Appwrite internal queue server.
|
|
466
428
|
*
|
|
467
429
|
* @param {number} threshold
|
|
468
430
|
* @throws {AppwriteException}
|
|
469
431
|
* @returns {Promise<Models.HealthQueue>}
|
|
470
432
|
*/
|
|
471
|
-
|
|
433
|
+
getQueueUsageDump(threshold) {
|
|
472
434
|
const apiPath = "/health/queue/usage-dump";
|
|
473
435
|
const payload = {};
|
|
474
436
|
if (typeof threshold !== "undefined") {
|
|
@@ -478,7 +440,7 @@ class Health {
|
|
|
478
440
|
const apiHeaders = {
|
|
479
441
|
"content-type": "application/json"
|
|
480
442
|
};
|
|
481
|
-
return
|
|
443
|
+
return this.client.call(
|
|
482
444
|
"get",
|
|
483
445
|
uri,
|
|
484
446
|
apiHeaders,
|
|
@@ -486,15 +448,13 @@ class Health {
|
|
|
486
448
|
);
|
|
487
449
|
}
|
|
488
450
|
/**
|
|
489
|
-
* Get webhooks queue
|
|
490
|
-
*
|
|
491
451
|
* Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.
|
|
492
452
|
*
|
|
493
453
|
* @param {number} threshold
|
|
494
454
|
* @throws {AppwriteException}
|
|
495
455
|
* @returns {Promise<Models.HealthQueue>}
|
|
496
456
|
*/
|
|
497
|
-
|
|
457
|
+
getQueueWebhooks(threshold) {
|
|
498
458
|
const apiPath = "/health/queue/webhooks";
|
|
499
459
|
const payload = {};
|
|
500
460
|
if (typeof threshold !== "undefined") {
|
|
@@ -504,7 +464,7 @@ class Health {
|
|
|
504
464
|
const apiHeaders = {
|
|
505
465
|
"content-type": "application/json"
|
|
506
466
|
};
|
|
507
|
-
return
|
|
467
|
+
return this.client.call(
|
|
508
468
|
"get",
|
|
509
469
|
uri,
|
|
510
470
|
apiHeaders,
|
|
@@ -512,21 +472,19 @@ class Health {
|
|
|
512
472
|
);
|
|
513
473
|
}
|
|
514
474
|
/**
|
|
515
|
-
* Get storage
|
|
516
|
-
*
|
|
517
475
|
* Check the Appwrite storage device is up and connection is successful.
|
|
518
476
|
*
|
|
519
477
|
* @throws {AppwriteException}
|
|
520
478
|
* @returns {Promise<Models.HealthStatus>}
|
|
521
479
|
*/
|
|
522
|
-
|
|
480
|
+
getStorage() {
|
|
523
481
|
const apiPath = "/health/storage";
|
|
524
482
|
const payload = {};
|
|
525
483
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
526
484
|
const apiHeaders = {
|
|
527
485
|
"content-type": "application/json"
|
|
528
486
|
};
|
|
529
|
-
return
|
|
487
|
+
return this.client.call(
|
|
530
488
|
"get",
|
|
531
489
|
uri,
|
|
532
490
|
apiHeaders,
|
|
@@ -534,21 +492,19 @@ class Health {
|
|
|
534
492
|
);
|
|
535
493
|
}
|
|
536
494
|
/**
|
|
537
|
-
* Get local storage
|
|
538
|
-
*
|
|
539
495
|
* Check the Appwrite local storage device is up and connection is successful.
|
|
540
496
|
*
|
|
541
497
|
* @throws {AppwriteException}
|
|
542
498
|
* @returns {Promise<Models.HealthStatus>}
|
|
543
499
|
*/
|
|
544
|
-
|
|
500
|
+
getStorageLocal() {
|
|
545
501
|
const apiPath = "/health/storage/local";
|
|
546
502
|
const payload = {};
|
|
547
503
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
548
504
|
const apiHeaders = {
|
|
549
505
|
"content-type": "application/json"
|
|
550
506
|
};
|
|
551
|
-
return
|
|
507
|
+
return this.client.call(
|
|
552
508
|
"get",
|
|
553
509
|
uri,
|
|
554
510
|
apiHeaders,
|
|
@@ -556,21 +512,19 @@ class Health {
|
|
|
556
512
|
);
|
|
557
513
|
}
|
|
558
514
|
/**
|
|
559
|
-
* Get time
|
|
560
|
-
*
|
|
561
515
|
* 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.
|
|
562
516
|
*
|
|
563
517
|
* @throws {AppwriteException}
|
|
564
518
|
* @returns {Promise<Models.HealthTime>}
|
|
565
519
|
*/
|
|
566
|
-
|
|
520
|
+
getTime() {
|
|
567
521
|
const apiPath = "/health/time";
|
|
568
522
|
const payload = {};
|
|
569
523
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
570
524
|
const apiHeaders = {
|
|
571
525
|
"content-type": "application/json"
|
|
572
526
|
};
|
|
573
|
-
return
|
|
527
|
+
return this.client.call(
|
|
574
528
|
"get",
|
|
575
529
|
uri,
|
|
576
530
|
apiHeaders,
|