node-appwrite 17.2.0 → 18.0.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 +67 -2
- package/dist/client.js +3 -3
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +3 -3
- package/dist/client.mjs.map +1 -1
- package/dist/enums/{v-c-s-deployment-type.js → vcs-deployment-type.js} +1 -1
- package/dist/enums/vcs-deployment-type.js.map +1 -0
- package/dist/enums/{v-c-s-deployment-type.mjs → vcs-deployment-type.mjs} +2 -2
- package/dist/enums/vcs-deployment-type.mjs.map +1 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +7 -2
- 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 +717 -58
- package/dist/models.d.ts +717 -58
- package/dist/query.d.mts +70 -0
- package/dist/query.d.ts +70 -0
- package/dist/query.js +70 -0
- package/dist/query.js.map +1 -1
- package/dist/query.mjs +70 -0
- package/dist/query.mjs.map +1 -1
- package/dist/services/account.d.mts +625 -70
- package/dist/services/account.d.ts +625 -70
- package/dist/services/account.js +592 -292
- package/dist/services/account.js.map +1 -1
- package/dist/services/account.mjs +592 -292
- package/dist/services/account.mjs.map +1 -1
- package/dist/services/avatars.d.mts +157 -26
- package/dist/services/avatars.d.ts +157 -26
- package/dist/services/avatars.js +104 -93
- package/dist/services/avatars.js.map +1 -1
- package/dist/services/avatars.mjs +104 -93
- package/dist/services/avatars.mjs.map +1 -1
- package/dist/services/databases.d.mts +1224 -248
- package/dist/services/databases.d.ts +1224 -248
- package/dist/services/databases.js +877 -611
- package/dist/services/databases.js.map +1 -1
- package/dist/services/databases.mjs +877 -611
- package/dist/services/databases.mjs.map +1 -1
- package/dist/services/functions.d.mts +530 -107
- package/dist/services/functions.d.ts +530 -107
- package/dist/services/functions.js +393 -276
- package/dist/services/functions.js.map +1 -1
- package/dist/services/functions.mjs +393 -276
- package/dist/services/functions.mjs.map +1 -1
- package/dist/services/graphql.d.mts +24 -2
- package/dist/services/graphql.d.ts +24 -2
- package/dist/services/graphql.js +20 -16
- package/dist/services/graphql.js.map +1 -1
- package/dist/services/graphql.mjs +20 -16
- package/dist/services/graphql.mjs.map +1 -1
- package/dist/services/health.d.mts +175 -16
- package/dist/services/health.d.ts +175 -16
- package/dist/services/health.js +144 -115
- package/dist/services/health.js.map +1 -1
- package/dist/services/health.mjs +144 -115
- package/dist/services/health.mjs.map +1 -1
- package/dist/services/locale.js.map +1 -1
- package/dist/services/locale.mjs.map +1 -1
- package/dist/services/messaging.d.mts +1544 -262
- package/dist/services/messaging.d.ts +1544 -262
- package/dist/services/messaging.js +1417 -592
- package/dist/services/messaging.js.map +1 -1
- package/dist/services/messaging.mjs +1417 -592
- package/dist/services/messaging.mjs.map +1 -1
- package/dist/services/sites.d.mts +495 -99
- package/dist/services/sites.d.ts +495 -99
- package/dist/services/sites.js +371 -258
- package/dist/services/sites.js.map +1 -1
- package/dist/services/sites.mjs +371 -258
- package/dist/services/sites.mjs.map +1 -1
- package/dist/services/storage.d.mts +306 -63
- package/dist/services/storage.d.ts +306 -63
- package/dist/services/storage.js +225 -158
- package/dist/services/storage.js.map +1 -1
- package/dist/services/storage.mjs +225 -158
- package/dist/services/storage.mjs.map +1 -1
- package/dist/services/tables-db.d.mts +1549 -0
- package/dist/services/tables-db.d.ts +1549 -0
- package/dist/services/tables-db.js +2374 -0
- package/dist/services/tables-db.js.map +1 -0
- package/dist/services/tables-db.mjs +2373 -0
- package/dist/services/tables-db.mjs.map +1 -0
- package/dist/services/teams.d.mts +233 -39
- package/dist/services/teams.d.ts +233 -39
- package/dist/services/teams.js +170 -135
- package/dist/services/teams.js.map +1 -1
- package/dist/services/teams.mjs +170 -135
- package/dist/services/teams.mjs.map +1 -1
- package/dist/services/tokens.d.mts +76 -11
- package/dist/services/tokens.d.ts +76 -11
- package/dist/services/tokens.js +60 -45
- package/dist/services/tokens.js.map +1 -1
- package/dist/services/tokens.mjs +60 -45
- package/dist/services/tokens.mjs.map +1 -1
- package/dist/services/users.d.mts +842 -115
- package/dist/services/users.d.ts +842 -115
- package/dist/services/users.js +719 -408
- package/dist/services/users.js.map +1 -1
- package/dist/services/users.mjs +719 -408
- package/dist/services/users.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/enums/v-c-s-deployment-type.js.map +0 -1
- package/dist/enums/v-c-s-deployment-type.mjs.map +0 -1
- /package/dist/enums/{v-c-s-deployment-type.d.mts → vcs-deployment-type.d.mts} +0 -0
- /package/dist/enums/{v-c-s-deployment-type.d.ts → vcs-deployment-type.d.ts} +0 -0
package/dist/services/health.js
CHANGED
|
@@ -60,14 +60,16 @@ class Health {
|
|
|
60
60
|
payload
|
|
61
61
|
);
|
|
62
62
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
getCertificate(paramsOrFirst) {
|
|
64
|
+
let params;
|
|
65
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
66
|
+
params = paramsOrFirst || {};
|
|
67
|
+
} else {
|
|
68
|
+
params = {
|
|
69
|
+
domain: paramsOrFirst
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const domain = params.domain;
|
|
71
73
|
const apiPath = "/health/certificate";
|
|
72
74
|
const payload = {};
|
|
73
75
|
if (typeof domain !== "undefined") {
|
|
@@ -118,14 +120,16 @@ class Health {
|
|
|
118
120
|
payload
|
|
119
121
|
);
|
|
120
122
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
getQueueBuilds(paramsOrFirst) {
|
|
124
|
+
let params;
|
|
125
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
126
|
+
params = paramsOrFirst || {};
|
|
127
|
+
} else {
|
|
128
|
+
params = {
|
|
129
|
+
threshold: paramsOrFirst
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
const threshold = params.threshold;
|
|
129
133
|
const apiPath = "/health/queue/builds";
|
|
130
134
|
const payload = {};
|
|
131
135
|
if (typeof threshold !== "undefined") {
|
|
@@ -140,14 +144,16 @@ class Health {
|
|
|
140
144
|
payload
|
|
141
145
|
);
|
|
142
146
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
getQueueCertificates(paramsOrFirst) {
|
|
148
|
+
let params;
|
|
149
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
150
|
+
params = paramsOrFirst || {};
|
|
151
|
+
} else {
|
|
152
|
+
params = {
|
|
153
|
+
threshold: paramsOrFirst
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
const threshold = params.threshold;
|
|
151
157
|
const apiPath = "/health/queue/certificates";
|
|
152
158
|
const payload = {};
|
|
153
159
|
if (typeof threshold !== "undefined") {
|
|
@@ -162,15 +168,18 @@ class Health {
|
|
|
162
168
|
payload
|
|
163
169
|
);
|
|
164
170
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
getQueueDatabases(paramsOrFirst, ...rest) {
|
|
172
|
+
let params;
|
|
173
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
174
|
+
params = paramsOrFirst || {};
|
|
175
|
+
} else {
|
|
176
|
+
params = {
|
|
177
|
+
name: paramsOrFirst,
|
|
178
|
+
threshold: rest[0]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
const name = params.name;
|
|
182
|
+
const threshold = params.threshold;
|
|
174
183
|
const apiPath = "/health/queue/databases";
|
|
175
184
|
const payload = {};
|
|
176
185
|
if (typeof name !== "undefined") {
|
|
@@ -188,14 +197,16 @@ class Health {
|
|
|
188
197
|
payload
|
|
189
198
|
);
|
|
190
199
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
200
|
+
getQueueDeletes(paramsOrFirst) {
|
|
201
|
+
let params;
|
|
202
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
203
|
+
params = paramsOrFirst || {};
|
|
204
|
+
} else {
|
|
205
|
+
params = {
|
|
206
|
+
threshold: paramsOrFirst
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
const threshold = params.threshold;
|
|
199
210
|
const apiPath = "/health/queue/deletes";
|
|
200
211
|
const payload = {};
|
|
201
212
|
if (typeof threshold !== "undefined") {
|
|
@@ -210,16 +221,18 @@ class Health {
|
|
|
210
221
|
payload
|
|
211
222
|
);
|
|
212
223
|
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
224
|
+
getFailedJobs(paramsOrFirst, ...rest) {
|
|
225
|
+
let params;
|
|
226
|
+
if (paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst) && "name" in paramsOrFirst) {
|
|
227
|
+
params = paramsOrFirst || {};
|
|
228
|
+
} else {
|
|
229
|
+
params = {
|
|
230
|
+
name: paramsOrFirst,
|
|
231
|
+
threshold: rest[0]
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
const name = params.name;
|
|
235
|
+
const threshold = params.threshold;
|
|
223
236
|
if (typeof name === "undefined") {
|
|
224
237
|
throw new client.AppwriteException('Missing required parameter: "name"');
|
|
225
238
|
}
|
|
@@ -237,14 +250,16 @@ class Health {
|
|
|
237
250
|
payload
|
|
238
251
|
);
|
|
239
252
|
}
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
253
|
+
getQueueFunctions(paramsOrFirst) {
|
|
254
|
+
let params;
|
|
255
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
256
|
+
params = paramsOrFirst || {};
|
|
257
|
+
} else {
|
|
258
|
+
params = {
|
|
259
|
+
threshold: paramsOrFirst
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
const threshold = params.threshold;
|
|
248
263
|
const apiPath = "/health/queue/functions";
|
|
249
264
|
const payload = {};
|
|
250
265
|
if (typeof threshold !== "undefined") {
|
|
@@ -259,14 +274,16 @@ class Health {
|
|
|
259
274
|
payload
|
|
260
275
|
);
|
|
261
276
|
}
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
277
|
+
getQueueLogs(paramsOrFirst) {
|
|
278
|
+
let params;
|
|
279
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
280
|
+
params = paramsOrFirst || {};
|
|
281
|
+
} else {
|
|
282
|
+
params = {
|
|
283
|
+
threshold: paramsOrFirst
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
const threshold = params.threshold;
|
|
270
287
|
const apiPath = "/health/queue/logs";
|
|
271
288
|
const payload = {};
|
|
272
289
|
if (typeof threshold !== "undefined") {
|
|
@@ -281,14 +298,16 @@ class Health {
|
|
|
281
298
|
payload
|
|
282
299
|
);
|
|
283
300
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
301
|
+
getQueueMails(paramsOrFirst) {
|
|
302
|
+
let params;
|
|
303
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
304
|
+
params = paramsOrFirst || {};
|
|
305
|
+
} else {
|
|
306
|
+
params = {
|
|
307
|
+
threshold: paramsOrFirst
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
const threshold = params.threshold;
|
|
292
311
|
const apiPath = "/health/queue/mails";
|
|
293
312
|
const payload = {};
|
|
294
313
|
if (typeof threshold !== "undefined") {
|
|
@@ -303,14 +322,16 @@ class Health {
|
|
|
303
322
|
payload
|
|
304
323
|
);
|
|
305
324
|
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
325
|
+
getQueueMessaging(paramsOrFirst) {
|
|
326
|
+
let params;
|
|
327
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
328
|
+
params = paramsOrFirst || {};
|
|
329
|
+
} else {
|
|
330
|
+
params = {
|
|
331
|
+
threshold: paramsOrFirst
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
const threshold = params.threshold;
|
|
314
335
|
const apiPath = "/health/queue/messaging";
|
|
315
336
|
const payload = {};
|
|
316
337
|
if (typeof threshold !== "undefined") {
|
|
@@ -325,14 +346,16 @@ class Health {
|
|
|
325
346
|
payload
|
|
326
347
|
);
|
|
327
348
|
}
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
349
|
+
getQueueMigrations(paramsOrFirst) {
|
|
350
|
+
let params;
|
|
351
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
352
|
+
params = paramsOrFirst || {};
|
|
353
|
+
} else {
|
|
354
|
+
params = {
|
|
355
|
+
threshold: paramsOrFirst
|
|
356
|
+
};
|
|
357
|
+
}
|
|
358
|
+
const threshold = params.threshold;
|
|
336
359
|
const apiPath = "/health/queue/migrations";
|
|
337
360
|
const payload = {};
|
|
338
361
|
if (typeof threshold !== "undefined") {
|
|
@@ -347,14 +370,16 @@ class Health {
|
|
|
347
370
|
payload
|
|
348
371
|
);
|
|
349
372
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
373
|
+
getQueueStatsResources(paramsOrFirst) {
|
|
374
|
+
let params;
|
|
375
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
376
|
+
params = paramsOrFirst || {};
|
|
377
|
+
} else {
|
|
378
|
+
params = {
|
|
379
|
+
threshold: paramsOrFirst
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
const threshold = params.threshold;
|
|
358
383
|
const apiPath = "/health/queue/stats-resources";
|
|
359
384
|
const payload = {};
|
|
360
385
|
if (typeof threshold !== "undefined") {
|
|
@@ -369,14 +394,16 @@ class Health {
|
|
|
369
394
|
payload
|
|
370
395
|
);
|
|
371
396
|
}
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
397
|
+
getQueueUsage(paramsOrFirst) {
|
|
398
|
+
let params;
|
|
399
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
400
|
+
params = paramsOrFirst || {};
|
|
401
|
+
} else {
|
|
402
|
+
params = {
|
|
403
|
+
threshold: paramsOrFirst
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
const threshold = params.threshold;
|
|
380
407
|
const apiPath = "/health/queue/stats-usage";
|
|
381
408
|
const payload = {};
|
|
382
409
|
if (typeof threshold !== "undefined") {
|
|
@@ -391,14 +418,16 @@ class Health {
|
|
|
391
418
|
payload
|
|
392
419
|
);
|
|
393
420
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
421
|
+
getQueueWebhooks(paramsOrFirst) {
|
|
422
|
+
let params;
|
|
423
|
+
if (!paramsOrFirst || paramsOrFirst && typeof paramsOrFirst === "object" && !Array.isArray(paramsOrFirst)) {
|
|
424
|
+
params = paramsOrFirst || {};
|
|
425
|
+
} else {
|
|
426
|
+
params = {
|
|
427
|
+
threshold: paramsOrFirst
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
const threshold = params.threshold;
|
|
402
431
|
const apiPath = "/health/queue/webhooks";
|
|
403
432
|
const payload = {};
|
|
404
433
|
if (typeof threshold !== "undefined") {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/services/health.ts"],"names":[],"mappings":"AAAA,SAAS,yBAA+D;AAIjE,MAAM,OAAO;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAoC;AAChC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,eAAgD;AAC5C,UAAM,UAAU;AAChB,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jD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,aAA2C;AACvC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,kBAAgD;AAC5C,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,UAAsC;AAClC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,KAAK,OAAO;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ","sourcesContent":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\nimport { Name } from '../enums/name';\n\nexport class Health {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Check the Appwrite HTTP server is up and responsive.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n get(): Promise<Models.HealthStatus> {\n const apiPath = '/health';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite Antivirus server is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthAntivirus>}\n */\n getAntivirus(): Promise<Models.HealthAntivirus> {\n const apiPath = '/health/anti-virus';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite in-memory cache servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getCache(): Promise<Models.HealthStatus> {\n const apiPath = '/health/cache';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the SSL certificate for a domain\n *\n * @param {string} domain\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthCertificate>}\n */\n getCertificate(domain?: string): Promise<Models.HealthCertificate> {\n const apiPath = '/health/certificate';\n const payload: Payload = {};\n if (typeof domain !== 'undefined') {\n payload['domain'] = domain;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite database servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getDB(): Promise<Models.HealthStatus> {\n const apiPath = '/health/db';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite pub-sub servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getPubSub(): Promise<Models.HealthStatus> {\n const apiPath = '/health/pubsub';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of builds that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueBuilds(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/builds';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueCertificates(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/certificates';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {string} name\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueDatabases(name?: string, threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/databases';\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueDeletes(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/deletes';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Returns the amount of failed jobs in a given queue.\n * \n *\n * @param {Name} name\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getFailedJobs(name: Name, threshold?: number): Promise<Models.HealthQueue> {\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueFunctions(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/functions';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of logs that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueLogs(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/logs';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of mails that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMails(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/mails';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of messages that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMessaging(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/messaging';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMigrations(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/migrations';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueStatsResources(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/stats-resources';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueUsage(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/stats-usage';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueWebhooks(threshold?: number): Promise<Models.HealthQueue> {\n const apiPath = '/health/queue/webhooks';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite storage device is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getStorage(): Promise<Models.HealthStatus> {\n const apiPath = '/health/storage';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite local storage device is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getStorageLocal(): Promise<Models.HealthStatus> {\n const apiPath = '/health/storage/local';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthTime>}\n */\n getTime(): Promise<Models.HealthTime> {\n const apiPath = '/health/time';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/services/health.ts"],"names":[],"mappings":"AAAA,SAAS,yBAA+D;AAKjE,MAAM,OAAO;AAAA,EAGhB,YAAY,QAAgB;AACxB,SAAK,SAAS;AAAA,EAClB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQA,MAAoC;AAEhC,UAAM,UAAU;AAChB,UAAM,UAAmB,CAAC;AAC1B,UAAM,MAAM,IAAI,IAAI,KAAK,OAAO,OAAO,WAAW,OAAO;AAEzD,UAAM,aAA2C,CACjD;AAEA,WAAO,K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":["import { AppwriteException, Client, type Payload, UploadProgress } from '../client';\nimport type { Models } from '../models';\n\nimport { Name } from '../enums/name';\n\nexport class Health {\n client: Client;\n\n constructor(client: Client) {\n this.client = client;\n }\n\n /**\n * Check the Appwrite HTTP server is up and responsive.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n get(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite Antivirus server is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthAntivirus>}\n */\n getAntivirus(): Promise<Models.HealthAntivirus> {\n\n const apiPath = '/health/anti-virus';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite in-memory cache servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getCache(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/cache';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the SSL certificate for a domain\n *\n * @param {string} params.domain - string\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthCertificate>}\n */\n getCertificate(params?: { domain?: string }): Promise<Models.HealthCertificate>;\n /**\n * Get the SSL certificate for a domain\n *\n * @param {string} domain - string\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthCertificate>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getCertificate(domain?: string): Promise<Models.HealthCertificate>;\n getCertificate(\n paramsOrFirst?: { domain?: string } | string \n ): Promise<Models.HealthCertificate> {\n let params: { domain?: string };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { domain?: string };\n } else {\n params = {\n domain: paramsOrFirst as string \n };\n }\n \n const domain = params.domain;\n\n\n const apiPath = '/health/certificate';\n const payload: Payload = {};\n if (typeof domain !== 'undefined') {\n payload['domain'] = domain;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite database servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getDB(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/db';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite pub-sub servers are up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getPubSub(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/pubsub';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of builds that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueBuilds(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of builds that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueBuilds(threshold?: number): Promise<Models.HealthQueue>;\n getQueueBuilds(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/builds';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueCertificates(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of certificates that are waiting to be issued against [Letsencrypt](https://letsencrypt.org/) in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueCertificates(threshold?: number): Promise<Models.HealthQueue>;\n getQueueCertificates(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/certificates';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {string} params.name - Queue name for which to check the queue size\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueDatabases(params?: { name?: string, threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of database changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {string} name - Queue name for which to check the queue size\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueDatabases(name?: string, threshold?: number): Promise<Models.HealthQueue>;\n getQueueDatabases(\n paramsOrFirst?: { name?: string, threshold?: number } | string,\n ...rest: [(number)?] \n ): Promise<Models.HealthQueue> {\n let params: { name?: string, threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { name?: string, threshold?: number };\n } else {\n params = {\n name: paramsOrFirst as string,\n threshold: rest[0] as number \n };\n }\n \n const name = params.name;\n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/databases';\n const payload: Payload = {};\n if (typeof name !== 'undefined') {\n payload['name'] = name;\n }\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueDeletes(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of background destructive changes that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueDeletes(threshold?: number): Promise<Models.HealthQueue>;\n getQueueDeletes(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/deletes';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Returns the amount of failed jobs in a given queue.\n * \n *\n * @param {Name} params.name - The name of the queue\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getFailedJobs(params: { name: Name, threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Returns the amount of failed jobs in a given queue.\n * \n *\n * @param {Name} name - The name of the queue\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getFailedJobs(name: Name, threshold?: number): Promise<Models.HealthQueue>;\n getFailedJobs(\n paramsOrFirst: { name: Name, threshold?: number } | Name,\n ...rest: [(number)?] \n ): Promise<Models.HealthQueue> {\n let params: { name: Name, threshold?: number };\n \n if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && 'name' in paramsOrFirst)) {\n params = (paramsOrFirst || {}) as { name: Name, threshold?: number };\n } else {\n params = {\n name: paramsOrFirst as Name,\n threshold: rest[0] as number \n };\n }\n \n const name = params.name;\n const threshold = params.threshold;\n\n if (typeof name === 'undefined') {\n throw new AppwriteException('Missing required parameter: \"name\"');\n }\n\n const apiPath = '/health/queue/failed/{name}'.replace('{name}', name);\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueFunctions(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of function executions that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueFunctions(threshold?: number): Promise<Models.HealthQueue>;\n getQueueFunctions(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/functions';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of logs that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueLogs(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of logs that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueLogs(threshold?: number): Promise<Models.HealthQueue>;\n getQueueLogs(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/logs';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of mails that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMails(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of mails that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueMails(threshold?: number): Promise<Models.HealthQueue>;\n getQueueMails(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/mails';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of messages that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMessaging(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of messages that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueMessaging(threshold?: number): Promise<Models.HealthQueue>;\n getQueueMessaging(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/messaging';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueMigrations(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of migrations that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueMigrations(threshold?: number): Promise<Models.HealthQueue>;\n getQueueMigrations(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/migrations';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueStatsResources(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite stats resources queue.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueStatsResources(threshold?: number): Promise<Models.HealthQueue>;\n getQueueStatsResources(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/stats-resources';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueUsage(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of metrics that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueUsage(threshold?: number): Promise<Models.HealthQueue>;\n getQueueUsage(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/stats-usage';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} params.threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n */\n getQueueWebhooks(params?: { threshold?: number }): Promise<Models.HealthQueue>;\n /**\n * Get the number of webhooks that are waiting to be processed in the Appwrite internal queue server.\n *\n * @param {number} threshold - Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthQueue>}\n * @deprecated Use the object parameter style method for a better developer experience.\n */\n getQueueWebhooks(threshold?: number): Promise<Models.HealthQueue>;\n getQueueWebhooks(\n paramsOrFirst?: { threshold?: number } | number \n ): Promise<Models.HealthQueue> {\n let params: { threshold?: number };\n \n if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {\n params = (paramsOrFirst || {}) as { threshold?: number };\n } else {\n params = {\n threshold: paramsOrFirst as number \n };\n }\n \n const threshold = params.threshold;\n\n\n const apiPath = '/health/queue/webhooks';\n const payload: Payload = {};\n if (typeof threshold !== 'undefined') {\n payload['threshold'] = threshold;\n }\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite storage device is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getStorage(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/storage';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * Check the Appwrite local storage device is up and connection is successful.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthStatus>}\n */\n getStorageLocal(): Promise<Models.HealthStatus> {\n\n const apiPath = '/health/storage/local';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n\n /**\n * 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.\n *\n * @throws {AppwriteException}\n * @returns {Promise<Models.HealthTime>}\n */\n getTime(): Promise<Models.HealthTime> {\n\n const apiPath = '/health/time';\n const payload: Payload = {};\n const uri = new URL(this.client.config.endpoint + apiPath);\n\n const apiHeaders: { [header: string]: string } = {\n }\n\n return this.client.call(\n 'get',\n uri,\n apiHeaders,\n payload,\n );\n }\n}\n"]}
|