Skip to content

Commit

Permalink
Merge branch '10391-dynamo-migrations-kysely-aurora-rds-tokens' of gi…
Browse files Browse the repository at this point in the history
…thub.com:flexion/ef-cms into 10391-dynamo-migrations-kysely-aurora-rds-tokens
  • Loading branch information
codyseibert committed Oct 2, 2024
2 parents 8bc2e41 + 8004db0 commit fb527e9
Show file tree
Hide file tree
Showing 51 changed files with 58 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_STATUS_TYPES,
CASE_TYPES_MAP,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_TYPES_MAP,
CONTACT_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable max-lines */
import '@web-api/persistence/postgres/cases/mocks.jest';
jest.mock('@shared/business/entities/Message.ts');
jest.mock('@shared/business/entities/CaseDeadline');
jest.mock('@web-api/persistence/postgres/messages/getMessagesByDocketNumber');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../shared/src/test/mockCase';
import { applicationContext } from '../../../../shared/src/business/test/createTestApplicationContext';
import { mockDocketClerkUser } from '@shared/test/mockAuthUsers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_DOCUMENTS } from '../../../../../shared/src/test/mockDocketEntry';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import {
CASE_STATUS_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../shared/src/test/mockLock';
import { ROLES } from '../../../../shared/src/business/entities/EntityConstants';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CONTACT_TYPES,
ROLES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_TYPES_MAP,
CONTACT_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
import { ServiceUnavailableError } from '@web-api/errors/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
import { ServiceUnavailableError } from '@web-api/errors/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
AUTOMATIC_BLOCKED_REASONS,
CHIEF_JUDGE,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { AUTOMATIC_BLOCKED_REASONS } from '../../../../../shared/src/business/entities/EntityConstants';
import { MOCK_CASE_WITHOUT_PENDING } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { AuthUser } from '@shared/business/entities/authUser/AuthUser';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
import { ServiceUnavailableError } from '@web-api/errors/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
import { ServiceUnavailableError } from '@web-api/errors/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { CASE_TYPES_MAP } from '../../../../../shared/src/business/entities/EntityConstants';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
import { ServiceUnavailableError } from '@web-api/errors/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
import { ServiceUnavailableError } from '@web-api/errors/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import { CASE_STATUS_TYPES } from '../../../../shared/src/business/entities/EntityConstants';
import { MOCK_CASE } from '../../../../shared/src/test/mockCase';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { Correspondence } from '../../../../../shared/src/business/entities/Correspondence';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
import { ServiceUnavailableError } from '@web-api/errors/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import {
CASE_STATUS_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_TYPES_MAP,
CONTACT_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
import { ServiceUnavailableError } from '@web-api/errors/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import {
AUTOMATIC_BLOCKED_REASONS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_SERVICES_SUPERVISOR_SECTION,
DOCKET_SECTION,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
import { ServiceUnavailableError } from '@web-api/errors/errors';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
DOCKET_SECTION,
DOCUMENT_SERVED_MESSAGES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { Case } from '../../../../../shared/src/business/entities/cases/Case';
import {
DOCKET_SECTION,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_STATUS_TYPES,
DOCKET_NUMBER_SUFFIXES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '@shared/test/mockLock';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
AUTOMATIC_BLOCKED_REASONS,
CASE_STATUS_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_TYPES_MAP,
CONTACT_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_TYPES_MAP,
CONTACT_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable max-lines */
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import {
CASE_STATUS_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import {
CASE_STATUS_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
MOCK_CASE,
MOCK_ELIGIBLE_CASE_WITH_PRACTITIONERS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import {
CASE_STATUS_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import { MOCK_LOCK } from '../../../../../shared/src/test/mockLock';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_STATUS_TYPES,
TRIAL_SESSION_PROCEEDING_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import { MOCK_CASE } from '../../../../../shared/src/test/mockCase';
import {
MOCK_TRIAL_INPERSON,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import {
CASE_STATUS_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
CASE_STATUS_TYPES,
CONTACT_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable max-lines */
import '@web-api/persistence/postgres/cases/mocks.jest';
import '@web-api/persistence/postgres/messages/mocks.jest';
import {
CASE_STATUS_TYPES,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
DOCKET_NUMBER_SUFFIXES,
DOCKET_SECTION,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import '@web-api/persistence/postgres/cases/mocks.jest';
import {
DOCKET_NUMBER_SUFFIXES,
DOCKET_SECTION,
Expand Down
5 changes: 4 additions & 1 deletion web-api/src/persistence/postgres/cases/upsertCase.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { calculateDate } from '@shared/business/utilities/DateHandler';
import { getDbWriter } from '@web-api/database';

export const upsertCase = async ({ rawCase }: { rawCase: RawCase }) => {
Expand All @@ -7,7 +8,9 @@ export const upsertCase = async ({ rawCase }: { rawCase: RawCase }) => {
docketNumberSuffix: rawCase.docketNumberSuffix,
leadDocketNumber: rawCase.leadDocketNumber,
status: rawCase.status,
trialDate: rawCase.trialDate,
trialDate: rawCase.trialDate
? calculateDate({ dateString: rawCase.trialDate })
: undefined,
trialLocation: rawCase.trialLocation,
};
await getDbWriter(writer =>
Expand Down
5 changes: 4 additions & 1 deletion web-api/src/persistence/postgres/cases/upsertCases.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { calculateDate } from '@shared/business/utilities/DateHandler';
import { getDbWriter } from '@web-api/database';

export const upsertCases = async (rawCases: RawCase[]) => {
Expand All @@ -9,7 +10,9 @@ export const upsertCases = async (rawCases: RawCase[]) => {
docketNumberSuffix: rawCase.docketNumberSuffix,
leadDocketNumber: rawCase.leadDocketNumber,
status: rawCase.status,
trialDate: rawCase.trialDate,
trialDate: rawCase.trialDate
? calculateDate({ dateString: rawCase.trialDate })
: undefined,
trialLocation: rawCase.trialLocation,
}));

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Message } from '@shared/business/entities/Message';
import { calculateISODate } from '@shared/business/utilities/DateHandler';
import { calculateDate } from '@shared/business/utilities/DateHandler';
import { getDbReader } from '@web-api/database';
import { messageResultEntity } from '@web-api/persistence/postgres/messages/mapper';

Expand All @@ -8,7 +8,7 @@ export const getCompletedUserInboxMessages = async ({
}: {
userId: string;
}): Promise<Message[]> => {
const filterDate = calculateISODate({ howMuch: -7 });
const filterDate = calculateDate({ howMuch: -7 });

const messages = await getDbReader(reader =>
reader
Expand Down

0 comments on commit fb527e9

Please sign in to comment.