@appwrite.io/console 15.1.0 → 15.2.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 +38 -40
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +38 -40
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +38 -40
- package/package.json +1 -1
- package/types/services/functions.d.ts +13 -1
- package/types/services/health.d.ts +0 -19
- package/types/services/sites.d.ts +13 -1
- package/types/services/usage.d.ts +2 -2
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.
|
|
623
|
+
'x-sdk-version': '15.2.0',
|
|
624
624
|
'X-Appwrite-Response-Format': '1.9.5',
|
|
625
625
|
};
|
|
626
626
|
this.realtime = {
|
|
@@ -672,7 +672,10 @@ class Client {
|
|
|
672
672
|
}
|
|
673
673
|
const encodedProject = encodeURIComponent((_b = this.config.project) !== null && _b !== void 0 ? _b : '');
|
|
674
674
|
// URL carries only the project; channels/queries are sent via subscribe message.
|
|
675
|
-
|
|
675
|
+
let queryParams = 'project=' + encodedProject;
|
|
676
|
+
if (this.config.jwt) {
|
|
677
|
+
queryParams += '&jwt=' + encodeURIComponent(this.config.jwt);
|
|
678
|
+
}
|
|
676
679
|
const url = this.config.endpointRealtime + '/realtime?' + queryParams;
|
|
677
680
|
if (url !== this.realtime.url || // Check if URL is present
|
|
678
681
|
!this.realtime.socket || // Check if WebSocket has not been created
|
|
@@ -14287,15 +14290,22 @@ class Functions {
|
|
|
14287
14290
|
};
|
|
14288
14291
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
14289
14292
|
}
|
|
14290
|
-
|
|
14291
|
-
|
|
14292
|
-
|
|
14293
|
-
|
|
14294
|
-
|
|
14295
|
-
|
|
14296
|
-
|
|
14293
|
+
listSpecifications(paramsOrFirst) {
|
|
14294
|
+
let params;
|
|
14295
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
14296
|
+
params = (paramsOrFirst || {});
|
|
14297
|
+
}
|
|
14298
|
+
else {
|
|
14299
|
+
params = {
|
|
14300
|
+
type: paramsOrFirst
|
|
14301
|
+
};
|
|
14302
|
+
}
|
|
14303
|
+
const type = params.type;
|
|
14297
14304
|
const apiPath = '/functions/specifications';
|
|
14298
14305
|
const payload = {};
|
|
14306
|
+
if (typeof type !== 'undefined') {
|
|
14307
|
+
payload['type'] = type;
|
|
14308
|
+
}
|
|
14299
14309
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
14300
14310
|
const apiHeaders = {
|
|
14301
14311
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -15630,29 +15640,6 @@ class Health {
|
|
|
15630
15640
|
};
|
|
15631
15641
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
15632
15642
|
}
|
|
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
15643
|
getQueueCertificates(paramsOrFirst) {
|
|
15657
15644
|
let params;
|
|
15658
15645
|
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
@@ -27130,15 +27117,22 @@ class Sites {
|
|
|
27130
27117
|
};
|
|
27131
27118
|
return this.client.call('get', uri, apiHeaders, payload);
|
|
27132
27119
|
}
|
|
27133
|
-
|
|
27134
|
-
|
|
27135
|
-
|
|
27136
|
-
|
|
27137
|
-
|
|
27138
|
-
|
|
27139
|
-
|
|
27120
|
+
listSpecifications(paramsOrFirst) {
|
|
27121
|
+
let params;
|
|
27122
|
+
if (!paramsOrFirst || (paramsOrFirst && typeof paramsOrFirst === 'object' && !Array.isArray(paramsOrFirst))) {
|
|
27123
|
+
params = (paramsOrFirst || {});
|
|
27124
|
+
}
|
|
27125
|
+
else {
|
|
27126
|
+
params = {
|
|
27127
|
+
type: paramsOrFirst
|
|
27128
|
+
};
|
|
27129
|
+
}
|
|
27130
|
+
const type = params.type;
|
|
27140
27131
|
const apiPath = '/sites/specifications';
|
|
27141
27132
|
const payload = {};
|
|
27133
|
+
if (typeof type !== 'undefined') {
|
|
27134
|
+
payload['type'] = type;
|
|
27135
|
+
}
|
|
27142
27136
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
27143
27137
|
const apiHeaders = {
|
|
27144
27138
|
'X-Appwrite-Project': this.client.config.project,
|
|
@@ -36802,7 +36796,11 @@ class Realtime {
|
|
|
36802
36796
|
throw new AppwriteException('Missing project ID');
|
|
36803
36797
|
}
|
|
36804
36798
|
// URL carries only the project; channels/queries are sent via the subscribe message.
|
|
36805
|
-
|
|
36799
|
+
let queryParams = `project=${projectId}`;
|
|
36800
|
+
const jwt = this.client.config.jwt;
|
|
36801
|
+
if (jwt) {
|
|
36802
|
+
queryParams += `&jwt=${encodeURIComponent(jwt)}`;
|
|
36803
|
+
}
|
|
36806
36804
|
const endpoint = this.client.config.endpointRealtime !== ''
|
|
36807
36805
|
? this.client.config.endpointRealtime
|
|
36808
36806
|
: this.client.config.endpoint || '';
|