Skip to content

Commit

Permalink
Merge pull request #186 from Sphereon-Opensource/develop
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
nklomp authored Apr 24, 2024
2 parents cff5ae5 + ee14e3a commit 68ab9b8
Show file tree
Hide file tree
Showing 12 changed files with 231 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
NonPersistedIdentity,
NonPersistedPhysicalAddress,
Party,
PartyOrigin,
PartyRelationship,
PartyTypeEnum,
PhysicalAddress,
Expand All @@ -35,6 +36,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'default_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.external,
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
name: 'example_name',
},
Expand Down Expand Up @@ -142,6 +144,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'new_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.internal,
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
name: 'new_name',
description: 'new_description',
Expand Down Expand Up @@ -170,6 +173,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
const result: Party = await agent.cmAddContact(contact)

expect(result.partyType.type).toEqual(contact.contactType.type)
expect(result.partyType.origin).toEqual(contact.contactType.origin)
expect(result.partyType.name).toEqual(contact.contactType.name)
expect(result.partyType.description).toEqual(contact.contactType.description)
expect((<NaturalPerson>result.contact).firstName).toEqual(contact.firstName)
Expand Down Expand Up @@ -317,6 +321,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'relation_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.internal,
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d285',
name: 'relation_contact_type_name',
description: 'new_description',
Expand Down Expand Up @@ -361,6 +366,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'remove_relation_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.external,
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d286',
name: 'remove_relation_contact_type_name',
description: 'new_description',
Expand Down Expand Up @@ -410,6 +416,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'add_electronic_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.internal,
tenantId: 'a85a8aa0-fdeb-4c00-b22e-60423f52a873',
name: 'add_electronic_address_name',
description: 'add_electronic_address_description',
Expand Down Expand Up @@ -438,6 +445,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'get_electronic_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.external,
tenantId: 'f2947075-53eb-4176-b155-ab4b18715288',
name: 'get_electronic_address_name',
description: 'get_electronic_address_description',
Expand Down Expand Up @@ -465,6 +473,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'get_all_electronic_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.internal,
tenantId: '5c0157ec-4678-4273-8f53-413bc6435134',
name: 'get_all_electronic_address_name',
description: 'get_all_electronic_address_description',
Expand Down Expand Up @@ -493,6 +502,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'update_electronic_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.external,
tenantId: '6b64c3dd-cf40-4919-b8b8-2ec3c510c5b7',
name: 'update_electronic_address_name',
description: 'update_electronic_address_description',
Expand Down Expand Up @@ -528,6 +538,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'remove_electronic_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.external,
tenantId: '41b45c65-971e-4c26-8115-cb8bc7c67cf3',
name: 'remove_electronic_address_name',
description: 'remove_electronic_address_description',
Expand Down Expand Up @@ -561,6 +572,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'add_physical_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.internal,
tenantId: '5aeb828e-16d6-4244-95a7-e12424474eb7',
name: 'add_physical_address_name',
description: 'add_physical_address_description',
Expand Down Expand Up @@ -595,6 +607,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'get_physical_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.external,
tenantId: '7c5dbbd9-1721-4246-b261-44e237560a15',
name: 'get_physical_address_name',
description: 'get_physical_address_description',
Expand Down Expand Up @@ -628,6 +641,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'get_all_physical_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.internal,
tenantId: '0c0eafd8-1e8c-44bf-8e0d-768fb11a40c3',
name: 'get_all_physical_address_name',
description: 'get_all_physical_address_description',
Expand Down Expand Up @@ -662,6 +676,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'update_physical_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.internal,
tenantId: 'f2b4eb1c-e36f-4863-90b3-90720471c397',
name: 'update_physical_address_name',
description: 'update_physical_address_description',
Expand Down Expand Up @@ -715,6 +730,7 @@ export default (testContext: { getAgent: () => ConfiguredAgent; setup: () => Pro
displayName: 'remove_physical_address_display_name',
contactType: {
type: PartyTypeEnum.NATURAL_PERSON,
origin: PartyOrigin.internal,
tenantId: '20b11d1e-6489-4258-af33-32a2cfa4dc85',
name: 'remove_physical_address_name',
description: 'remove_physical_address_description',
Expand Down
2 changes: 2 additions & 0 deletions packages/contact-manager/src/types/IContactManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import {
NonPersistedPartyType as NonPersistedContactType,
NonPersistedPhysicalAddress,
Party as Contact,
PartyOrigin,
PartyRelationship as ContactRelationship,
PartyType as ContactType,
PartyTypeEnum as ContactTypeEnum,
Expand Down Expand Up @@ -119,6 +120,7 @@ export type UpdateRelationshipArgs = {

export type AddContactTypeArgs = {
type: ContactTypeEnum
origin: PartyOrigin
name: string
tenantId: string
description?: string
Expand Down
Loading

0 comments on commit 68ab9b8

Please sign in to comment.