@appwrite.io/console 15.0.0 → 15.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/README.md +1 -1
- package/dist/cjs/sdk.js +32 -17
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +32 -17
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +32 -17
- 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/oauth-2.d.ts +12 -3
- 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.0"></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.0',
|
|
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;
|
|
@@ -20335,7 +20335,8 @@ class Oauth2 {
|
|
|
20335
20335
|
codeChallengeMethod: rest[6],
|
|
20336
20336
|
prompt: rest[7],
|
|
20337
20337
|
maxAge: rest[8],
|
|
20338
|
-
authorizationDetails: rest[9]
|
|
20338
|
+
authorizationDetails: rest[9],
|
|
20339
|
+
resource: rest[10]
|
|
20339
20340
|
};
|
|
20340
20341
|
}
|
|
20341
20342
|
const clientId = params.clientId;
|
|
@@ -20349,6 +20350,7 @@ class Oauth2 {
|
|
|
20349
20350
|
const prompt = params.prompt;
|
|
20350
20351
|
const maxAge = params.maxAge;
|
|
20351
20352
|
const authorizationDetails = params.authorizationDetails;
|
|
20353
|
+
const resource = params.resource;
|
|
20352
20354
|
if (typeof clientId === 'undefined') {
|
|
20353
20355
|
throw new AppwriteException('Missing required parameter: "clientId"');
|
|
20354
20356
|
}
|
|
@@ -20396,6 +20398,9 @@ class Oauth2 {
|
|
|
20396
20398
|
if (typeof authorizationDetails !== 'undefined') {
|
|
20397
20399
|
payload['authorization_details'] = authorizationDetails;
|
|
20398
20400
|
}
|
|
20401
|
+
if (typeof resource !== 'undefined') {
|
|
20402
|
+
payload['resource'] = resource;
|
|
20403
|
+
}
|
|
20399
20404
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20400
20405
|
const apiHeaders = {
|
|
20401
20406
|
'accept': 'application/json',
|
|
@@ -20411,12 +20416,14 @@ class Oauth2 {
|
|
|
20411
20416
|
params = {
|
|
20412
20417
|
clientId: paramsOrFirst,
|
|
20413
20418
|
scope: rest[0],
|
|
20414
|
-
authorizationDetails: rest[1]
|
|
20419
|
+
authorizationDetails: rest[1],
|
|
20420
|
+
resource: rest[2]
|
|
20415
20421
|
};
|
|
20416
20422
|
}
|
|
20417
20423
|
const clientId = params.clientId;
|
|
20418
20424
|
const scope = params.scope;
|
|
20419
20425
|
const authorizationDetails = params.authorizationDetails;
|
|
20426
|
+
const resource = params.resource;
|
|
20420
20427
|
const apiPath = '/oauth2/{project_id}/device_authorization'.replace('{project_id}', encodeURIComponent(String(this.client.config.project)));
|
|
20421
20428
|
const payload = {};
|
|
20422
20429
|
if (typeof clientId !== 'undefined') {
|
|
@@ -20428,6 +20435,9 @@ class Oauth2 {
|
|
|
20428
20435
|
if (typeof authorizationDetails !== 'undefined') {
|
|
20429
20436
|
payload['authorization_details'] = authorizationDetails;
|
|
20430
20437
|
}
|
|
20438
|
+
if (typeof resource !== 'undefined') {
|
|
20439
|
+
payload['resource'] = resource;
|
|
20440
|
+
}
|
|
20431
20441
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20432
20442
|
const apiHeaders = {
|
|
20433
20443
|
'content-type': 'application/json',
|
|
@@ -20611,7 +20621,8 @@ class Oauth2 {
|
|
|
20611
20621
|
clientId: rest[3],
|
|
20612
20622
|
clientSecret: rest[4],
|
|
20613
20623
|
codeVerifier: rest[5],
|
|
20614
|
-
redirectUri: rest[6]
|
|
20624
|
+
redirectUri: rest[6],
|
|
20625
|
+
resource: rest[7]
|
|
20615
20626
|
};
|
|
20616
20627
|
}
|
|
20617
20628
|
const grantType = params.grantType;
|
|
@@ -20622,6 +20633,7 @@ class Oauth2 {
|
|
|
20622
20633
|
const clientSecret = params.clientSecret;
|
|
20623
20634
|
const codeVerifier = params.codeVerifier;
|
|
20624
20635
|
const redirectUri = params.redirectUri;
|
|
20636
|
+
const resource = params.resource;
|
|
20625
20637
|
if (typeof grantType === 'undefined') {
|
|
20626
20638
|
throw new AppwriteException('Missing required parameter: "grantType"');
|
|
20627
20639
|
}
|
|
@@ -20651,6 +20663,9 @@ class Oauth2 {
|
|
|
20651
20663
|
if (typeof redirectUri !== 'undefined') {
|
|
20652
20664
|
payload['redirect_uri'] = redirectUri;
|
|
20653
20665
|
}
|
|
20666
|
+
if (typeof resource !== 'undefined') {
|
|
20667
|
+
payload['resource'] = resource;
|
|
20668
|
+
}
|
|
20654
20669
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
20655
20670
|
const apiHeaders = {
|
|
20656
20671
|
'content-type': 'application/json',
|
|
@@ -32978,7 +32993,7 @@ class Usage {
|
|
|
32978
32993
|
}
|
|
32979
32994
|
else {
|
|
32980
32995
|
params = {
|
|
32981
|
-
|
|
32996
|
+
metrics: paramsOrFirst,
|
|
32982
32997
|
resource: rest[0],
|
|
32983
32998
|
resourceId: rest[1],
|
|
32984
32999
|
interval: rest[2],
|
|
@@ -32991,7 +33006,7 @@ class Usage {
|
|
|
32991
33006
|
offset: rest[9]
|
|
32992
33007
|
};
|
|
32993
33008
|
}
|
|
32994
|
-
const
|
|
33009
|
+
const metrics = params.metrics;
|
|
32995
33010
|
const resource = params.resource;
|
|
32996
33011
|
const resourceId = params.resourceId;
|
|
32997
33012
|
const interval = params.interval;
|
|
@@ -33002,13 +33017,13 @@ class Usage {
|
|
|
33002
33017
|
const orderDir = params.orderDir;
|
|
33003
33018
|
const limit = params.limit;
|
|
33004
33019
|
const offset = params.offset;
|
|
33005
|
-
if (typeof
|
|
33006
|
-
throw new AppwriteException('Missing required parameter: "
|
|
33020
|
+
if (typeof metrics === 'undefined') {
|
|
33021
|
+
throw new AppwriteException('Missing required parameter: "metrics"');
|
|
33007
33022
|
}
|
|
33008
33023
|
const apiPath = '/usage/events';
|
|
33009
33024
|
const payload = {};
|
|
33010
|
-
if (typeof
|
|
33011
|
-
payload['
|
|
33025
|
+
if (typeof metrics !== 'undefined') {
|
|
33026
|
+
payload['metrics'] = metrics;
|
|
33012
33027
|
}
|
|
33013
33028
|
if (typeof resource !== 'undefined') {
|
|
33014
33029
|
payload['resource'] = resource;
|
|
@@ -33054,7 +33069,7 @@ class Usage {
|
|
|
33054
33069
|
}
|
|
33055
33070
|
else {
|
|
33056
33071
|
params = {
|
|
33057
|
-
|
|
33072
|
+
metrics: paramsOrFirst,
|
|
33058
33073
|
resourceId: rest[0],
|
|
33059
33074
|
teamId: rest[1],
|
|
33060
33075
|
interval: rest[2],
|
|
@@ -33067,7 +33082,7 @@ class Usage {
|
|
|
33067
33082
|
offset: rest[9]
|
|
33068
33083
|
};
|
|
33069
33084
|
}
|
|
33070
|
-
const
|
|
33085
|
+
const metrics = params.metrics;
|
|
33071
33086
|
const resourceId = params.resourceId;
|
|
33072
33087
|
const teamId = params.teamId;
|
|
33073
33088
|
const interval = params.interval;
|
|
@@ -33078,13 +33093,13 @@ class Usage {
|
|
|
33078
33093
|
const orderDir = params.orderDir;
|
|
33079
33094
|
const limit = params.limit;
|
|
33080
33095
|
const offset = params.offset;
|
|
33081
|
-
if (typeof
|
|
33082
|
-
throw new AppwriteException('Missing required parameter: "
|
|
33096
|
+
if (typeof metrics === 'undefined') {
|
|
33097
|
+
throw new AppwriteException('Missing required parameter: "metrics"');
|
|
33083
33098
|
}
|
|
33084
33099
|
const apiPath = '/usage/gauges';
|
|
33085
33100
|
const payload = {};
|
|
33086
|
-
if (typeof
|
|
33087
|
-
payload['
|
|
33101
|
+
if (typeof metrics !== 'undefined') {
|
|
33102
|
+
payload['metrics'] = metrics;
|
|
33088
33103
|
}
|
|
33089
33104
|
if (typeof resourceId !== 'undefined') {
|
|
33090
33105
|
payload['resourceId'] = resourceId;
|