octopian-apis 1.0.57 → 1.0.60

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "octopian-apis",
3
- "version": "1.0.57",
3
+ "version": "1.0.60",
4
4
  "description": "Transaction APIs SDK that implements Octopian Services which will be used for any node project typescript or javascript",
5
5
  "main": "./src/index.js",
6
6
  "scripts": {
@@ -920,14 +920,13 @@ export async function GetMyClosedCorrespondenceRequests(
920
920
  Timeout = 30000,
921
921
  RequiredHeaderValue = null
922
922
  ) {
923
- GetMyCorrespondenceListDTO["WithRequest"] = true;
924
- GetMyCorrespondenceListDTO["WithRequestStepAttributes"] = true;
925
- GetMyCorrespondenceListDTO["WithRequestAttributes"] = true;
926
- GetMyCorrespondenceListDTO["RequestStepStatus"] = "Archived";
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
- RequestStepsAPIConstants.uriGetMyRequestStepList(),
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.Request.ServiceName;
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.Request.RequestAttributeList?.length > 0) {
948
- element.Request.RequestAttributeList.forEach((attribute) => {
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.Request.CustomField5 && attribute.Value) {
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: element.RequestStepId,
1012
+ StepId: 0,
1066
1013
  RequesterImagePath: ImagePath,
1067
- RequesterName: element.Request.InteractorName,
1014
+ RequesterName: element.InteractorName,
1068
1015
  ToName: ToName,
1069
- CategoryColor: element.Request.ExtraLine1
1070
- ? element.Request.ExtraLine1
1071
- : "#FB4C2F",
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: ProcessFlow,
1022
+ ProcessFlow: [],
1078
1023
  GeneratedDocument: GeneratedDocument,
1079
1024
  Attachments: Attachments,
1080
1025
  });
package/src/index.d.ts CHANGED
@@ -63,7 +63,7 @@ import { AgentMaintainInteractorOutput } from "./modals/output-modals/request-mo
63
63
  import { AgentSubmitCartInput } from "./modals/input-modals/request-modals/AgentSubmitCartInput";
64
64
  import { AgentGetInteractorRoleInput } from "./modals/input-modals/request-modals/AgentGetInteractorRoleInput";
65
65
  import { AIVisionCopyFileInput } from "./modals/input-modals/storage-modals/AIVisionCopyFileInput";
66
- import { RequesterAddRequestInput, DynamicStepList } from "./modals/input-modals/request-modals/RequesterAddRequestInput";
66
+ import { RequesterAddRequestInput, DynamicStepList, ChildStep } from "./modals/input-modals/request-modals/RequesterAddRequestInput";
67
67
  import { AddRequestOutput } from "./modals/output-modals/request-modals/AddRequestOutput";
68
68
  import { GetCommentListOutput } from "./modals/output-modals/request-modals/GetCommentListOutput";
69
69
  import { GetRequestCommentListInput } from "./modals/input-modals/request-modals/GetRequestCommentListInput";
@@ -7621,5 +7621,6 @@ export {
7621
7621
  GenerateStepDocumentInput,
7622
7622
  NotificationListOutput,
7623
7623
  UpdateNotificationInput,
7624
- GetStepTypeOutput
7624
+ GetStepTypeOutput,
7625
+ ChildStep
7625
7626
  };
@@ -1,4 +1,4 @@
1
- const Config = require('./config');
1
+ import Config from './config';//const Config = require('./config');
2
2
  /**
3
3
  * Initializes the configuration with the specified API key and domain name.
4
4
  *
@@ -388,7 +388,7 @@ export class TransactionsAPIConstants {
388
388
  return transactionCatalogURI + "/api/Notification/GetNotificationList";
389
389
  }
390
390
  static uriUpdateNotificationList(){
391
- return transactionCatalogURI + "/api/TransactionCommon/UpdateNotificationList";
391
+ return transactionCatalogURI + "/api/Notification/UpdateNotificationList";
392
392
  }
393
393
  static uriGetStepTypeList(){
394
394
  return transactionCatalogURI + "/api/TransactionCommon/GetStepTypeList";