@sphereon/ssi-sdk.data-store 0.18.2-unstable.7 → 0.18.2-unstable.85
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 +33 -23
- package/dist/contact/AbstractContactStore.d.ts.map +1 -1
- package/dist/contact/AbstractContactStore.js +6 -6
- package/dist/contact/AbstractContactStore.js.map +1 -1
- package/dist/contact/ContactStore.d.ts +44 -32
- package/dist/contact/ContactStore.d.ts.map +1 -1
- package/dist/contact/ContactStore.js +528 -365
- package/dist/contact/ContactStore.js.map +1 -1
- package/dist/digitalCredential/AbstractDigitalCredentialStore.d.ts +10 -0
- package/dist/digitalCredential/AbstractDigitalCredentialStore.d.ts.map +1 -0
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js +7 -0
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js.map +1 -0
- package/dist/digitalCredential/DigitalCredentialStore.d.ts +15 -0
- package/dist/digitalCredential/DigitalCredentialStore.d.ts.map +1 -0
- package/dist/digitalCredential/DigitalCredentialStore.js +97 -0
- package/dist/digitalCredential/DigitalCredentialStore.js.map +1 -0
- 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 +14 -13
- package/dist/entities/contact/ElectronicAddressEntity.d.ts.map +1 -1
- package/dist/entities/contact/ElectronicAddressEntity.js +95 -91
- package/dist/entities/contact/ElectronicAddressEntity.js.map +1 -1
- package/dist/entities/contact/IdentityEntity.d.ts +20 -20
- package/dist/entities/contact/IdentityEntity.d.ts.map +1 -1
- 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 +21 -19
- package/dist/entities/contact/PartyEntity.d.ts.map +1 -1
- package/dist/entities/contact/PartyEntity.js +142 -131
- package/dist/entities/contact/PartyEntity.js.map +1 -1
- 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/contact/PhysicalAddressEntity.d.ts +21 -0
- package/dist/entities/contact/PhysicalAddressEntity.d.ts.map +1 -0
- package/dist/entities/contact/PhysicalAddressEntity.js +126 -0
- package/dist/entities/contact/PhysicalAddressEntity.js.map +1 -0
- package/dist/entities/digitalCredential/DigitalCredentialEntity.d.ts +23 -0
- package/dist/entities/digitalCredential/DigitalCredentialEntity.d.ts.map +1 -0
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js +93 -0
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js.map +1 -0
- 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/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 +143 -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.d.ts.map +1 -1
- package/dist/issuanceBranding/IssuanceBrandingStore.js +390 -374
- package/dist/issuanceBranding/IssuanceBrandingStore.js.map +1 -1
- 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-CreateDigitalCredential.d.ts} +2 -2
- package/dist/migrations/generic/6-CreateDigitalCredential.d.ts.map +1 -0
- package/dist/migrations/generic/{2-CreateContacts.js → 6-CreateDigitalCredential.js} +23 -23
- package/dist/migrations/generic/6-CreateDigitalCredential.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/{generic/3-CreateStatusList.d.ts → postgres/1708525189001-CreateDigitalCredential.d.ts} +2 -2
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.d.ts.map +1 -0
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js +59 -0
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.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.d.ts.map +1 -1
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js +104 -107
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -1
- 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/{postgres/CreateStatusList1693866470001-CreateStatusList.d.ts → sqlite/1708525189002-CreateDigitalCredential.d.ts} +2 -2
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.d.ts.map +1 -0
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js +50 -0
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.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 +109 -74
- package/dist/types/contact/IAbstractContactStore.d.ts.map +1 -1
- package/dist/types/contact/IAbstractContactStore.js +2 -2
- package/dist/types/contact/contact.d.ts +196 -173
- package/dist/types/contact/contact.d.ts.map +1 -1
- package/dist/types/contact/contact.js +25 -25
- package/dist/types/contact/contact.js.map +1 -1
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.d.ts +27 -0
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.d.ts.map +1 -0
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js +3 -0
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js.map +1 -0
- package/dist/types/digitalCredential/digitalCredential.d.ts +41 -0
- package/dist/types/digitalCredential/digitalCredential.d.ts.map +1 -0
- package/dist/types/digitalCredential/digitalCredential.js +28 -0
- package/dist/types/digitalCredential/digitalCredential.js.map +1 -0
- 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 +49 -46
- package/dist/utils/contact/MappingUtils.d.ts.map +1 -1
- package/dist/utils/contact/MappingUtils.js +326 -290
- package/dist/utils/contact/MappingUtils.js.map +1 -1
- package/dist/utils/digitalCredential/MappingUtils.d.ts +9 -0
- package/dist/utils/digitalCredential/MappingUtils.d.ts.map +1 -0
- package/dist/utils/digitalCredential/MappingUtils.js +92 -0
- package/dist/utils/digitalCredential/MappingUtils.js.map +1 -0
- package/package.json +5 -4
- package/src/__tests__/contact.entities.test.ts +323 -23
- package/src/__tests__/contact.store.test.ts +586 -10
- package/src/__tests__/digitalCredential.entities.test.ts +247 -0
- package/src/__tests__/digitalCredential.store.test.ts +194 -0
- package/src/__tests__/eventLogger.entities.test.ts +73 -73
- package/src/__tests__/eventLogger.store.test.ts +136 -136
- package/src/contact/AbstractContactStore.ts +38 -17
- package/src/contact/ContactStore.ts +715 -501
- package/src/digitalCredential/AbstractDigitalCredentialStore.ts +16 -0
- package/src/digitalCredential/DigitalCredentialStore.ts +107 -0
- package/src/entities/contact/ElectronicAddressEntity.ts +3 -0
- package/src/entities/contact/IdentityEntity.ts +1 -1
- package/src/entities/contact/PartyEntity.ts +11 -1
- package/src/entities/contact/PhysicalAddressEntity.ts +87 -0
- package/src/entities/digitalCredential/DigitalCredentialEntity.ts +64 -0
- 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 +131 -113
- package/src/issuanceBranding/IssuanceBrandingStore.ts +78 -62
- 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-CreateDigitalCredential.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/1708525189001-CreateDigitalCredential.ts +44 -0
- package/src/migrations/sqlite/1690925872693-CreateContacts.ts +158 -163
- package/src/migrations/sqlite/1701634819487-CreateAuditEvents.ts +15 -15
- package/src/migrations/sqlite/1708525189002-CreateDigitalCredential.ts +34 -0
- package/src/types/contact/IAbstractContactStore.ts +58 -8
- package/src/types/contact/contact.ts +29 -4
- package/src/types/digitalCredential/IAbstractDigitalCredentialStore.ts +26 -0
- package/src/types/digitalCredential/digitalCredential.ts +45 -0
- package/src/types/eventLogger/IAbstractEventLoggerStore.ts +12 -12
- package/src/types/eventLogger/eventLogger.ts +3 -3
- package/src/types/index.ts +9 -9
- package/src/utils/contact/MappingUtils.ts +39 -1
- package/src/utils/digitalCredential/MappingUtils.ts +112 -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.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.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
|
@@ -0,0 +1,93 @@
|
|
|
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.DigitalCredentialEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const digitalCredential_1 = require("../../types/digitalCredential/digitalCredential");
|
|
15
|
+
let DigitalCredentialEntity = class DigitalCredentialEntity extends typeorm_1.BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], DigitalCredentialEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'credential_type', enum: digitalCredential_1.CredentialType, nullable: false }),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], DigitalCredentialEntity.prototype, "credentialType", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'document_format', enum: digitalCredential_1.CredentialDocumentFormat, nullable: false }),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], DigitalCredentialEntity.prototype, "documentFormat", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)('text', { name: 'raw', nullable: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], DigitalCredentialEntity.prototype, "raw", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)('text', { name: 'uniform_document', nullable: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], DigitalCredentialEntity.prototype, "uniformDocument", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)('text', { name: 'hash', nullable: false, unique: true }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], DigitalCredentialEntity.prototype, "hash", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'issuer_correlation_type', enum: digitalCredential_1.CredentialCorrelationType, nullable: false }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], DigitalCredentialEntity.prototype, "issuerCorrelationType", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'subject_correlation_type', enum: digitalCredential_1.CredentialCorrelationType, nullable: true }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], DigitalCredentialEntity.prototype, "subjectCorrelationType", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)('text', { name: 'issuer_correlation_id', nullable: false }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], DigitalCredentialEntity.prototype, "issuerCorrelationId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)('text', { name: 'subject_correlation_id', nullable: true }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], DigitalCredentialEntity.prototype, "subjectCorrelationId", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'verified_state', enum: digitalCredential_1.CredentialStateType, nullable: true }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], DigitalCredentialEntity.prototype, "verifiedState", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)('text', { name: 'tenant_id', nullable: true }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], DigitalCredentialEntity.prototype, "tenantId", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
67
|
+
__metadata("design:type", Date)
|
|
68
|
+
], DigitalCredentialEntity.prototype, "createdAt", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
71
|
+
__metadata("design:type", Date)
|
|
72
|
+
], DigitalCredentialEntity.prototype, "lastUpdatedAt", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)('date', { name: 'expires_at', nullable: true }),
|
|
75
|
+
__metadata("design:type", Date)
|
|
76
|
+
], DigitalCredentialEntity.prototype, "expiresAt", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)('date', { name: 'issued_at', nullable: true }),
|
|
79
|
+
__metadata("design:type", Date)
|
|
80
|
+
], DigitalCredentialEntity.prototype, "issuedAt", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)('date', { name: 'verification_date', nullable: true }),
|
|
83
|
+
__metadata("design:type", Date)
|
|
84
|
+
], DigitalCredentialEntity.prototype, "verificationDate", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)('date', { name: 'revocation_date', nullable: true }),
|
|
87
|
+
__metadata("design:type", Date)
|
|
88
|
+
], DigitalCredentialEntity.prototype, "revocationDate", void 0);
|
|
89
|
+
DigitalCredentialEntity = __decorate([
|
|
90
|
+
(0, typeorm_1.Entity)('DigitalCredential')
|
|
91
|
+
], DigitalCredentialEntity);
|
|
92
|
+
exports.DigitalCredentialEntity = DigitalCredentialEntity;
|
|
93
|
+
//# sourceMappingURL=DigitalCredentialEntity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DigitalCredentialEntity.js","sourceRoot":"","sources":["../../../src/entities/digitalCredential/DigitalCredentialEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgH;AAChH,uFAKwD;AAGjD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,oBAAU;CAsDtD,CAAA;AArDC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;mDACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EAAE,kCAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;;+DAC3D;AAE/B;IAAC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,IAAI,EA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,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC9C,IAAI;0DAAA;AAEhB;IAAC,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;8BAC/C,IAAI;8DAAA;AAEpB;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;0DAAA;AAEhB;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;yDAAA;AAEf;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;iEAAA;AAEvB;IAAC,IAAA,gBAAM,EAAC,MAAM,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;8BAC3C,IAAI;+DAAA;AArDV,uBAAuB;IADnC,IAAA,gBAAM,EAAC,mBAAmB,CAAC;GACf,uBAAuB,CAsDnC;AAtDY,0DAAuB"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
import { ActionType, InitiatorType, LogLevel, PartyCorrelationType, SubSystem, System, SystemCorrelationIdType, ActionSubType } from '@sphereon/ssi-sdk.core';
|
|
3
|
-
import { NonPersistedAuditLoggingEvent } from '../../types';
|
|
4
|
-
export declare class AuditEventEntity extends BaseEntity {
|
|
5
|
-
id: string;
|
|
6
|
-
timestamp: Date;
|
|
7
|
-
level: LogLevel;
|
|
8
|
-
correlationId: string;
|
|
9
|
-
system: System;
|
|
10
|
-
subSystemType: SubSystem;
|
|
11
|
-
actionType: ActionType;
|
|
12
|
-
actionSubType: ActionSubType;
|
|
13
|
-
initiatorType: InitiatorType;
|
|
14
|
-
systemCorrelationIdType?: SystemCorrelationIdType;
|
|
15
|
-
systemCorrelationId?: string;
|
|
16
|
-
systemAlias?: string;
|
|
17
|
-
partyCorrelationType?: PartyCorrelationType;
|
|
18
|
-
partyCorrelationId?: string;
|
|
19
|
-
partyAlias?: string;
|
|
20
|
-
description: string;
|
|
21
|
-
data?: string;
|
|
22
|
-
diagnosticData?: string;
|
|
23
|
-
createdAt: Date;
|
|
24
|
-
lastUpdatedAt: Date;
|
|
25
|
-
}
|
|
26
|
-
export declare const auditEventEntityFrom: (args: NonPersistedAuditLoggingEvent) => AuditEventEntity;
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { ActionType, InitiatorType, LogLevel, PartyCorrelationType, SubSystem, System, SystemCorrelationIdType, ActionSubType } from '@sphereon/ssi-sdk.core';
|
|
3
|
+
import { NonPersistedAuditLoggingEvent } from '../../types';
|
|
4
|
+
export declare class AuditEventEntity extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
timestamp: Date;
|
|
7
|
+
level: LogLevel;
|
|
8
|
+
correlationId: string;
|
|
9
|
+
system: System;
|
|
10
|
+
subSystemType: SubSystem;
|
|
11
|
+
actionType: ActionType;
|
|
12
|
+
actionSubType: ActionSubType;
|
|
13
|
+
initiatorType: InitiatorType;
|
|
14
|
+
systemCorrelationIdType?: SystemCorrelationIdType;
|
|
15
|
+
systemCorrelationId?: string;
|
|
16
|
+
systemAlias?: string;
|
|
17
|
+
partyCorrelationType?: PartyCorrelationType;
|
|
18
|
+
partyCorrelationId?: string;
|
|
19
|
+
partyAlias?: string;
|
|
20
|
+
description: string;
|
|
21
|
+
data?: string;
|
|
22
|
+
diagnosticData?: string;
|
|
23
|
+
createdAt: Date;
|
|
24
|
+
lastUpdatedAt: Date;
|
|
25
|
+
}
|
|
26
|
+
export declare const auditEventEntityFrom: (args: NonPersistedAuditLoggingEvent) => AuditEventEntity;
|
|
27
27
|
//# sourceMappingURL=AuditEventEntity.d.ts.map
|
|
@@ -1,124 +1,124 @@
|
|
|
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.auditEventEntityFrom = exports.AuditEventEntity = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
const ssi_sdk_core_1 = require("@sphereon/ssi-sdk.core");
|
|
15
|
-
let AuditEventEntity = class AuditEventEntity extends typeorm_1.BaseEntity {
|
|
16
|
-
};
|
|
17
|
-
__decorate([
|
|
18
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
19
|
-
__metadata("design:type", String)
|
|
20
|
-
], AuditEventEntity.prototype, "id", void 0);
|
|
21
|
-
__decorate([
|
|
22
|
-
(0, typeorm_1.Column)({ name: 'timestamp', nullable: false, unique: false }),
|
|
23
|
-
__metadata("design:type", Date)
|
|
24
|
-
], AuditEventEntity.prototype, "timestamp", void 0);
|
|
25
|
-
__decorate([
|
|
26
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'level', enum: ssi_sdk_core_1.LogLevel, nullable: false, unique: false }),
|
|
27
|
-
__metadata("design:type", Number)
|
|
28
|
-
], AuditEventEntity.prototype, "level", void 0);
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, typeorm_1.Column)({ name: 'correlationId', nullable: false, unique: false }),
|
|
31
|
-
__metadata("design:type", String)
|
|
32
|
-
], AuditEventEntity.prototype, "correlationId", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'system', enum: ssi_sdk_core_1.System, nullable: false, unique: false }),
|
|
35
|
-
__metadata("design:type", String)
|
|
36
|
-
], AuditEventEntity.prototype, "system", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'subSystemType', enum: ssi_sdk_core_1.SubSystem, nullable: false, unique: false }),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], AuditEventEntity.prototype, "subSystemType", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'actionType', enum: ssi_sdk_core_1.ActionType, nullable: false, unique: false }),
|
|
43
|
-
__metadata("design:type", String)
|
|
44
|
-
], AuditEventEntity.prototype, "actionType", void 0);
|
|
45
|
-
__decorate([
|
|
46
|
-
(0, typeorm_1.Column)({ name: 'actionSubType', nullable: false, unique: false }),
|
|
47
|
-
__metadata("design:type", String)
|
|
48
|
-
], AuditEventEntity.prototype, "actionSubType", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'initiatorType', enum: ssi_sdk_core_1.InitiatorType, nullable: false, unique: false }),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], AuditEventEntity.prototype, "initiatorType", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'systemCorrelationIdType', enum: ssi_sdk_core_1.SystemCorrelationIdType, nullable: true, unique: false }),
|
|
55
|
-
__metadata("design:type", String)
|
|
56
|
-
], AuditEventEntity.prototype, "systemCorrelationIdType", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, typeorm_1.Column)({ name: 'systemCorrelationId', nullable: true, unique: false }),
|
|
59
|
-
__metadata("design:type", String)
|
|
60
|
-
], AuditEventEntity.prototype, "systemCorrelationId", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
(0, typeorm_1.Column)({ name: 'systemAlias', nullable:
|
|
63
|
-
__metadata("design:type", String)
|
|
64
|
-
], AuditEventEntity.prototype, "systemAlias", void 0);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, typeorm_1.Column)('simple-enum', { name: 'partyCorrelationType', enum: ssi_sdk_core_1.PartyCorrelationType, nullable: true, unique: false }),
|
|
67
|
-
__metadata("design:type", String)
|
|
68
|
-
], AuditEventEntity.prototype, "partyCorrelationType", void 0);
|
|
69
|
-
__decorate([
|
|
70
|
-
(0, typeorm_1.Column)({ name: 'partyCorrelationId', nullable: true, unique: false }),
|
|
71
|
-
__metadata("design:type", String)
|
|
72
|
-
], AuditEventEntity.prototype, "partyCorrelationId", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
(0, typeorm_1.Column)({ name: 'partyAlias', nullable: true, unique: false }),
|
|
75
|
-
__metadata("design:type", String)
|
|
76
|
-
], AuditEventEntity.prototype, "partyAlias", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
(0, typeorm_1.Column)({ name: 'description', nullable: false, unique: false }),
|
|
79
|
-
__metadata("design:type", String)
|
|
80
|
-
], AuditEventEntity.prototype, "description", void 0);
|
|
81
|
-
__decorate([
|
|
82
|
-
(0, typeorm_1.Column)({ name: 'data', nullable: true, unique: false }),
|
|
83
|
-
__metadata("design:type", String)
|
|
84
|
-
], AuditEventEntity.prototype, "data", void 0);
|
|
85
|
-
__decorate([
|
|
86
|
-
(0, typeorm_1.Column)({ name: 'diagnosticData', nullable: true, unique: false }),
|
|
87
|
-
__metadata("design:type", String)
|
|
88
|
-
], AuditEventEntity.prototype, "diagnosticData", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
91
|
-
__metadata("design:type", Date)
|
|
92
|
-
], AuditEventEntity.prototype, "createdAt", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
95
|
-
__metadata("design:type", Date)
|
|
96
|
-
], AuditEventEntity.prototype, "lastUpdatedAt", void 0);
|
|
97
|
-
AuditEventEntity = __decorate([
|
|
98
|
-
(0, typeorm_1.Entity)('AuditEvents')
|
|
99
|
-
], AuditEventEntity);
|
|
100
|
-
exports.AuditEventEntity = AuditEventEntity;
|
|
101
|
-
const auditEventEntityFrom = (args) => {
|
|
102
|
-
const auditEventEntity = new AuditEventEntity();
|
|
103
|
-
auditEventEntity.timestamp = args.timestamp;
|
|
104
|
-
auditEventEntity.level = args.level;
|
|
105
|
-
auditEventEntity.correlationId = args.correlationId;
|
|
106
|
-
auditEventEntity.system = args.system;
|
|
107
|
-
auditEventEntity.subSystemType = args.subSystemType;
|
|
108
|
-
auditEventEntity.actionType = args.actionType;
|
|
109
|
-
auditEventEntity.actionSubType = args.actionSubType;
|
|
110
|
-
auditEventEntity.initiatorType = args.initiatorType;
|
|
111
|
-
auditEventEntity.systemCorrelationIdType = args.systemCorrelationIdType;
|
|
112
|
-
auditEventEntity.systemCorrelationId = args.systemCorrelationId;
|
|
113
|
-
auditEventEntity.systemAlias = args.systemAlias;
|
|
114
|
-
auditEventEntity.partyCorrelationType = args.partyCorrelationType;
|
|
115
|
-
auditEventEntity.partyCorrelationId = args.partyCorrelationId;
|
|
116
|
-
auditEventEntity.partyAlias = args.partyAlias;
|
|
117
|
-
auditEventEntity.description = args.description;
|
|
118
|
-
auditEventEntity.partyCorrelationType = args.partyCorrelationType;
|
|
119
|
-
auditEventEntity.data = JSON.stringify(args.data);
|
|
120
|
-
auditEventEntity.diagnosticData = JSON.stringify(args.diagnosticData);
|
|
121
|
-
return auditEventEntity;
|
|
122
|
-
};
|
|
123
|
-
exports.auditEventEntityFrom = auditEventEntityFrom;
|
|
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.auditEventEntityFrom = exports.AuditEventEntity = void 0;
|
|
13
|
+
const typeorm_1 = require("typeorm");
|
|
14
|
+
const ssi_sdk_core_1 = require("@sphereon/ssi-sdk.core");
|
|
15
|
+
let AuditEventEntity = class AuditEventEntity extends typeorm_1.BaseEntity {
|
|
16
|
+
};
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], AuditEventEntity.prototype, "id", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, typeorm_1.Column)({ name: 'timestamp', nullable: false, unique: false }),
|
|
23
|
+
__metadata("design:type", Date)
|
|
24
|
+
], AuditEventEntity.prototype, "timestamp", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'level', enum: ssi_sdk_core_1.LogLevel, nullable: false, unique: false }),
|
|
27
|
+
__metadata("design:type", Number)
|
|
28
|
+
], AuditEventEntity.prototype, "level", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, typeorm_1.Column)({ name: 'correlationId', nullable: false, unique: false }),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], AuditEventEntity.prototype, "correlationId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'system', enum: ssi_sdk_core_1.System, nullable: false, unique: false }),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], AuditEventEntity.prototype, "system", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'subSystemType', enum: ssi_sdk_core_1.SubSystem, nullable: false, unique: false }),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], AuditEventEntity.prototype, "subSystemType", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'actionType', enum: ssi_sdk_core_1.ActionType, nullable: false, unique: false }),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], AuditEventEntity.prototype, "actionType", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, typeorm_1.Column)({ name: 'actionSubType', nullable: false, unique: false }),
|
|
47
|
+
__metadata("design:type", String)
|
|
48
|
+
], AuditEventEntity.prototype, "actionSubType", void 0);
|
|
49
|
+
__decorate([
|
|
50
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'initiatorType', enum: ssi_sdk_core_1.InitiatorType, nullable: false, unique: false }),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], AuditEventEntity.prototype, "initiatorType", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'systemCorrelationIdType', enum: ssi_sdk_core_1.SystemCorrelationIdType, nullable: true, unique: false }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], AuditEventEntity.prototype, "systemCorrelationIdType", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ name: 'systemCorrelationId', nullable: true, unique: false }),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], AuditEventEntity.prototype, "systemCorrelationId", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, typeorm_1.Column)({ name: 'systemAlias', nullable: true, unique: false }),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], AuditEventEntity.prototype, "systemAlias", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, typeorm_1.Column)('simple-enum', { name: 'partyCorrelationType', enum: ssi_sdk_core_1.PartyCorrelationType, nullable: true, unique: false }),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], AuditEventEntity.prototype, "partyCorrelationType", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, typeorm_1.Column)({ name: 'partyCorrelationId', nullable: true, unique: false }),
|
|
71
|
+
__metadata("design:type", String)
|
|
72
|
+
], AuditEventEntity.prototype, "partyCorrelationId", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, typeorm_1.Column)({ name: 'partyAlias', nullable: true, unique: false }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], AuditEventEntity.prototype, "partyAlias", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ name: 'description', nullable: false, unique: false }),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], AuditEventEntity.prototype, "description", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, typeorm_1.Column)({ name: 'data', nullable: true, unique: false }),
|
|
83
|
+
__metadata("design:type", String)
|
|
84
|
+
], AuditEventEntity.prototype, "data", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, typeorm_1.Column)({ name: 'diagnosticData', nullable: true, unique: false }),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], AuditEventEntity.prototype, "diagnosticData", void 0);
|
|
89
|
+
__decorate([
|
|
90
|
+
(0, typeorm_1.CreateDateColumn)({ name: 'created_at', nullable: false }),
|
|
91
|
+
__metadata("design:type", Date)
|
|
92
|
+
], AuditEventEntity.prototype, "createdAt", void 0);
|
|
93
|
+
__decorate([
|
|
94
|
+
(0, typeorm_1.UpdateDateColumn)({ name: 'last_updated_at', nullable: false }),
|
|
95
|
+
__metadata("design:type", Date)
|
|
96
|
+
], AuditEventEntity.prototype, "lastUpdatedAt", void 0);
|
|
97
|
+
AuditEventEntity = __decorate([
|
|
98
|
+
(0, typeorm_1.Entity)('AuditEvents')
|
|
99
|
+
], AuditEventEntity);
|
|
100
|
+
exports.AuditEventEntity = AuditEventEntity;
|
|
101
|
+
const auditEventEntityFrom = (args) => {
|
|
102
|
+
const auditEventEntity = new AuditEventEntity();
|
|
103
|
+
auditEventEntity.timestamp = args.timestamp;
|
|
104
|
+
auditEventEntity.level = args.level;
|
|
105
|
+
auditEventEntity.correlationId = args.correlationId;
|
|
106
|
+
auditEventEntity.system = args.system;
|
|
107
|
+
auditEventEntity.subSystemType = args.subSystemType;
|
|
108
|
+
auditEventEntity.actionType = args.actionType;
|
|
109
|
+
auditEventEntity.actionSubType = args.actionSubType;
|
|
110
|
+
auditEventEntity.initiatorType = args.initiatorType;
|
|
111
|
+
auditEventEntity.systemCorrelationIdType = args.systemCorrelationIdType;
|
|
112
|
+
auditEventEntity.systemCorrelationId = args.systemCorrelationId;
|
|
113
|
+
auditEventEntity.systemAlias = args.systemAlias;
|
|
114
|
+
auditEventEntity.partyCorrelationType = args.partyCorrelationType;
|
|
115
|
+
auditEventEntity.partyCorrelationId = args.partyCorrelationId;
|
|
116
|
+
auditEventEntity.partyAlias = args.partyAlias;
|
|
117
|
+
auditEventEntity.description = args.description;
|
|
118
|
+
auditEventEntity.partyCorrelationType = args.partyCorrelationType;
|
|
119
|
+
auditEventEntity.data = JSON.stringify(args.data);
|
|
120
|
+
auditEventEntity.diagnosticData = JSON.stringify(args.diagnosticData);
|
|
121
|
+
return auditEventEntity;
|
|
122
|
+
};
|
|
123
|
+
exports.auditEventEntityFrom = auditEventEntityFrom;
|
|
124
124
|
//# sourceMappingURL=AuditEventEntity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditEventEntity.js","sourceRoot":"","sources":["../../../src/entities/eventLogger/AuditEventEntity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAgH;AAChH,yDAS+B;AAIxB,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,oBAAU;CA4D/C,CAAA;AA3DC;IAAC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;4CACpB;AAEX;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;8BAClD,IAAI;mDAAA;AAEhB;IAAC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,uBAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;+CACzE;AAEhB;IAAC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;uDAC5C;AAEtB;IAAC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,qBAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;gDACzE;AAEf;IAAC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,wBAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;uDACzE;AAEzB;IAAC,IAAA,gBAAM,EAAC,aAAa,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,yBA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C,cAAc,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;IAErE,OAAO,gBAAgB,CAAA;AACzB,CAAC,CAAA;AAtBY,QAAA,oBAAoB,wBAsBhC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
import { IBasicBackgroundAttributes } from '../../types';
|
|
3
|
-
import { ImageAttributesEntity } from './ImageAttributesEntity';
|
|
4
|
-
export declare class BackgroundAttributesEntity extends BaseEntity {
|
|
5
|
-
id: string;
|
|
6
|
-
color?: string;
|
|
7
|
-
image?: ImageAttributesEntity;
|
|
8
|
-
validate(): Promise<undefined>;
|
|
9
|
-
}
|
|
10
|
-
export declare const backgroundAttributesEntityFrom: (args: IBasicBackgroundAttributes) => BackgroundAttributesEntity;
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { IBasicBackgroundAttributes } from '../../types';
|
|
3
|
+
import { ImageAttributesEntity } from './ImageAttributesEntity';
|
|
4
|
+
export declare class BackgroundAttributesEntity extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
image?: ImageAttributesEntity;
|
|
8
|
+
validate(): Promise<undefined>;
|
|
9
|
+
}
|
|
10
|
+
export declare const backgroundAttributesEntityFrom: (args: IBasicBackgroundAttributes) => BackgroundAttributesEntity;
|
|
11
11
|
//# sourceMappingURL=BackgroundAttributesEntity.d.ts.map
|
|
@@ -1,74 +1,74 @@
|
|
|
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.backgroundAttributesEntityFrom = exports.BackgroundAttributesEntity = void 0;
|
|
22
|
-
const typeorm_1 = require("typeorm");
|
|
23
|
-
const ImageAttributesEntity_1 = require("./ImageAttributesEntity");
|
|
24
|
-
const class_validator_1 = require("class-validator");
|
|
25
|
-
const validators_1 = require("../validators");
|
|
26
|
-
let BackgroundAttributesEntity = class BackgroundAttributesEntity extends typeorm_1.BaseEntity {
|
|
27
|
-
validate() {
|
|
28
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
const validation = yield (0, class_validator_1.validate)(this);
|
|
30
|
-
if (validation.length > 0) {
|
|
31
|
-
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
32
|
-
}
|
|
33
|
-
return;
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
39
|
-
__metadata("design:type", String)
|
|
40
|
-
], BackgroundAttributesEntity.prototype, "id", void 0);
|
|
41
|
-
__decorate([
|
|
42
|
-
(0, typeorm_1.Column)({ name: 'color', length: 255, nullable: true, unique: false }),
|
|
43
|
-
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank background colors are not allowed' }),
|
|
44
|
-
__metadata("design:type", String)
|
|
45
|
-
], BackgroundAttributesEntity.prototype, "color", void 0);
|
|
46
|
-
__decorate([
|
|
47
|
-
(0, typeorm_1.OneToOne)(() => ImageAttributesEntity_1.ImageAttributesEntity, {
|
|
48
|
-
cascade: true,
|
|
49
|
-
onDelete: 'CASCADE',
|
|
50
|
-
eager: true,
|
|
51
|
-
nullable: true,
|
|
52
|
-
}),
|
|
53
|
-
(0, typeorm_1.JoinColumn)({ name: 'imageId' }),
|
|
54
|
-
__metadata("design:type", ImageAttributesEntity_1.ImageAttributesEntity)
|
|
55
|
-
], BackgroundAttributesEntity.prototype, "image", void 0);
|
|
56
|
-
__decorate([
|
|
57
|
-
(0, typeorm_1.BeforeInsert)(),
|
|
58
|
-
(0, typeorm_1.BeforeUpdate)(),
|
|
59
|
-
__metadata("design:type", Function),
|
|
60
|
-
__metadata("design:paramtypes", []),
|
|
61
|
-
__metadata("design:returntype", Promise)
|
|
62
|
-
], BackgroundAttributesEntity.prototype, "validate", null);
|
|
63
|
-
BackgroundAttributesEntity = __decorate([
|
|
64
|
-
(0, typeorm_1.Entity)('BackgroundAttributes')
|
|
65
|
-
], BackgroundAttributesEntity);
|
|
66
|
-
exports.BackgroundAttributesEntity = BackgroundAttributesEntity;
|
|
67
|
-
const backgroundAttributesEntityFrom = (args) => {
|
|
68
|
-
const backgroundAttributesEntity = new BackgroundAttributesEntity();
|
|
69
|
-
backgroundAttributesEntity.color = (0, validators_1.isEmptyString)(args.color) ? undefined : args.color;
|
|
70
|
-
backgroundAttributesEntity.image = args.image ? (0, ImageAttributesEntity_1.imageAttributesEntityFrom)(args.image) : undefined;
|
|
71
|
-
return backgroundAttributesEntity;
|
|
72
|
-
};
|
|
73
|
-
exports.backgroundAttributesEntityFrom = backgroundAttributesEntityFrom;
|
|
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.backgroundAttributesEntityFrom = exports.BackgroundAttributesEntity = void 0;
|
|
22
|
+
const typeorm_1 = require("typeorm");
|
|
23
|
+
const ImageAttributesEntity_1 = require("./ImageAttributesEntity");
|
|
24
|
+
const class_validator_1 = require("class-validator");
|
|
25
|
+
const validators_1 = require("../validators");
|
|
26
|
+
let BackgroundAttributesEntity = class BackgroundAttributesEntity extends typeorm_1.BaseEntity {
|
|
27
|
+
validate() {
|
|
28
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
const validation = yield (0, class_validator_1.validate)(this);
|
|
30
|
+
if (validation.length > 0) {
|
|
31
|
+
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
32
|
+
}
|
|
33
|
+
return;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], BackgroundAttributesEntity.prototype, "id", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, typeorm_1.Column)({ name: 'color', length: 255, nullable: true, unique: false }),
|
|
43
|
+
(0, class_validator_1.Validate)(validators_1.IsNonEmptyStringConstraint, { message: 'Blank background colors are not allowed' }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], BackgroundAttributesEntity.prototype, "color", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, typeorm_1.OneToOne)(() => ImageAttributesEntity_1.ImageAttributesEntity, {
|
|
48
|
+
cascade: true,
|
|
49
|
+
onDelete: 'CASCADE',
|
|
50
|
+
eager: true,
|
|
51
|
+
nullable: true,
|
|
52
|
+
}),
|
|
53
|
+
(0, typeorm_1.JoinColumn)({ name: 'imageId' }),
|
|
54
|
+
__metadata("design:type", ImageAttributesEntity_1.ImageAttributesEntity)
|
|
55
|
+
], BackgroundAttributesEntity.prototype, "image", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, typeorm_1.BeforeInsert)(),
|
|
58
|
+
(0, typeorm_1.BeforeUpdate)(),
|
|
59
|
+
__metadata("design:type", Function),
|
|
60
|
+
__metadata("design:paramtypes", []),
|
|
61
|
+
__metadata("design:returntype", Promise)
|
|
62
|
+
], BackgroundAttributesEntity.prototype, "validate", null);
|
|
63
|
+
BackgroundAttributesEntity = __decorate([
|
|
64
|
+
(0, typeorm_1.Entity)('BackgroundAttributes')
|
|
65
|
+
], BackgroundAttributesEntity);
|
|
66
|
+
exports.BackgroundAttributesEntity = BackgroundAttributesEntity;
|
|
67
|
+
const backgroundAttributesEntityFrom = (args) => {
|
|
68
|
+
const backgroundAttributesEntity = new BackgroundAttributesEntity();
|
|
69
|
+
backgroundAttributesEntity.color = (0, validators_1.isEmptyString)(args.color) ? undefined : args.color;
|
|
70
|
+
backgroundAttributesEntity.image = args.image ? (0, ImageAttributesEntity_1.imageAttributesEntityFrom)(args.image) : undefined;
|
|
71
|
+
return backgroundAttributesEntity;
|
|
72
|
+
};
|
|
73
|
+
exports.backgroundAttributesEntityFrom = backgroundAttributesEntityFrom;
|
|
74
74
|
//# sourceMappingURL=BackgroundAttributesEntity.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { BaseEntity } from 'typeorm';
|
|
2
|
-
import { ImageAttributesEntity } from './ImageAttributesEntity';
|
|
3
|
-
import { BackgroundAttributesEntity } from './BackgroundAttributesEntity';
|
|
4
|
-
import { TextAttributesEntity } from './TextAttributesEntity';
|
|
5
|
-
export declare class BaseLocaleBrandingEntity extends BaseEntity {
|
|
6
|
-
id: string;
|
|
7
|
-
alias?: string;
|
|
8
|
-
locale?: string;
|
|
9
|
-
logo?: ImageAttributesEntity;
|
|
10
|
-
description?: string;
|
|
11
|
-
background?: BackgroundAttributesEntity;
|
|
12
|
-
text?: TextAttributesEntity;
|
|
13
|
-
createdAt: Date;
|
|
14
|
-
lastUpdatedAt: Date;
|
|
15
|
-
updateUpdatedDate(): void;
|
|
16
|
-
validate(): Promise<undefined>;
|
|
17
|
-
}
|
|
1
|
+
import { BaseEntity } from 'typeorm';
|
|
2
|
+
import { ImageAttributesEntity } from './ImageAttributesEntity';
|
|
3
|
+
import { BackgroundAttributesEntity } from './BackgroundAttributesEntity';
|
|
4
|
+
import { TextAttributesEntity } from './TextAttributesEntity';
|
|
5
|
+
export declare class BaseLocaleBrandingEntity extends BaseEntity {
|
|
6
|
+
id: string;
|
|
7
|
+
alias?: string;
|
|
8
|
+
locale?: string;
|
|
9
|
+
logo?: ImageAttributesEntity;
|
|
10
|
+
description?: string;
|
|
11
|
+
background?: BackgroundAttributesEntity;
|
|
12
|
+
text?: TextAttributesEntity;
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
lastUpdatedAt: Date;
|
|
15
|
+
updateUpdatedDate(): void;
|
|
16
|
+
validate(): Promise<undefined>;
|
|
17
|
+
}
|
|
18
18
|
//# sourceMappingURL=BaseLocaleBrandingEntity.d.ts.map
|