@appwrite.io/console 0.6.0-rc.5 → 0.6.0-rc.7

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.5"></script>
36
+ <script src="https://cdn.jsdelivr.net/npm/@appwrite.io/console@0.6.0-rc.7"></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.5',
107
+ 'x-sdk-version': '0.6.0-rc.7',
108
108
  'X-Appwrite-Response-Format': '1.4.0',
109
109
  };
110
110
  this.realtime = {
@@ -11071,6 +11071,66 @@ class Users extends Service {
11071
11071
  }, payload);
11072
11072
  });
11073
11073
  }
11074
+ /**
11075
+ * Update MFA
11076
+ *
11077
+ *
11078
+ * @param {string} userId
11079
+ * @param {boolean} mfa
11080
+ * @throws {AppwriteException}
11081
+ * @returns {Promise}
11082
+ */
11083
+ updateMfa(userId, mfa) {
11084
+ return __awaiter(this, void 0, void 0, function* () {
11085
+ if (typeof userId === 'undefined') {
11086
+ throw new AppwriteException('Missing required parameter: "userId"');
11087
+ }
11088
+ if (typeof mfa === 'undefined') {
11089
+ throw new AppwriteException('Missing required parameter: "mfa"');
11090
+ }
11091
+ const apiPath = '/users/{userId}/mfa'.replace('{userId}', userId);
11092
+ const payload = {};
11093
+ if (typeof mfa !== 'undefined') {
11094
+ payload['mfa'] = mfa;
11095
+ }
11096
+ const uri = new URL(this.client.config.endpoint + apiPath);
11097
+ return yield this.client.call('patch', uri, {
11098
+ 'content-type': 'application/json',
11099
+ }, payload);
11100
+ });
11101
+ }
11102
+ /**
11103
+ * Delete Authenticator
11104
+ *
11105
+ *
11106
+ * @param {string} userId
11107
+ * @param {string} provider
11108
+ * @param {string} otp
11109
+ * @throws {AppwriteException}
11110
+ * @returns {Promise}
11111
+ */
11112
+ deleteAuthenticator(userId, provider, otp) {
11113
+ return __awaiter(this, void 0, void 0, function* () {
11114
+ if (typeof userId === 'undefined') {
11115
+ throw new AppwriteException('Missing required parameter: "userId"');
11116
+ }
11117
+ if (typeof provider === 'undefined') {
11118
+ throw new AppwriteException('Missing required parameter: "provider"');
11119
+ }
11120
+ if (typeof otp === 'undefined') {
11121
+ throw new AppwriteException('Missing required parameter: "otp"');
11122
+ }
11123
+ const apiPath = '/users/{userId}/mfa/{provider}'.replace('{userId}', userId).replace('{provider}', provider);
11124
+ const payload = {};
11125
+ if (typeof otp !== 'undefined') {
11126
+ payload['otp'] = otp;
11127
+ }
11128
+ const uri = new URL(this.client.config.endpoint + apiPath);
11129
+ return yield this.client.call('delete', uri, {
11130
+ 'content-type': 'application/json',
11131
+ }, payload);
11132
+ });
11133
+ }
11074
11134
  /**
11075
11135
  * Update name
11076
11136
  *
@@ -11211,6 +11271,27 @@ class Users extends Service {
11211
11271
  }, payload);
11212
11272
  });
11213
11273
  }
11274
+ /**
11275
+ * List Providers
11276
+ *
11277
+ *
11278
+ * @param {string} userId
11279
+ * @throws {AppwriteException}
11280
+ * @returns {Promise}
11281
+ */
11282
+ listProviders(userId) {
11283
+ return __awaiter(this, void 0, void 0, function* () {
11284
+ if (typeof userId === 'undefined') {
11285
+ throw new AppwriteException('Missing required parameter: "userId"');
11286
+ }
11287
+ const apiPath = '/users/{userId}/providers'.replace('{userId}', userId);
11288
+ const payload = {};
11289
+ const uri = new URL(this.client.config.endpoint + apiPath);
11290
+ return yield this.client.call('get', uri, {
11291
+ 'content-type': 'application/json',
11292
+ }, payload);
11293
+ });
11294
+ }
11214
11295
  /**
11215
11296
  * List user sessions
11216
11297
  *