@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/CHANGELOG.md
CHANGED
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@2.
|
|
36
|
+
<script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@2.1.0"></script>
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
|
package/dist/cjs/sdk.js
CHANGED
|
@@ -463,11 +463,13 @@ class Client {
|
|
|
463
463
|
this.config = {
|
|
464
464
|
endpoint: 'https://cloud.appwrite.io/v1',
|
|
465
465
|
endpointRealtime: '',
|
|
466
|
+
selfSigned: false,
|
|
466
467
|
project: '',
|
|
467
468
|
key: '',
|
|
468
469
|
jwt: '',
|
|
469
470
|
locale: '',
|
|
470
471
|
mode: '',
|
|
472
|
+
cookie: '',
|
|
471
473
|
platform: '',
|
|
472
474
|
};
|
|
473
475
|
/**
|
|
@@ -477,7 +479,7 @@ class Client {
|
|
|
477
479
|
'x-sdk-name': 'Console',
|
|
478
480
|
'x-sdk-platform': 'console',
|
|
479
481
|
'x-sdk-language': 'web',
|
|
480
|
-
'x-sdk-version': '2.
|
|
482
|
+
'x-sdk-version': '2.1.0',
|
|
481
483
|
'X-Appwrite-Response-Format': '1.8.0',
|
|
482
484
|
};
|
|
483
485
|
this.realtime = {
|
|
@@ -668,6 +670,17 @@ class Client {
|
|
|
668
670
|
this.config.endpointRealtime = endpointRealtime;
|
|
669
671
|
return this;
|
|
670
672
|
}
|
|
673
|
+
/**
|
|
674
|
+
* Set self-signed
|
|
675
|
+
*
|
|
676
|
+
* @param {boolean} selfSigned
|
|
677
|
+
*
|
|
678
|
+
* @returns {this}
|
|
679
|
+
*/
|
|
680
|
+
setSelfSigned(selfSigned) {
|
|
681
|
+
this.config.selfSigned = selfSigned;
|
|
682
|
+
return this;
|
|
683
|
+
}
|
|
671
684
|
/**
|
|
672
685
|
* Set Project
|
|
673
686
|
*
|
|
@@ -734,6 +747,20 @@ class Client {
|
|
|
734
747
|
this.config.mode = value;
|
|
735
748
|
return this;
|
|
736
749
|
}
|
|
750
|
+
/**
|
|
751
|
+
* Set Cookie
|
|
752
|
+
*
|
|
753
|
+
* The user cookie to authenticate with
|
|
754
|
+
*
|
|
755
|
+
* @param value string
|
|
756
|
+
*
|
|
757
|
+
* @return {this}
|
|
758
|
+
*/
|
|
759
|
+
setCookie(value) {
|
|
760
|
+
this.headers['Cookie'] = value;
|
|
761
|
+
this.config.cookie = value;
|
|
762
|
+
return this;
|
|
763
|
+
}
|
|
737
764
|
/**
|
|
738
765
|
* Set Platform
|
|
739
766
|
*
|