@appwrite.io/console 2.0.0 → 2.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/CHANGELOG.md +4 -0
- package/README.md +1 -1
- package/dist/cjs/sdk.js +28 -1
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +28 -1
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +28 -1
- package/docs/examples/account/update-payment-method.md +1 -1
- package/package.json +1 -1
- package/src/client.ts +32 -3
- package/types/client.d.ts +20 -1
package/dist/esm/sdk.js
CHANGED
|
@@ -461,11 +461,13 @@ class Client {
|
|
|
461
461
|
this.config = {
|
|
462
462
|
endpoint: 'https://cloud.appwrite.io/v1',
|
|
463
463
|
endpointRealtime: '',
|
|
464
|
+
selfSigned: false,
|
|
464
465
|
project: '',
|
|
465
466
|
key: '',
|
|
466
467
|
jwt: '',
|
|
467
468
|
locale: '',
|
|
468
469
|
mode: '',
|
|
470
|
+
cookie: '',
|
|
469
471
|
platform: '',
|
|
470
472
|
};
|
|
471
473
|
/**
|
|
@@ -475,7 +477,7 @@ class Client {
|
|
|
475
477
|
'x-sdk-name': 'Console',
|
|
476
478
|
'x-sdk-platform': 'console',
|
|
477
479
|
'x-sdk-language': 'web',
|
|
478
|
-
'x-sdk-version': '2.
|
|
480
|
+
'x-sdk-version': '2.1.0',
|
|
479
481
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
480
482
|
};
|
|
481
483
|
this.realtime = {
|
|
@@ -666,6 +668,17 @@ class Client {
|
|
|
666
668
|
this.config.endpointRealtime = endpointRealtime;
|
|
667
669
|
return this;
|
|
668
670
|
}
|
|
671
|
+
/**
|
|
672
|
+
* Set self-signed
|
|
673
|
+
*
|
|
674
|
+
* @param {boolean} selfSigned
|
|
675
|
+
*
|
|
676
|
+
* @returns {this}
|
|
677
|
+
*/
|
|
678
|
+
setSelfSigned(selfSigned) {
|
|
679
|
+
this.config.selfSigned = selfSigned;
|
|
680
|
+
return this;
|
|
681
|
+
}
|
|
669
682
|
/**
|
|
670
683
|
* Set Project
|
|
671
684
|
*
|
|
@@ -732,6 +745,20 @@ class Client {
|
|
|
732
745
|
this.config.mode = value;
|
|
733
746
|
return this;
|
|
734
747
|
}
|
|
748
|
+
/**
|
|
749
|
+
* Set Cookie
|
|
750
|
+
*
|
|
751
|
+
* The user cookie to authenticate with
|
|
752
|
+
*
|
|
753
|
+
* @param value string
|
|
754
|
+
*
|
|
755
|
+
* @return {this}
|
|
756
|
+
*/
|
|
757
|
+
setCookie(value) {
|
|
758
|
+
this.headers['Cookie'] = value;
|
|
759
|
+
this.config.cookie = value;
|
|
760
|
+
return this;
|
|
761
|
+
}
|
|
735
762
|
/**
|
|
736
763
|
* Set Platform
|
|
737
764
|
*
|