octopian-apis 1.0.43 → 1.0.45

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.43",
3
+ "version": "1.0.45",
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": {
@@ -2,9 +2,14 @@ import {
2
2
  RequestsAPIConstants,
3
3
  RequestStepsAPIConstants,
4
4
  StorageAPIConstants,
5
+ TransactionsAPIConstants,
5
6
  } from "../web-services/apiConstants";
6
7
  import * as apiHandler from "../web-services/apiHandler";
7
- import { CreateReadSAS, GetOnPremiseReadSAS, GetOnPremiseWriteSAS } from "./storageServices";
8
+ import {
9
+ CreateReadSAS,
10
+ GetOnPremiseReadSAS,
11
+ GetOnPremiseWriteSAS,
12
+ } from "./storageServices";
8
13
  import { SetStorageType, GetConfig, decodeBase64ToJson } from "../sdkUtilities";
9
14
  /**
10
15
  * @description
@@ -81,7 +86,10 @@ export async function GetMyApprovedCorrespondenceRequests(
81
86
  if (attribute.Alias === "To") {
82
87
  ToName = attribute.Value;
83
88
  }
84
- if (attribute.AttributeTypeValueTypeName === "Attachment" && !attribute.IsRequesterVisible) {
89
+ if (
90
+ attribute.AttributeTypeValueTypeName === "Attachment" &&
91
+ !attribute.IsRequesterVisible
92
+ ) {
85
93
  // if(attribute.Value && ReadSASResult?.Result)
86
94
  // {
87
95
  // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
@@ -90,31 +98,31 @@ export async function GetMyApprovedCorrespondenceRequests(
90
98
  // "?" +
91
99
  // ReadSASResult.Result.split("?")[1];
92
100
  // }
93
- GeneratedDocument = attribute.Value;
101
+ GeneratedDocument = attribute.Value;
94
102
  }
95
- if(attribute.Alias === "Attachments" && !attribute.IsRequesterVisible)
96
- {
97
- if(attribute.Value)
98
- {
103
+ if (
104
+ attribute.Alias === "Attachments" &&
105
+ !attribute.IsRequesterVisible
106
+ ) {
107
+ if (attribute.Value) {
99
108
  let DecodedAttachmentsRecordList = decodeBase64ToJson(
100
109
  attribute.Value
101
110
  );
102
111
  for (let attributeGroup of DecodedAttachmentsRecordList) {
103
112
  for (let group of attributeGroup) {
104
113
  for (let attribute of group.RequestAttributeDtos) {
105
- if (
106
- attribute.AttributeTypeValueTypeName ===
107
- AttributeTypeValueTypeNames.Attachment
108
- ) {
114
+ if (attribute.AttributeTypeValueTypeName === "Attachment") {
109
115
  Attachments.push({
110
116
  id: attribute.RequestAttributeId || 0,
111
117
  name: attribute.Name || "",
112
118
  type: attribute.Value?.split(".").pop() || "",
113
- url: ReadSASResult?.Result? (ReadSASResult.Result.split("?")[0] +
114
- "/" +
115
- attribute.Value +
116
- "?" +
117
- ReadSASResult.Result.split("?")[1]): "",
119
+ url: ReadSASResult?.Result
120
+ ? ReadSASResult.Result.split("?")[0] +
121
+ "/" +
122
+ attribute.Value +
123
+ "?" +
124
+ ReadSASResult.Result.split("?")[1]
125
+ : "",
118
126
  });
119
127
  }
120
128
  }
@@ -267,7 +275,10 @@ export async function GetMyRejectedCorrespondenceRequests(
267
275
  if (attribute.Alias === "To") {
268
276
  ToName = attribute.Value;
269
277
  }
270
- if (attribute.AttributeTypeValueTypeName === "Attachment" && !attribute.IsRequesterVisible) {
278
+ if (
279
+ attribute.AttributeTypeValueTypeName === "Attachment" &&
280
+ !attribute.IsRequesterVisible
281
+ ) {
271
282
  // if(attribute.Value && ReadSASResult?.Result)
272
283
  // {
273
284
  // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
@@ -276,32 +287,31 @@ export async function GetMyRejectedCorrespondenceRequests(
276
287
  // "?" +
277
288
  // ReadSASResult.Result.split("?")[1];
278
289
  // }
279
- GeneratedDocument = attribute.Value;
280
-
290
+ GeneratedDocument = attribute.Value;
281
291
  }
282
- if(attribute.Alias === "Attachments" && !attribute.IsRequesterVisible)
283
- {
284
- if(attribute.Value)
285
- {
292
+ if (
293
+ attribute.Alias === "Attachments" &&
294
+ !attribute.IsRequesterVisible
295
+ ) {
296
+ if (attribute.Value) {
286
297
  let DecodedAttachmentsRecordList = decodeBase64ToJson(
287
298
  attribute.Value
288
299
  );
289
300
  for (let attributeGroup of DecodedAttachmentsRecordList) {
290
301
  for (let group of attributeGroup) {
291
302
  for (let attribute of group.RequestAttributeDtos) {
292
- if (
293
- attribute.AttributeTypeValueTypeName ===
294
- AttributeTypeValueTypeNames.Attachment
295
- ) {
303
+ if (attribute.AttributeTypeValueTypeName === "Attachment") {
296
304
  Attachments.push({
297
305
  id: attribute.RequestAttributeId || 0,
298
306
  name: attribute.Name || "",
299
307
  type: attribute.Value?.split(".").pop() || "",
300
- url: ReadSASResult?.Result? (ReadSASResult.Result.split("?")[0] +
301
- "/" +
302
- attribute.Value +
303
- "?" +
304
- ReadSASResult.Result.split("?")[1]): "",
308
+ url: ReadSASResult?.Result
309
+ ? ReadSASResult.Result.split("?")[0] +
310
+ "/" +
311
+ attribute.Value +
312
+ "?" +
313
+ ReadSASResult.Result.split("?")[1]
314
+ : "",
305
315
  });
306
316
  }
307
317
  }
@@ -442,7 +452,10 @@ export async function GetMyDraftCorrespondenceRequests(
442
452
  if (attribute.Alias === "To") {
443
453
  ToName = attribute.Value;
444
454
  }
445
- if (attribute.AttributeTypeValueTypeName === "Attachment" && !attribute.IsRequesterVisible) {
455
+ if (
456
+ attribute.AttributeTypeValueTypeName === "Attachment" &&
457
+ !attribute.IsRequesterVisible
458
+ ) {
446
459
  // if(attribute.Value && ReadSASResult?.Result)
447
460
  // {
448
461
  // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
@@ -451,31 +464,31 @@ export async function GetMyDraftCorrespondenceRequests(
451
464
  // "?" +
452
465
  // ReadSASResult.Result.split("?")[1];
453
466
  // }
454
- GeneratedDocument = attribute.Value;
467
+ GeneratedDocument = attribute.Value;
455
468
  }
456
- if(attribute.Alias === "Attachments" && !attribute.IsRequesterVisible)
457
- {
458
- if(attribute.Value)
459
- {
469
+ if (
470
+ attribute.Alias === "Attachments" &&
471
+ !attribute.IsRequesterVisible
472
+ ) {
473
+ if (attribute.Value) {
460
474
  let DecodedAttachmentsRecordList = decodeBase64ToJson(
461
475
  attribute.Value
462
476
  );
463
477
  for (let attributeGroup of DecodedAttachmentsRecordList) {
464
478
  for (let group of attributeGroup) {
465
479
  for (let attribute of group.RequestAttributeDtos) {
466
- if (
467
- attribute.AttributeTypeValueTypeName ===
468
- AttributeTypeValueTypeNames.Attachment
469
- ) {
480
+ if (attribute.AttributeTypeValueTypeName === "Attachment") {
470
481
  Attachments.push({
471
482
  id: attribute.RequestAttributeId || 0,
472
483
  name: attribute.Name || "",
473
484
  type: attribute.Value?.split(".").pop() || "",
474
- url: ReadSASResult?.Result? (ReadSASResult.Result.split("?")[0] +
475
- "/" +
476
- attribute.Value +
477
- "?" +
478
- ReadSASResult.Result.split("?")[1]): "",
485
+ url: ReadSASResult?.Result
486
+ ? ReadSASResult.Result.split("?")[0] +
487
+ "/" +
488
+ attribute.Value +
489
+ "?" +
490
+ ReadSASResult.Result.split("?")[1]
491
+ : "",
479
492
  });
480
493
  }
481
494
  }
@@ -546,7 +559,7 @@ export async function GetMyDraftCorrespondenceRequests(
546
559
  * }
547
560
  * }
548
561
  */
549
- export async function GetInProcessCorrespondenceRequests(
562
+ export async function GetSentCorrespondenceRequests(
550
563
  GetMyCorrespondenceListDTO,
551
564
  AuthToken = null,
552
565
  Timeout = 30000,
@@ -574,7 +587,7 @@ export async function GetInProcessCorrespondenceRequests(
574
587
  let ToName = "";
575
588
  let GeneratedDocument = "";
576
589
  let Attachments = [];
577
- if (element.RequestAttributeList?.length > 0) {
590
+ if (element.RequestAttributeList?.length > 0) {
578
591
  element.RequestAttributeList.forEach((attribute) => {
579
592
  if (attribute.Alias === "Subject") {
580
593
  subject = attribute.Value;
@@ -588,7 +601,10 @@ export async function GetInProcessCorrespondenceRequests(
588
601
  if (attribute.Alias === "To") {
589
602
  ToName = attribute.Value;
590
603
  }
591
- if (attribute.AttributeTypeValueTypeName === "Attachment" && !attribute.IsRequesterVisible) {
604
+ if (
605
+ attribute.AttributeTypeValueTypeName === "Attachment" &&
606
+ !attribute.IsRequesterVisible
607
+ ) {
592
608
  // if(attribute.Value && ReadSASResult?.Result)
593
609
  // {
594
610
  // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
@@ -597,31 +613,31 @@ export async function GetInProcessCorrespondenceRequests(
597
613
  // "?" +
598
614
  // ReadSASResult.Result.split("?")[1];
599
615
  // }
600
- GeneratedDocument = attribute.Value;
616
+ GeneratedDocument = attribute.Value;
601
617
  }
602
- if(attribute.Alias === "Attachments" && !attribute.IsRequesterVisible)
603
- {
604
- if(attribute.Value)
605
- {
618
+ if (
619
+ attribute.Alias === "Attachments" &&
620
+ !attribute.IsRequesterVisible
621
+ ) {
622
+ if (attribute.Value) {
606
623
  let DecodedAttachmentsRecordList = decodeBase64ToJson(
607
624
  attribute.Value
608
625
  );
609
626
  for (let attributeGroup of DecodedAttachmentsRecordList) {
610
627
  for (let group of attributeGroup) {
611
628
  for (let attribute of group.RequestAttributeDtos) {
612
- if (
613
- attribute.AttributeTypeValueTypeName ===
614
- AttributeTypeValueTypeNames.Attachment
615
- ) {
629
+ if (attribute.AttributeTypeValueTypeName === "Attachment") {
616
630
  Attachments.push({
617
631
  id: attribute.RequestAttributeId || 0,
618
632
  name: attribute.Name || "",
619
633
  type: attribute.Value?.split(".").pop() || "",
620
- url: ReadSASResult?.Result? (ReadSASResult.Result.split("?")[0] +
621
- "/" +
622
- attribute.Value +
623
- "?" +
624
- ReadSASResult.Result.split("?")[1]): "",
634
+ url: ReadSASResult?.Result
635
+ ? ReadSASResult.Result.split("?")[0] +
636
+ "/" +
637
+ attribute.Value +
638
+ "?" +
639
+ ReadSASResult.Result.split("?")[1]
640
+ : "",
625
641
  });
626
642
  }
627
643
  }
@@ -661,6 +677,154 @@ export async function GetInProcessCorrespondenceRequests(
661
677
  return APIResponse;
662
678
  }
663
679
 
680
+ /**
681
+ * @description
682
+ * Retrieves the list of Correspondences for the current user.
683
+ *
684
+ * @param {object} getMyCorrespondenceListDTO
685
+ * Data object containing fields necessary for retrieving the list of requests.
686
+ * PageSize: number
687
+ * PageIndex: number
688
+ * IsAscendingOrder?: boolean (Optional)
689
+ * FromFinishDate?: string (Optional)
690
+ * ToFinishDate?: string (Optional)
691
+ * FromStartDate?: string (Optional)
692
+ * ToStartDate?: string (Optional)
693
+ *
694
+ * @param {string} AuthToken
695
+ * Authentication token for authorization purposes.
696
+ *
697
+ * @param {number} Timeout
698
+ * Time in milliseconds to wait before the request times out. Default is 30000.
699
+ *
700
+ * @returns
701
+ * An object containing the response from the Get My Request List request, including
702
+ * success message, status code, and any additional data returned by the API.
703
+ * {
704
+ * Message: string,
705
+ * StatusCode: number,
706
+ * Result: {
707
+ * -- request data based on selection criteria wether grouped or not--
708
+ * }
709
+ * }
710
+ */
711
+ export async function GetCancelledCorrespondenceRequests(
712
+ GetMyCorrespondenceListDTO,
713
+ AuthToken = null,
714
+ Timeout = 30000,
715
+ RequiredHeaderValue = null
716
+ ) {
717
+ GetMyCorrespondenceListDTO["RequestStatus"] = "Cancelled";
718
+ GetMyCorrespondenceListDTO["WithRequestStep"] = true;
719
+ GetMyCorrespondenceListDTO["WithRequestStepAttribute"] = true;
720
+ GetMyCorrespondenceListDTO["WithRequestAttribute"] = true;
721
+
722
+ let APIResponse = await apiHandler.PostMethod(
723
+ RequestsAPIConstants.uriGetMyRequestList(),
724
+ GetMyCorrespondenceListDTO,
725
+ AuthToken,
726
+ Timeout,
727
+ RequiredHeaderValue
728
+ );
729
+ let MappedResult = [];
730
+ let ReadSASResult = await CreateReadSAS(AuthToken, Timeout);
731
+ if (APIResponse.StatusCode === 200 && APIResponse.Result?.length > 0) {
732
+ APIResponse.Result.forEach((element) => {
733
+ let subject = element.ServiceName;
734
+ let notes = "";
735
+ let ImagePath = "";
736
+ let ToName = "";
737
+ let GeneratedDocument = "";
738
+ let Attachments = [];
739
+ if (element.RequestAttributeList?.length > 0) {
740
+ element.RequestAttributeList.forEach((attribute) => {
741
+ if (attribute.Alias === "Subject") {
742
+ subject = attribute.Value;
743
+ }
744
+ if (attribute.Alias === "Notes") {
745
+ notes = attribute.Value;
746
+ }
747
+ if (attribute.Alias === "InteractorImagePath") {
748
+ ImagePath = attribute.Value;
749
+ }
750
+ if (attribute.Alias === "To") {
751
+ ToName = attribute.Value;
752
+ }
753
+ if (
754
+ attribute.AttributeTypeValueTypeName === "Attachment" &&
755
+ !attribute.IsRequesterVisible
756
+ ) {
757
+ // if(attribute.Value && ReadSASResult?.Result)
758
+ // {
759
+ // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
760
+ // "/" +
761
+ // attribute.Value +
762
+ // "?" +
763
+ // ReadSASResult.Result.split("?")[1];
764
+ // }
765
+ GeneratedDocument = attribute.Value;
766
+ }
767
+ if (
768
+ attribute.Alias === "Attachments" &&
769
+ !attribute.IsRequesterVisible
770
+ ) {
771
+ if (attribute.Value) {
772
+ let DecodedAttachmentsRecordList = decodeBase64ToJson(
773
+ attribute.Value
774
+ );
775
+ for (let attributeGroup of DecodedAttachmentsRecordList) {
776
+ for (let group of attributeGroup) {
777
+ for (let attribute of group.RequestAttributeDtos) {
778
+ if (attribute.AttributeTypeValueTypeName === "Attachment") {
779
+ Attachments.push({
780
+ id: attribute.RequestAttributeId || 0,
781
+ name: attribute.Name || "",
782
+ type: attribute.Value?.split(".").pop() || "",
783
+ url: ReadSASResult?.Result
784
+ ? ReadSASResult.Result.split("?")[0] +
785
+ "/" +
786
+ attribute.Value +
787
+ "?" +
788
+ ReadSASResult.Result.split("?")[1]
789
+ : "",
790
+ });
791
+ }
792
+ }
793
+ }
794
+ }
795
+ }
796
+ }
797
+ });
798
+ }
799
+ if (ImagePath && ReadSASResult.StatusCode === 200) {
800
+ ImagePath =
801
+ ReadSASResult.Result.split("?")[0] +
802
+ "/" +
803
+ ImagePath +
804
+ "?" +
805
+ ReadSASResult.Result.split("?")[1];
806
+ }
807
+ MappedResult.push({
808
+ RequestId: element.RequestId,
809
+ StepId: 0,
810
+ RequesterImagePath: ImagePath,
811
+ RequesterName: element.InteractorName,
812
+ ToName: ToName,
813
+ CategoryColor: element.ExtraLine1 ? element.ExtraLine1 : "#FB4C2F",
814
+ CategoryName: element.ServiceSubCategoryName,
815
+ SubmitDate: element.SubmitDate,
816
+ Subject: subject,
817
+ Notes: notes,
818
+ IsRead: true,
819
+ ProcessFlow: [],
820
+ GeneratedDocument: GeneratedDocument,
821
+ Attachments: Attachments,
822
+ });
823
+ });
824
+ APIResponse.Result = MappedResult;
825
+ }
826
+ return APIResponse;
827
+ }
664
828
  /**
665
829
  * @description
666
830
  * Retrieves the list of Correspondences for the current user.
@@ -736,7 +900,10 @@ export async function GetMyClosedCorrespondenceRequests(
736
900
  if (attribute.Alias === "To") {
737
901
  ToName = attribute.Value;
738
902
  }
739
- if (attribute.AttributeTypeValueTypeName === "Attachment" && !attribute.IsRequesterVisible) {
903
+ if (
904
+ attribute.AttributeTypeValueTypeName === "Attachment" &&
905
+ !attribute.IsRequesterVisible
906
+ ) {
740
907
  // if(attribute.Value && ReadSASResult?.Result)
741
908
  // {
742
909
  // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
@@ -745,31 +912,31 @@ export async function GetMyClosedCorrespondenceRequests(
745
912
  // "?" +
746
913
  // ReadSASResult.Result.split("?")[1];
747
914
  // }
748
- GeneratedDocument = attribute.Value;
915
+ GeneratedDocument = attribute.Value;
749
916
  }
750
- if(attribute.Alias === "Attachments" && !attribute.IsRequesterVisible)
751
- {
752
- if(attribute.Value)
753
- {
917
+ if (
918
+ attribute.Alias === "Attachments" &&
919
+ !attribute.IsRequesterVisible
920
+ ) {
921
+ if (attribute.Value) {
754
922
  let DecodedAttachmentsRecordList = decodeBase64ToJson(
755
923
  attribute.Value
756
924
  );
757
925
  for (let attributeGroup of DecodedAttachmentsRecordList) {
758
926
  for (let group of attributeGroup) {
759
927
  for (let attribute of group.RequestAttributeDtos) {
760
- if (
761
- attribute.AttributeTypeValueTypeName ===
762
- AttributeTypeValueTypeNames.Attachment
763
- ) {
928
+ if (attribute.AttributeTypeValueTypeName === "Attachment") {
764
929
  Attachments.push({
765
930
  id: attribute.RequestAttributeId || 0,
766
931
  name: attribute.Name || "",
767
932
  type: attribute.Value?.split(".").pop() || "",
768
- url: ReadSASResult?.Result? (ReadSASResult.Result.split("?")[0] +
769
- "/" +
770
- attribute.Value +
771
- "?" +
772
- ReadSASResult.Result.split("?")[1]): "",
933
+ url: ReadSASResult?.Result
934
+ ? ReadSASResult.Result.split("?")[0] +
935
+ "/" +
936
+ attribute.Value +
937
+ "?" +
938
+ ReadSASResult.Result.split("?")[1]
939
+ : "",
773
940
  });
774
941
  }
775
942
  }
@@ -1004,7 +1171,7 @@ export async function GetMyInboxCorrespondenceRequests(
1004
1171
  GetMyCorrespondenceListDTO["WithRequest"] = true;
1005
1172
  GetMyCorrespondenceListDTO["WithRequestStepAttributes"] = true;
1006
1173
  GetMyCorrespondenceListDTO["WithRequestAttributes"] = true;
1007
- GetMyCorrespondenceListDTO["RequestStepStatus"] = "Active";
1174
+ GetMyCorrespondenceListDTO["RequestStepStatus"] = "InProcess";
1008
1175
  GetMyCorrespondenceListDTO["WithPreviousClosedRequestSteps"] = true;
1009
1176
 
1010
1177
  let APIResponse = await apiHandler.PostMethod(
@@ -1024,6 +1191,7 @@ export async function GetMyInboxCorrespondenceRequests(
1024
1191
  let ProcessFlow = [];
1025
1192
  let GeneratedDocument = "";
1026
1193
  let Attachments = [];
1194
+ let StepStatusName = element.StepStatusName;
1027
1195
  if (element.Request?.RequestAttributeList?.length > 0) {
1028
1196
  element.Request.RequestAttributeList.forEach((attribute) => {
1029
1197
  if (attribute.Alias === "Subject") {
@@ -1035,7 +1203,10 @@ export async function GetMyInboxCorrespondenceRequests(
1035
1203
  if (attribute.Alias === "InteractorImagePath") {
1036
1204
  ImagePath = attribute.Value;
1037
1205
  }
1038
- if (attribute.AttributeTypeValueTypeName === "Attachment" && !attribute.IsRequesterVisible) {
1206
+ if (
1207
+ attribute.AttributeTypeValueTypeName === "Attachment" &&
1208
+ !attribute.IsRequesterVisible
1209
+ ) {
1039
1210
  // if(attribute.Value && ReadSASResult?.Result)
1040
1211
  // {
1041
1212
  // GeneratedDocument = ReadSASResult.Result.split("?")[0] +
@@ -1044,31 +1215,31 @@ export async function GetMyInboxCorrespondenceRequests(
1044
1215
  // "?" +
1045
1216
  // ReadSASResult.Result.split("?")[1];
1046
1217
  // }
1047
- GeneratedDocument = attribute.Value;
1218
+ GeneratedDocument = attribute.Value;
1048
1219
  }
1049
- if(attribute.Alias === "Attachments" && !attribute.IsRequesterVisible)
1050
- {
1051
- if(attribute.Value)
1052
- {
1220
+ if (
1221
+ attribute.Alias === "Attachments" &&
1222
+ !attribute.IsRequesterVisible
1223
+ ) {
1224
+ if (attribute.Value) {
1053
1225
  let DecodedAttachmentsRecordList = decodeBase64ToJson(
1054
1226
  attribute.Value
1055
1227
  );
1056
1228
  for (let attributeGroup of DecodedAttachmentsRecordList) {
1057
1229
  for (let group of attributeGroup) {
1058
1230
  for (let attribute of group.RequestAttributeDtos) {
1059
- if (
1060
- attribute.AttributeTypeValueTypeName ===
1061
- AttributeTypeValueTypeNames.Attachment
1062
- ) {
1231
+ if (attribute.AttributeTypeValueTypeName === "Attachment") {
1063
1232
  Attachments.push({
1064
1233
  id: attribute.RequestAttributeId || 0,
1065
1234
  name: attribute.Name || "",
1066
1235
  type: attribute.Value?.split(".").pop() || "",
1067
- url: ReadSASResult?.Result? (ReadSASResult.Result.split("?")[0] +
1068
- "/" +
1069
- attribute.Value +
1070
- "?" +
1071
- ReadSASResult.Result.split("?")[1]): "",
1236
+ url: ReadSASResult?.Result
1237
+ ? ReadSASResult.Result.split("?")[0] +
1238
+ "/" +
1239
+ attribute.Value +
1240
+ "?" +
1241
+ ReadSASResult.Result.split("?")[1]
1242
+ : "",
1072
1243
  });
1073
1244
  }
1074
1245
  }
@@ -1113,6 +1284,7 @@ export async function GetMyInboxCorrespondenceRequests(
1113
1284
  });
1114
1285
  }
1115
1286
  MappedResult.push({
1287
+ Status: StepStatusName,
1116
1288
  RequestId: element.RequestId,
1117
1289
  StepId: element.RequestStepId,
1118
1290
  RequesterImagePath: ImagePath,
@@ -1185,7 +1357,10 @@ export async function GetStorageType(AuthToken = null, Timeout = 30000) {
1185
1357
  return 0;
1186
1358
  }
1187
1359
  }
1188
- export async function CreateCorrespondenceReadSAS(AuthToken = null, Timeout = 30000) {
1360
+ export async function CreateCorrespondenceReadSAS(
1361
+ AuthToken = null,
1362
+ Timeout = 30000
1363
+ ) {
1189
1364
  let StorageType = await GetStorageType(AuthToken, Timeout);
1190
1365
  if (StorageType === 0) {
1191
1366
  let APIResponse = await apiHandler.GetMethod(
@@ -1204,7 +1379,10 @@ export async function CreateCorrespondenceReadSAS(AuthToken = null, Timeout = 30
1204
1379
  }
1205
1380
  }
1206
1381
 
1207
- export async function CreateCorrespondenceWriteSAS(AuthToken = null, Timeout = 30000) {
1382
+ export async function CreateCorrespondenceWriteSAS(
1383
+ AuthToken = null,
1384
+ Timeout = 30000
1385
+ ) {
1208
1386
  let StorageType = await GetStorageType(AuthToken, Timeout);
1209
1387
  if (StorageType === 0) {
1210
1388
  let APIResponse = await apiHandler.GetMethod(
@@ -1222,3 +1400,82 @@ export async function CreateCorrespondenceWriteSAS(AuthToken = null, Timeout = 3
1222
1400
  return APIResponse;
1223
1401
  }
1224
1402
  }
1403
+
1404
+ /**
1405
+ * @description
1406
+ * Retrieves the app styles and custom keywords.
1407
+ *
1408
+ * @param {string} AuthToken
1409
+ * Authentication token for authorization purposes.
1410
+ *
1411
+ * @param {number} Timeout
1412
+ * Time in milliseconds to wait before the request times out. Default is 30000.
1413
+ *
1414
+ * @returns
1415
+ * An object containing the API response from the Get App Styles request,
1416
+ * including a success message, status code, and any additional data returned by the API.
1417
+ * {
1418
+ * Message: string,
1419
+ * StatusCode: number,
1420
+ * Result: {
1421
+ * ContainerColor: string,
1422
+ * ExtendedColor: string,
1423
+ * ExtendedTextColor: string,
1424
+ * HeaderColor: string,
1425
+ * PrimaryColor: string,
1426
+ * SecondaryColor: string,
1427
+ * SloganColor: string,
1428
+ * ThemeColor: string,
1429
+ * ThemeTextColor: string,
1430
+ * ThirdColor: string,
1431
+ * CustomKeywords: string[],
1432
+ * LogoImagePath: string
1433
+ * }
1434
+ * }
1435
+ */
1436
+ export async function GetAppStyles(
1437
+ AuthToken = null,
1438
+ Timeout = 30000,
1439
+ RequiredHeaderValue = null
1440
+ ) {
1441
+ let APIResponse = await apiHandler.GetMethod(
1442
+ TransactionsAPIConstants.uriGetStyle(),
1443
+ AuthToken,
1444
+ Timeout,
1445
+ RequiredHeaderValue
1446
+ );
1447
+ let CustomLabelResponse = await apiHandler.PostMethod(
1448
+ TransactionsAPIConstants.uriGetCompanyCustomLabelList(),
1449
+ {},
1450
+ AuthToken,
1451
+ Timeout,
1452
+ RequiredHeaderValue
1453
+ );
1454
+ let MappedResults = null;
1455
+ if (APIResponse.StatusCode === 200) {
1456
+ MappedResults = {
1457
+ ContainerColor: APIResponse.Result.ContainerColor,
1458
+ ExtendedColor: APIResponse.Result.ExtendedColor,
1459
+ ExtendedTextColor: APIResponse.Result.ExtendedTextColor,
1460
+ HeaderColor: APIResponse.Result.HeaderColor,
1461
+ PrimaryColor: APIResponse.Result.PrimaryColor,
1462
+ SecondaryColor: APIResponse.Result.SecondaryColor,
1463
+ SloganColor: APIResponse.Result.SloganColor,
1464
+ ThemeColor: APIResponse.Result.ThemeColor,
1465
+ ThemeTextColor: APIResponse.Result.ThemeTextColor,
1466
+ ThirdColor: APIResponse.Result.ThirdColor,
1467
+ };
1468
+ }
1469
+ if (CustomLabelResponse.StatusCode === 200) {
1470
+ MappedResults.CustomKeywords = CustomLabelResponse.Result;
1471
+ CustomLabelResponse.Result.find((element) => {
1472
+ if (element.Name === "AppLogo") {
1473
+ MappedResults.LogoImagePath = element.FullImagePath;
1474
+ }
1475
+ });
1476
+ }
1477
+ if (MappedResults) {
1478
+ APIResponse.Result = MappedResults;
1479
+ }
1480
+ return APIResponse;
1481
+ }
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 } from "./modals/input-modals/request-modals/RequesterAddRequestInput";
66
+ import { RequesterAddRequestInput, DynamicStepList } 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";
@@ -270,6 +270,7 @@ import { MaintainAgentUnitInput } from "./modals/input-modals/transaction-catalo
270
270
  import { MaintainAgentInteractorInput } from "./modals/input-modals/transaction-catalog-modals/MaintainAgentInteractorInput";
271
271
  import { MaintainAgentInteractorOutput } from "./modals/output-modals/transaction-catalog-modals/MaintainAgentInteractorOutput";
272
272
  import { GetServiceManagementServiceListOutput } from "./modals/output-modals/request-modals/GetServiceManagementServiceListOutput";
273
+ import { GetAppStyles } from "./modals/output-modals/correspondence-modals/GetAppStyles";
273
274
  // Define each module with its specific functions
274
275
 
275
276
  interface AuthenticationServices {
@@ -6904,12 +6905,48 @@ interface CorrespondenceServices {
6904
6905
  * }
6905
6906
  * }
6906
6907
  */
6907
- GetInProcessCorrespondenceRequests: (
6908
+ GetSentCorrespondenceRequests: (
6908
6909
  Input: GetMyCorrespondenceListDTO,
6909
6910
  AuthToken?: string | null,
6910
6911
  Timeout?: number | null
6911
6912
  ) => BaseResponse<GetMyCorrespondenceOutput[] | BaseErrorResponse>;
6912
6913
 
6914
+ /**
6915
+ * @description
6916
+ * Retrieves the list of Correspondences for the current user.
6917
+ *
6918
+ * @param {object} getMyCorrespondenceListDTO
6919
+ * Data object containing fields necessary for retrieving the list of requests.
6920
+ * PageSize: number
6921
+ * PageIndex: number
6922
+ * IsAscendingOrder?: boolean (Optional)
6923
+ * FromFinishDate?: string (Optional)
6924
+ * ToFinishDate?: string (Optional)
6925
+ * FromStartDate?: string (Optional)
6926
+ * ToStartDate?: string (Optional)
6927
+ *
6928
+ * @param {string} AuthToken
6929
+ * Authentication token for authorization purposes.
6930
+ *
6931
+ * @param {number} Timeout
6932
+ * Time in milliseconds to wait before the request times out. Default is 30000.
6933
+ *
6934
+ * @returns
6935
+ * An object containing the response from the Get My Correspondence List request, including
6936
+ * success message, status code, and any additional data returned by the API.
6937
+ * {
6938
+ * Message: string,
6939
+ * StatusCode: number,
6940
+ * Result: {
6941
+ * -- request data based on selection criteria wether grouped or not--
6942
+ * }
6943
+ * }
6944
+ */
6945
+ GetCancelledCorrespondenceRequests: (
6946
+ Input: GetMyCorrespondenceListDTO,
6947
+ AuthToken?: string | null,
6948
+ Timeout?: number | null
6949
+ ) => BaseResponse<GetMyCorrespondenceOutput[] | BaseErrorResponse>;
6913
6950
  /**
6914
6951
  * @description
6915
6952
  * Retrieves the list of Correspondences for the current user.
@@ -7114,7 +7151,7 @@ interface CorrespondenceServices {
7114
7151
  * @param {string} AuthToken
7115
7152
  * Authentication token for authorization purposes.
7116
7153
  *
7117
- * @param {number} Timeout
7154
+ * @param {number} Timeout
7118
7155
  * Optional Timeout in milliseconds for the request.
7119
7156
  *
7120
7157
  * @returns
@@ -7153,6 +7190,30 @@ interface CorrespondenceServices {
7153
7190
  AuthToken?: string | null,
7154
7191
  Timeout?: number | null
7155
7192
  ) => BaseResponse<string | BaseErrorResponse>;
7193
+
7194
+ /**
7195
+ * @description
7196
+ * Retrieves the app styles and custom keywords.
7197
+ *
7198
+ * @param {string} AuthToken
7199
+ * Authentication token for authorization purposes.
7200
+ *
7201
+ * @param {number} Timeout
7202
+ * Optional Timeout in milliseconds for the request.
7203
+ *
7204
+ * @returns
7205
+ * An object containing the API response from the Get App Styles request,
7206
+ * including a success message, status code, and any additional data returned by the API.
7207
+ * {
7208
+ * Message: string,
7209
+ * StatusCode: number,
7210
+ * Result: GetAppStyles
7211
+ * }
7212
+ */
7213
+ GetAppStyles: (
7214
+ AuthToken?: string | null,
7215
+ Timeout?: number | null
7216
+ ) => BaseResponse<GetAppStyles | BaseErrorResponse>;
7156
7217
  }
7157
7218
  interface OctopianSDKConfig {
7158
7219
  /**
@@ -7454,5 +7515,7 @@ export {
7454
7515
  MaintainAgentUnitInput,
7455
7516
  MaintainAgentInteractorInput,
7456
7517
  MaintainAgentInteractorOutput,
7457
- GetServiceManagementServiceListOutput
7518
+ GetServiceManagementServiceListOutput,
7519
+ DynamicStepList,
7520
+ GetAppStyles
7458
7521
  };
package/src/index.js CHANGED
@@ -436,10 +436,12 @@ const {
436
436
  GetMyInboxCorrespondenceRequests,
437
437
  GetMyRejectedCorrespondenceRequests,
438
438
  GetMyInboxCategoryWithCounts,
439
- GetInProcessCorrespondenceRequests,
440
439
  CreateCorrespondenceReadSAS,
441
440
  CreateCorrespondenceWriteSAS,
442
441
  GetStorageType,
442
+ GetCancelledCorrespondenceRequests,
443
+ GetSentCorrespondenceRequests,
444
+ GetAppStyles
443
445
  } = require('./CoreServices/correspondenceServices')
444
446
 
445
447
  const CorrespondenceServices = {
@@ -452,10 +454,12 @@ const CorrespondenceServices = {
452
454
  GetMyInboxCorrespondenceRequests,
453
455
  GetMyRejectedCorrespondenceRequests,
454
456
  GetMyInboxCategoryWithCounts,
455
- GetInProcessCorrespondenceRequests,
456
457
  CreateCorrespondenceReadSAS,
457
458
  CreateCorrespondenceWriteSAS,
458
459
  GetStorageType,
460
+ GetCancelledCorrespondenceRequests,
461
+ GetSentCorrespondenceRequests,
462
+ GetAppStyles
459
463
  }
460
464
  //#region DarAlBer
461
465
  const {
@@ -9,8 +9,19 @@ export interface RequesterAddRequestInput {
9
9
  IsSync?: boolean
10
10
  ClientRequestAttributeDtos?: ClientRequestAttributeDto[]
11
11
  RequestLanguageCode?: string
12
+ DynamicStepList?: DynamicStepList[]
12
13
  }
13
14
 
15
+ export interface DynamicStepList {
16
+ StepTypeName: string
17
+ StepName: string
18
+ SequenceNo: number
19
+ ProviderRoleId: number
20
+ PrivilegeLevel?: number
21
+ UiviewAlias?: string
22
+ IsRequesterVisible: boolean
23
+ IsProviderVisible: boolean
24
+ }
14
25
  export interface ClientRequestAttributeDto {
15
26
  IsSystemGenerated: boolean
16
27
  DtoState: number
@@ -0,0 +1,14 @@
1
+ export interface GetAppStyles {
2
+ ContainerColor: string;
3
+ ExtendedColor: string;
4
+ ExtendedTextColor: string;
5
+ HeaderColor: string;
6
+ PrimaryColor: string;
7
+ SecondaryColor: string;
8
+ SloganColor: string;
9
+ ThemeColor: string;
10
+ ThemeTextColor: string;
11
+ ThirdColor: string;
12
+ CustomKeywords: string[];
13
+ LogoImagePath: string;
14
+ }
@@ -1,6 +1,7 @@
1
1
  export interface GetMyCorrespondenceOutput {
2
2
  RequestId: number
3
3
  StepId: number
4
+ Status: string
4
5
  RequesterImagePath: string
5
6
  RequesterName: string
6
7
  ToName: string