@nmshd/runtime 2.0.0-beta.10 → 2.0.0-beta.13
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/Runtime.d.ts +1 -1
- package/dist/buildInformation.js +5 -5
- package/dist/dataViews/DataViewExpander.d.ts +9 -3
- package/dist/dataViews/DataViewExpander.js +117 -13
- package/dist/dataViews/DataViewExpander.js.map +1 -1
- package/dist/dataViews/consumption/LocalAttributeDVO.d.ts +1 -0
- package/dist/dataViews/consumption/LocalRequestDVO.d.ts +2 -3
- package/dist/dataViews/content/AttributeDVOs.d.ts +1 -0
- package/dist/dataViews/content/ResponseDVO.d.ts +8 -0
- package/dist/dataViews/content/ResponseDVO.js +3 -0
- package/dist/dataViews/content/ResponseDVO.js.map +1 -0
- package/dist/dataViews/content/ResponseItemDVOs.d.ts +41 -0
- package/dist/dataViews/content/ResponseItemDVOs.js +3 -0
- package/dist/dataViews/content/ResponseItemDVOs.js.map +1 -0
- package/dist/dataViews/content/index.d.ts +2 -0
- package/dist/dataViews/content/index.js +2 -0
- package/dist/dataViews/content/index.js.map +1 -1
- package/dist/modules/DeciderModule.js +1 -1
- package/dist/modules/DeciderModule.js.map +1 -1
- package/dist/modules/MessageModule.js +1 -1
- package/dist/modules/MessageModule.js.map +1 -1
- package/dist/modules/RequestModule.js +6 -6
- package/dist/modules/RequestModule.js.map +1 -1
- package/lib-web/nmshd.runtime.js +158 -26
- package/lib-web/nmshd.runtime.js.map +1 -1
- package/lib-web/nmshd.runtime.min.js +1 -1
- package/lib-web/nmshd.runtime.min.js.map +1 -1
- package/package.json +6 -6
|
@@ -22,7 +22,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
22
22
|
if (template.content["@type"] !== "RelationshipTemplateBody")
|
|
23
23
|
return;
|
|
24
24
|
const body = template.content;
|
|
25
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
25
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
26
26
|
const requestResult = await services.consumptionServices.incomingRequests.getRequests({ query: { "source.reference": template.id } });
|
|
27
27
|
if (requestResult.isError) {
|
|
28
28
|
this.logger.error(`Could not get requests for template '${template.id}'. Root error:`, requestResult.error);
|
|
@@ -55,7 +55,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
55
55
|
await this.createIncomingRequest(services, body.onNewRelationship, template.id);
|
|
56
56
|
}
|
|
57
57
|
async handleMessageReceivedEvent(event) {
|
|
58
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
58
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
59
59
|
const message = event.data;
|
|
60
60
|
const messageContentType = message.content["@type"];
|
|
61
61
|
switch (messageContentType) {
|
|
@@ -75,7 +75,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
75
75
|
const message = event.data;
|
|
76
76
|
if (message.content["@type"] !== "Request")
|
|
77
77
|
return;
|
|
78
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
78
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
79
79
|
const request = message.content;
|
|
80
80
|
const requestResult = await services.consumptionServices.outgoingRequests.sent({ requestId: request.id, messageId: message.id });
|
|
81
81
|
if (requestResult.isError) {
|
|
@@ -113,7 +113,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
113
113
|
async handleIncomingRequestDecidedForRelationship(event) {
|
|
114
114
|
const request = event.data.request;
|
|
115
115
|
const templateId = request.source.reference;
|
|
116
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
116
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
117
117
|
if (request.response.content.result === content_1.ResponseResult.Rejected) {
|
|
118
118
|
await services.consumptionServices.incomingRequests.complete({ requestId: request.id });
|
|
119
119
|
return;
|
|
@@ -149,7 +149,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
149
149
|
async handleIncomingRequestDecidedForMessage(event) {
|
|
150
150
|
const request = event.data.request;
|
|
151
151
|
const requestId = request.id;
|
|
152
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
152
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
153
153
|
const sendMessageResult = await services.transportServices.messages.sendMessage({
|
|
154
154
|
recipients: [request.peer],
|
|
155
155
|
content: request.response.content
|
|
@@ -173,7 +173,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
173
173
|
const createdRelationship = event.data;
|
|
174
174
|
if (createdRelationship.status !== types_1.RelationshipStatus.Pending || !createdRelationship.template.isOwn)
|
|
175
175
|
return;
|
|
176
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
176
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
177
177
|
const template = createdRelationship.template;
|
|
178
178
|
const templateId = template.id;
|
|
179
179
|
// do not trigger for templates without the correct content type
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestModule.js","sourceRoot":"","sources":["../../src/modules/RequestModule.ts"],"names":[],"mappings":";;;AAAA,oDAAwD;AACxD,4CAAgJ;AAChJ,sCAAqK;AACrK,0EAAuE;AAEvE,oCAA8C;AAE9C,MAAa,aAAc,SAAQ,6BAAa;IACrC,IAAI;QACP,qBAAqB;IACzB,CAAC;IAEM,KAAK;QACR,IAAI,CAAC,gBAAgB,CAAC,4CAAmC,EAAE,IAAI,CAAC,oCAAoC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACjH,IAAI,CAAC,gBAAgB,CAAC,6BAAoB,EAAE,IAAI,CAAC,0BAA0B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACxF,IAAI,CAAC,gBAAgB,CAAC,yBAAgB,EAAE,IAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAChF,IAAI,CAAC,gBAAgB,CAAC,0CAAiC,EAAE,IAAI,CAAC,kCAA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AgB,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;YAC5J,OAAO;SACV;IACL,CAAC;IAEM,IAAI;QACP,IAAI,CAAC,wBAAwB,EAAE,CAAC;IACpC,CAAC;CACJ;AA7ND,sCA6NC"}
|
package/lib-web/nmshd.runtime.js
CHANGED
|
@@ -446,11 +446,11 @@ const content_1 = __webpack_require__(/*! @nmshd/content */ "@nmshd/content");
|
|
|
446
446
|
const crypto_1 = __webpack_require__(/*! @nmshd/crypto */ "@nmshd/crypto");
|
|
447
447
|
const transport_1 = __webpack_require__(/*! @nmshd/transport */ "@nmshd/transport");
|
|
448
448
|
exports.buildInformation = {
|
|
449
|
-
version: "2.0.0-beta.
|
|
450
|
-
build: "
|
|
451
|
-
date: "2022-
|
|
452
|
-
commit: "
|
|
453
|
-
dependencies: {"@js-soft/docdb-querytranslator":"1.1.0","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.
|
|
449
|
+
version: "2.0.0-beta.13",
|
|
450
|
+
build: "99",
|
|
451
|
+
date: "2022-08-01T12:27:50+00:00",
|
|
452
|
+
commit: "452fb20d090cc6514e63591048460a18d2ac9969",
|
|
453
|
+
dependencies: {"@js-soft/docdb-querytranslator":"1.1.0","@js-soft/logging-abstractions":"1.0.0","@js-soft/ts-serval":"2.0.4","@js-soft/ts-utils":"^2.2.1","@nmshd/consumption":"2.0.0-beta.4","@nmshd/content":"2.0.0-alpha.45","@nmshd/crypto":"2.0.1","@nmshd/transport":"2.0.0-beta.3","ajv":"^8.11.0","ajv-errors":"^3.0.0","ajv-formats":"^2.1.1","fluent-ts-validator":"3.0.3","json-stringify-safe":"^5.0.1","luxon":"^3.0.1","qrcode":"1.5.1","reflect-metadata":"0.1.13","ts-simple-nameof":"1.3.1","typescript-ioc":"3.2.2"},
|
|
454
454
|
libraries: {
|
|
455
455
|
serval: ts_serval_1.buildInformation,
|
|
456
456
|
consumption: consumption_1.buildInformation,
|
|
@@ -765,12 +765,10 @@ let DataViewExpander = class DataViewExpander {
|
|
|
765
765
|
items: itemDVOs
|
|
766
766
|
};
|
|
767
767
|
}
|
|
768
|
-
|
|
769
|
-
public async expandRequests(requests: RequestJSON[]): Promise<RequestDVO[]> {
|
|
768
|
+
async expandRequests(requests) {
|
|
770
769
|
const requestPromises = requests.map((request) => this.expandRequest(request));
|
|
771
770
|
return await Promise.all(requestPromises);
|
|
772
771
|
}
|
|
773
|
-
*/
|
|
774
772
|
async expandRequestItem(requestItem, localRequestDTO) {
|
|
775
773
|
let isDecidable = false;
|
|
776
774
|
if (localRequestDTO && !localRequestDTO.isOwn && (localRequestDTO.status === "DecisionRequired" || localRequestDTO.status === "ManualDecisionRequired")) {
|
|
@@ -900,6 +898,85 @@ let DataViewExpander = class DataViewExpander {
|
|
|
900
898
|
}
|
|
901
899
|
return await this.expandRequestItem(requestGroupOrItem, localRequestDTO);
|
|
902
900
|
}
|
|
901
|
+
async expandResponseItem(responseItem) {
|
|
902
|
+
if (responseItem.result === "Accepted") {
|
|
903
|
+
const name = `i18n://dvo.responseItem.${responseItem["@type"]}.acceptedName`;
|
|
904
|
+
switch (responseItem["@type"]) {
|
|
905
|
+
case "ReadAttributeAcceptResponseItem":
|
|
906
|
+
const readAttributeResponseItem = responseItem;
|
|
907
|
+
const localAttributeResultForRead = await this.consumption.attributes.getAttribute({ id: readAttributeResponseItem.attributeId });
|
|
908
|
+
const localAttributeDVOForRead = await this.expandLocalAttributeDTO(localAttributeResultForRead.value);
|
|
909
|
+
return {
|
|
910
|
+
...readAttributeResponseItem,
|
|
911
|
+
type: "ReadAttributeAcceptResponseItemDVO",
|
|
912
|
+
id: readAttributeResponseItem.attributeId,
|
|
913
|
+
name: name,
|
|
914
|
+
attribute: localAttributeDVOForRead
|
|
915
|
+
};
|
|
916
|
+
case "CreateAttributeAcceptResponseItem":
|
|
917
|
+
const createAttributeResponseItem = responseItem;
|
|
918
|
+
const localAttributeResultForCreate = await this.consumption.attributes.getAttribute({ id: createAttributeResponseItem.attributeId });
|
|
919
|
+
const localAttributeDVOForCreate = await this.expandLocalAttributeDTO(localAttributeResultForCreate.value);
|
|
920
|
+
return {
|
|
921
|
+
...createAttributeResponseItem,
|
|
922
|
+
type: "CreateAttributeAcceptResponseItemDVO",
|
|
923
|
+
id: createAttributeResponseItem.attributeId,
|
|
924
|
+
name: name,
|
|
925
|
+
attribute: localAttributeDVOForCreate
|
|
926
|
+
};
|
|
927
|
+
case "ProposeAttributeAcceptResponseItem":
|
|
928
|
+
const proposeAttributeResponseItem = responseItem;
|
|
929
|
+
const localAttributeResultForPropose = await this.consumption.attributes.getAttribute({ id: proposeAttributeResponseItem.attributeId });
|
|
930
|
+
const localAttributeDVOForPropose = await this.expandLocalAttributeDTO(localAttributeResultForPropose.value);
|
|
931
|
+
return {
|
|
932
|
+
...proposeAttributeResponseItem,
|
|
933
|
+
type: "ProposeAttributeAcceptResponseItemDVO",
|
|
934
|
+
id: proposeAttributeResponseItem.attributeId,
|
|
935
|
+
name: name,
|
|
936
|
+
attribute: localAttributeDVOForPropose
|
|
937
|
+
};
|
|
938
|
+
default:
|
|
939
|
+
return {
|
|
940
|
+
...responseItem,
|
|
941
|
+
type: "AcceptResponseItemDVO",
|
|
942
|
+
id: "",
|
|
943
|
+
name: name
|
|
944
|
+
};
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
else if (responseItem.result === "Rejected") {
|
|
948
|
+
const rejectResponseItem = responseItem;
|
|
949
|
+
return {
|
|
950
|
+
...rejectResponseItem,
|
|
951
|
+
type: "RejectResponseItemDVO",
|
|
952
|
+
id: "",
|
|
953
|
+
name: "i18n://dvo.responseItem.rejected"
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
const errorResponseItem = responseItem;
|
|
958
|
+
return {
|
|
959
|
+
...errorResponseItem,
|
|
960
|
+
type: "ErrorResponseItemDVO",
|
|
961
|
+
id: "",
|
|
962
|
+
name: "i18n://dvo.responseItem.error"
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
async expandResponseGroupOrItem(responseGroupOrItem) {
|
|
967
|
+
if (responseGroupOrItem["@type"] === "ResponseItemGroup") {
|
|
968
|
+
const group = responseGroupOrItem;
|
|
969
|
+
const itemDVOs = [];
|
|
970
|
+
for (const requestItem of group.items) {
|
|
971
|
+
itemDVOs.push(await this.expandResponseItem(requestItem));
|
|
972
|
+
}
|
|
973
|
+
return {
|
|
974
|
+
type: "ResponseItemGroupDVO",
|
|
975
|
+
items: itemDVOs
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
return await this.expandResponseItem(responseGroupOrItem);
|
|
979
|
+
}
|
|
903
980
|
async expandLocalRequestDTO(request) {
|
|
904
981
|
const requestDVO = await this.expandRequest(request.content, request);
|
|
905
982
|
const peerDVO = await this.expandAddress(request.peer);
|
|
@@ -907,29 +984,52 @@ let DataViewExpander = class DataViewExpander {
|
|
|
907
984
|
if (!request.isOwn && (request.status === "DecisionRequired" || request.status === "ManualDecisionRequired")) {
|
|
908
985
|
isDecidable = true;
|
|
909
986
|
}
|
|
987
|
+
const directionLabel = request.isOwn ? "outgoing" : "incoming";
|
|
988
|
+
const statusText = `i18n://dvo.localRequest.status.${request.status}`;
|
|
989
|
+
// TODO: Wait for request.title from content and use it
|
|
910
990
|
return {
|
|
911
991
|
...request,
|
|
912
992
|
id: request.id,
|
|
913
993
|
content: requestDVO,
|
|
914
994
|
items: requestDVO.items,
|
|
915
|
-
name:
|
|
995
|
+
name: `i18n://dvo.localRequest.${directionLabel}.name`,
|
|
996
|
+
description: statusText,
|
|
916
997
|
type: "LocalRequestDVO",
|
|
917
998
|
date: request.createdAt,
|
|
918
999
|
createdBy: request.isOwn ? this.expandSelf() : peerDVO,
|
|
919
1000
|
decider: request.isOwn ? peerDVO : this.expandSelf(),
|
|
920
1001
|
peer: peerDVO,
|
|
921
|
-
response: request.response ? this.expandLocalResponseDTO(request.response) : undefined,
|
|
922
|
-
statusText:
|
|
1002
|
+
response: request.response ? await this.expandLocalResponseDTO(request.response, request) : undefined,
|
|
1003
|
+
statusText: statusText,
|
|
923
1004
|
isDecidable
|
|
924
1005
|
};
|
|
925
1006
|
}
|
|
926
|
-
|
|
1007
|
+
async expandLocalRequestDTOs(localRequests) {
|
|
1008
|
+
const localRequestPromises = localRequests.map((localRequest) => this.expandLocalRequestDTO(localRequest));
|
|
1009
|
+
return await Promise.all(localRequestPromises);
|
|
1010
|
+
}
|
|
1011
|
+
async expandResponse(response, request) {
|
|
1012
|
+
const itemDVOs = [];
|
|
1013
|
+
for (const responseItem of response.items) {
|
|
1014
|
+
itemDVOs.push(await this.expandResponseGroupOrItem(responseItem));
|
|
1015
|
+
}
|
|
1016
|
+
return {
|
|
1017
|
+
id: request.id,
|
|
1018
|
+
name: "i18n://dvo.response.name",
|
|
1019
|
+
type: "ResponseDVO",
|
|
1020
|
+
...response,
|
|
1021
|
+
items: itemDVOs
|
|
1022
|
+
};
|
|
1023
|
+
}
|
|
1024
|
+
async expandLocalResponseDTO(response, request) {
|
|
1025
|
+
const responseDVO = await this.expandResponse(response.content, request);
|
|
927
1026
|
return {
|
|
928
1027
|
...response,
|
|
929
|
-
id:
|
|
1028
|
+
id: request.id,
|
|
930
1029
|
name: "i18n://dvo.localResponse.name",
|
|
931
1030
|
type: "LocalResponseDVO",
|
|
932
|
-
date: response.createdAt
|
|
1031
|
+
date: response.createdAt,
|
|
1032
|
+
content: responseDVO
|
|
933
1033
|
};
|
|
934
1034
|
}
|
|
935
1035
|
async expandLocalAttributeDTO(attribute) {
|
|
@@ -969,7 +1069,8 @@ let DataViewExpander = class DataViewExpander {
|
|
|
969
1069
|
isDraft: false,
|
|
970
1070
|
requestReference: localAttribute.shareInfo.requestReference.toString(),
|
|
971
1071
|
sourceAttribute: localAttribute.shareInfo.sourceAttribute.toString(),
|
|
972
|
-
tags: []
|
|
1072
|
+
tags: [],
|
|
1073
|
+
valueType
|
|
973
1074
|
};
|
|
974
1075
|
}
|
|
975
1076
|
// Peer Attribute
|
|
@@ -990,7 +1091,8 @@ let DataViewExpander = class DataViewExpander {
|
|
|
990
1091
|
peer: peer,
|
|
991
1092
|
isDraft: false,
|
|
992
1093
|
requestReference: localAttribute.shareInfo.requestReference.toString(),
|
|
993
|
-
tags: []
|
|
1094
|
+
tags: [],
|
|
1095
|
+
valueType
|
|
994
1096
|
};
|
|
995
1097
|
}
|
|
996
1098
|
const sharedToPeerAttributes = await this.consumption.attributes.getAttributes({ query: { "shareInfo.sourceAttribute": attribute.id } });
|
|
@@ -1012,7 +1114,8 @@ let DataViewExpander = class DataViewExpander {
|
|
|
1012
1114
|
isOwn: true,
|
|
1013
1115
|
isDraft: false,
|
|
1014
1116
|
sharedWith: sharedToPeerDVOs,
|
|
1015
|
-
tags: []
|
|
1117
|
+
tags: [],
|
|
1118
|
+
valueType
|
|
1016
1119
|
};
|
|
1017
1120
|
}
|
|
1018
1121
|
async expandLocalAttributeDTOs(attributes) {
|
|
@@ -1119,7 +1222,8 @@ let DataViewExpander = class DataViewExpander {
|
|
|
1119
1222
|
valueHints,
|
|
1120
1223
|
value: attribute.value,
|
|
1121
1224
|
isDraft: true,
|
|
1122
|
-
isOwn: owner.isSelf
|
|
1225
|
+
isOwn: owner.isSelf,
|
|
1226
|
+
valueType: attribute.value["@type"]
|
|
1123
1227
|
};
|
|
1124
1228
|
}
|
|
1125
1229
|
async expandAttributes(attributes) {
|
|
@@ -1671,6 +1775,32 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
1671
1775
|
|
|
1672
1776
|
/***/ }),
|
|
1673
1777
|
|
|
1778
|
+
/***/ "./dist/dataViews/content/ResponseDVO.js":
|
|
1779
|
+
/*!***********************************************!*\
|
|
1780
|
+
!*** ./dist/dataViews/content/ResponseDVO.js ***!
|
|
1781
|
+
\***********************************************/
|
|
1782
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
1783
|
+
|
|
1784
|
+
"use strict";
|
|
1785
|
+
|
|
1786
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1787
|
+
//# sourceMappingURL=ResponseDVO.js.map
|
|
1788
|
+
|
|
1789
|
+
/***/ }),
|
|
1790
|
+
|
|
1791
|
+
/***/ "./dist/dataViews/content/ResponseItemDVOs.js":
|
|
1792
|
+
/*!****************************************************!*\
|
|
1793
|
+
!*** ./dist/dataViews/content/ResponseItemDVOs.js ***!
|
|
1794
|
+
\****************************************************/
|
|
1795
|
+
/***/ ((__unused_webpack_module, exports) => {
|
|
1796
|
+
|
|
1797
|
+
"use strict";
|
|
1798
|
+
|
|
1799
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1800
|
+
//# sourceMappingURL=ResponseItemDVOs.js.map
|
|
1801
|
+
|
|
1802
|
+
/***/ }),
|
|
1803
|
+
|
|
1674
1804
|
/***/ "./dist/dataViews/content/index.js":
|
|
1675
1805
|
/*!*****************************************!*\
|
|
1676
1806
|
!*** ./dist/dataViews/content/index.js ***!
|
|
@@ -1698,6 +1828,8 @@ __exportStar(__webpack_require__(/*! ./AttributeDVOs */ "./dist/dataViews/conten
|
|
|
1698
1828
|
__exportStar(__webpack_require__(/*! ./MailDVOs */ "./dist/dataViews/content/MailDVOs.js"), exports);
|
|
1699
1829
|
__exportStar(__webpack_require__(/*! ./RequestDVO */ "./dist/dataViews/content/RequestDVO.js"), exports);
|
|
1700
1830
|
__exportStar(__webpack_require__(/*! ./RequestItemDVOs */ "./dist/dataViews/content/RequestItemDVOs.js"), exports);
|
|
1831
|
+
__exportStar(__webpack_require__(/*! ./ResponseDVO */ "./dist/dataViews/content/ResponseDVO.js"), exports);
|
|
1832
|
+
__exportStar(__webpack_require__(/*! ./ResponseItemDVOs */ "./dist/dataViews/content/ResponseItemDVOs.js"), exports);
|
|
1701
1833
|
//# sourceMappingURL=index.js.map
|
|
1702
1834
|
|
|
1703
1835
|
/***/ }),
|
|
@@ -4130,7 +4262,7 @@ class DeciderModule extends extensibility_1.RuntimeModule {
|
|
|
4130
4262
|
async handleIncomingRequestStatusChanged(event) {
|
|
4131
4263
|
if (event.data.newStatus !== consumption_1.LocalRequestStatus.DecisionRequired)
|
|
4132
4264
|
return;
|
|
4133
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
4265
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
4134
4266
|
const requireManualDecisionResult = await services.consumptionServices.incomingRequests.requireManualDecision({ requestId: event.data.request.id });
|
|
4135
4267
|
if (requireManualDecisionResult.isError) {
|
|
4136
4268
|
this.logger.error(`Could not require manual decision for request ${event.data.request.id}`, requireManualDecisionResult.error);
|
|
@@ -4183,7 +4315,7 @@ class MessageModule extends RuntimeModule_1.RuntimeModule {
|
|
|
4183
4315
|
// Unknown type
|
|
4184
4316
|
return;
|
|
4185
4317
|
}
|
|
4186
|
-
const services = this.runtime.getServices(messageReceivedEvent.eventTargetAddress);
|
|
4318
|
+
const services = await this.runtime.getServices(messageReceivedEvent.eventTargetAddress);
|
|
4187
4319
|
const result = await services.transportServices.relationships.getRelationshipByAddress({ address: message.createdBy });
|
|
4188
4320
|
if (!result.isSuccess) {
|
|
4189
4321
|
this.logger.error(`Could not find relationship for address '${message.createdBy}'.`, result.error);
|
|
@@ -4233,7 +4365,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
4233
4365
|
if (template.content["@type"] !== "RelationshipTemplateBody")
|
|
4234
4366
|
return;
|
|
4235
4367
|
const body = template.content;
|
|
4236
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
4368
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
4237
4369
|
const requestResult = await services.consumptionServices.incomingRequests.getRequests({ query: { "source.reference": template.id } });
|
|
4238
4370
|
if (requestResult.isError) {
|
|
4239
4371
|
this.logger.error(`Could not get requests for template '${template.id}'. Root error:`, requestResult.error);
|
|
@@ -4266,7 +4398,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
4266
4398
|
await this.createIncomingRequest(services, body.onNewRelationship, template.id);
|
|
4267
4399
|
}
|
|
4268
4400
|
async handleMessageReceivedEvent(event) {
|
|
4269
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
4401
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
4270
4402
|
const message = event.data;
|
|
4271
4403
|
const messageContentType = message.content["@type"];
|
|
4272
4404
|
switch (messageContentType) {
|
|
@@ -4286,7 +4418,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
4286
4418
|
const message = event.data;
|
|
4287
4419
|
if (message.content["@type"] !== "Request")
|
|
4288
4420
|
return;
|
|
4289
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
4421
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
4290
4422
|
const request = message.content;
|
|
4291
4423
|
const requestResult = await services.consumptionServices.outgoingRequests.sent({ requestId: request.id, messageId: message.id });
|
|
4292
4424
|
if (requestResult.isError) {
|
|
@@ -4324,7 +4456,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
4324
4456
|
async handleIncomingRequestDecidedForRelationship(event) {
|
|
4325
4457
|
const request = event.data.request;
|
|
4326
4458
|
const templateId = request.source.reference;
|
|
4327
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
4459
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
4328
4460
|
if (request.response.content.result === content_1.ResponseResult.Rejected) {
|
|
4329
4461
|
await services.consumptionServices.incomingRequests.complete({ requestId: request.id });
|
|
4330
4462
|
return;
|
|
@@ -4360,7 +4492,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
4360
4492
|
async handleIncomingRequestDecidedForMessage(event) {
|
|
4361
4493
|
const request = event.data.request;
|
|
4362
4494
|
const requestId = request.id;
|
|
4363
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
4495
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
4364
4496
|
const sendMessageResult = await services.transportServices.messages.sendMessage({
|
|
4365
4497
|
recipients: [request.peer],
|
|
4366
4498
|
content: request.response.content
|
|
@@ -4384,7 +4516,7 @@ class RequestModule extends RuntimeModule_1.RuntimeModule {
|
|
|
4384
4516
|
const createdRelationship = event.data;
|
|
4385
4517
|
if (createdRelationship.status !== types_1.RelationshipStatus.Pending || !createdRelationship.template.isOwn)
|
|
4386
4518
|
return;
|
|
4387
|
-
const services = this.runtime.getServices(event.eventTargetAddress);
|
|
4519
|
+
const services = await this.runtime.getServices(event.eventTargetAddress);
|
|
4388
4520
|
const template = createdRelationship.template;
|
|
4389
4521
|
const templateId = template.id;
|
|
4390
4522
|
// do not trigger for templates without the correct content type
|