octopian-apis 1.0.57 → 1.0.58
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/package.json
CHANGED
|
@@ -920,14 +920,13 @@ export async function GetMyClosedCorrespondenceRequests(
|
|
|
920
920
|
Timeout = 30000,
|
|
921
921
|
RequiredHeaderValue = null
|
|
922
922
|
) {
|
|
923
|
-
GetMyCorrespondenceListDTO["
|
|
924
|
-
GetMyCorrespondenceListDTO["
|
|
925
|
-
GetMyCorrespondenceListDTO["
|
|
926
|
-
GetMyCorrespondenceListDTO["
|
|
927
|
-
GetMyCorrespondenceListDTO["WithPreviousClosedRequestSteps"] = true;
|
|
923
|
+
GetMyCorrespondenceListDTO["RequestStatus"] = "Closed";
|
|
924
|
+
GetMyCorrespondenceListDTO["WithRequestStep"] = true;
|
|
925
|
+
GetMyCorrespondenceListDTO["WithRequestStepAttribute"] = true;
|
|
926
|
+
GetMyCorrespondenceListDTO["WithRequestAttribute"] = true;
|
|
928
927
|
|
|
929
928
|
let APIResponse = await apiHandler.PostMethod(
|
|
930
|
-
|
|
929
|
+
RequestsAPIConstants.uriGetMyRequestList(),
|
|
931
930
|
GetMyCorrespondenceListDTO,
|
|
932
931
|
AuthToken,
|
|
933
932
|
Timeout,
|
|
@@ -937,15 +936,14 @@ export async function GetMyClosedCorrespondenceRequests(
|
|
|
937
936
|
let ReadSASResult = await CreateReadSAS(AuthToken, Timeout);
|
|
938
937
|
if (APIResponse.StatusCode === 200 && APIResponse.Result?.length > 0) {
|
|
939
938
|
APIResponse.Result.forEach((element) => {
|
|
940
|
-
let subject = element.
|
|
939
|
+
let subject = element.ServiceName;
|
|
941
940
|
let notes = "";
|
|
942
941
|
let ImagePath = "";
|
|
943
|
-
let ProcessFlow = [];
|
|
944
942
|
let ToName = "";
|
|
945
943
|
let GeneratedDocument = "";
|
|
946
944
|
let Attachments = [];
|
|
947
|
-
if (element.
|
|
948
|
-
element.
|
|
945
|
+
if (element.RequestAttributeList?.length > 0) {
|
|
946
|
+
element.RequestAttributeList.forEach((attribute) => {
|
|
949
947
|
if (attribute.Alias === "Subject") {
|
|
950
948
|
subject = attribute.Value;
|
|
951
949
|
}
|
|
@@ -958,7 +956,7 @@ export async function GetMyClosedCorrespondenceRequests(
|
|
|
958
956
|
if (attribute.Alias === "To") {
|
|
959
957
|
ToName = attribute.Value;
|
|
960
958
|
}
|
|
961
|
-
if (attribute.Alias === element.
|
|
959
|
+
if (attribute.Alias === element.CustomField5 && attribute.Value) {
|
|
962
960
|
GeneratedDocument = attribute.Value.includes('https') ? attribute.Value : (ReadSASResult?.Result
|
|
963
961
|
? ReadSASResult.Result.split("?")[0] +
|
|
964
962
|
"/" +
|
|
@@ -967,30 +965,6 @@ export async function GetMyClosedCorrespondenceRequests(
|
|
|
967
965
|
ReadSASResult.Result.split("?")[1]
|
|
968
966
|
: "");
|
|
969
967
|
}
|
|
970
|
-
if (element.PreviousClosedRequestStepList?.length > 0) {
|
|
971
|
-
let PreviousSteps = element.PreviousClosedRequestStepList.filter(
|
|
972
|
-
(step) => step.IsNeutralEmotion
|
|
973
|
-
);
|
|
974
|
-
if (PreviousSteps.length > 0) {
|
|
975
|
-
let PreviousStep = PreviousSteps.reduce((prev, current) =>
|
|
976
|
-
+prev.RequestStepId > +current.RequestStepId ? prev : current
|
|
977
|
-
);
|
|
978
|
-
|
|
979
|
-
let PreviousStepDocumentAttachment =
|
|
980
|
-
PreviousStep.RequestAttributeList.find(
|
|
981
|
-
(PrevAttribute) => PrevAttribute.Alias === PreviousStep.ExtraLine1
|
|
982
|
-
);
|
|
983
|
-
if (PreviousStepDocumentAttachment && PreviousStepDocumentAttachment.Value) {
|
|
984
|
-
GeneratedDocument =PreviousStepDocumentAttachment.Value.includes('https') ? PreviousStepDocumentAttachment.Value : (ReadSASResult?.Result
|
|
985
|
-
? ReadSASResult.Result.split("?")[0] +
|
|
986
|
-
"/" +
|
|
987
|
-
PreviousStepDocumentAttachment.Value +
|
|
988
|
-
"?" +
|
|
989
|
-
ReadSASResult.Result.split("?")[1]
|
|
990
|
-
: "");
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
968
|
if (
|
|
995
969
|
attribute.Alias === "Attachments" &&
|
|
996
970
|
!attribute.IsRequesterVisible
|
|
@@ -1025,9 +999,6 @@ export async function GetMyClosedCorrespondenceRequests(
|
|
|
1025
999
|
}
|
|
1026
1000
|
});
|
|
1027
1001
|
}
|
|
1028
|
-
if (element.ProviderImagePath) {
|
|
1029
|
-
ImagePath = element.ProviderImagePath;
|
|
1030
|
-
}
|
|
1031
1002
|
if (ImagePath && ReadSASResult.StatusCode === 200) {
|
|
1032
1003
|
ImagePath =
|
|
1033
1004
|
ReadSASResult.Result.split("?")[0] +
|
|
@@ -1036,45 +1007,19 @@ export async function GetMyClosedCorrespondenceRequests(
|
|
|
1036
1007
|
"?" +
|
|
1037
1008
|
ReadSASResult.Result.split("?")[1];
|
|
1038
1009
|
}
|
|
1039
|
-
if (element.PreviousClosedRequestStepList) {
|
|
1040
|
-
element.PreviousClosedRequestStepList.forEach((step) => {
|
|
1041
|
-
let ProviderImagePath = "";
|
|
1042
|
-
if (step.ProviderImagePath) {
|
|
1043
|
-
ProviderImagePath = step.ProviderImagePath;
|
|
1044
|
-
}
|
|
1045
|
-
if (ProviderImagePath && ReadSASResult.StatusCode === 200) {
|
|
1046
|
-
ProviderImagePath =
|
|
1047
|
-
ReadSASResult.Result.split("?")[0] +
|
|
1048
|
-
"/" +
|
|
1049
|
-
ProviderImagePath +
|
|
1050
|
-
"?" +
|
|
1051
|
-
ReadSASResult.Result.split("?")[1];
|
|
1052
|
-
}
|
|
1053
|
-
ProcessFlow.push({
|
|
1054
|
-
Id: step.RequestStepId,
|
|
1055
|
-
ImagePath: ProviderImagePath,
|
|
1056
|
-
Name: step.ProviderName || step.ProviderRoleName,
|
|
1057
|
-
Comment: step.ProviderComments,
|
|
1058
|
-
SubmitDate: step.StartDate,
|
|
1059
|
-
ParentRequestStepId: step.ParentRequestStepId || 0,
|
|
1060
|
-
});
|
|
1061
|
-
});
|
|
1062
|
-
}
|
|
1063
1010
|
MappedResult.push({
|
|
1064
1011
|
RequestId: element.RequestId,
|
|
1065
|
-
StepId:
|
|
1012
|
+
StepId: 0,
|
|
1066
1013
|
RequesterImagePath: ImagePath,
|
|
1067
|
-
RequesterName: element.
|
|
1014
|
+
RequesterName: element.InteractorName,
|
|
1068
1015
|
ToName: ToName,
|
|
1069
|
-
CategoryColor: element.
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
CategoryName: element.Request.ServiceSubCategoryName,
|
|
1073
|
-
SubmitDate: element.StartDate,
|
|
1016
|
+
CategoryColor: element.ExtraLine1 ? element.ExtraLine1 : "#FB4C2F",
|
|
1017
|
+
CategoryName: element.ServiceSubCategoryName,
|
|
1018
|
+
SubmitDate: element.SubmitDate,
|
|
1074
1019
|
Subject: subject,
|
|
1075
1020
|
Notes: notes,
|
|
1076
1021
|
IsRead: true,
|
|
1077
|
-
ProcessFlow:
|
|
1022
|
+
ProcessFlow: [],
|
|
1078
1023
|
GeneratedDocument: GeneratedDocument,
|
|
1079
1024
|
Attachments: Attachments,
|
|
1080
1025
|
});
|
|
@@ -388,7 +388,7 @@ export class TransactionsAPIConstants {
|
|
|
388
388
|
return transactionCatalogURI + "/api/Notification/GetNotificationList";
|
|
389
389
|
}
|
|
390
390
|
static uriUpdateNotificationList(){
|
|
391
|
-
return transactionCatalogURI + "/api/
|
|
391
|
+
return transactionCatalogURI + "/api/Notification/UpdateNotificationList";
|
|
392
392
|
}
|
|
393
393
|
static uriGetStepTypeList(){
|
|
394
394
|
return transactionCatalogURI + "/api/TransactionCommon/GetStepTypeList";
|