@blocklet/js-sdk 1.16.49-beta-20250822-070545-6d3344cc → 1.16.49-beta-20250826-112154-8ca981fa

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
@@ -65,6 +65,15 @@ declare class AuthService {
65
65
  }): Promise<string>;
66
66
  getProfile(): Promise<any>;
67
67
  refreshProfile(): Promise<void>;
68
+ followUser({ userDid }: {
69
+ userDid: string;
70
+ }): Promise<void>;
71
+ unfollowUser({ userDid }: {
72
+ userDid: string;
73
+ }): Promise<void>;
74
+ isFollowingUser({ userDid }: {
75
+ userDid: string;
76
+ }): Promise<boolean>;
68
77
  saveProfile({ locale, inviter, metadata, address, }: {
69
78
  locale?: string;
70
79
  inviter?: string;
package/dist/index.d.ts CHANGED
@@ -65,6 +65,15 @@ declare class AuthService {
65
65
  }): Promise<string>;
66
66
  getProfile(): Promise<any>;
67
67
  refreshProfile(): Promise<void>;
68
+ followUser({ userDid }: {
69
+ userDid: string;
70
+ }): Promise<void>;
71
+ unfollowUser({ userDid }: {
72
+ userDid: string;
73
+ }): Promise<void>;
74
+ isFollowingUser({ userDid }: {
75
+ userDid: string;
76
+ }): Promise<boolean>;
68
77
  saveProfile({ locale, inviter, metadata, address, }: {
69
78
  locale?: string;
70
79
  inviter?: string;
package/dist/index.mjs CHANGED
@@ -67,6 +67,16 @@ class AuthService {
67
67
  async refreshProfile() {
68
68
  await this.api.put("/api/user/refreshProfile");
69
69
  }
70
+ async followUser({ userDid }) {
71
+ await this.api.post(`/api/user/follow/${userDid}`);
72
+ }
73
+ async unfollowUser({ userDid }) {
74
+ await this.api.delete(`/api/user/follow/${userDid}`);
75
+ }
76
+ async isFollowingUser({ userDid }) {
77
+ const { data } = await this.api.get(`/api/user/follow/${userDid}`);
78
+ return data.isFollowing;
79
+ }
70
80
  async saveProfile({
71
81
  locale,
72
82
  inviter,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blocklet/js-sdk",
3
- "version": "1.16.49-beta-20250822-070545-6d3344cc",
3
+ "version": "1.16.49-beta-20250826-112154-8ca981fa",
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.49-beta-20250822-070545-6d3344cc",
41
+ "@abtnode/constant": "1.16.49-beta-20250826-112154-8ca981fa",
42
42
  "@arcblock/did": "1.22.2",
43
- "@blocklet/meta": "1.16.49-beta-20250822-070545-6d3344cc",
43
+ "@blocklet/meta": "1.16.49-beta-20250826-112154-8ca981fa",
44
44
  "@ocap/wallet": "1.22.2",
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": "^3.2.4"
67
67
  },
68
- "gitHead": "c5560fe749fe495b03003ac7325da29c71f5e62b"
68
+ "gitHead": "f31434546e024c4ce20a1d3c0d34b64f12980536"
69
69
  }