@appwrite.io/console 15.6.0 → 15.7.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
@@ -645,7 +645,7 @@ class Client {
645
645
  'x-sdk-name': 'Console',
646
646
  'x-sdk-platform': 'console',
647
647
  'x-sdk-language': 'web',
648
- 'x-sdk-version': '15.6.0',
648
+ 'x-sdk-version': '15.7.0',
649
649
  'X-Appwrite-Response-Format': '1.9.5',
650
650
  };
651
651
  this.realtime = {
@@ -9730,12 +9730,14 @@ class DocumentsDB {
9730
9730
  databaseId: paramsOrFirst,
9731
9731
  name: rest[0],
9732
9732
  enabled: rest[1],
9733
- replicas: rest[2]
9733
+ specification: rest[2],
9734
+ replicas: rest[3]
9734
9735
  };
9735
9736
  }
9736
9737
  const databaseId = params.databaseId;
9737
9738
  const name = params.name;
9738
9739
  const enabled = params.enabled;
9740
+ const specification = params.specification;
9739
9741
  const replicas = params.replicas;
9740
9742
  if (typeof databaseId === 'undefined') {
9741
9743
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -9751,6 +9753,9 @@ class DocumentsDB {
9751
9753
  if (typeof enabled !== 'undefined') {
9752
9754
  payload['enabled'] = enabled;
9753
9755
  }
9756
+ if (typeof specification !== 'undefined') {
9757
+ payload['specification'] = specification;
9758
+ }
9754
9759
  if (typeof replicas !== 'undefined') {
9755
9760
  payload['replicas'] = replicas;
9756
9761
  }
@@ -31375,14 +31380,16 @@ class Storage {
31375
31380
  bucketId: paramsOrFirst,
31376
31381
  fileId: rest[0],
31377
31382
  file: rest[1],
31378
- permissions: rest[2]
31383
+ permissions: rest[2],
31384
+ folder: rest[3]
31379
31385
  };
31380
- onProgress = rest[3];
31386
+ onProgress = rest[4];
31381
31387
  }
31382
31388
  const bucketId = params.bucketId;
31383
31389
  const fileId = params.fileId;
31384
31390
  const file = params.file;
31385
31391
  const permissions = params.permissions;
31392
+ const folder = params.folder;
31386
31393
  if (typeof bucketId === 'undefined') {
31387
31394
  throw new AppwriteException('Missing required parameter: "bucketId"');
31388
31395
  }
@@ -31403,6 +31410,9 @@ class Storage {
31403
31410
  if (typeof permissions !== 'undefined') {
31404
31411
  payload['permissions'] = permissions;
31405
31412
  }
31413
+ if (typeof folder !== 'undefined') {
31414
+ payload['folder'] = folder;
31415
+ }
31406
31416
  const uri = new URL(this.client.config.endpoint + apiPath);
31407
31417
  const apiHeaders = {
31408
31418
  'X-Appwrite-Project': this.client.config.project,
@@ -31963,12 +31973,14 @@ class TablesDB {
31963
31973
  databaseId: paramsOrFirst,
31964
31974
  name: rest[0],
31965
31975
  enabled: rest[1],
31966
- replicas: rest[2]
31976
+ specification: rest[2],
31977
+ replicas: rest[3]
31967
31978
  };
31968
31979
  }
31969
31980
  const databaseId = params.databaseId;
31970
31981
  const name = params.name;
31971
31982
  const enabled = params.enabled;
31983
+ const specification = params.specification;
31972
31984
  const replicas = params.replicas;
31973
31985
  if (typeof databaseId === 'undefined') {
31974
31986
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -31981,6 +31993,9 @@ class TablesDB {
31981
31993
  if (typeof enabled !== 'undefined') {
31982
31994
  payload['enabled'] = enabled;
31983
31995
  }
31996
+ if (typeof specification !== 'undefined') {
31997
+ payload['specification'] = specification;
31998
+ }
31984
31999
  if (typeof replicas !== 'undefined') {
31985
32000
  payload['replicas'] = replicas;
31986
32001
  }
@@ -38714,12 +38729,14 @@ class VectorsDB {
38714
38729
  databaseId: paramsOrFirst,
38715
38730
  name: rest[0],
38716
38731
  enabled: rest[1],
38717
- replicas: rest[2]
38732
+ specification: rest[2],
38733
+ replicas: rest[3]
38718
38734
  };
38719
38735
  }
38720
38736
  const databaseId = params.databaseId;
38721
38737
  const name = params.name;
38722
38738
  const enabled = params.enabled;
38739
+ const specification = params.specification;
38723
38740
  const replicas = params.replicas;
38724
38741
  if (typeof databaseId === 'undefined') {
38725
38742
  throw new AppwriteException('Missing required parameter: "databaseId"');
@@ -38735,6 +38752,9 @@ class VectorsDB {
38735
38752
  if (typeof enabled !== 'undefined') {
38736
38753
  payload['enabled'] = enabled;
38737
38754
  }
38755
+ if (typeof specification !== 'undefined') {
38756
+ payload['specification'] = specification;
38757
+ }
38738
38758
  if (typeof replicas !== 'undefined') {
38739
38759
  payload['replicas'] = replicas;
38740
38760
  }
@@ -39917,6 +39937,143 @@ class Waf {
39917
39937
  };
39918
39938
  return this.client.call('patch', uri, apiHeaders, payload);
39919
39939
  }
39940
+ createChallengeRule(paramsOrFirst, ...rest) {
39941
+ let params;
39942
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
39943
+ params = (paramsOrFirst || {});
39944
+ }
39945
+ else {
39946
+ params = {
39947
+ ruleId: paramsOrFirst,
39948
+ resourceType: rest[0],
39949
+ name: rest[1],
39950
+ resourceId: rest[2],
39951
+ description: rest[3],
39952
+ challengeType: rest[4],
39953
+ priority: rest[5],
39954
+ enabled: rest[6],
39955
+ conditions: rest[7]
39956
+ };
39957
+ }
39958
+ const ruleId = params.ruleId;
39959
+ const resourceType = params.resourceType;
39960
+ const name = params.name;
39961
+ const resourceId = params.resourceId;
39962
+ const description = params.description;
39963
+ const challengeType = params.challengeType;
39964
+ const priority = params.priority;
39965
+ const enabled = params.enabled;
39966
+ const conditions = params.conditions;
39967
+ if (typeof ruleId === 'undefined') {
39968
+ throw new AppwriteException('Missing required parameter: "ruleId"');
39969
+ }
39970
+ if (typeof resourceType === 'undefined') {
39971
+ throw new AppwriteException('Missing required parameter: "resourceType"');
39972
+ }
39973
+ if (typeof name === 'undefined') {
39974
+ throw new AppwriteException('Missing required parameter: "name"');
39975
+ }
39976
+ const apiPath = '/waf/rules/challenge';
39977
+ const payload = {};
39978
+ if (typeof ruleId !== 'undefined') {
39979
+ payload['ruleId'] = ruleId;
39980
+ }
39981
+ if (typeof resourceType !== 'undefined') {
39982
+ payload['resourceType'] = resourceType;
39983
+ }
39984
+ if (typeof resourceId !== 'undefined') {
39985
+ payload['resourceId'] = resourceId;
39986
+ }
39987
+ if (typeof name !== 'undefined') {
39988
+ payload['name'] = name;
39989
+ }
39990
+ if (typeof description !== 'undefined') {
39991
+ payload['description'] = description;
39992
+ }
39993
+ if (typeof challengeType !== 'undefined') {
39994
+ payload['challengeType'] = challengeType;
39995
+ }
39996
+ if (typeof priority !== 'undefined') {
39997
+ payload['priority'] = priority;
39998
+ }
39999
+ if (typeof enabled !== 'undefined') {
40000
+ payload['enabled'] = enabled;
40001
+ }
40002
+ if (typeof conditions !== 'undefined') {
40003
+ payload['conditions'] = conditions;
40004
+ }
40005
+ const uri = new URL(this.client.config.endpoint + apiPath);
40006
+ const apiHeaders = {
40007
+ 'X-Appwrite-Project': this.client.config.project,
40008
+ 'content-type': 'application/json',
40009
+ 'accept': 'application/json',
40010
+ };
40011
+ return this.client.call('post', uri, apiHeaders, payload);
40012
+ }
40013
+ updateChallengeRule(paramsOrFirst, ...rest) {
40014
+ let params;
40015
+ if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
40016
+ params = (paramsOrFirst || {});
40017
+ }
40018
+ else {
40019
+ params = {
40020
+ ruleId: paramsOrFirst,
40021
+ resourceType: rest[0],
40022
+ resourceId: rest[1],
40023
+ name: rest[2],
40024
+ description: rest[3],
40025
+ challengeType: rest[4],
40026
+ priority: rest[5],
40027
+ enabled: rest[6],
40028
+ conditions: rest[7]
40029
+ };
40030
+ }
40031
+ const ruleId = params.ruleId;
40032
+ const resourceType = params.resourceType;
40033
+ const resourceId = params.resourceId;
40034
+ const name = params.name;
40035
+ const description = params.description;
40036
+ const challengeType = params.challengeType;
40037
+ const priority = params.priority;
40038
+ const enabled = params.enabled;
40039
+ const conditions = params.conditions;
40040
+ if (typeof ruleId === 'undefined') {
40041
+ throw new AppwriteException('Missing required parameter: "ruleId"');
40042
+ }
40043
+ const apiPath = '/waf/rules/challenge/{ruleId}'.replace('{ruleId}', encodeURIComponent(String(ruleId)));
40044
+ const payload = {};
40045
+ if (typeof resourceType !== 'undefined') {
40046
+ payload['resourceType'] = resourceType;
40047
+ }
40048
+ if (typeof resourceId !== 'undefined') {
40049
+ payload['resourceId'] = resourceId;
40050
+ }
40051
+ if (typeof name !== 'undefined') {
40052
+ payload['name'] = name;
40053
+ }
40054
+ if (typeof description !== 'undefined') {
40055
+ payload['description'] = description;
40056
+ }
40057
+ if (typeof challengeType !== 'undefined') {
40058
+ payload['challengeType'] = challengeType;
40059
+ }
40060
+ if (typeof priority !== 'undefined') {
40061
+ payload['priority'] = priority;
40062
+ }
40063
+ if (typeof enabled !== 'undefined') {
40064
+ payload['enabled'] = enabled;
40065
+ }
40066
+ if (typeof conditions !== 'undefined') {
40067
+ payload['conditions'] = conditions;
40068
+ }
40069
+ const uri = new URL(this.client.config.endpoint + apiPath);
40070
+ const apiHeaders = {
40071
+ 'X-Appwrite-Project': this.client.config.project,
40072
+ 'content-type': 'application/json',
40073
+ 'accept': 'application/json',
40074
+ };
40075
+ return this.client.call('patch', uri, apiHeaders, payload);
40076
+ }
39920
40077
  createDenyRule(paramsOrFirst, ...rest) {
39921
40078
  let params;
39922
40079
  if ((paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {