@nmshd/transport 7.0.0-alpha.53 → 7.0.0-alpha.55
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/buildInformation.js +5 -5
- package/dist/core/CoreSynchronizable.d.ts +1 -0
- package/dist/core/CoreSynchronizable.d.ts.map +1 -1
- package/dist/core/CoreSynchronizable.js +1 -0
- package/dist/core/CoreSynchronizable.js.map +1 -1
- package/dist/core/DbCollectionName.d.ts +0 -1
- package/dist/core/DbCollectionName.d.ts.map +1 -1
- package/dist/core/DbCollectionName.js +0 -1
- package/dist/core/DbCollectionName.js.map +1 -1
- package/dist/core/TransportController.d.ts +0 -4
- package/dist/core/TransportController.d.ts.map +1 -1
- package/dist/core/TransportController.js +0 -6
- package/dist/core/TransportController.js.map +1 -1
- package/dist/core/TransportCoreErrors.d.ts +0 -1
- package/dist/core/TransportCoreErrors.d.ts.map +1 -1
- package/dist/core/TransportCoreErrors.js +0 -3
- package/dist/core/TransportCoreErrors.js.map +1 -1
- package/dist/modules/accounts/AccountController.d.ts +0 -6
- package/dist/modules/accounts/AccountController.d.ts.map +1 -1
- package/dist/modules/accounts/AccountController.js +1 -8
- package/dist/modules/accounts/AccountController.js.map +1 -1
- package/dist/modules/accounts/IdentityDeletionProcessController.d.ts +2 -8
- package/dist/modules/accounts/IdentityDeletionProcessController.d.ts.map +1 -1
- package/dist/modules/accounts/IdentityDeletionProcessController.js +4 -24
- package/dist/modules/accounts/IdentityDeletionProcessController.js.map +1 -1
- package/dist/modules/accounts/data/IdentityDeletionProcess.d.ts +35 -8
- package/dist/modules/accounts/data/IdentityDeletionProcess.d.ts.map +1 -1
- package/dist/modules/accounts/data/IdentityDeletionProcess.js +65 -10
- package/dist/modules/accounts/data/IdentityDeletionProcess.js.map +1 -1
- package/dist/modules/devices/DeviceController.d.ts +0 -1
- package/dist/modules/devices/DeviceController.d.ts.map +1 -1
- package/dist/modules/devices/DeviceController.js +0 -3
- package/dist/modules/devices/DeviceController.js.map +1 -1
- package/dist/modules/devices/local/Device.d.ts +0 -2
- package/dist/modules/devices/local/Device.d.ts.map +1 -1
- package/dist/modules/devices/local/Device.js +0 -6
- package/dist/modules/devices/local/Device.js.map +1 -1
- package/dist/modules/files/FileController.d.ts +2 -9
- package/dist/modules/files/FileController.d.ts.map +1 -1
- package/dist/modules/files/FileController.js +37 -80
- package/dist/modules/files/FileController.js.map +1 -1
- package/dist/modules/files/local/File.d.ts +49 -9
- package/dist/modules/files/local/File.d.ts.map +1 -1
- package/dist/modules/files/local/File.js +134 -12
- package/dist/modules/files/local/File.js.map +1 -1
- package/dist/modules/index.d.ts +1 -23
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +1 -23
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/messages/MessageController.d.ts +3 -8
- package/dist/modules/messages/MessageController.d.ts.map +1 -1
- package/dist/modules/messages/MessageController.js +26 -49
- package/dist/modules/messages/MessageController.js.map +1 -1
- package/dist/modules/messages/local/Message.d.ts +28 -7
- package/dist/modules/messages/local/Message.d.ts.map +1 -1
- package/dist/modules/messages/local/Message.js +53 -12
- package/dist/modules/messages/local/Message.js.map +1 -1
- package/dist/modules/messages/local/{CachedMessageRecipient.d.ts → MessageRecipient.d.ts} +4 -4
- package/dist/modules/messages/local/MessageRecipient.d.ts.map +1 -0
- package/dist/modules/messages/local/{CachedMessageRecipient.js → MessageRecipient.js} +12 -12
- package/dist/modules/messages/local/MessageRecipient.js.map +1 -0
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts +1 -10
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js +42 -125
- package/dist/modules/relationshipTemplates/RelationshipTemplateController.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts +25 -8
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.d.ts.map +1 -1
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js +68 -14
- package/dist/modules/relationshipTemplates/local/RelationshipTemplate.js.map +1 -1
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js +2 -2
- package/dist/modules/relationshipTemplates/local/SendRelationshipTemplateParameters.js.map +1 -1
- package/dist/modules/relationships/RelationshipSecretController.d.ts +3 -3
- package/dist/modules/relationships/RelationshipSecretController.d.ts.map +1 -1
- package/dist/modules/relationships/RelationshipSecretController.js +2 -2
- package/dist/modules/relationships/RelationshipSecretController.js.map +1 -1
- package/dist/modules/relationships/RelationshipsController.d.ts +0 -10
- package/dist/modules/relationships/RelationshipsController.d.ts.map +1 -1
- package/dist/modules/relationships/RelationshipsController.js +41 -115
- package/dist/modules/relationships/RelationshipsController.js.map +1 -1
- package/dist/modules/relationships/local/Relationship.d.ts +14 -10
- package/dist/modules/relationships/local/Relationship.d.ts.map +1 -1
- package/dist/modules/relationships/local/Relationship.js +30 -28
- package/dist/modules/relationships/local/Relationship.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationMapper.js +3 -3
- package/dist/modules/sync/DatawalletModificationMapper.js.map +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.d.ts +2 -60
- package/dist/modules/sync/DatawalletModificationsProcessor.d.ts.map +1 -1
- package/dist/modules/sync/DatawalletModificationsProcessor.js +11 -158
- package/dist/modules/sync/DatawalletModificationsProcessor.js.map +1 -1
- package/dist/modules/sync/SyncController.d.ts +0 -2
- package/dist/modules/sync/SyncController.d.ts.map +1 -1
- package/dist/modules/sync/SyncController.js +1 -5
- package/dist/modules/sync/SyncController.js.map +1 -1
- package/dist/modules/sync/SynchronizedCollection.d.ts.map +1 -1
- package/dist/modules/sync/SynchronizedCollection.js +24 -10
- package/dist/modules/sync/SynchronizedCollection.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.d.ts.map +1 -1
- package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.js +1 -4
- package/dist/modules/sync/externalEventProcessors/FileOwnershipClaimedExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessStatusChangedExternalEventProcessor.js +1 -1
- package/dist/modules/sync/externalEventProcessors/IdentityDeletionProcessStatusChangedExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/MessageDeliveredExternalEventProcessor.js +1 -1
- package/dist/modules/sync/externalEventProcessors/MessageDeliveredExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.js +1 -1
- package/dist/modules/sync/externalEventProcessors/RelationshipExternalEventProcessor.js.map +1 -1
- package/dist/modules/sync/local/DatawalletModification.d.ts +2 -2
- package/dist/modules/sync/local/DatawalletModification.d.ts.map +1 -1
- package/dist/modules/sync/local/DatawalletModification.js +1 -1
- package/dist/modules/sync/local/DatawalletModification.js.map +1 -1
- package/dist/modules/sync/migrations/DeviceMigrations.d.ts +2 -2
- package/dist/modules/sync/migrations/DeviceMigrations.d.ts.map +1 -1
- package/dist/modules/sync/migrations/DeviceMigrations.js +5 -15
- package/dist/modules/sync/migrations/DeviceMigrations.js.map +1 -1
- package/dist/modules/tokens/AnonymousTokenController.d.ts.map +1 -1
- package/dist/modules/tokens/AnonymousTokenController.js +1 -5
- package/dist/modules/tokens/AnonymousTokenController.js.map +1 -1
- package/dist/modules/tokens/TokenController.d.ts +1 -10
- package/dist/modules/tokens/TokenController.d.ts.map +1 -1
- package/dist/modules/tokens/TokenController.js +28 -122
- package/dist/modules/tokens/TokenController.js.map +1 -1
- package/dist/modules/tokens/local/Token.d.ts +15 -7
- package/dist/modules/tokens/local/Token.d.ts.map +1 -1
- package/dist/modules/tokens/local/Token.js +38 -13
- package/dist/modules/tokens/local/Token.js.map +1 -1
- package/package.json +9 -9
- package/dist/core/ICacheable.d.ts +0 -6
- package/dist/core/ICacheable.d.ts.map +0 -1
- package/dist/core/ICacheable.js +0 -17
- package/dist/core/ICacheable.js.map +0 -1
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.d.ts +0 -44
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.d.ts.map +0 -1
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.js +0 -80
- package/dist/modules/accounts/data/CachedIdentityDeletionProcess.js.map +0 -1
- package/dist/modules/certificates/CertificateController.d.ts +0 -15
- package/dist/modules/certificates/CertificateController.d.ts.map +0 -1
- package/dist/modules/certificates/CertificateController.js +0 -20
- package/dist/modules/certificates/CertificateController.js.map +0 -1
- package/dist/modules/certificates/CertificateIssuer.d.ts +0 -29
- package/dist/modules/certificates/CertificateIssuer.d.ts.map +0 -1
- package/dist/modules/certificates/CertificateIssuer.js +0 -43
- package/dist/modules/certificates/CertificateIssuer.js.map +0 -1
- package/dist/modules/certificates/CertificateValidator.d.ts +0 -15
- package/dist/modules/certificates/CertificateValidator.d.ts.map +0 -1
- package/dist/modules/certificates/CertificateValidator.js +0 -20
- package/dist/modules/certificates/CertificateValidator.js.map +0 -1
- package/dist/modules/certificates/data/Certificate.d.ts +0 -34
- package/dist/modules/certificates/data/Certificate.d.ts.map +0 -1
- package/dist/modules/certificates/data/Certificate.js +0 -61
- package/dist/modules/certificates/data/Certificate.js.map +0 -1
- package/dist/modules/certificates/data/CertificateConstraint.d.ts +0 -10
- package/dist/modules/certificates/data/CertificateConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/CertificateConstraint.js +0 -23
- package/dist/modules/certificates/data/CertificateConstraint.js.map +0 -1
- package/dist/modules/certificates/data/CertificateContent.d.ts +0 -29
- package/dist/modules/certificates/data/CertificateContent.d.ts.map +0 -1
- package/dist/modules/certificates/data/CertificateContent.js +0 -66
- package/dist/modules/certificates/data/CertificateContent.js.map +0 -1
- package/dist/modules/certificates/data/CertificateItem.d.ts +0 -11
- package/dist/modules/certificates/data/CertificateItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/CertificateItem.js +0 -24
- package/dist/modules/certificates/data/CertificateItem.js.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.d.ts +0 -30
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js +0 -56
- package/dist/modules/certificates/data/constraints/CertificateBorderConstraint.js.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.d.ts +0 -32
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js +0 -59
- package/dist/modules/certificates/data/constraints/CertificateCityConstraint.js.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts +0 -10
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js +0 -30
- package/dist/modules/certificates/data/constraints/CertificateIdentityConstraint.js.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts +0 -17
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.d.ts.map +0 -1
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js +0 -40
- package/dist/modules/certificates/data/constraints/CertificateTimeConstraint.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.d.ts +0 -18
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js +0 -38
- package/dist/modules/certificates/data/items/CertificateAuthorizationItem.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificateDelegateItem.d.ts +0 -19
- package/dist/modules/certificates/data/items/CertificateDelegateItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js +0 -45
- package/dist/modules/certificates/data/items/CertificateDelegateItem.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts +0 -21
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js +0 -41
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItem.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts +0 -26
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js +0 -54
- package/dist/modules/certificates/data/items/CertificatePrivateAttributeItemSource.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.d.ts +0 -15
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js +0 -38
- package/dist/modules/certificates/data/items/CertificatePublicAttributeItem.js.map +0 -1
- package/dist/modules/certificates/data/items/CertificateRoleItem.d.ts +0 -17
- package/dist/modules/certificates/data/items/CertificateRoleItem.d.ts.map +0 -1
- package/dist/modules/certificates/data/items/CertificateRoleItem.js +0 -37
- package/dist/modules/certificates/data/items/CertificateRoleItem.js.map +0 -1
- package/dist/modules/files/local/CachedFile.d.ts +0 -52
- package/dist/modules/files/local/CachedFile.d.ts.map +0 -1
- package/dist/modules/files/local/CachedFile.js +0 -145
- package/dist/modules/files/local/CachedFile.js.map +0 -1
- package/dist/modules/messages/local/CachedMessage.d.ts +0 -23
- package/dist/modules/messages/local/CachedMessage.d.ts.map +0 -1
- package/dist/modules/messages/local/CachedMessage.js +0 -65
- package/dist/modules/messages/local/CachedMessage.js.map +0 -1
- package/dist/modules/messages/local/CachedMessageRecipient.d.ts.map +0 -1
- package/dist/modules/messages/local/CachedMessageRecipient.js.map +0 -1
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts +0 -30
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.d.ts.map +0 -1
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js +0 -80
- package/dist/modules/relationshipTemplates/local/CachedRelationshipTemplate.js.map +0 -1
- package/dist/modules/relationships/local/CachedRelationship.d.ts +0 -20
- package/dist/modules/relationships/local/CachedRelationship.d.ts.map +0 -1
- package/dist/modules/relationships/local/CachedRelationship.js +0 -57
- package/dist/modules/relationships/local/CachedRelationship.js.map +0 -1
- package/dist/modules/tokens/local/CachedToken.d.ts +0 -20
- package/dist/modules/tokens/local/CachedToken.d.ts.map +0 -1
- package/dist/modules/tokens/local/CachedToken.js +0 -54
- package/dist/modules/tokens/local/CachedToken.js.map +0 -1
|
@@ -17,11 +17,21 @@ const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
|
17
17
|
const core_1 = require("../../../core");
|
|
18
18
|
const PasswordProtection_1 = require("../../../core/types/PasswordProtection");
|
|
19
19
|
const TokenReference_1 = require("../transmission/TokenReference");
|
|
20
|
-
const CachedToken_1 = require("./CachedToken");
|
|
21
20
|
let Token = class Token extends core_1.CoreSynchronizable {
|
|
22
21
|
constructor() {
|
|
23
22
|
super(...arguments);
|
|
24
|
-
this.technicalProperties = [
|
|
23
|
+
this.technicalProperties = [
|
|
24
|
+
"@type",
|
|
25
|
+
"@context",
|
|
26
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.secretKey),
|
|
27
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.isOwn),
|
|
28
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.createdBy),
|
|
29
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.createdAt),
|
|
30
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.expiresAt),
|
|
31
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.createdByDevice),
|
|
32
|
+
(0, ts_simple_nameof_1.nameof)((r) => r.forIdentity)
|
|
33
|
+
];
|
|
34
|
+
this.contentProperties = [(0, ts_simple_nameof_1.nameof)((r) => r.content)];
|
|
25
35
|
this.userdataProperties = [(0, ts_simple_nameof_1.nameof)((r) => r.passwordProtection)];
|
|
26
36
|
this.metadataProperties = [(0, ts_simple_nameof_1.nameof)((r) => r.metadata), (0, ts_simple_nameof_1.nameof)((r) => r.metadataModifiedAt)];
|
|
27
37
|
}
|
|
@@ -33,15 +43,10 @@ let Token = class Token extends core_1.CoreSynchronizable {
|
|
|
33
43
|
id: this.id,
|
|
34
44
|
backboneBaseUrl,
|
|
35
45
|
key: this.secretKey,
|
|
36
|
-
forIdentityTruncated: this.
|
|
46
|
+
forIdentityTruncated: this.forIdentity?.toString().slice(-4),
|
|
37
47
|
passwordProtection: this.passwordProtection?.toSharedPasswordProtection()
|
|
38
48
|
});
|
|
39
49
|
}
|
|
40
|
-
setCache(cache) {
|
|
41
|
-
this.cache = cache;
|
|
42
|
-
this.cachedAt = core_types_1.CoreDate.utc();
|
|
43
|
-
return this;
|
|
44
|
-
}
|
|
45
50
|
setMetadata(metadata) {
|
|
46
51
|
this.metadata = metadata;
|
|
47
52
|
this.metadataModifiedAt = core_types_1.CoreDate.utc();
|
|
@@ -64,15 +69,35 @@ __decorate([
|
|
|
64
69
|
__metadata("design:type", PasswordProtection_1.PasswordProtection)
|
|
65
70
|
], Token.prototype, "passwordProtection", void 0);
|
|
66
71
|
__decorate([
|
|
67
|
-
(0, ts_serval_1.validate)(
|
|
72
|
+
(0, ts_serval_1.validate)(),
|
|
68
73
|
(0, ts_serval_1.serialize)(),
|
|
69
|
-
__metadata("design:type",
|
|
70
|
-
], Token.prototype, "
|
|
74
|
+
__metadata("design:type", core_types_1.CoreAddress)
|
|
75
|
+
], Token.prototype, "createdBy", void 0);
|
|
71
76
|
__decorate([
|
|
72
|
-
(0, ts_serval_1.validate)(
|
|
77
|
+
(0, ts_serval_1.validate)(),
|
|
78
|
+
(0, ts_serval_1.serialize)(),
|
|
79
|
+
__metadata("design:type", core_types_1.CoreDate)
|
|
80
|
+
], Token.prototype, "createdAt", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, ts_serval_1.validate)(),
|
|
73
83
|
(0, ts_serval_1.serialize)(),
|
|
74
84
|
__metadata("design:type", core_types_1.CoreDate)
|
|
75
|
-
], Token.prototype, "
|
|
85
|
+
], Token.prototype, "expiresAt", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, ts_serval_1.validate)(),
|
|
88
|
+
(0, ts_serval_1.serialize)(),
|
|
89
|
+
__metadata("design:type", ts_serval_1.Serializable)
|
|
90
|
+
], Token.prototype, "content", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, ts_serval_1.validate)(),
|
|
93
|
+
(0, ts_serval_1.serialize)(),
|
|
94
|
+
__metadata("design:type", core_types_1.CoreId)
|
|
95
|
+
], Token.prototype, "createdByDevice", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, ts_serval_1.validate)({ nullable: true }),
|
|
98
|
+
(0, ts_serval_1.serialize)(),
|
|
99
|
+
__metadata("design:type", core_types_1.CoreAddress)
|
|
100
|
+
], Token.prototype, "forIdentity", void 0);
|
|
76
101
|
__decorate([
|
|
77
102
|
(0, ts_serval_1.validate)({ nullable: true }),
|
|
78
103
|
(0, ts_serval_1.serialize)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Token.js","sourceRoot":"","sources":["../../../../src/modules/tokens/local/Token.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"Token.js","sourceRoot":"","sources":["../../../../src/modules/tokens/local/Token.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4F;AAC5F,kDAAoG;AACpG,0CAAkE;AAClE,uDAA0C;AAC1C,wCAAwE;AACxE,+EAAiG;AACjG,mEAAgE;AAmBzD,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,yBAAkB;IAAtC;;QACsB,wBAAmB,GAAG;YAC3C,OAAO;YACP,UAAU;YACV,IAAA,yBAAM,EAAQ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YACjC,IAAA,yBAAM,EAAQ,CAAC,CAAC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C5B,IAAA,qBAAS,GAAE;8BACgB,qBAAQ;iDAAC;gBA1D5B,KAAK;IADjB,IAAA,gBAAI,EAAC,OAAO,CAAC;GACD,KAAK,CA8EjB"}
|
package/package.json
CHANGED
|
@@ -69,16 +69,16 @@
|
|
|
69
69
|
"@js-soft/docdb-access-abstractions": "1.2.0",
|
|
70
70
|
"@js-soft/logging-abstractions": "^1.0.1",
|
|
71
71
|
"@js-soft/simple-logger": "1.0.5",
|
|
72
|
-
"@js-soft/ts-utils": "^2.3.
|
|
73
|
-
"@nmshd/core-types": "7.0.0-alpha.
|
|
72
|
+
"@js-soft/ts-utils": "^2.3.4",
|
|
73
|
+
"@nmshd/core-types": "7.0.0-alpha.55",
|
|
74
74
|
"@nmshd/crypto": "2.1.2",
|
|
75
|
-
"axios": "^1.
|
|
75
|
+
"axios": "^1.11.0",
|
|
76
76
|
"fast-json-patch": "^3.1.1",
|
|
77
|
-
"form-data": "^4.0.
|
|
77
|
+
"form-data": "^4.0.4",
|
|
78
78
|
"https-proxy-agent": "^7.0.6",
|
|
79
79
|
"json-stringify-safe": "^5.0.1",
|
|
80
80
|
"lodash": "^4.17.21",
|
|
81
|
-
"luxon": "^3.
|
|
81
|
+
"luxon": "^3.7.1",
|
|
82
82
|
"qs": "^6.14.0",
|
|
83
83
|
"reflect-metadata": "^0.2.2",
|
|
84
84
|
"ts-simple-nameof": "^1.3.1",
|
|
@@ -88,20 +88,20 @@
|
|
|
88
88
|
"@js-soft/docdb-access-loki": "1.3.0",
|
|
89
89
|
"@js-soft/docdb-access-mongo": "1.3.0",
|
|
90
90
|
"@js-soft/node-logger": "1.2.0",
|
|
91
|
-
"@js-soft/ts-serval": "2.0.
|
|
91
|
+
"@js-soft/ts-serval": "2.0.13",
|
|
92
92
|
"@types/json-stringify-safe": "^5.0.3",
|
|
93
93
|
"@types/lodash": "^4.17.20",
|
|
94
94
|
"@types/luxon": "^3.6.2",
|
|
95
95
|
"@types/qs": "^6.14.0",
|
|
96
96
|
"@types/uuid": "^10.0.0",
|
|
97
97
|
"correlation-id": "^5.2.0",
|
|
98
|
-
"expect": "^30.0.
|
|
99
|
-
"testcontainers": "^11.
|
|
98
|
+
"expect": "^30.0.5",
|
|
99
|
+
"testcontainers": "^11.4.0",
|
|
100
100
|
"ts-mockito": "^2.6.1"
|
|
101
101
|
},
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public",
|
|
104
104
|
"provenance": true
|
|
105
105
|
},
|
|
106
|
-
"version": "7.0.0-alpha.
|
|
106
|
+
"version": "7.0.0-alpha.55"
|
|
107
107
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ICacheable.d.ts","sourceRoot":"","sources":["../../src/core/ICacheable.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,UAAU;IACvB,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,QAAQ,CAAC,KAAK,EAAE,GAAG,GAAG,IAAI,CAAC;CAC9B;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,UAAU,CAajE"}
|
package/dist/core/ICacheable.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isCacheable = isCacheable;
|
|
4
|
-
const ts_simple_nameof_1 = require("ts-simple-nameof");
|
|
5
|
-
const CoreSynchronizable_1 = require("./CoreSynchronizable");
|
|
6
|
-
function isCacheable(object) {
|
|
7
|
-
if (!(object instanceof CoreSynchronizable_1.CoreSynchronizable)) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
if (typeof object !== "object") {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
const hasCacheProperty = object.toJSON().hasOwnProperty((0, ts_simple_nameof_1.nameof)((o) => o.cache));
|
|
14
|
-
const hasSetCacheMethod = typeof object.setCache === "function";
|
|
15
|
-
return hasCacheProperty && hasSetCacheMethod;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=ICacheable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ICacheable.js","sourceRoot":"","sources":["../../src/core/ICacheable.ts"],"names":[],"mappings":";;AAQA,kCAaC;AArBD,uDAA0C;AAC1C,6DAA0D;AAO1D,SAAgB,WAAW,CAAC,MAAe;IACvC,IAAI,CAAC,CAAC,MAAM,YAAY,uCAAkB,CAAC,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,cAAc,CAAC,IAAA,yBAAM,EAAa,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5F,MAAM,iBAAiB,GAAG,OAAQ,MAAc,CAAC,QAAQ,KAAK,UAAU,CAAC;IAEzE,OAAO,gBAAgB,IAAI,iBAAiB,CAAC;AACjD,CAAC"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Serializable } from "@js-soft/ts-serval";
|
|
2
|
-
import { CoreDate, CoreId } from "@nmshd/core-types";
|
|
3
|
-
import { IdentityDeletionProcessStatus } from "./IdentityDeletionProcessStatus";
|
|
4
|
-
export interface CachedIdentityDeletionProcessJSON {
|
|
5
|
-
status: IdentityDeletionProcessStatus;
|
|
6
|
-
createdAt?: string;
|
|
7
|
-
createdByDevice?: string;
|
|
8
|
-
approvalPeriodEndsAt?: string;
|
|
9
|
-
rejectedAt?: string;
|
|
10
|
-
rejectedByDevice?: string;
|
|
11
|
-
approvedAt?: string;
|
|
12
|
-
approvedByDevice?: string;
|
|
13
|
-
gracePeriodEndsAt?: string;
|
|
14
|
-
cancelledAt?: string;
|
|
15
|
-
cancelledByDevice?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface ICachedIdentityDeletionProcess {
|
|
18
|
-
status: IdentityDeletionProcessStatus;
|
|
19
|
-
createdAt?: CoreDate;
|
|
20
|
-
createdByDevice?: CoreId;
|
|
21
|
-
approvalPeriodEndsAt?: CoreDate;
|
|
22
|
-
rejectedAt?: CoreDate;
|
|
23
|
-
rejectedByDevice?: CoreId;
|
|
24
|
-
approvedAt?: CoreDate;
|
|
25
|
-
approvedByDevice?: CoreId;
|
|
26
|
-
gracePeriodEndsAt?: CoreDate;
|
|
27
|
-
cancelledAt?: CoreDate;
|
|
28
|
-
cancelledByDevice?: CoreId;
|
|
29
|
-
}
|
|
30
|
-
export declare class CachedIdentityDeletionProcess extends Serializable implements ICachedIdentityDeletionProcess {
|
|
31
|
-
status: IdentityDeletionProcessStatus;
|
|
32
|
-
createdAt?: CoreDate;
|
|
33
|
-
createdByDevice?: CoreId;
|
|
34
|
-
approvalPeriodEndsAt?: CoreDate;
|
|
35
|
-
rejectedAt?: CoreDate;
|
|
36
|
-
rejectedByDevice?: CoreId;
|
|
37
|
-
approvedAt?: CoreDate;
|
|
38
|
-
approvedByDevice?: CoreId;
|
|
39
|
-
gracePeriodEndsAt?: CoreDate;
|
|
40
|
-
cancelledAt?: CoreDate;
|
|
41
|
-
cancelledByDevice?: CoreId;
|
|
42
|
-
static from(value: ICachedIdentityDeletionProcess | CachedIdentityDeletionProcessJSON): CachedIdentityDeletionProcess;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=CachedIdentityDeletionProcess.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CachedIdentityDeletionProcess.d.ts","sourceRoot":"","sources":["../../../../src/modules/accounts/data/CachedIdentityDeletionProcess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA6B,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,6BAA6B,EAAE,MAAM,iC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B,CAAC,EAAE,MAAM,CAAC;IAI1B,iBAAiB,CAAC,EAAE,QAAQ,CAAC;IAI7B,WAAW,CAAC,EAAE,QAAQ,CAAC;IAIvB,iBAAiB,CAAC,EAAE,MAAM,CAAC;WAEpB,IAAI,CAAC,KAAK,EAAE,8BAA8B,GAAG,iCAAiC,GAAG,6BAA6B;CAG/H"}
|
|
@@ -1,80 +0,0 @@
|
|
|
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.CachedIdentityDeletionProcess = void 0;
|
|
13
|
-
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
-
const core_types_1 = require("@nmshd/core-types");
|
|
15
|
-
const IdentityDeletionProcessStatus_1 = require("./IdentityDeletionProcessStatus");
|
|
16
|
-
let CachedIdentityDeletionProcess = class CachedIdentityDeletionProcess extends ts_serval_1.Serializable {
|
|
17
|
-
static from(value) {
|
|
18
|
-
return this.fromAny(value);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
exports.CachedIdentityDeletionProcess = CachedIdentityDeletionProcess;
|
|
22
|
-
__decorate([
|
|
23
|
-
(0, ts_serval_1.validate)(),
|
|
24
|
-
(0, ts_serval_1.serialize)(),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], CachedIdentityDeletionProcess.prototype, "status", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
29
|
-
(0, ts_serval_1.serialize)(),
|
|
30
|
-
__metadata("design:type", core_types_1.CoreDate)
|
|
31
|
-
], CachedIdentityDeletionProcess.prototype, "createdAt", void 0);
|
|
32
|
-
__decorate([
|
|
33
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
34
|
-
(0, ts_serval_1.serialize)(),
|
|
35
|
-
__metadata("design:type", core_types_1.CoreId)
|
|
36
|
-
], CachedIdentityDeletionProcess.prototype, "createdByDevice", void 0);
|
|
37
|
-
__decorate([
|
|
38
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
39
|
-
(0, ts_serval_1.serialize)(),
|
|
40
|
-
__metadata("design:type", core_types_1.CoreDate)
|
|
41
|
-
], CachedIdentityDeletionProcess.prototype, "approvalPeriodEndsAt", void 0);
|
|
42
|
-
__decorate([
|
|
43
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
44
|
-
(0, ts_serval_1.serialize)(),
|
|
45
|
-
__metadata("design:type", core_types_1.CoreDate)
|
|
46
|
-
], CachedIdentityDeletionProcess.prototype, "rejectedAt", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
49
|
-
(0, ts_serval_1.serialize)(),
|
|
50
|
-
__metadata("design:type", core_types_1.CoreId)
|
|
51
|
-
], CachedIdentityDeletionProcess.prototype, "rejectedByDevice", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
54
|
-
(0, ts_serval_1.serialize)(),
|
|
55
|
-
__metadata("design:type", core_types_1.CoreDate)
|
|
56
|
-
], CachedIdentityDeletionProcess.prototype, "approvedAt", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
59
|
-
(0, ts_serval_1.serialize)(),
|
|
60
|
-
__metadata("design:type", core_types_1.CoreId)
|
|
61
|
-
], CachedIdentityDeletionProcess.prototype, "approvedByDevice", void 0);
|
|
62
|
-
__decorate([
|
|
63
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
64
|
-
(0, ts_serval_1.serialize)(),
|
|
65
|
-
__metadata("design:type", core_types_1.CoreDate)
|
|
66
|
-
], CachedIdentityDeletionProcess.prototype, "gracePeriodEndsAt", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
69
|
-
(0, ts_serval_1.serialize)(),
|
|
70
|
-
__metadata("design:type", core_types_1.CoreDate)
|
|
71
|
-
], CachedIdentityDeletionProcess.prototype, "cancelledAt", void 0);
|
|
72
|
-
__decorate([
|
|
73
|
-
(0, ts_serval_1.validate)({ nullable: true }),
|
|
74
|
-
(0, ts_serval_1.serialize)(),
|
|
75
|
-
__metadata("design:type", core_types_1.CoreId)
|
|
76
|
-
], CachedIdentityDeletionProcess.prototype, "cancelledByDevice", void 0);
|
|
77
|
-
exports.CachedIdentityDeletionProcess = CachedIdentityDeletionProcess = __decorate([
|
|
78
|
-
(0, ts_serval_1.type)("CachedIdentityDeletionProcess")
|
|
79
|
-
], CachedIdentityDeletionProcess);
|
|
80
|
-
//# sourceMappingURL=CachedIdentityDeletionProcess.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CachedIdentityDeletionProcess.js","sourceRoot":"","sources":["../../../../src/modules/accounts/data/CachedIdentityDeletionProcess.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA6E;AAC7E,kDAAqD;AACrD,mFAAgF;AA+BzE,IAAM,6BAA6B,GAAnC,MAAM,6BAA8B,SAAQ,wBAAY;IA6CpD,MAAM,CAAC,IAAI,CAAC,KAAyE;QACxF,OAAO,IAAI,CAAC,OAAO,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,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC5B,IAAA,qBAAS,GAAE;8BACe,mBAAM;wEAAC;wCA3CzB,6BAA6B;IADzC,IAAA,gBAAI,EAAC,+BAA+B,CAAC;GACzB,6BAA6B,CAgDzC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TransportController } from "../../core";
|
|
2
|
-
import { AccountController } from "../accounts/AccountController";
|
|
3
|
-
/**
|
|
4
|
-
* The CertificateController keeps track of all created and received certificates.
|
|
5
|
-
*
|
|
6
|
-
* For example:
|
|
7
|
-
* - Store certificates for technical identities (per relationship)
|
|
8
|
-
* - Store certificates for own attributes
|
|
9
|
-
* - Store certificates for own relationships/roles/authorization
|
|
10
|
-
* - Store certificates for other identities
|
|
11
|
-
*/
|
|
12
|
-
export declare class CertificateController extends TransportController {
|
|
13
|
-
constructor(parent: AccountController);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=CertificateController.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CertificateController.d.ts","sourceRoot":"","sources":["../../../src/modules/certificates/CertificateController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,SAAQ,mBAAmB;gBACvC,MAAM,EAAE,iBAAiB;CAG/C"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CertificateController = void 0;
|
|
4
|
-
const core_1 = require("../../core");
|
|
5
|
-
/**
|
|
6
|
-
* The CertificateController keeps track of all created and received certificates.
|
|
7
|
-
*
|
|
8
|
-
* For example:
|
|
9
|
-
* - Store certificates for technical identities (per relationship)
|
|
10
|
-
* - Store certificates for own attributes
|
|
11
|
-
* - Store certificates for own relationships/roles/authorization
|
|
12
|
-
* - Store certificates for other identities
|
|
13
|
-
*/
|
|
14
|
-
class CertificateController extends core_1.TransportController {
|
|
15
|
-
constructor(parent) {
|
|
16
|
-
super(core_1.ControllerName.Certificate, parent);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.CertificateController = CertificateController;
|
|
20
|
-
//# sourceMappingURL=CertificateController.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CertificateController.js","sourceRoot":"","sources":["../../../src/modules/certificates/CertificateController.ts"],"names":[],"mappings":";;;AAAA,qCAAiE;AAGjE;;;;;;;;GAQG;AACH,MAAa,qBAAsB,SAAQ,0BAAmB;IAC1D,YAAmB,MAAyB;QACxC,KAAK,CAAC,qBAAc,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC9C,CAAC;CACJ;AAJD,sDAIC"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { IDatabaseCollection } from "@js-soft/docdb-access-abstractions";
|
|
2
|
-
import { ICoreAddress, ICoreDate } from "@nmshd/core-types";
|
|
3
|
-
import { ICryptoSignaturePublicKey } from "@nmshd/crypto";
|
|
4
|
-
import { TransportController } from "../../core";
|
|
5
|
-
import { AccountController } from "../accounts/AccountController";
|
|
6
|
-
import { Certificate } from "./data/Certificate";
|
|
7
|
-
import { ICertificateConstraint } from "./data/CertificateConstraint";
|
|
8
|
-
import { ICertificateContent } from "./data/CertificateContent";
|
|
9
|
-
import { ICertificateItem } from "./data/CertificateItem";
|
|
10
|
-
/**
|
|
11
|
-
* The CertificateIssuer combines the functionality to create new certificates
|
|
12
|
-
* for own identity (e.g. for technical communication) or others (e.g. verification
|
|
13
|
-
* of other identities or certification of attributes).
|
|
14
|
-
*/
|
|
15
|
-
export declare class CertificateIssuer extends TransportController {
|
|
16
|
-
certificatesIssued: IDatabaseCollection;
|
|
17
|
-
constructor(parent: AccountController);
|
|
18
|
-
init(): Promise<this>;
|
|
19
|
-
issueCertificate(value: CertificateContentParam | ICertificateContent): Promise<Certificate>;
|
|
20
|
-
}
|
|
21
|
-
export declare class CertificateContentParam implements ICertificateContent {
|
|
22
|
-
issuedAt: ICoreDate;
|
|
23
|
-
issuer: ICoreAddress;
|
|
24
|
-
subject: ICoreAddress;
|
|
25
|
-
subjectPublicKey: ICryptoSignaturePublicKey;
|
|
26
|
-
constraints: ICertificateConstraint[];
|
|
27
|
-
items: ICertificateItem[];
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=CertificateIssuer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CertificateIssuer.d.ts","sourceRoot":"","sources":["../../../src/modules/certificates/CertificateIssuer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAY,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,EAAc,yBAAyB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAkB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAsB,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,mBAAmB;IAC/C,kBAAkB,EAAE,mBAAmB,CAAC;gBAE5B,MAAM,EAAE,iBAAiB;IAItB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAO9B,gBAAgB,CAAC,KAAK,EAAE,uBAAuB,GAAG,mBAAmB,GAAG,OAAO,CAAC,WAAW,CAAC;CAa5G;AAED,qBAAa,uBAAwB,YAAW,mBAAmB;IACxD,QAAQ,EAAE,SAAS,CAAkB;IACrC,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAE,yBAAyB,CAAC;IAC5C,WAAW,EAAE,sBAAsB,EAAE,CAAC;IACtC,KAAK,EAAE,gBAAgB,EAAE,CAAC;CACpC"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CertificateContentParam = exports.CertificateIssuer = void 0;
|
|
4
|
-
const core_types_1 = require("@nmshd/core-types");
|
|
5
|
-
const crypto_1 = require("@nmshd/crypto");
|
|
6
|
-
const core_1 = require("../../core");
|
|
7
|
-
const DbCollectionName_1 = require("../../core/DbCollectionName");
|
|
8
|
-
const Certificate_1 = require("./data/Certificate");
|
|
9
|
-
const CertificateContent_1 = require("./data/CertificateContent");
|
|
10
|
-
/**
|
|
11
|
-
* The CertificateIssuer combines the functionality to create new certificates
|
|
12
|
-
* for own identity (e.g. for technical communication) or others (e.g. verification
|
|
13
|
-
* of other identities or certification of attributes).
|
|
14
|
-
*/
|
|
15
|
-
class CertificateIssuer extends core_1.TransportController {
|
|
16
|
-
constructor(parent) {
|
|
17
|
-
super(core_1.ControllerName.CertificateIssuer, parent);
|
|
18
|
-
}
|
|
19
|
-
async init() {
|
|
20
|
-
await super.init();
|
|
21
|
-
this.certificatesIssued = await this.db.getCollection(DbCollectionName_1.DbCollectionName.CertificatesIssued);
|
|
22
|
-
return this;
|
|
23
|
-
}
|
|
24
|
-
async issueCertificate(value) {
|
|
25
|
-
const content = CertificateContent_1.CertificateContent.from(value);
|
|
26
|
-
const serializedContent = content.serialize();
|
|
27
|
-
const contentBuffer = crypto_1.CoreBuffer.fromUtf8(serializedContent);
|
|
28
|
-
const signature = await this.parent.identity.sign(contentBuffer);
|
|
29
|
-
const cert = Certificate_1.Certificate.from({
|
|
30
|
-
content: serializedContent,
|
|
31
|
-
signature: signature
|
|
32
|
-
});
|
|
33
|
-
return cert;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
exports.CertificateIssuer = CertificateIssuer;
|
|
37
|
-
class CertificateContentParam {
|
|
38
|
-
constructor() {
|
|
39
|
-
this.issuedAt = core_types_1.CoreDate.utc();
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.CertificateContentParam = CertificateContentParam;
|
|
43
|
-
//# sourceMappingURL=CertificateIssuer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CertificateIssuer.js","sourceRoot":"","sources":["../../../src/modules/certificates/CertificateIssuer.ts"],"names":[],"mappings":";;;AACA,kDAAsE;AACtE,0CAAsE;AACtE,qCAAiE;AACjE,kEAA+D;AAE/D,oDAAiD;AAEjD,kEAAoF;AAGpF;;;;GAIG;AACH,MAAa,iBAAkB,SAAQ,0BAAmB;IAGtD,YAAmB,MAAyB;QACxC,KAAK,CAAC,qBAAc,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;IAEe,KAAK,CAAC,IAAI;QACtB,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;QAEnB,IAAI,CAAC,kBAAkB,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,mCAAgB,CAAC,kBAAkB,CAAC,CAAC;QAC3F,OAAO,IAAI,CAAC;IAChB,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,KAAoD;QAC9E,MAAM,OAAO,GAAG,uCAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC/C,MAAM,iBAAiB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;QAC9C,MAAM,aAAa,GAAG,mBAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC;QAE7D,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAEjE,MAAM,IAAI,GAAG,yBAAW,CAAC,IAAI,CAAC;YAC1B,OAAO,EAAE,iBAAiB;YAC1B,SAAS,EAAE,SAAS;SACvB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ;AA3BD,8CA2BC;AAED,MAAa,uBAAuB;IAApC;QACW,aAAQ,GAAc,qBAAQ,CAAC,GAAG,EAAE,CAAC;IAMhD,CAAC;CAAA;AAPD,0DAOC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TransportController } from "../../core";
|
|
2
|
-
import { AccountController } from "../accounts/AccountController";
|
|
3
|
-
/**
|
|
4
|
-
* The CertificateValidator includes all functionality for validating certificates.
|
|
5
|
-
* - Check Issuer (+Signature)
|
|
6
|
-
* - Check Subject
|
|
7
|
-
* - Check Revocation (online vs. cached)
|
|
8
|
-
* -> possibly register for push notifications on status changes of this certificate
|
|
9
|
-
* - Check Constraints (Time, Region, ...)
|
|
10
|
-
* - Check Content
|
|
11
|
-
*/
|
|
12
|
-
export declare class CertificateValidator extends TransportController {
|
|
13
|
-
constructor(parent: AccountController);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=CertificateValidator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CertificateValidator.d.ts","sourceRoot":"","sources":["../../../src/modules/certificates/CertificateValidator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE;;;;;;;;GAQG;AACH,qBAAa,oBAAqB,SAAQ,mBAAmB;gBACtC,MAAM,EAAE,iBAAiB;CAG/C"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CertificateValidator = void 0;
|
|
4
|
-
const core_1 = require("../../core");
|
|
5
|
-
/**
|
|
6
|
-
* The CertificateValidator includes all functionality for validating certificates.
|
|
7
|
-
* - Check Issuer (+Signature)
|
|
8
|
-
* - Check Subject
|
|
9
|
-
* - Check Revocation (online vs. cached)
|
|
10
|
-
* -> possibly register for push notifications on status changes of this certificate
|
|
11
|
-
* - Check Constraints (Time, Region, ...)
|
|
12
|
-
* - Check Content
|
|
13
|
-
*/
|
|
14
|
-
class CertificateValidator extends core_1.TransportController {
|
|
15
|
-
constructor(parent) {
|
|
16
|
-
super(core_1.ControllerName.CertificateValidator, parent);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
exports.CertificateValidator = CertificateValidator;
|
|
20
|
-
//# sourceMappingURL=CertificateValidator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CertificateValidator.js","sourceRoot":"","sources":["../../../src/modules/certificates/CertificateValidator.ts"],"names":[],"mappings":";;;AAAA,qCAAiE;AAGjE;;;;;;;;GAQG;AACH,MAAa,oBAAqB,SAAQ,0BAAmB;IACzD,YAAmB,MAAyB;QACxC,KAAK,CAAC,qBAAc,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;CACJ;AAJD,oDAIC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
-
import { CryptoSignature, CryptoSignaturePublicKey, ICryptoSignature } from "@nmshd/crypto";
|
|
3
|
-
export interface ICertificate extends ISerializable {
|
|
4
|
-
content: string;
|
|
5
|
-
signature: ICryptoSignature;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* A Certificate is digitally signed data which is issued by one user A (issuer) for another user B (subject).
|
|
9
|
-
* The subject is eligible to share the certificate to any other user C, who in turn can verify, if the information
|
|
10
|
-
* provided really comes from user A. Certificates always contain structured data, thus it is machine readable and
|
|
11
|
-
* can be used for automatic checks.
|
|
12
|
-
*
|
|
13
|
-
* The content of a certificate is comparable with standardized SSL/TLS certificates, but they are not compatible
|
|
14
|
-
* with each other. However, the content can be transformed.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*/
|
|
18
|
-
export declare class Certificate extends Serializable {
|
|
19
|
-
content: string;
|
|
20
|
-
signature: CryptoSignature;
|
|
21
|
-
static from(value: ICertificate): Certificate;
|
|
22
|
-
/**
|
|
23
|
-
* Checks the validity of the digital signature. You have to provide the
|
|
24
|
-
* public key of the issuer.
|
|
25
|
-
*
|
|
26
|
-
* Careful: This method does only check the digital signature (if the certificate
|
|
27
|
-
* really comes from the issuer). Anything else, like validity, revocation or other
|
|
28
|
-
* constraints is not checked!
|
|
29
|
-
*
|
|
30
|
-
* @param publicKey The issuer's public key.
|
|
31
|
-
*/
|
|
32
|
-
verify(publicKey: CryptoSignaturePublicKey): Promise<boolean>;
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=Certificate.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Certificate.d.ts","sourceRoot":"","sources":["../../../../src/modules/certificates/data/Certificate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAA6B,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAc,eAAe,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAGxG,MAAM,WAAW,YAAa,SAAQ,aAAa;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,gBAAgB,CAAC;CAC/B;AAED;;;;;;;;;;GAUG;AACH,qBACa,WAAY,SAAQ,YAAY;IAGlC,OAAO,EAAE,MAAM,CAAC;IAIhB,SAAS,EAAE,eAAe,CAAC;WAEpB,IAAI,CAAC,KAAK,EAAE,YAAY,GAAG,WAAW;IAIpD;;;;;;;;;OASG;IACU,MAAM,CAAC,SAAS,EAAE,wBAAwB,GAAG,OAAO,CAAC,OAAO,CAAC;CAK7E"}
|
|
@@ -1,61 +0,0 @@
|
|
|
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.Certificate = void 0;
|
|
13
|
-
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
14
|
-
const crypto_1 = require("@nmshd/crypto");
|
|
15
|
-
const core_1 = require("../../../core");
|
|
16
|
-
/**
|
|
17
|
-
* A Certificate is digitally signed data which is issued by one user A (issuer) for another user B (subject).
|
|
18
|
-
* The subject is eligible to share the certificate to any other user C, who in turn can verify, if the information
|
|
19
|
-
* provided really comes from user A. Certificates always contain structured data, thus it is machine readable and
|
|
20
|
-
* can be used for automatic checks.
|
|
21
|
-
*
|
|
22
|
-
* The content of a certificate is comparable with standardized SSL/TLS certificates, but they are not compatible
|
|
23
|
-
* with each other. However, the content can be transformed.
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*/
|
|
27
|
-
let Certificate = class Certificate extends ts_serval_1.Serializable {
|
|
28
|
-
static from(value) {
|
|
29
|
-
return this.fromAny(value);
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Checks the validity of the digital signature. You have to provide the
|
|
33
|
-
* public key of the issuer.
|
|
34
|
-
*
|
|
35
|
-
* Careful: This method does only check the digital signature (if the certificate
|
|
36
|
-
* really comes from the issuer). Anything else, like validity, revocation or other
|
|
37
|
-
* constraints is not checked!
|
|
38
|
-
*
|
|
39
|
-
* @param publicKey The issuer's public key.
|
|
40
|
-
*/
|
|
41
|
-
async verify(publicKey) {
|
|
42
|
-
const buffer = crypto_1.CoreBuffer.fromUtf8(this.content);
|
|
43
|
-
const correct = await core_1.CoreCrypto.verify(buffer, this.signature, publicKey);
|
|
44
|
-
return correct;
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
exports.Certificate = Certificate;
|
|
48
|
-
__decorate([
|
|
49
|
-
(0, ts_serval_1.validate)(),
|
|
50
|
-
(0, ts_serval_1.serialize)(),
|
|
51
|
-
__metadata("design:type", String)
|
|
52
|
-
], Certificate.prototype, "content", void 0);
|
|
53
|
-
__decorate([
|
|
54
|
-
(0, ts_serval_1.validate)(),
|
|
55
|
-
(0, ts_serval_1.serialize)(),
|
|
56
|
-
__metadata("design:type", crypto_1.CryptoSignature)
|
|
57
|
-
], Certificate.prototype, "signature", void 0);
|
|
58
|
-
exports.Certificate = Certificate = __decorate([
|
|
59
|
-
(0, ts_serval_1.type)("Certificate")
|
|
60
|
-
], Certificate);
|
|
61
|
-
//# sourceMappingURL=Certificate.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Certificate.js","sourceRoot":"","sources":["../../../../src/modules/certificates/data/Certificate.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,kDAA4F;AAC5F,0CAAwG;AACxG,wCAA2C;AAO3C;;;;;;;;;;GAUG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,wBAAY;IASlC,MAAM,CAAC,IAAI,CAAC,KAAmB;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAED;;;;;;;;;OASG;IACI,KAAK,CAAC,MAAM,CAAC,SAAmC;QACnD,MAAM,MAAM,GAAG,mBAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,MAAM,iBAAU,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAC3E,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ,CAAA;AA5BY,kCAAW;AAGb;IAFN,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;;4CACW;AAIhB;IAFN,IAAA,oBAAQ,GAAE;IACV,IAAA,qBAAS,GAAE;8BACM,wBAAe;8CAAC;sBAPzB,WAAW;IADvB,IAAA,gBAAI,EAAC,aAAa,CAAC;GACP,WAAW,CA4BvB"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ISerializable, Serializable } from "@js-soft/ts-serval";
|
|
2
|
-
export interface ICertificateConstraint extends ISerializable {
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* A CertificateConstraint limits a Certificate to a specific time, region or identity.
|
|
6
|
-
*/
|
|
7
|
-
export declare class CertificateConstraint extends Serializable {
|
|
8
|
-
static from(value: ICertificateConstraint): CertificateConstraint;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=CertificateConstraint.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CertificateConstraint.d.ts","sourceRoot":"","sources":["../../../../src/modules/certificates/data/CertificateConstraint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,YAAY,EAAQ,MAAM,oBAAoB,CAAC;AAEvE,MAAM,WAAW,sBAAuB,SAAQ,aAAa;CAAG;AAEhE;;GAEG;AACH,qBACa,qBAAsB,SAAQ,YAAY;WACrC,IAAI,CAAC,KAAK,EAAE,sBAAsB,GAAG,qBAAqB;CAG3E"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.CertificateConstraint = void 0;
|
|
10
|
-
const ts_serval_1 = require("@js-soft/ts-serval");
|
|
11
|
-
/**
|
|
12
|
-
* A CertificateConstraint limits a Certificate to a specific time, region or identity.
|
|
13
|
-
*/
|
|
14
|
-
let CertificateConstraint = class CertificateConstraint extends ts_serval_1.Serializable {
|
|
15
|
-
static from(value) {
|
|
16
|
-
return this.fromAny(value);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
exports.CertificateConstraint = CertificateConstraint;
|
|
20
|
-
exports.CertificateConstraint = CertificateConstraint = __decorate([
|
|
21
|
-
(0, ts_serval_1.type)("CertificateConstraint")
|
|
22
|
-
], CertificateConstraint);
|
|
23
|
-
//# sourceMappingURL=CertificateConstraint.js.map
|