appwrite-cli 1.1.1 → 2.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.
Files changed (60) hide show
  1. package/Formula/appwrite.rb +1 -1
  2. package/LICENSE.md +2 -2
  3. package/README.md +4 -4
  4. package/docs/examples/account/create-phone-session.md +1 -1
  5. package/docs/examples/account/create.md +1 -1
  6. package/docs/examples/account/update-password.md +1 -1
  7. package/docs/examples/account/update-phone.md +1 -1
  8. package/docs/examples/console/variables.md +1 -0
  9. package/docs/examples/databases/create-relationship-attribute.md +9 -0
  10. package/docs/examples/databases/get-document.md +2 -1
  11. package/docs/examples/databases/update-boolean-attribute.md +6 -0
  12. package/docs/examples/databases/update-datetime-attribute.md +6 -0
  13. package/docs/examples/databases/update-email-attribute.md +6 -0
  14. package/docs/examples/databases/update-enum-attribute.md +7 -0
  15. package/docs/examples/databases/update-float-attribute.md +8 -0
  16. package/docs/examples/databases/update-integer-attribute.md +8 -0
  17. package/docs/examples/databases/update-ip-attribute.md +6 -0
  18. package/docs/examples/databases/update-relationship-attribute.md +5 -0
  19. package/docs/examples/databases/update-string-attribute.md +6 -0
  20. package/docs/examples/databases/update-url-attribute.md +6 -0
  21. package/docs/examples/functions/{retry-build.md → create-build.md} +1 -1
  22. package/docs/examples/functions/create.md +1 -1
  23. package/docs/examples/functions/update.md +1 -1
  24. package/docs/examples/graphql/mutation.md +2 -0
  25. package/docs/examples/graphql/query.md +2 -0
  26. package/docs/examples/projects/create.md +1 -0
  27. package/docs/examples/projects/update-auth-duration.md +3 -0
  28. package/docs/examples/projects/update-auth-password-dictionary.md +3 -0
  29. package/docs/examples/projects/update-auth-password-history.md +3 -0
  30. package/docs/examples/projects/update-auth-sessions-limit.md +3 -0
  31. package/docs/examples/projects/update-o-auth2.md +1 -0
  32. package/docs/examples/teams/create-membership.md +3 -1
  33. package/docs/examples/teams/get-prefs.md +2 -0
  34. package/docs/examples/teams/{update.md → update-name.md} +1 -1
  35. package/docs/examples/teams/update-prefs.md +3 -0
  36. package/docs/examples/users/update-password.md +1 -1
  37. package/docs/examples/users/update-phone.md +1 -1
  38. package/index.js +16 -1
  39. package/install.ps1 +2 -2
  40. package/install.sh +1 -1
  41. package/lib/client.js +7 -7
  42. package/lib/commands/account.js +46 -11
  43. package/lib/commands/avatars.js +3 -1
  44. package/lib/commands/console.js +44 -0
  45. package/lib/commands/databases.js +735 -109
  46. package/lib/commands/deploy.js +350 -141
  47. package/lib/commands/functions.js +44 -16
  48. package/lib/commands/generic.js +15 -3
  49. package/lib/commands/graphql.js +85 -0
  50. package/lib/commands/health.js +3 -1
  51. package/lib/commands/init.js +224 -162
  52. package/lib/commands/locale.js +3 -1
  53. package/lib/commands/projects.js +223 -9
  54. package/lib/commands/storage.js +43 -13
  55. package/lib/commands/teams.js +107 -19
  56. package/lib/commands/users.js +62 -11
  57. package/lib/config.js +122 -5
  58. package/lib/parser.js +7 -2
  59. package/lib/questions.js +311 -257
  60. package/package.json +1 -1
@@ -10,7 +10,9 @@ const { sdkForProject, sdkForConsole } = require('../sdks')
10
10
  const { parse, actionRunner, parseInteger, parseBool, commandDescriptions, success, log } = require('../parser')
11
11
  const { localConfig, globalConfig } = require("../config");
12
12
 
13
- const projects = new Command("projects").description(commandDescriptions['projects'])
13
+ const projects = new Command("projects").description(commandDescriptions['projects']).configureHelp({
14
+ helpWidth: process.stdout.columns || 80
15
+ })
14
16
 
15
17
  const projectsList = async ({ queries, search, parseOutput = true, sdk = undefined}) => {
16
18
  /* @param {string[]} queries */
@@ -39,10 +41,11 @@ const projectsList = async ({ queries, search, parseOutput = true, sdk = undefin
39
41
  return response;
40
42
  }
41
43
 
42
- const projectsCreate = async ({ projectId, name, teamId, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId, parseOutput = true, sdk = undefined}) => {
44
+ const projectsCreate = async ({ projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId, parseOutput = true, sdk = undefined}) => {
43
45
  /* @param {string} projectId */
44
46
  /* @param {string} name */
45
47
  /* @param {string} teamId */
48
+ /* @param {string} region */
46
49
  /* @param {string} description */
47
50
  /* @param {string} logo */
48
51
  /* @param {string} url */
@@ -58,50 +61,67 @@ const projectsCreate = async ({ projectId, name, teamId, description, logo, url,
58
61
  let payload = {};
59
62
 
60
63
  /** Body Params */
64
+
61
65
  if (typeof projectId !== 'undefined') {
62
66
  payload['projectId'] = projectId;
63
67
  }
64
68
 
69
+
65
70
  if (typeof name !== 'undefined') {
66
71
  payload['name'] = name;
67
72
  }
68
73
 
74
+
69
75
  if (typeof teamId !== 'undefined') {
70
76
  payload['teamId'] = teamId;
71
77
  }
72
78
 
79
+
80
+ if (typeof region !== 'undefined') {
81
+ payload['region'] = region;
82
+ }
83
+
84
+
73
85
  if (typeof description !== 'undefined') {
74
86
  payload['description'] = description;
75
87
  }
76
88
 
89
+
77
90
  if (typeof logo !== 'undefined') {
78
91
  payload['logo'] = logo;
79
92
  }
80
93
 
94
+
81
95
  if (typeof url !== 'undefined') {
82
96
  payload['url'] = url;
83
97
  }
84
98
 
99
+
85
100
  if (typeof legalName !== 'undefined') {
86
101
  payload['legalName'] = legalName;
87
102
  }
88
103
 
104
+
89
105
  if (typeof legalCountry !== 'undefined') {
90
106
  payload['legalCountry'] = legalCountry;
91
107
  }
92
108
 
109
+
93
110
  if (typeof legalState !== 'undefined') {
94
111
  payload['legalState'] = legalState;
95
112
  }
96
113
 
114
+
97
115
  if (typeof legalCity !== 'undefined') {
98
116
  payload['legalCity'] = legalCity;
99
117
  }
100
118
 
119
+
101
120
  if (typeof legalAddress !== 'undefined') {
102
121
  payload['legalAddress'] = legalAddress;
103
122
  }
104
123
 
124
+
105
125
  if (typeof legalTaxId !== 'undefined') {
106
126
  payload['legalTaxId'] = legalTaxId;
107
127
  }
@@ -154,42 +174,52 @@ const projectsUpdate = async ({ projectId, name, description, logo, url, legalNa
154
174
  let payload = {};
155
175
 
156
176
  /** Body Params */
177
+
157
178
  if (typeof name !== 'undefined') {
158
179
  payload['name'] = name;
159
180
  }
160
181
 
182
+
161
183
  if (typeof description !== 'undefined') {
162
184
  payload['description'] = description;
163
185
  }
164
186
 
187
+
165
188
  if (typeof logo !== 'undefined') {
166
189
  payload['logo'] = logo;
167
190
  }
168
191
 
192
+
169
193
  if (typeof url !== 'undefined') {
170
194
  payload['url'] = url;
171
195
  }
172
196
 
197
+
173
198
  if (typeof legalName !== 'undefined') {
174
199
  payload['legalName'] = legalName;
175
200
  }
176
201
 
202
+
177
203
  if (typeof legalCountry !== 'undefined') {
178
204
  payload['legalCountry'] = legalCountry;
179
205
  }
180
206
 
207
+
181
208
  if (typeof legalState !== 'undefined') {
182
209
  payload['legalState'] = legalState;
183
210
  }
184
211
 
212
+
185
213
  if (typeof legalCity !== 'undefined') {
186
214
  payload['legalCity'] = legalCity;
187
215
  }
188
216
 
217
+
189
218
  if (typeof legalAddress !== 'undefined') {
190
219
  payload['legalAddress'] = legalAddress;
191
220
  }
192
221
 
222
+
193
223
  if (typeof legalTaxId !== 'undefined') {
194
224
  payload['legalTaxId'] = legalTaxId;
195
225
  }
@@ -215,6 +245,7 @@ const projectsDelete = async ({ projectId, password, parseOutput = true, sdk = u
215
245
  let payload = {};
216
246
 
217
247
  /** Body Params */
248
+
218
249
  if (typeof password !== 'undefined') {
219
250
  payload['password'] = password;
220
251
  }
@@ -231,6 +262,32 @@ const projectsDelete = async ({ projectId, password, parseOutput = true, sdk = u
231
262
  return response;
232
263
  }
233
264
 
265
+ const projectsUpdateAuthDuration = async ({ projectId, duration, parseOutput = true, sdk = undefined}) => {
266
+ /* @param {string} projectId */
267
+ /* @param {number} duration */
268
+
269
+ let client = !sdk ? await sdkForConsole() : sdk;
270
+ let path = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
271
+ let payload = {};
272
+
273
+ /** Body Params */
274
+
275
+ if (typeof duration !== 'undefined') {
276
+ payload['duration'] = duration;
277
+ }
278
+
279
+ let response = undefined;
280
+ response = await client.call('patch', path, {
281
+ 'content-type': 'application/json',
282
+ }, payload);
283
+
284
+ if (parseOutput) {
285
+ parse(response)
286
+ success()
287
+ }
288
+ return response;
289
+ }
290
+
234
291
  const projectsUpdateAuthLimit = async ({ projectId, limit, parseOutput = true, sdk = undefined}) => {
235
292
  /* @param {string} projectId */
236
293
  /* @param {number} limit */
@@ -240,6 +297,85 @@ const projectsUpdateAuthLimit = async ({ projectId, limit, parseOutput = true, s
240
297
  let payload = {};
241
298
 
242
299
  /** Body Params */
300
+
301
+ if (typeof limit !== 'undefined') {
302
+ payload['limit'] = limit;
303
+ }
304
+
305
+ let response = undefined;
306
+ response = await client.call('patch', path, {
307
+ 'content-type': 'application/json',
308
+ }, payload);
309
+
310
+ if (parseOutput) {
311
+ parse(response)
312
+ success()
313
+ }
314
+ return response;
315
+ }
316
+
317
+ const projectsUpdateAuthSessionsLimit = async ({ projectId, limit, parseOutput = true, sdk = undefined}) => {
318
+ /* @param {string} projectId */
319
+ /* @param {number} limit */
320
+
321
+ let client = !sdk ? await sdkForConsole() : sdk;
322
+ let path = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
323
+ let payload = {};
324
+
325
+ /** Body Params */
326
+
327
+ if (typeof limit !== 'undefined') {
328
+ payload['limit'] = limit;
329
+ }
330
+
331
+ let response = undefined;
332
+ response = await client.call('patch', path, {
333
+ 'content-type': 'application/json',
334
+ }, payload);
335
+
336
+ if (parseOutput) {
337
+ parse(response)
338
+ success()
339
+ }
340
+ return response;
341
+ }
342
+
343
+ const projectsUpdateAuthPasswordDictionary = async ({ projectId, enabled, parseOutput = true, sdk = undefined}) => {
344
+ /* @param {string} projectId */
345
+ /* @param {boolean} enabled */
346
+
347
+ let client = !sdk ? await sdkForConsole() : sdk;
348
+ let path = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
349
+ let payload = {};
350
+
351
+ /** Body Params */
352
+
353
+ if (typeof enabled !== 'undefined') {
354
+ payload['enabled'] = enabled;
355
+ }
356
+
357
+ let response = undefined;
358
+ response = await client.call('patch', path, {
359
+ 'content-type': 'application/json',
360
+ }, payload);
361
+
362
+ if (parseOutput) {
363
+ parse(response)
364
+ success()
365
+ }
366
+ return response;
367
+ }
368
+
369
+ const projectsUpdateAuthPasswordHistory = async ({ projectId, limit, parseOutput = true, sdk = undefined}) => {
370
+ /* @param {string} projectId */
371
+ /* @param {number} limit */
372
+
373
+ let client = !sdk ? await sdkForConsole() : sdk;
374
+ let path = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
375
+ let payload = {};
376
+
377
+ /** Body Params */
378
+
243
379
  if (typeof limit !== 'undefined') {
244
380
  payload['limit'] = limit;
245
381
  }
@@ -266,6 +402,7 @@ const projectsUpdateAuthStatus = async ({ projectId, method, status, parseOutput
266
402
  let payload = {};
267
403
 
268
404
  /** Body Params */
405
+
269
406
  if (typeof status !== 'undefined') {
270
407
  payload['status'] = status;
271
408
  }
@@ -309,6 +446,7 @@ const projectsCreateDomain = async ({ projectId, domain, parseOutput = true, sdk
309
446
  let payload = {};
310
447
 
311
448
  /** Body Params */
449
+
312
450
  if (typeof domain !== 'undefined') {
313
451
  payload['domain'] = domain;
314
452
  }
@@ -411,14 +549,18 @@ const projectsCreateKey = async ({ projectId, name, scopes, expire, parseOutput
411
549
  let payload = {};
412
550
 
413
551
  /** Body Params */
552
+
414
553
  if (typeof name !== 'undefined') {
415
554
  payload['name'] = name;
416
555
  }
417
556
 
557
+ scopes = scopes === true ? [] : scopes;
558
+
418
559
  if (typeof scopes !== 'undefined') {
419
560
  payload['scopes'] = scopes;
420
561
  }
421
562
 
563
+
422
564
  if (typeof expire !== 'undefined') {
423
565
  payload['expire'] = expire;
424
566
  }
@@ -466,14 +608,18 @@ const projectsUpdateKey = async ({ projectId, keyId, name, scopes, expire, parse
466
608
  let payload = {};
467
609
 
468
610
  /** Body Params */
611
+
469
612
  if (typeof name !== 'undefined') {
470
613
  payload['name'] = name;
471
614
  }
472
615
 
616
+ scopes = scopes === true ? [] : scopes;
617
+
473
618
  if (typeof scopes !== 'undefined') {
474
619
  payload['scopes'] = scopes;
475
620
  }
476
621
 
622
+
477
623
  if (typeof expire !== 'undefined') {
478
624
  payload['expire'] = expire;
479
625
  }
@@ -509,29 +655,38 @@ const projectsDeleteKey = async ({ projectId, keyId, parseOutput = true, sdk = u
509
655
  return response;
510
656
  }
511
657
 
512
- const projectsUpdateOAuth2 = async ({ projectId, provider, appId, secret, parseOutput = true, sdk = undefined}) => {
658
+ const projectsUpdateOAuth2 = async ({ projectId, provider, appId, secret, enabled, parseOutput = true, sdk = undefined}) => {
513
659
  /* @param {string} projectId */
514
660
  /* @param {string} provider */
515
661
  /* @param {string} appId */
516
662
  /* @param {string} secret */
663
+ /* @param {boolean} enabled */
517
664
 
518
665
  let client = !sdk ? await sdkForConsole() : sdk;
519
666
  let path = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
520
667
  let payload = {};
521
668
 
522
669
  /** Body Params */
670
+
523
671
  if (typeof provider !== 'undefined') {
524
672
  payload['provider'] = provider;
525
673
  }
526
674
 
675
+
527
676
  if (typeof appId !== 'undefined') {
528
677
  payload['appId'] = appId;
529
678
  }
530
679
 
680
+
531
681
  if (typeof secret !== 'undefined') {
532
682
  payload['secret'] = secret;
533
683
  }
534
684
 
685
+
686
+ if (typeof enabled !== 'undefined') {
687
+ payload['enabled'] = enabled;
688
+ }
689
+
535
690
  let response = undefined;
536
691
  response = await client.call('patch', path, {
537
692
  'content-type': 'application/json',
@@ -575,22 +730,27 @@ const projectsCreatePlatform = async ({ projectId, type, name, key, store, hostn
575
730
  let payload = {};
576
731
 
577
732
  /** Body Params */
733
+
578
734
  if (typeof type !== 'undefined') {
579
735
  payload['type'] = type;
580
736
  }
581
737
 
738
+
582
739
  if (typeof name !== 'undefined') {
583
740
  payload['name'] = name;
584
741
  }
585
742
 
743
+
586
744
  if (typeof key !== 'undefined') {
587
745
  payload['key'] = key;
588
746
  }
589
747
 
748
+
590
749
  if (typeof store !== 'undefined') {
591
750
  payload['store'] = store;
592
751
  }
593
752
 
753
+
594
754
  if (typeof hostname !== 'undefined') {
595
755
  payload['hostname'] = hostname;
596
756
  }
@@ -639,18 +799,22 @@ const projectsUpdatePlatform = async ({ projectId, platformId, name, key, store,
639
799
  let payload = {};
640
800
 
641
801
  /** Body Params */
802
+
642
803
  if (typeof name !== 'undefined') {
643
804
  payload['name'] = name;
644
805
  }
645
806
 
807
+
646
808
  if (typeof key !== 'undefined') {
647
809
  payload['key'] = key;
648
810
  }
649
811
 
812
+
650
813
  if (typeof store !== 'undefined') {
651
814
  payload['store'] = store;
652
815
  }
653
816
 
817
+
654
818
  if (typeof hostname !== 'undefined') {
655
819
  payload['hostname'] = hostname;
656
820
  }
@@ -696,10 +860,12 @@ const projectsUpdateServiceStatus = async ({ projectId, service, status, parseOu
696
860
  let payload = {};
697
861
 
698
862
  /** Body Params */
863
+
699
864
  if (typeof service !== 'undefined') {
700
865
  payload['service'] = service;
701
866
  }
702
867
 
868
+
703
869
  if (typeof status !== 'undefined') {
704
870
  payload['status'] = status;
705
871
  }
@@ -772,26 +938,33 @@ const projectsCreateWebhook = async ({ projectId, name, events, url, security, h
772
938
  let payload = {};
773
939
 
774
940
  /** Body Params */
941
+
775
942
  if (typeof name !== 'undefined') {
776
943
  payload['name'] = name;
777
944
  }
778
945
 
946
+ events = events === true ? [] : events;
947
+
779
948
  if (typeof events !== 'undefined') {
780
949
  payload['events'] = events;
781
950
  }
782
951
 
952
+
783
953
  if (typeof url !== 'undefined') {
784
954
  payload['url'] = url;
785
955
  }
786
956
 
957
+
787
958
  if (typeof security !== 'undefined') {
788
959
  payload['security'] = security;
789
960
  }
790
961
 
962
+
791
963
  if (typeof httpUser !== 'undefined') {
792
964
  payload['httpUser'] = httpUser;
793
965
  }
794
966
 
967
+
795
968
  if (typeof httpPass !== 'undefined') {
796
969
  payload['httpPass'] = httpPass;
797
970
  }
@@ -842,26 +1015,33 @@ const projectsUpdateWebhook = async ({ projectId, webhookId, name, events, url,
842
1015
  let payload = {};
843
1016
 
844
1017
  /** Body Params */
1018
+
845
1019
  if (typeof name !== 'undefined') {
846
1020
  payload['name'] = name;
847
1021
  }
848
1022
 
1023
+ events = events === true ? [] : events;
1024
+
849
1025
  if (typeof events !== 'undefined') {
850
1026
  payload['events'] = events;
851
1027
  }
852
1028
 
1029
+
853
1030
  if (typeof url !== 'undefined') {
854
1031
  payload['url'] = url;
855
1032
  }
856
1033
 
1034
+
857
1035
  if (typeof security !== 'undefined') {
858
1036
  payload['security'] = security;
859
1037
  }
860
1038
 
1039
+
861
1040
  if (typeof httpUser !== 'undefined') {
862
1041
  payload['httpUser'] = httpUser;
863
1042
  }
864
1043
 
1044
+
865
1045
  if (typeof httpPass !== 'undefined') {
866
1046
  payload['httpPass'] = httpPass;
867
1047
  }
@@ -920,16 +1100,17 @@ const projectsUpdateWebhookSignature = async ({ projectId, webhookId, parseOutpu
920
1100
  projects
921
1101
  .command(`list`)
922
1102
  .description(``)
923
- .option(`--queries <queries...>`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name`)
1103
+ .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, teamId`)
924
1104
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
925
1105
  .action(actionRunner(projectsList))
926
1106
 
927
1107
  projects
928
1108
  .command(`create`)
929
1109
  .description(``)
930
- .requiredOption(`--projectId <projectId>`, `Unique Id. Choose your own unique ID or pass the string "unique()" to auto generate it. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
1110
+ .requiredOption(`--projectId <projectId>`, `Unique Id. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
931
1111
  .requiredOption(`--name <name>`, `Project name. Max length: 128 chars.`)
932
1112
  .requiredOption(`--teamId <teamId>`, `Team unique ID.`)
1113
+ .option(`--region <region>`, `Project Region.`)
933
1114
  .option(`--description <description>`, `Project description. Max length: 256 chars.`)
934
1115
  .option(`--logo <logo>`, `Project logo.`)
935
1116
  .option(`--url <url>`, `Project URL.`)
@@ -970,6 +1151,13 @@ projects
970
1151
  .requiredOption(`--password <password>`, `Your user password for confirmation. Must be at least 8 chars.`)
971
1152
  .action(actionRunner(projectsDelete))
972
1153
 
1154
+ projects
1155
+ .command(`updateAuthDuration`)
1156
+ .description(``)
1157
+ .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1158
+ .requiredOption(`--duration <duration>`, `Project session length in seconds. Max length: 31536000 seconds.`, parseInteger)
1159
+ .action(actionRunner(projectsUpdateAuthDuration))
1160
+
973
1161
  projects
974
1162
  .command(`updateAuthLimit`)
975
1163
  .description(``)
@@ -977,6 +1165,27 @@ projects
977
1165
  .requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Use 0 for unlimited.`, parseInteger)
978
1166
  .action(actionRunner(projectsUpdateAuthLimit))
979
1167
 
1168
+ projects
1169
+ .command(`updateAuthSessionsLimit`)
1170
+ .description(``)
1171
+ .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1172
+ .requiredOption(`--limit <limit>`, `Set the max number of users allowed in this project. Value allowed is between 1-100. Default is 10`, parseInteger)
1173
+ .action(actionRunner(projectsUpdateAuthSessionsLimit))
1174
+
1175
+ projects
1176
+ .command(`updateAuthPasswordDictionary`)
1177
+ .description(``)
1178
+ .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1179
+ .requiredOption(`--enabled <enabled>`, `Set whether or not to enable checking user's password against most commonly used passwords. Default is false.`, parseBool)
1180
+ .action(actionRunner(projectsUpdateAuthPasswordDictionary))
1181
+
1182
+ projects
1183
+ .command(`updateAuthPasswordHistory`)
1184
+ .description(``)
1185
+ .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1186
+ .requiredOption(`--limit <limit>`, `Set the max number of passwords to store in user history. User can't choose a new password that is already stored in the password history list. Max number of passwords allowed in history is20. Default value is 0`, parseInteger)
1187
+ .action(actionRunner(projectsUpdateAuthPasswordHistory))
1188
+
980
1189
  projects
981
1190
  .command(`updateAuthStatus`)
982
1191
  .description(``)
@@ -1030,7 +1239,7 @@ projects
1030
1239
  .description(``)
1031
1240
  .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1032
1241
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
1033
- .requiredOption(`--scopes <scopes...>`, `Key scopes list. Maximum of 100 scopes are allowed.`)
1242
+ .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 scopes are allowed.`)
1034
1243
  .option(`--expire <expire>`, `Expiration time in ISO 8601 format. Use null for unlimited expiration.`)
1035
1244
  .action(actionRunner(projectsCreateKey))
1036
1245
 
@@ -1047,7 +1256,7 @@ projects
1047
1256
  .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1048
1257
  .requiredOption(`--keyId <keyId>`, `Key unique ID.`)
1049
1258
  .requiredOption(`--name <name>`, `Key name. Max length: 128 chars.`)
1050
- .requiredOption(`--scopes <scopes...>`, `Key scopes list. Maximum of 100 events are allowed.`)
1259
+ .requiredOption(`--scopes [scopes...]`, `Key scopes list. Maximum of 100 events are allowed.`)
1051
1260
  .option(`--expire <expire>`, `Expiration time in ISO 8601 format. Use null for unlimited expiration.`)
1052
1261
  .action(actionRunner(projectsUpdateKey))
1053
1262
 
@@ -1065,6 +1274,7 @@ projects
1065
1274
  .requiredOption(`--provider <provider>`, `Provider Name`)
1066
1275
  .option(`--appId <appId>`, `Provider app ID. Max length: 256 chars.`)
1067
1276
  .option(`--secret <secret>`, `Provider secret key. Max length: 512 chars.`)
1277
+ .option(`--enabled <enabled>`, `Provider status. Set to 'false' to disable new session creation.`, parseBool)
1068
1278
  .action(actionRunner(projectsUpdateOAuth2))
1069
1279
 
1070
1280
  projects
@@ -1135,7 +1345,7 @@ projects
1135
1345
  .description(``)
1136
1346
  .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1137
1347
  .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
1138
- .requiredOption(`--events <events...>`, `Events list. Maximum of 100 events are allowed.`)
1348
+ .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
1139
1349
  .requiredOption(`--url <url>`, `Webhook URL.`)
1140
1350
  .requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
1141
1351
  .option(`--httpUser <httpUser>`, `Webhook HTTP user. Max length: 256 chars.`)
@@ -1155,7 +1365,7 @@ projects
1155
1365
  .requiredOption(`--projectId <projectId>`, `Project unique ID.`)
1156
1366
  .requiredOption(`--webhookId <webhookId>`, `Webhook unique ID.`)
1157
1367
  .requiredOption(`--name <name>`, `Webhook name. Max length: 128 chars.`)
1158
- .requiredOption(`--events <events...>`, `Events list. Maximum of 100 events are allowed.`)
1368
+ .requiredOption(`--events [events...]`, `Events list. Maximum of 100 events are allowed.`)
1159
1369
  .requiredOption(`--url <url>`, `Webhook URL.`)
1160
1370
  .requiredOption(`--security <security>`, `Certificate verification, false for disabled or true for enabled.`, parseBool)
1161
1371
  .option(`--httpUser <httpUser>`, `Webhook HTTP user. Max length: 256 chars.`)
@@ -1184,7 +1394,11 @@ module.exports = {
1184
1394
  projectsGet,
1185
1395
  projectsUpdate,
1186
1396
  projectsDelete,
1397
+ projectsUpdateAuthDuration,
1187
1398
  projectsUpdateAuthLimit,
1399
+ projectsUpdateAuthSessionsLimit,
1400
+ projectsUpdateAuthPasswordDictionary,
1401
+ projectsUpdateAuthPasswordHistory,
1188
1402
  projectsUpdateAuthStatus,
1189
1403
  projectsListDomains,
1190
1404
  projectsCreateDomain,