@appwrite.io/console 15.0.0 → 15.1.1

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
@@ -620,7 +620,7 @@ class Client {
620
620
  'x-sdk-name': 'Console',
621
621
  'x-sdk-platform': 'console',
622
622
  'x-sdk-language': 'web',
623
- 'x-sdk-version': '15.0.0',
623
+ 'x-sdk-version': '15.1.1',
624
624
  'X-Appwrite-Response-Format': '1.9.5',
625
625
  };
626
626
  this.realtime = {
@@ -5928,7 +5928,7 @@ class Compute {
5928
5928
  if (typeof sql === 'undefined') {
5929
5929
  throw new AppwriteException('Missing required parameter: "sql"');
5930
5930
  }
5931
- const apiPath = '/compute/databases/{databaseId}/execution'.replace('{databaseId}', encodeURIComponent(String(databaseId)));
5931
+ const apiPath = '/compute/databases/{databaseId}/executions'.replace('{databaseId}', encodeURIComponent(String(databaseId)));
5932
5932
  const payload = {};
5933
5933
  if (typeof sql !== 'undefined') {
5934
5934
  payload['sql'] = sql;
@@ -14287,15 +14287,22 @@ class Functions {
14287
14287
  };
14288
14288
  return this.client.call('get', uri, apiHeaders, payload);
14289
14289
  }
14290
- /**
14291
- * List allowed function specifications for this instance.
14292
- *
14293
- * @throws {AppwriteException}
14294
- * @returns {Promise<Models.SpecificationList>}
14295
- */
14296
- listSpecifications() {
14290
+ listSpecifications(paramsOrFirst) {
14291
+ let params;
14292
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
14293
+ params = (paramsOrFirst || {});
14294
+ }
14295
+ else {
14296
+ params = {
14297
+ type: paramsOrFirst
14298
+ };
14299
+ }
14300
+ const type = params.type;
14297
14301
  const apiPath = '/functions/specifications';
14298
14302
  const payload = {};
14303
+ if (typeof type !== 'undefined') {
14304
+ payload['type'] = type;
14305
+ }
14299
14306
  const uri = new URL(this.client.config.endpoint + apiPath);
14300
14307
  const apiHeaders = {
14301
14308
  'X-Appwrite-Project': this.client.config.project,
@@ -15630,29 +15637,6 @@ class Health {
15630
15637
  };
15631
15638
  return this.client.call('get', uri, apiHeaders, payload);
15632
15639
  }
15633
- getQueuePriorityBuilds(paramsOrFirst) {
15634
- let params;
15635
- if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
15636
- params = (paramsOrFirst || {});
15637
- }
15638
- else {
15639
- params = {
15640
- threshold: paramsOrFirst
15641
- };
15642
- }
15643
- const threshold = params.threshold;
15644
- const apiPath = '/health/queue/builds-priority';
15645
- const payload = {};
15646
- if (typeof threshold !== 'undefined') {
15647
- payload['threshold'] = threshold;
15648
- }
15649
- const uri = new URL(this.client.config.endpoint + apiPath);
15650
- const apiHeaders = {
15651
- 'X-Appwrite-Project': this.client.config.project,
15652
- 'accept': 'application/json',
15653
- };
15654
- return this.client.call('get', uri, apiHeaders, payload);
15655
- }
15656
15640
  getQueueCertificates(paramsOrFirst) {
15657
15641
  let params;
15658
15642
  if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
@@ -20333,7 +20317,8 @@ class Oauth2 {
20333
20317
  codeChallengeMethod: rest[6],
20334
20318
  prompt: rest[7],
20335
20319
  maxAge: rest[8],
20336
- authorizationDetails: rest[9]
20320
+ authorizationDetails: rest[9],
20321
+ resource: rest[10]
20337
20322
  };
20338
20323
  }
20339
20324
  const clientId = params.clientId;
@@ -20347,6 +20332,7 @@ class Oauth2 {
20347
20332
  const prompt = params.prompt;
20348
20333
  const maxAge = params.maxAge;
20349
20334
  const authorizationDetails = params.authorizationDetails;
20335
+ const resource = params.resource;
20350
20336
  if (typeof clientId === 'undefined') {
20351
20337
  throw new AppwriteException('Missing required parameter: "clientId"');
20352
20338
  }
@@ -20394,6 +20380,9 @@ class Oauth2 {
20394
20380
  if (typeof authorizationDetails !== 'undefined') {
20395
20381
  payload['authorization_details'] = authorizationDetails;
20396
20382
  }
20383
+ if (typeof resource !== 'undefined') {
20384
+ payload['resource'] = resource;
20385
+ }
20397
20386
  const uri = new URL(this.client.config.endpoint + apiPath);
20398
20387
  const apiHeaders = {
20399
20388
  'accept': 'application/json',
@@ -20409,12 +20398,14 @@ class Oauth2 {
20409
20398
  params = {
20410
20399
  clientId: paramsOrFirst,
20411
20400
  scope: rest[0],
20412
- authorizationDetails: rest[1]
20401
+ authorizationDetails: rest[1],
20402
+ resource: rest[2]
20413
20403
  };
20414
20404
  }
20415
20405
  const clientId = params.clientId;
20416
20406
  const scope = params.scope;
20417
20407
  const authorizationDetails = params.authorizationDetails;
20408
+ const resource = params.resource;
20418
20409
  const apiPath = '/oauth2/{project_id}/device_authorization'.replace('{project_id}', encodeURIComponent(String(this.client.config.project)));
20419
20410
  const payload = {};
20420
20411
  if (typeof clientId !== 'undefined') {
@@ -20426,6 +20417,9 @@ class Oauth2 {
20426
20417
  if (typeof authorizationDetails !== 'undefined') {
20427
20418
  payload['authorization_details'] = authorizationDetails;
20428
20419
  }
20420
+ if (typeof resource !== 'undefined') {
20421
+ payload['resource'] = resource;
20422
+ }
20429
20423
  const uri = new URL(this.client.config.endpoint + apiPath);
20430
20424
  const apiHeaders = {
20431
20425
  'content-type': 'application/json',
@@ -20609,7 +20603,8 @@ class Oauth2 {
20609
20603
  clientId: rest[3],
20610
20604
  clientSecret: rest[4],
20611
20605
  codeVerifier: rest[5],
20612
- redirectUri: rest[6]
20606
+ redirectUri: rest[6],
20607
+ resource: rest[7]
20613
20608
  };
20614
20609
  }
20615
20610
  const grantType = params.grantType;
@@ -20620,6 +20615,7 @@ class Oauth2 {
20620
20615
  const clientSecret = params.clientSecret;
20621
20616
  const codeVerifier = params.codeVerifier;
20622
20617
  const redirectUri = params.redirectUri;
20618
+ const resource = params.resource;
20623
20619
  if (typeof grantType === 'undefined') {
20624
20620
  throw new AppwriteException('Missing required parameter: "grantType"');
20625
20621
  }
@@ -20649,6 +20645,9 @@ class Oauth2 {
20649
20645
  if (typeof redirectUri !== 'undefined') {
20650
20646
  payload['redirect_uri'] = redirectUri;
20651
20647
  }
20648
+ if (typeof resource !== 'undefined') {
20649
+ payload['resource'] = resource;
20650
+ }
20652
20651
  const uri = new URL(this.client.config.endpoint + apiPath);
20653
20652
  const apiHeaders = {
20654
20653
  'content-type': 'application/json',
@@ -27115,15 +27114,22 @@ class Sites {
27115
27114
  };
27116
27115
  return this.client.call('get', uri, apiHeaders, payload);
27117
27116
  }
27118
- /**
27119
- * List allowed site specifications for this instance.
27120
- *
27121
- * @throws {AppwriteException}
27122
- * @returns {Promise<Models.SpecificationList>}
27123
- */
27124
- listSpecifications() {
27117
+ listSpecifications(paramsOrFirst) {
27118
+ let params;
27119
+ if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
27120
+ params = (paramsOrFirst || {});
27121
+ }
27122
+ else {
27123
+ params = {
27124
+ type: paramsOrFirst
27125
+ };
27126
+ }
27127
+ const type = params.type;
27125
27128
  const apiPath = '/sites/specifications';
27126
27129
  const payload = {};
27130
+ if (typeof type !== 'undefined') {
27131
+ payload['type'] = type;
27132
+ }
27127
27133
  const uri = new URL(this.client.config.endpoint + apiPath);
27128
27134
  const apiHeaders = {
27129
27135
  'X-Appwrite-Project': this.client.config.project,
@@ -32976,7 +32982,7 @@ class Usage {
32976
32982
  }
32977
32983
  else {
32978
32984
  params = {
32979
- metric: paramsOrFirst,
32985
+ metrics: paramsOrFirst,
32980
32986
  resource: rest[0],
32981
32987
  resourceId: rest[1],
32982
32988
  interval: rest[2],
@@ -32989,7 +32995,7 @@ class Usage {
32989
32995
  offset: rest[9]
32990
32996
  };
32991
32997
  }
32992
- const metric = params.metric;
32998
+ const metrics = params.metrics;
32993
32999
  const resource = params.resource;
32994
33000
  const resourceId = params.resourceId;
32995
33001
  const interval = params.interval;
@@ -33000,13 +33006,13 @@ class Usage {
33000
33006
  const orderDir = params.orderDir;
33001
33007
  const limit = params.limit;
33002
33008
  const offset = params.offset;
33003
- if (typeof metric === 'undefined') {
33004
- throw new AppwriteException('Missing required parameter: "metric"');
33009
+ if (typeof metrics === 'undefined') {
33010
+ throw new AppwriteException('Missing required parameter: "metrics"');
33005
33011
  }
33006
33012
  const apiPath = '/usage/events';
33007
33013
  const payload = {};
33008
- if (typeof metric !== 'undefined') {
33009
- payload['metric'] = metric;
33014
+ if (typeof metrics !== 'undefined') {
33015
+ payload['metrics'] = metrics;
33010
33016
  }
33011
33017
  if (typeof resource !== 'undefined') {
33012
33018
  payload['resource'] = resource;
@@ -33052,7 +33058,7 @@ class Usage {
33052
33058
  }
33053
33059
  else {
33054
33060
  params = {
33055
- metric: paramsOrFirst,
33061
+ metrics: paramsOrFirst,
33056
33062
  resourceId: rest[0],
33057
33063
  teamId: rest[1],
33058
33064
  interval: rest[2],
@@ -33065,7 +33071,7 @@ class Usage {
33065
33071
  offset: rest[9]
33066
33072
  };
33067
33073
  }
33068
- const metric = params.metric;
33074
+ const metrics = params.metrics;
33069
33075
  const resourceId = params.resourceId;
33070
33076
  const teamId = params.teamId;
33071
33077
  const interval = params.interval;
@@ -33076,13 +33082,13 @@ class Usage {
33076
33082
  const orderDir = params.orderDir;
33077
33083
  const limit = params.limit;
33078
33084
  const offset = params.offset;
33079
- if (typeof metric === 'undefined') {
33080
- throw new AppwriteException('Missing required parameter: "metric"');
33085
+ if (typeof metrics === 'undefined') {
33086
+ throw new AppwriteException('Missing required parameter: "metrics"');
33081
33087
  }
33082
33088
  const apiPath = '/usage/gauges';
33083
33089
  const payload = {};
33084
- if (typeof metric !== 'undefined') {
33085
- payload['metric'] = metric;
33090
+ if (typeof metrics !== 'undefined') {
33091
+ payload['metrics'] = metrics;
33086
33092
  }
33087
33093
  if (typeof resourceId !== 'undefined') {
33088
33094
  payload['resourceId'] = resourceId;