@sphereon/ssi-sdk.data-store 0.34.1-next.3 → 0.34.1-next.322
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/index.cjs +3377 -2924
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +357 -1203
- package/dist/index.d.ts +357 -1203
- package/dist/index.js +3300 -2847
- package/dist/index.js.map +1 -1
- package/package.json +10 -9
- package/src/__tests__/contact.entities.test.ts +4 -10
- package/src/__tests__/contact.store.test.ts +11 -6
- package/src/__tests__/digitalCredential.entities.test.ts +13 -6
- package/src/__tests__/digitalCredential.store.test.ts +6 -6
- package/src/__tests__/eventLogger.entities.test.ts +3 -3
- package/src/__tests__/eventLogger.store.test.ts +9 -4
- package/src/__tests__/issuanceBranding.entities.test.ts +2 -2
- package/src/__tests__/issuanceBranding.store.test.ts +3 -3
- package/src/__tests__/machineState.entities.test.ts +1 -1
- package/src/__tests__/machineState.store.test.ts +1 -1
- package/src/__tests__/pd-manager.entities.test.ts +27 -98
- package/src/__tests__/pd-manager.store.test.ts +151 -101
- package/src/__tests__/statusList.entities.test.ts +61 -4
- package/src/__tests__/statusList.store.test.ts +67 -4
- package/src/contact/ContactStore.ts +35 -35
- package/src/digitalCredential/DigitalCredentialStore.ts +6 -7
- package/src/entities/contact/BaseConfigEntity.ts +2 -2
- package/src/entities/contact/BaseContactEntity.ts +4 -5
- package/src/entities/contact/ConnectionEntity.ts +4 -4
- package/src/entities/contact/ContactMetadataItemEntity.ts +3 -4
- package/src/entities/contact/CorrelationIdentifierEntity.ts +3 -4
- package/src/entities/contact/DidAuthConfigEntity.ts +1 -2
- package/src/entities/contact/ElectronicAddressEntity.ts +15 -5
- package/src/entities/contact/IdentityEntity.ts +12 -11
- package/src/entities/contact/IdentityMetadataItemEntity.ts +3 -3
- package/src/entities/contact/NaturalPersonEntity.ts +5 -5
- package/src/entities/contact/OrganizationEntity.ts +1 -1
- package/src/entities/contact/PartyEntity.ts +7 -7
- package/src/entities/contact/PartyRelationshipEntity.ts +8 -8
- package/src/entities/contact/PartyTypeEntity.ts +4 -4
- package/src/entities/contact/PhysicalAddressEntity.ts +3 -3
- package/src/entities/digitalCredential/DigitalCredentialEntity.ts +4 -3
- package/src/entities/eventLogger/AuditEventEntity.ts +2 -2
- package/src/entities/issuanceBranding/BackgroundAttributesEntity.ts +2 -2
- package/src/entities/issuanceBranding/BaseLocaleBrandingEntity.ts +6 -7
- package/src/entities/issuanceBranding/CredentialBrandingEntity.ts +2 -2
- package/src/entities/issuanceBranding/CredentialClaimsEntity.ts +2 -2
- package/src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts +2 -2
- package/src/entities/issuanceBranding/ImageAttributesEntity.ts +2 -2
- package/src/entities/issuanceBranding/IssuerBrandingEntity.ts +2 -2
- package/src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts +3 -3
- package/src/entities/issuanceBranding/TextAttributesEntity.ts +1 -1
- package/src/entities/machineState/MachineStateInfoEntity.ts +1 -1
- package/src/entities/presentationDefinition/{PresentationDefinitionItemEntity.ts → DcqlQueryItemEntity.ts} +10 -14
- package/src/entities/statusList/BitstringStatusListEntryEntity.ts +60 -0
- package/src/entities/statusList/StatusList2021EntryEntity.ts +4 -3
- package/src/entities/statusList/StatusListEntities.ts +55 -7
- package/src/eventLogger/EventLoggerStore.ts +2 -2
- package/src/index.ts +31 -26
- package/src/issuanceBranding/IssuanceBrandingStore.ts +25 -25
- package/src/machineState/MachineStateStore.ts +7 -7
- package/src/migrations/generic/1-CreateContacts.ts +1 -1
- package/src/migrations/generic/10-CreatePresentationDefinitions.ts +1 -1
- package/src/migrations/generic/11-FixCredentialClaimsReferenceUuid.ts +2 -2
- package/src/migrations/generic/12-CreateBitstringStatusList.ts +82 -0
- package/src/migrations/generic/13-CreateDcqlQueryItem.ts +67 -0
- package/src/migrations/generic/2-CreateIssuanceBranding.ts +1 -1
- package/src/migrations/generic/3-CreateContacts.ts +2 -2
- package/src/migrations/generic/4-CreateStatusList.ts +1 -1
- package/src/migrations/generic/5-CreateAuditEvents.ts +2 -2
- package/src/migrations/generic/6-CreateDigitalCredential.ts +1 -1
- package/src/migrations/generic/7-CreateMachineStateStore.ts +1 -1
- package/src/migrations/generic/8-CreateContacts.ts +1 -1
- package/src/migrations/generic/9-CreateContacts.ts +1 -1
- package/src/migrations/generic/index.ts +10 -4
- package/src/migrations/postgres/1659463079428-CreateContacts.ts +1 -1
- package/src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts +1 -1
- package/src/migrations/postgres/1690925872592-CreateContacts.ts +1 -1
- package/src/migrations/postgres/1716475165345-CreatePresentationDefinitions.ts +1 -1
- package/src/migrations/postgres/1726588800000-CreateDcqlQueryItem.ts +25 -0
- package/src/migrations/postgres/1737110469001-UpdateStatusList.ts +1 -1
- package/src/migrations/postgres/1741895823000-CreateBitstringStatusList.ts +67 -0
- package/src/migrations/sqlite/1716475165344-CreatePresentationDefinitions.ts +1 -1
- package/src/migrations/sqlite/1726617600000-CreateDcqlQueryItem.ts +24 -0
- package/src/migrations/sqlite/1741895823001-CreateBitstringStatusList.ts +145 -0
- package/src/presentationDefinition/PDStore.ts +45 -45
- package/src/statusList/IStatusListStore.ts +14 -11
- package/src/statusList/StatusListStore.ts +74 -36
- package/src/types/index.ts +0 -12
- package/src/types/statusList/IAbstractStatusListStore.ts +55 -5
- package/src/types/statusList/statusList.ts +50 -2
- package/src/utils/ValidatorUtils.ts +1 -1
- package/src/utils/contact/MappingUtils.ts +10 -10
- package/src/utils/digitalCredential/MappingUtils.ts +3 -21
- package/src/utils/eventLogger/MappingUtils.ts +2 -2
- package/src/utils/issuanceBranding/MappingUtils.ts +13 -13
- package/src/utils/presentationDefinition/MappingUtils.ts +31 -22
- package/src/utils/statusList/MappingUtils.ts +71 -30
- package/src/contact/AbstractContactStore.ts +0 -71
- package/src/digitalCredential/AbstractDigitalCredentialStore.ts +0 -21
- package/src/eventLogger/AbstractEventLoggerStore.ts +0 -9
- package/src/issuanceBranding/AbstractIssuanceBrandingStore.ts +0 -41
- package/src/machineState/IAbstractMachineStateStore.ts +0 -65
- package/src/presentationDefinition/AbstractPDStore.ts +0 -20
- package/src/types/contact/IAbstractContactStore.ts +0 -161
- package/src/types/contact/contact.ts +0 -295
- package/src/types/contact/index.ts +0 -2
- package/src/types/digitalCredential/IAbstractDigitalCredentialStore.ts +0 -43
- package/src/types/digitalCredential/enums.ts +0 -70
- package/src/types/digitalCredential/index.ts +0 -3
- package/src/types/digitalCredential/types.ts +0 -39
- package/src/types/eventLogger/IAbstractEventLoggerStore.ts +0 -22
- package/src/types/eventLogger/eventLogger.ts +0 -4
- package/src/types/issuanceBranding/IAbstractIssuanceBrandingStore.ts +0 -85
- package/src/types/issuanceBranding/issuanceBranding.ts +0 -138
- package/src/types/machineState/IAbstractMachineStateStore.ts +0 -68
- package/src/types/presentationDefinition/IAbstractPDStore.ts +0 -25
- package/src/types/presentationDefinition/presentationDefinition.ts +0 -19
- package/src/types/validation/validation.ts +0 -3
|
@@ -1,41 +1,70 @@
|
|
|
1
|
-
import { IOAuthStatusListEntity, IStatusList2021Entity, IStatusListEntity } from '../../types'
|
|
2
|
-
import { OAuthStatusListEntity, StatusList2021Entity, StatusListEntity } from '../../entities/statusList/StatusListEntities'
|
|
1
|
+
import { IBitstringStatusListEntity, IOAuthStatusListEntity, IStatusList2021Entity, IStatusListEntity } from '../../types'
|
|
3
2
|
import { StatusListType } from '@sphereon/ssi-types'
|
|
3
|
+
import {
|
|
4
|
+
BitstringStatusListEntity,
|
|
5
|
+
OAuthStatusListEntity,
|
|
6
|
+
StatusList2021Entity,
|
|
7
|
+
StatusListEntity,
|
|
8
|
+
} from '../../entities/statusList/StatusListEntities'
|
|
4
9
|
import { replaceNullWithUndefined } from '../FormattingUtils'
|
|
5
10
|
|
|
6
11
|
export const statusListEntityFrom = (args: IStatusListEntity): StatusListEntity => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
switch (args.type) {
|
|
13
|
+
case StatusListType.StatusList2021: {
|
|
14
|
+
const entity = new StatusList2021Entity()
|
|
15
|
+
const sl2021 = args as IStatusList2021Entity
|
|
16
|
+
entity.indexingDirection = sl2021.indexingDirection
|
|
17
|
+
entity.statusPurpose = sl2021.statusPurpose
|
|
18
|
+
setBaseFields(entity, args)
|
|
19
|
+
Object.defineProperty(entity, 'type', {
|
|
20
|
+
value: StatusListType.StatusList2021,
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
})
|
|
24
|
+
return entity
|
|
25
|
+
}
|
|
20
26
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
case StatusListType.OAuthStatusList: {
|
|
28
|
+
const entity = new OAuthStatusListEntity()
|
|
29
|
+
const oauthSl = args as IOAuthStatusListEntity
|
|
30
|
+
entity.bitsPerStatus = oauthSl.bitsPerStatus
|
|
31
|
+
entity.expiresAt = oauthSl.expiresAt
|
|
32
|
+
setBaseFields(entity, args)
|
|
33
|
+
Object.defineProperty(entity, 'type', {
|
|
34
|
+
value: StatusListType.OAuthStatusList,
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
})
|
|
38
|
+
return entity
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
case StatusListType.BitstringStatusList: {
|
|
42
|
+
const entity = new BitstringStatusListEntity()
|
|
43
|
+
const bitstringsl = args as IBitstringStatusListEntity
|
|
44
|
+
if (!bitstringsl.bitsPerStatus) {
|
|
45
|
+
throw Error('bitsPerStatus must be set for BitstringStatusList')
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
entity.statusPurpose = bitstringsl.statusPurpose
|
|
49
|
+
entity.bitsPerStatus = bitstringsl.bitsPerStatus
|
|
50
|
+
entity.validFrom = bitstringsl.validFrom
|
|
51
|
+
entity.validUntil = bitstringsl.validUntil
|
|
52
|
+
entity.ttl = bitstringsl.ttl
|
|
53
|
+
setBaseFields(entity, args)
|
|
54
|
+
Object.defineProperty(entity, 'type', {
|
|
55
|
+
value: StatusListType.BitstringStatusList,
|
|
56
|
+
enumerable: true,
|
|
57
|
+
configurable: true,
|
|
58
|
+
})
|
|
59
|
+
return entity
|
|
60
|
+
}
|
|
34
61
|
|
|
35
|
-
|
|
62
|
+
default:
|
|
63
|
+
throw new Error(`Invalid status list type ${args.type}`)
|
|
64
|
+
}
|
|
36
65
|
}
|
|
37
66
|
|
|
38
|
-
export const statusListFrom = (entity: StatusListEntity): IStatusListEntity => {
|
|
67
|
+
export const statusListFrom = (entity: StatusListEntity): IStatusListEntity | IBitstringStatusListEntity => {
|
|
39
68
|
if (entity instanceof StatusList2021Entity) {
|
|
40
69
|
const result: IStatusList2021Entity = {
|
|
41
70
|
...getBaseFields(entity),
|
|
@@ -56,6 +85,18 @@ export const statusListFrom = (entity: StatusListEntity): IStatusListEntity => {
|
|
|
56
85
|
return replaceNullWithUndefined(result)
|
|
57
86
|
}
|
|
58
87
|
|
|
88
|
+
if (entity instanceof BitstringStatusListEntity) {
|
|
89
|
+
const result: IBitstringStatusListEntity = {
|
|
90
|
+
...getBaseFields(entity),
|
|
91
|
+
type: StatusListType.BitstringStatusList,
|
|
92
|
+
statusPurpose: entity.statusPurpose,
|
|
93
|
+
bitsPerStatus: entity.bitsPerStatus,
|
|
94
|
+
validFrom: entity.validFrom,
|
|
95
|
+
validUntil: entity.validUntil,
|
|
96
|
+
ttl: entity.ttl,
|
|
97
|
+
}
|
|
98
|
+
return replaceNullWithUndefined(result)
|
|
99
|
+
}
|
|
59
100
|
throw new Error(`Invalid status list type ${typeof entity}`)
|
|
60
101
|
}
|
|
61
102
|
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AddElectronicAddressArgs,
|
|
3
|
-
AddIdentityArgs,
|
|
4
|
-
AddPartyArgs,
|
|
5
|
-
AddPartyTypeArgs,
|
|
6
|
-
AddPhysicalAddressArgs,
|
|
7
|
-
AddRelationshipArgs,
|
|
8
|
-
ElectronicAddress,
|
|
9
|
-
GetElectronicAddressArgs,
|
|
10
|
-
GetElectronicAddressesArgs,
|
|
11
|
-
GetIdentitiesArgs,
|
|
12
|
-
GetIdentityArgs,
|
|
13
|
-
GetPartiesArgs,
|
|
14
|
-
GetPartyArgs,
|
|
15
|
-
GetPartyTypeArgs,
|
|
16
|
-
GetPartyTypesArgs,
|
|
17
|
-
GetPhysicalAddressArgs,
|
|
18
|
-
GetPhysicalAddressesArgs,
|
|
19
|
-
GetRelationshipArgs,
|
|
20
|
-
GetRelationshipsArgs,
|
|
21
|
-
Identity,
|
|
22
|
-
Party,
|
|
23
|
-
PartyRelationship,
|
|
24
|
-
PartyType,
|
|
25
|
-
PhysicalAddress,
|
|
26
|
-
RemoveElectronicAddressArgs,
|
|
27
|
-
RemoveIdentityArgs,
|
|
28
|
-
RemovePartyArgs,
|
|
29
|
-
RemovePartyTypeArgs,
|
|
30
|
-
RemovePhysicalAddressArgs,
|
|
31
|
-
RemoveRelationshipArgs,
|
|
32
|
-
UpdateElectronicAddressArgs,
|
|
33
|
-
UpdateIdentityArgs,
|
|
34
|
-
UpdatePartyArgs,
|
|
35
|
-
UpdatePartyTypeArgs,
|
|
36
|
-
UpdatePhysicalAddressArgs,
|
|
37
|
-
UpdateRelationshipArgs,
|
|
38
|
-
} from '../types'
|
|
39
|
-
|
|
40
|
-
export abstract class AbstractContactStore {
|
|
41
|
-
abstract getParty(args: GetPartyArgs): Promise<Party>
|
|
42
|
-
abstract getParties(args?: GetPartiesArgs): Promise<Array<Party>>
|
|
43
|
-
abstract addParty(args: AddPartyArgs): Promise<Party>
|
|
44
|
-
abstract updateParty(args: UpdatePartyArgs): Promise<Party>
|
|
45
|
-
abstract removeParty(args: RemovePartyArgs): Promise<void>
|
|
46
|
-
abstract getIdentity(args: GetIdentityArgs): Promise<Identity>
|
|
47
|
-
abstract getIdentities(args?: GetIdentitiesArgs): Promise<Array<Identity>>
|
|
48
|
-
abstract addIdentity(args: AddIdentityArgs): Promise<Identity>
|
|
49
|
-
abstract updateIdentity(args: UpdateIdentityArgs): Promise<Identity>
|
|
50
|
-
abstract removeIdentity(args: RemoveIdentityArgs): Promise<void>
|
|
51
|
-
abstract getRelationship(args: GetRelationshipArgs): Promise<PartyRelationship>
|
|
52
|
-
abstract getRelationships(args?: GetRelationshipsArgs): Promise<Array<PartyRelationship>>
|
|
53
|
-
abstract addRelationship(args: AddRelationshipArgs): Promise<PartyRelationship>
|
|
54
|
-
abstract updateRelationship(args: UpdateRelationshipArgs): Promise<PartyRelationship>
|
|
55
|
-
abstract removeRelationship(args: RemoveRelationshipArgs): Promise<void>
|
|
56
|
-
abstract getPartyType(args: GetPartyTypeArgs): Promise<PartyType>
|
|
57
|
-
abstract getPartyTypes(args?: GetPartyTypesArgs): Promise<Array<PartyType>>
|
|
58
|
-
abstract addPartyType(args: AddPartyTypeArgs): Promise<PartyType>
|
|
59
|
-
abstract updatePartyType(args: UpdatePartyTypeArgs): Promise<PartyType>
|
|
60
|
-
abstract removePartyType(args: RemovePartyTypeArgs): Promise<void>
|
|
61
|
-
abstract getElectronicAddress(args: GetElectronicAddressArgs): Promise<ElectronicAddress>
|
|
62
|
-
abstract getElectronicAddresses(args?: GetElectronicAddressesArgs): Promise<Array<ElectronicAddress>>
|
|
63
|
-
abstract addElectronicAddress(args: AddElectronicAddressArgs): Promise<ElectronicAddress>
|
|
64
|
-
abstract updateElectronicAddress(args: UpdateElectronicAddressArgs): Promise<ElectronicAddress>
|
|
65
|
-
abstract removeElectronicAddress(args: RemoveElectronicAddressArgs): Promise<void>
|
|
66
|
-
abstract getPhysicalAddress(args: GetPhysicalAddressArgs): Promise<PhysicalAddress>
|
|
67
|
-
abstract getPhysicalAddresses(args?: GetPhysicalAddressesArgs): Promise<Array<PhysicalAddress>>
|
|
68
|
-
abstract addPhysicalAddress(args: AddPhysicalAddressArgs): Promise<PhysicalAddress>
|
|
69
|
-
abstract updatePhysicalAddress(args: UpdatePhysicalAddressArgs): Promise<PhysicalAddress>
|
|
70
|
-
abstract removePhysicalAddress(args: RemovePhysicalAddressArgs): Promise<void>
|
|
71
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AddCredentialArgs,
|
|
3
|
-
DigitalCredential,
|
|
4
|
-
GetCredentialArgs,
|
|
5
|
-
GetCredentialsArgs,
|
|
6
|
-
GetCredentialsResponse,
|
|
7
|
-
RemoveCredentialArgs,
|
|
8
|
-
UpdateCredentialStateArgs,
|
|
9
|
-
} from '../types'
|
|
10
|
-
|
|
11
|
-
export abstract class AbstractDigitalCredentialStore {
|
|
12
|
-
abstract getCredential(args: GetCredentialArgs): Promise<DigitalCredential>
|
|
13
|
-
|
|
14
|
-
abstract getCredentials(args?: GetCredentialsArgs): Promise<GetCredentialsResponse>
|
|
15
|
-
|
|
16
|
-
abstract addCredential(args: AddCredentialArgs): Promise<DigitalCredential>
|
|
17
|
-
|
|
18
|
-
abstract updateCredentialState(args: UpdateCredentialStateArgs): Promise<DigitalCredential>
|
|
19
|
-
|
|
20
|
-
abstract removeCredential(args: RemoveCredentialArgs): Promise<boolean>
|
|
21
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { ActivityLoggingEvent, AuditLoggingEvent } from '@sphereon/ssi-sdk.core'
|
|
2
|
-
import type { GetActivityEventsArgs, GetAuditEventsArgs, StoreActivityEventArgs, StoreAuditEventArgs } from '../types'
|
|
3
|
-
|
|
4
|
-
export abstract class AbstractEventLoggerStore {
|
|
5
|
-
abstract getAuditEvents(args: GetAuditEventsArgs): Promise<Array<AuditLoggingEvent>>
|
|
6
|
-
abstract getActivityEvents(args: GetActivityEventsArgs): Promise<Array<ActivityLoggingEvent>>
|
|
7
|
-
abstract storeAuditEvent(args: StoreAuditEventArgs): Promise<AuditLoggingEvent>
|
|
8
|
-
abstract storeActivityEvent(args: StoreActivityEventArgs): Promise<ActivityLoggingEvent>
|
|
9
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
IAddCredentialBrandingArgs,
|
|
3
|
-
IAddCredentialLocaleBrandingArgs,
|
|
4
|
-
IAddIssuerBrandingArgs,
|
|
5
|
-
IAddIssuerLocaleBrandingArgs,
|
|
6
|
-
ICredentialBranding,
|
|
7
|
-
ICredentialLocaleBranding,
|
|
8
|
-
IGetCredentialBrandingArgs,
|
|
9
|
-
IGetCredentialLocaleBrandingArgs,
|
|
10
|
-
IGetIssuerBrandingArgs,
|
|
11
|
-
IGetIssuerLocaleBrandingArgs,
|
|
12
|
-
IIssuerBranding,
|
|
13
|
-
IIssuerLocaleBranding,
|
|
14
|
-
IRemoveCredentialBrandingArgs,
|
|
15
|
-
IRemoveCredentialLocaleBrandingArgs,
|
|
16
|
-
IRemoveIssuerBrandingArgs,
|
|
17
|
-
IRemoveIssuerLocaleBrandingArgs,
|
|
18
|
-
IUpdateCredentialBrandingArgs,
|
|
19
|
-
IUpdateCredentialLocaleBrandingArgs,
|
|
20
|
-
IUpdateIssuerBrandingArgs,
|
|
21
|
-
IUpdateIssuerLocaleBrandingArgs,
|
|
22
|
-
} from '../types'
|
|
23
|
-
|
|
24
|
-
export abstract class AbstractIssuanceBrandingStore {
|
|
25
|
-
public abstract addCredentialBranding(args: IAddCredentialBrandingArgs): Promise<ICredentialBranding>
|
|
26
|
-
public abstract getCredentialBranding(args?: IGetCredentialBrandingArgs): Promise<Array<ICredentialBranding>>
|
|
27
|
-
public abstract updateCredentialBranding(args: IUpdateCredentialBrandingArgs): Promise<ICredentialBranding>
|
|
28
|
-
public abstract removeCredentialBranding(args: IRemoveCredentialBrandingArgs): Promise<void>
|
|
29
|
-
public abstract addCredentialLocaleBranding(args: IAddCredentialLocaleBrandingArgs): Promise<ICredentialBranding>
|
|
30
|
-
public abstract getCredentialLocaleBranding(args?: IGetCredentialLocaleBrandingArgs): Promise<Array<ICredentialLocaleBranding>>
|
|
31
|
-
public abstract updateCredentialLocaleBranding(args: IUpdateCredentialLocaleBrandingArgs): Promise<ICredentialLocaleBranding>
|
|
32
|
-
public abstract removeCredentialLocaleBranding(args: IRemoveCredentialLocaleBrandingArgs): Promise<void>
|
|
33
|
-
public abstract addIssuerBranding(args: IAddIssuerBrandingArgs): Promise<IIssuerBranding>
|
|
34
|
-
public abstract getIssuerBranding(args?: IGetIssuerBrandingArgs): Promise<Array<IIssuerBranding>>
|
|
35
|
-
public abstract updateIssuerBranding(args: IUpdateIssuerBrandingArgs): Promise<IIssuerBranding>
|
|
36
|
-
public abstract removeIssuerBranding(args: IRemoveIssuerBrandingArgs): Promise<void>
|
|
37
|
-
public abstract addIssuerLocaleBranding(args: IAddIssuerLocaleBrandingArgs): Promise<IIssuerBranding>
|
|
38
|
-
public abstract getIssuerLocaleBranding(args?: IGetIssuerLocaleBrandingArgs): Promise<Array<IIssuerLocaleBranding>>
|
|
39
|
-
public abstract updateIssuerLocaleBranding(args: IUpdateIssuerLocaleBrandingArgs): Promise<IIssuerLocaleBranding>
|
|
40
|
-
public abstract removeIssuerLocaleBranding(args: IRemoveIssuerLocaleBrandingArgs): Promise<void>
|
|
41
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
StoreMachineStateDeleteExpiredArgs,
|
|
3
|
-
StoreMachineStateDeleteArgs,
|
|
4
|
-
StoreMachineStatesFindActiveArgs,
|
|
5
|
-
StoreFindMachineStatesArgs,
|
|
6
|
-
StoreMachineStatePersistArgs,
|
|
7
|
-
StoreMachineStateInfo,
|
|
8
|
-
StoreMachineStateGetArgs,
|
|
9
|
-
} from '../types'
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Represents an abstract class for storing machine states.
|
|
13
|
-
* This class provides methods for persisting, retrieving, and deleting machine states.
|
|
14
|
-
*
|
|
15
|
-
* @interface
|
|
16
|
-
*/
|
|
17
|
-
export abstract class IAbstractMachineStateStore {
|
|
18
|
-
/**
|
|
19
|
-
* Persists the machine state.
|
|
20
|
-
*
|
|
21
|
-
* @param {StoreMachineStatePersistArgs} state - The object containing the machine state to persist.
|
|
22
|
-
* @return {Promise<StoreMachineStateInfo>} - A Promise that resolves to the information about the persisted machine state.
|
|
23
|
-
*/
|
|
24
|
-
abstract persistMachineState(state: StoreMachineStatePersistArgs): Promise<StoreMachineStateInfo>
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Finds active machine states based on the given arguments.
|
|
28
|
-
*
|
|
29
|
-
* @param {StoreMachineStatesFindActiveArgs} args - The arguments for finding active machine states.
|
|
30
|
-
* @return {Promise<Array<StoreMachineStateInfo>>} - A promise that resolves with an array of active machine states.
|
|
31
|
-
*/
|
|
32
|
-
abstract findActiveMachineStates(args: StoreMachineStatesFindActiveArgs): Promise<Array<StoreMachineStateInfo>>
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Retrieves the state of a particular machine.
|
|
36
|
-
*
|
|
37
|
-
* @param {StoreMachineStateGetArgs} args - The arguments for retrieving the machine state.
|
|
38
|
-
* @returns {Promise<StoreMachineStateInfo>} - A promise that resolves to the machine state information.
|
|
39
|
-
*/
|
|
40
|
-
abstract getMachineState(args: StoreMachineStateGetArgs): Promise<StoreMachineStateInfo>
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Finds the machine states based on the given arguments.
|
|
44
|
-
*
|
|
45
|
-
* @param {StoreFindMachineStatesArgs} [args] - The arguments to filter the machine states.
|
|
46
|
-
* @returns {Promise<Array<StoreMachineStateInfo>>} - A promise that resolves to an array of machine state information.
|
|
47
|
-
*/
|
|
48
|
-
abstract findMachineStates(args?: StoreFindMachineStatesArgs): Promise<Array<StoreMachineStateInfo>>
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* Deletes a machine state.
|
|
52
|
-
*
|
|
53
|
-
* @param {StoreMachineStateDeleteArgs} args - The arguments for deleting the machine state.
|
|
54
|
-
* @return {Promise<boolean>} - A promise that resolves to a boolean indicating if the machine state was successfully deleted or not.
|
|
55
|
-
*/
|
|
56
|
-
abstract deleteMachineState(args: StoreMachineStateDeleteArgs): Promise<boolean>
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Deletes expired machine states from the database.
|
|
60
|
-
*
|
|
61
|
-
* @param {StoreMachineStateDeleteExpiredArgs} args - The arguments for deleting expired machine states.
|
|
62
|
-
* @return {Promise<number>} - A promise that resolves to the number of deleted machine states.
|
|
63
|
-
*/
|
|
64
|
-
abstract deleteExpiredMachineStates(args: StoreMachineStateDeleteExpiredArgs): Promise<number>
|
|
65
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
GetDefinitionArgs,
|
|
3
|
-
GetDefinitionsArgs,
|
|
4
|
-
DeleteDefinitionArgs,
|
|
5
|
-
PresentationDefinitionItem,
|
|
6
|
-
AddDefinitionArgs,
|
|
7
|
-
UpdateDefinitionArgs,
|
|
8
|
-
DeleteDefinitionsArgs,
|
|
9
|
-
} from '../types'
|
|
10
|
-
|
|
11
|
-
export abstract class AbstractPDStore {
|
|
12
|
-
abstract hasDefinition(args: GetDefinitionArgs): Promise<boolean>
|
|
13
|
-
abstract hasDefinitions(args: GetDefinitionsArgs): Promise<boolean>
|
|
14
|
-
abstract getDefinition(args: GetDefinitionArgs): Promise<PresentationDefinitionItem>
|
|
15
|
-
abstract getDefinitions(args: GetDefinitionsArgs): Promise<Array<PresentationDefinitionItem>>
|
|
16
|
-
abstract addDefinition(args: AddDefinitionArgs): Promise<PresentationDefinitionItem>
|
|
17
|
-
abstract updateDefinition(args: UpdateDefinitionArgs): Promise<PresentationDefinitionItem>
|
|
18
|
-
abstract deleteDefinition(args: DeleteDefinitionArgs): Promise<void>
|
|
19
|
-
abstract deleteDefinitions(args: DeleteDefinitionsArgs): Promise<number>
|
|
20
|
-
}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ElectronicAddress,
|
|
3
|
-
Identity,
|
|
4
|
-
NonPersistedContact,
|
|
5
|
-
NonPersistedElectronicAddress,
|
|
6
|
-
NonPersistedIdentity,
|
|
7
|
-
NonPersistedPartyType,
|
|
8
|
-
NonPersistedPhysicalAddress,
|
|
9
|
-
PartialElectronicAddress,
|
|
10
|
-
PartialIdentity,
|
|
11
|
-
PartialParty,
|
|
12
|
-
PartialPartyRelationship,
|
|
13
|
-
PartialPartyType,
|
|
14
|
-
PartialPhysicalAddress,
|
|
15
|
-
Party,
|
|
16
|
-
PartyOrigin,
|
|
17
|
-
PartyRelationship,
|
|
18
|
-
PartyType,
|
|
19
|
-
PartyTypeType,
|
|
20
|
-
PhysicalAddress,
|
|
21
|
-
} from './contact'
|
|
22
|
-
|
|
23
|
-
export type FindPartyArgs = Array<PartialParty>
|
|
24
|
-
export type FindIdentityArgs = Array<PartialIdentity>
|
|
25
|
-
export type FindPartyTypeArgs = Array<PartialPartyType>
|
|
26
|
-
export type FindRelationshipArgs = Array<PartialPartyRelationship>
|
|
27
|
-
export type FindElectronicAddressArgs = Array<PartialElectronicAddress>
|
|
28
|
-
export type FindPhysicalAddressArgs = Array<PartialPhysicalAddress>
|
|
29
|
-
|
|
30
|
-
export type GetPartyArgs = {
|
|
31
|
-
partyId: string
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export type GetPartiesArgs = {
|
|
35
|
-
filter?: FindPartyArgs
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export type AddPartyArgs = {
|
|
39
|
-
uri?: string
|
|
40
|
-
partyType: NonPersistedPartyType
|
|
41
|
-
contact: NonPersistedContact
|
|
42
|
-
identities?: Array<NonPersistedIdentity>
|
|
43
|
-
electronicAddresses?: Array<NonPersistedElectronicAddress>
|
|
44
|
-
physicalAddresses?: Array<NonPersistedPhysicalAddress>
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export type UpdatePartyArgs = {
|
|
48
|
-
party: Omit<Party, 'identities' | 'electronicAddresses' | 'partyType' | 'createdAt' | 'lastUpdatedAt'>
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export type RemovePartyArgs = {
|
|
52
|
-
partyId: string
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export type GetIdentityArgs = {
|
|
56
|
-
identityId: string
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export type GetIdentitiesArgs = {
|
|
60
|
-
filter?: FindIdentityArgs
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export type AddIdentityArgs = {
|
|
64
|
-
partyId: string
|
|
65
|
-
identity: NonPersistedIdentity
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export type UpdateIdentityArgs = {
|
|
69
|
-
identity: Identity
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
export type RemoveIdentityArgs = {
|
|
73
|
-
identityId: string
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
export type RemoveRelationshipArgs = {
|
|
77
|
-
relationshipId: string
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export type AddRelationshipArgs = {
|
|
81
|
-
leftId: string
|
|
82
|
-
rightId: string
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export type GetRelationshipArgs = {
|
|
86
|
-
relationshipId: string
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export type GetRelationshipsArgs = {
|
|
90
|
-
filter: FindRelationshipArgs
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export type UpdateRelationshipArgs = {
|
|
94
|
-
relationship: Omit<PartyRelationship, 'createdAt' | 'lastUpdatedAt'>
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export type AddPartyTypeArgs = {
|
|
98
|
-
type: PartyTypeType
|
|
99
|
-
origin: PartyOrigin
|
|
100
|
-
name: string
|
|
101
|
-
tenantId: string
|
|
102
|
-
description?: string
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export type GetPartyTypeArgs = {
|
|
106
|
-
partyTypeId: string
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export type GetPartyTypesArgs = {
|
|
110
|
-
filter?: FindPartyTypeArgs
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export type UpdatePartyTypeArgs = {
|
|
114
|
-
partyType: Omit<PartyType, 'createdAt' | 'lastUpdatedAt'>
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
export type RemovePartyTypeArgs = {
|
|
118
|
-
partyTypeId: string
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export type GetElectronicAddressArgs = {
|
|
122
|
-
electronicAddressId: string
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export type GetElectronicAddressesArgs = {
|
|
126
|
-
filter?: FindElectronicAddressArgs
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export type AddElectronicAddressArgs = {
|
|
130
|
-
partyId: string
|
|
131
|
-
electronicAddress: NonPersistedElectronicAddress
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export type UpdateElectronicAddressArgs = {
|
|
135
|
-
electronicAddress: ElectronicAddress
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export type RemoveElectronicAddressArgs = {
|
|
139
|
-
electronicAddressId: string
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
export type GetPhysicalAddressArgs = {
|
|
143
|
-
physicalAddressId: string
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export type GetPhysicalAddressesArgs = {
|
|
147
|
-
filter?: FindPhysicalAddressArgs
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export type AddPhysicalAddressArgs = {
|
|
151
|
-
partyId: string
|
|
152
|
-
physicalAddress: NonPersistedPhysicalAddress
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export type UpdatePhysicalAddressArgs = {
|
|
156
|
-
physicalAddress: PhysicalAddress
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
export type RemovePhysicalAddressArgs = {
|
|
160
|
-
physicalAddressId: string
|
|
161
|
-
}
|