@sphereon/ssi-sdk.data-store 0.23.5-next.11 → 0.23.5-next.22

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.
Files changed (36) hide show
  1. package/dist/contact/ContactStore.js +10 -10
  2. package/dist/contact/ContactStore.js.map +1 -1
  3. package/dist/entities/contact/ConnectionEntity.d.ts +2 -2
  4. package/dist/entities/contact/ConnectionEntity.d.ts.map +1 -1
  5. package/dist/entities/contact/ConnectionEntity.js +1 -1
  6. package/dist/entities/contact/ConnectionEntity.js.map +1 -1
  7. package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +2 -2
  8. package/dist/entities/contact/CorrelationIdentifierEntity.js +1 -1
  9. package/dist/entities/contact/IdentityEntity.d.ts +2 -2
  10. package/dist/entities/contact/IdentityEntity.d.ts.map +1 -1
  11. package/dist/entities/contact/IdentityEntity.js.map +1 -1
  12. package/dist/entities/contact/PartyTypeEntity.d.ts +2 -2
  13. package/dist/entities/contact/PartyTypeEntity.js +2 -2
  14. package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts.map +1 -1
  15. package/dist/migrations/postgres/1690925872592-CreateContacts.js +4 -3
  16. package/dist/migrations/postgres/1690925872592-CreateContacts.js.map +1 -1
  17. package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts.map +1 -1
  18. package/dist/migrations/sqlite/1690925872693-CreateContacts.js +3 -2
  19. package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -1
  20. package/dist/types/contact/IAbstractContactStore.d.ts +2 -2
  21. package/dist/types/contact/contact.d.ts +14 -14
  22. package/dist/types/contact/contact.d.ts.map +1 -1
  23. package/dist/types/contact/contact.js +25 -25
  24. package/dist/types/contact/contact.js.map +1 -1
  25. package/package.json +4 -4
  26. package/src/__tests__/contact.entities.test.ts +141 -141
  27. package/src/__tests__/contact.store.test.ts +198 -198
  28. package/src/contact/ContactStore.ts +15 -15
  29. package/src/entities/contact/ConnectionEntity.ts +3 -3
  30. package/src/entities/contact/CorrelationIdentifierEntity.ts +3 -3
  31. package/src/entities/contact/IdentityEntity.ts +2 -2
  32. package/src/entities/contact/PartyTypeEntity.ts +4 -4
  33. package/src/migrations/postgres/1690925872592-CreateContacts.ts +6 -3
  34. package/src/migrations/sqlite/1690925872693-CreateContacts.ts +5 -2
  35. package/src/types/contact/IAbstractContactStore.ts +2 -2
  36. package/src/types/contact/contact.ts +15 -15
@@ -2,7 +2,7 @@ import { DataSource } from 'typeorm'
2
2
  import { DataStoreContactEntities, DataStoreMigrations, PartyOrigin } from '../index'
3
3
  import { ContactStore } from '../contact/ContactStore'
4
4
  import {
5
- CorrelationIdentifierEnum,
5
+ CorrelationIdentifierType,
6
6
  ElectronicAddress,
7
7
  GetElectronicAddressesArgs,
8
8
  GetIdentitiesArgs,
@@ -10,7 +10,7 @@ import {
10
10
  GetPhysicalAddressesArgs,
11
11
  GetRelationshipsArgs,
12
12
  Identity,
13
- IdentityRoleEnum,
13
+ IdentityRole,
14
14
  NaturalPerson,
15
15
  NonPersistedElectronicAddress,
16
16
  NonPersistedIdentity,
@@ -22,7 +22,7 @@ import {
22
22
  Party,
23
23
  PartyRelationship,
24
24
  PartyType,
25
- PartyTypeEnum,
25
+ PartyTypeType,
26
26
  PhysicalAddress,
27
27
  } from '../types'
28
28
 
@@ -53,8 +53,8 @@ describe('Contact store tests', (): void => {
53
53
  const party: NonPersistedParty = {
54
54
  uri: 'example.com',
55
55
  partyType: {
56
- type: PartyTypeEnum.NATURAL_PERSON,
57
- origin: PartyOrigin.internal,
56
+ type: PartyTypeType.NATURAL_PERSON,
57
+ origin: PartyOrigin.INTERNAL,
58
58
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
59
59
  name: 'example_name',
60
60
  },
@@ -84,8 +84,8 @@ describe('Contact store tests', (): void => {
84
84
  const party1: NonPersistedParty = {
85
85
  uri: 'example.com',
86
86
  partyType: {
87
- type: PartyTypeEnum.NATURAL_PERSON,
88
- origin: PartyOrigin.internal,
87
+ type: PartyTypeType.NATURAL_PERSON,
88
+ origin: PartyOrigin.INTERNAL,
89
89
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
90
90
  name: 'example_name1',
91
91
  },
@@ -102,8 +102,8 @@ describe('Contact store tests', (): void => {
102
102
  const party2: NonPersistedParty = {
103
103
  uri: 'example.com',
104
104
  partyType: {
105
- type: PartyTypeEnum.NATURAL_PERSON,
106
- origin: PartyOrigin.internal,
105
+ type: PartyTypeType.NATURAL_PERSON,
106
+ origin: PartyOrigin.INTERNAL,
107
107
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
108
108
  name: 'example_name2',
109
109
  },
@@ -127,8 +127,8 @@ describe('Contact store tests', (): void => {
127
127
  const party: NonPersistedParty = {
128
128
  uri: 'example.com',
129
129
  partyType: {
130
- type: PartyTypeEnum.NATURAL_PERSON,
131
- origin: PartyOrigin.internal,
130
+ type: PartyTypeType.NATURAL_PERSON,
131
+ origin: PartyOrigin.INTERNAL,
132
132
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
133
133
  name: 'example_name',
134
134
  },
@@ -175,8 +175,8 @@ describe('Contact store tests', (): void => {
175
175
  const party: NonPersistedParty = {
176
176
  uri: 'example.com',
177
177
  partyType: {
178
- type: PartyTypeEnum.NATURAL_PERSON,
179
- origin: PartyOrigin.internal,
178
+ type: PartyTypeType.NATURAL_PERSON,
179
+ origin: PartyOrigin.INTERNAL,
180
180
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
181
181
  name: 'example_name',
182
182
  },
@@ -189,25 +189,25 @@ describe('Contact store tests', (): void => {
189
189
  identities: [
190
190
  {
191
191
  alias: 'test_alias1',
192
- roles: [IdentityRoleEnum.ISSUER],
192
+ roles: [IdentityRole.ISSUER],
193
193
  identifier: {
194
- type: CorrelationIdentifierEnum.DID,
194
+ type: CorrelationIdentifierType.DID,
195
195
  correlationId: 'example_did1',
196
196
  },
197
197
  },
198
198
  {
199
199
  alias: 'test_alias2',
200
- roles: [IdentityRoleEnum.VERIFIER],
200
+ roles: [IdentityRole.VERIFIER],
201
201
  identifier: {
202
- type: CorrelationIdentifierEnum.DID,
202
+ type: CorrelationIdentifierType.DID,
203
203
  correlationId: 'example_did2',
204
204
  },
205
205
  },
206
206
  {
207
207
  alias: 'test_alias3',
208
- roles: [IdentityRoleEnum.HOLDER],
208
+ roles: [IdentityRole.HOLDER],
209
209
  identifier: {
210
- type: CorrelationIdentifierEnum.DID,
210
+ type: CorrelationIdentifierType.DID,
211
211
  correlationId: 'example_did3',
212
212
  },
213
213
  },
@@ -243,8 +243,8 @@ describe('Contact store tests', (): void => {
243
243
  const party: NonPersistedParty = {
244
244
  uri: 'example.com',
245
245
  partyType: {
246
- type: PartyTypeEnum.NATURAL_PERSON,
247
- origin: PartyOrigin.internal,
246
+ type: PartyTypeType.NATURAL_PERSON,
247
+ origin: PartyOrigin.INTERNAL,
248
248
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
249
249
  name: 'something',
250
250
  },
@@ -287,8 +287,8 @@ describe('Contact store tests', (): void => {
287
287
  const party: NonPersistedParty = {
288
288
  uri: 'example.com',
289
289
  partyType: {
290
- type: PartyTypeEnum.NATURAL_PERSON,
291
- origin: PartyOrigin.internal,
290
+ type: PartyTypeType.NATURAL_PERSON,
291
+ origin: PartyOrigin.INTERNAL,
292
292
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
293
293
  name: 'example_name',
294
294
  },
@@ -321,8 +321,8 @@ describe('Contact store tests', (): void => {
321
321
  const party: NonPersistedParty = {
322
322
  uri: 'example.com',
323
323
  partyType: {
324
- type: PartyTypeEnum.NATURAL_PERSON,
325
- origin: PartyOrigin.internal,
324
+ type: PartyTypeType.NATURAL_PERSON,
325
+ origin: PartyOrigin.INTERNAL,
326
326
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
327
327
  name: 'example_name',
328
328
  },
@@ -373,8 +373,8 @@ describe('Contact store tests', (): void => {
373
373
  const party: NonPersistedParty = {
374
374
  uri: 'example.com',
375
375
  partyType: {
376
- type: PartyTypeEnum.NATURAL_PERSON,
377
- origin: PartyOrigin.internal,
376
+ type: PartyTypeType.NATURAL_PERSON,
377
+ origin: PartyOrigin.INTERNAL,
378
378
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
379
379
  name: 'example_name',
380
380
  },
@@ -399,8 +399,8 @@ describe('Contact store tests', (): void => {
399
399
  const party: NonPersistedParty = {
400
400
  uri: 'example.com',
401
401
  partyType: {
402
- type: PartyTypeEnum.NATURAL_PERSON,
403
- origin: PartyOrigin.internal,
402
+ type: PartyTypeType.NATURAL_PERSON,
403
+ origin: PartyOrigin.INTERNAL,
404
404
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
405
405
  name: 'example_name',
406
406
  },
@@ -413,17 +413,17 @@ describe('Contact store tests', (): void => {
413
413
  identities: [
414
414
  {
415
415
  alias: 'test_alias1',
416
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
416
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
417
417
  identifier: {
418
- type: CorrelationIdentifierEnum.DID,
418
+ type: CorrelationIdentifierType.DID,
419
419
  correlationId: 'example_did1',
420
420
  },
421
421
  },
422
422
  {
423
423
  alias: 'test_alias2',
424
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
424
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
425
425
  identifier: {
426
- type: CorrelationIdentifierEnum.DID,
426
+ type: CorrelationIdentifierType.DID,
427
427
  correlationId: 'example_did2',
428
428
  },
429
429
  },
@@ -443,8 +443,8 @@ describe('Contact store tests', (): void => {
443
443
  const party: NonPersistedParty = {
444
444
  uri: 'example.com',
445
445
  partyType: {
446
- type: PartyTypeEnum.NATURAL_PERSON,
447
- origin: PartyOrigin.internal,
446
+ type: PartyTypeType.NATURAL_PERSON,
447
+ origin: PartyOrigin.INTERNAL,
448
448
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
449
449
  name: 'something',
450
450
  },
@@ -457,17 +457,17 @@ describe('Contact store tests', (): void => {
457
457
  identities: [
458
458
  {
459
459
  alias: 'test_alias1',
460
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
460
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
461
461
  identifier: {
462
- type: CorrelationIdentifierEnum.URL,
462
+ type: CorrelationIdentifierType.URL,
463
463
  correlationId: 'example_did1',
464
464
  },
465
465
  },
466
466
  {
467
467
  alias: 'test_alias2',
468
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
468
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
469
469
  identifier: {
470
- type: CorrelationIdentifierEnum.DID,
470
+ type: CorrelationIdentifierType.DID,
471
471
  correlationId: 'example_did2',
472
472
  },
473
473
  },
@@ -481,8 +481,8 @@ describe('Contact store tests', (): void => {
481
481
  const party: NonPersistedParty = {
482
482
  uri: 'example.com',
483
483
  partyType: {
484
- type: PartyTypeEnum.NATURAL_PERSON,
485
- origin: PartyOrigin.internal,
484
+ type: PartyTypeType.NATURAL_PERSON,
485
+ origin: PartyOrigin.INTERNAL,
486
486
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
487
487
  name: 'example_name',
488
488
  },
@@ -498,9 +498,9 @@ describe('Contact store tests', (): void => {
498
498
 
499
499
  const identity1: NonPersistedIdentity = {
500
500
  alias: 'test_alias1',
501
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
501
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
502
502
  identifier: {
503
- type: CorrelationIdentifierEnum.DID,
503
+ type: CorrelationIdentifierType.DID,
504
504
  correlationId: 'example_did1',
505
505
  },
506
506
  }
@@ -509,9 +509,9 @@ describe('Contact store tests', (): void => {
509
509
 
510
510
  const identity2: NonPersistedIdentity = {
511
511
  alias: 'test_alias2',
512
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
512
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
513
513
  identifier: {
514
- type: CorrelationIdentifierEnum.DID,
514
+ type: CorrelationIdentifierType.DID,
515
515
  correlationId: 'example_did2',
516
516
  },
517
517
  }
@@ -539,8 +539,8 @@ describe('Contact store tests', (): void => {
539
539
  const party: NonPersistedParty = {
540
540
  uri: 'example.com',
541
541
  partyType: {
542
- type: PartyTypeEnum.NATURAL_PERSON,
543
- origin: PartyOrigin.internal,
542
+ type: PartyTypeType.NATURAL_PERSON,
543
+ origin: PartyOrigin.INTERNAL,
544
544
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
545
545
  name: 'example_name',
546
546
  },
@@ -572,8 +572,8 @@ describe('Contact store tests', (): void => {
572
572
  const party: NonPersistedParty = {
573
573
  uri: 'example.com',
574
574
  partyType: {
575
- type: PartyTypeEnum.NATURAL_PERSON,
576
- origin: PartyOrigin.internal,
575
+ type: PartyTypeType.NATURAL_PERSON,
576
+ origin: PartyOrigin.INTERNAL,
577
577
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
578
578
  name: 'example_name',
579
579
  },
@@ -589,9 +589,9 @@ describe('Contact store tests', (): void => {
589
589
 
590
590
  const identity: NonPersistedIdentity = {
591
591
  alias: 'test_alias',
592
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
592
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
593
593
  identifier: {
594
- type: CorrelationIdentifierEnum.DID,
594
+ type: CorrelationIdentifierType.DID,
595
595
  correlationId: 'example_did',
596
596
  },
597
597
  }
@@ -607,8 +607,8 @@ describe('Contact store tests', (): void => {
607
607
  const party: NonPersistedParty = {
608
608
  uri: 'example.com',
609
609
  partyType: {
610
- type: PartyTypeEnum.NATURAL_PERSON,
611
- origin: PartyOrigin.internal,
610
+ type: PartyTypeType.NATURAL_PERSON,
611
+ origin: PartyOrigin.INTERNAL,
612
612
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
613
613
  name: 'example_name',
614
614
  },
@@ -624,9 +624,9 @@ describe('Contact store tests', (): void => {
624
624
 
625
625
  const identity: NonPersistedIdentity = {
626
626
  alias: 'test_alias',
627
- roles: [IdentityRoleEnum.HOLDER],
627
+ roles: [IdentityRole.HOLDER],
628
628
  identifier: {
629
- type: CorrelationIdentifierEnum.DID,
629
+ type: CorrelationIdentifierType.DID,
630
630
  correlationId: 'example_did',
631
631
  },
632
632
  }
@@ -648,8 +648,8 @@ describe('Contact store tests', (): void => {
648
648
  const party: NonPersistedParty = {
649
649
  uri: 'example.com',
650
650
  partyType: {
651
- type: PartyTypeEnum.NATURAL_PERSON,
652
- origin: PartyOrigin.internal,
651
+ type: PartyTypeType.NATURAL_PERSON,
652
+ origin: PartyOrigin.INTERNAL,
653
653
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
654
654
  name: 'example_name',
655
655
  },
@@ -665,9 +665,9 @@ describe('Contact store tests', (): void => {
665
665
 
666
666
  const identity1: NonPersistedIdentity = {
667
667
  alias: 'test_alias1',
668
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
668
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
669
669
  identifier: {
670
- type: CorrelationIdentifierEnum.DID,
670
+ type: CorrelationIdentifierType.DID,
671
671
  correlationId: 'example_did1',
672
672
  },
673
673
  }
@@ -676,9 +676,9 @@ describe('Contact store tests', (): void => {
676
676
 
677
677
  const identity2: NonPersistedIdentity = {
678
678
  alias: 'test_alias2',
679
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
679
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
680
680
  identifier: {
681
- type: CorrelationIdentifierEnum.DID,
681
+ type: CorrelationIdentifierType.DID,
682
682
  correlationId: 'example_did2',
683
683
  },
684
684
  }
@@ -698,8 +698,8 @@ describe('Contact store tests', (): void => {
698
698
  const party: NonPersistedParty = {
699
699
  uri: 'example.com',
700
700
  partyType: {
701
- type: PartyTypeEnum.NATURAL_PERSON,
702
- origin: PartyOrigin.internal,
701
+ type: PartyTypeType.NATURAL_PERSON,
702
+ origin: PartyOrigin.INTERNAL,
703
703
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
704
704
  name: 'example_name',
705
705
  },
@@ -715,9 +715,9 @@ describe('Contact store tests', (): void => {
715
715
 
716
716
  const identity1: NonPersistedIdentity = {
717
717
  alias: 'test_alias1',
718
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
718
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
719
719
  identifier: {
720
- type: CorrelationIdentifierEnum.DID,
720
+ type: CorrelationIdentifierType.DID,
721
721
  correlationId: 'example_did1',
722
722
  },
723
723
  }
@@ -726,9 +726,9 @@ describe('Contact store tests', (): void => {
726
726
 
727
727
  const identity2: NonPersistedIdentity = {
728
728
  alias: 'test_alias2',
729
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
729
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
730
730
  identifier: {
731
- type: CorrelationIdentifierEnum.DID,
731
+ type: CorrelationIdentifierType.DID,
732
732
  correlationId: 'example_did2',
733
733
  },
734
734
  }
@@ -744,8 +744,8 @@ describe('Contact store tests', (): void => {
744
744
  const party: NonPersistedParty = {
745
745
  uri: 'example.com',
746
746
  partyType: {
747
- type: PartyTypeEnum.NATURAL_PERSON,
748
- origin: PartyOrigin.internal,
747
+ type: PartyTypeType.NATURAL_PERSON,
748
+ origin: PartyOrigin.INTERNAL,
749
749
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
750
750
  name: 'example_name',
751
751
  },
@@ -762,9 +762,9 @@ describe('Contact store tests', (): void => {
762
762
  const alias = 'test_alias1'
763
763
  const identity1: NonPersistedIdentity = {
764
764
  alias,
765
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
765
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
766
766
  identifier: {
767
- type: CorrelationIdentifierEnum.DID,
767
+ type: CorrelationIdentifierType.DID,
768
768
  correlationId: 'example_did1',
769
769
  },
770
770
  }
@@ -773,9 +773,9 @@ describe('Contact store tests', (): void => {
773
773
 
774
774
  const identity2: NonPersistedIdentity = {
775
775
  alias: 'test_alias2',
776
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
776
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
777
777
  identifier: {
778
- type: CorrelationIdentifierEnum.DID,
778
+ type: CorrelationIdentifierType.DID,
779
779
  correlationId: 'example_did2',
780
780
  },
781
781
  }
@@ -795,8 +795,8 @@ describe('Contact store tests', (): void => {
795
795
  const party: NonPersistedParty = {
796
796
  uri: 'example.com',
797
797
  partyType: {
798
- type: PartyTypeEnum.NATURAL_PERSON,
799
- origin: PartyOrigin.internal,
798
+ type: PartyTypeType.NATURAL_PERSON,
799
+ origin: PartyOrigin.INTERNAL,
800
800
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
801
801
  name: 'example_name',
802
802
  },
@@ -813,9 +813,9 @@ describe('Contact store tests', (): void => {
813
813
  const alias = 'test_alias1'
814
814
  const identity1: NonPersistedIdentity = {
815
815
  alias,
816
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
816
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
817
817
  identifier: {
818
- type: CorrelationIdentifierEnum.DID,
818
+ type: CorrelationIdentifierType.DID,
819
819
  correlationId: 'example_did1',
820
820
  },
821
821
  metadata: [
@@ -846,8 +846,8 @@ describe('Contact store tests', (): void => {
846
846
  const party: NonPersistedParty = {
847
847
  uri: 'example.com',
848
848
  partyType: {
849
- type: PartyTypeEnum.NATURAL_PERSON,
850
- origin: PartyOrigin.internal,
849
+ type: PartyTypeType.NATURAL_PERSON,
850
+ origin: PartyOrigin.INTERNAL,
851
851
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
852
852
  name: 'example_name',
853
853
  },
@@ -863,9 +863,9 @@ describe('Contact store tests', (): void => {
863
863
 
864
864
  const identity: NonPersistedIdentity = {
865
865
  alias: 'test_alias',
866
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
866
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
867
867
  identifier: {
868
- type: CorrelationIdentifierEnum.DID,
868
+ type: CorrelationIdentifierType.DID,
869
869
  correlationId: 'example_did',
870
870
  },
871
871
  }
@@ -886,8 +886,8 @@ describe('Contact store tests', (): void => {
886
886
  const party: NonPersistedParty = {
887
887
  uri: 'example.com',
888
888
  partyType: {
889
- type: PartyTypeEnum.NATURAL_PERSON,
890
- origin: PartyOrigin.internal,
889
+ type: PartyTypeType.NATURAL_PERSON,
890
+ origin: PartyOrigin.INTERNAL,
891
891
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
892
892
  name: 'example_name',
893
893
  },
@@ -904,9 +904,9 @@ describe('Contact store tests', (): void => {
904
904
  const correlationId = 'missing_connection_example'
905
905
  const identity: NonPersistedIdentity = {
906
906
  alias: correlationId,
907
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
907
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
908
908
  identifier: {
909
- type: CorrelationIdentifierEnum.URL,
909
+ type: CorrelationIdentifierType.URL,
910
910
  correlationId,
911
911
  },
912
912
  }
@@ -920,8 +920,8 @@ describe('Contact store tests', (): void => {
920
920
  const party: NonPersistedParty = {
921
921
  uri: 'example.com',
922
922
  partyType: {
923
- type: PartyTypeEnum.NATURAL_PERSON,
924
- origin: PartyOrigin.internal,
923
+ type: PartyTypeType.NATURAL_PERSON,
924
+ origin: PartyOrigin.INTERNAL,
925
925
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
926
926
  name: 'example_name',
927
927
  },
@@ -938,14 +938,14 @@ describe('Contact store tests', (): void => {
938
938
  const correlationId = 'missing_connection_example'
939
939
  const identity: NonPersistedIdentity = {
940
940
  alias: correlationId,
941
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER, IdentityRoleEnum.HOLDER],
941
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER, IdentityRole.HOLDER],
942
942
  identifier: {
943
- type: CorrelationIdentifierEnum.DID,
943
+ type: CorrelationIdentifierType.DID,
944
944
  correlationId,
945
945
  },
946
946
  }
947
947
  const storedIdentity: Identity = await contactStore.addIdentity({ partyId: savedParty.id, identity })
948
- storedIdentity.identifier = { ...storedIdentity.identifier, type: CorrelationIdentifierEnum.URL }
948
+ storedIdentity.identifier = { ...storedIdentity.identifier, type: CorrelationIdentifierType.URL }
949
949
 
950
950
  await expect(contactStore.updateIdentity({ identity: storedIdentity })).rejects.toThrow(
951
951
  `Identity with correlation type url should contain a connection`,
@@ -956,8 +956,8 @@ describe('Contact store tests', (): void => {
956
956
  const party: NonPersistedParty = {
957
957
  uri: 'example.com',
958
958
  partyType: {
959
- type: PartyTypeEnum.NATURAL_PERSON,
960
- origin: PartyOrigin.internal,
959
+ type: PartyTypeType.NATURAL_PERSON,
960
+ origin: PartyOrigin.INTERNAL,
961
961
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
962
962
  name: 'example_name',
963
963
  },
@@ -973,9 +973,9 @@ describe('Contact store tests', (): void => {
973
973
 
974
974
  const identity: NonPersistedIdentity = {
975
975
  alias: 'example_did',
976
- roles: [IdentityRoleEnum.ISSUER, IdentityRoleEnum.VERIFIER],
976
+ roles: [IdentityRole.ISSUER, IdentityRole.VERIFIER],
977
977
  identifier: {
978
- type: CorrelationIdentifierEnum.DID,
978
+ type: CorrelationIdentifierType.DID,
979
979
  correlationId: 'example_did',
980
980
  },
981
981
  }
@@ -994,8 +994,8 @@ describe('Contact store tests', (): void => {
994
994
  const party: NonPersistedParty = {
995
995
  uri: 'example.com',
996
996
  partyType: {
997
- type: PartyTypeEnum.NATURAL_PERSON,
998
- origin: PartyOrigin.internal,
997
+ type: PartyTypeType.NATURAL_PERSON,
998
+ origin: PartyOrigin.INTERNAL,
999
999
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1000
1000
  name: 'example_name',
1001
1001
  },
@@ -1008,25 +1008,25 @@ describe('Contact store tests', (): void => {
1008
1008
  identities: [
1009
1009
  {
1010
1010
  alias: 'test_alias1',
1011
- roles: [IdentityRoleEnum.VERIFIER],
1011
+ roles: [IdentityRole.VERIFIER],
1012
1012
  identifier: {
1013
- type: CorrelationIdentifierEnum.DID,
1013
+ type: CorrelationIdentifierType.DID,
1014
1014
  correlationId: 'example_did1',
1015
1015
  },
1016
1016
  },
1017
1017
  {
1018
1018
  alias: 'test_alias2',
1019
- roles: [IdentityRoleEnum.ISSUER],
1019
+ roles: [IdentityRole.ISSUER],
1020
1020
  identifier: {
1021
- type: CorrelationIdentifierEnum.DID,
1021
+ type: CorrelationIdentifierType.DID,
1022
1022
  correlationId: 'example_did2',
1023
1023
  },
1024
1024
  },
1025
1025
  {
1026
1026
  alias: 'test_alias3',
1027
- roles: [IdentityRoleEnum.HOLDER],
1027
+ roles: [IdentityRole.HOLDER],
1028
1028
  identifier: {
1029
- type: CorrelationIdentifierEnum.DID,
1029
+ type: CorrelationIdentifierType.DID,
1030
1030
  correlationId: 'example_did3',
1031
1031
  },
1032
1032
  },
@@ -1038,15 +1038,15 @@ describe('Contact store tests', (): void => {
1038
1038
 
1039
1039
  expect(result.roles).toBeDefined()
1040
1040
  expect(result.roles.length).toEqual(3)
1041
- expect(result.roles).toEqual([IdentityRoleEnum.VERIFIER, IdentityRoleEnum.ISSUER, IdentityRoleEnum.HOLDER])
1041
+ expect(result.roles).toEqual([IdentityRole.VERIFIER, IdentityRole.ISSUER, IdentityRole.HOLDER])
1042
1042
  })
1043
1043
 
1044
1044
  it('should add relationship', async (): Promise<void> => {
1045
1045
  const party1: NonPersistedParty = {
1046
1046
  uri: 'example1.com',
1047
1047
  partyType: {
1048
- type: PartyTypeEnum.NATURAL_PERSON,
1049
- origin: PartyOrigin.internal,
1048
+ type: PartyTypeType.NATURAL_PERSON,
1049
+ origin: PartyOrigin.INTERNAL,
1050
1050
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1051
1051
  name: 'example_name1',
1052
1052
  },
@@ -1063,8 +1063,8 @@ describe('Contact store tests', (): void => {
1063
1063
  const party2: NonPersistedParty = {
1064
1064
  uri: 'example2.com',
1065
1065
  partyType: {
1066
- type: PartyTypeEnum.NATURAL_PERSON,
1067
- origin: PartyOrigin.external,
1066
+ type: PartyTypeType.NATURAL_PERSON,
1067
+ origin: PartyOrigin.EXTERNAL,
1068
1068
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1069
1069
  name: 'example_name2',
1070
1070
  },
@@ -1096,8 +1096,8 @@ describe('Contact store tests', (): void => {
1096
1096
  const party1: NonPersistedParty = {
1097
1097
  uri: 'example1.com',
1098
1098
  partyType: {
1099
- type: PartyTypeEnum.NATURAL_PERSON,
1100
- origin: PartyOrigin.internal,
1099
+ type: PartyTypeType.NATURAL_PERSON,
1100
+ origin: PartyOrigin.INTERNAL,
1101
1101
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1102
1102
  name: 'example_name1',
1103
1103
  },
@@ -1114,8 +1114,8 @@ describe('Contact store tests', (): void => {
1114
1114
  const party2: NonPersistedParty = {
1115
1115
  uri: 'example2.com',
1116
1116
  partyType: {
1117
- type: PartyTypeEnum.NATURAL_PERSON,
1118
- origin: PartyOrigin.internal,
1117
+ type: PartyTypeType.NATURAL_PERSON,
1118
+ origin: PartyOrigin.INTERNAL,
1119
1119
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1120
1120
  name: 'example_name2',
1121
1121
  },
@@ -1152,8 +1152,8 @@ describe('Contact store tests', (): void => {
1152
1152
  const party1: NonPersistedParty = {
1153
1153
  uri: 'example1.com',
1154
1154
  partyType: {
1155
- type: PartyTypeEnum.NATURAL_PERSON,
1156
- origin: PartyOrigin.internal,
1155
+ type: PartyTypeType.NATURAL_PERSON,
1156
+ origin: PartyOrigin.INTERNAL,
1157
1157
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1158
1158
  name: 'example_name1',
1159
1159
  },
@@ -1170,8 +1170,8 @@ describe('Contact store tests', (): void => {
1170
1170
  const party2: NonPersistedParty = {
1171
1171
  uri: 'example2.com',
1172
1172
  partyType: {
1173
- type: PartyTypeEnum.NATURAL_PERSON,
1174
- origin: PartyOrigin.internal,
1173
+ type: PartyTypeType.NATURAL_PERSON,
1174
+ origin: PartyOrigin.INTERNAL,
1175
1175
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1176
1176
  name: 'example_name2',
1177
1177
  },
@@ -1207,8 +1207,8 @@ describe('Contact store tests', (): void => {
1207
1207
  const party1: NonPersistedParty = {
1208
1208
  uri: 'example1.com',
1209
1209
  partyType: {
1210
- type: PartyTypeEnum.NATURAL_PERSON,
1211
- origin: PartyOrigin.internal,
1210
+ type: PartyTypeType.NATURAL_PERSON,
1211
+ origin: PartyOrigin.INTERNAL,
1212
1212
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1213
1213
  name: 'example_name1',
1214
1214
  },
@@ -1225,8 +1225,8 @@ describe('Contact store tests', (): void => {
1225
1225
  const party2: NonPersistedParty = {
1226
1226
  uri: 'example2.com',
1227
1227
  partyType: {
1228
- type: PartyTypeEnum.NATURAL_PERSON,
1229
- origin: PartyOrigin.internal,
1228
+ type: PartyTypeType.NATURAL_PERSON,
1229
+ origin: PartyOrigin.INTERNAL,
1230
1230
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1231
1231
  name: 'example_name2',
1232
1232
  },
@@ -1271,8 +1271,8 @@ describe('Contact store tests', (): void => {
1271
1271
  const party1: NonPersistedParty = {
1272
1272
  uri: 'example1.com',
1273
1273
  partyType: {
1274
- type: PartyTypeEnum.NATURAL_PERSON,
1275
- origin: PartyOrigin.internal,
1274
+ type: PartyTypeType.NATURAL_PERSON,
1275
+ origin: PartyOrigin.INTERNAL,
1276
1276
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1277
1277
  name: 'example_name1',
1278
1278
  },
@@ -1289,8 +1289,8 @@ describe('Contact store tests', (): void => {
1289
1289
  const party2: NonPersistedParty = {
1290
1290
  uri: 'example2.com',
1291
1291
  partyType: {
1292
- type: PartyTypeEnum.NATURAL_PERSON,
1293
- origin: PartyOrigin.external,
1292
+ type: PartyTypeType.NATURAL_PERSON,
1293
+ origin: PartyOrigin.EXTERNAL,
1294
1294
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1295
1295
  name: 'example_name2',
1296
1296
  },
@@ -1342,8 +1342,8 @@ describe('Contact store tests', (): void => {
1342
1342
  const party1: NonPersistedParty = {
1343
1343
  uri: 'example1.com',
1344
1344
  partyType: {
1345
- type: PartyTypeEnum.NATURAL_PERSON,
1346
- origin: PartyOrigin.internal,
1345
+ type: PartyTypeType.NATURAL_PERSON,
1346
+ origin: PartyOrigin.INTERNAL,
1347
1347
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1348
1348
  name: 'example_name1',
1349
1349
  },
@@ -1360,8 +1360,8 @@ describe('Contact store tests', (): void => {
1360
1360
  const party2: NonPersistedParty = {
1361
1361
  uri: 'example2.com',
1362
1362
  partyType: {
1363
- type: PartyTypeEnum.NATURAL_PERSON,
1364
- origin: PartyOrigin.external,
1363
+ type: PartyTypeType.NATURAL_PERSON,
1364
+ origin: PartyOrigin.EXTERNAL,
1365
1365
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1366
1366
  name: 'example_name2',
1367
1367
  },
@@ -1378,8 +1378,8 @@ describe('Contact store tests', (): void => {
1378
1378
  const party3: NonPersistedParty = {
1379
1379
  uri: 'example3.com',
1380
1380
  partyType: {
1381
- type: PartyTypeEnum.NATURAL_PERSON,
1382
- origin: PartyOrigin.internal,
1381
+ type: PartyTypeType.NATURAL_PERSON,
1382
+ origin: PartyOrigin.INTERNAL,
1383
1383
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d287',
1384
1384
  name: 'example_name3',
1385
1385
  },
@@ -1418,8 +1418,8 @@ describe('Contact store tests', (): void => {
1418
1418
  const party1: NonPersistedParty = {
1419
1419
  uri: 'example1.com',
1420
1420
  partyType: {
1421
- type: PartyTypeEnum.NATURAL_PERSON,
1422
- origin: PartyOrigin.external,
1421
+ type: PartyTypeType.NATURAL_PERSON,
1422
+ origin: PartyOrigin.EXTERNAL,
1423
1423
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1424
1424
  name: 'example_name1',
1425
1425
  },
@@ -1436,8 +1436,8 @@ describe('Contact store tests', (): void => {
1436
1436
  const party2: NonPersistedParty = {
1437
1437
  uri: 'example2.com',
1438
1438
  partyType: {
1439
- type: PartyTypeEnum.NATURAL_PERSON,
1440
- origin: PartyOrigin.internal,
1439
+ type: PartyTypeType.NATURAL_PERSON,
1440
+ origin: PartyOrigin.INTERNAL,
1441
1441
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1442
1442
  name: 'example_name2',
1443
1443
  },
@@ -1473,8 +1473,8 @@ describe('Contact store tests', (): void => {
1473
1473
  const party1: NonPersistedParty = {
1474
1474
  uri: 'example1.com',
1475
1475
  partyType: {
1476
- type: PartyTypeEnum.NATURAL_PERSON,
1477
- origin: PartyOrigin.external,
1476
+ type: PartyTypeType.NATURAL_PERSON,
1477
+ origin: PartyOrigin.EXTERNAL,
1478
1478
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1479
1479
  name: 'example_name1',
1480
1480
  },
@@ -1491,8 +1491,8 @@ describe('Contact store tests', (): void => {
1491
1491
  const party2: NonPersistedParty = {
1492
1492
  uri: 'example2.com',
1493
1493
  partyType: {
1494
- type: PartyTypeEnum.NATURAL_PERSON,
1495
- origin: PartyOrigin.internal,
1494
+ type: PartyTypeType.NATURAL_PERSON,
1495
+ origin: PartyOrigin.INTERNAL,
1496
1496
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1497
1497
  name: 'example_name2',
1498
1498
  },
@@ -1527,8 +1527,8 @@ describe('Contact store tests', (): void => {
1527
1527
  const party1: NonPersistedParty = {
1528
1528
  uri: 'example1.com',
1529
1529
  partyType: {
1530
- type: PartyTypeEnum.NATURAL_PERSON,
1531
- origin: PartyOrigin.external,
1530
+ type: PartyTypeType.NATURAL_PERSON,
1531
+ origin: PartyOrigin.EXTERNAL,
1532
1532
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1533
1533
  name: 'example_name1',
1534
1534
  },
@@ -1545,8 +1545,8 @@ describe('Contact store tests', (): void => {
1545
1545
  const party2: NonPersistedParty = {
1546
1546
  uri: 'example2.com',
1547
1547
  partyType: {
1548
- type: PartyTypeEnum.NATURAL_PERSON,
1549
- origin: PartyOrigin.external,
1548
+ type: PartyTypeType.NATURAL_PERSON,
1549
+ origin: PartyOrigin.EXTERNAL,
1550
1550
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1551
1551
  name: 'example_name2',
1552
1552
  },
@@ -1579,8 +1579,8 @@ describe('Contact store tests', (): void => {
1579
1579
 
1580
1580
  it('should add party type', async (): Promise<void> => {
1581
1581
  const partyType: NonPersistedPartyType = {
1582
- type: PartyTypeEnum.NATURAL_PERSON,
1583
- origin: PartyOrigin.external,
1582
+ type: PartyTypeType.NATURAL_PERSON,
1583
+ origin: PartyOrigin.EXTERNAL,
1584
1584
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1585
1585
  name: 'example_name',
1586
1586
  description: 'example_description',
@@ -1601,8 +1601,8 @@ describe('Contact store tests', (): void => {
1601
1601
 
1602
1602
  it('should get party types by filter', async (): Promise<void> => {
1603
1603
  const partyType1: NonPersistedPartyType = {
1604
- type: PartyTypeEnum.NATURAL_PERSON,
1605
- origin: PartyOrigin.external,
1604
+ type: PartyTypeType.NATURAL_PERSON,
1605
+ origin: PartyOrigin.EXTERNAL,
1606
1606
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1607
1607
  name: 'example_name1',
1608
1608
  description: 'example_description1',
@@ -1611,8 +1611,8 @@ describe('Contact store tests', (): void => {
1611
1611
  expect(savedPartyType1).toBeDefined()
1612
1612
 
1613
1613
  const partyType2: NonPersistedPartyType = {
1614
- type: PartyTypeEnum.NATURAL_PERSON,
1615
- origin: PartyOrigin.external,
1614
+ type: PartyTypeType.NATURAL_PERSON,
1615
+ origin: PartyOrigin.EXTERNAL,
1616
1616
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d287',
1617
1617
  name: 'example_name2',
1618
1618
  description: 'example_description2',
@@ -1623,7 +1623,7 @@ describe('Contact store tests', (): void => {
1623
1623
  const result: Array<PartyType> = await contactStore.getPartyTypes({
1624
1624
  filter: [
1625
1625
  {
1626
- type: PartyTypeEnum.NATURAL_PERSON,
1626
+ type: PartyTypeType.NATURAL_PERSON,
1627
1627
  name: 'example_name1',
1628
1628
  description: 'example_description1',
1629
1629
  },
@@ -1636,8 +1636,8 @@ describe('Contact store tests', (): void => {
1636
1636
 
1637
1637
  it('should return no party types if filter does not match', async (): Promise<void> => {
1638
1638
  const partyType1: NonPersistedPartyType = {
1639
- type: PartyTypeEnum.NATURAL_PERSON,
1640
- origin: PartyOrigin.internal,
1639
+ type: PartyTypeType.NATURAL_PERSON,
1640
+ origin: PartyOrigin.INTERNAL,
1641
1641
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1642
1642
  name: 'example_name1',
1643
1643
  description: 'example_description1',
@@ -1646,8 +1646,8 @@ describe('Contact store tests', (): void => {
1646
1646
  expect(savedPartyType1).toBeDefined()
1647
1647
 
1648
1648
  const partyType2: NonPersistedPartyType = {
1649
- type: PartyTypeEnum.NATURAL_PERSON,
1650
- origin: PartyOrigin.internal,
1649
+ type: PartyTypeType.NATURAL_PERSON,
1650
+ origin: PartyOrigin.INTERNAL,
1651
1651
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d287',
1652
1652
  name: 'example_name2',
1653
1653
  description: 'example_description2',
@@ -1658,7 +1658,7 @@ describe('Contact store tests', (): void => {
1658
1658
  const result: Array<PartyType> = await contactStore.getPartyTypes({
1659
1659
  filter: [
1660
1660
  {
1661
- type: PartyTypeEnum.NATURAL_PERSON,
1661
+ type: PartyTypeType.NATURAL_PERSON,
1662
1662
  name: 'unknown_name',
1663
1663
  description: 'unknown_description',
1664
1664
  },
@@ -1671,8 +1671,8 @@ describe('Contact store tests', (): void => {
1671
1671
 
1672
1672
  it('should throw error when updating party type with unknown id', async (): Promise<void> => {
1673
1673
  const partyType: NonPersistedPartyType = {
1674
- type: PartyTypeEnum.NATURAL_PERSON,
1675
- origin: PartyOrigin.internal,
1674
+ type: PartyTypeType.NATURAL_PERSON,
1675
+ origin: PartyOrigin.INTERNAL,
1676
1676
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1677
1677
  name: 'example_name',
1678
1678
  description: 'example_description',
@@ -1692,8 +1692,8 @@ describe('Contact store tests', (): void => {
1692
1692
 
1693
1693
  it('should update party type by id', async (): Promise<void> => {
1694
1694
  const partyType: NonPersistedPartyType = {
1695
- type: PartyTypeEnum.NATURAL_PERSON,
1696
- origin: PartyOrigin.external,
1695
+ type: PartyTypeType.NATURAL_PERSON,
1696
+ origin: PartyOrigin.EXTERNAL,
1697
1697
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1698
1698
  name: 'example_name',
1699
1699
  description: 'example_description',
@@ -1721,8 +1721,8 @@ describe('Contact store tests', (): void => {
1721
1721
 
1722
1722
  it('should remove party type', async (): Promise<void> => {
1723
1723
  const partyType: NonPersistedPartyType = {
1724
- type: PartyTypeEnum.NATURAL_PERSON,
1725
- origin: PartyOrigin.internal,
1724
+ type: PartyTypeType.NATURAL_PERSON,
1725
+ origin: PartyOrigin.INTERNAL,
1726
1726
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1727
1727
  name: 'example_name',
1728
1728
  description: 'example_description',
@@ -1734,23 +1734,23 @@ describe('Contact store tests', (): void => {
1734
1734
  expect(resultPartyType).toBeDefined()
1735
1735
 
1736
1736
  const includingMigrationPartyTypes: Array<PartyType> = await contactStore.getPartyTypes()
1737
- // We are checking for 2 types here as we include the one from the migrations
1738
- expect(includingMigrationPartyTypes.length).toEqual(2)
1737
+ // We are checking for 3 types here as we include the ones from the migrations
1738
+ expect(includingMigrationPartyTypes.length).toEqual(3)
1739
1739
 
1740
1740
  await contactStore.removePartyType({ partyTypeId: savedPartyType.id })
1741
1741
 
1742
1742
  const result: Array<PartyType> = await contactStore.getPartyTypes()
1743
1743
 
1744
1744
  expect(result).toBeDefined()
1745
- expect(result.length).toEqual(1)
1745
+ expect(result.length).toEqual(2)
1746
1746
  })
1747
1747
 
1748
1748
  it('should throw error when removing party type attached to contact', async (): Promise<void> => {
1749
1749
  const party: NonPersistedParty = {
1750
1750
  uri: 'example.com',
1751
1751
  partyType: {
1752
- type: PartyTypeEnum.NATURAL_PERSON,
1753
- origin: PartyOrigin.external,
1752
+ type: PartyTypeType.NATURAL_PERSON,
1753
+ origin: PartyOrigin.EXTERNAL,
1754
1754
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1755
1755
  name: 'example_name',
1756
1756
  },
@@ -1771,8 +1771,8 @@ describe('Contact store tests', (): void => {
1771
1771
 
1772
1772
  it('Should save party with existing party type', async (): Promise<void> => {
1773
1773
  const partyType: NonPersistedPartyType = {
1774
- type: PartyTypeEnum.NATURAL_PERSON,
1775
- origin: PartyOrigin.internal,
1774
+ type: PartyTypeType.NATURAL_PERSON,
1775
+ origin: PartyOrigin.INTERNAL,
1776
1776
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1777
1777
  name: 'example_name',
1778
1778
  }
@@ -1802,8 +1802,8 @@ describe('Contact store tests', (): void => {
1802
1802
  })
1803
1803
 
1804
1804
  it('should throw error when adding person party with wrong contact type', async (): Promise<void> => {
1805
- const partyType = PartyTypeEnum.ORGANIZATION
1806
- const partyTypeOrigin = PartyOrigin.internal
1805
+ const partyType = PartyTypeType.ORGANIZATION
1806
+ const partyTypeOrigin = PartyOrigin.INTERNAL
1807
1807
  const party: NonPersistedParty = {
1808
1808
  uri: 'example.com',
1809
1809
  partyType: {
@@ -1824,8 +1824,8 @@ describe('Contact store tests', (): void => {
1824
1824
  })
1825
1825
 
1826
1826
  it('should throw error when adding organization party with wrong contact type', async (): Promise<void> => {
1827
- const partyType = PartyTypeEnum.NATURAL_PERSON
1828
- const partyTypeOrigin = PartyOrigin.external
1827
+ const partyType = PartyTypeType.NATURAL_PERSON
1828
+ const partyTypeOrigin = PartyOrigin.EXTERNAL
1829
1829
  const party: NonPersistedParty = {
1830
1830
  uri: 'example.com',
1831
1831
  partyType: {
@@ -1847,8 +1847,8 @@ describe('Contact store tests', (): void => {
1847
1847
  const party: NonPersistedParty = {
1848
1848
  uri: 'example.com',
1849
1849
  partyType: {
1850
- type: PartyTypeEnum.NATURAL_PERSON,
1851
- origin: PartyOrigin.internal,
1850
+ type: PartyTypeType.NATURAL_PERSON,
1851
+ origin: PartyOrigin.INTERNAL,
1852
1852
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1853
1853
  name: 'example_name',
1854
1854
  },
@@ -1886,8 +1886,8 @@ describe('Contact store tests', (): void => {
1886
1886
  const party: NonPersistedParty = {
1887
1887
  uri: 'example.com',
1888
1888
  partyType: {
1889
- type: PartyTypeEnum.NATURAL_PERSON,
1890
- origin: PartyOrigin.external,
1889
+ type: PartyTypeType.NATURAL_PERSON,
1890
+ origin: PartyOrigin.EXTERNAL,
1891
1891
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1892
1892
  name: 'example_name',
1893
1893
  },
@@ -1934,8 +1934,8 @@ describe('Contact store tests', (): void => {
1934
1934
  const party: NonPersistedParty = {
1935
1935
  uri: 'example.com',
1936
1936
  partyType: {
1937
- type: PartyTypeEnum.NATURAL_PERSON,
1938
- origin: PartyOrigin.internal,
1937
+ type: PartyTypeType.NATURAL_PERSON,
1938
+ origin: PartyOrigin.INTERNAL,
1939
1939
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1940
1940
  name: 'example_name',
1941
1941
  },
@@ -1978,8 +1978,8 @@ describe('Contact store tests', (): void => {
1978
1978
  const party: NonPersistedParty = {
1979
1979
  uri: 'example.com',
1980
1980
  partyType: {
1981
- type: PartyTypeEnum.NATURAL_PERSON,
1982
- origin: PartyOrigin.external,
1981
+ type: PartyTypeType.NATURAL_PERSON,
1982
+ origin: PartyOrigin.EXTERNAL,
1983
1983
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1984
1984
  name: 'example_name',
1985
1985
  },
@@ -2027,8 +2027,8 @@ describe('Contact store tests', (): void => {
2027
2027
  const party: NonPersistedParty = {
2028
2028
  uri: 'example.com',
2029
2029
  partyType: {
2030
- type: PartyTypeEnum.NATURAL_PERSON,
2031
- origin: PartyOrigin.internal,
2030
+ type: PartyTypeType.NATURAL_PERSON,
2031
+ origin: PartyOrigin.INTERNAL,
2032
2032
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2033
2033
  name: 'example_name',
2034
2034
  },
@@ -2057,8 +2057,8 @@ describe('Contact store tests', (): void => {
2057
2057
  const party: NonPersistedParty = {
2058
2058
  uri: 'example.com',
2059
2059
  partyType: {
2060
- type: PartyTypeEnum.NATURAL_PERSON,
2061
- origin: PartyOrigin.external,
2060
+ type: PartyTypeType.NATURAL_PERSON,
2061
+ origin: PartyOrigin.EXTERNAL,
2062
2062
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2063
2063
  name: 'example_name',
2064
2064
  },
@@ -2091,8 +2091,8 @@ describe('Contact store tests', (): void => {
2091
2091
  const party: NonPersistedParty = {
2092
2092
  uri: 'example.com',
2093
2093
  partyType: {
2094
- type: PartyTypeEnum.NATURAL_PERSON,
2095
- origin: PartyOrigin.internal,
2094
+ type: PartyTypeType.NATURAL_PERSON,
2095
+ origin: PartyOrigin.INTERNAL,
2096
2096
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2097
2097
  name: 'example_name',
2098
2098
  },
@@ -2132,8 +2132,8 @@ describe('Contact store tests', (): void => {
2132
2132
  const party: NonPersistedParty = {
2133
2133
  uri: 'example.com',
2134
2134
  partyType: {
2135
- type: PartyTypeEnum.NATURAL_PERSON,
2136
- origin: PartyOrigin.external,
2135
+ type: PartyTypeType.NATURAL_PERSON,
2136
+ origin: PartyOrigin.EXTERNAL,
2137
2137
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2138
2138
  name: 'example_name',
2139
2139
  },
@@ -2175,8 +2175,8 @@ describe('Contact store tests', (): void => {
2175
2175
  const party: NonPersistedParty = {
2176
2176
  uri: 'example.com',
2177
2177
  partyType: {
2178
- type: PartyTypeEnum.NATURAL_PERSON,
2179
- origin: PartyOrigin.internal,
2178
+ type: PartyTypeType.NATURAL_PERSON,
2179
+ origin: PartyOrigin.INTERNAL,
2180
2180
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2181
2181
  name: 'example_name',
2182
2182
  },
@@ -2235,8 +2235,8 @@ describe('Contact store tests', (): void => {
2235
2235
  const party: NonPersistedParty = {
2236
2236
  uri: 'example.com',
2237
2237
  partyType: {
2238
- type: PartyTypeEnum.NATURAL_PERSON,
2239
- origin: PartyOrigin.external,
2238
+ type: PartyTypeType.NATURAL_PERSON,
2239
+ origin: PartyOrigin.EXTERNAL,
2240
2240
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2241
2241
  name: 'example_name',
2242
2242
  },
@@ -2291,8 +2291,8 @@ describe('Contact store tests', (): void => {
2291
2291
  const party: NonPersistedParty = {
2292
2292
  uri: 'example.com',
2293
2293
  partyType: {
2294
- type: PartyTypeEnum.NATURAL_PERSON,
2295
- origin: PartyOrigin.internal,
2294
+ type: PartyTypeType.NATURAL_PERSON,
2295
+ origin: PartyOrigin.INTERNAL,
2296
2296
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2297
2297
  name: 'example_name',
2298
2298
  },
@@ -2352,8 +2352,8 @@ describe('Contact store tests', (): void => {
2352
2352
  const party: NonPersistedParty = {
2353
2353
  uri: 'example.com',
2354
2354
  partyType: {
2355
- type: PartyTypeEnum.NATURAL_PERSON,
2356
- origin: PartyOrigin.external,
2355
+ type: PartyTypeType.NATURAL_PERSON,
2356
+ origin: PartyOrigin.EXTERNAL,
2357
2357
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2358
2358
  name: 'example_name',
2359
2359
  },
@@ -2388,8 +2388,8 @@ describe('Contact store tests', (): void => {
2388
2388
  const party: NonPersistedParty = {
2389
2389
  uri: 'example.com',
2390
2390
  partyType: {
2391
- type: PartyTypeEnum.NATURAL_PERSON,
2392
- origin: PartyOrigin.internal,
2391
+ type: PartyTypeType.NATURAL_PERSON,
2392
+ origin: PartyOrigin.INTERNAL,
2393
2393
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2394
2394
  name: 'example_name',
2395
2395
  },
@@ -2428,8 +2428,8 @@ describe('Contact store tests', (): void => {
2428
2428
  const party: NonPersistedParty = {
2429
2429
  uri: 'example.com',
2430
2430
  partyType: {
2431
- type: PartyTypeEnum.NATURAL_PERSON,
2432
- origin: PartyOrigin.external,
2431
+ type: PartyTypeType.NATURAL_PERSON,
2432
+ origin: PartyOrigin.EXTERNAL,
2433
2433
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2434
2434
  name: 'example_name',
2435
2435
  },