@verii/endpoints-organizations-registrar 1.0.0 → 1.0.2
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/package.json +31 -31
- package/src/controllers/organizations/schemas/create-did-service.schema.json +2 -0
- package/src/controllers/service-types/controller.js +3 -0
- package/src/entities/organization-services/adapters/update-blockchain-permissions-from-permitted-services.js +10 -0
- package/src/entities/organization-services/domains/transform-profile-service.js +2 -0
- package/src/entities/organization-services/domains/validate-service-key-purposes.js +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verii/endpoints-organizations-registrar",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Organization Registrar",
|
|
5
5
|
"repository": "https://github.com/LFDT-Verii/core",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -25,32 +25,32 @@
|
|
|
25
25
|
"@spencejs/spence-events": "~0.10.2",
|
|
26
26
|
"@spencejs/spence-factories": "0.10.2",
|
|
27
27
|
"@spencejs/spence-mongo-repos": "~0.10.2",
|
|
28
|
-
"@verii/auth": "1.0.
|
|
29
|
-
"@verii/aws-clients": "1.0.
|
|
30
|
-
"@verii/base-contract-io": "1.0.
|
|
31
|
-
"@verii/blockchain-functions": "1.0.
|
|
32
|
-
"@verii/common-functions": "1.0.
|
|
33
|
-
"@verii/common-schemas": "1.0.
|
|
34
|
-
"@verii/config": "1.0.
|
|
35
|
-
"@verii/contract-permissions": "1.0.
|
|
36
|
-
"@verii/country-data": "1.0.
|
|
37
|
-
"@verii/crypto": "1.0.
|
|
38
|
-
"@verii/csv-parser": "1.0.
|
|
39
|
-
"@verii/db-kms": "1.0.
|
|
40
|
-
"@verii/did-doc": "1.0.
|
|
41
|
-
"@verii/did-web": "1.0.
|
|
42
|
-
"@verii/endpoints-credential-types-registrar": "1.0.
|
|
43
|
-
"@verii/fastify-plugins": "1.0.
|
|
44
|
-
"@verii/fineract-client": "1.0.
|
|
45
|
-
"@verii/image-processing": "1.0.
|
|
46
|
-
"@verii/jwt": "1.0.
|
|
47
|
-
"@verii/organizations-registry": "1.0.
|
|
48
|
-
"@verii/rest-queries": "1.0.
|
|
49
|
-
"@verii/spencer-mongo-extensions": "1.0.
|
|
50
|
-
"@verii/tests-helpers": "1.0.
|
|
51
|
-
"@verii/validation": "1.0.
|
|
52
|
-
"@verii/vc-checks": "1.0.
|
|
53
|
-
"@verii/verii-verification": "1.0.
|
|
28
|
+
"@verii/auth": "1.0.2",
|
|
29
|
+
"@verii/aws-clients": "1.0.2",
|
|
30
|
+
"@verii/base-contract-io": "1.0.2",
|
|
31
|
+
"@verii/blockchain-functions": "1.0.2",
|
|
32
|
+
"@verii/common-functions": "1.0.2",
|
|
33
|
+
"@verii/common-schemas": "1.0.2",
|
|
34
|
+
"@verii/config": "1.0.2",
|
|
35
|
+
"@verii/contract-permissions": "1.0.2",
|
|
36
|
+
"@verii/country-data": "1.0.2",
|
|
37
|
+
"@verii/crypto": "1.0.2",
|
|
38
|
+
"@verii/csv-parser": "1.0.2",
|
|
39
|
+
"@verii/db-kms": "1.0.2",
|
|
40
|
+
"@verii/did-doc": "1.0.2",
|
|
41
|
+
"@verii/did-web": "1.0.2",
|
|
42
|
+
"@verii/endpoints-credential-types-registrar": "1.0.2",
|
|
43
|
+
"@verii/fastify-plugins": "1.0.2",
|
|
44
|
+
"@verii/fineract-client": "1.0.2",
|
|
45
|
+
"@verii/image-processing": "1.0.2",
|
|
46
|
+
"@verii/jwt": "1.0.2",
|
|
47
|
+
"@verii/organizations-registry": "1.0.2",
|
|
48
|
+
"@verii/rest-queries": "1.0.2",
|
|
49
|
+
"@verii/spencer-mongo-extensions": "1.0.2",
|
|
50
|
+
"@verii/tests-helpers": "1.0.2",
|
|
51
|
+
"@verii/validation": "1.0.2",
|
|
52
|
+
"@verii/vc-checks": "1.0.2",
|
|
53
|
+
"@verii/verii-verification": "1.0.2",
|
|
54
54
|
"auth0": "4.28.0",
|
|
55
55
|
"bs58": "~6.0.0",
|
|
56
56
|
"date-fns": "~3.6.0",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@verii/common-functions": "0.5.0-build",
|
|
70
|
-
"@verii/sample-data": "1.0.
|
|
71
|
-
"@verii/server-provider": "1.0.
|
|
72
|
-
"@verii/test-regexes": "1.0.
|
|
70
|
+
"@verii/sample-data": "1.0.2",
|
|
71
|
+
"@verii/server-provider": "1.0.2",
|
|
72
|
+
"@verii/test-regexes": "1.0.2",
|
|
73
73
|
"eslint": "8.57.1",
|
|
74
74
|
"eslint-config-airbnb-base": "14.2.1",
|
|
75
75
|
"eslint-config-prettier": "8.10.2",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"nock": "15.0.0-beta.6",
|
|
85
85
|
"prettier": "2.8.8"
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "1a5a2e5c5983278f9f2a107adb13cade1bfae501"
|
|
88
88
|
}
|
|
@@ -16,6 +16,8 @@ const CredentialGroupToServiceTypeMap = {
|
|
|
16
16
|
[ServiceTypes.NotaryIdDocumentIssuerType]: 'IdDocument',
|
|
17
17
|
[ServiceTypes.ContactIssuerType]: 'Contact',
|
|
18
18
|
[ServiceTypes.NotaryContactIssuerType]: 'Contact',
|
|
19
|
+
[ServiceTypes.WorkPermitIssuerType]: undefined,
|
|
20
|
+
[ServiceTypes.NotaryWorkPermitIssuerType]: undefined,
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
const isNotary = (serviceType) =>
|
|
@@ -23,6 +25,7 @@ const isNotary = (serviceType) =>
|
|
|
23
25
|
ServiceTypes.NotaryContactIssuerType,
|
|
24
26
|
ServiceTypes.NotaryIdDocumentIssuerType,
|
|
25
27
|
ServiceTypes.NotaryIssuerType,
|
|
28
|
+
ServiceTypes.NotaryWorkPermitIssuerType,
|
|
26
29
|
]);
|
|
27
30
|
|
|
28
31
|
const serviceTypesController = async (fastify) => {
|
|
@@ -53,6 +53,16 @@ const ServiceCategoryToPermissions = {
|
|
|
53
53
|
AddressScopePermissions.CredentialRevoke,
|
|
54
54
|
AddressScopePermissions.CredentialIssue,
|
|
55
55
|
],
|
|
56
|
+
[ServiceCategories.WorkPermitIssuer]: [
|
|
57
|
+
AddressScopePermissions.TransactionsWrite,
|
|
58
|
+
AddressScopePermissions.CredentialRevoke,
|
|
59
|
+
AddressScopePermissions.CredentialIssue,
|
|
60
|
+
],
|
|
61
|
+
[ServiceCategories.NotaryWorkPermitIssuer]: [
|
|
62
|
+
AddressScopePermissions.TransactionsWrite,
|
|
63
|
+
AddressScopePermissions.CredentialRevoke,
|
|
64
|
+
AddressScopePermissions.CredentialIssue,
|
|
65
|
+
],
|
|
56
66
|
};
|
|
57
67
|
|
|
58
68
|
const mapPermissionsToServiceTypes = (permittedVelocityServiceCategories) => {
|
|
@@ -62,6 +62,8 @@ const isLegacyIssuerService = (service) =>
|
|
|
62
62
|
ServiceTypes.NotaryIdDocumentIssuerType,
|
|
63
63
|
ServiceTypes.ContactIssuerType,
|
|
64
64
|
ServiceTypes.NotaryContactIssuerType,
|
|
65
|
+
ServiceTypes.WorkPermitIssuerType,
|
|
66
|
+
ServiceTypes.NotaryWorkPermitIssuerType,
|
|
65
67
|
ServiceTypes.NotaryIssuerType,
|
|
66
68
|
ServiceTypes.IdentityIssuerType,
|
|
67
69
|
...ServiceTypesOfServiceCategory[ServiceCategories.Issuer],
|
|
@@ -44,6 +44,8 @@ const requiredKeyPurposes = {
|
|
|
44
44
|
[ServiceTypes.NotaryIssuerType]: keyPurposesIssuing,
|
|
45
45
|
[ServiceTypes.ContactIssuerType]: keyPurposesIssuing,
|
|
46
46
|
[ServiceTypes.NotaryContactIssuerType]: keyPurposesIssuing,
|
|
47
|
+
[ServiceTypes.WorkPermitIssuerType]: keyPurposesIssuing,
|
|
48
|
+
[ServiceTypes.NotaryWorkPermitIssuerType]: keyPurposesIssuing,
|
|
47
49
|
[ServiceTypes.NotaryIdDocumentIssuerType]: keyPurposesIssuing,
|
|
48
50
|
[ServiceTypes.IdDocumentIssuerType]: keyPurposesIssuing,
|
|
49
51
|
// RELYING PARTIES
|