@appwrite.io/console 8.3.0 → 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/sdk.js CHANGED
@@ -580,8 +580,8 @@ class Client {
580
580
  'x-sdk-name': 'Console',
581
581
  'x-sdk-platform': 'console',
582
582
  'x-sdk-language': 'web',
583
- 'x-sdk-version': '8.3.0',
584
- 'X-Appwrite-Response-Format': '1.9.0',
583
+ 'x-sdk-version': '9.0.0',
584
+ 'X-Appwrite-Response-Format': '1.9.1',
585
585
  };
586
586
  this.realtime = {
587
587
  socket: undefined,
@@ -4855,7 +4855,8 @@ class Databases {
4855
4855
  name: rest[1],
4856
4856
  permissions: rest[2],
4857
4857
  documentSecurity: rest[3],
4858
- enabled: rest[4]
4858
+ enabled: rest[4],
4859
+ purge: rest[5]
4859
4860
  };
4860
4861
  }
4861
4862
  const databaseId = params.databaseId;
@@ -4864,6 +4865,7 @@ class Databases {
4864
4865
  const permissions = params.permissions;
4865
4866
  const documentSecurity = params.documentSecurity;
4866
4867
  const enabled = params.enabled;
4868
+ const purge = params.purge;
4867
4869
  if (typeof databaseId === 'undefined') {
4868
4870
  throw new AppwriteException('Missing required parameter: "databaseId"');
4869
4871
  }
@@ -4884,6 +4886,9 @@ class Databases {
4884
4886
  if (typeof enabled !== 'undefined') {
4885
4887
  payload['enabled'] = enabled;
4886
4888
  }
4889
+ if (typeof purge !== 'undefined') {
4890
+ payload['purge'] = purge;
4891
+ }
4887
4892
  const uri = new URL(this.client.config.endpoint + apiPath);
4888
4893
  const apiHeaders = {
4889
4894
  'content-type': 'application/json',
@@ -16637,43 +16642,82 @@ class Project {
16637
16642
  constructor(client) {
16638
16643
  this.client = client;
16639
16644
  }
16640
- getUsage(paramsOrFirst, ...rest) {
16645
+ updateCanonicalEmails(paramsOrFirst) {
16641
16646
  let params;
16642
16647
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16643
16648
  params = (paramsOrFirst || {});
16644
16649
  }
16645
16650
  else {
16646
16651
  params = {
16647
- startDate: paramsOrFirst,
16648
- endDate: rest[0],
16649
- period: rest[1]
16652
+ enabled: paramsOrFirst
16650
16653
  };
16651
16654
  }
16652
- const startDate = params.startDate;
16653
- const endDate = params.endDate;
16654
- const period = params.period;
16655
- if (typeof startDate === 'undefined') {
16656
- throw new AppwriteException('Missing required parameter: "startDate"');
16655
+ const enabled = params.enabled;
16656
+ if (typeof enabled === 'undefined') {
16657
+ throw new AppwriteException('Missing required parameter: "enabled"');
16657
16658
  }
16658
- if (typeof endDate === 'undefined') {
16659
- throw new AppwriteException('Missing required parameter: "endDate"');
16659
+ const apiPath = '/project/auth/canonical-emails';
16660
+ const payload = {};
16661
+ if (typeof enabled !== 'undefined') {
16662
+ payload['enabled'] = enabled;
16660
16663
  }
16661
- const apiPath = '/project/usage';
16664
+ const uri = new URL(this.client.config.endpoint + apiPath);
16665
+ const apiHeaders = {
16666
+ 'content-type': 'application/json',
16667
+ };
16668
+ return this.client.call('patch', uri, apiHeaders, payload);
16669
+ }
16670
+ updateDisposableEmails(paramsOrFirst) {
16671
+ let params;
16672
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16673
+ params = (paramsOrFirst || {});
16674
+ }
16675
+ else {
16676
+ params = {
16677
+ enabled: paramsOrFirst
16678
+ };
16679
+ }
16680
+ const enabled = params.enabled;
16681
+ if (typeof enabled === 'undefined') {
16682
+ throw new AppwriteException('Missing required parameter: "enabled"');
16683
+ }
16684
+ const apiPath = '/project/auth/disposable-emails';
16662
16685
  const payload = {};
16663
- if (typeof startDate !== 'undefined') {
16664
- payload['startDate'] = startDate;
16686
+ if (typeof enabled !== 'undefined') {
16687
+ payload['enabled'] = enabled;
16665
16688
  }
16666
- if (typeof endDate !== 'undefined') {
16667
- payload['endDate'] = endDate;
16689
+ const uri = new URL(this.client.config.endpoint + apiPath);
16690
+ const apiHeaders = {
16691
+ 'content-type': 'application/json',
16692
+ };
16693
+ return this.client.call('patch', uri, apiHeaders, payload);
16694
+ }
16695
+ updateFreeEmails(paramsOrFirst) {
16696
+ let params;
16697
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16698
+ params = (paramsOrFirst || {});
16668
16699
  }
16669
- if (typeof period !== 'undefined') {
16670
- payload['period'] = period;
16700
+ else {
16701
+ params = {
16702
+ enabled: paramsOrFirst
16703
+ };
16704
+ }
16705
+ const enabled = params.enabled;
16706
+ if (typeof enabled === 'undefined') {
16707
+ throw new AppwriteException('Missing required parameter: "enabled"');
16708
+ }
16709
+ const apiPath = '/project/auth/free-emails';
16710
+ const payload = {};
16711
+ if (typeof enabled !== 'undefined') {
16712
+ payload['enabled'] = enabled;
16671
16713
  }
16672
16714
  const uri = new URL(this.client.config.endpoint + apiPath);
16673
- const apiHeaders = {};
16674
- return this.client.call('get', uri, apiHeaders, payload);
16715
+ const apiHeaders = {
16716
+ 'content-type': 'application/json',
16717
+ };
16718
+ return this.client.call('patch', uri, apiHeaders, payload);
16675
16719
  }
16676
- listVariables(paramsOrFirst, ...rest) {
16720
+ listKeys(paramsOrFirst, ...rest) {
16677
16721
  let params;
16678
16722
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16679
16723
  params = (paramsOrFirst || {});
@@ -16686,7 +16730,7 @@ class Project {
16686
16730
  }
16687
16731
  const queries = params.queries;
16688
16732
  const total = params.total;
16689
- const apiPath = '/project/variables';
16733
+ const apiPath = '/project/keys';
16690
16734
  const payload = {};
16691
16735
  if (typeof queries !== 'undefined') {
16692
16736
  payload['queries'] = queries;
@@ -16698,45 +16742,45 @@ class Project {
16698
16742
  const apiHeaders = {};
16699
16743
  return this.client.call('get', uri, apiHeaders, payload);
16700
16744
  }
16701
- createVariable(paramsOrFirst, ...rest) {
16745
+ createKey(paramsOrFirst, ...rest) {
16702
16746
  let params;
16703
16747
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16704
16748
  params = (paramsOrFirst || {});
16705
16749
  }
16706
16750
  else {
16707
16751
  params = {
16708
- variableId: paramsOrFirst,
16709
- key: rest[0],
16710
- value: rest[1],
16711
- secret: rest[2]
16752
+ keyId: paramsOrFirst,
16753
+ name: rest[0],
16754
+ scopes: rest[1],
16755
+ expire: rest[2]
16712
16756
  };
16713
16757
  }
16714
- const variableId = params.variableId;
16715
- const key = params.key;
16716
- const value = params.value;
16717
- const secret = params.secret;
16718
- if (typeof variableId === 'undefined') {
16719
- throw new AppwriteException('Missing required parameter: "variableId"');
16758
+ const keyId = params.keyId;
16759
+ const name = params.name;
16760
+ const scopes = params.scopes;
16761
+ const expire = params.expire;
16762
+ if (typeof keyId === 'undefined') {
16763
+ throw new AppwriteException('Missing required parameter: "keyId"');
16720
16764
  }
16721
- if (typeof key === 'undefined') {
16722
- throw new AppwriteException('Missing required parameter: "key"');
16765
+ if (typeof name === 'undefined') {
16766
+ throw new AppwriteException('Missing required parameter: "name"');
16723
16767
  }
16724
- if (typeof value === 'undefined') {
16725
- throw new AppwriteException('Missing required parameter: "value"');
16768
+ if (typeof scopes === 'undefined') {
16769
+ throw new AppwriteException('Missing required parameter: "scopes"');
16726
16770
  }
16727
- const apiPath = '/project/variables';
16771
+ const apiPath = '/project/keys';
16728
16772
  const payload = {};
16729
- if (typeof variableId !== 'undefined') {
16730
- payload['variableId'] = variableId;
16773
+ if (typeof keyId !== 'undefined') {
16774
+ payload['keyId'] = keyId;
16731
16775
  }
16732
- if (typeof key !== 'undefined') {
16733
- payload['key'] = key;
16776
+ if (typeof name !== 'undefined') {
16777
+ payload['name'] = name;
16734
16778
  }
16735
- if (typeof value !== 'undefined') {
16736
- payload['value'] = value;
16779
+ if (typeof scopes !== 'undefined') {
16780
+ payload['scopes'] = scopes;
16737
16781
  }
16738
- if (typeof secret !== 'undefined') {
16739
- payload['secret'] = secret;
16782
+ if (typeof expire !== 'undefined') {
16783
+ payload['expire'] = expire;
16740
16784
  }
16741
16785
  const uri = new URL(this.client.config.endpoint + apiPath);
16742
16786
  const apiHeaders = {
@@ -16744,56 +16788,62 @@ class Project {
16744
16788
  };
16745
16789
  return this.client.call('post', uri, apiHeaders, payload);
16746
16790
  }
16747
- getVariable(paramsOrFirst) {
16791
+ getKey(paramsOrFirst) {
16748
16792
  let params;
16749
16793
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16750
16794
  params = (paramsOrFirst || {});
16751
16795
  }
16752
16796
  else {
16753
16797
  params = {
16754
- variableId: paramsOrFirst
16798
+ keyId: paramsOrFirst
16755
16799
  };
16756
16800
  }
16757
- const variableId = params.variableId;
16758
- if (typeof variableId === 'undefined') {
16759
- throw new AppwriteException('Missing required parameter: "variableId"');
16801
+ const keyId = params.keyId;
16802
+ if (typeof keyId === 'undefined') {
16803
+ throw new AppwriteException('Missing required parameter: "keyId"');
16760
16804
  }
16761
- const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
16805
+ const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
16762
16806
  const payload = {};
16763
16807
  const uri = new URL(this.client.config.endpoint + apiPath);
16764
16808
  const apiHeaders = {};
16765
16809
  return this.client.call('get', uri, apiHeaders, payload);
16766
16810
  }
16767
- updateVariable(paramsOrFirst, ...rest) {
16811
+ updateKey(paramsOrFirst, ...rest) {
16768
16812
  let params;
16769
16813
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16770
16814
  params = (paramsOrFirst || {});
16771
16815
  }
16772
16816
  else {
16773
16817
  params = {
16774
- variableId: paramsOrFirst,
16775
- key: rest[0],
16776
- value: rest[1],
16777
- secret: rest[2]
16818
+ keyId: paramsOrFirst,
16819
+ name: rest[0],
16820
+ scopes: rest[1],
16821
+ expire: rest[2]
16778
16822
  };
16779
16823
  }
16780
- const variableId = params.variableId;
16781
- const key = params.key;
16782
- const value = params.value;
16783
- const secret = params.secret;
16784
- if (typeof variableId === 'undefined') {
16785
- throw new AppwriteException('Missing required parameter: "variableId"');
16824
+ const keyId = params.keyId;
16825
+ const name = params.name;
16826
+ const scopes = params.scopes;
16827
+ const expire = params.expire;
16828
+ if (typeof keyId === 'undefined') {
16829
+ throw new AppwriteException('Missing required parameter: "keyId"');
16786
16830
  }
16787
- const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
16831
+ if (typeof name === 'undefined') {
16832
+ throw new AppwriteException('Missing required parameter: "name"');
16833
+ }
16834
+ if (typeof scopes === 'undefined') {
16835
+ throw new AppwriteException('Missing required parameter: "scopes"');
16836
+ }
16837
+ const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
16788
16838
  const payload = {};
16789
- if (typeof key !== 'undefined') {
16790
- payload['key'] = key;
16839
+ if (typeof name !== 'undefined') {
16840
+ payload['name'] = name;
16791
16841
  }
16792
- if (typeof value !== 'undefined') {
16793
- payload['value'] = value;
16842
+ if (typeof scopes !== 'undefined') {
16843
+ payload['scopes'] = scopes;
16794
16844
  }
16795
- if (typeof secret !== 'undefined') {
16796
- payload['secret'] = secret;
16845
+ if (typeof expire !== 'undefined') {
16846
+ payload['expire'] = expire;
16797
16847
  }
16798
16848
  const uri = new URL(this.client.config.endpoint + apiPath);
16799
16849
  const apiHeaders = {
@@ -16801,21 +16851,21 @@ class Project {
16801
16851
  };
16802
16852
  return this.client.call('put', uri, apiHeaders, payload);
16803
16853
  }
16804
- deleteVariable(paramsOrFirst) {
16854
+ deleteKey(paramsOrFirst) {
16805
16855
  let params;
16806
16856
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16807
16857
  params = (paramsOrFirst || {});
16808
16858
  }
16809
16859
  else {
16810
16860
  params = {
16811
- variableId: paramsOrFirst
16861
+ keyId: paramsOrFirst
16812
16862
  };
16813
16863
  }
16814
- const variableId = params.variableId;
16815
- if (typeof variableId === 'undefined') {
16816
- throw new AppwriteException('Missing required parameter: "variableId"');
16864
+ const keyId = params.keyId;
16865
+ if (typeof keyId === 'undefined') {
16866
+ throw new AppwriteException('Missing required parameter: "keyId"');
16817
16867
  }
16818
- const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
16868
+ const apiPath = '/project/keys/{keyId}'.replace('{keyId}', keyId);
16819
16869
  const payload = {};
16820
16870
  const uri = new URL(this.client.config.endpoint + apiPath);
16821
16871
  const apiHeaders = {
@@ -16823,13 +16873,32 @@ class Project {
16823
16873
  };
16824
16874
  return this.client.call('delete', uri, apiHeaders, payload);
16825
16875
  }
16826
- }
16827
-
16828
- class Projects {
16829
- constructor(client) {
16830
- this.client = client;
16876
+ updateLabels(paramsOrFirst) {
16877
+ let params;
16878
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16879
+ params = (paramsOrFirst || {});
16880
+ }
16881
+ else {
16882
+ params = {
16883
+ labels: paramsOrFirst
16884
+ };
16885
+ }
16886
+ const labels = params.labels;
16887
+ if (typeof labels === 'undefined') {
16888
+ throw new AppwriteException('Missing required parameter: "labels"');
16889
+ }
16890
+ const apiPath = '/project/labels';
16891
+ const payload = {};
16892
+ if (typeof labels !== 'undefined') {
16893
+ payload['labels'] = labels;
16894
+ }
16895
+ const uri = new URL(this.client.config.endpoint + apiPath);
16896
+ const apiHeaders = {
16897
+ 'content-type': 'application/json',
16898
+ };
16899
+ return this.client.call('put', uri, apiHeaders, payload);
16831
16900
  }
16832
- list(paramsOrFirst, ...rest) {
16901
+ listPlatforms(paramsOrFirst, ...rest) {
16833
16902
  let params;
16834
16903
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16835
16904
  params = (paramsOrFirst || {});
@@ -16837,21 +16906,16 @@ class Projects {
16837
16906
  else {
16838
16907
  params = {
16839
16908
  queries: paramsOrFirst,
16840
- search: rest[0],
16841
- total: rest[1]
16909
+ total: rest[0]
16842
16910
  };
16843
16911
  }
16844
16912
  const queries = params.queries;
16845
- const search = params.search;
16846
16913
  const total = params.total;
16847
- const apiPath = '/projects';
16914
+ const apiPath = '/project/platforms';
16848
16915
  const payload = {};
16849
16916
  if (typeof queries !== 'undefined') {
16850
16917
  payload['queries'] = queries;
16851
16918
  }
16852
- if (typeof search !== 'undefined') {
16853
- payload['search'] = search;
16854
- }
16855
16919
  if (typeof total !== 'undefined') {
16856
16920
  payload['total'] = total;
16857
16921
  }
@@ -16859,90 +16923,40 @@ class Projects {
16859
16923
  const apiHeaders = {};
16860
16924
  return this.client.call('get', uri, apiHeaders, payload);
16861
16925
  }
16862
- create(paramsOrFirst, ...rest) {
16926
+ createAndroidPlatform(paramsOrFirst, ...rest) {
16863
16927
  let params;
16864
16928
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16865
16929
  params = (paramsOrFirst || {});
16866
16930
  }
16867
16931
  else {
16868
16932
  params = {
16869
- projectId: paramsOrFirst,
16933
+ platformId: paramsOrFirst,
16870
16934
  name: rest[0],
16871
- teamId: rest[1],
16872
- region: rest[2],
16873
- description: rest[3],
16874
- logo: rest[4],
16875
- url: rest[5],
16876
- legalName: rest[6],
16877
- legalCountry: rest[7],
16878
- legalState: rest[8],
16879
- legalCity: rest[9],
16880
- legalAddress: rest[10],
16881
- legalTaxId: rest[11]
16935
+ applicationId: rest[1]
16882
16936
  };
16883
16937
  }
16884
- const projectId = params.projectId;
16938
+ const platformId = params.platformId;
16885
16939
  const name = params.name;
16886
- const teamId = params.teamId;
16887
- const region = params.region;
16888
- const description = params.description;
16889
- const logo = params.logo;
16890
- const url = params.url;
16891
- const legalName = params.legalName;
16892
- const legalCountry = params.legalCountry;
16893
- const legalState = params.legalState;
16894
- const legalCity = params.legalCity;
16895
- const legalAddress = params.legalAddress;
16896
- const legalTaxId = params.legalTaxId;
16897
- if (typeof projectId === 'undefined') {
16898
- throw new AppwriteException('Missing required parameter: "projectId"');
16940
+ const applicationId = params.applicationId;
16941
+ if (typeof platformId === 'undefined') {
16942
+ throw new AppwriteException('Missing required parameter: "platformId"');
16899
16943
  }
16900
16944
  if (typeof name === 'undefined') {
16901
16945
  throw new AppwriteException('Missing required parameter: "name"');
16902
16946
  }
16903
- if (typeof teamId === 'undefined') {
16904
- throw new AppwriteException('Missing required parameter: "teamId"');
16947
+ if (typeof applicationId === 'undefined') {
16948
+ throw new AppwriteException('Missing required parameter: "applicationId"');
16905
16949
  }
16906
- const apiPath = '/projects';
16950
+ const apiPath = '/project/platforms/android';
16907
16951
  const payload = {};
16908
- if (typeof projectId !== 'undefined') {
16909
- payload['projectId'] = projectId;
16952
+ if (typeof platformId !== 'undefined') {
16953
+ payload['platformId'] = platformId;
16910
16954
  }
16911
16955
  if (typeof name !== 'undefined') {
16912
16956
  payload['name'] = name;
16913
16957
  }
16914
- if (typeof teamId !== 'undefined') {
16915
- payload['teamId'] = teamId;
16916
- }
16917
- if (typeof region !== 'undefined') {
16918
- payload['region'] = region;
16919
- }
16920
- if (typeof description !== 'undefined') {
16921
- payload['description'] = description;
16922
- }
16923
- if (typeof logo !== 'undefined') {
16924
- payload['logo'] = logo;
16925
- }
16926
- if (typeof url !== 'undefined') {
16927
- payload['url'] = url;
16928
- }
16929
- if (typeof legalName !== 'undefined') {
16930
- payload['legalName'] = legalName;
16931
- }
16932
- if (typeof legalCountry !== 'undefined') {
16933
- payload['legalCountry'] = legalCountry;
16934
- }
16935
- if (typeof legalState !== 'undefined') {
16936
- payload['legalState'] = legalState;
16937
- }
16938
- if (typeof legalCity !== 'undefined') {
16939
- payload['legalCity'] = legalCity;
16940
- }
16941
- if (typeof legalAddress !== 'undefined') {
16942
- payload['legalAddress'] = legalAddress;
16943
- }
16944
- if (typeof legalTaxId !== 'undefined') {
16945
- payload['legalTaxId'] = legalTaxId;
16958
+ if (typeof applicationId !== 'undefined') {
16959
+ payload['applicationId'] = applicationId;
16946
16960
  }
16947
16961
  const uri = new URL(this.client.config.endpoint + apiPath);
16948
16962
  const apiHeaders = {
@@ -16950,418 +16964,425 @@ class Projects {
16950
16964
  };
16951
16965
  return this.client.call('post', uri, apiHeaders, payload);
16952
16966
  }
16953
- get(paramsOrFirst) {
16967
+ updateAndroidPlatform(paramsOrFirst, ...rest) {
16954
16968
  let params;
16955
16969
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16956
16970
  params = (paramsOrFirst || {});
16957
16971
  }
16958
16972
  else {
16959
16973
  params = {
16960
- projectId: paramsOrFirst
16974
+ platformId: paramsOrFirst,
16975
+ name: rest[0],
16976
+ applicationId: rest[1]
16961
16977
  };
16962
16978
  }
16963
- const projectId = params.projectId;
16964
- if (typeof projectId === 'undefined') {
16965
- throw new AppwriteException('Missing required parameter: "projectId"');
16979
+ const platformId = params.platformId;
16980
+ const name = params.name;
16981
+ const applicationId = params.applicationId;
16982
+ if (typeof platformId === 'undefined') {
16983
+ throw new AppwriteException('Missing required parameter: "platformId"');
16966
16984
  }
16967
- const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
16985
+ if (typeof name === 'undefined') {
16986
+ throw new AppwriteException('Missing required parameter: "name"');
16987
+ }
16988
+ if (typeof applicationId === 'undefined') {
16989
+ throw new AppwriteException('Missing required parameter: "applicationId"');
16990
+ }
16991
+ const apiPath = '/project/platforms/android/{platformId}'.replace('{platformId}', platformId);
16968
16992
  const payload = {};
16993
+ if (typeof name !== 'undefined') {
16994
+ payload['name'] = name;
16995
+ }
16996
+ if (typeof applicationId !== 'undefined') {
16997
+ payload['applicationId'] = applicationId;
16998
+ }
16969
16999
  const uri = new URL(this.client.config.endpoint + apiPath);
16970
- const apiHeaders = {};
16971
- return this.client.call('get', uri, apiHeaders, payload);
17000
+ const apiHeaders = {
17001
+ 'content-type': 'application/json',
17002
+ };
17003
+ return this.client.call('put', uri, apiHeaders, payload);
16972
17004
  }
16973
- update(paramsOrFirst, ...rest) {
17005
+ createApplePlatform(paramsOrFirst, ...rest) {
16974
17006
  let params;
16975
17007
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
16976
17008
  params = (paramsOrFirst || {});
16977
17009
  }
16978
17010
  else {
16979
17011
  params = {
16980
- projectId: paramsOrFirst,
17012
+ platformId: paramsOrFirst,
16981
17013
  name: rest[0],
16982
- description: rest[1],
16983
- logo: rest[2],
16984
- url: rest[3],
16985
- legalName: rest[4],
16986
- legalCountry: rest[5],
16987
- legalState: rest[6],
16988
- legalCity: rest[7],
16989
- legalAddress: rest[8],
16990
- legalTaxId: rest[9]
17014
+ bundleIdentifier: rest[1]
16991
17015
  };
16992
17016
  }
16993
- const projectId = params.projectId;
17017
+ const platformId = params.platformId;
16994
17018
  const name = params.name;
16995
- const description = params.description;
16996
- const logo = params.logo;
16997
- const url = params.url;
16998
- const legalName = params.legalName;
16999
- const legalCountry = params.legalCountry;
17000
- const legalState = params.legalState;
17001
- const legalCity = params.legalCity;
17002
- const legalAddress = params.legalAddress;
17003
- const legalTaxId = params.legalTaxId;
17004
- if (typeof projectId === 'undefined') {
17005
- throw new AppwriteException('Missing required parameter: "projectId"');
17019
+ const bundleIdentifier = params.bundleIdentifier;
17020
+ if (typeof platformId === 'undefined') {
17021
+ throw new AppwriteException('Missing required parameter: "platformId"');
17006
17022
  }
17007
17023
  if (typeof name === 'undefined') {
17008
17024
  throw new AppwriteException('Missing required parameter: "name"');
17009
17025
  }
17010
- const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17026
+ if (typeof bundleIdentifier === 'undefined') {
17027
+ throw new AppwriteException('Missing required parameter: "bundleIdentifier"');
17028
+ }
17029
+ const apiPath = '/project/platforms/apple';
17011
17030
  const payload = {};
17031
+ if (typeof platformId !== 'undefined') {
17032
+ payload['platformId'] = platformId;
17033
+ }
17012
17034
  if (typeof name !== 'undefined') {
17013
17035
  payload['name'] = name;
17014
17036
  }
17015
- if (typeof description !== 'undefined') {
17016
- payload['description'] = description;
17017
- }
17018
- if (typeof logo !== 'undefined') {
17019
- payload['logo'] = logo;
17020
- }
17021
- if (typeof url !== 'undefined') {
17022
- payload['url'] = url;
17023
- }
17024
- if (typeof legalName !== 'undefined') {
17025
- payload['legalName'] = legalName;
17026
- }
17027
- if (typeof legalCountry !== 'undefined') {
17028
- payload['legalCountry'] = legalCountry;
17029
- }
17030
- if (typeof legalState !== 'undefined') {
17031
- payload['legalState'] = legalState;
17032
- }
17033
- if (typeof legalCity !== 'undefined') {
17034
- payload['legalCity'] = legalCity;
17035
- }
17036
- if (typeof legalAddress !== 'undefined') {
17037
- payload['legalAddress'] = legalAddress;
17038
- }
17039
- if (typeof legalTaxId !== 'undefined') {
17040
- payload['legalTaxId'] = legalTaxId;
17037
+ if (typeof bundleIdentifier !== 'undefined') {
17038
+ payload['bundleIdentifier'] = bundleIdentifier;
17041
17039
  }
17042
17040
  const uri = new URL(this.client.config.endpoint + apiPath);
17043
17041
  const apiHeaders = {
17044
17042
  'content-type': 'application/json',
17045
17043
  };
17046
- return this.client.call('patch', uri, apiHeaders, payload);
17044
+ return this.client.call('post', uri, apiHeaders, payload);
17047
17045
  }
17048
- delete(paramsOrFirst) {
17046
+ updateApplePlatform(paramsOrFirst, ...rest) {
17049
17047
  let params;
17050
17048
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17051
17049
  params = (paramsOrFirst || {});
17052
17050
  }
17053
17051
  else {
17054
17052
  params = {
17055
- projectId: paramsOrFirst
17053
+ platformId: paramsOrFirst,
17054
+ name: rest[0],
17055
+ bundleIdentifier: rest[1]
17056
17056
  };
17057
17057
  }
17058
- const projectId = params.projectId;
17059
- if (typeof projectId === 'undefined') {
17060
- throw new AppwriteException('Missing required parameter: "projectId"');
17058
+ const platformId = params.platformId;
17059
+ const name = params.name;
17060
+ const bundleIdentifier = params.bundleIdentifier;
17061
+ if (typeof platformId === 'undefined') {
17062
+ throw new AppwriteException('Missing required parameter: "platformId"');
17061
17063
  }
17062
- const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17064
+ if (typeof name === 'undefined') {
17065
+ throw new AppwriteException('Missing required parameter: "name"');
17066
+ }
17067
+ if (typeof bundleIdentifier === 'undefined') {
17068
+ throw new AppwriteException('Missing required parameter: "bundleIdentifier"');
17069
+ }
17070
+ const apiPath = '/project/platforms/apple/{platformId}'.replace('{platformId}', platformId);
17063
17071
  const payload = {};
17072
+ if (typeof name !== 'undefined') {
17073
+ payload['name'] = name;
17074
+ }
17075
+ if (typeof bundleIdentifier !== 'undefined') {
17076
+ payload['bundleIdentifier'] = bundleIdentifier;
17077
+ }
17064
17078
  const uri = new URL(this.client.config.endpoint + apiPath);
17065
17079
  const apiHeaders = {
17066
17080
  'content-type': 'application/json',
17067
17081
  };
17068
- return this.client.call('delete', uri, apiHeaders, payload);
17082
+ return this.client.call('put', uri, apiHeaders, payload);
17069
17083
  }
17070
- updateApiStatus(paramsOrFirst, ...rest) {
17084
+ createLinuxPlatform(paramsOrFirst, ...rest) {
17071
17085
  let params;
17072
17086
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17073
17087
  params = (paramsOrFirst || {});
17074
17088
  }
17075
17089
  else {
17076
17090
  params = {
17077
- projectId: paramsOrFirst,
17078
- api: rest[0],
17079
- status: rest[1]
17091
+ platformId: paramsOrFirst,
17092
+ name: rest[0],
17093
+ packageName: rest[1]
17080
17094
  };
17081
17095
  }
17082
- const projectId = params.projectId;
17083
- const api = params.api;
17084
- const status = params.status;
17085
- if (typeof projectId === 'undefined') {
17086
- throw new AppwriteException('Missing required parameter: "projectId"');
17096
+ const platformId = params.platformId;
17097
+ const name = params.name;
17098
+ const packageName = params.packageName;
17099
+ if (typeof platformId === 'undefined') {
17100
+ throw new AppwriteException('Missing required parameter: "platformId"');
17087
17101
  }
17088
- if (typeof api === 'undefined') {
17089
- throw new AppwriteException('Missing required parameter: "api"');
17102
+ if (typeof name === 'undefined') {
17103
+ throw new AppwriteException('Missing required parameter: "name"');
17090
17104
  }
17091
- if (typeof status === 'undefined') {
17092
- throw new AppwriteException('Missing required parameter: "status"');
17105
+ if (typeof packageName === 'undefined') {
17106
+ throw new AppwriteException('Missing required parameter: "packageName"');
17093
17107
  }
17094
- const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
17108
+ const apiPath = '/project/platforms/linux';
17095
17109
  const payload = {};
17096
- if (typeof api !== 'undefined') {
17097
- payload['api'] = api;
17110
+ if (typeof platformId !== 'undefined') {
17111
+ payload['platformId'] = platformId;
17098
17112
  }
17099
- if (typeof status !== 'undefined') {
17100
- payload['status'] = status;
17113
+ if (typeof name !== 'undefined') {
17114
+ payload['name'] = name;
17115
+ }
17116
+ if (typeof packageName !== 'undefined') {
17117
+ payload['packageName'] = packageName;
17101
17118
  }
17102
17119
  const uri = new URL(this.client.config.endpoint + apiPath);
17103
17120
  const apiHeaders = {
17104
17121
  'content-type': 'application/json',
17105
17122
  };
17106
- return this.client.call('patch', uri, apiHeaders, payload);
17123
+ return this.client.call('post', uri, apiHeaders, payload);
17107
17124
  }
17108
- updateAPIStatus(paramsOrFirst, ...rest) {
17125
+ updateLinuxPlatform(paramsOrFirst, ...rest) {
17109
17126
  let params;
17110
17127
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17111
17128
  params = (paramsOrFirst || {});
17112
17129
  }
17113
17130
  else {
17114
17131
  params = {
17115
- projectId: paramsOrFirst,
17116
- api: rest[0],
17117
- status: rest[1]
17132
+ platformId: paramsOrFirst,
17133
+ name: rest[0],
17134
+ packageName: rest[1]
17118
17135
  };
17119
17136
  }
17120
- const projectId = params.projectId;
17121
- const api = params.api;
17122
- const status = params.status;
17123
- if (typeof projectId === 'undefined') {
17124
- throw new AppwriteException('Missing required parameter: "projectId"');
17137
+ const platformId = params.platformId;
17138
+ const name = params.name;
17139
+ const packageName = params.packageName;
17140
+ if (typeof platformId === 'undefined') {
17141
+ throw new AppwriteException('Missing required parameter: "platformId"');
17125
17142
  }
17126
- if (typeof api === 'undefined') {
17127
- throw new AppwriteException('Missing required parameter: "api"');
17143
+ if (typeof name === 'undefined') {
17144
+ throw new AppwriteException('Missing required parameter: "name"');
17128
17145
  }
17129
- if (typeof status === 'undefined') {
17130
- throw new AppwriteException('Missing required parameter: "status"');
17146
+ if (typeof packageName === 'undefined') {
17147
+ throw new AppwriteException('Missing required parameter: "packageName"');
17131
17148
  }
17132
- const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
17149
+ const apiPath = '/project/platforms/linux/{platformId}'.replace('{platformId}', platformId);
17133
17150
  const payload = {};
17134
- if (typeof api !== 'undefined') {
17135
- payload['api'] = api;
17151
+ if (typeof name !== 'undefined') {
17152
+ payload['name'] = name;
17136
17153
  }
17137
- if (typeof status !== 'undefined') {
17138
- payload['status'] = status;
17154
+ if (typeof packageName !== 'undefined') {
17155
+ payload['packageName'] = packageName;
17139
17156
  }
17140
17157
  const uri = new URL(this.client.config.endpoint + apiPath);
17141
17158
  const apiHeaders = {
17142
17159
  'content-type': 'application/json',
17143
17160
  };
17144
- return this.client.call('patch', uri, apiHeaders, payload);
17161
+ return this.client.call('put', uri, apiHeaders, payload);
17145
17162
  }
17146
- updateApiStatusAll(paramsOrFirst, ...rest) {
17163
+ createWebPlatform(paramsOrFirst, ...rest) {
17147
17164
  let params;
17148
17165
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17149
17166
  params = (paramsOrFirst || {});
17150
17167
  }
17151
17168
  else {
17152
17169
  params = {
17153
- projectId: paramsOrFirst,
17154
- status: rest[0]
17170
+ platformId: paramsOrFirst,
17171
+ name: rest[0],
17172
+ hostname: rest[1]
17155
17173
  };
17156
17174
  }
17157
- const projectId = params.projectId;
17158
- const status = params.status;
17159
- if (typeof projectId === 'undefined') {
17160
- throw new AppwriteException('Missing required parameter: "projectId"');
17175
+ const platformId = params.platformId;
17176
+ const name = params.name;
17177
+ const hostname = params.hostname;
17178
+ if (typeof platformId === 'undefined') {
17179
+ throw new AppwriteException('Missing required parameter: "platformId"');
17161
17180
  }
17162
- if (typeof status === 'undefined') {
17163
- throw new AppwriteException('Missing required parameter: "status"');
17181
+ if (typeof name === 'undefined') {
17182
+ throw new AppwriteException('Missing required parameter: "name"');
17183
+ }
17184
+ if (typeof hostname === 'undefined') {
17185
+ throw new AppwriteException('Missing required parameter: "hostname"');
17164
17186
  }
17165
- const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
17187
+ const apiPath = '/project/platforms/web';
17166
17188
  const payload = {};
17167
- if (typeof status !== 'undefined') {
17168
- payload['status'] = status;
17189
+ if (typeof platformId !== 'undefined') {
17190
+ payload['platformId'] = platformId;
17191
+ }
17192
+ if (typeof name !== 'undefined') {
17193
+ payload['name'] = name;
17194
+ }
17195
+ if (typeof hostname !== 'undefined') {
17196
+ payload['hostname'] = hostname;
17169
17197
  }
17170
17198
  const uri = new URL(this.client.config.endpoint + apiPath);
17171
17199
  const apiHeaders = {
17172
17200
  'content-type': 'application/json',
17173
17201
  };
17174
- return this.client.call('patch', uri, apiHeaders, payload);
17202
+ return this.client.call('post', uri, apiHeaders, payload);
17175
17203
  }
17176
- updateAPIStatusAll(paramsOrFirst, ...rest) {
17204
+ updateWebPlatform(paramsOrFirst, ...rest) {
17177
17205
  let params;
17178
17206
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17179
17207
  params = (paramsOrFirst || {});
17180
17208
  }
17181
17209
  else {
17182
17210
  params = {
17183
- projectId: paramsOrFirst,
17184
- status: rest[0]
17211
+ platformId: paramsOrFirst,
17212
+ name: rest[0],
17213
+ hostname: rest[1]
17185
17214
  };
17186
17215
  }
17187
- const projectId = params.projectId;
17188
- const status = params.status;
17189
- if (typeof projectId === 'undefined') {
17190
- throw new AppwriteException('Missing required parameter: "projectId"');
17216
+ const platformId = params.platformId;
17217
+ const name = params.name;
17218
+ const hostname = params.hostname;
17219
+ if (typeof platformId === 'undefined') {
17220
+ throw new AppwriteException('Missing required parameter: "platformId"');
17191
17221
  }
17192
- if (typeof status === 'undefined') {
17193
- throw new AppwriteException('Missing required parameter: "status"');
17222
+ if (typeof name === 'undefined') {
17223
+ throw new AppwriteException('Missing required parameter: "name"');
17194
17224
  }
17195
- const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
17225
+ if (typeof hostname === 'undefined') {
17226
+ throw new AppwriteException('Missing required parameter: "hostname"');
17227
+ }
17228
+ const apiPath = '/project/platforms/web/{platformId}'.replace('{platformId}', platformId);
17196
17229
  const payload = {};
17197
- if (typeof status !== 'undefined') {
17198
- payload['status'] = status;
17230
+ if (typeof name !== 'undefined') {
17231
+ payload['name'] = name;
17232
+ }
17233
+ if (typeof hostname !== 'undefined') {
17234
+ payload['hostname'] = hostname;
17199
17235
  }
17200
17236
  const uri = new URL(this.client.config.endpoint + apiPath);
17201
17237
  const apiHeaders = {
17202
17238
  'content-type': 'application/json',
17203
17239
  };
17204
- return this.client.call('patch', uri, apiHeaders, payload);
17240
+ return this.client.call('put', uri, apiHeaders, payload);
17205
17241
  }
17206
- updateAuthDuration(paramsOrFirst, ...rest) {
17242
+ createWindowsPlatform(paramsOrFirst, ...rest) {
17207
17243
  let params;
17208
17244
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17209
17245
  params = (paramsOrFirst || {});
17210
17246
  }
17211
17247
  else {
17212
17248
  params = {
17213
- projectId: paramsOrFirst,
17214
- duration: rest[0]
17249
+ platformId: paramsOrFirst,
17250
+ name: rest[0],
17251
+ packageIdentifierName: rest[1]
17215
17252
  };
17216
17253
  }
17217
- const projectId = params.projectId;
17218
- const duration = params.duration;
17219
- if (typeof projectId === 'undefined') {
17220
- throw new AppwriteException('Missing required parameter: "projectId"');
17254
+ const platformId = params.platformId;
17255
+ const name = params.name;
17256
+ const packageIdentifierName = params.packageIdentifierName;
17257
+ if (typeof platformId === 'undefined') {
17258
+ throw new AppwriteException('Missing required parameter: "platformId"');
17221
17259
  }
17222
- if (typeof duration === 'undefined') {
17223
- throw new AppwriteException('Missing required parameter: "duration"');
17260
+ if (typeof name === 'undefined') {
17261
+ throw new AppwriteException('Missing required parameter: "name"');
17224
17262
  }
17225
- const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
17263
+ if (typeof packageIdentifierName === 'undefined') {
17264
+ throw new AppwriteException('Missing required parameter: "packageIdentifierName"');
17265
+ }
17266
+ const apiPath = '/project/platforms/windows';
17226
17267
  const payload = {};
17227
- if (typeof duration !== 'undefined') {
17228
- payload['duration'] = duration;
17268
+ if (typeof platformId !== 'undefined') {
17269
+ payload['platformId'] = platformId;
17270
+ }
17271
+ if (typeof name !== 'undefined') {
17272
+ payload['name'] = name;
17273
+ }
17274
+ if (typeof packageIdentifierName !== 'undefined') {
17275
+ payload['packageIdentifierName'] = packageIdentifierName;
17229
17276
  }
17230
17277
  const uri = new URL(this.client.config.endpoint + apiPath);
17231
17278
  const apiHeaders = {
17232
17279
  'content-type': 'application/json',
17233
17280
  };
17234
- return this.client.call('patch', uri, apiHeaders, payload);
17281
+ return this.client.call('post', uri, apiHeaders, payload);
17235
17282
  }
17236
- updateAuthLimit(paramsOrFirst, ...rest) {
17283
+ updateWindowsPlatform(paramsOrFirst, ...rest) {
17237
17284
  let params;
17238
17285
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17239
17286
  params = (paramsOrFirst || {});
17240
17287
  }
17241
17288
  else {
17242
17289
  params = {
17243
- projectId: paramsOrFirst,
17244
- limit: rest[0]
17290
+ platformId: paramsOrFirst,
17291
+ name: rest[0],
17292
+ packageIdentifierName: rest[1]
17245
17293
  };
17246
17294
  }
17247
- const projectId = params.projectId;
17248
- const limit = params.limit;
17249
- if (typeof projectId === 'undefined') {
17250
- throw new AppwriteException('Missing required parameter: "projectId"');
17295
+ const platformId = params.platformId;
17296
+ const name = params.name;
17297
+ const packageIdentifierName = params.packageIdentifierName;
17298
+ if (typeof platformId === 'undefined') {
17299
+ throw new AppwriteException('Missing required parameter: "platformId"');
17251
17300
  }
17252
- if (typeof limit === 'undefined') {
17253
- throw new AppwriteException('Missing required parameter: "limit"');
17301
+ if (typeof name === 'undefined') {
17302
+ throw new AppwriteException('Missing required parameter: "name"');
17254
17303
  }
17255
- const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
17304
+ if (typeof packageIdentifierName === 'undefined') {
17305
+ throw new AppwriteException('Missing required parameter: "packageIdentifierName"');
17306
+ }
17307
+ const apiPath = '/project/platforms/windows/{platformId}'.replace('{platformId}', platformId);
17256
17308
  const payload = {};
17257
- if (typeof limit !== 'undefined') {
17258
- payload['limit'] = limit;
17309
+ if (typeof name !== 'undefined') {
17310
+ payload['name'] = name;
17311
+ }
17312
+ if (typeof packageIdentifierName !== 'undefined') {
17313
+ payload['packageIdentifierName'] = packageIdentifierName;
17259
17314
  }
17260
17315
  const uri = new URL(this.client.config.endpoint + apiPath);
17261
17316
  const apiHeaders = {
17262
17317
  'content-type': 'application/json',
17263
17318
  };
17264
- return this.client.call('patch', uri, apiHeaders, payload);
17319
+ return this.client.call('put', uri, apiHeaders, payload);
17265
17320
  }
17266
- updateAuthSessionsLimit(paramsOrFirst, ...rest) {
17321
+ getPlatform(paramsOrFirst) {
17267
17322
  let params;
17268
17323
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17269
17324
  params = (paramsOrFirst || {});
17270
17325
  }
17271
17326
  else {
17272
17327
  params = {
17273
- projectId: paramsOrFirst,
17274
- limit: rest[0]
17328
+ platformId: paramsOrFirst
17275
17329
  };
17276
17330
  }
17277
- const projectId = params.projectId;
17278
- const limit = params.limit;
17279
- if (typeof projectId === 'undefined') {
17280
- throw new AppwriteException('Missing required parameter: "projectId"');
17281
- }
17282
- if (typeof limit === 'undefined') {
17283
- throw new AppwriteException('Missing required parameter: "limit"');
17331
+ const platformId = params.platformId;
17332
+ if (typeof platformId === 'undefined') {
17333
+ throw new AppwriteException('Missing required parameter: "platformId"');
17284
17334
  }
17285
- const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
17335
+ const apiPath = '/project/platforms/{platformId}'.replace('{platformId}', platformId);
17286
17336
  const payload = {};
17287
- if (typeof limit !== 'undefined') {
17288
- payload['limit'] = limit;
17289
- }
17290
17337
  const uri = new URL(this.client.config.endpoint + apiPath);
17291
- const apiHeaders = {
17292
- 'content-type': 'application/json',
17293
- };
17294
- return this.client.call('patch', uri, apiHeaders, payload);
17338
+ const apiHeaders = {};
17339
+ return this.client.call('get', uri, apiHeaders, payload);
17295
17340
  }
17296
- updateMembershipsPrivacy(paramsOrFirst, ...rest) {
17341
+ deletePlatform(paramsOrFirst) {
17297
17342
  let params;
17298
17343
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17299
17344
  params = (paramsOrFirst || {});
17300
17345
  }
17301
17346
  else {
17302
17347
  params = {
17303
- projectId: paramsOrFirst,
17304
- userName: rest[0],
17305
- userEmail: rest[1],
17306
- mfa: rest[2]
17348
+ platformId: paramsOrFirst
17307
17349
  };
17308
17350
  }
17309
- const projectId = params.projectId;
17310
- const userName = params.userName;
17311
- const userEmail = params.userEmail;
17312
- const mfa = params.mfa;
17313
- if (typeof projectId === 'undefined') {
17314
- throw new AppwriteException('Missing required parameter: "projectId"');
17315
- }
17316
- if (typeof userName === 'undefined') {
17317
- throw new AppwriteException('Missing required parameter: "userName"');
17318
- }
17319
- if (typeof userEmail === 'undefined') {
17320
- throw new AppwriteException('Missing required parameter: "userEmail"');
17321
- }
17322
- if (typeof mfa === 'undefined') {
17323
- throw new AppwriteException('Missing required parameter: "mfa"');
17351
+ const platformId = params.platformId;
17352
+ if (typeof platformId === 'undefined') {
17353
+ throw new AppwriteException('Missing required parameter: "platformId"');
17324
17354
  }
17325
- const apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
17355
+ const apiPath = '/project/platforms/{platformId}'.replace('{platformId}', platformId);
17326
17356
  const payload = {};
17327
- if (typeof userName !== 'undefined') {
17328
- payload['userName'] = userName;
17329
- }
17330
- if (typeof userEmail !== 'undefined') {
17331
- payload['userEmail'] = userEmail;
17332
- }
17333
- if (typeof mfa !== 'undefined') {
17334
- payload['mfa'] = mfa;
17335
- }
17336
17357
  const uri = new URL(this.client.config.endpoint + apiPath);
17337
17358
  const apiHeaders = {
17338
17359
  'content-type': 'application/json',
17339
17360
  };
17340
- return this.client.call('patch', uri, apiHeaders, payload);
17361
+ return this.client.call('delete', uri, apiHeaders, payload);
17341
17362
  }
17342
- updateMockNumbers(paramsOrFirst, ...rest) {
17363
+ updateProtocolStatus(paramsOrFirst, ...rest) {
17343
17364
  let params;
17344
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17365
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('protocolId' in paramsOrFirst || 'enabled' in paramsOrFirst))) {
17345
17366
  params = (paramsOrFirst || {});
17346
17367
  }
17347
17368
  else {
17348
17369
  params = {
17349
- projectId: paramsOrFirst,
17350
- numbers: rest[0]
17370
+ protocolId: paramsOrFirst,
17371
+ enabled: rest[0]
17351
17372
  };
17352
17373
  }
17353
- const projectId = params.projectId;
17354
- const numbers = params.numbers;
17355
- if (typeof projectId === 'undefined') {
17356
- throw new AppwriteException('Missing required parameter: "projectId"');
17374
+ const protocolId = params.protocolId;
17375
+ const enabled = params.enabled;
17376
+ if (typeof protocolId === 'undefined') {
17377
+ throw new AppwriteException('Missing required parameter: "protocolId"');
17357
17378
  }
17358
- if (typeof numbers === 'undefined') {
17359
- throw new AppwriteException('Missing required parameter: "numbers"');
17379
+ if (typeof enabled === 'undefined') {
17380
+ throw new AppwriteException('Missing required parameter: "enabled"');
17360
17381
  }
17361
- const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
17382
+ const apiPath = '/project/protocols/{protocolId}/status'.replace('{protocolId}', protocolId);
17362
17383
  const payload = {};
17363
- if (typeof numbers !== 'undefined') {
17364
- payload['numbers'] = numbers;
17384
+ if (typeof enabled !== 'undefined') {
17385
+ payload['enabled'] = enabled;
17365
17386
  }
17366
17387
  const uri = new URL(this.client.config.endpoint + apiPath);
17367
17388
  const apiHeaders = {
@@ -17369,26 +17390,26 @@ class Projects {
17369
17390
  };
17370
17391
  return this.client.call('patch', uri, apiHeaders, payload);
17371
17392
  }
17372
- updateAuthPasswordDictionary(paramsOrFirst, ...rest) {
17393
+ updateServiceStatus(paramsOrFirst, ...rest) {
17373
17394
  let params;
17374
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17395
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst) && ('serviceId' in paramsOrFirst || 'enabled' in paramsOrFirst))) {
17375
17396
  params = (paramsOrFirst || {});
17376
17397
  }
17377
17398
  else {
17378
17399
  params = {
17379
- projectId: paramsOrFirst,
17400
+ serviceId: paramsOrFirst,
17380
17401
  enabled: rest[0]
17381
17402
  };
17382
17403
  }
17383
- const projectId = params.projectId;
17404
+ const serviceId = params.serviceId;
17384
17405
  const enabled = params.enabled;
17385
- if (typeof projectId === 'undefined') {
17386
- throw new AppwriteException('Missing required parameter: "projectId"');
17406
+ if (typeof serviceId === 'undefined') {
17407
+ throw new AppwriteException('Missing required parameter: "serviceId"');
17387
17408
  }
17388
17409
  if (typeof enabled === 'undefined') {
17389
17410
  throw new AppwriteException('Missing required parameter: "enabled"');
17390
17411
  }
17391
- const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
17412
+ const apiPath = '/project/services/{serviceId}/status'.replace('{serviceId}', serviceId);
17392
17413
  const payload = {};
17393
17414
  if (typeof enabled !== 'undefined') {
17394
17415
  payload['enabled'] = enabled;
@@ -17399,209 +17420,340 @@ class Projects {
17399
17420
  };
17400
17421
  return this.client.call('patch', uri, apiHeaders, payload);
17401
17422
  }
17402
- updateAuthPasswordHistory(paramsOrFirst, ...rest) {
17423
+ getUsage(paramsOrFirst, ...rest) {
17403
17424
  let params;
17404
17425
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17405
17426
  params = (paramsOrFirst || {});
17406
17427
  }
17407
17428
  else {
17408
17429
  params = {
17409
- projectId: paramsOrFirst,
17410
- limit: rest[0]
17430
+ startDate: paramsOrFirst,
17431
+ endDate: rest[0],
17432
+ period: rest[1]
17411
17433
  };
17412
17434
  }
17413
- const projectId = params.projectId;
17414
- const limit = params.limit;
17415
- if (typeof projectId === 'undefined') {
17416
- throw new AppwriteException('Missing required parameter: "projectId"');
17435
+ const startDate = params.startDate;
17436
+ const endDate = params.endDate;
17437
+ const period = params.period;
17438
+ if (typeof startDate === 'undefined') {
17439
+ throw new AppwriteException('Missing required parameter: "startDate"');
17417
17440
  }
17418
- if (typeof limit === 'undefined') {
17419
- throw new AppwriteException('Missing required parameter: "limit"');
17441
+ if (typeof endDate === 'undefined') {
17442
+ throw new AppwriteException('Missing required parameter: "endDate"');
17420
17443
  }
17421
- const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
17444
+ const apiPath = '/project/usage';
17422
17445
  const payload = {};
17423
- if (typeof limit !== 'undefined') {
17424
- payload['limit'] = limit;
17446
+ if (typeof startDate !== 'undefined') {
17447
+ payload['startDate'] = startDate;
17448
+ }
17449
+ if (typeof endDate !== 'undefined') {
17450
+ payload['endDate'] = endDate;
17451
+ }
17452
+ if (typeof period !== 'undefined') {
17453
+ payload['period'] = period;
17425
17454
  }
17426
17455
  const uri = new URL(this.client.config.endpoint + apiPath);
17427
- const apiHeaders = {
17428
- 'content-type': 'application/json',
17429
- };
17430
- return this.client.call('patch', uri, apiHeaders, payload);
17456
+ const apiHeaders = {};
17457
+ return this.client.call('get', uri, apiHeaders, payload);
17431
17458
  }
17432
- updatePersonalDataCheck(paramsOrFirst, ...rest) {
17459
+ listVariables(paramsOrFirst, ...rest) {
17433
17460
  let params;
17434
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17461
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17435
17462
  params = (paramsOrFirst || {});
17436
17463
  }
17437
17464
  else {
17438
17465
  params = {
17439
- projectId: paramsOrFirst,
17440
- enabled: rest[0]
17466
+ queries: paramsOrFirst,
17467
+ total: rest[0]
17441
17468
  };
17442
17469
  }
17443
- const projectId = params.projectId;
17444
- const enabled = params.enabled;
17445
- if (typeof projectId === 'undefined') {
17446
- throw new AppwriteException('Missing required parameter: "projectId"');
17447
- }
17448
- if (typeof enabled === 'undefined') {
17449
- throw new AppwriteException('Missing required parameter: "enabled"');
17450
- }
17451
- const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
17470
+ const queries = params.queries;
17471
+ const total = params.total;
17472
+ const apiPath = '/project/variables';
17452
17473
  const payload = {};
17453
- if (typeof enabled !== 'undefined') {
17454
- payload['enabled'] = enabled;
17474
+ if (typeof queries !== 'undefined') {
17475
+ payload['queries'] = queries;
17476
+ }
17477
+ if (typeof total !== 'undefined') {
17478
+ payload['total'] = total;
17455
17479
  }
17456
17480
  const uri = new URL(this.client.config.endpoint + apiPath);
17457
- const apiHeaders = {
17458
- 'content-type': 'application/json',
17459
- };
17460
- return this.client.call('patch', uri, apiHeaders, payload);
17481
+ const apiHeaders = {};
17482
+ return this.client.call('get', uri, apiHeaders, payload);
17461
17483
  }
17462
- updateSessionAlerts(paramsOrFirst, ...rest) {
17484
+ createVariable(paramsOrFirst, ...rest) {
17463
17485
  let params;
17464
17486
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17465
17487
  params = (paramsOrFirst || {});
17466
17488
  }
17467
17489
  else {
17468
17490
  params = {
17469
- projectId: paramsOrFirst,
17470
- alerts: rest[0]
17491
+ variableId: paramsOrFirst,
17492
+ key: rest[0],
17493
+ value: rest[1],
17494
+ secret: rest[2]
17471
17495
  };
17472
17496
  }
17473
- const projectId = params.projectId;
17474
- const alerts = params.alerts;
17475
- if (typeof projectId === 'undefined') {
17476
- throw new AppwriteException('Missing required parameter: "projectId"');
17497
+ const variableId = params.variableId;
17498
+ const key = params.key;
17499
+ const value = params.value;
17500
+ const secret = params.secret;
17501
+ if (typeof variableId === 'undefined') {
17502
+ throw new AppwriteException('Missing required parameter: "variableId"');
17477
17503
  }
17478
- if (typeof alerts === 'undefined') {
17479
- throw new AppwriteException('Missing required parameter: "alerts"');
17504
+ if (typeof key === 'undefined') {
17505
+ throw new AppwriteException('Missing required parameter: "key"');
17480
17506
  }
17481
- const apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
17507
+ if (typeof value === 'undefined') {
17508
+ throw new AppwriteException('Missing required parameter: "value"');
17509
+ }
17510
+ const apiPath = '/project/variables';
17482
17511
  const payload = {};
17483
- if (typeof alerts !== 'undefined') {
17484
- payload['alerts'] = alerts;
17512
+ if (typeof variableId !== 'undefined') {
17513
+ payload['variableId'] = variableId;
17514
+ }
17515
+ if (typeof key !== 'undefined') {
17516
+ payload['key'] = key;
17517
+ }
17518
+ if (typeof value !== 'undefined') {
17519
+ payload['value'] = value;
17520
+ }
17521
+ if (typeof secret !== 'undefined') {
17522
+ payload['secret'] = secret;
17485
17523
  }
17486
17524
  const uri = new URL(this.client.config.endpoint + apiPath);
17487
17525
  const apiHeaders = {
17488
17526
  'content-type': 'application/json',
17489
17527
  };
17490
- return this.client.call('patch', uri, apiHeaders, payload);
17528
+ return this.client.call('post', uri, apiHeaders, payload);
17491
17529
  }
17492
- updateSessionInvalidation(paramsOrFirst, ...rest) {
17530
+ getVariable(paramsOrFirst) {
17493
17531
  let params;
17494
17532
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17495
17533
  params = (paramsOrFirst || {});
17496
17534
  }
17497
17535
  else {
17498
17536
  params = {
17499
- projectId: paramsOrFirst,
17500
- enabled: rest[0]
17537
+ variableId: paramsOrFirst
17501
17538
  };
17502
17539
  }
17503
- const projectId = params.projectId;
17504
- const enabled = params.enabled;
17505
- if (typeof projectId === 'undefined') {
17506
- throw new AppwriteException('Missing required parameter: "projectId"');
17507
- }
17508
- if (typeof enabled === 'undefined') {
17509
- throw new AppwriteException('Missing required parameter: "enabled"');
17540
+ const variableId = params.variableId;
17541
+ if (typeof variableId === 'undefined') {
17542
+ throw new AppwriteException('Missing required parameter: "variableId"');
17510
17543
  }
17511
- const apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
17544
+ const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
17512
17545
  const payload = {};
17513
- if (typeof enabled !== 'undefined') {
17514
- payload['enabled'] = enabled;
17515
- }
17516
17546
  const uri = new URL(this.client.config.endpoint + apiPath);
17517
- const apiHeaders = {
17518
- 'content-type': 'application/json',
17519
- };
17520
- return this.client.call('patch', uri, apiHeaders, payload);
17547
+ const apiHeaders = {};
17548
+ return this.client.call('get', uri, apiHeaders, payload);
17521
17549
  }
17522
- updateAuthStatus(paramsOrFirst, ...rest) {
17550
+ updateVariable(paramsOrFirst, ...rest) {
17523
17551
  let params;
17524
17552
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17525
17553
  params = (paramsOrFirst || {});
17526
17554
  }
17527
17555
  else {
17528
17556
  params = {
17529
- projectId: paramsOrFirst,
17530
- method: rest[0],
17531
- status: rest[1]
17557
+ variableId: paramsOrFirst,
17558
+ key: rest[0],
17559
+ value: rest[1],
17560
+ secret: rest[2]
17532
17561
  };
17533
17562
  }
17534
- const projectId = params.projectId;
17535
- const method = params.method;
17536
- const status = params.status;
17537
- if (typeof projectId === 'undefined') {
17538
- throw new AppwriteException('Missing required parameter: "projectId"');
17563
+ const variableId = params.variableId;
17564
+ const key = params.key;
17565
+ const value = params.value;
17566
+ const secret = params.secret;
17567
+ if (typeof variableId === 'undefined') {
17568
+ throw new AppwriteException('Missing required parameter: "variableId"');
17539
17569
  }
17540
- if (typeof method === 'undefined') {
17541
- throw new AppwriteException('Missing required parameter: "method"');
17570
+ const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
17571
+ const payload = {};
17572
+ if (typeof key !== 'undefined') {
17573
+ payload['key'] = key;
17542
17574
  }
17543
- if (typeof status === 'undefined') {
17544
- throw new AppwriteException('Missing required parameter: "status"');
17575
+ if (typeof value !== 'undefined') {
17576
+ payload['value'] = value;
17545
17577
  }
17546
- const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
17547
- const payload = {};
17548
- if (typeof status !== 'undefined') {
17549
- payload['status'] = status;
17578
+ if (typeof secret !== 'undefined') {
17579
+ payload['secret'] = secret;
17550
17580
  }
17551
17581
  const uri = new URL(this.client.config.endpoint + apiPath);
17552
17582
  const apiHeaders = {
17553
17583
  'content-type': 'application/json',
17554
17584
  };
17555
- return this.client.call('patch', uri, apiHeaders, payload);
17585
+ return this.client.call('put', uri, apiHeaders, payload);
17556
17586
  }
17557
- updateConsoleAccess(paramsOrFirst) {
17587
+ deleteVariable(paramsOrFirst) {
17558
17588
  let params;
17559
17589
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17560
17590
  params = (paramsOrFirst || {});
17561
17591
  }
17562
17592
  else {
17563
17593
  params = {
17564
- projectId: paramsOrFirst
17594
+ variableId: paramsOrFirst
17595
+ };
17596
+ }
17597
+ const variableId = params.variableId;
17598
+ if (typeof variableId === 'undefined') {
17599
+ throw new AppwriteException('Missing required parameter: "variableId"');
17600
+ }
17601
+ const apiPath = '/project/variables/{variableId}'.replace('{variableId}', variableId);
17602
+ const payload = {};
17603
+ const uri = new URL(this.client.config.endpoint + apiPath);
17604
+ const apiHeaders = {
17605
+ 'content-type': 'application/json',
17606
+ };
17607
+ return this.client.call('delete', uri, apiHeaders, payload);
17608
+ }
17609
+ }
17610
+
17611
+ class Projects {
17612
+ constructor(client) {
17613
+ this.client = client;
17614
+ }
17615
+ list(paramsOrFirst, ...rest) {
17616
+ let params;
17617
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17618
+ params = (paramsOrFirst || {});
17619
+ }
17620
+ else {
17621
+ params = {
17622
+ queries: paramsOrFirst,
17623
+ search: rest[0],
17624
+ total: rest[1]
17625
+ };
17626
+ }
17627
+ const queries = params.queries;
17628
+ const search = params.search;
17629
+ const total = params.total;
17630
+ const apiPath = '/projects';
17631
+ const payload = {};
17632
+ if (typeof queries !== 'undefined') {
17633
+ payload['queries'] = queries;
17634
+ }
17635
+ if (typeof search !== 'undefined') {
17636
+ payload['search'] = search;
17637
+ }
17638
+ if (typeof total !== 'undefined') {
17639
+ payload['total'] = total;
17640
+ }
17641
+ const uri = new URL(this.client.config.endpoint + apiPath);
17642
+ const apiHeaders = {};
17643
+ return this.client.call('get', uri, apiHeaders, payload);
17644
+ }
17645
+ create(paramsOrFirst, ...rest) {
17646
+ let params;
17647
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17648
+ params = (paramsOrFirst || {});
17649
+ }
17650
+ else {
17651
+ params = {
17652
+ projectId: paramsOrFirst,
17653
+ name: rest[0],
17654
+ teamId: rest[1],
17655
+ region: rest[2],
17656
+ description: rest[3],
17657
+ logo: rest[4],
17658
+ url: rest[5],
17659
+ legalName: rest[6],
17660
+ legalCountry: rest[7],
17661
+ legalState: rest[8],
17662
+ legalCity: rest[9],
17663
+ legalAddress: rest[10],
17664
+ legalTaxId: rest[11]
17565
17665
  };
17566
17666
  }
17567
17667
  const projectId = params.projectId;
17668
+ const name = params.name;
17669
+ const teamId = params.teamId;
17670
+ const region = params.region;
17671
+ const description = params.description;
17672
+ const logo = params.logo;
17673
+ const url = params.url;
17674
+ const legalName = params.legalName;
17675
+ const legalCountry = params.legalCountry;
17676
+ const legalState = params.legalState;
17677
+ const legalCity = params.legalCity;
17678
+ const legalAddress = params.legalAddress;
17679
+ const legalTaxId = params.legalTaxId;
17568
17680
  if (typeof projectId === 'undefined') {
17569
17681
  throw new AppwriteException('Missing required parameter: "projectId"');
17570
17682
  }
17571
- const apiPath = '/projects/{projectId}/console-access'.replace('{projectId}', projectId);
17683
+ if (typeof name === 'undefined') {
17684
+ throw new AppwriteException('Missing required parameter: "name"');
17685
+ }
17686
+ if (typeof teamId === 'undefined') {
17687
+ throw new AppwriteException('Missing required parameter: "teamId"');
17688
+ }
17689
+ const apiPath = '/projects';
17572
17690
  const payload = {};
17691
+ if (typeof projectId !== 'undefined') {
17692
+ payload['projectId'] = projectId;
17693
+ }
17694
+ if (typeof name !== 'undefined') {
17695
+ payload['name'] = name;
17696
+ }
17697
+ if (typeof teamId !== 'undefined') {
17698
+ payload['teamId'] = teamId;
17699
+ }
17700
+ if (typeof region !== 'undefined') {
17701
+ payload['region'] = region;
17702
+ }
17703
+ if (typeof description !== 'undefined') {
17704
+ payload['description'] = description;
17705
+ }
17706
+ if (typeof logo !== 'undefined') {
17707
+ payload['logo'] = logo;
17708
+ }
17709
+ if (typeof url !== 'undefined') {
17710
+ payload['url'] = url;
17711
+ }
17712
+ if (typeof legalName !== 'undefined') {
17713
+ payload['legalName'] = legalName;
17714
+ }
17715
+ if (typeof legalCountry !== 'undefined') {
17716
+ payload['legalCountry'] = legalCountry;
17717
+ }
17718
+ if (typeof legalState !== 'undefined') {
17719
+ payload['legalState'] = legalState;
17720
+ }
17721
+ if (typeof legalCity !== 'undefined') {
17722
+ payload['legalCity'] = legalCity;
17723
+ }
17724
+ if (typeof legalAddress !== 'undefined') {
17725
+ payload['legalAddress'] = legalAddress;
17726
+ }
17727
+ if (typeof legalTaxId !== 'undefined') {
17728
+ payload['legalTaxId'] = legalTaxId;
17729
+ }
17573
17730
  const uri = new URL(this.client.config.endpoint + apiPath);
17574
17731
  const apiHeaders = {
17575
17732
  'content-type': 'application/json',
17576
17733
  };
17577
- return this.client.call('patch', uri, apiHeaders, payload);
17734
+ return this.client.call('post', uri, apiHeaders, payload);
17578
17735
  }
17579
- listDevKeys(paramsOrFirst, ...rest) {
17736
+ get(paramsOrFirst) {
17580
17737
  let params;
17581
17738
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17582
17739
  params = (paramsOrFirst || {});
17583
17740
  }
17584
17741
  else {
17585
17742
  params = {
17586
- projectId: paramsOrFirst,
17587
- queries: rest[0]
17743
+ projectId: paramsOrFirst
17588
17744
  };
17589
17745
  }
17590
17746
  const projectId = params.projectId;
17591
- const queries = params.queries;
17592
17747
  if (typeof projectId === 'undefined') {
17593
17748
  throw new AppwriteException('Missing required parameter: "projectId"');
17594
17749
  }
17595
- const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
17750
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17596
17751
  const payload = {};
17597
- if (typeof queries !== 'undefined') {
17598
- payload['queries'] = queries;
17599
- }
17600
17752
  const uri = new URL(this.client.config.endpoint + apiPath);
17601
17753
  const apiHeaders = {};
17602
17754
  return this.client.call('get', uri, apiHeaders, payload);
17603
17755
  }
17604
- createDevKey(paramsOrFirst, ...rest) {
17756
+ update(paramsOrFirst, ...rest) {
17605
17757
  let params;
17606
17758
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17607
17759
  params = (paramsOrFirst || {});
@@ -17610,36 +17762,185 @@ class Projects {
17610
17762
  params = {
17611
17763
  projectId: paramsOrFirst,
17612
17764
  name: rest[0],
17613
- expire: rest[1]
17765
+ description: rest[1],
17766
+ logo: rest[2],
17767
+ url: rest[3],
17768
+ legalName: rest[4],
17769
+ legalCountry: rest[5],
17770
+ legalState: rest[6],
17771
+ legalCity: rest[7],
17772
+ legalAddress: rest[8],
17773
+ legalTaxId: rest[9]
17614
17774
  };
17615
17775
  }
17616
17776
  const projectId = params.projectId;
17617
17777
  const name = params.name;
17618
- const expire = params.expire;
17778
+ const description = params.description;
17779
+ const logo = params.logo;
17780
+ const url = params.url;
17781
+ const legalName = params.legalName;
17782
+ const legalCountry = params.legalCountry;
17783
+ const legalState = params.legalState;
17784
+ const legalCity = params.legalCity;
17785
+ const legalAddress = params.legalAddress;
17786
+ const legalTaxId = params.legalTaxId;
17619
17787
  if (typeof projectId === 'undefined') {
17620
17788
  throw new AppwriteException('Missing required parameter: "projectId"');
17621
17789
  }
17622
17790
  if (typeof name === 'undefined') {
17623
17791
  throw new AppwriteException('Missing required parameter: "name"');
17624
17792
  }
17625
- if (typeof expire === 'undefined') {
17626
- throw new AppwriteException('Missing required parameter: "expire"');
17627
- }
17628
- const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
17793
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17629
17794
  const payload = {};
17630
17795
  if (typeof name !== 'undefined') {
17631
17796
  payload['name'] = name;
17632
17797
  }
17633
- if (typeof expire !== 'undefined') {
17634
- payload['expire'] = expire;
17798
+ if (typeof description !== 'undefined') {
17799
+ payload['description'] = description;
17800
+ }
17801
+ if (typeof logo !== 'undefined') {
17802
+ payload['logo'] = logo;
17803
+ }
17804
+ if (typeof url !== 'undefined') {
17805
+ payload['url'] = url;
17806
+ }
17807
+ if (typeof legalName !== 'undefined') {
17808
+ payload['legalName'] = legalName;
17809
+ }
17810
+ if (typeof legalCountry !== 'undefined') {
17811
+ payload['legalCountry'] = legalCountry;
17812
+ }
17813
+ if (typeof legalState !== 'undefined') {
17814
+ payload['legalState'] = legalState;
17815
+ }
17816
+ if (typeof legalCity !== 'undefined') {
17817
+ payload['legalCity'] = legalCity;
17818
+ }
17819
+ if (typeof legalAddress !== 'undefined') {
17820
+ payload['legalAddress'] = legalAddress;
17821
+ }
17822
+ if (typeof legalTaxId !== 'undefined') {
17823
+ payload['legalTaxId'] = legalTaxId;
17824
+ }
17825
+ const uri = new URL(this.client.config.endpoint + apiPath);
17826
+ const apiHeaders = {
17827
+ 'content-type': 'application/json',
17828
+ };
17829
+ return this.client.call('patch', uri, apiHeaders, payload);
17830
+ }
17831
+ delete(paramsOrFirst) {
17832
+ let params;
17833
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17834
+ params = (paramsOrFirst || {});
17835
+ }
17836
+ else {
17837
+ params = {
17838
+ projectId: paramsOrFirst
17839
+ };
17840
+ }
17841
+ const projectId = params.projectId;
17842
+ if (typeof projectId === 'undefined') {
17843
+ throw new AppwriteException('Missing required parameter: "projectId"');
17844
+ }
17845
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
17846
+ const payload = {};
17847
+ const uri = new URL(this.client.config.endpoint + apiPath);
17848
+ const apiHeaders = {
17849
+ 'content-type': 'application/json',
17850
+ };
17851
+ return this.client.call('delete', uri, apiHeaders, payload);
17852
+ }
17853
+ updateAuthDuration(paramsOrFirst, ...rest) {
17854
+ let params;
17855
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17856
+ params = (paramsOrFirst || {});
17857
+ }
17858
+ else {
17859
+ params = {
17860
+ projectId: paramsOrFirst,
17861
+ duration: rest[0]
17862
+ };
17863
+ }
17864
+ const projectId = params.projectId;
17865
+ const duration = params.duration;
17866
+ if (typeof projectId === 'undefined') {
17867
+ throw new AppwriteException('Missing required parameter: "projectId"');
17868
+ }
17869
+ if (typeof duration === 'undefined') {
17870
+ throw new AppwriteException('Missing required parameter: "duration"');
17871
+ }
17872
+ const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
17873
+ const payload = {};
17874
+ if (typeof duration !== 'undefined') {
17875
+ payload['duration'] = duration;
17876
+ }
17877
+ const uri = new URL(this.client.config.endpoint + apiPath);
17878
+ const apiHeaders = {
17879
+ 'content-type': 'application/json',
17880
+ };
17881
+ return this.client.call('patch', uri, apiHeaders, payload);
17882
+ }
17883
+ updateAuthLimit(paramsOrFirst, ...rest) {
17884
+ let params;
17885
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17886
+ params = (paramsOrFirst || {});
17887
+ }
17888
+ else {
17889
+ params = {
17890
+ projectId: paramsOrFirst,
17891
+ limit: rest[0]
17892
+ };
17893
+ }
17894
+ const projectId = params.projectId;
17895
+ const limit = params.limit;
17896
+ if (typeof projectId === 'undefined') {
17897
+ throw new AppwriteException('Missing required parameter: "projectId"');
17898
+ }
17899
+ if (typeof limit === 'undefined') {
17900
+ throw new AppwriteException('Missing required parameter: "limit"');
17901
+ }
17902
+ const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
17903
+ const payload = {};
17904
+ if (typeof limit !== 'undefined') {
17905
+ payload['limit'] = limit;
17906
+ }
17907
+ const uri = new URL(this.client.config.endpoint + apiPath);
17908
+ const apiHeaders = {
17909
+ 'content-type': 'application/json',
17910
+ };
17911
+ return this.client.call('patch', uri, apiHeaders, payload);
17912
+ }
17913
+ updateAuthSessionsLimit(paramsOrFirst, ...rest) {
17914
+ let params;
17915
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17916
+ params = (paramsOrFirst || {});
17917
+ }
17918
+ else {
17919
+ params = {
17920
+ projectId: paramsOrFirst,
17921
+ limit: rest[0]
17922
+ };
17923
+ }
17924
+ const projectId = params.projectId;
17925
+ const limit = params.limit;
17926
+ if (typeof projectId === 'undefined') {
17927
+ throw new AppwriteException('Missing required parameter: "projectId"');
17928
+ }
17929
+ if (typeof limit === 'undefined') {
17930
+ throw new AppwriteException('Missing required parameter: "limit"');
17931
+ }
17932
+ const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
17933
+ const payload = {};
17934
+ if (typeof limit !== 'undefined') {
17935
+ payload['limit'] = limit;
17635
17936
  }
17636
17937
  const uri = new URL(this.client.config.endpoint + apiPath);
17637
17938
  const apiHeaders = {
17638
17939
  'content-type': 'application/json',
17639
17940
  };
17640
- return this.client.call('post', uri, apiHeaders, payload);
17941
+ return this.client.call('patch', uri, apiHeaders, payload);
17641
17942
  }
17642
- getDevKey(paramsOrFirst, ...rest) {
17943
+ updateMembershipsPrivacy(paramsOrFirst, ...rest) {
17643
17944
  let params;
17644
17945
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17645
17946
  params = (paramsOrFirst || {});
@@ -17647,24 +17948,45 @@ class Projects {
17647
17948
  else {
17648
17949
  params = {
17649
17950
  projectId: paramsOrFirst,
17650
- keyId: rest[0]
17951
+ userName: rest[0],
17952
+ userEmail: rest[1],
17953
+ mfa: rest[2]
17651
17954
  };
17652
17955
  }
17653
17956
  const projectId = params.projectId;
17654
- const keyId = params.keyId;
17957
+ const userName = params.userName;
17958
+ const userEmail = params.userEmail;
17959
+ const mfa = params.mfa;
17655
17960
  if (typeof projectId === 'undefined') {
17656
17961
  throw new AppwriteException('Missing required parameter: "projectId"');
17657
17962
  }
17658
- if (typeof keyId === 'undefined') {
17659
- throw new AppwriteException('Missing required parameter: "keyId"');
17963
+ if (typeof userName === 'undefined') {
17964
+ throw new AppwriteException('Missing required parameter: "userName"');
17660
17965
  }
17661
- const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
17966
+ if (typeof userEmail === 'undefined') {
17967
+ throw new AppwriteException('Missing required parameter: "userEmail"');
17968
+ }
17969
+ if (typeof mfa === 'undefined') {
17970
+ throw new AppwriteException('Missing required parameter: "mfa"');
17971
+ }
17972
+ const apiPath = '/projects/{projectId}/auth/memberships-privacy'.replace('{projectId}', projectId);
17662
17973
  const payload = {};
17974
+ if (typeof userName !== 'undefined') {
17975
+ payload['userName'] = userName;
17976
+ }
17977
+ if (typeof userEmail !== 'undefined') {
17978
+ payload['userEmail'] = userEmail;
17979
+ }
17980
+ if (typeof mfa !== 'undefined') {
17981
+ payload['mfa'] = mfa;
17982
+ }
17663
17983
  const uri = new URL(this.client.config.endpoint + apiPath);
17664
- const apiHeaders = {};
17665
- return this.client.call('get', uri, apiHeaders, payload);
17984
+ const apiHeaders = {
17985
+ 'content-type': 'application/json',
17986
+ };
17987
+ return this.client.call('patch', uri, apiHeaders, payload);
17666
17988
  }
17667
- updateDevKey(paramsOrFirst, ...rest) {
17989
+ updateMockNumbers(paramsOrFirst, ...rest) {
17668
17990
  let params;
17669
17991
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17670
17992
  params = (paramsOrFirst || {});
@@ -17672,42 +17994,29 @@ class Projects {
17672
17994
  else {
17673
17995
  params = {
17674
17996
  projectId: paramsOrFirst,
17675
- keyId: rest[0],
17676
- name: rest[1],
17677
- expire: rest[2]
17997
+ numbers: rest[0]
17678
17998
  };
17679
17999
  }
17680
18000
  const projectId = params.projectId;
17681
- const keyId = params.keyId;
17682
- const name = params.name;
17683
- const expire = params.expire;
18001
+ const numbers = params.numbers;
17684
18002
  if (typeof projectId === 'undefined') {
17685
18003
  throw new AppwriteException('Missing required parameter: "projectId"');
17686
18004
  }
17687
- if (typeof keyId === 'undefined') {
17688
- throw new AppwriteException('Missing required parameter: "keyId"');
17689
- }
17690
- if (typeof name === 'undefined') {
17691
- throw new AppwriteException('Missing required parameter: "name"');
17692
- }
17693
- if (typeof expire === 'undefined') {
17694
- throw new AppwriteException('Missing required parameter: "expire"');
18005
+ if (typeof numbers === 'undefined') {
18006
+ throw new AppwriteException('Missing required parameter: "numbers"');
17695
18007
  }
17696
- const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18008
+ const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
17697
18009
  const payload = {};
17698
- if (typeof name !== 'undefined') {
17699
- payload['name'] = name;
17700
- }
17701
- if (typeof expire !== 'undefined') {
17702
- payload['expire'] = expire;
18010
+ if (typeof numbers !== 'undefined') {
18011
+ payload['numbers'] = numbers;
17703
18012
  }
17704
18013
  const uri = new URL(this.client.config.endpoint + apiPath);
17705
18014
  const apiHeaders = {
17706
18015
  'content-type': 'application/json',
17707
18016
  };
17708
- return this.client.call('put', uri, apiHeaders, payload);
18017
+ return this.client.call('patch', uri, apiHeaders, payload);
17709
18018
  }
17710
- deleteDevKey(paramsOrFirst, ...rest) {
18019
+ updateAuthPasswordDictionary(paramsOrFirst, ...rest) {
17711
18020
  let params;
17712
18021
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17713
18022
  params = (paramsOrFirst || {});
@@ -17715,26 +18024,29 @@ class Projects {
17715
18024
  else {
17716
18025
  params = {
17717
18026
  projectId: paramsOrFirst,
17718
- keyId: rest[0]
18027
+ enabled: rest[0]
17719
18028
  };
17720
18029
  }
17721
18030
  const projectId = params.projectId;
17722
- const keyId = params.keyId;
18031
+ const enabled = params.enabled;
17723
18032
  if (typeof projectId === 'undefined') {
17724
18033
  throw new AppwriteException('Missing required parameter: "projectId"');
17725
18034
  }
17726
- if (typeof keyId === 'undefined') {
17727
- throw new AppwriteException('Missing required parameter: "keyId"');
18035
+ if (typeof enabled === 'undefined') {
18036
+ throw new AppwriteException('Missing required parameter: "enabled"');
17728
18037
  }
17729
- const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18038
+ const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
17730
18039
  const payload = {};
18040
+ if (typeof enabled !== 'undefined') {
18041
+ payload['enabled'] = enabled;
18042
+ }
17731
18043
  const uri = new URL(this.client.config.endpoint + apiPath);
17732
18044
  const apiHeaders = {
17733
18045
  'content-type': 'application/json',
17734
18046
  };
17735
- return this.client.call('delete', uri, apiHeaders, payload);
18047
+ return this.client.call('patch', uri, apiHeaders, payload);
17736
18048
  }
17737
- createJWT(paramsOrFirst, ...rest) {
18049
+ updateAuthPasswordHistory(paramsOrFirst, ...rest) {
17738
18050
  let params;
17739
18051
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17740
18052
  params = (paramsOrFirst || {});
@@ -17742,34 +18054,29 @@ class Projects {
17742
18054
  else {
17743
18055
  params = {
17744
18056
  projectId: paramsOrFirst,
17745
- scopes: rest[0],
17746
- duration: rest[1]
18057
+ limit: rest[0]
17747
18058
  };
17748
18059
  }
17749
18060
  const projectId = params.projectId;
17750
- const scopes = params.scopes;
17751
- const duration = params.duration;
18061
+ const limit = params.limit;
17752
18062
  if (typeof projectId === 'undefined') {
17753
18063
  throw new AppwriteException('Missing required parameter: "projectId"');
17754
18064
  }
17755
- if (typeof scopes === 'undefined') {
17756
- throw new AppwriteException('Missing required parameter: "scopes"');
18065
+ if (typeof limit === 'undefined') {
18066
+ throw new AppwriteException('Missing required parameter: "limit"');
17757
18067
  }
17758
- const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
18068
+ const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
17759
18069
  const payload = {};
17760
- if (typeof scopes !== 'undefined') {
17761
- payload['scopes'] = scopes;
17762
- }
17763
- if (typeof duration !== 'undefined') {
17764
- payload['duration'] = duration;
18070
+ if (typeof limit !== 'undefined') {
18071
+ payload['limit'] = limit;
17765
18072
  }
17766
18073
  const uri = new URL(this.client.config.endpoint + apiPath);
17767
18074
  const apiHeaders = {
17768
18075
  'content-type': 'application/json',
17769
18076
  };
17770
- return this.client.call('post', uri, apiHeaders, payload);
18077
+ return this.client.call('patch', uri, apiHeaders, payload);
17771
18078
  }
17772
- listKeys(paramsOrFirst, ...rest) {
18079
+ updatePersonalDataCheck(paramsOrFirst, ...rest) {
17773
18080
  let params;
17774
18081
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17775
18082
  params = (paramsOrFirst || {});
@@ -17777,29 +18084,29 @@ class Projects {
17777
18084
  else {
17778
18085
  params = {
17779
18086
  projectId: paramsOrFirst,
17780
- queries: rest[0],
17781
- total: rest[1]
18087
+ enabled: rest[0]
17782
18088
  };
17783
18089
  }
17784
18090
  const projectId = params.projectId;
17785
- const queries = params.queries;
17786
- const total = params.total;
18091
+ const enabled = params.enabled;
17787
18092
  if (typeof projectId === 'undefined') {
17788
18093
  throw new AppwriteException('Missing required parameter: "projectId"');
17789
18094
  }
17790
- const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
17791
- const payload = {};
17792
- if (typeof queries !== 'undefined') {
17793
- payload['queries'] = queries;
18095
+ if (typeof enabled === 'undefined') {
18096
+ throw new AppwriteException('Missing required parameter: "enabled"');
17794
18097
  }
17795
- if (typeof total !== 'undefined') {
17796
- payload['total'] = total;
18098
+ const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
18099
+ const payload = {};
18100
+ if (typeof enabled !== 'undefined') {
18101
+ payload['enabled'] = enabled;
17797
18102
  }
17798
18103
  const uri = new URL(this.client.config.endpoint + apiPath);
17799
- const apiHeaders = {};
17800
- return this.client.call('get', uri, apiHeaders, payload);
18104
+ const apiHeaders = {
18105
+ 'content-type': 'application/json',
18106
+ };
18107
+ return this.client.call('patch', uri, apiHeaders, payload);
17801
18108
  }
17802
- createKey(paramsOrFirst, ...rest) {
18109
+ updateSessionAlerts(paramsOrFirst, ...rest) {
17803
18110
  let params;
17804
18111
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17805
18112
  params = (paramsOrFirst || {});
@@ -17807,47 +18114,29 @@ class Projects {
17807
18114
  else {
17808
18115
  params = {
17809
18116
  projectId: paramsOrFirst,
17810
- name: rest[0],
17811
- scopes: rest[1],
17812
- keyId: rest[2],
17813
- expire: rest[3]
18117
+ alerts: rest[0]
17814
18118
  };
17815
18119
  }
17816
18120
  const projectId = params.projectId;
17817
- const name = params.name;
17818
- const scopes = params.scopes;
17819
- const keyId = params.keyId;
17820
- const expire = params.expire;
18121
+ const alerts = params.alerts;
17821
18122
  if (typeof projectId === 'undefined') {
17822
18123
  throw new AppwriteException('Missing required parameter: "projectId"');
17823
18124
  }
17824
- if (typeof name === 'undefined') {
17825
- throw new AppwriteException('Missing required parameter: "name"');
17826
- }
17827
- if (typeof scopes === 'undefined') {
17828
- throw new AppwriteException('Missing required parameter: "scopes"');
18125
+ if (typeof alerts === 'undefined') {
18126
+ throw new AppwriteException('Missing required parameter: "alerts"');
17829
18127
  }
17830
- const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
18128
+ const apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
17831
18129
  const payload = {};
17832
- if (typeof keyId !== 'undefined') {
17833
- payload['keyId'] = keyId;
17834
- }
17835
- if (typeof name !== 'undefined') {
17836
- payload['name'] = name;
17837
- }
17838
- if (typeof scopes !== 'undefined') {
17839
- payload['scopes'] = scopes;
17840
- }
17841
- if (typeof expire !== 'undefined') {
17842
- payload['expire'] = expire;
18130
+ if (typeof alerts !== 'undefined') {
18131
+ payload['alerts'] = alerts;
17843
18132
  }
17844
18133
  const uri = new URL(this.client.config.endpoint + apiPath);
17845
18134
  const apiHeaders = {
17846
18135
  'content-type': 'application/json',
17847
18136
  };
17848
- return this.client.call('post', uri, apiHeaders, payload);
18137
+ return this.client.call('patch', uri, apiHeaders, payload);
17849
18138
  }
17850
- getKey(paramsOrFirst, ...rest) {
18139
+ updateSessionInvalidation(paramsOrFirst, ...rest) {
17851
18140
  let params;
17852
18141
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17853
18142
  params = (paramsOrFirst || {});
@@ -17855,24 +18144,29 @@ class Projects {
17855
18144
  else {
17856
18145
  params = {
17857
18146
  projectId: paramsOrFirst,
17858
- keyId: rest[0]
18147
+ enabled: rest[0]
17859
18148
  };
17860
18149
  }
17861
18150
  const projectId = params.projectId;
17862
- const keyId = params.keyId;
18151
+ const enabled = params.enabled;
17863
18152
  if (typeof projectId === 'undefined') {
17864
18153
  throw new AppwriteException('Missing required parameter: "projectId"');
17865
18154
  }
17866
- if (typeof keyId === 'undefined') {
17867
- throw new AppwriteException('Missing required parameter: "keyId"');
18155
+ if (typeof enabled === 'undefined') {
18156
+ throw new AppwriteException('Missing required parameter: "enabled"');
17868
18157
  }
17869
- const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18158
+ const apiPath = '/projects/{projectId}/auth/session-invalidation'.replace('{projectId}', projectId);
17870
18159
  const payload = {};
18160
+ if (typeof enabled !== 'undefined') {
18161
+ payload['enabled'] = enabled;
18162
+ }
17871
18163
  const uri = new URL(this.client.config.endpoint + apiPath);
17872
- const apiHeaders = {};
17873
- return this.client.call('get', uri, apiHeaders, payload);
18164
+ const apiHeaders = {
18165
+ 'content-type': 'application/json',
18166
+ };
18167
+ return this.client.call('patch', uri, apiHeaders, payload);
17874
18168
  }
17875
- updateKey(paramsOrFirst, ...rest) {
18169
+ updateAuthStatus(paramsOrFirst, ...rest) {
17876
18170
  let params;
17877
18171
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17878
18172
  params = (paramsOrFirst || {});
@@ -17880,74 +18174,56 @@ class Projects {
17880
18174
  else {
17881
18175
  params = {
17882
18176
  projectId: paramsOrFirst,
17883
- keyId: rest[0],
17884
- name: rest[1],
17885
- scopes: rest[2],
17886
- expire: rest[3]
18177
+ method: rest[0],
18178
+ status: rest[1]
17887
18179
  };
17888
18180
  }
17889
18181
  const projectId = params.projectId;
17890
- const keyId = params.keyId;
17891
- const name = params.name;
17892
- const scopes = params.scopes;
17893
- const expire = params.expire;
18182
+ const method = params.method;
18183
+ const status = params.status;
17894
18184
  if (typeof projectId === 'undefined') {
17895
18185
  throw new AppwriteException('Missing required parameter: "projectId"');
17896
18186
  }
17897
- if (typeof keyId === 'undefined') {
17898
- throw new AppwriteException('Missing required parameter: "keyId"');
17899
- }
17900
- if (typeof name === 'undefined') {
17901
- throw new AppwriteException('Missing required parameter: "name"');
18187
+ if (typeof method === 'undefined') {
18188
+ throw new AppwriteException('Missing required parameter: "method"');
17902
18189
  }
17903
- if (typeof scopes === 'undefined') {
17904
- throw new AppwriteException('Missing required parameter: "scopes"');
18190
+ if (typeof status === 'undefined') {
18191
+ throw new AppwriteException('Missing required parameter: "status"');
17905
18192
  }
17906
- const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18193
+ const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
17907
18194
  const payload = {};
17908
- if (typeof name !== 'undefined') {
17909
- payload['name'] = name;
17910
- }
17911
- if (typeof scopes !== 'undefined') {
17912
- payload['scopes'] = scopes;
17913
- }
17914
- if (typeof expire !== 'undefined') {
17915
- payload['expire'] = expire;
18195
+ if (typeof status !== 'undefined') {
18196
+ payload['status'] = status;
17916
18197
  }
17917
18198
  const uri = new URL(this.client.config.endpoint + apiPath);
17918
18199
  const apiHeaders = {
17919
18200
  'content-type': 'application/json',
17920
18201
  };
17921
- return this.client.call('put', uri, apiHeaders, payload);
18202
+ return this.client.call('patch', uri, apiHeaders, payload);
17922
18203
  }
17923
- deleteKey(paramsOrFirst, ...rest) {
18204
+ updateConsoleAccess(paramsOrFirst) {
17924
18205
  let params;
17925
18206
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17926
18207
  params = (paramsOrFirst || {});
17927
18208
  }
17928
18209
  else {
17929
18210
  params = {
17930
- projectId: paramsOrFirst,
17931
- keyId: rest[0]
18211
+ projectId: paramsOrFirst
17932
18212
  };
17933
18213
  }
17934
18214
  const projectId = params.projectId;
17935
- const keyId = params.keyId;
17936
18215
  if (typeof projectId === 'undefined') {
17937
18216
  throw new AppwriteException('Missing required parameter: "projectId"');
17938
18217
  }
17939
- if (typeof keyId === 'undefined') {
17940
- throw new AppwriteException('Missing required parameter: "keyId"');
17941
- }
17942
- const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18218
+ const apiPath = '/projects/{projectId}/console-access'.replace('{projectId}', projectId);
17943
18219
  const payload = {};
17944
18220
  const uri = new URL(this.client.config.endpoint + apiPath);
17945
18221
  const apiHeaders = {
17946
18222
  'content-type': 'application/json',
17947
18223
  };
17948
- return this.client.call('delete', uri, apiHeaders, payload);
18224
+ return this.client.call('patch', uri, apiHeaders, payload);
17949
18225
  }
17950
- updateLabels(paramsOrFirst, ...rest) {
18226
+ listDevKeys(paramsOrFirst, ...rest) {
17951
18227
  let params;
17952
18228
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17953
18229
  params = (paramsOrFirst || {});
@@ -17955,29 +18231,24 @@ class Projects {
17955
18231
  else {
17956
18232
  params = {
17957
18233
  projectId: paramsOrFirst,
17958
- labels: rest[0]
18234
+ queries: rest[0]
17959
18235
  };
17960
18236
  }
17961
18237
  const projectId = params.projectId;
17962
- const labels = params.labels;
18238
+ const queries = params.queries;
17963
18239
  if (typeof projectId === 'undefined') {
17964
- throw new AppwriteException('Missing required parameter: "projectId"');
17965
- }
17966
- if (typeof labels === 'undefined') {
17967
- throw new AppwriteException('Missing required parameter: "labels"');
18240
+ throw new AppwriteException('Missing required parameter: "projectId"');
17968
18241
  }
17969
- const apiPath = '/projects/{projectId}/labels'.replace('{projectId}', projectId);
18242
+ const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
17970
18243
  const payload = {};
17971
- if (typeof labels !== 'undefined') {
17972
- payload['labels'] = labels;
18244
+ if (typeof queries !== 'undefined') {
18245
+ payload['queries'] = queries;
17973
18246
  }
17974
18247
  const uri = new URL(this.client.config.endpoint + apiPath);
17975
- const apiHeaders = {
17976
- 'content-type': 'application/json',
17977
- };
17978
- return this.client.call('put', uri, apiHeaders, payload);
18248
+ const apiHeaders = {};
18249
+ return this.client.call('get', uri, apiHeaders, payload);
17979
18250
  }
17980
- updateOAuth2(paramsOrFirst, ...rest) {
18251
+ createDevKey(paramsOrFirst, ...rest) {
17981
18252
  let params;
17982
18253
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
17983
18254
  params = (paramsOrFirst || {});
@@ -17985,44 +18256,37 @@ class Projects {
17985
18256
  else {
17986
18257
  params = {
17987
18258
  projectId: paramsOrFirst,
17988
- provider: rest[0],
17989
- appId: rest[1],
17990
- secret: rest[2],
17991
- enabled: rest[3]
18259
+ name: rest[0],
18260
+ expire: rest[1]
17992
18261
  };
17993
18262
  }
17994
18263
  const projectId = params.projectId;
17995
- const provider = params.provider;
17996
- const appId = params.appId;
17997
- const secret = params.secret;
17998
- const enabled = params.enabled;
18264
+ const name = params.name;
18265
+ const expire = params.expire;
17999
18266
  if (typeof projectId === 'undefined') {
18000
18267
  throw new AppwriteException('Missing required parameter: "projectId"');
18001
18268
  }
18002
- if (typeof provider === 'undefined') {
18003
- throw new AppwriteException('Missing required parameter: "provider"');
18004
- }
18005
- const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
18006
- const payload = {};
18007
- if (typeof provider !== 'undefined') {
18008
- payload['provider'] = provider;
18269
+ if (typeof name === 'undefined') {
18270
+ throw new AppwriteException('Missing required parameter: "name"');
18009
18271
  }
18010
- if (typeof appId !== 'undefined') {
18011
- payload['appId'] = appId;
18272
+ if (typeof expire === 'undefined') {
18273
+ throw new AppwriteException('Missing required parameter: "expire"');
18012
18274
  }
18013
- if (typeof secret !== 'undefined') {
18014
- payload['secret'] = secret;
18275
+ const apiPath = '/projects/{projectId}/dev-keys'.replace('{projectId}', projectId);
18276
+ const payload = {};
18277
+ if (typeof name !== 'undefined') {
18278
+ payload['name'] = name;
18015
18279
  }
18016
- if (typeof enabled !== 'undefined') {
18017
- payload['enabled'] = enabled;
18280
+ if (typeof expire !== 'undefined') {
18281
+ payload['expire'] = expire;
18018
18282
  }
18019
18283
  const uri = new URL(this.client.config.endpoint + apiPath);
18020
18284
  const apiHeaders = {
18021
18285
  'content-type': 'application/json',
18022
18286
  };
18023
- return this.client.call('patch', uri, apiHeaders, payload);
18287
+ return this.client.call('post', uri, apiHeaders, payload);
18024
18288
  }
18025
- listPlatforms(paramsOrFirst, ...rest) {
18289
+ getDevKey(paramsOrFirst, ...rest) {
18026
18290
  let params;
18027
18291
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18028
18292
  params = (paramsOrFirst || {});
@@ -18030,24 +18294,24 @@ class Projects {
18030
18294
  else {
18031
18295
  params = {
18032
18296
  projectId: paramsOrFirst,
18033
- total: rest[0]
18297
+ keyId: rest[0]
18034
18298
  };
18035
18299
  }
18036
18300
  const projectId = params.projectId;
18037
- const total = params.total;
18301
+ const keyId = params.keyId;
18038
18302
  if (typeof projectId === 'undefined') {
18039
18303
  throw new AppwriteException('Missing required parameter: "projectId"');
18040
18304
  }
18041
- const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
18042
- const payload = {};
18043
- if (typeof total !== 'undefined') {
18044
- payload['total'] = total;
18305
+ if (typeof keyId === 'undefined') {
18306
+ throw new AppwriteException('Missing required parameter: "keyId"');
18045
18307
  }
18308
+ const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18309
+ const payload = {};
18046
18310
  const uri = new URL(this.client.config.endpoint + apiPath);
18047
18311
  const apiHeaders = {};
18048
18312
  return this.client.call('get', uri, apiHeaders, payload);
18049
18313
  }
18050
- createPlatform(paramsOrFirst, ...rest) {
18314
+ updateDevKey(paramsOrFirst, ...rest) {
18051
18315
  let params;
18052
18316
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18053
18317
  params = (paramsOrFirst || {});
@@ -18055,52 +18319,42 @@ class Projects {
18055
18319
  else {
18056
18320
  params = {
18057
18321
  projectId: paramsOrFirst,
18058
- type: rest[0],
18322
+ keyId: rest[0],
18059
18323
  name: rest[1],
18060
- key: rest[2],
18061
- store: rest[3],
18062
- hostname: rest[4]
18324
+ expire: rest[2]
18063
18325
  };
18064
18326
  }
18065
18327
  const projectId = params.projectId;
18066
- const type = params.type;
18328
+ const keyId = params.keyId;
18067
18329
  const name = params.name;
18068
- const key = params.key;
18069
- const store = params.store;
18070
- const hostname = params.hostname;
18330
+ const expire = params.expire;
18071
18331
  if (typeof projectId === 'undefined') {
18072
18332
  throw new AppwriteException('Missing required parameter: "projectId"');
18073
18333
  }
18074
- if (typeof type === 'undefined') {
18075
- throw new AppwriteException('Missing required parameter: "type"');
18334
+ if (typeof keyId === 'undefined') {
18335
+ throw new AppwriteException('Missing required parameter: "keyId"');
18076
18336
  }
18077
18337
  if (typeof name === 'undefined') {
18078
18338
  throw new AppwriteException('Missing required parameter: "name"');
18079
18339
  }
18080
- const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
18081
- const payload = {};
18082
- if (typeof type !== 'undefined') {
18083
- payload['type'] = type;
18340
+ if (typeof expire === 'undefined') {
18341
+ throw new AppwriteException('Missing required parameter: "expire"');
18084
18342
  }
18343
+ const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18344
+ const payload = {};
18085
18345
  if (typeof name !== 'undefined') {
18086
18346
  payload['name'] = name;
18087
18347
  }
18088
- if (typeof key !== 'undefined') {
18089
- payload['key'] = key;
18090
- }
18091
- if (typeof store !== 'undefined') {
18092
- payload['store'] = store;
18093
- }
18094
- if (typeof hostname !== 'undefined') {
18095
- payload['hostname'] = hostname;
18348
+ if (typeof expire !== 'undefined') {
18349
+ payload['expire'] = expire;
18096
18350
  }
18097
18351
  const uri = new URL(this.client.config.endpoint + apiPath);
18098
18352
  const apiHeaders = {
18099
18353
  'content-type': 'application/json',
18100
18354
  };
18101
- return this.client.call('post', uri, apiHeaders, payload);
18355
+ return this.client.call('put', uri, apiHeaders, payload);
18102
18356
  }
18103
- getPlatform(paramsOrFirst, ...rest) {
18357
+ deleteDevKey(paramsOrFirst, ...rest) {
18104
18358
  let params;
18105
18359
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18106
18360
  params = (paramsOrFirst || {});
@@ -18108,24 +18362,26 @@ class Projects {
18108
18362
  else {
18109
18363
  params = {
18110
18364
  projectId: paramsOrFirst,
18111
- platformId: rest[0]
18365
+ keyId: rest[0]
18112
18366
  };
18113
18367
  }
18114
18368
  const projectId = params.projectId;
18115
- const platformId = params.platformId;
18369
+ const keyId = params.keyId;
18116
18370
  if (typeof projectId === 'undefined') {
18117
18371
  throw new AppwriteException('Missing required parameter: "projectId"');
18118
18372
  }
18119
- if (typeof platformId === 'undefined') {
18120
- throw new AppwriteException('Missing required parameter: "platformId"');
18373
+ if (typeof keyId === 'undefined') {
18374
+ throw new AppwriteException('Missing required parameter: "keyId"');
18121
18375
  }
18122
- const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
18376
+ const apiPath = '/projects/{projectId}/dev-keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
18123
18377
  const payload = {};
18124
18378
  const uri = new URL(this.client.config.endpoint + apiPath);
18125
- const apiHeaders = {};
18126
- return this.client.call('get', uri, apiHeaders, payload);
18379
+ const apiHeaders = {
18380
+ 'content-type': 'application/json',
18381
+ };
18382
+ return this.client.call('delete', uri, apiHeaders, payload);
18127
18383
  }
18128
- updatePlatform(paramsOrFirst, ...rest) {
18384
+ createJWT(paramsOrFirst, ...rest) {
18129
18385
  let params;
18130
18386
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18131
18387
  params = (paramsOrFirst || {});
@@ -18133,49 +18389,34 @@ class Projects {
18133
18389
  else {
18134
18390
  params = {
18135
18391
  projectId: paramsOrFirst,
18136
- platformId: rest[0],
18137
- name: rest[1],
18138
- key: rest[2],
18139
- store: rest[3],
18140
- hostname: rest[4]
18392
+ scopes: rest[0],
18393
+ duration: rest[1]
18141
18394
  };
18142
18395
  }
18143
18396
  const projectId = params.projectId;
18144
- const platformId = params.platformId;
18145
- const name = params.name;
18146
- const key = params.key;
18147
- const store = params.store;
18148
- const hostname = params.hostname;
18397
+ const scopes = params.scopes;
18398
+ const duration = params.duration;
18149
18399
  if (typeof projectId === 'undefined') {
18150
18400
  throw new AppwriteException('Missing required parameter: "projectId"');
18151
18401
  }
18152
- if (typeof platformId === 'undefined') {
18153
- throw new AppwriteException('Missing required parameter: "platformId"');
18154
- }
18155
- if (typeof name === 'undefined') {
18156
- throw new AppwriteException('Missing required parameter: "name"');
18402
+ if (typeof scopes === 'undefined') {
18403
+ throw new AppwriteException('Missing required parameter: "scopes"');
18157
18404
  }
18158
- const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
18405
+ const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
18159
18406
  const payload = {};
18160
- if (typeof name !== 'undefined') {
18161
- payload['name'] = name;
18162
- }
18163
- if (typeof key !== 'undefined') {
18164
- payload['key'] = key;
18165
- }
18166
- if (typeof store !== 'undefined') {
18167
- payload['store'] = store;
18407
+ if (typeof scopes !== 'undefined') {
18408
+ payload['scopes'] = scopes;
18168
18409
  }
18169
- if (typeof hostname !== 'undefined') {
18170
- payload['hostname'] = hostname;
18410
+ if (typeof duration !== 'undefined') {
18411
+ payload['duration'] = duration;
18171
18412
  }
18172
18413
  const uri = new URL(this.client.config.endpoint + apiPath);
18173
18414
  const apiHeaders = {
18174
18415
  'content-type': 'application/json',
18175
18416
  };
18176
- return this.client.call('put', uri, apiHeaders, payload);
18417
+ return this.client.call('post', uri, apiHeaders, payload);
18177
18418
  }
18178
- deletePlatform(paramsOrFirst, ...rest) {
18419
+ updateOAuth2(paramsOrFirst, ...rest) {
18179
18420
  let params;
18180
18421
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18181
18422
  params = (paramsOrFirst || {});
@@ -18183,24 +18424,42 @@ class Projects {
18183
18424
  else {
18184
18425
  params = {
18185
18426
  projectId: paramsOrFirst,
18186
- platformId: rest[0]
18427
+ provider: rest[0],
18428
+ appId: rest[1],
18429
+ secret: rest[2],
18430
+ enabled: rest[3]
18187
18431
  };
18188
18432
  }
18189
18433
  const projectId = params.projectId;
18190
- const platformId = params.platformId;
18434
+ const provider = params.provider;
18435
+ const appId = params.appId;
18436
+ const secret = params.secret;
18437
+ const enabled = params.enabled;
18191
18438
  if (typeof projectId === 'undefined') {
18192
18439
  throw new AppwriteException('Missing required parameter: "projectId"');
18193
18440
  }
18194
- if (typeof platformId === 'undefined') {
18195
- throw new AppwriteException('Missing required parameter: "platformId"');
18441
+ if (typeof provider === 'undefined') {
18442
+ throw new AppwriteException('Missing required parameter: "provider"');
18196
18443
  }
18197
- const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
18444
+ const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
18198
18445
  const payload = {};
18446
+ if (typeof provider !== 'undefined') {
18447
+ payload['provider'] = provider;
18448
+ }
18449
+ if (typeof appId !== 'undefined') {
18450
+ payload['appId'] = appId;
18451
+ }
18452
+ if (typeof secret !== 'undefined') {
18453
+ payload['secret'] = secret;
18454
+ }
18455
+ if (typeof enabled !== 'undefined') {
18456
+ payload['enabled'] = enabled;
18457
+ }
18199
18458
  const uri = new URL(this.client.config.endpoint + apiPath);
18200
18459
  const apiHeaders = {
18201
18460
  'content-type': 'application/json',
18202
18461
  };
18203
- return this.client.call('delete', uri, apiHeaders, payload);
18462
+ return this.client.call('patch', uri, apiHeaders, payload);
18204
18463
  }
18205
18464
  listSchedules(paramsOrFirst, ...rest) {
18206
18465
  let params;
@@ -18313,74 +18572,6 @@ class Projects {
18313
18572
  const apiHeaders = {};
18314
18573
  return this.client.call('get', uri, apiHeaders, payload);
18315
18574
  }
18316
- updateServiceStatus(paramsOrFirst, ...rest) {
18317
- let params;
18318
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18319
- params = (paramsOrFirst || {});
18320
- }
18321
- else {
18322
- params = {
18323
- projectId: paramsOrFirst,
18324
- service: rest[0],
18325
- status: rest[1]
18326
- };
18327
- }
18328
- const projectId = params.projectId;
18329
- const service = params.service;
18330
- const status = params.status;
18331
- if (typeof projectId === 'undefined') {
18332
- throw new AppwriteException('Missing required parameter: "projectId"');
18333
- }
18334
- if (typeof service === 'undefined') {
18335
- throw new AppwriteException('Missing required parameter: "service"');
18336
- }
18337
- if (typeof status === 'undefined') {
18338
- throw new AppwriteException('Missing required parameter: "status"');
18339
- }
18340
- const apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
18341
- const payload = {};
18342
- if (typeof service !== 'undefined') {
18343
- payload['service'] = service;
18344
- }
18345
- if (typeof status !== 'undefined') {
18346
- payload['status'] = status;
18347
- }
18348
- const uri = new URL(this.client.config.endpoint + apiPath);
18349
- const apiHeaders = {
18350
- 'content-type': 'application/json',
18351
- };
18352
- return this.client.call('patch', uri, apiHeaders, payload);
18353
- }
18354
- updateServiceStatusAll(paramsOrFirst, ...rest) {
18355
- let params;
18356
- if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
18357
- params = (paramsOrFirst || {});
18358
- }
18359
- else {
18360
- params = {
18361
- projectId: paramsOrFirst,
18362
- status: rest[0]
18363
- };
18364
- }
18365
- const projectId = params.projectId;
18366
- const status = params.status;
18367
- if (typeof projectId === 'undefined') {
18368
- throw new AppwriteException('Missing required parameter: "projectId"');
18369
- }
18370
- if (typeof status === 'undefined') {
18371
- throw new AppwriteException('Missing required parameter: "status"');
18372
- }
18373
- const apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
18374
- const payload = {};
18375
- if (typeof status !== 'undefined') {
18376
- payload['status'] = status;
18377
- }
18378
- const uri = new URL(this.client.config.endpoint + apiPath);
18379
- const apiHeaders = {
18380
- 'content-type': 'application/json',
18381
- };
18382
- return this.client.call('patch', uri, apiHeaders, payload);
18383
- }
18384
18575
  updateSmtp(paramsOrFirst, ...rest) {
18385
18576
  let params;
18386
18577
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -21450,7 +21641,8 @@ class TablesDB {
21450
21641
  name: rest[1],
21451
21642
  permissions: rest[2],
21452
21643
  rowSecurity: rest[3],
21453
- enabled: rest[4]
21644
+ enabled: rest[4],
21645
+ purge: rest[5]
21454
21646
  };
21455
21647
  }
21456
21648
  const databaseId = params.databaseId;
@@ -21459,6 +21651,7 @@ class TablesDB {
21459
21651
  const permissions = params.permissions;
21460
21652
  const rowSecurity = params.rowSecurity;
21461
21653
  const enabled = params.enabled;
21654
+ const purge = params.purge;
21462
21655
  if (typeof databaseId === 'undefined') {
21463
21656
  throw new AppwriteException('Missing required parameter: "databaseId"');
21464
21657
  }
@@ -21479,6 +21672,9 @@ class TablesDB {
21479
21672
  if (typeof enabled !== 'undefined') {
21480
21673
  payload['enabled'] = enabled;
21481
21674
  }
21675
+ if (typeof purge !== 'undefined') {
21676
+ payload['purge'] = purge;
21677
+ }
21482
21678
  const uri = new URL(this.client.config.endpoint + apiPath);
21483
21679
  const apiHeaders = {
21484
21680
  'content-type': 'application/json',
@@ -26844,9 +27040,9 @@ class Webhooks {
26844
27040
  name: rest[1],
26845
27041
  events: rest[2],
26846
27042
  enabled: rest[3],
26847
- security: rest[4],
26848
- httpUser: rest[5],
26849
- httpPass: rest[6]
27043
+ tls: rest[4],
27044
+ authUsername: rest[5],
27045
+ authPassword: rest[6]
26850
27046
  };
26851
27047
  }
26852
27048
  const webhookId = params.webhookId;
@@ -26854,9 +27050,9 @@ class Webhooks {
26854
27050
  const name = params.name;
26855
27051
  const events = params.events;
26856
27052
  const enabled = params.enabled;
26857
- const security = params.security;
26858
- const httpUser = params.httpUser;
26859
- const httpPass = params.httpPass;
27053
+ const tls = params.tls;
27054
+ const authUsername = params.authUsername;
27055
+ const authPassword = params.authPassword;
26860
27056
  if (typeof webhookId === 'undefined') {
26861
27057
  throw new AppwriteException('Missing required parameter: "webhookId"');
26862
27058
  }
@@ -26886,14 +27082,14 @@ class Webhooks {
26886
27082
  if (typeof enabled !== 'undefined') {
26887
27083
  payload['enabled'] = enabled;
26888
27084
  }
26889
- if (typeof security !== 'undefined') {
26890
- payload['security'] = security;
27085
+ if (typeof tls !== 'undefined') {
27086
+ payload['tls'] = tls;
26891
27087
  }
26892
- if (typeof httpUser !== 'undefined') {
26893
- payload['httpUser'] = httpUser;
27088
+ if (typeof authUsername !== 'undefined') {
27089
+ payload['authUsername'] = authUsername;
26894
27090
  }
26895
- if (typeof httpPass !== 'undefined') {
26896
- payload['httpPass'] = httpPass;
27091
+ if (typeof authPassword !== 'undefined') {
27092
+ payload['authPassword'] = authPassword;
26897
27093
  }
26898
27094
  const uri = new URL(this.client.config.endpoint + apiPath);
26899
27095
  const apiHeaders = {
@@ -26933,9 +27129,9 @@ class Webhooks {
26933
27129
  url: rest[1],
26934
27130
  events: rest[2],
26935
27131
  enabled: rest[3],
26936
- security: rest[4],
26937
- httpUser: rest[5],
26938
- httpPass: rest[6]
27132
+ tls: rest[4],
27133
+ authUsername: rest[5],
27134
+ authPassword: rest[6]
26939
27135
  };
26940
27136
  }
26941
27137
  const webhookId = params.webhookId;
@@ -26943,9 +27139,9 @@ class Webhooks {
26943
27139
  const url = params.url;
26944
27140
  const events = params.events;
26945
27141
  const enabled = params.enabled;
26946
- const security = params.security;
26947
- const httpUser = params.httpUser;
26948
- const httpPass = params.httpPass;
27142
+ const tls = params.tls;
27143
+ const authUsername = params.authUsername;
27144
+ const authPassword = params.authPassword;
26949
27145
  if (typeof webhookId === 'undefined') {
26950
27146
  throw new AppwriteException('Missing required parameter: "webhookId"');
26951
27147
  }
@@ -26972,14 +27168,14 @@ class Webhooks {
26972
27168
  if (typeof enabled !== 'undefined') {
26973
27169
  payload['enabled'] = enabled;
26974
27170
  }
26975
- if (typeof security !== 'undefined') {
26976
- payload['security'] = security;
27171
+ if (typeof tls !== 'undefined') {
27172
+ payload['tls'] = tls;
26977
27173
  }
26978
- if (typeof httpUser !== 'undefined') {
26979
- payload['httpUser'] = httpUser;
27174
+ if (typeof authUsername !== 'undefined') {
27175
+ payload['authUsername'] = authUsername;
26980
27176
  }
26981
- if (typeof httpPass !== 'undefined') {
26982
- payload['httpPass'] = httpPass;
27177
+ if (typeof authPassword !== 'undefined') {
27178
+ payload['authPassword'] = authPassword;
26983
27179
  }
26984
27180
  const uri = new URL(this.client.config.endpoint + apiPath);
26985
27181
  const apiHeaders = {
@@ -27009,7 +27205,7 @@ class Webhooks {
27009
27205
  };
27010
27206
  return this.client.call('delete', uri, apiHeaders, payload);
27011
27207
  }
27012
- updateSignature(paramsOrFirst) {
27208
+ updateSecret(paramsOrFirst) {
27013
27209
  let params;
27014
27210
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
27015
27211
  params = (paramsOrFirst || {});
@@ -27023,7 +27219,7 @@ class Webhooks {
27023
27219
  if (typeof webhookId === 'undefined') {
27024
27220
  throw new AppwriteException('Missing required parameter: "webhookId"');
27025
27221
  }
27026
- const apiPath = '/webhooks/{webhookId}/signature'.replace('{webhookId}', webhookId);
27222
+ const apiPath = '/webhooks/{webhookId}/secret'.replace('{webhookId}', webhookId);
27027
27223
  const payload = {};
27028
27224
  const uri = new URL(this.client.config.endpoint + apiPath);
27029
27225
  const apiHeaders = {
@@ -28057,6 +28253,10 @@ exports.Scopes = void 0;
28057
28253
  Scopes["WebhooksWrite"] = "webhooks.write";
28058
28254
  Scopes["ProjectRead"] = "project.read";
28059
28255
  Scopes["ProjectWrite"] = "project.write";
28256
+ Scopes["KeysRead"] = "keys.read";
28257
+ Scopes["KeysWrite"] = "keys.write";
28258
+ Scopes["PlatformsRead"] = "platforms.read";
28259
+ Scopes["PlatformsWrite"] = "platforms.write";
28060
28260
  Scopes["PoliciesWrite"] = "policies.write";
28061
28261
  Scopes["PoliciesRead"] = "policies.read";
28062
28262
  Scopes["ArchivesRead"] = "archives.read";
@@ -28066,12 +28266,8 @@ exports.Scopes = void 0;
28066
28266
  Scopes["DomainsRead"] = "domains.read";
28067
28267
  Scopes["DomainsWrite"] = "domains.write";
28068
28268
  Scopes["EventsRead"] = "events.read";
28069
- Scopes["PlatformsRead"] = "platforms.read";
28070
- Scopes["PlatformsWrite"] = "platforms.write";
28071
28269
  Scopes["ProjectsRead"] = "projects.read";
28072
28270
  Scopes["ProjectsWrite"] = "projects.write";
28073
- Scopes["KeysRead"] = "keys.read";
28074
- Scopes["KeysWrite"] = "keys.write";
28075
28271
  Scopes["DevKeysRead"] = "devKeys.read";
28076
28272
  Scopes["DevKeysWrite"] = "devKeys.write";
28077
28273
  })(exports.Scopes || (exports.Scopes = {}));
@@ -28125,6 +28321,7 @@ exports.OAuthProvider = void 0;
28125
28321
  OAuthProvider["TradeshiftBox"] = "tradeshiftBox";
28126
28322
  OAuthProvider["Twitch"] = "twitch";
28127
28323
  OAuthProvider["Wordpress"] = "wordpress";
28324
+ OAuthProvider["X"] = "x";
28128
28325
  OAuthProvider["Yahoo"] = "yahoo";
28129
28326
  OAuthProvider["Yammer"] = "yammer";
28130
28327
  OAuthProvider["Yandex"] = "yandex";
@@ -29246,6 +29443,34 @@ exports.Addon = void 0;
29246
29443
  Addon["Baa"] = "baa";
29247
29444
  })(exports.Addon || (exports.Addon = {}));
29248
29445
 
29446
+ exports.ProtocolId = void 0;
29447
+ (function (ProtocolId) {
29448
+ ProtocolId["Rest"] = "rest";
29449
+ ProtocolId["Graphql"] = "graphql";
29450
+ ProtocolId["Websocket"] = "websocket";
29451
+ })(exports.ProtocolId || (exports.ProtocolId = {}));
29452
+
29453
+ exports.ServiceId = void 0;
29454
+ (function (ServiceId) {
29455
+ ServiceId["Account"] = "account";
29456
+ ServiceId["Avatars"] = "avatars";
29457
+ ServiceId["Databases"] = "databases";
29458
+ ServiceId["Tablesdb"] = "tablesdb";
29459
+ ServiceId["Locale"] = "locale";
29460
+ ServiceId["Health"] = "health";
29461
+ ServiceId["Project"] = "project";
29462
+ ServiceId["Storage"] = "storage";
29463
+ ServiceId["Teams"] = "teams";
29464
+ ServiceId["Users"] = "users";
29465
+ ServiceId["Vcs"] = "vcs";
29466
+ ServiceId["Sites"] = "sites";
29467
+ ServiceId["Functions"] = "functions";
29468
+ ServiceId["Proxy"] = "proxy";
29469
+ ServiceId["Graphql"] = "graphql";
29470
+ ServiceId["Migrations"] = "migrations";
29471
+ ServiceId["Messaging"] = "messaging";
29472
+ })(exports.ServiceId || (exports.ServiceId = {}));
29473
+
29249
29474
  exports.ProjectUsageRange = void 0;
29250
29475
  (function (ProjectUsageRange) {
29251
29476
  ProjectUsageRange["OneHour"] = "1h";
@@ -29262,13 +29487,6 @@ exports.Region = void 0;
29262
29487
  Region["Tor"] = "tor";
29263
29488
  })(exports.Region || (exports.Region = {}));
29264
29489
 
29265
- exports.Api = void 0;
29266
- (function (Api) {
29267
- Api["Rest"] = "rest";
29268
- Api["Graphql"] = "graphql";
29269
- Api["Realtime"] = "realtime";
29270
- })(exports.Api || (exports.Api = {}));
29271
-
29272
29490
  exports.AuthMethod = void 0;
29273
29491
  (function (AuthMethod) {
29274
29492
  AuthMethod["Emailpassword"] = "email-password";
@@ -29280,25 +29498,6 @@ exports.AuthMethod = void 0;
29280
29498
  AuthMethod["Phone"] = "phone";
29281
29499
  })(exports.AuthMethod || (exports.AuthMethod = {}));
29282
29500
 
29283
- exports.PlatformType = void 0;
29284
- (function (PlatformType) {
29285
- PlatformType["Web"] = "web";
29286
- PlatformType["Flutterweb"] = "flutter-web";
29287
- PlatformType["Flutterios"] = "flutter-ios";
29288
- PlatformType["Flutterandroid"] = "flutter-android";
29289
- PlatformType["Flutterlinux"] = "flutter-linux";
29290
- PlatformType["Fluttermacos"] = "flutter-macos";
29291
- PlatformType["Flutterwindows"] = "flutter-windows";
29292
- PlatformType["Appleios"] = "apple-ios";
29293
- PlatformType["Applemacos"] = "apple-macos";
29294
- PlatformType["Applewatchos"] = "apple-watchos";
29295
- PlatformType["Appletvos"] = "apple-tvos";
29296
- PlatformType["Android"] = "android";
29297
- PlatformType["Unity"] = "unity";
29298
- PlatformType["Reactnativeios"] = "react-native-ios";
29299
- PlatformType["Reactnativeandroid"] = "react-native-android";
29300
- })(exports.PlatformType || (exports.PlatformType = {}));
29301
-
29302
29501
  exports.ResourceType = void 0;
29303
29502
  (function (ResourceType) {
29304
29503
  ResourceType["Function"] = "function";
@@ -29307,23 +29506,6 @@ exports.ResourceType = void 0;
29307
29506
  ResourceType["Backup"] = "backup";
29308
29507
  })(exports.ResourceType || (exports.ResourceType = {}));
29309
29508
 
29310
- exports.ApiService = void 0;
29311
- (function (ApiService) {
29312
- ApiService["Account"] = "account";
29313
- ApiService["Avatars"] = "avatars";
29314
- ApiService["Databases"] = "databases";
29315
- ApiService["Tablesdb"] = "tablesdb";
29316
- ApiService["Locale"] = "locale";
29317
- ApiService["Health"] = "health";
29318
- ApiService["Storage"] = "storage";
29319
- ApiService["Teams"] = "teams";
29320
- ApiService["Users"] = "users";
29321
- ApiService["Sites"] = "sites";
29322
- ApiService["Functions"] = "functions";
29323
- ApiService["Graphql"] = "graphql";
29324
- ApiService["Messaging"] = "messaging";
29325
- })(exports.ApiService || (exports.ApiService = {}));
29326
-
29327
29509
  exports.SMTPSecure = void 0;
29328
29510
  (function (SMTPSecure) {
29329
29511
  SMTPSecure["Tls"] = "tls";
@@ -29891,6 +30073,15 @@ exports.ExecutionStatus = void 0;
29891
30073
  ExecutionStatus["Scheduled"] = "scheduled";
29892
30074
  })(exports.ExecutionStatus || (exports.ExecutionStatus = {}));
29893
30075
 
30076
+ exports.PlatformType = void 0;
30077
+ (function (PlatformType) {
30078
+ PlatformType["Windows"] = "windows";
30079
+ PlatformType["Apple"] = "apple";
30080
+ PlatformType["Android"] = "android";
30081
+ PlatformType["Linux"] = "linux";
30082
+ PlatformType["Web"] = "web";
30083
+ })(exports.PlatformType || (exports.PlatformType = {}));
30084
+
29894
30085
  exports.HealthAntivirusStatus = void 0;
29895
30086
  (function (HealthAntivirusStatus) {
29896
30087
  HealthAntivirusStatus["Disabled"] = "disabled";