@sphereon/ssi-sdk.data-store 0.21.1-unstable.5 → 0.21.1

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 (39) hide show
  1. package/dist/entities/contact/PartyTypeEntity.d.ts +1 -2
  2. package/dist/entities/contact/PartyTypeEntity.d.ts.map +1 -1
  3. package/dist/entities/contact/PartyTypeEntity.js +0 -4
  4. package/dist/entities/contact/PartyTypeEntity.js.map +1 -1
  5. package/dist/migrations/generic/index.d.ts.map +1 -1
  6. package/dist/migrations/generic/index.js +1 -2
  7. package/dist/migrations/generic/index.js.map +1 -1
  8. package/dist/types/contact/IAbstractContactStore.d.ts +1 -2
  9. package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -1
  10. package/dist/types/contact/contact.d.ts +0 -5
  11. package/dist/types/contact/contact.d.ts.map +1 -1
  12. package/dist/types/contact/contact.js +1 -6
  13. package/dist/types/contact/contact.js.map +1 -1
  14. package/dist/utils/contact/MappingUtils.d.ts.map +1 -1
  15. package/dist/utils/contact/MappingUtils.js +0 -2
  16. package/dist/utils/contact/MappingUtils.js.map +1 -1
  17. package/package.json +4 -4
  18. package/src/__tests__/contact.entities.test.ts +16 -66
  19. package/src/__tests__/contact.store.test.ts +3 -76
  20. package/src/entities/contact/PartyTypeEntity.ts +1 -4
  21. package/src/migrations/generic/index.ts +1 -2
  22. package/src/types/contact/IAbstractContactStore.ts +0 -2
  23. package/src/types/contact/contact.ts +0 -6
  24. package/src/utils/contact/MappingUtils.ts +0 -2
  25. package/dist/migrations/generic/9-CreateContacts.d.ts +0 -7
  26. package/dist/migrations/generic/9-CreateContacts.d.ts.map +0 -1
  27. package/dist/migrations/generic/9-CreateContacts.js +0 -78
  28. package/dist/migrations/generic/9-CreateContacts.js.map +0 -1
  29. package/dist/migrations/postgres/1710941091795-CreateContacts.d.ts +0 -7
  30. package/dist/migrations/postgres/1710941091795-CreateContacts.d.ts.map +0 -1
  31. package/dist/migrations/postgres/1710941091795-CreateContacts.js +0 -31
  32. package/dist/migrations/postgres/1710941091795-CreateContacts.js.map +0 -1
  33. package/dist/migrations/sqlite/1710941197348-CreateContacts.d.ts +0 -7
  34. package/dist/migrations/sqlite/1710941197348-CreateContacts.d.ts.map +0 -1
  35. package/dist/migrations/sqlite/1710941197348-CreateContacts.js +0 -30
  36. package/dist/migrations/sqlite/1710941197348-CreateContacts.js.map +0 -1
  37. package/src/migrations/generic/9-CreateContacts.ts +0 -66
  38. package/src/migrations/postgres/1710941091795-CreateContacts.ts +0 -15
  39. package/src/migrations/sqlite/1710941197348-CreateContacts.ts +0 -14
@@ -1,6 +1,6 @@
1
- import {DataSource} from 'typeorm'
2
- import {DataStoreContactEntities, DataStoreMigrations, PartyOriginEnum} from '../index'
3
- import {ContactStore} from '../contact/ContactStore'
1
+ import { DataSource } from 'typeorm'
2
+ import { DataStoreMigrations, DataStoreContactEntities } from '../index'
3
+ import { ContactStore } from '../contact/ContactStore'
4
4
  import {
5
5
  CorrelationIdentifierEnum,
6
6
  ElectronicAddress,
@@ -54,7 +54,6 @@ describe('Contact store tests', (): void => {
54
54
  uri: 'example.com',
55
55
  partyType: {
56
56
  type: PartyTypeEnum.NATURAL_PERSON,
57
- origin: PartyOriginEnum.INTERNAL,
58
57
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
59
58
  name: 'example_name',
60
59
  },
@@ -85,7 +84,6 @@ describe('Contact store tests', (): void => {
85
84
  uri: 'example.com',
86
85
  partyType: {
87
86
  type: PartyTypeEnum.NATURAL_PERSON,
88
- origin: PartyOriginEnum.INTERNAL,
89
87
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
90
88
  name: 'example_name1',
91
89
  },
@@ -103,7 +101,6 @@ describe('Contact store tests', (): void => {
103
101
  uri: 'example.com',
104
102
  partyType: {
105
103
  type: PartyTypeEnum.NATURAL_PERSON,
106
- origin: PartyOriginEnum.INTERNAL,
107
104
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
108
105
  name: 'example_name2',
109
106
  },
@@ -128,7 +125,6 @@ describe('Contact store tests', (): void => {
128
125
  uri: 'example.com',
129
126
  partyType: {
130
127
  type: PartyTypeEnum.NATURAL_PERSON,
131
- origin: PartyOriginEnum.INTERNAL,
132
128
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
133
129
  name: 'example_name',
134
130
  },
@@ -176,7 +172,6 @@ describe('Contact store tests', (): void => {
176
172
  uri: 'example.com',
177
173
  partyType: {
178
174
  type: PartyTypeEnum.NATURAL_PERSON,
179
- origin: PartyOriginEnum.INTERNAL,
180
175
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
181
176
  name: 'example_name',
182
177
  },
@@ -244,7 +239,6 @@ describe('Contact store tests', (): void => {
244
239
  uri: 'example.com',
245
240
  partyType: {
246
241
  type: PartyTypeEnum.NATURAL_PERSON,
247
- origin: PartyOriginEnum.INTERNAL,
248
242
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
249
243
  name: 'something',
250
244
  },
@@ -288,7 +282,6 @@ describe('Contact store tests', (): void => {
288
282
  uri: 'example.com',
289
283
  partyType: {
290
284
  type: PartyTypeEnum.NATURAL_PERSON,
291
- origin: PartyOriginEnum.INTERNAL,
292
285
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
293
286
  name: 'example_name',
294
287
  },
@@ -322,7 +315,6 @@ describe('Contact store tests', (): void => {
322
315
  uri: 'example.com',
323
316
  partyType: {
324
317
  type: PartyTypeEnum.NATURAL_PERSON,
325
- origin: PartyOriginEnum.INTERNAL,
326
318
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
327
319
  name: 'example_name',
328
320
  },
@@ -374,7 +366,6 @@ describe('Contact store tests', (): void => {
374
366
  uri: 'example.com',
375
367
  partyType: {
376
368
  type: PartyTypeEnum.NATURAL_PERSON,
377
- origin: PartyOriginEnum.INTERNAL,
378
369
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
379
370
  name: 'example_name',
380
371
  },
@@ -400,7 +391,6 @@ describe('Contact store tests', (): void => {
400
391
  uri: 'example.com',
401
392
  partyType: {
402
393
  type: PartyTypeEnum.NATURAL_PERSON,
403
- origin: PartyOriginEnum.INTERNAL,
404
394
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
405
395
  name: 'example_name',
406
396
  },
@@ -444,7 +434,6 @@ describe('Contact store tests', (): void => {
444
434
  uri: 'example.com',
445
435
  partyType: {
446
436
  type: PartyTypeEnum.NATURAL_PERSON,
447
- origin: PartyOriginEnum.INTERNAL,
448
437
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
449
438
  name: 'something',
450
439
  },
@@ -482,7 +471,6 @@ describe('Contact store tests', (): void => {
482
471
  uri: 'example.com',
483
472
  partyType: {
484
473
  type: PartyTypeEnum.NATURAL_PERSON,
485
- origin: PartyOriginEnum.INTERNAL,
486
474
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
487
475
  name: 'example_name',
488
476
  },
@@ -540,7 +528,6 @@ describe('Contact store tests', (): void => {
540
528
  uri: 'example.com',
541
529
  partyType: {
542
530
  type: PartyTypeEnum.NATURAL_PERSON,
543
- origin: PartyOriginEnum.INTERNAL,
544
531
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
545
532
  name: 'example_name',
546
533
  },
@@ -573,7 +560,6 @@ describe('Contact store tests', (): void => {
573
560
  uri: 'example.com',
574
561
  partyType: {
575
562
  type: PartyTypeEnum.NATURAL_PERSON,
576
- origin: PartyOriginEnum.INTERNAL,
577
563
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
578
564
  name: 'example_name',
579
565
  },
@@ -608,7 +594,6 @@ describe('Contact store tests', (): void => {
608
594
  uri: 'example.com',
609
595
  partyType: {
610
596
  type: PartyTypeEnum.NATURAL_PERSON,
611
- origin: PartyOriginEnum.INTERNAL,
612
597
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
613
598
  name: 'example_name',
614
599
  },
@@ -649,7 +634,6 @@ describe('Contact store tests', (): void => {
649
634
  uri: 'example.com',
650
635
  partyType: {
651
636
  type: PartyTypeEnum.NATURAL_PERSON,
652
- origin: PartyOriginEnum.INTERNAL,
653
637
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
654
638
  name: 'example_name',
655
639
  },
@@ -699,7 +683,6 @@ describe('Contact store tests', (): void => {
699
683
  uri: 'example.com',
700
684
  partyType: {
701
685
  type: PartyTypeEnum.NATURAL_PERSON,
702
- origin: PartyOriginEnum.INTERNAL,
703
686
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
704
687
  name: 'example_name',
705
688
  },
@@ -745,7 +728,6 @@ describe('Contact store tests', (): void => {
745
728
  uri: 'example.com',
746
729
  partyType: {
747
730
  type: PartyTypeEnum.NATURAL_PERSON,
748
- origin: PartyOriginEnum.INTERNAL,
749
731
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
750
732
  name: 'example_name',
751
733
  },
@@ -796,7 +778,6 @@ describe('Contact store tests', (): void => {
796
778
  uri: 'example.com',
797
779
  partyType: {
798
780
  type: PartyTypeEnum.NATURAL_PERSON,
799
- origin: PartyOriginEnum.INTERNAL,
800
781
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
801
782
  name: 'example_name',
802
783
  },
@@ -847,7 +828,6 @@ describe('Contact store tests', (): void => {
847
828
  uri: 'example.com',
848
829
  partyType: {
849
830
  type: PartyTypeEnum.NATURAL_PERSON,
850
- origin: PartyOriginEnum.INTERNAL,
851
831
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
852
832
  name: 'example_name',
853
833
  },
@@ -887,7 +867,6 @@ describe('Contact store tests', (): void => {
887
867
  uri: 'example.com',
888
868
  partyType: {
889
869
  type: PartyTypeEnum.NATURAL_PERSON,
890
- origin: PartyOriginEnum.INTERNAL,
891
870
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
892
871
  name: 'example_name',
893
872
  },
@@ -921,7 +900,6 @@ describe('Contact store tests', (): void => {
921
900
  uri: 'example.com',
922
901
  partyType: {
923
902
  type: PartyTypeEnum.NATURAL_PERSON,
924
- origin: PartyOriginEnum.INTERNAL,
925
903
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
926
904
  name: 'example_name',
927
905
  },
@@ -957,7 +935,6 @@ describe('Contact store tests', (): void => {
957
935
  uri: 'example.com',
958
936
  partyType: {
959
937
  type: PartyTypeEnum.NATURAL_PERSON,
960
- origin: PartyOriginEnum.INTERNAL,
961
938
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
962
939
  name: 'example_name',
963
940
  },
@@ -995,7 +972,6 @@ describe('Contact store tests', (): void => {
995
972
  uri: 'example.com',
996
973
  partyType: {
997
974
  type: PartyTypeEnum.NATURAL_PERSON,
998
- origin: PartyOriginEnum.INTERNAL,
999
975
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1000
976
  name: 'example_name',
1001
977
  },
@@ -1046,7 +1022,6 @@ describe('Contact store tests', (): void => {
1046
1022
  uri: 'example1.com',
1047
1023
  partyType: {
1048
1024
  type: PartyTypeEnum.NATURAL_PERSON,
1049
- origin: PartyOriginEnum.INTERNAL,
1050
1025
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1051
1026
  name: 'example_name1',
1052
1027
  },
@@ -1064,7 +1039,6 @@ describe('Contact store tests', (): void => {
1064
1039
  uri: 'example2.com',
1065
1040
  partyType: {
1066
1041
  type: PartyTypeEnum.NATURAL_PERSON,
1067
- origin: PartyOriginEnum.EXTERNAL,
1068
1042
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1069
1043
  name: 'example_name2',
1070
1044
  },
@@ -1097,7 +1071,6 @@ describe('Contact store tests', (): void => {
1097
1071
  uri: 'example1.com',
1098
1072
  partyType: {
1099
1073
  type: PartyTypeEnum.NATURAL_PERSON,
1100
- origin: PartyOriginEnum.INTERNAL,
1101
1074
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1102
1075
  name: 'example_name1',
1103
1076
  },
@@ -1115,7 +1088,6 @@ describe('Contact store tests', (): void => {
1115
1088
  uri: 'example2.com',
1116
1089
  partyType: {
1117
1090
  type: PartyTypeEnum.NATURAL_PERSON,
1118
- origin: PartyOriginEnum.INTERNAL,
1119
1091
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1120
1092
  name: 'example_name2',
1121
1093
  },
@@ -1153,7 +1125,6 @@ describe('Contact store tests', (): void => {
1153
1125
  uri: 'example1.com',
1154
1126
  partyType: {
1155
1127
  type: PartyTypeEnum.NATURAL_PERSON,
1156
- origin: PartyOriginEnum.INTERNAL,
1157
1128
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1158
1129
  name: 'example_name1',
1159
1130
  },
@@ -1171,7 +1142,6 @@ describe('Contact store tests', (): void => {
1171
1142
  uri: 'example2.com',
1172
1143
  partyType: {
1173
1144
  type: PartyTypeEnum.NATURAL_PERSON,
1174
- origin: PartyOriginEnum.INTERNAL,
1175
1145
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1176
1146
  name: 'example_name2',
1177
1147
  },
@@ -1208,7 +1178,6 @@ describe('Contact store tests', (): void => {
1208
1178
  uri: 'example1.com',
1209
1179
  partyType: {
1210
1180
  type: PartyTypeEnum.NATURAL_PERSON,
1211
- origin: PartyOriginEnum.INTERNAL,
1212
1181
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1213
1182
  name: 'example_name1',
1214
1183
  },
@@ -1226,7 +1195,6 @@ describe('Contact store tests', (): void => {
1226
1195
  uri: 'example2.com',
1227
1196
  partyType: {
1228
1197
  type: PartyTypeEnum.NATURAL_PERSON,
1229
- origin: PartyOriginEnum.INTERNAL,
1230
1198
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1231
1199
  name: 'example_name2',
1232
1200
  },
@@ -1272,7 +1240,6 @@ describe('Contact store tests', (): void => {
1272
1240
  uri: 'example1.com',
1273
1241
  partyType: {
1274
1242
  type: PartyTypeEnum.NATURAL_PERSON,
1275
- origin: PartyOriginEnum.INTERNAL,
1276
1243
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1277
1244
  name: 'example_name1',
1278
1245
  },
@@ -1290,7 +1257,6 @@ describe('Contact store tests', (): void => {
1290
1257
  uri: 'example2.com',
1291
1258
  partyType: {
1292
1259
  type: PartyTypeEnum.NATURAL_PERSON,
1293
- origin: PartyOriginEnum.EXTERNAL,
1294
1260
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1295
1261
  name: 'example_name2',
1296
1262
  },
@@ -1343,7 +1309,6 @@ describe('Contact store tests', (): void => {
1343
1309
  uri: 'example1.com',
1344
1310
  partyType: {
1345
1311
  type: PartyTypeEnum.NATURAL_PERSON,
1346
- origin: PartyOriginEnum.INTERNAL,
1347
1312
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1348
1313
  name: 'example_name1',
1349
1314
  },
@@ -1361,7 +1326,6 @@ describe('Contact store tests', (): void => {
1361
1326
  uri: 'example2.com',
1362
1327
  partyType: {
1363
1328
  type: PartyTypeEnum.NATURAL_PERSON,
1364
- origin: PartyOriginEnum.EXTERNAL,
1365
1329
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1366
1330
  name: 'example_name2',
1367
1331
  },
@@ -1379,7 +1343,6 @@ describe('Contact store tests', (): void => {
1379
1343
  uri: 'example3.com',
1380
1344
  partyType: {
1381
1345
  type: PartyTypeEnum.NATURAL_PERSON,
1382
- origin: PartyOriginEnum.INTERNAL,
1383
1346
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d287',
1384
1347
  name: 'example_name3',
1385
1348
  },
@@ -1419,7 +1382,6 @@ describe('Contact store tests', (): void => {
1419
1382
  uri: 'example1.com',
1420
1383
  partyType: {
1421
1384
  type: PartyTypeEnum.NATURAL_PERSON,
1422
- origin: PartyOriginEnum.EXTERNAL,
1423
1385
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1424
1386
  name: 'example_name1',
1425
1387
  },
@@ -1437,7 +1399,6 @@ describe('Contact store tests', (): void => {
1437
1399
  uri: 'example2.com',
1438
1400
  partyType: {
1439
1401
  type: PartyTypeEnum.NATURAL_PERSON,
1440
- origin: PartyOriginEnum.INTERNAL,
1441
1402
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1442
1403
  name: 'example_name2',
1443
1404
  },
@@ -1474,7 +1435,6 @@ describe('Contact store tests', (): void => {
1474
1435
  uri: 'example1.com',
1475
1436
  partyType: {
1476
1437
  type: PartyTypeEnum.NATURAL_PERSON,
1477
- origin: PartyOriginEnum.EXTERNAL,
1478
1438
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1479
1439
  name: 'example_name1',
1480
1440
  },
@@ -1492,7 +1452,6 @@ describe('Contact store tests', (): void => {
1492
1452
  uri: 'example2.com',
1493
1453
  partyType: {
1494
1454
  type: PartyTypeEnum.NATURAL_PERSON,
1495
- origin: PartyOriginEnum.INTERNAL,
1496
1455
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1497
1456
  name: 'example_name2',
1498
1457
  },
@@ -1528,7 +1487,6 @@ describe('Contact store tests', (): void => {
1528
1487
  uri: 'example1.com',
1529
1488
  partyType: {
1530
1489
  type: PartyTypeEnum.NATURAL_PERSON,
1531
- origin: PartyOriginEnum.EXTERNAL,
1532
1490
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1533
1491
  name: 'example_name1',
1534
1492
  },
@@ -1546,7 +1504,6 @@ describe('Contact store tests', (): void => {
1546
1504
  uri: 'example2.com',
1547
1505
  partyType: {
1548
1506
  type: PartyTypeEnum.NATURAL_PERSON,
1549
- origin: PartyOriginEnum.EXTERNAL,
1550
1507
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1551
1508
  name: 'example_name2',
1552
1509
  },
@@ -1580,7 +1537,6 @@ describe('Contact store tests', (): void => {
1580
1537
  it('should add party type', async (): Promise<void> => {
1581
1538
  const partyType: NonPersistedPartyType = {
1582
1539
  type: PartyTypeEnum.NATURAL_PERSON,
1583
- origin: PartyOriginEnum.EXTERNAL,
1584
1540
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1585
1541
  name: 'example_name',
1586
1542
  description: 'example_description',
@@ -1592,7 +1548,6 @@ describe('Contact store tests', (): void => {
1592
1548
  expect(result).toBeDefined()
1593
1549
  expect(result.name).toEqual(partyType.name)
1594
1550
  expect(result.type).toEqual(partyType.type)
1595
- expect(result.origin).toEqual(partyType.origin)
1596
1551
  expect(result.tenantId).toEqual(partyType.tenantId)
1597
1552
  expect(result.description).toEqual(partyType.description)
1598
1553
  expect(result.lastUpdatedAt).toBeDefined()
@@ -1602,7 +1557,6 @@ describe('Contact store tests', (): void => {
1602
1557
  it('should get party types by filter', async (): Promise<void> => {
1603
1558
  const partyType1: NonPersistedPartyType = {
1604
1559
  type: PartyTypeEnum.NATURAL_PERSON,
1605
- origin: PartyOriginEnum.EXTERNAL,
1606
1560
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1607
1561
  name: 'example_name1',
1608
1562
  description: 'example_description1',
@@ -1612,7 +1566,6 @@ describe('Contact store tests', (): void => {
1612
1566
 
1613
1567
  const partyType2: NonPersistedPartyType = {
1614
1568
  type: PartyTypeEnum.NATURAL_PERSON,
1615
- origin: PartyOriginEnum.EXTERNAL,
1616
1569
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d287',
1617
1570
  name: 'example_name2',
1618
1571
  description: 'example_description2',
@@ -1637,7 +1590,6 @@ describe('Contact store tests', (): void => {
1637
1590
  it('should return no party types if filter does not match', async (): Promise<void> => {
1638
1591
  const partyType1: NonPersistedPartyType = {
1639
1592
  type: PartyTypeEnum.NATURAL_PERSON,
1640
- origin: PartyOriginEnum.INTERNAL,
1641
1593
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1642
1594
  name: 'example_name1',
1643
1595
  description: 'example_description1',
@@ -1647,7 +1599,6 @@ describe('Contact store tests', (): void => {
1647
1599
 
1648
1600
  const partyType2: NonPersistedPartyType = {
1649
1601
  type: PartyTypeEnum.NATURAL_PERSON,
1650
- origin: PartyOriginEnum.INTERNAL,
1651
1602
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d287',
1652
1603
  name: 'example_name2',
1653
1604
  description: 'example_description2',
@@ -1672,7 +1623,6 @@ describe('Contact store tests', (): void => {
1672
1623
  it('should throw error when updating party type with unknown id', async (): Promise<void> => {
1673
1624
  const partyType: NonPersistedPartyType = {
1674
1625
  type: PartyTypeEnum.NATURAL_PERSON,
1675
- origin: PartyOriginEnum.INTERNAL,
1676
1626
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1677
1627
  name: 'example_name',
1678
1628
  description: 'example_description',
@@ -1693,7 +1643,6 @@ describe('Contact store tests', (): void => {
1693
1643
  it('should update party type by id', async (): Promise<void> => {
1694
1644
  const partyType: NonPersistedPartyType = {
1695
1645
  type: PartyTypeEnum.NATURAL_PERSON,
1696
- origin: PartyOriginEnum.EXTERNAL,
1697
1646
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1698
1647
  name: 'example_name',
1699
1648
  description: 'example_description',
@@ -1722,7 +1671,6 @@ describe('Contact store tests', (): void => {
1722
1671
  it('should remove party type', async (): Promise<void> => {
1723
1672
  const partyType: NonPersistedPartyType = {
1724
1673
  type: PartyTypeEnum.NATURAL_PERSON,
1725
- origin: PartyOriginEnum.INTERNAL,
1726
1674
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
1727
1675
  name: 'example_name',
1728
1676
  description: 'example_description',
@@ -1750,7 +1698,6 @@ describe('Contact store tests', (): void => {
1750
1698
  uri: 'example.com',
1751
1699
  partyType: {
1752
1700
  type: PartyTypeEnum.NATURAL_PERSON,
1753
- origin: PartyOriginEnum.EXTERNAL,
1754
1701
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1755
1702
  name: 'example_name',
1756
1703
  },
@@ -1772,7 +1719,6 @@ describe('Contact store tests', (): void => {
1772
1719
  it('Should save party with existing party type', async (): Promise<void> => {
1773
1720
  const partyType: NonPersistedPartyType = {
1774
1721
  type: PartyTypeEnum.NATURAL_PERSON,
1775
- origin: PartyOriginEnum.INTERNAL,
1776
1722
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1777
1723
  name: 'example_name',
1778
1724
  }
@@ -1796,19 +1742,16 @@ describe('Contact store tests', (): void => {
1796
1742
  expect(result?.partyType).toBeDefined()
1797
1743
  expect(result?.partyType.id).toEqual(savedPartyType.id)
1798
1744
  expect(result?.partyType.type).toEqual(savedPartyType.type)
1799
- expect(result?.partyType.origin).toEqual(savedPartyType.origin)
1800
1745
  expect(result?.partyType.tenantId).toEqual(savedPartyType.tenantId)
1801
1746
  expect(result?.partyType.name).toEqual(savedPartyType.name)
1802
1747
  })
1803
1748
 
1804
1749
  it('should throw error when adding person party with wrong contact type', async (): Promise<void> => {
1805
1750
  const partyType = PartyTypeEnum.ORGANIZATION
1806
- const partyTypeOrigin = PartyOriginEnum.INTERNAL
1807
1751
  const party: NonPersistedParty = {
1808
1752
  uri: 'example.com',
1809
1753
  partyType: {
1810
1754
  type: partyType,
1811
- origin: partyTypeOrigin,
1812
1755
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1813
1756
  name: 'example_name',
1814
1757
  },
@@ -1825,12 +1768,10 @@ describe('Contact store tests', (): void => {
1825
1768
 
1826
1769
  it('should throw error when adding organization party with wrong contact type', async (): Promise<void> => {
1827
1770
  const partyType = PartyTypeEnum.NATURAL_PERSON
1828
- const partyTypeOrigin = PartyOriginEnum.EXTERNAL
1829
1771
  const party: NonPersistedParty = {
1830
1772
  uri: 'example.com',
1831
1773
  partyType: {
1832
1774
  type: partyType,
1833
- origin: partyTypeOrigin,
1834
1775
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1835
1776
  name: 'example_name',
1836
1777
  },
@@ -1848,7 +1789,6 @@ describe('Contact store tests', (): void => {
1848
1789
  uri: 'example.com',
1849
1790
  partyType: {
1850
1791
  type: PartyTypeEnum.NATURAL_PERSON,
1851
- origin: PartyOriginEnum.INTERNAL,
1852
1792
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1853
1793
  name: 'example_name',
1854
1794
  },
@@ -1887,7 +1827,6 @@ describe('Contact store tests', (): void => {
1887
1827
  uri: 'example.com',
1888
1828
  partyType: {
1889
1829
  type: PartyTypeEnum.NATURAL_PERSON,
1890
- origin: PartyOriginEnum.EXTERNAL,
1891
1830
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1892
1831
  name: 'example_name',
1893
1832
  },
@@ -1935,7 +1874,6 @@ describe('Contact store tests', (): void => {
1935
1874
  uri: 'example.com',
1936
1875
  partyType: {
1937
1876
  type: PartyTypeEnum.NATURAL_PERSON,
1938
- origin: PartyOriginEnum.INTERNAL,
1939
1877
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1940
1878
  name: 'example_name',
1941
1879
  },
@@ -1979,7 +1917,6 @@ describe('Contact store tests', (): void => {
1979
1917
  uri: 'example.com',
1980
1918
  partyType: {
1981
1919
  type: PartyTypeEnum.NATURAL_PERSON,
1982
- origin: PartyOriginEnum.EXTERNAL,
1983
1920
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
1984
1921
  name: 'example_name',
1985
1922
  },
@@ -2028,7 +1965,6 @@ describe('Contact store tests', (): void => {
2028
1965
  uri: 'example.com',
2029
1966
  partyType: {
2030
1967
  type: PartyTypeEnum.NATURAL_PERSON,
2031
- origin: PartyOriginEnum.INTERNAL,
2032
1968
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2033
1969
  name: 'example_name',
2034
1970
  },
@@ -2058,7 +1994,6 @@ describe('Contact store tests', (): void => {
2058
1994
  uri: 'example.com',
2059
1995
  partyType: {
2060
1996
  type: PartyTypeEnum.NATURAL_PERSON,
2061
- origin: PartyOriginEnum.EXTERNAL,
2062
1997
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2063
1998
  name: 'example_name',
2064
1999
  },
@@ -2092,7 +2027,6 @@ describe('Contact store tests', (): void => {
2092
2027
  uri: 'example.com',
2093
2028
  partyType: {
2094
2029
  type: PartyTypeEnum.NATURAL_PERSON,
2095
- origin: PartyOriginEnum.INTERNAL,
2096
2030
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2097
2031
  name: 'example_name',
2098
2032
  },
@@ -2133,7 +2067,6 @@ describe('Contact store tests', (): void => {
2133
2067
  uri: 'example.com',
2134
2068
  partyType: {
2135
2069
  type: PartyTypeEnum.NATURAL_PERSON,
2136
- origin: PartyOriginEnum.EXTERNAL,
2137
2070
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2138
2071
  name: 'example_name',
2139
2072
  },
@@ -2176,7 +2109,6 @@ describe('Contact store tests', (): void => {
2176
2109
  uri: 'example.com',
2177
2110
  partyType: {
2178
2111
  type: PartyTypeEnum.NATURAL_PERSON,
2179
- origin: PartyOriginEnum.INTERNAL,
2180
2112
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2181
2113
  name: 'example_name',
2182
2114
  },
@@ -2236,7 +2168,6 @@ describe('Contact store tests', (): void => {
2236
2168
  uri: 'example.com',
2237
2169
  partyType: {
2238
2170
  type: PartyTypeEnum.NATURAL_PERSON,
2239
- origin: PartyOriginEnum.EXTERNAL,
2240
2171
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2241
2172
  name: 'example_name',
2242
2173
  },
@@ -2292,7 +2223,6 @@ describe('Contact store tests', (): void => {
2292
2223
  uri: 'example.com',
2293
2224
  partyType: {
2294
2225
  type: PartyTypeEnum.NATURAL_PERSON,
2295
- origin: PartyOriginEnum.INTERNAL,
2296
2226
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2297
2227
  name: 'example_name',
2298
2228
  },
@@ -2353,7 +2283,6 @@ describe('Contact store tests', (): void => {
2353
2283
  uri: 'example.com',
2354
2284
  partyType: {
2355
2285
  type: PartyTypeEnum.NATURAL_PERSON,
2356
- origin: PartyOriginEnum.EXTERNAL,
2357
2286
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2358
2287
  name: 'example_name',
2359
2288
  },
@@ -2389,7 +2318,6 @@ describe('Contact store tests', (): void => {
2389
2318
  uri: 'example.com',
2390
2319
  partyType: {
2391
2320
  type: PartyTypeEnum.NATURAL_PERSON,
2392
- origin: PartyOriginEnum.INTERNAL,
2393
2321
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2394
2322
  name: 'example_name',
2395
2323
  },
@@ -2429,7 +2357,6 @@ describe('Contact store tests', (): void => {
2429
2357
  uri: 'example.com',
2430
2358
  partyType: {
2431
2359
  type: PartyTypeEnum.NATURAL_PERSON,
2432
- origin: PartyOriginEnum.EXTERNAL,
2433
2360
  tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
2434
2361
  name: 'example_name',
2435
2362
  },
@@ -1,6 +1,6 @@
1
1
  import { Entity, PrimaryGeneratedColumn, Column, Index, CreateDateColumn, UpdateDateColumn, OneToMany, BeforeInsert, BeforeUpdate } from 'typeorm'
2
2
  import { PartyEntity } from './PartyEntity'
3
- import { PartyTypeEnum, PartyOriginEnum, ValidationConstraint } from '../../types'
3
+ import { PartyTypeEnum, ValidationConstraint } from '../../types'
4
4
  import { IsNotEmpty, Validate, validate, ValidationError } from 'class-validator'
5
5
  import { IsNonEmptyStringConstraint } from '../validators'
6
6
  import { getConstraint } from '../../utils/ValidatorUtils'
@@ -14,9 +14,6 @@ export class PartyTypeEntity {
14
14
  @Column('simple-enum', { name: 'type', enum: PartyTypeEnum, nullable: false, unique: false })
15
15
  type!: PartyTypeEnum
16
16
 
17
- @Column('simple-enum', { name: 'origin', enum: PartyOriginEnum, nullable: false, unique: false })
18
- origin!: PartyOriginEnum
19
-
20
17
  @Column({ name: 'name', length: 255, nullable: false, unique: true })
21
18
  @IsNotEmpty({ message: 'Blank names are not allowed' })
22
19
  name!: string
@@ -5,7 +5,6 @@ import { CreateStatusList1693866470000 } from './4-CreateStatusList'
5
5
  import { CreateAuditEvents1701635835330 } from './5-CreateAuditEvents'
6
6
  import { CreateDigitalCredential1708525189000 } from './6-CreateDigitalCredential'
7
7
  import { CreateMachineStateStore1708098041262 } from './7-CreateMachineStateStore'
8
- import { CreateContacts1710942112855 } from './9-CreateContacts'
9
8
 
10
9
  /**
11
10
  * The migrations array that SHOULD be used when initializing a TypeORM database connection.
@@ -16,7 +15,7 @@ import { CreateContacts1710942112855 } from './9-CreateContacts'
16
15
  */
17
16
 
18
17
  // Individual migrations per purpose. Allows parties to not run migrations and thus create/update tables if they are not using a particular feature (yet)
19
- export const DataStoreContactMigrations = [CreateContacts1659463079429, CreateContacts1690925872318, CreateContacts1710942112855]
18
+ export const DataStoreContactMigrations = [CreateContacts1659463079429, CreateContacts1690925872318]
20
19
  export const DataStoreIssuanceBrandingMigrations = [CreateIssuanceBranding1659463079429]
21
20
  export const DataStoreStatusListMigrations = [CreateStatusList1693866470000]
22
21
  export const DataStoreEventLoggerMigrations = [CreateAuditEvents1701635835330]
@@ -13,7 +13,6 @@ import {
13
13
  PartialPartyType,
14
14
  PartialPhysicalAddress,
15
15
  Party,
16
- PartyOriginEnum,
17
16
  PartyRelationship,
18
17
  PartyType,
19
18
  PartyTypeEnum,
@@ -96,7 +95,6 @@ export type UpdateRelationshipArgs = {
96
95
 
97
96
  export type AddPartyTypeArgs = {
98
97
  type: PartyTypeEnum
99
- origin: PartyOriginEnum
100
98
  name: string
101
99
  tenantId: string
102
100
  description?: string
@@ -150,15 +150,9 @@ export type Contact = NaturalPerson | Organization
150
150
  export type NonPersistedContact = NonPersistedNaturalPerson | NonPersistedOrganization
151
151
  export type PartialContact = PartialNaturalPerson | PartialOrganization
152
152
 
153
- export enum PartyOriginEnum {
154
- INTERNAL = 'internal',
155
- EXTERNAL = 'external',
156
- }
157
-
158
153
  export type PartyType = {
159
154
  id: string
160
155
  type: PartyTypeEnum
161
- origin: PartyOriginEnum
162
156
  name: string
163
157
  tenantId: string
164
158
  description?: string
@@ -324,7 +324,6 @@ export const partyTypeEntityFrom = (args: NonPersistedPartyType): PartyTypeEntit
324
324
  partyTypeEntity.id = args.id
325
325
  }
326
326
  partyTypeEntity.type = args.type
327
- partyTypeEntity.origin = args.origin
328
327
  partyTypeEntity.name = args.name
329
328
  partyTypeEntity.description = args.description
330
329
  partyTypeEntity.tenantId = args.tenantId
@@ -336,7 +335,6 @@ export const partyTypeFrom = (partyType: PartyTypeEntity): PartyType => {
336
335
  return {
337
336
  id: partyType.id,
338
337
  type: partyType.type,
339
- origin: partyType.origin,
340
338
  name: partyType.name,
341
339
  tenantId: partyType.tenantId,
342
340
  description: partyType.description,
@@ -1,7 +0,0 @@
1
- import { MigrationInterface, QueryRunner } from 'typeorm';
2
- export declare class CreateContacts1710942112855 implements MigrationInterface {
3
- name: string;
4
- up(queryRunner: QueryRunner): Promise<void>;
5
- down(queryRunner: QueryRunner): Promise<void>;
6
- }
7
- //# sourceMappingURL=9-CreateContacts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"9-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/9-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOvE,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA4B3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CA2B3D"}