@blocklet/js-sdk 1.16.42-beta-20250408-072924-4b6a877a → 1.16.42-beta-20250412-074212-ef879757

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/index.d.mts CHANGED
@@ -67,11 +67,18 @@ declare class AuthService {
67
67
  *
68
68
  * 指定要退出登录的设备 id
69
69
  * @param {{ visitorId: string }} { visitorId }
70
- * @return {*} {Promise<void>}
70
+ * @return {Promise<void>}
71
71
  */
72
72
  logout({ visitorId }: {
73
73
  visitorId: string;
74
74
  }): Promise<void>;
75
+ /**
76
+ * 删除当前登录用户
77
+ * @return {Promise<{did: string}>}
78
+ */
79
+ destroyMyself(): Promise<{
80
+ did: string;
81
+ }>;
75
82
  }
76
83
 
77
84
  declare class TokenService {
package/dist/index.d.ts CHANGED
@@ -67,11 +67,18 @@ declare class AuthService {
67
67
  *
68
68
  * 指定要退出登录的设备 id
69
69
  * @param {{ visitorId: string }} { visitorId }
70
- * @return {*} {Promise<void>}
70
+ * @return {Promise<void>}
71
71
  */
72
72
  logout({ visitorId }: {
73
73
  visitorId: string;
74
74
  }): Promise<void>;
75
+ /**
76
+ * 删除当前登录用户
77
+ * @return {Promise<{did: string}>}
78
+ */
79
+ destroyMyself(): Promise<{
80
+ did: string;
81
+ }>;
75
82
  }
76
83
 
77
84
  declare class TokenService {
package/dist/index.mjs CHANGED
@@ -81,12 +81,20 @@ class AuthService {
81
81
  *
82
82
  * 指定要退出登录的设备 id
83
83
  * @param {{ visitorId: string }} { visitorId }
84
- * @return {*} {Promise<void>}
84
+ * @return {Promise<void>}
85
85
  */
86
86
  async logout({ visitorId }) {
87
87
  const { data } = await this.api.post("/api/user/logout", { visitorId });
88
88
  return data;
89
89
  }
90
+ /**
91
+ * 删除当前登录用户
92
+ * @return {Promise<{did: string}>}
93
+ */
94
+ async destroyMyself() {
95
+ const { data } = await this.api.delete("/api/user");
96
+ return data;
97
+ }
90
98
  }
91
99
 
92
100
  class TokenService {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/js-sdk",
3
- "version": "1.16.42-beta-20250408-072924-4b6a877a",
3
+ "version": "1.16.42-beta-20250412-074212-ef879757",
4
4
  "main": "dist/index.mjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -38,9 +38,9 @@
38
38
  "watch": "nodemon -w src -e ts -x 'npm run build'"
39
39
  },
40
40
  "dependencies": {
41
- "@abtnode/constant": "1.16.42-beta-20250408-072924-4b6a877a",
41
+ "@abtnode/constant": "1.16.42-beta-20250412-074212-ef879757",
42
42
  "@arcblock/did": "1.19.19",
43
- "@blocklet/meta": "1.16.42-beta-20250408-072924-4b6a877a",
43
+ "@blocklet/meta": "1.16.42-beta-20250412-074212-ef879757",
44
44
  "@ocap/wallet": "1.19.19",
45
45
  "axios": "^1.7.9",
46
46
  "is-url": "^1.2.4",
@@ -65,5 +65,5 @@
65
65
  "unbuild": "^2.0.0",
66
66
  "vitest": "^2.0.5"
67
67
  },
68
- "gitHead": "7ba566b56875cb6e8f5aa04fbb57c4ff891c91ac"
68
+ "gitHead": "b891a04b4d6722cabed06f737e81da8bc1904849"
69
69
  }