@sphereon/ssi-sdk.data-store 0.18.2-unstable.98 → 0.19.1-next.2
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/contact/AbstractContactStore.d.ts.map +1 -1
- package/dist/contact/AbstractContactStore.js.map +1 -1
- package/dist/contact/ContactStore.d.ts.map +1 -1
- package/dist/contact/ContactStore.js +12 -6
- package/dist/contact/ContactStore.js.map +1 -1
- package/dist/index.d.ts +2 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -10
- package/dist/index.js.map +1 -1
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts.map +1 -1
- package/dist/issuanceBranding/IssuanceBrandingStore.js.map +1 -1
- package/dist/migrations/generic/index.d.ts +0 -2
- package/dist/migrations/generic/index.d.ts.map +1 -1
- package/dist/migrations/generic/index.js +1 -4
- package/dist/migrations/generic/index.js.map +1 -1
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +1 -2
- package/dist/migrations/index.js.map +1 -1
- package/dist/types/contact/contact.d.ts.map +1 -1
- package/dist/types/contact/contact.js.map +1 -1
- package/package.json +4 -5
- package/src/__tests__/contact.entities.test.ts +32 -15
- package/src/__tests__/contact.store.test.ts +71 -28
- package/src/contact/AbstractContactStore.ts +3 -2
- package/src/contact/ContactStore.ts +15 -9
- package/src/entities/contact/PhysicalAddressEntity.ts +1 -1
- package/src/index.ts +0 -9
- package/src/issuanceBranding/IssuanceBrandingStore.ts +6 -8
- package/src/migrations/generic/index.ts +0 -3
- package/src/migrations/index.ts +0 -1
- package/src/types/contact/contact.ts +13 -2
- package/dist/digitalCredential/AbstractDigitalCredentialStore.d.ts +0 -10
- package/dist/digitalCredential/AbstractDigitalCredentialStore.d.ts.map +0 -1
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js +0 -7
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js.map +0 -1
- package/dist/digitalCredential/DigitalCredentialStore.d.ts +0 -15
- package/dist/digitalCredential/DigitalCredentialStore.d.ts.map +0 -1
- package/dist/digitalCredential/DigitalCredentialStore.js +0 -118
- package/dist/digitalCredential/DigitalCredentialStore.js.map +0 -1
- package/dist/entities/digitalCredential/DigitalCredentialEntity.d.ts +0 -23
- package/dist/entities/digitalCredential/DigitalCredentialEntity.d.ts.map +0 -1
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js +0 -93
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js.map +0 -1
- package/dist/migrations/generic/6-CreateDigitalCredential.d.ts +0 -7
- package/dist/migrations/generic/6-CreateDigitalCredential.d.ts.map +0 -1
- package/dist/migrations/generic/6-CreateDigitalCredential.js +0 -78
- package/dist/migrations/generic/6-CreateDigitalCredential.js.map +0 -1
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.d.ts +0 -7
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.d.ts.map +0 -1
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js +0 -59
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js.map +0 -1
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.d.ts +0 -7
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.d.ts.map +0 -1
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js +0 -50
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js.map +0 -1
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.d.ts +0 -42
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.d.ts.map +0 -1
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js +0 -3
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js.map +0 -1
- package/dist/types/digitalCredential/digitalCredential.d.ts +0 -42
- package/dist/types/digitalCredential/digitalCredential.d.ts.map +0 -1
- package/dist/types/digitalCredential/digitalCredential.js +0 -28
- package/dist/types/digitalCredential/digitalCredential.js.map +0 -1
- package/dist/utils/SortingUtils.d.ts +0 -3
- package/dist/utils/SortingUtils.d.ts.map +0 -1
- package/dist/utils/SortingUtils.js +0 -18
- package/dist/utils/SortingUtils.js.map +0 -1
- package/dist/utils/digitalCredential/MappingUtils.d.ts +0 -7
- package/dist/utils/digitalCredential/MappingUtils.d.ts.map +0 -1
- package/dist/utils/digitalCredential/MappingUtils.js +0 -99
- package/dist/utils/digitalCredential/MappingUtils.js.map +0 -1
- package/src/__tests__/digitalCredential.entities.test.ts +0 -254
- package/src/__tests__/digitalCredential.store.test.ts +0 -294
- package/src/digitalCredential/AbstractDigitalCredentialStore.ts +0 -17
- package/src/digitalCredential/DigitalCredentialStore.ts +0 -127
- package/src/entities/digitalCredential/DigitalCredentialEntity.ts +0 -64
- package/src/migrations/generic/6-CreateDigitalCredential.ts +0 -66
- package/src/migrations/postgres/1708525189001-CreateDigitalCredential.ts +0 -44
- package/src/migrations/sqlite/1708525189002-CreateDigitalCredential.ts +0 -34
- package/src/types/digitalCredential/IAbstractDigitalCredentialStore.ts +0 -37
- package/src/types/digitalCredential/digitalCredential.ts +0 -46
- package/src/utils/SortingUtils.ts +0 -16
- package/src/utils/digitalCredential/MappingUtils.ts +0 -122
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
NonPersistedPartyType,
|
|
31
31
|
NonPersistedPhysicalAddress,
|
|
32
32
|
Organization,
|
|
33
|
-
PartyTypeEnum
|
|
33
|
+
PartyTypeEnum,
|
|
34
34
|
} from '../types'
|
|
35
35
|
import {
|
|
36
36
|
connectionEntityFrom,
|
|
@@ -845,12 +845,14 @@ describe('Database entities tests', (): void => {
|
|
|
845
845
|
|
|
846
846
|
const electronicAddress: NonPersistedElectronicAddress = {
|
|
847
847
|
type: 'email',
|
|
848
|
-
electronicAddress: 'example_electronic_address'
|
|
848
|
+
electronicAddress: 'example_electronic_address',
|
|
849
849
|
}
|
|
850
850
|
const electronicAddressEntity: ElectronicAddressEntity = electronicAddressEntityFrom(electronicAddress)
|
|
851
851
|
electronicAddressEntity.party = savedParty1
|
|
852
852
|
|
|
853
|
-
const savedElectronicAddress: ElectronicAddressEntity | null = await dbConnection
|
|
853
|
+
const savedElectronicAddress: ElectronicAddressEntity | null = await dbConnection
|
|
854
|
+
.getRepository(ElectronicAddressEntity)
|
|
855
|
+
.save(electronicAddressEntity)
|
|
854
856
|
|
|
855
857
|
expect(savedElectronicAddress).toBeDefined()
|
|
856
858
|
|
|
@@ -2199,7 +2201,7 @@ describe('Database entities tests', (): void => {
|
|
|
2199
2201
|
it('Should save email electronic address to database', async (): Promise<void> => {
|
|
2200
2202
|
const electronicAddress: NonPersistedElectronicAddress = {
|
|
2201
2203
|
type: 'email',
|
|
2202
|
-
electronicAddress: 'example_email_address'
|
|
2204
|
+
electronicAddress: 'example_email_address',
|
|
2203
2205
|
}
|
|
2204
2206
|
|
|
2205
2207
|
const electronicAddressEntity: ElectronicAddressEntity = electronicAddressEntityFrom(electronicAddress)
|
|
@@ -2221,7 +2223,7 @@ describe('Database entities tests', (): void => {
|
|
|
2221
2223
|
it('Should save phone electronic address to database', async (): Promise<void> => {
|
|
2222
2224
|
const electronicAddress: NonPersistedElectronicAddress = {
|
|
2223
2225
|
type: 'phone',
|
|
2224
|
-
electronicAddress: 'example_phone_number'
|
|
2226
|
+
electronicAddress: 'example_phone_number',
|
|
2225
2227
|
}
|
|
2226
2228
|
|
|
2227
2229
|
const electronicAddressEntity: ElectronicAddressEntity = electronicAddressEntityFrom(electronicAddress)
|
|
@@ -2243,12 +2245,14 @@ describe('Database entities tests', (): void => {
|
|
|
2243
2245
|
it('should throw error when saving electronic address with blank electronic address', async (): Promise<void> => {
|
|
2244
2246
|
const electronicAddress: NonPersistedElectronicAddress = {
|
|
2245
2247
|
type: 'email',
|
|
2246
|
-
electronicAddress: ''
|
|
2248
|
+
electronicAddress: '',
|
|
2247
2249
|
}
|
|
2248
2250
|
|
|
2249
2251
|
const electronicAddressEntity: ElectronicAddressEntity = electronicAddressEntityFrom(electronicAddress)
|
|
2250
2252
|
|
|
2251
|
-
await expect(dbConnection.getRepository(ElectronicAddressEntity).save(electronicAddressEntity)).rejects.toThrowError(
|
|
2253
|
+
await expect(dbConnection.getRepository(ElectronicAddressEntity).save(electronicAddressEntity)).rejects.toThrowError(
|
|
2254
|
+
'Blank electronic addresses are not allowed'
|
|
2255
|
+
)
|
|
2252
2256
|
})
|
|
2253
2257
|
|
|
2254
2258
|
it('Should save home physical address to database', async (): Promise<void> => {
|
|
@@ -2367,7 +2371,9 @@ describe('Database entities tests', (): void => {
|
|
|
2367
2371
|
|
|
2368
2372
|
const physicalAddressEntity: PhysicalAddressEntity = physicalAddressEntityFrom(physicalAddress)
|
|
2369
2373
|
|
|
2370
|
-
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2374
|
+
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2375
|
+
'Blank street names are not allowed'
|
|
2376
|
+
)
|
|
2371
2377
|
})
|
|
2372
2378
|
|
|
2373
2379
|
it('should throw error when saving physical address with blank street number', async (): Promise<void> => {
|
|
@@ -2384,7 +2390,9 @@ describe('Database entities tests', (): void => {
|
|
|
2384
2390
|
|
|
2385
2391
|
const physicalAddressEntity: PhysicalAddressEntity = physicalAddressEntityFrom(physicalAddress)
|
|
2386
2392
|
|
|
2387
|
-
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2393
|
+
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2394
|
+
'Blank street numbers are not allowed'
|
|
2395
|
+
)
|
|
2388
2396
|
})
|
|
2389
2397
|
|
|
2390
2398
|
it('should throw error when saving physical address with blank building name', async (): Promise<void> => {
|
|
@@ -2401,7 +2409,9 @@ describe('Database entities tests', (): void => {
|
|
|
2401
2409
|
|
|
2402
2410
|
const physicalAddressEntity: PhysicalAddressEntity = physicalAddressEntityFrom(physicalAddress)
|
|
2403
2411
|
|
|
2404
|
-
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2412
|
+
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2413
|
+
'Blank building names are not allowed'
|
|
2414
|
+
)
|
|
2405
2415
|
})
|
|
2406
2416
|
|
|
2407
2417
|
it('should throw error when saving physical address with blank postal code', async (): Promise<void> => {
|
|
@@ -2418,7 +2428,9 @@ describe('Database entities tests', (): void => {
|
|
|
2418
2428
|
|
|
2419
2429
|
const physicalAddressEntity: PhysicalAddressEntity = physicalAddressEntityFrom(physicalAddress)
|
|
2420
2430
|
|
|
2421
|
-
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2431
|
+
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2432
|
+
'Blank postal codes are not allowed'
|
|
2433
|
+
)
|
|
2422
2434
|
})
|
|
2423
2435
|
|
|
2424
2436
|
it('should throw error when saving physical address with blank city name', async (): Promise<void> => {
|
|
@@ -2435,7 +2447,9 @@ describe('Database entities tests', (): void => {
|
|
|
2435
2447
|
|
|
2436
2448
|
const physicalAddressEntity: PhysicalAddressEntity = physicalAddressEntityFrom(physicalAddress)
|
|
2437
2449
|
|
|
2438
|
-
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2450
|
+
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2451
|
+
'Blank city names are not allowed'
|
|
2452
|
+
)
|
|
2439
2453
|
})
|
|
2440
2454
|
|
|
2441
2455
|
it('should throw error when saving physical address with blank province name', async (): Promise<void> => {
|
|
@@ -2452,7 +2466,9 @@ describe('Database entities tests', (): void => {
|
|
|
2452
2466
|
|
|
2453
2467
|
const physicalAddressEntity: PhysicalAddressEntity = physicalAddressEntityFrom(physicalAddress)
|
|
2454
2468
|
|
|
2455
|
-
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2469
|
+
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2470
|
+
'Blank province names are not allowed'
|
|
2471
|
+
)
|
|
2456
2472
|
})
|
|
2457
2473
|
|
|
2458
2474
|
it('should throw error when saving physical address with blank country code', async (): Promise<void> => {
|
|
@@ -2469,7 +2485,8 @@ describe('Database entities tests', (): void => {
|
|
|
2469
2485
|
|
|
2470
2486
|
const physicalAddressEntity: PhysicalAddressEntity = physicalAddressEntityFrom(physicalAddress)
|
|
2471
2487
|
|
|
2472
|
-
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2488
|
+
await expect(dbConnection.getRepository(PhysicalAddressEntity).save(physicalAddressEntity)).rejects.toThrowError(
|
|
2489
|
+
'Blank country codes are not allowed'
|
|
2490
|
+
)
|
|
2473
2491
|
})
|
|
2474
|
-
|
|
2475
2492
|
})
|
|
@@ -1804,7 +1804,7 @@ describe('Contact store tests', (): void => {
|
|
|
1804
1804
|
|
|
1805
1805
|
const electronicAddress: NonPersistedElectronicAddress = {
|
|
1806
1806
|
type: 'email',
|
|
1807
|
-
electronicAddress: 'example_electronic_address'
|
|
1807
|
+
electronicAddress: 'example_electronic_address',
|
|
1808
1808
|
}
|
|
1809
1809
|
const savedElectronicAddress: ElectronicAddress = await contactStore.addElectronicAddress({ partyId: savedParty.id, electronicAddress })
|
|
1810
1810
|
expect(savedElectronicAddress).toBeDefined()
|
|
@@ -1817,7 +1817,9 @@ describe('Contact store tests', (): void => {
|
|
|
1817
1817
|
it('should throw error when getting electronic address with unknown id', async (): Promise<void> => {
|
|
1818
1818
|
const electronicAddressId = 'unknownElectronicAddressId'
|
|
1819
1819
|
|
|
1820
|
-
await expect(contactStore.getElectronicAddress({ electronicAddressId })).rejects.toThrow(
|
|
1820
|
+
await expect(contactStore.getElectronicAddress({ electronicAddressId })).rejects.toThrow(
|
|
1821
|
+
`No electronic address found for id: ${electronicAddressId}`
|
|
1822
|
+
)
|
|
1821
1823
|
})
|
|
1822
1824
|
|
|
1823
1825
|
it('should get all electronic addresses for contact', async (): Promise<void> => {
|
|
@@ -1840,16 +1842,22 @@ describe('Contact store tests', (): void => {
|
|
|
1840
1842
|
|
|
1841
1843
|
const electronicAddress1: NonPersistedElectronicAddress = {
|
|
1842
1844
|
type: 'email',
|
|
1843
|
-
electronicAddress: 'example_electronic_address1'
|
|
1845
|
+
electronicAddress: 'example_electronic_address1',
|
|
1844
1846
|
}
|
|
1845
|
-
const savedElectronicAddress1: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1847
|
+
const savedElectronicAddress1: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1848
|
+
partyId: savedParty.id,
|
|
1849
|
+
electronicAddress: electronicAddress1,
|
|
1850
|
+
})
|
|
1846
1851
|
expect(savedElectronicAddress1).toBeDefined()
|
|
1847
1852
|
|
|
1848
1853
|
const electronicAddress2: NonPersistedElectronicAddress = {
|
|
1849
1854
|
type: 'email',
|
|
1850
|
-
electronicAddress: 'example_electronic_address2'
|
|
1855
|
+
electronicAddress: 'example_electronic_address2',
|
|
1851
1856
|
}
|
|
1852
|
-
const savedElectronicAddress2: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1857
|
+
const savedElectronicAddress2: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1858
|
+
partyId: savedParty.id,
|
|
1859
|
+
electronicAddress: electronicAddress2,
|
|
1860
|
+
})
|
|
1853
1861
|
expect(savedElectronicAddress2).toBeDefined()
|
|
1854
1862
|
|
|
1855
1863
|
const args: GetElectronicAddressesArgs = {
|
|
@@ -1881,16 +1889,22 @@ describe('Contact store tests', (): void => {
|
|
|
1881
1889
|
|
|
1882
1890
|
const electronicAddress1: NonPersistedElectronicAddress = {
|
|
1883
1891
|
type: 'email',
|
|
1884
|
-
electronicAddress: 'example_electronic_address1'
|
|
1892
|
+
electronicAddress: 'example_electronic_address1',
|
|
1885
1893
|
}
|
|
1886
|
-
const savedElectronicAddress1: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1894
|
+
const savedElectronicAddress1: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1895
|
+
partyId: savedParty.id,
|
|
1896
|
+
electronicAddress: electronicAddress1,
|
|
1897
|
+
})
|
|
1887
1898
|
expect(savedElectronicAddress1).toBeDefined()
|
|
1888
1899
|
|
|
1889
1900
|
const electronicAddress2: NonPersistedElectronicAddress = {
|
|
1890
1901
|
type: 'email',
|
|
1891
|
-
electronicAddress: 'example_electronic_address2'
|
|
1902
|
+
electronicAddress: 'example_electronic_address2',
|
|
1892
1903
|
}
|
|
1893
|
-
const savedElectronicAddress2: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1904
|
+
const savedElectronicAddress2: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1905
|
+
partyId: savedParty.id,
|
|
1906
|
+
electronicAddress: electronicAddress2,
|
|
1907
|
+
})
|
|
1894
1908
|
expect(savedElectronicAddress2).toBeDefined()
|
|
1895
1909
|
|
|
1896
1910
|
const result: Array<ElectronicAddress> = await contactStore.getElectronicAddresses()
|
|
@@ -1919,16 +1933,22 @@ describe('Contact store tests', (): void => {
|
|
|
1919
1933
|
const electronicAddress = 'example_electronic_address1'
|
|
1920
1934
|
const electronicAddress1: NonPersistedElectronicAddress = {
|
|
1921
1935
|
type: 'email',
|
|
1922
|
-
electronicAddress
|
|
1936
|
+
electronicAddress,
|
|
1923
1937
|
}
|
|
1924
|
-
const savedElectronicAddress1: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1938
|
+
const savedElectronicAddress1: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1939
|
+
partyId: savedParty.id,
|
|
1940
|
+
electronicAddress: electronicAddress1,
|
|
1941
|
+
})
|
|
1925
1942
|
expect(savedElectronicAddress1).toBeDefined()
|
|
1926
1943
|
|
|
1927
1944
|
const electronicAddress2: NonPersistedElectronicAddress = {
|
|
1928
1945
|
type: 'email',
|
|
1929
|
-
electronicAddress: 'example_electronic_address2'
|
|
1946
|
+
electronicAddress: 'example_electronic_address2',
|
|
1930
1947
|
}
|
|
1931
|
-
const savedElectronicAddress2: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1948
|
+
const savedElectronicAddress2: ElectronicAddress = await contactStore.addElectronicAddress({
|
|
1949
|
+
partyId: savedParty.id,
|
|
1950
|
+
electronicAddress: electronicAddress2,
|
|
1951
|
+
})
|
|
1932
1952
|
expect(savedElectronicAddress2).toBeDefined()
|
|
1933
1953
|
|
|
1934
1954
|
const args: GetElectronicAddressesArgs = {
|
|
@@ -1960,7 +1980,7 @@ describe('Contact store tests', (): void => {
|
|
|
1960
1980
|
|
|
1961
1981
|
const electronicAddress: NonPersistedElectronicAddress = {
|
|
1962
1982
|
type: 'email',
|
|
1963
|
-
electronicAddress: 'example_electronic_address'
|
|
1983
|
+
electronicAddress: 'example_electronic_address',
|
|
1964
1984
|
}
|
|
1965
1985
|
const savedElectronicAddress: ElectronicAddress = await contactStore.addElectronicAddress({ partyId: savedParty.id, electronicAddress })
|
|
1966
1986
|
expect(savedElectronicAddress).toBeDefined()
|
|
@@ -1989,7 +2009,7 @@ describe('Contact store tests', (): void => {
|
|
|
1989
2009
|
|
|
1990
2010
|
const electronicAddress: NonPersistedElectronicAddress = {
|
|
1991
2011
|
type: 'email',
|
|
1992
|
-
electronicAddress: 'example_electronic_address'
|
|
2012
|
+
electronicAddress: 'example_electronic_address',
|
|
1993
2013
|
}
|
|
1994
2014
|
const savedElectronicAddress: ElectronicAddress = await contactStore.addElectronicAddress({ partyId: savedParty.id, electronicAddress })
|
|
1995
2015
|
const newElectronicAddress = 'new_example_electronic_address'
|
|
@@ -2022,20 +2042,24 @@ describe('Contact store tests', (): void => {
|
|
|
2022
2042
|
|
|
2023
2043
|
const electronicAddress: NonPersistedElectronicAddress = {
|
|
2024
2044
|
type: 'email',
|
|
2025
|
-
electronicAddress: 'example_electronic_address'
|
|
2045
|
+
electronicAddress: 'example_electronic_address',
|
|
2026
2046
|
}
|
|
2027
2047
|
const savedElectronicAddress: ElectronicAddress = await contactStore.addElectronicAddress({ partyId: savedParty.id, electronicAddress })
|
|
2028
2048
|
expect(savedElectronicAddress).toBeDefined()
|
|
2029
2049
|
|
|
2030
2050
|
await contactStore.removeElectronicAddress({ electronicAddressId: savedElectronicAddress.id })
|
|
2031
2051
|
|
|
2032
|
-
await expect(contactStore.getElectronicAddress({ electronicAddressId: savedElectronicAddress.id })).rejects.toThrow(
|
|
2052
|
+
await expect(contactStore.getElectronicAddress({ electronicAddressId: savedElectronicAddress.id })).rejects.toThrow(
|
|
2053
|
+
`No electronic address found for id: ${savedElectronicAddress.id}`
|
|
2054
|
+
)
|
|
2033
2055
|
})
|
|
2034
2056
|
|
|
2035
2057
|
it('should throw error when removing electronic address with unknown id', async (): Promise<void> => {
|
|
2036
2058
|
const electronicAddressId = 'unknownElectronicAddressId'
|
|
2037
2059
|
|
|
2038
|
-
await expect(contactStore.removeElectronicAddress({ electronicAddressId })).rejects.toThrow(
|
|
2060
|
+
await expect(contactStore.removeElectronicAddress({ electronicAddressId })).rejects.toThrow(
|
|
2061
|
+
`No electronic address found for id: ${electronicAddressId}`
|
|
2062
|
+
)
|
|
2039
2063
|
})
|
|
2040
2064
|
|
|
2041
2065
|
it('should get physical address by id', async (): Promise<void> => {
|
|
@@ -2108,7 +2132,10 @@ describe('Contact store tests', (): void => {
|
|
|
2108
2132
|
provinceName: 'example_province_name',
|
|
2109
2133
|
countryCode: 'example_country_code',
|
|
2110
2134
|
}
|
|
2111
|
-
const savedPhysicalAddress1: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2135
|
+
const savedPhysicalAddress1: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2136
|
+
partyId: savedParty.id,
|
|
2137
|
+
physicalAddress: physicalAddress1,
|
|
2138
|
+
})
|
|
2112
2139
|
expect(savedPhysicalAddress1).toBeDefined()
|
|
2113
2140
|
|
|
2114
2141
|
const physicalAddress2: NonPersistedPhysicalAddress = {
|
|
@@ -2121,7 +2148,10 @@ describe('Contact store tests', (): void => {
|
|
|
2121
2148
|
provinceName: 'example_province_name',
|
|
2122
2149
|
countryCode: 'example_country_code',
|
|
2123
2150
|
}
|
|
2124
|
-
const savedPhysicalAddress2: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2151
|
+
const savedPhysicalAddress2: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2152
|
+
partyId: savedParty.id,
|
|
2153
|
+
physicalAddress: physicalAddress2,
|
|
2154
|
+
})
|
|
2125
2155
|
expect(savedPhysicalAddress2).toBeDefined()
|
|
2126
2156
|
|
|
2127
2157
|
const args: GetPhysicalAddressesArgs = {
|
|
@@ -2130,7 +2160,7 @@ describe('Contact store tests', (): void => {
|
|
|
2130
2160
|
|
|
2131
2161
|
const result: Array<PhysicalAddress> = await contactStore.getPhysicalAddresses(args)
|
|
2132
2162
|
|
|
2133
|
-
expect(result.length).
|
|
2163
|
+
expect(result.length).toEqual(2)
|
|
2134
2164
|
})
|
|
2135
2165
|
|
|
2136
2166
|
it('should get all electronic addresses', async (): Promise<void> => {
|
|
@@ -2161,7 +2191,10 @@ describe('Contact store tests', (): void => {
|
|
|
2161
2191
|
provinceName: 'example_province_name',
|
|
2162
2192
|
countryCode: 'example_country_code',
|
|
2163
2193
|
}
|
|
2164
|
-
const savedPhysicalAddress1: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2194
|
+
const savedPhysicalAddress1: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2195
|
+
partyId: savedParty.id,
|
|
2196
|
+
physicalAddress: physicalAddress1,
|
|
2197
|
+
})
|
|
2165
2198
|
expect(savedPhysicalAddress1).toBeDefined()
|
|
2166
2199
|
|
|
2167
2200
|
const physicalAddress2: NonPersistedPhysicalAddress = {
|
|
@@ -2174,7 +2207,10 @@ describe('Contact store tests', (): void => {
|
|
|
2174
2207
|
provinceName: 'example_province_name',
|
|
2175
2208
|
countryCode: 'example_country_code',
|
|
2176
2209
|
}
|
|
2177
|
-
const savedPhysicalAddress2: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2210
|
+
const savedPhysicalAddress2: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2211
|
+
partyId: savedParty.id,
|
|
2212
|
+
physicalAddress: physicalAddress2,
|
|
2213
|
+
})
|
|
2178
2214
|
expect(savedPhysicalAddress2).toBeDefined()
|
|
2179
2215
|
|
|
2180
2216
|
const result: Array<PhysicalAddress> = await contactStore.getPhysicalAddresses()
|
|
@@ -2211,7 +2247,10 @@ describe('Contact store tests', (): void => {
|
|
|
2211
2247
|
provinceName: 'example_province_name1',
|
|
2212
2248
|
countryCode: 'example_country_code1',
|
|
2213
2249
|
}
|
|
2214
|
-
const savedPhysicalAddress1: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2250
|
+
const savedPhysicalAddress1: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2251
|
+
partyId: savedParty.id,
|
|
2252
|
+
physicalAddress: physicalAddress1,
|
|
2253
|
+
})
|
|
2215
2254
|
expect(savedPhysicalAddress1).toBeDefined()
|
|
2216
2255
|
|
|
2217
2256
|
const physicalAddress2: NonPersistedPhysicalAddress = {
|
|
@@ -2224,7 +2263,10 @@ describe('Contact store tests', (): void => {
|
|
|
2224
2263
|
provinceName: 'example_province_name2',
|
|
2225
2264
|
countryCode: 'example_country_code2',
|
|
2226
2265
|
}
|
|
2227
|
-
const savedPhysicalAddress2: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2266
|
+
const savedPhysicalAddress2: PhysicalAddress = await contactStore.addPhysicalAddress({
|
|
2267
|
+
partyId: savedParty.id,
|
|
2268
|
+
physicalAddress: physicalAddress2,
|
|
2269
|
+
})
|
|
2228
2270
|
expect(savedPhysicalAddress2).toBeDefined()
|
|
2229
2271
|
|
|
2230
2272
|
const args: GetPhysicalAddressesArgs = {
|
|
@@ -2343,7 +2385,9 @@ describe('Contact store tests', (): void => {
|
|
|
2343
2385
|
|
|
2344
2386
|
await contactStore.removePhysicalAddress({ physicalAddressId: savedPhysicalAddress.id })
|
|
2345
2387
|
|
|
2346
|
-
await expect(contactStore.getPhysicalAddress({ physicalAddressId: savedPhysicalAddress.id })).rejects.toThrow(
|
|
2388
|
+
await expect(contactStore.getPhysicalAddress({ physicalAddressId: savedPhysicalAddress.id })).rejects.toThrow(
|
|
2389
|
+
`No physical address found for id: ${savedPhysicalAddress.id}`
|
|
2390
|
+
)
|
|
2347
2391
|
})
|
|
2348
2392
|
|
|
2349
2393
|
it('should throw error when removing physical address with unknown id', async (): Promise<void> => {
|
|
@@ -2351,5 +2395,4 @@ describe('Contact store tests', (): void => {
|
|
|
2351
2395
|
|
|
2352
2396
|
await expect(contactStore.removePhysicalAddress({ physicalAddressId })).rejects.toThrow(`No physical address found for id: ${physicalAddressId}`)
|
|
2353
2397
|
})
|
|
2354
|
-
|
|
2355
2398
|
})
|
|
@@ -21,7 +21,8 @@ import {
|
|
|
21
21
|
Identity,
|
|
22
22
|
Party,
|
|
23
23
|
PartyRelationship,
|
|
24
|
-
PartyType,
|
|
24
|
+
PartyType,
|
|
25
|
+
PhysicalAddress,
|
|
25
26
|
RemoveElectronicAddressArgs,
|
|
26
27
|
RemoveIdentityArgs,
|
|
27
28
|
RemovePartyArgs,
|
|
@@ -33,7 +34,7 @@ import {
|
|
|
33
34
|
UpdatePartyArgs,
|
|
34
35
|
UpdatePartyTypeArgs,
|
|
35
36
|
UpdatePhysicalAddressArgs,
|
|
36
|
-
UpdateRelationshipArgs
|
|
37
|
+
UpdateRelationshipArgs,
|
|
37
38
|
} from '../types'
|
|
38
39
|
|
|
39
40
|
export abstract class AbstractContactStore {
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
partyTypeEntityFrom,
|
|
30
30
|
partyTypeFrom,
|
|
31
31
|
physicalAddressEntityFrom,
|
|
32
|
-
physicalAddressFrom
|
|
32
|
+
physicalAddressFrom,
|
|
33
33
|
} from '../utils/contact/MappingUtils'
|
|
34
34
|
import {
|
|
35
35
|
AddElectronicAddressArgs,
|
|
@@ -653,23 +653,27 @@ export class ContactStore extends AbstractContactStore {
|
|
|
653
653
|
const identityRepository: Repository<IdentityEntity> = connection.getRepository(IdentityEntity)
|
|
654
654
|
|
|
655
655
|
identities.map(async (identity: IdentityEntity): Promise<void> => {
|
|
656
|
-
await correlationIdentifierRepository
|
|
656
|
+
await correlationIdentifierRepository
|
|
657
|
+
.delete(identity.identifier.id)
|
|
657
658
|
.catch((error) => Promise.reject(Error(`Unable to remove identity.identifier with id ${identity.identifier.id}. ${error}`)))
|
|
658
659
|
|
|
659
660
|
if (identity.connection) {
|
|
660
661
|
await baseConfigRepository.delete(identity.connection.config.id)
|
|
661
|
-
await connectionRepository
|
|
662
|
+
await connectionRepository
|
|
663
|
+
.delete(identity.connection.id)
|
|
662
664
|
.catch((error) => Promise.reject(Error(`Unable to remove identity.connection with id ${identity.connection?.id}. ${error}`)))
|
|
663
665
|
}
|
|
664
666
|
|
|
665
667
|
if (identity.metadata) {
|
|
666
668
|
identity.metadata.map(async (metadataItem: IdentityMetadataItemEntity): Promise<void> => {
|
|
667
|
-
await identityMetadataItemRepository
|
|
669
|
+
await identityMetadataItemRepository
|
|
670
|
+
.delete(metadataItem.id)
|
|
668
671
|
.catch((error) => Promise.reject(Error(`Unable to remove identity.metadataItem with id ${metadataItem.id}. ${error}`)))
|
|
669
672
|
})
|
|
670
673
|
}
|
|
671
674
|
|
|
672
|
-
await identityRepository
|
|
675
|
+
await identityRepository
|
|
676
|
+
.delete(identity.id)
|
|
673
677
|
.catch((error) => Promise.reject(Error(`Unable to remove identity with id ${identity.id}. ${error}`)))
|
|
674
678
|
})
|
|
675
679
|
}
|
|
@@ -679,8 +683,9 @@ export class ContactStore extends AbstractContactStore {
|
|
|
679
683
|
|
|
680
684
|
const electronicAddressRepository: Repository<ElectronicAddressEntity> = (await this.dbConnection).getRepository(ElectronicAddressEntity)
|
|
681
685
|
electronicAddresses.map(async (electronicAddress: ElectronicAddressEntity): Promise<void> => {
|
|
682
|
-
await electronicAddressRepository
|
|
683
|
-
|
|
686
|
+
await electronicAddressRepository
|
|
687
|
+
.delete(electronicAddress.id)
|
|
688
|
+
.catch((error) => Promise.reject(Error(`Unable to remove electronic address with id ${electronicAddress.id}. ${error}`)))
|
|
684
689
|
})
|
|
685
690
|
}
|
|
686
691
|
|
|
@@ -689,8 +694,9 @@ export class ContactStore extends AbstractContactStore {
|
|
|
689
694
|
|
|
690
695
|
const physicalAddressRepository: Repository<PhysicalAddressEntity> = (await this.dbConnection).getRepository(PhysicalAddressEntity)
|
|
691
696
|
physicalAddresses.map(async (physicalAddress: PhysicalAddressEntity): Promise<void> => {
|
|
692
|
-
await physicalAddressRepository
|
|
693
|
-
|
|
697
|
+
await physicalAddressRepository
|
|
698
|
+
.delete(physicalAddress.id)
|
|
699
|
+
.catch((error) => Promise.reject(Error(`Unable to remove physical address with id ${physicalAddress.id}. ${error}`)))
|
|
694
700
|
})
|
|
695
701
|
}
|
|
696
702
|
|
package/src/index.ts
CHANGED
|
@@ -31,8 +31,6 @@ export { AbstractIssuanceBrandingStore } from './issuanceBranding/AbstractIssuan
|
|
|
31
31
|
export { IssuanceBrandingStore } from './issuanceBranding/IssuanceBrandingStore'
|
|
32
32
|
export { StatusListStore } from './statusList/StatusListStore'
|
|
33
33
|
import { AuditEventEntity, auditEventEntityFrom } from './entities/eventLogger/AuditEventEntity'
|
|
34
|
-
import { DigitalCredentialEntity } from './entities/digitalCredential/DigitalCredentialEntity'
|
|
35
|
-
import { digitalCredentialFrom, digitalCredentialsFrom, nonPersistedDigitalCredentialEntityFromAddArgs } from './utils/digitalCredential/MappingUtils'
|
|
36
34
|
export { AbstractEventLoggerStore } from './eventLogger/AbstractEventLoggerStore'
|
|
37
35
|
export { EventLoggerStore } from './eventLogger/EventLoggerStore'
|
|
38
36
|
export {
|
|
@@ -79,15 +77,12 @@ export const DataStoreStatusListEntities = [StatusListEntity, StatusListEntryEnt
|
|
|
79
77
|
|
|
80
78
|
export const DataStoreEventLoggerEntities = [AuditEventEntity]
|
|
81
79
|
|
|
82
|
-
export const DataStoreDigitalCredentialEntities = [DigitalCredentialEntity]
|
|
83
|
-
|
|
84
80
|
// All entities combined if a party wants to enable them all at once
|
|
85
81
|
export const DataStoreEntities = [
|
|
86
82
|
...DataStoreContactEntities,
|
|
87
83
|
...DataStoreIssuanceBrandingEntities,
|
|
88
84
|
...DataStoreStatusListEntities,
|
|
89
85
|
...DataStoreEventLoggerEntities,
|
|
90
|
-
...DataStoreDigitalCredentialEntities,
|
|
91
86
|
]
|
|
92
87
|
|
|
93
88
|
export {
|
|
@@ -124,8 +119,4 @@ export {
|
|
|
124
119
|
StatusListEntryEntity,
|
|
125
120
|
AuditEventEntity,
|
|
126
121
|
auditEventEntityFrom,
|
|
127
|
-
DigitalCredentialEntity,
|
|
128
|
-
digitalCredentialFrom,
|
|
129
|
-
digitalCredentialsFrom,
|
|
130
|
-
nonPersistedDigitalCredentialEntityFromAddArgs,
|
|
131
122
|
}
|
|
@@ -376,14 +376,12 @@ export class IssuanceBrandingStore extends AbstractIssuanceBrandingStore {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
const issuerLocaleBrandingRepository: Repository<IssuerLocaleBrandingEntity> = (await this.dbConnection).getRepository(IssuerLocaleBrandingEntity)
|
|
379
|
-
const addIssuerLocaleBranding: Array<Promise<void>> = localeBranding.map(
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
}
|
|
386
|
-
)
|
|
379
|
+
const addIssuerLocaleBranding: Array<Promise<void>> = localeBranding.map(async (localeBranding: IBasicIssuerLocaleBranding): Promise<void> => {
|
|
380
|
+
const issuerLocaleBrandingEntity: IssuerLocaleBrandingEntity = issuerLocaleBrandingEntityFrom(localeBranding)
|
|
381
|
+
debug('Adding issuer locale branding', issuerLocaleBrandingEntity)
|
|
382
|
+
issuerLocaleBrandingEntity.issuerBranding = issuerBranding
|
|
383
|
+
await issuerLocaleBrandingRepository.save(issuerLocaleBrandingEntity, { transaction: true })
|
|
384
|
+
})
|
|
387
385
|
|
|
388
386
|
await Promise.all(addIssuerLocaleBranding)
|
|
389
387
|
|
|
@@ -3,7 +3,6 @@ import { CreateIssuanceBranding1659463079429 } from './2-CreateIssuanceBranding'
|
|
|
3
3
|
import { CreateContacts1690925872318 } from './3-CreateContacts'
|
|
4
4
|
import { CreateStatusList1693866470000 } from './4-CreateStatusList'
|
|
5
5
|
import { CreateAuditEvents1701635835330 } from './5-CreateAuditEvents'
|
|
6
|
-
import { CreateDigitalCredential1708525189000 } from './6-CreateDigitalCredential'
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
@@ -18,7 +17,6 @@ export const DataStoreContactMigrations = [CreateContacts1659463079429, CreateCo
|
|
|
18
17
|
export const DataStoreIssuanceBrandingMigrations = [CreateIssuanceBranding1659463079429]
|
|
19
18
|
export const DataStoreStatusListMigrations = [CreateStatusList1693866470000]
|
|
20
19
|
export const DataStoreEventLoggerMigrations = [CreateAuditEvents1701635835330]
|
|
21
|
-
export const DataStoreDigitalCredentialMigrations = [CreateDigitalCredential1708525189000]
|
|
22
20
|
|
|
23
21
|
// All migrations together
|
|
24
22
|
export const DataStoreMigrations = [
|
|
@@ -26,5 +24,4 @@ export const DataStoreMigrations = [
|
|
|
26
24
|
...DataStoreIssuanceBrandingMigrations,
|
|
27
25
|
...DataStoreStatusListMigrations,
|
|
28
26
|
...DataStoreEventLoggerMigrations,
|
|
29
|
-
...DataStoreDigitalCredentialMigrations,
|
|
30
27
|
]
|
package/src/migrations/index.ts
CHANGED
|
@@ -15,7 +15,16 @@ export type Party = {
|
|
|
15
15
|
}
|
|
16
16
|
export type NonPersistedParty = Omit<
|
|
17
17
|
Party,
|
|
18
|
-
|
|
18
|
+
| 'id'
|
|
19
|
+
| 'identities'
|
|
20
|
+
| 'electronicAddresses'
|
|
21
|
+
| 'physicalAddresses'
|
|
22
|
+
| 'contact'
|
|
23
|
+
| 'roles'
|
|
24
|
+
| 'partyType'
|
|
25
|
+
| 'relationships'
|
|
26
|
+
| 'createdAt'
|
|
27
|
+
| 'lastUpdatedAt'
|
|
19
28
|
> & {
|
|
20
29
|
identities?: Array<NonPersistedIdentity>
|
|
21
30
|
electronicAddresses?: Array<NonPersistedElectronicAddress>
|
|
@@ -24,7 +33,9 @@ export type NonPersistedParty = Omit<
|
|
|
24
33
|
partyType: NonPersistedPartyType
|
|
25
34
|
relationships?: Array<NonPersistedPartyRelationship>
|
|
26
35
|
}
|
|
27
|
-
export type PartialParty = Partial<
|
|
36
|
+
export type PartialParty = Partial<
|
|
37
|
+
Omit<Party, 'identities' | 'electronicAddresses' | 'physicalAddresses' | 'contact' | 'partyType' | 'relationships'>
|
|
38
|
+
> & {
|
|
28
39
|
identities?: PartialIdentity
|
|
29
40
|
electronicAddresses?: PartialElectronicAddress
|
|
30
41
|
physicalAddresses?: PartialPhysicalAddress
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AddCredentialArgs, GetCredentialArgs, GetCredentialsArgs, GetCredentialsResponse, RemoveCredentialArgs, UpdateCredentialStateArgs } from '../types/digitalCredential/IAbstractDigitalCredentialStore';
|
|
2
|
-
import { DigitalCredentialEntity } from '../entities/digitalCredential/DigitalCredentialEntity';
|
|
3
|
-
export declare abstract class AbstractDigitalCredentialStore {
|
|
4
|
-
abstract getCredential(args: GetCredentialArgs): Promise<DigitalCredentialEntity>;
|
|
5
|
-
abstract getCredentials(args?: GetCredentialsArgs): Promise<GetCredentialsResponse>;
|
|
6
|
-
abstract addCredential(args: AddCredentialArgs): Promise<DigitalCredentialEntity>;
|
|
7
|
-
abstract updateCredentialState(args: UpdateCredentialStateArgs): Promise<DigitalCredentialEntity>;
|
|
8
|
-
abstract removeCredential(args: RemoveCredentialArgs): Promise<boolean>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=AbstractDigitalCredentialStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractDigitalCredentialStore.d.ts","sourceRoot":"","sources":["../../src/digitalCredential/AbstractDigitalCredentialStore.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,4DAA4D,CAAA;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAA;AAE/F,8BAAsB,8BAA8B;IAClD,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IACjF,QAAQ,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,sBAAsB,CAAC;IACnF,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IACjF,QAAQ,CAAC,qBAAqB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,uBAAuB,CAAC;IACjG,QAAQ,CAAC,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,OAAO,CAAC;CACxE"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AbstractDigitalCredentialStore = void 0;
|
|
4
|
-
class AbstractDigitalCredentialStore {
|
|
5
|
-
}
|
|
6
|
-
exports.AbstractDigitalCredentialStore = AbstractDigitalCredentialStore;
|
|
7
|
-
//# sourceMappingURL=AbstractDigitalCredentialStore.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractDigitalCredentialStore.js","sourceRoot":"","sources":["../../src/digitalCredential/AbstractDigitalCredentialStore.ts"],"names":[],"mappings":";;;AAUA,MAAsB,8BAA8B;CAMnD;AAND,wEAMC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AbstractDigitalCredentialStore } from './AbstractDigitalCredentialStore';
|
|
2
|
-
import { AddCredentialArgs, GetCredentialArgs, GetCredentialsArgs, GetCredentialsResponse, RemoveCredentialArgs, UpdateCredentialStateArgs } from '../types/digitalCredential/IAbstractDigitalCredentialStore';
|
|
3
|
-
import { OrPromise } from '@sphereon/ssi-types';
|
|
4
|
-
import { DataSource } from 'typeorm';
|
|
5
|
-
import { DigitalCredentialEntity } from '../entities/digitalCredential/DigitalCredentialEntity';
|
|
6
|
-
export declare class DigitalCredentialStore extends AbstractDigitalCredentialStore {
|
|
7
|
-
private readonly dbConnection;
|
|
8
|
-
constructor(dbConnection: OrPromise<DataSource>);
|
|
9
|
-
addCredential: (args: AddCredentialArgs) => Promise<DigitalCredentialEntity>;
|
|
10
|
-
getCredential: (args: GetCredentialArgs) => Promise<DigitalCredentialEntity>;
|
|
11
|
-
getCredentials: (args?: GetCredentialsArgs) => Promise<GetCredentialsResponse>;
|
|
12
|
-
removeCredential: (args: RemoveCredentialArgs) => Promise<boolean>;
|
|
13
|
-
updateCredentialState: (args: UpdateCredentialStateArgs) => Promise<DigitalCredentialEntity>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=DigitalCredentialStore.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DigitalCredentialStore.d.ts","sourceRoot":"","sources":["../../src/digitalCredential/DigitalCredentialStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,yBAAyB,EAC1B,MAAM,4DAA4D,CAAA;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,UAAU,EAAgC,MAAM,SAAS,CAAA;AAElE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uDAAuD,CAAA;AAQ/F,qBAAa,sBAAuB,SAAQ,8BAA8B;IACxE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAuB;gBAExC,YAAY,EAAE,SAAS,CAAC,UAAU,CAAC;IAK/C,aAAa,SAAgB,iBAAiB,KAAG,QAAQ,uBAAuB,CAAC,CAMhF;IAED,aAAa,SAAgB,iBAAiB,KAAG,QAAQ,uBAAuB,CAAC,CAShF;IAED,cAAc,UAAiB,kBAAkB,KAAG,QAAQ,sBAAsB,CAAC,CAgBlF;IAED,gBAAgB,SAAgB,oBAAoB,KAAG,QAAQ,OAAO,CAAC,CAsBtE;IAED,qBAAqB,SAAgB,yBAAyB,KAAG,QAAQ,uBAAuB,CAAC,CAoChG;CACF"}
|