@abtnode/constant 1.16.29-beta-e04c6f40 → 1.16.29-beta-db5c4ed6
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/index.js +16 -0
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -30,6 +30,10 @@ const SERVER_ROLES = Object.freeze({
|
|
|
30
30
|
EXTERNAL_BLOCKLETS_MANAGER: 'external-blocklets-manager',
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
+
const SERVICES_ROLES = Object.freeze({
|
|
34
|
+
BLOCKLET_GUEST: 'blocklet-guest',
|
|
35
|
+
});
|
|
36
|
+
|
|
33
37
|
const BLOCKLET_ROLES = [
|
|
34
38
|
SERVER_ROLES.BLOCKLET_OWNER,
|
|
35
39
|
SERVER_ROLES.BLOCKLET_ADMIN,
|
|
@@ -39,6 +43,16 @@ const BLOCKLET_ROLES = [
|
|
|
39
43
|
|
|
40
44
|
const isBlockletRole = (role) => role && BLOCKLET_ROLES.includes(role);
|
|
41
45
|
|
|
46
|
+
const BLOCKLET_MULTIPLE_TENANT_ROLES = [
|
|
47
|
+
SERVER_ROLES.BLOCKLET_OWNER,
|
|
48
|
+
SERVER_ROLES.BLOCKLET_ADMIN,
|
|
49
|
+
SERVER_ROLES.BLOCKLET_MEMBER,
|
|
50
|
+
SERVER_ROLES.BLOCKLET_SDK,
|
|
51
|
+
SERVICES_ROLES.BLOCKLET_GUEST,
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
const isBlockletMultipleTenantRole = (role) => role && BLOCKLET_MULTIPLE_TENANT_ROLES.includes(role);
|
|
55
|
+
|
|
42
56
|
const AUTH_CERT_TYPE = {
|
|
43
57
|
USER: 'user',
|
|
44
58
|
OWNERSHIP_NFT: 'ownership_nft',
|
|
@@ -449,6 +463,7 @@ module.exports = Object.freeze({
|
|
|
449
463
|
WEB_WALLET_URL: 'https://web.abtwallet.io',
|
|
450
464
|
BLOCKLET_STORE_URL,
|
|
451
465
|
BLOCKLET_STORE_URL_DEV,
|
|
466
|
+
BLOCKLET_STORE_DID: 'z8ia29UsENBg6tLZUKi2HABj38Cw1LmHZocbQ',
|
|
452
467
|
BLOCKLET_STORE_API_PREFIX: '/api',
|
|
453
468
|
BLOCKLET_STORE_API_BLOCKLET_PREFIX: '/api/blocklets',
|
|
454
469
|
BLOCKLET_STORE_META_PATH: '/api/store.json',
|
|
@@ -554,6 +569,7 @@ module.exports = Object.freeze({
|
|
|
554
569
|
SERVER_ROLES,
|
|
555
570
|
BLOCKLET_ROLES,
|
|
556
571
|
isBlockletRole,
|
|
572
|
+
isBlockletMultipleTenantRole,
|
|
557
573
|
AUTH_CERT_TYPE,
|
|
558
574
|
RBAC_CONFIG,
|
|
559
575
|
genPermissionName: (resource, action = 'access') => `${action}_${resource.replace('_', '-')}`, // resource cannot include '_'
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.29-beta-
|
|
6
|
+
"version": "1.16.29-beta-db5c4ed6",
|
|
7
7
|
"description": "ABT Node constants",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"files": [
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"jest": "^29.7.0"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "b15f6442fd30f217c08c7f892dce5d38e340ea28"
|
|
24
24
|
}
|