@sphereon/ssi-sdk.data-store 0.30.1-unstable.4 → 0.30.1
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/LICENSE +201 -201
- package/README.md +77 -77
- package/dist/contact/ContactStore.d.ts.map +1 -1
- package/dist/digitalCredential/DigitalCredentialStore.d.ts.map +1 -1
- package/dist/eventLogger/EventLoggerStore.d.ts.map +1 -1
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts.map +1 -1
- package/dist/migrations/internal-migrations-ormconfig.d.ts.map +1 -1
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js +33 -33
- package/dist/migrations/postgres/1708797018115-CreateMachineStateStore.js +16 -16
- package/dist/migrations/postgres/1715761125001-CreateContacts.js +33 -33
- package/dist/migrations/postgres/1716475165345-CreatePresentationDefinitions.js +12 -12
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js +32 -32
- package/dist/migrations/sqlite/1708796002272-CreateMachineStateStore.js +15 -15
- package/dist/migrations/sqlite/1710438363002-CreateContacts.js +13 -13
- package/dist/migrations/sqlite/1715761125002-CreateContacts.js +32 -32
- package/dist/migrations/sqlite/1716475165344-CreatePresentationDefinitions.js +9 -9
- package/dist/presentationDefinition/PDStore.d.ts.map +1 -1
- package/dist/utils/SortingUtils.d.ts.map +1 -1
- package/dist/utils/contact/MappingUtils.d.ts.map +1 -1
- package/dist/utils/digitalCredential/MappingUtils.d.ts.map +1 -1
- package/dist/utils/digitalCredential/MappingUtils.js +4 -4
- package/dist/utils/digitalCredential/MappingUtils.js.map +1 -1
- package/dist/utils/presentationDefinition/MappingUtils.js +2 -2
- package/dist/utils/presentationDefinition/MappingUtils.js.map +1 -1
- package/package.json +8 -8
- package/src/__tests__/contact.entities.test.ts +2642 -2642
- package/src/__tests__/contact.store.test.ts +2649 -2649
- package/src/__tests__/digitalCredential.entities.test.ts +274 -274
- package/src/__tests__/digitalCredential.store.test.ts +330 -330
- package/src/__tests__/eventLogger.entities.test.ts +76 -76
- package/src/__tests__/eventLogger.store.test.ts +130 -130
- package/src/__tests__/issuanceBranding.entities.test.ts +846 -846
- package/src/__tests__/issuanceBranding.store.test.ts +1886 -1886
- package/src/__tests__/machineState.entities.test.ts +53 -53
- package/src/__tests__/machineState.store.test.ts +176 -176
- package/src/__tests__/pd-manager.entities.test.ts +73 -73
- package/src/__tests__/pd-manager.store.test.ts +193 -193
- package/src/contact/AbstractContactStore.ts +71 -71
- package/src/contact/ContactStore.ts +768 -768
- package/src/digitalCredential/AbstractDigitalCredentialStore.ts +21 -21
- package/src/digitalCredential/DigitalCredentialStore.ts +189 -189
- package/src/entities/contact/BaseContactEntity.ts +51 -51
- package/src/entities/contact/ConnectionEntity.ts +35 -35
- package/src/entities/contact/ContactMetadataItemEntity.ts +51 -51
- package/src/entities/contact/CorrelationIdentifierEntity.ts +43 -43
- package/src/entities/contact/DidAuthConfigEntity.ts +20 -20
- package/src/entities/contact/ElectronicAddressEntity.ts +70 -70
- package/src/entities/contact/IdentityEntity.ts +107 -107
- package/src/entities/contact/IdentityMetadataItemEntity.ts +48 -48
- package/src/entities/contact/NaturalPersonEntity.ts +44 -44
- package/src/entities/contact/OpenIdConfigEntity.ts +32 -32
- package/src/entities/contact/OrganizationEntity.ts +35 -35
- package/src/entities/contact/PartyEntity.ts +117 -117
- package/src/entities/contact/PartyRelationshipEntity.ts +68 -68
- package/src/entities/contact/PartyTypeEntity.ts +63 -63
- package/src/entities/contact/PhysicalAddressEntity.ts +95 -95
- package/src/entities/digitalCredential/DigitalCredentialEntity.ts +98 -98
- package/src/entities/eventLogger/AuditEventEntity.ts +92 -92
- package/src/entities/issuanceBranding/BackgroundAttributesEntity.ts +42 -42
- package/src/entities/issuanceBranding/BaseLocaleBrandingEntity.ts +87 -87
- package/src/entities/issuanceBranding/CredentialBrandingEntity.ts +79 -79
- package/src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts +33 -33
- package/src/entities/issuanceBranding/ImageAttributesEntity.ts +57 -57
- package/src/entities/issuanceBranding/ImageDimensionsEntity.ts +22 -22
- package/src/entities/issuanceBranding/IssuerBrandingEntity.ts +73 -73
- package/src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts +33 -33
- package/src/entities/issuanceBranding/TextAttributesEntity.ts +31 -31
- package/src/entities/machineState/MachineStateInfoEntity.ts +59 -59
- package/src/entities/presentationDefinition/PresentationDefinitionItemEntity.ts +44 -44
- package/src/entities/statusList2021/StatusList2021Entity.ts +96 -96
- package/src/entities/statusList2021/StatusList2021EntryEntity.ts +29 -29
- package/src/eventLogger/AbstractEventLoggerStore.ts +7 -7
- package/src/eventLogger/EventLoggerStore.ts +62 -62
- package/src/index.ts +160 -160
- package/src/issuanceBranding/IssuanceBrandingStore.ts +559 -559
- package/src/machineState/IAbstractMachineStateStore.ts +65 -65
- package/src/machineState/MachineStateStore.ts +149 -149
- package/src/migrations/generic/1-CreateContacts.ts +66 -66
- package/src/migrations/generic/10-CreatePresentationDefinitions.ts +66 -66
- package/src/migrations/generic/2-CreateIssuanceBranding.ts +64 -64
- package/src/migrations/generic/3-CreateContacts.ts +66 -66
- package/src/migrations/generic/4-CreateStatusList.ts +54 -54
- package/src/migrations/generic/5-CreateAuditEvents.ts +66 -66
- package/src/migrations/generic/6-CreateDigitalCredential.ts +66 -66
- package/src/migrations/generic/7-CreateMachineStateStore.ts +66 -66
- package/src/migrations/generic/8-CreateContacts.ts +66 -66
- package/src/migrations/generic/9-CreateContacts.ts +66 -66
- package/src/migrations/generic/index.ts +43 -43
- package/src/migrations/index.ts +10 -10
- package/src/migrations/postgres/1659463079428-CreateContacts.ts +63 -63
- package/src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts +85 -85
- package/src/migrations/postgres/1690925872592-CreateContacts.ts +158 -158
- package/src/migrations/postgres/1693866470001-CreateStatusList.ts +24 -24
- package/src/migrations/postgres/1701634812183-CreateAuditEvents.ts +33 -33
- package/src/migrations/postgres/1708525189001-CreateDigitalCredential.ts +61 -61
- package/src/migrations/postgres/1708797018115-CreateMachineStateStore.ts +29 -29
- package/src/migrations/postgres/1710438363001-CreateContacts.ts +63 -63
- package/src/migrations/postgres/1715761125001-CreateContacts.ts +60 -60
- package/src/migrations/postgres/1716475165345-CreatePresentationDefinitions.ts +25 -25
- package/src/migrations/sqlite/1659463069549-CreateContacts.ts +110 -110
- package/src/migrations/sqlite/1685628973231-CreateIssuanceBranding.ts +119 -119
- package/src/migrations/sqlite/1690925872693-CreateContacts.ts +228 -228
- package/src/migrations/sqlite/1693866470000-CreateStatusList.ts +24 -24
- package/src/migrations/sqlite/1701634819487-CreateAuditEvents.ts +15 -15
- package/src/migrations/sqlite/1708525189002-CreateDigitalCredential.ts +46 -46
- package/src/migrations/sqlite/1708796002272-CreateMachineStateStore.ts +28 -28
- package/src/migrations/sqlite/1710438363002-CreateContacts.ts +83 -83
- package/src/migrations/sqlite/1715761125002-CreateContacts.ts +59 -59
- package/src/migrations/sqlite/1716475165344-CreatePresentationDefinitions.ts +24 -24
- package/src/presentationDefinition/AbstractPDStore.ts +20 -20
- package/src/presentationDefinition/PDStore.ts +185 -185
- package/src/statusList/IStatusListStore.ts +44 -44
- package/src/statusList/StatusListStore.ts +236 -236
- package/src/types/contact/IAbstractContactStore.ts +161 -161
- package/src/types/contact/contact.ts +295 -295
- package/src/types/digitalCredential/IAbstractDigitalCredentialStore.ts +42 -42
- package/src/types/digitalCredential/digitalCredential.ts +102 -102
- package/src/types/eventLogger/IAbstractEventLoggerStore.ts +12 -12
- package/src/types/eventLogger/eventLogger.ts +3 -3
- package/src/types/index.ts +14 -14
- package/src/types/machineState/IAbstractMachineStateStore.ts +68 -68
- package/src/types/presentationDefinition/IAbstractPDStore.ts +25 -25
- package/src/types/presentationDefinition/presentationDefinition.ts +17 -17
- package/src/utils/SortingUtils.ts +16 -16
- package/src/utils/contact/MappingUtils.ts +506 -506
- package/src/utils/digitalCredential/MappingUtils.ts +160 -160
- package/src/utils/hasher.ts +19 -19
- package/src/utils/presentationDefinition/MappingUtils.ts +52 -52
- package/dist/entities/contact/IMetadataEntity.d.ts +0 -8
- package/dist/entities/contact/IMetadataEntity.d.ts.map +0 -1
- package/dist/entities/contact/IMetadataEntity.js +0 -2
- package/dist/entities/contact/IMetadataEntity.js.map +0 -1
- package/dist/migrations/generic/8-CreatePresentationDefinitions.d.ts +0 -7
- package/dist/migrations/generic/8-CreatePresentationDefinitions.d.ts.map +0 -1
- package/dist/migrations/generic/8-CreatePresentationDefinitions.js +0 -78
- package/dist/migrations/generic/8-CreatePresentationDefinitions.js.map +0 -1
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
import Debug from 'debug'
|
|
3
|
-
import { CreatePresentationDefinitions1716475165345 } from '../postgres/1716475165345-CreatePresentationDefinitions'
|
|
4
|
-
import { CreatePresentationDefinitions1716475165344 } from '../sqlite/1716475165344-CreatePresentationDefinitions'
|
|
5
|
-
|
|
6
|
-
const debug: Debug.Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
-
|
|
8
|
-
export class CreatePresentationDefinitions1716533767523 implements MigrationInterface {
|
|
9
|
-
name = 'CreatePresentationDefinitionItems1716533767523'
|
|
10
|
-
|
|
11
|
-
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
-
debug('migration: creating machine state tables')
|
|
13
|
-
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
14
|
-
|
|
15
|
-
switch (dbType) {
|
|
16
|
-
case 'postgres': {
|
|
17
|
-
debug('using postgres migration file')
|
|
18
|
-
const mig: CreatePresentationDefinitions1716475165345 = new CreatePresentationDefinitions1716475165345()
|
|
19
|
-
await mig.up(queryRunner)
|
|
20
|
-
debug('Migration statements executed')
|
|
21
|
-
return
|
|
22
|
-
}
|
|
23
|
-
case 'sqlite':
|
|
24
|
-
case 'expo':
|
|
25
|
-
case 'react-native': {
|
|
26
|
-
debug('using sqlite/react-native migration file')
|
|
27
|
-
const mig: CreatePresentationDefinitions1716475165344 = new CreatePresentationDefinitions1716475165344()
|
|
28
|
-
await mig.up(queryRunner)
|
|
29
|
-
debug('Migration statements executed')
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
default:
|
|
33
|
-
return Promise.reject(
|
|
34
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
40
|
-
debug('migration: reverting machine state tables')
|
|
41
|
-
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
42
|
-
|
|
43
|
-
switch (dbType) {
|
|
44
|
-
case 'postgres': {
|
|
45
|
-
debug('using postgres migration file')
|
|
46
|
-
const mig: CreatePresentationDefinitions1716475165345 = new CreatePresentationDefinitions1716475165345()
|
|
47
|
-
await mig.down(queryRunner)
|
|
48
|
-
debug('Migration statements executed')
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
case 'sqlite':
|
|
52
|
-
case 'expo':
|
|
53
|
-
case 'react-native': {
|
|
54
|
-
debug('using sqlite/react-native migration file')
|
|
55
|
-
const mig: CreatePresentationDefinitions1716475165344 = new CreatePresentationDefinitions1716475165344()
|
|
56
|
-
await mig.down(queryRunner)
|
|
57
|
-
debug('Migration statements executed')
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
default:
|
|
61
|
-
return Promise.reject(
|
|
62
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
+
import Debug from 'debug'
|
|
3
|
+
import { CreatePresentationDefinitions1716475165345 } from '../postgres/1716475165345-CreatePresentationDefinitions'
|
|
4
|
+
import { CreatePresentationDefinitions1716475165344 } from '../sqlite/1716475165344-CreatePresentationDefinitions'
|
|
5
|
+
|
|
6
|
+
const debug: Debug.Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
+
|
|
8
|
+
export class CreatePresentationDefinitions1716533767523 implements MigrationInterface {
|
|
9
|
+
name = 'CreatePresentationDefinitionItems1716533767523'
|
|
10
|
+
|
|
11
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
debug('migration: creating machine state tables')
|
|
13
|
+
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
14
|
+
|
|
15
|
+
switch (dbType) {
|
|
16
|
+
case 'postgres': {
|
|
17
|
+
debug('using postgres migration file')
|
|
18
|
+
const mig: CreatePresentationDefinitions1716475165345 = new CreatePresentationDefinitions1716475165345()
|
|
19
|
+
await mig.up(queryRunner)
|
|
20
|
+
debug('Migration statements executed')
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
case 'sqlite':
|
|
24
|
+
case 'expo':
|
|
25
|
+
case 'react-native': {
|
|
26
|
+
debug('using sqlite/react-native migration file')
|
|
27
|
+
const mig: CreatePresentationDefinitions1716475165344 = new CreatePresentationDefinitions1716475165344()
|
|
28
|
+
await mig.up(queryRunner)
|
|
29
|
+
debug('Migration statements executed')
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
default:
|
|
33
|
+
return Promise.reject(
|
|
34
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
40
|
+
debug('migration: reverting machine state tables')
|
|
41
|
+
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
42
|
+
|
|
43
|
+
switch (dbType) {
|
|
44
|
+
case 'postgres': {
|
|
45
|
+
debug('using postgres migration file')
|
|
46
|
+
const mig: CreatePresentationDefinitions1716475165345 = new CreatePresentationDefinitions1716475165345()
|
|
47
|
+
await mig.down(queryRunner)
|
|
48
|
+
debug('Migration statements executed')
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
case 'sqlite':
|
|
52
|
+
case 'expo':
|
|
53
|
+
case 'react-native': {
|
|
54
|
+
debug('using sqlite/react-native migration file')
|
|
55
|
+
const mig: CreatePresentationDefinitions1716475165344 = new CreatePresentationDefinitions1716475165344()
|
|
56
|
+
await mig.down(queryRunner)
|
|
57
|
+
debug('Migration statements executed')
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
default:
|
|
61
|
+
return Promise.reject(
|
|
62
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
import Debug from 'debug'
|
|
3
|
-
import { CreateIssuanceBranding1685628974232 } from '../postgres/1685628974232-CreateIssuanceBranding'
|
|
4
|
-
import { CreateIssuanceBranding1685628973231 } from '../sqlite/1685628973231-CreateIssuanceBranding'
|
|
5
|
-
|
|
6
|
-
const debug: Debug.Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
-
|
|
8
|
-
export class CreateIssuanceBranding1659463079429 implements MigrationInterface {
|
|
9
|
-
name = 'CreateIssuanceBranding1659463079429'
|
|
10
|
-
|
|
11
|
-
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
-
debug('migration: creating issuance branding tables')
|
|
13
|
-
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
14
|
-
switch (dbType) {
|
|
15
|
-
case 'postgres': {
|
|
16
|
-
debug('using postgres migration file')
|
|
17
|
-
const mig: CreateIssuanceBranding1685628974232 = new CreateIssuanceBranding1685628974232()
|
|
18
|
-
await mig.up(queryRunner)
|
|
19
|
-
debug('Migration statements executed')
|
|
20
|
-
return
|
|
21
|
-
}
|
|
22
|
-
case 'sqlite':
|
|
23
|
-
case 'expo':
|
|
24
|
-
case 'react-native': {
|
|
25
|
-
debug('using sqlite/react-native migration file')
|
|
26
|
-
const mig: CreateIssuanceBranding1685628973231 = new CreateIssuanceBranding1685628973231()
|
|
27
|
-
await mig.up(queryRunner)
|
|
28
|
-
debug('Migration statements executed')
|
|
29
|
-
return
|
|
30
|
-
}
|
|
31
|
-
default:
|
|
32
|
-
return Promise.reject(
|
|
33
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
34
|
-
)
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
39
|
-
debug('migration: reverting issuance branding tables')
|
|
40
|
-
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
41
|
-
switch (dbType) {
|
|
42
|
-
case 'postgres': {
|
|
43
|
-
debug('using postgres migration file')
|
|
44
|
-
const mig: CreateIssuanceBranding1685628974232 = new CreateIssuanceBranding1685628974232()
|
|
45
|
-
await mig.down(queryRunner)
|
|
46
|
-
debug('Migration statements executed')
|
|
47
|
-
return
|
|
48
|
-
}
|
|
49
|
-
case 'sqlite':
|
|
50
|
-
case 'expo':
|
|
51
|
-
case 'react-native': {
|
|
52
|
-
debug('using sqlite/react-native migration file')
|
|
53
|
-
const mig: CreateIssuanceBranding1685628973231 = new CreateIssuanceBranding1685628973231()
|
|
54
|
-
await mig.down(queryRunner)
|
|
55
|
-
debug('Migration statements executed')
|
|
56
|
-
return
|
|
57
|
-
}
|
|
58
|
-
default:
|
|
59
|
-
return Promise.reject(
|
|
60
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
61
|
-
)
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
1
|
+
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
+
import Debug from 'debug'
|
|
3
|
+
import { CreateIssuanceBranding1685628974232 } from '../postgres/1685628974232-CreateIssuanceBranding'
|
|
4
|
+
import { CreateIssuanceBranding1685628973231 } from '../sqlite/1685628973231-CreateIssuanceBranding'
|
|
5
|
+
|
|
6
|
+
const debug: Debug.Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
+
|
|
8
|
+
export class CreateIssuanceBranding1659463079429 implements MigrationInterface {
|
|
9
|
+
name = 'CreateIssuanceBranding1659463079429'
|
|
10
|
+
|
|
11
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
debug('migration: creating issuance branding tables')
|
|
13
|
+
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
14
|
+
switch (dbType) {
|
|
15
|
+
case 'postgres': {
|
|
16
|
+
debug('using postgres migration file')
|
|
17
|
+
const mig: CreateIssuanceBranding1685628974232 = new CreateIssuanceBranding1685628974232()
|
|
18
|
+
await mig.up(queryRunner)
|
|
19
|
+
debug('Migration statements executed')
|
|
20
|
+
return
|
|
21
|
+
}
|
|
22
|
+
case 'sqlite':
|
|
23
|
+
case 'expo':
|
|
24
|
+
case 'react-native': {
|
|
25
|
+
debug('using sqlite/react-native migration file')
|
|
26
|
+
const mig: CreateIssuanceBranding1685628973231 = new CreateIssuanceBranding1685628973231()
|
|
27
|
+
await mig.up(queryRunner)
|
|
28
|
+
debug('Migration statements executed')
|
|
29
|
+
return
|
|
30
|
+
}
|
|
31
|
+
default:
|
|
32
|
+
return Promise.reject(
|
|
33
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
39
|
+
debug('migration: reverting issuance branding tables')
|
|
40
|
+
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
41
|
+
switch (dbType) {
|
|
42
|
+
case 'postgres': {
|
|
43
|
+
debug('using postgres migration file')
|
|
44
|
+
const mig: CreateIssuanceBranding1685628974232 = new CreateIssuanceBranding1685628974232()
|
|
45
|
+
await mig.down(queryRunner)
|
|
46
|
+
debug('Migration statements executed')
|
|
47
|
+
return
|
|
48
|
+
}
|
|
49
|
+
case 'sqlite':
|
|
50
|
+
case 'expo':
|
|
51
|
+
case 'react-native': {
|
|
52
|
+
debug('using sqlite/react-native migration file')
|
|
53
|
+
const mig: CreateIssuanceBranding1685628973231 = new CreateIssuanceBranding1685628973231()
|
|
54
|
+
await mig.down(queryRunner)
|
|
55
|
+
debug('Migration statements executed')
|
|
56
|
+
return
|
|
57
|
+
}
|
|
58
|
+
default:
|
|
59
|
+
return Promise.reject(
|
|
60
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
61
|
+
)
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
import Debug from 'debug'
|
|
3
|
-
import { CreateContacts1690925872693 } from '../sqlite/1690925872693-CreateContacts'
|
|
4
|
-
import { CreateContacts1690925872592 } from '../postgres/1690925872592-CreateContacts'
|
|
5
|
-
|
|
6
|
-
const debug: Debug.Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
-
|
|
8
|
-
export class CreateContacts1690925872318 implements MigrationInterface {
|
|
9
|
-
name = 'CreateContacts1690925872318'
|
|
10
|
-
|
|
11
|
-
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
-
debug('migration: creating contacts tables')
|
|
13
|
-
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
14
|
-
|
|
15
|
-
switch (dbType) {
|
|
16
|
-
case 'postgres': {
|
|
17
|
-
debug('using postgres migration file')
|
|
18
|
-
const mig: CreateContacts1690925872592 = new CreateContacts1690925872592()
|
|
19
|
-
await mig.up(queryRunner)
|
|
20
|
-
debug('Migration statements executed')
|
|
21
|
-
return
|
|
22
|
-
}
|
|
23
|
-
case 'sqlite':
|
|
24
|
-
case 'expo':
|
|
25
|
-
case 'react-native': {
|
|
26
|
-
debug('using sqlite/react-native migration file')
|
|
27
|
-
const mig: CreateContacts1690925872693 = new CreateContacts1690925872693()
|
|
28
|
-
await mig.up(queryRunner)
|
|
29
|
-
debug('Migration statements executed')
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
default:
|
|
33
|
-
return Promise.reject(
|
|
34
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
40
|
-
debug('migration: reverting contacts tables')
|
|
41
|
-
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
42
|
-
|
|
43
|
-
switch (dbType) {
|
|
44
|
-
case 'postgres': {
|
|
45
|
-
debug('using postgres migration file')
|
|
46
|
-
const mig: CreateContacts1690925872592 = new CreateContacts1690925872592()
|
|
47
|
-
await mig.down(queryRunner)
|
|
48
|
-
debug('Migration statements executed')
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
case 'sqlite':
|
|
52
|
-
case 'expo':
|
|
53
|
-
case 'react-native': {
|
|
54
|
-
debug('using sqlite/react-native migration file')
|
|
55
|
-
const mig: CreateContacts1690925872693 = new CreateContacts1690925872693()
|
|
56
|
-
await mig.down(queryRunner)
|
|
57
|
-
debug('Migration statements executed')
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
default:
|
|
61
|
-
return Promise.reject(
|
|
62
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
+
import Debug from 'debug'
|
|
3
|
+
import { CreateContacts1690925872693 } from '../sqlite/1690925872693-CreateContacts'
|
|
4
|
+
import { CreateContacts1690925872592 } from '../postgres/1690925872592-CreateContacts'
|
|
5
|
+
|
|
6
|
+
const debug: Debug.Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
+
|
|
8
|
+
export class CreateContacts1690925872318 implements MigrationInterface {
|
|
9
|
+
name = 'CreateContacts1690925872318'
|
|
10
|
+
|
|
11
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
debug('migration: creating contacts tables')
|
|
13
|
+
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
14
|
+
|
|
15
|
+
switch (dbType) {
|
|
16
|
+
case 'postgres': {
|
|
17
|
+
debug('using postgres migration file')
|
|
18
|
+
const mig: CreateContacts1690925872592 = new CreateContacts1690925872592()
|
|
19
|
+
await mig.up(queryRunner)
|
|
20
|
+
debug('Migration statements executed')
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
case 'sqlite':
|
|
24
|
+
case 'expo':
|
|
25
|
+
case 'react-native': {
|
|
26
|
+
debug('using sqlite/react-native migration file')
|
|
27
|
+
const mig: CreateContacts1690925872693 = new CreateContacts1690925872693()
|
|
28
|
+
await mig.up(queryRunner)
|
|
29
|
+
debug('Migration statements executed')
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
default:
|
|
33
|
+
return Promise.reject(
|
|
34
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
40
|
+
debug('migration: reverting contacts tables')
|
|
41
|
+
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
42
|
+
|
|
43
|
+
switch (dbType) {
|
|
44
|
+
case 'postgres': {
|
|
45
|
+
debug('using postgres migration file')
|
|
46
|
+
const mig: CreateContacts1690925872592 = new CreateContacts1690925872592()
|
|
47
|
+
await mig.down(queryRunner)
|
|
48
|
+
debug('Migration statements executed')
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
case 'sqlite':
|
|
52
|
+
case 'expo':
|
|
53
|
+
case 'react-native': {
|
|
54
|
+
debug('using sqlite/react-native migration file')
|
|
55
|
+
const mig: CreateContacts1690925872693 = new CreateContacts1690925872693()
|
|
56
|
+
await mig.down(queryRunner)
|
|
57
|
+
debug('Migration statements executed')
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
default:
|
|
61
|
+
return Promise.reject(
|
|
62
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
import Debug from 'debug'
|
|
2
|
-
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
3
|
-
import { CreateStatusList1693866470001 } from '../postgres/1693866470001-CreateStatusList'
|
|
4
|
-
import { CreateStatusList1693866470002 } from '../sqlite/1693866470000-CreateStatusList'
|
|
5
|
-
|
|
6
|
-
const debug = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
-
|
|
8
|
-
export class CreateStatusList1693866470000 implements MigrationInterface {
|
|
9
|
-
name = 'CreateStatusList1693866470000'
|
|
10
|
-
|
|
11
|
-
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
-
debug('migration: creating issuance branding tables')
|
|
13
|
-
const dbType = queryRunner.connection.driver.options.type
|
|
14
|
-
if (dbType === 'postgres') {
|
|
15
|
-
debug('using postgres migration file')
|
|
16
|
-
const mig = new CreateStatusList1693866470001()
|
|
17
|
-
const up = await mig.up(queryRunner)
|
|
18
|
-
debug('Migration statements executed')
|
|
19
|
-
return up
|
|
20
|
-
} else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
21
|
-
debug('using sqlite/react-native migration file')
|
|
22
|
-
const mig = new CreateStatusList1693866470002()
|
|
23
|
-
const up = await mig.up(queryRunner)
|
|
24
|
-
debug('Migration statements executed')
|
|
25
|
-
return up
|
|
26
|
-
} else {
|
|
27
|
-
return Promise.reject(
|
|
28
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
29
|
-
)
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
34
|
-
debug('migration: reverting issuance branding tables')
|
|
35
|
-
const dbType = queryRunner.connection.driver.options.type
|
|
36
|
-
if (dbType === 'postgres') {
|
|
37
|
-
debug('using postgres migration file')
|
|
38
|
-
const mig = new CreateStatusList1693866470002()
|
|
39
|
-
const down = await mig.down(queryRunner)
|
|
40
|
-
debug('Migration statements executed')
|
|
41
|
-
return down
|
|
42
|
-
} else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
43
|
-
debug('using sqlite/react-native migration file')
|
|
44
|
-
const mig = new CreateStatusList1693866470002()
|
|
45
|
-
const down = await mig.down(queryRunner)
|
|
46
|
-
debug('Migration statements executed')
|
|
47
|
-
return down
|
|
48
|
-
} else {
|
|
49
|
-
return Promise.reject(
|
|
50
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
1
|
+
import Debug from 'debug'
|
|
2
|
+
import { MigrationInterface, QueryRunner } from 'typeorm'
|
|
3
|
+
import { CreateStatusList1693866470001 } from '../postgres/1693866470001-CreateStatusList'
|
|
4
|
+
import { CreateStatusList1693866470002 } from '../sqlite/1693866470000-CreateStatusList'
|
|
5
|
+
|
|
6
|
+
const debug = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
+
|
|
8
|
+
export class CreateStatusList1693866470000 implements MigrationInterface {
|
|
9
|
+
name = 'CreateStatusList1693866470000'
|
|
10
|
+
|
|
11
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
debug('migration: creating issuance branding tables')
|
|
13
|
+
const dbType = queryRunner.connection.driver.options.type
|
|
14
|
+
if (dbType === 'postgres') {
|
|
15
|
+
debug('using postgres migration file')
|
|
16
|
+
const mig = new CreateStatusList1693866470001()
|
|
17
|
+
const up = await mig.up(queryRunner)
|
|
18
|
+
debug('Migration statements executed')
|
|
19
|
+
return up
|
|
20
|
+
} else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
21
|
+
debug('using sqlite/react-native migration file')
|
|
22
|
+
const mig = new CreateStatusList1693866470002()
|
|
23
|
+
const up = await mig.up(queryRunner)
|
|
24
|
+
debug('Migration statements executed')
|
|
25
|
+
return up
|
|
26
|
+
} else {
|
|
27
|
+
return Promise.reject(
|
|
28
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
34
|
+
debug('migration: reverting issuance branding tables')
|
|
35
|
+
const dbType = queryRunner.connection.driver.options.type
|
|
36
|
+
if (dbType === 'postgres') {
|
|
37
|
+
debug('using postgres migration file')
|
|
38
|
+
const mig = new CreateStatusList1693866470002()
|
|
39
|
+
const down = await mig.down(queryRunner)
|
|
40
|
+
debug('Migration statements executed')
|
|
41
|
+
return down
|
|
42
|
+
} else if (dbType === 'sqlite' || dbType === 'react-native' || dbType === 'expo') {
|
|
43
|
+
debug('using sqlite/react-native migration file')
|
|
44
|
+
const mig = new CreateStatusList1693866470002()
|
|
45
|
+
const down = await mig.down(queryRunner)
|
|
46
|
+
debug('Migration statements executed')
|
|
47
|
+
return down
|
|
48
|
+
} else {
|
|
49
|
+
return Promise.reject(
|
|
50
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -1,66 +1,66 @@
|
|
|
1
|
-
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
-
import Debug, { Debugger } from 'debug'
|
|
3
|
-
import { CreateAuditEvents1701634819487 } from '../sqlite/1701634819487-CreateAuditEvents'
|
|
4
|
-
import { CreateAuditEvents1701634812183 } from '../postgres/1701634812183-CreateAuditEvents'
|
|
5
|
-
|
|
6
|
-
const debug: Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
-
|
|
8
|
-
export class CreateAuditEvents1701635835330 implements MigrationInterface {
|
|
9
|
-
name: string = 'CreateAuditEvents1701635835330'
|
|
10
|
-
|
|
11
|
-
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
-
debug('migration: creating audit events tables')
|
|
13
|
-
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
14
|
-
|
|
15
|
-
switch (dbType) {
|
|
16
|
-
case 'postgres': {
|
|
17
|
-
debug('using postgres migration file')
|
|
18
|
-
const mig: CreateAuditEvents1701634812183 = new CreateAuditEvents1701634812183()
|
|
19
|
-
await mig.up(queryRunner)
|
|
20
|
-
debug('Migration statements executed')
|
|
21
|
-
return
|
|
22
|
-
}
|
|
23
|
-
case 'sqlite':
|
|
24
|
-
case 'expo':
|
|
25
|
-
case 'react-native': {
|
|
26
|
-
debug('using sqlite/react-native migration file')
|
|
27
|
-
const mig: CreateAuditEvents1701634819487 = new CreateAuditEvents1701634819487()
|
|
28
|
-
await mig.up(queryRunner)
|
|
29
|
-
debug('Migration statements executed')
|
|
30
|
-
return
|
|
31
|
-
}
|
|
32
|
-
default:
|
|
33
|
-
return Promise.reject(
|
|
34
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
35
|
-
)
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
40
|
-
debug('migration: reverting audit events tables')
|
|
41
|
-
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
42
|
-
|
|
43
|
-
switch (dbType) {
|
|
44
|
-
case 'postgres': {
|
|
45
|
-
debug('using postgres migration file')
|
|
46
|
-
const mig: CreateAuditEvents1701634812183 = new CreateAuditEvents1701634812183()
|
|
47
|
-
await mig.down(queryRunner)
|
|
48
|
-
debug('Migration statements executed')
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
case 'sqlite':
|
|
52
|
-
case 'expo':
|
|
53
|
-
case 'react-native': {
|
|
54
|
-
debug('using sqlite/react-native migration file')
|
|
55
|
-
const mig: CreateAuditEvents1701634819487 = new CreateAuditEvents1701634819487()
|
|
56
|
-
await mig.down(queryRunner)
|
|
57
|
-
debug('Migration statements executed')
|
|
58
|
-
return
|
|
59
|
-
}
|
|
60
|
-
default:
|
|
61
|
-
return Promise.reject(
|
|
62
|
-
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
63
|
-
)
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
1
|
+
import { DatabaseType, MigrationInterface, QueryRunner } from 'typeorm'
|
|
2
|
+
import Debug, { Debugger } from 'debug'
|
|
3
|
+
import { CreateAuditEvents1701634819487 } from '../sqlite/1701634819487-CreateAuditEvents'
|
|
4
|
+
import { CreateAuditEvents1701634812183 } from '../postgres/1701634812183-CreateAuditEvents'
|
|
5
|
+
|
|
6
|
+
const debug: Debugger = Debug('sphereon:ssi-sdk:migrations')
|
|
7
|
+
|
|
8
|
+
export class CreateAuditEvents1701635835330 implements MigrationInterface {
|
|
9
|
+
name: string = 'CreateAuditEvents1701635835330'
|
|
10
|
+
|
|
11
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
12
|
+
debug('migration: creating audit events tables')
|
|
13
|
+
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
14
|
+
|
|
15
|
+
switch (dbType) {
|
|
16
|
+
case 'postgres': {
|
|
17
|
+
debug('using postgres migration file')
|
|
18
|
+
const mig: CreateAuditEvents1701634812183 = new CreateAuditEvents1701634812183()
|
|
19
|
+
await mig.up(queryRunner)
|
|
20
|
+
debug('Migration statements executed')
|
|
21
|
+
return
|
|
22
|
+
}
|
|
23
|
+
case 'sqlite':
|
|
24
|
+
case 'expo':
|
|
25
|
+
case 'react-native': {
|
|
26
|
+
debug('using sqlite/react-native migration file')
|
|
27
|
+
const mig: CreateAuditEvents1701634819487 = new CreateAuditEvents1701634819487()
|
|
28
|
+
await mig.up(queryRunner)
|
|
29
|
+
debug('Migration statements executed')
|
|
30
|
+
return
|
|
31
|
+
}
|
|
32
|
+
default:
|
|
33
|
+
return Promise.reject(
|
|
34
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
40
|
+
debug('migration: reverting audit events tables')
|
|
41
|
+
const dbType: DatabaseType = queryRunner.connection.driver.options.type
|
|
42
|
+
|
|
43
|
+
switch (dbType) {
|
|
44
|
+
case 'postgres': {
|
|
45
|
+
debug('using postgres migration file')
|
|
46
|
+
const mig: CreateAuditEvents1701634812183 = new CreateAuditEvents1701634812183()
|
|
47
|
+
await mig.down(queryRunner)
|
|
48
|
+
debug('Migration statements executed')
|
|
49
|
+
return
|
|
50
|
+
}
|
|
51
|
+
case 'sqlite':
|
|
52
|
+
case 'expo':
|
|
53
|
+
case 'react-native': {
|
|
54
|
+
debug('using sqlite/react-native migration file')
|
|
55
|
+
const mig: CreateAuditEvents1701634819487 = new CreateAuditEvents1701634819487()
|
|
56
|
+
await mig.down(queryRunner)
|
|
57
|
+
debug('Migration statements executed')
|
|
58
|
+
return
|
|
59
|
+
}
|
|
60
|
+
default:
|
|
61
|
+
return Promise.reject(
|
|
62
|
+
`Migrations are currently only supported for sqlite, react-native, expo and postgres. Was ${dbType}. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now`,
|
|
63
|
+
)
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|