@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/README.md +1 -1
- package/dist/cjs/sdk.js +60 -54
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +60 -54
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +60 -54
- package/package.json +1 -1
- package/types/models.d.ts +44 -31
- package/types/services/compute.d.ts +2 -2
- package/types/services/databases.d.ts +14 -0
- package/types/services/functions.d.ts +13 -1
- package/types/services/health.d.ts +0 -19
- package/types/services/oauth-2.d.ts +12 -3
- package/types/services/sites.d.ts +13 -1
- package/types/services/usage.d.ts +22 -22
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ import { Client, Account } from "@appwrite.io/console";
|
|
|
33
33
|
To install with a CDN (content delivery network) add the following scripts to the bottom of your <body> tag, but before you use any Appwrite services:
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
|
-
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@15.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@15.1.1"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
|
package/dist/cjs/sdk.js
CHANGED
|
@@ -622,7 +622,7 @@ class Client {
|
|
|
622
622
|
'x-sdk-name': 'Console',
|
|
623
623
|
'x-sdk-platform': 'console',
|
|
624
624
|
'x-sdk-language': 'web',
|
|
625
|
-
'x-sdk-version': '15.
|
|
625
|
+
'x-sdk-version': '15.1.1',
|
|
626
626
|
'X-Appwrite-Response-Format': '1.9.5',
|
|
627
627
|
};
|
|
628
628
|
this.realtime = {
|
|
@@ -5930,7 +5930,7 @@ class Compute {
|
|
|
5930
5930
|
if (typeof sql === 'undefined') {
|
|
5931
5931
|
throw new AppwriteException('Missing required parameter: "sql"');
|
|
5932
5932
|
}
|
|
5933
|
-
const apiPath = '/compute/databases/{databaseId}/
|
|
5933
|
+
const apiPath = '/compute/databases/{databaseId}/executions'.replace('{databaseId}', encodeURIComponent(String(databaseId)));
|
|
5934
5934
|
const payload = {};
|
|
5935
5935
|
if (typeof sql !== 'undefined') {
|
|
5936
5936
|
payload['sql'] = sql;
|
|
@@ -14289,15 +14289,22 @@ class Functions {
|
|
|
14289
14289
|
};
|
|
14290
14290
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
14291
14291
|
}
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14297
|
-
|
|
14298
|
-
|
|
14292
|
+
listSpecifications(paramsOrFirst) {
|
|
14293
|
+
let params;
|
|
14294
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14295
|
+
params = (paramsOrFirst || {});
|
|
14296
|
+
}
|
|
14297
|
+
else {
|
|
14298
|
+
params = {
|
|
14299
|
+
type: paramsOrFirst
|
|
14300
|
+
};
|
|
14301
|
+
}
|
|
14302
|
+
const type = params.type;
|
|
14299
14303
|
const apiPath = '/functions/specifications';
|
|
14300
14304
|
const payload = {};
|
|
14305
|
+
if (typeof type !== 'undefined') {
|
|
14306
|
+
payload['type'] = type;
|
|
14307
|
+
}
|
|
14301
14308
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14302
14309
|
const apiHeaders = {
|
|
14303
14310
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -15632,29 +15639,6 @@ class Health {
|
|
|
15632
15639
|
};
|
|
15633
15640
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
15634
15641
|
}
|
|
15635
|
-
getQueuePriorityBuilds(paramsOrFirst) {
|
|
15636
|
-
let params;
|
|
15637
|
-
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
15638
|
-
params = (paramsOrFirst || {});
|
|
15639
|
-
}
|
|
15640
|
-
else {
|
|
15641
|
-
params = {
|
|
15642
|
-
threshold: paramsOrFirst
|
|
15643
|
-
};
|
|
15644
|
-
}
|
|
15645
|
-
const threshold = params.threshold;
|
|
15646
|
-
const apiPath = '/health/queue/builds-priority';
|
|
15647
|
-
const payload = {};
|
|
15648
|
-
if (typeof threshold !== 'undefined') {
|
|
15649
|
-
payload['threshold'] = threshold;
|
|
15650
|
-
}
|
|
15651
|
-
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
15652
|
-
const apiHeaders = {
|
|
15653
|
-
'X-Appwrite-Project': this.client.config.project,
|
|
15654
|
-
'accept': 'application/json',
|
|
15655
|
-
};
|
|
15656
|
-
return this.client.call('get', uri, apiHeaders, payload);
|
|
15657
|
-
}
|
|
15658
15642
|
getQueueCertificates(paramsOrFirst) {
|
|
15659
15643
|
let params;
|
|
15660
15644
|
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -20335,7 +20319,8 @@ class Oauth2 {
|
|
|
20335
20319
|
codeChallengeMethod: rest[6],
|
|
20336
20320
|
prompt: rest[7],
|
|
20337
20321
|
maxAge: rest[8],
|
|
20338
|
-
authorizationDetails: rest[9]
|
|
20322
|
+
authorizationDetails: rest[9],
|
|
20323
|
+
resource: rest[10]
|
|
20339
20324
|
};
|
|
20340
20325
|
}
|
|
20341
20326
|
const clientId = params.clientId;
|
|
@@ -20349,6 +20334,7 @@ class Oauth2 {
|
|
|
20349
20334
|
const prompt = params.prompt;
|
|
20350
20335
|
const maxAge = params.maxAge;
|
|
20351
20336
|
const authorizationDetails = params.authorizationDetails;
|
|
20337
|
+
const resource = params.resource;
|
|
20352
20338
|
if (typeof clientId === 'undefined') {
|
|
20353
20339
|
throw new AppwriteException('Missing required parameter: "clientId"');
|
|
20354
20340
|
}
|
|
@@ -20396,6 +20382,9 @@ class Oauth2 {
|
|
|
20396
20382
|
if (typeof authorizationDetails !== 'undefined') {
|
|
20397
20383
|
payload['authorization_details'] = authorizationDetails;
|
|
20398
20384
|
}
|
|
20385
|
+
if (typeof resource !== 'undefined') {
|
|
20386
|
+
payload['resource'] = resource;
|
|
20387
|
+
}
|
|
20399
20388
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20400
20389
|
const apiHeaders = {
|
|
20401
20390
|
'accept': 'application/json',
|
|
@@ -20411,12 +20400,14 @@ class Oauth2 {
|
|
|
20411
20400
|
params = {
|
|
20412
20401
|
clientId: paramsOrFirst,
|
|
20413
20402
|
scope: rest[0],
|
|
20414
|
-
authorizationDetails: rest[1]
|
|
20403
|
+
authorizationDetails: rest[1],
|
|
20404
|
+
resource: rest[2]
|
|
20415
20405
|
};
|
|
20416
20406
|
}
|
|
20417
20407
|
const clientId = params.clientId;
|
|
20418
20408
|
const scope = params.scope;
|
|
20419
20409
|
const authorizationDetails = params.authorizationDetails;
|
|
20410
|
+
const resource = params.resource;
|
|
20420
20411
|
const apiPath = '/oauth2/{project_id}/device_authorization'.replace('{project_id}', encodeURIComponent(String(this.client.config.project)));
|
|
20421
20412
|
const payload = {};
|
|
20422
20413
|
if (typeof clientId !== 'undefined') {
|
|
@@ -20428,6 +20419,9 @@ class Oauth2 {
|
|
|
20428
20419
|
if (typeof authorizationDetails !== 'undefined') {
|
|
20429
20420
|
payload['authorization_details'] = authorizationDetails;
|
|
20430
20421
|
}
|
|
20422
|
+
if (typeof resource !== 'undefined') {
|
|
20423
|
+
payload['resource'] = resource;
|
|
20424
|
+
}
|
|
20431
20425
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20432
20426
|
const apiHeaders = {
|
|
20433
20427
|
'content-type': 'application/json',
|
|
@@ -20611,7 +20605,8 @@ class Oauth2 {
|
|
|
20611
20605
|
clientId: rest[3],
|
|
20612
20606
|
clientSecret: rest[4],
|
|
20613
20607
|
codeVerifier: rest[5],
|
|
20614
|
-
redirectUri: rest[6]
|
|
20608
|
+
redirectUri: rest[6],
|
|
20609
|
+
resource: rest[7]
|
|
20615
20610
|
};
|
|
20616
20611
|
}
|
|
20617
20612
|
const grantType = params.grantType;
|
|
@@ -20622,6 +20617,7 @@ class Oauth2 {
|
|
|
20622
20617
|
const clientSecret = params.clientSecret;
|
|
20623
20618
|
const codeVerifier = params.codeVerifier;
|
|
20624
20619
|
const redirectUri = params.redirectUri;
|
|
20620
|
+
const resource = params.resource;
|
|
20625
20621
|
if (typeof grantType === 'undefined') {
|
|
20626
20622
|
throw new AppwriteException('Missing required parameter: "grantType"');
|
|
20627
20623
|
}
|
|
@@ -20651,6 +20647,9 @@ class Oauth2 {
|
|
|
20651
20647
|
if (typeof redirectUri !== 'undefined') {
|
|
20652
20648
|
payload['redirect_uri'] = redirectUri;
|
|
20653
20649
|
}
|
|
20650
|
+
if (typeof resource !== 'undefined') {
|
|
20651
|
+
payload['resource'] = resource;
|
|
20652
|
+
}
|
|
20654
20653
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20655
20654
|
const apiHeaders = {
|
|
20656
20655
|
'content-type': 'application/json',
|
|
@@ -27117,15 +27116,22 @@ class Sites {
|
|
|
27117
27116
|
};
|
|
27118
27117
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
27119
27118
|
}
|
|
27120
|
-
|
|
27121
|
-
|
|
27122
|
-
|
|
27123
|
-
|
|
27124
|
-
|
|
27125
|
-
|
|
27126
|
-
|
|
27119
|
+
listSpecifications(paramsOrFirst) {
|
|
27120
|
+
let params;
|
|
27121
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
27122
|
+
params = (paramsOrFirst || {});
|
|
27123
|
+
}
|
|
27124
|
+
else {
|
|
27125
|
+
params = {
|
|
27126
|
+
type: paramsOrFirst
|
|
27127
|
+
};
|
|
27128
|
+
}
|
|
27129
|
+
const type = params.type;
|
|
27127
27130
|
const apiPath = '/sites/specifications';
|
|
27128
27131
|
const payload = {};
|
|
27132
|
+
if (typeof type !== 'undefined') {
|
|
27133
|
+
payload['type'] = type;
|
|
27134
|
+
}
|
|
27129
27135
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
27130
27136
|
const apiHeaders = {
|
|
27131
27137
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -32978,7 +32984,7 @@ class Usage {
|
|
|
32978
32984
|
}
|
|
32979
32985
|
else {
|
|
32980
32986
|
params = {
|
|
32981
|
-
|
|
32987
|
+
metrics: paramsOrFirst,
|
|
32982
32988
|
resource: rest[0],
|
|
32983
32989
|
resourceId: rest[1],
|
|
32984
32990
|
interval: rest[2],
|
|
@@ -32991,7 +32997,7 @@ class Usage {
|
|
|
32991
32997
|
offset: rest[9]
|
|
32992
32998
|
};
|
|
32993
32999
|
}
|
|
32994
|
-
const
|
|
33000
|
+
const metrics = params.metrics;
|
|
32995
33001
|
const resource = params.resource;
|
|
32996
33002
|
const resourceId = params.resourceId;
|
|
32997
33003
|
const interval = params.interval;
|
|
@@ -33002,13 +33008,13 @@ class Usage {
|
|
|
33002
33008
|
const orderDir = params.orderDir;
|
|
33003
33009
|
const limit = params.limit;
|
|
33004
33010
|
const offset = params.offset;
|
|
33005
|
-
if (typeof
|
|
33006
|
-
throw new AppwriteException('Missing required parameter: "
|
|
33011
|
+
if (typeof metrics === 'undefined') {
|
|
33012
|
+
throw new AppwriteException('Missing required parameter: "metrics"');
|
|
33007
33013
|
}
|
|
33008
33014
|
const apiPath = '/usage/events';
|
|
33009
33015
|
const payload = {};
|
|
33010
|
-
if (typeof
|
|
33011
|
-
payload['
|
|
33016
|
+
if (typeof metrics !== 'undefined') {
|
|
33017
|
+
payload['metrics'] = metrics;
|
|
33012
33018
|
}
|
|
33013
33019
|
if (typeof resource !== 'undefined') {
|
|
33014
33020
|
payload['resource'] = resource;
|
|
@@ -33054,7 +33060,7 @@ class Usage {
|
|
|
33054
33060
|
}
|
|
33055
33061
|
else {
|
|
33056
33062
|
params = {
|
|
33057
|
-
|
|
33063
|
+
metrics: paramsOrFirst,
|
|
33058
33064
|
resourceId: rest[0],
|
|
33059
33065
|
teamId: rest[1],
|
|
33060
33066
|
interval: rest[2],
|
|
@@ -33067,7 +33073,7 @@ class Usage {
|
|
|
33067
33073
|
offset: rest[9]
|
|
33068
33074
|
};
|
|
33069
33075
|
}
|
|
33070
|
-
const
|
|
33076
|
+
const metrics = params.metrics;
|
|
33071
33077
|
const resourceId = params.resourceId;
|
|
33072
33078
|
const teamId = params.teamId;
|
|
33073
33079
|
const interval = params.interval;
|
|
@@ -33078,13 +33084,13 @@ class Usage {
|
|
|
33078
33084
|
const orderDir = params.orderDir;
|
|
33079
33085
|
const limit = params.limit;
|
|
33080
33086
|
const offset = params.offset;
|
|
33081
|
-
if (typeof
|
|
33082
|
-
throw new AppwriteException('Missing required parameter: "
|
|
33087
|
+
if (typeof metrics === 'undefined') {
|
|
33088
|
+
throw new AppwriteException('Missing required parameter: "metrics"');
|
|
33083
33089
|
}
|
|
33084
33090
|
const apiPath = '/usage/gauges';
|
|
33085
33091
|
const payload = {};
|
|
33086
|
-
if (typeof
|
|
33087
|
-
payload['
|
|
33092
|
+
if (typeof metrics !== 'undefined') {
|
|
33093
|
+
payload['metrics'] = metrics;
|
|
33088
33094
|
}
|
|
33089
33095
|
if (typeof resourceId !== 'undefined') {
|
|
33090
33096
|
payload['resourceId'] = resourceId;
|