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