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