@blocklet/sdk 1.16.17-beta-3232a7af → 1.16.17-beta-703fb879

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/lib/config.d.ts CHANGED
@@ -30,6 +30,7 @@ declare const env: {
30
30
  appPid: string;
31
31
  appIds: string[];
32
32
  appName: string;
33
+ appNameSlug: string;
33
34
  appDescription: string;
34
35
  appUrl: string;
35
36
  isComponent: boolean;
@@ -97,6 +98,7 @@ declare const _default: {
97
98
  appPid: string;
98
99
  appIds: string[];
99
100
  appName: string;
101
+ appNameSlug: string;
100
102
  appDescription: string;
101
103
  appUrl: string;
102
104
  isComponent: boolean;
package/lib/config.js CHANGED
@@ -34,6 +34,7 @@ const Events = {
34
34
  exports.Events = Events;
35
35
  const AppConfigKeyMap = {
36
36
  BLOCKLET_APP_NAME: 'appName',
37
+ BLOCKLET_APP_NAME_SLUG: 'appNameSlug',
37
38
  BLOCKLET_APP_DESCRIPTION: 'appDescription',
38
39
  BLOCKLET_APP_URL: 'appUrl',
39
40
  BLOCKLET_APP_SPACE_ENDPOINT: 'appStorageEndpoint',
@@ -45,8 +45,9 @@ interface AuthService {
45
45
  removeUserPassport(args: OmitTeamDid<Client.RequestRevokeUserPassportInput>): Promise<Client.GeneralResponse>;
46
46
  getPermissionsByRole(role: string): Promise<Client.ResponsePermissions>;
47
47
  getRoles(): Promise<Client.ResponseRoles>;
48
+ getRole(name: string): Promise<Client.ResponseRole>;
48
49
  createRole(args: OmitTeamDid<Client.RequestCreateRoleInput>): Promise<Client.ResponseRole>;
49
- updateRole(name: string, updates: Pick<Client.RoleInput, 'title' | 'description'>): Promise<Client.ResponseRole>;
50
+ updateRole(name: string, updates: Partial<Pick<Client.RequestCreateRoleInput, 'title' | 'description' | 'extra'>>): Promise<Client.ResponseRole>;
50
51
  deleteRole(name: string): Promise<Client.GeneralResponse>;
51
52
  grantPermissionForRole(role: string, permission: string): Promise<Client.GeneralResponse>;
52
53
  revokePermissionFromRole(role: string, permission: string): Promise<Client.GeneralResponse>;
@@ -2,6 +2,7 @@
2
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
+ /* eslint-disable prettier/prettier */
5
6
  /* eslint-disable max-classes-per-file */
6
7
  /* eslint-disable @typescript-eslint/indent */
7
8
  const pickBy_1 = __importDefault(require("lodash/pickBy"));
@@ -88,6 +89,7 @@ class AuthService {
88
89
  // 'deleteInvitation',
89
90
  // rbac
90
91
  'getRoles',
92
+ 'getRole',
91
93
  'createRole',
92
94
  'updateRole',
93
95
  'deleteRole',
@@ -135,8 +137,9 @@ class AuthService {
135
137
  updateUserApproval: (fn) => (did, approved) => fn({ input: { user: { did, approved }, teamDid } }),
136
138
  switchProfile: (fn) => (did, profile) => fn({ input: { teamDid, userDid: did, profile } }),
137
139
  getPermissionsByRole: (fn) => (name) => fn({ input: { role: { name }, teamDid } }),
138
- createRole: (fn) => ({ name, title, description }) => fn({ input: { ...(0, pickBy_1.default)({ name, title, description }, isNotNullOrUndefined), teamDid } }),
139
- updateRole: (fn) => (name, { title, description }) => fn({ input: { role: (0, pickBy_1.default)({ name, title, description }, isNotNullOrUndefined), teamDid } }),
140
+ createRole: (fn) => ({ name, title, description, extra }) => fn({ input: { ...(0, pickBy_1.default)({ name, title, description, extra }, isNotNullOrUndefined), teamDid } }),
141
+ updateRole: (fn) => (name, { title, description, extra }) => fn({ input: { role: (0, pickBy_1.default)({ name, title, description, extra }, isNotNullOrUndefined), teamDid } }),
142
+ getRole: (fn) => (name) => fn({ input: { role: { name }, teamDid } }),
140
143
  deleteRole: (fn) => (name) => fn({ input: { name, teamDid } }),
141
144
  grantPermissionForRole: (fn) => (roleName, permissionName) => fn({ input: { teamDid, roleName, grantName: permissionName } }),
142
145
  revokePermissionFromRole: (fn) => (roleName, permissionName) => fn({ input: { teamDid, roleName, grantName: permissionName } }),
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.17-beta-3232a7af",
6
+ "version": "1.16.17-beta-703fb879",
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.17-beta-3232a7af",
30
- "@abtnode/constant": "1.16.17-beta-3232a7af",
29
+ "@abtnode/client": "1.16.17-beta-703fb879",
30
+ "@abtnode/constant": "1.16.17-beta-703fb879",
31
31
  "@arcblock/did": "1.18.92",
32
32
  "@arcblock/did-auth": "1.18.92",
33
33
  "@arcblock/jwt": "1.18.92",
34
34
  "@arcblock/ws": "1.18.92",
35
- "@blocklet/constant": "1.16.17-beta-3232a7af",
36
- "@blocklet/env": "1.16.17-beta-3232a7af",
37
- "@blocklet/meta": "1.16.17-beta-3232a7af",
35
+ "@blocklet/constant": "1.16.17-beta-703fb879",
36
+ "@blocklet/env": "1.16.17-beta-703fb879",
37
+ "@blocklet/meta": "1.16.17-beta-703fb879",
38
38
  "@did-connect/authenticator": "^2.2.0",
39
39
  "@did-connect/handler": "^2.2.0",
40
40
  "@nedb/core": "^2.1.5",
@@ -74,5 +74,5 @@
74
74
  "ts-node": "^10.9.1",
75
75
  "typescript": "^5.0.4"
76
76
  },
77
- "gitHead": "af4067dd2e418c51a0ed96b1ee242ca812904056"
77
+ "gitHead": "97d63c671d823076e58b994107e10866367edd5d"
78
78
  }