@dynamatix/gb-schemas 2.0.5 → 2.0.7

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.
@@ -1,14 +1,13 @@
1
1
  import { ApplicationEntity } from '../applications/application.entity';
2
2
  import { LookupEntity } from '../shared/lookup.entity';
3
- import { RiskNarrativeEntity } from './risk-narrative.entity';
4
3
  import { OtherIncomeEntity } from './other-income.entity';
5
- import { IncomeSourceEntity } from './applicant-income-source.entity';
6
4
  import { ApplicantExpenditureEntity } from './applicant-expenditure.entity';
7
5
  import { ApplicantCreditProfileEntity } from './applicant-credit-profile.entity';
8
6
  import { PropertyIncomeEntity } from './property-income.entity';
9
7
  import { ApplicantIncomeEntity } from './applicant-income.entity';
10
8
  import { ApplicantCreditDataEntity } from './applicant-credit-data.entity';
11
9
  import { ApplicantEmploymentEntity } from './applicant-employment.entity';
10
+ import { ApplicantIncomeSourceEntity } from './applicant-income-source.entity';
12
11
 
13
12
  export class ApplicantEntity {
14
13
  id!: string;
@@ -123,9 +122,8 @@ export class ApplicantEntity {
123
122
 
124
123
  // Nested schemas
125
124
  creditData?: ApplicantCreditDataEntity;
126
- riskNarrative?: RiskNarrativeEntity;
127
125
  otherIncome?: OtherIncomeEntity;
128
- incomeSource?: IncomeSourceEntity;
126
+ incomeSource?: ApplicantIncomeSourceEntity;
129
127
  expenditure?: ApplicantExpenditureEntity;
130
128
  creditProfile?: ApplicantCreditProfileEntity;
131
129
  propertyIncome?: PropertyIncomeEntity;
@@ -1,14 +1,14 @@
1
- import { ApprivoSyncJourneyModel } from './apprivo-sync-journey.model';
1
+
2
2
  import { LookupEntity } from './lookup.entity';
3
3
  import { JobRunEntity } from './job-run.entity';
4
4
 
5
- export class ApprivoSyncJourneyEntity implements ApprivoSyncJourneyModel {
5
+ export class ApprivoSyncJourneyEntity {
6
6
  id!: string;
7
7
  applicationId!: string;
8
8
  milestoneLid?: string;
9
9
  mileStoneStatus!: 'Completed' | 'Errored' | 'Not Applicable';
10
10
  error?: string;
11
- isFirstPull!: string;
11
+ isFirstPull!: boolean;
12
12
  jobRunId?: string;
13
13
  startTime?: Date;
14
14
  endTime?: Date;
@@ -1,12 +1,19 @@
1
- export class JobRunEntity {
1
+ import { JobRunModel } from './job-run.model';
2
+ import { ApprivoSyncJourneyEntity } from './apprivo-sync-journey.entity';
3
+
4
+ export class JobRunEntity implements JobRunModel {
2
5
  id!: string;
3
6
  jobName!: string;
4
- status!: string;
5
- startedAt!: Date;
6
- completedAt?: Date;
7
+ status!: 'Running' | 'Completed' | 'Errored';
8
+ error?: string;
9
+ startTime?: Date;
10
+ endTime?: Date;
7
11
  createdAt!: Date;
8
12
  updatedAt!: Date;
9
13
 
14
+ // Relations
15
+ apprivoSyncJourneys?: ApprivoSyncJourneyEntity[];
16
+
10
17
  constructor(partial: Partial<JobRunEntity>) {
11
18
  Object.assign(this, partial);
12
19
  }
@@ -0,0 +1,10 @@
1
+ export interface JobRunModel {
2
+ id: string;
3
+ jobName: string;
4
+ status: 'Running' | 'Completed' | 'Errored';
5
+ error?: string;
6
+ startTime?: Date;
7
+ endTime?: Date;
8
+ createdAt: Date;
9
+ updatedAt: Date;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamatix/gb-schemas",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "All the schemas for gatehouse bank back-end",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,9 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - Changed the type of `is_first_pull` on the `apprivo_sync_journeys` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
5
+
6
+ */
7
+ -- AlterTable
8
+ ALTER TABLE "apprivo_sync_journeys" DROP COLUMN "is_first_pull",
9
+ ADD COLUMN "is_first_pull" BOOLEAN NOT NULL;
@@ -0,0 +1,13 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `completed_at` on the `job_runs` table. All the data in the column will be lost.
5
+ - You are about to drop the column `started_at` on the `job_runs` table. All the data in the column will be lost.
6
+
7
+ */
8
+ -- AlterTable
9
+ ALTER TABLE "job_runs" DROP COLUMN "completed_at",
10
+ DROP COLUMN "started_at",
11
+ ADD COLUMN "end_time" TIMESTAMP(3),
12
+ ADD COLUMN "error" TEXT,
13
+ ADD COLUMN "start_time" TIMESTAMP(3);