@nmshd/consumption 3.9.2 → 3.9.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/buildInformation.js +5 -5
- package/dist/consumption/CoreErrors.d.ts +2 -1
- package/dist/consumption/CoreErrors.d.ts.map +1 -1
- package/dist/consumption/CoreErrors.js +6 -3
- package/dist/consumption/CoreErrors.js.map +1 -1
- package/dist/modules/attributeListeners/local/CreateLocalAttributeListenerParams.d.ts +1 -1
- package/dist/modules/attributeListeners/local/CreateLocalAttributeListenerParams.d.ts.map +1 -1
- package/dist/modules/attributes/AttributesController.d.ts +3 -1
- package/dist/modules/attributes/AttributesController.d.ts.map +1 -1
- package/dist/modules/attributes/AttributesController.js +72 -18
- package/dist/modules/attributes/AttributesController.js.map +1 -1
- package/dist/modules/attributes/local/CreateLocalAttributeParams.d.ts +1 -1
- package/dist/modules/attributes/local/CreateLocalAttributeParams.d.ts.map +1 -1
- package/dist/modules/attributes/local/CreatePeerLocalAttributeParams.d.ts +1 -1
- package/dist/modules/attributes/local/CreatePeerLocalAttributeParams.d.ts.map +1 -1
- package/dist/modules/attributes/local/LocalAttribute.d.ts +3 -2
- package/dist/modules/attributes/local/LocalAttribute.d.ts.map +1 -1
- package/dist/modules/attributes/local/LocalAttribute.js +5 -2
- package/dist/modules/attributes/local/LocalAttribute.js.map +1 -1
- package/dist/modules/notifications/index.d.ts +2 -2
- package/dist/modules/notifications/index.d.ts.map +1 -1
- package/dist/modules/notifications/index.js +2 -2
- package/dist/modules/notifications/index.js.map +1 -1
- package/dist/modules/requests/incoming/IncomingRequestsController.d.ts.map +1 -1
- package/dist/modules/requests/incoming/IncomingRequestsController.js +1 -1
- package/dist/modules/requests/incoming/IncomingRequestsController.js.map +1 -1
- package/dist/modules/requests/index.d.ts +8 -8
- package/dist/modules/requests/index.d.ts.map +1 -1
- package/dist/modules/requests/index.js +8 -8
- package/dist/modules/requests/index.js.map +1 -1
- package/lib-web/nmshd.consumption.js +148 -75
- 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 +5 -5
|
@@ -28293,11 +28293,11 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
|
|
|
28293
28293
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
28294
28294
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
28295
28295
|
exports.buildInformation = {
|
|
28296
|
-
version: "3.9.
|
|
28297
|
-
build: "
|
|
28298
|
-
date: "2024-02-
|
|
28299
|
-
commit: "
|
|
28300
|
-
dependencies: {"@js-soft/docdb-querytranslator":"^1.1.2","@nmshd/iql":"^1.0.
|
|
28296
|
+
version: "3.9.4",
|
|
28297
|
+
build: "30",
|
|
28298
|
+
date: "2024-02-23T11:56:17+00:00",
|
|
28299
|
+
commit: "f595da4c58bfeccdfa4911aa46532be9b0898a44",
|
|
28300
|
+
dependencies: {"@js-soft/docdb-querytranslator":"^1.1.2","@nmshd/iql":"^1.0.2","ts-simple-nameof":"^1.3.1"},
|
|
28301
28301
|
libraries: {
|
|
28302
28302
|
transport: transport_1.buildInformation,
|
|
28303
28303
|
crypto: crypto_1.buildInformation,
|
|
@@ -28519,8 +28519,8 @@ class Attributes {
|
|
|
28519
28519
|
errorMessage += ` ${comment}`;
|
|
28520
28520
|
return new transport_1.CoreError("error.consumption.attributes.invalidSuccessionOfOwnSharedIdentityAttribute", errorMessage);
|
|
28521
28521
|
}
|
|
28522
|
-
|
|
28523
|
-
return new transport_1.CoreError("error.consumption.attributes.
|
|
28522
|
+
cannotSucceedChildOfComplexAttribute(parentId) {
|
|
28523
|
+
return new transport_1.CoreError("error.consumption.attributes.cannotSucceedChildOfComplexAttribute", `The attribute you want to succeed is child attribute of a complex attribute (id: ${parentId}), and cannot be succeeded on its own. Instead, succeed the parent which will implicitly succeed all its children.`);
|
|
28524
28524
|
}
|
|
28525
28525
|
successorMustNotYetExist() {
|
|
28526
28526
|
return new transport_1.CoreError("error.consumption.attributes.successorMustNotYetExist", "The predecessor attribute's successor must not exist. It will be created by the succession handlers and must not be created manually.");
|
|
@@ -28562,7 +28562,10 @@ class Attributes {
|
|
|
28562
28562
|
return new transport_1.CoreError("error.consumption.attributes.successionMustNotChangePeer", errorMessage);
|
|
28563
28563
|
}
|
|
28564
28564
|
cannotSucceedAttributesWithASuccessor(successorId) {
|
|
28565
|
-
return new transport_1.CoreError("error.consumption.attributes.cannotSucceedAttributesWithASuccessor", `The
|
|
28565
|
+
return new transport_1.CoreError("error.consumption.attributes.cannotSucceedAttributesWithASuccessor", `The attribute you want to succeed has a successor (id: ${successorId}). You cannot succeed attributes with a successor. Instead, succeed the successor.`);
|
|
28566
|
+
}
|
|
28567
|
+
invalidParentSuccessor(parentSuccessorId) {
|
|
28568
|
+
return new transport_1.CoreError("error.consumption.attributes.invalidParentSuccessor", `The complex parent successor (id: ${parentSuccessorId}) does not exist.`);
|
|
28566
28569
|
}
|
|
28567
28570
|
invalidPropertyValue(message) {
|
|
28568
28571
|
return new transport_1.CoreError("error.consumption.attributes.invalidPropertyValue", message);
|
|
@@ -29081,24 +29084,27 @@ class AttributesController extends ConsumptionBaseController_1.ConsumptionBaseCo
|
|
|
29081
29084
|
shareInfo: parsedParams.shareInfo
|
|
29082
29085
|
});
|
|
29083
29086
|
await this.attributes.create(localAttribute);
|
|
29084
|
-
if (localAttribute.content instanceof content_1.IdentityAttribute && //
|
|
29087
|
+
if (localAttribute.content instanceof content_1.IdentityAttribute && // Local Attributes for children should only be created for Identity Attributes
|
|
29085
29088
|
localAttribute.content.value instanceof content_1.AbstractComplexValue) {
|
|
29086
|
-
await this.
|
|
29089
|
+
await this.createLocalAttributesForChildrenOfComplexAttribute(localAttribute);
|
|
29087
29090
|
}
|
|
29088
29091
|
this.eventBus.publish(new events_1.AttributeCreatedEvent(this.identity.address.toString(), localAttribute));
|
|
29089
29092
|
return localAttribute;
|
|
29090
29093
|
}
|
|
29091
|
-
async
|
|
29094
|
+
async createLocalAttributesForChildrenOfComplexAttribute(localAttribute) {
|
|
29092
29095
|
if (!(localAttribute.content instanceof content_1.IdentityAttribute)) {
|
|
29093
|
-
throw new ConsumptionError_1.ConsumptionError("Only
|
|
29096
|
+
throw new ConsumptionError_1.ConsumptionError("Only identity attributes are allowed here");
|
|
29094
29097
|
}
|
|
29095
|
-
const
|
|
29096
|
-
for (const propertyValue of
|
|
29097
|
-
const
|
|
29098
|
+
const childAttributeValues = Object.values(localAttribute.content.value).filter((p) => p instanceof content_1.AbstractAttributeValue);
|
|
29099
|
+
for (const propertyValue of childAttributeValues) {
|
|
29100
|
+
const childAttribute = content_1.IdentityAttribute.from({
|
|
29098
29101
|
...localAttribute.content.toJSON(),
|
|
29099
29102
|
value: propertyValue.toJSON()
|
|
29100
29103
|
});
|
|
29101
|
-
await this.createLocalAttribute({
|
|
29104
|
+
await this.createLocalAttribute({
|
|
29105
|
+
content: childAttribute,
|
|
29106
|
+
parentId: localAttribute.id
|
|
29107
|
+
});
|
|
29102
29108
|
}
|
|
29103
29109
|
}
|
|
29104
29110
|
async createSharedLocalAttributeCopy(params) {
|
|
@@ -29153,6 +29159,9 @@ class AttributesController extends ConsumptionBaseController_1.ConsumptionBaseCo
|
|
|
29153
29159
|
createdAt: parsedSuccessorParams.createdAt,
|
|
29154
29160
|
succeededBy: parsedSuccessorParams.succeededBy
|
|
29155
29161
|
});
|
|
29162
|
+
if (predecessor.isComplexAttribute()) {
|
|
29163
|
+
await this.succeedChildrenOfComplexAttribute(successor.id);
|
|
29164
|
+
}
|
|
29156
29165
|
this.eventBus.publish(new events_1.RepositoryAttributeSucceededEvent(this.identity.address.toString(), predecessor, successor));
|
|
29157
29166
|
return { predecessor, successor };
|
|
29158
29167
|
}
|
|
@@ -29236,7 +29245,56 @@ class AttributesController extends ConsumptionBaseController_1.ConsumptionBaseCo
|
|
|
29236
29245
|
/* No succeeded attribute event fired here. This is done by the notification system. */
|
|
29237
29246
|
return { predecessor, successor };
|
|
29238
29247
|
}
|
|
29248
|
+
async succeedChildrenOfComplexAttribute(parentSuccessorId) {
|
|
29249
|
+
const parentSuccessor = await this.getLocalAttribute(parentSuccessorId);
|
|
29250
|
+
if (typeof parentSuccessor === "undefined") {
|
|
29251
|
+
throw CoreErrors_1.CoreErrors.attributes.invalidParentSuccessor;
|
|
29252
|
+
}
|
|
29253
|
+
const childAttributeValues = Object.values(parentSuccessor.content.value).filter((elem) => elem instanceof content_1.AbstractAttributeValue);
|
|
29254
|
+
for (const childAttributeValue of childAttributeValues) {
|
|
29255
|
+
let currentParent = await this.getLocalAttribute(parentSuccessorId);
|
|
29256
|
+
let child;
|
|
29257
|
+
while (typeof child === "undefined" && currentParent?.succeeds) {
|
|
29258
|
+
const currentPredecessor = (await this.getLocalAttribute(currentParent.succeeds));
|
|
29259
|
+
currentParent = currentPredecessor;
|
|
29260
|
+
child = await this.getChildAttributesByValueType(currentParent.id, childAttributeValue.constructor);
|
|
29261
|
+
}
|
|
29262
|
+
const childPredecessorId = child?.id;
|
|
29263
|
+
if (typeof childPredecessorId !== "undefined") {
|
|
29264
|
+
await this._succeedAttributeUnsafe(childPredecessorId, {
|
|
29265
|
+
content: content_1.IdentityAttribute.from({
|
|
29266
|
+
value: childAttributeValue.toJSON(),
|
|
29267
|
+
owner: this.identity.address
|
|
29268
|
+
}),
|
|
29269
|
+
parentId: parentSuccessorId,
|
|
29270
|
+
createdAt: parentSuccessor.createdAt
|
|
29271
|
+
});
|
|
29272
|
+
}
|
|
29273
|
+
else {
|
|
29274
|
+
await this.createAttributeUnsafe({
|
|
29275
|
+
content: content_1.IdentityAttribute.from({
|
|
29276
|
+
value: childAttributeValue.toJSON(),
|
|
29277
|
+
owner: this.identity.address
|
|
29278
|
+
}),
|
|
29279
|
+
parentId: parentSuccessorId,
|
|
29280
|
+
createdAt: parentSuccessor.createdAt
|
|
29281
|
+
});
|
|
29282
|
+
}
|
|
29283
|
+
}
|
|
29284
|
+
}
|
|
29285
|
+
async getChildAttributesByValueType(parentId, valueType) {
|
|
29286
|
+
const children = await this.getLocalAttributes({
|
|
29287
|
+
parentId: parentId.toString()
|
|
29288
|
+
});
|
|
29289
|
+
/** We currently assume that all of the child attributes of a complex
|
|
29290
|
+
* attribute have distinct types. */
|
|
29291
|
+
return children.find((elem) => elem.content.value instanceof valueType);
|
|
29292
|
+
}
|
|
29239
29293
|
async _succeedAttributeUnsafe(predecessorId, successorParams) {
|
|
29294
|
+
const predecessor = await this.getLocalAttribute(predecessorId);
|
|
29295
|
+
if (typeof predecessor === "undefined") {
|
|
29296
|
+
throw CoreErrors_1.CoreErrors.attributes.predecessorDoesNotExist;
|
|
29297
|
+
}
|
|
29240
29298
|
const successor = await this.createAttributeUnsafe({
|
|
29241
29299
|
id: successorParams.id,
|
|
29242
29300
|
content: successorParams.content,
|
|
@@ -29246,7 +29304,6 @@ class AttributesController extends ConsumptionBaseController_1.ConsumptionBaseCo
|
|
|
29246
29304
|
createdAt: successorParams.createdAt,
|
|
29247
29305
|
succeededBy: successorParams.succeededBy
|
|
29248
29306
|
});
|
|
29249
|
-
const predecessor = (await this.getLocalAttribute(predecessorId));
|
|
29250
29307
|
predecessor.succeededBy = successor.id;
|
|
29251
29308
|
await this.updateAttributeUnsafe(predecessor);
|
|
29252
29309
|
return { predecessor, successor };
|
|
@@ -29272,11 +29329,11 @@ class AttributesController extends ConsumptionBaseController_1.ConsumptionBaseCo
|
|
|
29272
29329
|
shareInfo: parsedSuccessorParams.shareInfo,
|
|
29273
29330
|
parentId: parsedSuccessorParams.parentId
|
|
29274
29331
|
});
|
|
29275
|
-
if (!predecessor.
|
|
29332
|
+
if (!predecessor.isRepositoryAttribute(this.identity.address)) {
|
|
29276
29333
|
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.invalidPredecessor("Predecessor is not a valid repository attribute."));
|
|
29277
29334
|
}
|
|
29278
|
-
if (!successor.
|
|
29279
|
-
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.
|
|
29335
|
+
if (!successor.isRepositoryAttribute(this.identity.address)) {
|
|
29336
|
+
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.invalidSuccessor("Successor is not a valid repository attribute."));
|
|
29280
29337
|
}
|
|
29281
29338
|
return common_1.ValidationResult.success();
|
|
29282
29339
|
}
|
|
@@ -29316,10 +29373,10 @@ class AttributesController extends ConsumptionBaseController_1.ConsumptionBaseCo
|
|
|
29316
29373
|
const successorSource = await this.getLocalAttribute(successor.shareInfo.sourceAttribute);
|
|
29317
29374
|
const predecessorSourceVersionIds = (await this.getVersionsOfAttribute(predecessor.shareInfo.sourceAttribute)).map((x) => x.id.toString());
|
|
29318
29375
|
const successorSourceVersionIds = (await this.getVersionsOfAttribute(successor.shareInfo.sourceAttribute)).map((x) => x.id.toString());
|
|
29319
|
-
if (typeof predecessorSource === "undefined" || !predecessorSource.isRepositoryAttribute()) {
|
|
29376
|
+
if (typeof predecessorSource === "undefined" || !predecessorSource.isRepositoryAttribute(this.identity.address)) {
|
|
29320
29377
|
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.invalidSuccessionOfOwnSharedIdentityAttribute());
|
|
29321
29378
|
}
|
|
29322
|
-
if (typeof successorSource === "undefined" || !successorSource.isRepositoryAttribute()) {
|
|
29379
|
+
if (typeof successorSource === "undefined" || !successorSource.isRepositoryAttribute(this.identity.address)) {
|
|
29323
29380
|
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.invalidSuccessionOfOwnSharedIdentityAttribute("Source attribute is not a valid repository attribute."));
|
|
29324
29381
|
}
|
|
29325
29382
|
if (typeof successorSource.succeeds === "undefined" ||
|
|
@@ -29466,7 +29523,7 @@ class AttributesController extends ConsumptionBaseController_1.ConsumptionBaseCo
|
|
|
29466
29523
|
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.successorMustNotHaveASuccessor());
|
|
29467
29524
|
}
|
|
29468
29525
|
if (typeof successor.parentId !== "undefined") {
|
|
29469
|
-
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.
|
|
29526
|
+
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.cannotSucceedChildOfComplexAttribute(predecessorId.toString()));
|
|
29470
29527
|
}
|
|
29471
29528
|
const predecessor = await this.getLocalAttribute(predecessorId);
|
|
29472
29529
|
if (typeof predecessor === "undefined") {
|
|
@@ -29476,7 +29533,7 @@ class AttributesController extends ConsumptionBaseController_1.ConsumptionBaseCo
|
|
|
29476
29533
|
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.cannotSucceedAttributesWithASuccessor(predecessor.succeededBy.toString()));
|
|
29477
29534
|
}
|
|
29478
29535
|
if (typeof predecessor.parentId !== "undefined") {
|
|
29479
|
-
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.
|
|
29536
|
+
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.cannotSucceedChildOfComplexAttribute(predecessorId.toString()));
|
|
29480
29537
|
}
|
|
29481
29538
|
if (!predecessor.content.owner.equals(transport_1.CoreAddress.from(successor.content.owner))) {
|
|
29482
29539
|
return common_1.ValidationResult.error(CoreErrors_1.CoreErrors.attributes.successionMustNotChangeOwner());
|
|
@@ -29557,8 +29614,8 @@ class AttributesController extends ConsumptionBaseController_1.ConsumptionBaseCo
|
|
|
29557
29614
|
if (typeof repositoryAttribute === "undefined") {
|
|
29558
29615
|
throw transport_1.CoreErrors.general.recordNotFound(LocalAttribute_1.LocalAttribute, id.toString());
|
|
29559
29616
|
}
|
|
29560
|
-
if (!repositoryAttribute.isRepositoryAttribute()) {
|
|
29561
|
-
throw CoreErrors_1.CoreErrors.attributes.invalidPropertyValue(
|
|
29617
|
+
if (!repositoryAttribute.isRepositoryAttribute(this.identity.address)) {
|
|
29618
|
+
throw CoreErrors_1.CoreErrors.attributes.invalidPropertyValue(`Attribute '${id}' isn't a repository attribute.`);
|
|
29562
29619
|
}
|
|
29563
29620
|
let i = 0;
|
|
29564
29621
|
while (repositoryAttribute.succeededBy && i < 1000) {
|
|
@@ -30094,8 +30151,8 @@ let LocalAttribute = class LocalAttribute extends transport_1.CoreSynchronizable
|
|
|
30094
30151
|
isPeerSharedRelationshipAttribute(peerAddress) {
|
|
30095
30152
|
return this.isRelationshipAttribute() && this.isPeerSharedAttribute(peerAddress);
|
|
30096
30153
|
}
|
|
30097
|
-
isRepositoryAttribute() {
|
|
30098
|
-
return this.isIdentityAttribute() && !this.isShared();
|
|
30154
|
+
isRepositoryAttribute(ownAddress) {
|
|
30155
|
+
return this.isIdentityAttribute() && !this.isShared() && this.isOwnedBy(ownAddress);
|
|
30099
30156
|
}
|
|
30100
30157
|
isOwnSharedAttribute(ownAddress, peerAddress) {
|
|
30101
30158
|
let isOwnSharedAttribute = this.isShared() && this.isOwnedBy(ownAddress);
|
|
@@ -30129,6 +30186,9 @@ let LocalAttribute = class LocalAttribute extends transport_1.CoreSynchronizable
|
|
|
30129
30186
|
isRelationshipAttribute() {
|
|
30130
30187
|
return this.content instanceof content_1.RelationshipAttribute && this.isShared() && typeof this.shareInfo.sourceAttribute === "undefined";
|
|
30131
30188
|
}
|
|
30189
|
+
isComplexAttribute() {
|
|
30190
|
+
return this.content.value instanceof content_1.AbstractComplexValue;
|
|
30191
|
+
}
|
|
30132
30192
|
isOwnedBy(identity) {
|
|
30133
30193
|
return this.content.owner.equals(identity);
|
|
30134
30194
|
}
|
|
@@ -30861,14 +30921,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
30861
30921
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
30862
30922
|
};
|
|
30863
30923
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
30864
|
-
__exportStar(__webpack_require__(/*! ./NotificationsController */ "./dist/modules/notifications/NotificationsController.js"), exports);
|
|
30865
30924
|
__exportStar(__webpack_require__(/*! ./itemProcessors/AbstractNotificationItemProcessor */ "./dist/modules/notifications/itemProcessors/AbstractNotificationItemProcessor.js"), exports);
|
|
30925
|
+
__exportStar(__webpack_require__(/*! ./itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor */ "./dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js"), exports);
|
|
30866
30926
|
__exportStar(__webpack_require__(/*! ./itemProcessors/NotificationItemConstructor */ "./dist/modules/notifications/itemProcessors/NotificationItemConstructor.js"), exports);
|
|
30867
30927
|
__exportStar(__webpack_require__(/*! ./itemProcessors/NotificationItemProcessorConstructor */ "./dist/modules/notifications/itemProcessors/NotificationItemProcessorConstructor.js"), exports);
|
|
30868
30928
|
__exportStar(__webpack_require__(/*! ./itemProcessors/NotificationItemProcessorRegistry */ "./dist/modules/notifications/itemProcessors/NotificationItemProcessorRegistry.js"), exports);
|
|
30869
|
-
__exportStar(__webpack_require__(/*! ./itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor */ "./dist/modules/notifications/itemProcessors/attributeSucceeded/PeerSharedAttributeSucceededNotificationItemProcessor.js"), exports);
|
|
30870
30929
|
__exportStar(__webpack_require__(/*! ./local/LocalNotification */ "./dist/modules/notifications/local/LocalNotification.js"), exports);
|
|
30871
30930
|
__exportStar(__webpack_require__(/*! ./local/LocalNotificationSource */ "./dist/modules/notifications/local/LocalNotificationSource.js"), exports);
|
|
30931
|
+
__exportStar(__webpack_require__(/*! ./NotificationsController */ "./dist/modules/notifications/NotificationsController.js"), exports);
|
|
30872
30932
|
//# sourceMappingURL=index.js.map
|
|
30873
30933
|
|
|
30874
30934
|
/***/ }),
|
|
@@ -31449,10 +31509,10 @@ const events_1 = __webpack_require__(/*! ../events */ "./dist/modules/requests/e
|
|
|
31449
31509
|
const LocalRequest_1 = __webpack_require__(/*! ../local/LocalRequest */ "./dist/modules/requests/local/LocalRequest.js");
|
|
31450
31510
|
const LocalRequestStatus_1 = __webpack_require__(/*! ../local/LocalRequestStatus */ "./dist/modules/requests/local/LocalRequestStatus.js");
|
|
31451
31511
|
const LocalResponse_1 = __webpack_require__(/*! ../local/LocalResponse */ "./dist/modules/requests/local/LocalResponse.js");
|
|
31512
|
+
const DecideRequestParametersValidator_1 = __webpack_require__(/*! ./DecideRequestParametersValidator */ "./dist/modules/requests/incoming/DecideRequestParametersValidator.js");
|
|
31452
31513
|
const CheckPrerequisitesOfIncomingRequestParameters_1 = __webpack_require__(/*! ./checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters */ "./dist/modules/requests/incoming/checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters.js");
|
|
31453
31514
|
const CompleteIncomingRequestParameters_1 = __webpack_require__(/*! ./complete/CompleteIncomingRequestParameters */ "./dist/modules/requests/incoming/complete/CompleteIncomingRequestParameters.js");
|
|
31454
31515
|
const InternalDecideRequestParameters_1 = __webpack_require__(/*! ./decide/InternalDecideRequestParameters */ "./dist/modules/requests/incoming/decide/InternalDecideRequestParameters.js");
|
|
31455
|
-
const DecideRequestParametersValidator_1 = __webpack_require__(/*! ./DecideRequestParametersValidator */ "./dist/modules/requests/incoming/DecideRequestParametersValidator.js");
|
|
31456
31516
|
const ReceivedIncomingRequestParameters_1 = __webpack_require__(/*! ./received/ReceivedIncomingRequestParameters */ "./dist/modules/requests/incoming/received/ReceivedIncomingRequestParameters.js");
|
|
31457
31517
|
const RequireManualDecisionOfIncomingRequestParameters_1 = __webpack_require__(/*! ./requireManualDecision/RequireManualDecisionOfIncomingRequestParameters */ "./dist/modules/requests/incoming/requireManualDecision/RequireManualDecisionOfIncomingRequestParameters.js");
|
|
31458
31518
|
class IncomingRequestsController extends ConsumptionBaseController_1.ConsumptionBaseController {
|
|
@@ -32064,8 +32124,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
32064
32124
|
};
|
|
32065
32125
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
32066
32126
|
__exportStar(__webpack_require__(/*! ./events */ "./dist/modules/requests/events/index.js"), exports);
|
|
32067
|
-
__exportStar(__webpack_require__(/*! ./incoming/DecideRequestParametersValidator */ "./dist/modules/requests/incoming/DecideRequestParametersValidator.js"), exports);
|
|
32068
|
-
__exportStar(__webpack_require__(/*! ./incoming/IncomingRequestsController */ "./dist/modules/requests/incoming/IncomingRequestsController.js"), exports);
|
|
32069
32127
|
__exportStar(__webpack_require__(/*! ./incoming/checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters */ "./dist/modules/requests/incoming/checkPrerequisites/CheckPrerequisitesOfIncomingRequestParameters.js"), exports);
|
|
32070
32128
|
__exportStar(__webpack_require__(/*! ./incoming/complete/CompleteIncomingRequestParameters */ "./dist/modules/requests/incoming/complete/CompleteIncomingRequestParameters.js"), exports);
|
|
32071
32129
|
__exportStar(__webpack_require__(/*! ./incoming/decide/AcceptRequestItemParameters */ "./dist/modules/requests/incoming/decide/AcceptRequestItemParameters.js"), exports);
|
|
@@ -32073,31 +32131,33 @@ __exportStar(__webpack_require__(/*! ./incoming/decide/DecideRequestItemGroupPar
|
|
|
32073
32131
|
__exportStar(__webpack_require__(/*! ./incoming/decide/DecideRequestItemParameters */ "./dist/modules/requests/incoming/decide/DecideRequestItemParameters.js"), exports);
|
|
32074
32132
|
__exportStar(__webpack_require__(/*! ./incoming/decide/DecideRequestParameters */ "./dist/modules/requests/incoming/decide/DecideRequestParameters.js"), exports);
|
|
32075
32133
|
__exportStar(__webpack_require__(/*! ./incoming/decide/RejectRequestItemParameters */ "./dist/modules/requests/incoming/decide/RejectRequestItemParameters.js"), exports);
|
|
32134
|
+
__exportStar(__webpack_require__(/*! ./incoming/DecideRequestParametersValidator */ "./dist/modules/requests/incoming/DecideRequestParametersValidator.js"), exports);
|
|
32135
|
+
__exportStar(__webpack_require__(/*! ./incoming/IncomingRequestsController */ "./dist/modules/requests/incoming/IncomingRequestsController.js"), exports);
|
|
32076
32136
|
__exportStar(__webpack_require__(/*! ./incoming/received/ReceivedIncomingRequestParameters */ "./dist/modules/requests/incoming/received/ReceivedIncomingRequestParameters.js"), exports);
|
|
32077
32137
|
__exportStar(__webpack_require__(/*! ./incoming/requireManualDecision/RequireManualDecisionOfIncomingRequestParameters */ "./dist/modules/requests/incoming/requireManualDecision/RequireManualDecisionOfIncomingRequestParameters.js"), exports);
|
|
32078
32138
|
__exportStar(__webpack_require__(/*! ./itemProcessors/AbstractRequestItemProcessor */ "./dist/modules/requests/itemProcessors/AbstractRequestItemProcessor.js"), exports);
|
|
32079
|
-
__exportStar(__webpack_require__(/*! ./itemProcessors/GenericRequestItemProcessor */ "./dist/modules/requests/itemProcessors/GenericRequestItemProcessor.js"), exports);
|
|
32080
|
-
__exportStar(__webpack_require__(/*! ./itemProcessors/IRequestItemProcessor */ "./dist/modules/requests/itemProcessors/IRequestItemProcessor.js"), exports);
|
|
32081
|
-
__exportStar(__webpack_require__(/*! ./itemProcessors/RequestItemConstructor */ "./dist/modules/requests/itemProcessors/RequestItemConstructor.js"), exports);
|
|
32082
|
-
__exportStar(__webpack_require__(/*! ./itemProcessors/RequestItemProcessorConstructor */ "./dist/modules/requests/itemProcessors/RequestItemProcessorConstructor.js"), exports);
|
|
32083
|
-
__exportStar(__webpack_require__(/*! ./itemProcessors/RequestItemProcessorRegistry */ "./dist/modules/requests/itemProcessors/RequestItemProcessorRegistry.js"), exports);
|
|
32084
32139
|
__exportStar(__webpack_require__(/*! ./itemProcessors/createAttribute/CreateAttributeRequestItemProcessor */ "./dist/modules/requests/itemProcessors/createAttribute/CreateAttributeRequestItemProcessor.js"), exports);
|
|
32085
32140
|
__exportStar(__webpack_require__(/*! ./itemProcessors/freeText/AcceptFreeTextRequestItemParameters */ "./dist/modules/requests/itemProcessors/freeText/AcceptFreeTextRequestItemParameters.js"), exports);
|
|
32086
32141
|
__exportStar(__webpack_require__(/*! ./itemProcessors/freeText/FreeTextRequestItemProcessor */ "./dist/modules/requests/itemProcessors/freeText/FreeTextRequestItemProcessor.js"), exports);
|
|
32142
|
+
__exportStar(__webpack_require__(/*! ./itemProcessors/GenericRequestItemProcessor */ "./dist/modules/requests/itemProcessors/GenericRequestItemProcessor.js"), exports);
|
|
32143
|
+
__exportStar(__webpack_require__(/*! ./itemProcessors/IRequestItemProcessor */ "./dist/modules/requests/itemProcessors/IRequestItemProcessor.js"), exports);
|
|
32087
32144
|
__exportStar(__webpack_require__(/*! ./itemProcessors/proposeAttribute/AcceptProposeAttributeRequestItemParameters */ "./dist/modules/requests/itemProcessors/proposeAttribute/AcceptProposeAttributeRequestItemParameters.js"), exports);
|
|
32088
32145
|
__exportStar(__webpack_require__(/*! ./itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor */ "./dist/modules/requests/itemProcessors/proposeAttribute/ProposeAttributeRequestItemProcessor.js"), exports);
|
|
32089
32146
|
__exportStar(__webpack_require__(/*! ./itemProcessors/readAttribute/ReadAttributeRequestItemProcessor */ "./dist/modules/requests/itemProcessors/readAttribute/ReadAttributeRequestItemProcessor.js"), exports);
|
|
32090
32147
|
__exportStar(__webpack_require__(/*! ./itemProcessors/registerAttributeListener/RegisterAttributeListenerRequestItemProcessor */ "./dist/modules/requests/itemProcessors/registerAttributeListener/RegisterAttributeListenerRequestItemProcessor.js"), exports);
|
|
32148
|
+
__exportStar(__webpack_require__(/*! ./itemProcessors/RequestItemConstructor */ "./dist/modules/requests/itemProcessors/RequestItemConstructor.js"), exports);
|
|
32149
|
+
__exportStar(__webpack_require__(/*! ./itemProcessors/RequestItemProcessorConstructor */ "./dist/modules/requests/itemProcessors/RequestItemProcessorConstructor.js"), exports);
|
|
32150
|
+
__exportStar(__webpack_require__(/*! ./itemProcessors/RequestItemProcessorRegistry */ "./dist/modules/requests/itemProcessors/RequestItemProcessorRegistry.js"), exports);
|
|
32091
32151
|
__exportStar(__webpack_require__(/*! ./itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor */ "./dist/modules/requests/itemProcessors/shareAttribute/ShareAttributeRequestItemProcessor.js"), exports);
|
|
32092
32152
|
__exportStar(__webpack_require__(/*! ./local/LocalRequest */ "./dist/modules/requests/local/LocalRequest.js"), exports);
|
|
32093
32153
|
__exportStar(__webpack_require__(/*! ./local/LocalRequestStatus */ "./dist/modules/requests/local/LocalRequestStatus.js"), exports);
|
|
32094
32154
|
__exportStar(__webpack_require__(/*! ./local/LocalRequestStatusLogEntry */ "./dist/modules/requests/local/LocalRequestStatusLogEntry.js"), exports);
|
|
32095
32155
|
__exportStar(__webpack_require__(/*! ./local/LocalResponse */ "./dist/modules/requests/local/LocalResponse.js"), exports);
|
|
32096
|
-
__exportStar(__webpack_require__(/*! ./outgoing/OutgoingRequestsController */ "./dist/modules/requests/outgoing/OutgoingRequestsController.js"), exports);
|
|
32097
32156
|
__exportStar(__webpack_require__(/*! ./outgoing/completeOutgoingRequest/CompleteOutgoingRequestParameters */ "./dist/modules/requests/outgoing/completeOutgoingRequest/CompleteOutgoingRequestParameters.js"), exports);
|
|
32098
32157
|
__exportStar(__webpack_require__(/*! ./outgoing/createAndCompleteFromRelationshipTemplateResponse/CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseParameters */ "./dist/modules/requests/outgoing/createAndCompleteFromRelationshipTemplateResponse/CreateAndCompleteOutgoingRequestFromRelationshipTemplateResponseParameters.js"), exports);
|
|
32099
32158
|
__exportStar(__webpack_require__(/*! ./outgoing/createOutgoingRequest/CanCreateOutgoingRequestParameters */ "./dist/modules/requests/outgoing/createOutgoingRequest/CanCreateOutgoingRequestParameters.js"), exports);
|
|
32100
32159
|
__exportStar(__webpack_require__(/*! ./outgoing/createOutgoingRequest/CreateOutgoingRequestParameters */ "./dist/modules/requests/outgoing/createOutgoingRequest/CreateOutgoingRequestParameters.js"), exports);
|
|
32160
|
+
__exportStar(__webpack_require__(/*! ./outgoing/OutgoingRequestsController */ "./dist/modules/requests/outgoing/OutgoingRequestsController.js"), exports);
|
|
32101
32161
|
__exportStar(__webpack_require__(/*! ./outgoing/sentOutgoingRequest/SentOutgoingRequestParameters */ "./dist/modules/requests/outgoing/sentOutgoingRequest/SentOutgoingRequestParameters.js"), exports);
|
|
32102
32162
|
//# sourceMappingURL=index.js.map
|
|
32103
32163
|
|
|
@@ -34031,7 +34091,7 @@ exports.validate = validate;
|
|
|
34031
34091
|
/***/ ((module) => {
|
|
34032
34092
|
|
|
34033
34093
|
"use strict";
|
|
34034
|
-
//
|
|
34094
|
+
// @generated by Peggy 4.0.0.
|
|
34035
34095
|
//
|
|
34036
34096
|
// https://peggyjs.org/
|
|
34037
34097
|
|
|
@@ -34361,14 +34421,14 @@ function peg$parse(input, options) {
|
|
|
34361
34421
|
var peg$f11 = function (val) {
|
|
34362
34422
|
return val.join("").replaceAll("\\\\", "\\").replaceAll("\\'", "'");
|
|
34363
34423
|
};
|
|
34364
|
-
var peg$currPos = 0;
|
|
34365
|
-
var peg$savedPos =
|
|
34424
|
+
var peg$currPos = options.peg$currPos | 0;
|
|
34425
|
+
var peg$savedPos = peg$currPos;
|
|
34366
34426
|
var peg$posDetailsCache = [{ line: 1, column: 1 }];
|
|
34367
|
-
var peg$maxFailPos =
|
|
34368
|
-
var peg$maxFailExpected = [];
|
|
34369
|
-
var peg$silentFails = 0;
|
|
34427
|
+
var peg$maxFailPos = peg$currPos;
|
|
34428
|
+
var peg$maxFailExpected = options.peg$maxFailExpected || [];
|
|
34429
|
+
var peg$silentFails = options.peg$silentFails | 0;
|
|
34370
34430
|
var peg$result;
|
|
34371
|
-
if (
|
|
34431
|
+
if (options.startRule) {
|
|
34372
34432
|
if (!(options.startRule in peg$startRuleFunctions)) {
|
|
34373
34433
|
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
|
|
34374
34434
|
}
|
|
@@ -34424,9 +34484,12 @@ function peg$parse(input, options) {
|
|
|
34424
34484
|
return details;
|
|
34425
34485
|
}
|
|
34426
34486
|
else {
|
|
34427
|
-
|
|
34428
|
-
|
|
34429
|
-
|
|
34487
|
+
if (pos >= peg$posDetailsCache.length) {
|
|
34488
|
+
p = peg$posDetailsCache.length - 1;
|
|
34489
|
+
}
|
|
34490
|
+
else {
|
|
34491
|
+
p = pos;
|
|
34492
|
+
while (!peg$posDetailsCache[--p]) { }
|
|
34430
34493
|
}
|
|
34431
34494
|
details = peg$posDetailsCache[p];
|
|
34432
34495
|
details = {
|
|
@@ -35129,8 +35192,8 @@ function peg$parse(input, options) {
|
|
|
35129
35192
|
function peg$parsePredicate() {
|
|
35130
35193
|
var s0, s1, s2;
|
|
35131
35194
|
s0 = peg$currPos;
|
|
35132
|
-
|
|
35133
|
-
|
|
35195
|
+
s1 = input.charAt(peg$currPos);
|
|
35196
|
+
if (peg$r0.test(s1)) {
|
|
35134
35197
|
peg$currPos++;
|
|
35135
35198
|
}
|
|
35136
35199
|
else {
|
|
@@ -35156,8 +35219,8 @@ function peg$parse(input, options) {
|
|
|
35156
35219
|
}
|
|
35157
35220
|
if (s0 === peg$FAILED) {
|
|
35158
35221
|
s0 = peg$currPos;
|
|
35159
|
-
|
|
35160
|
-
|
|
35222
|
+
s1 = input.charAt(peg$currPos);
|
|
35223
|
+
if (peg$r1.test(s1)) {
|
|
35161
35224
|
peg$currPos++;
|
|
35162
35225
|
}
|
|
35163
35226
|
else {
|
|
@@ -35211,8 +35274,8 @@ function peg$parse(input, options) {
|
|
|
35211
35274
|
}
|
|
35212
35275
|
}
|
|
35213
35276
|
if (s3 === peg$FAILED) {
|
|
35214
|
-
|
|
35215
|
-
|
|
35277
|
+
s3 = input.charAt(peg$currPos);
|
|
35278
|
+
if (peg$r2.test(s3)) {
|
|
35216
35279
|
peg$currPos++;
|
|
35217
35280
|
}
|
|
35218
35281
|
else {
|
|
@@ -35247,8 +35310,8 @@ function peg$parse(input, options) {
|
|
|
35247
35310
|
}
|
|
35248
35311
|
}
|
|
35249
35312
|
if (s3 === peg$FAILED) {
|
|
35250
|
-
|
|
35251
|
-
|
|
35313
|
+
s3 = input.charAt(peg$currPos);
|
|
35314
|
+
if (peg$r2.test(s3)) {
|
|
35252
35315
|
peg$currPos++;
|
|
35253
35316
|
}
|
|
35254
35317
|
else {
|
|
@@ -35308,8 +35371,8 @@ function peg$parse(input, options) {
|
|
|
35308
35371
|
}
|
|
35309
35372
|
}
|
|
35310
35373
|
if (s2 === peg$FAILED) {
|
|
35311
|
-
|
|
35312
|
-
|
|
35374
|
+
s2 = input.charAt(peg$currPos);
|
|
35375
|
+
if (peg$r3.test(s2)) {
|
|
35313
35376
|
peg$currPos++;
|
|
35314
35377
|
}
|
|
35315
35378
|
else {
|
|
@@ -35344,8 +35407,8 @@ function peg$parse(input, options) {
|
|
|
35344
35407
|
}
|
|
35345
35408
|
}
|
|
35346
35409
|
if (s2 === peg$FAILED) {
|
|
35347
|
-
|
|
35348
|
-
|
|
35410
|
+
s2 = input.charAt(peg$currPos);
|
|
35411
|
+
if (peg$r3.test(s2)) {
|
|
35349
35412
|
peg$currPos++;
|
|
35350
35413
|
}
|
|
35351
35414
|
else {
|
|
@@ -35367,8 +35430,8 @@ function peg$parse(input, options) {
|
|
|
35367
35430
|
var s0, s1, s2, s3, s4;
|
|
35368
35431
|
s0 = peg$currPos;
|
|
35369
35432
|
s1 = peg$currPos;
|
|
35370
|
-
|
|
35371
|
-
|
|
35433
|
+
s2 = input.charAt(peg$currPos);
|
|
35434
|
+
if (peg$r4.test(s2)) {
|
|
35372
35435
|
peg$currPos++;
|
|
35373
35436
|
}
|
|
35374
35437
|
else {
|
|
@@ -35379,8 +35442,8 @@ function peg$parse(input, options) {
|
|
|
35379
35442
|
}
|
|
35380
35443
|
if (s2 !== peg$FAILED) {
|
|
35381
35444
|
s3 = [];
|
|
35382
|
-
|
|
35383
|
-
|
|
35445
|
+
s4 = input.charAt(peg$currPos);
|
|
35446
|
+
if (peg$r5.test(s4)) {
|
|
35384
35447
|
peg$currPos++;
|
|
35385
35448
|
}
|
|
35386
35449
|
else {
|
|
@@ -35392,8 +35455,8 @@ function peg$parse(input, options) {
|
|
|
35392
35455
|
if (s4 !== peg$FAILED) {
|
|
35393
35456
|
while (s4 !== peg$FAILED) {
|
|
35394
35457
|
s3.push(s4);
|
|
35395
|
-
|
|
35396
|
-
|
|
35458
|
+
s4 = input.charAt(peg$currPos);
|
|
35459
|
+
if (peg$r5.test(s4)) {
|
|
35397
35460
|
peg$currPos++;
|
|
35398
35461
|
}
|
|
35399
35462
|
else {
|
|
@@ -35433,8 +35496,8 @@ function peg$parse(input, options) {
|
|
|
35433
35496
|
peg$silentFails++;
|
|
35434
35497
|
s0 = peg$currPos;
|
|
35435
35498
|
s1 = peg$currPos;
|
|
35436
|
-
|
|
35437
|
-
|
|
35499
|
+
s2 = input.charAt(peg$currPos);
|
|
35500
|
+
if (peg$r6.test(s2)) {
|
|
35438
35501
|
peg$currPos++;
|
|
35439
35502
|
}
|
|
35440
35503
|
else {
|
|
@@ -35445,8 +35508,8 @@ function peg$parse(input, options) {
|
|
|
35445
35508
|
}
|
|
35446
35509
|
if (s2 !== peg$FAILED) {
|
|
35447
35510
|
s3 = [];
|
|
35448
|
-
|
|
35449
|
-
|
|
35511
|
+
s4 = input.charAt(peg$currPos);
|
|
35512
|
+
if (peg$r5.test(s4)) {
|
|
35450
35513
|
peg$currPos++;
|
|
35451
35514
|
}
|
|
35452
35515
|
else {
|
|
@@ -35457,8 +35520,8 @@ function peg$parse(input, options) {
|
|
|
35457
35520
|
}
|
|
35458
35521
|
while (s4 !== peg$FAILED) {
|
|
35459
35522
|
s3.push(s4);
|
|
35460
|
-
|
|
35461
|
-
|
|
35523
|
+
s4 = input.charAt(peg$currPos);
|
|
35524
|
+
if (peg$r5.test(s4)) {
|
|
35462
35525
|
peg$currPos++;
|
|
35463
35526
|
}
|
|
35464
35527
|
else {
|
|
@@ -35493,8 +35556,8 @@ function peg$parse(input, options) {
|
|
|
35493
35556
|
function peg$parse_() {
|
|
35494
35557
|
var s0, s1;
|
|
35495
35558
|
peg$silentFails++;
|
|
35496
|
-
|
|
35497
|
-
|
|
35559
|
+
s0 = input.charAt(peg$currPos);
|
|
35560
|
+
if (peg$r7.test(s0)) {
|
|
35498
35561
|
peg$currPos++;
|
|
35499
35562
|
}
|
|
35500
35563
|
else {
|
|
@@ -35513,6 +35576,15 @@ function peg$parse(input, options) {
|
|
|
35513
35576
|
return s0;
|
|
35514
35577
|
}
|
|
35515
35578
|
peg$result = peg$startRuleFunction();
|
|
35579
|
+
if (options.peg$library) {
|
|
35580
|
+
return /** @type {any} */ ({
|
|
35581
|
+
peg$result,
|
|
35582
|
+
peg$currPos,
|
|
35583
|
+
peg$FAILED,
|
|
35584
|
+
peg$maxFailExpected,
|
|
35585
|
+
peg$maxFailPos
|
|
35586
|
+
});
|
|
35587
|
+
}
|
|
35516
35588
|
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
|
|
35517
35589
|
return peg$result;
|
|
35518
35590
|
}
|
|
@@ -35526,6 +35598,7 @@ function peg$parse(input, options) {
|
|
|
35526
35598
|
}
|
|
35527
35599
|
}
|
|
35528
35600
|
module.exports = {
|
|
35601
|
+
StartRules: ["Expr"],
|
|
35529
35602
|
SyntaxError: peg$SyntaxError,
|
|
35530
35603
|
parse: peg$parse
|
|
35531
35604
|
};
|