@appwrite.io/console 8.2.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/sdk.js CHANGED
@@ -580,8 +580,8 @@ class Client {
580
580
  'x-sdk-name': 'Console',
581
581
  'x-sdk-platform': 'console',
582
582
  'x-sdk-language': 'web',
583
- 'x-sdk-version': '8.2.0',
584
- 'X-Appwrite-Response-Format': '1.9.0',
583
+ 'x-sdk-version': '9.0.0',
584
+ 'X-Appwrite-Response-Format': '1.9.1',
585
585
  };
586
586
  this.realtime = {
587
587
  socket: undefined,
@@ -4855,7 +4855,8 @@ class Databases {
4855
4855
  name: rest[1],
4856
4856
  permissions: rest[2],
4857
4857
  documentSecurity: rest[3],
4858
- enabled: rest[4]
4858
+ enabled: rest[4],
4859
+ purge: rest[5]
4859
4860
  };
4860
4861
  }
4861
4862
  const databaseId = params.databaseId;
@@ -4864,6 +4865,7 @@ class Databases {
4864
4865
  const permissions = params.permissions;
4865
4866
  const documentSecurity = params.documentSecurity;
4866
4867
  const enabled = params.enabled;
4868
+ const purge = params.purge;
4867
4869
  if (typeof databaseId === 'undefined') {
4868
4870
  throw new AppwriteException('Missing required parameter: "databaseId"');
4869
4871
  }
@@ -4884,6 +4886,9 @@ class Databases {
4884
4886
  if (typeof enabled !== 'undefined') {
4885
4887
  payload['enabled'] = enabled;
4886
4888
  }
4889
+ if (typeof purge !== 'undefined') {
4890
+ payload['purge'] = purge;
4891
+ }
4887
4892
  const uri = new URL(this.client.config.endpoint + apiPath);
4888
4893
  const apiHeaders = {
4889
4894
  'content-type': 'application/json',
@@ -15374,6 +15379,152 @@ class Organizations {
15374
15379
  };
15375
15380
  return this.client.call('delete', uri, apiHeaders, payload);
15376
15381
  }
15382
+ listAddons(paramsOrFirst) {
15383
+ let params;
15384
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15385
+ params = (paramsOrFirst || {});
15386
+ }
15387
+ else {
15388
+ params = {
15389
+ organizationId: paramsOrFirst
15390
+ };
15391
+ }
15392
+ const organizationId = params.organizationId;
15393
+ if (typeof organizationId === 'undefined') {
15394
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15395
+ }
15396
+ const apiPath = '/organizations/{organizationId}/addons'.replace('{organizationId}', organizationId);
15397
+ const payload = {};
15398
+ const uri = new URL(this.client.config.endpoint + apiPath);
15399
+ const apiHeaders = {};
15400
+ return this.client.call('get', uri, apiHeaders, payload);
15401
+ }
15402
+ createBaaAddon(paramsOrFirst) {
15403
+ let params;
15404
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15405
+ params = (paramsOrFirst || {});
15406
+ }
15407
+ else {
15408
+ params = {
15409
+ organizationId: paramsOrFirst
15410
+ };
15411
+ }
15412
+ const organizationId = params.organizationId;
15413
+ if (typeof organizationId === 'undefined') {
15414
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15415
+ }
15416
+ const apiPath = '/organizations/{organizationId}/addons/baa'.replace('{organizationId}', organizationId);
15417
+ const payload = {};
15418
+ const uri = new URL(this.client.config.endpoint + apiPath);
15419
+ const apiHeaders = {
15420
+ 'content-type': 'application/json',
15421
+ };
15422
+ return this.client.call('post', uri, apiHeaders, payload);
15423
+ }
15424
+ getAddon(paramsOrFirst, ...rest) {
15425
+ let params;
15426
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15427
+ params = (paramsOrFirst || {});
15428
+ }
15429
+ else {
15430
+ params = {
15431
+ organizationId: paramsOrFirst,
15432
+ addonId: rest[0]
15433
+ };
15434
+ }
15435
+ const organizationId = params.organizationId;
15436
+ const addonId = params.addonId;
15437
+ if (typeof organizationId === 'undefined') {
15438
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15439
+ }
15440
+ if (typeof addonId === 'undefined') {
15441
+ throw new AppwriteException('Missing required parameter: "addonId"');
15442
+ }
15443
+ const apiPath = '/organizations/{organizationId}/addons/{addonId}'.replace('{organizationId}', organizationId).replace('{addonId}', addonId);
15444
+ const payload = {};
15445
+ const uri = new URL(this.client.config.endpoint + apiPath);
15446
+ const apiHeaders = {};
15447
+ return this.client.call('get', uri, apiHeaders, payload);
15448
+ }
15449
+ deleteAddon(paramsOrFirst, ...rest) {
15450
+ let params;
15451
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15452
+ params = (paramsOrFirst || {});
15453
+ }
15454
+ else {
15455
+ params = {
15456
+ organizationId: paramsOrFirst,
15457
+ addonId: rest[0]
15458
+ };
15459
+ }
15460
+ const organizationId = params.organizationId;
15461
+ const addonId = params.addonId;
15462
+ if (typeof organizationId === 'undefined') {
15463
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15464
+ }
15465
+ if (typeof addonId === 'undefined') {
15466
+ throw new AppwriteException('Missing required parameter: "addonId"');
15467
+ }
15468
+ const apiPath = '/organizations/{organizationId}/addons/{addonId}'.replace('{organizationId}', organizationId).replace('{addonId}', addonId);
15469
+ const payload = {};
15470
+ const uri = new URL(this.client.config.endpoint + apiPath);
15471
+ const apiHeaders = {
15472
+ 'content-type': 'application/json',
15473
+ };
15474
+ return this.client.call('delete', uri, apiHeaders, payload);
15475
+ }
15476
+ confirmAddonPayment(paramsOrFirst, ...rest) {
15477
+ let params;
15478
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15479
+ params = (paramsOrFirst || {});
15480
+ }
15481
+ else {
15482
+ params = {
15483
+ organizationId: paramsOrFirst,
15484
+ addonId: rest[0]
15485
+ };
15486
+ }
15487
+ const organizationId = params.organizationId;
15488
+ const addonId = params.addonId;
15489
+ if (typeof organizationId === 'undefined') {
15490
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15491
+ }
15492
+ if (typeof addonId === 'undefined') {
15493
+ throw new AppwriteException('Missing required parameter: "addonId"');
15494
+ }
15495
+ const apiPath = '/organizations/{organizationId}/addons/{addonId}/confirmations'.replace('{organizationId}', organizationId).replace('{addonId}', addonId);
15496
+ const payload = {};
15497
+ const uri = new URL(this.client.config.endpoint + apiPath);
15498
+ const apiHeaders = {
15499
+ 'content-type': 'application/json',
15500
+ };
15501
+ return this.client.call('post', uri, apiHeaders, payload);
15502
+ }
15503
+ getAddonPrice(paramsOrFirst, ...rest) {
15504
+ let params;
15505
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15506
+ params = (paramsOrFirst || {});
15507
+ }
15508
+ else {
15509
+ params = {
15510
+ organizationId: paramsOrFirst,
15511
+ addon: rest[0]
15512
+ };
15513
+ }
15514
+ const organizationId = params.organizationId;
15515
+ const addon = params.addon;
15516
+ if (typeof organizationId === 'undefined') {
15517
+ throw new AppwriteException('Missing required parameter: "organizationId"');
15518
+ }
15519
+ if (typeof addon === 'undefined') {
15520
+ throw new AppwriteException('Missing required parameter: "addon"');
15521
+ }
15522
+ const apiPath = '/organizations/{organizationId}/addons/{addon}/price'.replace('{organizationId}', organizationId).replace('{addon}', addon);
15523
+ const payload = {};
15524
+ const uri = new URL(this.client.config.endpoint + apiPath);
15525
+ const apiHeaders = {};
15526
+ return this.client.call('get', uri, apiHeaders, payload);
15527
+ }
15377
15528
  listAggregations(paramsOrFirst, ...rest) {
15378
15529
  let params;
15379
15530
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -16491,43 +16642,82 @@ class Project {
16491
16642
  constructor(client) {
16492
16643
  this.client = client;
16493
16644
  }
16494
- getUsage(paramsOrFirst, ...rest) {
16645
+ updateCanonicalEmails(paramsOrFirst) {
16495
16646
  let params;
16496
16647
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16497
16648
  params = (paramsOrFirst || {});
16498
16649
  }
16499
16650
  else {
16500
16651
  params = {
16501
- startDate: paramsOrFirst,
16502
- endDate: rest[0],
16503
- period: rest[1]
16652
+ enabled: paramsOrFirst
16504
16653
  };
16505
16654
  }
16506
- const startDate = params.startDate;
16507
- const endDate = params.endDate;
16508
- const period = params.period;
16509
- if (typeof startDate === 'undefined') {
16510
- throw new AppwriteException('Missing required parameter: "startDate"');
16655
+ const enabled = params.enabled;
16656
+ if (typeof enabled === 'undefined') {
16657
+ throw new AppwriteException('Missing required parameter: "enabled"');
16511
16658
  }
16512
- if (typeof endDate === 'undefined') {
16513
- throw new AppwriteException('Missing required parameter: "endDate"');
16659
+ const apiPath = '/project/auth/canonical-emails';
16660
+ const payload = {};
16661
+ if (typeof enabled !== 'undefined') {
16662
+ payload['enabled'] = enabled;
16514
16663
  }
16515
- const apiPath = '/project/usage';
16664
+ const uri = new URL(this.client.config.endpoint + apiPath);
16665
+ const apiHeaders = {
16666
+ 'content-type': 'application/json',
16667
+ };
16668
+ return this.client.call('patch', uri, apiHeaders, payload);
16669
+ }
16670
+ updateDisposableEmails(paramsOrFirst) {
16671
+ let params;
16672
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16673
+ params = (paramsOrFirst || {});
16674
+ }
16675
+ else {
16676
+ params = {
16677
+ enabled: paramsOrFirst
16678
+ };
16679
+ }
16680
+ const enabled = params.enabled;
16681
+ if (typeof enabled === 'undefined') {
16682
+ throw new AppwriteException('Missing required parameter: "enabled"');
16683
+ }
16684
+ const apiPath = '/project/auth/disposable-emails';
16516
16685
  const payload = {};
16517
- if (typeof startDate !== 'undefined') {
16518
- payload['startDate'] = startDate;
16686
+ if (typeof enabled !== 'undefined') {
16687
+ payload['enabled'] = enabled;
16519
16688
  }
16520
- if (typeof endDate !== 'undefined') {
16521
- payload['endDate'] = endDate;
16689
+ const uri = new URL(this.client.config.endpoint + apiPath);
16690
+ const apiHeaders = {
16691
+ 'content-type': 'application/json',
16692
+ };
16693
+ return this.client.call('patch', uri, apiHeaders, payload);
16694
+ }
16695
+ updateFreeEmails(paramsOrFirst) {
16696
+ let params;
16697
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16698
+ params = (paramsOrFirst || {});
16522
16699
  }
16523
- if (typeof period !== 'undefined') {
16524
- payload['period'] = period;
16700
+ else {
16701
+ params = {
16702
+ enabled: paramsOrFirst
16703
+ };
16704
+ }
16705
+ const enabled = params.enabled;
16706
+ if (typeof enabled === 'undefined') {
16707
+ throw new AppwriteException('Missing required parameter: "enabled"');
16708
+ }
16709
+ const apiPath = '/project/auth/free-emails';
16710
+ const payload = {};
16711
+ if (typeof enabled !== 'undefined') {
16712
+ payload['enabled'] = enabled;
16525
16713
  }
16526
16714
  const uri = new URL(this.client.config.endpoint + apiPath);
16527
- const apiHeaders = {};
16528
- return this.client.call('get', uri, apiHeaders, payload);
16715
+ const apiHeaders = {
16716
+ 'content-type': 'application/json',
16717
+ };
16718
+ return this.client.call('patch', uri, apiHeaders, payload);
16529
16719
  }
16530
- listVariables(paramsOrFirst, ...rest) {
16720
+ listKeys(paramsOrFirst, ...rest) {
16531
16721
  let params;
16532
16722
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16533
16723
  params = (paramsOrFirst || {});
@@ -16540,7 +16730,7 @@ class Project {
16540
16730
  }
16541
16731
  const queries = params.queries;
16542
16732
  const total = params.total;
16543
- const apiPath = '/project/variables';
16733
+ const apiPath = '/project/keys';
16544
16734
  const payload = {};
16545
16735
  if (typeof queries !== 'undefined') {
16546
16736
  payload['queries'] = queries;
@@ -16552,45 +16742,45 @@ class Project {
16552
16742
  const apiHeaders = {};
16553
16743
  return this.client.call('get', uri, apiHeaders, payload);
16554
16744
  }
16555
- createVariable(paramsOrFirst, ...rest) {
16745
+ createKey(paramsOrFirst, ...rest) {
16556
16746
  let params;
16557
16747
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16558
16748
  params = (paramsOrFirst || {});
16559
16749
  }
16560
16750
  else {
16561
16751
  params = {
16562
- variableId: paramsOrFirst,
16563
- key: rest[0],
16564
- value: rest[1],
16565
- secret: rest[2]
16752
+ keyId: paramsOrFirst,
16753
+ name: rest[0],
16754
+ scopes: rest[1],
16755
+ expire: rest[2]
16566
16756
  };
16567
16757
  }
16568
- const variableId = params.variableId;
16569
- const key = params.key;
16570
- const value = params.value;
16571
- const secret = params.secret;
16572
- if (typeof variableId === 'undefined') {
16573
- throw new AppwriteException('Missing required parameter: "variableId"');
16758
+ const keyId = params.keyId;
16759
+ const name = params.name;
16760
+ const scopes = params.scopes;
16761
+ const expire = params.expire;
16762
+ if (typeof keyId === 'undefined') {
16763
+ throw new AppwriteException('Missing required parameter: "keyId"');
16574
16764
  }
16575
- if (typeof key === 'undefined') {
16576
- throw new AppwriteException('Missing required parameter: "key"');
16765
+ if (typeof name === 'undefined') {
16766
+ throw new AppwriteException('Missing required parameter: "name"');
16577
16767
  }
16578
- if (typeof value === 'undefined') {
16579
- throw new AppwriteException('Missing required parameter: "value"');
16768
+ if (typeof scopes === 'undefined') {
16769
+ throw new AppwriteException('Missing required parameter: "scopes"');
16580
16770
  }
16581
- const apiPath = '/project/variables';
16771
+ const apiPath = '/project/keys';
16582
16772
  const payload = {};
16583
- if (typeof variableId !== 'undefined') {
16584
- payload['variableId'] = variableId;
16773
+ if (typeof keyId !== 'undefined') {
16774
+ payload['keyId'] = keyId;
16585
16775
  }
16586
- if (typeof key !== 'undefined') {
16587
- payload['key'] = key;
16776
+ if (typeof name !== 'undefined') {
16777
+ payload['name'] = name;
16588
16778
  }
16589
- if (typeof value !== 'undefined') {
16590
- payload['value'] = value;
16779
+ if (typeof scopes !== 'undefined') {
16780
+ payload['scopes'] = scopes;
16591
16781
  }
16592
- if (typeof secret !== 'undefined') {
16593
- payload['secret'] = secret;
16782
+ if (typeof expire !== 'undefined') {
16783
+ payload['expire'] = expire;
16594
16784
  }
16595
16785
  const uri = new URL(this.client.config.endpoint + apiPath);
16596
16786
  const apiHeaders = {
@@ -16598,56 +16788,62 @@ class Project {
16598
16788
  };
16599
16789
  return this.client.call('post', uri, apiHeaders, payload);
16600
16790
  }
16601
- getVariable(paramsOrFirst) {
16791
+ getKey(paramsOrFirst) {
16602
16792
  let params;
16603
16793
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16604
16794
  params = (paramsOrFirst || {});
16605
16795
  }
16606
16796
  else {
16607
16797
  params = {
16608
- variableId: paramsOrFirst
16798
+ keyId: paramsOrFirst
16609
16799
  };
16610
16800
  }
16611
- const variableId = params.variableId;
16612
- if (typeof variableId === 'undefined') {
16613
- throw new AppwriteException('Missing required parameter: "variableId"');
16801
+ const keyId = params.keyId;
16802
+ if (typeof keyId === 'undefined') {
16803
+ throw new AppwriteException('Missing required parameter: "keyId"');
16614
16804
  }
16615
- const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
16805
+ const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
16616
16806
  const payload = {};
16617
16807
  const uri = new URL(this.client.config.endpoint + apiPath);
16618
16808
  const apiHeaders = {};
16619
16809
  return this.client.call('get', uri, apiHeaders, payload);
16620
16810
  }
16621
- updateVariable(paramsOrFirst, ...rest) {
16811
+ updateKey(paramsOrFirst, ...rest) {
16622
16812
  let params;
16623
16813
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16624
16814
  params = (paramsOrFirst || {});
16625
16815
  }
16626
16816
  else {
16627
16817
  params = {
16628
- variableId: paramsOrFirst,
16629
- key: rest[0],
16630
- value: rest[1],
16631
- secret: rest[2]
16818
+ keyId: paramsOrFirst,
16819
+ name: rest[0],
16820
+ scopes: rest[1],
16821
+ expire: rest[2]
16632
16822
  };
16633
16823
  }
16634
- const variableId = params.variableId;
16635
- const key = params.key;
16636
- const value = params.value;
16637
- const secret = params.secret;
16638
- if (typeof variableId === 'undefined') {
16639
- throw new AppwriteException('Missing required parameter: "variableId"');
16824
+ const keyId = params.keyId;
16825
+ const name = params.name;
16826
+ const scopes = params.scopes;
16827
+ const expire = params.expire;
16828
+ if (typeof keyId === 'undefined') {
16829
+ throw new AppwriteException('Missing required parameter: "keyId"');
16640
16830
  }
16641
- const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
16831
+ if (typeof name === 'undefined') {
16832
+ throw new AppwriteException('Missing required parameter: "name"');
16833
+ }
16834
+ if (typeof scopes === 'undefined') {
16835
+ throw new AppwriteException('Missing required parameter: "scopes"');
16836
+ }
16837
+ const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
16642
16838
  const payload = {};
16643
- if (typeof key !== 'undefined') {
16644
- payload['key'] = key;
16839
+ if (typeof name !== 'undefined') {
16840
+ payload['name'] = name;
16645
16841
  }
16646
- if (typeof value !== 'undefined') {
16647
- payload['value'] = value;
16842
+ if (typeof scopes !== 'undefined') {
16843
+ payload['scopes'] = scopes;
16648
16844
  }
16649
- if (typeof secret !== 'undefined') {
16650
- payload['secret'] = secret;
16845
+ if (typeof expire !== 'undefined') {
16846
+ payload['expire'] = expire;
16651
16847
  }
16652
16848
  const uri = new URL(this.client.config.endpoint + apiPath);
16653
16849
  const apiHeaders = {
@@ -16655,21 +16851,21 @@ class Project {
16655
16851
  };
16656
16852
  return this.client.call('put', uri, apiHeaders, payload);
16657
16853
  }
16658
- deleteVariable(paramsOrFirst) {
16854
+ deleteKey(paramsOrFirst) {
16659
16855
  let params;
16660
16856
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16661
16857
  params = (paramsOrFirst || {});
16662
16858
  }
16663
16859
  else {
16664
16860
  params = {
16665
- variableId: paramsOrFirst
16861
+ keyId: paramsOrFirst
16666
16862
  };
16667
16863
  }
16668
- const variableId = params.variableId;
16669
- if (typeof variableId === 'undefined') {
16670
- throw new AppwriteException('Missing required parameter: "variableId"');
16864
+ const keyId = params.keyId;
16865
+ if (typeof keyId === 'undefined') {
16866
+ throw new AppwriteException('Missing required parameter: "keyId"');
16671
16867
  }
16672
- const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
16868
+ const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
16673
16869
  const payload = {};
16674
16870
  const uri = new URL(this.client.config.endpoint + apiPath);
16675
16871
  const apiHeaders = {
@@ -16677,13 +16873,32 @@ class Project {
16677
16873
  };
16678
16874
  return this.client.call('delete', uri, apiHeaders, payload);
16679
16875
  }
16680
- }
16681
-
16682
- class Projects {
16683
- constructor(client) {
16684
- this.client = client;
16876
+ updateLabels(paramsOrFirst) {
16877
+ let params;
16878
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16879
+ params = (paramsOrFirst || {});
16880
+ }
16881
+ else {
16882
+ params = {
16883
+ labels: paramsOrFirst
16884
+ };
16885
+ }
16886
+ const labels = params.labels;
16887
+ if (typeof labels === 'undefined') {
16888
+ throw new AppwriteException('Missing required parameter: "labels"');
16889
+ }
16890
+ const apiPath = '/project/labels';
16891
+ const payload = {};
16892
+ if (typeof labels !== 'undefined') {
16893
+ payload['labels'] = labels;
16894
+ }
16895
+ const uri = new URL(this.client.config.endpoint + apiPath);
16896
+ const apiHeaders = {
16897
+ 'content-type': 'application/json',
16898
+ };
16899
+ return this.client.call('put', uri, apiHeaders, payload);
16685
16900
  }
16686
- list(paramsOrFirst, ...rest) {
16901
+ listPlatforms(paramsOrFirst, ...rest) {
16687
16902
  let params;
16688
16903
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16689
16904
  params = (paramsOrFirst || {});
@@ -16691,21 +16906,16 @@ class Projects {
16691
16906
  else {
16692
16907
  params = {
16693
16908
  queries: paramsOrFirst,
16694
- search: rest[0],
16695
- total: rest[1]
16909
+ total: rest[0]
16696
16910
  };
16697
16911
  }
16698
16912
  const queries = params.queries;
16699
- const search = params.search;
16700
16913
  const total = params.total;
16701
- const apiPath = '/projects';
16914
+ const apiPath = '/project/platforms';
16702
16915
  const payload = {};
16703
16916
  if (typeof queries !== 'undefined') {
16704
16917
  payload['queries'] = queries;
16705
16918
  }
16706
- if (typeof search !== 'undefined') {
16707
- payload['search'] = search;
16708
- }
16709
16919
  if (typeof total !== 'undefined') {
16710
16920
  payload['total'] = total;
16711
16921
  }
@@ -16713,90 +16923,40 @@ class Projects {
16713
16923
  const apiHeaders = {};
16714
16924
  return this.client.call('get', uri, apiHeaders, payload);
16715
16925
  }
16716
- create(paramsOrFirst, ...rest) {
16926
+ createAndroidPlatform(paramsOrFirst, ...rest) {
16717
16927
  let params;
16718
16928
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16719
16929
  params = (paramsOrFirst || {});
16720
16930
  }
16721
16931
  else {
16722
16932
  params = {
16723
- projectId: paramsOrFirst,
16933
+ platformId: paramsOrFirst,
16724
16934
  name: rest[0],
16725
- teamId: rest[1],
16726
- region: rest[2],
16727
- description: rest[3],
16728
- logo: rest[4],
16729
- url: rest[5],
16730
- legalName: rest[6],
16731
- legalCountry: rest[7],
16732
- legalState: rest[8],
16733
- legalCity: rest[9],
16734
- legalAddress: rest[10],
16735
- legalTaxId: rest[11]
16935
+ applicationId: rest[1]
16736
16936
  };
16737
16937
  }
16738
- const projectId = params.projectId;
16938
+ const platformId = params.platformId;
16739
16939
  const name = params.name;
16740
- const teamId = params.teamId;
16741
- const region = params.region;
16742
- const description = params.description;
16743
- const logo = params.logo;
16744
- const url = params.url;
16745
- const legalName = params.legalName;
16746
- const legalCountry = params.legalCountry;
16747
- const legalState = params.legalState;
16748
- const legalCity = params.legalCity;
16749
- const legalAddress = params.legalAddress;
16750
- const legalTaxId = params.legalTaxId;
16751
- if (typeof projectId === 'undefined') {
16752
- throw new AppwriteException('Missing required parameter: "projectId"');
16940
+ const applicationId = params.applicationId;
16941
+ if (typeof platformId === 'undefined') {
16942
+ throw new AppwriteException('Missing required parameter: "platformId"');
16753
16943
  }
16754
16944
  if (typeof name === 'undefined') {
16755
16945
  throw new AppwriteException('Missing required parameter: "name"');
16756
16946
  }
16757
- if (typeof teamId === 'undefined') {
16758
- throw new AppwriteException('Missing required parameter: "teamId"');
16947
+ if (typeof applicationId === 'undefined') {
16948
+ throw new AppwriteException('Missing required parameter: "applicationId"');
16759
16949
  }
16760
- const apiPath = '/projects';
16950
+ const apiPath = '/project/platforms/android';
16761
16951
  const payload = {};
16762
- if (typeof projectId !== 'undefined') {
16763
- payload['projectId'] = projectId;
16952
+ if (typeof platformId !== 'undefined') {
16953
+ payload['platformId'] = platformId;
16764
16954
  }
16765
16955
  if (typeof name !== 'undefined') {
16766
16956
  payload['name'] = name;
16767
16957
  }
16768
- if (typeof teamId !== 'undefined') {
16769
- payload['teamId'] = teamId;
16770
- }
16771
- if (typeof region !== 'undefined') {
16772
- payload['region'] = region;
16773
- }
16774
- if (typeof description !== 'undefined') {
16775
- payload['description'] = description;
16776
- }
16777
- if (typeof logo !== 'undefined') {
16778
- payload['logo'] = logo;
16779
- }
16780
- if (typeof url !== 'undefined') {
16781
- payload['url'] = url;
16782
- }
16783
- if (typeof legalName !== 'undefined') {
16784
- payload['legalName'] = legalName;
16785
- }
16786
- if (typeof legalCountry !== 'undefined') {
16787
- payload['legalCountry'] = legalCountry;
16788
- }
16789
- if (typeof legalState !== 'undefined') {
16790
- payload['legalState'] = legalState;
16791
- }
16792
- if (typeof legalCity !== 'undefined') {
16793
- payload['legalCity'] = legalCity;
16794
- }
16795
- if (typeof legalAddress !== 'undefined') {
16796
- payload['legalAddress'] = legalAddress;
16797
- }
16798
- if (typeof legalTaxId !== 'undefined') {
16799
- payload['legalTaxId'] = legalTaxId;
16958
+ if (typeof applicationId !== 'undefined') {
16959
+ payload['applicationId'] = applicationId;
16800
16960
  }
16801
16961
  const uri = new URL(this.client.config.endpoint + apiPath);
16802
16962
  const apiHeaders = {
@@ -16804,418 +16964,425 @@ class Projects {
16804
16964
  };
16805
16965
  return this.client.call('post', uri, apiHeaders, payload);
16806
16966
  }
16807
- get(paramsOrFirst) {
16967
+ updateAndroidPlatform(paramsOrFirst, ...rest) {
16808
16968
  let params;
16809
16969
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16810
16970
  params = (paramsOrFirst || {});
16811
16971
  }
16812
16972
  else {
16813
16973
  params = {
16814
- projectId: paramsOrFirst
16974
+ platformId: paramsOrFirst,
16975
+ name: rest[0],
16976
+ applicationId: rest[1]
16815
16977
  };
16816
16978
  }
16817
- const projectId = params.projectId;
16818
- if (typeof projectId === 'undefined') {
16819
- throw new AppwriteException('Missing required parameter: "projectId"');
16979
+ const platformId = params.platformId;
16980
+ const name = params.name;
16981
+ const applicationId = params.applicationId;
16982
+ if (typeof platformId === 'undefined') {
16983
+ throw new AppwriteException('Missing required parameter: "platformId"');
16820
16984
  }
16821
- const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
16985
+ if (typeof name === 'undefined') {
16986
+ throw new AppwriteException('Missing required parameter: "name"');
16987
+ }
16988
+ if (typeof applicationId === 'undefined') {
16989
+ throw new AppwriteException('Missing required parameter: "applicationId"');
16990
+ }
16991
+ const apiPath = '/project/platforms/android/{platformId}'.replace('{platformId}', platformId);
16822
16992
  const payload = {};
16993
+ if (typeof name !== 'undefined') {
16994
+ payload['name'] = name;
16995
+ }
16996
+ if (typeof applicationId !== 'undefined') {
16997
+ payload['applicationId'] = applicationId;
16998
+ }
16823
16999
  const uri = new URL(this.client.config.endpoint + apiPath);
16824
- const apiHeaders = {};
16825
- return this.client.call('get', uri, apiHeaders, payload);
17000
+ const apiHeaders = {
17001
+ 'content-type': 'application/json',
17002
+ };
17003
+ return this.client.call('put', uri, apiHeaders, payload);
16826
17004
  }
16827
- update(paramsOrFirst, ...rest) {
17005
+ createApplePlatform(paramsOrFirst, ...rest) {
16828
17006
  let params;
16829
17007
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16830
17008
  params = (paramsOrFirst || {});
16831
17009
  }
16832
17010
  else {
16833
17011
  params = {
16834
- projectId: paramsOrFirst,
17012
+ platformId: paramsOrFirst,
16835
17013
  name: rest[0],
16836
- description: rest[1],
16837
- logo: rest[2],
16838
- url: rest[3],
16839
- legalName: rest[4],
16840
- legalCountry: rest[5],
16841
- legalState: rest[6],
16842
- legalCity: rest[7],
16843
- legalAddress: rest[8],
16844
- legalTaxId: rest[9]
17014
+ bundleIdentifier: rest[1]
16845
17015
  };
16846
17016
  }
16847
- const projectId = params.projectId;
17017
+ const platformId = params.platformId;
16848
17018
  const name = params.name;
16849
- const description = params.description;
16850
- const logo = params.logo;
16851
- const url = params.url;
16852
- const legalName = params.legalName;
16853
- const legalCountry = params.legalCountry;
16854
- const legalState = params.legalState;
16855
- const legalCity = params.legalCity;
16856
- const legalAddress = params.legalAddress;
16857
- const legalTaxId = params.legalTaxId;
16858
- if (typeof projectId === 'undefined') {
16859
- throw new AppwriteException('Missing required parameter: "projectId"');
17019
+ const bundleIdentifier = params.bundleIdentifier;
17020
+ if (typeof platformId === 'undefined') {
17021
+ throw new AppwriteException('Missing required parameter: "platformId"');
16860
17022
  }
16861
17023
  if (typeof name === 'undefined') {
16862
17024
  throw new AppwriteException('Missing required parameter: "name"');
16863
17025
  }
16864
- const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17026
+ if (typeof bundleIdentifier === 'undefined') {
17027
+ throw new AppwriteException('Missing required parameter: "bundleIdentifier"');
17028
+ }
17029
+ const apiPath = '/project/platforms/apple';
16865
17030
  const payload = {};
17031
+ if (typeof platformId !== 'undefined') {
17032
+ payload['platformId'] = platformId;
17033
+ }
16866
17034
  if (typeof name !== 'undefined') {
16867
17035
  payload['name'] = name;
16868
17036
  }
16869
- if (typeof description !== 'undefined') {
16870
- payload['description'] = description;
16871
- }
16872
- if (typeof logo !== 'undefined') {
16873
- payload['logo'] = logo;
16874
- }
16875
- if (typeof url !== 'undefined') {
16876
- payload['url'] = url;
16877
- }
16878
- if (typeof legalName !== 'undefined') {
16879
- payload['legalName'] = legalName;
16880
- }
16881
- if (typeof legalCountry !== 'undefined') {
16882
- payload['legalCountry'] = legalCountry;
16883
- }
16884
- if (typeof legalState !== 'undefined') {
16885
- payload['legalState'] = legalState;
16886
- }
16887
- if (typeof legalCity !== 'undefined') {
16888
- payload['legalCity'] = legalCity;
16889
- }
16890
- if (typeof legalAddress !== 'undefined') {
16891
- payload['legalAddress'] = legalAddress;
16892
- }
16893
- if (typeof legalTaxId !== 'undefined') {
16894
- payload['legalTaxId'] = legalTaxId;
17037
+ if (typeof bundleIdentifier !== 'undefined') {
17038
+ payload['bundleIdentifier'] = bundleIdentifier;
16895
17039
  }
16896
17040
  const uri = new URL(this.client.config.endpoint + apiPath);
16897
17041
  const apiHeaders = {
16898
17042
  'content-type': 'application/json',
16899
17043
  };
16900
- return this.client.call('patch', uri, apiHeaders, payload);
17044
+ return this.client.call('post', uri, apiHeaders, payload);
16901
17045
  }
16902
- delete(paramsOrFirst) {
17046
+ updateApplePlatform(paramsOrFirst, ...rest) {
16903
17047
  let params;
16904
17048
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16905
17049
  params = (paramsOrFirst || {});
16906
17050
  }
16907
17051
  else {
16908
17052
  params = {
16909
- projectId: paramsOrFirst
17053
+ platformId: paramsOrFirst,
17054
+ name: rest[0],
17055
+ bundleIdentifier: rest[1]
16910
17056
  };
16911
17057
  }
16912
- const projectId = params.projectId;
16913
- if (typeof projectId === 'undefined') {
16914
- throw new AppwriteException('Missing required parameter: "projectId"');
17058
+ const platformId = params.platformId;
17059
+ const name = params.name;
17060
+ const bundleIdentifier = params.bundleIdentifier;
17061
+ if (typeof platformId === 'undefined') {
17062
+ throw new AppwriteException('Missing required parameter: "platformId"');
16915
17063
  }
16916
- const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17064
+ if (typeof name === 'undefined') {
17065
+ throw new AppwriteException('Missing required parameter: "name"');
17066
+ }
17067
+ if (typeof bundleIdentifier === 'undefined') {
17068
+ throw new AppwriteException('Missing required parameter: "bundleIdentifier"');
17069
+ }
17070
+ const apiPath = '/project/platforms/apple/{platformId}'.replace('{platformId}', platformId);
16917
17071
  const payload = {};
17072
+ if (typeof name !== 'undefined') {
17073
+ payload['name'] = name;
17074
+ }
17075
+ if (typeof bundleIdentifier !== 'undefined') {
17076
+ payload['bundleIdentifier'] = bundleIdentifier;
17077
+ }
16918
17078
  const uri = new URL(this.client.config.endpoint + apiPath);
16919
17079
  const apiHeaders = {
16920
17080
  'content-type': 'application/json',
16921
17081
  };
16922
- return this.client.call('delete', uri, apiHeaders, payload);
17082
+ return this.client.call('put', uri, apiHeaders, payload);
16923
17083
  }
16924
- updateApiStatus(paramsOrFirst, ...rest) {
17084
+ createLinuxPlatform(paramsOrFirst, ...rest) {
16925
17085
  let params;
16926
17086
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16927
17087
  params = (paramsOrFirst || {});
16928
17088
  }
16929
17089
  else {
16930
17090
  params = {
16931
- projectId: paramsOrFirst,
16932
- api: rest[0],
16933
- status: rest[1]
17091
+ platformId: paramsOrFirst,
17092
+ name: rest[0],
17093
+ packageName: rest[1]
16934
17094
  };
16935
17095
  }
16936
- const projectId = params.projectId;
16937
- const api = params.api;
16938
- const status = params.status;
16939
- if (typeof projectId === 'undefined') {
16940
- throw new AppwriteException('Missing required parameter: "projectId"');
17096
+ const platformId = params.platformId;
17097
+ const name = params.name;
17098
+ const packageName = params.packageName;
17099
+ if (typeof platformId === 'undefined') {
17100
+ throw new AppwriteException('Missing required parameter: "platformId"');
16941
17101
  }
16942
- if (typeof api === 'undefined') {
16943
- throw new AppwriteException('Missing required parameter: "api"');
17102
+ if (typeof name === 'undefined') {
17103
+ throw new AppwriteException('Missing required parameter: "name"');
16944
17104
  }
16945
- if (typeof status === 'undefined') {
16946
- throw new AppwriteException('Missing required parameter: "status"');
17105
+ if (typeof packageName === 'undefined') {
17106
+ throw new AppwriteException('Missing required parameter: "packageName"');
16947
17107
  }
16948
- const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
17108
+ const apiPath = '/project/platforms/linux';
16949
17109
  const payload = {};
16950
- if (typeof api !== 'undefined') {
16951
- payload['api'] = api;
17110
+ if (typeof platformId !== 'undefined') {
17111
+ payload['platformId'] = platformId;
16952
17112
  }
16953
- if (typeof status !== 'undefined') {
16954
- payload['status'] = status;
17113
+ if (typeof name !== 'undefined') {
17114
+ payload['name'] = name;
17115
+ }
17116
+ if (typeof packageName !== 'undefined') {
17117
+ payload['packageName'] = packageName;
16955
17118
  }
16956
17119
  const uri = new URL(this.client.config.endpoint + apiPath);
16957
17120
  const apiHeaders = {
16958
17121
  'content-type': 'application/json',
16959
17122
  };
16960
- return this.client.call('patch', uri, apiHeaders, payload);
17123
+ return this.client.call('post', uri, apiHeaders, payload);
16961
17124
  }
16962
- updateAPIStatus(paramsOrFirst, ...rest) {
17125
+ updateLinuxPlatform(paramsOrFirst, ...rest) {
16963
17126
  let params;
16964
17127
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16965
17128
  params = (paramsOrFirst || {});
16966
17129
  }
16967
17130
  else {
16968
17131
  params = {
16969
- projectId: paramsOrFirst,
16970
- api: rest[0],
16971
- status: rest[1]
17132
+ platformId: paramsOrFirst,
17133
+ name: rest[0],
17134
+ packageName: rest[1]
16972
17135
  };
16973
17136
  }
16974
- const projectId = params.projectId;
16975
- const api = params.api;
16976
- const status = params.status;
16977
- if (typeof projectId === 'undefined') {
16978
- throw new AppwriteException('Missing required parameter: "projectId"');
17137
+ const platformId = params.platformId;
17138
+ const name = params.name;
17139
+ const packageName = params.packageName;
17140
+ if (typeof platformId === 'undefined') {
17141
+ throw new AppwriteException('Missing required parameter: "platformId"');
16979
17142
  }
16980
- if (typeof api === 'undefined') {
16981
- throw new AppwriteException('Missing required parameter: "api"');
17143
+ if (typeof name === 'undefined') {
17144
+ throw new AppwriteException('Missing required parameter: "name"');
16982
17145
  }
16983
- if (typeof status === 'undefined') {
16984
- throw new AppwriteException('Missing required parameter: "status"');
17146
+ if (typeof packageName === 'undefined') {
17147
+ throw new AppwriteException('Missing required parameter: "packageName"');
16985
17148
  }
16986
- const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
17149
+ const apiPath = '/project/platforms/linux/{platformId}'.replace('{platformId}', platformId);
16987
17150
  const payload = {};
16988
- if (typeof api !== 'undefined') {
16989
- payload['api'] = api;
17151
+ if (typeof name !== 'undefined') {
17152
+ payload['name'] = name;
16990
17153
  }
16991
- if (typeof status !== 'undefined') {
16992
- payload['status'] = status;
17154
+ if (typeof packageName !== 'undefined') {
17155
+ payload['packageName'] = packageName;
16993
17156
  }
16994
17157
  const uri = new URL(this.client.config.endpoint + apiPath);
16995
17158
  const apiHeaders = {
16996
17159
  'content-type': 'application/json',
16997
17160
  };
16998
- return this.client.call('patch', uri, apiHeaders, payload);
17161
+ return this.client.call('put', uri, apiHeaders, payload);
16999
17162
  }
17000
- updateApiStatusAll(paramsOrFirst, ...rest) {
17163
+ createWebPlatform(paramsOrFirst, ...rest) {
17001
17164
  let params;
17002
17165
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17003
17166
  params = (paramsOrFirst || {});
17004
17167
  }
17005
17168
  else {
17006
17169
  params = {
17007
- projectId: paramsOrFirst,
17008
- status: rest[0]
17170
+ platformId: paramsOrFirst,
17171
+ name: rest[0],
17172
+ hostname: rest[1]
17009
17173
  };
17010
17174
  }
17011
- const projectId = params.projectId;
17012
- const status = params.status;
17013
- if (typeof projectId === 'undefined') {
17014
- throw new AppwriteException('Missing required parameter: "projectId"');
17175
+ const platformId = params.platformId;
17176
+ const name = params.name;
17177
+ const hostname = params.hostname;
17178
+ if (typeof platformId === 'undefined') {
17179
+ throw new AppwriteException('Missing required parameter: "platformId"');
17015
17180
  }
17016
- if (typeof status === 'undefined') {
17017
- throw new AppwriteException('Missing required parameter: "status"');
17181
+ if (typeof name === 'undefined') {
17182
+ throw new AppwriteException('Missing required parameter: "name"');
17183
+ }
17184
+ if (typeof hostname === 'undefined') {
17185
+ throw new AppwriteException('Missing required parameter: "hostname"');
17018
17186
  }
17019
- const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
17187
+ const apiPath = '/project/platforms/web';
17020
17188
  const payload = {};
17021
- if (typeof status !== 'undefined') {
17022
- payload['status'] = status;
17189
+ if (typeof platformId !== 'undefined') {
17190
+ payload['platformId'] = platformId;
17191
+ }
17192
+ if (typeof name !== 'undefined') {
17193
+ payload['name'] = name;
17194
+ }
17195
+ if (typeof hostname !== 'undefined') {
17196
+ payload['hostname'] = hostname;
17023
17197
  }
17024
17198
  const uri = new URL(this.client.config.endpoint + apiPath);
17025
17199
  const apiHeaders = {
17026
17200
  'content-type': 'application/json',
17027
17201
  };
17028
- return this.client.call('patch', uri, apiHeaders, payload);
17202
+ return this.client.call('post', uri, apiHeaders, payload);
17029
17203
  }
17030
- updateAPIStatusAll(paramsOrFirst, ...rest) {
17204
+ updateWebPlatform(paramsOrFirst, ...rest) {
17031
17205
  let params;
17032
17206
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17033
17207
  params = (paramsOrFirst || {});
17034
17208
  }
17035
17209
  else {
17036
17210
  params = {
17037
- projectId: paramsOrFirst,
17038
- status: rest[0]
17211
+ platformId: paramsOrFirst,
17212
+ name: rest[0],
17213
+ hostname: rest[1]
17039
17214
  };
17040
17215
  }
17041
- const projectId = params.projectId;
17042
- const status = params.status;
17043
- if (typeof projectId === 'undefined') {
17044
- throw new AppwriteException('Missing required parameter: "projectId"');
17216
+ const platformId = params.platformId;
17217
+ const name = params.name;
17218
+ const hostname = params.hostname;
17219
+ if (typeof platformId === 'undefined') {
17220
+ throw new AppwriteException('Missing required parameter: "platformId"');
17045
17221
  }
17046
- if (typeof status === 'undefined') {
17047
- throw new AppwriteException('Missing required parameter: "status"');
17222
+ if (typeof name === 'undefined') {
17223
+ throw new AppwriteException('Missing required parameter: "name"');
17048
17224
  }
17049
- const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
17225
+ if (typeof hostname === 'undefined') {
17226
+ throw new AppwriteException('Missing required parameter: "hostname"');
17227
+ }
17228
+ const apiPath = '/project/platforms/web/{platformId}'.replace('{platformId}', platformId);
17050
17229
  const payload = {};
17051
- if (typeof status !== 'undefined') {
17052
- payload['status'] = status;
17230
+ if (typeof name !== 'undefined') {
17231
+ payload['name'] = name;
17232
+ }
17233
+ if (typeof hostname !== 'undefined') {
17234
+ payload['hostname'] = hostname;
17053
17235
  }
17054
17236
  const uri = new URL(this.client.config.endpoint + apiPath);
17055
17237
  const apiHeaders = {
17056
17238
  'content-type': 'application/json',
17057
17239
  };
17058
- return this.client.call('patch', uri, apiHeaders, payload);
17240
+ return this.client.call('put', uri, apiHeaders, payload);
17059
17241
  }
17060
- updateAuthDuration(paramsOrFirst, ...rest) {
17242
+ createWindowsPlatform(paramsOrFirst, ...rest) {
17061
17243
  let params;
17062
17244
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17063
17245
  params = (paramsOrFirst || {});
17064
17246
  }
17065
17247
  else {
17066
17248
  params = {
17067
- projectId: paramsOrFirst,
17068
- duration: rest[0]
17249
+ platformId: paramsOrFirst,
17250
+ name: rest[0],
17251
+ packageIdentifierName: rest[1]
17069
17252
  };
17070
17253
  }
17071
- const projectId = params.projectId;
17072
- const duration = params.duration;
17073
- if (typeof projectId === 'undefined') {
17074
- throw new AppwriteException('Missing required parameter: "projectId"');
17254
+ const platformId = params.platformId;
17255
+ const name = params.name;
17256
+ const packageIdentifierName = params.packageIdentifierName;
17257
+ if (typeof platformId === 'undefined') {
17258
+ throw new AppwriteException('Missing required parameter: "platformId"');
17075
17259
  }
17076
- if (typeof duration === 'undefined') {
17077
- throw new AppwriteException('Missing required parameter: "duration"');
17260
+ if (typeof name === 'undefined') {
17261
+ throw new AppwriteException('Missing required parameter: "name"');
17078
17262
  }
17079
- const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
17263
+ if (typeof packageIdentifierName === 'undefined') {
17264
+ throw new AppwriteException('Missing required parameter: "packageIdentifierName"');
17265
+ }
17266
+ const apiPath = '/project/platforms/windows';
17080
17267
  const payload = {};
17081
- if (typeof duration !== 'undefined') {
17082
- payload['duration'] = duration;
17268
+ if (typeof platformId !== 'undefined') {
17269
+ payload['platformId'] = platformId;
17270
+ }
17271
+ if (typeof name !== 'undefined') {
17272
+ payload['name'] = name;
17273
+ }
17274
+ if (typeof packageIdentifierName !== 'undefined') {
17275
+ payload['packageIdentifierName'] = packageIdentifierName;
17083
17276
  }
17084
17277
  const uri = new URL(this.client.config.endpoint + apiPath);
17085
17278
  const apiHeaders = {
17086
17279
  'content-type': 'application/json',
17087
17280
  };
17088
- return this.client.call('patch', uri, apiHeaders, payload);
17281
+ return this.client.call('post', uri, apiHeaders, payload);
17089
17282
  }
17090
- updateAuthLimit(paramsOrFirst, ...rest) {
17283
+ updateWindowsPlatform(paramsOrFirst, ...rest) {
17091
17284
  let params;
17092
17285
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17093
17286
  params = (paramsOrFirst || {});
17094
17287
  }
17095
17288
  else {
17096
17289
  params = {
17097
- projectId: paramsOrFirst,
17098
- limit: rest[0]
17290
+ platformId: paramsOrFirst,
17291
+ name: rest[0],
17292
+ packageIdentifierName: rest[1]
17099
17293
  };
17100
17294
  }
17101
- const projectId = params.projectId;
17102
- const limit = params.limit;
17103
- if (typeof projectId === 'undefined') {
17104
- throw new AppwriteException('Missing required parameter: "projectId"');
17295
+ const platformId = params.platformId;
17296
+ const name = params.name;
17297
+ const packageIdentifierName = params.packageIdentifierName;
17298
+ if (typeof platformId === 'undefined') {
17299
+ throw new AppwriteException('Missing required parameter: "platformId"');
17105
17300
  }
17106
- if (typeof limit === 'undefined') {
17107
- throw new AppwriteException('Missing required parameter: "limit"');
17301
+ if (typeof name === 'undefined') {
17302
+ throw new AppwriteException('Missing required parameter: "name"');
17108
17303
  }
17109
- const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
17304
+ if (typeof packageIdentifierName === 'undefined') {
17305
+ throw new AppwriteException('Missing required parameter: "packageIdentifierName"');
17306
+ }
17307
+ const apiPath = '/project/platforms/windows/{platformId}'.replace('{platformId}', platformId);
17110
17308
  const payload = {};
17111
- if (typeof limit !== 'undefined') {
17112
- payload['limit'] = limit;
17309
+ if (typeof name !== 'undefined') {
17310
+ payload['name'] = name;
17311
+ }
17312
+ if (typeof packageIdentifierName !== 'undefined') {
17313
+ payload['packageIdentifierName'] = packageIdentifierName;
17113
17314
  }
17114
17315
  const uri = new URL(this.client.config.endpoint + apiPath);
17115
17316
  const apiHeaders = {
17116
17317
  'content-type': 'application/json',
17117
17318
  };
17118
- return this.client.call('patch', uri, apiHeaders, payload);
17319
+ return this.client.call('put', uri, apiHeaders, payload);
17119
17320
  }
17120
- updateAuthSessionsLimit(paramsOrFirst, ...rest) {
17321
+ getPlatform(paramsOrFirst) {
17121
17322
  let params;
17122
17323
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17123
17324
  params = (paramsOrFirst || {});
17124
17325
  }
17125
17326
  else {
17126
17327
  params = {
17127
- projectId: paramsOrFirst,
17128
- limit: rest[0]
17328
+ platformId: paramsOrFirst
17129
17329
  };
17130
17330
  }
17131
- const projectId = params.projectId;
17132
- const limit = params.limit;
17133
- if (typeof projectId === 'undefined') {
17134
- throw new AppwriteException('Missing required parameter: "projectId"');
17135
- }
17136
- if (typeof limit === 'undefined') {
17137
- throw new AppwriteException('Missing required parameter: "limit"');
17331
+ const platformId = params.platformId;
17332
+ if (typeof platformId === 'undefined') {
17333
+ throw new AppwriteException('Missing required parameter: "platformId"');
17138
17334
  }
17139
- const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
17335
+ const apiPath = '/project/platforms/{platformId}'.replace('{platformId}', platformId);
17140
17336
  const payload = {};
17141
- if (typeof limit !== 'undefined') {
17142
- payload['limit'] = limit;
17143
- }
17144
17337
  const uri = new URL(this.client.config.endpoint + apiPath);
17145
- const apiHeaders = {
17146
- 'content-type': 'application/json',
17147
- };
17148
- return this.client.call('patch', uri, apiHeaders, payload);
17338
+ const apiHeaders = {};
17339
+ return this.client.call('get', uri, apiHeaders, payload);
17149
17340
  }
17150
- updateMembershipsPrivacy(paramsOrFirst, ...rest) {
17341
+ deletePlatform(paramsOrFirst) {
17151
17342
  let params;
17152
17343
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17153
17344
  params = (paramsOrFirst || {});
17154
17345
  }
17155
17346
  else {
17156
17347
  params = {
17157
- projectId: paramsOrFirst,
17158
- userName: rest[0],
17159
- userEmail: rest[1],
17160
- mfa: rest[2]
17348
+ platformId: paramsOrFirst
17161
17349
  };
17162
17350
  }
17163
- const projectId = params.projectId;
17164
- const userName = params.userName;
17165
- const userEmail = params.userEmail;
17166
- const mfa = params.mfa;
17167
- if (typeof projectId === 'undefined') {
17168
- throw new AppwriteException('Missing required parameter: "projectId"');
17169
- }
17170
- if (typeof userName === 'undefined') {
17171
- throw new AppwriteException('Missing required parameter: "userName"');
17172
- }
17173
- if (typeof userEmail === 'undefined') {
17174
- throw new AppwriteException('Missing required parameter: "userEmail"');
17175
- }
17176
- if (typeof mfa === 'undefined') {
17177
- throw new AppwriteException('Missing required parameter: "mfa"');
17351
+ const platformId = params.platformId;
17352
+ if (typeof platformId === 'undefined') {
17353
+ throw new AppwriteException('Missing required parameter: "platformId"');
17178
17354
  }
17179
- const apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
17355
+ const apiPath = '/project/platforms/{platformId}'.replace('{platformId}', platformId);
17180
17356
  const payload = {};
17181
- if (typeof userName !== 'undefined') {
17182
- payload['userName'] = userName;
17183
- }
17184
- if (typeof userEmail !== 'undefined') {
17185
- payload['userEmail'] = userEmail;
17186
- }
17187
- if (typeof mfa !== 'undefined') {
17188
- payload['mfa'] = mfa;
17189
- }
17190
17357
  const uri = new URL(this.client.config.endpoint + apiPath);
17191
17358
  const apiHeaders = {
17192
17359
  'content-type': 'application/json',
17193
17360
  };
17194
- return this.client.call('patch', uri, apiHeaders, payload);
17361
+ return this.client.call('delete', uri, apiHeaders, payload);
17195
17362
  }
17196
- updateMockNumbers(paramsOrFirst, ...rest) {
17363
+ updateProtocolStatus(paramsOrFirst, ...rest) {
17197
17364
  let params;
17198
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17365
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('protocolId' in paramsOrFirst || 'enabled' in paramsOrFirst))) {
17199
17366
  params = (paramsOrFirst || {});
17200
17367
  }
17201
17368
  else {
17202
17369
  params = {
17203
- projectId: paramsOrFirst,
17204
- numbers: rest[0]
17370
+ protocolId: paramsOrFirst,
17371
+ enabled: rest[0]
17205
17372
  };
17206
17373
  }
17207
- const projectId = params.projectId;
17208
- const numbers = params.numbers;
17209
- if (typeof projectId === 'undefined') {
17210
- throw new AppwriteException('Missing required parameter: "projectId"');
17374
+ const protocolId = params.protocolId;
17375
+ const enabled = params.enabled;
17376
+ if (typeof protocolId === 'undefined') {
17377
+ throw new AppwriteException('Missing required parameter: "protocolId"');
17211
17378
  }
17212
- if (typeof numbers === 'undefined') {
17213
- throw new AppwriteException('Missing required parameter: "numbers"');
17379
+ if (typeof enabled === 'undefined') {
17380
+ throw new AppwriteException('Missing required parameter: "enabled"');
17214
17381
  }
17215
- const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
17382
+ const apiPath = '/project/protocols/{protocolId}/status'.replace('{protocolId}', protocolId);
17216
17383
  const payload = {};
17217
- if (typeof numbers !== 'undefined') {
17218
- payload['numbers'] = numbers;
17384
+ if (typeof enabled !== 'undefined') {
17385
+ payload['enabled'] = enabled;
17219
17386
  }
17220
17387
  const uri = new URL(this.client.config.endpoint + apiPath);
17221
17388
  const apiHeaders = {
@@ -17223,26 +17390,26 @@ class Projects {
17223
17390
  };
17224
17391
  return this.client.call('patch', uri, apiHeaders, payload);
17225
17392
  }
17226
- updateAuthPasswordDictionary(paramsOrFirst, ...rest) {
17393
+ updateServiceStatus(paramsOrFirst, ...rest) {
17227
17394
  let params;
17228
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17395
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('serviceId' in paramsOrFirst || 'enabled' in paramsOrFirst))) {
17229
17396
  params = (paramsOrFirst || {});
17230
17397
  }
17231
17398
  else {
17232
17399
  params = {
17233
- projectId: paramsOrFirst,
17400
+ serviceId: paramsOrFirst,
17234
17401
  enabled: rest[0]
17235
17402
  };
17236
17403
  }
17237
- const projectId = params.projectId;
17404
+ const serviceId = params.serviceId;
17238
17405
  const enabled = params.enabled;
17239
- if (typeof projectId === 'undefined') {
17240
- throw new AppwriteException('Missing required parameter: "projectId"');
17406
+ if (typeof serviceId === 'undefined') {
17407
+ throw new AppwriteException('Missing required parameter: "serviceId"');
17241
17408
  }
17242
17409
  if (typeof enabled === 'undefined') {
17243
17410
  throw new AppwriteException('Missing required parameter: "enabled"');
17244
17411
  }
17245
- const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
17412
+ const apiPath = '/project/services/{serviceId}/status'.replace('{serviceId}', serviceId);
17246
17413
  const payload = {};
17247
17414
  if (typeof enabled !== 'undefined') {
17248
17415
  payload['enabled'] = enabled;
@@ -17253,67 +17420,229 @@ class Projects {
17253
17420
  };
17254
17421
  return this.client.call('patch', uri, apiHeaders, payload);
17255
17422
  }
17256
- updateAuthPasswordHistory(paramsOrFirst, ...rest) {
17423
+ getUsage(paramsOrFirst, ...rest) {
17257
17424
  let params;
17258
17425
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17259
17426
  params = (paramsOrFirst || {});
17260
17427
  }
17261
17428
  else {
17262
17429
  params = {
17263
- projectId: paramsOrFirst,
17264
- limit: rest[0]
17430
+ startDate: paramsOrFirst,
17431
+ endDate: rest[0],
17432
+ period: rest[1]
17265
17433
  };
17266
17434
  }
17267
- const projectId = params.projectId;
17268
- const limit = params.limit;
17269
- if (typeof projectId === 'undefined') {
17270
- throw new AppwriteException('Missing required parameter: "projectId"');
17435
+ const startDate = params.startDate;
17436
+ const endDate = params.endDate;
17437
+ const period = params.period;
17438
+ if (typeof startDate === 'undefined') {
17439
+ throw new AppwriteException('Missing required parameter: "startDate"');
17271
17440
  }
17272
- if (typeof limit === 'undefined') {
17273
- throw new AppwriteException('Missing required parameter: "limit"');
17441
+ if (typeof endDate === 'undefined') {
17442
+ throw new AppwriteException('Missing required parameter: "endDate"');
17274
17443
  }
17275
- const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
17444
+ const apiPath = '/project/usage';
17276
17445
  const payload = {};
17277
- if (typeof limit !== 'undefined') {
17278
- payload['limit'] = limit;
17446
+ if (typeof startDate !== 'undefined') {
17447
+ payload['startDate'] = startDate;
17448
+ }
17449
+ if (typeof endDate !== 'undefined') {
17450
+ payload['endDate'] = endDate;
17451
+ }
17452
+ if (typeof period !== 'undefined') {
17453
+ payload['period'] = period;
17454
+ }
17455
+ const uri = new URL(this.client.config.endpoint + apiPath);
17456
+ const apiHeaders = {};
17457
+ return this.client.call('get', uri, apiHeaders, payload);
17458
+ }
17459
+ listVariables(paramsOrFirst, ...rest) {
17460
+ let params;
17461
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17462
+ params = (paramsOrFirst || {});
17463
+ }
17464
+ else {
17465
+ params = {
17466
+ queries: paramsOrFirst,
17467
+ total: rest[0]
17468
+ };
17469
+ }
17470
+ const queries = params.queries;
17471
+ const total = params.total;
17472
+ const apiPath = '/project/variables';
17473
+ const payload = {};
17474
+ if (typeof queries !== 'undefined') {
17475
+ payload['queries'] = queries;
17476
+ }
17477
+ if (typeof total !== 'undefined') {
17478
+ payload['total'] = total;
17479
+ }
17480
+ const uri = new URL(this.client.config.endpoint + apiPath);
17481
+ const apiHeaders = {};
17482
+ return this.client.call('get', uri, apiHeaders, payload);
17483
+ }
17484
+ createVariable(paramsOrFirst, ...rest) {
17485
+ let params;
17486
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17487
+ params = (paramsOrFirst || {});
17488
+ }
17489
+ else {
17490
+ params = {
17491
+ variableId: paramsOrFirst,
17492
+ key: rest[0],
17493
+ value: rest[1],
17494
+ secret: rest[2]
17495
+ };
17496
+ }
17497
+ const variableId = params.variableId;
17498
+ const key = params.key;
17499
+ const value = params.value;
17500
+ const secret = params.secret;
17501
+ if (typeof variableId === 'undefined') {
17502
+ throw new AppwriteException('Missing required parameter: "variableId"');
17503
+ }
17504
+ if (typeof key === 'undefined') {
17505
+ throw new AppwriteException('Missing required parameter: "key"');
17506
+ }
17507
+ if (typeof value === 'undefined') {
17508
+ throw new AppwriteException('Missing required parameter: "value"');
17509
+ }
17510
+ const apiPath = '/project/variables';
17511
+ const payload = {};
17512
+ if (typeof variableId !== 'undefined') {
17513
+ payload['variableId'] = variableId;
17514
+ }
17515
+ if (typeof key !== 'undefined') {
17516
+ payload['key'] = key;
17517
+ }
17518
+ if (typeof value !== 'undefined') {
17519
+ payload['value'] = value;
17520
+ }
17521
+ if (typeof secret !== 'undefined') {
17522
+ payload['secret'] = secret;
17279
17523
  }
17280
17524
  const uri = new URL(this.client.config.endpoint + apiPath);
17281
17525
  const apiHeaders = {
17282
17526
  'content-type': 'application/json',
17283
17527
  };
17284
- return this.client.call('patch', uri, apiHeaders, payload);
17528
+ return this.client.call('post', uri, apiHeaders, payload);
17285
17529
  }
17286
- updatePersonalDataCheck(paramsOrFirst, ...rest) {
17530
+ getVariable(paramsOrFirst) {
17287
17531
  let params;
17288
17532
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17289
17533
  params = (paramsOrFirst || {});
17290
17534
  }
17291
17535
  else {
17292
17536
  params = {
17293
- projectId: paramsOrFirst,
17294
- enabled: rest[0]
17537
+ variableId: paramsOrFirst
17295
17538
  };
17296
17539
  }
17297
- const projectId = params.projectId;
17298
- const enabled = params.enabled;
17299
- if (typeof projectId === 'undefined') {
17300
- throw new AppwriteException('Missing required parameter: "projectId"');
17540
+ const variableId = params.variableId;
17541
+ if (typeof variableId === 'undefined') {
17542
+ throw new AppwriteException('Missing required parameter: "variableId"');
17301
17543
  }
17302
- if (typeof enabled === 'undefined') {
17303
- throw new AppwriteException('Missing required parameter: "enabled"');
17544
+ const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
17545
+ const payload = {};
17546
+ const uri = new URL(this.client.config.endpoint + apiPath);
17547
+ const apiHeaders = {};
17548
+ return this.client.call('get', uri, apiHeaders, payload);
17549
+ }
17550
+ updateVariable(paramsOrFirst, ...rest) {
17551
+ let params;
17552
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17553
+ params = (paramsOrFirst || {});
17304
17554
  }
17305
- const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
17555
+ else {
17556
+ params = {
17557
+ variableId: paramsOrFirst,
17558
+ key: rest[0],
17559
+ value: rest[1],
17560
+ secret: rest[2]
17561
+ };
17562
+ }
17563
+ const variableId = params.variableId;
17564
+ const key = params.key;
17565
+ const value = params.value;
17566
+ const secret = params.secret;
17567
+ if (typeof variableId === 'undefined') {
17568
+ throw new AppwriteException('Missing required parameter: "variableId"');
17569
+ }
17570
+ const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
17306
17571
  const payload = {};
17307
- if (typeof enabled !== 'undefined') {
17308
- payload['enabled'] = enabled;
17572
+ if (typeof key !== 'undefined') {
17573
+ payload['key'] = key;
17574
+ }
17575
+ if (typeof value !== 'undefined') {
17576
+ payload['value'] = value;
17577
+ }
17578
+ if (typeof secret !== 'undefined') {
17579
+ payload['secret'] = secret;
17309
17580
  }
17310
17581
  const uri = new URL(this.client.config.endpoint + apiPath);
17311
17582
  const apiHeaders = {
17312
17583
  'content-type': 'application/json',
17313
17584
  };
17314
- return this.client.call('patch', uri, apiHeaders, payload);
17585
+ return this.client.call('put', uri, apiHeaders, payload);
17315
17586
  }
17316
- updateSessionAlerts(paramsOrFirst, ...rest) {
17587
+ deleteVariable(paramsOrFirst) {
17588
+ let params;
17589
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17590
+ params = (paramsOrFirst || {});
17591
+ }
17592
+ else {
17593
+ params = {
17594
+ variableId: paramsOrFirst
17595
+ };
17596
+ }
17597
+ const variableId = params.variableId;
17598
+ if (typeof variableId === 'undefined') {
17599
+ throw new AppwriteException('Missing required parameter: "variableId"');
17600
+ }
17601
+ const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
17602
+ const payload = {};
17603
+ const uri = new URL(this.client.config.endpoint + apiPath);
17604
+ const apiHeaders = {
17605
+ 'content-type': 'application/json',
17606
+ };
17607
+ return this.client.call('delete', uri, apiHeaders, payload);
17608
+ }
17609
+ }
17610
+
17611
+ class Projects {
17612
+ constructor(client) {
17613
+ this.client = client;
17614
+ }
17615
+ list(paramsOrFirst, ...rest) {
17616
+ let params;
17617
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17618
+ params = (paramsOrFirst || {});
17619
+ }
17620
+ else {
17621
+ params = {
17622
+ queries: paramsOrFirst,
17623
+ search: rest[0],
17624
+ total: rest[1]
17625
+ };
17626
+ }
17627
+ const queries = params.queries;
17628
+ const search = params.search;
17629
+ const total = params.total;
17630
+ const apiPath = '/projects';
17631
+ const payload = {};
17632
+ if (typeof queries !== 'undefined') {
17633
+ payload['queries'] = queries;
17634
+ }
17635
+ if (typeof search !== 'undefined') {
17636
+ payload['search'] = search;
17637
+ }
17638
+ if (typeof total !== 'undefined') {
17639
+ payload['total'] = total;
17640
+ }
17641
+ const uri = new URL(this.client.config.endpoint + apiPath);
17642
+ const apiHeaders = {};
17643
+ return this.client.call('get', uri, apiHeaders, payload);
17644
+ }
17645
+ create(paramsOrFirst, ...rest) {
17317
17646
  let params;
17318
17647
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17319
17648
  params = (paramsOrFirst || {});
@@ -17321,29 +17650,110 @@ class Projects {
17321
17650
  else {
17322
17651
  params = {
17323
17652
  projectId: paramsOrFirst,
17324
- alerts: rest[0]
17653
+ name: rest[0],
17654
+ teamId: rest[1],
17655
+ region: rest[2],
17656
+ description: rest[3],
17657
+ logo: rest[4],
17658
+ url: rest[5],
17659
+ legalName: rest[6],
17660
+ legalCountry: rest[7],
17661
+ legalState: rest[8],
17662
+ legalCity: rest[9],
17663
+ legalAddress: rest[10],
17664
+ legalTaxId: rest[11]
17325
17665
  };
17326
17666
  }
17327
17667
  const projectId = params.projectId;
17328
- const alerts = params.alerts;
17668
+ const name = params.name;
17669
+ const teamId = params.teamId;
17670
+ const region = params.region;
17671
+ const description = params.description;
17672
+ const logo = params.logo;
17673
+ const url = params.url;
17674
+ const legalName = params.legalName;
17675
+ const legalCountry = params.legalCountry;
17676
+ const legalState = params.legalState;
17677
+ const legalCity = params.legalCity;
17678
+ const legalAddress = params.legalAddress;
17679
+ const legalTaxId = params.legalTaxId;
17329
17680
  if (typeof projectId === 'undefined') {
17330
17681
  throw new AppwriteException('Missing required parameter: "projectId"');
17331
17682
  }
17332
- if (typeof alerts === 'undefined') {
17333
- throw new AppwriteException('Missing required parameter: "alerts"');
17683
+ if (typeof name === 'undefined') {
17684
+ throw new AppwriteException('Missing required parameter: "name"');
17334
17685
  }
17335
- const apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
17686
+ if (typeof teamId === 'undefined') {
17687
+ throw new AppwriteException('Missing required parameter: "teamId"');
17688
+ }
17689
+ const apiPath = '/projects';
17336
17690
  const payload = {};
17337
- if (typeof alerts !== 'undefined') {
17338
- payload['alerts'] = alerts;
17691
+ if (typeof projectId !== 'undefined') {
17692
+ payload['projectId'] = projectId;
17693
+ }
17694
+ if (typeof name !== 'undefined') {
17695
+ payload['name'] = name;
17696
+ }
17697
+ if (typeof teamId !== 'undefined') {
17698
+ payload['teamId'] = teamId;
17699
+ }
17700
+ if (typeof region !== 'undefined') {
17701
+ payload['region'] = region;
17702
+ }
17703
+ if (typeof description !== 'undefined') {
17704
+ payload['description'] = description;
17705
+ }
17706
+ if (typeof logo !== 'undefined') {
17707
+ payload['logo'] = logo;
17708
+ }
17709
+ if (typeof url !== 'undefined') {
17710
+ payload['url'] = url;
17711
+ }
17712
+ if (typeof legalName !== 'undefined') {
17713
+ payload['legalName'] = legalName;
17714
+ }
17715
+ if (typeof legalCountry !== 'undefined') {
17716
+ payload['legalCountry'] = legalCountry;
17717
+ }
17718
+ if (typeof legalState !== 'undefined') {
17719
+ payload['legalState'] = legalState;
17720
+ }
17721
+ if (typeof legalCity !== 'undefined') {
17722
+ payload['legalCity'] = legalCity;
17723
+ }
17724
+ if (typeof legalAddress !== 'undefined') {
17725
+ payload['legalAddress'] = legalAddress;
17726
+ }
17727
+ if (typeof legalTaxId !== 'undefined') {
17728
+ payload['legalTaxId'] = legalTaxId;
17339
17729
  }
17340
17730
  const uri = new URL(this.client.config.endpoint + apiPath);
17341
17731
  const apiHeaders = {
17342
17732
  'content-type': 'application/json',
17343
17733
  };
17344
- return this.client.call('patch', uri, apiHeaders, payload);
17734
+ return this.client.call('post', uri, apiHeaders, payload);
17345
17735
  }
17346
- updateSessionInvalidation(paramsOrFirst, ...rest) {
17736
+ get(paramsOrFirst) {
17737
+ let params;
17738
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17739
+ params = (paramsOrFirst || {});
17740
+ }
17741
+ else {
17742
+ params = {
17743
+ projectId: paramsOrFirst
17744
+ };
17745
+ }
17746
+ const projectId = params.projectId;
17747
+ if (typeof projectId === 'undefined') {
17748
+ throw new AppwriteException('Missing required parameter: "projectId"');
17749
+ }
17750
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17751
+ const payload = {};
17752
+ const uri = new URL(this.client.config.endpoint + apiPath);
17753
+ const apiHeaders = {};
17754
+ return this.client.call('get', uri, apiHeaders, payload);
17755
+ }
17756
+ update(paramsOrFirst, ...rest) {
17347
17757
  let params;
17348
17758
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17349
17759
  params = (paramsOrFirst || {});
@@ -17351,21 +17761,66 @@ class Projects {
17351
17761
  else {
17352
17762
  params = {
17353
17763
  projectId: paramsOrFirst,
17354
- enabled: rest[0]
17764
+ name: rest[0],
17765
+ description: rest[1],
17766
+ logo: rest[2],
17767
+ url: rest[3],
17768
+ legalName: rest[4],
17769
+ legalCountry: rest[5],
17770
+ legalState: rest[6],
17771
+ legalCity: rest[7],
17772
+ legalAddress: rest[8],
17773
+ legalTaxId: rest[9]
17355
17774
  };
17356
17775
  }
17357
17776
  const projectId = params.projectId;
17358
- const enabled = params.enabled;
17777
+ const name = params.name;
17778
+ const description = params.description;
17779
+ const logo = params.logo;
17780
+ const url = params.url;
17781
+ const legalName = params.legalName;
17782
+ const legalCountry = params.legalCountry;
17783
+ const legalState = params.legalState;
17784
+ const legalCity = params.legalCity;
17785
+ const legalAddress = params.legalAddress;
17786
+ const legalTaxId = params.legalTaxId;
17359
17787
  if (typeof projectId === 'undefined') {
17360
17788
  throw new AppwriteException('Missing required parameter: "projectId"');
17361
17789
  }
17362
- if (typeof enabled === 'undefined') {
17363
- throw new AppwriteException('Missing required parameter: "enabled"');
17790
+ if (typeof name === 'undefined') {
17791
+ throw new AppwriteException('Missing required parameter: "name"');
17364
17792
  }
17365
- const apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
17793
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17366
17794
  const payload = {};
17367
- if (typeof enabled !== 'undefined') {
17368
- payload['enabled'] = enabled;
17795
+ if (typeof name !== 'undefined') {
17796
+ payload['name'] = name;
17797
+ }
17798
+ if (typeof description !== 'undefined') {
17799
+ payload['description'] = description;
17800
+ }
17801
+ if (typeof logo !== 'undefined') {
17802
+ payload['logo'] = logo;
17803
+ }
17804
+ if (typeof url !== 'undefined') {
17805
+ payload['url'] = url;
17806
+ }
17807
+ if (typeof legalName !== 'undefined') {
17808
+ payload['legalName'] = legalName;
17809
+ }
17810
+ if (typeof legalCountry !== 'undefined') {
17811
+ payload['legalCountry'] = legalCountry;
17812
+ }
17813
+ if (typeof legalState !== 'undefined') {
17814
+ payload['legalState'] = legalState;
17815
+ }
17816
+ if (typeof legalCity !== 'undefined') {
17817
+ payload['legalCity'] = legalCity;
17818
+ }
17819
+ if (typeof legalAddress !== 'undefined') {
17820
+ payload['legalAddress'] = legalAddress;
17821
+ }
17822
+ if (typeof legalTaxId !== 'undefined') {
17823
+ payload['legalTaxId'] = legalTaxId;
17369
17824
  }
17370
17825
  const uri = new URL(this.client.config.endpoint + apiPath);
17371
17826
  const apiHeaders = {
@@ -17373,64 +17828,59 @@ class Projects {
17373
17828
  };
17374
17829
  return this.client.call('patch', uri, apiHeaders, payload);
17375
17830
  }
17376
- updateAuthStatus(paramsOrFirst, ...rest) {
17831
+ delete(paramsOrFirst) {
17377
17832
  let params;
17378
17833
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17379
17834
  params = (paramsOrFirst || {});
17380
17835
  }
17381
17836
  else {
17382
17837
  params = {
17383
- projectId: paramsOrFirst,
17384
- method: rest[0],
17385
- status: rest[1]
17838
+ projectId: paramsOrFirst
17386
17839
  };
17387
17840
  }
17388
17841
  const projectId = params.projectId;
17389
- const method = params.method;
17390
- const status = params.status;
17391
17842
  if (typeof projectId === 'undefined') {
17392
17843
  throw new AppwriteException('Missing required parameter: "projectId"');
17393
17844
  }
17394
- if (typeof method === 'undefined') {
17395
- throw new AppwriteException('Missing required parameter: "method"');
17396
- }
17397
- if (typeof status === 'undefined') {
17398
- throw new AppwriteException('Missing required parameter: "status"');
17399
- }
17400
- const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
17845
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17401
17846
  const payload = {};
17402
- if (typeof status !== 'undefined') {
17403
- payload['status'] = status;
17404
- }
17405
17847
  const uri = new URL(this.client.config.endpoint + apiPath);
17406
17848
  const apiHeaders = {
17407
17849
  'content-type': 'application/json',
17408
17850
  };
17409
- return this.client.call('patch', uri, apiHeaders, payload);
17851
+ return this.client.call('delete', uri, apiHeaders, payload);
17410
17852
  }
17411
- updateConsoleAccess(paramsOrFirst) {
17853
+ updateAuthDuration(paramsOrFirst, ...rest) {
17412
17854
  let params;
17413
17855
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17414
17856
  params = (paramsOrFirst || {});
17415
17857
  }
17416
17858
  else {
17417
17859
  params = {
17418
- projectId: paramsOrFirst
17860
+ projectId: paramsOrFirst,
17861
+ duration: rest[0]
17419
17862
  };
17420
17863
  }
17421
17864
  const projectId = params.projectId;
17865
+ const duration = params.duration;
17422
17866
  if (typeof projectId === 'undefined') {
17423
17867
  throw new AppwriteException('Missing required parameter: "projectId"');
17424
17868
  }
17425
- const apiPath = '/projects/{projectId}/console-access'.replace('{projectId}', projectId);
17869
+ if (typeof duration === 'undefined') {
17870
+ throw new AppwriteException('Missing required parameter: "duration"');
17871
+ }
17872
+ const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
17426
17873
  const payload = {};
17874
+ if (typeof duration !== 'undefined') {
17875
+ payload['duration'] = duration;
17876
+ }
17427
17877
  const uri = new URL(this.client.config.endpoint + apiPath);
17428
17878
  const apiHeaders = {
17429
17879
  'content-type': 'application/json',
17430
17880
  };
17431
17881
  return this.client.call('patch', uri, apiHeaders, payload);
17432
17882
  }
17433
- listDevKeys(paramsOrFirst, ...rest) {
17883
+ updateAuthLimit(paramsOrFirst, ...rest) {
17434
17884
  let params;
17435
17885
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17436
17886
  params = (paramsOrFirst || {});
@@ -17438,24 +17888,29 @@ class Projects {
17438
17888
  else {
17439
17889
  params = {
17440
17890
  projectId: paramsOrFirst,
17441
- queries: rest[0]
17891
+ limit: rest[0]
17442
17892
  };
17443
17893
  }
17444
17894
  const projectId = params.projectId;
17445
- const queries = params.queries;
17895
+ const limit = params.limit;
17446
17896
  if (typeof projectId === 'undefined') {
17447
17897
  throw new AppwriteException('Missing required parameter: "projectId"');
17448
17898
  }
17449
- const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
17899
+ if (typeof limit === 'undefined') {
17900
+ throw new AppwriteException('Missing required parameter: "limit"');
17901
+ }
17902
+ const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
17450
17903
  const payload = {};
17451
- if (typeof queries !== 'undefined') {
17452
- payload['queries'] = queries;
17904
+ if (typeof limit !== 'undefined') {
17905
+ payload['limit'] = limit;
17453
17906
  }
17454
17907
  const uri = new URL(this.client.config.endpoint + apiPath);
17455
- const apiHeaders = {};
17456
- return this.client.call('get', uri, apiHeaders, payload);
17908
+ const apiHeaders = {
17909
+ 'content-type': 'application/json',
17910
+ };
17911
+ return this.client.call('patch', uri, apiHeaders, payload);
17457
17912
  }
17458
- createDevKey(paramsOrFirst, ...rest) {
17913
+ updateAuthSessionsLimit(paramsOrFirst, ...rest) {
17459
17914
  let params;
17460
17915
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17461
17916
  params = (paramsOrFirst || {});
@@ -17463,37 +17918,29 @@ class Projects {
17463
17918
  else {
17464
17919
  params = {
17465
17920
  projectId: paramsOrFirst,
17466
- name: rest[0],
17467
- expire: rest[1]
17921
+ limit: rest[0]
17468
17922
  };
17469
17923
  }
17470
17924
  const projectId = params.projectId;
17471
- const name = params.name;
17472
- const expire = params.expire;
17925
+ const limit = params.limit;
17473
17926
  if (typeof projectId === 'undefined') {
17474
17927
  throw new AppwriteException('Missing required parameter: "projectId"');
17475
17928
  }
17476
- if (typeof name === 'undefined') {
17477
- throw new AppwriteException('Missing required parameter: "name"');
17478
- }
17479
- if (typeof expire === 'undefined') {
17480
- throw new AppwriteException('Missing required parameter: "expire"');
17481
- }
17482
- const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
17483
- const payload = {};
17484
- if (typeof name !== 'undefined') {
17485
- payload['name'] = name;
17929
+ if (typeof limit === 'undefined') {
17930
+ throw new AppwriteException('Missing required parameter: "limit"');
17486
17931
  }
17487
- if (typeof expire !== 'undefined') {
17488
- payload['expire'] = expire;
17932
+ const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
17933
+ const payload = {};
17934
+ if (typeof limit !== 'undefined') {
17935
+ payload['limit'] = limit;
17489
17936
  }
17490
17937
  const uri = new URL(this.client.config.endpoint + apiPath);
17491
17938
  const apiHeaders = {
17492
17939
  'content-type': 'application/json',
17493
17940
  };
17494
- return this.client.call('post', uri, apiHeaders, payload);
17941
+ return this.client.call('patch', uri, apiHeaders, payload);
17495
17942
  }
17496
- getDevKey(paramsOrFirst, ...rest) {
17943
+ updateMembershipsPrivacy(paramsOrFirst, ...rest) {
17497
17944
  let params;
17498
17945
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17499
17946
  params = (paramsOrFirst || {});
@@ -17501,24 +17948,45 @@ class Projects {
17501
17948
  else {
17502
17949
  params = {
17503
17950
  projectId: paramsOrFirst,
17504
- keyId: rest[0]
17951
+ userName: rest[0],
17952
+ userEmail: rest[1],
17953
+ mfa: rest[2]
17505
17954
  };
17506
17955
  }
17507
17956
  const projectId = params.projectId;
17508
- const keyId = params.keyId;
17957
+ const userName = params.userName;
17958
+ const userEmail = params.userEmail;
17959
+ const mfa = params.mfa;
17509
17960
  if (typeof projectId === 'undefined') {
17510
17961
  throw new AppwriteException('Missing required parameter: "projectId"');
17511
17962
  }
17512
- if (typeof keyId === 'undefined') {
17513
- throw new AppwriteException('Missing required parameter: "keyId"');
17963
+ if (typeof userName === 'undefined') {
17964
+ throw new AppwriteException('Missing required parameter: "userName"');
17514
17965
  }
17515
- const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
17966
+ if (typeof userEmail === 'undefined') {
17967
+ throw new AppwriteException('Missing required parameter: "userEmail"');
17968
+ }
17969
+ if (typeof mfa === 'undefined') {
17970
+ throw new AppwriteException('Missing required parameter: "mfa"');
17971
+ }
17972
+ const apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
17516
17973
  const payload = {};
17974
+ if (typeof userName !== 'undefined') {
17975
+ payload['userName'] = userName;
17976
+ }
17977
+ if (typeof userEmail !== 'undefined') {
17978
+ payload['userEmail'] = userEmail;
17979
+ }
17980
+ if (typeof mfa !== 'undefined') {
17981
+ payload['mfa'] = mfa;
17982
+ }
17517
17983
  const uri = new URL(this.client.config.endpoint + apiPath);
17518
- const apiHeaders = {};
17519
- return this.client.call('get', uri, apiHeaders, payload);
17984
+ const apiHeaders = {
17985
+ 'content-type': 'application/json',
17986
+ };
17987
+ return this.client.call('patch', uri, apiHeaders, payload);
17520
17988
  }
17521
- updateDevKey(paramsOrFirst, ...rest) {
17989
+ updateMockNumbers(paramsOrFirst, ...rest) {
17522
17990
  let params;
17523
17991
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17524
17992
  params = (paramsOrFirst || {});
@@ -17526,42 +17994,29 @@ class Projects {
17526
17994
  else {
17527
17995
  params = {
17528
17996
  projectId: paramsOrFirst,
17529
- keyId: rest[0],
17530
- name: rest[1],
17531
- expire: rest[2]
17997
+ numbers: rest[0]
17532
17998
  };
17533
17999
  }
17534
18000
  const projectId = params.projectId;
17535
- const keyId = params.keyId;
17536
- const name = params.name;
17537
- const expire = params.expire;
18001
+ const numbers = params.numbers;
17538
18002
  if (typeof projectId === 'undefined') {
17539
18003
  throw new AppwriteException('Missing required parameter: "projectId"');
17540
18004
  }
17541
- if (typeof keyId === 'undefined') {
17542
- throw new AppwriteException('Missing required parameter: "keyId"');
17543
- }
17544
- if (typeof name === 'undefined') {
17545
- throw new AppwriteException('Missing required parameter: "name"');
17546
- }
17547
- if (typeof expire === 'undefined') {
17548
- throw new AppwriteException('Missing required parameter: "expire"');
18005
+ if (typeof numbers === 'undefined') {
18006
+ throw new AppwriteException('Missing required parameter: "numbers"');
17549
18007
  }
17550
- const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18008
+ const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
17551
18009
  const payload = {};
17552
- if (typeof name !== 'undefined') {
17553
- payload['name'] = name;
17554
- }
17555
- if (typeof expire !== 'undefined') {
17556
- payload['expire'] = expire;
18010
+ if (typeof numbers !== 'undefined') {
18011
+ payload['numbers'] = numbers;
17557
18012
  }
17558
18013
  const uri = new URL(this.client.config.endpoint + apiPath);
17559
18014
  const apiHeaders = {
17560
18015
  'content-type': 'application/json',
17561
18016
  };
17562
- return this.client.call('put', uri, apiHeaders, payload);
18017
+ return this.client.call('patch', uri, apiHeaders, payload);
17563
18018
  }
17564
- deleteDevKey(paramsOrFirst, ...rest) {
18019
+ updateAuthPasswordDictionary(paramsOrFirst, ...rest) {
17565
18020
  let params;
17566
18021
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17567
18022
  params = (paramsOrFirst || {});
@@ -17569,26 +18024,29 @@ class Projects {
17569
18024
  else {
17570
18025
  params = {
17571
18026
  projectId: paramsOrFirst,
17572
- keyId: rest[0]
18027
+ enabled: rest[0]
17573
18028
  };
17574
18029
  }
17575
18030
  const projectId = params.projectId;
17576
- const keyId = params.keyId;
18031
+ const enabled = params.enabled;
17577
18032
  if (typeof projectId === 'undefined') {
17578
18033
  throw new AppwriteException('Missing required parameter: "projectId"');
17579
18034
  }
17580
- if (typeof keyId === 'undefined') {
17581
- throw new AppwriteException('Missing required parameter: "keyId"');
18035
+ if (typeof enabled === 'undefined') {
18036
+ throw new AppwriteException('Missing required parameter: "enabled"');
17582
18037
  }
17583
- const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18038
+ const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
17584
18039
  const payload = {};
18040
+ if (typeof enabled !== 'undefined') {
18041
+ payload['enabled'] = enabled;
18042
+ }
17585
18043
  const uri = new URL(this.client.config.endpoint + apiPath);
17586
18044
  const apiHeaders = {
17587
18045
  'content-type': 'application/json',
17588
18046
  };
17589
- return this.client.call('delete', uri, apiHeaders, payload);
18047
+ return this.client.call('patch', uri, apiHeaders, payload);
17590
18048
  }
17591
- createJWT(paramsOrFirst, ...rest) {
18049
+ updateAuthPasswordHistory(paramsOrFirst, ...rest) {
17592
18050
  let params;
17593
18051
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17594
18052
  params = (paramsOrFirst || {});
@@ -17596,34 +18054,29 @@ class Projects {
17596
18054
  else {
17597
18055
  params = {
17598
18056
  projectId: paramsOrFirst,
17599
- scopes: rest[0],
17600
- duration: rest[1]
18057
+ limit: rest[0]
17601
18058
  };
17602
18059
  }
17603
18060
  const projectId = params.projectId;
17604
- const scopes = params.scopes;
17605
- const duration = params.duration;
18061
+ const limit = params.limit;
17606
18062
  if (typeof projectId === 'undefined') {
17607
18063
  throw new AppwriteException('Missing required parameter: "projectId"');
17608
18064
  }
17609
- if (typeof scopes === 'undefined') {
17610
- throw new AppwriteException('Missing required parameter: "scopes"');
18065
+ if (typeof limit === 'undefined') {
18066
+ throw new AppwriteException('Missing required parameter: "limit"');
17611
18067
  }
17612
- const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
18068
+ const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
17613
18069
  const payload = {};
17614
- if (typeof scopes !== 'undefined') {
17615
- payload['scopes'] = scopes;
17616
- }
17617
- if (typeof duration !== 'undefined') {
17618
- payload['duration'] = duration;
18070
+ if (typeof limit !== 'undefined') {
18071
+ payload['limit'] = limit;
17619
18072
  }
17620
18073
  const uri = new URL(this.client.config.endpoint + apiPath);
17621
18074
  const apiHeaders = {
17622
18075
  'content-type': 'application/json',
17623
18076
  };
17624
- return this.client.call('post', uri, apiHeaders, payload);
18077
+ return this.client.call('patch', uri, apiHeaders, payload);
17625
18078
  }
17626
- listKeys(paramsOrFirst, ...rest) {
18079
+ updatePersonalDataCheck(paramsOrFirst, ...rest) {
17627
18080
  let params;
17628
18081
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17629
18082
  params = (paramsOrFirst || {});
@@ -17631,29 +18084,29 @@ class Projects {
17631
18084
  else {
17632
18085
  params = {
17633
18086
  projectId: paramsOrFirst,
17634
- queries: rest[0],
17635
- total: rest[1]
18087
+ enabled: rest[0]
17636
18088
  };
17637
18089
  }
17638
18090
  const projectId = params.projectId;
17639
- const queries = params.queries;
17640
- const total = params.total;
18091
+ const enabled = params.enabled;
17641
18092
  if (typeof projectId === 'undefined') {
17642
18093
  throw new AppwriteException('Missing required parameter: "projectId"');
17643
18094
  }
17644
- const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
17645
- const payload = {};
17646
- if (typeof queries !== 'undefined') {
17647
- payload['queries'] = queries;
18095
+ if (typeof enabled === 'undefined') {
18096
+ throw new AppwriteException('Missing required parameter: "enabled"');
17648
18097
  }
17649
- if (typeof total !== 'undefined') {
17650
- payload['total'] = total;
18098
+ const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
18099
+ const payload = {};
18100
+ if (typeof enabled !== 'undefined') {
18101
+ payload['enabled'] = enabled;
17651
18102
  }
17652
18103
  const uri = new URL(this.client.config.endpoint + apiPath);
17653
- const apiHeaders = {};
17654
- return this.client.call('get', uri, apiHeaders, payload);
18104
+ const apiHeaders = {
18105
+ 'content-type': 'application/json',
18106
+ };
18107
+ return this.client.call('patch', uri, apiHeaders, payload);
17655
18108
  }
17656
- createKey(paramsOrFirst, ...rest) {
18109
+ updateSessionAlerts(paramsOrFirst, ...rest) {
17657
18110
  let params;
17658
18111
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17659
18112
  params = (paramsOrFirst || {});
@@ -17661,47 +18114,29 @@ class Projects {
17661
18114
  else {
17662
18115
  params = {
17663
18116
  projectId: paramsOrFirst,
17664
- name: rest[0],
17665
- scopes: rest[1],
17666
- keyId: rest[2],
17667
- expire: rest[3]
18117
+ alerts: rest[0]
17668
18118
  };
17669
18119
  }
17670
18120
  const projectId = params.projectId;
17671
- const name = params.name;
17672
- const scopes = params.scopes;
17673
- const keyId = params.keyId;
17674
- const expire = params.expire;
18121
+ const alerts = params.alerts;
17675
18122
  if (typeof projectId === 'undefined') {
17676
18123
  throw new AppwriteException('Missing required parameter: "projectId"');
17677
18124
  }
17678
- if (typeof name === 'undefined') {
17679
- throw new AppwriteException('Missing required parameter: "name"');
17680
- }
17681
- if (typeof scopes === 'undefined') {
17682
- throw new AppwriteException('Missing required parameter: "scopes"');
18125
+ if (typeof alerts === 'undefined') {
18126
+ throw new AppwriteException('Missing required parameter: "alerts"');
17683
18127
  }
17684
- const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
18128
+ const apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
17685
18129
  const payload = {};
17686
- if (typeof keyId !== 'undefined') {
17687
- payload['keyId'] = keyId;
17688
- }
17689
- if (typeof name !== 'undefined') {
17690
- payload['name'] = name;
17691
- }
17692
- if (typeof scopes !== 'undefined') {
17693
- payload['scopes'] = scopes;
17694
- }
17695
- if (typeof expire !== 'undefined') {
17696
- payload['expire'] = expire;
18130
+ if (typeof alerts !== 'undefined') {
18131
+ payload['alerts'] = alerts;
17697
18132
  }
17698
18133
  const uri = new URL(this.client.config.endpoint + apiPath);
17699
18134
  const apiHeaders = {
17700
18135
  'content-type': 'application/json',
17701
18136
  };
17702
- return this.client.call('post', uri, apiHeaders, payload);
18137
+ return this.client.call('patch', uri, apiHeaders, payload);
17703
18138
  }
17704
- getKey(paramsOrFirst, ...rest) {
18139
+ updateSessionInvalidation(paramsOrFirst, ...rest) {
17705
18140
  let params;
17706
18141
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17707
18142
  params = (paramsOrFirst || {});
@@ -17709,24 +18144,29 @@ class Projects {
17709
18144
  else {
17710
18145
  params = {
17711
18146
  projectId: paramsOrFirst,
17712
- keyId: rest[0]
18147
+ enabled: rest[0]
17713
18148
  };
17714
18149
  }
17715
18150
  const projectId = params.projectId;
17716
- const keyId = params.keyId;
18151
+ const enabled = params.enabled;
17717
18152
  if (typeof projectId === 'undefined') {
17718
18153
  throw new AppwriteException('Missing required parameter: "projectId"');
17719
18154
  }
17720
- if (typeof keyId === 'undefined') {
17721
- throw new AppwriteException('Missing required parameter: "keyId"');
18155
+ if (typeof enabled === 'undefined') {
18156
+ throw new AppwriteException('Missing required parameter: "enabled"');
17722
18157
  }
17723
- const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18158
+ const apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
17724
18159
  const payload = {};
18160
+ if (typeof enabled !== 'undefined') {
18161
+ payload['enabled'] = enabled;
18162
+ }
17725
18163
  const uri = new URL(this.client.config.endpoint + apiPath);
17726
- const apiHeaders = {};
17727
- return this.client.call('get', uri, apiHeaders, payload);
18164
+ const apiHeaders = {
18165
+ 'content-type': 'application/json',
18166
+ };
18167
+ return this.client.call('patch', uri, apiHeaders, payload);
17728
18168
  }
17729
- updateKey(paramsOrFirst, ...rest) {
18169
+ updateAuthStatus(paramsOrFirst, ...rest) {
17730
18170
  let params;
17731
18171
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17732
18172
  params = (paramsOrFirst || {});
@@ -17734,74 +18174,56 @@ class Projects {
17734
18174
  else {
17735
18175
  params = {
17736
18176
  projectId: paramsOrFirst,
17737
- keyId: rest[0],
17738
- name: rest[1],
17739
- scopes: rest[2],
17740
- expire: rest[3]
18177
+ method: rest[0],
18178
+ status: rest[1]
17741
18179
  };
17742
18180
  }
17743
18181
  const projectId = params.projectId;
17744
- const keyId = params.keyId;
17745
- const name = params.name;
17746
- const scopes = params.scopes;
17747
- const expire = params.expire;
18182
+ const method = params.method;
18183
+ const status = params.status;
17748
18184
  if (typeof projectId === 'undefined') {
17749
18185
  throw new AppwriteException('Missing required parameter: "projectId"');
17750
18186
  }
17751
- if (typeof keyId === 'undefined') {
17752
- throw new AppwriteException('Missing required parameter: "keyId"');
17753
- }
17754
- if (typeof name === 'undefined') {
17755
- throw new AppwriteException('Missing required parameter: "name"');
18187
+ if (typeof method === 'undefined') {
18188
+ throw new AppwriteException('Missing required parameter: "method"');
17756
18189
  }
17757
- if (typeof scopes === 'undefined') {
17758
- throw new AppwriteException('Missing required parameter: "scopes"');
18190
+ if (typeof status === 'undefined') {
18191
+ throw new AppwriteException('Missing required parameter: "status"');
17759
18192
  }
17760
- const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18193
+ const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
17761
18194
  const payload = {};
17762
- if (typeof name !== 'undefined') {
17763
- payload['name'] = name;
17764
- }
17765
- if (typeof scopes !== 'undefined') {
17766
- payload['scopes'] = scopes;
17767
- }
17768
- if (typeof expire !== 'undefined') {
17769
- payload['expire'] = expire;
18195
+ if (typeof status !== 'undefined') {
18196
+ payload['status'] = status;
17770
18197
  }
17771
18198
  const uri = new URL(this.client.config.endpoint + apiPath);
17772
18199
  const apiHeaders = {
17773
18200
  'content-type': 'application/json',
17774
18201
  };
17775
- return this.client.call('put', uri, apiHeaders, payload);
18202
+ return this.client.call('patch', uri, apiHeaders, payload);
17776
18203
  }
17777
- deleteKey(paramsOrFirst, ...rest) {
18204
+ updateConsoleAccess(paramsOrFirst) {
17778
18205
  let params;
17779
18206
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17780
18207
  params = (paramsOrFirst || {});
17781
18208
  }
17782
18209
  else {
17783
18210
  params = {
17784
- projectId: paramsOrFirst,
17785
- keyId: rest[0]
18211
+ projectId: paramsOrFirst
17786
18212
  };
17787
18213
  }
17788
18214
  const projectId = params.projectId;
17789
- const keyId = params.keyId;
17790
18215
  if (typeof projectId === 'undefined') {
17791
18216
  throw new AppwriteException('Missing required parameter: "projectId"');
17792
18217
  }
17793
- if (typeof keyId === 'undefined') {
17794
- throw new AppwriteException('Missing required parameter: "keyId"');
17795
- }
17796
- const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18218
+ const apiPath = '/projects/{projectId}/console-access'.replace('{projectId}', projectId);
17797
18219
  const payload = {};
17798
18220
  const uri = new URL(this.client.config.endpoint + apiPath);
17799
18221
  const apiHeaders = {
17800
18222
  'content-type': 'application/json',
17801
18223
  };
17802
- return this.client.call('delete', uri, apiHeaders, payload);
18224
+ return this.client.call('patch', uri, apiHeaders, payload);
17803
18225
  }
17804
- updateLabels(paramsOrFirst, ...rest) {
18226
+ listDevKeys(paramsOrFirst, ...rest) {
17805
18227
  let params;
17806
18228
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17807
18229
  params = (paramsOrFirst || {});
@@ -17809,29 +18231,24 @@ class Projects {
17809
18231
  else {
17810
18232
  params = {
17811
18233
  projectId: paramsOrFirst,
17812
- labels: rest[0]
18234
+ queries: rest[0]
17813
18235
  };
17814
18236
  }
17815
18237
  const projectId = params.projectId;
17816
- const labels = params.labels;
18238
+ const queries = params.queries;
17817
18239
  if (typeof projectId === 'undefined') {
17818
18240
  throw new AppwriteException('Missing required parameter: "projectId"');
17819
18241
  }
17820
- if (typeof labels === 'undefined') {
17821
- throw new AppwriteException('Missing required parameter: "labels"');
17822
- }
17823
- const apiPath = '/projects/{projectId}/labels'.replace('{projectId}', projectId);
18242
+ const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
17824
18243
  const payload = {};
17825
- if (typeof labels !== 'undefined') {
17826
- payload['labels'] = labels;
18244
+ if (typeof queries !== 'undefined') {
18245
+ payload['queries'] = queries;
17827
18246
  }
17828
18247
  const uri = new URL(this.client.config.endpoint + apiPath);
17829
- const apiHeaders = {
17830
- 'content-type': 'application/json',
17831
- };
17832
- return this.client.call('put', uri, apiHeaders, payload);
18248
+ const apiHeaders = {};
18249
+ return this.client.call('get', uri, apiHeaders, payload);
17833
18250
  }
17834
- updateOAuth2(paramsOrFirst, ...rest) {
18251
+ createDevKey(paramsOrFirst, ...rest) {
17835
18252
  let params;
17836
18253
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17837
18254
  params = (paramsOrFirst || {});
@@ -17839,44 +18256,37 @@ class Projects {
17839
18256
  else {
17840
18257
  params = {
17841
18258
  projectId: paramsOrFirst,
17842
- provider: rest[0],
17843
- appId: rest[1],
17844
- secret: rest[2],
17845
- enabled: rest[3]
18259
+ name: rest[0],
18260
+ expire: rest[1]
17846
18261
  };
17847
18262
  }
17848
18263
  const projectId = params.projectId;
17849
- const provider = params.provider;
17850
- const appId = params.appId;
17851
- const secret = params.secret;
17852
- const enabled = params.enabled;
18264
+ const name = params.name;
18265
+ const expire = params.expire;
17853
18266
  if (typeof projectId === 'undefined') {
17854
18267
  throw new AppwriteException('Missing required parameter: "projectId"');
17855
18268
  }
17856
- if (typeof provider === 'undefined') {
17857
- throw new AppwriteException('Missing required parameter: "provider"');
17858
- }
17859
- const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
17860
- const payload = {};
17861
- if (typeof provider !== 'undefined') {
17862
- payload['provider'] = provider;
18269
+ if (typeof name === 'undefined') {
18270
+ throw new AppwriteException('Missing required parameter: "name"');
17863
18271
  }
17864
- if (typeof appId !== 'undefined') {
17865
- payload['appId'] = appId;
18272
+ if (typeof expire === 'undefined') {
18273
+ throw new AppwriteException('Missing required parameter: "expire"');
17866
18274
  }
17867
- if (typeof secret !== 'undefined') {
17868
- payload['secret'] = secret;
18275
+ const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
18276
+ const payload = {};
18277
+ if (typeof name !== 'undefined') {
18278
+ payload['name'] = name;
17869
18279
  }
17870
- if (typeof enabled !== 'undefined') {
17871
- payload['enabled'] = enabled;
18280
+ if (typeof expire !== 'undefined') {
18281
+ payload['expire'] = expire;
17872
18282
  }
17873
18283
  const uri = new URL(this.client.config.endpoint + apiPath);
17874
18284
  const apiHeaders = {
17875
18285
  'content-type': 'application/json',
17876
18286
  };
17877
- return this.client.call('patch', uri, apiHeaders, payload);
18287
+ return this.client.call('post', uri, apiHeaders, payload);
17878
18288
  }
17879
- listPlatforms(paramsOrFirst, ...rest) {
18289
+ getDevKey(paramsOrFirst, ...rest) {
17880
18290
  let params;
17881
18291
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17882
18292
  params = (paramsOrFirst || {});
@@ -17884,24 +18294,24 @@ class Projects {
17884
18294
  else {
17885
18295
  params = {
17886
18296
  projectId: paramsOrFirst,
17887
- total: rest[0]
18297
+ keyId: rest[0]
17888
18298
  };
17889
18299
  }
17890
18300
  const projectId = params.projectId;
17891
- const total = params.total;
18301
+ const keyId = params.keyId;
17892
18302
  if (typeof projectId === 'undefined') {
17893
18303
  throw new AppwriteException('Missing required parameter: "projectId"');
17894
18304
  }
17895
- const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
17896
- const payload = {};
17897
- if (typeof total !== 'undefined') {
17898
- payload['total'] = total;
18305
+ if (typeof keyId === 'undefined') {
18306
+ throw new AppwriteException('Missing required parameter: "keyId"');
17899
18307
  }
18308
+ const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18309
+ const payload = {};
17900
18310
  const uri = new URL(this.client.config.endpoint + apiPath);
17901
18311
  const apiHeaders = {};
17902
18312
  return this.client.call('get', uri, apiHeaders, payload);
17903
18313
  }
17904
- createPlatform(paramsOrFirst, ...rest) {
18314
+ updateDevKey(paramsOrFirst, ...rest) {
17905
18315
  let params;
17906
18316
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17907
18317
  params = (paramsOrFirst || {});
@@ -17909,52 +18319,42 @@ class Projects {
17909
18319
  else {
17910
18320
  params = {
17911
18321
  projectId: paramsOrFirst,
17912
- type: rest[0],
18322
+ keyId: rest[0],
17913
18323
  name: rest[1],
17914
- key: rest[2],
17915
- store: rest[3],
17916
- hostname: rest[4]
18324
+ expire: rest[2]
17917
18325
  };
17918
18326
  }
17919
18327
  const projectId = params.projectId;
17920
- const type = params.type;
18328
+ const keyId = params.keyId;
17921
18329
  const name = params.name;
17922
- const key = params.key;
17923
- const store = params.store;
17924
- const hostname = params.hostname;
18330
+ const expire = params.expire;
17925
18331
  if (typeof projectId === 'undefined') {
17926
18332
  throw new AppwriteException('Missing required parameter: "projectId"');
17927
18333
  }
17928
- if (typeof type === 'undefined') {
17929
- throw new AppwriteException('Missing required parameter: "type"');
18334
+ if (typeof keyId === 'undefined') {
18335
+ throw new AppwriteException('Missing required parameter: "keyId"');
17930
18336
  }
17931
18337
  if (typeof name === 'undefined') {
17932
18338
  throw new AppwriteException('Missing required parameter: "name"');
17933
18339
  }
17934
- const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
17935
- const payload = {};
17936
- if (typeof type !== 'undefined') {
17937
- payload['type'] = type;
18340
+ if (typeof expire === 'undefined') {
18341
+ throw new AppwriteException('Missing required parameter: "expire"');
17938
18342
  }
18343
+ const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18344
+ const payload = {};
17939
18345
  if (typeof name !== 'undefined') {
17940
18346
  payload['name'] = name;
17941
18347
  }
17942
- if (typeof key !== 'undefined') {
17943
- payload['key'] = key;
17944
- }
17945
- if (typeof store !== 'undefined') {
17946
- payload['store'] = store;
17947
- }
17948
- if (typeof hostname !== 'undefined') {
17949
- payload['hostname'] = hostname;
18348
+ if (typeof expire !== 'undefined') {
18349
+ payload['expire'] = expire;
17950
18350
  }
17951
18351
  const uri = new URL(this.client.config.endpoint + apiPath);
17952
18352
  const apiHeaders = {
17953
18353
  'content-type': 'application/json',
17954
18354
  };
17955
- return this.client.call('post', uri, apiHeaders, payload);
18355
+ return this.client.call('put', uri, apiHeaders, payload);
17956
18356
  }
17957
- getPlatform(paramsOrFirst, ...rest) {
18357
+ deleteDevKey(paramsOrFirst, ...rest) {
17958
18358
  let params;
17959
18359
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17960
18360
  params = (paramsOrFirst || {});
@@ -17962,24 +18362,26 @@ class Projects {
17962
18362
  else {
17963
18363
  params = {
17964
18364
  projectId: paramsOrFirst,
17965
- platformId: rest[0]
18365
+ keyId: rest[0]
17966
18366
  };
17967
18367
  }
17968
18368
  const projectId = params.projectId;
17969
- const platformId = params.platformId;
18369
+ const keyId = params.keyId;
17970
18370
  if (typeof projectId === 'undefined') {
17971
18371
  throw new AppwriteException('Missing required parameter: "projectId"');
17972
18372
  }
17973
- if (typeof platformId === 'undefined') {
17974
- throw new AppwriteException('Missing required parameter: "platformId"');
18373
+ if (typeof keyId === 'undefined') {
18374
+ throw new AppwriteException('Missing required parameter: "keyId"');
17975
18375
  }
17976
- const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
18376
+ const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
17977
18377
  const payload = {};
17978
18378
  const uri = new URL(this.client.config.endpoint + apiPath);
17979
- const apiHeaders = {};
17980
- return this.client.call('get', uri, apiHeaders, payload);
18379
+ const apiHeaders = {
18380
+ 'content-type': 'application/json',
18381
+ };
18382
+ return this.client.call('delete', uri, apiHeaders, payload);
17981
18383
  }
17982
- updatePlatform(paramsOrFirst, ...rest) {
18384
+ createJWT(paramsOrFirst, ...rest) {
17983
18385
  let params;
17984
18386
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17985
18387
  params = (paramsOrFirst || {});
@@ -17987,49 +18389,34 @@ class Projects {
17987
18389
  else {
17988
18390
  params = {
17989
18391
  projectId: paramsOrFirst,
17990
- platformId: rest[0],
17991
- name: rest[1],
17992
- key: rest[2],
17993
- store: rest[3],
17994
- hostname: rest[4]
18392
+ scopes: rest[0],
18393
+ duration: rest[1]
17995
18394
  };
17996
18395
  }
17997
18396
  const projectId = params.projectId;
17998
- const platformId = params.platformId;
17999
- const name = params.name;
18000
- const key = params.key;
18001
- const store = params.store;
18002
- const hostname = params.hostname;
18397
+ const scopes = params.scopes;
18398
+ const duration = params.duration;
18003
18399
  if (typeof projectId === 'undefined') {
18004
18400
  throw new AppwriteException('Missing required parameter: "projectId"');
18005
18401
  }
18006
- if (typeof platformId === 'undefined') {
18007
- throw new AppwriteException('Missing required parameter: "platformId"');
18008
- }
18009
- if (typeof name === 'undefined') {
18010
- throw new AppwriteException('Missing required parameter: "name"');
18402
+ if (typeof scopes === 'undefined') {
18403
+ throw new AppwriteException('Missing required parameter: "scopes"');
18011
18404
  }
18012
- const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
18405
+ const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
18013
18406
  const payload = {};
18014
- if (typeof name !== 'undefined') {
18015
- payload['name'] = name;
18016
- }
18017
- if (typeof key !== 'undefined') {
18018
- payload['key'] = key;
18019
- }
18020
- if (typeof store !== 'undefined') {
18021
- payload['store'] = store;
18407
+ if (typeof scopes !== 'undefined') {
18408
+ payload['scopes'] = scopes;
18022
18409
  }
18023
- if (typeof hostname !== 'undefined') {
18024
- payload['hostname'] = hostname;
18410
+ if (typeof duration !== 'undefined') {
18411
+ payload['duration'] = duration;
18025
18412
  }
18026
18413
  const uri = new URL(this.client.config.endpoint + apiPath);
18027
18414
  const apiHeaders = {
18028
18415
  'content-type': 'application/json',
18029
18416
  };
18030
- return this.client.call('put', uri, apiHeaders, payload);
18417
+ return this.client.call('post', uri, apiHeaders, payload);
18031
18418
  }
18032
- deletePlatform(paramsOrFirst, ...rest) {
18419
+ updateOAuth2(paramsOrFirst, ...rest) {
18033
18420
  let params;
18034
18421
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18035
18422
  params = (paramsOrFirst || {});
@@ -18037,24 +18424,42 @@ class Projects {
18037
18424
  else {
18038
18425
  params = {
18039
18426
  projectId: paramsOrFirst,
18040
- platformId: rest[0]
18427
+ provider: rest[0],
18428
+ appId: rest[1],
18429
+ secret: rest[2],
18430
+ enabled: rest[3]
18041
18431
  };
18042
18432
  }
18043
18433
  const projectId = params.projectId;
18044
- const platformId = params.platformId;
18434
+ const provider = params.provider;
18435
+ const appId = params.appId;
18436
+ const secret = params.secret;
18437
+ const enabled = params.enabled;
18045
18438
  if (typeof projectId === 'undefined') {
18046
18439
  throw new AppwriteException('Missing required parameter: "projectId"');
18047
18440
  }
18048
- if (typeof platformId === 'undefined') {
18049
- throw new AppwriteException('Missing required parameter: "platformId"');
18441
+ if (typeof provider === 'undefined') {
18442
+ throw new AppwriteException('Missing required parameter: "provider"');
18050
18443
  }
18051
- const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
18444
+ const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
18052
18445
  const payload = {};
18446
+ if (typeof provider !== 'undefined') {
18447
+ payload['provider'] = provider;
18448
+ }
18449
+ if (typeof appId !== 'undefined') {
18450
+ payload['appId'] = appId;
18451
+ }
18452
+ if (typeof secret !== 'undefined') {
18453
+ payload['secret'] = secret;
18454
+ }
18455
+ if (typeof enabled !== 'undefined') {
18456
+ payload['enabled'] = enabled;
18457
+ }
18053
18458
  const uri = new URL(this.client.config.endpoint + apiPath);
18054
18459
  const apiHeaders = {
18055
18460
  'content-type': 'application/json',
18056
18461
  };
18057
- return this.client.call('delete', uri, apiHeaders, payload);
18462
+ return this.client.call('patch', uri, apiHeaders, payload);
18058
18463
  }
18059
18464
  listSchedules(paramsOrFirst, ...rest) {
18060
18465
  let params;
@@ -18167,74 +18572,6 @@ class Projects {
18167
18572
  const apiHeaders = {};
18168
18573
  return this.client.call('get', uri, apiHeaders, payload);
18169
18574
  }
18170
- updateServiceStatus(paramsOrFirst, ...rest) {
18171
- let params;
18172
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18173
- params = (paramsOrFirst || {});
18174
- }
18175
- else {
18176
- params = {
18177
- projectId: paramsOrFirst,
18178
- service: rest[0],
18179
- status: rest[1]
18180
- };
18181
- }
18182
- const projectId = params.projectId;
18183
- const service = params.service;
18184
- const status = params.status;
18185
- if (typeof projectId === 'undefined') {
18186
- throw new AppwriteException('Missing required parameter: "projectId"');
18187
- }
18188
- if (typeof service === 'undefined') {
18189
- throw new AppwriteException('Missing required parameter: "service"');
18190
- }
18191
- if (typeof status === 'undefined') {
18192
- throw new AppwriteException('Missing required parameter: "status"');
18193
- }
18194
- const apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
18195
- const payload = {};
18196
- if (typeof service !== 'undefined') {
18197
- payload['service'] = service;
18198
- }
18199
- if (typeof status !== 'undefined') {
18200
- payload['status'] = status;
18201
- }
18202
- const uri = new URL(this.client.config.endpoint + apiPath);
18203
- const apiHeaders = {
18204
- 'content-type': 'application/json',
18205
- };
18206
- return this.client.call('patch', uri, apiHeaders, payload);
18207
- }
18208
- updateServiceStatusAll(paramsOrFirst, ...rest) {
18209
- let params;
18210
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18211
- params = (paramsOrFirst || {});
18212
- }
18213
- else {
18214
- params = {
18215
- projectId: paramsOrFirst,
18216
- status: rest[0]
18217
- };
18218
- }
18219
- const projectId = params.projectId;
18220
- const status = params.status;
18221
- if (typeof projectId === 'undefined') {
18222
- throw new AppwriteException('Missing required parameter: "projectId"');
18223
- }
18224
- if (typeof status === 'undefined') {
18225
- throw new AppwriteException('Missing required parameter: "status"');
18226
- }
18227
- const apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
18228
- const payload = {};
18229
- if (typeof status !== 'undefined') {
18230
- payload['status'] = status;
18231
- }
18232
- const uri = new URL(this.client.config.endpoint + apiPath);
18233
- const apiHeaders = {
18234
- 'content-type': 'application/json',
18235
- };
18236
- return this.client.call('patch', uri, apiHeaders, payload);
18237
- }
18238
18575
  updateSmtp(paramsOrFirst, ...rest) {
18239
18576
  let params;
18240
18577
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -21304,7 +21641,8 @@ class TablesDB {
21304
21641
  name: rest[1],
21305
21642
  permissions: rest[2],
21306
21643
  rowSecurity: rest[3],
21307
- enabled: rest[4]
21644
+ enabled: rest[4],
21645
+ purge: rest[5]
21308
21646
  };
21309
21647
  }
21310
21648
  const databaseId = params.databaseId;
@@ -21313,6 +21651,7 @@ class TablesDB {
21313
21651
  const permissions = params.permissions;
21314
21652
  const rowSecurity = params.rowSecurity;
21315
21653
  const enabled = params.enabled;
21654
+ const purge = params.purge;
21316
21655
  if (typeof databaseId === 'undefined') {
21317
21656
  throw new AppwriteException('Missing required parameter: "databaseId"');
21318
21657
  }
@@ -21333,6 +21672,9 @@ class TablesDB {
21333
21672
  if (typeof enabled !== 'undefined') {
21334
21673
  payload['enabled'] = enabled;
21335
21674
  }
21675
+ if (typeof purge !== 'undefined') {
21676
+ payload['purge'] = purge;
21677
+ }
21336
21678
  const uri = new URL(this.client.config.endpoint + apiPath);
21337
21679
  const apiHeaders = {
21338
21680
  'content-type': 'application/json',
@@ -26698,9 +27040,9 @@ class Webhooks {
26698
27040
  name: rest[1],
26699
27041
  events: rest[2],
26700
27042
  enabled: rest[3],
26701
- security: rest[4],
26702
- httpUser: rest[5],
26703
- httpPass: rest[6]
27043
+ tls: rest[4],
27044
+ authUsername: rest[5],
27045
+ authPassword: rest[6]
26704
27046
  };
26705
27047
  }
26706
27048
  const webhookId = params.webhookId;
@@ -26708,9 +27050,9 @@ class Webhooks {
26708
27050
  const name = params.name;
26709
27051
  const events = params.events;
26710
27052
  const enabled = params.enabled;
26711
- const security = params.security;
26712
- const httpUser = params.httpUser;
26713
- const httpPass = params.httpPass;
27053
+ const tls = params.tls;
27054
+ const authUsername = params.authUsername;
27055
+ const authPassword = params.authPassword;
26714
27056
  if (typeof webhookId === 'undefined') {
26715
27057
  throw new AppwriteException('Missing required parameter: "webhookId"');
26716
27058
  }
@@ -26740,14 +27082,14 @@ class Webhooks {
26740
27082
  if (typeof enabled !== 'undefined') {
26741
27083
  payload['enabled'] = enabled;
26742
27084
  }
26743
- if (typeof security !== 'undefined') {
26744
- payload['security'] = security;
27085
+ if (typeof tls !== 'undefined') {
27086
+ payload['tls'] = tls;
26745
27087
  }
26746
- if (typeof httpUser !== 'undefined') {
26747
- payload['httpUser'] = httpUser;
27088
+ if (typeof authUsername !== 'undefined') {
27089
+ payload['authUsername'] = authUsername;
26748
27090
  }
26749
- if (typeof httpPass !== 'undefined') {
26750
- payload['httpPass'] = httpPass;
27091
+ if (typeof authPassword !== 'undefined') {
27092
+ payload['authPassword'] = authPassword;
26751
27093
  }
26752
27094
  const uri = new URL(this.client.config.endpoint + apiPath);
26753
27095
  const apiHeaders = {
@@ -26787,9 +27129,9 @@ class Webhooks {
26787
27129
  url: rest[1],
26788
27130
  events: rest[2],
26789
27131
  enabled: rest[3],
26790
- security: rest[4],
26791
- httpUser: rest[5],
26792
- httpPass: rest[6]
27132
+ tls: rest[4],
27133
+ authUsername: rest[5],
27134
+ authPassword: rest[6]
26793
27135
  };
26794
27136
  }
26795
27137
  const webhookId = params.webhookId;
@@ -26797,9 +27139,9 @@ class Webhooks {
26797
27139
  const url = params.url;
26798
27140
  const events = params.events;
26799
27141
  const enabled = params.enabled;
26800
- const security = params.security;
26801
- const httpUser = params.httpUser;
26802
- const httpPass = params.httpPass;
27142
+ const tls = params.tls;
27143
+ const authUsername = params.authUsername;
27144
+ const authPassword = params.authPassword;
26803
27145
  if (typeof webhookId === 'undefined') {
26804
27146
  throw new AppwriteException('Missing required parameter: "webhookId"');
26805
27147
  }
@@ -26826,14 +27168,14 @@ class Webhooks {
26826
27168
  if (typeof enabled !== 'undefined') {
26827
27169
  payload['enabled'] = enabled;
26828
27170
  }
26829
- if (typeof security !== 'undefined') {
26830
- payload['security'] = security;
27171
+ if (typeof tls !== 'undefined') {
27172
+ payload['tls'] = tls;
26831
27173
  }
26832
- if (typeof httpUser !== 'undefined') {
26833
- payload['httpUser'] = httpUser;
27174
+ if (typeof authUsername !== 'undefined') {
27175
+ payload['authUsername'] = authUsername;
26834
27176
  }
26835
- if (typeof httpPass !== 'undefined') {
26836
- payload['httpPass'] = httpPass;
27177
+ if (typeof authPassword !== 'undefined') {
27178
+ payload['authPassword'] = authPassword;
26837
27179
  }
26838
27180
  const uri = new URL(this.client.config.endpoint + apiPath);
26839
27181
  const apiHeaders = {
@@ -26863,7 +27205,7 @@ class Webhooks {
26863
27205
  };
26864
27206
  return this.client.call('delete', uri, apiHeaders, payload);
26865
27207
  }
26866
- updateSignature(paramsOrFirst) {
27208
+ updateSecret(paramsOrFirst) {
26867
27209
  let params;
26868
27210
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
26869
27211
  params = (paramsOrFirst || {});
@@ -26877,7 +27219,7 @@ class Webhooks {
26877
27219
  if (typeof webhookId === 'undefined') {
26878
27220
  throw new AppwriteException('Missing required parameter: "webhookId"');
26879
27221
  }
26880
- const apiPath = '/webhooks/{webhookId}/signature'.replace('{webhookId}', webhookId);
27222
+ const apiPath = '/webhooks/{webhookId}/secret'.replace('{webhookId}', webhookId);
26881
27223
  const payload = {};
26882
27224
  const uri = new URL(this.client.config.endpoint + apiPath);
26883
27225
  const apiHeaders = {
@@ -27911,6 +28253,10 @@ exports.Scopes = void 0;
27911
28253
  Scopes["WebhooksWrite"] = "webhooks.write";
27912
28254
  Scopes["ProjectRead"] = "project.read";
27913
28255
  Scopes["ProjectWrite"] = "project.write";
28256
+ Scopes["KeysRead"] = "keys.read";
28257
+ Scopes["KeysWrite"] = "keys.write";
28258
+ Scopes["PlatformsRead"] = "platforms.read";
28259
+ Scopes["PlatformsWrite"] = "platforms.write";
27914
28260
  Scopes["PoliciesWrite"] = "policies.write";
27915
28261
  Scopes["PoliciesRead"] = "policies.read";
27916
28262
  Scopes["ArchivesRead"] = "archives.read";
@@ -27920,12 +28266,8 @@ exports.Scopes = void 0;
27920
28266
  Scopes["DomainsRead"] = "domains.read";
27921
28267
  Scopes["DomainsWrite"] = "domains.write";
27922
28268
  Scopes["EventsRead"] = "events.read";
27923
- Scopes["PlatformsRead"] = "platforms.read";
27924
- Scopes["PlatformsWrite"] = "platforms.write";
27925
28269
  Scopes["ProjectsRead"] = "projects.read";
27926
28270
  Scopes["ProjectsWrite"] = "projects.write";
27927
- Scopes["KeysRead"] = "keys.read";
27928
- Scopes["KeysWrite"] = "keys.write";
27929
28271
  Scopes["DevKeysRead"] = "devKeys.read";
27930
28272
  Scopes["DevKeysWrite"] = "devKeys.write";
27931
28273
  })(exports.Scopes || (exports.Scopes = {}));
@@ -27979,6 +28321,7 @@ exports.OAuthProvider = void 0;
27979
28321
  OAuthProvider["TradeshiftBox"] = "tradeshiftBox";
27980
28322
  OAuthProvider["Twitch"] = "twitch";
27981
28323
  OAuthProvider["Wordpress"] = "wordpress";
28324
+ OAuthProvider["X"] = "x";
27982
28325
  OAuthProvider["Yahoo"] = "yahoo";
27983
28326
  OAuthProvider["Yammer"] = "yammer";
27984
28327
  OAuthProvider["Yandex"] = "yandex";
@@ -29095,6 +29438,39 @@ exports.SupabaseMigrationResource = void 0;
29095
29438
  SupabaseMigrationResource["File"] = "file";
29096
29439
  })(exports.SupabaseMigrationResource || (exports.SupabaseMigrationResource = {}));
29097
29440
 
29441
+ exports.Addon = void 0;
29442
+ (function (Addon) {
29443
+ Addon["Baa"] = "baa";
29444
+ })(exports.Addon || (exports.Addon = {}));
29445
+
29446
+ exports.ProtocolId = void 0;
29447
+ (function (ProtocolId) {
29448
+ ProtocolId["Rest"] = "rest";
29449
+ ProtocolId["Graphql"] = "graphql";
29450
+ ProtocolId["Websocket"] = "websocket";
29451
+ })(exports.ProtocolId || (exports.ProtocolId = {}));
29452
+
29453
+ exports.ServiceId = void 0;
29454
+ (function (ServiceId) {
29455
+ ServiceId["Account"] = "account";
29456
+ ServiceId["Avatars"] = "avatars";
29457
+ ServiceId["Databases"] = "databases";
29458
+ ServiceId["Tablesdb"] = "tablesdb";
29459
+ ServiceId["Locale"] = "locale";
29460
+ ServiceId["Health"] = "health";
29461
+ ServiceId["Project"] = "project";
29462
+ ServiceId["Storage"] = "storage";
29463
+ ServiceId["Teams"] = "teams";
29464
+ ServiceId["Users"] = "users";
29465
+ ServiceId["Vcs"] = "vcs";
29466
+ ServiceId["Sites"] = "sites";
29467
+ ServiceId["Functions"] = "functions";
29468
+ ServiceId["Proxy"] = "proxy";
29469
+ ServiceId["Graphql"] = "graphql";
29470
+ ServiceId["Migrations"] = "migrations";
29471
+ ServiceId["Messaging"] = "messaging";
29472
+ })(exports.ServiceId || (exports.ServiceId = {}));
29473
+
29098
29474
  exports.ProjectUsageRange = void 0;
29099
29475
  (function (ProjectUsageRange) {
29100
29476
  ProjectUsageRange["OneHour"] = "1h";
@@ -29111,13 +29487,6 @@ exports.Region = void 0;
29111
29487
  Region["Tor"] = "tor";
29112
29488
  })(exports.Region || (exports.Region = {}));
29113
29489
 
29114
- exports.Api = void 0;
29115
- (function (Api) {
29116
- Api["Rest"] = "rest";
29117
- Api["Graphql"] = "graphql";
29118
- Api["Realtime"] = "realtime";
29119
- })(exports.Api || (exports.Api = {}));
29120
-
29121
29490
  exports.AuthMethod = void 0;
29122
29491
  (function (AuthMethod) {
29123
29492
  AuthMethod["Emailpassword"] = "email-password";
@@ -29129,25 +29498,6 @@ exports.AuthMethod = void 0;
29129
29498
  AuthMethod["Phone"] = "phone";
29130
29499
  })(exports.AuthMethod || (exports.AuthMethod = {}));
29131
29500
 
29132
- exports.PlatformType = void 0;
29133
- (function (PlatformType) {
29134
- PlatformType["Web"] = "web";
29135
- PlatformType["Flutterweb"] = "flutter-web";
29136
- PlatformType["Flutterios"] = "flutter-ios";
29137
- PlatformType["Flutterandroid"] = "flutter-android";
29138
- PlatformType["Flutterlinux"] = "flutter-linux";
29139
- PlatformType["Fluttermacos"] = "flutter-macos";
29140
- PlatformType["Flutterwindows"] = "flutter-windows";
29141
- PlatformType["Appleios"] = "apple-ios";
29142
- PlatformType["Applemacos"] = "apple-macos";
29143
- PlatformType["Applewatchos"] = "apple-watchos";
29144
- PlatformType["Appletvos"] = "apple-tvos";
29145
- PlatformType["Android"] = "android";
29146
- PlatformType["Unity"] = "unity";
29147
- PlatformType["Reactnativeios"] = "react-native-ios";
29148
- PlatformType["Reactnativeandroid"] = "react-native-android";
29149
- })(exports.PlatformType || (exports.PlatformType = {}));
29150
-
29151
29501
  exports.ResourceType = void 0;
29152
29502
  (function (ResourceType) {
29153
29503
  ResourceType["Function"] = "function";
@@ -29156,23 +29506,6 @@ exports.ResourceType = void 0;
29156
29506
  ResourceType["Backup"] = "backup";
29157
29507
  })(exports.ResourceType || (exports.ResourceType = {}));
29158
29508
 
29159
- exports.ApiService = void 0;
29160
- (function (ApiService) {
29161
- ApiService["Account"] = "account";
29162
- ApiService["Avatars"] = "avatars";
29163
- ApiService["Databases"] = "databases";
29164
- ApiService["Tablesdb"] = "tablesdb";
29165
- ApiService["Locale"] = "locale";
29166
- ApiService["Health"] = "health";
29167
- ApiService["Storage"] = "storage";
29168
- ApiService["Teams"] = "teams";
29169
- ApiService["Users"] = "users";
29170
- ApiService["Sites"] = "sites";
29171
- ApiService["Functions"] = "functions";
29172
- ApiService["Graphql"] = "graphql";
29173
- ApiService["Messaging"] = "messaging";
29174
- })(exports.ApiService || (exports.ApiService = {}));
29175
-
29176
29509
  exports.SMTPSecure = void 0;
29177
29510
  (function (SMTPSecure) {
29178
29511
  SMTPSecure["Tls"] = "tls";
@@ -29740,6 +30073,15 @@ exports.ExecutionStatus = void 0;
29740
30073
  ExecutionStatus["Scheduled"] = "scheduled";
29741
30074
  })(exports.ExecutionStatus || (exports.ExecutionStatus = {}));
29742
30075
 
30076
+ exports.PlatformType = void 0;
30077
+ (function (PlatformType) {
30078
+ PlatformType["Windows"] = "windows";
30079
+ PlatformType["Apple"] = "apple";
30080
+ PlatformType["Android"] = "android";
30081
+ PlatformType["Linux"] = "linux";
30082
+ PlatformType["Web"] = "web";
30083
+ })(exports.PlatformType || (exports.PlatformType = {}));
30084
+
29743
30085
  exports.HealthAntivirusStatus = void 0;
29744
30086
  (function (HealthAntivirusStatus) {
29745
30087
  HealthAntivirusStatus["Disabled"] = "disabled";