@sphereon/ssi-sdk.data-store 0.18.2-next.3 → 0.18.2-unstable.10
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/ContactEntity.d.ts +16 -0
- package/dist/entities/contact/ContactEntity.d.ts.map +1 -0
- package/dist/entities/contact/ContactEntity.js +164 -0
- package/dist/entities/contact/ContactEntity.js.map +1 -0
- 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/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/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 +41 -41
- package/dist/index.js +127 -127
- 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/1-CreateIssuanceBranding.d.ts +7 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.d.ts.map +1 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.js +96 -0
- package/dist/migrations/generic/1-CreateIssuanceBranding.js.map +1 -0
- package/dist/migrations/generic/2-CreateContacts.d.ts +7 -0
- package/dist/migrations/generic/2-CreateContacts.d.ts.map +1 -0
- package/dist/migrations/generic/2-CreateContacts.js +78 -0
- package/dist/migrations/generic/2-CreateContacts.js.map +1 -0
- 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/3-CreateStatusList.d.ts +7 -0
- package/dist/migrations/generic/3-CreateStatusList.d.ts.map +1 -0
- package/dist/migrations/generic/3-CreateStatusList.js +72 -0
- package/dist/migrations/generic/3-CreateStatusList.js.map +1 -0
- 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/index.d.ts +16 -16
- package/dist/migrations/generic/index.js +27 -27
- package/dist/migrations/index.d.ts +1 -1
- package/dist/migrations/index.js +5 -5
- 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/CreateStatusList1693866470001-CreateStatusList.d.ts +7 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.d.ts.map +1 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js +32 -0
- package/dist/migrations/postgres/CreateStatusList1693866470001-CreateStatusList.js.map +1 -0
- package/dist/migrations/postgres/uuid.d.ts +3 -0
- package/dist/migrations/postgres/uuid.d.ts.map +1 -0
- package/dist/migrations/postgres/uuid.js +25 -0
- package/dist/migrations/postgres/uuid.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/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 +9 -9
- package/dist/types/index.js +25 -25
- 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/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/package.json +4 -4
- package/src/__tests__/eventLogger.entities.test.ts +73 -73
- package/src/__tests__/eventLogger.store.test.ts +136 -136
- 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/eventLogger/AbstractEventLoggerStore.ts +7 -7
- package/src/eventLogger/EventLoggerStore.ts +62 -62
- package/src/index.ts +113 -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/index.ts +27 -27
- package/src/migrations/postgres/1693866470001-CreateStatusList.ts +24 -24
- package/src/migrations/postgres/1701634812183-CreateAuditEvents.ts +33 -33
- package/src/migrations/sqlite/1690925872693-CreateContacts.ts +163 -163
- package/src/migrations/sqlite/1701634819487-CreateAuditEvents.ts +15 -15
- package/src/types/eventLogger/IAbstractEventLoggerStore.ts +12 -12
- package/src/types/eventLogger/eventLogger.ts +3 -3
- package/src/types/index.ts +9 -9
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
import { IBasicTextAttributes } from '../../types';
|
|
3
|
-
export declare class TextAttributesEntity extends BaseEntity {
|
|
4
|
-
id: string;
|
|
5
|
-
color?: string;
|
|
6
|
-
validate(): Promise<undefined>;
|
|
7
|
-
}
|
|
8
|
-
export declare const textAttributesEntityFrom: (args: IBasicTextAttributes) => TextAttributesEntity;
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { IBasicTextAttributes } from '../../types';
|
|
3
|
+
export declare class TextAttributesEntity extends BaseEntity {
|
|
4
|
+
id: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
validate(): Promise<undefined>;
|
|
7
|
+
}
|
|
8
|
+
export declare const textAttributesEntityFrom: (args: IBasicTextAttributes) => TextAttributesEntity;
|
|
9
9
|
//# sourceMappingURL=TextAttributesEntity.d.ts.map
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
-
exports.textAttributesEntityFrom = exports.TextAttributesEntity = void 0;
|
|
22
|
-
const typeorm_1 = require("typeorm");
|
|
23
|
-
const class_validator_1 = require("class-validator");
|
|
24
|
-
const validators_1 = require("../validators");
|
|
25
|
-
let TextAttributesEntity = class TextAttributesEntity extends typeorm_1.BaseEntity {
|
|
26
|
-
validate() {
|
|
27
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
const validation = yield (0, class_validator_1.validate)(this);
|
|
29
|
-
if (validation.length > 0) {
|
|
30
|
-
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
31
|
-
}
|
|
32
|
-
return;
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
__decorate([
|
|
37
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
38
|
-
__metadata("design:type", String)
|
|
39
|
-
], TextAttributesEntity.prototype, "id", void 0);
|
|
40
|
-
__decorate([
|
|
41
|
-
(0, typeorm_1.Column)({ name: 'color', length: 255, nullable: true, unique: false }),
|
|
42
|
-
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank text colors are not allowed' }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], TextAttributesEntity.prototype, "color", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.BeforeInsert)(),
|
|
47
|
-
(0, typeorm_1.BeforeUpdate)(),
|
|
48
|
-
__metadata("design:type", Function),
|
|
49
|
-
__metadata("design:paramtypes", []),
|
|
50
|
-
__metadata("design:returntype", Promise)
|
|
51
|
-
], TextAttributesEntity.prototype, "validate", null);
|
|
52
|
-
TextAttributesEntity = __decorate([
|
|
53
|
-
(0, typeorm_1.Entity)('TextAttributes')
|
|
54
|
-
], TextAttributesEntity);
|
|
55
|
-
exports.TextAttributesEntity = TextAttributesEntity;
|
|
56
|
-
const textAttributesEntityFrom = (args) => {
|
|
57
|
-
const textAttributesEntity = new TextAttributesEntity();
|
|
58
|
-
textAttributesEntity.color = (0, validators_1.isEmptyString)(args.color) ? undefined : args.color;
|
|
59
|
-
return textAttributesEntity;
|
|
60
|
-
};
|
|
61
|
-
exports.textAttributesEntityFrom = textAttributesEntityFrom;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.textAttributesEntityFrom = exports.TextAttributesEntity = void 0;
|
|
22
|
+
const typeorm_1 = require("typeorm");
|
|
23
|
+
const class_validator_1 = require("class-validator");
|
|
24
|
+
const validators_1 = require("../validators");
|
|
25
|
+
let TextAttributesEntity = class TextAttributesEntity extends typeorm_1.BaseEntity {
|
|
26
|
+
validate() {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
const validation = yield (0, class_validator_1.validate)(this);
|
|
29
|
+
if (validation.length > 0) {
|
|
30
|
+
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
31
|
+
}
|
|
32
|
+
return;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], TextAttributesEntity.prototype, "id", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, typeorm_1.Column)({ name: 'color', length: 255, nullable: true, unique: false }),
|
|
42
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank text colors are not allowed' }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], TextAttributesEntity.prototype, "color", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
47
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
48
|
+
__metadata("design:type", Function),
|
|
49
|
+
__metadata("design:paramtypes", []),
|
|
50
|
+
__metadata("design:returntype", Promise)
|
|
51
|
+
], TextAttributesEntity.prototype, "validate", null);
|
|
52
|
+
TextAttributesEntity = __decorate([
|
|
53
|
+
(0, typeorm_1.Entity)('TextAttributes')
|
|
54
|
+
], TextAttributesEntity);
|
|
55
|
+
exports.TextAttributesEntity = TextAttributesEntity;
|
|
56
|
+
const textAttributesEntityFrom = (args) => {
|
|
57
|
+
const textAttributesEntity = new TextAttributesEntity();
|
|
58
|
+
textAttributesEntity.color = (0, validators_1.isEmptyString)(args.color) ? undefined : args.color;
|
|
59
|
+
return textAttributesEntity;
|
|
60
|
+
};
|
|
61
|
+
exports.textAttributesEntityFrom = textAttributesEntityFrom;
|
|
62
62
|
//# sourceMappingURL=TextAttributesEntity.js.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { IIssuer, JwtDecodedVerifiableCredential, StatusListCredentialIdMode, StatusListDriverType, StatusListIndexingDirection, StatusListType, StatusPurpose2021, W3CVerifiableCredential } from '@sphereon/ssi-types';
|
|
2
|
-
import { ProofFormat } from '@veramo/core';
|
|
3
|
-
import { BaseEntity } from 'typeorm';
|
|
4
|
-
import { StatusListEntryEntity } from './StatusList2021EntryEntity';
|
|
5
|
-
export declare class StatusListEntity extends BaseEntity {
|
|
6
|
-
id: string;
|
|
7
|
-
correlationId: string;
|
|
8
|
-
length: number;
|
|
9
|
-
issuer: string | IIssuer;
|
|
10
|
-
type: StatusListType;
|
|
11
|
-
driverType: StatusListDriverType;
|
|
12
|
-
credentialIdMode: StatusListCredentialIdMode;
|
|
13
|
-
proofFormat: ProofFormat;
|
|
14
|
-
indexingDirection: StatusListIndexingDirection;
|
|
15
|
-
statusPurpose: StatusPurpose2021;
|
|
16
|
-
statusListCredential?: W3CVerifiableCredential | JwtDecodedVerifiableCredential;
|
|
17
|
-
statusListEntries: StatusListEntryEntity[];
|
|
18
|
-
}
|
|
1
|
+
import { IIssuer, JwtDecodedVerifiableCredential, StatusListCredentialIdMode, StatusListDriverType, StatusListIndexingDirection, StatusListType, StatusPurpose2021, W3CVerifiableCredential } from '@sphereon/ssi-types';
|
|
2
|
+
import { ProofFormat } from '@veramo/core';
|
|
3
|
+
import { BaseEntity } from 'typeorm';
|
|
4
|
+
import { StatusListEntryEntity } from './StatusList2021EntryEntity';
|
|
5
|
+
export declare class StatusListEntity extends BaseEntity {
|
|
6
|
+
id: string;
|
|
7
|
+
correlationId: string;
|
|
8
|
+
length: number;
|
|
9
|
+
issuer: string | IIssuer;
|
|
10
|
+
type: StatusListType;
|
|
11
|
+
driverType: StatusListDriverType;
|
|
12
|
+
credentialIdMode: StatusListCredentialIdMode;
|
|
13
|
+
proofFormat: ProofFormat;
|
|
14
|
+
indexingDirection: StatusListIndexingDirection;
|
|
15
|
+
statusPurpose: StatusPurpose2021;
|
|
16
|
+
statusListCredential?: W3CVerifiableCredential | JwtDecodedVerifiableCredential;
|
|
17
|
+
statusListEntries: StatusListEntryEntity[];
|
|
18
|
+
}
|
|
19
19
|
//# sourceMappingURL=StatusList2021Entity.d.ts.map
|
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.StatusListEntity = void 0;
|
|
13
|
-
const ssi_types_1 = require("@sphereon/ssi-types");
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
const StatusList2021EntryEntity_1 = require("./StatusList2021EntryEntity");
|
|
16
|
-
let StatusListEntity = class StatusListEntity extends typeorm_1.BaseEntity {
|
|
17
|
-
};
|
|
18
|
-
__decorate([
|
|
19
|
-
(0, typeorm_1.PrimaryColumn)({ name: 'id', type: 'varchar' }),
|
|
20
|
-
__metadata("design:type", String)
|
|
21
|
-
], StatusListEntity.prototype, "id", void 0);
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, typeorm_1.Column)({ name: 'correlationId', type: 'varchar', nullable: false }),
|
|
24
|
-
__metadata("design:type", String)
|
|
25
|
-
], StatusListEntity.prototype, "correlationId", void 0);
|
|
26
|
-
__decorate([
|
|
27
|
-
(0, typeorm_1.Column)({ name: 'length', nullable: false, unique: false }),
|
|
28
|
-
__metadata("design:type", Number)
|
|
29
|
-
], StatusListEntity.prototype, "length", void 0);
|
|
30
|
-
__decorate([
|
|
31
|
-
(0, typeorm_1.Column)({
|
|
32
|
-
name: 'issuer',
|
|
33
|
-
type: 'text',
|
|
34
|
-
nullable: false,
|
|
35
|
-
unique: false,
|
|
36
|
-
transformer: {
|
|
37
|
-
from(value) {
|
|
38
|
-
var _a;
|
|
39
|
-
if ((_a = value === null || value === void 0 ? void 0 : value.trim()) === null || _a === void 0 ? void 0 : _a.startsWith('{')) {
|
|
40
|
-
return JSON.parse(value);
|
|
41
|
-
}
|
|
42
|
-
return value;
|
|
43
|
-
},
|
|
44
|
-
to(value) {
|
|
45
|
-
if (typeof value === 'string') {
|
|
46
|
-
return value;
|
|
47
|
-
}
|
|
48
|
-
return JSON.stringify(value);
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
}),
|
|
52
|
-
__metadata("design:type", Object)
|
|
53
|
-
], StatusListEntity.prototype, "issuer", void 0);
|
|
54
|
-
__decorate([
|
|
55
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'type', enum: ssi_types_1.StatusListType, nullable: false, default: ssi_types_1.StatusListType.StatusList2021 }),
|
|
56
|
-
__metadata("design:type", String)
|
|
57
|
-
], StatusListEntity.prototype, "type", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'driverType', enum: ssi_types_1.StatusListDriverType, nullable: false, default: ssi_types_1.StatusListDriverType.AGENT_TYPEORM }),
|
|
60
|
-
__metadata("design:type", String)
|
|
61
|
-
], StatusListEntity.prototype, "driverType", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, typeorm_1.Column)('simple-enum', {
|
|
64
|
-
name: 'credentialIdMode',
|
|
65
|
-
enum: ssi_types_1.StatusListCredentialIdMode,
|
|
66
|
-
nullable: false,
|
|
67
|
-
default: ssi_types_1.StatusListCredentialIdMode.ISSUANCE,
|
|
68
|
-
}),
|
|
69
|
-
__metadata("design:type", String)
|
|
70
|
-
], StatusListEntity.prototype, "credentialIdMode", void 0);
|
|
71
|
-
__decorate([
|
|
72
|
-
(0, typeorm_1.Column)({ type: 'varchar', name: 'proofFormat', enum: ['lds', 'jwt'], nullable: false, default: 'lds' }),
|
|
73
|
-
__metadata("design:type", String)
|
|
74
|
-
], StatusListEntity.prototype, "proofFormat", void 0);
|
|
75
|
-
__decorate([
|
|
76
|
-
(0, typeorm_1.Column)({ type: 'varchar', name: 'indexingDirection', enum: ['rightToLeft'], nullable: false, default: 'rightToLeft' }),
|
|
77
|
-
__metadata("design:type", String)
|
|
78
|
-
], StatusListEntity.prototype, "indexingDirection", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
(0, typeorm_1.Column)({ type: 'varchar', name: 'statusPurpose', nullable: false, default: 'revocation' }),
|
|
81
|
-
__metadata("design:type", String)
|
|
82
|
-
], StatusListEntity.prototype, "statusPurpose", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
(0, typeorm_1.Column)({
|
|
85
|
-
name: 'statusListCredential',
|
|
86
|
-
type: 'text',
|
|
87
|
-
nullable: true,
|
|
88
|
-
unique: false,
|
|
89
|
-
transformer: {
|
|
90
|
-
from(value) {
|
|
91
|
-
if (value === null || value === void 0 ? void 0 : value.startsWith('ey')) {
|
|
92
|
-
return value;
|
|
93
|
-
}
|
|
94
|
-
return JSON.parse(value);
|
|
95
|
-
},
|
|
96
|
-
to(value) {
|
|
97
|
-
if (typeof value === 'string') {
|
|
98
|
-
return value;
|
|
99
|
-
}
|
|
100
|
-
return JSON.stringify(value);
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
}),
|
|
104
|
-
__metadata("design:type", Object)
|
|
105
|
-
], StatusListEntity.prototype, "statusListCredential", void 0);
|
|
106
|
-
__decorate([
|
|
107
|
-
(0, typeorm_1.OneToMany)((type) => StatusList2021EntryEntity_1.StatusListEntryEntity, (entry) => entry.statusList),
|
|
108
|
-
__metadata("design:type", Array)
|
|
109
|
-
], StatusListEntity.prototype, "statusListEntries", void 0);
|
|
110
|
-
StatusListEntity = __decorate([
|
|
111
|
-
(0, typeorm_1.Entity)('StatusList'),
|
|
112
|
-
(0, typeorm_1.Unique)('UQ_correlationId', ['correlationId'])
|
|
113
|
-
], StatusListEntity);
|
|
114
|
-
exports.StatusListEntity = StatusListEntity;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StatusListEntity = void 0;
|
|
13
|
+
const ssi_types_1 = require("@sphereon/ssi-types");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const StatusList2021EntryEntity_1 = require("./StatusList2021EntryEntity");
|
|
16
|
+
let StatusListEntity = class StatusListEntity extends typeorm_1.BaseEntity {
|
|
17
|
+
};
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, typeorm_1.PrimaryColumn)({ name: 'id', type: 'varchar' }),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], StatusListEntity.prototype, "id", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)({ name: 'correlationId', type: 'varchar', nullable: false }),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], StatusListEntity.prototype, "correlationId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)({ name: 'length', nullable: false, unique: false }),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], StatusListEntity.prototype, "length", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)({
|
|
32
|
+
name: 'issuer',
|
|
33
|
+
type: 'text',
|
|
34
|
+
nullable: false,
|
|
35
|
+
unique: false,
|
|
36
|
+
transformer: {
|
|
37
|
+
from(value) {
|
|
38
|
+
var _a;
|
|
39
|
+
if ((_a = value === null || value === void 0 ? void 0 : value.trim()) === null || _a === void 0 ? void 0 : _a.startsWith('{')) {
|
|
40
|
+
return JSON.parse(value);
|
|
41
|
+
}
|
|
42
|
+
return value;
|
|
43
|
+
},
|
|
44
|
+
to(value) {
|
|
45
|
+
if (typeof value === 'string') {
|
|
46
|
+
return value;
|
|
47
|
+
}
|
|
48
|
+
return JSON.stringify(value);
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
}),
|
|
52
|
+
__metadata("design:type", Object)
|
|
53
|
+
], StatusListEntity.prototype, "issuer", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'type', enum: ssi_types_1.StatusListType, nullable: false, default: ssi_types_1.StatusListType.StatusList2021 }),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], StatusListEntity.prototype, "type", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'driverType', enum: ssi_types_1.StatusListDriverType, nullable: false, default: ssi_types_1.StatusListDriverType.AGENT_TYPEORM }),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], StatusListEntity.prototype, "driverType", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, typeorm_1.Column)('simple-enum', {
|
|
64
|
+
name: 'credentialIdMode',
|
|
65
|
+
enum: ssi_types_1.StatusListCredentialIdMode,
|
|
66
|
+
nullable: false,
|
|
67
|
+
default: ssi_types_1.StatusListCredentialIdMode.ISSUANCE,
|
|
68
|
+
}),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], StatusListEntity.prototype, "credentialIdMode", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ type: 'varchar', name: 'proofFormat', enum: ['lds', 'jwt'], nullable: false, default: 'lds' }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], StatusListEntity.prototype, "proofFormat", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.Column)({ type: 'varchar', name: 'indexingDirection', enum: ['rightToLeft'], nullable: false, default: 'rightToLeft' }),
|
|
77
|
+
__metadata("design:type", String)
|
|
78
|
+
], StatusListEntity.prototype, "indexingDirection", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, typeorm_1.Column)({ type: 'varchar', name: 'statusPurpose', nullable: false, default: 'revocation' }),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], StatusListEntity.prototype, "statusPurpose", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, typeorm_1.Column)({
|
|
85
|
+
name: 'statusListCredential',
|
|
86
|
+
type: 'text',
|
|
87
|
+
nullable: true,
|
|
88
|
+
unique: false,
|
|
89
|
+
transformer: {
|
|
90
|
+
from(value) {
|
|
91
|
+
if (value === null || value === void 0 ? void 0 : value.startsWith('ey')) {
|
|
92
|
+
return value;
|
|
93
|
+
}
|
|
94
|
+
return JSON.parse(value);
|
|
95
|
+
},
|
|
96
|
+
to(value) {
|
|
97
|
+
if (typeof value === 'string') {
|
|
98
|
+
return value;
|
|
99
|
+
}
|
|
100
|
+
return JSON.stringify(value);
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
}),
|
|
104
|
+
__metadata("design:type", Object)
|
|
105
|
+
], StatusListEntity.prototype, "statusListCredential", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, typeorm_1.OneToMany)((type) => StatusList2021EntryEntity_1.StatusListEntryEntity, (entry) => entry.statusList),
|
|
108
|
+
__metadata("design:type", Array)
|
|
109
|
+
], StatusListEntity.prototype, "statusListEntries", void 0);
|
|
110
|
+
StatusListEntity = __decorate([
|
|
111
|
+
(0, typeorm_1.Entity)('StatusList'),
|
|
112
|
+
(0, typeorm_1.Unique)('UQ_correlationId', ['correlationId'])
|
|
113
|
+
], StatusListEntity);
|
|
114
|
+
exports.StatusListEntity = StatusListEntity;
|
|
115
115
|
//# sourceMappingURL=StatusList2021Entity.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
import { StatusListEntity } from './StatusList2021Entity';
|
|
3
|
-
export declare class StatusListEntryEntity extends BaseEntity {
|
|
4
|
-
statusList: StatusListEntity;
|
|
5
|
-
statusListIndex: number;
|
|
6
|
-
credentialId?: string;
|
|
7
|
-
credentialHash?: string;
|
|
8
|
-
correlationId?: string;
|
|
9
|
-
value?: string;
|
|
10
|
-
}
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { StatusListEntity } from './StatusList2021Entity';
|
|
3
|
+
export declare class StatusListEntryEntity extends BaseEntity {
|
|
4
|
+
statusList: StatusListEntity;
|
|
5
|
+
statusListIndex: number;
|
|
6
|
+
credentialId?: string;
|
|
7
|
+
credentialHash?: string;
|
|
8
|
+
correlationId?: string;
|
|
9
|
+
value?: string;
|
|
10
|
+
}
|
|
11
11
|
//# sourceMappingURL=StatusList2021EntryEntity.d.ts.map
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.StatusListEntryEntity = void 0;
|
|
13
|
-
const class_validator_1 = require("class-validator");
|
|
14
|
-
const typeorm_1 = require("typeorm");
|
|
15
|
-
const validators_1 = require("../validators");
|
|
16
|
-
const StatusList2021Entity_1 = require("./StatusList2021Entity");
|
|
17
|
-
let StatusListEntryEntity = class StatusListEntryEntity extends typeorm_1.BaseEntity {
|
|
18
|
-
};
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.PrimaryColumn)({ name: 'statusListId', type: 'varchar' }),
|
|
21
|
-
(0, typeorm_1.ManyToOne)(() => StatusList2021Entity_1.StatusListEntity, (statusList) => statusList.statusListEntries),
|
|
22
|
-
__metadata("design:type", StatusList2021Entity_1.StatusListEntity)
|
|
23
|
-
], StatusListEntryEntity.prototype, "statusList", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, typeorm_1.PrimaryColumn)({ name: 'statusListIndex', nullable: false, unique: false }),
|
|
26
|
-
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Status list index is required' }),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], StatusListEntryEntity.prototype, "statusListIndex", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ name: 'credentialId', nullable: true }),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], StatusListEntryEntity.prototype, "credentialId", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)({ name: 'credentialHash', length: 128, nullable: true, unique: false }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], StatusListEntryEntity.prototype, "credentialHash", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)({ name: 'correlationId', length: 255, nullable: true, unique: false }),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], StatusListEntryEntity.prototype, "correlationId", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ name: 'value', length: 50, nullable: true, unique: false }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], StatusListEntryEntity.prototype, "value", void 0);
|
|
45
|
-
StatusListEntryEntity = __decorate([
|
|
46
|
-
(0, typeorm_1.Entity)('StatusListEntry')
|
|
47
|
-
// @Unique('uq_credential_statuslist', ['statusList', 'credentialId']) // disabled because one prop can be null
|
|
48
|
-
// @Unique('uq_credentialHash_statuslistId', ['statusList', 'credentialHash']) // disabled because one prop can be null
|
|
49
|
-
], StatusListEntryEntity);
|
|
50
|
-
exports.StatusListEntryEntity = StatusListEntryEntity;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StatusListEntryEntity = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const validators_1 = require("../validators");
|
|
16
|
+
const StatusList2021Entity_1 = require("./StatusList2021Entity");
|
|
17
|
+
let StatusListEntryEntity = class StatusListEntryEntity extends typeorm_1.BaseEntity {
|
|
18
|
+
};
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, typeorm_1.PrimaryColumn)({ name: 'statusListId', type: 'varchar' }),
|
|
21
|
+
(0, typeorm_1.ManyToOne)(() => StatusList2021Entity_1.StatusListEntity, (statusList) => statusList.statusListEntries),
|
|
22
|
+
__metadata("design:type", StatusList2021Entity_1.StatusListEntity)
|
|
23
|
+
], StatusListEntryEntity.prototype, "statusList", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, typeorm_1.PrimaryColumn)({ name: 'statusListIndex', nullable: false, unique: false }),
|
|
26
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Status list index is required' }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], StatusListEntryEntity.prototype, "statusListIndex", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ name: 'credentialId', nullable: true }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], StatusListEntryEntity.prototype, "credentialId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)({ name: 'credentialHash', length: 128, nullable: true, unique: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], StatusListEntryEntity.prototype, "credentialHash", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)({ name: 'correlationId', length: 255, nullable: true, unique: false }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], StatusListEntryEntity.prototype, "correlationId", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ name: 'value', length: 50, nullable: true, unique: false }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], StatusListEntryEntity.prototype, "value", void 0);
|
|
45
|
+
StatusListEntryEntity = __decorate([
|
|
46
|
+
(0, typeorm_1.Entity)('StatusListEntry')
|
|
47
|
+
// @Unique('uq_credential_statuslist', ['statusList', 'credentialId']) // disabled because one prop can be null
|
|
48
|
+
// @Unique('uq_credentialHash_statuslistId', ['statusList', 'credentialHash']) // disabled because one prop can be null
|
|
49
|
+
], StatusListEntryEntity);
|
|
50
|
+
exports.StatusListEntryEntity = StatusListEntryEntity;
|
|
51
51
|
//# sourceMappingURL=StatusList2021EntryEntity.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
-
export declare class IsNonEmptyStringConstraint implements ValidatorConstraintInterface {
|
|
3
|
-
validate(value: string, args: ValidationArguments): boolean;
|
|
4
|
-
defaultMessage(args: ValidationArguments): string;
|
|
5
|
-
}
|
|
6
|
-
export declare const isEmptyString: (value: any) => boolean;
|
|
1
|
+
import { ValidationArguments, ValidatorConstraintInterface } from 'class-validator';
|
|
2
|
+
export declare class IsNonEmptyStringConstraint implements ValidatorConstraintInterface {
|
|
3
|
+
validate(value: string, args: ValidationArguments): boolean;
|
|
4
|
+
defaultMessage(args: ValidationArguments): string;
|
|
5
|
+
}
|
|
6
|
+
export declare const isEmptyString: (value: any) => boolean;
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.isEmptyString = exports.IsNonEmptyStringConstraint = void 0;
|
|
10
|
-
const class_validator_1 = require("class-validator");
|
|
11
|
-
let IsNonEmptyStringConstraint = class IsNonEmptyStringConstraint {
|
|
12
|
-
validate(value, args) {
|
|
13
|
-
return !(0, exports.isEmptyString)(value);
|
|
14
|
-
}
|
|
15
|
-
defaultMessage(args) {
|
|
16
|
-
return `${args.property} must not be an empty string.`;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
IsNonEmptyStringConstraint = __decorate([
|
|
20
|
-
(0, class_validator_1.ValidatorConstraint)({ name: 'isNonEmptyString', async: false })
|
|
21
|
-
], IsNonEmptyStringConstraint);
|
|
22
|
-
exports.IsNonEmptyStringConstraint = IsNonEmptyStringConstraint;
|
|
23
|
-
const isEmptyString = (value) => {
|
|
24
|
-
return typeof value === 'string' && value.trim().length === 0;
|
|
25
|
-
};
|
|
26
|
-
exports.isEmptyString = isEmptyString;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.isEmptyString = exports.IsNonEmptyStringConstraint = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
let IsNonEmptyStringConstraint = class IsNonEmptyStringConstraint {
|
|
12
|
+
validate(value, args) {
|
|
13
|
+
return !(0, exports.isEmptyString)(value);
|
|
14
|
+
}
|
|
15
|
+
defaultMessage(args) {
|
|
16
|
+
return `${args.property} must not be an empty string.`;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
IsNonEmptyStringConstraint = __decorate([
|
|
20
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'isNonEmptyString', async: false })
|
|
21
|
+
], IsNonEmptyStringConstraint);
|
|
22
|
+
exports.IsNonEmptyStringConstraint = IsNonEmptyStringConstraint;
|
|
23
|
+
const isEmptyString = (value) => {
|
|
24
|
+
return typeof value === 'string' && value.trim().length === 0;
|
|
25
|
+
};
|
|
26
|
+
exports.isEmptyString = isEmptyString;
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { GetAuditEventsArgs, StoreAuditEventArgs } from '../types';
|
|
2
|
-
import { AuditLoggingEvent } from '@sphereon/ssi-sdk.core';
|
|
3
|
-
export declare abstract class AbstractEventLoggerStore {
|
|
4
|
-
abstract getAuditEvents(args: GetAuditEventsArgs): Promise<Array<AuditLoggingEvent>>;
|
|
5
|
-
abstract storeAuditEvent(args: StoreAuditEventArgs): Promise<AuditLoggingEvent>;
|
|
6
|
-
}
|
|
1
|
+
import { GetAuditEventsArgs, StoreAuditEventArgs } from '../types';
|
|
2
|
+
import { AuditLoggingEvent } from '@sphereon/ssi-sdk.core';
|
|
3
|
+
export declare abstract class AbstractEventLoggerStore {
|
|
4
|
+
abstract getAuditEvents(args: GetAuditEventsArgs): Promise<Array<AuditLoggingEvent>>;
|
|
5
|
+
abstract storeAuditEvent(args: StoreAuditEventArgs): Promise<AuditLoggingEvent>;
|
|
6
|
+
}
|
|
7
7
|
//# sourceMappingURL=AbstractEventLoggerStore.d.ts.map
|