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