@sphereon/ssi-sdk.data-store 0.34.1-next.91 → 0.36.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/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,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { validate, IsNotEmpty, ValidationError, Validate } from 'class-validator'
|
|
5
|
-
import { IsNonEmptyStringConstraint } from '../validators'
|
|
1
|
+
import { ValidationConstraint } from '@sphereon/ssi-sdk.data-store-types'
|
|
2
|
+
import { IsNotEmpty, validate, Validate, ValidationError } from 'class-validator'
|
|
3
|
+
import { BeforeInsert, BeforeUpdate, ChildEntity, Column } from 'typeorm'
|
|
6
4
|
import { getConstraint } from '../../utils/ValidatorUtils'
|
|
5
|
+
import { IsNonEmptyStringConstraint } from '../validators'
|
|
6
|
+
import { BaseContactEntity } from './BaseContactEntity'
|
|
7
7
|
|
|
8
8
|
@ChildEntity('NaturalPerson')
|
|
9
9
|
export class NaturalPersonEntity extends BaseContactEntity {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { ValidationConstraint } from '@sphereon/ssi-sdk.data-store-types'
|
|
1
2
|
import { IsNotEmpty, validate, ValidationError } from 'class-validator'
|
|
2
3
|
import { BeforeInsert, BeforeUpdate, ChildEntity, Column } from 'typeorm'
|
|
3
|
-
import { ValidationConstraint } from '../../types'
|
|
4
4
|
import { getConstraint } from '../../utils/ValidatorUtils'
|
|
5
5
|
import { BaseContactEntity } from './BaseContactEntity'
|
|
6
6
|
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
2
|
+
import { ValidationConstraint } from '@sphereon/ssi-sdk.data-store-types'
|
|
3
|
+
import { validate, ValidationError } from 'class-validator'
|
|
1
4
|
import {
|
|
2
5
|
BaseEntity,
|
|
3
6
|
BeforeInsert,
|
|
@@ -12,15 +15,12 @@ import {
|
|
|
12
15
|
PrimaryGeneratedColumn,
|
|
13
16
|
UpdateDateColumn,
|
|
14
17
|
} from 'typeorm'
|
|
15
|
-
import { ValidationConstraint } from '../../types'
|
|
16
|
-
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
17
|
-
import { IdentityEntity } from './IdentityEntity'
|
|
18
|
-
import { validate, ValidationError } from 'class-validator'
|
|
19
|
-
import { PartyTypeEntity } from './PartyTypeEntity'
|
|
20
|
-
import { BaseContactEntity } from './BaseContactEntity'
|
|
21
|
-
import { PartyRelationshipEntity } from './PartyRelationshipEntity'
|
|
22
18
|
import { getConstraint } from '../../utils/ValidatorUtils'
|
|
19
|
+
import { BaseContactEntity } from './BaseContactEntity'
|
|
23
20
|
import { ElectronicAddressEntity } from './ElectronicAddressEntity'
|
|
21
|
+
import { IdentityEntity } from './IdentityEntity'
|
|
22
|
+
import { PartyRelationshipEntity } from './PartyRelationshipEntity'
|
|
23
|
+
import { PartyTypeEntity } from './PartyTypeEntity'
|
|
24
24
|
import { PhysicalAddressEntity } from './PhysicalAddressEntity'
|
|
25
25
|
|
|
26
26
|
@Entity('Party')
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
1
2
|
import {
|
|
2
|
-
Entity,
|
|
3
|
-
PrimaryGeneratedColumn,
|
|
4
|
-
CreateDateColumn,
|
|
5
|
-
UpdateDateColumn,
|
|
6
|
-
ManyToOne,
|
|
7
|
-
Column,
|
|
8
|
-
Index,
|
|
9
3
|
BeforeInsert,
|
|
10
4
|
BeforeUpdate,
|
|
5
|
+
Column,
|
|
6
|
+
CreateDateColumn,
|
|
7
|
+
Entity,
|
|
8
|
+
Index,
|
|
11
9
|
JoinColumn,
|
|
10
|
+
ManyToOne,
|
|
11
|
+
PrimaryGeneratedColumn,
|
|
12
|
+
UpdateDateColumn,
|
|
12
13
|
} from 'typeorm'
|
|
13
|
-
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
14
14
|
import { PartyEntity } from './PartyEntity'
|
|
15
15
|
|
|
16
16
|
@Entity('PartyRelationship')
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { BeforeInsert, BeforeUpdate, Column, CreateDateColumn, Entity, Index, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'
|
|
2
1
|
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
3
|
-
import {
|
|
4
|
-
import { PartyOrigin, PartyTypeType, ValidationConstraint } from '../../types'
|
|
2
|
+
import { PartyOrigin, PartyTypeType, ValidationConstraint } from '@sphereon/ssi-sdk.data-store-types'
|
|
5
3
|
import { IsNotEmpty, Validate, validate, ValidationError } from 'class-validator'
|
|
6
|
-
import {
|
|
4
|
+
import { BeforeInsert, BeforeUpdate, Column, CreateDateColumn, Entity, Index, OneToMany, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'
|
|
7
5
|
import { getConstraint } from '../../utils/ValidatorUtils'
|
|
6
|
+
import { IsNonEmptyStringConstraint } from '../validators'
|
|
7
|
+
import { PartyEntity } from './PartyEntity'
|
|
8
8
|
|
|
9
9
|
@Entity('PartyType')
|
|
10
10
|
@Index('IDX_PartyType_type_tenant_id', ['type', 'tenantId'], { unique: true })
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
2
|
+
import type { PhysicalAddressType, ValidationConstraint } from '@sphereon/ssi-sdk.data-store-types'
|
|
1
3
|
import { IsNotEmpty, Validate, validate, ValidationError } from 'class-validator'
|
|
2
4
|
import {
|
|
3
5
|
BaseEntity,
|
|
@@ -10,11 +12,9 @@ import {
|
|
|
10
12
|
PrimaryGeneratedColumn,
|
|
11
13
|
UpdateDateColumn,
|
|
12
14
|
} from 'typeorm'
|
|
13
|
-
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
14
15
|
import { getConstraint } from '../../utils/ValidatorUtils'
|
|
15
|
-
import type { PhysicalAddressType, ValidationConstraint } from '../../types/index'
|
|
16
|
-
import { PartyEntity } from './PartyEntity'
|
|
17
16
|
import { IsNonEmptyStringConstraint } from '../validators'
|
|
17
|
+
import { PartyEntity } from './PartyEntity'
|
|
18
18
|
|
|
19
19
|
@Entity('PhysicalAddress')
|
|
20
20
|
export class PhysicalAddressEntity extends BaseEntity {
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { typeormDate, typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import {
|
|
4
4
|
CredentialCorrelationType,
|
|
5
5
|
CredentialDocumentFormat,
|
|
6
|
-
CredentialRole,
|
|
7
6
|
CredentialStateType,
|
|
8
7
|
type DigitalCredential,
|
|
9
8
|
DocumentType,
|
|
10
9
|
RegulationType,
|
|
11
|
-
} from '
|
|
10
|
+
} from '@sphereon/ssi-sdk.data-store-types'
|
|
11
|
+
import { CredentialRole } from '@sphereon/ssi-types'
|
|
12
|
+
import { BaseEntity, Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'
|
|
12
13
|
|
|
13
14
|
@Entity('DigitalCredential')
|
|
14
15
|
export class DigitalCredentialEntity extends BaseEntity implements DigitalCredential {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
2
|
+
import { CredentialType, PartyCorrelationType } from '@sphereon/ssi-sdk.core'
|
|
1
3
|
import {
|
|
2
4
|
type ActionSubType,
|
|
3
5
|
ActionType,
|
|
@@ -8,8 +10,6 @@ import {
|
|
|
8
10
|
System,
|
|
9
11
|
SystemCorrelationIdType,
|
|
10
12
|
} from '@sphereon/ssi-types'
|
|
11
|
-
import { CredentialType, PartyCorrelationType } from '@sphereon/ssi-sdk.core'
|
|
12
|
-
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
13
13
|
import { BaseEntity, Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'
|
|
14
14
|
|
|
15
15
|
//TODO this entity, also contains some optional fields that are related to another event type (Activity) later we might want to refactor and reorganize this.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm'
|
|
2
|
-
import { ImageAttributesEntity } from './ImageAttributesEntity'
|
|
3
1
|
import { validate, Validate, ValidationError } from 'class-validator'
|
|
2
|
+
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm'
|
|
4
3
|
import { IsNonEmptyStringConstraint } from '../validators'
|
|
4
|
+
import { ImageAttributesEntity } from './ImageAttributesEntity'
|
|
5
5
|
|
|
6
6
|
@Entity('BackgroundAttributes')
|
|
7
7
|
export class BackgroundAttributesEntity extends BaseEntity {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
2
|
+
import { validate, Validate, ValidationError } from 'class-validator'
|
|
3
|
+
import {
|
|
3
4
|
BaseEntity,
|
|
4
5
|
BeforeInsert,
|
|
5
6
|
BeforeUpdate,
|
|
@@ -11,13 +12,11 @@ const {
|
|
|
11
12
|
PrimaryGeneratedColumn,
|
|
12
13
|
TableInheritance,
|
|
13
14
|
UpdateDateColumn,
|
|
14
|
-
}
|
|
15
|
-
import {
|
|
16
|
-
import { ImageAttributesEntity } from './ImageAttributesEntity'
|
|
15
|
+
} from 'typeorm'
|
|
16
|
+
import { IsNonEmptyStringConstraint } from '../validators'
|
|
17
17
|
import { BackgroundAttributesEntity } from './BackgroundAttributesEntity'
|
|
18
|
+
import { ImageAttributesEntity } from './ImageAttributesEntity'
|
|
18
19
|
import { TextAttributesEntity } from './TextAttributesEntity'
|
|
19
|
-
import { validate, Validate, ValidationError } from 'class-validator'
|
|
20
|
-
import { IsNonEmptyStringConstraint } from '../validators'
|
|
21
20
|
|
|
22
21
|
@Entity('BaseLocaleBranding')
|
|
23
22
|
@TableInheritance({ column: { type: 'varchar', name: 'type' } })
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
2
|
+
import { ArrayMinSize, IsNotEmpty, validate, ValidationError } from 'class-validator'
|
|
1
3
|
import {
|
|
2
4
|
BaseEntity,
|
|
3
5
|
BeforeInsert,
|
|
@@ -10,8 +12,6 @@ import {
|
|
|
10
12
|
PrimaryGeneratedColumn,
|
|
11
13
|
UpdateDateColumn,
|
|
12
14
|
} from 'typeorm'
|
|
13
|
-
import { ArrayMinSize, IsNotEmpty, validate, ValidationError } from 'class-validator'
|
|
14
|
-
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
15
15
|
import { CredentialLocaleBrandingEntity } from './CredentialLocaleBrandingEntity'
|
|
16
16
|
|
|
17
17
|
@Entity('CredentialBranding')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'
|
|
2
|
-
import { CredentialLocaleBrandingEntity } from './CredentialLocaleBrandingEntity'
|
|
3
1
|
import { validate, Validate, ValidationError } from 'class-validator'
|
|
2
|
+
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, Entity, Index, ManyToOne, PrimaryGeneratedColumn } from 'typeorm'
|
|
4
3
|
import { IsNonEmptyStringConstraint } from '../validators'
|
|
4
|
+
import { CredentialLocaleBrandingEntity } from './CredentialLocaleBrandingEntity'
|
|
5
5
|
|
|
6
6
|
@Entity('CredentialClaims')
|
|
7
7
|
@Index('IDX_CredentialClaimsEntity_credentialLocaleBranding_locale', ['credentialLocaleBranding', 'key'], { unique: true })
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ChildEntity, Column, JoinColumn, ManyToOne,
|
|
2
|
-
import { CredentialBrandingEntity } from './CredentialBrandingEntity'
|
|
1
|
+
import { ChildEntity, Column, Index, JoinColumn, ManyToOne, OneToMany } from 'typeorm'
|
|
3
2
|
import { BaseLocaleBrandingEntity } from './BaseLocaleBrandingEntity'
|
|
3
|
+
import { CredentialBrandingEntity } from './CredentialBrandingEntity'
|
|
4
4
|
import { CredentialClaimsEntity } from './CredentialClaimsEntity'
|
|
5
5
|
|
|
6
6
|
@ChildEntity('CredentialLocaleBranding')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm'
|
|
2
|
-
import { ImageDimensionsEntity } from './ImageDimensionsEntity'
|
|
3
1
|
import { validate, Validate, ValidationError } from 'class-validator'
|
|
2
|
+
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm'
|
|
4
3
|
import { IsNonEmptyStringConstraint } from '../validators'
|
|
4
|
+
import { ImageDimensionsEntity } from './ImageDimensionsEntity'
|
|
5
5
|
|
|
6
6
|
@Entity('ImageAttributes')
|
|
7
7
|
export class ImageAttributesEntity extends BaseEntity {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
2
|
+
import { ArrayMinSize, IsNotEmpty, validate, ValidationError } from 'class-validator'
|
|
1
3
|
import {
|
|
2
4
|
BaseEntity,
|
|
3
5
|
BeforeInsert,
|
|
@@ -10,8 +12,6 @@ import {
|
|
|
10
12
|
PrimaryGeneratedColumn,
|
|
11
13
|
UpdateDateColumn,
|
|
12
14
|
} from 'typeorm'
|
|
13
|
-
import { ArrayMinSize, IsNotEmpty, validate, ValidationError } from 'class-validator'
|
|
14
|
-
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
15
15
|
import { IssuerLocaleBrandingEntity } from './IssuerLocaleBrandingEntity'
|
|
16
16
|
|
|
17
17
|
@Entity('IssuerBranding')
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { Validate } from 'class-validator'
|
|
1
2
|
import { ChildEntity, Column, Index, JoinColumn, ManyToOne } from 'typeorm'
|
|
2
|
-
import { IssuerBrandingEntity } from './IssuerBrandingEntity'
|
|
3
|
-
import { BaseLocaleBrandingEntity } from './BaseLocaleBrandingEntity'
|
|
4
3
|
import { IsNonEmptyStringConstraint } from '../validators'
|
|
5
|
-
import {
|
|
4
|
+
import { BaseLocaleBrandingEntity } from './BaseLocaleBrandingEntity'
|
|
5
|
+
import { IssuerBrandingEntity } from './IssuerBrandingEntity'
|
|
6
6
|
|
|
7
7
|
@ChildEntity('IssuerLocaleBranding')
|
|
8
8
|
@Index('IDX_IssuerLocaleBrandingEntity_issuerBranding_locale', ['issuerBranding', 'locale'], { unique: true })
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, Entity, PrimaryGeneratedColumn } from 'typeorm'
|
|
2
1
|
import { validate, Validate, ValidationError } from 'class-validator'
|
|
2
|
+
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, Entity, PrimaryGeneratedColumn } from 'typeorm'
|
|
3
3
|
import { IsNonEmptyStringConstraint } from '../validators'
|
|
4
4
|
|
|
5
5
|
@Entity('TextAttributes')
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseEntity, Column, CreateDateColumn, Entity, PrimaryColumn, UpdateDateColumn } from 'typeorm'
|
|
2
1
|
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
2
|
+
import { BaseEntity, Column, CreateDateColumn, Entity, PrimaryColumn, UpdateDateColumn } from 'typeorm'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @class MachineStateInfoEntity
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'
|
|
2
|
-
import { IsNotEmpty } from 'class-validator'
|
|
3
1
|
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
2
|
+
import { IsNotEmpty } from 'class-validator'
|
|
3
|
+
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, CreateDateColumn, Entity, Index, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm'
|
|
4
4
|
|
|
5
|
-
@Entity('
|
|
5
|
+
@Entity('DcqlQueryItem')
|
|
6
6
|
@Index(['version'], { unique: false })
|
|
7
|
-
export class
|
|
7
|
+
export class DcqlQueryItemEntity extends BaseEntity {
|
|
8
8
|
@PrimaryGeneratedColumn('uuid')
|
|
9
9
|
id!: string
|
|
10
10
|
|
|
11
|
-
@Column({ name: '
|
|
12
|
-
@IsNotEmpty({ message: 'A blank
|
|
13
|
-
|
|
11
|
+
@Column({ name: 'query_id', length: 255, type: 'varchar', nullable: false, unique: false })
|
|
12
|
+
@IsNotEmpty({ message: 'A blank query id field is not allowed' })
|
|
13
|
+
queryId!: string
|
|
14
14
|
|
|
15
15
|
@Column({ name: 'version', length: 255, type: 'varchar', nullable: false, unique: false })
|
|
16
16
|
@IsNotEmpty({ message: 'A blank version field is not allowed' })
|
|
@@ -25,13 +25,9 @@ export class PresentationDefinitionItemEntity extends BaseEntity {
|
|
|
25
25
|
@Column({ name: 'name', length: 255, type: 'varchar', nullable: true, unique: false })
|
|
26
26
|
name?: string
|
|
27
27
|
|
|
28
|
-
@Column({ name: '
|
|
29
|
-
@IsNotEmpty({ message: 'A blank
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
@Column({ name: 'dcql_payload', type: 'text', nullable: true, unique: false })
|
|
33
|
-
@IsNotEmpty({ message: 'A blank dcql definition payload field is not allowed' })
|
|
34
|
-
dcqlPayload!: string
|
|
28
|
+
@Column({ name: 'query', type: 'text', nullable: false, unique: false })
|
|
29
|
+
@IsNotEmpty({ message: 'A blank dcql query payload field is not allowed' })
|
|
30
|
+
query!: string
|
|
35
31
|
|
|
36
32
|
@CreateDateColumn({ name: 'created_at', nullable: false, type: typeOrmDateTime() })
|
|
37
33
|
createdAt!: Date
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { BitstringStatusMessage } from '../../types'
|
|
1
2
|
import { ChildEntity, Column } from 'typeorm'
|
|
2
3
|
import { StatusListEntryEntity } from './StatusList2021EntryEntity'
|
|
3
|
-
import { BitstringStatusMessage } from '../../types'
|
|
4
4
|
|
|
5
5
|
@ChildEntity('bitstring')
|
|
6
6
|
export class BitstringStatusListEntryEntity extends StatusListEntryEntity {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
1
2
|
import {
|
|
2
3
|
type CredentialProofFormat,
|
|
3
4
|
type IIssuer,
|
|
@@ -9,12 +10,10 @@ import {
|
|
|
9
10
|
type StatusPurpose2021,
|
|
10
11
|
} from '@sphereon/ssi-types'
|
|
11
12
|
|
|
12
|
-
import
|
|
13
|
-
import { StatusListEntryEntity } from './StatusList2021EntryEntity'
|
|
14
|
-
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config'
|
|
13
|
+
import { BaseEntity, ChildEntity, Column, Entity, OneToMany, PrimaryColumn, TableInheritance, Unique } from 'typeorm'
|
|
15
14
|
import { BitstringStatusListEntryEntity } from './BitstringStatusListEntryEntity'
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
import { StatusListEntryEntity } from './StatusList2021EntryEntity'
|
|
18
17
|
|
|
19
18
|
@Entity('StatusList')
|
|
20
19
|
@Unique('UQ_correlationId', ['correlationId'])
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { ActivityLoggingEvent, AuditLoggingEvent } from '@sphereon/ssi-sdk.core'
|
|
2
|
+
import type { GetActivityEventsArgs, GetAuditEventsArgs, StoreActivityEventArgs, StoreAuditEventArgs } from '@sphereon/ssi-sdk.data-store-types'
|
|
3
|
+
import { AbstractEventLoggerStore } from '@sphereon/ssi-sdk.data-store-types'
|
|
2
4
|
import { LoggingEventType, type OrPromise } from '@sphereon/ssi-types'
|
|
3
5
|
import Debug, { Debugger } from 'debug'
|
|
4
6
|
import { DataSource } from 'typeorm'
|
|
5
|
-
import { AbstractEventLoggerStore } from './AbstractEventLoggerStore'
|
|
6
7
|
import { AuditEventEntity } from '../entities/eventLogger/AuditEventEntity'
|
|
7
8
|
import { activityEventEntityFrom, activityEventFrom, auditEventEntityFrom, auditEventFrom } from '../utils/eventLogger/MappingUtils'
|
|
8
|
-
import type { GetActivityEventsArgs, GetAuditEventsArgs, StoreActivityEventArgs, StoreAuditEventArgs } from '../types'
|
|
9
9
|
|
|
10
10
|
const debug: Debugger = Debug('sphereon:ssi-sdk:event-store')
|
|
11
11
|
|
package/src/index.ts
CHANGED
|
@@ -1,53 +1,48 @@
|
|
|
1
1
|
import { BaseConfigEntity } from './entities/contact/BaseConfigEntity'
|
|
2
|
-
import { BaseLocaleBrandingEntity } from './entities/issuanceBranding/BaseLocaleBrandingEntity'
|
|
3
2
|
import { BaseContactEntity } from './entities/contact/BaseContactEntity'
|
|
4
3
|
import { ConnectionEntity } from './entities/contact/ConnectionEntity'
|
|
5
|
-
import {
|
|
4
|
+
import { ContactMetadataItemEntity } from './entities/contact/ContactMetadataItemEntity'
|
|
6
5
|
import { CorrelationIdentifierEntity } from './entities/contact/CorrelationIdentifierEntity'
|
|
7
6
|
import { DidAuthConfigEntity } from './entities/contact/DidAuthConfigEntity'
|
|
7
|
+
import { ElectronicAddressEntity } from './entities/contact/ElectronicAddressEntity'
|
|
8
8
|
import { IdentityEntity } from './entities/contact/IdentityEntity'
|
|
9
9
|
import { IdentityMetadataItemEntity } from './entities/contact/IdentityMetadataItemEntity'
|
|
10
|
+
import { NaturalPersonEntity } from './entities/contact/NaturalPersonEntity'
|
|
10
11
|
import { OpenIdConfigEntity } from './entities/contact/OpenIdConfigEntity'
|
|
12
|
+
import { OrganizationEntity } from './entities/contact/OrganizationEntity'
|
|
13
|
+
import { PartyEntity } from './entities/contact/PartyEntity'
|
|
14
|
+
// import { IStatusListEntity, IStatusListEntryEntity } from './types.'
|
|
15
|
+
import { PartyRelationshipEntity } from './entities/contact/PartyRelationshipEntity'
|
|
16
|
+
import { PartyTypeEntity } from './entities/contact/PartyTypeEntity'
|
|
17
|
+
import { PhysicalAddressEntity } from './entities/contact/PhysicalAddressEntity'
|
|
18
|
+
import { DigitalCredentialEntity } from './entities/digitalCredential/DigitalCredentialEntity'
|
|
19
|
+
import { AuditEventEntity } from './entities/eventLogger/AuditEventEntity'
|
|
11
20
|
import { BackgroundAttributesEntity } from './entities/issuanceBranding/BackgroundAttributesEntity'
|
|
21
|
+
import { BaseLocaleBrandingEntity } from './entities/issuanceBranding/BaseLocaleBrandingEntity'
|
|
12
22
|
import { CredentialBrandingEntity } from './entities/issuanceBranding/CredentialBrandingEntity'
|
|
23
|
+
import { CredentialClaimsEntity } from './entities/issuanceBranding/CredentialClaimsEntity'
|
|
13
24
|
import { CredentialLocaleBrandingEntity } from './entities/issuanceBranding/CredentialLocaleBrandingEntity'
|
|
14
25
|
import { ImageAttributesEntity } from './entities/issuanceBranding/ImageAttributesEntity'
|
|
15
26
|
import { ImageDimensionsEntity } from './entities/issuanceBranding/ImageDimensionsEntity'
|
|
16
|
-
import { IssuerLocaleBrandingEntity } from './entities/issuanceBranding/IssuerLocaleBrandingEntity'
|
|
17
27
|
import { IssuerBrandingEntity } from './entities/issuanceBranding/IssuerBrandingEntity'
|
|
28
|
+
import { IssuerLocaleBrandingEntity } from './entities/issuanceBranding/IssuerLocaleBrandingEntity'
|
|
18
29
|
import { TextAttributesEntity } from './entities/issuanceBranding/TextAttributesEntity'
|
|
19
|
-
import { BitstringStatusListEntity, OAuthStatusListEntity, StatusList2021Entity, StatusListEntity } from './entities/statusList/StatusListEntities'
|
|
20
|
-
import { StatusListEntryEntity } from './entities/statusList/StatusList2021EntryEntity'
|
|
21
|
-
import { BitstringStatusListEntryEntity } from './entities/statusList/BitstringStatusListEntryEntity'
|
|
22
30
|
import { MachineStateInfoEntity } from './entities/machineState/MachineStateInfoEntity'
|
|
23
|
-
// import { IStatusListEntity, IStatusListEntryEntity } from './types.'
|
|
24
|
-
import { PartyRelationshipEntity } from './entities/contact/PartyRelationshipEntity'
|
|
25
|
-
import { PartyTypeEntity } from './entities/contact/PartyTypeEntity'
|
|
26
|
-
import { OrganizationEntity } from './entities/contact/OrganizationEntity'
|
|
27
|
-
import { NaturalPersonEntity } from './entities/contact/NaturalPersonEntity'
|
|
28
|
-
import { ElectronicAddressEntity } from './entities/contact/ElectronicAddressEntity'
|
|
29
|
-
import { PhysicalAddressEntity } from './entities/contact/PhysicalAddressEntity'
|
|
30
|
-
import { AuditEventEntity } from './entities/eventLogger/AuditEventEntity'
|
|
31
|
-
import { DigitalCredentialEntity } from './entities/digitalCredential/DigitalCredentialEntity'
|
|
32
|
-
import { PresentationDefinitionItemEntity } from './entities/presentationDefinition/PresentationDefinitionItemEntity'
|
|
33
|
-
import { ContactMetadataItemEntity } from './entities/contact/ContactMetadataItemEntity'
|
|
34
|
-
import { CredentialClaimsEntity } from './entities/issuanceBranding/CredentialClaimsEntity'
|
|
35
31
|
|
|
36
32
|
import { Oid4vcStateEntity } from './entities/oid4vcState/Oid4vcStateEntity'
|
|
33
|
+
import { DcqlQueryItemEntity } from './entities/presentationDefinition/DcqlQueryItemEntity'
|
|
34
|
+
import { BitstringStatusListEntryEntity } from './entities/statusList/BitstringStatusListEntryEntity'
|
|
35
|
+
import { StatusListEntryEntity } from './entities/statusList/StatusList2021EntryEntity'
|
|
36
|
+
import { BitstringStatusListEntity, OAuthStatusListEntity, StatusList2021Entity, StatusListEntity } from './entities/statusList/StatusListEntities'
|
|
37
37
|
// import {PartyCorrelationType} from "@sphereon/ssi-sdk.core";
|
|
38
38
|
|
|
39
39
|
export { ContactStore } from './contact/ContactStore'
|
|
40
|
-
export { AbstractContactStore } from './contact/AbstractContactStore'
|
|
41
|
-
export { AbstractDigitalCredentialStore } from './digitalCredential/AbstractDigitalCredentialStore'
|
|
42
40
|
export { DigitalCredentialStore } from './digitalCredential/DigitalCredentialStore'
|
|
43
|
-
export { AbstractIssuanceBrandingStore } from './issuanceBranding/AbstractIssuanceBrandingStore'
|
|
44
41
|
export { IssuanceBrandingStore } from './issuanceBranding/IssuanceBrandingStore'
|
|
45
42
|
export { StatusListStore } from './statusList/StatusListStore'
|
|
46
|
-
export { AbstractEventLoggerStore } from '
|
|
43
|
+
export { AbstractEventLoggerStore } from '@sphereon/ssi-sdk.data-store-types'
|
|
47
44
|
export { EventLoggerStore } from './eventLogger/EventLoggerStore'
|
|
48
|
-
export { IAbstractMachineStateStore } from './machineState/IAbstractMachineStateStore'
|
|
49
45
|
export { MachineStateStore } from './machineState/MachineStateStore'
|
|
50
|
-
export { AbstractPDStore } from './presentationDefinition/AbstractPDStore'
|
|
51
46
|
export { PDStore } from './presentationDefinition/PDStore'
|
|
52
47
|
export {
|
|
53
48
|
DataStoreMigrations,
|
|
@@ -99,7 +94,7 @@ export const DataStoreIssuanceBrandingEntities = [
|
|
|
99
94
|
CredentialClaimsEntity,
|
|
100
95
|
]
|
|
101
96
|
|
|
102
|
-
export const DataStorePresentationDefinitionEntities = [
|
|
97
|
+
export const DataStorePresentationDefinitionEntities = [DcqlQueryItemEntity]
|
|
103
98
|
|
|
104
99
|
export const DataStoreStatusListEntities = [
|
|
105
100
|
StatusListEntity,
|
|
@@ -158,7 +153,7 @@ export {
|
|
|
158
153
|
AuditEventEntity,
|
|
159
154
|
DigitalCredentialEntity,
|
|
160
155
|
MachineStateInfoEntity,
|
|
161
|
-
|
|
156
|
+
DcqlQueryItemEntity,
|
|
162
157
|
ContactMetadataItemEntity,
|
|
163
158
|
CredentialClaimsEntity,
|
|
164
159
|
Oid4vcStateEntity,
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
import { type OrPromise } from '@sphereon/ssi-types'
|
|
2
|
-
import Debug from 'debug'
|
|
3
|
-
import { DataSource, type DeleteResult, In, Not, type Repository } from 'typeorm'
|
|
4
|
-
import {
|
|
5
|
-
credentialBrandingEntityFrom,
|
|
6
|
-
credentialBrandingFrom,
|
|
7
|
-
credentialLocaleBrandingEntityFrom,
|
|
8
|
-
issuerBrandingEntityFrom,
|
|
9
|
-
issuerBrandingFrom,
|
|
10
|
-
issuerLocaleBrandingEntityFrom,
|
|
11
|
-
localeBrandingFrom,
|
|
12
|
-
} from '../utils/issuanceBranding/MappingUtils'
|
|
13
|
-
import { BackgroundAttributesEntity } from '../entities/issuanceBranding/BackgroundAttributesEntity'
|
|
14
|
-
import { ImageAttributesEntity } from '../entities/issuanceBranding/ImageAttributesEntity'
|
|
15
|
-
import { ImageDimensionsEntity } from '../entities/issuanceBranding/ImageDimensionsEntity'
|
|
16
|
-
import { IssuerBrandingEntity } from '../entities/issuanceBranding/IssuerBrandingEntity'
|
|
17
|
-
import { CredentialBrandingEntity } from '../entities/issuanceBranding/CredentialBrandingEntity'
|
|
18
|
-
import { CredentialLocaleBrandingEntity } from '../entities/issuanceBranding/CredentialLocaleBrandingEntity'
|
|
19
|
-
import { IssuerLocaleBrandingEntity } from '../entities/issuanceBranding/IssuerLocaleBrandingEntity'
|
|
20
|
-
import { BaseLocaleBrandingEntity } from '../entities/issuanceBranding/BaseLocaleBrandingEntity'
|
|
21
|
-
import { TextAttributesEntity } from '../entities/issuanceBranding/TextAttributesEntity'
|
|
22
|
-
import { AbstractIssuanceBrandingStore } from './AbstractIssuanceBrandingStore'
|
|
23
1
|
import type {
|
|
24
2
|
IAddCredentialBrandingArgs,
|
|
25
3
|
IAddCredentialLocaleBrandingArgs,
|
|
@@ -28,7 +6,7 @@ import type {
|
|
|
28
6
|
IBasicCredentialLocaleBranding,
|
|
29
7
|
IBasicIssuerLocaleBranding,
|
|
30
8
|
ICredentialBranding,
|
|
31
|
-
|
|
9
|
+
ICredentialBrandingFilter,
|
|
32
10
|
ICredentialLocaleBranding,
|
|
33
11
|
ICredentialLocaleBrandingFilter,
|
|
34
12
|
IGetCredentialBrandingArgs,
|
|
@@ -39,6 +17,7 @@ import type {
|
|
|
39
17
|
IIssuerBrandingFilter,
|
|
40
18
|
IIssuerLocaleBranding,
|
|
41
19
|
IIssuerLocaleBrandingFilter,
|
|
20
|
+
IPartialCredentialBranding,
|
|
42
21
|
IRemoveCredentialBrandingArgs,
|
|
43
22
|
IRemoveCredentialLocaleBrandingArgs,
|
|
44
23
|
IRemoveIssuerBrandingArgs,
|
|
@@ -47,8 +26,29 @@ import type {
|
|
|
47
26
|
IUpdateCredentialLocaleBrandingArgs,
|
|
48
27
|
IUpdateIssuerBrandingArgs,
|
|
49
28
|
IUpdateIssuerLocaleBrandingArgs,
|
|
50
|
-
|
|
51
|
-
} from '
|
|
29
|
+
} from '@sphereon/ssi-sdk.data-store-types'
|
|
30
|
+
import { AbstractIssuanceBrandingStore } from '@sphereon/ssi-sdk.data-store-types'
|
|
31
|
+
import { type OrPromise } from '@sphereon/ssi-types'
|
|
32
|
+
import Debug from 'debug'
|
|
33
|
+
import { DataSource, type DeleteResult, In, Not, type Repository } from 'typeorm'
|
|
34
|
+
import { BackgroundAttributesEntity } from '../entities/issuanceBranding/BackgroundAttributesEntity'
|
|
35
|
+
import { BaseLocaleBrandingEntity } from '../entities/issuanceBranding/BaseLocaleBrandingEntity'
|
|
36
|
+
import { CredentialBrandingEntity } from '../entities/issuanceBranding/CredentialBrandingEntity'
|
|
37
|
+
import { CredentialLocaleBrandingEntity } from '../entities/issuanceBranding/CredentialLocaleBrandingEntity'
|
|
38
|
+
import { ImageAttributesEntity } from '../entities/issuanceBranding/ImageAttributesEntity'
|
|
39
|
+
import { ImageDimensionsEntity } from '../entities/issuanceBranding/ImageDimensionsEntity'
|
|
40
|
+
import { IssuerBrandingEntity } from '../entities/issuanceBranding/IssuerBrandingEntity'
|
|
41
|
+
import { IssuerLocaleBrandingEntity } from '../entities/issuanceBranding/IssuerLocaleBrandingEntity'
|
|
42
|
+
import { TextAttributesEntity } from '../entities/issuanceBranding/TextAttributesEntity'
|
|
43
|
+
import {
|
|
44
|
+
credentialBrandingEntityFrom,
|
|
45
|
+
credentialBrandingFrom,
|
|
46
|
+
credentialLocaleBrandingEntityFrom,
|
|
47
|
+
issuerBrandingEntityFrom,
|
|
48
|
+
issuerBrandingFrom,
|
|
49
|
+
issuerLocaleBrandingEntityFrom,
|
|
50
|
+
localeBrandingFrom,
|
|
51
|
+
} from '../utils/issuanceBranding/MappingUtils'
|
|
52
52
|
|
|
53
53
|
const debug: Debug.Debugger = Debug('sphereon:ssi-sdk:issuance-branding-store')
|
|
54
54
|
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import { type OrPromise } from '@sphereon/ssi-types'
|
|
2
|
-
import Debug from 'debug'
|
|
3
|
-
import { Brackets, DataSource, type FindOptionsWhere, IsNull, LessThan, Not } from 'typeorm'
|
|
4
|
-
|
|
5
|
-
import { MachineStateInfoEntity } from '../entities/machineState/MachineStateInfoEntity'
|
|
6
1
|
import type {
|
|
7
2
|
StoreFindMachineStatesArgs,
|
|
8
3
|
StoreMachineStateDeleteArgs,
|
|
@@ -11,8 +6,13 @@ import type {
|
|
|
11
6
|
StoreMachineStateInfo,
|
|
12
7
|
StoreMachineStatePersistArgs,
|
|
13
8
|
StoreMachineStatesFindActiveArgs,
|
|
14
|
-
} from '
|
|
15
|
-
import { IAbstractMachineStateStore } from '
|
|
9
|
+
} from '@sphereon/ssi-sdk.data-store-types'
|
|
10
|
+
import { IAbstractMachineStateStore } from '@sphereon/ssi-sdk.data-store-types'
|
|
11
|
+
import { type OrPromise } from '@sphereon/ssi-types'
|
|
12
|
+
import Debug from 'debug'
|
|
13
|
+
import { Brackets, DataSource, type FindOptionsWhere, IsNull, LessThan, Not } from 'typeorm'
|
|
14
|
+
|
|
15
|
+
import { MachineStateInfoEntity } from '../entities/machineState/MachineStateInfoEntity'
|
|
16
16
|
|
|
17
17
|
const debug = Debug('sphereon:ssi-sdk:machine-state:store')
|
|
18
18
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
1
|
import Debug from 'debug'
|
|
2
|
+
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
3
3
|
import { CreateContacts1659463079428 } from '../postgres/1659463079428-CreateContacts'
|
|
4
4
|
import { CreateContacts1659463069549 } from '../sqlite/1659463069549-CreateContacts'
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
1
|
import Debug from 'debug'
|
|
2
|
+
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
3
3
|
import { CreatePresentationDefinitions1716475165345 } from '../postgres/1716475165345-CreatePresentationDefinitions'
|
|
4
4
|
import { CreatePresentationDefinitions1716475165344 } from '../sqlite/1716475165344-CreatePresentationDefinitions'
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
1
|
import Debug from 'debug'
|
|
2
|
+
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
3
3
|
import { CreateIssuanceBranding1685628974232 } from '../postgres/1685628974232-CreateIssuanceBranding'
|
|
4
|
-
import { CreateIssuanceBranding1685628973231 } from '../sqlite/1685628973231-CreateIssuanceBranding'
|
|
5
4
|
import { FixCredentialClaimsReferencesUuidPG1741895822987 } from '../postgres/1741895822987-FixCredentialClaimsReferencesUuid'
|
|
5
|
+
import { CreateIssuanceBranding1685628973231 } from '../sqlite/1685628973231-CreateIssuanceBranding'
|
|
6
6
|
import { FixCredentialClaimsReferencesUuidSqlite1741895822987 } from '../sqlite/1741895822987-FixCredentialClaimsReferencesUuid'
|
|
7
7
|
|
|
8
8
|
const debug: Debug.Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
@@ -1,10 +1,40 @@
|
|
|
1
|
-
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
1
|
import Debug from 'debug'
|
|
3
|
-
import {
|
|
2
|
+
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
AddBitstringStatusListEnumPG1741895823000,
|
|
6
|
+
CreateBitstringStatusListPG1741895823000,
|
|
7
|
+
} from '../postgres/1741895823000-CreateBitstringStatusList'
|
|
4
8
|
import { CreateBitstringStatusListSqlite1741895823001 } from '../sqlite/1741895823001-CreateBitstringStatusList'
|
|
5
9
|
|
|
6
10
|
const debug: Debug.Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
7
11
|
|
|
12
|
+
export class AddBitstringStatusListEnum1741895823000 implements MigrationInterface {
|
|
13
|
+
name = 'AddBitstringStatusListEnum1741895823000'
|
|
14
|
+
|
|
15
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
16
|
+
debug('migration: creating bitstring status list tables')
|
|
17
|
+
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
18
|
+
switch (dbType) {
|
|
19
|
+
case 'postgres': {
|
|
20
|
+
const mig = new AddBitstringStatusListEnumPG1741895823000()
|
|
21
|
+
await mig.up(queryRunner)
|
|
22
|
+
return
|
|
23
|
+
}
|
|
24
|
+
case 'sqlite':
|
|
25
|
+
case 'expo':
|
|
26
|
+
case 'react-native': {
|
|
27
|
+
return
|
|
28
|
+
}
|
|
29
|
+
default:
|
|
30
|
+
return Promise.reject(`Migrations only supported for sqlite and postgres. Was ${dbType}`)
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
35
|
+
public async down(queryRunner: QueryRunner): Promise<void> {}
|
|
36
|
+
}
|
|
37
|
+
|
|
8
38
|
export class CreateBitstringStatusList1741895823000 implements MigrationInterface {
|
|
9
39
|
name = 'CreateBitstringStatusList1741895823000'
|
|
10
40
|
|