@verii/endpoints-organizations-registrar 1.0.3 → 1.0.4
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/entities/invitations/domains/init-invitation-emails.js +5 -0
- package/src/entities/organizations/adapters/init-organization-registrar-emails.js +1 -15
- package/src/entities/organizations/adapters/send-email-notifications.js +6 -1
- package/src/entities/organizations/domains/index.js +1 -0
- package/src/entities/organizations/domains/which-net.js +41 -0
- package/src/entities/signatories/orchestrators/send-reminders.js +4 -1
- package/src/templates/invitee-invitation-email-subject.hbs +1 -1
- package/src/templates/support-organization-created-subject.hbs +1 -1
- package/src/templates/support-signatory-max-reminders-reached-email-subject.hbs +1 -1
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.4",
|
|
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.4",
|
|
29
|
+
"@verii/aws-clients": "1.0.4",
|
|
30
|
+
"@verii/base-contract-io": "1.0.4",
|
|
31
|
+
"@verii/blockchain-functions": "1.0.4",
|
|
32
|
+
"@verii/common-functions": "1.0.4",
|
|
33
|
+
"@verii/common-schemas": "1.0.4",
|
|
34
|
+
"@verii/config": "1.0.4",
|
|
35
|
+
"@verii/contract-permissions": "1.0.4",
|
|
36
|
+
"@verii/country-data": "1.0.4",
|
|
37
|
+
"@verii/crypto": "1.0.4",
|
|
38
|
+
"@verii/csv-parser": "1.0.4",
|
|
39
|
+
"@verii/db-kms": "1.0.4",
|
|
40
|
+
"@verii/did-doc": "1.0.4",
|
|
41
|
+
"@verii/did-web": "1.0.4",
|
|
42
|
+
"@verii/endpoints-credential-types-registrar": "1.0.4",
|
|
43
|
+
"@verii/fastify-plugins": "1.0.4",
|
|
44
|
+
"@verii/fineract-client": "1.0.4",
|
|
45
|
+
"@verii/image-processing": "1.0.4",
|
|
46
|
+
"@verii/jwt": "1.0.4",
|
|
47
|
+
"@verii/organizations-registry": "1.0.4",
|
|
48
|
+
"@verii/rest-queries": "1.0.4",
|
|
49
|
+
"@verii/spencer-mongo-extensions": "1.0.4",
|
|
50
|
+
"@verii/tests-helpers": "1.0.4",
|
|
51
|
+
"@verii/validation": "1.0.4",
|
|
52
|
+
"@verii/vc-checks": "1.0.4",
|
|
53
|
+
"@verii/verii-verification": "1.0.4",
|
|
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.4",
|
|
71
|
+
"@verii/server-provider": "1.0.4",
|
|
72
|
+
"@verii/test-regexes": "1.0.4",
|
|
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": "1292876f07bef30bf0e86d6da7fda35e0804576a"
|
|
88
88
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
const {
|
|
2
|
+
getSubjectNetPrefix,
|
|
3
|
+
} = require('../../organizations/domains/which-net');
|
|
4
|
+
|
|
1
5
|
const inviteeInvitationEmail = async (
|
|
2
6
|
{ inviterOrganization, inviteeEmail, uri },
|
|
3
7
|
context
|
|
4
8
|
) => ({
|
|
5
9
|
subject: await context.renderTemplate('invitee-invitation-email-subject', {
|
|
6
10
|
inviterOrganization,
|
|
11
|
+
netPrefix: getSubjectNetPrefix(context.config),
|
|
7
12
|
}),
|
|
8
13
|
message: await context.renderTemplate('invitee-invitation-email-body', {
|
|
9
14
|
inviterOrganization,
|
|
@@ -16,23 +16,9 @@
|
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
18
|
const { map } = require('lodash/fp');
|
|
19
|
+
const { whichNet } = require('../domains/which-net');
|
|
19
20
|
const { buildPublicServices } = require('../../organization-services/domains');
|
|
20
21
|
|
|
21
|
-
const whichNet = ({ nodeEnv }) => {
|
|
22
|
-
switch (nodeEnv) {
|
|
23
|
-
case 'development':
|
|
24
|
-
case 'test':
|
|
25
|
-
return 'LocalDevNet';
|
|
26
|
-
case 'dev':
|
|
27
|
-
return 'DevNet';
|
|
28
|
-
case 'staging':
|
|
29
|
-
return 'TestNet';
|
|
30
|
-
case 'production':
|
|
31
|
-
return 'MainNet';
|
|
32
|
-
default:
|
|
33
|
-
return '';
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
22
|
const initOrganizationRegistrarEmails = (config) => {
|
|
37
23
|
return {
|
|
38
24
|
emailToNewOrgForServicesActivated: ({
|
|
@@ -18,7 +18,11 @@
|
|
|
18
18
|
const { isEmpty, omitBy, isNil, map } = require('lodash/fp');
|
|
19
19
|
const { optional } = require('@verii/common-functions');
|
|
20
20
|
const { initAuth0Provisioner } = require('../../oauth');
|
|
21
|
-
const {
|
|
21
|
+
const {
|
|
22
|
+
parseProfileToCsv,
|
|
23
|
+
ServiceTypeLabels,
|
|
24
|
+
getSubjectNetPrefix,
|
|
25
|
+
} = require('../domains');
|
|
22
26
|
const {
|
|
23
27
|
initOrganizationRegistrarEmails,
|
|
24
28
|
} = require('./init-organization-registrar-emails');
|
|
@@ -148,6 +152,7 @@ const initSendEmailNotifications = async (initCtx) => {
|
|
|
148
152
|
'support-organization-created-subject',
|
|
149
153
|
{
|
|
150
154
|
organization,
|
|
155
|
+
netPrefix: getSubjectNetPrefix(context.config),
|
|
151
156
|
}
|
|
152
157
|
),
|
|
153
158
|
message: await context.renderTemplate(
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2025 Velocity Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const whichNet = ({ nodeEnv }) => {
|
|
19
|
+
switch (nodeEnv) {
|
|
20
|
+
case 'development':
|
|
21
|
+
case 'test':
|
|
22
|
+
return 'LocalDevNet';
|
|
23
|
+
case 'dev':
|
|
24
|
+
return 'DevNet';
|
|
25
|
+
case 'staging':
|
|
26
|
+
return 'TestNet';
|
|
27
|
+
case 'production':
|
|
28
|
+
return 'MainNet';
|
|
29
|
+
default:
|
|
30
|
+
return '';
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const getSubjectNetPrefix = (config) => {
|
|
35
|
+
if (config.nodeEnv === 'production') {
|
|
36
|
+
return '';
|
|
37
|
+
}
|
|
38
|
+
return `${whichNet(config)}: `;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
module.exports = { whichNet, getSubjectNetPrefix };
|
|
@@ -2,6 +2,9 @@ const { isEmpty, size } = require('lodash/fp');
|
|
|
2
2
|
const { nanoid } = require('nanoid');
|
|
3
3
|
const { subMinutes } = require('date-fns/fp');
|
|
4
4
|
const { SignatoryEventStatus } = require('../domain');
|
|
5
|
+
const {
|
|
6
|
+
getSubjectNetPrefix,
|
|
7
|
+
} = require('../../organizations/domains/which-net');
|
|
5
8
|
|
|
6
9
|
const task = 'send-reminders';
|
|
7
10
|
const sendReminders = async (
|
|
@@ -58,7 +61,7 @@ const sendReminder = async (
|
|
|
58
61
|
await context.sendSupportEmail(
|
|
59
62
|
await context.renderTemplate(
|
|
60
63
|
'support-signatory-max-reminders-reached-email-subject',
|
|
61
|
-
{ organization }
|
|
64
|
+
{ organization, netPrefix: getSubjectNetPrefix(context.config) }
|
|
62
65
|
),
|
|
63
66
|
await context.renderTemplate(
|
|
64
67
|
'support-signatory-max-reminders-reached-email-body',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Invitation by {{inviterOrganization.profile.name}} to Join Velocity Network™
|
|
1
|
+
{{netPrefix}}Invitation by {{inviterOrganization.profile.name}} to Join Velocity Network™
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Organization {{organization.profile.name}} created
|
|
1
|
+
{{netPrefix}}Organization {{organization.profile.name}} created
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Maximum signatory reminder alert for {{organization.profile.name}}
|
|
1
|
+
{{netPrefix}}Maximum signatory reminder alert for {{organization.profile.name}}
|