appwrite-cli 5.0.3 → 6.0.0-rc.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/README.md +4 -4
- package/docs/examples/functions/create-build.md +1 -1
- package/docs/examples/functions/create-execution.md +1 -0
- package/docs/examples/functions/create.md +1 -0
- package/docs/examples/functions/delete-execution.md +3 -0
- package/docs/examples/functions/update-deployment-build.md +3 -0
- package/docs/examples/functions/update.md +1 -0
- package/docs/examples/messaging/update-email.md +1 -0
- package/docs/examples/projects/create-j-w-t.md +4 -0
- package/docs/examples/projects/update-mock-numbers.md +3 -0
- package/docs/examples/projects/update-session-alerts.md +3 -0
- package/docs/examples/users/create-j-w-t.md +4 -0
- package/docs/examples/vcs/get-repository-contents.md +4 -0
- package/index.js +34 -7
- package/install.ps1 +3 -3
- package/install.sh +2 -2
- package/lib/client.js +19 -5
- package/lib/commands/account.js +307 -153
- package/lib/commands/assistant.js +8 -5
- package/lib/commands/avatars.js +116 -60
- package/lib/commands/console.js +8 -5
- package/lib/commands/databases.js +353 -164
- package/lib/commands/functions.js +310 -100
- package/lib/commands/generic.js +206 -54
- package/lib/commands/graphql.js +14 -8
- package/lib/commands/health.js +140 -71
- package/lib/commands/init.js +250 -155
- package/lib/commands/locale.js +50 -26
- package/lib/commands/messaging.js +363 -179
- package/lib/commands/migrations.js +98 -50
- package/lib/commands/project.js +38 -20
- package/lib/commands/projects.js +449 -144
- package/lib/commands/proxy.js +32 -17
- package/lib/commands/pull.js +231 -0
- package/lib/commands/push.js +1518 -0
- package/lib/commands/run.js +282 -0
- package/lib/commands/storage.js +160 -76
- package/lib/commands/teams.js +102 -50
- package/lib/commands/users.js +325 -135
- package/lib/commands/vcs.js +102 -29
- package/lib/config.js +190 -18
- package/lib/emulation/docker.js +187 -0
- package/lib/emulation/utils.js +177 -0
- package/lib/id.js +30 -0
- package/lib/paginate.js +1 -2
- package/lib/parser.js +69 -12
- package/lib/questions.js +462 -84
- package/lib/sdks.js +1 -1
- package/lib/spinner.js +103 -0
- package/lib/utils.js +248 -3
- package/lib/validations.js +17 -0
- package/package.json +6 -2
- package/scoop/appwrite.json +3 -3
- package/lib/commands/deploy.js +0 -941
package/lib/commands/health.js
CHANGED
|
@@ -4,7 +4,7 @@ const tar = require("tar");
|
|
|
4
4
|
const ignore = require("ignore");
|
|
5
5
|
const { promisify } = require('util');
|
|
6
6
|
const libClient = require('../client.js');
|
|
7
|
-
const { getAllFiles } = require('../utils.js');
|
|
7
|
+
const { getAllFiles, showConsoleLink } = require('../utils.js');
|
|
8
8
|
const { Command } = require('commander');
|
|
9
9
|
const { sdkForProject, sdkForConsole } = require('../sdks')
|
|
10
10
|
const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
|
|
@@ -41,6 +41,7 @@ const health = new Command("health").description(commandDescriptions['health']).
|
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* @typedef {Object} HealthGetRequestParams
|
|
44
|
+
* @property {boolean} overrideForCli
|
|
44
45
|
* @property {boolean} parseOutput
|
|
45
46
|
* @property {libClient | undefined} sdk
|
|
46
47
|
*/
|
|
@@ -48,8 +49,9 @@ const health = new Command("health").description(commandDescriptions['health']).
|
|
|
48
49
|
/**
|
|
49
50
|
* @param {HealthGetRequestParams} params
|
|
50
51
|
*/
|
|
51
|
-
const healthGet = async ({
|
|
52
|
-
let client = !sdk ? await sdkForProject() :
|
|
52
|
+
const healthGet = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
53
|
+
let client = !sdk ? await sdkForProject() :
|
|
54
|
+
sdk;
|
|
53
55
|
let apiPath = '/health';
|
|
54
56
|
let payload = {};
|
|
55
57
|
|
|
@@ -63,12 +65,14 @@ const healthGet = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
63
65
|
parse(response)
|
|
64
66
|
success()
|
|
65
67
|
}
|
|
66
|
-
|
|
68
|
+
|
|
67
69
|
return response;
|
|
70
|
+
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
/**
|
|
71
74
|
* @typedef {Object} HealthGetAntivirusRequestParams
|
|
75
|
+
* @property {boolean} overrideForCli
|
|
72
76
|
* @property {boolean} parseOutput
|
|
73
77
|
* @property {libClient | undefined} sdk
|
|
74
78
|
*/
|
|
@@ -76,8 +80,9 @@ const healthGet = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
76
80
|
/**
|
|
77
81
|
* @param {HealthGetAntivirusRequestParams} params
|
|
78
82
|
*/
|
|
79
|
-
const healthGetAntivirus = async ({
|
|
80
|
-
let client = !sdk ? await sdkForProject() :
|
|
83
|
+
const healthGetAntivirus = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
84
|
+
let client = !sdk ? await sdkForProject() :
|
|
85
|
+
sdk;
|
|
81
86
|
let apiPath = '/health/anti-virus';
|
|
82
87
|
let payload = {};
|
|
83
88
|
|
|
@@ -91,12 +96,14 @@ const healthGetAntivirus = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
91
96
|
parse(response)
|
|
92
97
|
success()
|
|
93
98
|
}
|
|
94
|
-
|
|
99
|
+
|
|
95
100
|
return response;
|
|
101
|
+
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
/**
|
|
99
105
|
* @typedef {Object} HealthGetCacheRequestParams
|
|
106
|
+
* @property {boolean} overrideForCli
|
|
100
107
|
* @property {boolean} parseOutput
|
|
101
108
|
* @property {libClient | undefined} sdk
|
|
102
109
|
*/
|
|
@@ -104,8 +111,9 @@ const healthGetAntivirus = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
104
111
|
/**
|
|
105
112
|
* @param {HealthGetCacheRequestParams} params
|
|
106
113
|
*/
|
|
107
|
-
const healthGetCache = async ({
|
|
108
|
-
let client = !sdk ? await sdkForProject() :
|
|
114
|
+
const healthGetCache = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
115
|
+
let client = !sdk ? await sdkForProject() :
|
|
116
|
+
sdk;
|
|
109
117
|
let apiPath = '/health/cache';
|
|
110
118
|
let payload = {};
|
|
111
119
|
|
|
@@ -119,13 +127,15 @@ const healthGetCache = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
119
127
|
parse(response)
|
|
120
128
|
success()
|
|
121
129
|
}
|
|
122
|
-
|
|
130
|
+
|
|
123
131
|
return response;
|
|
132
|
+
|
|
124
133
|
}
|
|
125
134
|
|
|
126
135
|
/**
|
|
127
136
|
* @typedef {Object} HealthGetCertificateRequestParams
|
|
128
137
|
* @property {string} domain string
|
|
138
|
+
* @property {boolean} overrideForCli
|
|
129
139
|
* @property {boolean} parseOutput
|
|
130
140
|
* @property {libClient | undefined} sdk
|
|
131
141
|
*/
|
|
@@ -133,8 +143,9 @@ const healthGetCache = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
133
143
|
/**
|
|
134
144
|
* @param {HealthGetCertificateRequestParams} params
|
|
135
145
|
*/
|
|
136
|
-
const healthGetCertificate = async ({
|
|
137
|
-
let client = !sdk ? await sdkForProject() :
|
|
146
|
+
const healthGetCertificate = async ({domain,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
147
|
+
let client = !sdk ? await sdkForProject() :
|
|
148
|
+
sdk;
|
|
138
149
|
let apiPath = '/health/certificate';
|
|
139
150
|
let payload = {};
|
|
140
151
|
if (typeof domain !== 'undefined') {
|
|
@@ -151,12 +162,14 @@ const healthGetCertificate = async ({ domain, parseOutput = true, sdk = undefine
|
|
|
151
162
|
parse(response)
|
|
152
163
|
success()
|
|
153
164
|
}
|
|
154
|
-
|
|
165
|
+
|
|
155
166
|
return response;
|
|
167
|
+
|
|
156
168
|
}
|
|
157
169
|
|
|
158
170
|
/**
|
|
159
171
|
* @typedef {Object} HealthGetDBRequestParams
|
|
172
|
+
* @property {boolean} overrideForCli
|
|
160
173
|
* @property {boolean} parseOutput
|
|
161
174
|
* @property {libClient | undefined} sdk
|
|
162
175
|
*/
|
|
@@ -164,8 +177,9 @@ const healthGetCertificate = async ({ domain, parseOutput = true, sdk = undefine
|
|
|
164
177
|
/**
|
|
165
178
|
* @param {HealthGetDBRequestParams} params
|
|
166
179
|
*/
|
|
167
|
-
const healthGetDB = async ({
|
|
168
|
-
let client = !sdk ? await sdkForProject() :
|
|
180
|
+
const healthGetDB = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
181
|
+
let client = !sdk ? await sdkForProject() :
|
|
182
|
+
sdk;
|
|
169
183
|
let apiPath = '/health/db';
|
|
170
184
|
let payload = {};
|
|
171
185
|
|
|
@@ -179,12 +193,14 @@ const healthGetDB = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
179
193
|
parse(response)
|
|
180
194
|
success()
|
|
181
195
|
}
|
|
182
|
-
|
|
196
|
+
|
|
183
197
|
return response;
|
|
198
|
+
|
|
184
199
|
}
|
|
185
200
|
|
|
186
201
|
/**
|
|
187
202
|
* @typedef {Object} HealthGetPubSubRequestParams
|
|
203
|
+
* @property {boolean} overrideForCli
|
|
188
204
|
* @property {boolean} parseOutput
|
|
189
205
|
* @property {libClient | undefined} sdk
|
|
190
206
|
*/
|
|
@@ -192,8 +208,9 @@ const healthGetDB = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
192
208
|
/**
|
|
193
209
|
* @param {HealthGetPubSubRequestParams} params
|
|
194
210
|
*/
|
|
195
|
-
const healthGetPubSub = async ({
|
|
196
|
-
let client = !sdk ? await sdkForProject() :
|
|
211
|
+
const healthGetPubSub = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
212
|
+
let client = !sdk ? await sdkForProject() :
|
|
213
|
+
sdk;
|
|
197
214
|
let apiPath = '/health/pubsub';
|
|
198
215
|
let payload = {};
|
|
199
216
|
|
|
@@ -207,12 +224,14 @@ const healthGetPubSub = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
207
224
|
parse(response)
|
|
208
225
|
success()
|
|
209
226
|
}
|
|
210
|
-
|
|
227
|
+
|
|
211
228
|
return response;
|
|
229
|
+
|
|
212
230
|
}
|
|
213
231
|
|
|
214
232
|
/**
|
|
215
233
|
* @typedef {Object} HealthGetQueueRequestParams
|
|
234
|
+
* @property {boolean} overrideForCli
|
|
216
235
|
* @property {boolean} parseOutput
|
|
217
236
|
* @property {libClient | undefined} sdk
|
|
218
237
|
*/
|
|
@@ -220,8 +239,9 @@ const healthGetPubSub = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
220
239
|
/**
|
|
221
240
|
* @param {HealthGetQueueRequestParams} params
|
|
222
241
|
*/
|
|
223
|
-
const healthGetQueue = async ({
|
|
224
|
-
let client = !sdk ? await sdkForProject() :
|
|
242
|
+
const healthGetQueue = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
243
|
+
let client = !sdk ? await sdkForProject() :
|
|
244
|
+
sdk;
|
|
225
245
|
let apiPath = '/health/queue';
|
|
226
246
|
let payload = {};
|
|
227
247
|
|
|
@@ -235,13 +255,15 @@ const healthGetQueue = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
235
255
|
parse(response)
|
|
236
256
|
success()
|
|
237
257
|
}
|
|
238
|
-
|
|
258
|
+
|
|
239
259
|
return response;
|
|
260
|
+
|
|
240
261
|
}
|
|
241
262
|
|
|
242
263
|
/**
|
|
243
264
|
* @typedef {Object} HealthGetQueueBuildsRequestParams
|
|
244
265
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
266
|
+
* @property {boolean} overrideForCli
|
|
245
267
|
* @property {boolean} parseOutput
|
|
246
268
|
* @property {libClient | undefined} sdk
|
|
247
269
|
*/
|
|
@@ -249,8 +271,9 @@ const healthGetQueue = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
249
271
|
/**
|
|
250
272
|
* @param {HealthGetQueueBuildsRequestParams} params
|
|
251
273
|
*/
|
|
252
|
-
const healthGetQueueBuilds = async ({
|
|
253
|
-
let client = !sdk ? await sdkForProject() :
|
|
274
|
+
const healthGetQueueBuilds = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
275
|
+
let client = !sdk ? await sdkForProject() :
|
|
276
|
+
sdk;
|
|
254
277
|
let apiPath = '/health/queue/builds';
|
|
255
278
|
let payload = {};
|
|
256
279
|
if (typeof threshold !== 'undefined') {
|
|
@@ -267,13 +290,15 @@ const healthGetQueueBuilds = async ({ threshold, parseOutput = true, sdk = undef
|
|
|
267
290
|
parse(response)
|
|
268
291
|
success()
|
|
269
292
|
}
|
|
270
|
-
|
|
293
|
+
|
|
271
294
|
return response;
|
|
295
|
+
|
|
272
296
|
}
|
|
273
297
|
|
|
274
298
|
/**
|
|
275
299
|
* @typedef {Object} HealthGetQueueCertificatesRequestParams
|
|
276
300
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
301
|
+
* @property {boolean} overrideForCli
|
|
277
302
|
* @property {boolean} parseOutput
|
|
278
303
|
* @property {libClient | undefined} sdk
|
|
279
304
|
*/
|
|
@@ -281,8 +306,9 @@ const healthGetQueueBuilds = async ({ threshold, parseOutput = true, sdk = undef
|
|
|
281
306
|
/**
|
|
282
307
|
* @param {HealthGetQueueCertificatesRequestParams} params
|
|
283
308
|
*/
|
|
284
|
-
const healthGetQueueCertificates = async ({
|
|
285
|
-
let client = !sdk ? await sdkForProject() :
|
|
309
|
+
const healthGetQueueCertificates = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
310
|
+
let client = !sdk ? await sdkForProject() :
|
|
311
|
+
sdk;
|
|
286
312
|
let apiPath = '/health/queue/certificates';
|
|
287
313
|
let payload = {};
|
|
288
314
|
if (typeof threshold !== 'undefined') {
|
|
@@ -299,14 +325,16 @@ const healthGetQueueCertificates = async ({ threshold, parseOutput = true, sdk =
|
|
|
299
325
|
parse(response)
|
|
300
326
|
success()
|
|
301
327
|
}
|
|
302
|
-
|
|
328
|
+
|
|
303
329
|
return response;
|
|
330
|
+
|
|
304
331
|
}
|
|
305
332
|
|
|
306
333
|
/**
|
|
307
334
|
* @typedef {Object} HealthGetQueueDatabasesRequestParams
|
|
308
335
|
* @property {string} name Queue name for which to check the queue size
|
|
309
336
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
337
|
+
* @property {boolean} overrideForCli
|
|
310
338
|
* @property {boolean} parseOutput
|
|
311
339
|
* @property {libClient | undefined} sdk
|
|
312
340
|
*/
|
|
@@ -314,8 +342,9 @@ const healthGetQueueCertificates = async ({ threshold, parseOutput = true, sdk =
|
|
|
314
342
|
/**
|
|
315
343
|
* @param {HealthGetQueueDatabasesRequestParams} params
|
|
316
344
|
*/
|
|
317
|
-
const healthGetQueueDatabases = async ({
|
|
318
|
-
let client = !sdk ? await sdkForProject() :
|
|
345
|
+
const healthGetQueueDatabases = async ({name,threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
346
|
+
let client = !sdk ? await sdkForProject() :
|
|
347
|
+
sdk;
|
|
319
348
|
let apiPath = '/health/queue/databases';
|
|
320
349
|
let payload = {};
|
|
321
350
|
if (typeof name !== 'undefined') {
|
|
@@ -335,13 +364,15 @@ const healthGetQueueDatabases = async ({ name, threshold, parseOutput = true, sd
|
|
|
335
364
|
parse(response)
|
|
336
365
|
success()
|
|
337
366
|
}
|
|
338
|
-
|
|
367
|
+
|
|
339
368
|
return response;
|
|
369
|
+
|
|
340
370
|
}
|
|
341
371
|
|
|
342
372
|
/**
|
|
343
373
|
* @typedef {Object} HealthGetQueueDeletesRequestParams
|
|
344
374
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
375
|
+
* @property {boolean} overrideForCli
|
|
345
376
|
* @property {boolean} parseOutput
|
|
346
377
|
* @property {libClient | undefined} sdk
|
|
347
378
|
*/
|
|
@@ -349,8 +380,9 @@ const healthGetQueueDatabases = async ({ name, threshold, parseOutput = true, sd
|
|
|
349
380
|
/**
|
|
350
381
|
* @param {HealthGetQueueDeletesRequestParams} params
|
|
351
382
|
*/
|
|
352
|
-
const healthGetQueueDeletes = async ({
|
|
353
|
-
let client = !sdk ? await sdkForProject() :
|
|
383
|
+
const healthGetQueueDeletes = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
384
|
+
let client = !sdk ? await sdkForProject() :
|
|
385
|
+
sdk;
|
|
354
386
|
let apiPath = '/health/queue/deletes';
|
|
355
387
|
let payload = {};
|
|
356
388
|
if (typeof threshold !== 'undefined') {
|
|
@@ -367,14 +399,16 @@ const healthGetQueueDeletes = async ({ threshold, parseOutput = true, sdk = unde
|
|
|
367
399
|
parse(response)
|
|
368
400
|
success()
|
|
369
401
|
}
|
|
370
|
-
|
|
402
|
+
|
|
371
403
|
return response;
|
|
404
|
+
|
|
372
405
|
}
|
|
373
406
|
|
|
374
407
|
/**
|
|
375
408
|
* @typedef {Object} HealthGetFailedJobsRequestParams
|
|
376
409
|
* @property {Name} name The name of the queue
|
|
377
410
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
411
|
+
* @property {boolean} overrideForCli
|
|
378
412
|
* @property {boolean} parseOutput
|
|
379
413
|
* @property {libClient | undefined} sdk
|
|
380
414
|
*/
|
|
@@ -382,8 +416,9 @@ const healthGetQueueDeletes = async ({ threshold, parseOutput = true, sdk = unde
|
|
|
382
416
|
/**
|
|
383
417
|
* @param {HealthGetFailedJobsRequestParams} params
|
|
384
418
|
*/
|
|
385
|
-
const healthGetFailedJobs = async ({
|
|
386
|
-
let client = !sdk ? await sdkForProject() :
|
|
419
|
+
const healthGetFailedJobs = async ({name,threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
420
|
+
let client = !sdk ? await sdkForProject() :
|
|
421
|
+
sdk;
|
|
387
422
|
let apiPath = '/health/queue/failed/{name}'.replace('{name}', name);
|
|
388
423
|
let payload = {};
|
|
389
424
|
if (typeof threshold !== 'undefined') {
|
|
@@ -400,13 +435,15 @@ const healthGetFailedJobs = async ({ name, threshold, parseOutput = true, sdk =
|
|
|
400
435
|
parse(response)
|
|
401
436
|
success()
|
|
402
437
|
}
|
|
403
|
-
|
|
438
|
+
|
|
404
439
|
return response;
|
|
440
|
+
|
|
405
441
|
}
|
|
406
442
|
|
|
407
443
|
/**
|
|
408
444
|
* @typedef {Object} HealthGetQueueFunctionsRequestParams
|
|
409
445
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
446
|
+
* @property {boolean} overrideForCli
|
|
410
447
|
* @property {boolean} parseOutput
|
|
411
448
|
* @property {libClient | undefined} sdk
|
|
412
449
|
*/
|
|
@@ -414,8 +451,9 @@ const healthGetFailedJobs = async ({ name, threshold, parseOutput = true, sdk =
|
|
|
414
451
|
/**
|
|
415
452
|
* @param {HealthGetQueueFunctionsRequestParams} params
|
|
416
453
|
*/
|
|
417
|
-
const healthGetQueueFunctions = async ({
|
|
418
|
-
let client = !sdk ? await sdkForProject() :
|
|
454
|
+
const healthGetQueueFunctions = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
455
|
+
let client = !sdk ? await sdkForProject() :
|
|
456
|
+
sdk;
|
|
419
457
|
let apiPath = '/health/queue/functions';
|
|
420
458
|
let payload = {};
|
|
421
459
|
if (typeof threshold !== 'undefined') {
|
|
@@ -432,13 +470,15 @@ const healthGetQueueFunctions = async ({ threshold, parseOutput = true, sdk = un
|
|
|
432
470
|
parse(response)
|
|
433
471
|
success()
|
|
434
472
|
}
|
|
435
|
-
|
|
473
|
+
|
|
436
474
|
return response;
|
|
475
|
+
|
|
437
476
|
}
|
|
438
477
|
|
|
439
478
|
/**
|
|
440
479
|
* @typedef {Object} HealthGetQueueLogsRequestParams
|
|
441
480
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
481
|
+
* @property {boolean} overrideForCli
|
|
442
482
|
* @property {boolean} parseOutput
|
|
443
483
|
* @property {libClient | undefined} sdk
|
|
444
484
|
*/
|
|
@@ -446,8 +486,9 @@ const healthGetQueueFunctions = async ({ threshold, parseOutput = true, sdk = un
|
|
|
446
486
|
/**
|
|
447
487
|
* @param {HealthGetQueueLogsRequestParams} params
|
|
448
488
|
*/
|
|
449
|
-
const healthGetQueueLogs = async ({
|
|
450
|
-
let client = !sdk ? await sdkForProject() :
|
|
489
|
+
const healthGetQueueLogs = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
490
|
+
let client = !sdk ? await sdkForProject() :
|
|
491
|
+
sdk;
|
|
451
492
|
let apiPath = '/health/queue/logs';
|
|
452
493
|
let payload = {};
|
|
453
494
|
if (typeof threshold !== 'undefined') {
|
|
@@ -464,13 +505,15 @@ const healthGetQueueLogs = async ({ threshold, parseOutput = true, sdk = undefin
|
|
|
464
505
|
parse(response)
|
|
465
506
|
success()
|
|
466
507
|
}
|
|
467
|
-
|
|
508
|
+
|
|
468
509
|
return response;
|
|
510
|
+
|
|
469
511
|
}
|
|
470
512
|
|
|
471
513
|
/**
|
|
472
514
|
* @typedef {Object} HealthGetQueueMailsRequestParams
|
|
473
515
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
516
|
+
* @property {boolean} overrideForCli
|
|
474
517
|
* @property {boolean} parseOutput
|
|
475
518
|
* @property {libClient | undefined} sdk
|
|
476
519
|
*/
|
|
@@ -478,8 +521,9 @@ const healthGetQueueLogs = async ({ threshold, parseOutput = true, sdk = undefin
|
|
|
478
521
|
/**
|
|
479
522
|
* @param {HealthGetQueueMailsRequestParams} params
|
|
480
523
|
*/
|
|
481
|
-
const healthGetQueueMails = async ({
|
|
482
|
-
let client = !sdk ? await sdkForProject() :
|
|
524
|
+
const healthGetQueueMails = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
525
|
+
let client = !sdk ? await sdkForProject() :
|
|
526
|
+
sdk;
|
|
483
527
|
let apiPath = '/health/queue/mails';
|
|
484
528
|
let payload = {};
|
|
485
529
|
if (typeof threshold !== 'undefined') {
|
|
@@ -496,13 +540,15 @@ const healthGetQueueMails = async ({ threshold, parseOutput = true, sdk = undefi
|
|
|
496
540
|
parse(response)
|
|
497
541
|
success()
|
|
498
542
|
}
|
|
499
|
-
|
|
543
|
+
|
|
500
544
|
return response;
|
|
545
|
+
|
|
501
546
|
}
|
|
502
547
|
|
|
503
548
|
/**
|
|
504
549
|
* @typedef {Object} HealthGetQueueMessagingRequestParams
|
|
505
550
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
551
|
+
* @property {boolean} overrideForCli
|
|
506
552
|
* @property {boolean} parseOutput
|
|
507
553
|
* @property {libClient | undefined} sdk
|
|
508
554
|
*/
|
|
@@ -510,8 +556,9 @@ const healthGetQueueMails = async ({ threshold, parseOutput = true, sdk = undefi
|
|
|
510
556
|
/**
|
|
511
557
|
* @param {HealthGetQueueMessagingRequestParams} params
|
|
512
558
|
*/
|
|
513
|
-
const healthGetQueueMessaging = async ({
|
|
514
|
-
let client = !sdk ? await sdkForProject() :
|
|
559
|
+
const healthGetQueueMessaging = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
560
|
+
let client = !sdk ? await sdkForProject() :
|
|
561
|
+
sdk;
|
|
515
562
|
let apiPath = '/health/queue/messaging';
|
|
516
563
|
let payload = {};
|
|
517
564
|
if (typeof threshold !== 'undefined') {
|
|
@@ -528,13 +575,15 @@ const healthGetQueueMessaging = async ({ threshold, parseOutput = true, sdk = un
|
|
|
528
575
|
parse(response)
|
|
529
576
|
success()
|
|
530
577
|
}
|
|
531
|
-
|
|
578
|
+
|
|
532
579
|
return response;
|
|
580
|
+
|
|
533
581
|
}
|
|
534
582
|
|
|
535
583
|
/**
|
|
536
584
|
* @typedef {Object} HealthGetQueueMigrationsRequestParams
|
|
537
585
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
586
|
+
* @property {boolean} overrideForCli
|
|
538
587
|
* @property {boolean} parseOutput
|
|
539
588
|
* @property {libClient | undefined} sdk
|
|
540
589
|
*/
|
|
@@ -542,8 +591,9 @@ const healthGetQueueMessaging = async ({ threshold, parseOutput = true, sdk = un
|
|
|
542
591
|
/**
|
|
543
592
|
* @param {HealthGetQueueMigrationsRequestParams} params
|
|
544
593
|
*/
|
|
545
|
-
const healthGetQueueMigrations = async ({
|
|
546
|
-
let client = !sdk ? await sdkForProject() :
|
|
594
|
+
const healthGetQueueMigrations = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
595
|
+
let client = !sdk ? await sdkForProject() :
|
|
596
|
+
sdk;
|
|
547
597
|
let apiPath = '/health/queue/migrations';
|
|
548
598
|
let payload = {};
|
|
549
599
|
if (typeof threshold !== 'undefined') {
|
|
@@ -560,13 +610,15 @@ const healthGetQueueMigrations = async ({ threshold, parseOutput = true, sdk = u
|
|
|
560
610
|
parse(response)
|
|
561
611
|
success()
|
|
562
612
|
}
|
|
563
|
-
|
|
613
|
+
|
|
564
614
|
return response;
|
|
615
|
+
|
|
565
616
|
}
|
|
566
617
|
|
|
567
618
|
/**
|
|
568
619
|
* @typedef {Object} HealthGetQueueUsageRequestParams
|
|
569
620
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
621
|
+
* @property {boolean} overrideForCli
|
|
570
622
|
* @property {boolean} parseOutput
|
|
571
623
|
* @property {libClient | undefined} sdk
|
|
572
624
|
*/
|
|
@@ -574,8 +626,9 @@ const healthGetQueueMigrations = async ({ threshold, parseOutput = true, sdk = u
|
|
|
574
626
|
/**
|
|
575
627
|
* @param {HealthGetQueueUsageRequestParams} params
|
|
576
628
|
*/
|
|
577
|
-
const healthGetQueueUsage = async ({
|
|
578
|
-
let client = !sdk ? await sdkForProject() :
|
|
629
|
+
const healthGetQueueUsage = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
630
|
+
let client = !sdk ? await sdkForProject() :
|
|
631
|
+
sdk;
|
|
579
632
|
let apiPath = '/health/queue/usage';
|
|
580
633
|
let payload = {};
|
|
581
634
|
if (typeof threshold !== 'undefined') {
|
|
@@ -592,13 +645,15 @@ const healthGetQueueUsage = async ({ threshold, parseOutput = true, sdk = undefi
|
|
|
592
645
|
parse(response)
|
|
593
646
|
success()
|
|
594
647
|
}
|
|
595
|
-
|
|
648
|
+
|
|
596
649
|
return response;
|
|
650
|
+
|
|
597
651
|
}
|
|
598
652
|
|
|
599
653
|
/**
|
|
600
654
|
* @typedef {Object} HealthGetQueueUsageDumpRequestParams
|
|
601
655
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
656
|
+
* @property {boolean} overrideForCli
|
|
602
657
|
* @property {boolean} parseOutput
|
|
603
658
|
* @property {libClient | undefined} sdk
|
|
604
659
|
*/
|
|
@@ -606,8 +661,9 @@ const healthGetQueueUsage = async ({ threshold, parseOutput = true, sdk = undefi
|
|
|
606
661
|
/**
|
|
607
662
|
* @param {HealthGetQueueUsageDumpRequestParams} params
|
|
608
663
|
*/
|
|
609
|
-
const healthGetQueueUsageDump = async ({
|
|
610
|
-
let client = !sdk ? await sdkForProject() :
|
|
664
|
+
const healthGetQueueUsageDump = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
665
|
+
let client = !sdk ? await sdkForProject() :
|
|
666
|
+
sdk;
|
|
611
667
|
let apiPath = '/health/queue/usage-dump';
|
|
612
668
|
let payload = {};
|
|
613
669
|
if (typeof threshold !== 'undefined') {
|
|
@@ -624,13 +680,15 @@ const healthGetQueueUsageDump = async ({ threshold, parseOutput = true, sdk = un
|
|
|
624
680
|
parse(response)
|
|
625
681
|
success()
|
|
626
682
|
}
|
|
627
|
-
|
|
683
|
+
|
|
628
684
|
return response;
|
|
685
|
+
|
|
629
686
|
}
|
|
630
687
|
|
|
631
688
|
/**
|
|
632
689
|
* @typedef {Object} HealthGetQueueWebhooksRequestParams
|
|
633
690
|
* @property {number} threshold Queue size threshold. When hit (equal or higher), endpoint returns server error. Default value is 5000.
|
|
691
|
+
* @property {boolean} overrideForCli
|
|
634
692
|
* @property {boolean} parseOutput
|
|
635
693
|
* @property {libClient | undefined} sdk
|
|
636
694
|
*/
|
|
@@ -638,8 +696,9 @@ const healthGetQueueUsageDump = async ({ threshold, parseOutput = true, sdk = un
|
|
|
638
696
|
/**
|
|
639
697
|
* @param {HealthGetQueueWebhooksRequestParams} params
|
|
640
698
|
*/
|
|
641
|
-
const healthGetQueueWebhooks = async ({
|
|
642
|
-
let client = !sdk ? await sdkForProject() :
|
|
699
|
+
const healthGetQueueWebhooks = async ({threshold,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
700
|
+
let client = !sdk ? await sdkForProject() :
|
|
701
|
+
sdk;
|
|
643
702
|
let apiPath = '/health/queue/webhooks';
|
|
644
703
|
let payload = {};
|
|
645
704
|
if (typeof threshold !== 'undefined') {
|
|
@@ -656,12 +715,14 @@ const healthGetQueueWebhooks = async ({ threshold, parseOutput = true, sdk = und
|
|
|
656
715
|
parse(response)
|
|
657
716
|
success()
|
|
658
717
|
}
|
|
659
|
-
|
|
718
|
+
|
|
660
719
|
return response;
|
|
720
|
+
|
|
661
721
|
}
|
|
662
722
|
|
|
663
723
|
/**
|
|
664
724
|
* @typedef {Object} HealthGetStorageRequestParams
|
|
725
|
+
* @property {boolean} overrideForCli
|
|
665
726
|
* @property {boolean} parseOutput
|
|
666
727
|
* @property {libClient | undefined} sdk
|
|
667
728
|
*/
|
|
@@ -669,8 +730,9 @@ const healthGetQueueWebhooks = async ({ threshold, parseOutput = true, sdk = und
|
|
|
669
730
|
/**
|
|
670
731
|
* @param {HealthGetStorageRequestParams} params
|
|
671
732
|
*/
|
|
672
|
-
const healthGetStorage = async ({
|
|
673
|
-
let client = !sdk ? await sdkForProject() :
|
|
733
|
+
const healthGetStorage = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
734
|
+
let client = !sdk ? await sdkForProject() :
|
|
735
|
+
sdk;
|
|
674
736
|
let apiPath = '/health/storage';
|
|
675
737
|
let payload = {};
|
|
676
738
|
|
|
@@ -684,12 +746,14 @@ const healthGetStorage = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
684
746
|
parse(response)
|
|
685
747
|
success()
|
|
686
748
|
}
|
|
687
|
-
|
|
749
|
+
|
|
688
750
|
return response;
|
|
751
|
+
|
|
689
752
|
}
|
|
690
753
|
|
|
691
754
|
/**
|
|
692
755
|
* @typedef {Object} HealthGetStorageLocalRequestParams
|
|
756
|
+
* @property {boolean} overrideForCli
|
|
693
757
|
* @property {boolean} parseOutput
|
|
694
758
|
* @property {libClient | undefined} sdk
|
|
695
759
|
*/
|
|
@@ -697,8 +761,9 @@ const healthGetStorage = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
697
761
|
/**
|
|
698
762
|
* @param {HealthGetStorageLocalRequestParams} params
|
|
699
763
|
*/
|
|
700
|
-
const healthGetStorageLocal = async ({
|
|
701
|
-
let client = !sdk ? await sdkForProject() :
|
|
764
|
+
const healthGetStorageLocal = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
765
|
+
let client = !sdk ? await sdkForProject() :
|
|
766
|
+
sdk;
|
|
702
767
|
let apiPath = '/health/storage/local';
|
|
703
768
|
let payload = {};
|
|
704
769
|
|
|
@@ -712,12 +777,14 @@ const healthGetStorageLocal = async ({ parseOutput = true, sdk = undefined}) =>
|
|
|
712
777
|
parse(response)
|
|
713
778
|
success()
|
|
714
779
|
}
|
|
715
|
-
|
|
780
|
+
|
|
716
781
|
return response;
|
|
782
|
+
|
|
717
783
|
}
|
|
718
784
|
|
|
719
785
|
/**
|
|
720
786
|
* @typedef {Object} HealthGetTimeRequestParams
|
|
787
|
+
* @property {boolean} overrideForCli
|
|
721
788
|
* @property {boolean} parseOutput
|
|
722
789
|
* @property {libClient | undefined} sdk
|
|
723
790
|
*/
|
|
@@ -725,8 +792,9 @@ const healthGetStorageLocal = async ({ parseOutput = true, sdk = undefined}) =>
|
|
|
725
792
|
/**
|
|
726
793
|
* @param {HealthGetTimeRequestParams} params
|
|
727
794
|
*/
|
|
728
|
-
const healthGetTime = async ({
|
|
729
|
-
let client = !sdk ? await sdkForProject() :
|
|
795
|
+
const healthGetTime = async ({parseOutput = true, overrideForCli = false, sdk = undefined}) => {
|
|
796
|
+
let client = !sdk ? await sdkForProject() :
|
|
797
|
+
sdk;
|
|
730
798
|
let apiPath = '/health/time';
|
|
731
799
|
let payload = {};
|
|
732
800
|
|
|
@@ -740,8 +808,9 @@ const healthGetTime = async ({ parseOutput = true, sdk = undefined}) => {
|
|
|
740
808
|
parse(response)
|
|
741
809
|
success()
|
|
742
810
|
}
|
|
743
|
-
|
|
811
|
+
|
|
744
812
|
return response;
|
|
813
|
+
|
|
745
814
|
}
|
|
746
815
|
|
|
747
816
|
health
|
|
@@ -900,4 +969,4 @@ module.exports = {
|
|
|
900
969
|
healthGetStorage,
|
|
901
970
|
healthGetStorageLocal,
|
|
902
971
|
healthGetTime
|
|
903
|
-
};
|
|
972
|
+
};
|