@sphereon/ssi-sdk.data-store 0.33.0 → 0.33.1-feature.vcdm2.4
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/dist/contact/AbstractContactStore.js +1 -5
- package/dist/contact/AbstractContactStore.js.map +1 -1
- package/dist/contact/ContactStore.js +544 -545
- package/dist/contact/ContactStore.js.map +1 -1
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js +1 -5
- package/dist/digitalCredential/AbstractDigitalCredentialStore.js.map +1 -1
- package/dist/digitalCredential/DigitalCredentialStore.js +131 -142
- package/dist/digitalCredential/DigitalCredentialStore.js.map +1 -1
- package/dist/entities/contact/BaseConfigEntity.js +13 -14
- package/dist/entities/contact/BaseConfigEntity.js.map +1 -1
- package/dist/entities/contact/BaseContactEntity.js +24 -22
- package/dist/entities/contact/BaseContactEntity.js.map +1 -1
- package/dist/entities/contact/ConnectionEntity.js +23 -20
- package/dist/entities/contact/ConnectionEntity.js.map +1 -1
- package/dist/entities/contact/ContactMetadataItemEntity.js +38 -44
- package/dist/entities/contact/ContactMetadataItemEntity.js.map +1 -1
- package/dist/entities/contact/CorrelationIdentifierEntity.js +34 -42
- package/dist/entities/contact/CorrelationIdentifierEntity.js.map +1 -1
- package/dist/entities/contact/DidAuthConfigEntity.js +16 -14
- package/dist/entities/contact/DidAuthConfigEntity.js.map +1 -1
- package/dist/entities/contact/ElectronicAddressEntity.js +42 -47
- package/dist/entities/contact/ElectronicAddressEntity.js.map +1 -1
- package/dist/entities/contact/IdentityEntity.js +56 -57
- package/dist/entities/contact/IdentityEntity.js.map +1 -1
- package/dist/entities/contact/IdentityMetadataItemEntity.js +38 -44
- package/dist/entities/contact/IdentityMetadataItemEntity.js.map +1 -1
- package/dist/entities/contact/NaturalPersonEntity.js +35 -43
- package/dist/entities/contact/NaturalPersonEntity.js.map +1 -1
- package/dist/entities/contact/OpenIdConfigEntity.js +24 -18
- package/dist/entities/contact/OpenIdConfigEntity.js.map +1 -1
- package/dist/entities/contact/OrganizationEntity.js +28 -38
- package/dist/entities/contact/OrganizationEntity.js.map +1 -1
- package/dist/entities/contact/PartyEntity.js +57 -59
- package/dist/entities/contact/PartyEntity.js.map +1 -1
- package/dist/entities/contact/PartyRelationshipEntity.js +37 -43
- package/dist/entities/contact/PartyRelationshipEntity.js.map +1 -1
- package/dist/entities/contact/PartyTypeEntity.js +44 -49
- package/dist/entities/contact/PartyTypeEntity.js.map +1 -1
- package/dist/entities/contact/PhysicalAddressEntity.js +61 -60
- package/dist/entities/contact/PhysicalAddressEntity.js.map +1 -1
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js +63 -38
- package/dist/entities/digitalCredential/DigitalCredentialEntity.js.map +1 -1
- package/dist/entities/eventLogger/AuditEventEntity.js +60 -37
- package/dist/entities/eventLogger/AuditEventEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js +25 -36
- package/dist/entities/issuanceBranding/BackgroundAttributesEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js +48 -53
- package/dist/entities/issuanceBranding/BaseLocaleBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js +35 -43
- package/dist/entities/issuanceBranding/CredentialBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/CredentialClaimsEntity.js +28 -38
- package/dist/entities/issuanceBranding/CredentialClaimsEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js +18 -18
- package/dist/entities/issuanceBranding/CredentialLocaleBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js +34 -42
- package/dist/entities/issuanceBranding/ImageAttributesEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js +11 -11
- package/dist/entities/issuanceBranding/ImageDimensionsEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js +31 -40
- package/dist/entities/issuanceBranding/IssuerBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js +27 -24
- package/dist/entities/issuanceBranding/IssuerLocaleBrandingEntity.js.map +1 -1
- package/dist/entities/issuanceBranding/TextAttributesEntity.js +20 -32
- package/dist/entities/issuanceBranding/TextAttributesEntity.js.map +1 -1
- package/dist/entities/machineState/MachineStateInfoEntity.js +31 -21
- package/dist/entities/machineState/MachineStateInfoEntity.js.map +1 -1
- package/dist/entities/oid4vcState/Oid4vcStateEntity.js +24 -18
- package/dist/entities/oid4vcState/Oid4vcStateEntity.js.map +1 -1
- package/dist/entities/presentationDefinition/PresentationDefinitionItemEntity.js +34 -27
- package/dist/entities/presentationDefinition/PresentationDefinitionItemEntity.js.map +1 -1
- package/dist/entities/statusList/StatusList2021EntryEntity.js +26 -22
- package/dist/entities/statusList/StatusList2021EntryEntity.js.map +1 -1
- package/dist/entities/statusList/StatusListEntities.js +48 -39
- package/dist/entities/statusList/StatusListEntities.js.map +1 -1
- package/dist/entities/validators/index.js +6 -10
- package/dist/entities/validators/index.js.map +1 -1
- package/dist/eventLogger/AbstractEventLoggerStore.js +1 -5
- package/dist/eventLogger/AbstractEventLoggerStore.js.map +1 -1
- package/dist/eventLogger/EventLoggerStore.js +50 -65
- package/dist/eventLogger/EventLoggerStore.js.map +1 -1
- package/dist/index.js +96 -163
- package/dist/index.js.map +1 -1
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js +1 -5
- package/dist/issuanceBranding/AbstractIssuanceBrandingStore.js.map +1 -1
- package/dist/issuanceBranding/IssuanceBrandingStore.js +331 -333
- package/dist/issuanceBranding/IssuanceBrandingStore.js.map +1 -1
- package/dist/machineState/IAbstractMachineStateStore.js +1 -5
- package/dist/machineState/IAbstractMachineStateStore.js.map +1 -1
- package/dist/machineState/MachineStateStore.js +102 -122
- package/dist/machineState/MachineStateStore.js.map +1 -1
- package/dist/migrations/generic/1-CreateContacts.js +50 -72
- package/dist/migrations/generic/1-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/10-CreatePresentationDefinitions.js +50 -72
- package/dist/migrations/generic/10-CreatePresentationDefinitions.js.map +1 -1
- package/dist/migrations/generic/11-FixCredentialClaimsReferenceUuid.js +52 -74
- package/dist/migrations/generic/11-FixCredentialClaimsReferenceUuid.js.map +1 -1
- package/dist/migrations/generic/2-CreateIssuanceBranding.js +50 -72
- package/dist/migrations/generic/2-CreateIssuanceBranding.js.map +1 -1
- package/dist/migrations/generic/3-CreateContacts.js +50 -72
- package/dist/migrations/generic/3-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/4-CreateStatusList.js +56 -78
- package/dist/migrations/generic/4-CreateStatusList.js.map +1 -1
- package/dist/migrations/generic/5-CreateAuditEvents.js +50 -72
- package/dist/migrations/generic/5-CreateAuditEvents.js.map +1 -1
- package/dist/migrations/generic/6-CreateDigitalCredential.js +50 -72
- package/dist/migrations/generic/6-CreateDigitalCredential.js.map +1 -1
- package/dist/migrations/generic/7-CreateMachineStateStore.js +50 -72
- package/dist/migrations/generic/7-CreateMachineStateStore.js.map +1 -1
- package/dist/migrations/generic/8-CreateContacts.js +50 -72
- package/dist/migrations/generic/8-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/9-CreateContacts.js +50 -72
- package/dist/migrations/generic/9-CreateContacts.js.map +1 -1
- package/dist/migrations/generic/index.js +30 -33
- package/dist/migrations/generic/index.js.map +1 -1
- package/dist/migrations/index.js +1 -12
- package/dist/migrations/index.js.map +1 -1
- package/dist/migrations/internal-migrations-ormconfig.js +6 -8
- package/dist/migrations/internal-migrations-ormconfig.js.map +1 -1
- package/dist/migrations/postgres/1659463079428-CreateContacts.js +34 -53
- package/dist/migrations/postgres/1659463079428-CreateContacts.js.map +1 -1
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js +50 -69
- package/dist/migrations/postgres/1685628974232-CreateIssuanceBranding.js.map +1 -1
- package/dist/migrations/postgres/1690925872592-CreateContacts.js +87 -106
- package/dist/migrations/postgres/1690925872592-CreateContacts.js.map +1 -1
- package/dist/migrations/postgres/1693866470001-CreateStatusList.js +16 -35
- package/dist/migrations/postgres/1693866470001-CreateStatusList.js.map +1 -1
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js +22 -41
- package/dist/migrations/postgres/1701634812183-CreateAuditEvents.js.map +1 -1
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js +19 -38
- package/dist/migrations/postgres/1708525189001-CreateDigitalCredential.js.map +1 -1
- package/dist/migrations/postgres/1708797018115-CreateMachineStateStore.js +6 -25
- package/dist/migrations/postgres/1708797018115-CreateMachineStateStore.js.map +1 -1
- package/dist/migrations/postgres/1710438363001-CreateContacts.js +40 -59
- package/dist/migrations/postgres/1710438363001-CreateContacts.js.map +1 -1
- package/dist/migrations/postgres/1715761125001-CreateContacts.js +18 -37
- package/dist/migrations/postgres/1715761125001-CreateContacts.js.map +1 -1
- package/dist/migrations/postgres/1716475165345-CreatePresentationDefinitions.js +6 -25
- package/dist/migrations/postgres/1716475165345-CreatePresentationDefinitions.js.map +1 -1
- package/dist/migrations/postgres/1737110469001-UpdateStatusList.js +16 -35
- package/dist/migrations/postgres/1737110469001-UpdateStatusList.js.map +1 -1
- package/dist/migrations/postgres/1741895822987-FixCredentialClaimsReferencesUuid.js +8 -27
- package/dist/migrations/postgres/1741895822987-FixCredentialClaimsReferencesUuid.js.map +1 -1
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js +56 -75
- package/dist/migrations/sqlite/1659463069549-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js +70 -89
- package/dist/migrations/sqlite/1685628973231-CreateIssuanceBranding.js.map +1 -1
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js +120 -139
- package/dist/migrations/sqlite/1690925872693-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.js +12 -31
- package/dist/migrations/sqlite/1693866470000-CreateStatusList.js.map +1 -1
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js +6 -25
- package/dist/migrations/sqlite/1701634819487-CreateAuditEvents.js.map +1 -1
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js +7 -26
- package/dist/migrations/sqlite/1708525189002-CreateDigitalCredential.js.map +1 -1
- package/dist/migrations/sqlite/1708796002272-CreateMachineStateStore.js +6 -25
- package/dist/migrations/sqlite/1708796002272-CreateMachineStateStore.js.map +1 -1
- package/dist/migrations/sqlite/1710438363002-CreateContacts.js +43 -62
- package/dist/migrations/sqlite/1710438363002-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1715761125002-CreateContacts.js +18 -37
- package/dist/migrations/sqlite/1715761125002-CreateContacts.js.map +1 -1
- package/dist/migrations/sqlite/1716475165344-CreatePresentationDefinitions.js +6 -25
- package/dist/migrations/sqlite/1716475165344-CreatePresentationDefinitions.js.map +1 -1
- package/dist/migrations/sqlite/1737110469000-UpdateStatusList.js +20 -39
- package/dist/migrations/sqlite/1737110469000-UpdateStatusList.js.map +1 -1
- package/dist/migrations/sqlite/1741895822987-FixCredentialClaimsReferencesUuid.js +25 -44
- package/dist/migrations/sqlite/1741895822987-FixCredentialClaimsReferencesUuid.js.map +1 -1
- package/dist/presentationDefinition/AbstractPDStore.js +1 -5
- package/dist/presentationDefinition/AbstractPDStore.js.map +1 -1
- package/dist/presentationDefinition/PDStore.js +114 -123
- package/dist/presentationDefinition/PDStore.js.map +1 -1
- package/dist/statusList/IStatusListStore.js +1 -2
- package/dist/statusList/StatusListStore.js +196 -225
- package/dist/statusList/StatusListStore.js.map +1 -1
- package/dist/types/contact/IAbstractContactStore.js +1 -2
- package/dist/types/contact/contact.js +10 -13
- package/dist/types/contact/contact.js.map +1 -1
- package/dist/types/digitalCredential/IAbstractDigitalCredentialStore.js +1 -2
- package/dist/types/digitalCredential/digitalCredential.js +13 -16
- package/dist/types/digitalCredential/digitalCredential.js.map +1 -1
- package/dist/types/eventLogger/IAbstractEventLoggerStore.js +1 -2
- package/dist/types/eventLogger/eventLogger.js +1 -2
- package/dist/types/index.js +14 -30
- package/dist/types/index.js.map +1 -1
- package/dist/types/issuanceBranding/IAbstractIssuanceBrandingStore.js +1 -2
- package/dist/types/issuanceBranding/issuanceBranding.js +1 -2
- package/dist/types/machineState/IAbstractMachineStateStore.js +1 -2
- package/dist/types/presentationDefinition/IAbstractPDStore.js +1 -2
- package/dist/types/presentationDefinition/presentationDefinition.js +1 -2
- package/dist/types/statusList/IAbstractStatusListStore.js +1 -2
- package/dist/types/statusList/statusList.js +1 -2
- package/dist/types/validation/validation.js +1 -2
- package/dist/utils/FormattingUtils.js +3 -7
- package/dist/utils/FormattingUtils.js.map +1 -1
- package/dist/utils/SortingUtils.js +1 -5
- package/dist/utils/SortingUtils.js.map +1 -1
- package/dist/utils/ValidatorUtils.js +2 -6
- package/dist/utils/ValidatorUtils.js.map +1 -1
- package/dist/utils/contact/MappingUtils.js +124 -150
- package/dist/utils/contact/MappingUtils.js.map +1 -1
- package/dist/utils/digitalCredential/MappingUtils.js +50 -47
- package/dist/utils/digitalCredential/MappingUtils.js.map +1 -1
- package/dist/utils/eventLogger/MappingUtils.js +60 -22
- package/dist/utils/eventLogger/MappingUtils.js.map +1 -1
- package/dist/utils/issuanceBranding/MappingUtils.js +71 -77
- package/dist/utils/issuanceBranding/MappingUtils.js.map +1 -1
- package/dist/utils/presentationDefinition/MappingUtils.js +9 -15
- package/dist/utils/presentationDefinition/MappingUtils.js.map +1 -1
- package/dist/utils/statusList/MappingUtils.js +27 -22
- package/dist/utils/statusList/MappingUtils.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,122 +7,146 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const ssi_sdk_agent_config_1 = require("@sphereon/ssi-sdk.agent-config");
|
|
16
|
-
const typeorm_1 = require("typeorm");
|
|
10
|
+
import { ActionType, InitiatorType, LoggingEventType, LogLevel, SubSystem, System, SystemCorrelationIdType } from '@sphereon/ssi-types';
|
|
11
|
+
import { CredentialType, PartyCorrelationType } from '@sphereon/ssi-sdk.core';
|
|
12
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config';
|
|
13
|
+
import { BaseEntity, Column, CreateDateColumn, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
|
17
14
|
//TODO this entity, also contains some optional fields that are related to another event type (Activity) later we might want to refactor and reorganize this.
|
|
18
15
|
// For now I've added a discriminator value called eventType that can be one of the three types of events: 1. General, 2. Audit, and 3. Activity
|
|
19
|
-
let AuditEventEntity = class AuditEventEntity extends
|
|
16
|
+
let AuditEventEntity = class AuditEventEntity extends BaseEntity {
|
|
17
|
+
id;
|
|
18
|
+
timestamp;
|
|
19
|
+
type;
|
|
20
|
+
level;
|
|
21
|
+
correlationId;
|
|
22
|
+
system;
|
|
23
|
+
subSystemType;
|
|
24
|
+
actionType;
|
|
25
|
+
actionSubType;
|
|
26
|
+
initiatorType;
|
|
27
|
+
systemCorrelationIdType;
|
|
28
|
+
systemCorrelationId;
|
|
29
|
+
systemAlias;
|
|
30
|
+
partyCorrelationType;
|
|
31
|
+
partyCorrelationId;
|
|
32
|
+
partyAlias;
|
|
33
|
+
description;
|
|
34
|
+
credentialType;
|
|
35
|
+
credentialHash;
|
|
36
|
+
parentCredentialHash;
|
|
37
|
+
originalCredential;
|
|
38
|
+
sharePurpose;
|
|
39
|
+
data;
|
|
40
|
+
diagnosticData;
|
|
41
|
+
createdAt;
|
|
42
|
+
lastUpdatedAt;
|
|
20
43
|
};
|
|
21
|
-
exports.AuditEventEntity = AuditEventEntity;
|
|
22
44
|
__decorate([
|
|
23
|
-
|
|
45
|
+
PrimaryGeneratedColumn('uuid'),
|
|
24
46
|
__metadata("design:type", String)
|
|
25
47
|
], AuditEventEntity.prototype, "id", void 0);
|
|
26
48
|
__decorate([
|
|
27
|
-
|
|
49
|
+
Column({ name: 'timestamp', nullable: false, unique: false, type: typeOrmDateTime() }),
|
|
28
50
|
__metadata("design:type", Date)
|
|
29
51
|
], AuditEventEntity.prototype, "timestamp", void 0);
|
|
30
52
|
__decorate([
|
|
31
|
-
|
|
53
|
+
Column('simple-enum', { name: 'eventType', enum: LoggingEventType, nullable: false, unique: false }),
|
|
32
54
|
__metadata("design:type", String)
|
|
33
55
|
], AuditEventEntity.prototype, "type", void 0);
|
|
34
56
|
__decorate([
|
|
35
|
-
|
|
57
|
+
Column('simple-enum', { name: 'level', enum: LogLevel, nullable: false, unique: false }),
|
|
36
58
|
__metadata("design:type", Number)
|
|
37
59
|
], AuditEventEntity.prototype, "level", void 0);
|
|
38
60
|
__decorate([
|
|
39
|
-
|
|
61
|
+
Column('text', { name: 'correlationId', nullable: false, unique: false }),
|
|
40
62
|
__metadata("design:type", String)
|
|
41
63
|
], AuditEventEntity.prototype, "correlationId", void 0);
|
|
42
64
|
__decorate([
|
|
43
|
-
|
|
65
|
+
Column('simple-enum', { name: 'system', enum: System, nullable: false, unique: false }),
|
|
44
66
|
__metadata("design:type", String)
|
|
45
67
|
], AuditEventEntity.prototype, "system", void 0);
|
|
46
68
|
__decorate([
|
|
47
|
-
|
|
69
|
+
Column('simple-enum', { name: 'subSystemType', enum: SubSystem, nullable: false, unique: false }),
|
|
48
70
|
__metadata("design:type", String)
|
|
49
71
|
], AuditEventEntity.prototype, "subSystemType", void 0);
|
|
50
72
|
__decorate([
|
|
51
|
-
|
|
73
|
+
Column('simple-enum', { name: 'actionType', enum: ActionType, nullable: false, unique: false }),
|
|
52
74
|
__metadata("design:type", String)
|
|
53
75
|
], AuditEventEntity.prototype, "actionType", void 0);
|
|
54
76
|
__decorate([
|
|
55
|
-
|
|
77
|
+
Column({ name: 'actionSubType', type: 'varchar', nullable: false, unique: false }),
|
|
56
78
|
__metadata("design:type", String)
|
|
57
79
|
], AuditEventEntity.prototype, "actionSubType", void 0);
|
|
58
80
|
__decorate([
|
|
59
|
-
|
|
81
|
+
Column('simple-enum', { name: 'initiatorType', enum: InitiatorType, nullable: false, unique: false }),
|
|
60
82
|
__metadata("design:type", String)
|
|
61
83
|
], AuditEventEntity.prototype, "initiatorType", void 0);
|
|
62
84
|
__decorate([
|
|
63
|
-
|
|
85
|
+
Column('simple-enum', { name: 'systemCorrelationIdType', enum: SystemCorrelationIdType, nullable: true, unique: false }),
|
|
64
86
|
__metadata("design:type", String)
|
|
65
87
|
], AuditEventEntity.prototype, "systemCorrelationIdType", void 0);
|
|
66
88
|
__decorate([
|
|
67
|
-
|
|
89
|
+
Column('text', { name: 'systemCorrelationId', nullable: true, unique: false }),
|
|
68
90
|
__metadata("design:type", String)
|
|
69
91
|
], AuditEventEntity.prototype, "systemCorrelationId", void 0);
|
|
70
92
|
__decorate([
|
|
71
|
-
|
|
93
|
+
Column('text', { name: 'systemAlias', nullable: true, unique: false }),
|
|
72
94
|
__metadata("design:type", String)
|
|
73
95
|
], AuditEventEntity.prototype, "systemAlias", void 0);
|
|
74
96
|
__decorate([
|
|
75
|
-
|
|
97
|
+
Column('simple-enum', { name: 'partyCorrelationType', enum: PartyCorrelationType, nullable: true, unique: false }),
|
|
76
98
|
__metadata("design:type", String)
|
|
77
99
|
], AuditEventEntity.prototype, "partyCorrelationType", void 0);
|
|
78
100
|
__decorate([
|
|
79
|
-
|
|
101
|
+
Column('text', { name: 'partyCorrelationId', nullable: true, unique: false }),
|
|
80
102
|
__metadata("design:type", String)
|
|
81
103
|
], AuditEventEntity.prototype, "partyCorrelationId", void 0);
|
|
82
104
|
__decorate([
|
|
83
|
-
|
|
105
|
+
Column('text', { name: 'partyAlias', nullable: true, unique: false }),
|
|
84
106
|
__metadata("design:type", String)
|
|
85
107
|
], AuditEventEntity.prototype, "partyAlias", void 0);
|
|
86
108
|
__decorate([
|
|
87
|
-
|
|
109
|
+
Column('text', { name: 'description', nullable: false, unique: false }),
|
|
88
110
|
__metadata("design:type", String)
|
|
89
111
|
], AuditEventEntity.prototype, "description", void 0);
|
|
90
112
|
__decorate([
|
|
91
|
-
|
|
113
|
+
Column('simple-enum', { name: 'credentialType', enum: CredentialType, nullable: true, unique: false }),
|
|
92
114
|
__metadata("design:type", String)
|
|
93
115
|
], AuditEventEntity.prototype, "credentialType", void 0);
|
|
94
116
|
__decorate([
|
|
95
|
-
|
|
117
|
+
Column('text', { name: 'credentialHash', nullable: true, unique: false }),
|
|
96
118
|
__metadata("design:type", String)
|
|
97
119
|
], AuditEventEntity.prototype, "credentialHash", void 0);
|
|
98
120
|
__decorate([
|
|
99
|
-
|
|
121
|
+
Column('text', { name: 'parentCredentialHash', nullable: true, unique: false }),
|
|
100
122
|
__metadata("design:type", String)
|
|
101
123
|
], AuditEventEntity.prototype, "parentCredentialHash", void 0);
|
|
102
124
|
__decorate([
|
|
103
|
-
|
|
125
|
+
Column('text', { name: 'originalCredential', nullable: true, unique: false }),
|
|
104
126
|
__metadata("design:type", String)
|
|
105
127
|
], AuditEventEntity.prototype, "originalCredential", void 0);
|
|
106
128
|
__decorate([
|
|
107
|
-
|
|
129
|
+
Column('text', { name: 'sharePurpose', nullable: true, unique: false }),
|
|
108
130
|
__metadata("design:type", String)
|
|
109
131
|
], AuditEventEntity.prototype, "sharePurpose", void 0);
|
|
110
132
|
__decorate([
|
|
111
|
-
|
|
133
|
+
Column('text', { name: 'data', nullable: true, unique: false }),
|
|
112
134
|
__metadata("design:type", String)
|
|
113
135
|
], AuditEventEntity.prototype, "data", void 0);
|
|
114
136
|
__decorate([
|
|
115
|
-
|
|
137
|
+
Column('text', { name: 'diagnosticData', nullable: true, unique: false }),
|
|
116
138
|
__metadata("design:type", String)
|
|
117
139
|
], AuditEventEntity.prototype, "diagnosticData", void 0);
|
|
118
140
|
__decorate([
|
|
119
|
-
|
|
141
|
+
CreateDateColumn({ name: 'created_at', nullable: false, type: typeOrmDateTime() }),
|
|
120
142
|
__metadata("design:type", Date)
|
|
121
143
|
], AuditEventEntity.prototype, "createdAt", void 0);
|
|
122
144
|
__decorate([
|
|
123
|
-
|
|
145
|
+
UpdateDateColumn({ name: 'last_updated_at', nullable: false, type: typeOrmDateTime() }),
|
|
124
146
|
__metadata("design:type", Date)
|
|
125
147
|
], AuditEventEntity.prototype, "lastUpdatedAt", void 0);
|
|
126
|
-
|
|
127
|
-
|
|
148
|
+
AuditEventEntity = __decorate([
|
|
149
|
+
Entity('AuditEvents')
|
|
128
150
|
], AuditEventEntity);
|
|
151
|
+
export { AuditEventEntity };
|
|
129
152
|
//# sourceMappingURL=AuditEventEntity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuditEventEntity.js","sourceRoot":"","sources":["../../../src/entities/eventLogger/AuditEventEntity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AuditEventEntity.js","sourceRoot":"","sources":["../../../src/entities/eventLogger/AuditEventEntity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAiB,UAAU,EAAE,aAAa,EAAE,gBAAgB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AACtJ,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAA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AM,EAAE,KAAK,EAAE,CAAC;;sDACnD;AAGrB;IADC,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;8CACnD;AAGb;IADC,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;;wDACnD;AAGvB;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC;8BACvE,IAAI;mDAAA;AAGhB;IADC,gBAAgB,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,EAAE,CAAC;8BACxE,IAAI;uDAAA;AA7ET,gBAAgB;IAD5B,MAAM,CAAC,aAAa,CAAC;GACT,gBAAgB,CA8E5B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,60 +7,50 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
});
|
|
10
|
+
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn } from 'typeorm';
|
|
11
|
+
import { ImageAttributesEntity } from './ImageAttributesEntity';
|
|
12
|
+
import { validate, Validate } from 'class-validator';
|
|
13
|
+
import { IsNonEmptyStringConstraint } from '../validators';
|
|
14
|
+
let BackgroundAttributesEntity = class BackgroundAttributesEntity extends BaseEntity {
|
|
15
|
+
id;
|
|
16
|
+
color;
|
|
17
|
+
image;
|
|
18
|
+
async validate() {
|
|
19
|
+
const validation = await validate(this);
|
|
20
|
+
if (validation.length > 0) {
|
|
21
|
+
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
22
|
+
}
|
|
23
|
+
return;
|
|
35
24
|
}
|
|
36
25
|
};
|
|
37
|
-
exports.BackgroundAttributesEntity = BackgroundAttributesEntity;
|
|
38
26
|
__decorate([
|
|
39
|
-
|
|
27
|
+
PrimaryGeneratedColumn('uuid'),
|
|
40
28
|
__metadata("design:type", String)
|
|
41
29
|
], BackgroundAttributesEntity.prototype, "id", void 0);
|
|
42
30
|
__decorate([
|
|
43
|
-
|
|
44
|
-
|
|
31
|
+
Column('varchar', { name: 'color', length: 255, nullable: true, unique: false }),
|
|
32
|
+
Validate(IsNonEmptyStringConstraint, { message: 'Blank background colors are not allowed' }),
|
|
45
33
|
__metadata("design:type", String)
|
|
46
34
|
], BackgroundAttributesEntity.prototype, "color", void 0);
|
|
47
35
|
__decorate([
|
|
48
|
-
|
|
36
|
+
OneToOne(() => ImageAttributesEntity, {
|
|
49
37
|
cascade: true,
|
|
50
38
|
onDelete: 'CASCADE',
|
|
51
39
|
eager: true,
|
|
52
40
|
nullable: true,
|
|
53
41
|
}),
|
|
54
|
-
|
|
55
|
-
__metadata("design:type",
|
|
42
|
+
JoinColumn({ name: 'imageId' }),
|
|
43
|
+
__metadata("design:type", ImageAttributesEntity)
|
|
56
44
|
], BackgroundAttributesEntity.prototype, "image", void 0);
|
|
57
45
|
__decorate([
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
BeforeInsert(),
|
|
47
|
+
BeforeUpdate(),
|
|
60
48
|
__metadata("design:type", Function),
|
|
61
49
|
__metadata("design:paramtypes", []),
|
|
62
50
|
__metadata("design:returntype", Promise)
|
|
63
51
|
], BackgroundAttributesEntity.prototype, "validate", null);
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
BackgroundAttributesEntity = __decorate([
|
|
53
|
+
Entity('BackgroundAttributes')
|
|
66
54
|
], BackgroundAttributesEntity);
|
|
55
|
+
export { BackgroundAttributesEntity };
|
|
67
56
|
//# sourceMappingURL=BackgroundAttributesEntity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BackgroundAttributesEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/BackgroundAttributesEntity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BackgroundAttributesEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/BackgroundAttributesEntity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAA;AAC9H,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAm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decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
2
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
3
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -8,114 +7,110 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
8
7
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
8
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const validators_1 = require("../validators");
|
|
29
|
-
let BaseLocaleBrandingEntity = class BaseLocaleBrandingEntity extends typeorm_1.BaseEntity {
|
|
10
|
+
import { BaseEntity, BeforeInsert, BeforeUpdate, Column, CreateDateColumn, Entity, JoinColumn, OneToOne, PrimaryGeneratedColumn, TableInheritance, UpdateDateColumn, } from 'typeorm';
|
|
11
|
+
import { typeOrmDateTime } from '@sphereon/ssi-sdk.agent-config';
|
|
12
|
+
import { ImageAttributesEntity } from './ImageAttributesEntity';
|
|
13
|
+
import { BackgroundAttributesEntity } from './BackgroundAttributesEntity';
|
|
14
|
+
import { TextAttributesEntity } from './TextAttributesEntity';
|
|
15
|
+
import { validate, Validate } from 'class-validator';
|
|
16
|
+
import { IsNonEmptyStringConstraint } from '../validators';
|
|
17
|
+
let BaseLocaleBrandingEntity = class BaseLocaleBrandingEntity extends BaseEntity {
|
|
18
|
+
id;
|
|
19
|
+
alias;
|
|
20
|
+
locale;
|
|
21
|
+
logo;
|
|
22
|
+
description;
|
|
23
|
+
background;
|
|
24
|
+
text;
|
|
25
|
+
createdAt;
|
|
26
|
+
lastUpdatedAt;
|
|
30
27
|
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
31
28
|
updateUpdatedDate() {
|
|
32
29
|
this.lastUpdatedAt = new Date();
|
|
33
30
|
}
|
|
34
|
-
validate() {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return;
|
|
41
|
-
});
|
|
31
|
+
async validate() {
|
|
32
|
+
const validation = await validate(this);
|
|
33
|
+
if (validation.length > 0) {
|
|
34
|
+
return Promise.reject(Error(Object.values(validation[0].constraints)[0]));
|
|
35
|
+
}
|
|
36
|
+
return;
|
|
42
37
|
}
|
|
43
38
|
};
|
|
44
|
-
exports.BaseLocaleBrandingEntity = BaseLocaleBrandingEntity;
|
|
45
39
|
__decorate([
|
|
46
|
-
|
|
40
|
+
PrimaryGeneratedColumn('uuid'),
|
|
47
41
|
__metadata("design:type", String)
|
|
48
42
|
], BaseLocaleBrandingEntity.prototype, "id", void 0);
|
|
49
43
|
__decorate([
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
Column('varchar', { name: 'alias', length: 255, nullable: true, unique: false }),
|
|
45
|
+
Validate(IsNonEmptyStringConstraint, { message: 'Blank aliases are not allowed' }),
|
|
52
46
|
__metadata("design:type", String)
|
|
53
47
|
], BaseLocaleBrandingEntity.prototype, "alias", void 0);
|
|
54
48
|
__decorate([
|
|
55
|
-
|
|
49
|
+
Column('varchar', { name: 'locale', length: 255, nullable: false, unique: false }),
|
|
56
50
|
__metadata("design:type", String)
|
|
57
51
|
], BaseLocaleBrandingEntity.prototype, "locale", void 0);
|
|
58
52
|
__decorate([
|
|
59
|
-
|
|
53
|
+
OneToOne(() => ImageAttributesEntity, {
|
|
60
54
|
cascade: true,
|
|
61
55
|
onDelete: 'CASCADE',
|
|
62
56
|
eager: true,
|
|
63
57
|
nullable: true,
|
|
64
58
|
}),
|
|
65
|
-
|
|
66
|
-
__metadata("design:type",
|
|
59
|
+
JoinColumn({ name: 'logoId' }),
|
|
60
|
+
__metadata("design:type", ImageAttributesEntity)
|
|
67
61
|
], BaseLocaleBrandingEntity.prototype, "logo", void 0);
|
|
68
62
|
__decorate([
|
|
69
|
-
|
|
70
|
-
|
|
63
|
+
Column('varchar', { name: 'description', length: 255, nullable: true, unique: false }),
|
|
64
|
+
Validate(IsNonEmptyStringConstraint, { message: 'Blank descriptions are not allowed' }),
|
|
71
65
|
__metadata("design:type", String)
|
|
72
66
|
], BaseLocaleBrandingEntity.prototype, "description", void 0);
|
|
73
67
|
__decorate([
|
|
74
|
-
|
|
68
|
+
OneToOne(() => BackgroundAttributesEntity, {
|
|
75
69
|
cascade: true,
|
|
76
70
|
onDelete: 'CASCADE',
|
|
77
71
|
eager: true,
|
|
78
72
|
nullable: true,
|
|
79
73
|
}),
|
|
80
|
-
|
|
81
|
-
__metadata("design:type",
|
|
74
|
+
JoinColumn({ name: 'backgroundId' }),
|
|
75
|
+
__metadata("design:type", BackgroundAttributesEntity)
|
|
82
76
|
], BaseLocaleBrandingEntity.prototype, "background", void 0);
|
|
83
77
|
__decorate([
|
|
84
|
-
|
|
78
|
+
OneToOne(() => TextAttributesEntity, {
|
|
85
79
|
cascade: true,
|
|
86
80
|
onDelete: 'CASCADE',
|
|
87
81
|
eager: true,
|
|
88
82
|
nullable: true,
|
|
89
83
|
}),
|
|
90
|
-
|
|
91
|
-
__metadata("design:type",
|
|
84
|
+
JoinColumn({ name: 'textId' }),
|
|
85
|
+
__metadata("design:type", TextAttributesEntity)
|
|
92
86
|
], BaseLocaleBrandingEntity.prototype, "text", void 0);
|
|
93
87
|
__decorate([
|
|
94
|
-
|
|
88
|
+
CreateDateColumn({ name: 'created_at', nullable: false, type: typeOrmDateTime() }),
|
|
95
89
|
__metadata("design:type", Date)
|
|
96
90
|
], BaseLocaleBrandingEntity.prototype, "createdAt", void 0);
|
|
97
91
|
__decorate([
|
|
98
|
-
|
|
92
|
+
UpdateDateColumn({ name: 'last_updated_at', nullable: false, type: typeOrmDateTime() }),
|
|
99
93
|
__metadata("design:type", Date
|
|
100
94
|
// By default, @UpdateDateColumn in TypeORM updates the timestamp only when the entity's top-level properties change.
|
|
101
95
|
)
|
|
102
96
|
], BaseLocaleBrandingEntity.prototype, "lastUpdatedAt", void 0);
|
|
103
97
|
__decorate([
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
BeforeInsert(),
|
|
99
|
+
BeforeUpdate(),
|
|
106
100
|
__metadata("design:type", Function),
|
|
107
101
|
__metadata("design:paramtypes", []),
|
|
108
102
|
__metadata("design:returntype", void 0)
|
|
109
103
|
], BaseLocaleBrandingEntity.prototype, "updateUpdatedDate", null);
|
|
110
104
|
__decorate([
|
|
111
|
-
|
|
112
|
-
|
|
105
|
+
BeforeInsert(),
|
|
106
|
+
BeforeUpdate(),
|
|
113
107
|
__metadata("design:type", Function),
|
|
114
108
|
__metadata("design:paramtypes", []),
|
|
115
109
|
__metadata("design:returntype", Promise)
|
|
116
110
|
], BaseLocaleBrandingEntity.prototype, "validate", null);
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
111
|
+
BaseLocaleBrandingEntity = __decorate([
|
|
112
|
+
Entity('BaseLocaleBranding'),
|
|
113
|
+
TableInheritance({ column: { type: 'varchar', name: 'type' } })
|
|
120
114
|
], BaseLocaleBrandingEntity);
|
|
115
|
+
export { BaseLocaleBrandingEntity };
|
|
121
116
|
//# sourceMappingURL=BaseLocaleBrandingEntity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseLocaleBrandingEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/BaseLocaleBrandingEntity.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BaseLocaleBrandingEntity.js","sourceRoot":"","sources":["../../../src/entities/issuanceBranding/BaseLocaleBrandingEntity.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EACL,UA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