@sphereon/ssi-sdk.data-store 0.21.1-unstable.6 → 0.22.0
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.
- package/dist/entities/contact/PartyTypeEntity.d.ts +1 -2
- package/dist/entities/contact/PartyTypeEntity.d.ts.map +1 -1
- package/dist/entities/contact/PartyTypeEntity.js +0 -4
- package/dist/entities/contact/PartyTypeEntity.js.map +1 -1
- package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts.map +1 -1
- package/dist/migrations/postgres/1690925872592-CreateContacts.js +0 -2
- package/dist/migrations/postgres/1690925872592-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts.map +1 -1
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js +0 -1
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -1
- package/dist/types/contact/IAbstractContactStore.d.ts +1 -2
- package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -1
- package/dist/types/contact/contact.d.ts +0 -5
- package/dist/types/contact/contact.d.ts.map +1 -1
- package/dist/types/contact/contact.js +1 -6
- package/dist/types/contact/contact.js.map +1 -1
- package/dist/utils/contact/MappingUtils.d.ts.map +1 -1
- package/dist/utils/contact/MappingUtils.js +0 -2
- package/dist/utils/contact/MappingUtils.js.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/contact.entities.test.ts +16 -66
- package/src/__tests__/contact.store.test.ts +3 -76
- package/src/entities/contact/PartyTypeEntity.ts +6 -19
- package/src/migrations/postgres/1690925872592-CreateContacts.ts +0 -6
- package/src/migrations/sqlite/1690925872693-CreateContacts.ts +0 -3
- package/src/types/contact/IAbstractContactStore.ts +0 -2
- package/src/types/contact/contact.ts +1 -7
- package/src/utils/contact/MappingUtils.ts +0 -2
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {DataSource, FindOptionsWhere} from 'typeorm'
|
|
2
|
-
import {DataStoreContactEntities, DataStoreMigrations
|
|
3
|
-
import {BaseContactEntity} from '../entities/contact/BaseContactEntity'
|
|
4
|
-
import {ConnectionEntity} from '../entities/contact/ConnectionEntity'
|
|
5
|
-
import {CorrelationIdentifierEntity} from '../entities/contact/CorrelationIdentifierEntity'
|
|
6
|
-
import {DidAuthConfigEntity} from '../entities/contact/DidAuthConfigEntity'
|
|
7
|
-
import {ElectronicAddressEntity} from '../entities/contact/ElectronicAddressEntity'
|
|
8
|
-
import {IdentityEntity} from '../entities/contact/IdentityEntity'
|
|
9
|
-
import {IdentityMetadataItemEntity} from '../entities/contact/IdentityMetadataItemEntity'
|
|
10
|
-
import {NaturalPersonEntity} from '../entities/contact/NaturalPersonEntity'
|
|
11
|
-
import {OpenIdConfigEntity} from '../entities/contact/OpenIdConfigEntity'
|
|
12
|
-
import {OrganizationEntity} from '../entities/contact/OrganizationEntity'
|
|
13
|
-
import {PartyEntity} from '../entities/contact/PartyEntity'
|
|
14
|
-
import {PartyRelationshipEntity} from '../entities/contact/PartyRelationshipEntity'
|
|
15
|
-
import {PartyTypeEntity} from '../entities/contact/PartyTypeEntity'
|
|
16
|
-
import {PhysicalAddressEntity} from '../entities/contact/PhysicalAddressEntity'
|
|
1
|
+
import { DataSource, FindOptionsWhere } from 'typeorm'
|
|
2
|
+
import { DataStoreContactEntities, DataStoreMigrations } from '../index'
|
|
3
|
+
import { BaseContactEntity } from '../entities/contact/BaseContactEntity'
|
|
4
|
+
import { ConnectionEntity } from '../entities/contact/ConnectionEntity'
|
|
5
|
+
import { CorrelationIdentifierEntity } from '../entities/contact/CorrelationIdentifierEntity'
|
|
6
|
+
import { DidAuthConfigEntity } from '../entities/contact/DidAuthConfigEntity'
|
|
7
|
+
import { ElectronicAddressEntity } from '../entities/contact/ElectronicAddressEntity'
|
|
8
|
+
import { IdentityEntity } from '../entities/contact/IdentityEntity'
|
|
9
|
+
import { IdentityMetadataItemEntity } from '../entities/contact/IdentityMetadataItemEntity'
|
|
10
|
+
import { NaturalPersonEntity } from '../entities/contact/NaturalPersonEntity'
|
|
11
|
+
import { OpenIdConfigEntity } from '../entities/contact/OpenIdConfigEntity'
|
|
12
|
+
import { OrganizationEntity } from '../entities/contact/OrganizationEntity'
|
|
13
|
+
import { PartyEntity } from '../entities/contact/PartyEntity'
|
|
14
|
+
import { PartyRelationshipEntity } from '../entities/contact/PartyRelationshipEntity'
|
|
15
|
+
import { PartyTypeEntity } from '../entities/contact/PartyTypeEntity'
|
|
16
|
+
import { PhysicalAddressEntity } from '../entities/contact/PhysicalAddressEntity'
|
|
17
17
|
import {
|
|
18
18
|
ConnectionTypeEnum,
|
|
19
19
|
CorrelationIdentifierEnum,
|
|
@@ -74,7 +74,6 @@ describe('Database entities tests', (): void => {
|
|
|
74
74
|
uri: 'example.com',
|
|
75
75
|
partyType: {
|
|
76
76
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
77
|
-
origin: PartyOrigin.INTERNAL,
|
|
78
77
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
79
78
|
name: 'example_name',
|
|
80
79
|
},
|
|
@@ -100,7 +99,6 @@ describe('Database entities tests', (): void => {
|
|
|
100
99
|
expect(fromDb?.uri).toEqual(party.uri)
|
|
101
100
|
expect(fromDb?.partyType).toBeDefined()
|
|
102
101
|
expect(fromDb?.partyType.type).toEqual(party.partyType.type)
|
|
103
|
-
expect(fromDb?.partyType.origin).toEqual(party.partyType.origin)
|
|
104
102
|
expect(fromDb?.partyType.tenantId).toEqual(party.partyType.tenantId)
|
|
105
103
|
expect(fromDb?.partyType.name).toEqual(party.partyType.name)
|
|
106
104
|
expect(fromDb?.contact).toBeDefined()
|
|
@@ -115,7 +113,6 @@ describe('Database entities tests', (): void => {
|
|
|
115
113
|
uri: 'example.com',
|
|
116
114
|
partyType: {
|
|
117
115
|
type: PartyTypeEnum.ORGANIZATION,
|
|
118
|
-
origin: PartyOrigin.INTERNAL,
|
|
119
116
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
120
117
|
name: 'example_name',
|
|
121
118
|
},
|
|
@@ -139,7 +136,6 @@ describe('Database entities tests', (): void => {
|
|
|
139
136
|
expect(fromDb?.uri).toEqual(party.uri)
|
|
140
137
|
expect(fromDb?.partyType).toBeDefined()
|
|
141
138
|
expect(fromDb?.partyType.type).toEqual(party.partyType.type)
|
|
142
|
-
expect(fromDb?.partyType.origin).toEqual(party.partyType.origin)
|
|
143
139
|
expect(fromDb?.partyType.tenantId).toEqual(party.partyType.tenantId)
|
|
144
140
|
expect(fromDb?.partyType.name).toEqual(party.partyType.name)
|
|
145
141
|
expect(fromDb?.contact).toBeDefined()
|
|
@@ -152,7 +148,6 @@ describe('Database entities tests', (): void => {
|
|
|
152
148
|
uri: 'example1.com',
|
|
153
149
|
partyType: {
|
|
154
150
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
155
|
-
origin: PartyOrigin.INTERNAL,
|
|
156
151
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
157
152
|
name: 'example_name1',
|
|
158
153
|
},
|
|
@@ -173,7 +168,6 @@ describe('Database entities tests', (): void => {
|
|
|
173
168
|
uri: 'example2.com',
|
|
174
169
|
partyType: {
|
|
175
170
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
176
|
-
origin: PartyOrigin.INTERNAL,
|
|
177
171
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
|
|
178
172
|
name: 'example_name2',
|
|
179
173
|
},
|
|
@@ -218,7 +212,6 @@ describe('Database entities tests', (): void => {
|
|
|
218
212
|
uri: 'example.com',
|
|
219
213
|
partyType: {
|
|
220
214
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
221
|
-
origin: PartyOrigin.INTERNAL,
|
|
222
215
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
223
216
|
name: 'example_name',
|
|
224
217
|
},
|
|
@@ -240,7 +233,6 @@ describe('Database entities tests', (): void => {
|
|
|
240
233
|
uri: 'example.com',
|
|
241
234
|
partyType: {
|
|
242
235
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
243
|
-
origin: PartyOrigin.EXTERNAL,
|
|
244
236
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
245
237
|
name: 'example_name',
|
|
246
238
|
},
|
|
@@ -262,7 +254,6 @@ describe('Database entities tests', (): void => {
|
|
|
262
254
|
uri: 'example.com',
|
|
263
255
|
partyType: {
|
|
264
256
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
265
|
-
origin: PartyOrigin.EXTERNAL,
|
|
266
257
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
267
258
|
name: 'example_name',
|
|
268
259
|
},
|
|
@@ -284,7 +275,6 @@ describe('Database entities tests', (): void => {
|
|
|
284
275
|
uri: 'example.com',
|
|
285
276
|
partyType: {
|
|
286
277
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
287
|
-
origin: PartyOrigin.EXTERNAL,
|
|
288
278
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
289
279
|
name: 'example_name',
|
|
290
280
|
},
|
|
@@ -306,7 +296,6 @@ describe('Database entities tests', (): void => {
|
|
|
306
296
|
uri: 'example.com',
|
|
307
297
|
partyType: {
|
|
308
298
|
type: PartyTypeEnum.ORGANIZATION,
|
|
309
|
-
origin: PartyOrigin.INTERNAL,
|
|
310
299
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
311
300
|
name: 'example_name',
|
|
312
301
|
},
|
|
@@ -326,7 +315,6 @@ describe('Database entities tests', (): void => {
|
|
|
326
315
|
uri: 'example.com',
|
|
327
316
|
partyType: {
|
|
328
317
|
type: PartyTypeEnum.ORGANIZATION,
|
|
329
|
-
origin: PartyOrigin.INTERNAL,
|
|
330
318
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
331
319
|
name: 'example_name',
|
|
332
320
|
},
|
|
@@ -346,7 +334,6 @@ describe('Database entities tests', (): void => {
|
|
|
346
334
|
uri: 'example.com',
|
|
347
335
|
partyType: {
|
|
348
336
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
349
|
-
origin: PartyOrigin.EXTERNAL,
|
|
350
337
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
351
338
|
name: '',
|
|
352
339
|
},
|
|
@@ -368,7 +355,6 @@ describe('Database entities tests', (): void => {
|
|
|
368
355
|
uri: 'example.com',
|
|
369
356
|
partyType: {
|
|
370
357
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
371
|
-
origin: PartyOrigin.INTERNAL,
|
|
372
358
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
373
359
|
name: 'example_name',
|
|
374
360
|
description: '',
|
|
@@ -391,7 +377,6 @@ describe('Database entities tests', (): void => {
|
|
|
391
377
|
uri: 'example.com',
|
|
392
378
|
partyType: {
|
|
393
379
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
394
|
-
origin: PartyOrigin.EXTERNAL,
|
|
395
380
|
tenantId: '',
|
|
396
381
|
name: 'example_name',
|
|
397
382
|
},
|
|
@@ -787,7 +772,6 @@ describe('Database entities tests', (): void => {
|
|
|
787
772
|
uri: 'example.com',
|
|
788
773
|
partyType: {
|
|
789
774
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
790
|
-
origin: PartyOrigin.INTERNAL,
|
|
791
775
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
792
776
|
name: 'example_name1',
|
|
793
777
|
},
|
|
@@ -808,7 +792,6 @@ describe('Database entities tests', (): void => {
|
|
|
808
792
|
uri: 'example.com',
|
|
809
793
|
partyType: {
|
|
810
794
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
811
|
-
origin: PartyOrigin.INTERNAL,
|
|
812
795
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
|
|
813
796
|
name: 'example_name2',
|
|
814
797
|
},
|
|
@@ -968,7 +951,6 @@ describe('Database entities tests', (): void => {
|
|
|
968
951
|
uri: 'example.com',
|
|
969
952
|
partyType: {
|
|
970
953
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
971
|
-
origin: PartyOrigin.EXTERNAL,
|
|
972
954
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
973
955
|
name: 'example_name',
|
|
974
956
|
},
|
|
@@ -1069,7 +1051,6 @@ describe('Database entities tests', (): void => {
|
|
|
1069
1051
|
uri: 'example.com',
|
|
1070
1052
|
partyType: {
|
|
1071
1053
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1072
|
-
origin: PartyOrigin.EXTERNAL,
|
|
1073
1054
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1074
1055
|
name: 'example_name',
|
|
1075
1056
|
},
|
|
@@ -1145,7 +1126,6 @@ describe('Database entities tests', (): void => {
|
|
|
1145
1126
|
uri: 'example.com',
|
|
1146
1127
|
partyType: {
|
|
1147
1128
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1148
|
-
origin: PartyOrigin.INTERNAL,
|
|
1149
1129
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1150
1130
|
name: 'example_name',
|
|
1151
1131
|
},
|
|
@@ -1173,7 +1153,6 @@ describe('Database entities tests', (): void => {
|
|
|
1173
1153
|
uri: 'example.com',
|
|
1174
1154
|
partyType: {
|
|
1175
1155
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1176
|
-
origin: PartyOrigin.INTERNAL,
|
|
1177
1156
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1178
1157
|
name: 'example_name',
|
|
1179
1158
|
},
|
|
@@ -1269,7 +1248,6 @@ describe('Database entities tests', (): void => {
|
|
|
1269
1248
|
uri: 'example.com',
|
|
1270
1249
|
partyType: {
|
|
1271
1250
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1272
|
-
origin: PartyOrigin.INTERNAL,
|
|
1273
1251
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1274
1252
|
name: 'example_name',
|
|
1275
1253
|
},
|
|
@@ -1297,7 +1275,6 @@ describe('Database entities tests', (): void => {
|
|
|
1297
1275
|
uri: 'example.com',
|
|
1298
1276
|
partyType: {
|
|
1299
1277
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1300
|
-
origin: PartyOrigin.EXTERNAL,
|
|
1301
1278
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1302
1279
|
name: 'example_name',
|
|
1303
1280
|
},
|
|
@@ -1340,7 +1317,6 @@ describe('Database entities tests', (): void => {
|
|
|
1340
1317
|
it('Should set last updated date when saving party type', async (): Promise<void> => {
|
|
1341
1318
|
const partyType: NonPersistedPartyType = {
|
|
1342
1319
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1343
|
-
origin: PartyOrigin.EXTERNAL,
|
|
1344
1320
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1345
1321
|
name: 'example_name',
|
|
1346
1322
|
}
|
|
@@ -1359,7 +1335,6 @@ describe('Database entities tests', (): void => {
|
|
|
1359
1335
|
it('Should set last creation date when saving party type', async (): Promise<void> => {
|
|
1360
1336
|
const partyType: NonPersistedPartyType = {
|
|
1361
1337
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1362
|
-
origin: PartyOrigin.INTERNAL,
|
|
1363
1338
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1364
1339
|
name: 'example_name',
|
|
1365
1340
|
}
|
|
@@ -1406,7 +1381,6 @@ describe('Database entities tests', (): void => {
|
|
|
1406
1381
|
const name = 'non_unique_value'
|
|
1407
1382
|
const partyType1: NonPersistedPartyType = {
|
|
1408
1383
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1409
|
-
origin: PartyOrigin.EXTERNAL,
|
|
1410
1384
|
tenantId,
|
|
1411
1385
|
name,
|
|
1412
1386
|
}
|
|
@@ -1418,7 +1392,6 @@ describe('Database entities tests', (): void => {
|
|
|
1418
1392
|
|
|
1419
1393
|
const partyType2: NonPersistedPartyType = {
|
|
1420
1394
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1421
|
-
origin: PartyOrigin.INTERNAL,
|
|
1422
1395
|
tenantId,
|
|
1423
1396
|
name,
|
|
1424
1397
|
}
|
|
@@ -1433,7 +1406,6 @@ describe('Database entities tests', (): void => {
|
|
|
1433
1406
|
const name = 'non_unique_value'
|
|
1434
1407
|
const partyType1: NonPersistedPartyType = {
|
|
1435
1408
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1436
|
-
origin:PartyOrigin.INTERNAL,
|
|
1437
1409
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1438
1410
|
name,
|
|
1439
1411
|
}
|
|
@@ -1445,7 +1417,6 @@ describe('Database entities tests', (): void => {
|
|
|
1445
1417
|
|
|
1446
1418
|
const partyType2: NonPersistedPartyType = {
|
|
1447
1419
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1448
|
-
origin: PartyOrigin.INTERNAL,
|
|
1449
1420
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
|
|
1450
1421
|
name,
|
|
1451
1422
|
}
|
|
@@ -1511,7 +1482,6 @@ describe('Database entities tests', (): void => {
|
|
|
1511
1482
|
uri: 'example1.com',
|
|
1512
1483
|
partyType: {
|
|
1513
1484
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1514
|
-
origin: PartyOrigin.INTERNAL,
|
|
1515
1485
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1516
1486
|
name: 'example_name1',
|
|
1517
1487
|
},
|
|
@@ -1534,7 +1504,6 @@ describe('Database entities tests', (): void => {
|
|
|
1534
1504
|
uri: 'example2.com',
|
|
1535
1505
|
partyType: {
|
|
1536
1506
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1537
|
-
origin: PartyOrigin.INTERNAL,
|
|
1538
1507
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
|
|
1539
1508
|
name: 'example_name2',
|
|
1540
1509
|
},
|
|
@@ -1575,7 +1544,6 @@ describe('Database entities tests', (): void => {
|
|
|
1575
1544
|
uri: 'example1.com',
|
|
1576
1545
|
partyType: {
|
|
1577
1546
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1578
|
-
origin: PartyOrigin.INTERNAL,
|
|
1579
1547
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1580
1548
|
name: 'example_name1',
|
|
1581
1549
|
},
|
|
@@ -1596,7 +1564,6 @@ describe('Database entities tests', (): void => {
|
|
|
1596
1564
|
uri: 'example2.com',
|
|
1597
1565
|
partyType: {
|
|
1598
1566
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1599
|
-
origin: PartyOrigin.INTERNAL,
|
|
1600
1567
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
|
|
1601
1568
|
name: 'example_name2',
|
|
1602
1569
|
},
|
|
@@ -1635,7 +1602,6 @@ describe('Database entities tests', (): void => {
|
|
|
1635
1602
|
uri: 'example1.com',
|
|
1636
1603
|
partyType: {
|
|
1637
1604
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1638
|
-
origin: PartyOrigin.INTERNAL,
|
|
1639
1605
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1640
1606
|
name: 'example_name1',
|
|
1641
1607
|
},
|
|
@@ -1656,7 +1622,6 @@ describe('Database entities tests', (): void => {
|
|
|
1656
1622
|
uri: 'example2.com',
|
|
1657
1623
|
partyType: {
|
|
1658
1624
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1659
|
-
origin: PartyOrigin.INTERNAL,
|
|
1660
1625
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
|
|
1661
1626
|
name: 'example_name2',
|
|
1662
1627
|
},
|
|
@@ -1695,7 +1660,6 @@ describe('Database entities tests', (): void => {
|
|
|
1695
1660
|
uri: 'example1.com',
|
|
1696
1661
|
partyType: {
|
|
1697
1662
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1698
|
-
origin: PartyOrigin.INTERNAL,
|
|
1699
1663
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1700
1664
|
name: 'example_name1',
|
|
1701
1665
|
},
|
|
@@ -1718,7 +1682,6 @@ describe('Database entities tests', (): void => {
|
|
|
1718
1682
|
uri: 'example2.com',
|
|
1719
1683
|
partyType: {
|
|
1720
1684
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1721
|
-
origin: PartyOrigin.INTERNAL,
|
|
1722
1685
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
|
|
1723
1686
|
name: 'example_name2',
|
|
1724
1687
|
},
|
|
@@ -1771,7 +1734,6 @@ describe('Database entities tests', (): void => {
|
|
|
1771
1734
|
uri: 'example1.com',
|
|
1772
1735
|
partyType: {
|
|
1773
1736
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1774
|
-
origin: PartyOrigin.INTERNAL,
|
|
1775
1737
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1776
1738
|
name: 'example_name1',
|
|
1777
1739
|
},
|
|
@@ -1794,7 +1756,6 @@ describe('Database entities tests', (): void => {
|
|
|
1794
1756
|
uri: 'example2.com',
|
|
1795
1757
|
partyType: {
|
|
1796
1758
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1797
|
-
origin: PartyOrigin.INTERNAL,
|
|
1798
1759
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
|
|
1799
1760
|
name: 'example_name2',
|
|
1800
1761
|
},
|
|
@@ -1837,7 +1798,6 @@ describe('Database entities tests', (): void => {
|
|
|
1837
1798
|
it('Should save party type to database', async (): Promise<void> => {
|
|
1838
1799
|
const partyType: NonPersistedPartyType = {
|
|
1839
1800
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1840
|
-
origin: PartyOrigin.INTERNAL,
|
|
1841
1801
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1842
1802
|
name: 'example_name',
|
|
1843
1803
|
}
|
|
@@ -1973,7 +1933,6 @@ describe('Database entities tests', (): void => {
|
|
|
1973
1933
|
uri: 'example.com',
|
|
1974
1934
|
partyType: {
|
|
1975
1935
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
1976
|
-
origin: PartyOrigin.INTERNAL,
|
|
1977
1936
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
1978
1937
|
name: 'example_name',
|
|
1979
1938
|
},
|
|
@@ -2007,7 +1966,6 @@ describe('Database entities tests', (): void => {
|
|
|
2007
1966
|
uri: 'example.com',
|
|
2008
1967
|
partyType: {
|
|
2009
1968
|
type: PartyTypeEnum.ORGANIZATION,
|
|
2010
|
-
origin: PartyOrigin.INTERNAL,
|
|
2011
1969
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
2012
1970
|
name: 'example_name',
|
|
2013
1971
|
},
|
|
@@ -2038,7 +1996,6 @@ describe('Database entities tests', (): void => {
|
|
|
2038
1996
|
uri: 'example.com',
|
|
2039
1997
|
partyType: {
|
|
2040
1998
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
2041
|
-
origin: PartyOrigin.INTERNAL,
|
|
2042
1999
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
2043
2000
|
name: 'example_name',
|
|
2044
2001
|
},
|
|
@@ -2072,7 +2029,6 @@ describe('Database entities tests', (): void => {
|
|
|
2072
2029
|
uri: 'example1.com',
|
|
2073
2030
|
partyType: {
|
|
2074
2031
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
2075
|
-
origin: PartyOrigin.INTERNAL,
|
|
2076
2032
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
2077
2033
|
name: 'example_name1',
|
|
2078
2034
|
},
|
|
@@ -2095,7 +2051,6 @@ describe('Database entities tests', (): void => {
|
|
|
2095
2051
|
uri: 'example2.com',
|
|
2096
2052
|
partyType: {
|
|
2097
2053
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
2098
|
-
origin: PartyOrigin.INTERNAL,
|
|
2099
2054
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d288',
|
|
2100
2055
|
name: 'example_name2',
|
|
2101
2056
|
},
|
|
@@ -2137,7 +2092,6 @@ describe('Database entities tests', (): void => {
|
|
|
2137
2092
|
it('Should delete party type', async (): Promise<void> => {
|
|
2138
2093
|
const partyType: NonPersistedPartyType = {
|
|
2139
2094
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
2140
|
-
origin: PartyOrigin.INTERNAL,
|
|
2141
2095
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
2142
2096
|
name: 'example_name',
|
|
2143
2097
|
}
|
|
@@ -2161,7 +2115,6 @@ describe('Database entities tests', (): void => {
|
|
|
2161
2115
|
uri: 'example.com',
|
|
2162
2116
|
partyType: {
|
|
2163
2117
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
2164
|
-
origin: PartyOrigin.INTERNAL,
|
|
2165
2118
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
2166
2119
|
name: 'example_name',
|
|
2167
2120
|
},
|
|
@@ -2188,7 +2141,6 @@ describe('Database entities tests', (): void => {
|
|
|
2188
2141
|
it('Should save party with existing party type', async (): Promise<void> => {
|
|
2189
2142
|
const partyType: NonPersistedPartyType = {
|
|
2190
2143
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
2191
|
-
origin: PartyOrigin.INTERNAL,
|
|
2192
2144
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
2193
2145
|
name: 'example_name',
|
|
2194
2146
|
}
|
|
@@ -2221,7 +2173,6 @@ describe('Database entities tests', (): void => {
|
|
|
2221
2173
|
expect(fromDb?.partyType).toBeDefined()
|
|
2222
2174
|
expect(fromDb?.partyType.id).toEqual(savedPartyType.id)
|
|
2223
2175
|
expect(fromDb?.partyType.type).toEqual(savedPartyType.type)
|
|
2224
|
-
expect(fromDb?.partyType.origin).toEqual(savedPartyType.origin)
|
|
2225
2176
|
expect(fromDb?.partyType.tenantId).toEqual(savedPartyType.tenantId)
|
|
2226
2177
|
expect(fromDb?.partyType.name).toEqual(savedPartyType.name)
|
|
2227
2178
|
})
|
|
@@ -2229,7 +2180,6 @@ describe('Database entities tests', (): void => {
|
|
|
2229
2180
|
it('Should not update creation date when saving party type', async (): Promise<void> => {
|
|
2230
2181
|
const partyType: NonPersistedPartyType = {
|
|
2231
2182
|
type: PartyTypeEnum.NATURAL_PERSON,
|
|
2232
|
-
origin: PartyOrigin.INTERNAL,
|
|
2233
2183
|
tenantId: '0605761c-4113-4ce5-a6b2-9cbae2f9d289',
|
|
2234
2184
|
name: 'example_name',
|
|
2235
2185
|
}
|