@appwrite.io/console 0.6.0-rc.2 → 0.6.0-rc.4

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 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@0.6.0-rc.2"></script>
36
+ <script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@0.6.0-rc.4"></script>
37
37
  ```
38
38
 
39
39
 
package/dist/cjs/sdk.js CHANGED
@@ -104,7 +104,7 @@ class Client {
104
104
  'x-sdk-name': 'Console',
105
105
  'x-sdk-platform': 'console',
106
106
  'x-sdk-language': 'web',
107
- 'x-sdk-version': '0.6.0-rc.2',
107
+ 'x-sdk-version': '0.6.0-rc.4',
108
108
  'X-Appwrite-Response-Format': '1.4.0',
109
109
  };
110
110
  this.realtime = {
@@ -782,6 +782,34 @@ class Account extends Service {
782
782
  }, payload);
783
783
  });
784
784
  }
785
+ /**
786
+ * Delete Authenticator
787
+ *
788
+ *
789
+ * @param {string} provider
790
+ * @param {string} otp
791
+ * @throws {AppwriteException}
792
+ * @returns {Promise}
793
+ */
794
+ deleteAuthenticator(provider, otp) {
795
+ return __awaiter(this, void 0, void 0, function* () {
796
+ if (typeof provider === 'undefined') {
797
+ throw new AppwriteException('Missing required parameter: "provider"');
798
+ }
799
+ if (typeof otp === 'undefined') {
800
+ throw new AppwriteException('Missing required parameter: "otp"');
801
+ }
802
+ const apiPath = '/account/mfa/{provider}'.replace('{provider}', provider);
803
+ const payload = {};
804
+ if (typeof otp !== 'undefined') {
805
+ payload['otp'] = otp;
806
+ }
807
+ const uri = new URL(this.client.config.endpoint + apiPath);
808
+ return yield this.client.call('delete', uri, {
809
+ 'content-type': 'application/json',
810
+ }, payload);
811
+ });
812
+ }
785
813
  /**
786
814
  * Update name
787
815
  *