@appwrite.io/console 8.3.0 → 9.1.0

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