Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
23a1cb7
feat: add backend implementation for configurable email templates
Jul 15, 2025
ecb009e
Merge branch 'develop' into add-configurable-email-templates
Jul 15, 2025
bbf6b81
feat: add skeleton for frontend implementation of configurable email …
Jul 17, 2025
16fc59e
Merge branch 'develop' into add-configurable-email-templates
Jul 17, 2025
c032423
feat: update backed for email templates
Jul 21, 2025
892ca3b
Merge branch 'develop' into add-configurable-email-templates
Jul 21, 2025
4647053
feat: update migration script
Jul 22, 2025
537f445
--amend
Jul 22, 2025
2ade6c1
Merge branch 'develop' into add-configurable-email-templates
Jul 22, 2025
ac9919e
feat: update email templates backend
Aug 18, 2025
bb3ae4b
Merge branch 'develop' into add-configurable-email-templates
Aug 21, 2025
2ed631c
feat: update graphql
Aug 21, 2025
0a69611
Merge branch 'develop' into add-configurable-email-templates
Aug 21, 2025
0301e94
feat: add validation for email template delete
Aug 25, 2025
9828a7e
feat: start backend test implementation
Sep 1, 2025
209bcb9
Merge branch 'develop' into add-configurable-email-templates
Sep 1, 2025
8ac3a81
feat: add backend tests
Sep 2, 2025
e9cb621
feat: fix email template events
Sep 2, 2025
593c1b0
Merge branch 'develop' into add-configurable-email-templates
Sep 8, 2025
7f035d1
fix: restore vite.config.mts
Sep 8, 2025
8d04cd8
fix: e2e tests
Sep 8, 2025
3884223
Merge branch 'develop' into add-configurable-email-templates
gnyiri Sep 8, 2025
6e808f6
fix: update email folder for temporary template files
Sep 9, 2025
3306878
Merge branch 'add-configurable-email-templates' of https://github.com…
Sep 9, 2025
62e48a5
fix: update Mail service for e2e run
Sep 9, 2025
19fac52
fix: update Mail service for e2e run
Sep 9, 2025
97683e4
fix: change email templates verification
Sep 10, 2025
868727a
fix: update email temp directory
Sep 10, 2025
0336aec
fix: update e2d for email templates
Sep 10, 2025
048b88e
fix: update e2d for email templates
Sep 10, 2025
0061bcf
Merge branch 'develop' into add-configurable-email-templates
gnyiri Sep 11, 2025
75ec614
Merge branch 'develop' into add-configurable-email-templates
gnyiri Sep 11, 2025
e5adfe1
fix: complete failed merge
Sep 11, 2025
bbc250c
fix: delete unnecessary db seed file
Sep 12, 2025
bcc44ae
Merge branch 'develop' into add-configurable-email-templates
gnyiri Sep 12, 2025
2bd3ea2
fix: add logs
Sep 15, 2025
7d15582
Merge branch 'add-configurable-email-templates' of https://github.com…
Sep 15, 2025
e0eb37e
Merge branch 'develop' into add-configurable-email-templates
gnyiri Sep 15, 2025
ce7e11b
fix: change temporary template file name
Sep 15, 2025
be11205
fix: add check for template file existence
Sep 16, 2025
36e4341
fix: add logs
Sep 16, 2025
5d5ecb0
fix: update e2e tests
Sep 16, 2025
f2af9bc
fix: update e2e tests
Sep 16, 2025
c441c9f
fix: update test-build.yml
Sep 16, 2025
09ebc7c
Merge branch 'develop' into add-configurable-email-templates
Sep 17, 2025
f4a4f61
Merge branch 'develop' into add-configurable-email-templates
Sep 17, 2025
c3602ec
Merge branch 'develop' into add-configurable-email-templates
Sep 25, 2025
9124e43
fix email template create patch to deal with NULL array length
Sep 25, 2025
434a482
Merge branch 'develop' into add-configurable-email-templates
Sep 29, 2025
61adfb7
Merge branch 'develop' into add-configurable-email-templates
gnyiri Sep 29, 2025
eda5b1d
Merge branch 'develop' into add-configurable-email-templates
gnyiri Oct 1, 2025
587ad82
Merge branch 'develop' into add-configurable-email-templates
gnyiri Oct 1, 2025
5d66635
Merge branch 'develop' into add-configurable-email-templates
gnyiri Oct 2, 2025
8e0c4c3
Merge branch 'develop' into add-configurable-email-templates
gnyiri Oct 3, 2025
481d4b8
Merge branch 'develop' into add-configurable-email-templates
Oct 10, 2025
9cd5c9c
Merge branch 'develop' into add-configurable-email-templates
Oct 13, 2025
3bfb6bc
fix: change resetDb in statusActions.ts.cy
Oct 13, 2025
d561534
Merge branch 'develop' into add-configurable-email-templates
gnyiri Oct 15, 2025
6381bc5
Merge branch 'develop' into add-configurable-email-templates
gnyiri Oct 15, 2025
89d9645
Merge
Oct 28, 2025
bc4f54f
Merge
Nov 6, 2025
cdc1c05
Merge branch 'develop' into add-configurable-email-templates
Nov 17, 2025
b3fb8a6
fix: review comments
Nov 18, 2025
d2657ca
fix: build error
Nov 19, 2025
18f6995
Merge branch 'develop' into add-configurable-email-templates
gnyiri Nov 19, 2025
b599dc2
fix: review comments
Nov 24, 2025
4fc0ff7
Merge branch 'develop' into add-configurable-email-templates
Nov 24, 2025
23b7078
fix: email template delete
Nov 24, 2025
039f3c8
fix: backend test
Nov 24, 2025
60aa48c
fix: e2e tests
Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,7 @@ jobs:
EMAIL_AUTH_HOST: exchsmtp.stfc.ac.uk
EMAIL_TEMPLATE_PATH: /config/emails/
EMAIL_FOOTER_IMAGE_PATH: /config/logos/STFC-Logo-small.png
SKIP_SMTP_EMAIL_SENDING: true
EXTERNAL_AUTH_LOGIN_URL: http://localhost:9003/auth/Login.aspx
EXTERNAL_AUTH_LOGOUT_URL: http://localhost:9003/auth/Login.aspx
EXTERNAL_UOWS_API_URL: http://localhost:1080/users-service
Expand Down
100 changes: 100 additions & 0 deletions apps/backend/db_patches/0202_CreateEmailTemplatesTable.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
DO
$$
DECLARE
email_template_id_var int;
connection_loop_var record;
array_size_var int;
array_loop_var int;
template_name varchar(200);
BEGIN
IF register_patch('CreateEmailTemplatesTable.sql', 'Gergely Nyiri', 'Create email templates table', '2025-07-15') THEN

CREATE TABLE IF NOT EXISTS email_templates (
email_template_id serial PRIMARY KEY,
created_by INT NOT NULL REFERENCES users(user_id),
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
name varchar(100) NOT NULL UNIQUE,
description varchar(255) NOT NULL,
subject varchar(160) NOT NULL,
body text
);

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'CLF PI Co-I Submission Email', 'CLF PI Co-I Submission Email', '= `Proposal submitted`', 'Proposal submitted');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS PI Co-I Submission Email', 'ISIS PI Co-I Submission Email', '= `Proposal submitted`', 'Proposal submitted');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS Rapid PI Co-I Submission Email', 'ISIS Rapid PI Co-I Submission Email', '= `Proposal submitted`', 'Proposal submitted');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS Rapid User Office Submission Email', 'ISIS Rapid User Office Submission Email', '= `Proposal submitted`', 'Proposal submitted');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS Xpress PI Co-I Submission Email', 'ISIS Xpress PI Co-I Submission Email', '= `Proposal submitted`', 'Proposal submitted');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS Xpress Scientist Submission Email', 'ISIS Xpress Scientist Submission Email', '= `Proposal submitted`', 'Proposal submitted');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS Xpress PI Co-I Under Review Email', 'ISIS Xpress PI Co-I Under Review Email', '= `Proposal under review`', 'Proposal under review');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS Xpress PI Co-I Approval Email', 'ISIS Xpress PI Co-I Approval Email', '= `Proposal approved`', 'Proposal approved');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS Xpress SRA Request Email', 'ISIS Xpress SRA Request Email', '= `Proposal SRA request`', 'Proposal SRA request');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS Xpress PI Co-I Reject Email', 'ISIS Xpress PI Co-I Reject Email', '= `Proposal unsuccessful`', 'Proposal unsuccessful');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'ISIS Xpress PI Co-I Finish Email', 'ISIS Xpress PI Co-I Finish Email', '= `Proposal finished`', 'Proposal finished');

FOR connection_loop_var IN
SELECT * FROM workflow_connection_has_actions
LOOP
IF connection_loop_var.config IS NOT NULL THEN
SELECT jsonb_array_length(connection_loop_var.config->'recipientsWithEmailTemplate') INTO array_size_var;

IF array_size_var IS NULL THEN
array_size_var := 0;
END IF;

FOR array_loop_var IN 0..array_size_var-1 LOOP
SELECT connection_loop_var.config->'recipientsWithEmailTemplate'->array_loop_var->'emailTemplate'->>'name' INTO template_name;

IF template_name IS NOT NULL THEN
-- RAISE NOTICE 'Processing connection % % with template % to %', array_loop_var, connection_loop_var.connection_id, template_name, update_config;

SELECT email_templates.email_template_id INTO email_template_id_var FROM email_templates WHERE name = template_name;

IF email_template_id_var IS NOT NULL THEN
UPDATE workflow_connection_has_actions
SET config = jsonb_set(config::jsonb, ('{recipientsWithEmailTemplate, ' || array_loop_var || ', emailTemplate, id}')::text[], to_jsonb(email_template_id_var), false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good, as i can see instead of saving the hardcoded template id(ISIS Xpress PI Co-I Finish Email), we are going to save the primary key from the new table(email_templates)

Given that case, is it a good idea to go for a new table with foreign constraint for a safer transaction. This can exist only for smtp related operations and not for sparkpost. sparkpost can stay as it is.

with fk, it will be easy to handle deletion of email templates. for ex., if we delete an email template, we can add a cascading effect, so that the corresponding status actions will also be cleared with the email template.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we have more time, this can be done as a part of this PR. Or else, this can be taken up on the later phase.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am still struggling with the spark post emails. What should be the email template id in these cases? Should it be zero? If so, the validation will fail. In the recent update I use the unique template name for identifying templates instead of the template id because for Spark Post emails there is no associated db id.

WHERE connection_id = connection_loop_var.connection_id;
-- ELSE
-- RAISE WARNING 'No email template found for name %', template_name;
END IF;
-- ELSE
-- RAISE WARNING 'No email template found for connection %', template_name;
END IF;
END LOOP;
END IF;
END LOOP;
END IF;
END;
$$
LANGUAGE plpgsql;
15 changes: 15 additions & 0 deletions apps/backend/db_patches/db_seeds/0007_EmailTemplates.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
DO
$DO$
BEGIN

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'template-name-1', 'template-description-1', 'template-subject-1', 'template-body-1');

INSERT INTO email_templates (created_by, name, description, subject, body)
VALUES
(0, 'template-name-2', 'template-description-2', 'template-subject-2', 'template-body-2');

END;
$DO$
LANGUAGE plpgsql;
16 changes: 16 additions & 0 deletions apps/backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"@types/content-disposition": "^0.5.4",
"@types/cors": "^2.8.13",
"@types/cron": "^1.7.3",
"@types/ejs": "^3.1.5",
"@types/email-templates": "^8.0.4",
"@types/express": "^4.17.13",
"@types/express-jwt": "^6.0.4",
Expand All @@ -104,6 +105,7 @@
"@types/node": "^22.13.10",
"@types/pg": "^8.11.5",
"@types/pg-large-object": "^2.0.7",
"@types/pug": "^2.0.10",
"@types/sanitize-html": "^2.6.2",
"@types/simple-oauth2": "^4.1.1",
"@types/sinon": "^9.0.11",
Expand All @@ -129,4 +131,4 @@
"npm": ">=10.9.2",
"node": ">=22.0.0"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import 'reflect-metadata';
import { faker } from '@faker-js/faker';
import 'reflect-metadata';
import sinon from 'sinon';
import { container } from 'tsyringe';

import { Tokens } from '../../config/Tokens';
import { EmailTemplateId } from '../../eventHandlers/email/essEmailHandler';
import { EmailTemplateId } from '../../eventHandlers/email/emailTemplateId';
import { Invite } from '../../models/Invite';
import { RoleClaim } from '../../models/RoleClaim';
import { SettingsId } from '../../models/Settings';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ const checkInviteReminder = async () => {
try {
await mailService.sendMail({
content: {
template_id: templateId,
template: templateId,
},
substitution_data: {
email: invite.email,
Expand Down
4 changes: 4 additions & 0 deletions apps/backend/src/buildContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import PDFServices from './middlewares/factory/factoryServices';
import AdminMutations from './mutations/AdminMutations';
import CallMutations from './mutations/CallMutations';
import DataAccessUsersMutations from './mutations/DataAccessUsersMutations';
import EmailTemplateMutations from './mutations/EmailTemplateMutations';
import ExperimentMutations from './mutations/ExperimentMutation';
import ExperimentSafetyPdfTemplateMutations from './mutations/ExperimentSafetyPdfTemplateMutations';
import FapMutations from './mutations/FapMutations';
Expand Down Expand Up @@ -36,6 +37,7 @@ import WorkflowMutations from './mutations/WorkflowMutations';
import AdminQueries from './queries/AdminQueries';
import CallQueries from './queries/CallQueries';
import DataAccessUsersQueries from './queries/DataAccessUsersQueries';
import EmailTemplateQueries from './queries/EmailTemplateQueries';
import EventLogQueries from './queries/EventLogQueries';
import ExperimentQueries from './queries/ExperimentQueries';
import ExperimentSafetyPdfTemplateQueries from './queries/ExperimentSafetyPdfTemplateQueries';
Expand Down Expand Up @@ -104,6 +106,7 @@ const context: BasicResolverContext = {
settings: container.resolve(SettingsQueries),
tag: container.resolve(TagQueries),
experiment: container.resolve(ExperimentQueries),
emailTemplate: container.resolve(EmailTemplateQueries),
},
mutations: {
admin: container.resolve(AdminMutations),
Expand Down Expand Up @@ -137,6 +140,7 @@ const context: BasicResolverContext = {
workflow: container.resolve(WorkflowMutations),
tag: container.resolve(TagMutations),
experiment: container.resolve(ExperimentMutations),
emailTemplate: container.resolve(EmailTemplateMutations),
},
clients: {
scheduler: async () => {
Expand Down
1 change: 1 addition & 0 deletions apps/backend/src/config/Tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const Tokens = {
DataAccessUsersDataSource: Symbol('DataAccessUsersDataSource'),
DataAccessUsersAuthorization: Symbol('DataAccessUsersAuthorization'),
EmailEventHandler: Symbol('EmailEventHandler'),
EmailTemplateDataSource: Symbol('EmailTemplateDataSource'),
EventBus: Symbol('EventBus'),
EventLogsDataSource: Symbol('EventLogsDataSource'),
FeedbackDataSource: Symbol('FeedbackDataSource'),
Expand Down
2 changes: 2 additions & 0 deletions apps/backend/src/config/dependencyConfigDefault.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { PostgresAdminDataSourceWithAutoUpgrade } from '../datasources/postgres/
import PostgresCallDataSource from '../datasources/postgres/CallDataSource';
import PostgresCoProposerClaimDataSource from '../datasources/postgres/CoProposerClaimDataSource';
import PostgresDataAccessUsersDataSource from '../datasources/postgres/DataAccessUsersDataSource';
import PostgresEmailTemplateDataSource from '../datasources/postgres/EmailTemplateDataSource';
import PostgresEventLogsDataSource from '../datasources/postgres/EventLogsDataSource';
import PostgresExperimentDataSource from '../datasources/postgres/ExperimentDataSource';
import PostgresExperimentSafetyPdfTemplateDataSource from '../datasources/postgres/ExperimentSafetyPdfTemplateDataSource';
Expand Down Expand Up @@ -124,6 +125,7 @@ mapClass(Tokens.WorkflowDataSource, PostgresWorkflowDataSource);
mapClass(Tokens.StatusDataSource, PostgresStatusDataSource);
mapClass(Tokens.ExperimentDataSource, PostgresExperimentDataSource);
mapClass(Tokens.TagDataSource, PostgresTagDataSource);
mapClass(Tokens.EmailTemplateDataSource, PostgresEmailTemplateDataSource);

mapClass(Tokens.UserAuthorization, OAuthAuthorization);
mapClass(Tokens.ProposalAuthorization, ProposalAuthorization);
Expand Down
2 changes: 2 additions & 0 deletions apps/backend/src/config/dependencyConfigE2E.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import PostgresAdminDataSource from '../datasources/postgres/AdminDataSource';
import PostgresCallDataSource from '../datasources/postgres/CallDataSource';
import PostgresCoProposerClaimDataSource from '../datasources/postgres/CoProposerClaimDataSource';
import PostgresDataAccessUsersDataSource from '../datasources/postgres/DataAccessUsersDataSource';
import PostgresEmailTemplateDataSource from '../datasources/postgres/EmailTemplateDataSource';
import PostgresEventLogsDataSource from '../datasources/postgres/EventLogsDataSource';
import PostgresExperimentDataSource from '../datasources/postgres/ExperimentDataSource';
import PostgresExperimentSafetyPdfTemplateDataSource from '../datasources/postgres/ExperimentSafetyPdfTemplateDataSource';
Expand Down Expand Up @@ -114,6 +115,7 @@ mapClass(Tokens.StatusActionsLogsDataSource, StatusActionsLogsDataSource);
mapClass(Tokens.WorkflowDataSource, PostgresWorkflowDataSource);
mapClass(Tokens.StatusDataSource, PostgresStatusDataSource);
mapClass(Tokens.TagDataSource, PostgresTagDataSource);
mapClass(Tokens.EmailTemplateDataSource, PostgresEmailTemplateDataSource);

mapClass(Tokens.ExperimentDataSource, PostgresExperimentDataSource);
mapClass(Tokens.UserAuthorization, OAuthAuthorization);
Expand Down
2 changes: 2 additions & 0 deletions apps/backend/src/config/dependencyConfigELI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { PostgresAdminDataSourceWithAutoUpgrade } from '../datasources/postgres/
import PostgresCallDataSource from '../datasources/postgres/CallDataSource';
import PostgresCoProposerClaimDataSource from '../datasources/postgres/CoProposerClaimDataSource';
import PostgresDataAccessUsersDataSource from '../datasources/postgres/DataAccessUsersDataSource';
import PostgresEmailTemplateDataSource from '../datasources/postgres/EmailTemplateDataSource';
import PostgresEventLogsDataSource from '../datasources/postgres/EventLogsDataSource';
import PostgresExperimentDataSource from '../datasources/postgres/ExperimentDataSource';
import PostgresExperimentSafetyPdfTemplateDataSource from '../datasources/postgres/ExperimentSafetyPdfTemplateDataSource';
Expand Down Expand Up @@ -117,6 +118,7 @@ mapClass(Tokens.StatusActionsLogsDataSource, StatusActionsLogsDataSource);
mapClass(Tokens.WorkflowDataSource, PostgresWorkflowDataSource);
mapClass(Tokens.StatusDataSource, PostgresStatusDataSource);
mapClass(Tokens.TagDataSource, PostgresTagDataSource);
mapClass(Tokens.EmailTemplateDataSource, PostgresEmailTemplateDataSource);

mapClass(Tokens.ExperimentDataSource, PostgresExperimentDataSource);
mapClass(Tokens.UserAuthorization, OAuthAuthorization);
Expand Down
2 changes: 2 additions & 0 deletions apps/backend/src/config/dependencyConfigESS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { PostgresAdminDataSourceWithAutoUpgrade } from '../datasources/postgres/
import PostgresCallDataSource from '../datasources/postgres/CallDataSource';
import PostgresCoProposerClaimDataSource from '../datasources/postgres/CoProposerClaimDataSource';
import PostgresDataAccessUsersDataSource from '../datasources/postgres/DataAccessUsersDataSource';
import PostgresEmailTemplateDataSource from '../datasources/postgres/EmailTemplateDataSource';
import PostgresEventLogsDataSource from '../datasources/postgres/EventLogsDataSource';
import PostgresExperimentDataSource from '../datasources/postgres/ExperimentDataSource';
import PostgresExperimentSafetyPdfTemplateDataSource from '../datasources/postgres/ExperimentSafetyPdfTemplateDataSource';
Expand Down Expand Up @@ -118,6 +119,7 @@ mapClass(Tokens.TagDataSource, PostgresTagDataSource);
mapClass(Tokens.WorkflowDataSource, PostgresWorkflowDataSource);
mapClass(Tokens.StatusDataSource, PostgresStatusDataSource);
mapClass(Tokens.ExperimentDataSource, PostgresExperimentDataSource);
mapClass(Tokens.EmailTemplateDataSource, PostgresEmailTemplateDataSource);

mapClass(Tokens.UserAuthorization, OAuthAuthorization);
mapClass(Tokens.ProposalAuthorization, ProposalAuthorization);
Expand Down
2 changes: 2 additions & 0 deletions apps/backend/src/config/dependencyConfigSTFC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { PostgresAdminDataSourceWithAutoUpgrade } from '../datasources/postgres/
import PostgresCallDataSource from '../datasources/postgres/CallDataSource';
import PostgresCoProposerClaimDataSource from '../datasources/postgres/CoProposerClaimDataSource';
import PostgresDataAccessUsersDataSource from '../datasources/postgres/DataAccessUsersDataSource';
import PostgresEmailTemplateDataSource from '../datasources/postgres/EmailTemplateDataSource';
import PostgresEventLogsDataSource from '../datasources/postgres/EventLogsDataSource';
import PostgresExperimentDataSource from '../datasources/postgres/ExperimentDataSource';
import PostgresExperimentSafetyPdfTemplateDataSource from '../datasources/postgres/ExperimentSafetyPdfTemplateDataSource';
Expand Down Expand Up @@ -114,6 +115,7 @@ mapClass(Tokens.StatusActionsLogsDataSource, StatusActionsLogsDataSource);
mapClass(Tokens.WorkflowDataSource, PostgresWorkflowDataSource);
mapClass(Tokens.StatusDataSource, PostgresStatusDataSource);
mapClass(Tokens.TagDataSource, PostgresTagDataSource);
mapClass(Tokens.EmailTemplateDataSource, PostgresEmailTemplateDataSource);

mapClass(Tokens.ExperimentDataSource, PostgresExperimentDataSource);
mapClass(Tokens.UserAuthorization, StfcUserAuthorization);
Expand Down
2 changes: 2 additions & 0 deletions apps/backend/src/config/dependencyConfigTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { AdminDataSourceMock } from '../datasources/mockups/AdminDataSource';
import { CallDataSourceMock } from '../datasources/mockups/CallDataSource';
import { CoProposerClaimDataSourceMock } from '../datasources/mockups/CoProposerClaimDataSource';
import MockDataAccessUsersDataSource from '../datasources/mockups/DataAccessUsersDataSource';
import { EmailTemplateDataSourceMock } from '../datasources/mockups/EmailTemplateDataSource';
import { EventLogsDataSourceMock } from '../datasources/mockups/EventLogsDataSource';
import { ExperimentDataSourceMock } from '../datasources/mockups/ExperimentDataSource';
import { ExperimentSafetyPdfTemplateDataSourceMock } from '../datasources/mockups/ExperimentSafetyPdfTemplateDataSource';
Expand Down Expand Up @@ -106,6 +107,7 @@ mapClass(Tokens.VisitRegistrationAuthorization, VisitRegistrationAuthorization);
mapClass(Tokens.PredefinedMessageDataSource, PredefinedMessageDataSourceMock);
mapClass(Tokens.StatusActionsLogsDataSource, StatusActionsLogsDataSourceMock);
mapClass(Tokens.TagDataSource, TagDataSourceMock);
mapClass(Tokens.EmailTemplateDataSource, EmailTemplateDataSourceMock);

mapClass(Tokens.UserAuthorization, UserAuthorizationMock);
mapClass(Tokens.ProposalAuthorization, ProposalAuthorization);
Expand Down
Loading
Loading