@sphereon/ssi-sdk.data-store 0.11.1-next.106
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 -0
- package/README.md +72 -0
- package/dist/contact/AbstractContactStore.d.ts +14 -0
- package/dist/contact/AbstractContactStore.d.ts.map +1 -0
- package/dist/contact/AbstractContactStore.js +7 -0
- package/dist/contact/AbstractContactStore.js.map +1 -0
- package/dist/contact/ContactStore.d.ts +29 -0
- package/dist/contact/ContactStore.d.ts.map +1 -0
- package/dist/contact/ContactStore.js +281 -0
- package/dist/contact/ContactStore.js.map +1 -0
- package/dist/entities/contact/BaseConfigEntity.d.ts +5 -0
- package/dist/entities/contact/BaseConfigEntity.d.ts.map +1 -0
- package/dist/entities/contact/BaseConfigEntity.js +26 -0
- package/dist/entities/contact/BaseConfigEntity.js.map +1 -0
- package/dist/entities/contact/ConnectionEntity.d.ts +12 -0
- package/dist/entities/contact/ConnectionEntity.d.ts.map +1 -0
- package/dist/entities/contact/ConnectionEntity.js +66 -0
- package/dist/entities/contact/ConnectionEntity.js.map +1 -0
- package/dist/entities/contact/ContactEntity.d.ts +16 -0
- package/dist/entities/contact/ContactEntity.d.ts.map +1 -0
- package/dist/entities/contact/ContactEntity.js +105 -0
- package/dist/entities/contact/ContactEntity.js.map +1 -0
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +12 -0
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts.map +1 -0
- package/dist/entities/contact/CorrelationIdentifierEntity.js +75 -0
- package/dist/entities/contact/CorrelationIdentifierEntity.js.map +1 -0
- package/dist/entities/contact/DidAuthConfigEntity.d.ts +11 -0
- package/dist/entities/contact/DidAuthConfigEntity.d.ts.map +1 -0
- package/dist/entities/contact/DidAuthConfigEntity.js +49 -0
- package/dist/entities/contact/DidAuthConfigEntity.js.map +1 -0
- package/dist/entities/contact/IdentityEntity.d.ts +22 -0
- package/dist/entities/contact/IdentityEntity.d.ts.map +1 -0
- package/dist/entities/contact/IdentityEntity.js +134 -0
- package/dist/entities/contact/IdentityEntity.js.map +1 -0
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +12 -0
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts.map +1 -0
- package/dist/entities/contact/IdentityMetadataItemEntity.js +72 -0
- package/dist/entities/contact/IdentityMetadataItemEntity.js.map +1 -0
- package/dist/entities/contact/OpenIdConfigEntity.d.ts +15 -0
- package/dist/entities/contact/OpenIdConfigEntity.d.ts.map +1 -0
- package/dist/entities/contact/OpenIdConfigEntity.js +70 -0
- package/dist/entities/contact/OpenIdConfigEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts +11 -0
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +74 -0
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts +18 -0
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +120 -0
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts +15 -0
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +102 -0
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts +9 -0
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +49 -0
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts +14 -0
- package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js +92 -0
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts +9 -0
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +39 -0
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts +14 -0
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +95 -0
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts +9 -0
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +49 -0
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js.map +1 -0
- package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts +9 -0
- package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts.map +1 -0
- package/dist/entities/issuanceBranding/TextAttributesEntity.js +62 -0
- package/dist/entities/issuanceBranding/TextAttributesEntity.js.map +1 -0
- package/dist/entities/validators/index.d.ts +7 -0
- package/dist/entities/validators/index.d.ts.map +1 -0
- package/dist/entities/validators/index.js +27 -0
- package/dist/entities/validators/index.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +99 -0
- package/dist/index.js.map +1 -0
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts +20 -0
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts.map +1 -0
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +7 -0
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js.map +1 -0
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts +31 -0
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts.map +1 -0
- package/dist/issuanceBranding/IssuanceBrandingStore.js +375 -0
- package/dist/issuanceBranding/IssuanceBrandingStore.js.map +1 -0
- package/dist/migrations/generic/1-CreateContacts.d.ts +7 -0
- package/dist/migrations/generic/1-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/generic/1-CreateContacts.js +72 -0
- package/dist/migrations/generic/1-CreateContacts.js.map +1 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts +7 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +1 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.js +72 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +1 -0
- package/dist/migrations/generic/index.d.ts +10 -0
- package/dist/migrations/generic/index.d.ts.map +1 -0
- package/dist/migrations/generic/index.js +14 -0
- package/dist/migrations/generic/index.js.map +1 -0
- package/dist/migrations/index.d.ts +2 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +6 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/internal-migrations-ormconfig.d.ts +6 -0
- package/dist/migrations/internal-migrations-ormconfig.d.ts.map +1 -0
- package/dist/migrations/internal-migrations-ormconfig.js +29 -0
- package/dist/migrations/internal-migrations-ormconfig.js.map +1 -0
- package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts +7 -0
- package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/postgres/1659463079428-CreateContacts.js +55 -0
- package/dist/migrations/postgres/1659463079428-CreateContacts.js.map +1 -0
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts +7 -0
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts.map +1 -0
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +67 -0
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js.map +1 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts +7 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js +79 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js.map +1 -0
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts +7 -0
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts.map +1 -0
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +89 -0
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js.map +1 -0
- package/dist/types/contact/IAbstractContactStore.d.ts +41 -0
- package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -0
- package/dist/types/contact/IAbstractContactStore.js +3 -0
- package/dist/types/contact/IAbstractContactStore.js.map +1 -0
- package/dist/types/contact/contact.d.ts +91 -0
- package/dist/types/contact/contact.d.ts.map +1 -0
- package/dist/types/contact/contact.js +21 -0
- package/dist/types/contact/contact.js.map +1 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +21 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts +59 -0
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts.map +1 -0
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +3 -0
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js.map +1 -0
- package/dist/types/issuanceBranding/issuanceBranding.d.ts +115 -0
- package/dist/types/issuanceBranding/issuanceBranding.d.ts.map +1 -0
- package/dist/types/issuanceBranding/issuanceBranding.js +3 -0
- package/dist/types/issuanceBranding/issuanceBranding.js.map +1 -0
- package/package.json +45 -0
- package/src/__tests__/contact.entities.test.ts +911 -0
- package/src/__tests__/contact.store.test.ts +743 -0
- package/src/__tests__/issuanceBranding.entities.test.ts +844 -0
- package/src/__tests__/issuanceBranding.store.test.ts +1884 -0
- package/src/contact/AbstractContactStore.ts +27 -0
- package/src/contact/ContactStore.ts +371 -0
- package/src/entities/contact/BaseConfigEntity.ts +8 -0
- package/src/entities/contact/ConnectionEntity.ts +48 -0
- package/src/entities/contact/ContactEntity.ts +74 -0
- package/src/entities/contact/CorrelationIdentifierEntity.ts +41 -0
- package/src/entities/contact/DidAuthConfigEntity.ts +31 -0
- package/src/entities/contact/IdentityEntity.ts +104 -0
- package/src/entities/contact/IdentityMetadataItemEntity.ts +39 -0
- package/src/entities/contact/OpenIdConfigEntity.ts +48 -0
- package/src/entities/issuanceBranding/BackgroundAttributesEntity.ts +42 -0
- package/src/entities/issuanceBranding/BaseLocaleBrandingEntity.ts +86 -0
- package/src/entities/issuanceBranding/CredentialBrandingEntity.ts +78 -0
- package/src/entities/issuanceBranding/CredentialLocaleBrandingEntity.ts +33 -0
- package/src/entities/issuanceBranding/ImageAttributesEntity.ts +57 -0
- package/src/entities/issuanceBranding/ImageDimensionsEntity.ts +22 -0
- package/src/entities/issuanceBranding/IssuerBrandingEntity.ts +72 -0
- package/src/entities/issuanceBranding/IssuerLocaleBrandingEntity.ts +33 -0
- package/src/entities/issuanceBranding/TextAttributesEntity.ts +31 -0
- package/src/entities/validators/index.ts +16 -0
- package/src/index.ts +82 -0
- package/src/issuanceBranding/AbstractIssuanceBrandingStore.ts +41 -0
- package/src/issuanceBranding/IssuanceBrandingStore.ts +544 -0
- package/src/migrations/generic/1-CreateContacts.ts +54 -0
- package/src/migrations/generic/1-CreateIssuanceBranding.ts +54 -0
- package/src/migrations/generic/index.ts +11 -0
- package/src/migrations/index.ts +1 -0
- package/src/migrations/internal-migrations-ormconfig.ts +28 -0
- package/src/migrations/postgres/1659463079428-CreateContacts.ts +61 -0
- package/src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts +83 -0
- package/src/migrations/sqlite/1659463069549-CreateContacts.ts +110 -0
- package/src/migrations/sqlite/1685628973231-CreateIssuanceBranding.ts +119 -0
- package/src/types/contact/IAbstractContactStore.ts +52 -0
- package/src/types/contact/contact.ts +101 -0
- package/src/types/index.ts +4 -0
- package/src/types/issuanceBranding/IAbstractIssuanceBrandingStore.ts +85 -0
- package/src/types/issuanceBranding/issuanceBranding.ts +120 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CreateContacts1659463079429 = void 0;
|
|
16
|
+
const debug_1 = __importDefault(require("debug"));
|
|
17
|
+
const _1659463079428_CreateContacts_1 = require("../postgres/1659463079428-CreateContacts");
|
|
18
|
+
const _1659463069549_CreateContacts_1 = require("../sqlite/1659463069549-CreateContacts");
|
|
19
|
+
const debug = (0, debug_1.default)('sphereon:ssi-sdk:migrations');
|
|
20
|
+
class CreateContacts1659463079429 {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.name = 'CreateContacts1659463079429';
|
|
23
|
+
}
|
|
24
|
+
up(queryRunner) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
debug('migration: creating contacts tables');
|
|
27
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
28
|
+
if (dbType === 'postgres') {
|
|
29
|
+
debug('using postgres migration file');
|
|
30
|
+
const mig = new _1659463079428_CreateContacts_1.CreateContacts1659463079428();
|
|
31
|
+
const up = yield mig.up(queryRunner);
|
|
32
|
+
debug('Migration statements executed');
|
|
33
|
+
return up;
|
|
34
|
+
}
|
|
35
|
+
else if (dbType === 'sqlite' || 'react-native') {
|
|
36
|
+
debug('using sqlite/react-native migration file');
|
|
37
|
+
const mig = new _1659463069549_CreateContacts_1.CreateContacts1659463069549();
|
|
38
|
+
const up = yield mig.up(queryRunner);
|
|
39
|
+
debug('Migration statements executed');
|
|
40
|
+
return up;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return Promise.reject("Migrations are currently only supported for sqlite, react-native and postgres. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
down(queryRunner) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
debug('migration: reverting contacts tables');
|
|
50
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
51
|
+
if (dbType === 'postgres') {
|
|
52
|
+
debug('using postgres migration file');
|
|
53
|
+
const mig = new _1659463079428_CreateContacts_1.CreateContacts1659463079428();
|
|
54
|
+
const down = yield mig.down(queryRunner);
|
|
55
|
+
debug('Migration statements executed');
|
|
56
|
+
return down;
|
|
57
|
+
}
|
|
58
|
+
else if (dbType === 'sqlite' || 'react-native') {
|
|
59
|
+
debug('using sqlite/react-native migration file');
|
|
60
|
+
const mig = new _1659463069549_CreateContacts_1.CreateContacts1659463069549();
|
|
61
|
+
const down = yield mig.down(queryRunner);
|
|
62
|
+
debug('Migration statements executed');
|
|
63
|
+
return down;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
return Promise.reject("Migrations are currently only supported for sqlite, react-native and postgres. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now");
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.CreateContacts1659463079429 = CreateContacts1659463079429;
|
|
72
|
+
//# sourceMappingURL=1-CreateContacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/generic/1-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,4FAAsF;AACtF,0FAAoF;AAEpF,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElD,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IA6CtC,CAAC;IA3Cc,EAAE,CAAC,WAAwB;;YACtC,KAAK,CAAC,qCAAqC,CAAC,CAAA;YAC5C,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;YACzD,IAAI,MAAM,KAAK,UAAU,EAAE;gBACzB,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,MAAM,GAAG,GAAG,IAAI,2DAA2B,EAAE,CAAA;gBAC7C,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;gBACpC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,EAAE,CAAA;aACV;iBAAM,IAAI,MAAM,KAAK,QAAQ,IAAI,cAAc,EAAE;gBAChD,KAAK,CAAC,0CAA0C,CAAC,CAAA;gBACjD,MAAM,GAAG,GAAG,IAAI,2DAA2B,EAAE,CAAA;gBAC7C,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;gBACpC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,EAAE,CAAA;aACV;iBAAM;gBACL,OAAO,OAAO,CAAC,MAAM,CACnB,4LAA4L,CAC7L,CAAA;aACF;QACH,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,KAAK,CAAC,sCAAsC,CAAC,CAAA;YAC7C,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;YACzD,IAAI,MAAM,KAAK,UAAU,EAAE;gBACzB,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,MAAM,GAAG,GAAG,IAAI,2DAA2B,EAAE,CAAA;gBAC7C,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBACxC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,IAAI,CAAA;aACZ;iBAAM,IAAI,MAAM,KAAK,QAAQ,IAAI,cAAc,EAAE;gBAChD,KAAK,CAAC,0CAA0C,CAAC,CAAA;gBACjD,MAAM,GAAG,GAAG,IAAI,2DAA2B,EAAE,CAAA;gBAC7C,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;gBACxC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,IAAI,CAAA;aACZ;iBAAM;gBACL,OAAO,OAAO,CAAC,MAAM,CACnB,4LAA4L,CAC7L,CAAA;aACF;QACH,CAAC;KAAA;CACF;AA9CD,kEA8CC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateIssuanceBranding1659463079429 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1-CreateIssuanceBranding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1-CreateIssuanceBranding.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/1-CreateIssuanceBranding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAOzD,qBAAa,mCAAoC,YAAW,kBAAkB;IAC5E,IAAI,SAAwC;IAE/B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAqB3D"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.CreateIssuanceBranding1659463079429 = void 0;
|
|
16
|
+
const debug_1 = __importDefault(require("debug"));
|
|
17
|
+
const _1685628974232_CreateIssuanceBranding_1 = require("../postgres/1685628974232-CreateIssuanceBranding");
|
|
18
|
+
const _1685628973231_CreateIssuanceBranding_1 = require("../sqlite/1685628973231-CreateIssuanceBranding");
|
|
19
|
+
const debug = (0, debug_1.default)('sphereon:ssi-sdk:migrations');
|
|
20
|
+
class CreateIssuanceBranding1659463079429 {
|
|
21
|
+
constructor() {
|
|
22
|
+
this.name = 'CreateIssuanceBranding1659463079429';
|
|
23
|
+
}
|
|
24
|
+
up(queryRunner) {
|
|
25
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
+
debug('migration: creating issuance branding tables');
|
|
27
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
28
|
+
if (dbType === 'postgres') {
|
|
29
|
+
debug('using postgres migration file');
|
|
30
|
+
const mig = new _1685628974232_CreateIssuanceBranding_1.CreateIssuanceBranding1685628974232();
|
|
31
|
+
const up = yield mig.up(queryRunner);
|
|
32
|
+
debug('Migration statements executed');
|
|
33
|
+
return up;
|
|
34
|
+
}
|
|
35
|
+
else if (dbType === 'sqlite' || 'react-native') {
|
|
36
|
+
debug('using sqlite/react-native migration file');
|
|
37
|
+
const mig = new _1685628973231_CreateIssuanceBranding_1.CreateIssuanceBranding1685628973231();
|
|
38
|
+
const up = yield mig.up(queryRunner);
|
|
39
|
+
debug('Migration statements executed');
|
|
40
|
+
return up;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return Promise.reject("Migrations are currently only supported for sqlite, react-native and postgres. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now");
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
down(queryRunner) {
|
|
48
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
49
|
+
debug('migration: reverting issuance branding tables');
|
|
50
|
+
const dbType = queryRunner.connection.driver.options.type;
|
|
51
|
+
if (dbType === 'postgres') {
|
|
52
|
+
debug('using postgres migration file');
|
|
53
|
+
const mig = new _1685628974232_CreateIssuanceBranding_1.CreateIssuanceBranding1685628974232();
|
|
54
|
+
const down = yield mig.down(queryRunner);
|
|
55
|
+
debug('Migration statements executed');
|
|
56
|
+
return down;
|
|
57
|
+
}
|
|
58
|
+
else if (dbType === 'sqlite' || 'react-native') {
|
|
59
|
+
debug('using sqlite/react-native migration file');
|
|
60
|
+
const mig = new _1685628973231_CreateIssuanceBranding_1.CreateIssuanceBranding1685628973231();
|
|
61
|
+
const down = yield mig.down(queryRunner);
|
|
62
|
+
debug('Migration statements executed');
|
|
63
|
+
return down;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
return Promise.reject("Migrations are currently only supported for sqlite, react-native and postgres. Please run your database without migrations and with 'migrationsRun: false' and 'synchronize: true' for now");
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.CreateIssuanceBranding1659463079429 = CreateIssuanceBranding1659463079429;
|
|
72
|
+
//# sourceMappingURL=1-CreateIssuanceBranding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1-CreateIssuanceBranding.js","sourceRoot":"","sources":["../../../src/migrations/generic/1-CreateIssuanceBranding.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAAyB;AACzB,4GAAsG;AACtG,0GAAoG;AAEpG,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,6BAA6B,CAAC,CAAA;AAElD,MAAa,mCAAmC;IAAhD;QACE,SAAI,GAAG,qCAAqC,CAAA;IA6C9C,CAAC;IA3Cc,EAAE,CAAC,WAAwB;;YACtC,KAAK,CAAC,8CAA8C,CAAC,CAAA;YACrD,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAA;YACzD,IAAI,MAAM,KAAK,UAAU,EAAE;gBACzB,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,MAAM,GAAG,GAAG,IAAI,2EAAmC,EAAE,CAAA;gBACrD,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,EAAE,CAAC,WAAW,CAAC,CAAA;gBACpC,KAAK,CAAC,+BAA+B,CAAC,CAAA;gBACtC,OAAO,EAAE,CAAA;aACV;iBAAM,IAAI,MAAM,KAAK,QAAQ,IAAI,cAA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
|
|
3
|
+
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
4
|
+
*
|
|
5
|
+
* These ensure the correct creation of tables and the proper migrations of data when tables change between versions.
|
|
6
|
+
*
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export declare const DataStoreMigrations: (typeof CreateContacts1659463079429)[];
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAGhE;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,wCAAqE,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataStoreMigrations = void 0;
|
|
4
|
+
const _1_CreateContacts_1 = require("./1-CreateContacts");
|
|
5
|
+
const _1_CreateIssuanceBranding_1 = require("./1-CreateIssuanceBranding");
|
|
6
|
+
/**
|
|
7
|
+
* The migrations array that SHOULD be used when initializing a TypeORM database connection.
|
|
8
|
+
*
|
|
9
|
+
* These ensure the correct creation of tables and the proper migrations of data when tables change between versions.
|
|
10
|
+
*
|
|
11
|
+
* @public
|
|
12
|
+
*/
|
|
13
|
+
exports.DataStoreMigrations = [_1_CreateContacts_1.CreateContacts1659463079429, _1_CreateIssuanceBranding_1.CreateIssuanceBranding1659463079429];
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/migrations/generic/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgE;AAChE,0EAAgF;AAEhF;;;;;;GAMG;AACU,QAAA,mBAAmB,GAAG,CAAC,+CAA2B,EAAE,+DAAmC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DataStoreMigrations = void 0;
|
|
4
|
+
var generic_1 = require("./generic");
|
|
5
|
+
Object.defineProperty(exports, "DataStoreMigrations", { enumerable: true, get: function () { return generic_1.DataStoreMigrations; } });
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":";;;AAAA,qCAA+C;AAAtC,8GAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-migrations-ormconfig.d.ts","sourceRoot":"","sources":["../../src/migrations/internal-migrations-ormconfig.ts"],"names":[],"mappings":"AAGA;;GAEG;;AACH,wBAqBwB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const index_1 = require("../index");
|
|
4
|
+
/**
|
|
5
|
+
* Do Not use these connections in production!. They are only here to create/test migration files!
|
|
6
|
+
*/
|
|
7
|
+
exports.default = [
|
|
8
|
+
{
|
|
9
|
+
type: 'sqlite',
|
|
10
|
+
name: 'migration-sqlite',
|
|
11
|
+
database: 'migration.sqlite',
|
|
12
|
+
migrationsRun: false,
|
|
13
|
+
synchronize: false,
|
|
14
|
+
logging: ['error', 'info', 'warn', 'log'],
|
|
15
|
+
entities: [...index_1.DataStoreContactEntities],
|
|
16
|
+
migrations: [...index_1.DataStoreMigrations],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
type: 'postgres',
|
|
20
|
+
name: 'migration-postgres',
|
|
21
|
+
database: 'migration-postgres',
|
|
22
|
+
migrationsRun: false,
|
|
23
|
+
synchronize: false,
|
|
24
|
+
logging: ['error', 'info', 'warn', 'log'],
|
|
25
|
+
entities: [...index_1.DataStoreContactEntities],
|
|
26
|
+
migrations: [...index_1.DataStoreMigrations],
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
//# sourceMappingURL=internal-migrations-ormconfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-migrations-ormconfig.js","sourceRoot":"","sources":["../../src/migrations/internal-migrations-ormconfig.ts"],"names":[],"mappings":";;AACA,oCAAwE;AAExE;;GAEG;AACH,kBAAe;IACb;QACE,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,kBAAkB;QAC5B,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;QACzC,QAAQ,EAAE,CAAC,GAAG,gCAAwB,CAAC;QACvC,UAAU,EAAE,CAAC,GAAG,2BAAmB,CAAC;KACrC;IACD;QACE,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,oBAAoB;QAC1B,QAAQ,EAAE,oBAAoB;QAC9B,aAAa,EAAE,KAAK;QACpB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;QACzC,QAAQ,EAAE,CAAC,GAAG,gCAAwB,CAAC;QACvC,UAAU,EAAE,CAAC,GAAG,2BAAmB,CAAC;KACrC;CACqB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateContacts1659463079428 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1659463079428-CreateContacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1659463079428-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/1659463079428-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAuC3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAgB3D"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateContacts1659463079428 = void 0;
|
|
13
|
+
class CreateContacts1659463079428 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'CreateContacts1659463079428';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE "BaseConfigEntity" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "client_id" character varying(255), "client_secret" character varying(255), "scopes" text, "issuer" character varying(255), "redirect_url" text, "dangerously_allow_insecure_http_requests" boolean, "client_auth_method" text, "identifier" character varying(255), "session_id" character varying(255), "type" character varying NOT NULL, "connectionId" uuid, CONSTRAINT "REL_BaseConfig_connectionId" UNIQUE ("connectionId"), CONSTRAINT "PK_BaseConfigEntity_id" PRIMARY KEY ("id"))`);
|
|
20
|
+
yield queryRunner.query(`CREATE INDEX "IDX_BaseConfigEntity_type" ON "BaseConfigEntity" ("type")`);
|
|
21
|
+
yield queryRunner.query(`CREATE TYPE "public"."CorrelationIdentifier_type_enum" AS ENUM('did', 'url')`);
|
|
22
|
+
yield queryRunner.query(`CREATE TABLE "CorrelationIdentifier" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "type" "public"."CorrelationIdentifier_type_enum" NOT NULL, "correlation_id" text NOT NULL, "identityId" uuid, CONSTRAINT "UQ_Correlation_id" UNIQUE ("correlation_id"), CONSTRAINT "REL_CorrelationIdentifier_identityId" UNIQUE ("identityId"), CONSTRAINT "PK_CorrelationIdentifier_id" PRIMARY KEY ("id"))`);
|
|
23
|
+
yield queryRunner.query(`CREATE TABLE "Contact" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "name" character varying(255) NOT NULL, "alias" character varying(255) NOT NULL, "uri" character varying(255) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_Name" UNIQUE ("name"), CONSTRAINT "UQ_Alias" UNIQUE ("alias"), CONSTRAINT "PK_Contact_id" PRIMARY KEY ("id"))`);
|
|
24
|
+
yield queryRunner.query(`CREATE TABLE "IdentityMetadata" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "label" character varying(255) NOT NULL, "value" character varying(255) NOT NULL, "identityId" uuid, CONSTRAINT "PK_IdentityMetadata_id" PRIMARY KEY ("id"))`);
|
|
25
|
+
yield queryRunner.query(`CREATE TABLE "Identity" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "alias" character varying(255) NOT NULL, "roles" text, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), "contactId" uuid, CONSTRAINT "UQ_Alias" UNIQUE ("alias"), CONSTRAINT "PK_Identity_id" PRIMARY KEY ("id"))`);
|
|
26
|
+
yield queryRunner.query(`CREATE TYPE "public"."Connection_type_enum" AS ENUM('OIDC', 'SIOPv2', 'SIOPv2+OpenID4VP')`);
|
|
27
|
+
yield queryRunner.query(`CREATE TABLE "Connection" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "type" "public"."Connection_type_enum" NOT NULL, "identityId" uuid, CONSTRAINT "REL_Connection_identityId" UNIQUE ("identityId"), CONSTRAINT "PK_Connection_id" PRIMARY KEY ("id"))`);
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE "BaseConfigEntity" ADD CONSTRAINT "FK_BaseConfig_connectionId" FOREIGN KEY ("connectionId") REFERENCES "Connection"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE "CorrelationIdentifier" ADD CONSTRAINT "FK_CorrelationIdentifier_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE "IdentityMetadata" ADD CONSTRAINT "FK_IdentityMetadata_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
31
|
+
yield queryRunner.query(`ALTER TABLE "Identity" ADD CONSTRAINT "FK_Identity_contactId" FOREIGN KEY ("contactId") REFERENCES "Contact"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
32
|
+
yield queryRunner.query(`ALTER TABLE "Connection" ADD CONSTRAINT "FK_Connection_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
down(queryRunner) {
|
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
yield queryRunner.query(`ALTER TABLE "Connection" DROP CONSTRAINT "FK_Connection_identityId"`);
|
|
38
|
+
yield queryRunner.query(`ALTER TABLE "Identity" DROP CONSTRAINT "FK_Identity_contactId"`);
|
|
39
|
+
yield queryRunner.query(`ALTER TABLE "IdentityMetadata" DROP CONSTRAINT "FK_IdentityMetadata_identityId"`);
|
|
40
|
+
yield queryRunner.query(`ALTER TABLE "CorrelationIdentifier" DROP CONSTRAINT "FK_CorrelationIdentifier_identityId"`);
|
|
41
|
+
yield queryRunner.query(`ALTER TABLE "BaseConfigEntity" DROP CONSTRAINT "FK_BaseConfig_connectionId"`);
|
|
42
|
+
yield queryRunner.query(`DROP TABLE "Connection"`);
|
|
43
|
+
yield queryRunner.query(`DROP TYPE "public"."Connection_type_enum"`);
|
|
44
|
+
yield queryRunner.query(`DROP TABLE "Identity"`);
|
|
45
|
+
yield queryRunner.query(`DROP TABLE "IdentityMetadata"`);
|
|
46
|
+
yield queryRunner.query(`DROP TABLE "Contact"`);
|
|
47
|
+
yield queryRunner.query(`DROP TABLE "CorrelationIdentifier"`);
|
|
48
|
+
yield queryRunner.query(`DROP TYPE "public"."CorrelationIdentifier_type_enum"`);
|
|
49
|
+
yield queryRunner.query(`DROP INDEX "public"."IDX_BaseConfigEntity_type"`);
|
|
50
|
+
yield queryRunner.query(`DROP TABLE "BaseConfigEntity"`);
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.CreateContacts1659463079428 = CreateContacts1659463079428;
|
|
55
|
+
//# sourceMappingURL=1659463079428-CreateContacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1659463079428-CreateContacts.js","sourceRoot":"","sources":["../../../src/migr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W,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAA;YACtG,MAAM,WAAW,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAA;YAClD,MAAM,WAAW,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAA;YACpE,MAAM,WAAW,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAA;YAChD,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;YACxD,MAAM,WAAW,CAAC,KAAK,CAAC,sBAAsB,CAAC,CAAA;YAC/C,MAAM,WAAW,CAAC,KAAK,CAAC,oCAAoC,CAAC,CAAA;YAC7D,MAAM,WAAW,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAA;YAC/E,MAAM,WAAW,CAAC,KAAK,CAAC,iDAAiD,CAAC,CAAA;YAC1E,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;QAC1D,CAAC;KAAA;CACF;AA1DD,kEA0DC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateIssuanceBranding1685628974232 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1685628974232-CreateIssuanceBranding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1685628974232-CreateIssuanceBranding.d.ts","sourceRoot":"","sources":["../../../src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,mCAAoC,YAAW,kBAAkB;IAC5E,IAAI,SAAwC;IAE/B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAuD3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAsB3D"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateIssuanceBranding1685628974232 = void 0;
|
|
13
|
+
class CreateIssuanceBranding1685628974232 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'CreateIssuanceBranding1685628974232';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE "ImageDimensions" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "width" integer NOT NULL, "height" integer NOT NULL, CONSTRAINT "PK_ImageDimensions_id" PRIMARY KEY ("id"))`);
|
|
20
|
+
yield queryRunner.query(`CREATE TABLE "ImageAttributes" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "uri" character varying(255), "dataUri" character varying(255), "mediaType" character varying(255), "alt" character varying(255), "dimensionsId" uuid, CONSTRAINT "UQ_dimensionsId" UNIQUE ("dimensionsId"), CONSTRAINT "PK_ImageAttributes_id" PRIMARY KEY ("id"))`);
|
|
21
|
+
yield queryRunner.query(`CREATE TABLE "BackgroundAttributes" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "color" character varying(255), "imageId" uuid, CONSTRAINT "UQ_imageId" UNIQUE ("imageId"), CONSTRAINT "PK_BackgroundAttributes_id" PRIMARY KEY ("id"))`);
|
|
22
|
+
yield queryRunner.query(`CREATE TABLE "TextAttributes" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "color" character varying(255), CONSTRAINT "PK_TextAttributes_id" PRIMARY KEY ("id"))`);
|
|
23
|
+
yield queryRunner.query(`CREATE TABLE "BaseLocaleBranding" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "alias" character varying(255), "locale" character varying(255) NOT NULL, "description" character varying(255), "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), "credentialBrandingId" uuid, "issuerBrandingId" uuid, "type" character varying NOT NULL, "logoId" uuid, "backgroundId" uuid, "textId" uuid, CONSTRAINT "UQ_logoId" UNIQUE ("logoId"), CONSTRAINT "UQ_backgroundId" UNIQUE ("backgroundId"), CONSTRAINT "UQ_textId" UNIQUE ("textId"), CONSTRAINT "PK_BaseLocaleBranding_id" PRIMARY KEY ("id"))`);
|
|
24
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX "IDX_CredentialLocaleBrandingEntity_credentialBranding_locale" ON "BaseLocaleBranding" ("credentialBrandingId", "locale")`);
|
|
25
|
+
yield queryRunner.query(`CREATE UNIQUE INDEX "IDX_IssuerLocaleBrandingEntity_issuerBranding_locale" ON "BaseLocaleBranding" ("issuerBrandingId", "locale")`);
|
|
26
|
+
yield queryRunner.query(`CREATE INDEX "IDX_BaseLocaleBranding_type" ON "BaseLocaleBranding" ("type")`);
|
|
27
|
+
yield queryRunner.query(`CREATE TABLE "CredentialBranding" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "vcHash" character varying(255) NOT NULL, "issuerCorrelationId" character varying(255) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_vcHash" UNIQUE ("vcHash"), CONSTRAINT "PK_CredentialBranding_id" PRIMARY KEY ("id"))`);
|
|
28
|
+
yield queryRunner.query(`CREATE INDEX "IDX_CredentialBrandingEntity_issuerCorrelationId" ON "CredentialBranding" ("issuerCorrelationId")`);
|
|
29
|
+
yield queryRunner.query(`CREATE INDEX "IDX_CredentialBrandingEntity_vcHash" ON "CredentialBranding" ("vcHash")`);
|
|
30
|
+
yield queryRunner.query(`CREATE TABLE "IssuerBranding" ("id" uuid NOT NULL DEFAULT uuid_generate_v4(), "issuerCorrelationId" character varying(255) NOT NULL, "created_at" TIMESTAMP NOT NULL DEFAULT now(), "last_updated_at" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_issuerCorrelationId" UNIQUE ("issuerCorrelationId"), CONSTRAINT "PK_IssuerBranding_id" PRIMARY KEY ("id"))`);
|
|
31
|
+
yield queryRunner.query(`CREATE INDEX "IDX_IssuerBrandingEntity_issuerCorrelationId" ON "IssuerBranding" ("issuerCorrelationId")`);
|
|
32
|
+
yield queryRunner.query(`ALTER TABLE "ImageAttributes" ADD CONSTRAINT "FK_ImageAttributes_dimensionsId" FOREIGN KEY ("dimensionsId") REFERENCES "ImageDimensions"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
33
|
+
yield queryRunner.query(`ALTER TABLE "BackgroundAttributes" ADD CONSTRAINT "FK_BackgroundAttributes_imageId" FOREIGN KEY ("imageId") REFERENCES "ImageAttributes"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
34
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD CONSTRAINT "FK_BaseLocaleBranding_logoId" FOREIGN KEY ("logoId") REFERENCES "ImageAttributes"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
35
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD CONSTRAINT "FK_BaseLocaleBranding_backgroundId" FOREIGN KEY ("backgroundId") REFERENCES "BackgroundAttributes"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
36
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD CONSTRAINT "FK_BaseLocaleBranding_textId" FOREIGN KEY ("textId") REFERENCES "TextAttributes"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
37
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD CONSTRAINT "FK_BaseLocaleBranding_credentialBrandingId" FOREIGN KEY ("credentialBrandingId") REFERENCES "CredentialBranding"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
38
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" ADD CONSTRAINT "FK_BaseLocaleBranding_issuerBrandingId" FOREIGN KEY ("issuerBrandingId") REFERENCES "IssuerBranding"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
down(queryRunner) {
|
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP CONSTRAINT "FK_BaseLocaleBranding_issuerBrandingId"`);
|
|
44
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP CONSTRAINT "FK_BaseLocaleBranding_credentialBrandingId"`);
|
|
45
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP CONSTRAINT "FK_BaseLocaleBranding_textId"`);
|
|
46
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP CONSTRAINT "FK_BaseLocaleBranding_backgroundId"`);
|
|
47
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP CONSTRAINT "FK_BaseLocaleBranding_logoId"`);
|
|
48
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP CONSTRAINT "FK_BackgroundAttributes_imageId"`);
|
|
49
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP CONSTRAINT "FK_ImageAttributes_dimensionsId"`);
|
|
50
|
+
yield queryRunner.query(`ALTER TABLE "IssuerBranding" DROP INDEX "IDX_IssuerBrandingEntity_issuerCorrelationId"`);
|
|
51
|
+
yield queryRunner.query(`DROP TABLE "IssuerBranding"`);
|
|
52
|
+
yield queryRunner.query(`ALTER TABLE "CredentialBranding" DROP INDEX "IDX_CredentialBrandingEntity_vcHash"`);
|
|
53
|
+
yield queryRunner.query(`ALTER TABLE "CredentialBranding" DROP INDEX "IDX_CredentialBrandingEntity_issuerCorrelationId"`);
|
|
54
|
+
yield queryRunner.query(`DROP TABLE "CredentialBranding"`);
|
|
55
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP INDEX "IDX_BaseLocaleBranding_type"`);
|
|
56
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP INDEX "IDX_IssuerLocaleBrandingEntity_issuerBranding_locale"`);
|
|
57
|
+
yield queryRunner.query(`ALTER TABLE "BaseLocaleBranding" DROP INDEX "IDX_CredentialLocaleBrandingEntity_credentialBranding_locale"`);
|
|
58
|
+
yield queryRunner.query(`DROP TABLE "BaseLocaleBranding"`);
|
|
59
|
+
yield queryRunner.query(`DROP TABLE "TextAttributes"`);
|
|
60
|
+
yield queryRunner.query(`DROP TABLE "BackgroundAttributes"`);
|
|
61
|
+
yield queryRunner.query(`DROP TABLE "ImageAttributes"`);
|
|
62
|
+
yield queryRunner.query(`DROP TABLE "ImageDimensions"`);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
exports.CreateIssuanceBranding1685628974232 = CreateIssuanceBranding1685628974232;
|
|
67
|
+
//# sourceMappingURL=1685628974232-CreateIssuanceBranding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1685628974232-CreateIssuanceBranding.js","sourceRoot":"","sources":["../../../src/migrations/postgres/1685628974232-CreateIssuanceBranding.ts"],"names":[],"mappings":";;;;;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@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateContacts1659463069549 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1659463069549-CreateContacts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1659463069549-CreateContacts.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/1659463069549-CreateContacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,2BAA4B,YAAW,kBAAkB;IACpE,IAAI,SAAgC;IAEvB,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IA8D3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CA0C3D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CreateContacts1659463069549 = void 0;
|
|
13
|
+
class CreateContacts1659463069549 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'CreateContacts1659463069549';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE "BaseConfigEntity" ("id" varchar PRIMARY KEY NOT NULL, "client_id" varchar(255), "client_secret" varchar(255), "scopes" text, "issuer" varchar(255), "redirect_url" text, "dangerously_allow_insecure_http_requests" boolean, "client_auth_method" text, "identifier" varchar(255), "session_id" varchar(255), "type" varchar NOT NULL, "connectionId" varchar, CONSTRAINT "REL_BaseConfig_connectionId" UNIQUE ("connectionId"))`);
|
|
20
|
+
yield queryRunner.query(`CREATE INDEX "IDX_BaseConfigEntity_type" ON "BaseConfigEntity" ("type")`);
|
|
21
|
+
yield queryRunner.query(`CREATE TABLE "CorrelationIdentifier" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('did','url') ) NOT NULL, "correlation_id" text NOT NULL, "identityId" varchar, CONSTRAINT "UQ_Correlation_id" UNIQUE ("correlation_id"), CONSTRAINT "REL_CorrelationIdentifier_identityId" UNIQUE ("identityId"))`);
|
|
22
|
+
yield queryRunner.query(`CREATE TABLE "Contact" ("id" varchar PRIMARY KEY NOT NULL, "name" varchar(255) NOT NULL, "alias" varchar(255) NOT NULL, "uri" varchar(255) NOT NULL, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), CONSTRAINT "UQ_Name" UNIQUE ("name"), CONSTRAINT "UQ_Alias" UNIQUE ("alias"))`);
|
|
23
|
+
yield queryRunner.query(`CREATE TABLE "IdentityMetadata" ("id" varchar PRIMARY KEY NOT NULL, "label" varchar(255) NOT NULL, "value" varchar(255) NOT NULL, "identityId" varchar)`);
|
|
24
|
+
yield queryRunner.query(`CREATE TABLE "Identity" ("id" varchar PRIMARY KEY NOT NULL, "alias" varchar(255) NOT NULL, "roles" text, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "contactId" varchar, CONSTRAINT "UQ_Alias" UNIQUE ("alias"))`);
|
|
25
|
+
yield queryRunner.query(`CREATE TABLE "Connection" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('OIDC','SIOPv2','SIOPv2+OpenID4VP') ) NOT NULL, "identityId" varchar, CONSTRAINT "REL_Connection_identityId" UNIQUE ("identityId"))`);
|
|
26
|
+
yield queryRunner.query(`DROP INDEX "IDX_BaseConfigEntity_type"`);
|
|
27
|
+
yield queryRunner.query(`CREATE TABLE "temporary_BaseConfigEntity" ("id" varchar PRIMARY KEY NOT NULL, "client_id" varchar(255), "client_secret" varchar(255), "scopes" text, "issuer" varchar(255), "redirect_url" text, "dangerously_allow_insecure_http_requests" boolean, "client_auth_method" text, "identifier" varchar(255), "session_id" varchar(255), "type" varchar NOT NULL, "connectionId" varchar, CONSTRAINT "REL_BaseConfig_connectionId" UNIQUE ("connectionId"), CONSTRAINT "FK_BaseConfig_connectionId" FOREIGN KEY ("connectionId") REFERENCES "Connection" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
|
|
28
|
+
yield queryRunner.query(`INSERT INTO "temporary_BaseConfigEntity"("id", "client_id", "client_secret", "scopes", "issuer", "redirect_url", "dangerously_allow_insecure_http_requests", "client_auth_method", "identifier", "session_id", "type", "connectionId") SELECT "id", "client_id", "client_secret", "scopes", "issuer", "redirect_url", "dangerously_allow_insecure_http_requests", "client_auth_method", "identifier", "session_id", "type", "connectionId" FROM "BaseConfigEntity"`);
|
|
29
|
+
yield queryRunner.query(`DROP TABLE "BaseConfigEntity"`);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE "temporary_BaseConfigEntity" RENAME TO "BaseConfigEntity"`);
|
|
31
|
+
yield queryRunner.query(`CREATE INDEX "IDX_BaseConfigEntity_type" ON "BaseConfigEntity" ("type")`);
|
|
32
|
+
yield queryRunner.query(`CREATE TABLE "temporary_CorrelationIdentifier" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('did','url') ) NOT NULL, "correlation_id" text NOT NULL, "identityId" varchar, CONSTRAINT "UQ_Correlation_id" UNIQUE ("correlation_id"), CONSTRAINT "REL_CorrelationIdentifier_identityId" UNIQUE ("identityId"), CONSTRAINT "FK_CorrelationIdentifier_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
|
|
33
|
+
yield queryRunner.query(`INSERT INTO "temporary_CorrelationIdentifier"("id", "type", "correlation_id", "identityId") SELECT "id", "type", "correlation_id", "identityId" FROM "CorrelationIdentifier"`);
|
|
34
|
+
yield queryRunner.query(`DROP TABLE "CorrelationIdentifier"`);
|
|
35
|
+
yield queryRunner.query(`ALTER TABLE "temporary_CorrelationIdentifier" RENAME TO "CorrelationIdentifier"`);
|
|
36
|
+
yield queryRunner.query(`CREATE TABLE "temporary_IdentityMetadata" ("id" varchar PRIMARY KEY NOT NULL, "label" varchar(255) NOT NULL, "value" varchar(255) NOT NULL, "identityId" varchar, CONSTRAINT "FK_IdentityMetadata_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
|
|
37
|
+
yield queryRunner.query(`INSERT INTO "temporary_IdentityMetadata"("id", "label", "value", "identityId") SELECT "id", "label", "value", "identityId" FROM "IdentityMetadata"`);
|
|
38
|
+
yield queryRunner.query(`DROP TABLE "IdentityMetadata"`);
|
|
39
|
+
yield queryRunner.query(`ALTER TABLE "temporary_IdentityMetadata" RENAME TO "IdentityMetadata"`);
|
|
40
|
+
yield queryRunner.query(`CREATE TABLE "temporary_Identity" ("id" varchar PRIMARY KEY NOT NULL, "alias" varchar(255) NOT NULL, "roles" text, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "contactId" varchar, CONSTRAINT "UQ_Alias" UNIQUE ("alias"), CONSTRAINT "FK_Identity_contactId" FOREIGN KEY ("contactId") REFERENCES "Contact" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
|
|
41
|
+
yield queryRunner.query(`INSERT INTO "temporary_Identity"("id", "alias", "roles", "created_at", "last_updated_at", "contactId") SELECT "id", "alias", "roles", "created_at", "last_updated_at", "contactId" FROM "Identity"`);
|
|
42
|
+
yield queryRunner.query(`DROP TABLE "Identity"`);
|
|
43
|
+
yield queryRunner.query(`ALTER TABLE "temporary_Identity" RENAME TO "Identity"`);
|
|
44
|
+
yield queryRunner.query(`CREATE TABLE "temporary_Connection" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('OIDC','SIOPv2','SIOPv2+OpenID4VP') ) NOT NULL, "identityId" varchar, CONSTRAINT "REL_Connection_identityId" UNIQUE ("identityId"), CONSTRAINT "FK_Connection_identityId" FOREIGN KEY ("identityId") REFERENCES "Identity" ("id") ON DELETE CASCADE ON UPDATE NO ACTION)`);
|
|
45
|
+
yield queryRunner.query(`INSERT INTO "temporary_Connection"("id", "type", "identityId") SELECT "id", "type", "identityId" FROM "Connection"`);
|
|
46
|
+
yield queryRunner.query(`DROP TABLE "Connection"`);
|
|
47
|
+
yield queryRunner.query(`ALTER TABLE "temporary_Connection" RENAME TO "Connection"`);
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
down(queryRunner) {
|
|
51
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
52
|
+
yield queryRunner.query(`ALTER TABLE "Connection" RENAME TO "temporary_Connection"`);
|
|
53
|
+
yield queryRunner.query(`CREATE TABLE "Connection" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('OIDC','SIOPv2','SIOPv2+OpenID4VP') ) NOT NULL, "identityId" varchar, CONSTRAINT "REL_Connection_identityId" UNIQUE ("identityId"))`);
|
|
54
|
+
yield queryRunner.query(`INSERT INTO "Connection"("id", "type", "identityId") SELECT "id", "type", "identityId" FROM "Connection"`);
|
|
55
|
+
yield queryRunner.query(`DROP TABLE "temporary_Connection"`);
|
|
56
|
+
yield queryRunner.query(`ALTER TABLE "Identity" RENAME TO "temporary_Identity"`);
|
|
57
|
+
yield queryRunner.query(`CREATE TABLE "Identity" ("id" varchar PRIMARY KEY NOT NULL, "alias" varchar(255) NOT NULL, "roles" text, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')), "contactId" varchar, CONSTRAINT "UQ_Alias" UNIQUE ("alias"))`);
|
|
58
|
+
yield queryRunner.query(`INSERT INTO "Identity"("id", "alias", "roles","created_at", "last_updated_at", "contactId") SELECT "id", "alias", "roles","created_at", "last_updated_at", "contactId" FROM "Identity"`);
|
|
59
|
+
yield queryRunner.query(`DROP TABLE "temporary_Identity"`);
|
|
60
|
+
yield queryRunner.query(`ALTER TABLE "IdentityMetadata" RENAME TO "temporary_IdentityMetadata"`);
|
|
61
|
+
yield queryRunner.query(`CREATE TABLE "IdentityMetadata" ("id" varchar PRIMARY KEY NOT NULL, "label" varchar(255) NOT NULL, "value" varchar(255) NOT NULL, "identityId" varchar)`);
|
|
62
|
+
yield queryRunner.query(`INSERT INTO "IdentityMetadata"("id", "label", "value", "identityId") SELECT "id", "label", "value", "identityId" FROM "IdentityMetadata"`);
|
|
63
|
+
yield queryRunner.query(`DROP TABLE "temporary_IdentityMetadata"`);
|
|
64
|
+
yield queryRunner.query(`ALTER TABLE "CorrelationIdentifier" RENAME TO "temporary_CorrelationIdentifier"`);
|
|
65
|
+
yield queryRunner.query(`CREATE TABLE "CorrelationIdentifier" ("id" varchar PRIMARY KEY NOT NULL, "type" varchar CHECK( "type" IN ('did','url') ) NOT NULL, "correlation_id" text NOT NULL, "identityId" varchar, CONSTRAINT "UQ_Correlation_id" UNIQUE ("correlation_id"), CONSTRAINT "REL_CorrelationIdentifier_identityId" UNIQUE ("identityId"))`);
|
|
66
|
+
yield queryRunner.query(`INSERT INTO "CorrelationIdentifier"("id", "type", "correlation_id", "identityId") SELECT "id", "type", "correlation_id", "identityId" FROM "CorrelationIdentifier"`);
|
|
67
|
+
yield queryRunner.query(`DROP TABLE "temporary_CorrelationIdentifier"`);
|
|
68
|
+
yield queryRunner.query(`DROP TABLE "Connection"`);
|
|
69
|
+
yield queryRunner.query(`DROP TABLE "Identity"`);
|
|
70
|
+
yield queryRunner.query(`DROP TABLE "IdentityMetadata"`);
|
|
71
|
+
yield queryRunner.query(`DROP TABLE "Contact"`);
|
|
72
|
+
yield queryRunner.query(`DROP TABLE "CorrelationIdentifier"`);
|
|
73
|
+
yield queryRunner.query(`DROP INDEX "IDX_BaseConfigEntity_type"`);
|
|
74
|
+
yield queryRunner.query(`DROP TABLE "BaseConfigEntity"`);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
exports.CreateContacts1659463069549 = CreateContacts1659463069549;
|
|
79
|
+
//# sourceMappingURL=1659463069549-CreateContacts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1659463069549-CreateContacts.js","sourceRoot":"","sources":["../../../src/migrations/sqlite/1659463069549-CreateContacts.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,2BAA2B;IAAxC;QACE,SAAI,GAAG,6BAA6B,CAAA;IA0GtC,CAAC;IAxGc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,gbAAgb,CACjb,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAA;YAClG,MAAM,WAAW,CAAC,KAAK,CACrB,6TAA6T,CAC9T,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,6VAA6V,CAC9V,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,yJAAyJ,CAC1J,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,gSAAgS,CACjS,CAAA;YACD,MAAM,WAAW,CAAC,KAAK,CACrB,oOAA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,CAAC,oCAAoC,CAAC,CAAA;YAC7D,MAAM,WAAW,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAA;YACjE,MAAM,WAAW,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAA;QAC1D,CAAC;KAAA;CACF;AA3GD,kEA2GC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateIssuanceBranding1685628973231 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1685628973231-CreateIssuanceBranding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1685628973231-CreateIssuanceBranding.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/1685628973231-CreateIssuanceBranding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAEzD,qBAAa,mCAAoC,YAAW,kBAAkB;IAC5E,IAAI,SAAwC;IAE/B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAgE3C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAiD3D"}
|