appwrite-cli 4.2.1 → 4.2.2

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.
@@ -37,7 +37,7 @@ function convertReadStreamToReadableStream(readStream) {
37
37
 
38
38
  const projects = new Command("projects").description(commandDescriptions['projects']).configureHelp({
39
39
  helpWidth: process.stdout.columns || 80
40
- })
40
+ })
41
41
 
42
42
  /**
43
43
  * @typedef {Object} ProjectsListRequestParams
@@ -52,7 +52,6 @@ const projects = new Command("projects").description(commandDescriptions['projec
52
52
  */
53
53
  const projectsList = async ({ queries, search, parseOutput = true, sdk = undefined}) => {
54
54
  let client = !sdk ? await sdkForConsole() : sdk;
55
-
56
55
  let apiPath = '/projects';
57
56
  let payload = {};
58
57
  if (typeof queries !== 'undefined') {
@@ -62,14 +61,12 @@ const projectsList = async ({ queries, search, parseOutput = true, sdk = undefin
62
61
  payload['search'] = search;
63
62
  }
64
63
 
65
-
66
64
  let response = undefined;
67
-
65
+
68
66
  response = await client.call('get', apiPath, {
69
67
  'content-type': 'application/json',
70
68
  }, payload);
71
69
 
72
-
73
70
  if (parseOutput) {
74
71
  parse(response)
75
72
  success()
@@ -102,7 +99,6 @@ const projectsList = async ({ queries, search, parseOutput = true, sdk = undefin
102
99
  */
103
100
  const projectsCreate = async ({ projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId, parseOutput = true, sdk = undefined}) => {
104
101
  let client = !sdk ? await sdkForConsole() : sdk;
105
-
106
102
  let apiPath = '/projects';
107
103
  let payload = {};
108
104
  if (typeof projectId !== 'undefined') {
@@ -145,14 +141,12 @@ const projectsCreate = async ({ projectId, name, teamId, region, description, lo
145
141
  payload['legalTaxId'] = legalTaxId;
146
142
  }
147
143
 
148
-
149
144
  let response = undefined;
150
-
145
+
151
146
  response = await client.call('post', apiPath, {
152
147
  'content-type': 'application/json',
153
148
  }, payload);
154
149
 
155
-
156
150
  if (parseOutput) {
157
151
  parse(response)
158
152
  success()
@@ -173,18 +167,15 @@ const projectsCreate = async ({ projectId, name, teamId, region, description, lo
173
167
  */
174
168
  const projectsGet = async ({ projectId, parseOutput = true, sdk = undefined}) => {
175
169
  let client = !sdk ? await sdkForConsole() : sdk;
176
-
177
170
  let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
178
171
  let payload = {};
179
172
 
180
-
181
173
  let response = undefined;
182
-
174
+
183
175
  response = await client.call('get', apiPath, {
184
176
  'content-type': 'application/json',
185
177
  }, payload);
186
178
 
187
-
188
179
  if (parseOutput) {
189
180
  parse(response)
190
181
  success()
@@ -215,7 +206,6 @@ const projectsGet = async ({ projectId, parseOutput = true, sdk = undefined}) =>
215
206
  */
216
207
  const projectsUpdate = async ({ projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId, parseOutput = true, sdk = undefined}) => {
217
208
  let client = !sdk ? await sdkForConsole() : sdk;
218
-
219
209
  let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
220
210
  let payload = {};
221
211
  if (typeof name !== 'undefined') {
@@ -249,14 +239,12 @@ const projectsUpdate = async ({ projectId, name, description, logo, url, legalNa
249
239
  payload['legalTaxId'] = legalTaxId;
250
240
  }
251
241
 
252
-
253
242
  let response = undefined;
254
-
243
+
255
244
  response = await client.call('patch', apiPath, {
256
245
  'content-type': 'application/json',
257
246
  }, payload);
258
247
 
259
-
260
248
  if (parseOutput) {
261
249
  parse(response)
262
250
  success()
@@ -277,18 +265,15 @@ const projectsUpdate = async ({ projectId, name, description, logo, url, legalNa
277
265
  */
278
266
  const projectsDelete = async ({ projectId, parseOutput = true, sdk = undefined}) => {
279
267
  let client = !sdk ? await sdkForConsole() : sdk;
280
-
281
268
  let apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
282
269
  let payload = {};
283
270
 
284
-
285
271
  let response = undefined;
286
-
272
+
287
273
  response = await client.call('delete', apiPath, {
288
274
  'content-type': 'application/json',
289
275
  }, payload);
290
276
 
291
-
292
277
  if (parseOutput) {
293
278
  parse(response)
294
279
  success()
@@ -310,21 +295,18 @@ const projectsDelete = async ({ projectId, parseOutput = true, sdk = undefined})
310
295
  */
311
296
  const projectsUpdateAuthDuration = async ({ projectId, duration, parseOutput = true, sdk = undefined}) => {
312
297
  let client = !sdk ? await sdkForConsole() : sdk;
313
-
314
298
  let apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
315
299
  let payload = {};
316
300
  if (typeof duration !== 'undefined') {
317
301
  payload['duration'] = duration;
318
302
  }
319
303
 
320
-
321
304
  let response = undefined;
322
-
305
+
323
306
  response = await client.call('patch', apiPath, {
324
307
  'content-type': 'application/json',
325
308
  }, payload);
326
309
 
327
-
328
310
  if (parseOutput) {
329
311
  parse(response)
330
312
  success()
@@ -346,21 +328,18 @@ const projectsUpdateAuthDuration = async ({ projectId, duration, parseOutput = t
346
328
  */
347
329
  const projectsUpdateAuthLimit = async ({ projectId, limit, parseOutput = true, sdk = undefined}) => {
348
330
  let client = !sdk ? await sdkForConsole() : sdk;
349
-
350
331
  let apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
351
332
  let payload = {};
352
333
  if (typeof limit !== 'undefined') {
353
334
  payload['limit'] = limit;
354
335
  }
355
336
 
356
-
357
337
  let response = undefined;
358
-
338
+
359
339
  response = await client.call('patch', apiPath, {
360
340
  'content-type': 'application/json',
361
341
  }, payload);
362
342
 
363
-
364
343
  if (parseOutput) {
365
344
  parse(response)
366
345
  success()
@@ -382,21 +361,18 @@ const projectsUpdateAuthLimit = async ({ projectId, limit, parseOutput = true, s
382
361
  */
383
362
  const projectsUpdateAuthSessionsLimit = async ({ projectId, limit, parseOutput = true, sdk = undefined}) => {
384
363
  let client = !sdk ? await sdkForConsole() : sdk;
385
-
386
364
  let apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
387
365
  let payload = {};
388
366
  if (typeof limit !== 'undefined') {
389
367
  payload['limit'] = limit;
390
368
  }
391
369
 
392
-
393
370
  let response = undefined;
394
-
371
+
395
372
  response = await client.call('patch', apiPath, {
396
373
  'content-type': 'application/json',
397
374
  }, payload);
398
375
 
399
-
400
376
  if (parseOutput) {
401
377
  parse(response)
402
378
  success()
@@ -418,21 +394,18 @@ const projectsUpdateAuthSessionsLimit = async ({ projectId, limit, parseOutput =
418
394
  */
419
395
  const projectsUpdateAuthPasswordDictionary = async ({ projectId, enabled, parseOutput = true, sdk = undefined}) => {
420
396
  let client = !sdk ? await sdkForConsole() : sdk;
421
-
422
397
  let apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
423
398
  let payload = {};
424
399
  if (typeof enabled !== 'undefined') {
425
400
  payload['enabled'] = enabled;
426
401
  }
427
402
 
428
-
429
403
  let response = undefined;
430
-
404
+
431
405
  response = await client.call('patch', apiPath, {
432
406
  'content-type': 'application/json',
433
407
  }, payload);
434
408
 
435
-
436
409
  if (parseOutput) {
437
410
  parse(response)
438
411
  success()
@@ -454,21 +427,18 @@ const projectsUpdateAuthPasswordDictionary = async ({ projectId, enabled, parseO
454
427
  */
455
428
  const projectsUpdateAuthPasswordHistory = async ({ projectId, limit, parseOutput = true, sdk = undefined}) => {
456
429
  let client = !sdk ? await sdkForConsole() : sdk;
457
-
458
430
  let apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
459
431
  let payload = {};
460
432
  if (typeof limit !== 'undefined') {
461
433
  payload['limit'] = limit;
462
434
  }
463
435
 
464
-
465
436
  let response = undefined;
466
-
437
+
467
438
  response = await client.call('patch', apiPath, {
468
439
  'content-type': 'application/json',
469
440
  }, payload);
470
441
 
471
-
472
442
  if (parseOutput) {
473
443
  parse(response)
474
444
  success()
@@ -490,21 +460,18 @@ const projectsUpdateAuthPasswordHistory = async ({ projectId, limit, parseOutput
490
460
  */
491
461
  const projectsUpdatePersonalDataCheck = async ({ projectId, enabled, parseOutput = true, sdk = undefined}) => {
492
462
  let client = !sdk ? await sdkForConsole() : sdk;
493
-
494
463
  let apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
495
464
  let payload = {};
496
465
  if (typeof enabled !== 'undefined') {
497
466
  payload['enabled'] = enabled;
498
467
  }
499
468
 
500
-
501
469
  let response = undefined;
502
-
470
+
503
471
  response = await client.call('patch', apiPath, {
504
472
  'content-type': 'application/json',
505
473
  }, payload);
506
474
 
507
-
508
475
  if (parseOutput) {
509
476
  parse(response)
510
477
  success()
@@ -527,21 +494,18 @@ const projectsUpdatePersonalDataCheck = async ({ projectId, enabled, parseOutput
527
494
  */
528
495
  const projectsUpdateAuthStatus = async ({ projectId, method, status, parseOutput = true, sdk = undefined}) => {
529
496
  let client = !sdk ? await sdkForConsole() : sdk;
530
-
531
497
  let apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
532
498
  let payload = {};
533
499
  if (typeof status !== 'undefined') {
534
500
  payload['status'] = status;
535
501
  }
536
502
 
537
-
538
503
  let response = undefined;
539
-
504
+
540
505
  response = await client.call('patch', apiPath, {
541
506
  'content-type': 'application/json',
542
507
  }, payload);
543
508
 
544
-
545
509
  if (parseOutput) {
546
510
  parse(response)
547
511
  success()
@@ -562,18 +526,15 @@ const projectsUpdateAuthStatus = async ({ projectId, method, status, parseOutput
562
526
  */
563
527
  const projectsListKeys = async ({ projectId, parseOutput = true, sdk = undefined}) => {
564
528
  let client = !sdk ? await sdkForConsole() : sdk;
565
-
566
529
  let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
567
530
  let payload = {};
568
531
 
569
-
570
532
  let response = undefined;
571
-
533
+
572
534
  response = await client.call('get', apiPath, {
573
535
  'content-type': 'application/json',
574
536
  }, payload);
575
537
 
576
-
577
538
  if (parseOutput) {
578
539
  parse(response)
579
540
  success()
@@ -597,7 +558,6 @@ const projectsListKeys = async ({ projectId, parseOutput = true, sdk = undefined
597
558
  */
598
559
  const projectsCreateKey = async ({ projectId, name, scopes, expire, parseOutput = true, sdk = undefined}) => {
599
560
  let client = !sdk ? await sdkForConsole() : sdk;
600
-
601
561
  let apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
602
562
  let payload = {};
603
563
  if (typeof name !== 'undefined') {
@@ -611,14 +571,12 @@ const projectsCreateKey = async ({ projectId, name, scopes, expire, parseOutput
611
571
  payload['expire'] = expire;
612
572
  }
613
573
 
614
-
615
574
  let response = undefined;
616
-
575
+
617
576
  response = await client.call('post', apiPath, {
618
577
  'content-type': 'application/json',
619
578
  }, payload);
620
579
 
621
-
622
580
  if (parseOutput) {
623
581
  parse(response)
624
582
  success()
@@ -640,18 +598,15 @@ const projectsCreateKey = async ({ projectId, name, scopes, expire, parseOutput
640
598
  */
641
599
  const projectsGetKey = async ({ projectId, keyId, parseOutput = true, sdk = undefined}) => {
642
600
  let client = !sdk ? await sdkForConsole() : sdk;
643
-
644
601
  let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
645
602
  let payload = {};
646
603
 
647
-
648
604
  let response = undefined;
649
-
605
+
650
606
  response = await client.call('get', apiPath, {
651
607
  'content-type': 'application/json',
652
608
  }, payload);
653
609
 
654
-
655
610
  if (parseOutput) {
656
611
  parse(response)
657
612
  success()
@@ -676,7 +631,6 @@ const projectsGetKey = async ({ projectId, keyId, parseOutput = true, sdk = unde
676
631
  */
677
632
  const projectsUpdateKey = async ({ projectId, keyId, name, scopes, expire, parseOutput = true, sdk = undefined}) => {
678
633
  let client = !sdk ? await sdkForConsole() : sdk;
679
-
680
634
  let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
681
635
  let payload = {};
682
636
  if (typeof name !== 'undefined') {
@@ -690,14 +644,12 @@ const projectsUpdateKey = async ({ projectId, keyId, name, scopes, expire, parse
690
644
  payload['expire'] = expire;
691
645
  }
692
646
 
693
-
694
647
  let response = undefined;
695
-
648
+
696
649
  response = await client.call('put', apiPath, {
697
650
  'content-type': 'application/json',
698
651
  }, payload);
699
652
 
700
-
701
653
  if (parseOutput) {
702
654
  parse(response)
703
655
  success()
@@ -719,18 +671,15 @@ const projectsUpdateKey = async ({ projectId, keyId, name, scopes, expire, parse
719
671
  */
720
672
  const projectsDeleteKey = async ({ projectId, keyId, parseOutput = true, sdk = undefined}) => {
721
673
  let client = !sdk ? await sdkForConsole() : sdk;
722
-
723
674
  let apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
724
675
  let payload = {};
725
676
 
726
-
727
677
  let response = undefined;
728
-
678
+
729
679
  response = await client.call('delete', apiPath, {
730
680
  'content-type': 'application/json',
731
681
  }, payload);
732
682
 
733
-
734
683
  if (parseOutput) {
735
684
  parse(response)
736
685
  success()
@@ -755,7 +704,6 @@ const projectsDeleteKey = async ({ projectId, keyId, parseOutput = true, sdk = u
755
704
  */
756
705
  const projectsUpdateOAuth2 = async ({ projectId, provider, appId, secret, enabled, parseOutput = true, sdk = undefined}) => {
757
706
  let client = !sdk ? await sdkForConsole() : sdk;
758
-
759
707
  let apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
760
708
  let payload = {};
761
709
  if (typeof provider !== 'undefined') {
@@ -771,14 +719,12 @@ const projectsUpdateOAuth2 = async ({ projectId, provider, appId, secret, enable
771
719
  payload['enabled'] = enabled;
772
720
  }
773
721
 
774
-
775
722
  let response = undefined;
776
-
723
+
777
724
  response = await client.call('patch', apiPath, {
778
725
  'content-type': 'application/json',
779
726
  }, payload);
780
727
 
781
-
782
728
  if (parseOutput) {
783
729
  parse(response)
784
730
  success()
@@ -799,18 +745,15 @@ const projectsUpdateOAuth2 = async ({ projectId, provider, appId, secret, enable
799
745
  */
800
746
  const projectsListPlatforms = async ({ projectId, parseOutput = true, sdk = undefined}) => {
801
747
  let client = !sdk ? await sdkForConsole() : sdk;
802
-
803
748
  let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
804
749
  let payload = {};
805
750
 
806
-
807
751
  let response = undefined;
808
-
752
+
809
753
  response = await client.call('get', apiPath, {
810
754
  'content-type': 'application/json',
811
755
  }, payload);
812
756
 
813
-
814
757
  if (parseOutput) {
815
758
  parse(response)
816
759
  success()
@@ -836,7 +779,6 @@ const projectsListPlatforms = async ({ projectId, parseOutput = true, sdk = unde
836
779
  */
837
780
  const projectsCreatePlatform = async ({ projectId, type, name, key, store, hostname, parseOutput = true, sdk = undefined}) => {
838
781
  let client = !sdk ? await sdkForConsole() : sdk;
839
-
840
782
  let apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
841
783
  let payload = {};
842
784
  if (typeof type !== 'undefined') {
@@ -855,14 +797,12 @@ const projectsCreatePlatform = async ({ projectId, type, name, key, store, hostn
855
797
  payload['hostname'] = hostname;
856
798
  }
857
799
 
858
-
859
800
  let response = undefined;
860
-
801
+
861
802
  response = await client.call('post', apiPath, {
862
803
  'content-type': 'application/json',
863
804
  }, payload);
864
805
 
865
-
866
806
  if (parseOutput) {
867
807
  parse(response)
868
808
  success()
@@ -884,18 +824,15 @@ const projectsCreatePlatform = async ({ projectId, type, name, key, store, hostn
884
824
  */
885
825
  const projectsGetPlatform = async ({ projectId, platformId, parseOutput = true, sdk = undefined}) => {
886
826
  let client = !sdk ? await sdkForConsole() : sdk;
887
-
888
827
  let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
889
828
  let payload = {};
890
829
 
891
-
892
830
  let response = undefined;
893
-
831
+
894
832
  response = await client.call('get', apiPath, {
895
833
  'content-type': 'application/json',
896
834
  }, payload);
897
835
 
898
-
899
836
  if (parseOutput) {
900
837
  parse(response)
901
838
  success()
@@ -921,7 +858,6 @@ const projectsGetPlatform = async ({ projectId, platformId, parseOutput = true,
921
858
  */
922
859
  const projectsUpdatePlatform = async ({ projectId, platformId, name, key, store, hostname, parseOutput = true, sdk = undefined}) => {
923
860
  let client = !sdk ? await sdkForConsole() : sdk;
924
-
925
861
  let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
926
862
  let payload = {};
927
863
  if (typeof name !== 'undefined') {
@@ -937,14 +873,12 @@ const projectsUpdatePlatform = async ({ projectId, platformId, name, key, store,
937
873
  payload['hostname'] = hostname;
938
874
  }
939
875
 
940
-
941
876
  let response = undefined;
942
-
877
+
943
878
  response = await client.call('put', apiPath, {
944
879
  'content-type': 'application/json',
945
880
  }, payload);
946
881
 
947
-
948
882
  if (parseOutput) {
949
883
  parse(response)
950
884
  success()
@@ -966,18 +900,15 @@ const projectsUpdatePlatform = async ({ projectId, platformId, name, key, store,
966
900
  */
967
901
  const projectsDeletePlatform = async ({ projectId, platformId, parseOutput = true, sdk = undefined}) => {
968
902
  let client = !sdk ? await sdkForConsole() : sdk;
969
-
970
903
  let apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
971
904
  let payload = {};
972
905
 
973
-
974
906
  let response = undefined;
975
-
907
+
976
908
  response = await client.call('delete', apiPath, {
977
909
  'content-type': 'application/json',
978
910
  }, payload);
979
911
 
980
-
981
912
  if (parseOutput) {
982
913
  parse(response)
983
914
  success()
@@ -1000,7 +931,6 @@ const projectsDeletePlatform = async ({ projectId, platformId, parseOutput = tru
1000
931
  */
1001
932
  const projectsUpdateServiceStatus = async ({ projectId, service, status, parseOutput = true, sdk = undefined}) => {
1002
933
  let client = !sdk ? await sdkForConsole() : sdk;
1003
-
1004
934
  let apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
1005
935
  let payload = {};
1006
936
  if (typeof service !== 'undefined') {
@@ -1010,14 +940,12 @@ const projectsUpdateServiceStatus = async ({ projectId, service, status, parseOu
1010
940
  payload['status'] = status;
1011
941
  }
1012
942
 
1013
-
1014
943
  let response = undefined;
1015
-
944
+
1016
945
  response = await client.call('patch', apiPath, {
1017
946
  'content-type': 'application/json',
1018
947
  }, payload);
1019
948
 
1020
-
1021
949
  if (parseOutput) {
1022
950
  parse(response)
1023
951
  success()
@@ -1039,21 +967,18 @@ const projectsUpdateServiceStatus = async ({ projectId, service, status, parseOu
1039
967
  */
1040
968
  const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput = true, sdk = undefined}) => {
1041
969
  let client = !sdk ? await sdkForConsole() : sdk;
1042
-
1043
970
  let apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
1044
971
  let payload = {};
1045
972
  if (typeof status !== 'undefined') {
1046
973
  payload['status'] = status;
1047
974
  }
1048
975
 
1049
-
1050
976
  let response = undefined;
1051
-
977
+
1052
978
  response = await client.call('patch', apiPath, {
1053
979
  'content-type': 'application/json',
1054
980
  }, payload);
1055
981
 
1056
-
1057
982
  if (parseOutput) {
1058
983
  parse(response)
1059
984
  success()
@@ -1083,7 +1008,6 @@ const projectsUpdateServiceStatusAll = async ({ projectId, status, parseOutput =
1083
1008
  */
1084
1009
  const projectsUpdateSmtpConfiguration = async ({ projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure, parseOutput = true, sdk = undefined}) => {
1085
1010
  let client = !sdk ? await sdkForConsole() : sdk;
1086
-
1087
1011
  let apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
1088
1012
  let payload = {};
1089
1013
  if (typeof enabled !== 'undefined') {
@@ -1114,14 +1038,12 @@ const projectsUpdateSmtpConfiguration = async ({ projectId, enabled, senderName,
1114
1038
  payload['secure'] = secure;
1115
1039
  }
1116
1040
 
1117
-
1118
1041
  let response = undefined;
1119
-
1042
+
1120
1043
  response = await client.call('patch', apiPath, {
1121
1044
  'content-type': 'application/json',
1122
1045
  }, payload);
1123
1046
 
1124
-
1125
1047
  if (parseOutput) {
1126
1048
  parse(response)
1127
1049
  success()
@@ -1143,21 +1065,18 @@ const projectsUpdateSmtpConfiguration = async ({ projectId, enabled, senderName,
1143
1065
  */
1144
1066
  const projectsUpdateTeam = async ({ projectId, teamId, parseOutput = true, sdk = undefined}) => {
1145
1067
  let client = !sdk ? await sdkForConsole() : sdk;
1146
-
1147
1068
  let apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
1148
1069
  let payload = {};
1149
1070
  if (typeof teamId !== 'undefined') {
1150
1071
  payload['teamId'] = teamId;
1151
1072
  }
1152
1073
 
1153
-
1154
1074
  let response = undefined;
1155
-
1075
+
1156
1076
  response = await client.call('patch', apiPath, {
1157
1077
  'content-type': 'application/json',
1158
1078
  }, payload);
1159
1079
 
1160
-
1161
1080
  if (parseOutput) {
1162
1081
  parse(response)
1163
1082
  success()
@@ -1180,18 +1099,15 @@ const projectsUpdateTeam = async ({ projectId, teamId, parseOutput = true, sdk =
1180
1099
  */
1181
1100
  const projectsGetEmailTemplate = async ({ projectId, type, locale, parseOutput = true, sdk = undefined}) => {
1182
1101
  let client = !sdk ? await sdkForConsole() : sdk;
1183
-
1184
1102
  let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1185
1103
  let payload = {};
1186
1104
 
1187
-
1188
1105
  let response = undefined;
1189
-
1106
+
1190
1107
  response = await client.call('get', apiPath, {
1191
1108
  'content-type': 'application/json',
1192
1109
  }, payload);
1193
1110
 
1194
-
1195
1111
  if (parseOutput) {
1196
1112
  parse(response)
1197
1113
  success()
@@ -1219,7 +1135,6 @@ const projectsGetEmailTemplate = async ({ projectId, type, locale, parseOutput =
1219
1135
  */
1220
1136
  const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, message, senderName, senderEmail, replyTo, parseOutput = true, sdk = undefined}) => {
1221
1137
  let client = !sdk ? await sdkForConsole() : sdk;
1222
-
1223
1138
  let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1224
1139
  let payload = {};
1225
1140
  if (typeof subject !== 'undefined') {
@@ -1238,14 +1153,12 @@ const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, m
1238
1153
  payload['replyTo'] = replyTo;
1239
1154
  }
1240
1155
 
1241
-
1242
1156
  let response = undefined;
1243
-
1157
+
1244
1158
  response = await client.call('patch', apiPath, {
1245
1159
  'content-type': 'application/json',
1246
1160
  }, payload);
1247
1161
 
1248
-
1249
1162
  if (parseOutput) {
1250
1163
  parse(response)
1251
1164
  success()
@@ -1268,18 +1181,15 @@ const projectsUpdateEmailTemplate = async ({ projectId, type, locale, subject, m
1268
1181
  */
1269
1182
  const projectsDeleteEmailTemplate = async ({ projectId, type, locale, parseOutput = true, sdk = undefined}) => {
1270
1183
  let client = !sdk ? await sdkForConsole() : sdk;
1271
-
1272
1184
  let apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1273
1185
  let payload = {};
1274
1186
 
1275
-
1276
1187
  let response = undefined;
1277
-
1188
+
1278
1189
  response = await client.call('delete', apiPath, {
1279
1190
  'content-type': 'application/json',
1280
1191
  }, payload);
1281
1192
 
1282
-
1283
1193
  if (parseOutput) {
1284
1194
  parse(response)
1285
1195
  success()
@@ -1302,18 +1212,15 @@ const projectsDeleteEmailTemplate = async ({ projectId, type, locale, parseOutpu
1302
1212
  */
1303
1213
  const projectsGetSmsTemplate = async ({ projectId, type, locale, parseOutput = true, sdk = undefined}) => {
1304
1214
  let client = !sdk ? await sdkForConsole() : sdk;
1305
-
1306
1215
  let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1307
1216
  let payload = {};
1308
1217
 
1309
-
1310
1218
  let response = undefined;
1311
-
1219
+
1312
1220
  response = await client.call('get', apiPath, {
1313
1221
  'content-type': 'application/json',
1314
1222
  }, payload);
1315
1223
 
1316
-
1317
1224
  if (parseOutput) {
1318
1225
  parse(response)
1319
1226
  success()
@@ -1337,21 +1244,18 @@ const projectsGetSmsTemplate = async ({ projectId, type, locale, parseOutput = t
1337
1244
  */
1338
1245
  const projectsUpdateSmsTemplate = async ({ projectId, type, locale, message, parseOutput = true, sdk = undefined}) => {
1339
1246
  let client = !sdk ? await sdkForConsole() : sdk;
1340
-
1341
1247
  let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1342
1248
  let payload = {};
1343
1249
  if (typeof message !== 'undefined') {
1344
1250
  payload['message'] = message;
1345
1251
  }
1346
1252
 
1347
-
1348
1253
  let response = undefined;
1349
-
1254
+
1350
1255
  response = await client.call('patch', apiPath, {
1351
1256
  'content-type': 'application/json',
1352
1257
  }, payload);
1353
1258
 
1354
-
1355
1259
  if (parseOutput) {
1356
1260
  parse(response)
1357
1261
  success()
@@ -1374,18 +1278,15 @@ const projectsUpdateSmsTemplate = async ({ projectId, type, locale, message, par
1374
1278
  */
1375
1279
  const projectsDeleteSmsTemplate = async ({ projectId, type, locale, parseOutput = true, sdk = undefined}) => {
1376
1280
  let client = !sdk ? await sdkForConsole() : sdk;
1377
-
1378
1281
  let apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1379
1282
  let payload = {};
1380
1283
 
1381
-
1382
1284
  let response = undefined;
1383
-
1285
+
1384
1286
  response = await client.call('delete', apiPath, {
1385
1287
  'content-type': 'application/json',
1386
1288
  }, payload);
1387
1289
 
1388
-
1389
1290
  if (parseOutput) {
1390
1291
  parse(response)
1391
1292
  success()
@@ -1407,21 +1308,18 @@ const projectsDeleteSmsTemplate = async ({ projectId, type, locale, parseOutput
1407
1308
  */
1408
1309
  const projectsGetUsage = async ({ projectId, range, parseOutput = true, sdk = undefined}) => {
1409
1310
  let client = !sdk ? await sdkForConsole() : sdk;
1410
-
1411
1311
  let apiPath = '/projects/{projectId}/usage'.replace('{projectId}', projectId);
1412
1312
  let payload = {};
1413
1313
  if (typeof range !== 'undefined') {
1414
1314
  payload['range'] = range;
1415
1315
  }
1416
1316
 
1417
-
1418
1317
  let response = undefined;
1419
-
1318
+
1420
1319
  response = await client.call('get', apiPath, {
1421
1320
  'content-type': 'application/json',
1422
1321
  }, payload);
1423
1322
 
1424
-
1425
1323
  if (parseOutput) {
1426
1324
  parse(response)
1427
1325
  success()
@@ -1442,18 +1340,15 @@ const projectsGetUsage = async ({ projectId, range, parseOutput = true, sdk = un
1442
1340
  */
1443
1341
  const projectsListWebhooks = async ({ projectId, parseOutput = true, sdk = undefined}) => {
1444
1342
  let client = !sdk ? await sdkForConsole() : sdk;
1445
-
1446
1343
  let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1447
1344
  let payload = {};
1448
1345
 
1449
-
1450
1346
  let response = undefined;
1451
-
1347
+
1452
1348
  response = await client.call('get', apiPath, {
1453
1349
  'content-type': 'application/json',
1454
1350
  }, payload);
1455
1351
 
1456
-
1457
1352
  if (parseOutput) {
1458
1353
  parse(response)
1459
1354
  success()
@@ -1480,7 +1375,6 @@ const projectsListWebhooks = async ({ projectId, parseOutput = true, sdk = undef
1480
1375
  */
1481
1376
  const projectsCreateWebhook = async ({ projectId, name, events, url, security, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
1482
1377
  let client = !sdk ? await sdkForConsole() : sdk;
1483
-
1484
1378
  let apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1485
1379
  let payload = {};
1486
1380
  if (typeof name !== 'undefined') {
@@ -1503,14 +1397,12 @@ const projectsCreateWebhook = async ({ projectId, name, events, url, security, h
1503
1397
  payload['httpPass'] = httpPass;
1504
1398
  }
1505
1399
 
1506
-
1507
1400
  let response = undefined;
1508
-
1401
+
1509
1402
  response = await client.call('post', apiPath, {
1510
1403
  'content-type': 'application/json',
1511
1404
  }, payload);
1512
1405
 
1513
-
1514
1406
  if (parseOutput) {
1515
1407
  parse(response)
1516
1408
  success()
@@ -1532,18 +1424,15 @@ const projectsCreateWebhook = async ({ projectId, name, events, url, security, h
1532
1424
  */
1533
1425
  const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, sdk = undefined}) => {
1534
1426
  let client = !sdk ? await sdkForConsole() : sdk;
1535
-
1536
1427
  let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1537
1428
  let payload = {};
1538
1429
 
1539
-
1540
1430
  let response = undefined;
1541
-
1431
+
1542
1432
  response = await client.call('get', apiPath, {
1543
1433
  'content-type': 'application/json',
1544
1434
  }, payload);
1545
1435
 
1546
-
1547
1436
  if (parseOutput) {
1548
1437
  parse(response)
1549
1438
  success()
@@ -1571,7 +1460,6 @@ const projectsGetWebhook = async ({ projectId, webhookId, parseOutput = true, sd
1571
1460
  */
1572
1461
  const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url, security, httpUser, httpPass, parseOutput = true, sdk = undefined}) => {
1573
1462
  let client = !sdk ? await sdkForConsole() : sdk;
1574
-
1575
1463
  let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1576
1464
  let payload = {};
1577
1465
  if (typeof name !== 'undefined') {
@@ -1594,14 +1482,12 @@ const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url,
1594
1482
  payload['httpPass'] = httpPass;
1595
1483
  }
1596
1484
 
1597
-
1598
1485
  let response = undefined;
1599
-
1486
+
1600
1487
  response = await client.call('put', apiPath, {
1601
1488
  'content-type': 'application/json',
1602
1489
  }, payload);
1603
1490
 
1604
-
1605
1491
  if (parseOutput) {
1606
1492
  parse(response)
1607
1493
  success()
@@ -1623,18 +1509,15 @@ const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url,
1623
1509
  */
1624
1510
  const projectsDeleteWebhook = async ({ projectId, webhookId, parseOutput = true, sdk = undefined}) => {
1625
1511
  let client = !sdk ? await sdkForConsole() : sdk;
1626
-
1627
1512
  let apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1628
1513
  let payload = {};
1629
1514
 
1630
-
1631
1515
  let response = undefined;
1632
-
1516
+
1633
1517
  response = await client.call('delete', apiPath, {
1634
1518
  'content-type': 'application/json',
1635
1519
  }, payload);
1636
1520
 
1637
-
1638
1521
  if (parseOutput) {
1639
1522
  parse(response)
1640
1523
  success()
@@ -1656,18 +1539,15 @@ const projectsDeleteWebhook = async ({ projectId, webhookId, parseOutput = true,
1656
1539
  */
1657
1540
  const projectsUpdateWebhookSignature = async ({ projectId, webhookId, parseOutput = true, sdk = undefined}) => {
1658
1541
  let client = !sdk ? await sdkForConsole() : sdk;
1659
-
1660
1542
  let apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1661
1543
  let payload = {};
1662
1544
 
1663
-
1664
1545
  let response = undefined;
1665
-
1546
+
1666
1547
  response = await client.call('patch', apiPath, {
1667
1548
  'content-type': 'application/json',
1668
1549
  }, payload);
1669
1550
 
1670
-
1671
1551
  if (parseOutput) {
1672
1552
  parse(response)
1673
1553
  success()
@@ -1676,7 +1556,6 @@ const projectsUpdateWebhookSignature = async ({ projectId, webhookId, parseOutpu
1676
1556
  return response;
1677
1557
  }
1678
1558
 
1679
-
1680
1559
  projects
1681
1560
  .command(`list`)
1682
1561
  .description(``)
@@ -2021,47 +1900,46 @@ projects
2021
1900
  .requiredOption(`--webhookId <webhookId>`, `Webhook unique ID.`)
2022
1901
  .action(actionRunner(projectsUpdateWebhookSignature))
2023
1902
 
2024
-
2025
1903
  module.exports = {
2026
1904
  projects,
2027
- projectsList,
2028
- projectsCreate,
2029
- projectsGet,
2030
- projectsUpdate,
2031
- projectsDelete,
2032
- projectsUpdateAuthDuration,
2033
- projectsUpdateAuthLimit,
2034
- projectsUpdateAuthSessionsLimit,
2035
- projectsUpdateAuthPasswordDictionary,
2036
- projectsUpdateAuthPasswordHistory,
2037
- projectsUpdatePersonalDataCheck,
2038
- projectsUpdateAuthStatus,
2039
- projectsListKeys,
2040
- projectsCreateKey,
2041
- projectsGetKey,
2042
- projectsUpdateKey,
2043
- projectsDeleteKey,
2044
- projectsUpdateOAuth2,
2045
- projectsListPlatforms,
2046
- projectsCreatePlatform,
2047
- projectsGetPlatform,
2048
- projectsUpdatePlatform,
2049
- projectsDeletePlatform,
2050
- projectsUpdateServiceStatus,
2051
- projectsUpdateServiceStatusAll,
2052
- projectsUpdateSmtpConfiguration,
2053
- projectsUpdateTeam,
2054
- projectsGetEmailTemplate,
2055
- projectsUpdateEmailTemplate,
2056
- projectsDeleteEmailTemplate,
2057
- projectsGetSmsTemplate,
2058
- projectsUpdateSmsTemplate,
2059
- projectsDeleteSmsTemplate,
2060
- projectsGetUsage,
2061
- projectsListWebhooks,
2062
- projectsCreateWebhook,
2063
- projectsGetWebhook,
2064
- projectsUpdateWebhook,
2065
- projectsDeleteWebhook,
2066
- projectsUpdateWebhookSignature
1905
+ projectsList,
1906
+ projectsCreate,
1907
+ projectsGet,
1908
+ projectsUpdate,
1909
+ projectsDelete,
1910
+ projectsUpdateAuthDuration,
1911
+ projectsUpdateAuthLimit,
1912
+ projectsUpdateAuthSessionsLimit,
1913
+ projectsUpdateAuthPasswordDictionary,
1914
+ projectsUpdateAuthPasswordHistory,
1915
+ projectsUpdatePersonalDataCheck,
1916
+ projectsUpdateAuthStatus,
1917
+ projectsListKeys,
1918
+ projectsCreateKey,
1919
+ projectsGetKey,
1920
+ projectsUpdateKey,
1921
+ projectsDeleteKey,
1922
+ projectsUpdateOAuth2,
1923
+ projectsListPlatforms,
1924
+ projectsCreatePlatform,
1925
+ projectsGetPlatform,
1926
+ projectsUpdatePlatform,
1927
+ projectsDeletePlatform,
1928
+ projectsUpdateServiceStatus,
1929
+ projectsUpdateServiceStatusAll,
1930
+ projectsUpdateSmtpConfiguration,
1931
+ projectsUpdateTeam,
1932
+ projectsGetEmailTemplate,
1933
+ projectsUpdateEmailTemplate,
1934
+ projectsDeleteEmailTemplate,
1935
+ projectsGetSmsTemplate,
1936
+ projectsUpdateSmsTemplate,
1937
+ projectsDeleteSmsTemplate,
1938
+ projectsGetUsage,
1939
+ projectsListWebhooks,
1940
+ projectsCreateWebhook,
1941
+ projectsGetWebhook,
1942
+ projectsUpdateWebhook,
1943
+ projectsDeleteWebhook,
1944
+ projectsUpdateWebhookSignature
2067
1945
  };