@blocklet/sdk 1.16.15-beta-7e0c580a → 1.16.15-beta-74505f06

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.
@@ -19,7 +19,6 @@ const doCall = async ({ url, ...options }) => {
19
19
  ...options,
20
20
  headers: {
21
21
  'x-component-sig': (0, verify_sign_1.sign)(options.data),
22
- 'x-component-did': process.env.BLOCKLET_COMPONENT_DID,
23
22
  },
24
23
  timeout: 60 * 1000,
25
24
  });
@@ -65,6 +65,7 @@ class AuthService {
65
65
  const apiList = [
66
66
  // user
67
67
  'login',
68
+ 'switchProfile',
68
69
  'refreshSession',
69
70
  'getUsers',
70
71
  'getUser',
@@ -121,6 +122,7 @@ class AuthService {
121
122
  // removeUser: apiConvertDid,
122
123
  // updateUserRole: (fn: Function) => (did: string, role: string) => fn({ input: { user: { did, role }, teamDid } }),
123
124
  updateUserApproval: (fn) => (did, approved) => fn({ input: { user: { did, approved }, teamDid } }),
125
+ switchProfile: (fn) => (did, profile) => fn({ input: { teamDid, userDid: did, profile } }),
124
126
  getPermissionsByRole: (fn) => (name) => fn({ input: { role: { name }, teamDid } }),
125
127
  createRole: (fn) => ({ name, title, description }) => fn({ input: { ...(0, pickBy_1.default)({ name, title, description }, isNotNullOrUndefined), teamDid } }),
126
128
  updateRole: (fn) => (name, { title, description }) => fn({ input: { role: (0, pickBy_1.default)({ name, title, description }, isNotNullOrUndefined), teamDid } }),
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.15-beta-7e0c580a",
6
+ "version": "1.16.15-beta-74505f06",
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",
@@ -26,15 +26,15 @@
26
26
  "author": "linchen1987 <linchen.1987@foxmail.com> (http://github.com/linchen1987)",
27
27
  "license": "Apache-2.0",
28
28
  "dependencies": {
29
- "@abtnode/client": "1.16.14",
30
- "@abtnode/constant": "1.16.14",
29
+ "@abtnode/client": "1.16.15-beta-74505f06",
30
+ "@abtnode/constant": "1.16.15-beta-74505f06",
31
31
  "@arcblock/did": "1.18.89",
32
32
  "@arcblock/did-auth": "1.18.89",
33
33
  "@arcblock/jwt": "1.18.89",
34
34
  "@arcblock/ws": "1.18.89",
35
- "@blocklet/constant": "1.16.14",
36
- "@blocklet/env": "1.16.14",
37
- "@blocklet/meta": "1.16.14",
35
+ "@blocklet/constant": "1.16.15-beta-74505f06",
36
+ "@blocklet/env": "1.16.15-beta-74505f06",
37
+ "@blocklet/meta": "1.16.15-beta-74505f06",
38
38
  "@did-connect/authenticator": "^2.2.0",
39
39
  "@did-connect/handler": "^2.2.0",
40
40
  "@nedb/core": "^2.1.5",
@@ -72,5 +72,6 @@
72
72
  "ts-jest": "^27.1.5",
73
73
  "ts-node": "^10.9.1",
74
74
  "typescript": "^5.0.4"
75
- }
75
+ },
76
+ "gitHead": "344ae4a65afe846111eb1f901e09e0f59f333861"
76
77
  }