From d8e8560a27a61ff34e41b4513811e7a112bdd1a2 Mon Sep 17 00:00:00 2001 From: Maikel Maas Date: Tue, 2 Apr 2024 12:12:42 +0200 Subject: [PATCH] fix: made party origin mandatory in the *Args types --- packages/contact-manager/src/types/IContactManager.ts | 2 +- packages/data-store/src/entities/contact/PartyTypeEntity.ts | 2 +- packages/data-store/src/types/contact/IAbstractContactStore.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/contact-manager/src/types/IContactManager.ts b/packages/contact-manager/src/types/IContactManager.ts index 65221913f..c1f9dfe73 100644 --- a/packages/contact-manager/src/types/IContactManager.ts +++ b/packages/contact-manager/src/types/IContactManager.ts @@ -120,7 +120,7 @@ export type UpdateRelationshipArgs = { export type AddContactTypeArgs = { type: ContactTypeEnum - origin?: PartyOrigin + origin: PartyOrigin name: string tenantId: string description?: string diff --git a/packages/data-store/src/entities/contact/PartyTypeEntity.ts b/packages/data-store/src/entities/contact/PartyTypeEntity.ts index a73d7ac10..cc37216ff 100644 --- a/packages/data-store/src/entities/contact/PartyTypeEntity.ts +++ b/packages/data-store/src/entities/contact/PartyTypeEntity.ts @@ -25,7 +25,7 @@ export class PartyTypeEntity { type!: PartyTypeEnum @Column('simple-enum', { name: 'origin', enum: PartyOrigin, default: 'external', nullable: false, unique: false }) - origin: PartyOrigin + origin!: PartyOrigin @Column({ name: 'name', length: 255, nullable: false, unique: true }) @IsNotEmpty({ message: 'Blank names are not allowed' }) diff --git a/packages/data-store/src/types/contact/IAbstractContactStore.ts b/packages/data-store/src/types/contact/IAbstractContactStore.ts index ca3e97039..b54ad487b 100644 --- a/packages/data-store/src/types/contact/IAbstractContactStore.ts +++ b/packages/data-store/src/types/contact/IAbstractContactStore.ts @@ -96,7 +96,7 @@ export type UpdateRelationshipArgs = { export type AddPartyTypeArgs = { type: PartyTypeEnum - origin?: PartyOrigin + origin: PartyOrigin name: string tenantId: string description?: string