@sphereon/ssi-sdk.data-store 0.34.1-next.91 → 0.36.1-feat.SSISDK.83.11
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 +3776 -3801
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +339 -1270
- package/dist/index.d.ts +339 -1270
- package/dist/index.js +3707 -3732
- package/dist/index.js.map +1 -1
- package/package.json +9 -8
- 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 +4 -4
- package/src/__tests__/statusList.store.test.ts +3 -3
- 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 +1 -1
- package/src/entities/statusList/StatusListEntities.ts +3 -4
- package/src/eventLogger/EventLoggerStore.ts +2 -2
- package/src/index.ts +21 -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 +32 -2
- 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 -5
- 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/1741895823000-CreateBitstringStatusList.ts +14 -2
- package/src/migrations/sqlite/1716475165344-CreatePresentationDefinitions.ts +1 -1
- package/src/migrations/sqlite/1726617600000-CreateDcqlQueryItem.ts +24 -0
- package/src/presentationDefinition/PDStore.ts +45 -45
- package/src/statusList/IStatusListStore.ts +1 -1
- package/src/statusList/StatusListStore.ts +3 -3
- package/src/types/index.ts +0 -12
- package/src/types/statusList/IAbstractStatusListStore.ts +9 -9
- 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 +1 -1
- 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,138 +0,0 @@
|
|
|
1
|
-
export interface ILocaleBranding {
|
|
2
|
-
id: string
|
|
3
|
-
alias?: string
|
|
4
|
-
locale?: string
|
|
5
|
-
logo?: IImageAttributes
|
|
6
|
-
description?: string
|
|
7
|
-
background?: IBackgroundAttributes
|
|
8
|
-
text?: ITextAttributes
|
|
9
|
-
createdAt: Date
|
|
10
|
-
lastUpdatedAt: Date
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface IImageAttributes {
|
|
14
|
-
id: string
|
|
15
|
-
uri?: string
|
|
16
|
-
dataUri?: string
|
|
17
|
-
mediaType?: string
|
|
18
|
-
alt?: string
|
|
19
|
-
dimensions?: IImageDimensions
|
|
20
|
-
}
|
|
21
|
-
export interface IBasicImageAttributes extends Omit<IImageAttributes, 'id' | 'dimensions'> {
|
|
22
|
-
dimensions?: IBasicImageDimensions
|
|
23
|
-
}
|
|
24
|
-
export interface IPartialImageAttributes extends Partial<Omit<IImageAttributes, 'dimensions'>> {
|
|
25
|
-
dimensions?: IPartialImageDimensions
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface IBackgroundAttributes {
|
|
29
|
-
id: string
|
|
30
|
-
color?: string
|
|
31
|
-
image?: IImageAttributes
|
|
32
|
-
}
|
|
33
|
-
export interface IBasicBackgroundAttributes extends Omit<IBackgroundAttributes, 'id' | 'image'> {
|
|
34
|
-
image?: IBasicImageAttributes
|
|
35
|
-
}
|
|
36
|
-
export interface IPartialBackgroundAttributes extends Partial<Omit<IBackgroundAttributes, 'image'>> {
|
|
37
|
-
image?: IPartialImageAttributes
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export interface ITextAttributes {
|
|
41
|
-
id: string
|
|
42
|
-
color?: string
|
|
43
|
-
}
|
|
44
|
-
export interface IBasicTextAttributes extends Omit<ITextAttributes, 'id'> {}
|
|
45
|
-
export interface IPartialTextAttributes extends Partial<ITextAttributes> {}
|
|
46
|
-
|
|
47
|
-
export interface IImageDimensions {
|
|
48
|
-
id: string
|
|
49
|
-
width: number
|
|
50
|
-
height: number
|
|
51
|
-
}
|
|
52
|
-
export interface IBasicImageDimensions extends Omit<IImageDimensions, 'id'> {}
|
|
53
|
-
export interface IPartialImageDimensions extends Partial<IImageDimensions> {}
|
|
54
|
-
|
|
55
|
-
export interface ICredentialClaim {
|
|
56
|
-
id: string
|
|
57
|
-
key: string
|
|
58
|
-
name: string
|
|
59
|
-
}
|
|
60
|
-
export interface IBasicCredentialClaim extends Omit<ICredentialClaim, 'id'> {}
|
|
61
|
-
export interface IPartialCredentialClaim extends Partial<ICredentialClaim> {}
|
|
62
|
-
|
|
63
|
-
export interface ICredentialLocaleBranding extends ILocaleBranding {
|
|
64
|
-
claims?: Array<ICredentialClaim>
|
|
65
|
-
}
|
|
66
|
-
export interface IBasicCredentialLocaleBranding
|
|
67
|
-
extends Omit<ICredentialLocaleBranding, 'id' | 'createdAt' | 'lastUpdatedAt' | 'logo' | 'background' | 'text' | 'claims'> {
|
|
68
|
-
logo?: IBasicImageAttributes
|
|
69
|
-
background?: IBasicBackgroundAttributes
|
|
70
|
-
text?: IBasicTextAttributes
|
|
71
|
-
claims?: Array<IBasicCredentialClaim>
|
|
72
|
-
}
|
|
73
|
-
export interface IPartialCredentialLocaleBranding extends Partial<Omit<ICredentialLocaleBranding, 'logo' | 'background' | 'text' | 'claims'>> {
|
|
74
|
-
logo?: IPartialImageAttributes
|
|
75
|
-
background?: IPartialBackgroundAttributes
|
|
76
|
-
text?: IPartialTextAttributes
|
|
77
|
-
claims?: IPartialCredentialClaim
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export interface ICredentialBranding {
|
|
81
|
-
id: string
|
|
82
|
-
issuerCorrelationId: string
|
|
83
|
-
vcHash: string
|
|
84
|
-
localeBranding: Array<ICredentialLocaleBranding>
|
|
85
|
-
createdAt: Date
|
|
86
|
-
lastUpdatedAt: Date
|
|
87
|
-
}
|
|
88
|
-
export interface IBasicCredentialBranding extends Omit<ICredentialBranding, 'id' | 'createdAt' | 'lastUpdatedAt' | 'localeBranding'> {
|
|
89
|
-
localeBranding: Array<IBasicCredentialLocaleBranding>
|
|
90
|
-
}
|
|
91
|
-
export interface IPartialCredentialBranding extends Partial<Omit<ICredentialBranding, 'localeBranding'>> {
|
|
92
|
-
localeBranding?: IPartialCredentialLocaleBranding
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export interface IIssuerLocaleBranding extends ILocaleBranding {
|
|
96
|
-
clientUri?: string
|
|
97
|
-
tosUri?: string
|
|
98
|
-
policyUri?: string
|
|
99
|
-
contacts?: Array<string>
|
|
100
|
-
}
|
|
101
|
-
export interface IBasicIssuerLocaleBranding
|
|
102
|
-
extends Omit<IIssuerLocaleBranding, 'id' | 'createdAt' | 'lastUpdatedAt' | 'logo' | 'background' | 'text'> {
|
|
103
|
-
logo?: IBasicImageAttributes
|
|
104
|
-
background?: IBasicBackgroundAttributes
|
|
105
|
-
text?: IBasicTextAttributes
|
|
106
|
-
}
|
|
107
|
-
export interface IPartialIssuerLocaleBranding extends Partial<Omit<IIssuerLocaleBranding, 'logo' | 'background' | 'text' | 'contacts'>> {
|
|
108
|
-
logo?: IPartialImageAttributes
|
|
109
|
-
background?: IPartialBackgroundAttributes
|
|
110
|
-
text?: IPartialTextAttributes
|
|
111
|
-
contacts?: string
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export interface IIssuerBranding {
|
|
115
|
-
id: string
|
|
116
|
-
issuerCorrelationId: string
|
|
117
|
-
localeBranding: Array<IIssuerLocaleBranding>
|
|
118
|
-
createdAt: Date
|
|
119
|
-
lastUpdatedAt: Date
|
|
120
|
-
}
|
|
121
|
-
export interface IBasicIssuerBranding extends Omit<IIssuerBranding, 'id' | 'createdAt' | 'lastUpdatedAt' | 'localeBranding'> {
|
|
122
|
-
localeBranding: Array<IBasicIssuerLocaleBranding>
|
|
123
|
-
}
|
|
124
|
-
export interface IPartialIssuerBranding extends Partial<Omit<IIssuerBranding, 'localeBranding'>> {
|
|
125
|
-
localeBranding?: IPartialIssuerLocaleBranding
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
export interface ICredentialBrandingFilter extends IPartialCredentialBranding {}
|
|
129
|
-
|
|
130
|
-
export interface ICredentialLocaleBrandingFilter extends IPartialCredentialLocaleBranding {
|
|
131
|
-
credentialBranding?: IPartialCredentialBranding
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
export interface IIssuerBrandingFilter extends IPartialIssuerBranding {}
|
|
135
|
-
|
|
136
|
-
export interface IIssuerLocaleBrandingFilter extends IPartialIssuerLocaleBranding {
|
|
137
|
-
issuerBranding?: IPartialIssuerBranding
|
|
138
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
export type StoreMachineStatePersistArgs = Omit<StoreMachineStateInfo, 'createdAt' | 'updatedAt'>
|
|
2
|
-
|
|
3
|
-
export type StoreMachineStatesFindActiveArgs = Partial<Pick<StoreMachineStateInfo, 'machineName' | 'tenantId' | 'instanceId'>>
|
|
4
|
-
|
|
5
|
-
export type FindMachineStatesFilterArgs = Array<Partial<Omit<StoreMachineStateInfo, 'state'>>>
|
|
6
|
-
|
|
7
|
-
export type StoreFindMachineStatesArgs = {
|
|
8
|
-
filter: FindMachineStatesFilterArgs
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export type StoreMachineStateGetArgs = Pick<StoreMachineStateInfo, 'instanceId' | 'tenantId'>
|
|
12
|
-
|
|
13
|
-
export type StoreMachineStateDeleteArgs = StoreMachineStateGetArgs
|
|
14
|
-
export type StoreMachineStateDeleteExpiredArgs = { machineName?: string; tenantId?: string; deleteDoneStates?: boolean }
|
|
15
|
-
|
|
16
|
-
export interface StoreMachineStateInfo {
|
|
17
|
-
/**
|
|
18
|
-
* Unique instance ID of the machine
|
|
19
|
-
*/
|
|
20
|
-
instanceId: string
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Session Id of the machine. Not necessarily unique
|
|
24
|
-
*/
|
|
25
|
-
sessionId?: string
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Machine name
|
|
29
|
-
*/
|
|
30
|
-
machineName: string
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* The latest state name. Can be empty for a newly initialize machine
|
|
34
|
-
*/
|
|
35
|
-
latestStateName?: string
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* event types like SET_TOC, SET_FIRSTNAME, .... Will be xstate.init on a newly initialized machine
|
|
39
|
-
*/
|
|
40
|
-
latestEventType: string
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Serialized Machine state
|
|
44
|
-
*/
|
|
45
|
-
state: string
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Represents the creation date
|
|
49
|
-
*/
|
|
50
|
-
createdAt: Date
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Represents the expiration date
|
|
54
|
-
*/
|
|
55
|
-
expiresAt?: Date
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Represents the update date
|
|
59
|
-
*/
|
|
60
|
-
updatedAt: Date
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Represents a counter for tracking updates.
|
|
64
|
-
*/
|
|
65
|
-
updatedCount: number
|
|
66
|
-
completedAt?: Date
|
|
67
|
-
tenantId?: string
|
|
68
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { NonPersistedPresentationDefinitionItem, PresentationDefinitionItem, PresentationDefinitionItemFilter } from './presentationDefinition'
|
|
2
|
-
|
|
3
|
-
export type FindDefinitionArgs = Array<PresentationDefinitionItemFilter>
|
|
4
|
-
|
|
5
|
-
export type GetDefinitionArgs = {
|
|
6
|
-
itemId: string
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type HasDefinitionArgs = GetDefinitionArgs
|
|
10
|
-
|
|
11
|
-
export type GetDefinitionsArgs = {
|
|
12
|
-
filter?: FindDefinitionArgs
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export type HasDefinitionsArgs = GetDefinitionsArgs
|
|
16
|
-
|
|
17
|
-
export type AddDefinitionArgs = NonPersistedPresentationDefinitionItem
|
|
18
|
-
|
|
19
|
-
export type UpdateDefinitionArgs = PresentationDefinitionItem
|
|
20
|
-
|
|
21
|
-
export type DeleteDefinitionArgs = {
|
|
22
|
-
itemId: string
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export type DeleteDefinitionsArgs = GetDefinitionsArgs
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IPresentationDefinition } from '@sphereon/pex'
|
|
2
|
-
import { DcqlQueryREST } from '@sphereon/ssi-types'
|
|
3
|
-
|
|
4
|
-
export type PresentationDefinitionItem = {
|
|
5
|
-
id: string
|
|
6
|
-
definitionId: string
|
|
7
|
-
tenantId?: string
|
|
8
|
-
version: string
|
|
9
|
-
name?: string
|
|
10
|
-
purpose?: string
|
|
11
|
-
definitionPayload: IPresentationDefinition
|
|
12
|
-
dcqlPayload?: DcqlQueryREST
|
|
13
|
-
createdAt: Date
|
|
14
|
-
lastUpdatedAt: Date
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export type NonPersistedPresentationDefinitionItem = Omit<PresentationDefinitionItem, 'id' | 'createdAt' | 'lastUpdatedAt'>
|
|
18
|
-
export type PartialPresentationDefinitionItem = Partial<PresentationDefinitionItem>
|
|
19
|
-
export type PresentationDefinitionItemFilter = Partial<Omit<PresentationDefinitionItem, 'definitionPayload' | 'dcqlPayload'>>
|