@appwrite.io/console 0.4.2 → 0.5.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/.github/workflows/publish.yml +2 -2
- package/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/cjs/sdk.js +19 -1
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +19 -1
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +19 -1
- package/docs/examples/account/delete.md +18 -0
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/models.ts +65 -0
- package/src/services/account.ts +18 -0
- package/src/services/functions.ts +1 -1
- package/types/models.d.ts +65 -0
- package/types/services/account.d.ts +9 -0
- package/types/services/functions.d.ts +1 -1
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.
|
|
105
|
+
'x-sdk-version': '0.5.0',
|
|
106
106
|
'X-Appwrite-Response-Format': '1.4.0',
|
|
107
107
|
};
|
|
108
108
|
this.realtime = {
|
|
@@ -506,6 +506,24 @@ class Account extends Service {
|
|
|
506
506
|
}, payload);
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
|
+
/**
|
|
510
|
+
* Delete account
|
|
511
|
+
*
|
|
512
|
+
* Delete the currently logged in user.
|
|
513
|
+
*
|
|
514
|
+
* @throws {AppwriteException}
|
|
515
|
+
* @returns {Promise}
|
|
516
|
+
*/
|
|
517
|
+
delete() {
|
|
518
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
519
|
+
const apiPath = '/account';
|
|
520
|
+
const payload = {};
|
|
521
|
+
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
522
|
+
return yield this.client.call('delete', uri, {
|
|
523
|
+
'content-type': 'application/json',
|
|
524
|
+
}, payload);
|
|
525
|
+
});
|
|
526
|
+
}
|
|
509
527
|
/**
|
|
510
528
|
* Update email
|
|
511
529
|
*
|