@sphereon/ssi-sdk.data-store 0.18.2-unstable.6 → 0.18.2-unstable.64
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/AbstractContactStore.d.ts +23 -23
- package/dist/contact/AbstractContactStore.js +6 -6
- package/dist/contact/ContactStore.d.ts +32 -32
- package/dist/contact/ContactStore.js +365 -365
- package/dist/entities/contact/BaseConfigEntity.d.ts +6 -6
- package/dist/entities/contact/BaseConfigEntity.js +33 -33
- package/dist/entities/contact/BaseContactEntity.d.ts +9 -9
- package/dist/entities/contact/BaseContactEntity.js +53 -53
- package/dist/entities/contact/ConnectionEntity.d.ts +10 -10
- package/dist/entities/contact/ConnectionEntity.js +46 -46
- package/dist/entities/contact/CorrelationIdentifierEntity.d.ts +10 -10
- package/dist/entities/contact/CorrelationIdentifierEntity.js +71 -71
- package/dist/entities/contact/DidAuthConfigEntity.d.ts +6 -6
- package/dist/entities/contact/DidAuthConfigEntity.js +32 -32
- package/dist/entities/contact/ElectronicAddressEntity.d.ts +13 -13
- package/dist/entities/contact/ElectronicAddressEntity.js +91 -91
- package/dist/entities/contact/IdentityEntity.d.ts +20 -20
- package/dist/entities/contact/IdentityEntity.js +128 -128
- package/dist/entities/contact/IdentityMetadataItemEntity.d.ts +9 -9
- package/dist/entities/contact/IdentityMetadataItemEntity.js +68 -68
- package/dist/entities/contact/NaturalPersonEntity.d.ts +8 -8
- package/dist/entities/contact/NaturalPersonEntity.js +71 -71
- package/dist/entities/contact/OpenIdConfigEntity.d.ts +10 -10
- package/dist/entities/contact/OpenIdConfigEntity.js +48 -48
- package/dist/entities/contact/OrganizationEntity.d.ts +8 -8
- package/dist/entities/contact/OrganizationEntity.js +66 -66
- package/dist/entities/contact/PartyEntity.d.ts +19 -19
- package/dist/entities/contact/PartyEntity.js +131 -131
- package/dist/entities/contact/PartyRelationshipEntity.d.ts +12 -12
- package/dist/entities/contact/PartyRelationshipEntity.js +94 -94
- package/dist/entities/contact/PartyTypeEntity.d.ts +14 -14
- package/dist/entities/contact/PartyTypeEntity.js +103 -103
- package/dist/entities/eventLogger/AuditEventEntity.d.ts +26 -26
- package/dist/entities/eventLogger/AuditEventEntity.js +123 -123
- package/dist/entities/eventLogger/AuditEventEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.d.ts +10 -10
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +73 -73
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.d.ts +17 -17
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +119 -119
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.d.ts +14 -14
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +101 -101
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.d.ts +8 -8
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +48 -48
- package/dist/entities/issuanceBranding/ImageAttributesEntity.d.ts +13 -13
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js +91 -91
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.d.ts +8 -8
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +38 -38
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.d.ts +13 -13
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +94 -94
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.d.ts +8 -8
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +48 -48
- package/dist/entities/issuanceBranding/TextAttributesEntity.d.ts +8 -8
- package/dist/entities/issuanceBranding/TextAttributesEntity.js +61 -61
- package/dist/entities/statusList2021/StatusList2021Entity.d.ts +18 -18
- package/dist/entities/statusList2021/StatusList2021Entity.js +114 -114
- package/dist/entities/statusList2021/StatusList2021EntryEntity.d.ts +10 -10
- package/dist/entities/statusList2021/StatusList2021EntryEntity.js +50 -50
- package/dist/entities/validators/index.d.ts +6 -6
- package/dist/entities/validators/index.js +26 -26
- package/dist/entities/xstatePersistence/StateEntity.d.ts +14 -0
- package/dist/entities/xstatePersistence/StateEntity.d.ts.map +1 -0
- package/dist/entities/xstatePersistence/StateEntity.js +62 -0
- package/dist/entities/xstatePersistence/StateEntity.js.map +1 -0
- package/dist/eventLogger/AbstractEventLoggerStore.d.ts +6 -6
- package/dist/eventLogger/AbstractEventLoggerStore.js +6 -6
- package/dist/eventLogger/EventLoggerStore.d.ts +12 -12
- package/dist/eventLogger/EventLoggerStore.js +43 -43
- package/dist/index.d.ts +45 -41
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +141 -127
- package/dist/index.js.map +1 -1
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.d.ts +19 -19
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +6 -6
- package/dist/issuanceBranding/IssuanceBrandingStore.d.ts +30 -30
- package/dist/issuanceBranding/IssuanceBrandingStore.js +374 -374
- package/dist/migrations/generic/1-CreateContacts.d.ts +6 -6
- package/dist/migrations/generic/1-CreateContacts.js +77 -77
- package/dist/migrations/generic/2-CreateIssuanceBranding.d.ts +6 -6
- package/dist/migrations/generic/2-CreateIssuanceBranding.js +77 -77
- package/dist/migrations/generic/3-CreateContacts.d.ts +6 -6
- package/dist/migrations/generic/3-CreateContacts.js +77 -77
- package/dist/migrations/generic/4-CreateStatusList.d.ts +6 -6
- package/dist/migrations/generic/4-CreateStatusList.js +71 -71
- package/dist/migrations/generic/5-CreateAuditEvents.d.ts +6 -6
- package/dist/migrations/generic/5-CreateAuditEvents.js +77 -77
- package/dist/migrations/generic/{2-CreateContacts.d.ts → 6-CreateXStateStore.d.ts} +2 -2
- package/dist/migrations/generic/6-CreateXStateStore.d.ts.map +1 -0
- package/dist/migrations/generic/{2-CreateContacts.js → 6-CreateXStateStore.js} +13 -13
- package/dist/migrations/generic/6-CreateXStateStore.js.map +1 -0
- package/dist/migrations/generic/index.d.ts +18 -16
- package/dist/migrations/generic/index.d.ts.map +1 -1
- package/dist/migrations/generic/index.js +30 -27
- package/dist/migrations/generic/index.js.map +1 -1
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.d.ts.map +1 -1
- package/dist/migrations/index.js +10 -5
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/internal-migrations-ormconfig.d.ts +6 -6
- package/dist/migrations/internal-migrations-ormconfig.js +26 -26
- package/dist/migrations/postgres/1659463079428-CreateContacts.d.ts +6 -6
- package/dist/migrations/postgres/1659463079428-CreateContacts.js +56 -56
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.d.ts +6 -6
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +68 -68
- package/dist/migrations/postgres/1690925872592-CreateContacts.d.ts +6 -6
- package/dist/migrations/postgres/1690925872592-CreateContacts.js +68 -68
- package/dist/migrations/postgres/1693866470001-CreateStatusList.d.ts +6 -6
- package/dist/migrations/postgres/1693866470001-CreateStatusList.js +31 -31
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.d.ts +6 -6
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js +42 -42
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js.map +1 -1
- package/dist/migrations/postgres/1708097018115-CreateXStateStore.d.ts +7 -0
- package/dist/migrations/postgres/1708097018115-CreateXStateStore.d.ts.map +1 -0
- package/dist/migrations/postgres/1708097018115-CreateXStateStore.js +32 -0
- package/dist/migrations/postgres/1708097018115-CreateXStateStore.js.map +1 -0
- package/dist/migrations/sqlite/1659463069549-CreateContacts.d.ts +6 -6
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js +78 -78
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.d.ts +6 -6
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +88 -88
- package/dist/migrations/sqlite/1690925872693-CreateContacts.d.ts +6 -6
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js +107 -107
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.d.ts +6 -6
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.js +31 -31
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.d.ts +6 -6
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js +28 -28
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js.map +1 -1
- package/dist/migrations/sqlite/1708096002272-CreateXStateStore.d.ts +7 -0
- package/dist/migrations/sqlite/1708096002272-CreateXStateStore.d.ts.map +1 -0
- package/dist/migrations/sqlite/1708096002272-CreateXStateStore.js +30 -0
- package/dist/migrations/sqlite/1708096002272-CreateXStateStore.js.map +1 -0
- package/dist/statusList/IStatusListStore.d.ts +19 -19
- package/dist/statusList/IStatusListStore.js +2 -2
- package/dist/statusList/StatusListStore.d.ts +35 -35
- package/dist/statusList/StatusListStore.js +212 -212
- package/dist/types/contact/IAbstractContactStore.d.ts +74 -74
- package/dist/types/contact/IAbstractContactStore.js +2 -2
- package/dist/types/contact/contact.d.ts +173 -173
- package/dist/types/contact/contact.js +25 -25
- package/dist/types/eventLogger/IAbstractEventLoggerStore.d.ts +9 -9
- package/dist/types/eventLogger/IAbstractEventLoggerStore.js +2 -2
- package/dist/types/eventLogger/eventLogger.d.ts +2 -2
- package/dist/types/eventLogger/eventLogger.js +2 -2
- package/dist/types/index.d.ts +10 -9
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +26 -25
- package/dist/types/index.js.map +1 -1
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.d.ts +58 -58
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +2 -2
- package/dist/types/issuanceBranding/issuanceBranding.d.ts +114 -114
- package/dist/types/issuanceBranding/issuanceBranding.js +2 -2
- package/dist/types/statusList/IAbstractStatusListStore.d.ts +37 -37
- package/dist/types/statusList/IAbstractStatusListStore.js +2 -2
- package/dist/types/statusList/statusList.d.ts +24 -24
- package/dist/types/statusList/statusList.js +2 -2
- package/dist/types/validation/validation.d.ts +3 -3
- package/dist/types/validation/validation.js +2 -2
- package/dist/types/xstatePersistence/IAbstractXStateStore.d.ts +23 -0
- package/dist/types/xstatePersistence/IAbstractXStateStore.d.ts.map +1 -0
- package/dist/types/xstatePersistence/IAbstractXStateStore.js +3 -0
- package/dist/types/xstatePersistence/IAbstractXStateStore.js.map +1 -0
- package/dist/utils/ValidatorUtils.d.ts +3 -3
- package/dist/utils/ValidatorUtils.js +12 -12
- package/dist/utils/contact/MappingUtils.d.ts +46 -46
- package/dist/utils/contact/MappingUtils.js +290 -290
- package/dist/xstatePersistence/IAbstractXStateStore.d.ts +7 -0
- package/dist/xstatePersistence/IAbstractXStateStore.d.ts.map +1 -0
- package/dist/xstatePersistence/IAbstractXStateStore.js +7 -0
- package/dist/xstatePersistence/IAbstractXStateStore.js.map +1 -0
- package/dist/xstatePersistence/XStateStore.d.ts +13 -0
- package/dist/xstatePersistence/XStateStore.d.ts.map +1 -0
- package/dist/xstatePersistence/XStateStore.js +67 -0
- package/dist/xstatePersistence/XStateStore.js.map +1 -0
- package/package.json +4 -4
- package/src/__tests__/eventLogger.entities.test.ts +73 -73
- package/src/__tests__/eventLogger.store.test.ts +136 -136
- package/src/__tests__/xstatePersistence.entities.test.ts +47 -0
- package/src/__tests__/xstatePersistence.store.test.ts +66 -0
- package/src/contact/ContactStore.ts +501 -501
- package/src/entities/eventLogger/AuditEventEntity.ts +99 -99
- package/src/entities/statusList2021/StatusList2021Entity.ts +96 -96
- package/src/entities/xstatePersistence/StateEntity.ts +39 -0
- package/src/eventLogger/AbstractEventLoggerStore.ts +7 -7
- package/src/eventLogger/EventLoggerStore.ts +62 -62
- package/src/index.ts +128 -113
- package/src/migrations/generic/1-CreateContacts.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-CreateXStateStore.ts +66 -0
- package/src/migrations/generic/index.ts +30 -27
- package/src/migrations/index.ts +8 -1
- package/src/migrations/postgres/1693866470001-CreateStatusList.ts +24 -24
- package/src/migrations/postgres/1701634812183-CreateAuditEvents.ts +33 -33
- package/src/migrations/postgres/1708097018115-CreateXStateStore.ts +18 -0
- package/src/migrations/sqlite/1690925872693-CreateContacts.ts +163 -163
- package/src/migrations/sqlite/1701634819487-CreateAuditEvents.ts +15 -15
- package/src/migrations/sqlite/1708096002272-CreateXStateStore.ts +16 -0
- package/src/types/eventLogger/IAbstractEventLoggerStore.ts +12 -12
- package/src/types/eventLogger/eventLogger.ts +3 -3
- package/src/types/index.ts +10 -9
- package/src/types/xstatePersistence/IAbstractXStateStore.ts +27 -0
- package/src/xstatePersistence/IAbstractXStateStore.ts +7 -0
- package/src/xstatePersistence/XStateStore.ts +56 -0
- package/dist/entities/contact/ContactEntity.d.ts +0 -16
- package/dist/entities/contact/ContactEntity.d.ts.map +0 -1
- package/dist/entities/contact/ContactEntity.js +0 -164
- package/dist/entities/contact/ContactEntity.js.map +0 -1
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts +0 -7
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +0 -1
- package/dist/migrations/generic/1-CreateIssuanceBranding.js +0 -96
- package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +0 -1
- package/dist/migrations/generic/2-CreateContacts.d.ts.map +0 -1
- package/dist/migrations/generic/2-CreateContacts.js.map +0 -1
- package/dist/migrations/generic/3-CreateStatusList.d.ts +0 -7
- package/dist/migrations/generic/3-CreateStatusList.d.ts.map +0 -1
- package/dist/migrations/generic/3-CreateStatusList.js +0 -72
- package/dist/migrations/generic/3-CreateStatusList.js.map +0 -1
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts +0 -7
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts.map +0 -1
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js +0 -32
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js.map +0 -1
- package/dist/migrations/postgres/uuid.d.ts +0 -3
- package/dist/migrations/postgres/uuid.d.ts.map +0 -1
- package/dist/migrations/postgres/uuid.js +0 -25
- package/dist/migrations/postgres/uuid.js.map +0 -1
|
@@ -1,32 +1,32 @@
|
|
|
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.CreateStatusList1693866470002 = void 0;
|
|
13
|
-
class CreateStatusList1693866470002 {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.name = 'CreateStatusList1693866470002';
|
|
16
|
-
}
|
|
17
|
-
up(queryRunner) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
yield queryRunner.query(`CREATE TABLE "StatusListEntry" ("statusListId" varchar NOT NULL, "statusListIndex" integer NOT NULL, "credentialId" varchar, "credentialHash" varchar(128), "correlationId" varchar(255), "value" varchar(50), PRIMARY KEY ("statusListId", "statusListIndex"))`);
|
|
20
|
-
yield queryRunner.query(`CREATE TABLE "StatusList" ("id" varchar PRIMARY KEY NOT NULL, "correlationId" varchar NOT NULL, "length" integer NOT NULL, "issuer" text NOT NULL, "type" varchar CHECK( "type" IN ('StatusList2021') ) NOT NULL DEFAULT ('StatusList2021'), "driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'), "credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'), "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'), "indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ) NOT NULL DEFAULT ('rightToLeft'), "statusPurpose" varchar NOT NULL DEFAULT ('revocation'), "statusListCredential" text, CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId"))`);
|
|
21
|
-
yield queryRunner.query(`CREATE TABLE "temporary_StatusListEntry" ("statusListId" varchar NOT NULL, "statusListIndex" integer NOT NULL, "credentialId" varchar, "credentialHash" varchar(128), "correlationId" varchar(255), "value" varchar(50), CONSTRAINT "FK_statusListEntry_statusListId" FOREIGN KEY ("statusListId") REFERENCES "StatusList" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION, PRIMARY KEY ("statusListId", "statusListIndex"))`);
|
|
22
|
-
yield queryRunner.query(`INSERT INTO "temporary_StatusListEntry"("statusListId", "statusListIndex", "credentialId", "credentialHash", "correlationId", "value") SELECT "statusListId", "statusListIndex", "credentialId", "credentialHash", "correlationId", "value" FROM "StatusListEntry"`);
|
|
23
|
-
yield queryRunner.query(`DROP TABLE "StatusListEntry"`);
|
|
24
|
-
yield queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
down(queryRunner) {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () { });
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
exports.CreateStatusList1693866470002 = CreateStatusList1693866470002;
|
|
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.CreateStatusList1693866470002 = void 0;
|
|
13
|
+
class CreateStatusList1693866470002 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'CreateStatusList1693866470002';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE "StatusListEntry" ("statusListId" varchar NOT NULL, "statusListIndex" integer NOT NULL, "credentialId" varchar, "credentialHash" varchar(128), "correlationId" varchar(255), "value" varchar(50), PRIMARY KEY ("statusListId", "statusListIndex"))`);
|
|
20
|
+
yield queryRunner.query(`CREATE TABLE "StatusList" ("id" varchar PRIMARY KEY NOT NULL, "correlationId" varchar NOT NULL, "length" integer NOT NULL, "issuer" text NOT NULL, "type" varchar CHECK( "type" IN ('StatusList2021') ) NOT NULL DEFAULT ('StatusList2021'), "driverType" varchar CHECK( "driverType" IN ('agent_typeorm','agent_kv_store','github','agent_filesystem') ) NOT NULL DEFAULT ('agent_typeorm'), "credentialIdMode" varchar CHECK( "credentialIdMode" IN ('ISSUANCE','PERSISTENCE','NEVER') ) NOT NULL DEFAULT ('ISSUANCE'), "proofFormat" varchar CHECK( "proofFormat" IN ('lds','jwt') ) NOT NULL DEFAULT ('lds'), "indexingDirection" varchar CHECK( "indexingDirection" IN ('rightToLeft') ) NOT NULL DEFAULT ('rightToLeft'), "statusPurpose" varchar NOT NULL DEFAULT ('revocation'), "statusListCredential" text, CONSTRAINT "UQ_correlationId" UNIQUE ("correlationId"))`);
|
|
21
|
+
yield queryRunner.query(`CREATE TABLE "temporary_StatusListEntry" ("statusListId" varchar NOT NULL, "statusListIndex" integer NOT NULL, "credentialId" varchar, "credentialHash" varchar(128), "correlationId" varchar(255), "value" varchar(50), CONSTRAINT "FK_statusListEntry_statusListId" FOREIGN KEY ("statusListId") REFERENCES "StatusList" ("id") ON DELETE NO ACTION ON UPDATE NO ACTION, PRIMARY KEY ("statusListId", "statusListIndex"))`);
|
|
22
|
+
yield queryRunner.query(`INSERT INTO "temporary_StatusListEntry"("statusListId", "statusListIndex", "credentialId", "credentialHash", "correlationId", "value") SELECT "statusListId", "statusListIndex", "credentialId", "credentialHash", "correlationId", "value" FROM "StatusListEntry"`);
|
|
23
|
+
yield queryRunner.query(`DROP TABLE "StatusListEntry"`);
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE "temporary_StatusListEntry" RENAME TO "StatusListEntry"`);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
down(queryRunner) {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () { });
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.CreateStatusList1693866470002 = CreateStatusList1693866470002;
|
|
32
32
|
//# sourceMappingURL=1693866470000-CreateStatusList.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
-
export declare class CreateAuditEvents1701634819487 implements MigrationInterface {
|
|
3
|
-
name: string;
|
|
4
|
-
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
-
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
-
}
|
|
1
|
+
import { MigrationInterface, QueryRunner } from 'typeorm';
|
|
2
|
+
export declare class CreateAuditEvents1701634819487 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<void>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=1701634819487-CreateAuditEvents.d.ts.map
|
|
@@ -1,29 +1,29 @@
|
|
|
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.CreateAuditEvents1701634819487 = void 0;
|
|
13
|
-
class CreateAuditEvents1701634819487 {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.name = 'CreateAuditEvents1701634819487';
|
|
16
|
-
}
|
|
17
|
-
up(queryRunner) {
|
|
18
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
-
yield queryRunner.query(`CREATE TABLE "AuditEvents" ("id" varchar PRIMARY KEY NOT NULL, "timestamp" datetime NOT NULL, "level" varchar CHECK( "level" IN ('0','1','2','3') ) NOT NULL, "correlationId" varchar NOT NULL, "system" varchar CHECK( "system" IN ('general','kms','identity','oid4vci','credentials','web3','profile','contact') ) NOT NULL, "subSystemType" varchar CHECK( "subSystemType" IN ('key','did_provider','did_resolver','oid4vp_op','oid4vci_client','siopv2_op','contact_manager','vc_issuer','vc_verifier','vc_persistence','transport','profile') ) NOT NULL, "actionType" varchar CHECK( "actionType" IN ('create','read','update','delete','execute') ) NOT NULL, "actionSubType" varchar NOT NULL, "initiatorType" varchar CHECK( "initiatorType" IN ('user','system','external') ) NOT NULL, "systemCorrelationIdType" varchar CHECK( "systemCorrelationIdType" IN ('did','email','hostname','phone','user') ), "systemCorrelationId" varchar, "systemAlias" varchar
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
down(queryRunner) {
|
|
23
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
-
yield queryRunner.query(`DROP TABLE "AuditEvents"`);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.CreateAuditEvents1701634819487 = CreateAuditEvents1701634819487;
|
|
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.CreateAuditEvents1701634819487 = void 0;
|
|
13
|
+
class CreateAuditEvents1701634819487 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'CreateAuditEvents1701634819487';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE "AuditEvents" ("id" varchar PRIMARY KEY NOT NULL, "timestamp" datetime NOT NULL, "level" varchar CHECK( "level" IN ('0','1','2','3') ) NOT NULL, "correlationId" varchar NOT NULL, "system" varchar CHECK( "system" IN ('general','kms','identity','oid4vci','credentials','web3','profile','contact') ) NOT NULL, "subSystemType" varchar CHECK( "subSystemType" IN ('key','did_provider','did_resolver','oid4vp_op','oid4vci_client','siopv2_op','contact_manager','vc_issuer','vc_verifier','vc_persistence','transport','profile') ) NOT NULL, "actionType" varchar CHECK( "actionType" IN ('create','read','update','delete','execute') ) NOT NULL, "actionSubType" varchar NOT NULL, "initiatorType" varchar CHECK( "initiatorType" IN ('user','system','external') ) NOT NULL, "systemCorrelationIdType" varchar CHECK( "systemCorrelationIdType" IN ('did','email','hostname','phone','user') ), "systemCorrelationId" varchar, "systemAlias" varchar, "partyCorrelationType" varchar CHECK( "partyCorrelationType" IN ('did','email','hostname','phone') ), "partyCorrelationId" varchar, "partyAlias" varchar, "description" varchar NOT NULL, "data" varchar, "diagnosticData" varchar, "created_at" datetime NOT NULL DEFAULT (datetime('now')), "last_updated_at" datetime NOT NULL DEFAULT (datetime('now')))`);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
down(queryRunner) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
yield queryRunner.query(`DROP TABLE "AuditEvents"`);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.CreateAuditEvents1701634819487 = CreateAuditEvents1701634819487;
|
|
29
29
|
//# sourceMappingURL=1701634819487-CreateAuditEvents.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"1701634819487-CreateAuditEvents.js","sourceRoot":"","sources":["../../../src/migrations/sqlite/1701634819487-CreateAuditEvents.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,8BAA8B;IAA3C;QACE,SAAI,GAAG,gCAAgC,CAAA;IAWzC,CAAC;IATc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,
|
|
1
|
+
{"version":3,"file":"1701634819487-CreateAuditEvents.js","sourceRoot":"","sources":["../../../src/migrations/sqlite/1701634819487-CreateAuditEvents.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,8BAA8B;IAA3C;QACE,SAAI,GAAG,gCAAgC,CAAA;IAWzC,CAAC;IATc,EAAE,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CACrB,0wCAA0wC,CAC3wC,CAAA;QACH,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACxC,MAAM,WAAW,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAA;QACrD,CAAC;KAAA;CACF;AAZD,wEAYC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
2
|
+
export declare class CreateXStateStore1708096002272 implements MigrationInterface {
|
|
3
|
+
name: string;
|
|
4
|
+
up(queryRunner: QueryRunner): Promise<any>;
|
|
5
|
+
down(queryRunner: QueryRunner): Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=1708096002272-CreateXStateStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1708096002272-CreateXStateStore.d.ts","sourceRoot":"","sources":["../../../src/migrations/sqlite/1708096002272-CreateXStateStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,WAAW,EAAC,MAAM,SAAS,CAAC;AAExD,qBAAa,8BAA+B,YAAW,kBAAkB;IACrE,IAAI,SAAmC;IAE1B,EAAE,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC;IAM1C,IAAI,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAI7D"}
|
|
@@ -0,0 +1,30 @@
|
|
|
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.CreateXStateStore1708096002272 = void 0;
|
|
13
|
+
class CreateXStateStore1708096002272 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'CreateXStateStore1708096002272';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`CREATE TABLE "StateEntity" ("id" varchar PRIMARY KEY, "state" varchar(255) NOT NULL, "type" varchar(255) NOT NULL, "created_at" DATETIME NOT NULL DEFAULT (datetime('now')), "updated_at" DATETIME NOT NULL DEFAULT (datetime('now')), "completed_at" DATETIME, "tenant_id" varchar(255) NULL, "ttl" INTEGER NULL)`);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
down(queryRunner) {
|
|
23
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
24
|
+
yield queryRunner.query(`ALTER TABLE "StateEntity"`);
|
|
25
|
+
yield queryRunner.query(`DROP TABLE "StateEntity"`);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.CreateXStateStore1708096002272 = CreateXStateStore1708096002272;
|
|
30
|
+
//# sourceMappingURL=1708096002272-CreateXStateStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1708096002272-CreateXStateStore.js","sourceRoot":"","sources":["../../../src/migrations/sqlite/1708096002272-CreateXStateStore.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,8BAA8B;IAA3C;QACI,SAAI,GAAG,gCAAgC,CAAA;IAY3C,CAAC;IAVgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CACnB,oTAAoT,CACvT,CAAA;QACL,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAA;YACpD,MAAM,WAAW,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAA;QACvD,CAAC;KAAA;CACJ;AAbD,wEAaC"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { StatusListEntryEntity } from '../entities/statusList2021/StatusList2021EntryEntity';
|
|
2
|
-
import { IAddStatusListArgs, IAddStatusListEntryArgs, IGetStatusListArgs, IGetStatusListEntriesArgs, IGetStatusListEntryByCredentialIdArgs, IGetStatusListEntryByIndexArgs, IGetStatusListsArgs, IRemoveStatusListArgs, IStatusListEntryAvailableArgs, IUpdateStatusListIndexArgs } from '../types/statusList/IAbstractStatusListStore';
|
|
3
|
-
import { IStatusListEntity, IStatusListEntryEntity } from '../types/statusList/statusList';
|
|
4
|
-
export interface IStatusListStore {
|
|
5
|
-
getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
|
|
6
|
-
getStatusLists(args: IGetStatusListsArgs): Promise<Array<IStatusListEntity>>;
|
|
7
|
-
removeStatusList(args: IRemoveStatusListArgs): Promise<void>;
|
|
8
|
-
addStatusList(args: IAddStatusListArgs): Promise<IStatusListEntity>;
|
|
9
|
-
updateStatusList(args: IUpdateStatusListIndexArgs): Promise<IStatusListEntity>;
|
|
10
|
-
availableStatusListEntries(args: IStatusListEntryAvailableArgs): Promise<number[]>;
|
|
11
|
-
addStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
|
|
12
|
-
updateStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
|
|
13
|
-
getStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<StatusListEntryEntity | undefined>;
|
|
14
|
-
getStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<StatusListEntryEntity | undefined>;
|
|
15
|
-
removeStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<boolean>;
|
|
16
|
-
removeStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<boolean>;
|
|
17
|
-
getStatusListEntries(args: IGetStatusListEntriesArgs): Promise<IStatusListEntryEntity[]>;
|
|
18
|
-
getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
|
|
19
|
-
}
|
|
1
|
+
import { StatusListEntryEntity } from '../entities/statusList2021/StatusList2021EntryEntity';
|
|
2
|
+
import { IAddStatusListArgs, IAddStatusListEntryArgs, IGetStatusListArgs, IGetStatusListEntriesArgs, IGetStatusListEntryByCredentialIdArgs, IGetStatusListEntryByIndexArgs, IGetStatusListsArgs, IRemoveStatusListArgs, IStatusListEntryAvailableArgs, IUpdateStatusListIndexArgs } from '../types/statusList/IAbstractStatusListStore';
|
|
3
|
+
import { IStatusListEntity, IStatusListEntryEntity } from '../types/statusList/statusList';
|
|
4
|
+
export interface IStatusListStore {
|
|
5
|
+
getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
|
|
6
|
+
getStatusLists(args: IGetStatusListsArgs): Promise<Array<IStatusListEntity>>;
|
|
7
|
+
removeStatusList(args: IRemoveStatusListArgs): Promise<void>;
|
|
8
|
+
addStatusList(args: IAddStatusListArgs): Promise<IStatusListEntity>;
|
|
9
|
+
updateStatusList(args: IUpdateStatusListIndexArgs): Promise<IStatusListEntity>;
|
|
10
|
+
availableStatusListEntries(args: IStatusListEntryAvailableArgs): Promise<number[]>;
|
|
11
|
+
addStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
|
|
12
|
+
updateStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
|
|
13
|
+
getStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<StatusListEntryEntity | undefined>;
|
|
14
|
+
getStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<StatusListEntryEntity | undefined>;
|
|
15
|
+
removeStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<boolean>;
|
|
16
|
+
removeStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<boolean>;
|
|
17
|
+
getStatusListEntries(args: IGetStatusListEntriesArgs): Promise<IStatusListEntryEntity[]>;
|
|
18
|
+
getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
|
|
19
|
+
}
|
|
20
20
|
//# sourceMappingURL=IStatusListStore.d.ts.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
//# sourceMappingURL=IStatusListStore.js.map
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { OrPromise } from '@sphereon/ssi-types';
|
|
2
|
-
import { DataSource, Repository } from 'typeorm';
|
|
3
|
-
import { StatusListEntity } from '../entities/statusList2021/StatusList2021Entity';
|
|
4
|
-
import { StatusListEntryEntity } from '../entities/statusList2021/StatusList2021EntryEntity';
|
|
5
|
-
import { IAddStatusListArgs, IAddStatusListEntryArgs, IGetStatusListArgs, IGetStatusListEntriesArgs, IGetStatusListEntryByCredentialIdArgs, IGetStatusListEntryByIndexArgs, IGetStatusListsArgs, IRemoveStatusListArgs, IStatusListEntryAvailableArgs, IUpdateStatusListIndexArgs, IStatusListEntity, IStatusListEntryEntity } from '../types';
|
|
6
|
-
import { IStatusListStore } from './IStatusListStore';
|
|
7
|
-
export declare class StatusListStore implements IStatusListStore {
|
|
8
|
-
private readonly _dbConnection;
|
|
9
|
-
constructor(dbConnection: OrPromise<DataSource>);
|
|
10
|
-
/**
|
|
11
|
-
* Get's the available status list indices from the provided indices. Meaning it will filter out any index that is already known.
|
|
12
|
-
*
|
|
13
|
-
* The idea is that the caller provides a set of random status list indices. We can relatively easy check against the DB in an optimized way.
|
|
14
|
-
* If the status list is large it is probably best ot also provide at least a good number of indices. So something like 10 or 20 values.
|
|
15
|
-
* Callers are also expected to call this function multiple times if it does not yield results
|
|
16
|
-
*
|
|
17
|
-
* @param args
|
|
18
|
-
*/
|
|
19
|
-
availableStatusListEntries(args: IStatusListEntryAvailableArgs): Promise<number[]>;
|
|
20
|
-
addStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
|
|
21
|
-
updateStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
|
|
22
|
-
getStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<StatusListEntryEntity | undefined>;
|
|
23
|
-
removeStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<boolean>;
|
|
24
|
-
getStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<StatusListEntryEntity | undefined>;
|
|
25
|
-
removeStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<boolean>;
|
|
26
|
-
getStatusListEntries(args: IGetStatusListEntriesArgs): Promise<StatusListEntryEntity[]>;
|
|
27
|
-
getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
|
|
28
|
-
getStatusLists(args: IGetStatusListsArgs): Promise<Array<IStatusListEntity>>;
|
|
29
|
-
addStatusList(args: IAddStatusListArgs): Promise<IStatusListEntity>;
|
|
30
|
-
updateStatusList(args: IUpdateStatusListIndexArgs): Promise<IStatusListEntity>;
|
|
31
|
-
removeStatusList(args: IRemoveStatusListArgs): Promise<void>;
|
|
32
|
-
private getDS;
|
|
33
|
-
getStatusListRepo(): Promise<Repository<StatusListEntity>>;
|
|
34
|
-
getStatusListEntryRepo(): Promise<Repository<StatusListEntryEntity>>;
|
|
35
|
-
}
|
|
1
|
+
import { OrPromise } from '@sphereon/ssi-types';
|
|
2
|
+
import { DataSource, Repository } from 'typeorm';
|
|
3
|
+
import { StatusListEntity } from '../entities/statusList2021/StatusList2021Entity';
|
|
4
|
+
import { StatusListEntryEntity } from '../entities/statusList2021/StatusList2021EntryEntity';
|
|
5
|
+
import { IAddStatusListArgs, IAddStatusListEntryArgs, IGetStatusListArgs, IGetStatusListEntriesArgs, IGetStatusListEntryByCredentialIdArgs, IGetStatusListEntryByIndexArgs, IGetStatusListsArgs, IRemoveStatusListArgs, IStatusListEntryAvailableArgs, IUpdateStatusListIndexArgs, IStatusListEntity, IStatusListEntryEntity } from '../types';
|
|
6
|
+
import { IStatusListStore } from './IStatusListStore';
|
|
7
|
+
export declare class StatusListStore implements IStatusListStore {
|
|
8
|
+
private readonly _dbConnection;
|
|
9
|
+
constructor(dbConnection: OrPromise<DataSource>);
|
|
10
|
+
/**
|
|
11
|
+
* Get's the available status list indices from the provided indices. Meaning it will filter out any index that is already known.
|
|
12
|
+
*
|
|
13
|
+
* The idea is that the caller provides a set of random status list indices. We can relatively easy check against the DB in an optimized way.
|
|
14
|
+
* If the status list is large it is probably best ot also provide at least a good number of indices. So something like 10 or 20 values.
|
|
15
|
+
* Callers are also expected to call this function multiple times if it does not yield results
|
|
16
|
+
*
|
|
17
|
+
* @param args
|
|
18
|
+
*/
|
|
19
|
+
availableStatusListEntries(args: IStatusListEntryAvailableArgs): Promise<number[]>;
|
|
20
|
+
addStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
|
|
21
|
+
updateStatusListEntry(args: IAddStatusListEntryArgs): Promise<IStatusListEntryEntity>;
|
|
22
|
+
getStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<StatusListEntryEntity | undefined>;
|
|
23
|
+
removeStatusListEntryByIndex(args: IGetStatusListEntryByIndexArgs): Promise<boolean>;
|
|
24
|
+
getStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<StatusListEntryEntity | undefined>;
|
|
25
|
+
removeStatusListEntryByCredentialId(args: IGetStatusListEntryByCredentialIdArgs): Promise<boolean>;
|
|
26
|
+
getStatusListEntries(args: IGetStatusListEntriesArgs): Promise<StatusListEntryEntity[]>;
|
|
27
|
+
getStatusList(args: IGetStatusListArgs): Promise<IStatusListEntity>;
|
|
28
|
+
getStatusLists(args: IGetStatusListsArgs): Promise<Array<IStatusListEntity>>;
|
|
29
|
+
addStatusList(args: IAddStatusListArgs): Promise<IStatusListEntity>;
|
|
30
|
+
updateStatusList(args: IUpdateStatusListIndexArgs): Promise<IStatusListEntity>;
|
|
31
|
+
removeStatusList(args: IRemoveStatusListArgs): Promise<void>;
|
|
32
|
+
private getDS;
|
|
33
|
+
getStatusListRepo(): Promise<Repository<StatusListEntity>>;
|
|
34
|
+
getStatusListEntryRepo(): Promise<Repository<StatusListEntryEntity>>;
|
|
35
|
+
}
|
|
36
36
|
//# sourceMappingURL=StatusListStore.d.ts.map
|