@nmshd/consumption 2.0.0-alpha.16 → 2.0.0-alpha.19
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 +4 -4
- package/dist/consumption/ConsumptionController.d.ts +6 -1
- package/dist/consumption/ConsumptionController.js +10 -6
- package/dist/consumption/ConsumptionController.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/modules/attributes/ConsumptionAttributesController.d.ts +1 -1
- package/dist/modules/attributes/ConsumptionAttributesController.js +4 -4
- package/dist/modules/attributes/ConsumptionAttributesController.js.map +1 -1
- package/dist/modules/attributes/CreateConsumptionAttributeParams.d.ts +5 -2
- package/dist/modules/attributes/CreateConsumptionAttributeParams.js.map +1 -1
- package/dist/modules/attributes/CreatePeerConsumptionAttributeParams.d.ts +8 -2
- package/dist/modules/attributes/CreatePeerConsumptionAttributeParams.js.map +1 -1
- package/dist/modules/attributes/CreateSharedConsumptionAttributeCopyParams.d.ts +6 -1
- package/dist/modules/attributes/CreateSharedConsumptionAttributeCopyParams.js.map +1 -1
- package/dist/modules/attributes/GetIdentityAttributesParams.d.ts +5 -2
- package/dist/modules/attributes/GetIdentityAttributesParams.js.map +1 -1
- package/dist/modules/attributes/GetRelationshipAttributesParams.d.ts +5 -2
- package/dist/modules/attributes/GetRelationshipAttributesParams.js.map +1 -1
- package/dist/modules/attributes/{SuccedConsumptionAttributeParams.d.ts → SucceedConsumptionAttributeParams.d.ts} +6 -2
- package/dist/modules/attributes/{SuccedConsumptionAttributeParams.js → SucceedConsumptionAttributeParams.js} +1 -1
- package/dist/modules/attributes/SucceedConsumptionAttributeParams.js.map +1 -0
- package/dist/modules/attributes/UpdateConsumptionAttributeParams.d.ts +6 -2
- package/dist/modules/attributes/UpdateConsumptionAttributeParams.js.map +1 -1
- package/dist/modules/drafts/DraftsController.js.map +1 -1
- package/dist/modules/index.d.ts +6 -3
- package/dist/modules/index.js +6 -3
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/settings/SettingsController.js.map +1 -1
- package/lib-web/nmshd.consumption.js +98 -158
- package/lib-web/nmshd.consumption.js.map +1 -1
- package/lib-web/nmshd.consumption.min.js +1 -1
- package/lib-web/nmshd.consumption.min.js.map +1 -1
- package/package.json +4 -4
- package/dist/modules/attributes/SuccedConsumptionAttributeParams.js.map +0 -1
- package/dist/modules/signatures/Signature.d.ts +0 -16
- package/dist/modules/signatures/Signature.js +0 -56
- package/dist/modules/signatures/Signature.js.map +0 -1
- package/dist/modules/signatures/SignatureContent.d.ts +0 -21
- package/dist/modules/signatures/SignatureContent.js +0 -59
- package/dist/modules/signatures/SignatureContent.js.map +0 -1
|
@@ -17,10 +17,10 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
|
|
|
17
17
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
18
18
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
19
19
|
exports.buildInformation = {
|
|
20
|
-
version: "2.0.0-alpha.
|
|
21
|
-
build: "
|
|
22
|
-
date: "2022-05-
|
|
23
|
-
commit: "
|
|
20
|
+
version: "2.0.0-alpha.19",
|
|
21
|
+
build: "37",
|
|
22
|
+
date: "2022-05-31T13:18:41+00:00",
|
|
23
|
+
commit: "87db1bd7a988acf984f2f777cae9c7a131310203",
|
|
24
24
|
dependencies: {"@js-soft/docdb-querytranslator":"^1.0.1"},
|
|
25
25
|
libraries: {
|
|
26
26
|
transport: transport_1.buildInformation,
|
|
@@ -78,8 +78,12 @@ exports.ConsumptionBaseController = ConsumptionBaseController;
|
|
|
78
78
|
|
|
79
79
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
80
80
|
exports.ConsumptionController = void 0;
|
|
81
|
-
const
|
|
81
|
+
const ConsumptionAttributesController_1 = __webpack_require__(/*! ../modules/attributes/ConsumptionAttributesController */ "./dist/modules/attributes/ConsumptionAttributesController.js");
|
|
82
|
+
const DraftsController_1 = __webpack_require__(/*! ../modules/drafts/DraftsController */ "./dist/modules/drafts/DraftsController.js");
|
|
82
83
|
const IncomingRequestsController_1 = __webpack_require__(/*! ../modules/requests/incoming/IncomingRequestsController */ "./dist/modules/requests/incoming/IncomingRequestsController.js");
|
|
84
|
+
const RequestItemProcessorRegistry_1 = __webpack_require__(/*! ../modules/requests/itemProcessors/RequestItemProcessorRegistry */ "./dist/modules/requests/itemProcessors/RequestItemProcessorRegistry.js");
|
|
85
|
+
const OutgoingRequestsController_1 = __webpack_require__(/*! ../modules/requests/outgoing/OutgoingRequestsController */ "./dist/modules/requests/outgoing/OutgoingRequestsController.js");
|
|
86
|
+
const SettingsController_1 = __webpack_require__(/*! ../modules/settings/SettingsController */ "./dist/modules/settings/SettingsController.js");
|
|
83
87
|
class ConsumptionController {
|
|
84
88
|
constructor(transport, accountController) {
|
|
85
89
|
this.transport = transport;
|
|
@@ -101,12 +105,12 @@ class ConsumptionController {
|
|
|
101
105
|
return this._settings;
|
|
102
106
|
}
|
|
103
107
|
async init(requestItemProcessors = []) {
|
|
104
|
-
this._attributes = await new
|
|
105
|
-
this._drafts = await new
|
|
106
|
-
const processorRegistry = new
|
|
107
|
-
this._outgoingRequests = await new
|
|
108
|
+
this._attributes = await new ConsumptionAttributesController_1.ConsumptionAttributesController(this).init();
|
|
109
|
+
this._drafts = await new DraftsController_1.DraftsController(this).init();
|
|
110
|
+
const processorRegistry = new RequestItemProcessorRegistry_1.RequestItemProcessorRegistry(this, requestItemProcessors);
|
|
111
|
+
this._outgoingRequests = await new OutgoingRequestsController_1.OutgoingRequestsController(await this.accountController.getSynchronizedCollection("Requests"), processorRegistry, this).init();
|
|
108
112
|
this._incomingRequests = await new IncomingRequestsController_1.IncomingRequestsController(await this.accountController.getSynchronizedCollection("Requests"), processorRegistry, this).init();
|
|
109
|
-
this._settings = await new
|
|
113
|
+
this._settings = await new SettingsController_1.SettingsController(this).init();
|
|
110
114
|
return this;
|
|
111
115
|
}
|
|
112
116
|
}
|
|
@@ -272,8 +276,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
272
276
|
};
|
|
273
277
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
274
278
|
__exportStar(__webpack_require__(/*! ./buildInformation */ "./dist/buildInformation.js"), exports);
|
|
279
|
+
__exportStar(__webpack_require__(/*! ./consumption */ "./dist/consumption/index.js"), exports);
|
|
275
280
|
__exportStar(__webpack_require__(/*! ./consumption/ConsumptionController */ "./dist/consumption/ConsumptionController.js"), exports);
|
|
276
|
-
__exportStar(__webpack_require__(/*! ./consumption/ConsumptionIds */ "./dist/consumption/ConsumptionIds.js"), exports);
|
|
277
281
|
__exportStar(__webpack_require__(/*! ./modules */ "./dist/modules/index.js"), exports);
|
|
278
282
|
//# sourceMappingURL=index.js.map
|
|
279
283
|
|
|
@@ -296,7 +300,7 @@ const CreateSharedConsumptionAttributeCopyParams_1 = __webpack_require__(/*! ./C
|
|
|
296
300
|
const ConsumptionAttribute_1 = __webpack_require__(/*! ./local/ConsumptionAttribute */ "./dist/modules/attributes/local/ConsumptionAttribute.js");
|
|
297
301
|
const ConsumptionAttributeShareInfo_1 = __webpack_require__(/*! ./local/ConsumptionAttributeShareInfo */ "./dist/modules/attributes/local/ConsumptionAttributeShareInfo.js");
|
|
298
302
|
const QueryTranslator_1 = __webpack_require__(/*! ./local/QueryTranslator */ "./dist/modules/attributes/local/QueryTranslator.js");
|
|
299
|
-
const
|
|
303
|
+
const SucceedConsumptionAttributeParams_1 = __webpack_require__(/*! ./SucceedConsumptionAttributeParams */ "./dist/modules/attributes/SucceedConsumptionAttributeParams.js");
|
|
300
304
|
class ConsumptionAttributesController extends consumption_1.ConsumptionBaseController {
|
|
301
305
|
constructor(parent) {
|
|
302
306
|
super(consumption_1.ConsumptionControllerName.ConsumptionAttributesController, parent);
|
|
@@ -375,14 +379,14 @@ class ConsumptionAttributesController extends consumption_1.ConsumptionBaseContr
|
|
|
375
379
|
queryWithType["attributeType"] = "RelationshipAttribute";
|
|
376
380
|
const dbQuery = QueryTranslator_1.relationshipQueryTranslator.parse(queryWithType);
|
|
377
381
|
const attributes = await this.attributes.find(dbQuery);
|
|
378
|
-
return attributes;
|
|
382
|
+
return await this.parseArray(attributes, ConsumptionAttribute_1.ConsumptionAttribute);
|
|
379
383
|
}
|
|
380
384
|
async executeIdentityAttributeQuery(params) {
|
|
381
385
|
const queryWithType = params.query;
|
|
382
386
|
queryWithType["attributeType"] = "IdentityAttribute";
|
|
383
387
|
const dbQuery = QueryTranslator_1.identityQueryTranslator.parse(queryWithType);
|
|
384
388
|
const attributes = await this.attributes.find(dbQuery);
|
|
385
|
-
return attributes;
|
|
389
|
+
return await this.parseArray(attributes, ConsumptionAttribute_1.ConsumptionAttribute);
|
|
386
390
|
}
|
|
387
391
|
async createConsumptionAttribute(params) {
|
|
388
392
|
const consumptionAttribute = await ConsumptionAttribute_1.ConsumptionAttribute.fromAttribute(params.content);
|
|
@@ -390,7 +394,7 @@ class ConsumptionAttributesController extends consumption_1.ConsumptionBaseContr
|
|
|
390
394
|
return consumptionAttribute;
|
|
391
395
|
}
|
|
392
396
|
async succeedConsumptionAttribute(params) {
|
|
393
|
-
const parsedParams =
|
|
397
|
+
const parsedParams = SucceedConsumptionAttributeParams_1.SucceedConsumptionAttributeParams.from(params);
|
|
394
398
|
const current = await this.attributes.findOne({
|
|
395
399
|
[(0, ts_simple_nameof_1.nameof)((c) => c.id)]: params.succeeds.toString()
|
|
396
400
|
});
|
|
@@ -670,10 +674,10 @@ exports.GetRelationshipAttributesParams = GetRelationshipAttributesParams;
|
|
|
670
674
|
|
|
671
675
|
/***/ }),
|
|
672
676
|
|
|
673
|
-
/***/ "./dist/modules/attributes/
|
|
674
|
-
|
|
675
|
-
!*** ./dist/modules/attributes/
|
|
676
|
-
|
|
677
|
+
/***/ "./dist/modules/attributes/SucceedConsumptionAttributeParams.js":
|
|
678
|
+
/*!**********************************************************************!*\
|
|
679
|
+
!*** ./dist/modules/attributes/SucceedConsumptionAttributeParams.js ***!
|
|
680
|
+
\**********************************************************************/
|
|
677
681
|
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
678
682
|
|
|
679
683
|
"use strict";
|
|
@@ -708,7 +712,49 @@ __decorate([
|
|
|
708
712
|
__metadata("design:type", transport_1.CoreId)
|
|
709
713
|
], SucceedConsumptionAttributeParams.prototype, "succeeds", void 0);
|
|
710
714
|
exports.SucceedConsumptionAttributeParams = SucceedConsumptionAttributeParams;
|
|
711
|
-
//# sourceMappingURL=
|
|
715
|
+
//# sourceMappingURL=SucceedConsumptionAttributeParams.js.map
|
|
716
|
+
|
|
717
|
+
/***/ }),
|
|
718
|
+
|
|
719
|
+
/***/ "./dist/modules/attributes/UpdateConsumptionAttributeParams.js":
|
|
720
|
+
/*!*********************************************************************!*\
|
|
721
|
+
!*** ./dist/modules/attributes/UpdateConsumptionAttributeParams.js ***!
|
|
722
|
+
\*********************************************************************/
|
|
723
|
+
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
724
|
+
|
|
725
|
+
"use strict";
|
|
726
|
+
|
|
727
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
728
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
729
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
730
|
+
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;
|
|
731
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
732
|
+
};
|
|
733
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
734
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
735
|
+
};
|
|
736
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
737
|
+
exports.UpdateConsumptionAttributeParams = void 0;
|
|
738
|
+
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
739
|
+
const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
|
|
740
|
+
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
741
|
+
class UpdateConsumptionAttributeParams extends ts_serval_1.Serializable {
|
|
742
|
+
static from(value) {
|
|
743
|
+
return this.fromAny(value);
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
__decorate([
|
|
747
|
+
(0, ts_serval_1.serialize)(),
|
|
748
|
+
(0, ts_serval_1.validate)(),
|
|
749
|
+
__metadata("design:type", transport_1.CoreId)
|
|
750
|
+
], UpdateConsumptionAttributeParams.prototype, "id", void 0);
|
|
751
|
+
__decorate([
|
|
752
|
+
(0, ts_serval_1.serialize)({ unionTypes: [content_1.IdentityAttribute, content_1.RelationshipAttribute] }),
|
|
753
|
+
(0, ts_serval_1.validate)(),
|
|
754
|
+
__metadata("design:type", Object)
|
|
755
|
+
], UpdateConsumptionAttributeParams.prototype, "content", void 0);
|
|
756
|
+
exports.UpdateConsumptionAttributeParams = UpdateConsumptionAttributeParams;
|
|
757
|
+
//# sourceMappingURL=UpdateConsumptionAttributeParams.js.map
|
|
712
758
|
|
|
713
759
|
/***/ }),
|
|
714
760
|
|
|
@@ -1128,7 +1174,9 @@ __exportStar(__webpack_require__(/*! ./attributes/CreateSharedConsumptionAttribu
|
|
|
1128
1174
|
__exportStar(__webpack_require__(/*! ./attributes/GetIdentityAttributesParams */ "./dist/modules/attributes/GetIdentityAttributesParams.js"), exports);
|
|
1129
1175
|
__exportStar(__webpack_require__(/*! ./attributes/GetRelationshipAttributesParams */ "./dist/modules/attributes/GetRelationshipAttributesParams.js"), exports);
|
|
1130
1176
|
__exportStar(__webpack_require__(/*! ./attributes/local/ConsumptionAttribute */ "./dist/modules/attributes/local/ConsumptionAttribute.js"), exports);
|
|
1131
|
-
__exportStar(__webpack_require__(/*! ./attributes/
|
|
1177
|
+
__exportStar(__webpack_require__(/*! ./attributes/local/ConsumptionAttributeShareInfo */ "./dist/modules/attributes/local/ConsumptionAttributeShareInfo.js"), exports);
|
|
1178
|
+
__exportStar(__webpack_require__(/*! ./attributes/SucceedConsumptionAttributeParams */ "./dist/modules/attributes/SucceedConsumptionAttributeParams.js"), exports);
|
|
1179
|
+
__exportStar(__webpack_require__(/*! ./attributes/UpdateConsumptionAttributeParams */ "./dist/modules/attributes/UpdateConsumptionAttributeParams.js"), exports);
|
|
1132
1180
|
__exportStar(__webpack_require__(/*! ./drafts/DraftsController */ "./dist/modules/drafts/DraftsController.js"), exports);
|
|
1133
1181
|
__exportStar(__webpack_require__(/*! ./drafts/local/Draft */ "./dist/modules/drafts/local/Draft.js"), exports);
|
|
1134
1182
|
__exportStar(__webpack_require__(/*! ./requests/incoming/checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters */ "./dist/modules/requests/incoming/checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters.js"), exports);
|
|
@@ -1142,7 +1190,9 @@ __exportStar(__webpack_require__(/*! ./requests/incoming/DecideRequestParameters
|
|
|
1142
1190
|
__exportStar(__webpack_require__(/*! ./requests/incoming/IncomingRequestsController */ "./dist/modules/requests/incoming/IncomingRequestsController.js"), exports);
|
|
1143
1191
|
__exportStar(__webpack_require__(/*! ./requests/incoming/received/ReceivedIncomingRequestParameters */ "./dist/modules/requests/incoming/received/ReceivedIncomingRequestParameters.js"), exports);
|
|
1144
1192
|
__exportStar(__webpack_require__(/*! ./requests/incoming/requireManualDecision/RequireManualDecisionOfIncomingRequestParameters */ "./dist/modules/requests/incoming/requireManualDecision/RequireManualDecisionOfIncomingRequestParameters.js"), exports);
|
|
1193
|
+
__exportStar(__webpack_require__(/*! ./requests/itemProcessors/AbstractRequestItemProcessor */ "./dist/modules/requests/itemProcessors/AbstractRequestItemProcessor.js"), exports);
|
|
1145
1194
|
__exportStar(__webpack_require__(/*! ./requests/itemProcessors/GenericRequestItemProcessor */ "./dist/modules/requests/itemProcessors/GenericRequestItemProcessor.js"), exports);
|
|
1195
|
+
__exportStar(__webpack_require__(/*! ./requests/itemProcessors/IRequestItemProcessor */ "./dist/modules/requests/itemProcessors/IRequestItemProcessor.js"), exports);
|
|
1146
1196
|
__exportStar(__webpack_require__(/*! ./requests/itemProcessors/ProcessorConstructor */ "./dist/modules/requests/itemProcessors/ProcessorConstructor.js"), exports);
|
|
1147
1197
|
__exportStar(__webpack_require__(/*! ./requests/itemProcessors/readAttribute/AcceptReadAttributeRequestItemParameters */ "./dist/modules/requests/itemProcessors/readAttribute/AcceptReadAttributeRequestItemParameters.js"), exports);
|
|
1148
1198
|
__exportStar(__webpack_require__(/*! ./requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor */ "./dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js"), exports);
|
|
@@ -1158,10 +1208,9 @@ __exportStar(__webpack_require__(/*! ./requests/outgoing/createFromRelationshipC
|
|
|
1158
1208
|
__exportStar(__webpack_require__(/*! ./requests/outgoing/createOutgoingRequest/CreateOutgoingRequestParameters */ "./dist/modules/requests/outgoing/createOutgoingRequest/CreateOutgoingRequestParameters.js"), exports);
|
|
1159
1209
|
__exportStar(__webpack_require__(/*! ./requests/outgoing/OutgoingRequestsController */ "./dist/modules/requests/outgoing/OutgoingRequestsController.js"), exports);
|
|
1160
1210
|
__exportStar(__webpack_require__(/*! ./requests/outgoing/sentOutgoingRequest/SentOutgoingRequestParameters */ "./dist/modules/requests/outgoing/sentOutgoingRequest/SentOutgoingRequestParameters.js"), exports);
|
|
1211
|
+
__exportStar(__webpack_require__(/*! ./settings/local/CreateSettingParameter */ "./dist/modules/settings/local/CreateSettingParameter.js"), exports);
|
|
1161
1212
|
__exportStar(__webpack_require__(/*! ./settings/local/Setting */ "./dist/modules/settings/local/Setting.js"), exports);
|
|
1162
1213
|
__exportStar(__webpack_require__(/*! ./settings/SettingsController */ "./dist/modules/settings/SettingsController.js"), exports);
|
|
1163
|
-
__exportStar(__webpack_require__(/*! ./signatures/Signature */ "./dist/modules/signatures/Signature.js"), exports);
|
|
1164
|
-
__exportStar(__webpack_require__(/*! ./signatures/SignatureContent */ "./dist/modules/signatures/SignatureContent.js"), exports);
|
|
1165
1214
|
//# sourceMappingURL=index.js.map
|
|
1166
1215
|
|
|
1167
1216
|
/***/ }),
|
|
@@ -1895,6 +1944,19 @@ exports.GenericRequestItemProcessor = GenericRequestItemProcessor;
|
|
|
1895
1944
|
|
|
1896
1945
|
/***/ }),
|
|
1897
1946
|
|
|
1947
|
+
/***/ "./dist/modules/requests/itemProcessors/IRequestItemProcessor.js":
|
|
1948
|
+
/*!***********************************************************************!*\
|
|
1949
|
+
!*** ./dist/modules/requests/itemProcessors/IRequestItemProcessor.js ***!
|
|
1950
|
+
\***********************************************************************/
|
|
1951
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
1952
|
+
|
|
1953
|
+
"use strict";
|
|
1954
|
+
|
|
1955
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1956
|
+
//# sourceMappingURL=IRequestItemProcessor.js.map
|
|
1957
|
+
|
|
1958
|
+
/***/ }),
|
|
1959
|
+
|
|
1898
1960
|
/***/ "./dist/modules/requests/itemProcessors/ProcessorConstructor.js":
|
|
1899
1961
|
/*!**********************************************************************!*\
|
|
1900
1962
|
!*** ./dist/modules/requests/itemProcessors/ProcessorConstructor.js ***!
|
|
@@ -2865,6 +2927,19 @@ exports.SettingsController = SettingsController;
|
|
|
2865
2927
|
|
|
2866
2928
|
/***/ }),
|
|
2867
2929
|
|
|
2930
|
+
/***/ "./dist/modules/settings/local/CreateSettingParameter.js":
|
|
2931
|
+
/*!***************************************************************!*\
|
|
2932
|
+
!*** ./dist/modules/settings/local/CreateSettingParameter.js ***!
|
|
2933
|
+
\***************************************************************/
|
|
2934
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
2935
|
+
|
|
2936
|
+
"use strict";
|
|
2937
|
+
|
|
2938
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2939
|
+
//# sourceMappingURL=CreateSettingParameter.js.map
|
|
2940
|
+
|
|
2941
|
+
/***/ }),
|
|
2942
|
+
|
|
2868
2943
|
/***/ "./dist/modules/settings/local/Setting.js":
|
|
2869
2944
|
/*!************************************************!*\
|
|
2870
2945
|
!*** ./dist/modules/settings/local/Setting.js ***!
|
|
@@ -2975,141 +3050,6 @@ exports.Setting = Setting;
|
|
|
2975
3050
|
|
|
2976
3051
|
/***/ }),
|
|
2977
3052
|
|
|
2978
|
-
/***/ "./dist/modules/signatures/Signature.js":
|
|
2979
|
-
/*!**********************************************!*\
|
|
2980
|
-
!*** ./dist/modules/signatures/Signature.js ***!
|
|
2981
|
-
\**********************************************/
|
|
2982
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
2983
|
-
|
|
2984
|
-
"use strict";
|
|
2985
|
-
|
|
2986
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2987
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
2988
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
2989
|
-
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;
|
|
2990
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
2991
|
-
};
|
|
2992
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
2993
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
2994
|
-
};
|
|
2995
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2996
|
-
exports.Signature = void 0;
|
|
2997
|
-
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
2998
|
-
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
2999
|
-
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
3000
|
-
const SignatureContent_1 = __webpack_require__(/*! ./SignatureContent */ "./dist/modules/signatures/SignatureContent.js");
|
|
3001
|
-
let Signature = class Signature extends transport_1.CoreSerializable {
|
|
3002
|
-
static preFrom(value) {
|
|
3003
|
-
if (value.signature instanceof crypto_1.CryptoSignature) {
|
|
3004
|
-
value.signature = crypto_1.CryptoSignature.fromBase64(value.signature);
|
|
3005
|
-
}
|
|
3006
|
-
return value;
|
|
3007
|
-
}
|
|
3008
|
-
static from(value) {
|
|
3009
|
-
return this.fromAny(value);
|
|
3010
|
-
}
|
|
3011
|
-
async verify(content, publicKey) {
|
|
3012
|
-
const hash = await crypto_1.CryptoHash.hash(crypto_1.CoreBuffer.fromUtf8(content), this.content.hashAlgorithm);
|
|
3013
|
-
if (hash.toBase64() !== this.content.hash.hash)
|
|
3014
|
-
return false;
|
|
3015
|
-
const str = this.content.serialize();
|
|
3016
|
-
const correct = await transport_1.CoreCrypto.verify(crypto_1.CoreBuffer.fromUtf8(str), this.signature, publicKey);
|
|
3017
|
-
return correct;
|
|
3018
|
-
}
|
|
3019
|
-
toJSON() {
|
|
3020
|
-
return { content: this.content.toJSON(), signature: this.signature.toBase64() };
|
|
3021
|
-
}
|
|
3022
|
-
serialize() {
|
|
3023
|
-
return JSON.stringify(this.toJSON());
|
|
3024
|
-
}
|
|
3025
|
-
};
|
|
3026
|
-
__decorate([
|
|
3027
|
-
(0, ts_serval_1.validate)(),
|
|
3028
|
-
(0, ts_serval_1.serialize)(),
|
|
3029
|
-
__metadata("design:type", SignatureContent_1.SignatureContent)
|
|
3030
|
-
], Signature.prototype, "content", void 0);
|
|
3031
|
-
__decorate([
|
|
3032
|
-
(0, ts_serval_1.validate)(),
|
|
3033
|
-
(0, ts_serval_1.serialize)(),
|
|
3034
|
-
__metadata("design:type", crypto_1.CryptoSignature)
|
|
3035
|
-
], Signature.prototype, "signature", void 0);
|
|
3036
|
-
Signature = __decorate([
|
|
3037
|
-
(0, ts_serval_1.type)("Signature")
|
|
3038
|
-
], Signature);
|
|
3039
|
-
exports.Signature = Signature;
|
|
3040
|
-
//# sourceMappingURL=Signature.js.map
|
|
3041
|
-
|
|
3042
|
-
/***/ }),
|
|
3043
|
-
|
|
3044
|
-
/***/ "./dist/modules/signatures/SignatureContent.js":
|
|
3045
|
-
/*!*****************************************************!*\
|
|
3046
|
-
!*** ./dist/modules/signatures/SignatureContent.js ***!
|
|
3047
|
-
\*****************************************************/
|
|
3048
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
3049
|
-
|
|
3050
|
-
"use strict";
|
|
3051
|
-
|
|
3052
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3053
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3054
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
3055
|
-
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;
|
|
3056
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3057
|
-
};
|
|
3058
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
3059
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
3060
|
-
};
|
|
3061
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3062
|
-
exports.SignatureContent = void 0;
|
|
3063
|
-
const ts_serval_1 = __webpack_require__(/*! @js-soft/ts-serval */ "@js-soft/ts-serval");
|
|
3064
|
-
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
3065
|
-
let SignatureContent = class SignatureContent extends transport_1.CoreSerializable {
|
|
3066
|
-
static from(value) {
|
|
3067
|
-
return this.fromAny(value);
|
|
3068
|
-
}
|
|
3069
|
-
};
|
|
3070
|
-
__decorate([
|
|
3071
|
-
(0, ts_serval_1.validate)(),
|
|
3072
|
-
(0, ts_serval_1.serialize)(),
|
|
3073
|
-
__metadata("design:type", Number)
|
|
3074
|
-
], SignatureContent.prototype, "version", void 0);
|
|
3075
|
-
__decorate([
|
|
3076
|
-
(0, ts_serval_1.validate)(),
|
|
3077
|
-
(0, ts_serval_1.serialize)(),
|
|
3078
|
-
__metadata("design:type", Number)
|
|
3079
|
-
], SignatureContent.prototype, "signatureAlgorithm", void 0);
|
|
3080
|
-
__decorate([
|
|
3081
|
-
(0, ts_serval_1.validate)(),
|
|
3082
|
-
(0, ts_serval_1.serialize)(),
|
|
3083
|
-
__metadata("design:type", Number)
|
|
3084
|
-
], SignatureContent.prototype, "hashAlgorithm", void 0);
|
|
3085
|
-
__decorate([
|
|
3086
|
-
(0, ts_serval_1.validate)(),
|
|
3087
|
-
(0, ts_serval_1.serialize)(),
|
|
3088
|
-
__metadata("design:type", transport_1.CoreDate)
|
|
3089
|
-
], SignatureContent.prototype, "signedAt", void 0);
|
|
3090
|
-
__decorate([
|
|
3091
|
-
(0, ts_serval_1.validate)(),
|
|
3092
|
-
(0, ts_serval_1.serialize)(),
|
|
3093
|
-
__metadata("design:type", transport_1.CoreAddress)
|
|
3094
|
-
], SignatureContent.prototype, "signer", void 0);
|
|
3095
|
-
__decorate([
|
|
3096
|
-
(0, ts_serval_1.validate)(),
|
|
3097
|
-
(0, ts_serval_1.serialize)(),
|
|
3098
|
-
__metadata("design:type", transport_1.CoreId)
|
|
3099
|
-
], SignatureContent.prototype, "keyId", void 0);
|
|
3100
|
-
__decorate([
|
|
3101
|
-
(0, ts_serval_1.validate)(),
|
|
3102
|
-
(0, ts_serval_1.serialize)(),
|
|
3103
|
-
__metadata("design:type", transport_1.CoreHash)
|
|
3104
|
-
], SignatureContent.prototype, "hash", void 0);
|
|
3105
|
-
SignatureContent = __decorate([
|
|
3106
|
-
(0, ts_serval_1.type)("SignatureContent")
|
|
3107
|
-
], SignatureContent);
|
|
3108
|
-
exports.SignatureContent = SignatureContent;
|
|
3109
|
-
//# sourceMappingURL=SignatureContent.js.map
|
|
3110
|
-
|
|
3111
|
-
/***/ }),
|
|
3112
|
-
|
|
3113
3053
|
/***/ "./node_modules/@js-soft/docdb-querytranslator/dist/QueryTranslator.js":
|
|
3114
3054
|
/*!*****************************************************************************!*\
|
|
3115
3055
|
!*** ./node_modules/@js-soft/docdb-querytranslator/dist/QueryTranslator.js ***!
|