@blocklet/sdk 1.16.51 → 1.16.52-beta-20250909-073849-4e392ab1

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.
@@ -42,9 +42,11 @@ function defaultVerifyToken(req) {
42
42
  if (!req.cookies) {
43
43
  printCookieParserNotInstalledWarning();
44
44
  }
45
- if (req.cookies?.login_token &&
46
- !(0, isEmpty_1.default)(req.cookies['x-csrf-token']) &&
47
- req.cookies['x-csrf-token'] === req.headers['x-csrf-token']) {
45
+ // @note: 如果 login_token 不存在,则跳过 csrf token 的验证
46
+ if (!req.cookies?.login_token) {
47
+ return;
48
+ }
49
+ if (!(0, isEmpty_1.default)(req.cookies['x-csrf-token']) && req.cookies['x-csrf-token'] === req.headers['x-csrf-token']) {
48
50
  const csrfTokenFromRequest = req.cookies['x-csrf-token'];
49
51
  if ((0, csrf_1.verify)(wallet.secretKey, csrfTokenFromRequest, req.cookies.login_token)) {
50
52
  return;
@@ -77,11 +77,12 @@ interface BlockletService {
77
77
  verifyAccessKey(params: OmitTeamDid<Client.RequestVerifyAccessKeyInput>): Promise<Client.ResponseAccessKey>;
78
78
  getAccessKeys(params: OmitTeamDid<Client.RequestAccessKeysInput>): Promise<Client.ResponseAccessKeys>;
79
79
  getAccessKey(params: OmitTeamDid<Client.RequestAccessKeyInput>): Promise<Client.ResponseAccessKey>;
80
- getUserFollowers(args: OmitTeamDid<Client.RequestUserFollowsInput>, options: RequestHeaders): Promise<Client.ResponseUserFollows>;
81
- getUserFollowing(args: OmitTeamDid<Client.RequestUserFollowsInput>, options: RequestHeaders): Promise<Client.ResponseUserFollows>;
82
- getUserFollowStats(args: OmitTeamDid<Client.RequestUserFollowsStatsInput>, options: RequestHeaders): Promise<Client.ResponseFollowStats>;
80
+ getUserFollowers(args: OmitTeamDid<Client.RequestUserRelationQueryInput>, options: RequestHeaders): Promise<Client.ResponseUserFollows>;
81
+ getUserFollowing(args: OmitTeamDid<Client.RequestUserRelationQueryInput>, options: RequestHeaders): Promise<Client.ResponseUserFollows>;
82
+ getUserFollowStats(args: OmitTeamDid<Client.RequestUserRelationCountInput>, options: RequestHeaders): Promise<Client.ResponseUserRelationCount>;
83
83
  checkFollowing(args: OmitTeamDid<Client.RequestCheckFollowingInput>): Promise<Client.ResponseCheckFollowing>;
84
84
  followUser(args: OmitTeamDid<Client.RequestFollowUserActionInput>): Promise<Client.GeneralResponse>;
85
85
  unfollowUser(args: OmitTeamDid<Client.RequestFollowUserActionInput>): Promise<Client.GeneralResponse>;
86
+ getUserInvites(args: OmitTeamDid<Client.RequestUserRelationQueryInput>, options: RequestHeaders): Promise<Client.ResponseUsers>;
86
87
  }
87
88
  export = BlockletService;
@@ -115,6 +115,7 @@ class BlockletService {
115
115
  'checkFollowing',
116
116
  'followUser',
117
117
  'unfollowUser',
118
+ 'getUserInvites',
118
119
  // updateUserInfo
119
120
  'updateUserAddress',
120
121
  'updateUserInfo',
@@ -324,6 +325,7 @@ class BlockletService {
324
325
  this.getUserFollowers = (args, options) => callClientMethod('getUserFollowers', args, options);
325
326
  this.getUserFollowing = (args, options) => callClientMethod('getUserFollowing', args, options);
326
327
  this.getUserFollowStats = (args, options) => callClientMethod('getUserFollowStats', args, options);
328
+ this.getUserInvites = (args, options) => callClientMethod('getUserInvites', args, options);
327
329
  this.checkFollowing = (args) => callClientMethod('checkFollowing', args);
328
330
  this.followUser = (args) => callClientMethod('followUser', args);
329
331
  this.unfollowUser = (args) => callClientMethod('unfollowUser', args);
package/lib/version.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- declare const version = "1.16.51";
1
+ declare const version = "1.16.52";
2
2
  export { version };
3
3
  declare const _default: {
4
4
  version: string;
package/lib/version.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.version = void 0;
4
- const version = '1.16.51';
4
+ const version = '1.16.52';
5
5
  exports.version = version;
6
6
  exports.default = { version };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.51",
6
+ "version": "1.16.52-beta-20250909-073849-4e392ab1",
7
7
  "description": "graphql client to read/write data on abt node",
8
8
  "main": "lib/index.js",
9
9
  "typings": "lib/index.d.ts",
@@ -27,19 +27,19 @@
27
27
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
28
28
  "license": "Apache-2.0",
29
29
  "dependencies": {
30
- "@abtnode/constant": "1.16.51",
31
- "@abtnode/db-cache": "1.16.51",
32
- "@abtnode/util": "1.16.51",
30
+ "@abtnode/constant": "1.16.52-beta-20250909-073849-4e392ab1",
31
+ "@abtnode/db-cache": "1.16.52-beta-20250909-073849-4e392ab1",
32
+ "@abtnode/util": "1.16.52-beta-20250909-073849-4e392ab1",
33
33
  "@arcblock/did": "1.24.0",
34
34
  "@arcblock/did-connect-js": "1.24.0",
35
35
  "@arcblock/jwt": "1.24.0",
36
36
  "@arcblock/ws": "1.24.0",
37
- "@blocklet/constant": "1.16.51",
38
- "@blocklet/env": "1.16.51",
37
+ "@blocklet/constant": "1.16.52-beta-20250909-073849-4e392ab1",
38
+ "@blocklet/env": "1.16.52-beta-20250909-073849-4e392ab1",
39
39
  "@blocklet/error": "^0.2.5",
40
- "@blocklet/meta": "1.16.51",
41
- "@blocklet/server-js": "1.16.51",
42
- "@blocklet/theme": "^3.1.34",
40
+ "@blocklet/meta": "1.16.52-beta-20250909-073849-4e392ab1",
41
+ "@blocklet/server-js": "1.16.52-beta-20250909-073849-4e392ab1",
42
+ "@blocklet/theme": "^3.1.37",
43
43
  "@did-connect/authenticator": "^2.2.8",
44
44
  "@did-connect/handler": "^2.2.8",
45
45
  "@nedb/core": "^2.1.5",
@@ -85,5 +85,5 @@
85
85
  "ts-node": "^10.9.1",
86
86
  "typescript": "^5.6.3"
87
87
  },
88
- "gitHead": "32897dd6a5e92368f1870bba34cbbb38da95da89"
88
+ "gitHead": "3b4b1551b181606f84799ba8b294fb36b483c9c3"
89
89
  }